/*! For license information please see main.354c3340.js.LICENSE.txt */
(()=>{var e={3:(e,t,n)=>{"use strict";var r=n(24994);t.A=void 0;var i=r(n(40039)),o=n(70579);t.A=(0,i.default)((0,o.jsx)("path",{d:"M10.01 21.01c0 1.1.89 1.99 1.99 1.99s1.99-.89 1.99-1.99zm8.87-4.19V11c0-3.25-2.25-5.97-5.29-6.69v-.72C13.59 2.71 12.88 2 12 2s-1.59.71-1.59 1.59v.72C7.37 5.03 5.12 7.75 5.12 11v5.82L3 18.94V20h18v-1.06zM16 13.01h-3v3h-2v-3H8V11h3V8h2v3h3z"}),"AddAlert")},630:(e,t,n)=>{"use strict";var r=n(24994);t.A=void 0;var i=r(n(40039)),o=n(70579);t.A=(0,i.default)([(0,o.jsx)("path",{d:"M17 11c.34 0 .67.04 1 .09V6.27L10.5 3 3 6.27v4.91c0 4.54 3.2 8.79 7.5 9.82.55-.13 1.08-.32 1.6-.55-.69-.98-1.1-2.17-1.1-3.45 0-3.31 2.69-6 6-6"},"0"),(0,o.jsx)("path",{d:"M17 13c-2.21 0-4 1.79-4 4s1.79 4 4 4 4-1.79 4-4-1.79-4-4-4m0 1.38c.62 0 1.12.51 1.12 1.12s-.51 1.12-1.12 1.12-1.12-.51-1.12-1.12.5-1.12 1.12-1.12m0 5.37c-.93 0-1.74-.46-2.24-1.17.05-.72 1.51-1.08 2.24-1.08s2.19.36 2.24 1.08c-.5.71-1.31 1.17-2.24 1.17"},"1")],"AdminPanelSettings")},643:(e,t,n)=>{var r=n(57676)("toUpperCase");e.exports=r},1702:(e,t,n)=>{"use strict";var r=n(24994);t.A=void 0;var i=r(n(40039)),o=n(70579);t.A=(0,i.default)((0,o.jsx)("path",{d:"m17 7-1.41 1.41L18.17 11H8v2h10.17l-2.58 2.58L17 17l5-5zM4 5h8V3H4c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h8v-2H4z"}),"Logout")},2086:(e,t,n)=>{"use strict";e.exports=n(95082)},2861:e=>{"use strict";var t=function(e,t){return e+n(t)},n=function(e){return null===e||"boolean"===typeof e||"undefined"===typeof e?"":"number"===typeof e?e.toString():"string"===typeof e?e:Array.isArray(e)?e.reduce(t,""):function(e){return Object.prototype.hasOwnProperty.call(e,"props")}(e)&&Object.prototype.hasOwnProperty.call(e.props,"children")?n(e.props.children):""};n.default=n,e.exports=n},3024:(e,t,n)=>{"use strict";var r=n(86267),i=n(52989);e.exports=function(e,t,n){var o=this||i;return r.forEach(n,function(n){e=n.call(o,e,t)}),e}},3156:(e,t,n)=>{"use strict";var r=n(24994);t.A=void 0;var i=r(n(40039)),o=n(70579);t.A=(0,i.default)((0,o.jsx)("path",{d:"M19.35 10.04C18.67 6.59 15.64 4 12 4 9.11 4 6.6 5.64 5.35 8.04 2.34 8.36 0 10.91 0 14c0 3.31 2.69 6 6 6h13c2.76 0 5-2.24 5-5 0-2.64-2.05-4.78-4.65-4.96M19 18H6c-2.21 0-4-1.79-4-4 0-2.05 1.53-3.76 3.56-3.97l1.07-.11.5-.95C8.08 7.14 9.94 6 12 6c2.62 0 4.88 1.86 5.39 4.43l.3 1.5 1.53.11c1.56.1 2.78 1.41 2.78 2.96 0 1.65-1.35 3-3 3M8 13h2.55v3h2.9v-3H16l-4-4z"}),"CloudUploadOutlined")},3295:(e,t,n)=>{var r=n(71775),i=n(94664),o=n(9096);e.exports=function(e,t){var n={};return t=o(t,3),i(e,function(e,i,o){r(n,t(e,i,o),e)}),n}},3331:(e,t,n)=>{var r=n(39676),i=n(60929),o=n(37303);e.exports=function(e){return function(t,n,a){return a&&"number"!=typeof a&&i(t,n,a)&&(n=a=void 0),t=o(t),void 0===n?(n=t,t=0):n=o(n),a=void 0===a?t<n?1:-1:o(a),r(t,n,a,e)}}},3343:e=>{e.exports=function(e,t){for(var n=-1,r=Array(e);++n<e;)r[n]=t(n);return r}},3519:(e,t,n)=>{"use strict";var r=n(24994);t.A=void 0;var i=r(n(40039)),o=n(70579);t.A=(0,i.default)((0,o.jsx)("path",{d:"M3 17.25V21h3.75L17.81 9.94l-3.75-3.75zM20.71 7.04c.39-.39.39-1.02 0-1.41l-2.34-2.34a.9959.9959 0 0 0-1.41 0l-1.83 1.83 3.75 3.75z"}),"ModeEdit")},3892:e=>{e.exports=function(e){return this.__data__.has(e)}},4262:(e,t,n)=>{var r=n(48895),i=n(54052);e.exports=function(e,t,n){var o=t(e);return i(e)?o:r(o,n(e))}},4391:(e,t,n)=>{"use strict";n.r(t),n.d(t,{capitalize:()=>i.A,createChainedFunction:()=>o.A,createSvgIcon:()=>a.A,debounce:()=>s.A,deprecatedPropType:()=>l,isMuiElement:()=>c.A,ownerDocument:()=>d.A,ownerWindow:()=>u.A,requirePropFactory:()=>p,setRef:()=>h,unstable_ClassNameGenerator:()=>j,unstable_useEnhancedEffect:()=>m.A,unstable_useId:()=>f.A,unsupportedProp:()=>g,useControlled:()=>v.A,useEventCallback:()=>x.A,useForkRef:()=>y.A,useIsFocusVisible:()=>b.A});var r=n(79386),i=n(6803),o=n(6593),a=n(66734),s=n(80950);const l=function(e,t){return()=>null};var c=n(27328),d=n(22427),u=n(36078);const p=function(e,t){return()=>null};const h=n(26564).A;var m=n(55013),f=n(45879);const g=function(e,t,n,r,i){return null};var v=n(54516),x=n(93319),y=n(95849),b=n(13574);const j={configure:e=>{r.A.configure(e)}}},4757:(e,t,n)=>{var r=n(56552);e.exports=function(){return r.Date.now()}},4971:(e,t,n)=>{var r=n(93086),i=n(41069),o=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,a=RegExp("[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]","g");e.exports=function(e){return(e=i(e))&&e.replace(o,r).replace(a,"")}},5538:(e,t,n)=>{var r=n(97160),i=n(84545),o=n(10793),a=n(27760),s=n(3892),l=n(76788);function c(e){var t=this.__data__=new r(e);this.size=t.size}c.prototype.clear=i,c.prototype.delete=o,c.prototype.get=a,c.prototype.has=s,c.prototype.set=l,e.exports=c},5654:(e,t,n)=>{var r=n(87937),i=function(){try{var e=r(Object,"defineProperty");return e({},"",{}),e}catch(t){}}();e.exports=i},5791:(e,t,n)=>{var r=n(26924),i=n(22761);e.exports=function(e){return i(e)&&"[object Map]"==r(e)}},5844:(e,t,n)=>{"use strict";var r;n.d(t,{A:()=>s});var i=n(65043);let o=0;const a=(r||(r=n.t(i,2)))["useId".toString()];function s(e){if(void 0!==a){const t=a();return null!=e?e:t}return function(e){const[t,n]=i.useState(e),r=e||t;return i.useEffect(()=>{null==t&&(o+=1,n("mui-".concat(o)))},[t]),r}(e)}},6217:(e,t,n)=>{e=n.nmd(e),ace.define("ace/ext/beautify",["require","exports","module","ace/token_iterator"],function(e,t,n){"use strict";var r=e("../token_iterator").TokenIterator;function i(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,o,a,s=new r(e,0,0),l=s.getCurrentToken(),c=e.getTabString(),d=t.singletonTags,u=t.blockTags,p=t.formatOptions||{},h=!1,m=!1,f=!1,g="",v="",x="",y=0,b=0,j=0,_=0,C=0,w=0,S=0,A=0,k=0,T=!1,E=!1,M=!1,O=!1,R={0:0},P=[],D=!1,N=function(){n&&n.value&&"string.regexp"!==n.type&&(n.value=n.value.replace(/^\s*/,""))},L=function(){for(var e=g.length-1;0!=e&&" "===g[e];)e-=1;g=g.slice(0,e+1)},I=function(){g=g.trimRight(),h=!1};null!==l;){if(A=s.getCurrentTokenRow(),s.$rowTokens,n=s.stepForward(),"undefined"!==typeof l){if(v=l.value,C=0,M="style"===x||"ace/mode/css"===e.$modeId,i(l,"tag-open")?(E=!0,n&&(O=-1!==u.indexOf(n.value)),"</"===v&&(O&&!h&&k<1&&k++,M&&(k=1),C=1,O=!1)):i(l,"tag-close")?E=!1:i(l,"comment.start")?O=!0:i(l,"comment.end")&&(O=!1),E||k||"paren.rparen"!==l.type||"}"!==l.value.substr(0,1)||k++,A!==o&&(k=A,o&&(k-=o)),k){for(I();k>0;k--)g+="\n";h=!0,i(l,"comment")||l.type.match(/^(comment|string)$/)||(v=v.trimLeft())}if(v){if("keyword"===l.type&&v.match(/^(if|else|elseif|for|foreach|while|switch)$/)?(P[y]=v,N(),f=!0,v.match(/^(else|elseif)$/)&&g.match(/\}[\s]*$/)&&(I(),m=!0)):"paren.lparen"===l.type?(N(),"{"===v.substr(-1)&&(f=!0,T=!1,E||(k=1)),"{"===v.substr(0,1)&&(m=!0,"["!==g.substr(-1)&&"["===g.trimRight().substr(-1)?(I(),m=!1):")"===g.trimRight().substr(-1)?I():L())):"paren.rparen"===l.type?(C=1,"}"===v.substr(0,1)&&("case"===P[y-1]&&C++,"{"===g.trimRight().substr(-1)?I():(m=!0,M&&(k+=2))),"]"===v.substr(0,1)&&"}"!==g.substr(-1)&&"}"===g.trimRight().substr(-1)&&(m=!1,_++,I()),")"===v.substr(0,1)&&"("!==g.substr(-1)&&"("===g.trimRight().substr(-1)&&(m=!1,_++,I()),L()):"keyword.operator"!==l.type&&"keyword"!==l.type||!v.match(/^(=|==|===|!=|!==|&&|\|\||and|or|xor|\+=|.=|>|>=|<|<=|=>)$/)?"punctuation.operator"===l.type&&";"===v?(I(),N(),f=!0,M&&k++):"punctuation.operator"===l.type&&v.match(/^(:|,)$/)?(I(),N(),v.match(/^(,)$/)&&S>0&&0===w&&p.lineBreaksAfterCommasInCurlyBlock?k++:(f=!0,h=!1)):"support.php_tag"!==l.type||"?>"!==v||h?i(l,"attribute-name")&&g.substr(-1).match(/^\s$/)?m=!0:i(l,"attribute-equals")?(L(),N()):i(l,"tag-close")?(L(),"/>"===v&&(m=!0)):"keyword"===l.type&&v.match(/^(case|default)$/)&&D&&(C=1):(I(),m=!0):(I(),N(),m=!0,f=!0),h&&(!l.type.match(/^(comment)$/)||v.substr(0,1).match(/^[/#]$/))&&(!l.type.match(/^(string)$/)||v.substr(0,1).match(/^['"@]$/))){if(_=j,y>b)for(_++,a=y;a>b;a--)R[a]=_;else y<b&&(_=R[y]);for(b=y,j=_,C&&(_-=C),T&&!w&&(_++,T=!1),a=0;a<_;a++)g+=c}if("keyword"===l.type&&v.match(/^(case|default)$/)?!1===D&&(P[y]=v,y++,D=!0):"keyword"===l.type&&v.match(/^(break)$/)&&P[y-1]&&P[y-1].match(/^(case|default)$/)&&(y--,D=!1),"paren.lparen"===l.type&&(w+=(v.match(/\(/g)||[]).length,S+=(v.match(/\{/g)||[]).length,y+=v.length),"keyword"===l.type&&v.match(/^(if|else|elseif|for|while)$/)?(T=!0,w=0):!w&&v.trim()&&"comment"!==l.type&&(T=!1),"paren.rparen"===l.type)for(w-=(v.match(/\)/g)||[]).length,S-=(v.match(/\}/g)||[]).length,a=0;a<v.length;a++)y--,"}"===v.substr(a,1)&&"case"===P[y]&&y--;"text"==l.type&&(v=v.replace(/\s+$/," ")),m&&!h&&(L(),"\n"!==g.substr(-1)&&(g+=" ")),g+=v,f&&(g+=" "),h=!1,m=!1,f=!1,(i(l,"tag-close")&&(O||-1!==u.indexOf(x))||i(l,"doctype")&&">"===v)&&(k=O&&n&&"</"===n.value?-1:1),n&&-1===d.indexOf(n.value)&&(i(l,"tag-open")&&"</"===v?y--:i(l,"tag-open")&&"<"===v?y++:i(l,"tag-close")&&"/>"===v&&y--),i(l,"tag-name")&&(x=v),o=A}}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)})},6219:(e,t,n)=>{var r=n(88468);e.exports=function(e,t){for(var n=-1,i=e.length;++n<i&&r(t,e[n],0)>-1;);return n}},6378:(e,t)=>{"use strict";var n,r=Symbol.for("react.element"),i=Symbol.for("react.portal"),o=Symbol.for("react.fragment"),a=Symbol.for("react.strict_mode"),s=Symbol.for("react.profiler"),l=Symbol.for("react.provider"),c=Symbol.for("react.context"),d=Symbol.for("react.server_context"),u=Symbol.for("react.forward_ref"),p=Symbol.for("react.suspense"),h=Symbol.for("react.suspense_list"),m=Symbol.for("react.memo"),f=Symbol.for("react.lazy"),g=Symbol.for("react.offscreen");function v(e){if("object"===typeof e&&null!==e){var t=e.$$typeof;switch(t){case r:switch(e=e.type){case o:case s:case a:case p:case h:return e;default:switch(e=e&&e.$$typeof){case d:case c:case u:case f:case m:case l:return e;default:return t}}case i:return t}}}n=Symbol.for("react.module.reference"),t.isFragment=function(e){return v(e)===o}},6531:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>r.A});var r=n(11188)},6571:(e,t,n)=>{var r=n(11629),i=n(56173);e.exports=function(e){return null!=e&&i(e.length)&&!r(e)}},6593:(e,t,n)=>{"use strict";n.d(t,{A:()=>r});const r=n(42456).A},6664:(e,t,n)=>{"use strict";var r=n(86267);function i(){this.handlers=[]}i.prototype.use=function(e,t,n){return this.handlers.push({fulfilled:e,rejected:t,synchronous:!!n&&n.synchronous,runWhen:n?n.runWhen:null}),this.handlers.length-1},i.prototype.eject=function(e){this.handlers[e]&&(this.handlers[e]=null)},i.prototype.forEach=function(e){r.forEach(this.handlers,function(t){null!==t&&e(t)})},e.exports=i},6803:(e,t,n)=>{"use strict";n.d(t,{A:()=>r});const r=n(67598).A},6806:(e,t,n)=>{var r=n(61516);e.exports=function(e,t){var n=t?r(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.byteLength)}},8122:(e,t,n)=>{"use strict";n.d(t,{A:()=>x});var r=n(58168),i=n(98587),o=n(65043),a=n(69292),s=n(98610),l=n(6803),c=n(98206),d=n(34535),u=n(92532),p=n(72372);function h(e){return(0,p.Ay)("MuiSvgIcon",e)}(0,u.A)("MuiSvgIcon",["root","colorPrimary","colorSecondary","colorAction","colorError","colorDisabled","fontSizeInherit","fontSizeSmall","fontSizeMedium","fontSizeLarge"]);var m=n(70579);const f=["children","className","color","component","fontSize","htmlColor","inheritViewBox","titleAccess","viewBox"],g=(0,d.Ay)("svg",{name:"MuiSvgIcon",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,"inherit"!==n.color&&t["color".concat((0,l.A)(n.color))],t["fontSize".concat((0,l.A)(n.fontSize))]]}})(e=>{let{theme:t,ownerState:n}=e;var r,i,o,a,s,l,c,d,u,p,h,m,f;return{userSelect:"none",width:"1em",height:"1em",display:"inline-block",fill:n.hasSvgAsChild?void 0:"currentColor",flexShrink:0,transition:null==(r=t.transitions)||null==(i=r.create)?void 0:i.call(r,"fill",{duration:null==(o=t.transitions)||null==(o=o.duration)?void 0:o.shorter}),fontSize:{inherit:"inherit",small:(null==(a=t.typography)||null==(s=a.pxToRem)?void 0:s.call(a,20))||"1.25rem",medium:(null==(l=t.typography)||null==(c=l.pxToRem)?void 0:c.call(l,24))||"1.5rem",large:(null==(d=t.typography)||null==(u=d.pxToRem)?void 0:u.call(d,35))||"2.1875rem"}[n.fontSize],color:null!=(p=null==(h=(t.vars||t).palette)||null==(h=h[n.color])?void 0:h.main)?p:{action:null==(m=(t.vars||t).palette)||null==(m=m.action)?void 0:m.active,disabled:null==(f=(t.vars||t).palette)||null==(f=f.action)?void 0:f.disabled,inherit:void 0}[n.color]}}),v=o.forwardRef(function(e,t){const n=(0,c.b)({props:e,name:"MuiSvgIcon"}),{children:d,className:u,color:p="inherit",component:v="svg",fontSize:x="medium",htmlColor:y,inheritViewBox:b=!1,titleAccess:j,viewBox:_="0 0 24 24"}=n,C=(0,i.A)(n,f),w=o.isValidElement(d)&&"svg"===d.type,S=(0,r.A)({},n,{color:p,component:v,fontSize:x,instanceFontSize:e.fontSize,inheritViewBox:b,viewBox:_,hasSvgAsChild:w}),A={};b||(A.viewBox=_);const k=(e=>{const{color:t,fontSize:n,classes:r}=e,i={root:["root","inherit"!==t&&"color".concat((0,l.A)(t)),"fontSize".concat((0,l.A)(n))]};return(0,s.A)(i,h,r)})(S);return(0,m.jsxs)(g,(0,r.A)({as:v,className:(0,a.A)(k.root,u),focusable:"false",color:y,"aria-hidden":!j||void 0,role:j?"img":void 0,ref:t},A,C,w&&d.props,{ownerState:S,children:[w?d.props.children:d,j?(0,m.jsx)("title",{children:j}):null]}))});v.muiName="SvgIcon";const x=v},8125:e=>{"use strict";e.exports=function(e){return function(t){return e.apply(null,t)}}},8704:e=>{function t(e,t){var n=e.length,r=new Array(n),i={},o=n,a=function(e){for(var t=new Map,n=0,r=e.length;n<r;n++){var i=e[n];t.has(i[0])||t.set(i[0],new Set),t.has(i[1])||t.set(i[1],new Set),t.get(i[0]).add(i[1])}return t}(t),s=function(e){for(var t=new Map,n=0,r=e.length;n<r;n++)t.set(e[n],n);return t}(e);for(t.forEach(function(e){if(!s.has(e[0])||!s.has(e[1]))throw new Error("Unknown node. There is an unknown node in the supplied edges.")});o--;)i[o]||l(e[o],o,new Set);return r;function l(e,t,o){if(o.has(e)){var c;try{c=", node was:"+JSON.stringify(e)}catch(p){c=""}throw new Error("Cyclic dependency"+c)}if(!s.has(e))throw new Error("Found unknown node. Make sure to provided all involved nodes. Unknown node: "+JSON.stringify(e));if(!i[t]){i[t]=!0;var d=a.get(e)||new Set;if(t=(d=Array.from(d)).length){o.add(e);do{var u=d[--t];l(u,s.get(u),o)}while(t);o.delete(e)}r[--n]=e}}}e.exports=function(e){return t(function(e){for(var t=new Set,n=0,r=e.length;n<r;n++){var i=e[n];t.add(i[0]),t.add(i[1])}return Array.from(t)}(e),e)},e.exports.array=t},8820:(e,t,n)=>{var r=n(18902),i=n(75866),o=n(41558),a=n(50149),s=n(47574),l=n(58114),c=Math.min;e.exports=function(e,t,n){for(var d=n?o:i,u=e[0].length,p=e.length,h=p,m=Array(p),f=1/0,g=[];h--;){var v=e[h];h&&t&&(v=a(v,s(t))),f=c(v.length,f),m[h]=!n&&(t||u>=120&&v.length>=120)?new r(h&&v):void 0}v=e[0];var x=-1,y=m[0];e:for(;++x<u&&g.length<f;){var b=v[x],j=t?t(b):b;if(b=n||0!==b?b:0,!(y?l(y,j):d(g,j,n))){for(h=p;--h;){var _=m[h];if(!(_?l(_,j):d(e[h],j,n)))continue e}y&&y.push(j),g.push(b)}}return g}},9096:(e,t,n)=>{var r=n(39256),i=n(15029),o=n(33279),a=n(54052),s=n(63932);e.exports=function(e){return"function"==typeof e?e:null==e?o:"object"==typeof e?a(e)?i(e[0],e[1]):r(e):s(e)}},9261:(e,t,n)=>{var r=n(78420),i=n(35324),o=n(69194),a=n(46686),s=n(70914);e.exports=function(e,t,n,l){if(!a(e))return e;for(var c=-1,d=(t=i(t,e)).length,u=d-1,p=e;null!=p&&++c<d;){var h=s(t[c]),m=n;if("__proto__"===h||"constructor"===h||"prototype"===h)return e;if(c!=u){var f=p[h];void 0===(m=l?l(f,h,p):void 0)&&(m=a(f)?f:o(t[c+1])?[]:{})}r(p,h,m),p=p[h]}return e}},9417:(e,t,n)=>{var r=n(46686);e.exports=function(e){return e===e&&!r(e)}},9812:(e,t,n)=>{var r=n(56552).Symbol;e.exports=r},10143:e=>{var t=/\s/;e.exports=function(e){for(var n=e.length;n--&&t.test(e.charAt(n)););return n}},10155:(e,t,n)=>{"use strict";var r=n(24994);t.A=void 0;var i=r(n(40039)),o=n(70579);t.A=(0,i.default)((0,o.jsx)("path",{d:"M19 6.41 17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z"}),"Clear")},10396:e=>{e.exports=function(e){return function(t){return null==t?void 0:t[e]}}},10457:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>r.A});var r=n(17868)},10652:(e,t,n)=>{"use strict";var r=n(24994);t.A=void 0;var i=r(n(40039)),o=n(70579);t.A=(0,i.default)((0,o.jsx)("path",{d:"M19.35 10.04C18.67 6.59 15.64 4 12 4 9.11 4 6.6 5.64 5.35 8.04 2.34 8.36 0 10.91 0 14c0 3.31 2.69 6 6 6h13c2.76 0 5-2.24 5-5 0-2.64-2.05-4.78-4.65-4.96M19 18H6c-2.21 0-4-1.79-4-4 0-2.05 1.53-3.76 3.56-3.97l1.07-.11.5-.95C8.08 7.14 9.94 6 12 6c2.62 0 4.88 1.86 5.39 4.43l.3 1.5 1.53.11c1.56.1 2.78 1.41 2.78 2.96 0 1.65-1.35 3-3 3M8 13h2.55v3h2.9v-3H16l-4-4z"}),"BackupOutlined")},10697:(e,t,n)=>{"use strict";var r=n(24994);t.A=void 0;var i=r(n(40039)),o=n(70579);t.A=(0,i.default)((0,o.jsx)("path",{d:"M6 19c0 1.1.9 2 2 2h8c1.1 0 2-.9 2-2V7H6zM8 9h8v10H8zm7.5-5-1-1h-5l-1 1H5v2h14V4z"}),"DeleteOutline")},10763:(e,t,n)=>{"use strict";var r=n(24994);t.A=void 0;var i=r(n(40039)),o=n(70579);t.A=(0,i.default)((0,o.jsx)("path",{d:"M11 18h2v-2h-2zm1-16C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2m0 18c-4.41 0-8-3.59-8-8s3.59-8 8-8 8 3.59 8 8-3.59 8-8 8m0-14c-2.21 0-4 1.79-4 4h2c0-1.1.9-2 2-2s2 .9 2 2c0 2-3 1.75-3 5h2c0-2.25 3-2.5 3-5 0-2.21-1.79-4-4-4"}),"HelpOutlineOutlined")},10793:e=>{e.exports=function(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n}},11188:(e,t,n)=>{"use strict";n.d(t,{A:()=>r});const r=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Number.MIN_SAFE_INTEGER,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:Number.MAX_SAFE_INTEGER;return Math.max(t,Math.min(e,n))}},11227:(e,t,n)=>{"use strict";var r=n(24994);t.A=void 0;var i=r(n(40039)),o=n(70579);t.A=(0,i.default)((0,o.jsx)("path",{d:"M19 13h-6v6h-2v-6H5v-2h6V5h2v6h6z"}),"AddOutlined")},11295:(e,t,n)=>{var r=n(9812),i=r?r.prototype:void 0,o=i?i.valueOf:void 0;e.exports=function(e){return o?Object(o.call(e)):{}}},11629:(e,t,n)=>{var r=n(16913),i=n(46686);e.exports=function(e){if(!i(e))return!1;var t=r(e);return"[object Function]"==t||"[object GeneratorFunction]"==t||"[object AsyncFunction]"==t||"[object Proxy]"==t}},12121:(e,t,n)=>{"use strict";var r=n(86267);e.exports=function(e,t){r.forEach(e,function(n,r){r!==t&&r.toUpperCase()===t.toUpperCase()&&(e[t]=n,delete e[r])})}},12322:(e,t,n)=>{var r=n(16913),i=n(85990),o=n(22761),a=Function.prototype,s=Object.prototype,l=a.toString,c=s.hasOwnProperty,d=l.call(Object);e.exports=function(e){if(!o(e)||"[object Object]"!=r(e))return!1;var t=i(e);if(null===t)return!0;var n=c.call(t,"constructor")&&t.constructor;return"function"==typeof n&&n instanceof n&&l.call(n)==d}},12521:(e,t,n)=>{"use strict";var r=n(24994);t.A=void 0;var i=r(n(40039)),o=n(70579);t.A=(0,i.default)((0,o.jsx)("path",{d:"M19.59 7 12 14.59 6.41 9H11V7H3v8h2v-4.59l7 7 9-9z"}),"CallMissed")},12536:(e,t,n)=>{var r=n(50149),i=n(52969),o=n(9096),a=n(38883),s=n(60320),l=n(47574),c=n(65893),d=n(33279),u=n(54052);e.exports=function(e,t,n){t=t.length?r(t,function(e){return u(e)?function(t){return i(t,1===e.length?e[0]:e)}:e}):[d];var p=-1;t=r(t,l(o));var h=a(e,function(e,n,i){return{criteria:r(t,function(t){return t(e)}),index:++p,value:e}});return s(h,function(e,t){return c(e,t,n)})}},12622:(e,t,n)=>{var r=n(70705);e.exports=function(e,t){var n=e.__data__;return r(t)?n["string"==typeof t?"string":"hash"]:n.map}},13028:e=>{e.exports=function(e,t){return function(n){return e(t(n))}}},13030:(e,t,n)=>{"use strict";n.d(t,{A:()=>i});var r=n(58168);function i(e,t){const n=(0,r.A)({},t);return Object.keys(e).forEach(o=>{if(o.toString().match(/^(components|slots)$/))n[o]=(0,r.A)({},e[o],n[o]);else if(o.toString().match(/^(componentsProps|slotProps)$/)){const a=e[o]||{},s=t[o];n[o]={},s&&Object.keys(s)?a&&Object.keys(a)?(n[o]=(0,r.A)({},s),Object.keys(a).forEach(e=>{n[o][e]=i(a[e],s[e])})):n[o]=s:n[o]=a}else void 0===n[o]&&(n[o]=e[o])}),n}},13174:(e,t,n)=>{"use strict";n.r(t),n.d(t,{GlobalStyles:()=>_.A,StyledEngineProvider:()=>j,ThemeContext:()=>i.T,css:()=>v.AH,default:()=>C,internal_processStyles:()=>w,internal_serializeStyles:()=>A,keyframes:()=>v.i7});var r=n(58168),i=n(69369),o=n(66598),a=n(69436),s=n(81722),l=n(65043),c=n(30918),d=/^((children|dangerouslySetInnerHTML|key|ref|autoFocus|defaultValue|defaultChecked|innerHTML|suppressContentEditableWarning|suppressHydrationWarning|valueLink|abbr|accept|acceptCharset|accessKey|action|allow|allowUserMedia|allowPaymentRequest|allowFullScreen|allowTransparency|alt|async|autoComplete|autoPlay|capture|cellPadding|cellSpacing|challenge|charSet|checked|cite|classID|className|cols|colSpan|content|contentEditable|contextMenu|controls|controlsList|coords|crossOrigin|data|dateTime|decoding|default|defer|dir|disabled|disablePictureInPicture|disableRemotePlayback|download|draggable|encType|enterKeyHint|fetchpriority|fetchPriority|form|formAction|formEncType|formMethod|formNoValidate|formTarget|frameBorder|headers|height|hidden|high|href|hrefLang|htmlFor|httpEquiv|id|inputMode|integrity|is|keyParams|keyType|kind|label|lang|list|loading|loop|low|marginHeight|marginWidth|max|maxLength|media|mediaGroup|method|min|minLength|multiple|muted|name|nonce|noValidate|open|optimum|pattern|placeholder|playsInline|popover|popoverTarget|popoverTargetAction|poster|preload|profile|radioGroup|readOnly|referrerPolicy|rel|required|reversed|role|rows|rowSpan|sandbox|scope|scoped|scrolling|seamless|selected|shape|size|sizes|slot|span|spellCheck|src|srcDoc|srcLang|srcSet|start|step|style|summary|tabIndex|target|title|translate|type|useMap|value|width|wmode|wrap|about|datatype|inlist|prefix|property|resource|typeof|vocab|autoCapitalize|autoCorrect|autoSave|color|incremental|fallback|inert|itemProp|itemScope|itemType|itemID|itemRef|on|option|results|security|unselectable|accentHeight|accumulate|additive|alignmentBaseline|allowReorder|alphabetic|amplitude|arabicForm|ascent|attributeName|attributeType|autoReverse|azimuth|baseFrequency|baselineShift|baseProfile|bbox|begin|bias|by|calcMode|capHeight|clip|clipPathUnits|clipPath|clipRule|colorInterpolation|colorInterpolationFilters|colorProfile|colorRendering|contentScriptType|contentStyleType|cursor|cx|cy|d|decelerate|descent|diffuseConstant|direction|display|divisor|dominantBaseline|dur|dx|dy|edgeMode|elevation|enableBackground|end|exponent|externalResourcesRequired|fill|fillOpacity|fillRule|filter|filterRes|filterUnits|floodColor|floodOpacity|focusable|fontFamily|fontSize|fontSizeAdjust|fontStretch|fontStyle|fontVariant|fontWeight|format|from|fr|fx|fy|g1|g2|glyphName|glyphOrientationHorizontal|glyphOrientationVertical|glyphRef|gradientTransform|gradientUnits|hanging|horizAdvX|horizOriginX|ideographic|imageRendering|in|in2|intercept|k|k1|k2|k3|k4|kernelMatrix|kernelUnitLength|kerning|keyPoints|keySplines|keyTimes|lengthAdjust|letterSpacing|lightingColor|limitingConeAngle|local|markerEnd|markerMid|markerStart|markerHeight|markerUnits|markerWidth|mask|maskContentUnits|maskUnits|mathematical|mode|numOctaves|offset|opacity|operator|order|orient|orientation|origin|overflow|overlinePosition|overlineThickness|panose1|paintOrder|pathLength|patternContentUnits|patternTransform|patternUnits|pointerEvents|points|pointsAtX|pointsAtY|pointsAtZ|preserveAlpha|preserveAspectRatio|primitiveUnits|r|radius|refX|refY|renderingIntent|repeatCount|repeatDur|requiredExtensions|requiredFeatures|restart|result|rotate|rx|ry|scale|seed|shapeRendering|slope|spacing|specularConstant|specularExponent|speed|spreadMethod|startOffset|stdDeviation|stemh|stemv|stitchTiles|stopColor|stopOpacity|strikethroughPosition|strikethroughThickness|string|stroke|strokeDasharray|strokeDashoffset|strokeLinecap|strokeLinejoin|strokeMiterlimit|strokeOpacity|strokeWidth|surfaceScale|systemLanguage|tableValues|targetX|targetY|textAnchor|textDecoration|textRendering|textLength|to|transform|u1|u2|underlinePosition|underlineThickness|unicode|unicodeBidi|unicodeRange|unitsPerEm|vAlphabetic|vHanging|vIdeographic|vMathematical|values|vectorEffect|version|vertAdvY|vertOriginX|vertOriginY|viewBox|viewTarget|visibility|widths|wordSpacing|writingMode|x|xHeight|x1|x2|xChannelSelector|xlinkActuate|xlinkArcrole|xlinkHref|xlinkRole|xlinkShow|xlinkTitle|xlinkType|xmlBase|xmlns|xmlnsXlink|xmlLang|xmlSpace|y|y1|y2|yChannelSelector|z|zoomAndPan|for|class|autofocus)|(([Dd][Aa][Tt][Aa]|[Aa][Rr][Ii][Aa]|x)-.*))$/,u=(0,c.A)(function(e){return d.test(e)||111===e.charCodeAt(0)&&110===e.charCodeAt(1)&&e.charCodeAt(2)<91}),p=function(e){return"theme"!==e},h=function(e){return"string"===typeof e&&e.charCodeAt(0)>96?u:p},m=function(e,t,n){var r;if(t){var i=t.shouldForwardProp;r=e.__emotion_forwardProp&&i?function(t){return e.__emotion_forwardProp(t)&&i(t)}:i}return"function"!==typeof r&&n&&(r=e.__emotion_forwardProp),r},f=function(e){var t=e.cache,n=e.serialized,r=e.isStringTag;return(0,s.SF)(t,n,r),(0,a.s)(function(){return(0,s.sk)(t,n,r)}),null},g=function e(t,n){var a,c,d=t.__emotion_real===t,u=d&&t.__emotion_base||t;void 0!==n&&(a=n.label,c=n.target);var p=m(t,n,d),g=p||h(u),v=!g("as");return function(){var x=arguments,y=d&&void 0!==t.__emotion_styles?t.__emotion_styles.slice(0):[];if(void 0!==a&&y.push("label:"+a+";"),null==x[0]||void 0===x[0].raw)y.push.apply(y,x);else{var b=x[0];y.push(b[0]);for(var j=x.length,_=1;_<j;_++)y.push(x[_],b[_])}var C=(0,i.w)(function(e,t,n){var r=v&&e.as||u,a="",d=[],m=e;if(null==e.theme){for(var x in m={},e)m[x]=e[x];m.theme=l.useContext(i.T)}"string"===typeof e.className?a=(0,s.Rk)(t.registered,d,e.className):null!=e.className&&(a=e.className+" ");var b=(0,o.J)(y.concat(d),t.registered,m);a+=t.key+"-"+b.name,void 0!==c&&(a+=" "+c);var j=v&&void 0===p?h(r):g,_={};for(var C in e)v&&"as"===C||j(C)&&(_[C]=e[C]);return _.className=a,n&&(_.ref=n),l.createElement(l.Fragment,null,l.createElement(f,{cache:t,serialized:b,isStringTag:"string"===typeof r}),l.createElement(r,_))});return C.displayName=void 0!==a?a:"Styled("+("string"===typeof u?u:u.displayName||u.name||"Component")+")",C.defaultProps=t.defaultProps,C.__emotion_real=C,C.__emotion_base=u,C.__emotion_styles=y,C.__emotion_forwardProp=p,Object.defineProperty(C,"toString",{value:function(){return"."+c}}),C.withComponent=function(t,i){return e(t,(0,r.A)({},n,i,{shouldForwardProp:m(C,i,!0)})).apply(void 0,y)},C}}.bind(null);["a","abbr","address","area","article","aside","audio","b","base","bdi","bdo","big","blockquote","body","br","button","canvas","caption","cite","code","col","colgroup","data","datalist","dd","del","details","dfn","dialog","div","dl","dt","em","embed","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","iframe","img","input","ins","kbd","keygen","label","legend","li","link","main","map","mark","marquee","menu","menuitem","meta","meter","nav","noscript","object","ol","optgroup","option","output","p","param","picture","pre","progress","q","rp","rt","ruby","s","samp","script","section","select","small","source","span","strong","style","sub","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","title","tr","track","u","ul","var","video","wbr","circle","clipPath","defs","ellipse","foreignObject","g","image","line","linearGradient","mask","path","pattern","polygon","polyline","radialGradient","rect","stop","svg","text","tspan"].forEach(function(e){g[e]=g(e)});var v=n(83290),x=n(93803),y=n(70579);const b=new Map;function j(e){const{injectFirst:t,enableCssLayer:n,children:r}=e,o=l.useMemo(()=>{const e="".concat(t,"-").concat(n);if("object"===typeof document&&b.has(e))return b.get(e);const r=function(e,t){const n=(0,x.A)({key:"css",prepend:e});if(t){const e=n.insert;n.insert=function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return n[1].styles.match(/^@layer\s+[^{]*$/)||(n[1].styles="@layer mui {".concat(n[1].styles,"}")),e(...n)}}return n}(t,n);return b.set(e,r),r},[t,n]);return t||n?(0,y.jsx)(i.C,{value:o,children:r}):r}var _=n(70869);function C(e,t){return g(e,t)}const w=(e,t)=>{Array.isArray(e.__emotion_styles)&&(e.__emotion_styles=t(e.__emotion_styles))},S=[];function A(e){return S[0]=e,(0,o.J)(S)}},13218:e=>{"use strict";e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},13375:(e,t,n)=>{"use strict";n.d(t,{A:()=>r});const r="$$material"},13440:(e,t,n)=>{var r=n(56552)["__core-js_shared__"];e.exports=r},13574:(e,t,n)=>{"use strict";n.d(t,{A:()=>h});var r=n(65043),i=n(99303);let o=!0,a=!1;const s=new i.E,l={text:!0,search:!0,url:!0,tel:!0,email:!0,password:!0,number:!0,date:!0,month:!0,week:!0,time:!0,datetime:!0,"datetime-local":!0};function c(e){e.metaKey||e.altKey||e.ctrlKey||(o=!0)}function d(){o=!1}function u(){"hidden"===this.visibilityState&&a&&(o=!0)}function p(e){const{target:t}=e;try{return t.matches(":focus-visible")}catch(n){}return o||function(e){const{type:t,tagName:n}=e;return!("INPUT"!==n||!l[t]||e.readOnly)||"TEXTAREA"===n&&!e.readOnly||!!e.isContentEditable}(t)}const h=function(){const e=r.useCallback(e=>{var t;null!=e&&((t=e.ownerDocument).addEventListener("keydown",c,!0),t.addEventListener("mousedown",d,!0),t.addEventListener("pointerdown",d,!0),t.addEventListener("touchstart",d,!0),t.addEventListener("visibilitychange",u,!0))},[]),t=r.useRef(!1);return{isFocusVisibleRef:t,onFocus:function(e){return!!p(e)&&(t.current=!0,!0)},onBlur:function(){return!!t.current&&(a=!0,s.start(100,()=>{a=!1}),t.current=!1,!0)},ref:e}}},13654:(e,t,n)=>{"use strict";n.d(t,{A:()=>l,b:()=>s});var r=n(65043),i=n(13030),o=n(70579);const a=r.createContext(void 0);function s(e){let{props:t,name:n}=e;return function(e){const{theme:t,name:n,props:r}=e;if(!t||!t.components||!t.components[n])return r;const o=t.components[n];return o.defaultProps?(0,i.A)(o.defaultProps,r):o.styleOverrides||o.variants?r:(0,i.A)(o,r)}({props:t,name:n,theme:{components:r.useContext(a)}})}const l=function(e){let{value:t,children:n}=e;return(0,o.jsx)(a.Provider,{value:t,children:n})}},13815:(e,t,n)=>{"use strict";n.d(t,{A:()=>i});var r=n(19172);const i=function(e,t){return t?(0,r.A)(e,t,{clone:!1}):e}},13865:e=>{var t=new Error("Element already at target scroll position"),n=new Error("Scroll cancelled"),r=Math.min,i=Date.now;function o(e){return function(o,l,c,d){"function"==typeof(c=c||{})&&(d=c,c={}),"function"!=typeof d&&(d=s);var u=i(),p=o[e],h=c.ease||a,m=isNaN(c.duration)?350:+c.duration,f=!1;return p===l?d(t,o[e]):requestAnimationFrame(function t(a){if(f)return d(n,o[e]);var s=i(),c=r(1,(s-u)/m),g=h(c);o[e]=g*(l-p)+p,c<1?requestAnimationFrame(t):requestAnimationFrame(function(){d(null,o[e])})}),function(){f=!0}}}function a(e){return.5*(1-Math.cos(Math.PI*e))}function s(){}e.exports={left:o("scrollLeft"),top:o("scrollTop")}},14079:(e,t,n)=>{var r=n(88259),i=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,o=/\\(\\)?/g,a=r(function(e){var t=[];return 46===e.charCodeAt(0)&&t.push(""),e.replace(i,function(e,n,r,i){t.push(r?i.replace(o,"$1"):n||e)}),t});e.exports=a},14202:(e,t)=>{"use strict";var n=Symbol.for("react.element"),r=Symbol.for("react.portal"),i=Symbol.for("react.fragment"),o=Symbol.for("react.strict_mode"),a=Symbol.for("react.profiler"),s=Symbol.for("react.provider"),l=Symbol.for("react.context"),c=Symbol.for("react.forward_ref"),d=Symbol.for("react.suspense"),u=Symbol.for("react.memo"),p=Symbol.for("react.lazy"),h=Symbol.iterator;var m={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},f=Object.assign,g={};function v(e,t,n){this.props=e,this.context=t,this.refs=g,this.updater=n||m}function x(){}function y(e,t,n){this.props=e,this.context=t,this.refs=g,this.updater=n||m}v.prototype.isReactComponent={},v.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")},v.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")},x.prototype=v.prototype;var b=y.prototype=new x;b.constructor=y,f(b,v.prototype),b.isPureReactComponent=!0;var j=Array.isArray,_=Object.prototype.hasOwnProperty,C={current:null},w={key:!0,ref:!0,__self:!0,__source:!0};function S(e,t,r){var i,o={},a=null,s=null;if(null!=t)for(i in void 0!==t.ref&&(s=t.ref),void 0!==t.key&&(a=""+t.key),t)_.call(t,i)&&!w.hasOwnProperty(i)&&(o[i]=t[i]);var l=arguments.length-2;if(1===l)o.children=r;else if(1<l){for(var c=Array(l),d=0;d<l;d++)c[d]=arguments[d+2];o.children=c}if(e&&e.defaultProps)for(i in l=e.defaultProps)void 0===o[i]&&(o[i]=l[i]);return{$$typeof:n,type:e,key:a,ref:s,props:o,_owner:C.current}}function A(e){return"object"===typeof e&&null!==e&&e.$$typeof===n}var k=/\/+/g;function T(e,t){return"object"===typeof e&&null!==e&&null!=e.key?function(e){var t={"=":"=0",":":"=2"};return"$"+e.replace(/[=:]/g,function(e){return t[e]})}(""+e.key):t.toString(36)}function E(e,t,i,o,a){var s=typeof e;"undefined"!==s&&"boolean"!==s||(e=null);var l=!1;if(null===e)l=!0;else switch(s){case"string":case"number":l=!0;break;case"object":switch(e.$$typeof){case n:case r:l=!0}}if(l)return a=a(l=e),e=""===o?"."+T(l,0):o,j(a)?(i="",null!=e&&(i=e.replace(k,"$&/")+"/"),E(a,t,i,"",function(e){return e})):null!=a&&(A(a)&&(a=function(e,t){return{$$typeof:n,type:e.type,key:t,ref:e.ref,props:e.props,_owner:e._owner}}(a,i+(!a.key||l&&l.key===a.key?"":(""+a.key).replace(k,"$&/")+"/")+e)),t.push(a)),1;if(l=0,o=""===o?".":o+":",j(e))for(var c=0;c<e.length;c++){var d=o+T(s=e[c],c);l+=E(s,t,i,d,a)}else if(d=function(e){return null===e||"object"!==typeof e?null:"function"===typeof(e=h&&e[h]||e["@@iterator"])?e:null}(e),"function"===typeof d)for(e=d.call(e),c=0;!(s=e.next()).done;)l+=E(s=s.value,t,i,d=o+T(s,c++),a);else if("object"===s)throw t=String(e),Error("Objects are not valid as a React child (found: "+("[object Object]"===t?"object with keys {"+Object.keys(e).join(", ")+"}":t)+"). If you meant to render a collection of children, use an array instead.");return l}function M(e,t,n){if(null==e)return e;var r=[],i=0;return E(e,r,"","",function(e){return t.call(n,e,i++)}),r}function O(e){if(-1===e._status){var t=e._result;(t=t()).then(function(t){0!==e._status&&-1!==e._status||(e._status=1,e._result=t)},function(t){0!==e._status&&-1!==e._status||(e._status=2,e._result=t)}),-1===e._status&&(e._status=0,e._result=t)}if(1===e._status)return e._result.default;throw e._result}var R={current:null},P={transition:null},D={ReactCurrentDispatcher:R,ReactCurrentBatchConfig:P,ReactCurrentOwner:C};function N(){throw Error("act(...) is not supported in production builds of React.")}t.Children={map:M,forEach:function(e,t,n){M(e,function(){t.apply(this,arguments)},n)},count:function(e){var t=0;return M(e,function(){t++}),t},toArray:function(e){return M(e,function(e){return e})||[]},only:function(e){if(!A(e))throw Error("React.Children.only expected to receive a single React element child.");return e}},t.Component=v,t.Fragment=i,t.Profiler=a,t.PureComponent=y,t.StrictMode=o,t.Suspense=d,t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=D,t.act=N,t.cloneElement=function(e,t,r){if(null===e||void 0===e)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+e+".");var i=f({},e.props),o=e.key,a=e.ref,s=e._owner;if(null!=t){if(void 0!==t.ref&&(a=t.ref,s=C.current),void 0!==t.key&&(o=""+t.key),e.type&&e.type.defaultProps)var l=e.type.defaultProps;for(c in t)_.call(t,c)&&!w.hasOwnProperty(c)&&(i[c]=void 0===t[c]&&void 0!==l?l[c]:t[c])}var c=arguments.length-2;if(1===c)i.children=r;else if(1<c){l=Array(c);for(var d=0;d<c;d++)l[d]=arguments[d+2];i.children=l}return{$$typeof:n,type:e.type,key:o,ref:a,props:i,_owner:s}},t.createContext=function(e){return(e={$$typeof:l,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null}).Provider={$$typeof:s,_context:e},e.Consumer=e},t.createElement=S,t.createFactory=function(e){var t=S.bind(null,e);return t.type=e,t},t.createRef=function(){return{current:null}},t.forwardRef=function(e){return{$$typeof:c,render:e}},t.isValidElement=A,t.lazy=function(e){return{$$typeof:p,_payload:{_status:-1,_result:e},_init:O}},t.memo=function(e,t){return{$$typeof:u,type:e,compare:void 0===t?null:t}},t.startTransition=function(e){var t=P.transition;P.transition={};try{e()}finally{P.transition=t}},t.unstable_act=N,t.useCallback=function(e,t){return R.current.useCallback(e,t)},t.useContext=function(e){return R.current.useContext(e)},t.useDebugValue=function(){},t.useDeferredValue=function(e){return R.current.useDeferredValue(e)},t.useEffect=function(e,t){return R.current.useEffect(e,t)},t.useId=function(){return R.current.useId()},t.useImperativeHandle=function(e,t,n){return R.current.useImperativeHandle(e,t,n)},t.useInsertionEffect=function(e,t){return R.current.useInsertionEffect(e,t)},t.useLayoutEffect=function(e,t){return R.current.useLayoutEffect(e,t)},t.useMemo=function(e,t){return R.current.useMemo(e,t)},t.useReducer=function(e,t,n){return R.current.useReducer(e,t,n)},t.useRef=function(e){return R.current.useRef(e)},t.useState=function(e){return R.current.useState(e)},t.useSyncExternalStore=function(e,t,n){return R.current.useSyncExternalStore(e,t,n)},t.useTransition=function(){return R.current.useTransition()},t.version="18.3.1"},14318:(e,t,n)=>{"use strict";n.d(t,{Ay:()=>d,p0:()=>s});var r=n(98587),i=n(58168);const o=["duration","easing","delay"],a={easeInOut:"cubic-bezier(0.4, 0, 0.2, 1)",easeOut:"cubic-bezier(0.0, 0, 0.2, 1)",easeIn:"cubic-bezier(0.4, 0, 1, 1)",sharp:"cubic-bezier(0.4, 0, 0.6, 1)"},s={shortest:150,shorter:200,short:250,standard:300,complex:375,enteringScreen:225,leavingScreen:195};function l(e){return"".concat(Math.round(e),"ms")}function c(e){if(!e)return 0;const t=e/36;return Math.round(10*(4+15*t**.25+t/5))}function d(e){const t=(0,i.A)({},a,e.easing),n=(0,i.A)({},s,e.duration);return(0,i.A)({getAutoHeightDuration:c,create:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:["all"],i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const{duration:a=n.standard,easing:s=t.easeInOut,delay:c=0}=i;(0,r.A)(i,o);return(Array.isArray(e)?e:[e]).map(e=>"".concat(e," ").concat("string"===typeof a?a:l(a)," ").concat(s," ").concat("string"===typeof c?c:l(c))).join(",")}},e,{easing:t,duration:n})}},14657:e=>{e.exports=function(e,t){return null==e?void 0:e[t]}},15029:(e,t,n)=>{var r=n(26989),i=n(33097),o=n(53366),a=n(62597),s=n(9417),l=n(91310),c=n(70914);e.exports=function(e,t){return a(e)&&s(t)?l(c(e),t):function(n){var a=i(n,e);return void 0===a&&a===t?o(n,e):r(t,a,3)}}},15170:(e,t,n)=>{"use strict";n.d(t,{A:()=>r});const r=(0,n(37344).A)()},15193:(e,t,n)=>{var r=n(16913),i=n(22761);e.exports=function(e){return i(e)&&"[object Arguments]"==r(e)}},15388:e=>{var t=function(){this.Diff_Timeout=1,this.Diff_EditCost=4,this.Match_Threshold=.5,this.Match_Distance=1e3,this.Patch_DeleteThreshold=.5,this.Patch_Margin=4,this.Match_MaxBits=32},n=-1;t.Diff=function(e,t){return[e,t]},t.prototype.diff_main=function(e,n,r,i){"undefined"==typeof i&&(i=this.Diff_Timeout<=0?Number.MAX_VALUE:(new Date).getTime()+1e3*this.Diff_Timeout);var o=i;if(null==e||null==n)throw new Error("Null input. (diff_main)");if(e==n)return e?[new t.Diff(0,e)]:[];"undefined"==typeof r&&(r=!0);var a=r,s=this.diff_commonPrefix(e,n),l=e.substring(0,s);e=e.substring(s),n=n.substring(s),s=this.diff_commonSuffix(e,n);var c=e.substring(e.length-s);e=e.substring(0,e.length-s),n=n.substring(0,n.length-s);var d=this.diff_compute_(e,n,a,o);return l&&d.unshift(new t.Diff(0,l)),c&&d.push(new t.Diff(0,c)),this.diff_cleanupMerge(d),d},t.prototype.diff_compute_=function(e,r,i,o){var a;if(!e)return[new t.Diff(1,r)];if(!r)return[new t.Diff(n,e)];var s=e.length>r.length?e:r,l=e.length>r.length?r: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>r.length&&(a[0][0]=a[2][0]=n),a;if(1==l.length)return[new t.Diff(n,e),new t.Diff(1,r)];var d=this.diff_halfMatch_(e,r);if(d){var u=d[0],p=d[1],h=d[2],m=d[3],f=d[4],g=this.diff_main(u,h,i,o),v=this.diff_main(p,m,i,o);return g.concat([new t.Diff(0,f)],v)}return i&&e.length>100&&r.length>100?this.diff_lineMode_(e,r,o):this.diff_bisect_(e,r,o)},t.prototype.diff_lineMode_=function(e,r,i){var o=this.diff_linesToChars_(e,r);e=o.chars1,r=o.chars2;var a=o.lineArray,s=this.diff_main(e,r,!1,i);this.diff_charsToLines_(s,a),this.diff_cleanupSemantic(s),s.push(new t.Diff(0,""));for(var l=0,c=0,d=0,u="",p="";l<s.length;){switch(s[l][0]){case 1:d++,p+=s[l][1];break;case n:c++,u+=s[l][1];break;case 0:if(c>=1&&d>=1){s.splice(l-c-d,c+d),l=l-c-d;for(var h=this.diff_main(u,p,!1,i),m=h.length-1;m>=0;m--)s.splice(l,0,h[m]);l+=h.length}d=0,c=0,u="",p=""}l++}return s.pop(),s},t.prototype.diff_bisect_=function(e,r,i){for(var o=e.length,a=r.length,s=Math.ceil((o+a)/2),l=s,c=2*s,d=new Array(c),u=new Array(c),p=0;p<c;p++)d[p]=-1,u[p]=-1;d[l+1]=0,u[l+1]=0;for(var h=o-a,m=h%2!=0,f=0,g=0,v=0,x=0,y=0;y<s&&!((new Date).getTime()>i);y++){for(var b=-y+f;b<=y-g;b+=2){for(var j=l+b,_=(k=b==-y||b!=y&&d[j-1]<d[j+1]?d[j+1]:d[j-1]+1)-b;k<o&&_<a&&e.charAt(k)==r.charAt(_);)k++,_++;if(d[j]=k,k>o)g+=2;else if(_>a)f+=2;else if(m){if((S=l+h-b)>=0&&S<c&&-1!=u[S])if(k>=(w=o-u[S]))return this.diff_bisectSplit_(e,r,k,_,i)}}for(var C=-y+v;C<=y-x;C+=2){for(var w,S=l+C,A=(w=C==-y||C!=y&&u[S-1]<u[S+1]?u[S+1]:u[S-1]+1)-C;w<o&&A<a&&e.charAt(o-w-1)==r.charAt(a-A-1);)w++,A++;if(u[S]=w,w>o)x+=2;else if(A>a)v+=2;else if(!m){if((j=l+h-C)>=0&&j<c&&-1!=d[j]){var k;_=l+(k=d[j])-j;if(k>=(w=o-w))return this.diff_bisectSplit_(e,r,k,_,i)}}}}return[new t.Diff(n,e),new t.Diff(1,r)]},t.prototype.diff_bisectSplit_=function(e,t,n,r,i){var o=e.substring(0,n),a=t.substring(0,r),s=e.substring(n),l=t.substring(r),c=this.diff_main(o,a,!1,i),d=this.diff_main(s,l,!1,i);return c.concat(d)},t.prototype.diff_linesToChars_=function(e,t){var n=[],r={};function i(e){for(var t="",i=0,a=-1,s=n.length;a<e.length-1;){-1==(a=e.indexOf("\n",i))&&(a=e.length-1);var l=e.substring(i,a+1);(r.hasOwnProperty?r.hasOwnProperty(l):void 0!==r[l])?t+=String.fromCharCode(r[l]):(s==o&&(l=e.substring(i),a=e.length),t+=String.fromCharCode(s),r[l]=s,n[s++]=l),i=a+1}return t}n[0]="";var o=4e4,a=i(e);return o=65535,{chars1:a,chars2:i(t),lineArray:n}},t.prototype.diff_charsToLines_=function(e,t){for(var n=0;n<e.length;n++){for(var r=e[n][1],i=[],o=0;o<r.length;o++)i[o]=t[r.charCodeAt(o)];e[n][1]=i.join("")}},t.prototype.diff_commonPrefix=function(e,t){if(!e||!t||e.charAt(0)!=t.charAt(0))return 0;for(var n=0,r=Math.min(e.length,t.length),i=r,o=0;n<i;)e.substring(o,i)==t.substring(o,i)?o=n=i:r=i,i=Math.floor((r-n)/2+n);return i},t.prototype.diff_commonSuffix=function(e,t){if(!e||!t||e.charAt(e.length-1)!=t.charAt(t.length-1))return 0;for(var n=0,r=Math.min(e.length,t.length),i=r,o=0;n<i;)e.substring(e.length-i,e.length-o)==t.substring(t.length-i,t.length-o)?o=n=i:r=i,i=Math.floor((r-n)/2+n);return i},t.prototype.diff_commonOverlap_=function(e,t){var n=e.length,r=t.length;if(0==n||0==r)return 0;n>r?e=e.substring(n-r):n<r&&(t=t.substring(0,n));var i=Math.min(n,r);if(e==t)return i;for(var o=0,a=1;;){var s=e.substring(i-a),l=t.indexOf(s);if(-1==l)return o;a+=l,0!=l&&e.substring(i-a)!=t.substring(0,a)||(o=a,a++)}},t.prototype.diff_halfMatch_=function(e,t){if(this.Diff_Timeout<=0)return null;var n=e.length>t.length?e:t,r=e.length>t.length?t:e;if(n.length<4||2*r.length<n.length)return null;var i=this;function o(e,t,n){for(var r,o,a,s,l=e.substring(n,n+Math.floor(e.length/4)),c=-1,d="";-1!=(c=t.indexOf(l,c+1));){var u=i.diff_commonPrefix(e.substring(n),t.substring(c)),p=i.diff_commonSuffix(e.substring(0,n),t.substring(0,c));d.length<p+u&&(d=t.substring(c-p,c)+t.substring(c,c+u),r=e.substring(0,n-p),o=e.substring(n+u),a=t.substring(0,c-p),s=t.substring(c+u))}return 2*d.length>=e.length?[r,o,a,s,d]:null}var a,s,l,c,d,u=o(n,r,Math.ceil(n.length/4)),p=o(n,r,Math.ceil(n.length/2));return u||p?(a=p?u&&u[4].length>p[4].length?u:p:u,e.length>t.length?(s=a[0],l=a[1],c=a[2],d=a[3]):(c=a[0],d=a[1],s=a[2],l=a[3]),[s,l,c,d,a[4]]):null},t.prototype.diff_cleanupSemantic=function(e){for(var r=!1,i=[],o=0,a=null,s=0,l=0,c=0,d=0,u=0;s<e.length;)0==e[s][0]?(i[o++]=s,l=d,c=u,d=0,u=0,a=e[s][1]):(1==e[s][0]?d+=e[s][1].length:u+=e[s][1].length,a&&a.length<=Math.max(l,c)&&a.length<=Math.max(d,u)&&(e.splice(i[o-1],0,new t.Diff(n,a)),e[i[o-1]+1][0]=1,o--,s=--o>0?i[o-1]:-1,l=0,c=0,d=0,u=0,a=null,r=!0)),s++;for(r&&this.diff_cleanupMerge(e),this.diff_cleanupSemanticLossless(e),s=1;s<e.length;){if(e[s-1][0]==n&&1==e[s][0]){var p=e[s-1][1],h=e[s][1],m=this.diff_commonOverlap_(p,h),f=this.diff_commonOverlap_(h,p);m>=f?(m>=p.length/2||m>=h.length/2)&&(e.splice(s,0,new t.Diff(0,h.substring(0,m))),e[s-1][1]=p.substring(0,p.length-m),e[s+1][1]=h.substring(m),s++):(f>=p.length/2||f>=h.length/2)&&(e.splice(s,0,new t.Diff(0,p.substring(0,f))),e[s-1][0]=1,e[s-1][1]=h.substring(0,h.length-f),e[s+1][0]=n,e[s+1][1]=p.substring(f),s++),s++}s++}},t.prototype.diff_cleanupSemanticLossless=function(e){function n(e,n){if(!e||!n)return 6;var r=e.charAt(e.length-1),i=n.charAt(0),o=r.match(t.nonAlphaNumericRegex_),a=i.match(t.nonAlphaNumericRegex_),s=o&&r.match(t.whitespaceRegex_),l=a&&i.match(t.whitespaceRegex_),c=s&&r.match(t.linebreakRegex_),d=l&&i.match(t.linebreakRegex_),u=c&&e.match(t.blanklineEndRegex_),p=d&&n.match(t.blanklineStartRegex_);return u||p?5:c||d?4:o&&!s&&l?3:s||l?2:o||a?1:0}for(var r=1;r<e.length-1;){if(0==e[r-1][0]&&0==e[r+1][0]){var i=e[r-1][1],o=e[r][1],a=e[r+1][1],s=this.diff_commonSuffix(i,o);if(s){var l=o.substring(o.length-s);i=i.substring(0,i.length-s),o=l+o.substring(0,o.length-s),a=l+a}for(var c=i,d=o,u=a,p=n(i,o)+n(o,a);o.charAt(0)===a.charAt(0);){i+=o.charAt(0),o=o.substring(1)+a.charAt(0),a=a.substring(1);var h=n(i,o)+n(o,a);h>=p&&(p=h,c=i,d=o,u=a)}e[r-1][1]!=c&&(c?e[r-1][1]=c:(e.splice(r-1,1),r--),e[r][1]=d,u?e[r+1][1]=u:(e.splice(r+1,1),r--))}r++}},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 r=!1,i=[],o=0,a=null,s=0,l=!1,c=!1,d=!1,u=!1;s<e.length;)0==e[s][0]?(e[s][1].length<this.Diff_EditCost&&(d||u)?(i[o++]=s,l=d,c=u,a=e[s][1]):(o=0,a=null),d=u=!1):(e[s][0]==n?u=!0:d=!0,a&&(l&&c&&d&&u||a.length<this.Diff_EditCost/2&&l+c+d+u==3)&&(e.splice(i[o-1],0,new t.Diff(n,a)),e[i[o-1]+1][0]=1,o--,a=null,l&&c?(d=u=!0,o=0):(s=--o>0?i[o-1]:-1,d=u=!1),r=!0)),s++;r&&this.diff_cleanupMerge(e)},t.prototype.diff_cleanupMerge=function(e){e.push(new t.Diff(0,""));for(var r,i=0,o=0,a=0,s="",l="";i<e.length;)switch(e[i][0]){case 1:a++,l+=e[i][1],i++;break;case n:o++,s+=e[i][1],i++;break;case 0:o+a>1?(0!==o&&0!==a&&(0!==(r=this.diff_commonPrefix(l,s))&&(i-o-a>0&&0==e[i-o-a-1][0]?e[i-o-a-1][1]+=l.substring(0,r):(e.splice(0,0,new t.Diff(0,l.substring(0,r))),i++),l=l.substring(r),s=s.substring(r)),0!==(r=this.diff_commonSuffix(l,s))&&(e[i][1]=l.substring(l.length-r)+e[i][1],l=l.substring(0,l.length-r),s=s.substring(0,s.length-r))),i-=o+a,e.splice(i,o+a),s.length&&(e.splice(i,0,new t.Diff(n,s)),i++),l.length&&(e.splice(i,0,new t.Diff(1,l)),i++),i++):0!==i&&0==e[i-1][0]?(e[i-1][1]+=e[i][1],e.splice(i,1)):i++,a=0,o=0,s="",l=""}""===e[e.length-1][1]&&e.pop();var c=!1;for(i=1;i<e.length-1;)0==e[i-1][0]&&0==e[i+1][0]&&(e[i][1].substring(e[i][1].length-e[i-1][1].length)==e[i-1][1]?(e[i][1]=e[i-1][1]+e[i][1].substring(0,e[i][1].length-e[i-1][1].length),e[i+1][1]=e[i-1][1]+e[i+1][1],e.splice(i-1,1),c=!0):e[i][1].substring(0,e[i+1][1].length)==e[i+1][1]&&(e[i-1][1]+=e[i+1][1],e[i][1]=e[i][1].substring(e[i+1][1].length)+e[i+1][1],e.splice(i+1,1),c=!0)),i++;c&&this.diff_cleanupMerge(e)},t.prototype.diff_xIndex=function(e,t){var r,i=0,o=0,a=0,s=0;for(r=0;r<e.length&&(1!==e[r][0]&&(i+=e[r][1].length),e[r][0]!==n&&(o+=e[r][1].length),!(i>t));r++)a=i,s=o;return e.length!=r&&e[r][0]===n?s:s+(t-a)},t.prototype.diff_prettyHtml=function(e){for(var t=[],r=/&/g,i=/</g,o=/>/g,a=/\n/g,s=0;s<e.length;s++){var l=e[s][0],c=e[s][1].replace(r,"&amp;").replace(i,"&lt;").replace(o,"&gt;").replace(a,"&para;<br>");switch(l){case 1:t[s]='<ins style="background:#e6ffe6;">'+c+"</ins>";break;case n:t[s]='<del style="background:#ffe6e6;">'+c+"</del>";break;case 0:t[s]="<span>"+c+"</span>"}}return t.join("")},t.prototype.diff_text1=function(e){for(var t=[],n=0;n<e.length;n++)1!==e[n][0]&&(t[n]=e[n][1]);return t.join("")},t.prototype.diff_text2=function(e){for(var t=[],r=0;r<e.length;r++)e[r][0]!==n&&(t[r]=e[r][1]);return t.join("")},t.prototype.diff_levenshtein=function(e){for(var t=0,r=0,i=0,o=0;o<e.length;o++){var a=e[o][0],s=e[o][1];switch(a){case 1:r+=s.length;break;case n:i+=s.length;break;case 0:t+=Math.max(r,i),r=0,i=0}}return t+=Math.max(r,i)},t.prototype.diff_toDelta=function(e){for(var t=[],r=0;r<e.length;r++)switch(e[r][0]){case 1:t[r]="+"+encodeURI(e[r][1]);break;case n:t[r]="-"+e[r][1].length;break;case 0:t[r]="="+e[r][1].length}return t.join("\t").replace(/%20/g," ")},t.prototype.diff_fromDelta=function(e,r){for(var i=[],o=0,a=0,s=r.split(/\t/g),l=0;l<s.length;l++){var c=s[l].substring(1);switch(s[l].charAt(0)){case"+":try{i[o++]=new t.Diff(1,decodeURI(c))}catch(p){throw new Error("Illegal escape in diff_fromDelta: "+c)}break;case"-":case"=":var d=parseInt(c,10);if(isNaN(d)||d<0)throw new Error("Invalid number in diff_fromDelta: "+c);var u=e.substring(a,a+=d);"="==s[l].charAt(0)?i[o++]=new t.Diff(0,u):i[o++]=new t.Diff(n,u);break;default:if(s[l])throw new Error("Invalid diff operation in diff_fromDelta: "+s[l])}}if(a!=e.length)throw new Error("Delta length ("+a+") does not equal source text length ("+e.length+").");return i},t.prototype.match_main=function(e,t,n){if(null==e||null==t||null==n)throw new Error("Null input. (match_main)");return n=Math.max(0,Math.min(n,e.length)),e==t?0:e.length?e.substring(n,n+t.length)==t?n:this.match_bitap_(e,t,n):-1},t.prototype.match_bitap_=function(e,t,n){if(t.length>this.Match_MaxBits)throw new Error("Pattern too long for this browser.");var r=this.match_alphabet_(t),i=this;function o(e,r){var o=e/t.length,a=Math.abs(n-r);return i.Match_Distance?o+a/i.Match_Distance:a?1:o}var a=this.Match_Threshold,s=e.indexOf(t,n);-1!=s&&(a=Math.min(o(0,s),a),-1!=(s=e.lastIndexOf(t,n+t.length))&&(a=Math.min(o(0,s),a)));var l,c,d=1<<t.length-1;s=-1;for(var u,p=t.length+e.length,h=0;h<t.length;h++){for(l=0,c=p;l<c;)o(h,n+c)<=a?l=c:p=c,c=Math.floor((p-l)/2+l);p=c;var m=Math.max(1,n-c+1),f=Math.min(n+c,e.length)+t.length,g=Array(f+2);g[f+1]=(1<<h)-1;for(var v=f;v>=m;v--){var x=r[e.charAt(v-1)];if(g[v]=0===h?(g[v+1]<<1|1)&x:(g[v+1]<<1|1)&x|(u[v+1]|u[v])<<1|1|u[v+1],g[v]&d){var y=o(h,v-1);if(y<=a){if(a=y,!((s=v-1)>n))break;m=Math.max(1,2*n-s)}}}if(o(h+1,n)>a)break;u=g}return s},t.prototype.match_alphabet_=function(e){for(var t={},n=0;n<e.length;n++)t[e.charAt(n)]=0;for(n=0;n<e.length;n++)t[e.charAt(n)]|=1<<e.length-n-1;return t},t.prototype.patch_addContext_=function(e,n){if(0!=n.length){if(null===e.start2)throw Error("patch not initialized");for(var r=n.substring(e.start2,e.start2+e.length1),i=0;n.indexOf(r)!=n.lastIndexOf(r)&&r.length<this.Match_MaxBits-this.Patch_Margin-this.Patch_Margin;)i+=this.Patch_Margin,r=n.substring(e.start2-i,e.start2+e.length1+i);i+=this.Patch_Margin;var o=n.substring(e.start2-i,e.start2);o&&e.diffs.unshift(new t.Diff(0,o));var a=n.substring(e.start2+e.length1,e.start2+e.length1+i);a&&e.diffs.push(new t.Diff(0,a)),e.start1-=o.length,e.start2-=o.length,e.length1+=o.length+a.length,e.length2+=o.length+a.length}},t.prototype.patch_make=function(e,r,i){var o,a;if("string"==typeof e&&"string"==typeof r&&"undefined"==typeof i)o=e,(a=this.diff_main(o,r,!0)).length>2&&(this.diff_cleanupSemantic(a),this.diff_cleanupEfficiency(a));else if(e&&"object"==typeof e&&"undefined"==typeof r&&"undefined"==typeof i)a=e,o=this.diff_text1(a);else if("string"==typeof e&&r&&"object"==typeof r&&"undefined"==typeof i)o=e,a=r;else{if("string"!=typeof e||"string"!=typeof r||!i||"object"!=typeof i)throw new Error("Unknown call format to patch_make.");o=e,a=i}if(0===a.length)return[];for(var s=[],l=new t.patch_obj,c=0,d=0,u=0,p=o,h=o,m=0;m<a.length;m++){var f=a[m][0],g=a[m][1];switch(c||0===f||(l.start1=d,l.start2=u),f){case 1:l.diffs[c++]=a[m],l.length2+=g.length,h=h.substring(0,u)+g+h.substring(u);break;case n:l.length1+=g.length,l.diffs[c++]=a[m],h=h.substring(0,u)+h.substring(u+g.length);break;case 0:g.length<=2*this.Patch_Margin&&c&&a.length!=m+1?(l.diffs[c++]=a[m],l.length1+=g.length,l.length2+=g.length):g.length>=2*this.Patch_Margin&&c&&(this.patch_addContext_(l,p),s.push(l),l=new t.patch_obj,c=0,p=h,d=u)}1!==f&&(d+=g.length),f!==n&&(u+=g.length)}return c&&(this.patch_addContext_(l,p),s.push(l)),s},t.prototype.patch_deepCopy=function(e){for(var n=[],r=0;r<e.length;r++){var i=e[r],o=new t.patch_obj;o.diffs=[];for(var a=0;a<i.diffs.length;a++)o.diffs[a]=new t.Diff(i.diffs[a][0],i.diffs[a][1]);o.start1=i.start1,o.start2=i.start2,o.length1=i.length1,o.length2=i.length2,n[r]=o}return n},t.prototype.patch_apply=function(e,t){if(0==e.length)return[t,[]];e=this.patch_deepCopy(e);var r=this.patch_addPadding(e);t=r+t+r,this.patch_splitMax(e);for(var i=0,o=[],a=0;a<e.length;a++){var s,l,c=e[a].start2+i,d=this.diff_text1(e[a].diffs),u=-1;if(d.length>this.Match_MaxBits?-1!=(s=this.match_main(t,d.substring(0,this.Match_MaxBits),c))&&(-1==(u=this.match_main(t,d.substring(d.length-this.Match_MaxBits),c+d.length-this.Match_MaxBits))||s>=u)&&(s=-1):s=this.match_main(t,d,c),-1==s)o[a]=!1,i-=e[a].length2-e[a].length1;else if(o[a]=!0,i=s-c,d==(l=-1==u?t.substring(s,s+d.length):t.substring(s,u+this.Match_MaxBits)))t=t.substring(0,s)+this.diff_text2(e[a].diffs)+t.substring(s+d.length);else{var p=this.diff_main(d,l,!1);if(d.length>this.Match_MaxBits&&this.diff_levenshtein(p)/d.length>this.Patch_DeleteThreshold)o[a]=!1;else{this.diff_cleanupSemanticLossless(p);for(var h,m=0,f=0;f<e[a].diffs.length;f++){var g=e[a].diffs[f];0!==g[0]&&(h=this.diff_xIndex(p,m)),1===g[0]?t=t.substring(0,s+h)+g[1]+t.substring(s+h):g[0]===n&&(t=t.substring(0,s+h)+t.substring(s+this.diff_xIndex(p,m+g[1].length))),g[0]!==n&&(m+=g[1].length)}}}}return[t=t.substring(r.length,t.length-r.length),o]},t.prototype.patch_addPadding=function(e){for(var n=this.Patch_Margin,r="",i=1;i<=n;i++)r+=String.fromCharCode(i);for(i=0;i<e.length;i++)e[i].start1+=n,e[i].start2+=n;var o=e[0],a=o.diffs;if(0==a.length||0!=a[0][0])a.unshift(new t.Diff(0,r)),o.start1-=n,o.start2-=n,o.length1+=n,o.length2+=n;else if(n>a[0][1].length){var s=n-a[0][1].length;a[0][1]=r.substring(a[0][1].length)+a[0][1],o.start1-=s,o.start2-=s,o.length1+=s,o.length2+=s}if(0==(a=(o=e[e.length-1]).diffs).length||0!=a[a.length-1][0])a.push(new t.Diff(0,r)),o.length1+=n,o.length2+=n;else if(n>a[a.length-1][1].length){s=n-a[a.length-1][1].length;a[a.length-1][1]+=r.substring(0,s),o.length1+=s,o.length2+=s}return r},t.prototype.patch_splitMax=function(e){for(var r=this.Match_MaxBits,i=0;i<e.length;i++)if(!(e[i].length1<=r)){var o=e[i];e.splice(i--,1);for(var a=o.start1,s=o.start2,l="";0!==o.diffs.length;){var c=new t.patch_obj,d=!0;for(c.start1=a-l.length,c.start2=s-l.length,""!==l&&(c.length1=c.length2=l.length,c.diffs.push(new t.Diff(0,l)));0!==o.diffs.length&&c.length1<r-this.Patch_Margin;){var u=o.diffs[0][0],p=o.diffs[0][1];1===u?(c.length2+=p.length,s+=p.length,c.diffs.push(o.diffs.shift()),d=!1):u===n&&1==c.diffs.length&&0==c.diffs[0][0]&&p.length>2*r?(c.length1+=p.length,a+=p.length,d=!1,c.diffs.push(new t.Diff(u,p)),o.diffs.shift()):(p=p.substring(0,r-c.length1-this.Patch_Margin),c.length1+=p.length,a+=p.length,0===u?(c.length2+=p.length,s+=p.length):d=!1,c.diffs.push(new t.Diff(u,p)),p==o.diffs[0][1]?o.diffs.shift():o.diffs[0][1]=o.diffs[0][1].substring(p.length))}l=(l=this.diff_text2(c.diffs)).substring(l.length-this.Patch_Margin);var h=this.diff_text1(o.diffs).substring(0,this.Patch_Margin);""!==h&&(c.length1+=h.length,c.length2+=h.length,0!==c.diffs.length&&0===c.diffs[c.diffs.length-1][0]?c.diffs[c.diffs.length-1][1]+=h:c.diffs.push(new t.Diff(0,h))),d||e.splice(++i,0,c)}}},t.prototype.patch_toText=function(e){for(var t=[],n=0;n<e.length;n++)t[n]=e[n];return t.join("")},t.prototype.patch_fromText=function(e){var r=[];if(!e)return r;for(var i=e.split("\n"),o=0,a=/^@@ -(\d+),?(\d*) \+(\d+),?(\d*) @@$/;o<i.length;){var s=i[o].match(a);if(!s)throw new Error("Invalid patch string: "+i[o]);var l=new t.patch_obj;for(r.push(l),l.start1=parseInt(s[1],10),""===s[2]?(l.start1--,l.length1=1):"0"==s[2]?l.length1=0:(l.start1--,l.length1=parseInt(s[2],10)),l.start2=parseInt(s[3],10),""===s[4]?(l.start2--,l.length2=1):"0"==s[4]?l.length2=0:(l.start2--,l.length2=parseInt(s[4],10)),o++;o<i.length;){var c=i[o].charAt(0);try{var d=decodeURI(i[o].substring(1))}catch(u){throw new Error("Illegal escape in patch_fromText: "+d)}if("-"==c)l.diffs.push(new t.Diff(n,d));else if("+"==c)l.diffs.push(new t.Diff(1,d));else if(" "==c)l.diffs.push(new t.Diff(0,d));else{if("@"==c)break;if(""!==c)throw new Error('Invalid patch mode "'+c+'" in: '+d)}o++}}return r},(t.patch_obj=function(){this.diffs=[],this.start1=null,this.start2=null,this.length1=0,this.length2=0}).prototype.toString=function(){for(var e,t=["@@ -"+(0===this.length1?this.start1+",0":1==this.length1?this.start1+1:this.start1+1+","+this.length1)+" +"+(0===this.length2?this.start2+",0":1==this.length2?this.start2+1:this.start2+1+","+this.length2)+" @@\n"],r=0;r<this.diffs.length;r++){switch(this.diffs[r][0]){case 1:e="+";break;case n:e="-";break;case 0:e=" "}t[r+1]=e+encodeURI(this.diffs[r][1])+"\n"}return t.join("").replace(/%20/g," ")},e.exports=t,e.exports.diff_match_patch=t,e.exports.DIFF_DELETE=n,e.exports.DIFF_INSERT=1,e.exports.DIFF_EQUAL=0},15797:(e,t,n)=>{var r=n(64816);function i(e,t){if("function"!=typeof e||null!=t&&"function"!=typeof t)throw new TypeError("Expected a function");var n=function(){var r=arguments,i=t?t.apply(this,r):r[0],o=n.cache;if(o.has(i))return o.get(i);var a=e.apply(this,r);return n.cache=o.set(i,a)||o,a};return n.cache=new(i.Cache||r),n}i.Cache=r,e.exports=i},16095:e=>{var t=Object.prototype.toString;e.exports=function(e){return t.call(e)}},16399:(e,t,n)=>{var r=n(5538),i=n(43668),o=n(69987),a=n(45752),s=n(26924),l=n(54052),c=n(44543),d=n(51268),u="[object Arguments]",p="[object Array]",h="[object Object]",m=Object.prototype.hasOwnProperty;e.exports=function(e,t,n,f,g,v){var x=l(e),y=l(t),b=x?p:s(e),j=y?p:s(t),_=(b=b==u?h:b)==h,C=(j=j==u?h:j)==h,w=b==j;if(w&&c(e)){if(!c(t))return!1;x=!0,_=!1}if(w&&!_)return v||(v=new r),x||d(e)?i(e,t,n,f,g,v):o(e,t,b,n,f,g,v);if(!(1&n)){var S=_&&m.call(e,"__wrapped__"),A=C&&m.call(t,"__wrapped__");if(S||A){var k=S?e.value():e,T=A?t.value():t;return v||(v=new r),g(k,T,n,f,v)}}return!!w&&(v||(v=new r),a(e,t,n,f,g,v))}},16599:(e,t,n)=>{var r=n(19841);e.exports=function(e,t){if(e!==t){var n=void 0!==e,i=null===e,o=e===e,a=r(e),s=void 0!==t,l=null===t,c=t===t,d=r(t);if(!l&&!d&&!a&&e>t||a&&s&&c&&!l&&!d||i&&s&&c||!n&&c||!o)return 1;if(!i&&!a&&!d&&e<t||d&&n&&o&&!i&&!a||l&&n&&o||!s&&o||!c)return-1}return 0}},16913:(e,t,n)=>{var r=n(9812),i=n(34552),o=n(16095),a=r?r.toStringTag:void 0;e.exports=function(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":a&&a in Object(e)?i(e):o(e)}},17002:(e,t,n)=>{var r=n(27676),i=n(24746),o=n(9096),a=n(54052),s=n(60929);e.exports=function(e,t,n){var l=a(e)?r:i;return n&&s(e,t,n)&&(t=void 0),l(e,o(t,3))}},17162:(e,t,n)=>{"use strict";n.d(t,{Ay:()=>s,BO:()=>a,Yn:()=>o});var r=n(67598),i=n(89751);function o(e,t){let n=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];if(!t||"string"!==typeof t)return null;if(e&&e.vars&&n){const n="vars.".concat(t).split(".").reduce((e,t)=>e&&e[t]?e[t]:null,e);if(null!=n)return n}return t.split(".").reduce((e,t)=>e&&null!=e[t]?e[t]:null,e)}function a(e,t,n){let r,i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:n;return r="function"===typeof e?e(n):Array.isArray(e)?e[n]||i:o(e,n)||i,t&&(r=t(r,i,e)),r}const s=function(e){const{prop:t,cssProperty:n=e.prop,themeKey:s,transform:l}=e,c=e=>{if(null==e[t])return null;const c=e[t],d=o(e.theme,s)||{};return(0,i.NI)(e,c,e=>{let i=a(d,l,e);return e===i&&"string"===typeof e&&(i=a(d,l,"".concat(t).concat("default"===e?"":(0,r.A)(e)),e)),!1===n?i:{[n]:i}})};return c.propTypes={},c.filterProps=[t],c}},17529:e=>{e.exports=function(e,t){for(var n=-1,r=null==e?0:e.length,i=0,o=[];++n<r;){var a=e[n];t(a,n,e)&&(o[i++]=a)}return o}},17555:(e,t,n)=>{"use strict";var r=n(24994);t.A=void 0;var i=r(n(40039)),o=n(70579);t.A=(0,i.default)((0,o.jsx)("path",{d:"M18 8h-1V6c0-2.76-2.24-5-5-5S7 3.24 7 6v2H6c-1.1 0-2 .9-2 2v10c0 1.1.9 2 2 2h12c1.1 0 2-.9 2-2V10c0-1.1-.9-2-2-2m-6 9c-1.1 0-2-.9-2-2s.9-2 2-2 2 .9 2 2-.9 2-2 2m3.1-9H8.9V6c0-1.71 1.39-3.1 3.1-3.1 1.71 0 3.1 1.39 3.1 3.1z"}),"Lock")},17638:(e,t,n)=>{"use strict";var r=n(72762),i=n(41523);e.exports=function(e,t){return e&&!r(t)?i(e,t):t}},17868:(e,t,n)=>{"use strict";function r(e){let t="https://mui.com/production-error/?code="+e;for(let n=1;n<arguments.length;n+=1)t+="&args[]="+encodeURIComponent(arguments[n]);return"Minified MUI error #"+e+"; visit "+t+" for the full message."}n.d(t,{A:()=>r})},18280:(e,t,n)=>{"use strict";n.d(t,{A:()=>h});var r=n(58168),i=n(98587),o=n(19172),a=n(34853);const s={borderRadius:4};var l=n(28604);var c=n(58812),d=n(37758),u=n(89703);const p=["breakpoints","palette","spacing","shape"];const h=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const{breakpoints:t={},palette:n={},spacing:h,shape:m={}}=e,f=(0,i.A)(e,p),g=(0,a.A)(t),v=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:8;if(e.mui)return e;const t=(0,l.LX)({spacing:e}),n=function(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return(0===n.length?[1]:n).map(e=>{const n=t(e);return"number"===typeof n?"".concat(n,"px"):n}).join(" ")};return n.mui=!0,n}(h);let x=(0,o.A)({breakpoints:g,direction:"ltr",components:{},palette:(0,r.A)({mode:"light"},n),spacing:v,shape:(0,r.A)({},s,m)},f);x.applyStyles=u.A;for(var y=arguments.length,b=new Array(y>1?y-1:0),j=1;j<y;j++)b[j-1]=arguments[j];return x=b.reduce((e,t)=>(0,o.A)(e,t),x),x.unstable_sxConfig=(0,r.A)({},d.A,null==f?void 0:f.unstable_sxConfig),x.unstable_sx=function(e){return(0,c.A)({sx:e,theme:this})},x}},18527:(e,t,n)=>{var r=n(54238),i=n(37377),o=i;o.v1=r,o.v4=i,e.exports=o},18630:(e,t,n)=>{var r=n(61516),i=n(6806),o=n(18962),a=n(11295),s=n(38710);e.exports=function(e,t,n){var l=e.constructor;switch(t){case"[object ArrayBuffer]":return r(e);case"[object Boolean]":case"[object Date]":return new l(+e);case"[object DataView]":return i(e,n);case"[object Float32Array]":case"[object Float64Array]":case"[object Int8Array]":case"[object Int16Array]":case"[object Int32Array]":case"[object Uint8Array]":case"[object Uint8ClampedArray]":case"[object Uint16Array]":case"[object Uint32Array]":return s(e,n);case"[object Map]":case"[object Set]":return new l;case"[object Number]":case"[object String]":return new l(e);case"[object RegExp]":return o(e);case"[object Symbol]":return a(e)}}},18698:(e,t,n)=>{"use strict";n.d(t,{A:()=>c});var r=n(58168),i=n(98587),o=n(19172),a=n(37758);const s=["sx"],l=e=>{var t,n;const r={systemProps:{},otherProps:{}},i=null!=(t=null==e||null==(n=e.theme)?void 0:n.unstable_sxConfig)?t:a.A;return Object.keys(e).forEach(t=>{i[t]?r.systemProps[t]=e[t]:r.otherProps[t]=e[t]}),r};function c(e){const{sx:t}=e,n=(0,i.A)(e,s),{systemProps:a,otherProps:c}=l(n);let d;return d=Array.isArray(t)?[a,...t]:"function"===typeof t?function(){const e=t(...arguments);return(0,o.Q)(e)?(0,r.A)({},a,e):a}:(0,r.A)({},a,t),(0,r.A)({},c,{sx:d})}},18851:(e,t,n)=>{"use strict";var r=n(24994);t.A=void 0;var i=r(n(40039)),o=n(70579);t.A=(0,i.default)((0,o.jsx)("path",{d:"M20 8.69V4h-4.69L12 .69 8.69 4H4v4.69L.69 12 4 15.31V20h4.69L12 23.31 15.31 20H20v-4.69L23.31 12zM12 18c-3.31 0-6-2.69-6-6s2.69-6 6-6 6 2.69 6 6-2.69 6-6 6m0-10c-2.21 0-4 1.79-4 4s1.79 4 4 4 4-1.79 4-4-1.79-4-4-4"}),"BrightnessHigh")},18902:(e,t,n)=>{var r=n(64816),i=n(86179),o=n(46704);function a(e){var t=-1,n=null==e?0:e.length;for(this.__data__=new r;++t<n;)this.add(e[t])}a.prototype.add=a.prototype.push=i,a.prototype.has=o,e.exports=a},18962:e=>{var t=/\w*$/;e.exports=function(e){var n=new e.constructor(e.source,t.exec(e));return n.lastIndex=e.lastIndex,n}},19172:(e,t,n)=>{"use strict";n.d(t,{A:()=>s,Q:()=>o});var r=n(58168),i=n(65043);function o(e){if("object"!==typeof e||null===e)return!1;const t=Object.getPrototypeOf(e);return(null===t||t===Object.prototype||null===Object.getPrototypeOf(t))&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)}function a(e){if(i.isValidElement(e)||!o(e))return e;const t={};return Object.keys(e).forEach(n=>{t[n]=a(e[n])}),t}function s(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{clone:!0};const l=n.clone?(0,r.A)({},e):e;return o(e)&&o(t)&&Object.keys(t).forEach(r=>{i.isValidElement(t[r])?l[r]=t[r]:o(t[r])&&Object.prototype.hasOwnProperty.call(e,r)&&o(e[r])?l[r]=s(e[r],t[r],n):n.clone?l[r]=o(t[r])?a(t[r]):t[r]:l[r]=t[r]}),l}},19185:(e,t,n)=>{var r=n(26882)(function(e,t,n){return e+(n?"_":"")+t.toLowerCase()});e.exports=r},19482:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>r.A,isPlainObject:()=>r.Q});var r=n(19172)},19648:e=>{var t=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g;e.exports=function(e){return e.match(t)||[]}},19778:(e,t,n)=>{"use strict";var r=n(24994);t.A=void 0;var i=r(n(40039)),o=n(70579);t.A=(0,i.default)((0,o.jsx)("path",{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2m-2 15-5-5 1.41-1.41L10 14.17l7.59-7.59L19 8z"}),"CheckCircle")},19841:(e,t,n)=>{var r=n(16913),i=n(22761);e.exports=function(e){return"symbol"==typeof e||i(e)&&"[object Symbol]"==r(e)}},19853:(e,t,n)=>{var r=n(26989);e.exports=function(e,t){return r(e,t)}},20067:(e,t,n)=>{e=n.nmd(e);var r="__lodash_hash_undefined__",i=9007199254740991,o="[object Arguments]",a="[object Array]",s="[object Boolean]",l="[object Date]",c="[object Error]",d="[object Function]",u="[object Map]",p="[object Number]",h="[object Object]",m="[object Promise]",f="[object RegExp]",g="[object Set]",v="[object String]",x="[object Symbol]",y="[object WeakMap]",b="[object ArrayBuffer]",j="[object DataView]",_=/^\[object .+?Constructor\]$/,C=/^(?:0|[1-9]\d*)$/,w={};w["[object Float32Array]"]=w["[object Float64Array]"]=w["[object Int8Array]"]=w["[object Int16Array]"]=w["[object Int32Array]"]=w["[object Uint8Array]"]=w["[object Uint8ClampedArray]"]=w["[object Uint16Array]"]=w["[object Uint32Array]"]=!0,w[o]=w[a]=w[b]=w[s]=w[j]=w[l]=w[c]=w[d]=w[u]=w[p]=w[h]=w[f]=w[g]=w[v]=w[y]=!1;var S="object"==typeof n.g&&n.g&&n.g.Object===Object&&n.g,A="object"==typeof self&&self&&self.Object===Object&&self,k=S||A||Function("return this")(),T=t&&!t.nodeType&&t,E=T&&e&&!e.nodeType&&e,M=E&&E.exports===T,O=M&&S.process,R=function(){try{return O&&O.binding&&O.binding("util")}catch(e){}}(),P=R&&R.isTypedArray;function D(e,t){for(var n=-1,r=null==e?0:e.length;++n<r;)if(t(e[n],n,e))return!0;return!1}function N(e){var t=-1,n=Array(e.size);return e.forEach(function(e,r){n[++t]=[r,e]}),n}function L(e){var t=-1,n=Array(e.size);return e.forEach(function(e){n[++t]=e}),n}var I,F,$=Array.prototype,B=Function.prototype,z=Object.prototype,H=k["__core-js_shared__"],W=B.toString,U=z.hasOwnProperty,V=function(){var e=/[^.]+$/.exec(H&&H.keys&&H.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}(),G=z.toString,q=RegExp("^"+W.call(U).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),Y=M?k.Buffer:void 0,Z=k.Symbol,K=k.Uint8Array,X=z.propertyIsEnumerable,Q=$.splice,J=Z?Z.toStringTag:void 0,ee=Object.getOwnPropertySymbols,te=Y?Y.isBuffer:void 0,ne=(I=Object.keys,F=Object,function(e){return I(F(e))}),re=Oe(k,"DataView"),ie=Oe(k,"Map"),oe=Oe(k,"Promise"),ae=Oe(k,"Set"),se=Oe(k,"WeakMap"),le=Oe(Object,"create"),ce=Ne(re),de=Ne(ie),ue=Ne(oe),pe=Ne(ae),he=Ne(se),me=Z?Z.prototype:void 0,fe=me?me.valueOf:void 0;function ge(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function ve(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function xe(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function ye(e){var t=-1,n=null==e?0:e.length;for(this.__data__=new xe;++t<n;)this.add(e[t])}function be(e){var t=this.__data__=new ve(e);this.size=t.size}function je(e,t){var n=Fe(e),r=!n&&Ie(e),i=!n&&!r&&$e(e),o=!n&&!r&&!i&&Ue(e),a=n||r||i||o,s=a?function(e,t){for(var n=-1,r=Array(e);++n<e;)r[n]=t(n);return r}(e.length,String):[],l=s.length;for(var c in e)!t&&!U.call(e,c)||a&&("length"==c||i&&("offset"==c||"parent"==c)||o&&("buffer"==c||"byteLength"==c||"byteOffset"==c)||De(c,l))||s.push(c);return s}function _e(e,t){for(var n=e.length;n--;)if(Le(e[n][0],t))return n;return-1}function Ce(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":J&&J in Object(e)?function(e){var t=U.call(e,J),n=e[J];try{e[J]=void 0;var r=!0}catch(o){}var i=G.call(e);r&&(t?e[J]=n:delete e[J]);return i}(e):function(e){return G.call(e)}(e)}function we(e){return We(e)&&Ce(e)==o}function Se(e,t,n,r,i){return e===t||(null==e||null==t||!We(e)&&!We(t)?e!==e&&t!==t:function(e,t,n,r,i,d){var m=Fe(e),y=Fe(t),_=m?a:Pe(e),C=y?a:Pe(t),w=(_=_==o?h:_)==h,S=(C=C==o?h:C)==h,A=_==C;if(A&&$e(e)){if(!$e(t))return!1;m=!0,w=!1}if(A&&!w)return d||(d=new be),m||Ue(e)?Te(e,t,n,r,i,d):function(e,t,n,r,i,o,a){switch(n){case j:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case b:return!(e.byteLength!=t.byteLength||!o(new K(e),new K(t)));case s:case l:case p:return Le(+e,+t);case c:return e.name==t.name&&e.message==t.message;case f:case v:return e==t+"";case u:var d=N;case g:var h=1&r;if(d||(d=L),e.size!=t.size&&!h)return!1;var m=a.get(e);if(m)return m==t;r|=2,a.set(e,t);var y=Te(d(e),d(t),r,i,o,a);return a.delete(e),y;case x:if(fe)return fe.call(e)==fe.call(t)}return!1}(e,t,_,n,r,i,d);if(!(1&n)){var k=w&&U.call(e,"__wrapped__"),T=S&&U.call(t,"__wrapped__");if(k||T){var E=k?e.value():e,M=T?t.value():t;return d||(d=new be),i(E,M,n,r,d)}}if(!A)return!1;return d||(d=new be),function(e,t,n,r,i,o){var a=1&n,s=Ee(e),l=s.length,c=Ee(t),d=c.length;if(l!=d&&!a)return!1;var u=l;for(;u--;){var p=s[u];if(!(a?p in t:U.call(t,p)))return!1}var h=o.get(e);if(h&&o.get(t))return h==t;var m=!0;o.set(e,t),o.set(t,e);var f=a;for(;++u<l;){var g=e[p=s[u]],v=t[p];if(r)var x=a?r(v,g,p,t,e,o):r(g,v,p,e,t,o);if(!(void 0===x?g===v||i(g,v,n,r,o):x)){m=!1;break}f||(f="constructor"==p)}if(m&&!f){var y=e.constructor,b=t.constructor;y==b||!("constructor"in e)||!("constructor"in t)||"function"==typeof y&&y instanceof y&&"function"==typeof b&&b instanceof b||(m=!1)}return o.delete(e),o.delete(t),m}(e,t,n,r,i,d)}(e,t,n,r,Se,i))}function Ae(e){return!(!He(e)||function(e){return!!V&&V in e}(e))&&(Be(e)?q:_).test(Ne(e))}function ke(e){if(!function(e){var t=e&&e.constructor,n="function"==typeof t&&t.prototype||z;return e===n}(e))return ne(e);var t=[];for(var n in Object(e))U.call(e,n)&&"constructor"!=n&&t.push(n);return t}function Te(e,t,n,r,i,o){var a=1&n,s=e.length,l=t.length;if(s!=l&&!(a&&l>s))return!1;var c=o.get(e);if(c&&o.get(t))return c==t;var d=-1,u=!0,p=2&n?new ye:void 0;for(o.set(e,t),o.set(t,e);++d<s;){var h=e[d],m=t[d];if(r)var f=a?r(m,h,d,t,e,o):r(h,m,d,e,t,o);if(void 0!==f){if(f)continue;u=!1;break}if(p){if(!D(t,function(e,t){if(a=t,!p.has(a)&&(h===e||i(h,e,n,r,o)))return p.push(t);var a})){u=!1;break}}else if(h!==m&&!i(h,m,n,r,o)){u=!1;break}}return o.delete(e),o.delete(t),u}function Ee(e){return function(e,t,n){var r=t(e);return Fe(e)?r:function(e,t){for(var n=-1,r=t.length,i=e.length;++n<r;)e[i+n]=t[n];return e}(r,n(e))}(e,Ve,Re)}function Me(e,t){var n=e.__data__;return function(e){var t=typeof e;return"string"==t||"number"==t||"symbol"==t||"boolean"==t?"__proto__"!==e:null===e}(t)?n["string"==typeof t?"string":"hash"]:n.map}function Oe(e,t){var n=function(e,t){return null==e?void 0:e[t]}(e,t);return Ae(n)?n:void 0}ge.prototype.clear=function(){this.__data__=le?le(null):{},this.size=0},ge.prototype.delete=function(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t},ge.prototype.get=function(e){var t=this.__data__;if(le){var n=t[e];return n===r?void 0:n}return U.call(t,e)?t[e]:void 0},ge.prototype.has=function(e){var t=this.__data__;return le?void 0!==t[e]:U.call(t,e)},ge.prototype.set=function(e,t){var n=this.__data__;return this.size+=this.has(e)?0:1,n[e]=le&&void 0===t?r:t,this},ve.prototype.clear=function(){this.__data__=[],this.size=0},ve.prototype.delete=function(e){var t=this.__data__,n=_e(t,e);return!(n<0)&&(n==t.length-1?t.pop():Q.call(t,n,1),--this.size,!0)},ve.prototype.get=function(e){var t=this.__data__,n=_e(t,e);return n<0?void 0:t[n][1]},ve.prototype.has=function(e){return _e(this.__data__,e)>-1},ve.prototype.set=function(e,t){var n=this.__data__,r=_e(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this},xe.prototype.clear=function(){this.size=0,this.__data__={hash:new ge,map:new(ie||ve),string:new ge}},xe.prototype.delete=function(e){var t=Me(this,e).delete(e);return this.size-=t?1:0,t},xe.prototype.get=function(e){return Me(this,e).get(e)},xe.prototype.has=function(e){return Me(this,e).has(e)},xe.prototype.set=function(e,t){var n=Me(this,e),r=n.size;return n.set(e,t),this.size+=n.size==r?0:1,this},ye.prototype.add=ye.prototype.push=function(e){return this.__data__.set(e,r),this},ye.prototype.has=function(e){return this.__data__.has(e)},be.prototype.clear=function(){this.__data__=new ve,this.size=0},be.prototype.delete=function(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n},be.prototype.get=function(e){return this.__data__.get(e)},be.prototype.has=function(e){return this.__data__.has(e)},be.prototype.set=function(e,t){var n=this.__data__;if(n instanceof ve){var r=n.__data__;if(!ie||r.length<199)return r.push([e,t]),this.size=++n.size,this;n=this.__data__=new xe(r)}return n.set(e,t),this.size=n.size,this};var Re=ee?function(e){return null==e?[]:(e=Object(e),function(e,t){for(var n=-1,r=null==e?0:e.length,i=0,o=[];++n<r;){var a=e[n];t(a,n,e)&&(o[i++]=a)}return o}(ee(e),function(t){return X.call(e,t)}))}:function(){return[]},Pe=Ce;function De(e,t){return!!(t=null==t?i:t)&&("number"==typeof e||C.test(e))&&e>-1&&e%1==0&&e<t}function Ne(e){if(null!=e){try{return W.call(e)}catch(t){}try{return e+""}catch(t){}}return""}function Le(e,t){return e===t||e!==e&&t!==t}(re&&Pe(new re(new ArrayBuffer(1)))!=j||ie&&Pe(new ie)!=u||oe&&Pe(oe.resolve())!=m||ae&&Pe(new ae)!=g||se&&Pe(new se)!=y)&&(Pe=function(e){var t=Ce(e),n=t==h?e.constructor:void 0,r=n?Ne(n):"";if(r)switch(r){case ce:return j;case de:return u;case ue:return m;case pe:return g;case he:return y}return t});var Ie=we(function(){return arguments}())?we:function(e){return We(e)&&U.call(e,"callee")&&!X.call(e,"callee")},Fe=Array.isArray;var $e=te||function(){return!1};function Be(e){if(!He(e))return!1;var t=Ce(e);return t==d||"[object GeneratorFunction]"==t||"[object AsyncFunction]"==t||"[object Proxy]"==t}function ze(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=i}function He(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}function We(e){return null!=e&&"object"==typeof e}var Ue=P?function(e){return function(t){return e(t)}}(P):function(e){return We(e)&&ze(e.length)&&!!w[Ce(e)]};function Ve(e){return null!=(t=e)&&ze(t.length)&&!Be(t)?je(e):ke(e);var t}e.exports=function(e,t){return Se(e,t)}},20310:(e,t,n)=>{var r=n(21817),i=n(85990),o=n(36140);e.exports=function(e){return"function"!=typeof e.constructor||o(e)?{}:r(i(e))}},20449:(e,t,n)=>{var r=n(26924),i=n(22761);e.exports=function(e){return i(e)&&"[object Set]"==r(e)}},20672:(e,t,n)=>{"use strict";var r=n(86267),i=n(26973),o=n(88938),a=n(56438);var s=function e(t){var n=new o(t),s=i(o.prototype.request,n);return r.extend(s,o.prototype,n),r.extend(s,n),s.create=function(n){return e(a(t,n))},s}(n(52989));s.Axios=o,s.CanceledError=n(47482),s.CancelToken=n(27690),s.isCancel=n(87767),s.VERSION=n(23104).version,s.toFormData=n(37289),s.AxiosError=n(82702),s.Cancel=s.CanceledError,s.all=function(e){return Promise.all(e)},s.spread=n(8125),s.isAxiosError=n(98738),e.exports=s,e.exports.default=s},20705:(e,t,n)=>{"use strict";var r=n(86267);e.exports=r.isStandardBrowserEnv()?function(){var e,t=/(msie|trident)/i.test(navigator.userAgent),n=document.createElement("a");function i(e){var r=e;return t&&(n.setAttribute("href",r),r=n.href),n.setAttribute("href",r),{href:n.href,protocol:n.protocol?n.protocol.replace(/:$/,""):"",host:n.host,search:n.search?n.search.replace(/^\?/,""):"",hash:n.hash?n.hash.replace(/^#/,""):"",hostname:n.hostname,port:n.port,pathname:"/"===n.pathname.charAt(0)?n.pathname:"/"+n.pathname}}return e=i(window.location.href),function(t){var n=r.isString(t)?i(t):t;return n.protocol===e.protocol&&n.host===e.host}}():function(){return!0}},20816:(e,t,n)=>{"use strict";n.d(t,{A:()=>i});var r=n(82284);function i(e){var t=function(e,t){if("object"!=(0,r.A)(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var i=n.call(e,t||"default");if("object"!=(0,r.A)(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==(0,r.A)(t)?t:t+""}},20977:(e,t,n)=>{var r=n(9096),i=n(64416);e.exports=function(e,t){return e&&e.length?i(e,r(t,2)):[]}},21337:(e,t,n)=>{"use strict";var r=n(24994);t.A=void 0;var i=r(n(40039)),o=n(70579);t.A=(0,i.default)((0,o.jsx)("path",{d:"M16.59 8.59 12 13.17 7.41 8.59 6 10l6 6 6-6z"}),"ExpandMore")},21338:(e,t,n)=>{"use strict";var r=n(24994);t.A=void 0;var i=r(n(40039)),o=n(70579);t.A=(0,i.default)((0,o.jsx)("path",{d:"M16.59 7.58 10 14.17l-3.59-3.58L5 12l5 5 8-8zM12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2m0 18c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8"}),"CheckCircleOutline")},21817:(e,t,n)=>{var r=n(46686),i=Object.create,o=function(){function e(){}return function(t){if(!r(t))return{};if(i)return i(t);e.prototype=t;var n=new e;return e.prototype=void 0,n}}();e.exports=o},21825:(e,t,n)=>{"use strict";var r=n(24994);t.A=void 0;var i=r(n(40039)),o=n(70579);t.A=(0,i.default)((0,o.jsx)("path",{d:"m22 5.72-4.6-3.86-1.29 1.53 4.6 3.86zM7.88 3.39 6.6 1.86 2 5.71l1.29 1.53zM12.5 8H11v6l4.75 2.85.75-1.23-4-2.37zM12 4c-4.97 0-9 4.03-9 9s4.02 9 9 9c4.97 0 9-4.03 9-9s-4.03-9-9-9m0 16c-3.87 0-7-3.13-7-7s3.13-7 7-7 7 3.13 7 7-3.13 7-7 7"}),"AccessAlarm")},22165:(e,t,n)=>{var r=n(45652);e.exports=function(e,t){var n;return r(e,function(e,r,i){return!(n=t(e,r,i))}),!!n}},22427:(e,t,n)=>{"use strict";n.d(t,{A:()=>r});const r=n(31668).A},22505:(e,t,n)=>{"use strict";var r=n(24994);t.A=void 0;var i=r(n(40039)),o=n(70579);t.A=(0,i.default)((0,o.jsx)("path",{d:"M19 13h-6v6h-2v-6H5v-2h6V5h2v6h6z"}),"Add")},22541:e=>{e.exports=function(e){return function(){return e}}},22662:(e,t,n)=>{var r=n(95575);e.exports=function(e,t){var n=this.__data__;return this.size+=this.has(e)?0:1,n[e]=r&&void 0===t?"__lodash_hash_undefined__":t,this}},22761:e=>{e.exports=function(e){return null!=e&&"object"==typeof e}},22777:(e,t,n)=>{var r=n(15193),i=n(22761),o=Object.prototype,a=o.hasOwnProperty,s=o.propertyIsEnumerable,l=r(function(){return arguments}())?r:function(e){return i(e)&&a.call(e,"callee")&&!s.call(e,"callee")};e.exports=l},22794:(e,t,n)=>{var r=n(79742),i=n(97498),o=n(9096);e.exports=function(e,t){return e&&e.length?r(e,o(t,2),i):void 0}},22929:(e,t,n)=>{var r=n(56552).Uint8Array;e.exports=r},23104:e=>{e.exports={version:"0.27.2"}},23579:(e,t,n)=>{var r=n(41069),i=n(643);e.exports=function(e){return i(r(e).toLowerCase())}},23781:(e,t,n)=>{var r=n(9417),i=n(28673);e.exports=function(e){for(var t=i(e),n=t.length;n--;){var o=t[n],a=e[o];t[n]=[o,a,r(a)]}return t}},24190:(e,t,n)=>{var r=n(61340);e.exports=function(e){var t=this.__data__,n=r(t,e);return n<0?void 0:t[n][1]}},24597:(e,t,n)=>{var r=n(52587),i=n(9096),o=n(22165),a=n(54052),s=n(60929);e.exports=function(e,t,n){var l=a(e)?r:o;return n&&s(e,t,n)&&(t=void 0),l(e,i(t,3))}},24746:(e,t,n)=>{var r=n(45652);e.exports=function(e,t){var n=!0;return r(e,function(e,r,i){return n=!!t(e,r,i)}),n}},24914:(e,t,n)=>{"use strict";var r=n(24994);t.A=void 0;var i=r(n(40039)),o=n(70579);t.A=(0,i.default)((0,o.jsx)("path",{d:"M16 1H4c-1.1 0-2 .9-2 2v14h2V3h12zm3 4H8c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h11c1.1 0 2-.9 2-2V7c0-1.1-.9-2-2-2m0 16H8V7h11z"}),"ContentCopy")},24989:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>r.A,private_createBreakpoints:()=>i.A,unstable_applyStyles:()=>o.A});var r=n(18280),i=n(34853),o=n(89703)},24994:e=>{e.exports=function(e){return e&&e.__esModule?e:{default:e}},e.exports.__esModule=!0,e.exports.default=e.exports},25051:e=>{e.exports=function(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}},26480:(e,t,n)=>{"use strict";var r=n(24994);t.A=void 0;var i=r(n(40039)),o=n(70579);t.A=(0,i.default)((0,o.jsx)("path",{d:"M19 3H5c-1.11 0-2 .9-2 2v14c0 1.1.89 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2m-2 10h-4v4h-2v-4H7v-2h4V7h2v4h4z"}),"AddBox")},26564:(e,t,n)=>{"use strict";function r(e,t){"function"===typeof e?e(t):e&&(e.current=t)}n.d(t,{A:()=>r})},26581:(e,t,n)=>{"use strict";var r=n(24994);t.A=void 0;var i=r(n(40039)),o=n(70579);t.A=(0,i.default)((0,o.jsx)("path",{d:"M19 3H5c-1.11 0-2 .9-2 2v14c0 1.1.89 2 2 2h14c1.11 0 2-.9 2-2V5c0-1.1-.89-2-2-2m-9 14-5-5 1.41-1.41L10 14.17l7.59-7.59L19 8z"}),"CheckBox")},26600:(e,t,n)=>{var r=n(87937)(n(56552),"WeakMap");e.exports=r},26882:(e,t,n)=>{var r=n(99421),i=n(4971),o=n(87676),a=RegExp("['\u2019]","g");e.exports=function(e){return function(t){return r(o(i(t).replace(a,"")),e,"")}}},26924:(e,t,n)=>{var r=n(97685),i=n(85204),o=n(65387),a=n(72070),s=n(26600),l=n(16913),c=n(96996),d="[object Map]",u="[object Promise]",p="[object Set]",h="[object WeakMap]",m="[object DataView]",f=c(r),g=c(i),v=c(o),x=c(a),y=c(s),b=l;(r&&b(new r(new ArrayBuffer(1)))!=m||i&&b(new i)!=d||o&&b(o.resolve())!=u||a&&b(new a)!=p||s&&b(new s)!=h)&&(b=function(e){var t=l(e),n="[object Object]"==t?e.constructor:void 0,r=n?c(n):"";if(r)switch(r){case f:return m;case g:return d;case v:return u;case x:return p;case y:return h}return t}),e.exports=b},26973:e=>{"use strict";e.exports=function(e,t){return function(){for(var n=new Array(arguments.length),r=0;r<n.length;r++)n[r]=arguments[r];return e.apply(t,n)}}},26989:(e,t,n)=>{var r=n(16399),i=n(22761);e.exports=function e(t,n,o,a,s){return t===n||(null==t||null==n||!i(t)&&!i(n)?t!==t&&n!==n:r(t,n,o,a,e,s))}},27328:(e,t,n)=>{"use strict";n.d(t,{A:()=>i});var r=n(65043);const i=function(e,t){var n,i;return r.isValidElement(e)&&-1!==t.indexOf(null!=(n=e.type.muiName)?n:null==(i=e.type)||null==(i=i._payload)||null==(i=i.value)?void 0:i.muiName)}},27615:(e,t,n)=>{var r=n(95575);e.exports=function(){this.__data__=r?r(null):{},this.size=0}},27676:e=>{e.exports=function(e,t){for(var n=-1,r=null==e?0:e.length;++n<r;)if(!t(e[n],n,e))return!1;return!0}},27690:(e,t,n)=>{"use strict";var r=n(47482);function i(e){if("function"!==typeof e)throw new TypeError("executor must be a function.");var t;this.promise=new Promise(function(e){t=e});var n=this;this.promise.then(function(e){if(n._listeners){var t,r=n._listeners.length;for(t=0;t<r;t++)n._listeners[t](e);n._listeners=null}}),this.promise.then=function(e){var t,r=new Promise(function(e){n.subscribe(e),t=e}).then(e);return r.cancel=function(){n.unsubscribe(t)},r},e(function(e){n.reason||(n.reason=new r(e),t(n.reason))})}i.prototype.throwIfRequested=function(){if(this.reason)throw this.reason},i.prototype.subscribe=function(e){this.reason?e(this.reason):this._listeners?this._listeners.push(e):this._listeners=[e]},i.prototype.unsubscribe=function(e){if(this._listeners){var t=this._listeners.indexOf(e);-1!==t&&this._listeners.splice(t,1)}},i.source=function(){var e;return{token:new i(function(t){e=t}),cancel:e}},e.exports=i},27760:e=>{e.exports=function(e){return this.__data__.get(e)}},27894:e=>{e.exports=function(e,t){return null!=e&&t in Object(e)}},28189:(e,t,n)=>{var r=n(53871);e.exports=function(e,t,n){var i=e.length;return n=void 0===n?i:n,!t&&n>=i?e:r(e,t,n)}},28325:(e,t,n)=>{var r=n(22541),i=n(5654),o=n(33279),a=i?function(e,t){return i(e,"toString",{configurable:!0,enumerable:!1,value:r(t),writable:!0})}:o;e.exports=a},28575:(e,t,n)=>{e=n.nmd(e),ace.define("ace/ext/searchbox-css",["require","exports","module"],function(e,t,n){n.exports='\n\n/* ------------------------------------------------------------------------------------------\n * Editor Search Form\n * --------------------------------------------------------------------------------------- */\n.ace_search {\n    background-color: #ddd;\n    color: #666;\n    border: 1px solid #cbcbcb;\n    border-top: 0 none;\n    overflow: hidden;\n    margin: 0;\n    padding: 4px 6px 0 4px;\n    position: absolute;\n    top: 0;\n    z-index: 99;\n    white-space: normal;\n}\n.ace_search.left {\n    border-left: 0 none;\n    border-radius: 0px 0px 5px 0px;\n    left: 0;\n}\n.ace_search.right {\n    border-radius: 0px 0px 0px 5px;\n    border-right: 0 none;\n    right: 0;\n}\n\n.ace_search_form, .ace_replace_form {\n    margin: 0 20px 4px 0;\n    overflow: hidden;\n    line-height: 1.9;\n}\n.ace_replace_form {\n    margin-right: 0;\n}\n.ace_search_form.ace_nomatch {\n    outline: 1px solid red;\n}\n\n.ace_search_field {\n    border-radius: 3px 0 0 3px;\n    background-color: white;\n    color: black;\n    border: 1px solid #cbcbcb;\n    border-right: 0 none;\n    outline: 0;\n    padding: 0;\n    font-size: inherit;\n    margin: 0;\n    line-height: inherit;\n    padding: 0 6px;\n    min-width: 17em;\n    vertical-align: top;\n    min-height: 1.8em;\n    box-sizing: content-box;\n}\n.ace_searchbtn {\n    border: 1px solid #cbcbcb;\n    line-height: inherit;\n    display: inline-block;\n    padding: 0 6px;\n    background: #fff;\n    border-right: 0 none;\n    border-left: 1px solid #dcdcdc;\n    cursor: pointer;\n    margin: 0;\n    position: relative;\n    color: #666;\n}\n.ace_searchbtn:last-child {\n    border-radius: 0 3px 3px 0;\n    border-right: 1px solid #cbcbcb;\n}\n.ace_searchbtn:disabled {\n    background: none;\n    cursor: default;\n}\n.ace_searchbtn:hover {\n    background-color: #eef1f6;\n}\n.ace_searchbtn.prev, .ace_searchbtn.next {\n     padding: 0px 0.7em\n}\n.ace_searchbtn.prev:after, .ace_searchbtn.next:after {\n     content: "";\n     border: solid 2px #888;\n     width: 0.5em;\n     height: 0.5em;\n     border-width:  2px 0 0 2px;\n     display:inline-block;\n     transform: rotate(-45deg);\n}\n.ace_searchbtn.next:after {\n     border-width: 0 2px 2px 0 ;\n}\n.ace_searchbtn_close {\n    background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAA4AAAAcCAYAAABRVo5BAAAAZ0lEQVR42u2SUQrAMAhDvazn8OjZBilCkYVVxiis8H4CT0VrAJb4WHT3C5xU2a2IQZXJjiQIRMdkEoJ5Q2yMqpfDIo+XY4k6h+YXOyKqTIj5REaxloNAd0xiKmAtsTHqW8sR2W5f7gCu5nWFUpVjZwAAAABJRU5ErkJggg==) no-repeat 50% 0;\n    border-radius: 50%;\n    border: 0 none;\n    color: #656565;\n    cursor: pointer;\n    font: 16px/16px Arial;\n    padding: 0;\n    height: 14px;\n    width: 14px;\n    top: 9px;\n    right: 7px;\n    position: absolute;\n}\n.ace_searchbtn_close:hover {\n    background-color: #656565;\n    background-position: 50% 100%;\n    color: white;\n}\n\n.ace_button {\n    margin-left: 2px;\n    cursor: pointer;\n    -webkit-user-select: none;\n    -moz-user-select: none;\n    -o-user-select: none;\n    -ms-user-select: none;\n    user-select: none;\n    overflow: hidden;\n    opacity: 0.7;\n    border: 1px solid rgba(100,100,100,0.23);\n    padding: 1px;\n    box-sizing:    border-box!important;\n    color: black;\n}\n\n.ace_button:hover {\n    background-color: #eee;\n    opacity:1;\n}\n.ace_button:active {\n    background-color: #ddd;\n}\n\n.ace_button.checked {\n    border-color: #3399ff;\n    opacity:1;\n}\n\n.ace_search_options{\n    margin-bottom: 3px;\n    text-align: right;\n    -webkit-user-select: none;\n    -moz-user-select: none;\n    -o-user-select: none;\n    -ms-user-select: none;\n    user-select: none;\n    clear: both;\n}\n\n.ace_search_counter {\n    float: left;\n    font-family: arial;\n    padding: 0 8px;\n}'}),ace.define("ace/ext/searchbox",["require","exports","module","ace/ext/searchbox","ace/ext/searchbox","ace/lib/dom","ace/lib/lang","ace/lib/event","ace/ext/searchbox-css","ace/keyboard/hash_handler","ace/lib/keys","ace/config"],function(e,t,n){"use strict";var r=e("../lib/dom"),i=e("../lib/lang"),o=e("../lib/event"),a=e("./searchbox-css"),s=e("../keyboard/hash_handler").HashHandler,l=e("../lib/keys"),c=e("../config").nls;r.importCssString(a,"ace_searchbox",!1);var d=function(){function e(e,t,n){this.activeInput,this.element=r.buildDom(["div",{class:"ace_search right"},["span",{action:"hide",class:"ace_searchbtn_close"}],["div",{class:"ace_search_form"},["input",{class:"ace_search_field",placeholder:c("search-box.find.placeholder","Search for"),spellcheck:"false"}],["span",{action:"findPrev",class:"ace_searchbtn prev"},"\u200b"],["span",{action:"findNext",class:"ace_searchbtn next"},"\u200b"],["span",{action:"findAll",class:"ace_searchbtn",title:"Alt-Enter"},c("search-box.find-all.text","All")]],["div",{class:"ace_replace_form"},["input",{class:"ace_search_field",placeholder:c("search-box.replace.placeholder","Replace with"),spellcheck:"false"}],["span",{action:"replaceAndFindNext",class:"ace_searchbtn"},c("search-box.replace-next.text","Replace")],["span",{action:"replaceAll",class:"ace_searchbtn"},c("search-box.replace-all.text","All")]],["div",{class:"ace_search_options"},["span",{action:"toggleReplace",class:"ace_button",title:c("search-box.toggle-replace.title","Toggle Replace mode"),style:"float:left;margin-top:-2px;padding:0 5px;"},"+"],["span",{class:"ace_search_counter"}],["span",{action:"toggleRegexpMode",class:"ace_button",title:c("search-box.toggle-regexp.title","RegExp Search")},".*"],["span",{action:"toggleCaseSensitive",class:"ace_button",title:c("search-box.toggle-case.title","CaseSensitive Search")},"Aa"],["span",{action:"toggleWholeWords",class:"ace_button",title:c("search-box.toggle-whole-word.title","Whole Word Search")},"\\b"],["span",{action:"searchInSelection",class:"ace_button",title:c("search-box.toggle-in-selection.title","Search In Selection")},"S"]]]),this.setSession=this.setSession.bind(this),this.$onEditorInput=this.onEditorInput.bind(this),this.$init(),this.setEditor(e),r.importCssString(a,"ace_searchbox",e.container),o.addListener(this.element,"touchstart",function(e){e.stopPropagation()},e)}return e.prototype.setEditor=function(e){e.searchBox=this,e.renderer.scroller.appendChild(this.element),this.editor=e},e.prototype.setSession=function(e){this.searchRange=null,this.$syncOptions(!0)},e.prototype.onEditorInput=function(){this.find(!1,!1,!0)},e.prototype.$initElements=function(e){this.searchBox=e.querySelector(".ace_search_form"),this.replaceBox=e.querySelector(".ace_replace_form"),this.searchOption=e.querySelector("[action=searchInSelection]"),this.replaceOption=e.querySelector("[action=toggleReplace]"),this.regExpOption=e.querySelector("[action=toggleRegexpMode]"),this.caseSensitiveOption=e.querySelector("[action=toggleCaseSensitive]"),this.wholeWordOption=e.querySelector("[action=toggleWholeWords]"),this.searchInput=this.searchBox.querySelector(".ace_search_field"),this.replaceInput=this.replaceBox.querySelector(".ace_search_field"),this.searchCounter=e.querySelector(".ace_search_counter")},e.prototype.$init=function(){var e=this.element;this.$initElements(e);var t=this;o.addListener(e,"mousedown",function(e){setTimeout(function(){t.activeInput.focus()},0),o.stopPropagation(e)}),o.addListener(e,"click",function(e){var n=(e.target||e.srcElement).getAttribute("action");n&&t[n]?t[n]():t.$searchBarKb.commands[n]&&t.$searchBarKb.commands[n].exec(t),o.stopPropagation(e)}),o.addCommandKeyListener(e,function(e,n,r){var i=l.keyCodeToString(r),a=t.$searchBarKb.findKeyCommand(n,i);a&&a.exec&&(a.exec(t),o.stopEvent(e))}),this.$onChange=i.delayedCall(function(){t.find(!1,!1)}),o.addListener(this.searchInput,"input",function(){t.$onChange.schedule(20)}),o.addListener(this.searchInput,"focus",function(){t.activeInput=t.searchInput,t.searchInput.value&&t.highlight()}),o.addListener(this.replaceInput,"focus",function(){t.activeInput=t.replaceInput,t.searchInput.value&&t.highlight()})},e.prototype.setSearchRange=function(e){this.searchRange=e,e?this.searchRangeMarker=this.editor.session.addMarker(e,"ace_active-line"):this.searchRangeMarker&&(this.editor.session.removeMarker(this.searchRangeMarker),this.searchRangeMarker=null)},e.prototype.$syncOptions=function(e){r.setCssClass(this.replaceOption,"checked",this.searchRange),r.setCssClass(this.searchOption,"checked",this.searchOption.checked),this.replaceOption.textContent=this.replaceOption.checked?"-":"+",r.setCssClass(this.regExpOption,"checked",this.regExpOption.checked),r.setCssClass(this.wholeWordOption,"checked",this.wholeWordOption.checked),r.setCssClass(this.caseSensitiveOption,"checked",this.caseSensitiveOption.checked);var t=this.editor.getReadOnly();this.replaceOption.style.display=t?"none":"",this.replaceBox.style.display=this.replaceOption.checked&&!t?"":"none",this.find(!1,!1,e)},e.prototype.highlight=function(e){this.editor.session.highlight(e||this.editor.$search.$options.re),this.editor.renderer.updateBackMarkers()},e.prototype.find=function(e,t,n){if(this.editor.session){var i=!this.editor.find(this.searchInput.value,{skipCurrent:e,backwards:t,wrap:!0,regExp:this.regExpOption.checked,caseSensitive:this.caseSensitiveOption.checked,wholeWord:this.wholeWordOption.checked,preventScroll:n,range:this.searchRange})&&this.searchInput.value;r.setCssClass(this.searchBox,"ace_nomatch",i),this.editor._emit("findSearchBox",{match:!i}),this.highlight(),this.updateCounter()}},e.prototype.updateCounter=function(){var e=this.editor,t=e.$search.$options.re,n=t.unicode,r=0,o=0;if(t){var a=this.searchRange?e.session.getTextRange(this.searchRange):e.getValue();e.$search.$isMultilineSearch(e.getLastSearchOptions())&&(a=a.replace(/\r\n|\r|\n/g,"\n"),e.session.doc.$autoNewLine="\n");var s=e.session.doc.positionToIndex(e.selection.anchor);this.searchRange&&(s-=e.session.doc.positionToIndex(this.searchRange.start));for(var l,d=t.lastIndex=0;(l=t.exec(a))&&(r++,(d=l.index)<=s&&o++,!(r>999))&&(l[0]||(t.lastIndex=d+=i.skipEmptyMatch(a,d,n),!(d>=a.length))););}this.searchCounter.textContent=c("search-box.search-counter","$0 of $1",[o,r>999?"999+":r])},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;r.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=i.escapeRegExp(e)),void 0!=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}(),u=new s;u.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()}}),u.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 p=new s([{bindKey:"Esc",name:"closeSearchBar",exec:function(e){e.searchBox.hide()}}]);d.prototype.$searchBarKb=u,d.prototype.$closeSearchBarKb=p,t.SearchBox=d,t.Search=function(e,t){var n=e.searchBox||new d(e),r=e.session.selection.getRange(),i=r.isMultiLine()?"":e.session.getTextRange(r);n.show(i,t)}}),ace.require(["ace/ext/searchbox"],function(t){e&&(e.exports=t)})},28604:(e,t,n)=>{"use strict";n.d(t,{LX:()=>m,MA:()=>h,_W:()=>f,Lc:()=>x,Ms:()=>y});var r=n(89751),i=n(17162),o=n(13815);const a={m:"margin",p:"padding"},s={t:"Top",r:"Right",b:"Bottom",l:"Left",x:["Left","Right"],y:["Top","Bottom"]},l={marginX:"mx",marginY:"my",paddingX:"px",paddingY:"py"},c=function(e){const t={};return n=>(void 0===t[n]&&(t[n]=e(n)),t[n])}(e=>{if(e.length>2){if(!l[e])return[e];e=l[e]}const[t,n]=e.split(""),r=a[t],i=s[n]||"";return Array.isArray(i)?i.map(e=>r+e):[r+i]}),d=["m","mt","mr","mb","ml","mx","my","margin","marginTop","marginRight","marginBottom","marginLeft","marginX","marginY","marginInline","marginInlineStart","marginInlineEnd","marginBlock","marginBlockStart","marginBlockEnd"],u=["p","pt","pr","pb","pl","px","py","padding","paddingTop","paddingRight","paddingBottom","paddingLeft","paddingX","paddingY","paddingInline","paddingInlineStart","paddingInlineEnd","paddingBlock","paddingBlockStart","paddingBlockEnd"],p=[...d,...u];function h(e,t,n,r){var o;const a=null!=(o=(0,i.Yn)(e,t,!1))?o:n;return"number"===typeof a?e=>"string"===typeof e?e:a*e:Array.isArray(a)?e=>"string"===typeof e?e:a[e]:"function"===typeof a?a:()=>{}}function m(e){return h(e,"spacing",8)}function f(e,t){if("string"===typeof t||null==t)return t;const n=e(Math.abs(t));return t>=0?n:"number"===typeof n?-n:"-".concat(n)}function g(e,t,n,i){if(-1===t.indexOf(n))return null;const o=function(e,t){return n=>e.reduce((e,r)=>(e[r]=f(t,n),e),{})}(c(n),i),a=e[n];return(0,r.NI)(e,a,o)}function v(e,t){const n=m(e.theme);return Object.keys(e).map(r=>g(e,t,r,n)).reduce(o.A,{})}function x(e){return v(e,d)}function y(e){return v(e,u)}function b(e){return v(e,p)}x.propTypes={},x.filterProps=d,y.propTypes={},y.filterProps=u,b.propTypes={},b.filterProps=p},28673:(e,t,n)=>{var r=n(73204),i=n(83713),o=n(6571);e.exports=function(e){return o(e)?r(e):i(e)}},29075:(e,t,n)=>{var r=n(96614),i=n(56326);e.exports=function(e,t){return r(e,i(e),t)}},29461:(e,t,n)=>{"use strict";e.exports=n(72330)},29935:(e,t,n)=>{var r=n(61340),i=Array.prototype.splice;e.exports=function(e){var t=this.__data__,n=r(t,e);return!(n<0)&&(n==t.length-1?t.pop():i.call(t,n,1),--this.size,!0)}},30474:(e,t,n)=>{var r=n(73204),i=n(58122),o=n(6571);e.exports=function(e){return o(e)?r(e,!0):i(e)}},30918:(e,t,n)=>{"use strict";function r(e){var t=Object.create(null);return function(n){return void 0===t[n]&&(t[n]=e(n)),t[n]}}n.d(t,{A:()=>r})},31170:e=>{e.exports=function(e,t,n){switch(n.length){case 0:return e.call(t);case 1:return e.call(t,n[0]);case 2:return e.call(t,n[0],n[1]);case 3:return e.call(t,n[0],n[1],n[2])}return e.apply(t,n)}},31668:(e,t,n)=>{"use strict";function r(e){return e&&e.ownerDocument||document}n.d(t,{A:()=>r})},31782:(e,t,n)=>{"use strict";n.d(t,{A:()=>o});var r=n(65043),i=n(84440);const o=function(e){const t=r.useRef(e);return(0,i.A)(()=>{t.current=e}),r.useRef(function(){return(0,t.current)(...arguments)}).current}},32520:(e,t,n)=>{var r=n(75816),i=n(9096),o=n(99140),a=Math.max;e.exports=function(e,t,n){var s=null==e?0:e.length;if(!s)return-1;var l=null==n?0:o(n);return l<0&&(l=a(s+l,0)),r(e,i(t,3),l)}},32706:(e,t,n)=>{"use strict";n(47358)},33097:(e,t,n)=>{var r=n(52969);e.exports=function(e,t,n){var i=null==e?void 0:r(e,t);return void 0===i?n:i}},33279:e=>{e.exports=function(e){return e}},33411:(e,t,n)=>{var r=n(50149),i=n(9096),o=n(38883),a=n(54052);e.exports=function(e,t){return(a(e)?r:o)(e,i(t,3))}},34109:(e,t,n)=>{"use strict";var r=n(24994);t.A=void 0;var i=r(n(40039)),o=n(70579);t.A=(0,i.default)((0,o.jsx)("path",{d:"M19 5v14H5V5zm0-2H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2"}),"CheckBoxOutlineBlank")},34535:(e,t,n)=>{"use strict";n.d(t,{Ay:()=>s});var r=n(38052),i=n(15170),o=n(13375),a=n(61475);const s=(0,r.Ay)({themeId:o.A,defaultTheme:i.A,rootShouldForwardProp:a.A})},34552:(e,t,n)=>{var r=n(9812),i=Object.prototype,o=i.hasOwnProperty,a=i.toString,s=r?r.toStringTag:void 0;e.exports=function(e){var t=o.call(e,s),n=e[s];try{e[s]=void 0;var r=!0}catch(l){}var i=a.call(e);return r&&(t?e[s]=n:delete e[s]),i}},34612:(e,t)=>{"use strict";function n(e,t){var n=e.length;e.push(t);e:for(;0<n;){var r=n-1>>>1,i=e[r];if(!(0<o(i,t)))break e;e[r]=t,e[n]=i,n=r}}function r(e){return 0===e.length?null:e[0]}function i(e){if(0===e.length)return null;var t=e[0],n=e.pop();if(n!==t){e[0]=n;e:for(var r=0,i=e.length,a=i>>>1;r<a;){var s=2*(r+1)-1,l=e[s],c=s+1,d=e[c];if(0>o(l,n))c<i&&0>o(d,l)?(e[r]=d,e[c]=n,r=c):(e[r]=l,e[s]=n,r=s);else{if(!(c<i&&0>o(d,n)))break e;e[r]=d,e[c]=n,r=c}}}return t}function o(e,t){var n=e.sortIndex-t.sortIndex;return 0!==n?n:e.id-t.id}if("object"===typeof performance&&"function"===typeof performance.now){var a=performance;t.unstable_now=function(){return a.now()}}else{var s=Date,l=s.now();t.unstable_now=function(){return s.now()-l}}var c=[],d=[],u=1,p=null,h=3,m=!1,f=!1,g=!1,v="function"===typeof setTimeout?setTimeout:null,x="function"===typeof clearTimeout?clearTimeout:null,y="undefined"!==typeof setImmediate?setImmediate:null;function b(e){for(var t=r(d);null!==t;){if(null===t.callback)i(d);else{if(!(t.startTime<=e))break;i(d),t.sortIndex=t.expirationTime,n(c,t)}t=r(d)}}function j(e){if(g=!1,b(e),!f)if(null!==r(c))f=!0,P(_);else{var t=r(d);null!==t&&D(j,t.startTime-e)}}function _(e,n){f=!1,g&&(g=!1,x(A),A=-1),m=!0;var o=h;try{for(b(n),p=r(c);null!==p&&(!(p.expirationTime>n)||e&&!E());){var a=p.callback;if("function"===typeof a){p.callback=null,h=p.priorityLevel;var s=a(p.expirationTime<=n);n=t.unstable_now(),"function"===typeof s?p.callback=s:p===r(c)&&i(c),b(n)}else i(c);p=r(c)}if(null!==p)var l=!0;else{var u=r(d);null!==u&&D(j,u.startTime-n),l=!1}return l}finally{p=null,h=o,m=!1}}"undefined"!==typeof navigator&&void 0!==navigator.scheduling&&void 0!==navigator.scheduling.isInputPending&&navigator.scheduling.isInputPending.bind(navigator.scheduling);var C,w=!1,S=null,A=-1,k=5,T=-1;function E(){return!(t.unstable_now()-T<k)}function M(){if(null!==S){var e=t.unstable_now();T=e;var n=!0;try{n=S(!0,e)}finally{n?C():(w=!1,S=null)}}else w=!1}if("function"===typeof y)C=function(){y(M)};else if("undefined"!==typeof MessageChannel){var O=new MessageChannel,R=O.port2;O.port1.onmessage=M,C=function(){R.postMessage(null)}}else C=function(){v(M,0)};function P(e){S=e,w||(w=!0,C())}function D(e,n){A=v(function(){e(t.unstable_now())},n)}t.unstable_IdlePriority=5,t.unstable_ImmediatePriority=1,t.unstable_LowPriority=4,t.unstable_NormalPriority=3,t.unstable_Profiling=null,t.unstable_UserBlockingPriority=2,t.unstable_cancelCallback=function(e){e.callback=null},t.unstable_continueExecution=function(){f||m||(f=!0,P(_))},t.unstable_forceFrameRate=function(e){0>e||125<e?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):k=0<e?Math.floor(1e3/e):5},t.unstable_getCurrentPriorityLevel=function(){return h},t.unstable_getFirstCallbackNode=function(){return r(c)},t.unstable_next=function(e){switch(h){case 1:case 2:case 3:var t=3;break;default:t=h}var n=h;h=t;try{return e()}finally{h=n}},t.unstable_pauseExecution=function(){},t.unstable_requestPaint=function(){},t.unstable_runWithPriority=function(e,t){switch(e){case 1:case 2:case 3:case 4:case 5:break;default:e=3}var n=h;h=e;try{return t()}finally{h=n}},t.unstable_scheduleCallback=function(e,i,o){var a=t.unstable_now();switch("object"===typeof o&&null!==o?o="number"===typeof(o=o.delay)&&0<o?a+o:a:o=a,e){case 1:var s=-1;break;case 2:s=250;break;case 5:s=1073741823;break;case 4:s=1e4;break;default:s=5e3}return e={id:u++,callback:i,priorityLevel:e,startTime:o,expirationTime:s=o+s,sortIndex:-1},o>a?(e.sortIndex=o,n(d,e),null===r(c)&&e===r(d)&&(g?(x(A),A=-1):g=!0,D(j,o-a))):(e.sortIndex=s,n(c,e),f||m||(f=!0,P(_))),e},t.unstable_shouldYield=E,t.unstable_wrapCallback=function(e){var t=h;return function(){var n=h;h=t;try{return e.apply(this,arguments)}finally{h=n}}}},34853:(e,t,n)=>{"use strict";n.d(t,{A:()=>s});var r=n(98587),i=n(58168);const o=["values","unit","step"],a=e=>{const t=Object.keys(e).map(t=>({key:t,val:e[t]}))||[];return t.sort((e,t)=>e.val-t.val),t.reduce((e,t)=>(0,i.A)({},e,{[t.key]:t.val}),{})};function s(e){const{values:t={xs:0,sm:600,md:900,lg:1200,xl:1536},unit:n="px",step:s=5}=e,l=(0,r.A)(e,o),c=a(t),d=Object.keys(c);function u(e){const r="number"===typeof t[e]?t[e]:e;return"@media (min-width:".concat(r).concat(n,")")}function p(e){const r="number"===typeof t[e]?t[e]:e;return"@media (max-width:".concat(r-s/100).concat(n,")")}function h(e,r){const i=d.indexOf(r);return"@media (min-width:".concat("number"===typeof t[e]?t[e]:e).concat(n,") and ")+"(max-width:".concat((-1!==i&&"number"===typeof t[d[i]]?t[d[i]]:r)-s/100).concat(n,")")}return(0,i.A)({keys:d,values:c,up:u,down:p,between:h,only:function(e){return d.indexOf(e)+1<d.length?h(e,d[d.indexOf(e)+1]):u(e)},not:function(e){const t=d.indexOf(e);return 0===t?u(d[1]):t===d.length-1?p(d[t]):h(e,d[d.indexOf(e)+1]).replace("@media","@media not all and")},unit:n},l)}},35268:(e,t,n)=>{var r=n(79160);e.exports=function(e){return r(e)&&e!=+e}},35324:(e,t,n)=>{var r=n(54052),i=n(62597),o=n(14079),a=n(41069);e.exports=function(e,t){return r(e)?e:i(e,t)?[e]:o(a(e))}},35428:(e,t,n)=>{var r=n(16913),i=n(56173),o=n(22761),a={};a["[object Float32Array]"]=a["[object Float64Array]"]=a["[object Int8Array]"]=a["[object Int16Array]"]=a["[object Int32Array]"]=a["[object Uint8Array]"]=a["[object Uint8ClampedArray]"]=a["[object Uint16Array]"]=a["[object Uint32Array]"]=!0,a["[object Arguments]"]=a["[object Array]"]=a["[object ArrayBuffer]"]=a["[object Boolean]"]=a["[object DataView]"]=a["[object Date]"]=a["[object Error]"]=a["[object Function]"]=a["[object Map]"]=a["[object Number]"]=a["[object Object]"]=a["[object RegExp]"]=a["[object Set]"]=a["[object String]"]=a["[object WeakMap]"]=!1,e.exports=function(e){return o(e)&&i(e.length)&&!!a[r(e)]}},35967:e=>{var t=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/;e.exports=function(e){return t.test(e)}},36078:(e,t,n)=>{"use strict";n.d(t,{A:()=>r});const r=n(63940).A},36140:e=>{var t=Object.prototype;e.exports=function(e){var n=e&&e.constructor;return e===("function"==typeof n&&n.prototype||t)}},36285:(e,t,n)=>{"use strict";var r=n(24994);t.A=void 0;var i=r(n(40039)),o=n(70579);t.A=(0,i.default)((0,o.jsx)("path",{d:"M14 8c0-2.21-1.79-4-4-4S6 5.79 6 8s1.79 4 4 4 4-1.79 4-4m3 2v2h6v-2zM2 18v2h16v-2c0-2.66-5.33-4-8-4s-8 1.34-8 4"}),"PersonRemove")},36311:e=>{var t=RegExp("[\\u200d\\ud800-\\udfff\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff\\ufe0e\\ufe0f]");e.exports=function(e){return t.test(e)}},36631:(e,t,n)=>{"use strict";var r=n(24994);t.A=void 0;var i=r(n(40039)),o=n(70579);t.A=(0,i.default)((0,o.jsx)("path",{d:"M19.35 10.04C18.67 6.59 15.64 4 12 4 9.11 4 6.6 5.64 5.35 8.04 2.34 8.36 0 10.91 0 14c0 3.31 2.69 6 6 6h13c2.76 0 5-2.24 5-5 0-2.64-2.05-4.78-4.65-4.96M17 13l-5 5-5-5h3V9h4v4z"}),"CloudDownload")},36741:e=>{var t=Object.prototype.hasOwnProperty;e.exports=function(e,n){return null!=e&&t.call(e,n)}},36954:(e,t,n)=>{var r=n(11629),i=n(37857),o=n(46686),a=n(96996),s=/^\[object .+?Constructor\]$/,l=Function.prototype,c=Object.prototype,d=l.toString,u=c.hasOwnProperty,p=RegExp("^"+d.call(u).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");e.exports=function(e){return!(!o(e)||i(e))&&(r(e)?p:s).test(a(e))}},37105:(e,t,n)=>{var r="object"==typeof n.g&&n.g&&n.g.Object===Object&&n.g;e.exports=r},37159:(e,t,n)=>{var r=n(12622);e.exports=function(e){var t=r(this,e).delete(e);return this.size-=t?1:0,t}},37289:(e,t,n)=>{"use strict";var r=n(86267);e.exports=function(e,t){t=t||new FormData;var n=[];function i(e){return null===e?"":r.isDate(e)?e.toISOString():r.isArrayBuffer(e)||r.isTypedArray(e)?"function"===typeof Blob?new Blob([e]):Buffer.from(e):e}return function e(o,a){if(r.isPlainObject(o)||r.isArray(o)){if(-1!==n.indexOf(o))throw Error("Circular reference detected in "+a);n.push(o),r.forEach(o,function(n,o){if(!r.isUndefined(n)){var s,l=a?a+"."+o:o;if(n&&!a&&"object"===typeof n)if(r.endsWith(o,"{}"))n=JSON.stringify(n);else if(r.endsWith(o,"[]")&&(s=r.toArray(n)))return void s.forEach(function(e){!r.isUndefined(e)&&t.append(l,i(e))});e(n,l)}}),n.pop()}else t.append(a,i(o))}(e),t}},37303:(e,t,n)=>{var r=n(40801),i=1/0;e.exports=function(e){return e?(e=r(e))===i||e===-1/0?17976931348623157e292*(e<0?-1:1):e===e?e:0:0===e?e:0}},37344:(e,t,n)=>{"use strict";n.d(t,{A:()=>D});var r=n(58168),i=n(98587),o=n(17868),a=n(19172),s=n(37758),l=n(58812),c=n(18280);var d=n(67266);const u={black:"#000",white:"#fff"},p={50:"#fafafa",100:"#f5f5f5",200:"#eeeeee",300:"#e0e0e0",400:"#bdbdbd",500:"#9e9e9e",600:"#757575",700:"#616161",800:"#424242",900:"#212121",A100:"#f5f5f5",A200:"#eeeeee",A400:"#bdbdbd",A700:"#616161"},h={50:"#f3e5f5",100:"#e1bee7",200:"#ce93d8",300:"#ba68c8",400:"#ab47bc",500:"#9c27b0",600:"#8e24aa",700:"#7b1fa2",800:"#6a1b9a",900:"#4a148c",A100:"#ea80fc",A200:"#e040fb",A400:"#d500f9",A700:"#aa00ff"},m={50:"#ffebee",100:"#ffcdd2",200:"#ef9a9a",300:"#e57373",400:"#ef5350",500:"#f44336",600:"#e53935",700:"#d32f2f",800:"#c62828",900:"#b71c1c",A100:"#ff8a80",A200:"#ff5252",A400:"#ff1744",A700:"#d50000"},f={50:"#fff3e0",100:"#ffe0b2",200:"#ffcc80",300:"#ffb74d",400:"#ffa726",500:"#ff9800",600:"#fb8c00",700:"#f57c00",800:"#ef6c00",900:"#e65100",A100:"#ffd180",A200:"#ffab40",A400:"#ff9100",A700:"#ff6d00"},g={50:"#e3f2fd",100:"#bbdefb",200:"#90caf9",300:"#64b5f6",400:"#42a5f5",500:"#2196f3",600:"#1e88e5",700:"#1976d2",800:"#1565c0",900:"#0d47a1",A100:"#82b1ff",A200:"#448aff",A400:"#2979ff",A700:"#2962ff"},v={50:"#e1f5fe",100:"#b3e5fc",200:"#81d4fa",300:"#4fc3f7",400:"#29b6f6",500:"#03a9f4",600:"#039be5",700:"#0288d1",800:"#0277bd",900:"#01579b",A100:"#80d8ff",A200:"#40c4ff",A400:"#00b0ff",A700:"#0091ea"},x={50:"#e8f5e9",100:"#c8e6c9",200:"#a5d6a7",300:"#81c784",400:"#66bb6a",500:"#4caf50",600:"#43a047",700:"#388e3c",800:"#2e7d32",900:"#1b5e20",A100:"#b9f6ca",A200:"#69f0ae",A400:"#00e676",A700:"#00c853"},y=["mode","contrastThreshold","tonalOffset"],b={text:{primary:"rgba(0, 0, 0, 0.87)",secondary:"rgba(0, 0, 0, 0.6)",disabled:"rgba(0, 0, 0, 0.38)"},divider:"rgba(0, 0, 0, 0.12)",background:{paper:u.white,default:u.white},action:{active:"rgba(0, 0, 0, 0.54)",hover:"rgba(0, 0, 0, 0.04)",hoverOpacity:.04,selected:"rgba(0, 0, 0, 0.08)",selectedOpacity:.08,disabled:"rgba(0, 0, 0, 0.26)",disabledBackground:"rgba(0, 0, 0, 0.12)",disabledOpacity:.38,focus:"rgba(0, 0, 0, 0.12)",focusOpacity:.12,activatedOpacity:.12}},j={text:{primary:u.white,secondary:"rgba(255, 255, 255, 0.7)",disabled:"rgba(255, 255, 255, 0.5)",icon:"rgba(255, 255, 255, 0.5)"},divider:"rgba(255, 255, 255, 0.12)",background:{paper:"#121212",default:"#121212"},action:{active:u.white,hover:"rgba(255, 255, 255, 0.08)",hoverOpacity:.08,selected:"rgba(255, 255, 255, 0.16)",selectedOpacity:.16,disabled:"rgba(255, 255, 255, 0.3)",disabledBackground:"rgba(255, 255, 255, 0.12)",disabledOpacity:.38,focus:"rgba(255, 255, 255, 0.12)",focusOpacity:.12,activatedOpacity:.24}};function _(e,t,n,r){const i=r.light||r,o=r.dark||1.5*r;e[t]||(e.hasOwnProperty(n)?e[t]=e[n]:"light"===t?e.light=(0,d.a)(e.main,i):"dark"===t&&(e.dark=(0,d.e$)(e.main,o)))}function C(e){const{mode:t="light",contrastThreshold:n=3,tonalOffset:s=.2}=e,l=(0,i.A)(e,y),c=e.primary||function(){return"dark"===(arguments.length>0&&void 0!==arguments[0]?arguments[0]:"light")?{main:g[200],light:g[50],dark:g[400]}:{main:g[700],light:g[400],dark:g[800]}}(t),C=e.secondary||function(){return"dark"===(arguments.length>0&&void 0!==arguments[0]?arguments[0]:"light")?{main:h[200],light:h[50],dark:h[400]}:{main:h[500],light:h[300],dark:h[700]}}(t),w=e.error||function(){return"dark"===(arguments.length>0&&void 0!==arguments[0]?arguments[0]:"light")?{main:m[500],light:m[300],dark:m[700]}:{main:m[700],light:m[400],dark:m[800]}}(t),S=e.info||function(){return"dark"===(arguments.length>0&&void 0!==arguments[0]?arguments[0]:"light")?{main:v[400],light:v[300],dark:v[700]}:{main:v[700],light:v[500],dark:v[900]}}(t),A=e.success||function(){return"dark"===(arguments.length>0&&void 0!==arguments[0]?arguments[0]:"light")?{main:x[400],light:x[300],dark:x[700]}:{main:x[800],light:x[500],dark:x[900]}}(t),k=e.warning||function(){return"dark"===(arguments.length>0&&void 0!==arguments[0]?arguments[0]:"light")?{main:f[400],light:f[300],dark:f[700]}:{main:"#ed6c02",light:f[500],dark:f[900]}}(t);function T(e){return(0,d.eM)(e,j.text.primary)>=n?j.text.primary:b.text.primary}const E=e=>{let{color:t,name:n,mainShade:i=500,lightShade:a=300,darkShade:l=700}=e;if(t=(0,r.A)({},t),!t.main&&t[i]&&(t.main=t[i]),!t.hasOwnProperty("main"))throw new Error((0,o.A)(11,n?" (".concat(n,")"):"",i));if("string"!==typeof t.main)throw new Error((0,o.A)(12,n?" (".concat(n,")"):"",JSON.stringify(t.main)));return _(t,"light",a,s),_(t,"dark",l,s),t.contrastText||(t.contrastText=T(t.main)),t},M={dark:j,light:b};return(0,a.A)((0,r.A)({common:(0,r.A)({},u),mode:t,primary:E({color:c,name:"primary"}),secondary:E({color:C,name:"secondary",mainShade:"A400",lightShade:"A200",darkShade:"A700"}),error:E({color:w,name:"error"}),warning:E({color:k,name:"warning"}),info:E({color:S,name:"info"}),success:E({color:A,name:"success"}),grey:p,contrastThreshold:n,getContrastText:T,augmentColor:E,tonalOffset:s},M[t]),l)}const w=["fontFamily","fontSize","fontWeightLight","fontWeightRegular","fontWeightMedium","fontWeightBold","htmlFontSize","allVariants","pxToRem"];const S={textTransform:"uppercase"},A='"Roboto", "Helvetica", "Arial", sans-serif';function k(e,t){const n="function"===typeof t?t(e):t,{fontFamily:o=A,fontSize:s=14,fontWeightLight:l=300,fontWeightRegular:c=400,fontWeightMedium:d=500,fontWeightBold:u=700,htmlFontSize:p=16,allVariants:h,pxToRem:m}=n,f=(0,i.A)(n,w);const g=s/14,v=m||(e=>"".concat(e/p*g,"rem")),x=(e,t,n,i,a)=>{return(0,r.A)({fontFamily:o,fontWeight:e,fontSize:v(t),lineHeight:n},o===A?{letterSpacing:"".concat((s=i/t,Math.round(1e5*s)/1e5),"em")}:{},a,h);var s},y={h1:x(l,96,1.167,-1.5),h2:x(l,60,1.2,-.5),h3:x(c,48,1.167,0),h4:x(c,34,1.235,.25),h5:x(c,24,1.334,0),h6:x(d,20,1.6,.15),subtitle1:x(c,16,1.75,.15),subtitle2:x(d,14,1.57,.1),body1:x(c,16,1.5,.15),body2:x(c,14,1.43,.15),button:x(d,14,1.75,.4,S),caption:x(c,12,1.66,.4),overline:x(c,12,2.66,1,S),inherit:{fontFamily:"inherit",fontWeight:"inherit",fontSize:"inherit",lineHeight:"inherit",letterSpacing:"inherit"}};return(0,a.A)((0,r.A)({htmlFontSize:p,pxToRem:v,fontFamily:o,fontSize:s,fontWeightLight:l,fontWeightRegular:c,fontWeightMedium:d,fontWeightBold:u},y),f,{clone:!1})}function T(){return["".concat(arguments.length<=0?void 0:arguments[0],"px ").concat(arguments.length<=1?void 0:arguments[1],"px ").concat(arguments.length<=2?void 0:arguments[2],"px ").concat(arguments.length<=3?void 0:arguments[3],"px rgba(0,0,0,").concat(.2,")"),"".concat(arguments.length<=4?void 0:arguments[4],"px ").concat(arguments.length<=5?void 0:arguments[5],"px ").concat(arguments.length<=6?void 0:arguments[6],"px ").concat(arguments.length<=7?void 0:arguments[7],"px rgba(0,0,0,").concat(.14,")"),"".concat(arguments.length<=8?void 0:arguments[8],"px ").concat(arguments.length<=9?void 0:arguments[9],"px ").concat(arguments.length<=10?void 0:arguments[10],"px ").concat(arguments.length<=11?void 0:arguments[11],"px rgba(0,0,0,").concat(.12,")")].join(",")}const E=["none",T(0,2,1,-1,0,1,1,0,0,1,3,0),T(0,3,1,-2,0,2,2,0,0,1,5,0),T(0,3,3,-2,0,3,4,0,0,1,8,0),T(0,2,4,-1,0,4,5,0,0,1,10,0),T(0,3,5,-1,0,5,8,0,0,1,14,0),T(0,3,5,-1,0,6,10,0,0,1,18,0),T(0,4,5,-2,0,7,10,1,0,2,16,1),T(0,5,5,-3,0,8,10,1,0,3,14,2),T(0,5,6,-3,0,9,12,1,0,3,16,2),T(0,6,6,-3,0,10,14,1,0,4,18,3),T(0,6,7,-4,0,11,15,1,0,4,20,3),T(0,7,8,-4,0,12,17,2,0,5,22,4),T(0,7,8,-4,0,13,19,2,0,5,24,4),T(0,7,9,-4,0,14,21,2,0,5,26,4),T(0,8,9,-5,0,15,22,2,0,6,28,5),T(0,8,10,-5,0,16,24,2,0,6,30,5),T(0,8,11,-5,0,17,26,2,0,6,32,5),T(0,9,11,-5,0,18,28,2,0,7,34,6),T(0,9,12,-6,0,19,29,2,0,7,36,6),T(0,10,13,-6,0,20,31,3,0,8,38,7),T(0,10,13,-6,0,21,33,3,0,8,40,7),T(0,10,14,-6,0,22,35,3,0,8,42,7),T(0,11,14,-7,0,23,36,3,0,9,44,8),T(0,11,15,-7,0,24,38,3,0,9,46,8)];var M=n(14318);const O={mobileStepper:1e3,fab:1050,speedDial:1050,appBar:1100,drawer:1200,modal:1300,snackbar:1400,tooltip:1500},R=["breakpoints","mixins","spacing","palette","transitions","typography","shape"];function P(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const{mixins:t={},palette:n={},transitions:d={},typography:u={}}=e,p=(0,i.A)(e,R);if(e.vars&&void 0===e.generateCssVars)throw new Error((0,o.A)(18));const h=C(n),m=(0,c.A)(e);let f=(0,a.A)(m,{mixins:(g=m.breakpoints,v=t,(0,r.A)({toolbar:{minHeight:56,[g.up("xs")]:{"@media (orientation: landscape)":{minHeight:48}},[g.up("sm")]:{minHeight:64}}},v)),palette:h,shadows:E.slice(),typography:k(h,u),transitions:(0,M.Ay)(d),zIndex:(0,r.A)({},O)});var g,v;f=(0,a.A)(f,p);for(var x=arguments.length,y=new Array(x>1?x-1:0),b=1;b<x;b++)y[b-1]=arguments[b];return f=y.reduce((e,t)=>(0,a.A)(e,t),f),f.unstable_sxConfig=(0,r.A)({},s.A,null==p?void 0:p.unstable_sxConfig),f.unstable_sx=function(e){return(0,l.A)({sx:e,theme:this})},f}const D=P},37377:(e,t,n)=>{var r=n(93795),i=n(83950);e.exports=function(e,t,n){var o=t&&n||0;"string"==typeof e&&(t="binary"===e?new Array(16):null,e=null);var a=(e=e||{}).random||(e.rng||r)();if(a[6]=15&a[6]|64,a[8]=63&a[8]|128,t)for(var s=0;s<16;++s)t[o+s]=a[s];return t||i(a)}},37602:(e,t,n)=>{"use strict";var r=n(24994);t.A=void 0;var i=r(n(40039)),o=n(70579);t.A=(0,i.default)((0,o.jsx)("path",{d:"M7.59 5.41c-.78-.78-.78-2.05 0-2.83.78-.78 2.05-.78 2.83 0 .78.78.78 2.05 0 2.83-.79.79-2.05.79-2.83 0M6 16V7H4v9c0 2.76 2.24 5 5 5h6v-2H9c-1.66 0-3-1.34-3-3m14 4.07L14.93 15H11.5v-3.68c1.4 1.15 3.6 2.16 5.5 2.16v-2.16c-1.66.02-3.61-.87-4.67-2.04l-1.4-1.55c-.19-.21-.43-.38-.69-.5-.29-.14-.62-.23-.96-.23h-.03C8.01 7 7 8.01 7 9.25V15c0 1.66 1.34 3 3 3h5.07l3.5 3.5z"}),"AirlineSeatReclineNormal")},37758:(e,t,n)=>{"use strict";n.d(t,{A:()=>D});var r=n(28604),i=n(17162),o=n(13815);const a=function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];const r=t.reduce((e,t)=>(t.filterProps.forEach(n=>{e[n]=t}),e),{}),i=e=>Object.keys(e).reduce((t,n)=>r[n]?(0,o.A)(t,r[n](e)):t,{});return i.propTypes={},i.filterProps=t.reduce((e,t)=>e.concat(t.filterProps),[]),i};var s=n(89751);function l(e){return"number"!==typeof e?e:"".concat(e,"px solid")}function c(e,t){return(0,i.Ay)({prop:e,themeKey:"borders",transform:t})}const d=c("border",l),u=c("borderTop",l),p=c("borderRight",l),h=c("borderBottom",l),m=c("borderLeft",l),f=c("borderColor"),g=c("borderTopColor"),v=c("borderRightColor"),x=c("borderBottomColor"),y=c("borderLeftColor"),b=c("outline",l),j=c("outlineColor"),_=e=>{if(void 0!==e.borderRadius&&null!==e.borderRadius){const t=(0,r.MA)(e.theme,"shape.borderRadius",4,"borderRadius"),n=e=>({borderRadius:(0,r._W)(t,e)});return(0,s.NI)(e,e.borderRadius,n)}return null};_.propTypes={},_.filterProps=["borderRadius"];a(d,u,p,h,m,f,g,v,x,y,_,b,j);const C=e=>{if(void 0!==e.gap&&null!==e.gap){const t=(0,r.MA)(e.theme,"spacing",8,"gap"),n=e=>({gap:(0,r._W)(t,e)});return(0,s.NI)(e,e.gap,n)}return null};C.propTypes={},C.filterProps=["gap"];const w=e=>{if(void 0!==e.columnGap&&null!==e.columnGap){const t=(0,r.MA)(e.theme,"spacing",8,"columnGap"),n=e=>({columnGap:(0,r._W)(t,e)});return(0,s.NI)(e,e.columnGap,n)}return null};w.propTypes={},w.filterProps=["columnGap"];const S=e=>{if(void 0!==e.rowGap&&null!==e.rowGap){const t=(0,r.MA)(e.theme,"spacing",8,"rowGap"),n=e=>({rowGap:(0,r._W)(t,e)});return(0,s.NI)(e,e.rowGap,n)}return null};S.propTypes={},S.filterProps=["rowGap"];a(C,w,S,(0,i.Ay)({prop:"gridColumn"}),(0,i.Ay)({prop:"gridRow"}),(0,i.Ay)({prop:"gridAutoFlow"}),(0,i.Ay)({prop:"gridAutoColumns"}),(0,i.Ay)({prop:"gridAutoRows"}),(0,i.Ay)({prop:"gridTemplateColumns"}),(0,i.Ay)({prop:"gridTemplateRows"}),(0,i.Ay)({prop:"gridTemplateAreas"}),(0,i.Ay)({prop:"gridArea"}));function A(e,t){return"grey"===t?t:e}a((0,i.Ay)({prop:"color",themeKey:"palette",transform:A}),(0,i.Ay)({prop:"bgcolor",cssProperty:"backgroundColor",themeKey:"palette",transform:A}),(0,i.Ay)({prop:"backgroundColor",themeKey:"palette",transform:A}));function k(e){return e<=1&&0!==e?"".concat(100*e,"%"):e}const T=(0,i.Ay)({prop:"width",transform:k}),E=e=>{if(void 0!==e.maxWidth&&null!==e.maxWidth){const t=t=>{var n,r;const i=(null==(n=e.theme)||null==(n=n.breakpoints)||null==(n=n.values)?void 0:n[t])||s.zu[t];return i?"px"!==(null==(r=e.theme)||null==(r=r.breakpoints)?void 0:r.unit)?{maxWidth:"".concat(i).concat(e.theme.breakpoints.unit)}:{maxWidth:i}:{maxWidth:k(t)}};return(0,s.NI)(e,e.maxWidth,t)}return null};E.filterProps=["maxWidth"];const M=(0,i.Ay)({prop:"minWidth",transform:k}),O=(0,i.Ay)({prop:"height",transform:k}),R=(0,i.Ay)({prop:"maxHeight",transform:k}),P=(0,i.Ay)({prop:"minHeight",transform:k}),D=((0,i.Ay)({prop:"size",cssProperty:"width",transform:k}),(0,i.Ay)({prop:"size",cssProperty:"height",transform:k}),a(T,E,M,O,R,P,(0,i.Ay)({prop:"boxSizing"})),{border:{themeKey:"borders",transform:l},borderTop:{themeKey:"borders",transform:l},borderRight:{themeKey:"borders",transform:l},borderBottom:{themeKey:"borders",transform:l},borderLeft:{themeKey:"borders",transform:l},borderColor:{themeKey:"palette"},borderTopColor:{themeKey:"palette"},borderRightColor:{themeKey:"palette"},borderBottomColor:{themeKey:"palette"},borderLeftColor:{themeKey:"palette"},outline:{themeKey:"borders",transform:l},outlineColor:{themeKey:"palette"},borderRadius:{themeKey:"shape.borderRadius",style:_},color:{themeKey:"palette",transform:A},bgcolor:{themeKey:"palette",cssProperty:"backgroundColor",transform:A},backgroundColor:{themeKey:"palette",transform:A},p:{style:r.Ms},pt:{style:r.Ms},pr:{style:r.Ms},pb:{style:r.Ms},pl:{style:r.Ms},px:{style:r.Ms},py:{style:r.Ms},padding:{style:r.Ms},paddingTop:{style:r.Ms},paddingRight:{style:r.Ms},paddingBottom:{style:r.Ms},paddingLeft:{style:r.Ms},paddingX:{style:r.Ms},paddingY:{style:r.Ms},paddingInline:{style:r.Ms},paddingInlineStart:{style:r.Ms},paddingInlineEnd:{style:r.Ms},paddingBlock:{style:r.Ms},paddingBlockStart:{style:r.Ms},paddingBlockEnd:{style:r.Ms},m:{style:r.Lc},mt:{style:r.Lc},mr:{style:r.Lc},mb:{style:r.Lc},ml:{style:r.Lc},mx:{style:r.Lc},my:{style:r.Lc},margin:{style:r.Lc},marginTop:{style:r.Lc},marginRight:{style:r.Lc},marginBottom:{style:r.Lc},marginLeft:{style:r.Lc},marginX:{style:r.Lc},marginY:{style:r.Lc},marginInline:{style:r.Lc},marginInlineStart:{style:r.Lc},marginInlineEnd:{style:r.Lc},marginBlock:{style:r.Lc},marginBlockStart:{style:r.Lc},marginBlockEnd:{style:r.Lc},displayPrint:{cssProperty:!1,transform:e=>({"@media print":{display:e}})},display:{},overflow:{},textOverflow:{},visibility:{},whiteSpace:{},flexBasis:{},flexDirection:{},flexWrap:{},justifyContent:{},alignItems:{},alignContent:{},order:{},flex:{},flexGrow:{},flexShrink:{},alignSelf:{},justifyItems:{},justifySelf:{},gap:{style:C},rowGap:{style:S},columnGap:{style:w},gridColumn:{},gridRow:{},gridAutoFlow:{},gridAutoColumns:{},gridAutoRows:{},gridTemplateColumns:{},gridTemplateRows:{},gridTemplateAreas:{},gridArea:{},position:{},zIndex:{themeKey:"zIndex"},top:{},right:{},bottom:{},left:{},boxShadow:{themeKey:"shadows"},width:{transform:k},maxWidth:{style:E},minWidth:{transform:k},height:{transform:k},maxHeight:{transform:k},minHeight:{transform:k},boxSizing:{},fontFamily:{themeKey:"typography"},fontSize:{themeKey:"typography"},fontStyle:{themeKey:"typography"},fontWeight:{themeKey:"typography"},letterSpacing:{},textTransform:{},lineHeight:{},textAlign:{},typography:{cssProperty:!1,themeKey:"typography"}})},37857:(e,t,n)=>{var r=n(13440),i=function(){var e=/[^.]+$/.exec(r&&r.keys&&r.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}();e.exports=function(e){return!!i&&i in e}},38052:(e,t,n)=>{"use strict";var r=n(24994);t.Ay=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const{themeId:t,defaultTheme:n=g,rootShouldForwardProp:r=m,slotShouldForwardProp:l=m}=e,d=e=>(0,c.default)((0,i.default)({},e,{theme:x((0,i.default)({},e,{defaultTheme:n,themeId:t}))}));return d.__mui_systemSx=!0,function(e){let c=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};(0,a.internal_processStyles)(e,e=>e.filter(e=>!(null!=e&&e.__mui_systemSx)));const{name:u,slot:h,skipVariantsResolver:f,skipSx:g,overridesResolver:j=y(v(h))}=c,_=(0,o.default)(c,p),C=u&&u.startsWith("Mui")||h?"components":"custom",w=void 0!==f?f:h&&"Root"!==h&&"root"!==h||!1,S=g||!1;let A=m;"Root"===h||"root"===h?A=r:h?A=l:function(e){return"string"===typeof e&&e.charCodeAt(0)>96}(e)&&(A=void 0);const k=(0,a.default)(e,(0,i.default)({shouldForwardProp:A,label:undefined},_)),T=e=>"function"===typeof e&&e.__emotion_real!==e||(0,s.isPlainObject)(e)?r=>{const o=x({theme:r.theme,defaultTheme:n,themeId:t});return b(e,(0,i.default)({},r,{theme:o}),o.modularCssLayers?C:void 0)}:e,E=function(r){let o=T(r);for(var a=arguments.length,s=new Array(a>1?a-1:0),l=1;l<a;l++)s[l-1]=arguments[l];const c=s?s.map(T):[];u&&j&&c.push(e=>{const r=x((0,i.default)({},e,{defaultTheme:n,themeId:t}));if(!r.components||!r.components[u]||!r.components[u].styleOverrides)return null;const o=r.components[u].styleOverrides,a={};return Object.entries(o).forEach(t=>{let[n,o]=t;a[n]=b(o,(0,i.default)({},e,{theme:r}),r.modularCssLayers?"theme":void 0)}),j(e,a)}),u&&!w&&c.push(e=>{var r;const o=x((0,i.default)({},e,{defaultTheme:n,themeId:t}));return b({variants:null==o||null==(r=o.components)||null==(r=r[u])?void 0:r.variants},(0,i.default)({},e,{theme:o}),o.modularCssLayers?"theme":void 0)}),S||c.push(d);const p=c.length-s.length;if(Array.isArray(r)&&p>0){const e=new Array(p).fill("");o=[...r,...e],o.raw=[...r.raw,...e]}const h=k(o,...c);return e.muiName&&(h.muiName=e.muiName),h};return k.withConfig&&(E.withConfig=k.withConfig),E}};var i=r(n(94634)),o=r(n(54893)),a=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var n=h(t);if(n&&n.has(e))return n.get(e);var r={__proto__:null},i=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var o in e)if("default"!==o&&Object.prototype.hasOwnProperty.call(e,o)){var a=i?Object.getOwnPropertyDescriptor(e,o):null;a&&(a.get||a.set)?Object.defineProperty(r,o,a):r[o]=e[o]}return r.default=e,n&&n.set(e,r),r}(n(13174)),s=n(19482),l=(r(n(87918)),r(n(83382)),r(n(24989))),c=r(n(73234));const d=["ownerState"],u=["variants"],p=["name","slot","skipVariantsResolver","skipSx","overridesResolver"];function h(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(h=function(e){return e?n:t})(e)}function m(e){return"ownerState"!==e&&"theme"!==e&&"sx"!==e&&"as"!==e}function f(e,t){return t&&e&&"object"===typeof e&&e.styles&&!e.styles.startsWith("@layer")&&(e.styles="@layer ".concat(t,"{").concat(String(e.styles),"}")),e}const g=(0,l.default)(),v=e=>e?e.charAt(0).toLowerCase()+e.slice(1):e;function x(e){let{defaultTheme:t,theme:n,themeId:r}=e;return i=n,0===Object.keys(i).length?t:n[r]||n;var i}function y(e){return e?(t,n)=>n[e]:null}function b(e,t,n){let{ownerState:r}=t,s=(0,o.default)(t,d);const l="function"===typeof e?e((0,i.default)({ownerState:r},s)):e;if(Array.isArray(l))return l.flatMap(e=>b(e,(0,i.default)({ownerState:r},s),n));if(l&&"object"===typeof l&&Array.isArray(l.variants)){const{variants:e=[]}=l;let t=(0,o.default)(l,u);return e.forEach(e=>{let o=!0;if("function"===typeof e.props?o=e.props((0,i.default)({ownerState:r},s,r)):Object.keys(e.props).forEach(t=>{(null==r?void 0:r[t])!==e.props[t]&&s[t]!==e.props[t]&&(o=!1)}),o){Array.isArray(t)||(t=[t]);const o="function"===typeof e.style?e.style((0,i.default)({ownerState:r},s,r)):e.style;t.push(n?f((0,a.internal_serializeStyles)(o),n):o)}}),t}return n?f((0,a.internal_serializeStyles)(l),n):l}},38268:e=>{var t=Object.prototype.hasOwnProperty;e.exports=function(e){var n=e.length,r=new e.constructor(n);return n&&"string"==typeof e[0]&&t.call(e,"index")&&(r.index=e.index,r.input=e.input),r}},38499:e=>{"use strict";var t=Object.prototype.hasOwnProperty,n="~";function r(){}function i(e,t,n){this.fn=e,this.context=t,this.once=n||!1}function o(e,t,r,o,a){if("function"!==typeof r)throw new TypeError("The listener must be a function");var s=new i(r,o||e,a),l=n?n+t:t;return e._events[l]?e._events[l].fn?e._events[l]=[e._events[l],s]:e._events[l].push(s):(e._events[l]=s,e._eventsCount++),e}function a(e,t){0===--e._eventsCount?e._events=new r:delete e._events[t]}function s(){this._events=new r,this._eventsCount=0}Object.create&&(r.prototype=Object.create(null),(new r).__proto__||(n=!1)),s.prototype.eventNames=function(){var e,r,i=[];if(0===this._eventsCount)return i;for(r in e=this._events)t.call(e,r)&&i.push(n?r.slice(1):r);return Object.getOwnPropertySymbols?i.concat(Object.getOwnPropertySymbols(e)):i},s.prototype.listeners=function(e){var t=n?n+e:e,r=this._events[t];if(!r)return[];if(r.fn)return[r.fn];for(var i=0,o=r.length,a=new Array(o);i<o;i++)a[i]=r[i].fn;return a},s.prototype.listenerCount=function(e){var t=n?n+e:e,r=this._events[t];return r?r.fn?1:r.length:0},s.prototype.emit=function(e,t,r,i,o,a){var s=n?n+e:e;if(!this._events[s])return!1;var l,c,d=this._events[s],u=arguments.length;if(d.fn){switch(d.once&&this.removeListener(e,d.fn,void 0,!0),u){case 1:return d.fn.call(d.context),!0;case 2:return d.fn.call(d.context,t),!0;case 3:return d.fn.call(d.context,t,r),!0;case 4:return d.fn.call(d.context,t,r,i),!0;case 5:return d.fn.call(d.context,t,r,i,o),!0;case 6:return d.fn.call(d.context,t,r,i,o,a),!0}for(c=1,l=new Array(u-1);c<u;c++)l[c-1]=arguments[c];d.fn.apply(d.context,l)}else{var p,h=d.length;for(c=0;c<h;c++)switch(d[c].once&&this.removeListener(e,d[c].fn,void 0,!0),u){case 1:d[c].fn.call(d[c].context);break;case 2:d[c].fn.call(d[c].context,t);break;case 3:d[c].fn.call(d[c].context,t,r);break;case 4:d[c].fn.call(d[c].context,t,r,i);break;default:if(!l)for(p=1,l=new Array(u-1);p<u;p++)l[p-1]=arguments[p];d[c].fn.apply(d[c].context,l)}}return!0},s.prototype.on=function(e,t,n){return o(this,e,t,n,!1)},s.prototype.once=function(e,t,n){return o(this,e,t,n,!0)},s.prototype.removeListener=function(e,t,r,i){var o=n?n+e:e;if(!this._events[o])return this;if(!t)return a(this,o),this;var s=this._events[o];if(s.fn)s.fn!==t||i&&!s.once||r&&s.context!==r||a(this,o);else{for(var l=0,c=[],d=s.length;l<d;l++)(s[l].fn!==t||i&&!s[l].once||r&&s[l].context!==r)&&c.push(s[l]);c.length?this._events[o]=1===c.length?c[0]:c:a(this,o)}return this},s.prototype.removeAllListeners=function(e){var t;return e?(t=n?n+e:e,this._events[t]&&a(this,t)):(this._events=new r,this._eventsCount=0),this},s.prototype.off=s.prototype.removeListener,s.prototype.addListener=s.prototype.on,s.prefixed=n,s.EventEmitter=s,e.exports=s},38541:(e,t,n)=>{var r=n(9812),i=n(50149),o=n(54052),a=n(19841),s=r?r.prototype:void 0,l=s?s.toString:void 0;e.exports=function e(t){if("string"==typeof t)return t;if(o(t))return i(t,e)+"";if(a(t))return l?l.call(t):"";var n=t+"";return"0"==n&&1/t==-1/0?"-0":n}},38710:(e,t,n)=>{var r=n(61516);e.exports=function(e,t){var n=t?r(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.length)}},38723:(e,t,n)=>{"use strict";var r=n(24994);t.A=void 0;var i=r(n(40039)),o=n(70579);t.A=(0,i.default)((0,o.jsx)("path",{d:"M6 21h12V7H6zM19 4h-3.5l-1-1h-5l-1 1H5v2h14z"}),"DeleteSharp")},38883:(e,t,n)=>{var r=n(45652),i=n(6571);e.exports=function(e,t){var n=-1,o=i(e)?Array(e.length):[];return r(e,function(e,r,i){o[++n]=t(e,r,i)}),o}},39089:(e,t,n)=>{"use strict";var r=n(24994);t.A=void 0;var i=r(n(40039)),o=n(70579);t.A=(0,i.default)((0,o.jsx)("path",{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2m0 4c1.93 0 3.5 1.57 3.5 3.5S13.93 13 12 13s-3.5-1.57-3.5-3.5S10.07 6 12 6m0 14c-2.03 0-4.43-.82-6.14-2.88C7.55 15.8 9.68 15 12 15s4.45.8 6.14 2.12C16.43 19.18 14.03 20 12 20"}),"AccountCircle")},39115:(e,t,n)=>{var r=n(45967),i=n(36311),o=n(50715);e.exports=function(e){return i(e)?o(e):r(e)}},39256:(e,t,n)=>{var r=n(86532),i=n(23781),o=n(91310);e.exports=function(e){var t=i(e);return 1==t.length&&t[0][2]?o(t[0][0],t[0][1]):function(n){return n===e||r(n,e,t)}}},39676:e=>{var t=Math.ceil,n=Math.max;e.exports=function(e,r,i,o){for(var a=-1,s=n(t((r-e)/(i||1)),0),l=Array(s);s--;)l[o?s:++a]=e,e+=i;return l}},39829:(e,t,n)=>{var r=n(38541),i=n(61141),o=n(28189),a=n(76372),s=n(6219),l=n(39115),c=n(41069);e.exports=function(e,t,n){if((e=c(e))&&(n||void 0===t))return i(e);if(!e||!(t=r(t)))return e;var d=l(e),u=l(t),p=s(d,u),h=a(d,u)+1;return o(d,p,h).join("")}},40039:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"default",{enumerable:!0,get:function(){return r.createSvgIcon}});var r=n(4391)},40644:e=>{e.exports=function(e){return e!==e}},40801:(e,t,n)=>{var r=n(61141),i=n(46686),o=n(19841),a=/^[-+]0x[0-9a-f]+$/i,s=/^0b[01]+$/i,l=/^0o[0-7]+$/i,c=parseInt;e.exports=function(e){if("number"==typeof e)return e;if(o(e))return NaN;if(i(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=i(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=r(e);var n=s.test(e);return n||l.test(e)?c(e.slice(2),n?2:8):a.test(e)?NaN:+e}},40854:(e,t,n)=>{e.exports=n(20672)},40995:(e,t,n)=>{"use strict";var r=n(24994);t.A=void 0;var i=r(n(40039)),o=n(70579);t.A=(0,i.default)((0,o.jsx)("path",{d:"M21 5.47 12 12 7.62 7.62 3 11V8.52L7.83 5l4.38 4.38L21 3zM21 15h-4.7l-4.17 3.34L6 12.41l-3 2.13V17l2.8-2 6.2 6 5-4h4z"}),"SsidChart")},41069:(e,t,n)=>{var r=n(38541);e.exports=function(e){return null==e?"":r(e)}},41497:(e,t,n)=>{"use strict";var r=n(13218);function i(){}function o(){}o.resetWarningCache=i,e.exports=function(){function e(e,t,n,i,o,a){if(a!==r){var s=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 s.name="Invariant Violation",s}}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:o,resetWarningCache:i};return n.PropTypes=n,n}},41523:e=>{"use strict";e.exports=function(e,t){return t?e.replace(/\/+$/,"")+"/"+t.replace(/^\/+/,""):e}},41558:e=>{e.exports=function(e,t,n){for(var r=-1,i=null==e?0:e.length;++r<i;)if(n(t,e[r]))return!0;return!1}},41979:(e,t,n)=>{var r=n(23579),i=n(26882)(function(e,t,n){return t=t.toLowerCase(),e+(n?r(t):t)});e.exports=i},42348:(e,t,n)=>{"use strict";e.exports=n(61552)},42456:(e,t,n)=>{"use strict";function r(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return t.reduce((e,t)=>null==t?e:function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];e.apply(this,r),t.apply(this,r)},()=>{})}n.d(t,{A:()=>r})},42478:(e,t,n)=>{"use strict";var r=n(23104).version,i=n(82702),o={};["object","boolean","number","function","string","symbol"].forEach(function(e,t){o[e]=function(n){return typeof n===e||"a"+(t<1?"n ":" ")+e}});var a={};o.transitional=function(e,t,n){function o(e,t){return"[Axios v"+r+"] Transitional option '"+e+"'"+t+(n?". "+n:"")}return function(n,r,s){if(!1===e)throw new i(o(r," has been removed"+(t?" in "+t:"")),i.ERR_DEPRECATED);return t&&!a[r]&&(a[r]=!0,console.warn(o(r," has been deprecated since v"+t+" and will be removed in the near future"))),!e||e(n,r,s)}},e.exports={assertOptions:function(e,t,n){if("object"!==typeof e)throw new i("options must be an object",i.ERR_BAD_OPTION_VALUE);for(var r=Object.keys(e),o=r.length;o-- >0;){var a=r[o],s=t[a];if(s){var l=e[a],c=void 0===l||s(l,a,e);if(!0!==c)throw new i("option "+a+" must be "+c,i.ERR_BAD_OPTION_VALUE)}else if(!0!==n)throw new i("Unknown option "+a,i.ERR_BAD_OPTION)}},validators:o}},42734:function(e,t,n){"use strict";var r=this&&this.__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])},e(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 r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}();Object.defineProperty(t,"__esModule",{value:!0});var i=n(65173),o=n(65043),a=n(60225),s=n(15388),l=function(e){function t(t){var n=e.call(this,t)||this;return n.state={value:n.props.value},n.onChange=n.onChange.bind(n),n.diff=n.diff.bind(n),n}return r(t,e),t.prototype.componentDidUpdate=function(){var e=this.props.value;e!==this.state.value&&this.setState({value:e})},t.prototype.onChange=function(e){this.setState({value:e}),this.props.onChange&&this.props.onChange(e)},t.prototype.diff=function(){var e=new s,t=this.state.value[0],n=this.state.value[1];if(0===t.length&&0===n.length)return[];var r=e.diff_main(t,n);e.diff_cleanupSemantic(r);var i=this.generateDiffedLines(r);return this.setCodeMarkers(i)},t.prototype.generateDiffedLines=function(e){var t=0,n=-1,r=1,i={left:[],right:[]},o={left:1,right:1};return e.forEach(function(e){var a=e[0],s=e[1],l=s.split("\n").length-1;if(0!==s.length){var c=s[0],d=s[s.length-1],u=0;switch(a){case t:o.left+=l,o.right+=l;break;case n:"\n"===c&&(o.left++,l--),0===(u=l)&&i.right.push({startLine:o.right,endLine:o.right}),"\n"===d&&(u-=1),i.left.push({startLine:o.left,endLine:o.left+u}),o.left+=l;break;case r:"\n"===c&&(o.right++,l--),0===(u=l)&&i.left.push({startLine:o.left,endLine:o.left}),"\n"===d&&(u-=1),i.right.push({startLine:o.right,endLine:o.right+u}),o.right+=l;break;default:throw new Error("Diff type was not defined.")}}}),i},t.prototype.setCodeMarkers=function(e){void 0===e&&(e={left:[],right:[]});for(var t=[],n={left:[],right:[]},r=0;r<e.left.length;r++){var i={startRow:e.left[r].startLine-1,endRow:e.left[r].endLine,type:"text",className:"codeMarker"};n.left.push(i)}for(r=0;r<e.right.length;r++){i={startRow:e.right[r].startLine-1,endRow:e.right[r].endLine,type:"text",className:"codeMarker"};n.right.push(i)}return t[0]=n.left,t[1]=n.right,t},t.prototype.render=function(){var e=this.diff();return o.createElement(a.default,{name:this.props.name,className:this.props.className,focus:this.props.focus,orientation:this.props.orientation,splits:this.props.splits,mode:this.props.mode,theme:this.props.theme,height:this.props.height,width:this.props.width,fontSize:this.props.fontSize,showGutter:this.props.showGutter,onChange:this.onChange,onPaste:this.props.onPaste,onLoad:this.props.onLoad,onScroll:this.props.onScroll,minLines:this.props.minLines,maxLines:this.props.maxLines,readOnly:this.props.readOnly,highlightActiveLine:this.props.highlightActiveLine,showPrintMargin:this.props.showPrintMargin,tabSize:this.props.tabSize,cursorStart:this.props.cursorStart,editorProps:this.props.editorProps,style:this.props.style,scrollMargin:this.props.scrollMargin,setOptions:this.props.setOptions,wrapEnabled:this.props.wrapEnabled,enableBasicAutocompletion:this.props.enableBasicAutocompletion,enableLiveAutocompletion:this.props.enableLiveAutocompletion,value:this.state.value,markers:e})},t.propTypes={cursorStart:i.number,editorProps:i.object,enableBasicAutocompletion:i.bool,enableLiveAutocompletion:i.bool,focus:i.bool,fontSize:i.number,height:i.string,highlightActiveLine:i.bool,maxLines:i.number,minLines:i.number,mode:i.string,name:i.string,className:i.string,onLoad:i.func,onPaste:i.func,onScroll:i.func,onChange:i.func,orientation:i.string,readOnly:i.bool,scrollMargin:i.array,setOptions:i.object,showGutter:i.bool,showPrintMargin:i.bool,splits:i.number,style:i.object,tabSize:i.number,theme:i.string,value:i.array,width:i.string,wrapEnabled:i.bool},t.defaultProps={cursorStart:1,editorProps:{},enableBasicAutocompletion:!1,enableLiveAutocompletion:!1,focus:!1,fontSize:12,height:"500px",highlightActiveLine:!0,maxLines:null,minLines:null,mode:"",name:"ace-editor",onLoad:null,onScroll:null,onPaste:null,onChange:null,orientation:"beside",readOnly:!1,scrollMargin:[0,0,0,0],setOptions:{},showGutter:!0,showPrintMargin:!0,splits:2,style:{},tabSize:4,theme:"github",value:["",""],width:"500px",wrapEnabled:!0},t}(o.Component);t.default=l},43516:e=>{e.exports=function(e){var t=[];if(null!=e)for(var n in Object(e))t.push(n);return t}},43668:(e,t,n)=>{var r=n(18902),i=n(52587),o=n(58114);e.exports=function(e,t,n,a,s,l){var c=1&n,d=e.length,u=t.length;if(d!=u&&!(c&&u>d))return!1;var p=l.get(e),h=l.get(t);if(p&&h)return p==t&&h==e;var m=-1,f=!0,g=2&n?new r:void 0;for(l.set(e,t),l.set(t,e);++m<d;){var v=e[m],x=t[m];if(a)var y=c?a(x,v,m,t,e,l):a(v,x,m,e,t,l);if(void 0!==y){if(y)continue;f=!1;break}if(g){if(!i(t,function(e,t){if(!o(g,t)&&(v===e||s(v,e,n,a,l)))return g.push(t)})){f=!1;break}}else if(v!==x&&!s(v,x,n,a,l)){f=!1;break}}return l.delete(e),l.delete(t),f}},44288:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getAceInstance=t.debounce=t.editorEvents=t.editorOptions=void 0;t.editorOptions=["minLines","maxLines","readOnly","highlightActiveLine","tabSize","enableBasicAutocompletion","enableLiveAutocompletion","enableSnippets"];t.editorEvents=["onChange","onFocus","onInput","onBlur","onCopy","onPaste","onSelectionChange","onCursorChange","onScroll","handleOptions","updateRef"];t.getAceInstance=function(){var e;return"undefined"===typeof window?(n.g.window={},e=n(56603),delete n.g.window):window.ace?(e=window.ace).acequire=window.ace.require||window.ace.acequire:e=n(56603),e};t.debounce=function(e,t){var n=null;return function(){var r=this,i=arguments;clearTimeout(n),n=setTimeout(function(){e.apply(r,i)},t)}}},44314:(e,t,n)=>{"use strict";var r=n(24994);t.A=void 0;var i=r(n(40039)),o=n(70579);t.A=(0,i.default)((0,o.jsx)("path",{d:"M6 19c0 1.1.9 2 2 2h8c1.1 0 2-.9 2-2V9c0-1.1-.9-2-2-2H8c-1.1 0-2 .9-2 2zM18 4h-2.5l-.71-.71c-.18-.18-.44-.29-.7-.29H9.91c-.26 0-.52.11-.7.29L8.5 4H6c-.55 0-1 .45-1 1s.45 1 1 1h12c.55 0 1-.45 1-1s-.45-1-1-1"}),"DeleteRounded")},44353:(e,t,n)=>{e=n.nmd(e);var r=n(56552),i=t&&!t.nodeType&&t,o=i&&e&&!e.nodeType&&e,a=o&&o.exports===i?r.Buffer:void 0,s=a?a.allocUnsafe:void 0;e.exports=function(e,t){if(t)return e.slice();var n=e.length,r=s?s(n):new e.constructor(n);return e.copy(r),r}},44448:(e,t,n)=>{"use strict";var r=n(24994);t.A=void 0;var i=r(n(40039)),o=n(70579);t.A=(0,i.default)((0,o.jsx)("path",{d:"M15.41 7.41 14 6l-6 6 6 6 1.41-1.41L10.83 12z"}),"NavigateBefore")},44543:(e,t,n)=>{e=n.nmd(e);var r=n(56552),i=n(60014),o=t&&!t.nodeType&&t,a=o&&e&&!e.nodeType&&e,s=a&&a.exports===o?r.Buffer:void 0,l=(s?s.isBuffer:void 0)||i;e.exports=l},45465:(e,t,n)=>{"use strict";var r=n(24994);t.A=void 0;var i=r(n(40039)),o=n(70579);t.A=(0,i.default)((0,o.jsx)("path",{d:"M11 18h2v-2h-2zm1-16C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2m0 18c-4.41 0-8-3.59-8-8s3.59-8 8-8 8 3.59 8 8-3.59 8-8 8m0-14c-2.21 0-4 1.79-4 4h2c0-1.1.9-2 2-2s2 .9 2 2c0 2-3 1.75-3 5h2c0-2.25 3-2.5 3-5 0-2.21-1.79-4-4-4"}),"HelpOutline")},45604:(e,t,n)=>{"use strict";var r=n(24994);t.A=void 0;var i=r(n(40039)),o=n(70579);t.A=(0,i.default)((0,o.jsx)("path",{d:"M18.5 3H6c-1.1 0-2 .9-2 2v5.71c0 3.83 2.95 7.18 6.78 7.29 3.96.12 7.22-3.06 7.22-7v-1h.5c1.93 0 3.5-1.57 3.5-3.5S20.43 3 18.5 3M16 5v3H6V5zm2.5 3H18V5h.5c.83 0 1.5.67 1.5 1.5S19.33 8 18.5 8M4 19h16v2H4z"}),"Coffee")},45652:(e,t,n)=>{var r=n(94664),i=n(76516)(r);e.exports=i},45752:(e,t,n)=>{var r=n(59395),i=Object.prototype.hasOwnProperty;e.exports=function(e,t,n,o,a,s){var l=1&n,c=r(e),d=c.length;if(d!=r(t).length&&!l)return!1;for(var u=d;u--;){var p=c[u];if(!(l?p in t:i.call(t,p)))return!1}var h=s.get(e),m=s.get(t);if(h&&m)return h==t&&m==e;var f=!0;s.set(e,t),s.set(t,e);for(var g=l;++u<d;){var v=e[p=c[u]],x=t[p];if(o)var y=l?o(x,v,p,t,e,s):o(v,x,p,e,t,s);if(!(void 0===y?v===x||a(v,x,n,o,s):y)){f=!1;break}g||(g="constructor"==p)}if(f&&!g){var b=e.constructor,j=t.constructor;b==j||!("constructor"in e)||!("constructor"in t)||"function"==typeof b&&b instanceof b&&"function"==typeof j&&j instanceof j||(f=!1)}return s.delete(e),s.delete(t),f}},45879:(e,t,n)=>{"use strict";n.d(t,{A:()=>r});const r=n(5844).A},45921:(e,t,n)=>{var r=n(20449),i=n(47574),o=n(56832),a=o&&o.isSet,s=a?i(a):r;e.exports=s},45967:e=>{e.exports=function(e){return e.split("")}},46350:(e,t,n)=>{var r=n(28325),i=n(86578)(r);e.exports=i},46686:e=>{e.exports=function(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}},46704:e=>{e.exports=function(e){return this.__data__.has(e)}},47030:(e,t,n)=>{"use strict";var r=n(24994);t.A=void 0;var i=r(n(40039)),o=n(70579);t.A=(0,i.default)((0,o.jsx)("path",{d:"M11 7h2v2h-2zm0 4h2v6h-2zm1-9C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2m0 18c-4.41 0-8-3.59-8-8s3.59-8 8-8 8 3.59 8 8-3.59 8-8 8"}),"InfoOutlined")},47123:(e,t,n)=>{"use strict";n.d(t,{A:()=>r});const r=function(e){return"ownerState"!==e&&"theme"!==e&&"sx"!==e&&"as"!==e}},47251:(e,t,n)=>{var r=n(98724),i=n(97160),o=n(85204);e.exports=function(){this.size=0,this.__data__={hash:new r,map:new(o||i),string:new r}}},47358:(e,t)=>{"use strict";var n,r=Symbol.for("react.element"),i=Symbol.for("react.portal"),o=Symbol.for("react.fragment"),a=Symbol.for("react.strict_mode"),s=Symbol.for("react.profiler"),l=Symbol.for("react.provider"),c=Symbol.for("react.context"),d=Symbol.for("react.server_context"),u=Symbol.for("react.forward_ref"),p=Symbol.for("react.suspense"),h=Symbol.for("react.suspense_list"),m=Symbol.for("react.memo"),f=Symbol.for("react.lazy"),g=Symbol.for("react.offscreen");function v(e){if("object"===typeof e&&null!==e){var t=e.$$typeof;switch(t){case r:switch(e=e.type){case o:case s:case a:case p:case h:return e;default:switch(e=e&&e.$$typeof){case d:case c:case u:case f:case m:case l:return e;default:return t}}case i:return t}}}n=Symbol.for("react.module.reference")},47482:(e,t,n)=>{"use strict";var r=n(82702);function i(e){r.call(this,null==e?"canceled":e,r.ERR_CANCELED),this.name="CanceledError"}n(86267).inherits(i,r,{__CANCEL__:!0}),e.exports=i},47574:e=>{e.exports=function(e){return function(t){return e(t)}}},47903:(e,t,n)=>{"use strict";var r=n(86267);e.exports=r.isStandardBrowserEnv()?{write:function(e,t,n,i,o,a){var s=[];s.push(e+"="+encodeURIComponent(t)),r.isNumber(n)&&s.push("expires="+new Date(n).toGMTString()),r.isString(i)&&s.push("path="+i),r.isString(o)&&s.push("domain="+o),!0===a&&s.push("secure"),document.cookie=s.join("; ")},read:function(e){var 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(){}}},48734:(e,t,n)=>{var r=n(95575),i=Object.prototype.hasOwnProperty;e.exports=function(e){var t=this.__data__;return r?void 0!==t[e]:i.call(t,e)}},48895:e=>{e.exports=function(e,t){for(var n=-1,r=t.length,i=e.length;++n<r;)e[i+n]=t[n];return e}},50046:(e,t,n)=>{var r=n(76272);e.exports=function(e){return r(e)?e:[]}},50061:e=>{e.exports=function(e,t){return e<t}},50149:e=>{e.exports=function(e,t){for(var n=-1,r=null==e?0:e.length,i=Array(r);++n<r;)i[n]=t(e[n],n,e);return i}},50539:(e,t,n)=>{var r=n(79742),i=n(97498),o=n(33279);e.exports=function(e){return e&&e.length?r(e,o,i):void 0}},50715:e=>{var t="\\ud800-\\udfff",n="["+t+"]",r="[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]",i="\\ud83c[\\udffb-\\udfff]",o="[^"+t+"]",a="(?:\\ud83c[\\udde6-\\uddff]){2}",s="[\\ud800-\\udbff][\\udc00-\\udfff]",l="(?:"+r+"|"+i+")"+"?",c="[\\ufe0e\\ufe0f]?",d=c+l+("(?:\\u200d(?:"+[o,a,s].join("|")+")"+c+l+")*"),u="(?:"+[o+r+"?",r,a,s,n].join("|")+")",p=RegExp(i+"(?="+i+")|"+u+d,"g");e.exports=function(e){return e.match(p)||[]}},50805:(e,t,n)=>{"use strict";n.d(t,{HY:()=>u,Tw:()=>f,Yl:()=>d,Zz:()=>m,y$:()=>c,zH:()=>h});var r=n(89379);function i(e){return"Minified Redux error #"+e+"; visit https://redux.js.org/Errors?code="+e+" for the full message or use the non-minified dev environment for full errors. "}var o="function"===typeof Symbol&&Symbol.observable||"@@observable",a=function(){return Math.random().toString(36).substring(7).split("").join(".")},s={INIT:"@@redux/INIT"+a(),REPLACE:"@@redux/REPLACE"+a(),PROBE_UNKNOWN_ACTION:function(){return"@@redux/PROBE_UNKNOWN_ACTION"+a()}};function l(e){if("object"!==typeof e||null===e)return!1;for(var t=e;null!==Object.getPrototypeOf(t);)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(e)===t}function c(e,t,n){var r;if("function"===typeof t&&"function"===typeof n||"function"===typeof n&&"function"===typeof arguments[3])throw new Error(i(0));if("function"===typeof t&&"undefined"===typeof n&&(n=t,t=void 0),"undefined"!==typeof n){if("function"!==typeof n)throw new Error(i(1));return n(c)(e,t)}if("function"!==typeof e)throw new Error(i(2));var a=e,d=t,u=[],p=u,h=!1;function m(){p===u&&(p=u.slice())}function f(){if(h)throw new Error(i(3));return d}function g(e){if("function"!==typeof e)throw new Error(i(4));if(h)throw new Error(i(5));var t=!0;return m(),p.push(e),function(){if(t){if(h)throw new Error(i(6));t=!1,m();var n=p.indexOf(e);p.splice(n,1),u=null}}}function v(e){if(!l(e))throw new Error(i(7));if("undefined"===typeof e.type)throw new Error(i(8));if(h)throw new Error(i(9));try{h=!0,d=a(d,e)}finally{h=!1}for(var t=u=p,n=0;n<t.length;n++){(0,t[n])()}return e}return v({type:s.INIT}),(r={dispatch:v,subscribe:g,getState:f,replaceReducer:function(e){if("function"!==typeof e)throw new Error(i(10));a=e,v({type:s.REPLACE})}})[o]=function(){var e,t=g;return(e={subscribe:function(e){if("object"!==typeof e||null===e)throw new Error(i(11));function n(){e.next&&e.next(f())}return n(),{unsubscribe:t(n)}}})[o]=function(){return this},e},r}var d=c;function u(e){for(var t=Object.keys(e),n={},r=0;r<t.length;r++){var o=t[r];0,"function"===typeof e[o]&&(n[o]=e[o])}var a,l=Object.keys(n);try{!function(e){Object.keys(e).forEach(function(t){var n=e[t];if("undefined"===typeof n(void 0,{type:s.INIT}))throw new Error(i(12));if("undefined"===typeof n(void 0,{type:s.PROBE_UNKNOWN_ACTION()}))throw new Error(i(13))})}(n)}catch(c){a=c}return function(e,t){if(void 0===e&&(e={}),a)throw a;for(var r=!1,o={},s=0;s<l.length;s++){var c=l[s],d=n[c],u=e[c],p=d(u,t);if("undefined"===typeof p){t&&t.type;throw new Error(i(14))}o[c]=p,r=r||p!==u}return(r=r||l.length!==Object.keys(e).length)?o:e}}function p(e,t){return function(){return t(e.apply(this,arguments))}}function h(e,t){if("function"===typeof e)return p(e,t);if("object"!==typeof e||null===e)throw new Error(i(16));var n={};for(var r in e){var o=e[r];"function"===typeof o&&(n[r]=p(o,t))}return n}function m(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return 0===t.length?function(e){return e}:1===t.length?t[0]:t.reduce(function(e,t){return function(){return e(t.apply(void 0,arguments))}})}function f(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return function(e){return function(){var n=e.apply(void 0,arguments),o=function(){throw new Error(i(15))},a={getState:n.getState,dispatch:function(){return o.apply(void 0,arguments)}},s=t.map(function(e){return e(a)});return o=m.apply(void 0,s)(n.dispatch),(0,r.A)((0,r.A)({},n),{},{dispatch:o})}}}},51052:(e,t,n)=>{"use strict";n.d(t,{A:()=>i});var r=n(65043);function i(e){let{controlled:t,default:n,name:i,state:o="value"}=e;const{current:a}=r.useRef(void 0!==t),[s,l]=r.useState(n);return[a?t:s,r.useCallback(e=>{a||l(e)},[])]}},51104:(e,t,n)=>{var r=n(96614),i=n(28673);e.exports=function(e,t){return e&&r(t,i(t),e)}},51153:(e,t,n)=>{"use strict";var r=n(65043),i=Symbol.for("react.element"),o=Symbol.for("react.fragment"),a=Object.prototype.hasOwnProperty,s=r.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,l={key:!0,ref:!0,__self:!0,__source:!0};function c(e,t,n){var r,o={},c=null,d=null;for(r in void 0!==n&&(c=""+n),void 0!==t.key&&(c=""+t.key),void 0!==t.ref&&(d=t.ref),t)a.call(t,r)&&!l.hasOwnProperty(r)&&(o[r]=t[r]);if(e&&e.defaultProps)for(r in t=e.defaultProps)void 0===o[r]&&(o[r]=t[r]);return{$$typeof:i,type:e,key:c,ref:d,props:o,_owner:s.current}}t.Fragment=o,t.jsx=c,t.jsxs=c},51268:(e,t,n)=>{var r=n(35428),i=n(47574),o=n(56832),a=o&&o.isTypedArray,s=a?i(a):r;e.exports=s},51627:(e,t,n)=>{"use strict";var r=n(50805).Zz;"undefined"!==typeof window&&window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__&&window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__,"undefined"!==typeof window&&window.__REDUX_DEVTOOLS_EXTENSION__&&window.__REDUX_DEVTOOLS_EXTENSION__},51720:(e,t,n)=>{"use strict";var r=n(24994);t.A=void 0;var i=r(n(40039)),o=n(70579);t.A=(0,i.default)((0,o.jsx)("path",{d:"M17 11V3H7v4H3v14h8v-4h2v4h8V11zM7 19H5v-2h2zm0-4H5v-2h2zm0-4H5V9h2zm4 4H9v-2h2zm0-4H9V9h2zm0-4H9V5h2zm4 8h-2v-2h2zm0-4h-2V9h2zm0-4h-2V5h2zm4 12h-2v-2h2zm0-4h-2v-2h2z"}),"Apartment")},51869:(e,t,n)=>{"use strict";var r=n(75494);n(42734).default,n(60225).default,t.Ay=r.default},51937:(e,t,n)=>{"use strict";var r=n(24994);t.A=void 0;var i=r(n(40039)),o=n(70579);t.A=(0,i.default)((0,o.jsx)("path",{d:"M6.23 20.23 8 22l10-10L8 2 6.23 3.77 14.46 12z"}),"ArrowForwardIosSharp")},51946:(e,t,n)=>{var r=n(61340);e.exports=function(e){return r(this.__data__,e)>-1}},52074:e=>{e.exports=function(e){var t=-1,n=Array(e.size);return e.forEach(function(e){n[++t]=e}),n}},52177:(e,t,n)=>{"use strict";var r=n(24994);t.A=void 0;var i=r(n(40039)),o=n(70579);t.A=(0,i.default)((0,o.jsx)("path",{d:"M12 12c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4m0 2c-2.67 0-8 1.34-8 4v2h16v-2c0-2.66-5.33-4-8-4"}),"Person")},52587:e=>{e.exports=function(e,t){for(var n=-1,r=null==e?0:e.length;++n<r;)if(t(e[n],n,e))return!0;return!1}},52718:e=>{"use strict";var t=function(e){return function(e){return!!e&&"object"===typeof e}(e)&&!function(e){var t=Object.prototype.toString.call(e);return"[object RegExp]"===t||"[object Date]"===t||function(e){return e.$$typeof===n}(e)}(e)};var n="function"===typeof Symbol&&Symbol.for?Symbol.for("react.element"):60103;function r(e,t){return!1!==t.clone&&t.isMergeableObject(e)?l((n=e,Array.isArray(n)?[]:{}),e,t):e;var n}function i(e,t,n){return e.concat(t).map(function(e){return r(e,n)})}function o(e){return Object.keys(e).concat(function(e){return Object.getOwnPropertySymbols?Object.getOwnPropertySymbols(e).filter(function(t){return Object.propertyIsEnumerable.call(e,t)}):[]}(e))}function a(e,t){try{return t in e}catch(n){return!1}}function s(e,t,n){var i={};return n.isMergeableObject(e)&&o(e).forEach(function(t){i[t]=r(e[t],n)}),o(t).forEach(function(o){(function(e,t){return a(e,t)&&!(Object.hasOwnProperty.call(e,t)&&Object.propertyIsEnumerable.call(e,t))})(e,o)||(a(e,o)&&n.isMergeableObject(t[o])?i[o]=function(e,t){if(!t.customMerge)return l;var n=t.customMerge(e);return"function"===typeof n?n:l}(o,n)(e[o],t[o],n):i[o]=r(t[o],n))}),i}function l(e,n,o){(o=o||{}).arrayMerge=o.arrayMerge||i,o.isMergeableObject=o.isMergeableObject||t,o.cloneUnlessOtherwiseSpecified=r;var a=Array.isArray(n);return a===Array.isArray(e)?a?o.arrayMerge(e,n,o):s(e,n,o):r(n,o)}l.all=function(e,t){if(!Array.isArray(e))throw new Error("first argument should be an array");return e.reduce(function(e,n){return l(e,n,t)},{})};var c=l;e.exports=c},52866:(e,t,n)=>{var r=n(52969);e.exports=function(e){return function(t){return r(t,e)}}},52969:(e,t,n)=>{var r=n(35324),i=n(70914);e.exports=function(e,t){for(var n=0,o=(t=r(t,e)).length;null!=e&&n<o;)e=e[i(t[n++])];return n&&n==o?e:void 0}},52989:(e,t,n)=>{"use strict";var r=n(86267),i=n(12121),o=n(82702),a=n(89335),s=n(37289),l={"Content-Type":"application/x-www-form-urlencoded"};function c(e,t){!r.isUndefined(e)&&r.isUndefined(e["Content-Type"])&&(e["Content-Type"]=t)}var d={transitional:a,adapter:function(){var e;return("undefined"!==typeof XMLHttpRequest||"undefined"!==typeof process&&"[object process]"===Object.prototype.toString.call(process))&&(e=n(71989)),e}(),transformRequest:[function(e,t){if(i(t,"Accept"),i(t,"Content-Type"),r.isFormData(e)||r.isArrayBuffer(e)||r.isBuffer(e)||r.isStream(e)||r.isFile(e)||r.isBlob(e))return e;if(r.isArrayBufferView(e))return e.buffer;if(r.isURLSearchParams(e))return c(t,"application/x-www-form-urlencoded;charset=utf-8"),e.toString();var n,o=r.isObject(e),a=t&&t["Content-Type"];if((n=r.isFileList(e))||o&&"multipart/form-data"===a){var l=this.env&&this.env.FormData;return s(n?{"files[]":e}:e,l&&new l)}return o||"application/json"===a?(c(t,"application/json"),function(e,t,n){if(r.isString(e))try{return(t||JSON.parse)(e),r.trim(e)}catch(i){if("SyntaxError"!==i.name)throw i}return(n||JSON.stringify)(e)}(e)):e}],transformResponse:[function(e){var t=this.transitional||d.transitional,n=t&&t.silentJSONParsing,i=t&&t.forcedJSONParsing,a=!n&&"json"===this.responseType;if(a||i&&r.isString(e)&&e.length)try{return JSON.parse(e)}catch(s){if(a){if("SyntaxError"===s.name)throw o.from(s,o.ERR_BAD_RESPONSE,this,null,this.response);throw s}}return e}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:n(73055)},validateStatus:function(e){return e>=200&&e<300},headers:{common:{Accept:"application/json, text/plain, */*"}}};r.forEach(["delete","get","head"],function(e){d.headers[e]={}}),r.forEach(["post","put","patch"],function(e){d.headers[e]=r.merge(l)}),e.exports=d},53366:(e,t,n)=>{var r=n(27894),i=n(99057);e.exports=function(e,t){return null!=e&&i(e,t,r)}},53536:function(e,t,n){var r;e=n.nmd(e),function(){var i,o="Expected a function",a="__lodash_hash_undefined__",s="__lodash_placeholder__",l=16,c=32,d=64,u=128,p=256,h=1/0,m=9007199254740991,f=NaN,g=4294967295,v=[["ary",u],["bind",1],["bindKey",2],["curry",8],["curryRight",l],["flip",512],["partial",c],["partialRight",d],["rearg",p]],x="[object Arguments]",y="[object Array]",b="[object Boolean]",j="[object Date]",_="[object Error]",C="[object Function]",w="[object GeneratorFunction]",S="[object Map]",A="[object Number]",k="[object Object]",T="[object Promise]",E="[object RegExp]",M="[object Set]",O="[object String]",R="[object Symbol]",P="[object WeakMap]",D="[object ArrayBuffer]",N="[object DataView]",L="[object Float32Array]",I="[object Float64Array]",F="[object Int8Array]",$="[object Int16Array]",B="[object Int32Array]",z="[object Uint8Array]",H="[object Uint8ClampedArray]",W="[object Uint16Array]",U="[object Uint32Array]",V=/\b__p \+= '';/g,G=/\b(__p \+=) '' \+/g,q=/(__e\(.*?\)|\b__t\)) \+\n'';/g,Y=/&(?:amp|lt|gt|quot|#39);/g,Z=/[&<>"']/g,K=RegExp(Y.source),X=RegExp(Z.source),Q=/<%-([\s\S]+?)%>/g,J=/<%([\s\S]+?)%>/g,ee=/<%=([\s\S]+?)%>/g,te=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,ne=/^\w*$/,re=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,ie=/[\\^$.*+?()[\]{}|]/g,oe=RegExp(ie.source),ae=/^\s+/,se=/\s/,le=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,ce=/\{\n\/\* \[wrapped with (.+)\] \*/,de=/,? & /,ue=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,pe=/[()=,{}\[\]\/\s]/,he=/\\(\\)?/g,me=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,fe=/\w*$/,ge=/^[-+]0x[0-9a-f]+$/i,ve=/^0b[01]+$/i,xe=/^\[object .+?Constructor\]$/,ye=/^0o[0-7]+$/i,be=/^(?:0|[1-9]\d*)$/,je=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,_e=/($^)/,Ce=/['\n\r\u2028\u2029\\]/g,we="\\ud800-\\udfff",Se="\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff",Ae="\\u2700-\\u27bf",ke="a-z\\xdf-\\xf6\\xf8-\\xff",Te="A-Z\\xc0-\\xd6\\xd8-\\xde",Ee="\\ufe0e\\ufe0f",Me="\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2000-\\u206f \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",Oe="['\u2019]",Re="["+we+"]",Pe="["+Me+"]",De="["+Se+"]",Ne="\\d+",Le="["+Ae+"]",Ie="["+ke+"]",Fe="[^"+we+Me+Ne+Ae+ke+Te+"]",$e="\\ud83c[\\udffb-\\udfff]",Be="[^"+we+"]",ze="(?:\\ud83c[\\udde6-\\uddff]){2}",He="[\\ud800-\\udbff][\\udc00-\\udfff]",We="["+Te+"]",Ue="\\u200d",Ve="(?:"+Ie+"|"+Fe+")",Ge="(?:"+We+"|"+Fe+")",qe="(?:['\u2019](?:d|ll|m|re|s|t|ve))?",Ye="(?:['\u2019](?:D|LL|M|RE|S|T|VE))?",Ze="(?:"+De+"|"+$e+")"+"?",Ke="["+Ee+"]?",Xe=Ke+Ze+("(?:"+Ue+"(?:"+[Be,ze,He].join("|")+")"+Ke+Ze+")*"),Qe="(?:"+[Le,ze,He].join("|")+")"+Xe,Je="(?:"+[Be+De+"?",De,ze,He,Re].join("|")+")",et=RegExp(Oe,"g"),tt=RegExp(De,"g"),nt=RegExp($e+"(?="+$e+")|"+Je+Xe,"g"),rt=RegExp([We+"?"+Ie+"+"+qe+"(?="+[Pe,We,"$"].join("|")+")",Ge+"+"+Ye+"(?="+[Pe,We+Ve,"$"].join("|")+")",We+"?"+Ve+"+"+qe,We+"+"+Ye,"\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])","\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",Ne,Qe].join("|"),"g"),it=RegExp("["+Ue+we+Se+Ee+"]"),ot=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,at=["Array","Buffer","DataView","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Map","Math","Object","Promise","RegExp","Set","String","Symbol","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap","_","clearTimeout","isFinite","parseInt","setTimeout"],st=-1,lt={};lt[L]=lt[I]=lt[F]=lt[$]=lt[B]=lt[z]=lt[H]=lt[W]=lt[U]=!0,lt[x]=lt[y]=lt[D]=lt[b]=lt[N]=lt[j]=lt[_]=lt[C]=lt[S]=lt[A]=lt[k]=lt[E]=lt[M]=lt[O]=lt[P]=!1;var ct={};ct[x]=ct[y]=ct[D]=ct[N]=ct[b]=ct[j]=ct[L]=ct[I]=ct[F]=ct[$]=ct[B]=ct[S]=ct[A]=ct[k]=ct[E]=ct[M]=ct[O]=ct[R]=ct[z]=ct[H]=ct[W]=ct[U]=!0,ct[_]=ct[C]=ct[P]=!1;var dt={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},ut=parseFloat,pt=parseInt,ht="object"==typeof n.g&&n.g&&n.g.Object===Object&&n.g,mt="object"==typeof self&&self&&self.Object===Object&&self,ft=ht||mt||Function("return this")(),gt=t&&!t.nodeType&&t,vt=gt&&e&&!e.nodeType&&e,xt=vt&&vt.exports===gt,yt=xt&&ht.process,bt=function(){try{var e=vt&&vt.require&&vt.require("util").types;return e||yt&&yt.binding&&yt.binding("util")}catch(t){}}(),jt=bt&&bt.isArrayBuffer,_t=bt&&bt.isDate,Ct=bt&&bt.isMap,wt=bt&&bt.isRegExp,St=bt&&bt.isSet,At=bt&&bt.isTypedArray;function kt(e,t,n){switch(n.length){case 0:return e.call(t);case 1:return e.call(t,n[0]);case 2:return e.call(t,n[0],n[1]);case 3:return e.call(t,n[0],n[1],n[2])}return e.apply(t,n)}function Tt(e,t,n,r){for(var i=-1,o=null==e?0:e.length;++i<o;){var a=e[i];t(r,a,n(a),e)}return r}function Et(e,t){for(var n=-1,r=null==e?0:e.length;++n<r&&!1!==t(e[n],n,e););return e}function Mt(e,t){for(var n=null==e?0:e.length;n--&&!1!==t(e[n],n,e););return e}function Ot(e,t){for(var n=-1,r=null==e?0:e.length;++n<r;)if(!t(e[n],n,e))return!1;return!0}function Rt(e,t){for(var n=-1,r=null==e?0:e.length,i=0,o=[];++n<r;){var a=e[n];t(a,n,e)&&(o[i++]=a)}return o}function Pt(e,t){return!!(null==e?0:e.length)&&Wt(e,t,0)>-1}function Dt(e,t,n){for(var r=-1,i=null==e?0:e.length;++r<i;)if(n(t,e[r]))return!0;return!1}function Nt(e,t){for(var n=-1,r=null==e?0:e.length,i=Array(r);++n<r;)i[n]=t(e[n],n,e);return i}function Lt(e,t){for(var n=-1,r=t.length,i=e.length;++n<r;)e[i+n]=t[n];return e}function It(e,t,n,r){var i=-1,o=null==e?0:e.length;for(r&&o&&(n=e[++i]);++i<o;)n=t(n,e[i],i,e);return n}function Ft(e,t,n,r){var i=null==e?0:e.length;for(r&&i&&(n=e[--i]);i--;)n=t(n,e[i],i,e);return n}function $t(e,t){for(var n=-1,r=null==e?0:e.length;++n<r;)if(t(e[n],n,e))return!0;return!1}var Bt=qt("length");function zt(e,t,n){var r;return n(e,function(e,n,i){if(t(e,n,i))return r=n,!1}),r}function Ht(e,t,n,r){for(var i=e.length,o=n+(r?1:-1);r?o--:++o<i;)if(t(e[o],o,e))return o;return-1}function Wt(e,t,n){return t===t?function(e,t,n){var r=n-1,i=e.length;for(;++r<i;)if(e[r]===t)return r;return-1}(e,t,n):Ht(e,Vt,n)}function Ut(e,t,n,r){for(var i=n-1,o=e.length;++i<o;)if(r(e[i],t))return i;return-1}function Vt(e){return e!==e}function Gt(e,t){var n=null==e?0:e.length;return n?Kt(e,t)/n:f}function qt(e){return function(t){return null==t?i:t[e]}}function Yt(e){return function(t){return null==e?i:e[t]}}function Zt(e,t,n,r,i){return i(e,function(e,i,o){n=r?(r=!1,e):t(n,e,i,o)}),n}function Kt(e,t){for(var n,r=-1,o=e.length;++r<o;){var a=t(e[r]);a!==i&&(n=n===i?a:n+a)}return n}function Xt(e,t){for(var n=-1,r=Array(e);++n<e;)r[n]=t(n);return r}function Qt(e){return e?e.slice(0,gn(e)+1).replace(ae,""):e}function Jt(e){return function(t){return e(t)}}function en(e,t){return Nt(t,function(t){return e[t]})}function tn(e,t){return e.has(t)}function nn(e,t){for(var n=-1,r=e.length;++n<r&&Wt(t,e[n],0)>-1;);return n}function rn(e,t){for(var n=e.length;n--&&Wt(t,e[n],0)>-1;);return n}var on=Yt({"\xc0":"A","\xc1":"A","\xc2":"A","\xc3":"A","\xc4":"A","\xc5":"A","\xe0":"a","\xe1":"a","\xe2":"a","\xe3":"a","\xe4":"a","\xe5":"a","\xc7":"C","\xe7":"c","\xd0":"D","\xf0":"d","\xc8":"E","\xc9":"E","\xca":"E","\xcb":"E","\xe8":"e","\xe9":"e","\xea":"e","\xeb":"e","\xcc":"I","\xcd":"I","\xce":"I","\xcf":"I","\xec":"i","\xed":"i","\xee":"i","\xef":"i","\xd1":"N","\xf1":"n","\xd2":"O","\xd3":"O","\xd4":"O","\xd5":"O","\xd6":"O","\xd8":"O","\xf2":"o","\xf3":"o","\xf4":"o","\xf5":"o","\xf6":"o","\xf8":"o","\xd9":"U","\xda":"U","\xdb":"U","\xdc":"U","\xf9":"u","\xfa":"u","\xfb":"u","\xfc":"u","\xdd":"Y","\xfd":"y","\xff":"y","\xc6":"Ae","\xe6":"ae","\xde":"Th","\xfe":"th","\xdf":"ss","\u0100":"A","\u0102":"A","\u0104":"A","\u0101":"a","\u0103":"a","\u0105":"a","\u0106":"C","\u0108":"C","\u010a":"C","\u010c":"C","\u0107":"c","\u0109":"c","\u010b":"c","\u010d":"c","\u010e":"D","\u0110":"D","\u010f":"d","\u0111":"d","\u0112":"E","\u0114":"E","\u0116":"E","\u0118":"E","\u011a":"E","\u0113":"e","\u0115":"e","\u0117":"e","\u0119":"e","\u011b":"e","\u011c":"G","\u011e":"G","\u0120":"G","\u0122":"G","\u011d":"g","\u011f":"g","\u0121":"g","\u0123":"g","\u0124":"H","\u0126":"H","\u0125":"h","\u0127":"h","\u0128":"I","\u012a":"I","\u012c":"I","\u012e":"I","\u0130":"I","\u0129":"i","\u012b":"i","\u012d":"i","\u012f":"i","\u0131":"i","\u0134":"J","\u0135":"j","\u0136":"K","\u0137":"k","\u0138":"k","\u0139":"L","\u013b":"L","\u013d":"L","\u013f":"L","\u0141":"L","\u013a":"l","\u013c":"l","\u013e":"l","\u0140":"l","\u0142":"l","\u0143":"N","\u0145":"N","\u0147":"N","\u014a":"N","\u0144":"n","\u0146":"n","\u0148":"n","\u014b":"n","\u014c":"O","\u014e":"O","\u0150":"O","\u014d":"o","\u014f":"o","\u0151":"o","\u0154":"R","\u0156":"R","\u0158":"R","\u0155":"r","\u0157":"r","\u0159":"r","\u015a":"S","\u015c":"S","\u015e":"S","\u0160":"S","\u015b":"s","\u015d":"s","\u015f":"s","\u0161":"s","\u0162":"T","\u0164":"T","\u0166":"T","\u0163":"t","\u0165":"t","\u0167":"t","\u0168":"U","\u016a":"U","\u016c":"U","\u016e":"U","\u0170":"U","\u0172":"U","\u0169":"u","\u016b":"u","\u016d":"u","\u016f":"u","\u0171":"u","\u0173":"u","\u0174":"W","\u0175":"w","\u0176":"Y","\u0177":"y","\u0178":"Y","\u0179":"Z","\u017b":"Z","\u017d":"Z","\u017a":"z","\u017c":"z","\u017e":"z","\u0132":"IJ","\u0133":"ij","\u0152":"Oe","\u0153":"oe","\u0149":"'n","\u017f":"s"}),an=Yt({"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"});function sn(e){return"\\"+dt[e]}function ln(e){return it.test(e)}function cn(e){var t=-1,n=Array(e.size);return e.forEach(function(e,r){n[++t]=[r,e]}),n}function dn(e,t){return function(n){return e(t(n))}}function un(e,t){for(var n=-1,r=e.length,i=0,o=[];++n<r;){var a=e[n];a!==t&&a!==s||(e[n]=s,o[i++]=n)}return o}function pn(e){var t=-1,n=Array(e.size);return e.forEach(function(e){n[++t]=e}),n}function hn(e){var t=-1,n=Array(e.size);return e.forEach(function(e){n[++t]=[e,e]}),n}function mn(e){return ln(e)?function(e){var t=nt.lastIndex=0;for(;nt.test(e);)++t;return t}(e):Bt(e)}function fn(e){return ln(e)?function(e){return e.match(nt)||[]}(e):function(e){return e.split("")}(e)}function gn(e){for(var t=e.length;t--&&se.test(e.charAt(t)););return t}var vn=Yt({"&amp;":"&","&lt;":"<","&gt;":">","&quot;":'"',"&#39;":"'"});var xn=function e(t){var n=(t=null==t?ft:xn.defaults(ft.Object(),t,xn.pick(ft,at))).Array,r=t.Date,se=t.Error,we=t.Function,Se=t.Math,Ae=t.Object,ke=t.RegExp,Te=t.String,Ee=t.TypeError,Me=n.prototype,Oe=we.prototype,Re=Ae.prototype,Pe=t["__core-js_shared__"],De=Oe.toString,Ne=Re.hasOwnProperty,Le=0,Ie=function(){var e=/[^.]+$/.exec(Pe&&Pe.keys&&Pe.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}(),Fe=Re.toString,$e=De.call(Ae),Be=ft._,ze=ke("^"+De.call(Ne).replace(ie,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),He=xt?t.Buffer:i,We=t.Symbol,Ue=t.Uint8Array,Ve=He?He.allocUnsafe:i,Ge=dn(Ae.getPrototypeOf,Ae),qe=Ae.create,Ye=Re.propertyIsEnumerable,Ze=Me.splice,Ke=We?We.isConcatSpreadable:i,Xe=We?We.iterator:i,Qe=We?We.toStringTag:i,Je=function(){try{var e=po(Ae,"defineProperty");return e({},"",{}),e}catch(t){}}(),nt=t.clearTimeout!==ft.clearTimeout&&t.clearTimeout,it=r&&r.now!==ft.Date.now&&r.now,dt=t.setTimeout!==ft.setTimeout&&t.setTimeout,ht=Se.ceil,mt=Se.floor,gt=Ae.getOwnPropertySymbols,vt=He?He.isBuffer:i,yt=t.isFinite,bt=Me.join,Bt=dn(Ae.keys,Ae),Yt=Se.max,yn=Se.min,bn=r.now,jn=t.parseInt,_n=Se.random,Cn=Me.reverse,wn=po(t,"DataView"),Sn=po(t,"Map"),An=po(t,"Promise"),kn=po(t,"Set"),Tn=po(t,"WeakMap"),En=po(Ae,"create"),Mn=Tn&&new Tn,On={},Rn=Fo(wn),Pn=Fo(Sn),Dn=Fo(An),Nn=Fo(kn),Ln=Fo(Tn),In=We?We.prototype:i,Fn=In?In.valueOf:i,$n=In?In.toString:i;function Bn(e){if(ts(e)&&!Ua(e)&&!(e instanceof Un)){if(e instanceof Wn)return e;if(Ne.call(e,"__wrapped__"))return $o(e)}return new Wn(e)}var zn=function(){function e(){}return function(t){if(!es(t))return{};if(qe)return qe(t);e.prototype=t;var n=new e;return e.prototype=i,n}}();function Hn(){}function Wn(e,t){this.__wrapped__=e,this.__actions__=[],this.__chain__=!!t,this.__index__=0,this.__values__=i}function Un(e){this.__wrapped__=e,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=g,this.__views__=[]}function Vn(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function Gn(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function qn(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function Yn(e){var t=-1,n=null==e?0:e.length;for(this.__data__=new qn;++t<n;)this.add(e[t])}function Zn(e){var t=this.__data__=new Gn(e);this.size=t.size}function Kn(e,t){var n=Ua(e),r=!n&&Wa(e),i=!n&&!r&&Ya(e),o=!n&&!r&&!i&&cs(e),a=n||r||i||o,s=a?Xt(e.length,Te):[],l=s.length;for(var c in e)!t&&!Ne.call(e,c)||a&&("length"==c||i&&("offset"==c||"parent"==c)||o&&("buffer"==c||"byteLength"==c||"byteOffset"==c)||yo(c,l))||s.push(c);return s}function Xn(e){var t=e.length;return t?e[Yr(0,t-1)]:i}function Qn(e,t){return No(Ei(e),sr(t,0,e.length))}function Jn(e){return No(Ei(e))}function er(e,t,n){(n!==i&&!Ba(e[t],n)||n===i&&!(t in e))&&or(e,t,n)}function tr(e,t,n){var r=e[t];Ne.call(e,t)&&Ba(r,n)&&(n!==i||t in e)||or(e,t,n)}function nr(e,t){for(var n=e.length;n--;)if(Ba(e[n][0],t))return n;return-1}function rr(e,t,n,r){return pr(e,function(e,i,o){t(r,e,n(e),o)}),r}function ir(e,t){return e&&Mi(t,Os(t),e)}function or(e,t,n){"__proto__"==t&&Je?Je(e,t,{configurable:!0,enumerable:!0,value:n,writable:!0}):e[t]=n}function ar(e,t){for(var r=-1,o=t.length,a=n(o),s=null==e;++r<o;)a[r]=s?i:As(e,t[r]);return a}function sr(e,t,n){return e===e&&(n!==i&&(e=e<=n?e:n),t!==i&&(e=e>=t?e:t)),e}function lr(e,t,n,r,o,a){var s,l=1&t,c=2&t,d=4&t;if(n&&(s=o?n(e,r,o,a):n(e)),s!==i)return s;if(!es(e))return e;var u=Ua(e);if(u){if(s=function(e){var t=e.length,n=new e.constructor(t);t&&"string"==typeof e[0]&&Ne.call(e,"index")&&(n.index=e.index,n.input=e.input);return n}(e),!l)return Ei(e,s)}else{var p=fo(e),h=p==C||p==w;if(Ya(e))return Ci(e,l);if(p==k||p==x||h&&!o){if(s=c||h?{}:vo(e),!l)return c?function(e,t){return Mi(e,mo(e),t)}(e,function(e,t){return e&&Mi(t,Rs(t),e)}(s,e)):function(e,t){return Mi(e,ho(e),t)}(e,ir(s,e))}else{if(!ct[p])return o?e:{};s=function(e,t,n){var r=e.constructor;switch(t){case D:return wi(e);case b:case j:return new r(+e);case N:return function(e,t){var n=t?wi(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.byteLength)}(e,n);case L:case I:case F:case $:case B:case z:case H:case W:case U:return Si(e,n);case S:return new r;case A:case O:return new r(e);case E:return function(e){var t=new e.constructor(e.source,fe.exec(e));return t.lastIndex=e.lastIndex,t}(e);case M:return new r;case R:return i=e,Fn?Ae(Fn.call(i)):{}}var i}(e,p,l)}}a||(a=new Zn);var m=a.get(e);if(m)return m;a.set(e,s),as(e)?e.forEach(function(r){s.add(lr(r,t,n,r,e,a))}):ns(e)&&e.forEach(function(r,i){s.set(i,lr(r,t,n,i,e,a))});var f=u?i:(d?c?io:ro:c?Rs:Os)(e);return Et(f||e,function(r,i){f&&(r=e[i=r]),tr(s,i,lr(r,t,n,i,e,a))}),s}function cr(e,t,n){var r=n.length;if(null==e)return!r;for(e=Ae(e);r--;){var o=n[r],a=t[o],s=e[o];if(s===i&&!(o in e)||!a(s))return!1}return!0}function dr(e,t,n){if("function"!=typeof e)throw new Ee(o);return Oo(function(){e.apply(i,n)},t)}function ur(e,t,n,r){var i=-1,o=Pt,a=!0,s=e.length,l=[],c=t.length;if(!s)return l;n&&(t=Nt(t,Jt(n))),r?(o=Dt,a=!1):t.length>=200&&(o=tn,a=!1,t=new Yn(t));e:for(;++i<s;){var d=e[i],u=null==n?d:n(d);if(d=r||0!==d?d:0,a&&u===u){for(var p=c;p--;)if(t[p]===u)continue e;l.push(d)}else o(t,u,r)||l.push(d)}return l}Bn.templateSettings={escape:Q,evaluate:J,interpolate:ee,variable:"",imports:{_:Bn}},Bn.prototype=Hn.prototype,Bn.prototype.constructor=Bn,Wn.prototype=zn(Hn.prototype),Wn.prototype.constructor=Wn,Un.prototype=zn(Hn.prototype),Un.prototype.constructor=Un,Vn.prototype.clear=function(){this.__data__=En?En(null):{},this.size=0},Vn.prototype.delete=function(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t},Vn.prototype.get=function(e){var t=this.__data__;if(En){var n=t[e];return n===a?i:n}return Ne.call(t,e)?t[e]:i},Vn.prototype.has=function(e){var t=this.__data__;return En?t[e]!==i:Ne.call(t,e)},Vn.prototype.set=function(e,t){var n=this.__data__;return this.size+=this.has(e)?0:1,n[e]=En&&t===i?a:t,this},Gn.prototype.clear=function(){this.__data__=[],this.size=0},Gn.prototype.delete=function(e){var t=this.__data__,n=nr(t,e);return!(n<0)&&(n==t.length-1?t.pop():Ze.call(t,n,1),--this.size,!0)},Gn.prototype.get=function(e){var t=this.__data__,n=nr(t,e);return n<0?i:t[n][1]},Gn.prototype.has=function(e){return nr(this.__data__,e)>-1},Gn.prototype.set=function(e,t){var n=this.__data__,r=nr(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this},qn.prototype.clear=function(){this.size=0,this.__data__={hash:new Vn,map:new(Sn||Gn),string:new Vn}},qn.prototype.delete=function(e){var t=co(this,e).delete(e);return this.size-=t?1:0,t},qn.prototype.get=function(e){return co(this,e).get(e)},qn.prototype.has=function(e){return co(this,e).has(e)},qn.prototype.set=function(e,t){var n=co(this,e),r=n.size;return n.set(e,t),this.size+=n.size==r?0:1,this},Yn.prototype.add=Yn.prototype.push=function(e){return this.__data__.set(e,a),this},Yn.prototype.has=function(e){return this.__data__.has(e)},Zn.prototype.clear=function(){this.__data__=new Gn,this.size=0},Zn.prototype.delete=function(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n},Zn.prototype.get=function(e){return this.__data__.get(e)},Zn.prototype.has=function(e){return this.__data__.has(e)},Zn.prototype.set=function(e,t){var n=this.__data__;if(n instanceof Gn){var r=n.__data__;if(!Sn||r.length<199)return r.push([e,t]),this.size=++n.size,this;n=this.__data__=new qn(r)}return n.set(e,t),this.size=n.size,this};var pr=Pi(br),hr=Pi(jr,!0);function mr(e,t){var n=!0;return pr(e,function(e,r,i){return n=!!t(e,r,i)}),n}function fr(e,t,n){for(var r=-1,o=e.length;++r<o;){var a=e[r],s=t(a);if(null!=s&&(l===i?s===s&&!ls(s):n(s,l)))var l=s,c=a}return c}function gr(e,t){var n=[];return pr(e,function(e,r,i){t(e,r,i)&&n.push(e)}),n}function vr(e,t,n,r,i){var o=-1,a=e.length;for(n||(n=xo),i||(i=[]);++o<a;){var s=e[o];t>0&&n(s)?t>1?vr(s,t-1,n,r,i):Lt(i,s):r||(i[i.length]=s)}return i}var xr=Di(),yr=Di(!0);function br(e,t){return e&&xr(e,t,Os)}function jr(e,t){return e&&yr(e,t,Os)}function _r(e,t){return Rt(t,function(t){return Xa(e[t])})}function Cr(e,t){for(var n=0,r=(t=yi(t,e)).length;null!=e&&n<r;)e=e[Io(t[n++])];return n&&n==r?e:i}function wr(e,t,n){var r=t(e);return Ua(e)?r:Lt(r,n(e))}function Sr(e){return null==e?e===i?"[object Undefined]":"[object Null]":Qe&&Qe in Ae(e)?function(e){var t=Ne.call(e,Qe),n=e[Qe];try{e[Qe]=i;var r=!0}catch(a){}var o=Fe.call(e);r&&(t?e[Qe]=n:delete e[Qe]);return o}(e):function(e){return Fe.call(e)}(e)}function Ar(e,t){return e>t}function kr(e,t){return null!=e&&Ne.call(e,t)}function Tr(e,t){return null!=e&&t in Ae(e)}function Er(e,t,r){for(var o=r?Dt:Pt,a=e[0].length,s=e.length,l=s,c=n(s),d=1/0,u=[];l--;){var p=e[l];l&&t&&(p=Nt(p,Jt(t))),d=yn(p.length,d),c[l]=!r&&(t||a>=120&&p.length>=120)?new Yn(l&&p):i}p=e[0];var h=-1,m=c[0];e:for(;++h<a&&u.length<d;){var f=p[h],g=t?t(f):f;if(f=r||0!==f?f:0,!(m?tn(m,g):o(u,g,r))){for(l=s;--l;){var v=c[l];if(!(v?tn(v,g):o(e[l],g,r)))continue e}m&&m.push(g),u.push(f)}}return u}function Mr(e,t,n){var r=null==(e=To(e,t=yi(t,e)))?e:e[Io(Ko(t))];return null==r?i:kt(r,e,n)}function Or(e){return ts(e)&&Sr(e)==x}function Rr(e,t,n,r,o){return e===t||(null==e||null==t||!ts(e)&&!ts(t)?e!==e&&t!==t:function(e,t,n,r,o,a){var s=Ua(e),l=Ua(t),c=s?y:fo(e),d=l?y:fo(t),u=(c=c==x?k:c)==k,p=(d=d==x?k:d)==k,h=c==d;if(h&&Ya(e)){if(!Ya(t))return!1;s=!0,u=!1}if(h&&!u)return a||(a=new Zn),s||cs(e)?to(e,t,n,r,o,a):function(e,t,n,r,i,o,a){switch(n){case N:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case D:return!(e.byteLength!=t.byteLength||!o(new Ue(e),new Ue(t)));case b:case j:case A:return Ba(+e,+t);case _:return e.name==t.name&&e.message==t.message;case E:case O:return e==t+"";case S:var s=cn;case M:var l=1&r;if(s||(s=pn),e.size!=t.size&&!l)return!1;var c=a.get(e);if(c)return c==t;r|=2,a.set(e,t);var d=to(s(e),s(t),r,i,o,a);return a.delete(e),d;case R:if(Fn)return Fn.call(e)==Fn.call(t)}return!1}(e,t,c,n,r,o,a);if(!(1&n)){var m=u&&Ne.call(e,"__wrapped__"),f=p&&Ne.call(t,"__wrapped__");if(m||f){var g=m?e.value():e,v=f?t.value():t;return a||(a=new Zn),o(g,v,n,r,a)}}if(!h)return!1;return a||(a=new Zn),function(e,t,n,r,o,a){var s=1&n,l=ro(e),c=l.length,d=ro(t),u=d.length;if(c!=u&&!s)return!1;var p=c;for(;p--;){var h=l[p];if(!(s?h in t:Ne.call(t,h)))return!1}var m=a.get(e),f=a.get(t);if(m&&f)return m==t&&f==e;var g=!0;a.set(e,t),a.set(t,e);var v=s;for(;++p<c;){var x=e[h=l[p]],y=t[h];if(r)var b=s?r(y,x,h,t,e,a):r(x,y,h,e,t,a);if(!(b===i?x===y||o(x,y,n,r,a):b)){g=!1;break}v||(v="constructor"==h)}if(g&&!v){var j=e.constructor,_=t.constructor;j==_||!("constructor"in e)||!("constructor"in t)||"function"==typeof j&&j instanceof j&&"function"==typeof _&&_ instanceof _||(g=!1)}return a.delete(e),a.delete(t),g}(e,t,n,r,o,a)}(e,t,n,r,Rr,o))}function Pr(e,t,n,r){var o=n.length,a=o,s=!r;if(null==e)return!a;for(e=Ae(e);o--;){var l=n[o];if(s&&l[2]?l[1]!==e[l[0]]:!(l[0]in e))return!1}for(;++o<a;){var c=(l=n[o])[0],d=e[c],u=l[1];if(s&&l[2]){if(d===i&&!(c in e))return!1}else{var p=new Zn;if(r)var h=r(d,u,c,e,t,p);if(!(h===i?Rr(u,d,3,r,p):h))return!1}}return!0}function Dr(e){return!(!es(e)||(t=e,Ie&&Ie in t))&&(Xa(e)?ze:xe).test(Fo(e));var t}function Nr(e){return"function"==typeof e?e:null==e?rl:"object"==typeof e?Ua(e)?zr(e[0],e[1]):Br(e):pl(e)}function Lr(e){if(!wo(e))return Bt(e);var t=[];for(var n in Ae(e))Ne.call(e,n)&&"constructor"!=n&&t.push(n);return t}function Ir(e){if(!es(e))return function(e){var t=[];if(null!=e)for(var n in Ae(e))t.push(n);return t}(e);var t=wo(e),n=[];for(var r in e)("constructor"!=r||!t&&Ne.call(e,r))&&n.push(r);return n}function Fr(e,t){return e<t}function $r(e,t){var r=-1,i=Ga(e)?n(e.length):[];return pr(e,function(e,n,o){i[++r]=t(e,n,o)}),i}function Br(e){var t=uo(e);return 1==t.length&&t[0][2]?Ao(t[0][0],t[0][1]):function(n){return n===e||Pr(n,e,t)}}function zr(e,t){return jo(e)&&So(t)?Ao(Io(e),t):function(n){var r=As(n,e);return r===i&&r===t?ks(n,e):Rr(t,r,3)}}function Hr(e,t,n,r,o){e!==t&&xr(t,function(a,s){if(o||(o=new Zn),es(a))!function(e,t,n,r,o,a,s){var l=Eo(e,n),c=Eo(t,n),d=s.get(c);if(d)return void er(e,n,d);var u=a?a(l,c,n+"",e,t,s):i,p=u===i;if(p){var h=Ua(c),m=!h&&Ya(c),f=!h&&!m&&cs(c);u=c,h||m||f?Ua(l)?u=l:qa(l)?u=Ei(l):m?(p=!1,u=Ci(c,!0)):f?(p=!1,u=Si(c,!0)):u=[]:is(c)||Wa(c)?(u=l,Wa(l)?u=vs(l):es(l)&&!Xa(l)||(u=vo(c))):p=!1}p&&(s.set(c,u),o(u,c,r,a,s),s.delete(c));er(e,n,u)}(e,t,s,n,Hr,r,o);else{var l=r?r(Eo(e,s),a,s+"",e,t,o):i;l===i&&(l=a),er(e,s,l)}},Rs)}function Wr(e,t){var n=e.length;if(n)return yo(t+=t<0?n:0,n)?e[t]:i}function Ur(e,t,n){t=t.length?Nt(t,function(e){return Ua(e)?function(t){return Cr(t,1===e.length?e[0]:e)}:e}):[rl];var r=-1;t=Nt(t,Jt(lo()));var i=$r(e,function(e,n,i){var o=Nt(t,function(t){return t(e)});return{criteria:o,index:++r,value:e}});return function(e,t){var n=e.length;for(e.sort(t);n--;)e[n]=e[n].value;return e}(i,function(e,t){return function(e,t,n){var r=-1,i=e.criteria,o=t.criteria,a=i.length,s=n.length;for(;++r<a;){var l=Ai(i[r],o[r]);if(l)return r>=s?l:l*("desc"==n[r]?-1:1)}return e.index-t.index}(e,t,n)})}function Vr(e,t,n){for(var r=-1,i=t.length,o={};++r<i;){var a=t[r],s=Cr(e,a);n(s,a)&&Jr(o,yi(a,e),s)}return o}function Gr(e,t,n,r){var i=r?Ut:Wt,o=-1,a=t.length,s=e;for(e===t&&(t=Ei(t)),n&&(s=Nt(e,Jt(n)));++o<a;)for(var l=0,c=t[o],d=n?n(c):c;(l=i(s,d,l,r))>-1;)s!==e&&Ze.call(s,l,1),Ze.call(e,l,1);return e}function qr(e,t){for(var n=e?t.length:0,r=n-1;n--;){var i=t[n];if(n==r||i!==o){var o=i;yo(i)?Ze.call(e,i,1):ui(e,i)}}return e}function Yr(e,t){return e+mt(_n()*(t-e+1))}function Zr(e,t){var n="";if(!e||t<1||t>m)return n;do{t%2&&(n+=e),(t=mt(t/2))&&(e+=e)}while(t);return n}function Kr(e,t){return Ro(ko(e,t,rl),e+"")}function Xr(e){return Xn(Bs(e))}function Qr(e,t){var n=Bs(e);return No(n,sr(t,0,n.length))}function Jr(e,t,n,r){if(!es(e))return e;for(var o=-1,a=(t=yi(t,e)).length,s=a-1,l=e;null!=l&&++o<a;){var c=Io(t[o]),d=n;if("__proto__"===c||"constructor"===c||"prototype"===c)return e;if(o!=s){var u=l[c];(d=r?r(u,c,l):i)===i&&(d=es(u)?u:yo(t[o+1])?[]:{})}tr(l,c,d),l=l[c]}return e}var ei=Mn?function(e,t){return Mn.set(e,t),e}:rl,ti=Je?function(e,t){return Je(e,"toString",{configurable:!0,enumerable:!1,value:el(t),writable:!0})}:rl;function ni(e){return No(Bs(e))}function ri(e,t,r){var i=-1,o=e.length;t<0&&(t=-t>o?0:o+t),(r=r>o?o:r)<0&&(r+=o),o=t>r?0:r-t>>>0,t>>>=0;for(var a=n(o);++i<o;)a[i]=e[i+t];return a}function ii(e,t){var n;return pr(e,function(e,r,i){return!(n=t(e,r,i))}),!!n}function oi(e,t,n){var r=0,i=null==e?r:e.length;if("number"==typeof t&&t===t&&i<=2147483647){for(;r<i;){var o=r+i>>>1,a=e[o];null!==a&&!ls(a)&&(n?a<=t:a<t)?r=o+1:i=o}return i}return ai(e,t,rl,n)}function ai(e,t,n,r){var o=0,a=null==e?0:e.length;if(0===a)return 0;for(var s=(t=n(t))!==t,l=null===t,c=ls(t),d=t===i;o<a;){var u=mt((o+a)/2),p=n(e[u]),h=p!==i,m=null===p,f=p===p,g=ls(p);if(s)var v=r||f;else v=d?f&&(r||h):l?f&&h&&(r||!m):c?f&&h&&!m&&(r||!g):!m&&!g&&(r?p<=t:p<t);v?o=u+1:a=u}return yn(a,4294967294)}function si(e,t){for(var n=-1,r=e.length,i=0,o=[];++n<r;){var a=e[n],s=t?t(a):a;if(!n||!Ba(s,l)){var l=s;o[i++]=0===a?0:a}}return o}function li(e){return"number"==typeof e?e:ls(e)?f:+e}function ci(e){if("string"==typeof e)return e;if(Ua(e))return Nt(e,ci)+"";if(ls(e))return $n?$n.call(e):"";var t=e+"";return"0"==t&&1/e==-1/0?"-0":t}function di(e,t,n){var r=-1,i=Pt,o=e.length,a=!0,s=[],l=s;if(n)a=!1,i=Dt;else if(o>=200){var c=t?null:Zi(e);if(c)return pn(c);a=!1,i=tn,l=new Yn}else l=t?[]:s;e:for(;++r<o;){var d=e[r],u=t?t(d):d;if(d=n||0!==d?d:0,a&&u===u){for(var p=l.length;p--;)if(l[p]===u)continue e;t&&l.push(u),s.push(d)}else i(l,u,n)||(l!==s&&l.push(u),s.push(d))}return s}function ui(e,t){return null==(e=To(e,t=yi(t,e)))||delete e[Io(Ko(t))]}function pi(e,t,n,r){return Jr(e,t,n(Cr(e,t)),r)}function hi(e,t,n,r){for(var i=e.length,o=r?i:-1;(r?o--:++o<i)&&t(e[o],o,e););return n?ri(e,r?0:o,r?o+1:i):ri(e,r?o+1:0,r?i:o)}function mi(e,t){var n=e;return n instanceof Un&&(n=n.value()),It(t,function(e,t){return t.func.apply(t.thisArg,Lt([e],t.args))},n)}function fi(e,t,r){var i=e.length;if(i<2)return i?di(e[0]):[];for(var o=-1,a=n(i);++o<i;)for(var s=e[o],l=-1;++l<i;)l!=o&&(a[o]=ur(a[o]||s,e[l],t,r));return di(vr(a,1),t,r)}function gi(e,t,n){for(var r=-1,o=e.length,a=t.length,s={};++r<o;){var l=r<a?t[r]:i;n(s,e[r],l)}return s}function vi(e){return qa(e)?e:[]}function xi(e){return"function"==typeof e?e:rl}function yi(e,t){return Ua(e)?e:jo(e,t)?[e]:Lo(xs(e))}var bi=Kr;function ji(e,t,n){var r=e.length;return n=n===i?r:n,!t&&n>=r?e:ri(e,t,n)}var _i=nt||function(e){return ft.clearTimeout(e)};function Ci(e,t){if(t)return e.slice();var n=e.length,r=Ve?Ve(n):new e.constructor(n);return e.copy(r),r}function wi(e){var t=new e.constructor(e.byteLength);return new Ue(t).set(new Ue(e)),t}function Si(e,t){var n=t?wi(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.length)}function Ai(e,t){if(e!==t){var n=e!==i,r=null===e,o=e===e,a=ls(e),s=t!==i,l=null===t,c=t===t,d=ls(t);if(!l&&!d&&!a&&e>t||a&&s&&c&&!l&&!d||r&&s&&c||!n&&c||!o)return 1;if(!r&&!a&&!d&&e<t||d&&n&&o&&!r&&!a||l&&n&&o||!s&&o||!c)return-1}return 0}function ki(e,t,r,i){for(var o=-1,a=e.length,s=r.length,l=-1,c=t.length,d=Yt(a-s,0),u=n(c+d),p=!i;++l<c;)u[l]=t[l];for(;++o<s;)(p||o<a)&&(u[r[o]]=e[o]);for(;d--;)u[l++]=e[o++];return u}function Ti(e,t,r,i){for(var o=-1,a=e.length,s=-1,l=r.length,c=-1,d=t.length,u=Yt(a-l,0),p=n(u+d),h=!i;++o<u;)p[o]=e[o];for(var m=o;++c<d;)p[m+c]=t[c];for(;++s<l;)(h||o<a)&&(p[m+r[s]]=e[o++]);return p}function Ei(e,t){var r=-1,i=e.length;for(t||(t=n(i));++r<i;)t[r]=e[r];return t}function Mi(e,t,n,r){var o=!n;n||(n={});for(var a=-1,s=t.length;++a<s;){var l=t[a],c=r?r(n[l],e[l],l,n,e):i;c===i&&(c=e[l]),o?or(n,l,c):tr(n,l,c)}return n}function Oi(e,t){return function(n,r){var i=Ua(n)?Tt:rr,o=t?t():{};return i(n,e,lo(r,2),o)}}function Ri(e){return Kr(function(t,n){var r=-1,o=n.length,a=o>1?n[o-1]:i,s=o>2?n[2]:i;for(a=e.length>3&&"function"==typeof a?(o--,a):i,s&&bo(n[0],n[1],s)&&(a=o<3?i:a,o=1),t=Ae(t);++r<o;){var l=n[r];l&&e(t,l,r,a)}return t})}function Pi(e,t){return function(n,r){if(null==n)return n;if(!Ga(n))return e(n,r);for(var i=n.length,o=t?i:-1,a=Ae(n);(t?o--:++o<i)&&!1!==r(a[o],o,a););return n}}function Di(e){return function(t,n,r){for(var i=-1,o=Ae(t),a=r(t),s=a.length;s--;){var l=a[e?s:++i];if(!1===n(o[l],l,o))break}return t}}function Ni(e){return function(t){var n=ln(t=xs(t))?fn(t):i,r=n?n[0]:t.charAt(0),o=n?ji(n,1).join(""):t.slice(1);return r[e]()+o}}function Li(e){return function(t){return It(Xs(Ws(t).replace(et,"")),e,"")}}function Ii(e){return function(){var t=arguments;switch(t.length){case 0:return new e;case 1:return new e(t[0]);case 2:return new e(t[0],t[1]);case 3:return new e(t[0],t[1],t[2]);case 4:return new e(t[0],t[1],t[2],t[3]);case 5:return new e(t[0],t[1],t[2],t[3],t[4]);case 6:return new e(t[0],t[1],t[2],t[3],t[4],t[5]);case 7:return new e(t[0],t[1],t[2],t[3],t[4],t[5],t[6])}var n=zn(e.prototype),r=e.apply(n,t);return es(r)?r:n}}function Fi(e){return function(t,n,r){var o=Ae(t);if(!Ga(t)){var a=lo(n,3);t=Os(t),n=function(e){return a(o[e],e,o)}}var s=e(t,n,r);return s>-1?o[a?t[s]:s]:i}}function $i(e){return no(function(t){var n=t.length,r=n,a=Wn.prototype.thru;for(e&&t.reverse();r--;){var s=t[r];if("function"!=typeof s)throw new Ee(o);if(a&&!l&&"wrapper"==ao(s))var l=new Wn([],!0)}for(r=l?r:n;++r<n;){var c=ao(s=t[r]),d="wrapper"==c?oo(s):i;l=d&&_o(d[0])&&424==d[1]&&!d[4].length&&1==d[9]?l[ao(d[0])].apply(l,d[3]):1==s.length&&_o(s)?l[c]():l.thru(s)}return function(){var e=arguments,r=e[0];if(l&&1==e.length&&Ua(r))return l.plant(r).value();for(var i=0,o=n?t[i].apply(this,e):r;++i<n;)o=t[i].call(this,o);return o}})}function Bi(e,t,r,o,a,s,l,c,d,p){var h=t&u,m=1&t,f=2&t,g=24&t,v=512&t,x=f?i:Ii(e);return function u(){for(var y=arguments.length,b=n(y),j=y;j--;)b[j]=arguments[j];if(g)var _=so(u),C=function(e,t){for(var n=e.length,r=0;n--;)e[n]===t&&++r;return r}(b,_);if(o&&(b=ki(b,o,a,g)),s&&(b=Ti(b,s,l,g)),y-=C,g&&y<p){var w=un(b,_);return qi(e,t,Bi,u.placeholder,r,b,w,c,d,p-y)}var S=m?r:this,A=f?S[e]:e;return y=b.length,c?b=function(e,t){var n=e.length,r=yn(t.length,n),o=Ei(e);for(;r--;){var a=t[r];e[r]=yo(a,n)?o[a]:i}return e}(b,c):v&&y>1&&b.reverse(),h&&d<y&&(b.length=d),this&&this!==ft&&this instanceof u&&(A=x||Ii(A)),A.apply(S,b)}}function zi(e,t){return function(n,r){return function(e,t,n,r){return br(e,function(e,i,o){t(r,n(e),i,o)}),r}(n,e,t(r),{})}}function Hi(e,t){return function(n,r){var o;if(n===i&&r===i)return t;if(n!==i&&(o=n),r!==i){if(o===i)return r;"string"==typeof n||"string"==typeof r?(n=ci(n),r=ci(r)):(n=li(n),r=li(r)),o=e(n,r)}return o}}function Wi(e){return no(function(t){return t=Nt(t,Jt(lo())),Kr(function(n){var r=this;return e(t,function(e){return kt(e,r,n)})})})}function Ui(e,t){var n=(t=t===i?" ":ci(t)).length;if(n<2)return n?Zr(t,e):t;var r=Zr(t,ht(e/mn(t)));return ln(t)?ji(fn(r),0,e).join(""):r.slice(0,e)}function Vi(e){return function(t,r,o){return o&&"number"!=typeof o&&bo(t,r,o)&&(r=o=i),t=hs(t),r===i?(r=t,t=0):r=hs(r),function(e,t,r,i){for(var o=-1,a=Yt(ht((t-e)/(r||1)),0),s=n(a);a--;)s[i?a:++o]=e,e+=r;return s}(t,r,o=o===i?t<r?1:-1:hs(o),e)}}function Gi(e){return function(t,n){return"string"==typeof t&&"string"==typeof n||(t=gs(t),n=gs(n)),e(t,n)}}function qi(e,t,n,r,o,a,s,l,u,p){var h=8&t;t|=h?c:d,4&(t&=~(h?d:c))||(t&=-4);var m=[e,t,o,h?a:i,h?s:i,h?i:a,h?i:s,l,u,p],f=n.apply(i,m);return _o(e)&&Mo(f,m),f.placeholder=r,Po(f,e,t)}function Yi(e){var t=Se[e];return function(e,n){if(e=gs(e),(n=null==n?0:yn(ms(n),292))&&yt(e)){var r=(xs(e)+"e").split("e");return+((r=(xs(t(r[0]+"e"+(+r[1]+n)))+"e").split("e"))[0]+"e"+(+r[1]-n))}return t(e)}}var Zi=kn&&1/pn(new kn([,-0]))[1]==h?function(e){return new kn(e)}:ll;function Ki(e){return function(t){var n=fo(t);return n==S?cn(t):n==M?hn(t):function(e,t){return Nt(t,function(t){return[t,e[t]]})}(t,e(t))}}function Xi(e,t,r,a,h,m,f,g){var v=2&t;if(!v&&"function"!=typeof e)throw new Ee(o);var x=a?a.length:0;if(x||(t&=-97,a=h=i),f=f===i?f:Yt(ms(f),0),g=g===i?g:ms(g),x-=h?h.length:0,t&d){var y=a,b=h;a=h=i}var j=v?i:oo(e),_=[e,t,r,a,h,y,b,m,f,g];if(j&&function(e,t){var n=e[1],r=t[1],i=n|r,o=i<131,a=r==u&&8==n||r==u&&n==p&&e[7].length<=t[8]||384==r&&t[7].length<=t[8]&&8==n;if(!o&&!a)return e;1&r&&(e[2]=t[2],i|=1&n?0:4);var l=t[3];if(l){var c=e[3];e[3]=c?ki(c,l,t[4]):l,e[4]=c?un(e[3],s):t[4]}(l=t[5])&&(c=e[5],e[5]=c?Ti(c,l,t[6]):l,e[6]=c?un(e[5],s):t[6]);(l=t[7])&&(e[7]=l);r&u&&(e[8]=null==e[8]?t[8]:yn(e[8],t[8]));null==e[9]&&(e[9]=t[9]);e[0]=t[0],e[1]=i}(_,j),e=_[0],t=_[1],r=_[2],a=_[3],h=_[4],!(g=_[9]=_[9]===i?v?0:e.length:Yt(_[9]-x,0))&&24&t&&(t&=-25),t&&1!=t)C=8==t||t==l?function(e,t,r){var o=Ii(e);return function a(){for(var s=arguments.length,l=n(s),c=s,d=so(a);c--;)l[c]=arguments[c];var u=s<3&&l[0]!==d&&l[s-1]!==d?[]:un(l,d);return(s-=u.length)<r?qi(e,t,Bi,a.placeholder,i,l,u,i,i,r-s):kt(this&&this!==ft&&this instanceof a?o:e,this,l)}}(e,t,g):t!=c&&33!=t||h.length?Bi.apply(i,_):function(e,t,r,i){var o=1&t,a=Ii(e);return function t(){for(var s=-1,l=arguments.length,c=-1,d=i.length,u=n(d+l),p=this&&this!==ft&&this instanceof t?a:e;++c<d;)u[c]=i[c];for(;l--;)u[c++]=arguments[++s];return kt(p,o?r:this,u)}}(e,t,r,a);else var C=function(e,t,n){var r=1&t,i=Ii(e);return function t(){return(this&&this!==ft&&this instanceof t?i:e).apply(r?n:this,arguments)}}(e,t,r);return Po((j?ei:Mo)(C,_),e,t)}function Qi(e,t,n,r){return e===i||Ba(e,Re[n])&&!Ne.call(r,n)?t:e}function Ji(e,t,n,r,o,a){return es(e)&&es(t)&&(a.set(t,e),Hr(e,t,i,Ji,a),a.delete(t)),e}function eo(e){return is(e)?i:e}function to(e,t,n,r,o,a){var s=1&n,l=e.length,c=t.length;if(l!=c&&!(s&&c>l))return!1;var d=a.get(e),u=a.get(t);if(d&&u)return d==t&&u==e;var p=-1,h=!0,m=2&n?new Yn:i;for(a.set(e,t),a.set(t,e);++p<l;){var f=e[p],g=t[p];if(r)var v=s?r(g,f,p,t,e,a):r(f,g,p,e,t,a);if(v!==i){if(v)continue;h=!1;break}if(m){if(!$t(t,function(e,t){if(!tn(m,t)&&(f===e||o(f,e,n,r,a)))return m.push(t)})){h=!1;break}}else if(f!==g&&!o(f,g,n,r,a)){h=!1;break}}return a.delete(e),a.delete(t),h}function no(e){return Ro(ko(e,i,Vo),e+"")}function ro(e){return wr(e,Os,ho)}function io(e){return wr(e,Rs,mo)}var oo=Mn?function(e){return Mn.get(e)}:ll;function ao(e){for(var t=e.name+"",n=On[t],r=Ne.call(On,t)?n.length:0;r--;){var i=n[r],o=i.func;if(null==o||o==e)return i.name}return t}function so(e){return(Ne.call(Bn,"placeholder")?Bn:e).placeholder}function lo(){var e=Bn.iteratee||il;return e=e===il?Nr:e,arguments.length?e(arguments[0],arguments[1]):e}function co(e,t){var n=e.__data__;return function(e){var t=typeof e;return"string"==t||"number"==t||"symbol"==t||"boolean"==t?"__proto__"!==e:null===e}(t)?n["string"==typeof t?"string":"hash"]:n.map}function uo(e){for(var t=Os(e),n=t.length;n--;){var r=t[n],i=e[r];t[n]=[r,i,So(i)]}return t}function po(e,t){var n=function(e,t){return null==e?i:e[t]}(e,t);return Dr(n)?n:i}var ho=gt?function(e){return null==e?[]:(e=Ae(e),Rt(gt(e),function(t){return Ye.call(e,t)}))}:fl,mo=gt?function(e){for(var t=[];e;)Lt(t,ho(e)),e=Ge(e);return t}:fl,fo=Sr;function go(e,t,n){for(var r=-1,i=(t=yi(t,e)).length,o=!1;++r<i;){var a=Io(t[r]);if(!(o=null!=e&&n(e,a)))break;e=e[a]}return o||++r!=i?o:!!(i=null==e?0:e.length)&&Ja(i)&&yo(a,i)&&(Ua(e)||Wa(e))}function vo(e){return"function"!=typeof e.constructor||wo(e)?{}:zn(Ge(e))}function xo(e){return Ua(e)||Wa(e)||!!(Ke&&e&&e[Ke])}function yo(e,t){var n=typeof e;return!!(t=null==t?m:t)&&("number"==n||"symbol"!=n&&be.test(e))&&e>-1&&e%1==0&&e<t}function bo(e,t,n){if(!es(n))return!1;var r=typeof t;return!!("number"==r?Ga(n)&&yo(t,n.length):"string"==r&&t in n)&&Ba(n[t],e)}function jo(e,t){if(Ua(e))return!1;var n=typeof e;return!("number"!=n&&"symbol"!=n&&"boolean"!=n&&null!=e&&!ls(e))||(ne.test(e)||!te.test(e)||null!=t&&e in Ae(t))}function _o(e){var t=ao(e),n=Bn[t];if("function"!=typeof n||!(t in Un.prototype))return!1;if(e===n)return!0;var r=oo(n);return!!r&&e===r[0]}(wn&&fo(new wn(new ArrayBuffer(1)))!=N||Sn&&fo(new Sn)!=S||An&&fo(An.resolve())!=T||kn&&fo(new kn)!=M||Tn&&fo(new Tn)!=P)&&(fo=function(e){var t=Sr(e),n=t==k?e.constructor:i,r=n?Fo(n):"";if(r)switch(r){case Rn:return N;case Pn:return S;case Dn:return T;case Nn:return M;case Ln:return P}return t});var Co=Pe?Xa:gl;function wo(e){var t=e&&e.constructor;return e===("function"==typeof t&&t.prototype||Re)}function So(e){return e===e&&!es(e)}function Ao(e,t){return function(n){return null!=n&&(n[e]===t&&(t!==i||e in Ae(n)))}}function ko(e,t,r){return t=Yt(t===i?e.length-1:t,0),function(){for(var i=arguments,o=-1,a=Yt(i.length-t,0),s=n(a);++o<a;)s[o]=i[t+o];o=-1;for(var l=n(t+1);++o<t;)l[o]=i[o];return l[t]=r(s),kt(e,this,l)}}function To(e,t){return t.length<2?e:Cr(e,ri(t,0,-1))}function Eo(e,t){if(("constructor"!==t||"function"!==typeof e[t])&&"__proto__"!=t)return e[t]}var Mo=Do(ei),Oo=dt||function(e,t){return ft.setTimeout(e,t)},Ro=Do(ti);function Po(e,t,n){var r=t+"";return Ro(e,function(e,t){var n=t.length;if(!n)return e;var r=n-1;return t[r]=(n>1?"& ":"")+t[r],t=t.join(n>2?", ":" "),e.replace(le,"{\n/* [wrapped with "+t+"] */\n")}(r,function(e,t){return Et(v,function(n){var r="_."+n[0];t&n[1]&&!Pt(e,r)&&e.push(r)}),e.sort()}(function(e){var t=e.match(ce);return t?t[1].split(de):[]}(r),n)))}function Do(e){var t=0,n=0;return function(){var r=bn(),o=16-(r-n);if(n=r,o>0){if(++t>=800)return arguments[0]}else t=0;return e.apply(i,arguments)}}function No(e,t){var n=-1,r=e.length,o=r-1;for(t=t===i?r:t;++n<t;){var a=Yr(n,o),s=e[a];e[a]=e[n],e[n]=s}return e.length=t,e}var Lo=function(e){var t=Da(e,function(e){return 500===n.size&&n.clear(),e}),n=t.cache;return t}(function(e){var t=[];return 46===e.charCodeAt(0)&&t.push(""),e.replace(re,function(e,n,r,i){t.push(r?i.replace(he,"$1"):n||e)}),t});function Io(e){if("string"==typeof e||ls(e))return e;var t=e+"";return"0"==t&&1/e==-1/0?"-0":t}function Fo(e){if(null!=e){try{return De.call(e)}catch(t){}try{return e+""}catch(t){}}return""}function $o(e){if(e instanceof Un)return e.clone();var t=new Wn(e.__wrapped__,e.__chain__);return t.__actions__=Ei(e.__actions__),t.__index__=e.__index__,t.__values__=e.__values__,t}var Bo=Kr(function(e,t){return qa(e)?ur(e,vr(t,1,qa,!0)):[]}),zo=Kr(function(e,t){var n=Ko(t);return qa(n)&&(n=i),qa(e)?ur(e,vr(t,1,qa,!0),lo(n,2)):[]}),Ho=Kr(function(e,t){var n=Ko(t);return qa(n)&&(n=i),qa(e)?ur(e,vr(t,1,qa,!0),i,n):[]});function Wo(e,t,n){var r=null==e?0:e.length;if(!r)return-1;var i=null==n?0:ms(n);return i<0&&(i=Yt(r+i,0)),Ht(e,lo(t,3),i)}function Uo(e,t,n){var r=null==e?0:e.length;if(!r)return-1;var o=r-1;return n!==i&&(o=ms(n),o=n<0?Yt(r+o,0):yn(o,r-1)),Ht(e,lo(t,3),o,!0)}function Vo(e){return(null==e?0:e.length)?vr(e,1):[]}function Go(e){return e&&e.length?e[0]:i}var qo=Kr(function(e){var t=Nt(e,vi);return t.length&&t[0]===e[0]?Er(t):[]}),Yo=Kr(function(e){var t=Ko(e),n=Nt(e,vi);return t===Ko(n)?t=i:n.pop(),n.length&&n[0]===e[0]?Er(n,lo(t,2)):[]}),Zo=Kr(function(e){var t=Ko(e),n=Nt(e,vi);return(t="function"==typeof t?t:i)&&n.pop(),n.length&&n[0]===e[0]?Er(n,i,t):[]});function Ko(e){var t=null==e?0:e.length;return t?e[t-1]:i}var Xo=Kr(Qo);function Qo(e,t){return e&&e.length&&t&&t.length?Gr(e,t):e}var Jo=no(function(e,t){var n=null==e?0:e.length,r=ar(e,t);return qr(e,Nt(t,function(e){return yo(e,n)?+e:e}).sort(Ai)),r});function ea(e){return null==e?e:Cn.call(e)}var ta=Kr(function(e){return di(vr(e,1,qa,!0))}),na=Kr(function(e){var t=Ko(e);return qa(t)&&(t=i),di(vr(e,1,qa,!0),lo(t,2))}),ra=Kr(function(e){var t=Ko(e);return t="function"==typeof t?t:i,di(vr(e,1,qa,!0),i,t)});function ia(e){if(!e||!e.length)return[];var t=0;return e=Rt(e,function(e){if(qa(e))return t=Yt(e.length,t),!0}),Xt(t,function(t){return Nt(e,qt(t))})}function oa(e,t){if(!e||!e.length)return[];var n=ia(e);return null==t?n:Nt(n,function(e){return kt(t,i,e)})}var aa=Kr(function(e,t){return qa(e)?ur(e,t):[]}),sa=Kr(function(e){return fi(Rt(e,qa))}),la=Kr(function(e){var t=Ko(e);return qa(t)&&(t=i),fi(Rt(e,qa),lo(t,2))}),ca=Kr(function(e){var t=Ko(e);return t="function"==typeof t?t:i,fi(Rt(e,qa),i,t)}),da=Kr(ia);var ua=Kr(function(e){var t=e.length,n=t>1?e[t-1]:i;return n="function"==typeof n?(e.pop(),n):i,oa(e,n)});function pa(e){var t=Bn(e);return t.__chain__=!0,t}function ha(e,t){return t(e)}var ma=no(function(e){var t=e.length,n=t?e[0]:0,r=this.__wrapped__,o=function(t){return ar(t,e)};return!(t>1||this.__actions__.length)&&r instanceof Un&&yo(n)?((r=r.slice(n,+n+(t?1:0))).__actions__.push({func:ha,args:[o],thisArg:i}),new Wn(r,this.__chain__).thru(function(e){return t&&!e.length&&e.push(i),e})):this.thru(o)});var fa=Oi(function(e,t,n){Ne.call(e,n)?++e[n]:or(e,n,1)});var ga=Fi(Wo),va=Fi(Uo);function xa(e,t){return(Ua(e)?Et:pr)(e,lo(t,3))}function ya(e,t){return(Ua(e)?Mt:hr)(e,lo(t,3))}var ba=Oi(function(e,t,n){Ne.call(e,n)?e[n].push(t):or(e,n,[t])});var ja=Kr(function(e,t,r){var i=-1,o="function"==typeof t,a=Ga(e)?n(e.length):[];return pr(e,function(e){a[++i]=o?kt(t,e,r):Mr(e,t,r)}),a}),_a=Oi(function(e,t,n){or(e,n,t)});function Ca(e,t){return(Ua(e)?Nt:$r)(e,lo(t,3))}var wa=Oi(function(e,t,n){e[n?0:1].push(t)},function(){return[[],[]]});var Sa=Kr(function(e,t){if(null==e)return[];var n=t.length;return n>1&&bo(e,t[0],t[1])?t=[]:n>2&&bo(t[0],t[1],t[2])&&(t=[t[0]]),Ur(e,vr(t,1),[])}),Aa=it||function(){return ft.Date.now()};function ka(e,t,n){return t=n?i:t,t=e&&null==t?e.length:t,Xi(e,u,i,i,i,i,t)}function Ta(e,t){var n;if("function"!=typeof t)throw new Ee(o);return e=ms(e),function(){return--e>0&&(n=t.apply(this,arguments)),e<=1&&(t=i),n}}var Ea=Kr(function(e,t,n){var r=1;if(n.length){var i=un(n,so(Ea));r|=c}return Xi(e,r,t,n,i)}),Ma=Kr(function(e,t,n){var r=3;if(n.length){var i=un(n,so(Ma));r|=c}return Xi(t,r,e,n,i)});function Oa(e,t,n){var r,a,s,l,c,d,u=0,p=!1,h=!1,m=!0;if("function"!=typeof e)throw new Ee(o);function f(t){var n=r,o=a;return r=a=i,u=t,l=e.apply(o,n)}function g(e){var n=e-d;return d===i||n>=t||n<0||h&&e-u>=s}function v(){var e=Aa();if(g(e))return x(e);c=Oo(v,function(e){var n=t-(e-d);return h?yn(n,s-(e-u)):n}(e))}function x(e){return c=i,m&&r?f(e):(r=a=i,l)}function y(){var e=Aa(),n=g(e);if(r=arguments,a=this,d=e,n){if(c===i)return function(e){return u=e,c=Oo(v,t),p?f(e):l}(d);if(h)return _i(c),c=Oo(v,t),f(d)}return c===i&&(c=Oo(v,t)),l}return t=gs(t)||0,es(n)&&(p=!!n.leading,s=(h="maxWait"in n)?Yt(gs(n.maxWait)||0,t):s,m="trailing"in n?!!n.trailing:m),y.cancel=function(){c!==i&&_i(c),u=0,r=d=a=c=i},y.flush=function(){return c===i?l:x(Aa())},y}var Ra=Kr(function(e,t){return dr(e,1,t)}),Pa=Kr(function(e,t,n){return dr(e,gs(t)||0,n)});function Da(e,t){if("function"!=typeof e||null!=t&&"function"!=typeof t)throw new Ee(o);var n=function(){var r=arguments,i=t?t.apply(this,r):r[0],o=n.cache;if(o.has(i))return o.get(i);var a=e.apply(this,r);return n.cache=o.set(i,a)||o,a};return n.cache=new(Da.Cache||qn),n}function Na(e){if("function"!=typeof e)throw new Ee(o);return function(){var t=arguments;switch(t.length){case 0:return!e.call(this);case 1:return!e.call(this,t[0]);case 2:return!e.call(this,t[0],t[1]);case 3:return!e.call(this,t[0],t[1],t[2])}return!e.apply(this,t)}}Da.Cache=qn;var La=bi(function(e,t){var n=(t=1==t.length&&Ua(t[0])?Nt(t[0],Jt(lo())):Nt(vr(t,1),Jt(lo()))).length;return Kr(function(r){for(var i=-1,o=yn(r.length,n);++i<o;)r[i]=t[i].call(this,r[i]);return kt(e,this,r)})}),Ia=Kr(function(e,t){var n=un(t,so(Ia));return Xi(e,c,i,t,n)}),Fa=Kr(function(e,t){var n=un(t,so(Fa));return Xi(e,d,i,t,n)}),$a=no(function(e,t){return Xi(e,p,i,i,i,t)});function Ba(e,t){return e===t||e!==e&&t!==t}var za=Gi(Ar),Ha=Gi(function(e,t){return e>=t}),Wa=Or(function(){return arguments}())?Or:function(e){return ts(e)&&Ne.call(e,"callee")&&!Ye.call(e,"callee")},Ua=n.isArray,Va=jt?Jt(jt):function(e){return ts(e)&&Sr(e)==D};function Ga(e){return null!=e&&Ja(e.length)&&!Xa(e)}function qa(e){return ts(e)&&Ga(e)}var Ya=vt||gl,Za=_t?Jt(_t):function(e){return ts(e)&&Sr(e)==j};function Ka(e){if(!ts(e))return!1;var t=Sr(e);return t==_||"[object DOMException]"==t||"string"==typeof e.message&&"string"==typeof e.name&&!is(e)}function Xa(e){if(!es(e))return!1;var t=Sr(e);return t==C||t==w||"[object AsyncFunction]"==t||"[object Proxy]"==t}function Qa(e){return"number"==typeof e&&e==ms(e)}function Ja(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=m}function es(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}function ts(e){return null!=e&&"object"==typeof e}var ns=Ct?Jt(Ct):function(e){return ts(e)&&fo(e)==S};function rs(e){return"number"==typeof e||ts(e)&&Sr(e)==A}function is(e){if(!ts(e)||Sr(e)!=k)return!1;var t=Ge(e);if(null===t)return!0;var n=Ne.call(t,"constructor")&&t.constructor;return"function"==typeof n&&n instanceof n&&De.call(n)==$e}var os=wt?Jt(wt):function(e){return ts(e)&&Sr(e)==E};var as=St?Jt(St):function(e){return ts(e)&&fo(e)==M};function ss(e){return"string"==typeof e||!Ua(e)&&ts(e)&&Sr(e)==O}function ls(e){return"symbol"==typeof e||ts(e)&&Sr(e)==R}var cs=At?Jt(At):function(e){return ts(e)&&Ja(e.length)&&!!lt[Sr(e)]};var ds=Gi(Fr),us=Gi(function(e,t){return e<=t});function ps(e){if(!e)return[];if(Ga(e))return ss(e)?fn(e):Ei(e);if(Xe&&e[Xe])return function(e){for(var t,n=[];!(t=e.next()).done;)n.push(t.value);return n}(e[Xe]());var t=fo(e);return(t==S?cn:t==M?pn:Bs)(e)}function hs(e){return e?(e=gs(e))===h||e===-1/0?17976931348623157e292*(e<0?-1:1):e===e?e:0:0===e?e:0}function ms(e){var t=hs(e),n=t%1;return t===t?n?t-n:t:0}function fs(e){return e?sr(ms(e),0,g):0}function gs(e){if("number"==typeof e)return e;if(ls(e))return f;if(es(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=es(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=Qt(e);var n=ve.test(e);return n||ye.test(e)?pt(e.slice(2),n?2:8):ge.test(e)?f:+e}function vs(e){return Mi(e,Rs(e))}function xs(e){return null==e?"":ci(e)}var ys=Ri(function(e,t){if(wo(t)||Ga(t))Mi(t,Os(t),e);else for(var n in t)Ne.call(t,n)&&tr(e,n,t[n])}),bs=Ri(function(e,t){Mi(t,Rs(t),e)}),js=Ri(function(e,t,n,r){Mi(t,Rs(t),e,r)}),_s=Ri(function(e,t,n,r){Mi(t,Os(t),e,r)}),Cs=no(ar);var ws=Kr(function(e,t){e=Ae(e);var n=-1,r=t.length,o=r>2?t[2]:i;for(o&&bo(t[0],t[1],o)&&(r=1);++n<r;)for(var a=t[n],s=Rs(a),l=-1,c=s.length;++l<c;){var d=s[l],u=e[d];(u===i||Ba(u,Re[d])&&!Ne.call(e,d))&&(e[d]=a[d])}return e}),Ss=Kr(function(e){return e.push(i,Ji),kt(Ds,i,e)});function As(e,t,n){var r=null==e?i:Cr(e,t);return r===i?n:r}function ks(e,t){return null!=e&&go(e,t,Tr)}var Ts=zi(function(e,t,n){null!=t&&"function"!=typeof t.toString&&(t=Fe.call(t)),e[t]=n},el(rl)),Es=zi(function(e,t,n){null!=t&&"function"!=typeof t.toString&&(t=Fe.call(t)),Ne.call(e,t)?e[t].push(n):e[t]=[n]},lo),Ms=Kr(Mr);function Os(e){return Ga(e)?Kn(e):Lr(e)}function Rs(e){return Ga(e)?Kn(e,!0):Ir(e)}var Ps=Ri(function(e,t,n){Hr(e,t,n)}),Ds=Ri(function(e,t,n,r){Hr(e,t,n,r)}),Ns=no(function(e,t){var n={};if(null==e)return n;var r=!1;t=Nt(t,function(t){return t=yi(t,e),r||(r=t.length>1),t}),Mi(e,io(e),n),r&&(n=lr(n,7,eo));for(var i=t.length;i--;)ui(n,t[i]);return n});var Ls=no(function(e,t){return null==e?{}:function(e,t){return Vr(e,t,function(t,n){return ks(e,n)})}(e,t)});function Is(e,t){if(null==e)return{};var n=Nt(io(e),function(e){return[e]});return t=lo(t),Vr(e,n,function(e,n){return t(e,n[0])})}var Fs=Ki(Os),$s=Ki(Rs);function Bs(e){return null==e?[]:en(e,Os(e))}var zs=Li(function(e,t,n){return t=t.toLowerCase(),e+(n?Hs(t):t)});function Hs(e){return Ks(xs(e).toLowerCase())}function Ws(e){return(e=xs(e))&&e.replace(je,on).replace(tt,"")}var Us=Li(function(e,t,n){return e+(n?"-":"")+t.toLowerCase()}),Vs=Li(function(e,t,n){return e+(n?" ":"")+t.toLowerCase()}),Gs=Ni("toLowerCase");var qs=Li(function(e,t,n){return e+(n?"_":"")+t.toLowerCase()});var Ys=Li(function(e,t,n){return e+(n?" ":"")+Ks(t)});var Zs=Li(function(e,t,n){return e+(n?" ":"")+t.toUpperCase()}),Ks=Ni("toUpperCase");function Xs(e,t,n){return e=xs(e),(t=n?i:t)===i?function(e){return ot.test(e)}(e)?function(e){return e.match(rt)||[]}(e):function(e){return e.match(ue)||[]}(e):e.match(t)||[]}var Qs=Kr(function(e,t){try{return kt(e,i,t)}catch(n){return Ka(n)?n:new se(n)}}),Js=no(function(e,t){return Et(t,function(t){t=Io(t),or(e,t,Ea(e[t],e))}),e});function el(e){return function(){return e}}var tl=$i(),nl=$i(!0);function rl(e){return e}function il(e){return Nr("function"==typeof e?e:lr(e,1))}var ol=Kr(function(e,t){return function(n){return Mr(n,e,t)}}),al=Kr(function(e,t){return function(n){return Mr(e,n,t)}});function sl(e,t,n){var r=Os(t),i=_r(t,r);null!=n||es(t)&&(i.length||!r.length)||(n=t,t=e,e=this,i=_r(t,Os(t)));var o=!(es(n)&&"chain"in n)||!!n.chain,a=Xa(e);return Et(i,function(n){var r=t[n];e[n]=r,a&&(e.prototype[n]=function(){var t=this.__chain__;if(o||t){var n=e(this.__wrapped__);return(n.__actions__=Ei(this.__actions__)).push({func:r,args:arguments,thisArg:e}),n.__chain__=t,n}return r.apply(e,Lt([this.value()],arguments))})}),e}function ll(){}var cl=Wi(Nt),dl=Wi(Ot),ul=Wi($t);function pl(e){return jo(e)?qt(Io(e)):function(e){return function(t){return Cr(t,e)}}(e)}var hl=Vi(),ml=Vi(!0);function fl(){return[]}function gl(){return!1}var vl=Hi(function(e,t){return e+t},0),xl=Yi("ceil"),yl=Hi(function(e,t){return e/t},1),bl=Yi("floor");var jl=Hi(function(e,t){return e*t},1),_l=Yi("round"),Cl=Hi(function(e,t){return e-t},0);return Bn.after=function(e,t){if("function"!=typeof t)throw new Ee(o);return e=ms(e),function(){if(--e<1)return t.apply(this,arguments)}},Bn.ary=ka,Bn.assign=ys,Bn.assignIn=bs,Bn.assignInWith=js,Bn.assignWith=_s,Bn.at=Cs,Bn.before=Ta,Bn.bind=Ea,Bn.bindAll=Js,Bn.bindKey=Ma,Bn.castArray=function(){if(!arguments.length)return[];var e=arguments[0];return Ua(e)?e:[e]},Bn.chain=pa,Bn.chunk=function(e,t,r){t=(r?bo(e,t,r):t===i)?1:Yt(ms(t),0);var o=null==e?0:e.length;if(!o||t<1)return[];for(var a=0,s=0,l=n(ht(o/t));a<o;)l[s++]=ri(e,a,a+=t);return l},Bn.compact=function(e){for(var t=-1,n=null==e?0:e.length,r=0,i=[];++t<n;){var o=e[t];o&&(i[r++]=o)}return i},Bn.concat=function(){var e=arguments.length;if(!e)return[];for(var t=n(e-1),r=arguments[0],i=e;i--;)t[i-1]=arguments[i];return Lt(Ua(r)?Ei(r):[r],vr(t,1))},Bn.cond=function(e){var t=null==e?0:e.length,n=lo();return e=t?Nt(e,function(e){if("function"!=typeof e[1])throw new Ee(o);return[n(e[0]),e[1]]}):[],Kr(function(n){for(var r=-1;++r<t;){var i=e[r];if(kt(i[0],this,n))return kt(i[1],this,n)}})},Bn.conforms=function(e){return function(e){var t=Os(e);return function(n){return cr(n,e,t)}}(lr(e,1))},Bn.constant=el,Bn.countBy=fa,Bn.create=function(e,t){var n=zn(e);return null==t?n:ir(n,t)},Bn.curry=function e(t,n,r){var o=Xi(t,8,i,i,i,i,i,n=r?i:n);return o.placeholder=e.placeholder,o},Bn.curryRight=function e(t,n,r){var o=Xi(t,l,i,i,i,i,i,n=r?i:n);return o.placeholder=e.placeholder,o},Bn.debounce=Oa,Bn.defaults=ws,Bn.defaultsDeep=Ss,Bn.defer=Ra,Bn.delay=Pa,Bn.difference=Bo,Bn.differenceBy=zo,Bn.differenceWith=Ho,Bn.drop=function(e,t,n){var r=null==e?0:e.length;return r?ri(e,(t=n||t===i?1:ms(t))<0?0:t,r):[]},Bn.dropRight=function(e,t,n){var r=null==e?0:e.length;return r?ri(e,0,(t=r-(t=n||t===i?1:ms(t)))<0?0:t):[]},Bn.dropRightWhile=function(e,t){return e&&e.length?hi(e,lo(t,3),!0,!0):[]},Bn.dropWhile=function(e,t){return e&&e.length?hi(e,lo(t,3),!0):[]},Bn.fill=function(e,t,n,r){var o=null==e?0:e.length;return o?(n&&"number"!=typeof n&&bo(e,t,n)&&(n=0,r=o),function(e,t,n,r){var o=e.length;for((n=ms(n))<0&&(n=-n>o?0:o+n),(r=r===i||r>o?o:ms(r))<0&&(r+=o),r=n>r?0:fs(r);n<r;)e[n++]=t;return e}(e,t,n,r)):[]},Bn.filter=function(e,t){return(Ua(e)?Rt:gr)(e,lo(t,3))},Bn.flatMap=function(e,t){return vr(Ca(e,t),1)},Bn.flatMapDeep=function(e,t){return vr(Ca(e,t),h)},Bn.flatMapDepth=function(e,t,n){return n=n===i?1:ms(n),vr(Ca(e,t),n)},Bn.flatten=Vo,Bn.flattenDeep=function(e){return(null==e?0:e.length)?vr(e,h):[]},Bn.flattenDepth=function(e,t){return(null==e?0:e.length)?vr(e,t=t===i?1:ms(t)):[]},Bn.flip=function(e){return Xi(e,512)},Bn.flow=tl,Bn.flowRight=nl,Bn.fromPairs=function(e){for(var t=-1,n=null==e?0:e.length,r={};++t<n;){var i=e[t];r[i[0]]=i[1]}return r},Bn.functions=function(e){return null==e?[]:_r(e,Os(e))},Bn.functionsIn=function(e){return null==e?[]:_r(e,Rs(e))},Bn.groupBy=ba,Bn.initial=function(e){return(null==e?0:e.length)?ri(e,0,-1):[]},Bn.intersection=qo,Bn.intersectionBy=Yo,Bn.intersectionWith=Zo,Bn.invert=Ts,Bn.invertBy=Es,Bn.invokeMap=ja,Bn.iteratee=il,Bn.keyBy=_a,Bn.keys=Os,Bn.keysIn=Rs,Bn.map=Ca,Bn.mapKeys=function(e,t){var n={};return t=lo(t,3),br(e,function(e,r,i){or(n,t(e,r,i),e)}),n},Bn.mapValues=function(e,t){var n={};return t=lo(t,3),br(e,function(e,r,i){or(n,r,t(e,r,i))}),n},Bn.matches=function(e){return Br(lr(e,1))},Bn.matchesProperty=function(e,t){return zr(e,lr(t,1))},Bn.memoize=Da,Bn.merge=Ps,Bn.mergeWith=Ds,Bn.method=ol,Bn.methodOf=al,Bn.mixin=sl,Bn.negate=Na,Bn.nthArg=function(e){return e=ms(e),Kr(function(t){return Wr(t,e)})},Bn.omit=Ns,Bn.omitBy=function(e,t){return Is(e,Na(lo(t)))},Bn.once=function(e){return Ta(2,e)},Bn.orderBy=function(e,t,n,r){return null==e?[]:(Ua(t)||(t=null==t?[]:[t]),Ua(n=r?i:n)||(n=null==n?[]:[n]),Ur(e,t,n))},Bn.over=cl,Bn.overArgs=La,Bn.overEvery=dl,Bn.overSome=ul,Bn.partial=Ia,Bn.partialRight=Fa,Bn.partition=wa,Bn.pick=Ls,Bn.pickBy=Is,Bn.property=pl,Bn.propertyOf=function(e){return function(t){return null==e?i:Cr(e,t)}},Bn.pull=Xo,Bn.pullAll=Qo,Bn.pullAllBy=function(e,t,n){return e&&e.length&&t&&t.length?Gr(e,t,lo(n,2)):e},Bn.pullAllWith=function(e,t,n){return e&&e.length&&t&&t.length?Gr(e,t,i,n):e},Bn.pullAt=Jo,Bn.range=hl,Bn.rangeRight=ml,Bn.rearg=$a,Bn.reject=function(e,t){return(Ua(e)?Rt:gr)(e,Na(lo(t,3)))},Bn.remove=function(e,t){var n=[];if(!e||!e.length)return n;var r=-1,i=[],o=e.length;for(t=lo(t,3);++r<o;){var a=e[r];t(a,r,e)&&(n.push(a),i.push(r))}return qr(e,i),n},Bn.rest=function(e,t){if("function"!=typeof e)throw new Ee(o);return Kr(e,t=t===i?t:ms(t))},Bn.reverse=ea,Bn.sampleSize=function(e,t,n){return t=(n?bo(e,t,n):t===i)?1:ms(t),(Ua(e)?Qn:Qr)(e,t)},Bn.set=function(e,t,n){return null==e?e:Jr(e,t,n)},Bn.setWith=function(e,t,n,r){return r="function"==typeof r?r:i,null==e?e:Jr(e,t,n,r)},Bn.shuffle=function(e){return(Ua(e)?Jn:ni)(e)},Bn.slice=function(e,t,n){var r=null==e?0:e.length;return r?(n&&"number"!=typeof n&&bo(e,t,n)?(t=0,n=r):(t=null==t?0:ms(t),n=n===i?r:ms(n)),ri(e,t,n)):[]},Bn.sortBy=Sa,Bn.sortedUniq=function(e){return e&&e.length?si(e):[]},Bn.sortedUniqBy=function(e,t){return e&&e.length?si(e,lo(t,2)):[]},Bn.split=function(e,t,n){return n&&"number"!=typeof n&&bo(e,t,n)&&(t=n=i),(n=n===i?g:n>>>0)?(e=xs(e))&&("string"==typeof t||null!=t&&!os(t))&&!(t=ci(t))&&ln(e)?ji(fn(e),0,n):e.split(t,n):[]},Bn.spread=function(e,t){if("function"!=typeof e)throw new Ee(o);return t=null==t?0:Yt(ms(t),0),Kr(function(n){var r=n[t],i=ji(n,0,t);return r&&Lt(i,r),kt(e,this,i)})},Bn.tail=function(e){var t=null==e?0:e.length;return t?ri(e,1,t):[]},Bn.take=function(e,t,n){return e&&e.length?ri(e,0,(t=n||t===i?1:ms(t))<0?0:t):[]},Bn.takeRight=function(e,t,n){var r=null==e?0:e.length;return r?ri(e,(t=r-(t=n||t===i?1:ms(t)))<0?0:t,r):[]},Bn.takeRightWhile=function(e,t){return e&&e.length?hi(e,lo(t,3),!1,!0):[]},Bn.takeWhile=function(e,t){return e&&e.length?hi(e,lo(t,3)):[]},Bn.tap=function(e,t){return t(e),e},Bn.throttle=function(e,t,n){var r=!0,i=!0;if("function"!=typeof e)throw new Ee(o);return es(n)&&(r="leading"in n?!!n.leading:r,i="trailing"in n?!!n.trailing:i),Oa(e,t,{leading:r,maxWait:t,trailing:i})},Bn.thru=ha,Bn.toArray=ps,Bn.toPairs=Fs,Bn.toPairsIn=$s,Bn.toPath=function(e){return Ua(e)?Nt(e,Io):ls(e)?[e]:Ei(Lo(xs(e)))},Bn.toPlainObject=vs,Bn.transform=function(e,t,n){var r=Ua(e),i=r||Ya(e)||cs(e);if(t=lo(t,4),null==n){var o=e&&e.constructor;n=i?r?new o:[]:es(e)&&Xa(o)?zn(Ge(e)):{}}return(i?Et:br)(e,function(e,r,i){return t(n,e,r,i)}),n},Bn.unary=function(e){return ka(e,1)},Bn.union=ta,Bn.unionBy=na,Bn.unionWith=ra,Bn.uniq=function(e){return e&&e.length?di(e):[]},Bn.uniqBy=function(e,t){return e&&e.length?di(e,lo(t,2)):[]},Bn.uniqWith=function(e,t){return t="function"==typeof t?t:i,e&&e.length?di(e,i,t):[]},Bn.unset=function(e,t){return null==e||ui(e,t)},Bn.unzip=ia,Bn.unzipWith=oa,Bn.update=function(e,t,n){return null==e?e:pi(e,t,xi(n))},Bn.updateWith=function(e,t,n,r){return r="function"==typeof r?r:i,null==e?e:pi(e,t,xi(n),r)},Bn.values=Bs,Bn.valuesIn=function(e){return null==e?[]:en(e,Rs(e))},Bn.without=aa,Bn.words=Xs,Bn.wrap=function(e,t){return Ia(xi(t),e)},Bn.xor=sa,Bn.xorBy=la,Bn.xorWith=ca,Bn.zip=da,Bn.zipObject=function(e,t){return gi(e||[],t||[],tr)},Bn.zipObjectDeep=function(e,t){return gi(e||[],t||[],Jr)},Bn.zipWith=ua,Bn.entries=Fs,Bn.entriesIn=$s,Bn.extend=bs,Bn.extendWith=js,sl(Bn,Bn),Bn.add=vl,Bn.attempt=Qs,Bn.camelCase=zs,Bn.capitalize=Hs,Bn.ceil=xl,Bn.clamp=function(e,t,n){return n===i&&(n=t,t=i),n!==i&&(n=(n=gs(n))===n?n:0),t!==i&&(t=(t=gs(t))===t?t:0),sr(gs(e),t,n)},Bn.clone=function(e){return lr(e,4)},Bn.cloneDeep=function(e){return lr(e,5)},Bn.cloneDeepWith=function(e,t){return lr(e,5,t="function"==typeof t?t:i)},Bn.cloneWith=function(e,t){return lr(e,4,t="function"==typeof t?t:i)},Bn.conformsTo=function(e,t){return null==t||cr(e,t,Os(t))},Bn.deburr=Ws,Bn.defaultTo=function(e,t){return null==e||e!==e?t:e},Bn.divide=yl,Bn.endsWith=function(e,t,n){e=xs(e),t=ci(t);var r=e.length,o=n=n===i?r:sr(ms(n),0,r);return(n-=t.length)>=0&&e.slice(n,o)==t},Bn.eq=Ba,Bn.escape=function(e){return(e=xs(e))&&X.test(e)?e.replace(Z,an):e},Bn.escapeRegExp=function(e){return(e=xs(e))&&oe.test(e)?e.replace(ie,"\\$&"):e},Bn.every=function(e,t,n){var r=Ua(e)?Ot:mr;return n&&bo(e,t,n)&&(t=i),r(e,lo(t,3))},Bn.find=ga,Bn.findIndex=Wo,Bn.findKey=function(e,t){return zt(e,lo(t,3),br)},Bn.findLast=va,Bn.findLastIndex=Uo,Bn.findLastKey=function(e,t){return zt(e,lo(t,3),jr)},Bn.floor=bl,Bn.forEach=xa,Bn.forEachRight=ya,Bn.forIn=function(e,t){return null==e?e:xr(e,lo(t,3),Rs)},Bn.forInRight=function(e,t){return null==e?e:yr(e,lo(t,3),Rs)},Bn.forOwn=function(e,t){return e&&br(e,lo(t,3))},Bn.forOwnRight=function(e,t){return e&&jr(e,lo(t,3))},Bn.get=As,Bn.gt=za,Bn.gte=Ha,Bn.has=function(e,t){return null!=e&&go(e,t,kr)},Bn.hasIn=ks,Bn.head=Go,Bn.identity=rl,Bn.includes=function(e,t,n,r){e=Ga(e)?e:Bs(e),n=n&&!r?ms(n):0;var i=e.length;return n<0&&(n=Yt(i+n,0)),ss(e)?n<=i&&e.indexOf(t,n)>-1:!!i&&Wt(e,t,n)>-1},Bn.indexOf=function(e,t,n){var r=null==e?0:e.length;if(!r)return-1;var i=null==n?0:ms(n);return i<0&&(i=Yt(r+i,0)),Wt(e,t,i)},Bn.inRange=function(e,t,n){return t=hs(t),n===i?(n=t,t=0):n=hs(n),function(e,t,n){return e>=yn(t,n)&&e<Yt(t,n)}(e=gs(e),t,n)},Bn.invoke=Ms,Bn.isArguments=Wa,Bn.isArray=Ua,Bn.isArrayBuffer=Va,Bn.isArrayLike=Ga,Bn.isArrayLikeObject=qa,Bn.isBoolean=function(e){return!0===e||!1===e||ts(e)&&Sr(e)==b},Bn.isBuffer=Ya,Bn.isDate=Za,Bn.isElement=function(e){return ts(e)&&1===e.nodeType&&!is(e)},Bn.isEmpty=function(e){if(null==e)return!0;if(Ga(e)&&(Ua(e)||"string"==typeof e||"function"==typeof e.splice||Ya(e)||cs(e)||Wa(e)))return!e.length;var t=fo(e);if(t==S||t==M)return!e.size;if(wo(e))return!Lr(e).length;for(var n in e)if(Ne.call(e,n))return!1;return!0},Bn.isEqual=function(e,t){return Rr(e,t)},Bn.isEqualWith=function(e,t,n){var r=(n="function"==typeof n?n:i)?n(e,t):i;return r===i?Rr(e,t,i,n):!!r},Bn.isError=Ka,Bn.isFinite=function(e){return"number"==typeof e&&yt(e)},Bn.isFunction=Xa,Bn.isInteger=Qa,Bn.isLength=Ja,Bn.isMap=ns,Bn.isMatch=function(e,t){return e===t||Pr(e,t,uo(t))},Bn.isMatchWith=function(e,t,n){return n="function"==typeof n?n:i,Pr(e,t,uo(t),n)},Bn.isNaN=function(e){return rs(e)&&e!=+e},Bn.isNative=function(e){if(Co(e))throw new se("Unsupported core-js use. Try https://npms.io/search?q=ponyfill.");return Dr(e)},Bn.isNil=function(e){return null==e},Bn.isNull=function(e){return null===e},Bn.isNumber=rs,Bn.isObject=es,Bn.isObjectLike=ts,Bn.isPlainObject=is,Bn.isRegExp=os,Bn.isSafeInteger=function(e){return Qa(e)&&e>=-9007199254740991&&e<=m},Bn.isSet=as,Bn.isString=ss,Bn.isSymbol=ls,Bn.isTypedArray=cs,Bn.isUndefined=function(e){return e===i},Bn.isWeakMap=function(e){return ts(e)&&fo(e)==P},Bn.isWeakSet=function(e){return ts(e)&&"[object WeakSet]"==Sr(e)},Bn.join=function(e,t){return null==e?"":bt.call(e,t)},Bn.kebabCase=Us,Bn.last=Ko,Bn.lastIndexOf=function(e,t,n){var r=null==e?0:e.length;if(!r)return-1;var o=r;return n!==i&&(o=(o=ms(n))<0?Yt(r+o,0):yn(o,r-1)),t===t?function(e,t,n){for(var r=n+1;r--;)if(e[r]===t)return r;return r}(e,t,o):Ht(e,Vt,o,!0)},Bn.lowerCase=Vs,Bn.lowerFirst=Gs,Bn.lt=ds,Bn.lte=us,Bn.max=function(e){return e&&e.length?fr(e,rl,Ar):i},Bn.maxBy=function(e,t){return e&&e.length?fr(e,lo(t,2),Ar):i},Bn.mean=function(e){return Gt(e,rl)},Bn.meanBy=function(e,t){return Gt(e,lo(t,2))},Bn.min=function(e){return e&&e.length?fr(e,rl,Fr):i},Bn.minBy=function(e,t){return e&&e.length?fr(e,lo(t,2),Fr):i},Bn.stubArray=fl,Bn.stubFalse=gl,Bn.stubObject=function(){return{}},Bn.stubString=function(){return""},Bn.stubTrue=function(){return!0},Bn.multiply=jl,Bn.nth=function(e,t){return e&&e.length?Wr(e,ms(t)):i},Bn.noConflict=function(){return ft._===this&&(ft._=Be),this},Bn.noop=ll,Bn.now=Aa,Bn.pad=function(e,t,n){e=xs(e);var r=(t=ms(t))?mn(e):0;if(!t||r>=t)return e;var i=(t-r)/2;return Ui(mt(i),n)+e+Ui(ht(i),n)},Bn.padEnd=function(e,t,n){e=xs(e);var r=(t=ms(t))?mn(e):0;return t&&r<t?e+Ui(t-r,n):e},Bn.padStart=function(e,t,n){e=xs(e);var r=(t=ms(t))?mn(e):0;return t&&r<t?Ui(t-r,n)+e:e},Bn.parseInt=function(e,t,n){return n||null==t?t=0:t&&(t=+t),jn(xs(e).replace(ae,""),t||0)},Bn.random=function(e,t,n){if(n&&"boolean"!=typeof n&&bo(e,t,n)&&(t=n=i),n===i&&("boolean"==typeof t?(n=t,t=i):"boolean"==typeof e&&(n=e,e=i)),e===i&&t===i?(e=0,t=1):(e=hs(e),t===i?(t=e,e=0):t=hs(t)),e>t){var r=e;e=t,t=r}if(n||e%1||t%1){var o=_n();return yn(e+o*(t-e+ut("1e-"+((o+"").length-1))),t)}return Yr(e,t)},Bn.reduce=function(e,t,n){var r=Ua(e)?It:Zt,i=arguments.length<3;return r(e,lo(t,4),n,i,pr)},Bn.reduceRight=function(e,t,n){var r=Ua(e)?Ft:Zt,i=arguments.length<3;return r(e,lo(t,4),n,i,hr)},Bn.repeat=function(e,t,n){return t=(n?bo(e,t,n):t===i)?1:ms(t),Zr(xs(e),t)},Bn.replace=function(){var e=arguments,t=xs(e[0]);return e.length<3?t:t.replace(e[1],e[2])},Bn.result=function(e,t,n){var r=-1,o=(t=yi(t,e)).length;for(o||(o=1,e=i);++r<o;){var a=null==e?i:e[Io(t[r])];a===i&&(r=o,a=n),e=Xa(a)?a.call(e):a}return e},Bn.round=_l,Bn.runInContext=e,Bn.sample=function(e){return(Ua(e)?Xn:Xr)(e)},Bn.size=function(e){if(null==e)return 0;if(Ga(e))return ss(e)?mn(e):e.length;var t=fo(e);return t==S||t==M?e.size:Lr(e).length},Bn.snakeCase=qs,Bn.some=function(e,t,n){var r=Ua(e)?$t:ii;return n&&bo(e,t,n)&&(t=i),r(e,lo(t,3))},Bn.sortedIndex=function(e,t){return oi(e,t)},Bn.sortedIndexBy=function(e,t,n){return ai(e,t,lo(n,2))},Bn.sortedIndexOf=function(e,t){var n=null==e?0:e.length;if(n){var r=oi(e,t);if(r<n&&Ba(e[r],t))return r}return-1},Bn.sortedLastIndex=function(e,t){return oi(e,t,!0)},Bn.sortedLastIndexBy=function(e,t,n){return ai(e,t,lo(n,2),!0)},Bn.sortedLastIndexOf=function(e,t){if(null==e?0:e.length){var n=oi(e,t,!0)-1;if(Ba(e[n],t))return n}return-1},Bn.startCase=Ys,Bn.startsWith=function(e,t,n){return e=xs(e),n=null==n?0:sr(ms(n),0,e.length),t=ci(t),e.slice(n,n+t.length)==t},Bn.subtract=Cl,Bn.sum=function(e){return e&&e.length?Kt(e,rl):0},Bn.sumBy=function(e,t){return e&&e.length?Kt(e,lo(t,2)):0},Bn.template=function(e,t,n){var r=Bn.templateSettings;n&&bo(e,t,n)&&(t=i),e=xs(e),t=js({},t,r,Qi);var o,a,s=js({},t.imports,r.imports,Qi),l=Os(s),c=en(s,l),d=0,u=t.interpolate||_e,p="__p += '",h=ke((t.escape||_e).source+"|"+u.source+"|"+(u===ee?me:_e).source+"|"+(t.evaluate||_e).source+"|$","g"),m="//# sourceURL="+(Ne.call(t,"sourceURL")?(t.sourceURL+"").replace(/\s/g," "):"lodash.templateSources["+ ++st+"]")+"\n";e.replace(h,function(t,n,r,i,s,l){return r||(r=i),p+=e.slice(d,l).replace(Ce,sn),n&&(o=!0,p+="' +\n__e("+n+") +\n'"),s&&(a=!0,p+="';\n"+s+";\n__p += '"),r&&(p+="' +\n((__t = ("+r+")) == null ? '' : __t) +\n'"),d=l+t.length,t}),p+="';\n";var f=Ne.call(t,"variable")&&t.variable;if(f){if(pe.test(f))throw new se("Invalid `variable` option passed into `_.template`")}else p="with (obj) {\n"+p+"\n}\n";p=(a?p.replace(V,""):p).replace(G,"$1").replace(q,"$1;"),p="function("+(f||"obj")+") {\n"+(f?"":"obj || (obj = {});\n")+"var __t, __p = ''"+(o?", __e = _.escape":"")+(a?", __j = Array.prototype.join;\nfunction print() { __p += __j.call(arguments, '') }\n":";\n")+p+"return __p\n}";var g=Qs(function(){return we(l,m+"return "+p).apply(i,c)});if(g.source=p,Ka(g))throw g;return g},Bn.times=function(e,t){if((e=ms(e))<1||e>m)return[];var n=g,r=yn(e,g);t=lo(t),e-=g;for(var i=Xt(r,t);++n<e;)t(n);return i},Bn.toFinite=hs,Bn.toInteger=ms,Bn.toLength=fs,Bn.toLower=function(e){return xs(e).toLowerCase()},Bn.toNumber=gs,Bn.toSafeInteger=function(e){return e?sr(ms(e),-9007199254740991,m):0===e?e:0},Bn.toString=xs,Bn.toUpper=function(e){return xs(e).toUpperCase()},Bn.trim=function(e,t,n){if((e=xs(e))&&(n||t===i))return Qt(e);if(!e||!(t=ci(t)))return e;var r=fn(e),o=fn(t);return ji(r,nn(r,o),rn(r,o)+1).join("")},Bn.trimEnd=function(e,t,n){if((e=xs(e))&&(n||t===i))return e.slice(0,gn(e)+1);if(!e||!(t=ci(t)))return e;var r=fn(e);return ji(r,0,rn(r,fn(t))+1).join("")},Bn.trimStart=function(e,t,n){if((e=xs(e))&&(n||t===i))return e.replace(ae,"");if(!e||!(t=ci(t)))return e;var r=fn(e);return ji(r,nn(r,fn(t))).join("")},Bn.truncate=function(e,t){var n=30,r="...";if(es(t)){var o="separator"in t?t.separator:o;n="length"in t?ms(t.length):n,r="omission"in t?ci(t.omission):r}var a=(e=xs(e)).length;if(ln(e)){var s=fn(e);a=s.length}if(n>=a)return e;var l=n-mn(r);if(l<1)return r;var c=s?ji(s,0,l).join(""):e.slice(0,l);if(o===i)return c+r;if(s&&(l+=c.length-l),os(o)){if(e.slice(l).search(o)){var d,u=c;for(o.global||(o=ke(o.source,xs(fe.exec(o))+"g")),o.lastIndex=0;d=o.exec(u);)var p=d.index;c=c.slice(0,p===i?l:p)}}else if(e.indexOf(ci(o),l)!=l){var h=c.lastIndexOf(o);h>-1&&(c=c.slice(0,h))}return c+r},Bn.unescape=function(e){return(e=xs(e))&&K.test(e)?e.replace(Y,vn):e},Bn.uniqueId=function(e){var t=++Le;return xs(e)+t},Bn.upperCase=Zs,Bn.upperFirst=Ks,Bn.each=xa,Bn.eachRight=ya,Bn.first=Go,sl(Bn,function(){var e={};return br(Bn,function(t,n){Ne.call(Bn.prototype,n)||(e[n]=t)}),e}(),{chain:!1}),Bn.VERSION="4.17.21",Et(["bind","bindKey","curry","curryRight","partial","partialRight"],function(e){Bn[e].placeholder=Bn}),Et(["drop","take"],function(e,t){Un.prototype[e]=function(n){n=n===i?1:Yt(ms(n),0);var r=this.__filtered__&&!t?new Un(this):this.clone();return r.__filtered__?r.__takeCount__=yn(n,r.__takeCount__):r.__views__.push({size:yn(n,g),type:e+(r.__dir__<0?"Right":"")}),r},Un.prototype[e+"Right"]=function(t){return this.reverse()[e](t).reverse()}}),Et(["filter","map","takeWhile"],function(e,t){var n=t+1,r=1==n||3==n;Un.prototype[e]=function(e){var t=this.clone();return t.__iteratees__.push({iteratee:lo(e,3),type:n}),t.__filtered__=t.__filtered__||r,t}}),Et(["head","last"],function(e,t){var n="take"+(t?"Right":"");Un.prototype[e]=function(){return this[n](1).value()[0]}}),Et(["initial","tail"],function(e,t){var n="drop"+(t?"":"Right");Un.prototype[e]=function(){return this.__filtered__?new Un(this):this[n](1)}}),Un.prototype.compact=function(){return this.filter(rl)},Un.prototype.find=function(e){return this.filter(e).head()},Un.prototype.findLast=function(e){return this.reverse().find(e)},Un.prototype.invokeMap=Kr(function(e,t){return"function"==typeof e?new Un(this):this.map(function(n){return Mr(n,e,t)})}),Un.prototype.reject=function(e){return this.filter(Na(lo(e)))},Un.prototype.slice=function(e,t){e=ms(e);var n=this;return n.__filtered__&&(e>0||t<0)?new Un(n):(e<0?n=n.takeRight(-e):e&&(n=n.drop(e)),t!==i&&(n=(t=ms(t))<0?n.dropRight(-t):n.take(t-e)),n)},Un.prototype.takeRightWhile=function(e){return this.reverse().takeWhile(e).reverse()},Un.prototype.toArray=function(){return this.take(g)},br(Un.prototype,function(e,t){var n=/^(?:filter|find|map|reject)|While$/.test(t),r=/^(?:head|last)$/.test(t),o=Bn[r?"take"+("last"==t?"Right":""):t],a=r||/^find/.test(t);o&&(Bn.prototype[t]=function(){var t=this.__wrapped__,s=r?[1]:arguments,l=t instanceof Un,c=s[0],d=l||Ua(t),u=function(e){var t=o.apply(Bn,Lt([e],s));return r&&p?t[0]:t};d&&n&&"function"==typeof c&&1!=c.length&&(l=d=!1);var p=this.__chain__,h=!!this.__actions__.length,m=a&&!p,f=l&&!h;if(!a&&d){t=f?t:new Un(this);var g=e.apply(t,s);return g.__actions__.push({func:ha,args:[u],thisArg:i}),new Wn(g,p)}return m&&f?e.apply(this,s):(g=this.thru(u),m?r?g.value()[0]:g.value():g)})}),Et(["pop","push","shift","sort","splice","unshift"],function(e){var t=Me[e],n=/^(?:push|sort|unshift)$/.test(e)?"tap":"thru",r=/^(?:pop|shift)$/.test(e);Bn.prototype[e]=function(){var e=arguments;if(r&&!this.__chain__){var i=this.value();return t.apply(Ua(i)?i:[],e)}return this[n](function(n){return t.apply(Ua(n)?n:[],e)})}}),br(Un.prototype,function(e,t){var n=Bn[t];if(n){var r=n.name+"";Ne.call(On,r)||(On[r]=[]),On[r].push({name:t,func:n})}}),On[Bi(i,2).name]=[{name:"wrapper",func:i}],Un.prototype.clone=function(){var e=new Un(this.__wrapped__);return e.__actions__=Ei(this.__actions__),e.__dir__=this.__dir__,e.__filtered__=this.__filtered__,e.__iteratees__=Ei(this.__iteratees__),e.__takeCount__=this.__takeCount__,e.__views__=Ei(this.__views__),e},Un.prototype.reverse=function(){if(this.__filtered__){var e=new Un(this);e.__dir__=-1,e.__filtered__=!0}else(e=this.clone()).__dir__*=-1;return e},Un.prototype.value=function(){var e=this.__wrapped__.value(),t=this.__dir__,n=Ua(e),r=t<0,i=n?e.length:0,o=function(e,t,n){var r=-1,i=n.length;for(;++r<i;){var o=n[r],a=o.size;switch(o.type){case"drop":e+=a;break;case"dropRight":t-=a;break;case"take":t=yn(t,e+a);break;case"takeRight":e=Yt(e,t-a)}}return{start:e,end:t}}(0,i,this.__views__),a=o.start,s=o.end,l=s-a,c=r?s:a-1,d=this.__iteratees__,u=d.length,p=0,h=yn(l,this.__takeCount__);if(!n||!r&&i==l&&h==l)return mi(e,this.__actions__);var m=[];e:for(;l--&&p<h;){for(var f=-1,g=e[c+=t];++f<u;){var v=d[f],x=v.iteratee,y=v.type,b=x(g);if(2==y)g=b;else if(!b){if(1==y)continue e;break e}}m[p++]=g}return m},Bn.prototype.at=ma,Bn.prototype.chain=function(){return pa(this)},Bn.prototype.commit=function(){return new Wn(this.value(),this.__chain__)},Bn.prototype.next=function(){this.__values__===i&&(this.__values__=ps(this.value()));var e=this.__index__>=this.__values__.length;return{done:e,value:e?i:this.__values__[this.__index__++]}},Bn.prototype.plant=function(e){for(var t,n=this;n instanceof Hn;){var r=$o(n);r.__index__=0,r.__values__=i,t?o.__wrapped__=r:t=r;var o=r;n=n.__wrapped__}return o.__wrapped__=e,t},Bn.prototype.reverse=function(){var e=this.__wrapped__;if(e instanceof Un){var t=e;return this.__actions__.length&&(t=new Un(this)),(t=t.reverse()).__actions__.push({func:ha,args:[ea],thisArg:i}),new Wn(t,this.__chain__)}return this.thru(ea)},Bn.prototype.toJSON=Bn.prototype.valueOf=Bn.prototype.value=function(){return mi(this.__wrapped__,this.__actions__)},Bn.prototype.first=Bn.prototype.head,Xe&&(Bn.prototype[Xe]=function(){return this}),Bn}();ft._=xn,(r=function(){return xn}.call(t,n,t,e))===i||(e.exports=r)}.call(this)},53871:e=>{e.exports=function(e,t,n){var r=-1,i=e.length;t<0&&(t=-t>i?0:i+t),(n=n>i?i:n)<0&&(n+=i),i=t>n?0:n-t>>>0,t>>>=0;for(var o=Array(i);++r<i;)o[r]=e[r+t];return o}},54052:e=>{var t=Array.isArray;e.exports=t},54160:e=>{e.exports=function(e){var t=-1,n=Array(e.size);return e.forEach(function(e,r){n[++t]=[r,e]}),n}},54238:(e,t,n)=>{var r,i,o=n(93795),a=n(83950),s=0,l=0;e.exports=function(e,t,n){var c=t&&n||0,d=t||[],u=(e=e||{}).node||r,p=void 0!==e.clockseq?e.clockseq:i;if(null==u||null==p){var h=o();null==u&&(u=r=[1|h[0],h[1],h[2],h[3],h[4],h[5]]),null==p&&(p=i=16383&(h[6]<<8|h[7]))}var m=void 0!==e.msecs?e.msecs:(new Date).getTime(),f=void 0!==e.nsecs?e.nsecs:l+1,g=m-s+(f-l)/1e4;if(g<0&&void 0===e.clockseq&&(p=p+1&16383),(g<0||m>s)&&void 0===e.nsecs&&(f=0),f>=1e4)throw new Error("uuid.v1(): Can't create more than 10M uuids/sec");s=m,l=f,i=p;var v=(1e4*(268435455&(m+=122192928e5))+f)%4294967296;d[c++]=v>>>24&255,d[c++]=v>>>16&255,d[c++]=v>>>8&255,d[c++]=255&v;var x=m/4294967296*1e4&268435455;d[c++]=x>>>8&255,d[c++]=255&x,d[c++]=x>>>24&15|16,d[c++]=x>>>16&255,d[c++]=p>>>8|128,d[c++]=255&p;for(var y=0;y<6;++y)d[c+y]=u[y];return t||a(d)}},54320:(e,t,n)=>{var r=n(83713),i=n(26924),o=n(22777),a=n(54052),s=n(6571),l=n(44543),c=n(36140),d=n(51268),u=Object.prototype.hasOwnProperty;e.exports=function(e){if(null==e)return!0;if(s(e)&&(a(e)||"string"==typeof e||"function"==typeof e.splice||l(e)||d(e)||o(e)))return!e.length;var t=i(e);if("[object Map]"==t||"[object Set]"==t)return!e.size;if(c(e))return!r(e).length;for(var n in e)if(u.call(e,n))return!1;return!0}},54444:(e,t,n)=>{"use strict";var r=n(24994);t.A=void 0;var i=r(n(40039)),o=n(70579);t.A=(0,i.default)((0,o.jsx)("path",{d:"M7.58 4.08 6.15 2.65C3.75 4.48 2.17 7.3 2.03 10.5h2c.15-2.65 1.51-4.97 3.55-6.42m12.39 6.42h2c-.15-3.2-1.73-6.02-4.12-7.85l-1.42 1.43c2.02 1.45 3.39 3.77 3.54 6.42M18 11c0-3.07-1.64-5.64-4.5-6.32V4c0-.83-.67-1.5-1.5-1.5s-1.5.67-1.5 1.5v.68C7.63 5.36 6 7.92 6 11v5l-2 2v1h16v-1l-2-2zm-6 11c.14 0 .27-.01.4-.04.65-.14 1.18-.58 1.44-1.18.1-.24.15-.5.15-.78h-4c.01 1.1.9 2 2.01 2"}),"NotificationsActive")},54469:(e,t,n)=>{"use strict";var r=n(24994);t.A=void 0;var i=r(n(40039)),o=n(70579);t.A=(0,i.default)((0,o.jsx)("path",{d:"M8 5v14l11-7z"}),"PlayArrow")},54516:(e,t,n)=>{"use strict";n.d(t,{A:()=>r});const r=n(51052).A},54536:(e,t,n)=>{"use strict";var r=n(24994);t.A=void 0;var i=r(n(40039)),o=n(70579);t.A=(0,i.default)((0,o.jsx)("path",{d:"M7.41 8.59 12 13.17l4.59-4.58L18 10l-6 6-6-6z"}),"KeyboardArrowDown")},54575:e=>{"use strict";function t(e){this._maxSize=e,this.clear()}t.prototype.clear=function(){this._size=0,this._values=Object.create(null)},t.prototype.get=function(e){return this._values[e]},t.prototype.set=function(e,t){return this._size>=this._maxSize&&this.clear(),e in this._values||this._size++,this._values[e]=t};var n=/[^.^\]^[]+|(?=\[\]|\.\.)/g,r=/^\d+$/,i=/^\d/,o=/[~`!#$%\^&*+=\-\[\]\\';,/{}|\\":<>\?]/g,a=/^\s*(['"]?)(.*?)(\1)\s*$/,s=new t(512),l=new t(512),c=new t(512);function d(e){return s.get(e)||s.set(e,u(e).map(function(e){return e.replace(a,"$2")}))}function u(e){return e.match(n)||[""]}function p(e){return"string"===typeof e&&e&&-1!==["'",'"'].indexOf(e.charAt(0))}function h(e){return!p(e)&&(function(e){return e.match(i)&&!e.match(r)}(e)||function(e){return o.test(e)}(e))}e.exports={Cache:t,split:u,normalizePath:d,setter:function(e){var t=d(e);return l.get(e)||l.set(e,function(e,n){for(var r=0,i=t.length,o=e;r<i-1;){var a=t[r];if("__proto__"===a||"constructor"===a||"prototype"===a)return e;o=o[t[r++]]}o[t[r]]=n})},getter:function(e,t){var n=d(e);return c.get(e)||c.set(e,function(e){for(var r=0,i=n.length;r<i;){if(null==e&&t)return;e=e[n[r++]]}return e})},join:function(e){return e.reduce(function(e,t){return e+(p(t)||r.test(t)?"["+t+"]":(e?".":"")+t)},"")},forEach:function(e,t,n){!function(e,t,n){var r,i,o,a,s=e.length;for(i=0;i<s;i++)(r=e[i])&&(h(r)&&(r='"'+r+'"'),o=!(a=p(r))&&/^\d+$/.test(r),t.call(n,r,a,o,i,e))}(Array.isArray(e)?e:u(e),t,n)}}},54878:(e,t,n)=>{e=n.nmd(e),ace.define("ace/split",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/lib/event_emitter","ace/editor","ace/virtual_renderer","ace/edit_session"],function(e,t,n){"use strict";var r,i=e("./lib/oop"),o=(e("./lib/lang"),e("./lib/event_emitter").EventEmitter),a=e("./editor").Editor,s=e("./virtual_renderer").VirtualRenderer,l=e("./edit_session").EditSession;(function(){i.implement(this,o),this.$createEditor=function(){var e=document.createElement("div");e.className=this.$editorCSS,e.style.cssText="position: absolute; top:0px; bottom:0px",this.$container.appendChild(e);var t=new a(new s(e,this.$theme));return t.on("focus",function(){this._emit("focus",t)}.bind(this)),this.$editors.push(t),t.setFontSize(this.$fontSize),t},this.setSplits=function(e){var t;if(e<1)throw"The number of splits have to be > 0!";if(e!=this.$splits){if(e>this.$splits){for(;this.$splits<this.$editors.length&&this.$splits<e;)t=this.$editors[this.$splits],this.$container.appendChild(t.container),t.setFontSize(this.$fontSize),this.$splits++;for(;this.$splits<e;)this.$createEditor(),this.$splits++}else for(;this.$splits>e;)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;n=null==t?this.$cEditor:this.$editors[t];var r=this.$editors.some(function(t){return t.session===e});return r&&(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 r=t/this.$splits,i=0;i<this.$splits;i++)(e=this.$editors[i]).container.style.width=r+"px",e.container.style.top="0px",e.container.style.left=i*r+"px",e.container.style.height=n+"px",e.resize();else{var o=n/this.$splits;for(i=0;i<this.$splits;i++)(e=this.$editors[i]).container.style.width=t+"px",e.container.style.top=i*o+"px",e.container.style.left="0px",e.container.style.height=o+"px",e.resize()}}}).call((r=function(e,t,n){this.BELOW=1,this.BESIDE=0,this.$container=e,this.$theme=t,this.$splits=0,this.$editorCSS="",this.$editors=[],this.$orientation=this.BESIDE,this.setSplits(n||1),this.$cEditor=this.$editors[0],this.on("focus",function(e){this.$cEditor=e}.bind(this))}).prototype),t.Split=r}),ace.define("ace/ext/split",["require","exports","module","ace/ext/split","ace/split"],function(e,t,n){"use strict";n.exports=e("../split")}),ace.require(["ace/ext/split"],function(t){e&&(e.exports=t)})},54893:e=>{e.exports=function(e,t){if(null==e)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(-1!==t.indexOf(r))continue;n[r]=e[r]}return n},e.exports.__esModule=!0,e.exports.default=e.exports},55013:(e,t,n)=>{"use strict";n.d(t,{A:()=>r});const r=n(84440).A},55119:(e,t,n)=>{var r=n(96614),i=n(30474);e.exports=function(e,t){return e&&r(t,i(t),e)}},55636:(e,t,n)=>{var r=n(31170),i=Math.max;e.exports=function(e,t,n){return t=i(void 0===t?e.length-1:t,0),function(){for(var o=arguments,a=-1,s=i(o.length-t,0),l=Array(s);++a<s;)l[a]=o[t+a];a=-1;for(var c=Array(t+1);++a<t;)c[a]=o[a];return c[t]=n(l),r(e,this,c)}}},55647:(e,t,n)=>{var r=n(33279),i=n(55636),o=n(46350);e.exports=function(e,t){return o(i(e,t,r),e+"")}},55722:(e,t,n)=>{"use strict";var r=n(24994);t.A=void 0;var i=r(n(40039)),o=n(70579);t.A=(0,i.default)((0,o.jsx)("path",{d:"M19 4h-1V2h-2v2H8V2H6v2H5c-1.11 0-1.99.9-1.99 2L3 20c0 1.1.89 2 2 2h14c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2m0 16H5V10h14zM9 14H7v-2h2zm4 0h-2v-2h2zm4 0h-2v-2h2zm-8 4H7v-2h2zm4 0h-2v-2h2zm4 0h-2v-2h2z"}),"CalendarMonth")},55906:e=>{e.exports=function(e){return function(t,n,r){for(var i=-1,o=Object(t),a=r(t),s=a.length;s--;){var l=a[e?s:++i];if(!1===n(o[l],l,o))break}return t}}},56173:e=>{e.exports=function(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=9007199254740991}},56326:(e,t,n)=>{var r=n(48895),i=n(85990),o=n(69621),a=n(57828),s=Object.getOwnPropertySymbols?function(e){for(var t=[];e;)r(t,o(e)),e=i(e);return t}:a;e.exports=s},56434:(e,t,n)=>{var r=n(97132);e.exports=function(e){return r(e,5)}},56438:(e,t,n)=>{"use strict";var r=n(86267);e.exports=function(e,t){t=t||{};var n={};function i(e,t){return r.isPlainObject(e)&&r.isPlainObject(t)?r.merge(e,t):r.isPlainObject(t)?r.merge({},t):r.isArray(t)?t.slice():t}function o(n){return r.isUndefined(t[n])?r.isUndefined(e[n])?void 0:i(void 0,e[n]):i(e[n],t[n])}function a(e){if(!r.isUndefined(t[e]))return i(void 0,t[e])}function s(n){return r.isUndefined(t[n])?r.isUndefined(e[n])?void 0:i(void 0,e[n]):i(void 0,t[n])}function l(n){return n in t?i(e[n],t[n]):n in e?i(void 0,e[n]):void 0}var c={url:a,method:a,data:a,baseURL:s,transformRequest:s,transformResponse:s,paramsSerializer:s,timeout:s,timeoutMessage:s,withCredentials:s,adapter:s,responseType:s,xsrfCookieName:s,xsrfHeaderName:s,onUploadProgress:s,onDownloadProgress:s,decompress:s,maxContentLength:s,maxBodyLength:s,beforeRedirect:s,transport:s,httpAgent:s,httpsAgent:s,cancelToken:s,socketPath:s,responseEncoding:s,validateStatus:l};return r.forEach(Object.keys(e).concat(Object.keys(t)),function(e){var t=c[e]||o,i=t(e);r.isUndefined(i)&&t!==l||(n[e]=i)}),n}},56552:(e,t,n)=>{var r=n(37105),i="object"==typeof self&&self&&self.Object===Object&&self,o=r||i||Function("return this")();e.exports=o},56559:(e,t,n)=>{"use strict";var r=n(24994);t.A=void 0;var i=r(n(40039)),o=n(70579);t.A=(0,i.default)([(0,o.jsx)("path",{d:"M12 5.99 19.53 19H4.47zM12 2 1 21h22z"},"0"),(0,o.jsx)("path",{d:"M13 16h-2v2h2zm0-6h-2v5h2z"},"1")],"WarningAmber")},56603:(e,t,n)=>{e=n.nmd(e),function(){var e=function(){return this}();e||"undefined"==typeof window||(e=window);var t=function(e,n,r){"string"===typeof e?(2==arguments.length&&(r=n),t.modules[e]||(t.payloads[e]=r,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=function(e,t,n){if("string"===typeof t){var i=o(e,t);if(void 0!=i)return n&&n(),i}else if("[object Array]"===Object.prototype.toString.call(t)){for(var a=[],s=0,l=t.length;s<l;++s){var c=o(e,t[s]);if(void 0==c&&r.original)return;a.push(c)}return n&&n.apply(null,a)||!0}},r=function(e,t){var i=n("",e,t);return void 0==i&&r.original?r.original.apply(this,arguments):i},i=function(e,t){if(-1!==t.indexOf("!")){var n=t.split("!");return i(e,n[0])+"!"+i(e,n[1])}if("."==t.charAt(0))for(t=e.split("/").slice(0,-1).join("/")+"/"+t;-1!==t.indexOf(".")&&r!=t;){var r=t;t=t.replace(/\/\.\//,"/").replace(/[^\/]+\/\.\.\//,"")}return t},o=function(e,r){r=i(e,r);var o=t.modules[r];if(!o){if("function"===typeof(o=t.payloads[r])){var a={},s={id:r,uri:"",exports:a,packaged:!0};a=o(function(e,t){return n(r,e,t)},a,s)||s.exports,t.modules[r]=a,delete t.payloads[r]}o=t.modules[r]=a||o}return o};!function(n){var i=e;n&&(e[n]||(e[n]={}),i=e[n]),i.define&&i.define.packaged||(t.original=i.define,i.define=t,i.define.packaged=!0),i.require&&i.require.packaged||(r.original=i.require,i.require=r,i.require.packaged=!0)}("ace")}(),ace.define("ace/lib/es6-shim",["require","exports","module"],function(e,t,n){function r(e,t,n){Object.defineProperty(e,t,{value:n,enumerable:!1,writable:!0,configurable:!0})}String.prototype.startsWith||r(String.prototype,"startsWith",function(e,t){return t=t||0,this.lastIndexOf(e,t)===t}),String.prototype.endsWith||r(String.prototype,"endsWith",function(e,t){var n=this;(void 0===t||t>n.length)&&(t=n.length),t-=e.length;var r=n.indexOf(e,t);return-1!==r&&r===t}),String.prototype.repeat||r(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||r(String.prototype,"includes",function(e,t){return-1!=this.indexOf(e,t)}),Object.assign||(Object.assign=function(e){if(void 0===e||null===e)throw new TypeError("Cannot convert undefined or null to object");for(var t=Object(e),n=1;n<arguments.length;n++){var r=arguments[n];void 0!==r&&null!==r&&Object.keys(r).forEach(function(e){t[e]=r[e]})}return t}),Object.values||(Object.values=function(e){return Object.keys(e).map(function(t){return e[t]})}),Array.prototype.find||r(Array.prototype,"find",function(e){for(var t=this.length,n=arguments[1],r=0;r<t;r++){var i=this[r];if(e.call(n,i,r,this))return i}}),Array.prototype.findIndex||r(Array.prototype,"findIndex",function(e){for(var t=this.length,n=arguments[1],r=0;r<t;r++){var i=this[r];if(e.call(n,i,r,this))return r}}),Array.prototype.includes||r(Array.prototype,"includes",function(e,t){return-1!=this.indexOf(e,t)}),Array.prototype.fill||r(Array.prototype,"fill",function(e){for(var t=this,n=t.length>>>0,r=arguments[1]|0,i=r<0?Math.max(n+r,0):Math.min(r,n),o=arguments[2],a=void 0===o?n:o|0,s=a<0?Math.max(n+a,0):Math.min(a,n);i<s;)t[i]=e,i++;return t}),Array.of||r(Array,"of",function(){return Array.prototype.slice.call(arguments)})}),ace.define("ace/lib/fixoldbrowsers",["require","exports","module","ace/lib/es6-shim"],function(e,t,n){"use strict";e("./es6-shim")}),ace.define("ace/lib/deep_copy",["require","exports","module"],function(e,t,n){t.deepCopy=function e(t){if("object"!==typeof t||!t)return t;var n;if(Array.isArray(t)){n=[];for(var r=0;r<t.length;r++)n[r]=e(t[r]);return n}if("[object Object]"!==Object.prototype.toString.call(t))return t;for(var r in n={},t)n[r]=e(t[r]);return n}}),ace.define("ace/lib/lang",["require","exports","module","ace/lib/deep_copy"],function(e,t,n){"use strict";t.last=function(e){return e[e.length-1]},t.stringReverse=function(e){return e.split("").reverse().join("")},t.stringRepeat=function(e,t){for(var n="";t>0;)1&t&&(n+=e),(t>>=1)&&(e+=e);return n};var r=/^\s\s*/,i=/\s\s*$/;t.stringTrimLeft=function(e){return e.replace(r,"")},t.stringTrimRight=function(e){return e.replace(i,"")},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,r=e.length;n<r;n++)e[n]&&"object"==typeof e[n]?t[n]=this.copyObject(e[n]):t[n]=e[n];return t},t.deepCopy=e("./deep_copy").deepCopy,t.arrayToMap=function(e){for(var t={},n=0;n<e.length;n++)t[e[n]]=1;return t},t.createMap=function(e){var t=Object.create(null);for(var n in e)t[n]=e[n];return t},t.arrayRemove=function(e,t){for(var n=0;n<=e.length;n++)t===e[n]&&e.splice(n,1)},t.escapeRegExp=function(e){return e.replace(/([.*+?^${}()|[\]\/\\])/g,"\\$1")},t.escapeHTML=function(e){return(""+e).replace(/&/g,"&#38;").replace(/"/g,"&#34;").replace(/'/g,"&#39;").replace(/</g,"&#60;")},t.getMatchOffsets=function(e,t){var n=[];return e.replace(t,function(e){n.push({offset:arguments[arguments.length-2],length:e.length})}),n},t.deferredCall=function(e){var t=null,n=function(){t=null,e()},r=function(e){return r.cancel(),t=setTimeout(n,e||0),r};return r.schedule=r,r.call=function(){return this.cancel(),e(),r},r.cancel=function(){return clearTimeout(t),t=null,r},r.isPending=function(){return t},r},t.delayedCall=function(e,t){var n=null,r=function(){n=null,e()},i=function(e){null==n&&(n=setTimeout(r,e||t))};return i.delay=function(e){n&&clearTimeout(n),n=setTimeout(r,e||t)},i.schedule=i,i.call=function(){this.cancel(),e()},i.cancel=function(){n&&clearTimeout(n),n=null},i.isPending=function(){return n},i},t.supportsLookbehind=function(){try{new RegExp("(?<=.)")}catch(e){return!1}return!0},t.skipEmptyMatch=function(e,t,n){return n&&e.codePointAt(t)>65535?2:1}}),ace.define("ace/lib/useragent",["require","exports","module"],function(e,t,n){"use strict";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 r="object"==typeof navigator?navigator:{},i=(/mac|win|linux/i.exec(r.platform)||["other"])[0].toLowerCase(),o=r.userAgent||"",a=r.appName||"";t.isWin="win"==i,t.isMac="mac"==i,t.isLinux="linux"==i,t.isIE="Microsoft Internet Explorer"==a||a.indexOf("MSAppHost")>=0?parseFloat((o.match(/(?:MSIE |Trident\/[0-9]+[\.0-9]+;.*rv:)([0-9]+[\.0-9]+)/)||[])[1]):parseFloat((o.match(/(?:Trident\/[0-9]+[\.0-9]+;.*rv:)([0-9]+[\.0-9]+)/)||[])[1]),t.isOldIE=t.isIE&&t.isIE<9,t.isGecko=t.isMozilla=o.match(/ Gecko\/\d+/),t.isOpera="object"==typeof opera&&"[object Opera]"==Object.prototype.toString.call(window.opera),t.isWebKit=parseFloat(o.split("WebKit/")[1])||void 0,t.isChrome=parseFloat(o.split(" Chrome/")[1])||void 0,t.isSafari=parseFloat(o.split(" Safari/")[1])&&!t.isChrome||void 0,t.isEdge=parseFloat(o.split(" Edge/")[1])||void 0,t.isAIR=o.indexOf("AdobeAIR")>=0,t.isAndroid=o.indexOf("Android")>=0,t.isChromeOS=o.indexOf(" CrOS ")>=0,t.isIOS=/iPad|iPhone|iPod/.test(o)&&!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){"use strict";var r,i=e("./useragent");t.buildDom=function e(t,n,r){if("string"==typeof t&&t){var i=document.createTextNode(t);return n&&n.appendChild(i),i}if(!Array.isArray(t))return t&&t.appendChild&&n&&n.appendChild(t),t;if("string"!=typeof t[0]||!t[0]){for(var o=[],a=0;a<t.length;a++){var s=e(t[a],n,r);s&&o.push(s)}return o}var l=document.createElement(t[0]),c=t[1],d=1;c&&"object"==typeof c&&!Array.isArray(c)&&(d=2);for(a=d;a<t.length;a++)e(t[a],l,r);return 2==d&&Object.keys(c).forEach(function(e){var t=c[e];"class"===e?l.className=Array.isArray(t)?t.join(" "):t:"function"==typeof t||"value"==e||"$"==e[0]?l[e]=t:"ref"===e?r&&(r[t]=l):"style"===e?"string"==typeof t&&(l.style.cssText=t):null!=t&&l.setAttribute(e,t)}),n&&n.appendChild(l),l},t.getDocumentHead=function(e){return e||(e=document),e.head||e.getElementsByTagName("head")[0]||e.documentElement},t.createElement=function(e,t){return document.createElementNS?document.createElementNS(t||"http://www.w3.org/1999/xhtml",e):document.createElement(e)},t.removeChildren=function(e){e.innerHTML=""},t.createTextNode=function(e,t){return(t?t.ownerDocument:document).createTextNode(e)},t.createFragment=function(e){return(e?e.ownerDocument:document).createDocumentFragment()},t.hasCssClass=function(e,t){return-1!==(e.className+"").split(/\s+/g).indexOf(t)},t.addCssClass=function(e,n){t.hasCssClass(e,n)||(e.className+=" "+n)},t.removeCssClass=function(e,t){for(var n=e.className.split(/\s+/g);;){var r=n.indexOf(t);if(-1==r)break;n.splice(r,1)}e.className=n.join(" ")},t.toggleCssClass=function(e,t){for(var n=e.className.split(/\s+/g),r=!0;;){var i=n.indexOf(t);if(-1==i)break;r=!1,n.splice(i,1)}return r&&n.push(t),e.className=n.join(" "),r},t.setCssClass=function(e,n,r){r?t.addCssClass(e,n):t.removeCssClass(e,n)},t.hasCssString=function(e,t){var n,r=0;if(n=(t=t||document).querySelectorAll("style"))for(;r<n.length;)if(n[r++].id===e)return!0},t.removeElementById=function(e,t){(t=t||document).getElementById(e)&&t.getElementById(e).remove()};var o=[];function a(){var e=o;o=null,e&&e.forEach(function(e){s(e[0],e[1])})}function s(e,n,i){if("undefined"!=typeof document){if(o)if(i)a();else if(!1===i)return o.push([e,n]);if(!r){var s=i;i&&i.getRootNode&&(s=i.getRootNode())&&s!=i||(s=document);var l=s.ownerDocument||s;if(n&&t.hasCssString(n,s))return null;n&&(e+="\n/*# sourceURL=ace/css/"+n+" */");var c=t.createElement("style");c.appendChild(l.createTextNode(e)),n&&(c.id=n),s==l&&(s=t.getDocumentHead(l)),s.insertBefore(c,s.firstChild)}}}if(t.useStrictCSP=function(e){r=e,0==e?a():o||(o=[])},t.importCssString=s,t.importCssStylsheet=function(e,n){t.buildDom(["link",{rel:"stylesheet",href:e}],t.getDocumentHead(n))},t.scrollbarWidth=function(e){var n=t.createElement("ace_inner");n.style.width="100%",n.style.minWidth="0px",n.style.height="200px",n.style.display="block";var r=t.createElement("ace_outer"),i=r.style;i.position="absolute",i.left="-10000px",i.overflow="hidden",i.width="200px",i.minWidth="0px",i.height="150px",i.display="block",r.appendChild(n);var o=e&&e.documentElement||document&&document.documentElement;if(!o)return 0;o.appendChild(r);var a=n.offsetWidth;i.overflow="scroll";var s=n.offsetWidth;return a===s&&(s=r.clientWidth),o.removeChild(r),a-s},t.computedStyle=function(e,t){return window.getComputedStyle(e,"")||{}},t.setStyle=function(e,t,n){e[t]!==n&&(e[t]=n)},t.HAS_CSS_ANIMATION=!1,t.HAS_CSS_TRANSFORMS=!1,t.HI_DPI=!i.isWin||"undefined"!==typeof window&&window.devicePixelRatio>=1.5,i.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),i.isEdge||"undefined"===typeof 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){"use strict";var r=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=r.getDocumentHead(),i=document.createElement("script");i.src=e,n.appendChild(i),i.onload=i.onreadystatechange=function(e,n){!n&&i.readyState&&"loaded"!=i.readyState&&"complete"!=i.readyState||(i=i.onload=i.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){"use strict";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){"use strict";var r={},i=function(){this.propagationStopped=!0},o=function(){this.defaultPrevented=!0};r._emit=r._dispatchEvent=function(e,t){this._eventRegistry||(this._eventRegistry={}),this._defaultHandlers||(this._defaultHandlers={});var n=this._eventRegistry[e]||[],r=this._defaultHandlers[e];if(n.length||r){"object"==typeof t&&t||(t={}),t.type||(t.type=e),t.stopPropagation||(t.stopPropagation=i),t.preventDefault||(t.preventDefault=o),n=n.slice();for(var a=0;a<n.length&&(n[a](t,this),!t.propagationStopped);a++);return r&&!t.defaultPrevented?r(t,this):void 0}},r._signal=function(e,t){var n=(this._eventRegistry||{})[e];if(n){n=n.slice();for(var r=0;r<n.length;r++)n[r](t,this)}},r.once=function(e,t){var n=this;if(this.on(e,function r(){n.off(e,r),t.apply(null,arguments)}),!t)return new Promise(function(e){t=e})},r.setDefaultHandler=function(e,t){var n=this._defaultHandlers;if(n||(n=this._defaultHandlers={_disabled_:{}}),n[e]){var r=n[e],i=n._disabled_[e];i||(n._disabled_[e]=i=[]),i.push(r);var o=i.indexOf(t);-1!=o&&i.splice(o,1)}n[e]=t},r.removeDefaultHandler=function(e,t){var n=this._defaultHandlers;if(n){var r=n._disabled_[e];if(n[e]==t)r&&this.setDefaultHandler(e,r.pop());else if(r){var i=r.indexOf(t);-1!=i&&r.splice(i,1)}}},r.on=r.addEventListener=function(e,t,n){this._eventRegistry=this._eventRegistry||{};var r=this._eventRegistry[e];return r||(r=this._eventRegistry[e]=[]),-1==r.indexOf(t)&&r[n?"unshift":"push"](t),t},r.off=r.removeListener=r.removeEventListener=function(e,t){this._eventRegistry=this._eventRegistry||{};var n=this._eventRegistry[e];if(n){var r=n.indexOf(t);-1!==r&&n.splice(r,1)}},r.removeAllListeners=function(e){e||(this._eventRegistry=this._defaultHandlers=void 0),this._eventRegistry&&(this._eventRegistry[e]=void 0),this._defaultHandlers&&(this._defaultHandlers[e]=void 0)},t.EventEmitter=r}),ace.define("ace/lib/report_error",["require","exports","module"],function(e,t,n){t.reportError=function(e,t){var n=new Error(e);n.data=t,"object"==typeof console&&console.error&&console.error(n),setTimeout(function(){throw n})}}),ace.define("ace/lib/default_english_messages",["require","exports","module"],function(e,t,n){t.defaultEnglishMessages={"autocomplete.popup.aria-roledescription":"Autocomplete suggestions","autocomplete.popup.aria-label":"Autocomplete suggestions","autocomplete.popup.item.aria-roledescription":"item","autocomplete.loading":"Loading...","editor.scroller.aria-roledescription":"editor","editor.scroller.aria-label":"Editor content, press Enter to start editing, press Escape to exit","editor.gutter.aria-roledescription":"editor gutter","editor.gutter.aria-label":"Editor gutter, press Enter to interact with controls using arrow keys, press Escape to exit","error-marker.good-state":"Looks good!","prompt.recently-used":"Recently used","prompt.other-commands":"Other commands","prompt.no-matching-commands":"No matching commands","search-box.find.placeholder":"Search for","search-box.find-all.text":"All","search-box.replace.placeholder":"Replace with","search-box.replace-next.text":"Replace","search-box.replace-all.text":"All","search-box.toggle-replace.title":"Toggle Replace mode","search-box.toggle-regexp.title":"RegExp Search","search-box.toggle-case.title":"CaseSensitive Search","search-box.toggle-whole-word.title":"Whole Word Search","search-box.toggle-in-selection.title":"Search In Selection","search-box.search-counter":"$0 of $1","text-input.aria-roledescription":"editor","text-input.aria-label":"Cursor at row $0","gutter.code-folding.range.aria-label":"Toggle code folding, rows $0 through $1","gutter.code-folding.closed.aria-label":"Toggle code folding, rows $0 through $1","gutter.code-folding.open.aria-label":"Toggle code folding, row $0","gutter.code-folding.closed.title":"Unfold code","gutter.code-folding.open.title":"Fold code","gutter.annotation.aria-label.error":"Error, read annotations row $0","gutter.annotation.aria-label.warning":"Warning, read annotations row $0","gutter.annotation.aria-label.info":"Info, read annotations row $0","inline-fold.closed.title":"Unfold code","gutter-tooltip.aria-label.error.singular":"error","gutter-tooltip.aria-label.error.plural":"errors","gutter-tooltip.aria-label.warning.singular":"warning","gutter-tooltip.aria-label.warning.plural":"warnings","gutter-tooltip.aria-label.info.singular":"information message","gutter-tooltip.aria-label.info.plural":"information messages","gutter.annotation.aria-label.security":"Security finding, read annotations row $0","gutter.annotation.aria-label.hint":"Suggestion, read annotations row $0","gutter-tooltip.aria-label.security.singular":"security finding","gutter-tooltip.aria-label.security.plural":"security findings","gutter-tooltip.aria-label.hint.singular":"suggestion","gutter-tooltip.aria-label.hint.plural":"suggestions","editor.tooltip.disable-editing":"Editing is disabled"}}),ace.define("ace/lib/app_config",["require","exports","module","ace/lib/oop","ace/lib/event_emitter","ace/lib/report_error","ace/lib/default_english_messages"],function(e,t,n){var r,i,o=e("./oop"),a=e("./event_emitter").EventEmitter,s=e("./report_error").reportError,l=e("./default_english_messages").defaultEnglishMessages,c={setOptions:function(e){Object.keys(e).forEach(function(t){this.setOption(t,e[t])},this)},getOptions:function(e){var t={};if(e)Array.isArray(e)||(e=Object.keys(e));else{var n=this.$options;e=Object.keys(n).filter(function(e){return!n[e].hidden})}return e.forEach(function(e){t[e]=this.getOption(e)},this),t},setOption:function(e,t){if(this["$"+e]!==t){var n=this.$options[e];if(!n)return d('misspelled option "'+e+'"');if(n.forwardTo)return this[n.forwardTo]&&this[n.forwardTo].setOption(e,t);n.handlesSet||(this["$"+e]=t),n&&n.set&&n.set.call(this,t)}},getOption:function(e){var t=this.$options[e];return t?t.forwardTo?this[t.forwardTo]&&this[t.forwardTo].getOption(e):t&&t.get?t.get.call(this):this["$"+e]:d('misspelled option "'+e+'"')}};function d(e){"undefined"!=typeof console&&console.warn&&console.warn.apply(console,arguments)}var u=function(){function e(){this.$defaultOptions={},r=l,i="dollarSigns"}return e.prototype.defineOptions=function(e,t,n){return e.$options||(this.$defaultOptions[t]=e.$options={}),Object.keys(n).forEach(function(t){var r=n[t];"string"==typeof r&&(r={forwardTo:r}),r.name||(r.name=t),e.$options[r.name]=r,"initialValue"in r&&(e["$"+r.name]=r.initialValue)}),o.implement(e,c),this},e.prototype.resetOptions=function(e){Object.keys(e.$options).forEach(function(t){var n=e.$options[t];"value"in n&&e.setOption(t,n.value)})},e.prototype.setDefaultValue=function(e,t,n){if(!e){for(e in this.$defaultOptions)if(this.$defaultOptions[e][t])break;if(!this.$defaultOptions[e][t])return!1}var r=this.$defaultOptions[e]||(this.$defaultOptions[e]={});r[t]&&(r.forwardTo?this.setDefaultValue(r.forwardTo,t,n):r[t].value=n)},e.prototype.setDefaultValues=function(e,t){Object.keys(t).forEach(function(n){this.setDefaultValue(e,n,t[n])},this)},e.prototype.setMessages=function(e,t){r=e,t&&t.placeholders&&(i=t.placeholders)},e.prototype.nls=function(e,t,n){r[e]||(d("No message found for the key '"+e+"' in messages with id "+r.$id+", trying to find a translation for the default string '"+t+"'."),r[t]||d("No message found for the default string '"+t+"' in the provided messages. Falling back to the default English message."));var o=r[e]||r[t]||t;return n&&("dollarSigns"===i&&(o=o.replace(/\$(\$|[\d]+)/g,function(e,t){return"$"==t?"$":n[t]})),"curlyBrackets"===i&&(o=o.replace(/\{([^\}]+)\}/g,function(e,t){return n[t]}))),o},e}();u.prototype.warn=d,u.prototype.reportError=s,o.implement(u.prototype,a),t.AppConfig=u}),ace.define("ace/theme/textmate-css",["require","exports","module"],function(e,t,n){n.exports='.ace-tm .ace_gutter {\n  background: #f0f0f0;\n  color: #333;\n}\n\n.ace-tm .ace_print-margin {\n  width: 1px;\n  background: #e8e8e8;\n}\n\n.ace-tm .ace_fold {\n    background-color: #6B72E6;\n}\n\n.ace-tm {\n  background-color: #FFFFFF;\n  color: black;\n}\n\n.ace-tm .ace_cursor {\n  color: black;\n}\n        \n.ace-tm .ace_invisible {\n  color: rgb(191, 191, 191);\n}\n\n.ace-tm .ace_storage,\n.ace-tm .ace_keyword {\n  color: blue;\n}\n\n.ace-tm .ace_constant {\n  color: rgb(197, 6, 11);\n}\n\n.ace-tm .ace_constant.ace_buildin {\n  color: rgb(88, 72, 246);\n}\n\n.ace-tm .ace_constant.ace_language {\n  color: rgb(88, 92, 246);\n}\n\n.ace-tm .ace_constant.ace_library {\n  color: rgb(6, 150, 14);\n}\n\n.ace-tm .ace_invalid {\n  background-color: rgba(255, 0, 0, 0.1);\n  color: red;\n}\n\n.ace-tm .ace_support.ace_function {\n  color: rgb(60, 76, 114);\n}\n\n.ace-tm .ace_support.ace_constant {\n  color: rgb(6, 150, 14);\n}\n\n.ace-tm .ace_support.ace_type,\n.ace-tm .ace_support.ace_class {\n  color: rgb(109, 121, 222);\n}\n\n.ace-tm .ace_keyword.ace_operator {\n  color: rgb(104, 118, 135);\n}\n\n.ace-tm .ace_string {\n  color: rgb(3, 106, 7);\n}\n\n.ace-tm .ace_comment {\n  color: rgb(76, 136, 107);\n}\n\n.ace-tm .ace_comment.ace_doc {\n  color: rgb(0, 102, 255);\n}\n\n.ace-tm .ace_comment.ace_doc.ace_tag {\n  color: rgb(128, 159, 191);\n}\n\n.ace-tm .ace_constant.ace_numeric {\n  color: rgb(0, 0, 205);\n}\n\n.ace-tm .ace_variable {\n  color: rgb(49, 132, 149);\n}\n\n.ace-tm .ace_xml-pe {\n  color: rgb(104, 104, 91);\n}\n\n.ace-tm .ace_entity.ace_name.ace_function {\n  color: #0000A2;\n}\n\n\n.ace-tm .ace_heading {\n  color: rgb(12, 7, 255);\n}\n\n.ace-tm .ace_list {\n  color:rgb(185, 6, 144);\n}\n\n.ace-tm .ace_meta.ace_tag {\n  color:rgb(0, 22, 142);\n}\n\n.ace-tm .ace_string.ace_regex {\n  color: rgb(255, 0, 0)\n}\n\n.ace-tm .ace_marker-layer .ace_selection {\n  background: rgb(181, 213, 255);\n}\n.ace-tm.ace_multiselect .ace_selection.ace_start {\n  box-shadow: 0 0 3px 0px white;\n}\n.ace-tm .ace_marker-layer .ace_step {\n  background: rgb(252, 255, 0);\n}\n\n.ace-tm .ace_marker-layer .ace_stack {\n  background: rgb(164, 229, 101);\n}\n\n.ace-tm .ace_marker-layer .ace_bracket {\n  margin: -1px 0 0 -1px;\n  border: 1px solid rgb(192, 192, 192);\n}\n\n.ace-tm .ace_marker-layer .ace_active-line {\n  background: rgba(0, 0, 0, 0.07);\n}\n\n.ace-tm .ace_gutter-active-line {\n    background-color : #dcdcdc;\n}\n\n.ace-tm .ace_marker-layer .ace_selected-word {\n  background: rgb(250, 250, 255);\n  border: 1px solid rgb(200, 200, 250);\n}\n\n.ace-tm .ace_indent-guide {\n  background: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAAE0lEQVQImWP4////f4bLly//BwAmVgd1/w11/gAAAABJRU5ErkJggg==") right repeat-y;\n}\n\n.ace-tm .ace_indent-guide-active {\n  background: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAIGNIUk0AAHolAACAgwAA+f8AAIDpAAB1MAAA6mAAADqYAAAXb5JfxUYAAAAZSURBVHjaYvj///9/hivKyv8BAAAA//8DACLqBhbvk+/eAAAAAElFTkSuQmCC") right repeat-y;\n}\n'}),ace.define("ace/theme/textmate",["require","exports","module","ace/theme/textmate-css","ace/lib/dom"],function(e,t,n){"use strict";t.isDark=!1,t.cssClass="ace-tm",t.cssText=e("./textmate-css"),t.$id="ace/theme/textmate",e("../lib/dom").importCssString(t.cssText,t.cssClass,!1)}),ace.define("ace/config",["require","exports","module","ace/lib/lang","ace/lib/net","ace/lib/dom","ace/lib/app_config","ace/theme/textmate"],function(e,t,n){var r=e("./lib/lang"),i=e("./lib/net"),o=e("./lib/dom"),a=e("./lib/app_config").AppConfig;n.exports=t=new a;var s={packaged:!1,workerPath:null,modePath:null,themePath:null,basePath:"",suffix:".js",$moduleUrls:{},loadWorkerFromBlob:!0,sharedPopups:!1,useStrictCSP:null};t.get=function(e){if(!s.hasOwnProperty(e))throw new Error("Unknown config key: "+e);return s[e]},t.set=function(e,t){if(s.hasOwnProperty(e))s[e]=t;else if(0==this.setDefaultValue("",e,t))throw new Error("Unknown config key: "+e);"useStrictCSP"==e&&o.useStrictCSP(t)},t.all=function(){return r.copyObject(s)},t.$modes={},t.moduleUrl=function(e,t){if(s.$moduleUrls[e])return s.$moduleUrls[e];var n=e.split("/"),r="snippets"==(t=t||n[n.length-2]||"")?"/":"-",i=n[n.length-1];if("worker"==t&&"-"==r){var o=new RegExp("^"+t+"[\\-_]|[\\-_]"+t+"$","g");i=i.replace(o,"")}(!i||i==t)&&n.length>1&&(i=n[n.length-2]);var a=s[t+"Path"];return null==a?a=s.basePath:"/"==r&&(t=r=""),a&&"/"!=a.slice(-1)&&(a+="/"),a+t+r+i+this.get("suffix")},t.setModuleUrl=function(e,t){return s.$moduleUrls[e]=t};var l;t.setLoader=function(e){l=e},t.dynamicModules=Object.create(null),t.$loading={},t.$loaded={},t.loadModule=function(n,r){var o;if(Array.isArray(n))var a=n[0],s=n[1];else if("string"==typeof n)s=n;var d=function(n){if(n&&!t.$loading[s])return r&&r(n);if(t.$loading[s]||(t.$loading[s]=[]),t.$loading[s].push(r),!(t.$loading[s].length>1)){var o=function(){!function(t,n){"ace/theme/textmate"===t||"./theme/textmate"===t?n(null,e("./theme/textmate")):l?l(t,n):console.error("loader is not configured")}(s,function(e,n){n&&(t.$loaded[s]=n),t._emit("load.module",{name:s,module:n});var r=t.$loading[s];t.$loading[s]=null,r.forEach(function(e){e&&e(n)})})};if(!t.get("packaged"))return o();i.loadScript(t.moduleUrl(s,a),o),c()}};if(t.dynamicModules[s])t.dynamicModules[s]().then(function(e){e.default?d(e.default):d(e)});else{try{o=this.$require(s)}catch(u){}d(o||t.$loaded[s])}},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(){s.basePath||s.workerPath||s.modePath||s.themePath||Object.keys(s.$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,r){"use strict";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 a(t){if(o&&o.document){i.set("packaged",t||e.packaged||r.packaged||o.define&&n.amdD.packaged);var a={},l="",c=document.currentScript||document._currentScript,d=c&&c.ownerDocument||document;c&&c.src&&(l=c.src.split(/[?#]/)[0].split("/").slice(0,-1).join("/")||"");for(var u=d.getElementsByTagName("script"),p=0;p<u.length;p++){var h=u[p],m=h.src||h.getAttribute("src");if(m){for(var f=h.attributes,g=0,v=f.length;g<v;g++){var x=f[g];0===x.name.indexOf("data-ace-")&&(a[s(x.name.replace(/^data-ace-/,""))]=x.value)}var y=m.match(/^(.*)\/ace([\-.]\w+)?\.js(\?|$)/);y&&(l=y[1])}}for(var b in l&&(a.base=a.base||l,a.packaged=!0),a.basePath=a.base,a.workerPath=a.workerPath||a.base,a.modePath=a.modePath||a.base,a.themePath=a.themePath||a.base,delete a.base,a)"undefined"!==typeof a[b]&&i.set(b,a[b])}}function s(e){return e.replace(/-(.)/g,function(e,t){return t.toUpperCase()})}r.exports=function(t){i.init=a,i.$require=e,t.require=e,t.define=n.amdD},a(!0)}),ace.define("ace/range",["require","exports","module"],function(e,t,n){"use strict";var r=function(){function e(e,t,n,r){this.start={row:e,column:t},this.end={row:n,column:r}}return e.prototype.isEqual=function(e){return this.start.row===e.start.row&&this.end.row===e.end.row&&this.start.column===e.start.column&&this.end.column===e.end.column},e.prototype.toString=function(){return"Range: ["+this.start.row+"/"+this.start.column+"] -> ["+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,r=e.start;return 1==(t=this.compare(n.row,n.column))?1==(t=this.compare(r.row,r.column))?2:0==t?1:0:-1==t?-2:-1==(t=this.compare(r.row,r.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?e<this.start.row?-1:e>this.end.row?1:this.start.row===e?t>=this.start.column?0:-1:this.end.row===e?t<=this.end.column?0:1:0:t<this.start.column?-1:t>this.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 r={row:n+1,column:0};else if(this.end.row<t)r={row:t,column:0};if(this.start.row>n)var i={row:n+1,column:0};else if(this.start.row<t)i={row:t,column:0};return e.fromPoints(i||this.start,r||this.end)},e.prototype.extend=function(t,n){var r=this.compare(t,n);if(0==r)return this;if(-1==r)var i={row:t,column:n};else var o={row:t,column:n};return e.fromPoints(i||this.start,o||this.end)},e.prototype.isEmpty=function(){return this.start.row===this.end.row&&this.start.column===this.end.column},e.prototype.isMultiLine=function(){return this.start.row!==this.end.row},e.prototype.clone=function(){return e.fromPoints(this.start,this.end)},e.prototype.collapseRows=function(){return 0==this.end.column?new e(this.start.row,0,Math.max(this.start.row,this.end.row-1),0):new e(this.start.row,0,this.end.row,0)},e.prototype.toScreenRange=function(t){var n=t.documentToScreenPosition(this.start),r=t.documentToScreenPosition(this.end);return new e(n.row,n.column,r.row,r.column)},e.prototype.moveBy=function(e,t){this.start.row+=e,this.start.column+=t,this.end.row+=e,this.end.column+=t},e}();r.fromPoints=function(e,t){return new r(e.row,e.column,t.row,t.column)},r.comparePoints=function(e,t){return e.row-t.row||e.column-t.column},t.Range=r}),ace.define("ace/lib/keys",["require","exports","module","ace/lib/oop"],function(e,t,n){"use strict";for(var r=e("./oop"),i={MODIFIER_KEYS:{16:"Shift",17:"Ctrl",18:"Alt",224:"Meta",91:"MetaLeft",92:"MetaRight",93:"ContextMenu"},KEY_MODS:{ctrl:1,alt:2,option:2,shift:4,super:8,meta:8,command:8,cmd:8,control:1},FUNCTION_KEYS:{8:"Backspace",9:"Tab",13:"Return",19:"Pause",27:"Esc",32:"Space",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"Left",38:"Up",39:"Right",40:"Down",44:"Print",45:"Insert",46:"Delete","-13":"NumpadEnter",144:"Numlock",145:"Scrolllock"},PRINTABLE_KEYS:{32:" ",59:";",61:"=",107:"+",109:"-",110:".",186:";",187:"=",188:",",189:"-",190:".",191:"/",192:"`",219:"[",220:"\\",221:"]",222:"'",111:"/",106:"*"}},o={Command:224,Backspace:8,Tab:9,Return:13,Enter:13,Pause:19,Escape:27,PageUp:33,PageDown:34,End:35,Home:36,Insert:45,Delete:46,ArrowLeft:37,ArrowUp:38,ArrowRight:39,ArrowDown:40,Backquote:192,Minus:189,Equal:187,BracketLeft:219,Backslash:220,BracketRight:221,Semicolon:186,Quote:222,Comma:188,Period:190,Slash:191,Space:32,NumpadAdd:107,NumpadDecimal:110,NumpadSubtract:109,NumpadDivide:111,NumpadMultiply:106},a=0;a<10;a++)o["Digit"+a]=48+a,o["Numpad"+a]=96+a,i.PRINTABLE_KEYS[48+a]=""+a,i.FUNCTION_KEYS[96+a]="Numpad"+a;for(a=65;a<91;a++){var s=String.fromCharCode(a+32);o["Key"+s.toUpperCase()]=a,i.PRINTABLE_KEYS[a]=s}for(a=1;a<13;a++)o["F"+a]=111+a,i.FUNCTION_KEYS[111+a]="F"+a;var l={Shift:16,Control:17,Alt:18,Meta:224};for(var c in l)o[c]=o[c+"Left"]=o[c+"Right"]=l[c];for(var d in t.$codeToKeyCode=o,i.PRINTABLE_KEYS[173]="-",i.FUNCTION_KEYS){var u=i.FUNCTION_KEYS[d].toLowerCase();i[u]=parseInt(d,10)}for(var d in i.PRINTABLE_KEYS){u=i.PRINTABLE_KEYS[d].toLowerCase();i[u]=parseInt(d,10)}r.mixin(i,i.MODIFIER_KEYS),r.mixin(i,i.PRINTABLE_KEYS),r.mixin(i,i.FUNCTION_KEYS),i.enter=i.return,i.escape=i.esc,i.del=i.delete,function(){for(var e=["cmd","ctrl","alt","shift"],t=Math.pow(2,e.length);t--;)i.KEY_MODS[t]=e.filter(function(e){return t&i.KEY_MODS[e]}).join("-")+"-"}(),i.KEY_MODS[0]="",i.KEY_MODS[-1]="input-",r.mixin(t,i),t.default=t,t.keyCodeToString=function(e){var t=i[e];return"string"!=typeof t&&(t=String.fromCharCode(e)),t.toLowerCase()}}),ace.define("ace/lib/event",["require","exports","module","ace/lib/keys","ace/lib/useragent"],function(e,t,n){"use strict";var r,i=e("./keys"),o=e("./useragent"),a=null,s=0;function l(){return void 0==r&&function(){r=!1;try{document.createComment("").addEventListener("test",function(){},{get passive(){return r={passive:!1},!0}})}catch(e){}}(),r}function c(e,t,n){this.elem=e,this.type=t,this.callback=n}c.prototype.destroy=function(){u(this.elem,this.type,this.callback),this.elem=this.type=this.callback=void 0};var d=t.addListener=function(e,t,n,r){e.addEventListener(t,n,l()),r&&r.$toDestroy.push(new c(e,t,n))},u=t.removeListener=function(e,t,n){e.removeEventListener(t,n,l())};function p(e){return(e.ctrlKey?1:0)|(e.altKey?2:0)|(e.shiftKey?4:0)|(e.metaKey?8:0)}function h(){a=Object.create(null)}if(t.stopEvent=function(e){return t.stopPropagation(e),t.preventDefault(e),!1},t.stopPropagation=function(e){e.stopPropagation&&e.stopPropagation()},t.preventDefault=function(e){e.preventDefault&&e.preventDefault()},t.getButton=function(e){return"dblclick"==e.type?0:"contextmenu"==e.type||o.isMac&&e.ctrlKey&&!e.altKey&&!e.shiftKey?2:e.button},t.capture=function(e,t,n){var r=e&&e.ownerDocument||document;function i(e){t&&t(e),n&&n(e),u(r,"mousemove",t),u(r,"mouseup",i),u(r,"dragstart",i)}return d(r,"mousemove",t),d(r,"mouseup",i),d(r,"dragstart",i),i},t.addMouseWheelListener=function(e,t,n){d(e,"wheel",function(e){var n=e.deltaX||0,r=e.deltaY||0;switch(e.deltaMode){case e.DOM_DELTA_PIXEL:e.wheelX=.15*n,e.wheelY=.15*r;break;case e.DOM_DELTA_LINE:e.wheelX=15*n,e.wheelY=15*r;break;case e.DOM_DELTA_PAGE:e.wheelX=150*n,e.wheelY=150*r}t(e)},n)},t.addMultiMouseDownListener=function(e,n,r,i,a){var s,l,c,u=0,p={2:"dblclick",3:"tripleclick",4:"quadclick"};function h(e){if(0!==t.getButton(e)?u=0:e.detail>1?++u>4&&(u=1):u=1,o.isIE){var a=Math.abs(e.clientX-s)>5||Math.abs(e.clientY-l)>5;c&&!a||(u=1),c&&clearTimeout(c),c=setTimeout(function(){c=null},n[u-1]||600),1==u&&(s=e.clientX,l=e.clientY)}if(e._clicks=u,r[i]("mousedown",e),u>4)u=0;else if(u>1)return r[i](p[u],e)}Array.isArray(e)||(e=[e]),e.forEach(function(e){d(e,"mousedown",h,a)})},t.getModifierString=function(e){return i.KEY_MODS[p(e)]},t.addCommandKeyListener=function(e,n,r){var l=null;d(e,"keydown",function(e){a[e.keyCode]=(a[e.keyCode]||0)+1;var t=function(e,t,n){var r=p(t);if(!n&&t.code&&(n=i.$codeToKeyCode[t.code]||n),!o.isMac&&a){if(t.getModifierState&&(t.getModifierState("OS")||t.getModifierState("Win"))&&(r|=8),a.altGr){if(3==(3&r))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===r&&2===l&&t.timeStamp-s<50&&(a.altGr=!0)}}if(n in i.MODIFIER_KEYS&&(n=-1),r||13!==n||3!==t.location||(e(t,r,-n),!t.defaultPrevented)){if(o.isChromeOS&&8&r){if(e(t,r,n),t.defaultPrevented)return;r&=-9}return!!(r||n in i.FUNCTION_KEYS||n in i.PRINTABLE_KEYS)&&e(t,r,n)}}(n,e,e.keyCode);return l=e.defaultPrevented,t},r),d(e,"keypress",function(e){l&&(e.ctrlKey||e.altKey||e.shiftKey||e.metaKey)&&(t.stopEvent(e),l=null)},r),d(e,"keyup",function(e){a[e.keyCode]=null},r),a||(h(),d(window,"focus",h))},"object"==typeof window&&window.postMessage&&!o.isOldIE){var m=1;t.nextTick=function(e,n){n=n||window;var r="zero-timeout-message-"+m++,i=function(o){o.data==r&&(t.stopPropagation(o),u(n,"message",i),e())};d(n,"message",i),n.postMessage(r,"*")}}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){"use strict";var r;n.exports={lineMode:!1,pasteCancelled:function(){return!!(r&&r>Date.now()-50)||(r=!1)},cancel:function(){r=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){"use strict";var r=e("../lib/event"),i=e("../config").nls,o=e("../lib/useragent"),a=e("../lib/dom"),s=e("../lib/lang"),l=e("../clipboard"),c=o.isChrome<18,d=o.isIE,u=o.isChrome>63,p=400,h=e("../lib/keys"),m=h.KEY_MODS,f=o.isIOS,g=f?/\s/:/\n/,v=o.isMobile,x=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="",v||(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(i){}this.cancelComposition=this.cancelComposition.bind(this),this.setAriaOptions({role:"textbox"}),r.addListener(this.text,"blur",function(e){n.ignoreFocusEvents||(t.onBlur(e),n.$isFocused=!1)},t),r.addListener(this.text,"focus",function(e){if(!n.ignoreFocusEvents){if(n.$isFocused=!0,o.isEdge)try{if(!document.hasFocus())return}catch(e){}t.onFocus(e),o.isEdge?setTimeout(n.resetSelection.bind(n)):n.resetSelection()}},t),this.$focusScroll=!1,t.on("beforeEndOperation",function(){var e=t.curOp,r=e&&e.command&&e.command.name;if("insertstring"!=r){var i=r&&(e.docChanged||e.selectionChanged);n.inComposition&&i&&(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,r.addCommandKeyListener(this.text,function(e,r,i){if(!n.inComposition)return t.onCommandKey(e,r,i)},t),r.addListener(this.text,"select",this.onSelect.bind(this),t),r.addListener(this.text,"input",this.onInput.bind(this),t),r.addListener(this.text,"cut",this.onCut.bind(this),t),r.addListener(this.text,"copy",this.onCopy.bind(this),t),r.addListener(this.text,"paste",this.onPaste.bind(this),t),"oncut"in this.text&&"oncopy"in this.text&&"onpaste"in this.text||r.addListener(e,"keydown",function(e){if((!o.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),r.addListener(this.text,"compositionstart",this.onCompositionStart.bind(this),t),r.addListener(this.text,"compositionupdate",this.onCompositionUpdate.bind(this),t),r.addListener(this.text,"keyup",this.onKeyup.bind(this),t),r.addListener(this.text,"keydown",this.syncComposition.bind(this),t),r.addListener(this.text,"compositionend",this.onCompositionEnd.bind(this),t),this.closeTimeout,r.addListener(this.text,"mouseup",this.$onContextMenu.bind(this),t),r.addListener(this.text,"mousedown",function(e){e.preventDefault(),n.onContextMenuClose()},t),r.addListener(t.renderer.scroller,"contextmenu",this.$onContextMenu.bind(this),t),r.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 r=this,i=null,o=!1;n.addEventListener("keydown",function(e){i&&clearTimeout(i),o=!0},!0),n.addEventListener("keyup",function(e){i=setTimeout(function(){o=!1},100)},!0);var a=function(e){if(document.activeElement===n&&!(o||r.inComposition||t.$mouseHandler.isMousePressed)&&!r.copied){var i=n.selectionStart,a=n.selectionEnd,s=null,l=0;if(0==i?s=h.up:1==i?s=h.home:a>r.lastSelectionEnd&&"\n"==r.lastValue[a]?s=h.end:i<r.lastSelectionStart&&" "==r.lastValue[i-1]?(s=h.left,l=m.option):i<r.lastSelectionStart||i==r.lastSelectionStart&&r.lastSelectionEnd!=r.lastSelectionStart&&i==a?s=h.left:a>r.lastSelectionEnd&&r.lastValue.slice(0,a).split("\n").length>2?s=h.down:a>r.lastSelectionEnd&&" "==r.lastValue[a-1]?(s=h.right,l=m.option):(a>r.lastSelectionEnd||a==r.lastSelectionEnd&&r.lastSelectionEnd!=r.lastSelectionStart&&i==a)&&(s=h.right),i!==a&&(l|=m.shift),s){if(!t.onCommandKey({},l,s)&&t.commands){s=h.keyCodeToString(s);var c=t.commands.findKeyCommand(l,s);c&&t.execCommand(c)}r.lastSelectionStart=i,r.lastSelectionEnd=a,r.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.length<this.text.selectionStart&&(this.inComposition||(this.lastValue=this.text.value),this.lastSelectionStart=this.lastSelectionEnd=-1,this.resetSelection()),this.syncComposition()},e.prototype.cancelComposition=function(){this.ignoreFocusEvents=!0,this.text.blur(),this.text.focus(),this.ignoreFocusEvents=!1},e.prototype.onCompositionStart=function(e){if(!this.inComposition&&this.host.onCompositionStart&&!this.host.$readOnly&&(this.inComposition={},!this.commandMode)){e.data&&(this.inComposition.useTextareaForIME=!1),setTimeout(this.onCompositionUpdate.bind(this),0),this.host._signal("compositionStart"),this.host.on("mousedown",this.cancelComposition);var t=this.host.getSelectionRange();t.end.row=t.start.row,t.end.column=t.start.column,this.inComposition.markerRange=t,this.inComposition.selectionStart=this.lastSelectionStart,this.host.onCompositionStart(this.inComposition),this.inComposition.useTextareaForIME?(this.lastValue=this.text.value="",this.lastSelectionStart=0,this.lastSelectionEnd=0):(this.text.msGetInputContext&&(this.inComposition.context=this.text.msGetInputContext()),this.text.getInputContext&&(this.inComposition.context=this.text.getInputContext()))}},e.prototype.onCompositionUpdate=function(){if(this.inComposition&&this.host.onCompositionUpdate&&!this.host.$readOnly){if(this.commandMode)return this.cancelComposition();if(this.inComposition.useTextareaForIME)this.host.onCompositionUpdate(this.text.value);else{var e=this.text.value;this.sendText(e),this.inComposition.markerRange&&(this.inComposition.context&&(this.inComposition.markerRange.start.column=this.inComposition.selectionStart=this.inComposition.context.compositionStartOffset),this.inComposition.markerRange.end.column=this.inComposition.markerRange.start.column+this.lastSelectionEnd-this.inComposition.selectionStart+this.lastRestoreEnd)}}},e.prototype.onCompositionEnd=function(e){this.host.onCompositionEnd&&!this.host.$readOnly&&(this.inComposition=!1,this.host.onCompositionEnd(),this.host.off("mousedown",this.cancelComposition),e&&this.onInput())},e.prototype.onCut=function(e){this.doCopy(e,!0)},e.prototype.onCopy=function(e){this.doCopy(e,!1)},e.prototype.onPaste=function(e){var t=this.handleClipboardData(e);l.pasteCancelled()||("string"==typeof t?(t&&this.host.onPaste(t,e),o.isIE&&setTimeout(this.resetSelection),r.preventDefault(e)):(this.text.value="",this.pasted=!0))},e.prototype.doCopy=function(e,t){var n=this,i=this.host.getCopyText();if(!i)return r.preventDefault(e);this.handleClipboardData(e,i)?(f&&(this.resetSelection(i),this.copied=i,setTimeout(function(){n.copied=!1},10)),t?this.host.onCut():this.host.onCopy(),r.preventDefault(e)):(this.copied=!0,this.text.value=i,this.text.select(),setTimeout(function(){n.copied=!1,n.resetSelection(),t?n.host.onCut():n.host.onCopy()}))},e.prototype.handleClipboardData=function(e,t,n){var r=e.clipboardData||window.clipboardData;if(r&&!c){var i=d||n?"Text":"text/plain";try{return t?!1!==r.setData(i,t):r.getData(i)}catch(e){if(!n)return this.handleClipboardData(e,t,!0)}}},e.prototype.onInput=function(e){if(this.inComposition)return this.onCompositionUpdate();if(e&&e.inputType){if("historyUndo"==e.inputType)return this.host.execCommand("undo");if("historyRedo"==e.inputType)return this.host.execCommand("redo")}var t=this.text.value,n=this.sendText(t,!0);(t.length>500||g.test(n)||v&&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,r=this.text.selectionEnd,i=this.lastSelectionStart,a=this.lastValue.length-this.lastSelectionEnd,s=e,l=e.length-n,c=e.length-r,d=0;i>0&&this.lastValue[d]==e[d];)d++,i--;for(s=s.slice(d),d=1;a>0&&this.lastValue.length-d>this.lastSelectionStart-1&&this.lastValue[this.lastValue.length-d]==e[e.length-d];)d++,a--;l-=d-1,c-=d-1;var u=s.length-d+1;if(u<0&&(i=-u,u=0),s=s.slice(0,u),!t&&!s&&!l&&!i&&!a&&!c)return"";this.sendingText=!0;var p=!1;return o.isAndroid&&". "==s&&(s="  ",p=!0),s&&!i&&!a&&!l&&!c||this.commandMode?this.host.onTextInput(s):this.host.onTextInput(s,{extendLeft:i,extendRight:a,restoreStart:l,restoreEnd:c}),this.sendingText=!1,this.lastValue=e,this.lastSelectionStart=n,this.lastSelectionEnd=r,this.lastRestoreEnd=c,p?"\n":s},e.prototype.onSelect=function(e){var t=this;if(!this.inComposition){var n;this.copied?this.copied=!1:0===(n=this.text).selectionStart&&n.selectionEnd>=t.lastValue.length&&n.value===t.lastValue&&t.lastValue&&n.selectionEnd!==t.lastSelectionEnd?(this.host.selectAll(),this.resetSelection()):v&&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,r="",i=function(t,n){for(var r=n,i=1;i<=t-e.rowStart&&i<2*e.numberOfExtraLines+1;i++)r+=e.host.session.getLine(t-i).length+1;return r};if(this.host.session){var o=this.host.selection,a=o.getRange(),s=o.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):(s<this.rowStart-1||s>this.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(r=l.join("\n"),t=i(a.start.row,a.start.column),n=i(a.end.row,a.end.column),a.start.row<this.rowStart){var d=this.host.session.getLine(this.rowStart-1);t=a.start.row<this.rowStart-1?0:t,n+=d.length+1,r=d+"\n"+r}else if(a.end.row>this.rowEnd){var u=this.host.session.getLine(this.rowEnd+1);n=a.end.row>this.rowEnd+1?u.length:a.end.column,n+=r.length+1,r=r+"\n"+u}else v&&s>0&&(r="\n"+r,n+=1,t+=1);r.length>p&&(t<p&&n<p?r=r.slice(0,p):(r="\n",t==n?t=n=0:(t=0,n=1)));var h=r+"\n\n";h!=this.lastValue&&(this.text.value=this.lastValue=h,this.lastSelectionStart=this.lastSelectionEnd=h.length)}if(this.afterContextMenu&&(this.lastSelectionStart=this.text.selectionStart,this.lastSelectionEnd=this.text.selectionEnd),this.lastSelectionEnd!=n||this.lastSelectionStart!=t||this.text.selectionEnd!=this.lastSelectionEnd)try{this.text.setSelectionRange(t,n),this.lastSelectionStart=t,this.lastSelectionEnd=n}catch(m){}this.inComposition=!1}},e.prototype.setHost=function(e){this.host=e},e.prototype.setNumberOfExtraLines=function(e){this.rowStart=Number.MAX_SAFE_INTEGER,this.rowEnd=Number.MIN_SAFE_INTEGER,this.numberOfExtraLines=e<0?0:e},e.prototype.setAriaLabel=function(){var e="";if(this.host.$textInputAriaLabel&&(e+="".concat(this.host.$textInputAriaLabel,", ")),this.host.session){var t=this.host.session.selection.cursor.row;e+=i("text-input.aria-label","Cursor at row $0",[t+1])}this.text.setAttribute("aria-label",e)},e.prototype.setAriaOptions=function(e){e.activeDescendant?(this.text.setAttribute("aria-haspopup","true"),this.text.setAttribute("aria-autocomplete",e.inline?"both":"list"),this.text.setAttribute("aria-activedescendant",e.activeDescendant)):(this.text.setAttribute("aria-haspopup","false"),this.text.setAttribute("aria-autocomplete","both"),this.text.removeAttribute("aria-activedescendant")),e.role&&this.text.setAttribute("role",e.role),e.setLabel&&(this.text.setAttribute("aria-roledescription",i("text-input.aria-roledescription","editor")),this.setAriaLabel())},e.prototype.focus=function(){var e=this;if(this.setAriaOptions({setLabel:this.host.renderer.enableKeyboardAccessibility}),this.tempStyle||u||"browser"==this.$focusScroll)return this.text.focus({preventScroll:!0});var t=this.text.style.top;this.text.style.position="fixed",this.text.style.top="0px";try{var n=0!=this.text.getBoundingClientRect().top}catch(o){return}var r=[];if(n)for(var i=this.text.parentElement;i&&1==i.nodeType;)r.push(i),i.setAttribute("ace_nocontext","true"),i=!i.parentElement&&i.getRootNode?i.getRootNode().host:i.parentElement;this.text.focus({preventScroll:!0}),n&&r.forEach(function(e){e.removeAttribute("ace_nocontext")}),setTimeout(function(){e.text.style.position="","0px"==e.text.style.top&&(e.text.style.top=t)},0)},e.prototype.blur=function(){this.text.blur()},e.prototype.isFocused=function(){return this.$isFocused},e.prototype.setInputHandler=function(e){this.inputHandler=e},e.prototype.getInputHandler=function(){return this.inputHandler},e.prototype.getElement=function(){return this.text},e.prototype.setCommandMode=function(e){this.commandMode=e,this.text.readOnly=!1},e.prototype.setReadOnly=function(e){this.commandMode||(this.text.readOnly=e)},e.prototype.setCopyWithEmptySelection=function(e){},e.prototype.onContextMenu=function(e){this.afterContextMenu=!0,this.resetSelection(),this.host._emit("nativecontextmenu",{target:this.host,domEvent:e}),this.moveToMouse(e,!0)},e.prototype.moveToMouse=function(e,t){var n=this;this.tempStyle||(this.tempStyle=this.text.style.cssText),this.text.style.cssText=(t?"z-index:100000;":"")+(o.isIE?"opacity:0.1;":"")+"text-indent: -"+(this.lastSelectionStart+this.lastSelectionEnd)*this.host.renderer.characterWidth*.5+"px;";var i=this.host.container.getBoundingClientRect(),s=a.computedStyle(this.host.container),l=i.top+(parseInt(s.borderTopWidth)||0),c=i.left+(parseInt(s.borderLeftWidth)||0),d=i.bottom-l-this.text.clientHeight-2,u=function(e){a.translate(n.text,e.clientX-c-2,Math.min(e.clientY-l-2,d))};u(e),"mousedown"==e.type&&(this.host.renderer.$isMousePressed=!0,clearTimeout(this.closeTimeout),o.isWin&&r.capture(this.host.container,u,this.onContextMenuClose.bind(this)))},e.prototype.destroy=function(){this.text.parentElement&&this.text.parentElement.removeChild(this.text)},e}();t.TextInput=x,t.$setUserAgentForTests=function(e,t){v=e,f=t}}),ace.define("ace/mouse/default_handlers",["require","exports","module","ace/lib/useragent"],function(e,t,n){"use strict";var r=e("../lib/useragent"),i=function(){function e(e){e.$clickSelection=null;var t=e.editor;t.setDefaultHandler("mousedown",this.onMouseDown.bind(e)),t.setDefaultHandler("dblclick",this.onDoubleClick.bind(e)),t.setDefaultHandler("tripleclick",this.onTripleClick.bind(e)),t.setDefaultHandler("quadclick",this.onQuadClick.bind(e)),t.setDefaultHandler("mousewheel",this.onMouseWheel.bind(e));["select","startSelect","selectEnd","selectAllEnd","selectByWordsEnd","selectByLinesEnd","dragWait","dragWaitEnd","focusWait"].forEach(function(t){e[t]=this[t]},this),e.selectByLines=this.extendSelectionBy.bind(e,"getLineRange"),e.selectByWords=this.extendSelectionBy.bind(e,"getWordRange")}return e.prototype.onMouseDown=function(e){var t=e.inSelection(),n=e.getDocumentPosition();this.mousedownEvent=e;var i=this.editor,o=e.getButton();return 0!==o?((i.getSelectionRange().isEmpty()||1==o)&&i.selection.moveToPosition(n),void(2==o&&(i.textInput.onContextMenu(e.domEvent),r.isMozilla||e.preventDefault()))):(this.mousedownEvent.time=Date.now(),!t||i.isFocused()||(i.focus(),!this.$focusTimeout||this.$clickSelection||i.inMultiSelectMode)?(this.captureMouse(e),this.startSelect(n,e.domEvent._clicks>1),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 r=this.$clickSelection.comparePoint(n);if(-1==r)e=this.$clickSelection.end;else if(1==r)e=this.$clickSelection.start;else{var i=o(this.$clickSelection,n);n=i.cursor,e=i.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,r=n.renderer.screenToTextCoordinates(this.x,this.y),i=n.selection[e](r.row,r.column);if(this.$clickSelection){var a=this.$clickSelection.comparePoint(i.start),s=this.$clickSelection.comparePoint(i.end);if(-1==a&&s<=0)t=this.$clickSelection.end,i.end.row==r.row&&i.end.column==r.column||(r=i.start);else if(1==s&&a>=0)t=this.$clickSelection.start,i.start.row==r.row&&i.start.column==r.column||(r=i.end);else if(-1==a&&1==s)r=i.end,t=i.start;else{var l=o(this.$clickSelection,r);r=l.cursor,t=l.anchor}n.selection.setSelectionAnchor(t.row,t.column)}n.selection.selectToPosition(r),n.renderer.scrollCursorIntoView()},e.prototype.selectByLinesEnd=function(){this.$clickSelection=null,this.editor.unsetStyle("ace_selecting")},e.prototype.focusWait=function(){var e,t,n,r,i=(e=this.mousedownEvent.x,t=this.mousedownEvent.y,n=this.x,r=this.y,Math.sqrt(Math.pow(n-e,2)+Math.pow(r-t,2))),o=Date.now();(i>0||o-this.mousedownEvent.time>this.$focusTimeout)&&this.startSelect(this.mousedownEvent.getDocumentPosition())},e.prototype.onDoubleClick=function(e){var t=e.getDocumentPosition(),n=this.editor,r=n.session.getBracketRange(t);r?(r.isEmpty()&&(r.start.column--,r.end.column++),this.setState("select")):(r=n.selection.getWordRange(t.row,t.column),this.setState("selectByWords")),this.$clickSelection=r,this.select()},e.prototype.onTripleClick=function(e){var t=e.getDocumentPosition(),n=this.editor;this.setState("selectByLines");var r=n.getSelectionRange();r.isMultiLine()&&r.contains(t.row,t.column)?(this.$clickSelection=n.selection.getLineRange(r.start.row),this.$clickSelection.end=n.selection.getLineRange(r.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,r=e.domEvent.timeStamp,i=r-n.t,o=i?e.wheelX/i:n.vx,a=i?e.wheelY/i:n.vy;i<550&&(o=(o+n.vx)/2,a=(a+n.vy)/2);var s=Math.abs(o/a),l=!1;if(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=r;else if(r-n.allowed<550){Math.abs(o)<=1.5*Math.abs(n.vx)&&Math.abs(a)<=1.5*Math.abs(n.vy)?(l=!0,n.allowed=r):n.allowed=0}return n.t=r,n.vx=o,n.vy=a,l?(t.renderer.scrollBy(e.wheelX*e.speed,e.wheelY*e.speed),e.stop()):void 0}},e}();function o(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 var n=t.column-4;return n<0?{cursor:e.start,anchor:e.end}:{cursor:e.end,anchor:e.start}}i.prototype.selectEnd=i.prototype.selectByLinesEnd,i.prototype.selectAllEnd=i.prototype.selectByLinesEnd,i.prototype.selectByWordsEnd=i.prototype.selectByLinesEnd,t.DefaultHandlers=i}),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){"use strict";var r=this&&this.__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])},e(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 r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),i=this&&this.__values||function(e){var t="function"===typeof Symbol&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&"number"===typeof e.length)return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")},o=e("./lib/dom"),a=(e("./lib/event"),e("./range").Range),s=e("./lib/scroll").preventParentScroll,l="ace_tooltip",c=function(){function e(e){this.isOpen=!1,this.$element=null,this.$parentNode=e}return e.prototype.$init=function(){return this.$element=o.createElement("div"),this.$element.className=l,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(),r=n.offsetParent&&n.offsetParent.getBoundingClientRect();n.style.left=e-(r?r.left:0)+"px",n.style.top=t-(r?r.top:0)+"px"},e.prototype.setClassName=function(e){o.addCssClass(this.getElement(),e)},e.prototype.setTheme=function(e){this.$element.className=l+" "+(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=l,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,r;this.popups.sort(function(e,t){return t.priority-e.priority});var o=[];try{for(var a=i(this.popups),s=a.next();!s.done;s=a.next()){var l=s.value,c=!0;try{for(var d=(n=void 0,i(o)),u=d.next();!u.done;u=d.next()){var p=u.value;if(this.doPopupsOverlap(p,l)){c=!1;break}}}catch(h){n={error:h}}finally{try{u&&!u.done&&(r=d.return)&&r.call(d)}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(),r=t.getElement().getBoundingClientRect();return n.left<r.right&&n.right>r.left&&n.top<r.bottom&&n.bottom>r.top},e}());t.popupManager=d,t.Tooltip=c;var u=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 r=n.getElement();return r.style.whiteSpace="pre-wrap",r.style.pointerEvents="auto",r.addEventListener("mouseout",n.onMouseOut),r.tabIndex=-1,r.addEventListener("blur",function(){r.contains(document.activeElement)||this.hide()}.bind(n)),r.addEventListener("wheel",s),n}return r(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 r=this.lastEvent&&this.lastEvent.getDocumentPosition();this.range&&this.range.contains(r.row,r.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(),r=t.session.getLine(n.row);if(n.column==r.length){var i=t.renderer.pixelToScreenCoordinates(e.clientX,e.clientY),o=t.session.documentToScreenPosition(n.row,n.column);if(o.column!=i.column||o.row!=i.row)return!0}return!1},t.prototype.setDataProvider=function(e){this.$gatherData=e},t.prototype.showForRange=function(e,t,n,r){if((!r||r==this.lastEvent)&&(!this.isOpen||document.activeElement!=this.getElement())){var i=e.renderer;this.isOpen||(d.addPopup(this),this.$registerCloseEvents(),this.setTheme(i.theme)),this.isOpen=!0,this.addMarker(t,e.session),this.range=a.fromPoints(t.start,t.end);var o=i.textToScreenCoordinates(t.start.row,t.start.column),s=i.scroller.getBoundingClientRect();o.pageX<s.left&&(o.pageX=s.left);var l=this.getElement();l.innerHTML="",l.appendChild(n),l.style.maxHeight="",l.style.display="block";var c=l.clientHeight,u=l.clientWidth,p=window.innerHeight-o.pageY-i.lineHeight,h=!0;o.pageY-c<0&&o.pageY<p&&(h=!1),l.style.maxHeight=(h?o.pageY:p)-10+"px",l.style.top=h?"":o.pageY+i.lineHeight+"px",l.style.bottom=h?window.innerHeight-o.pageY+"px":"",l.style.left=Math.min(o.pageX,window.innerWidth-u-10)+"px"}},t.prototype.addMarker=function(e,t){this.marker&&this.$markerSession.removeMarker(this.marker),this.$markerSession=t,this.marker=t&&t.addMarker(e,"ace_highlight-marker","text")},t.prototype.hide=function(e){(e||document.activeElement!=this.getElement())&&(e&&e.target&&("keydown"!=e.type||e.ctrlKey||e.metaKey)&&this.$element.contains(e.target)||(this.lastEvent=null,this.timeout&&clearTimeout(this.timeout),this.timeout=null,this.addMarker(null),this.isOpen&&(this.$removeCloseEvents(),this.getElement().style.display="none",this.isOpen=!1,d.removePopup(this))))},t.prototype.$registerCloseEvents=function(){window.addEventListener("keydown",this.hide,!0),window.addEventListener("wheel",this.hide,!0),window.addEventListener("mousedown",this.hide,!0)},t.prototype.$removeCloseEvents=function(){window.removeEventListener("keydown",this.hide,!0),window.removeEventListener("wheel",this.hide,!0),window.removeEventListener("mousedown",this.hide,!0)},t.prototype.onMouseOut=function(e){this.timeout&&(clearTimeout(this.timeout),this.timeout=null),this.lastEvent=null,this.isOpen&&e.relatedTarget&&!this.getElement().contains(e.relatedTarget)&&(e&&e.currentTarget.contains(e.relatedTarget)||e.relatedTarget.classList.contains("ace_content")||this.hide())},t}(c);t.HoverTooltip=u}),ace.define("ace/mouse/default_gutter_handler",["require","exports","module","ace/lib/dom","ace/lib/event","ace/tooltip","ace/config"],function(e,t,n){"use strict";var r=this&&this.__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])},e(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 r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),i=this&&this.__values||function(e){var t="function"===typeof Symbol&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&"number"===typeof e.length)return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")},o=e("../lib/dom"),a=e("../lib/event"),s=e("../tooltip").Tooltip,l=e("../config").nls;t.GUTTER_TOOLTIP_LEFT_OFFSET=5,t.GUTTER_TOOLTIP_TOP_OFFSET=3,t.GutterHandler=function(e){var t,n,r=e.editor,i=r.renderer.$gutterLayer,s=new c(r,!0);function l(e){e&&"keydown"===e.type&&(e.ctrlKey||e.metaKey)||(!e||"mouseout"!==e.type||e.relatedTarget&&!s.getElement().contains(e.relatedTarget))&&(t&&(t=clearTimeout(t)),s.isOpen&&(s.hideTooltip(),r.off("mousewheel",l),r.off("changeSession",l),window.removeEventListener("keydown",l,!0)))}function d(e){s.setPosition(e.x,e.y)}e.editor.setDefaultHandler("guttermousedown",function(t){if(r.isFocused()&&0==t.getButton()&&"foldWidgets"!=i.getRegion(t)){var n=t.getDocumentPosition().row,o=r.session.selection;if(t.getShiftKey())o.selectTo(n,0);else{if(2==t.domEvent.detail)return r.selectAll(),t.preventDefault();e.$clickSelection=r.selection.getLineRange(n)}return e.setState("selectByLines"),e.captureMouse(t),t.preventDefault()}}),e.editor.setDefaultHandler("guttermousemove",function(a){var c=a.domEvent.target||a.domEvent.srcElement;if(o.hasCssClass(c,"ace_fold-widget")||o.hasCssClass(c,"ace_custom-widget"))return l();s.isOpen&&e.$tooltipFollowsMouse&&d(a),n=a,t||(t=setTimeout(function(){t=null,n&&!e.isMousePressed&&function(){var t=n.getDocumentPosition().row;if(t==r.session.getLength()){var o=r.renderer.pixelToScreenCoordinates(0,n.y).row,a=n.$pos;if(o>r.session.documentToScreenRow(a.row,a.column))return l()}if(s.showTooltip(t),s.isOpen)if(r.on("mousewheel",l),r.on("changeSession",l),window.addEventListener("keydown",l,!0),e.$tooltipFollowsMouse)d(n);else{var c=n.getGutterRow(),u=i.$lines.get(c);if(u){var p=u.element.querySelector(".ace_gutter_annotation").getBoundingClientRect(),h=s.getElement().style;h.left=p.right-5+"px",h.top=p.bottom-3+"px"}else d(n)}}()},50))}),a.addListener(r.renderer.$gutter,"mouseout",function(e){n=null,s.isOpen&&(t=setTimeout(function(){t=null,l(e)},50))},r)};var c=function(e){function t(n,r){void 0===r&&(r=!1);var i=e.call(this,n.container)||this;i.id="gt"+ ++t.$uid,i.editor=n,i.visibleTooltipRow;var o=i.getElement();return o.setAttribute("role","tooltip"),o.setAttribute("id",i.id),o.style.pointerEvents="auto",r&&(i.onMouseOut=i.onMouseOut.bind(i),o.addEventListener("mouseout",i.onMouseOut)),i}return r(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,r=window.innerHeight||document.documentElement.clientHeight,i=this.getWidth(),o=this.getHeight();(e+=15)+i>n&&(e-=e+i-n),(t+=15)+o>r&&(t-=20+o),s.prototype.setPosition.call(this,e,t)},Object.defineProperty(t,"annotationLabels",{get:function(){return{error:{singular:l("gutter-tooltip.aria-label.error.singular","error"),plural:l("gutter-tooltip.aria-label.error.plural","errors")},security:{singular:l("gutter-tooltip.aria-label.security.singular","security finding"),plural:l("gutter-tooltip.aria-label.security.plural","security findings")},warning:{singular:l("gutter-tooltip.aria-label.warning.singular","warning"),plural:l("gutter-tooltip.aria-label.warning.plural","warnings")},info:{singular:l("gutter-tooltip.aria-label.info.singular","information message"),plural:l("gutter-tooltip.aria-label.info.plural","information messages")},hint:{singular:l("gutter-tooltip.aria-label.hint.singular","suggestion"),plural:l("gutter-tooltip.aria-label.hint.plural","suggestions")}}},enumerable:!1,configurable:!0}),t.prototype.showTooltip=function(e){var n,r,i=this.editor.renderer.$gutterLayer,a=i.$annotations[e];r=a?{displayText:Array.from(a.displayText),type:Array.from(a.type)}:{displayText:[],type:[]};var s=i.session.getFoldLine(e);if(s&&i.$showFoldedAnnotations){for(var l,c={error:[],security:[],warning:[],info:[],hint:[]},d={error:1,security:2,warning:3,info:4,hint:5},u=e+1;u<=s.end.row;u++)if(i.$annotations[u])for(var p=0;p<i.$annotations[u].text.length;p++){var h=i.$annotations[u].type[p];c[h].push(i.$annotations[u].text[p]),(!l||d[h]<d[l])&&(l=h)}if(["error","security","warning"].includes(l)){var m="".concat(t.annotationsToSummaryString(c)," in folded code.");r.displayText.push(m),r.type.push(l+"_fold")}}if(0===r.displayText.length)return this.hideTooltip();var f={error:[],security:[],warning:[],info:[],hint:[]},g=i.$useSvgGutterIcons?"ace_icon_svg":"ace_icon";for(u=0;u<r.displayText.length;u++){var v=o.createElement("span"),x=o.createElement("span");(n=x.classList).add.apply(n,["ace_".concat(r.type[u]),g]),x.setAttribute("aria-label","".concat(t.annotationLabels[r.type[u].replace("_fold","")].singular)),x.setAttribute("role","img"),x.appendChild(o.createTextNode(" ")),v.appendChild(x),v.appendChild(o.createTextNode(r.displayText[u])),v.appendChild(o.createElement("br")),f[r.type[u].replace("_fold","")].push(v)}var y=this.getElement();o.removeChildren(y),f.error.forEach(function(e){return y.appendChild(e)}),f.security.forEach(function(e){return y.appendChild(e)}),f.warning.forEach(function(e){return y.appendChild(e)}),f.info.forEach(function(e){return y.appendChild(e)}),f.hint.forEach(function(e){return y.appendChild(e)}),y.setAttribute("aria-live","polite"),this.isOpen||(this.setTheme(this.editor.renderer.theme),this.setClassName("ace_gutter-tooltip"));var b=this.$findLinkedAnnotationNode(e);b&&b.setAttribute("aria-describedby",this.id),this.show(),this.visibleTooltipRow=e,this.editor._signal("showGutterTooltip",this)},t.prototype.$findLinkedAnnotationNode=function(e){var t=this.$findCellByRow(e);if(t){var n=t.element;if(n.childNodes.length>2)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(),void 0!=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,r,o=[];try{for(var a=i(["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(d){n={error:d}}finally{try{s&&!s.done&&(r=a.return)&&r.call(a)}finally{if(n)throw n.error}}return o.join(", ")},t}(s);c.$uid=0,t.GutterTooltip=c}),ace.define("ace/mouse/mouse_event",["require","exports","module","ace/lib/event","ace/lib/useragent"],function(e,t,n){"use strict";var r=e("../lib/event"),i=e("../lib/useragent"),o=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(){r.stopPropagation(this.domEvent),this.propagationStopped=!0},e.prototype.preventDefault=function(){r.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 r.getButton(this.domEvent)},e.prototype.getShiftKey=function(){return this.domEvent.shiftKey},e.prototype.getAccelKey=function(){return i.isMac?this.domEvent.metaKey:this.domEvent.ctrlKey},e}();t.MouseEvent=o}),ace.define("ace/mouse/dragdrop_handler",["require","exports","module","ace/lib/dom","ace/lib/event","ace/lib/useragent"],function(e,t,n){"use strict";var r=e("../lib/dom"),i=e("../lib/event"),o=e("../lib/useragent");function a(e){var t=e.editor,n=r.createElement("div");n.style.cssText="top:-100px;position:absolute;z-index:2147483647;opacity:0.5",n.textContent="\xa0";["dragWait","dragWaitEnd","startDrag","dragReadyEnd","onMouseDrag"].forEach(function(t){e[t]=this[t]},this),t.on("mousedown",this.onMouseDown.bind(e));var a,l,c,d,u,p,h,m,f,g,v,x=t.container,y=0;function b(){var e=p;(function(e,n){var r=Date.now(),i=!n||e.row!=n.row,o=!n||e.column!=n.column;!g||i||o?(t.moveCursorToPosition(e),g=r,v={x:l,y:c}):s(v.x,v.y,l,c)>5?g=null:r-g>=200&&(t.renderer.scrollCursorIntoView(),g=null)})(p=t.renderer.screenToTextCoordinates(l,c),e),function(e,n){var r=Date.now(),i=t.renderer.layerConfig.lineHeight,o=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}},d=Math.min(s.x.left,s.x.right),u=Math.min(s.y.top,s.y.bottom),p={row:e.row,column:e.column};d/o<=2&&(p.column+=s.x.left<s.x.right?-3:2),u/i<=1&&(p.row+=s.y.top<s.y.bottom?-1:1);var h=e.row!=p.row,m=e.column!=p.column,g=!n||e.row!=n.row;h||m&&!g?f?r-f>=200&&t.renderer.scrollCursorIntoView(p):f=r:f=null}(p,e)}function j(){u=t.selection.toOrientedRange(),a=t.session.addMarker(u,"ace_selection",t.getSelectionStyle()),t.clearSelection(),t.isFocused()&&t.renderer.$cursorLayer.setBlinking(!1),clearInterval(d),b(),d=setInterval(b,20),y=0,i.addListener(document,"mousemove",w)}function _(){clearInterval(d),t.session.removeMarker(a),a=null,t.selection.fromOrientedRange(u),t.isFocused()&&!m&&t.$resetCursorStyle(),u=null,p=null,y=0,f=null,g=null,i.removeListener(document,"mousemove",w)}this.onDragStart=function(e){if(this.cancelDrag||!x.draggable){var r=this;return setTimeout(function(){r.startSelect(),r.captureMouse(e)},0),e.preventDefault()}u=t.getSelectionRange();var i=e.dataTransfer;i.effectAllowed=t.getReadOnly()?"copy":"copyMove",t.container.appendChild(n),i.setDragImage&&i.setDragImage(n,0,0),setTimeout(function(){t.container.removeChild(n)}),i.clearData(),i.setData("Text",t.session.getTextRange()),m=!0,this.setState("drag")},this.onDragEnd=function(e){if(x.draggable=!1,m=!1,this.setState(null),!t.getReadOnly()){var n=e.dataTransfer.dropEffect;h||"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()&&S(e.dataTransfer))return l=e.clientX,c=e.clientY,a||j(),y++,e.dataTransfer.dropEffect=h=A(e),i.preventDefault(e)},this.onDragOver=function(e){if(!t.getReadOnly()&&S(e.dataTransfer))return l=e.clientX,c=e.clientY,a||(j(),y++),null!==C&&(C=null),e.dataTransfer.dropEffect=h=A(e),i.preventDefault(e)},this.onDragLeave=function(e){if(--y<=0&&a)return _(),h=null,i.preventDefault(e)},this.onDrop=function(e){if(p){var n=e.dataTransfer;if(m)switch(h){case"move":u=u.contains(p.row,p.column)?{start:p,end:p}:t.moveText(u,p);break;case"copy":u=t.moveText(u,p,!0)}else{var r=n.getData("Text");u={start:p,end:t.session.insert(p,r)},t.focus(),h=null}return _(),i.preventDefault(e)}},i.addListener(x,"dragstart",this.onDragStart.bind(e),t),i.addListener(x,"dragend",this.onDragEnd.bind(e),t),i.addListener(x,"dragenter",this.onDragEnter.bind(e),t),i.addListener(x,"dragover",this.onDragOver.bind(e),t),i.addListener(x,"dragleave",this.onDragLeave.bind(e),t),i.addListener(x,"drop",this.onDrop.bind(e),t);var C=null;function w(){null==C&&(C=setTimeout(function(){null!=C&&a&&_()},20))}function S(e){var t=e.types;return!t||Array.prototype.some.call(t,function(e){return"text/plain"==e||"Text"==e})}function A(e){var t=["copy","copymove","all","uninitialized"],n=o.isMac?e.altKey:e.ctrlKey,r="uninitialized";try{r=e.dataTransfer.effectAllowed.toLowerCase()}catch(e){}var i="none";return n&&t.indexOf(r)>=0?i="copy":["move","copymove","linkmove","all","uninitialized"].indexOf(r)>=0?i="move":t.indexOf(r)>=0&&(i="copy"),i}}function s(e,t,n,r){return Math.sqrt(Math.pow(n-e,2)+Math.pow(r-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=o.isWin?"default":"move";e.renderer.setCursorStyle(t),this.setState("dragReady")},this.onMouseDrag=function(e){var t=this.editor.container;o.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(),r=e.getButton();if(1===(e.domEvent.detail||1)&&0===r&&n){if(e.editor.inMultiSelectMode&&(e.getAccelKey()||e.getShiftKey()))return;this.mousedownEvent.time=Date.now();var i=e.domEvent.target||e.domEvent.srcElement;if("unselectable"in i&&(i.unselectable="on"),t.getDragDelay()){if(o.isWebKit)this.cancelDrag=!0,t.container.draggable=!0;this.setState("dragWait")}else 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){"use strict";var r=e("./mouse_event").MouseEvent,i=e("../lib/event"),o=e("../lib/dom");t.addTouchListeners=function(e,t){var n,a,s,l,c,d,u,p,h,m="scroll",f=0,g=0,v=0,x=0;function y(){var e=window.navigator&&window.navigator.clipboard,n=!1,r=function(e){return t.commands.canExecute(e,t)},i=function(i){var a=i.target.getAttribute("action");if("more"==a||!n)return n=!n,function(){var i=t.getCopyText(),a=t.session.getUndoManager().hasUndo();h.replaceChild(o.buildDom(n?["span",!i&&r("selectall")&&["span",{class:"ace_mobile-button",action:"selectall"},"Select All"],i&&r("copy")&&["span",{class:"ace_mobile-button",action:"copy"},"Copy"],i&&r("cut")&&["span",{class:"ace_mobile-button",action:"cut"},"Cut"],e&&r("paste")&&["span",{class:"ace_mobile-button",action:"paste"},"Paste"],a&&r("undo")&&["span",{class:"ace_mobile-button",action:"undo"},"Undo"],r("find")&&["span",{class:"ace_mobile-button",action:"find"},"Find"],r("openCommandPalette")&&["span",{class:"ace_mobile-button",action:"openCommandPalette"},"Palette"]]:["span"]),h.firstChild)}();"paste"==a?e.readText().then(function(e){t.execCommand(a,e)}):a&&("cut"!=a&&"copy"!=a||(e?e.writeText(t.getCopyText()):document.execCommand("copy")),t.execCommand(a)),h.firstChild.style.display="none",n=!1,"openCommandPalette"!=a&&t.focus()};h=o.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(),i(e)},onclick:i},["span"],["span",{class:"ace_mobile-button",action:"more"},"..."]],t.container)}function b(){if(t.getOption("enableMobileMenu")){h||y();var e=t.selection.cursor,n=t.renderer.textToScreenCoordinates(e.row,e.column),r=t.renderer.textToScreenCoordinates(0,0).pageX,i=t.renderer.scrollLeft,o=t.container.getBoundingClientRect();h.style.top=n.pageY-o.top-3+"px",n.pageX-o.left<o.width-70?(h.style.left="",h.style.right="10px"):(h.style.right="",h.style.left=r+i-o.left+"px"),h.style.display="",h.firstChild.style.display="none",t.on("input",j)}else h&&j()}function j(e){h&&(h.style.display="none"),t.off("input",j)}function _(){c=null,clearTimeout(c);var e=t.selection.getRange(),n=e.contains(u.row,u.column);!e.isEmpty()&&n||(t.selection.moveToPosition(u),t.selection.selectWord()),m="wait",b()}i.addListener(e,"contextmenu",function(e){p&&t.textInput.getElement().focus()},t),i.addListener(e,"touchstart",function(e){var i=e.touches;if(c||i.length>1)return clearTimeout(c),c=null,s=-1,void(m="zoom");p=t.$mouseHandler.isMousePressed=!0;var o=t.renderer.layerConfig.lineHeight,d=t.renderer.layerConfig.lineHeight,h=e.timeStamp;l=h;var y=i[0],b=y.clientX,j=y.clientY;Math.abs(n-b)+Math.abs(a-j)>o&&(s=-1),n=e.clientX=b,a=e.clientY=j,v=x=0;var C=new r(e,t);if(u=C.getDocumentPosition(),h-s<500&&1==i.length&&!f)g++,e.preventDefault(),e.button=0,function(){c=null,clearTimeout(c),t.selection.moveToPosition(u);var e=g>=2?t.selection.getLineRange(u.row):t.session.getBracketRange(u);e&&!e.isEmpty()?t.selection.setRange(e):t.selection.selectWord(),m="wait"}();else{g=0;var w=t.selection.cursor,S=t.selection.isEmpty()?w:t.selection.anchor,A=t.renderer.$cursorLayer.getPixelPosition(w,!0),k=t.renderer.$cursorLayer.getPixelPosition(S,!0),T=t.renderer.scroller.getBoundingClientRect(),E=t.renderer.layerConfig.offset,M=t.renderer.scrollLeft,O=function(e,t){return(e/=d)*e+(t=t/o-.75)*t};if(e.clientX<T.left)return void(m="zoom");var R=O(e.clientX-T.left-A.left+M,e.clientY-T.top-A.top+E),P=O(e.clientX-T.left-k.left+M,e.clientY-T.top-k.top+E);R<3.5&&P<3.5&&(m=R>P?"cursor":"anchor"),m=P<3.5?"anchor":R<3.5?"cursor":"scroll",c=setTimeout(_,450)}s=h},t),i.addListener(e,"touchend",function(e){p=t.$mouseHandler.isMousePressed=!1,d&&clearInterval(d),"zoom"==m?(m="",f=0):c?(t.selection.moveToPosition(u),f=0,b()):"scroll"==m?(f+=60,d=setInterval(function(){f--<=0&&(clearInterval(d),d=null),Math.abs(v)<.01&&(v=0),Math.abs(x)<.01&&(x=0),f<20&&(v*=.9),f<20&&(x*=.9);var e=t.session.getScrollTop();t.renderer.scrollBy(10*v,10*x),e==t.session.getScrollTop()&&(f=0)},10),j()):b(),clearTimeout(c),c=null},t),i.addListener(e,"touchmove",function(e){c&&(clearTimeout(c),c=null);var i=e.touches;if(!(i.length>1||"zoom"==m)){var o=i[0],s=n-o.clientX,d=a-o.clientY;if("wait"==m){if(!(s*s+d*d>4))return e.preventDefault();m="cursor"}n=o.clientX,a=o.clientY,e.clientX=o.clientX,e.clientY=o.clientY;var u=e.timeStamp,p=u-l;if(l=u,"scroll"==m){var h=new r(e,t);h.speed=1,h.wheelX=s,h.wheelY=d,10*Math.abs(s)<Math.abs(d)&&(s=0),10*Math.abs(d)<Math.abs(s)&&(d=0),0!=p&&(v=s/p,x=d/p),t._emit("mousewheel",h),h.propagationStopped||(v=x=0)}else{var f=new r(e,t).getDocumentPosition();"cursor"==m?t.selection.moveCursorToPosition(f):"anchor"==m&&t.selection.setSelectionAnchor(f.row,f.column),t.renderer.scrollCursorIntoView(f),e.preventDefault()}}},t)}}),ace.define("ace/mouse/mouse_handler",["require","exports","module","ace/lib/event","ace/lib/useragent","ace/mouse/default_handlers","ace/mouse/default_gutter_handler","ace/mouse/mouse_event","ace/mouse/dragdrop_handler","ace/mouse/touch_handler","ace/config"],function(e,t,n){"use strict";var r=e("../lib/event"),i=e("../lib/useragent"),o=e("./default_handlers").DefaultHandlers,a=e("./default_gutter_handler").GutterHandler,s=e("./mouse_event").MouseEvent,l=e("./dragdrop_handler").DragdropHandler,c=e("./touch_handler").addTouchListeners,d=e("../config"),u=function(){function e(e){this.$dragDelay,this.$dragEnabled,this.$mouseMoved,this.mouseEvent,this.$focusTimeout;var t=this;this.editor=e,new o(this),new a(this),new l(this);var n=function(t){(!document.hasFocus||!document.hasFocus()||!e.isFocused()&&document.activeElement==(e.textInput&&e.textInput.getElement()))&&window.focus(),e.focus(),setTimeout(function(){e.isFocused()||e.focus()})},s=e.renderer.getMouseEventTarget();r.addListener(s,"click",this.onMouseEvent.bind(this,"click"),e),r.addListener(s,"mousemove",this.onMouseMove.bind(this,"mousemove"),e),r.addMultiMouseDownListener([s,e.renderer.scrollBarV&&e.renderer.scrollBarV.inner,e.renderer.scrollBarH&&e.renderer.scrollBarH.inner,e.textInput&&e.textInput.getElement()].filter(Boolean),[400,300,250],this,"onMouseEvent",e),r.addMouseWheelListener(e.container,this.onMouseWheel.bind(this,"mousewheel"),e),c(e.container,e);var d=e.renderer.$gutter;r.addListener(d,"mousedown",this.onMouseEvent.bind(this,"guttermousedown"),e),r.addListener(d,"click",this.onMouseEvent.bind(this,"gutterclick"),e),r.addListener(d,"dblclick",this.onMouseEvent.bind(this,"gutterdblclick"),e),r.addListener(d,"mousemove",this.onMouseEvent.bind(this,"guttermousemove"),e),r.addListener(s,"mousedown",n,e),r.addListener(d,"mousedown",n,e),i.isIE&&e.renderer.scrollBarV&&(r.addListener(e.renderer.scrollBarV.element,"mousedown",n,e),r.addListener(e.renderer.scrollBarH.element,"mousedown",n,e)),e.on("mousemove",function(n){if(!t.state&&!t.$dragDelay&&t.$dragEnabled){var r=e.renderer.screenToTextCoordinates(n.x,n.y),i=e.session.selection.getRange(),o=e.renderer;!i.isEmpty()&&i.insideStart(r.row,r.column)?o.setCursorStyle("default"):o.setCursorStyle("")}},e)}return e.prototype.onMouseEvent=function(e,t){this.editor.session&&this.editor._emit(e,new s(t,this.editor))},e.prototype.onMouseMove=function(e,t){var n=this.editor._eventRegistry&&this.editor._eventRegistry.mousemove;n&&n.length&&this.editor._emit(e,new s(t,this.editor))},e.prototype.onMouseWheel=function(e,t){var n=new s(t,this.editor);n.speed=2*this.$scrollSpeed,n.wheelX=t.wheelX,n.wheelY=t.wheelY,this.editor._emit(e,n)},e.prototype.setState=function(e){this.state=e},e.prototype.captureMouse=function(e,t){this.x=e.x,this.y=e.y,this.isMousePressed=!0;var n=this.editor,o=this.editor.renderer;o.$isMousePressed=!0;var a=this,l=!0,c=function(e){if(e){if(i.isWebKit&&!e.which&&a.releaseMouse)return a.releaseMouse();a.x=e.clientX,a.y=e.clientY,t&&t(e),a.mouseEvent=new s(e,a.editor),a.$mouseMoved=!0}},d=function(e){n.off("beforeEndOperation",h),l=!1,n.session&&u(),a[a.state+"End"]&&a[a.state+"End"](e),a.state="",a.isMousePressed=o.$isMousePressed=!1,o.$keepTextAreaAtCursor&&o.$moveTextAreaToCursor(),a.$onCaptureMouseMove=a.releaseMouse=null,e&&a.onMouseEvent("mouseup",e),n.endOperation()},u=function(){a[a.state]&&a[a.state](),a.$mouseMoved=!1},p=function(){l&&(u(),r.nextFrame(p))};if(i.isOldIE&&"dblclick"==e.domEvent.type)return setTimeout(function(){d(e)});var h=function(e){a.releaseMouse&&n.curOp.command.name&&n.curOp.selectionChanged&&(a[a.state+"End"]&&a[a.state+"End"](),a.state="",a.releaseMouse())};n.on("beforeEndOperation",h),n.startOperation({command:{name:"mouse"}}),a.$onCaptureMouseMove=c,a.releaseMouse=r.capture(this.editor.container,c,d),p()},e.prototype.cancelContextMenu=function(){var e=function(t){t&&t.domEvent&&"contextmenu"!=t.domEvent.type||(this.editor.off("nativecontextmenu",e),t&&t.domEvent&&r.stopEvent(t.domEvent))}.bind(this);setTimeout(e,10),this.editor.on("nativecontextmenu",e)},e.prototype.destroy=function(){this.releaseMouse&&this.releaseMouse()},e}();u.prototype.releaseMouse=null,d.defineOptions(u.prototype,"mouseHandler",{scrollSpeed:{initialValue:2},dragDelay:{initialValue:i.isMac?150:0},dragEnabled:{initialValue:!0},focusTimeout:{initialValue:0},tooltipFollowsMouse:{initialValue:!0}}),t.MouseHandler=u}),ace.define("ace/mouse/fold_handler",["require","exports","module","ace/lib/dom"],function(e,t,n){"use strict";var r=e("../lib/dom"),i=function(e){e.on("click",function(t){var n=t.getDocumentPosition(),i=e.session,o=i.getFoldAt(n.row,n.column,1);o&&(t.getAccelKey()?i.removeFold(o):i.expandFold(o),t.stop());var a=t.domEvent&&t.domEvent.target;a&&r.hasCssClass(a,"ace_inline_button")&&r.hasCssClass(a,"ace_toggle_wrap")&&(i.setOption("wrap",!i.getUseWrapMode()),e.renderer.scrollCursorIntoView())}),e.on("gutterclick",function(t){if("foldWidgets"==e.renderer.$gutterLayer.getRegion(t)){var n=t.getDocumentPosition().row,r=e.session;r.foldWidgets&&r.foldWidgets[n]&&e.session.onFoldWidgetClick(n,t),e.isFocused()||e.focus(),t.stop()}}),e.on("gutterdblclick",function(t){if("foldWidgets"==e.renderer.$gutterLayer.getRegion(t)){var n=t.getDocumentPosition().row,r=e.session,i=r.getParentFoldRangeData(n,!0),o=i.range||i.firstRange;if(o){n=o.start.row;var a=r.getFoldAt(n,r.getLine(n).length,1);a?r.removeFold(a):(r.addFold("...",o),e.renderer.scrollCursorIntoView({row:o.start.row,column:0}))}t.stop()}})};t.FoldHandler=i}),ace.define("ace/keyboard/keybinding",["require","exports","module","ace/lib/keys","ace/lib/event"],function(e,t,n){"use strict";var r=e("../lib/keys"),i=e("../lib/event"),o=function(){function e(e){this.$editor=e,this.$data={editor:e},this.$handlers=[],this.setDefaultHandler(e.commands)}return e.prototype.setDefaultHandler=function(e){this.removeKeyboardHandler(this.$defaultHandler),this.$defaultHandler=e,this.addKeyboardHandler(e,0)},e.prototype.setKeyboardHandler=function(e){var t=this.$handlers;if(t[t.length-1]!=e){for(;t[t.length-1]&&t[t.length-1]!=this.$defaultHandler;)this.removeKeyboardHandler(t[t.length-1]);this.addKeyboardHandler(e,1)}},e.prototype.addKeyboardHandler=function(e,t){if(e){"function"!=typeof e||e.handleKeyboard||(e.handleKeyboard=e);var n=this.$handlers.indexOf(e);-1!=n&&this.$handlers.splice(n,1),void 0==t?this.$handlers.push(e):this.$handlers.splice(t,0,e),-1==n&&e.attach&&e.attach(this.$editor)}},e.prototype.removeKeyboardHandler=function(e){var t=this.$handlers.indexOf(e);return-1!=t&&(this.$handlers.splice(t,1),e.detach&&e.detach(this.$editor),!0)},e.prototype.getKeyboardHandler=function(){return this.$handlers[this.$handlers.length-1]},e.prototype.getStatusText=function(){var e=this.$data,t=e.editor;return this.$handlers.map(function(n){return n.getStatusText&&n.getStatusText(t,e)||""}).filter(Boolean).join(" ")},e.prototype.$callKeyboardHandlers=function(e,t,n,r){for(var o,a=!1,s=this.$editor.commands,l=this.$handlers.length;l--&&!((o=this.$handlers[l].handleKeyboard(this.$data,e,t,n,r))&&o.command&&((a="null"==o.command||s.exec(o.command,this.$editor,o.args,r))&&r&&-1!=e&&1!=o.passEvent&&1!=o.command.passEvent&&i.stopEvent(r),a)););return a||-1!=e||(o={command:"insertstring"},a=s.exec("insertstring",this.$editor,t)),a&&this.$editor._signal&&this.$editor._signal("keyboardActivity",o),a},e.prototype.onCommandKey=function(e,t,n){var i=r.keyCodeToString(n);return this.$callKeyboardHandlers(t,i,n,e)},e.prototype.onTextInput=function(e){return this.$callKeyboardHandlers(-1,e)},e}();t.KeyBinding=o}),ace.define("ace/lib/bidiutil",["require","exports","module"],function(e,t,n){"use strict";var r=0,i=0,o=!1,a=!1,s=!1,l=[[0,3,0,1,0,0,0],[0,3,0,1,2,2,0],[0,3,0,17,2,0,1],[0,3,5,5,4,1,0],[0,3,21,21,4,0,1],[0,3,5,5,4,2,0]],c=[[2,0,1,1,0,1,0],[2,0,1,1,0,2,0],[2,0,2,1,3,2,0],[2,0,2,33,3,1,1]],d=11,u=18,p=[u,u,u,u,u,u,u,u,u,6,5,6,8,5,u,u,u,u,u,u,u,u,u,u,u,u,u,u,5,5,5,6,8,4,4,d,d,d,4,4,4,4,4,10,9,10,9,9,2,2,2,2,2,2,2,2,2,2,9,4,4,4,4,4,4,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,4,4,4,4,4,4,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,4,4,4,4,u,u,u,u,u,u,5,u,u,u,u,u,u,u,u,u,u,u,u,u,u,u,u,u,u,u,u,u,u,u,u,u,u,9,4,d,d,d,d,4,4,4,4,0,4,4,u,4,4,d,d,2,2,4,0,4,4,4,2,0,4,4,4,4,4],h=[8,8,8,8,8,8,8,8,8,8,8,u,u,u,0,1,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,8,5,13,14,15,16,17,9,d,d,d,d,d,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,9,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,8];function m(e,t,n){if(!(i<e))if(1!=e||1!=r||a)for(var o,s,l,c,d=n.length,u=0;u<d;){if(t[u]>=e){for(o=u+1;o<d&&t[o]>=e;)o++;for(s=u,l=o-1;s<l;s++,l--)c=n[s],n[s]=n[l],n[l]=c;u=o}u++}else n.reverse()}function f(e,t,n,i){var l,c,p,h,m=t[i];switch(m){case 0:case 1:o=!1;case 4:case 3:return m;case 2:return o?3:2;case 7:return o=!0,1;case 8:return 4;case 9:return i<1||i+1>=t.length||2!=(l=n[i-1])&&3!=l||2!=(c=t[i+1])&&3!=c?4:(o&&(c=3),c==l?c:4);case 10:return 2==(l=i>0?n[i-1]:5)&&i+1<t.length&&2==t[i+1]?2:4;case d:if(i>0&&2==n[i-1])return 2;if(o)return 4;for(h=i+1,p=t.length;h<p&&t[h]==d;)h++;return h<p&&2==t[h]?2:4;case 12:for(p=t.length,h=i+1;h<p&&12==t[h];)h++;if(h<p){var f=e[i],g=f>=1425&&f<=2303||64286==f;if(l=t[h],g&&(1==l||7==l))return 1}return i<1||5==(l=t[i-1])?4:n[i-1];case 5:return o=!1,a=!0,r;case 6:return s=!0,4;case 13:case 14:case 16:case 17:case 15:o=!1;case u:return 4}}function g(e){var t=e.charCodeAt(0),n=t>>8;return 0==n?t>191?0:p[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?d:/[\u06f0-\u06f9]/.test(e)?2:7:32==n&&t<=8287?h[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="\xb7",t.doBidiReorder=function(e,n,d){if(e.length<2)return{};var p=e.split(""),h=new Array(p.length),v=new Array(p.length),x=[];r=d?1:0,function(e,t,n,d){var u=r?c:l,p=null,h=null,m=null,v=0,x=null,y=-1,b=null,j=null,_=[];if(!d)for(b=0,d=[];b<n;b++)d[b]=g(e[b]);for(i=r,o=!1,a=!1,s=!1,j=0;j<n;j++){if(p=v,_[j]=h=f(e,d,_,j),x=240&(v=u[p][h]),v&=15,t[j]=m=u[v][5],x>0)if(16==x){for(b=y;b<j;b++)t[b]=1;y=-1}else y=-1;if(u[v][6])-1==y&&(y=j);else if(y>-1){for(b=y;b<j;b++)t[b]=m;y=-1}5==d[j]&&(t[j]=0),i|=m}if(s)for(b=0;b<n;b++)if(6==d[b]){t[b]=r;for(var C=b-1;C>=0&&8==d[C];C--)t[C]=r}}(p,x,p.length,n);for(var y=0;y<h.length;h[y]=y,y++);m(2,x,h),m(1,x,h);for(y=0;y<h.length-1;y++)3===n[y]?x[y]=t.AN:1===x[y]&&(n[y]>7&&n[y]<13||4===n[y]||n[y]===u)?x[y]=t.ON_R:y>0&&"\u0644"===p[y-1]&&/\u0622|\u0623|\u0625|\u0627/.test(p[y])&&(x[y-1]=x[y]=t.R_H,y++);p[p.length-1]===t.DOT&&(x[p.length-1]=t.B),"\u202b"===p[0]&&(x[0]=t.RLE);for(y=0;y<h.length;y++)v[y]=x[h[y]];return{logicalFromVisual:h,bidiLevels:v}},t.hasBidiCharacters=function(e,t){for(var n=!1,r=0;r<e.length;r++)t[r]=g(e.charAt(r)),n||1!=t[r]&&7!=t[r]&&3!=t[r]||(n=!0);return n},t.getVisualFromLogicalIdx=function(e,t){for(var n=0;n<t.logicalFromVisual.length;n++)if(t.logicalFromVisual[n]==e)return n;return 0}}),ace.define("ace/bidihandler",["require","exports","module","ace/lib/bidiutil","ace/lib/lang"],function(e,t,n){"use strict";var r=e("./lib/bidiutil"),i=e("./lib/lang"),o=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac\u202B]/,a=function(){function e(e){this.session=e,this.bidiMap={},this.currentRow=null,this.bidiUtil=r,this.charWidths=[],this.EOL="\xac",this.showInvisibles=!0,this.isRtlDir=!1,this.$isRtl=!1,this.line="",this.wrapIndent=0,this.EOF="\xb6",this.RLE="\u202b",this.contentWidth=0,this.fontMetrics=null,this.rtlLineOffset=0,this.wrapOffset=0,this.isMoveLeftOperation=!1,this.seenBidi=o.test(e.getValue())}return e.prototype.isBidiRow=function(e,t,n){return!!this.seenBidi&&(e!==this.currentRow&&(this.currentRow=e,this.updateRowLine(t,n),this.updateBidiMap()),this.bidiMap.bidiLevels)},e.prototype.onChange=function(e){this.seenBidi?this.currentRow=null:"insert"==e.action&&o.test(e.lines.join("\n"))&&(this.seenBidi=!0,this.currentRow=null)},e.prototype.getDocumentRow=function(){var e=0,t=this.session.$screenRowCache;if(t.length){var n=this.session.$getRowCacheIndex(t,this.currentRow);n>=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,r=this.session.$getRowCacheIndex(t,this.currentRow);this.currentRow-e>0&&(n=this.session.$getRowCacheIndex(t,this.currentRow-e-1))===r;)r=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 o=this.session.$wrapData[e];o&&(void 0===t&&(t=this.getSplitIndex()),t>0&&o.length?(this.wrapIndent=o.indent,this.wrapOffset=this.wrapIndent*this.charWidths[r.L],this.line=t<o.length?this.line.substring(o[t-1],o[t]):this.line.substring(o[o.length-1])):this.line=this.line.substring(0,o[t]),t==o.length&&(this.line+=this.showInvisibles?n:r.DOT))}else this.line+=this.showInvisibles?n:r.DOT;var a,s=this.session,l=0;this.line=this.line.replace(/\t|[\u1100-\u2029, \u202F-\uFFE6]/g,function(e,t){return"\t"===e||s.isFullWidth(e.charCodeAt(0))?(a="\t"===e?s.getScreenTabSize(t+l):2,l+=a-1,i.stringRepeat(r.DOT,a)):e}),this.isRtlDir&&(this.fontMetrics.$main.textContent=this.line.charAt(this.line.length-1)==r.DOT?this.line.substr(0,this.line.length-1):this.line,this.rtlLineOffset=this.contentWidth-this.fontMetrics.$main.getBoundingClientRect().width)},e.prototype.updateBidiMap=function(){var e=[];r.hasBidiCharacters(this.line,e)||this.isRtlDir?this.bidiMap=r.doBidiReorder(this.line,e,this.isRtlDir):this.bidiMap={}},e.prototype.markAsDirty=function(){this.currentRow=null},e.prototype.updateCharacterWidths=function(e){if(this.characterWidth!==e.$characterSize.width){this.fontMetrics=e;var t=this.characterWidth=e.$characterSize.width,n=e.$measureCharWidth("\u05d4");this.charWidths[r.L]=this.charWidths[r.EN]=this.charWidths[r.ON_R]=t,this.charWidths[r.R]=this.charWidths[r.AN]=n,this.charWidths[r.R_H]=.45*n,this.charWidths[r.B]=this.charWidths[r.RLE]=0,this.currentRow=null}},e.prototype.setShowInvisibles=function(e){this.showInvisibles=e,this.currentRow=null},e.prototype.setEolChar=function(e){this.EOL=e},e.prototype.setContentWidth=function(e){this.contentWidth=e},e.prototype.isRtlLine=function(e){return!!this.$isRtl||(void 0!=e?this.session.getLine(e).charAt(0)==this.RLE:this.isRtlDir)},e.prototype.setRtlDirection=function(e,t){for(var n=e.getCursorPosition(),r=e.selection.getSelectionAnchor().row;r<=n.row;r++)t||e.session.getLine(r).charAt(0)!==e.session.$bidiHandler.RLE?t&&e.session.getLine(r).charAt(0)!==e.session.$bidiHandler.RLE&&e.session.doc.insert({column:0,row:r},e.session.$bidiHandler.RLE):e.session.doc.removeInLine(r,0,1)},e.prototype.getPosLeft=function(e){e-=this.wrapIndent;var t=this.line.charAt(0)===this.RLE?1:0,n=e>t?this.session.getOverwrite()?e:e-1:t,i=r.getVisualFromLogicalIdx(n,this.bidiMap),o=this.bidiMap.bidiLevels,a=0;!this.session.getOverwrite()&&e<=t&&o[i]%2!==0&&i++;for(var s=0;s<i;s++)a+=this.charWidths[o[s]];return!this.session.getOverwrite()&&e>t&&o[i]%2===0&&(a+=this.charWidths[o[i]]),this.wrapIndent&&(a+=this.isRtlDir?-1*this.wrapOffset:this.wrapOffset),this.isRtlDir&&(a+=this.rtlLineOffset),a},e.prototype.getSelections=function(e,t){var n,r=this.bidiMap,i=r.bidiLevels,o=[],a=0,s=Math.min(e,t)-this.wrapIndent,l=Math.max(e,t)-this.wrapIndent,c=!1,d=!1,u=0;this.wrapIndent&&(a+=this.isRtlDir?-1*this.wrapOffset:this.wrapOffset);for(var p,h=0;h<i.length;h++)p=r.logicalFromVisual[h],n=i[h],(c=p>=s&&p<l)&&!d?u=a:!c&&d&&o.push({left:u,width:a-u}),a+=this.charWidths[n],d=c;if(c&&h===i.length&&o.push({left:u,width:a-u}),this.isRtlDir)for(var m=0;m<o.length;m++)o[m].left+=this.rtlLineOffset;return o},e.prototype.offsetToCol=function(e){this.isRtlDir&&(e-=this.rtlLineOffset);var t=0,n=(e=Math.max(e,0),0),r=0,i=this.bidiMap.bidiLevels,o=this.charWidths[i[r]];for(this.wrapIndent&&(e-=this.isRtlDir?-1*this.wrapOffset:this.wrapOffset);e>n+o/2;){if(n+=o,r===i.length-1){o=0;break}o=this.charWidths[i[++r]]}return r>0&&i[r-1]%2!==0&&i[r]%2===0?(e<n&&r--,t=this.bidiMap.logicalFromVisual[r]):r>0&&i[r-1]%2===0&&i[r]%2!==0?t=1+(e>n?this.bidiMap.logicalFromVisual[r]:this.bidiMap.logicalFromVisual[r-1]):this.isRtlDir&&r===i.length-1&&0===o&&i[r-1]%2===0||!this.isRtlDir&&0===r&&i[r]%2!==0?t=1+this.bidiMap.logicalFromVisual[r]:(r>0&&i[r-1]%2!==0&&0!==o&&r--,t=this.bidiMap.logicalFromVisual[r]),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){"use strict";var r=e("./lib/oop"),i=e("./lib/lang"),o=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,r=t?e.start:e.end;this.$setSelection(n.row,n.column,r.row,r.column)},e.prototype.$setSelection=function(e,t,n,r){if(!this.$silent){var i=this.$isEmpty,o=this.inMultiSelectMode;this.$silent=!0,this.$cursorChanged=this.$anchorChanged=!1,this.anchor.setPosition(e,t),this.cursor.setPosition(n,r),this.$isEmpty=!a.comparePoints(this.anchor,this.cursor),this.$silent=!1,this.$cursorChanged&&this._emit("changeCursor"),(this.$cursorChanged||this.$anchorChanged||i!=this.$isEmpty||o)&&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("undefined"==typeof 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,r="number"==typeof e?e:this.lead.row,i=this.session.getFoldLine(r);return i?(r=i.start.row,n=i.end.row):n=r,!0===t?new a(r,0,n,this.session.getLine(n).length):new a(r,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 r=e.column,i=e.column+t;return n<0&&(r=e.column-t,i=e.column),this.session.isTabStop(e)&&this.doc.getLine(e.row).slice(r,i).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.row<this.doc.getLength()-1&&this.moveCursorTo(this.lead.row+1,0);else{var n=this.session.getTabSize();t=this.lead;this.wouldMoveIntoSoftTab(t,n,1)&&!this.session.getNavigateWithinSoftTabs()?this.moveCursorBy(0,n):this.moveCursorBy(0,1)}},e.prototype.moveCursorLineStart=function(){var e=this.lead.row,t=this.lead.column,n=this.session.documentToScreenRow(e,t),r=this.session.screenToDocumentPosition(n,0),i=this.session.getDisplayLine(e,null,r.row,r.column).match(/^\s*/);i[0].length==t||this.session.$useEmacsStyleLineStart||(r.column+=i[0].length),this.moveCursorToPosition(r)},e.prototype.moveCursorLineEnd=function(){var e=this.lead,t=this.session.getDocumentLastRowColumnPosition(e.row,e.column);if(this.lead.column==t.column){var n=this.session.getLine(t.row);if(t.column==n.length){var r=n.search(/\s+$/);r>0&&(t.column=r)}}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),r=n.substring(t);this.session.nonTokenRe.lastIndex=0,this.session.tokenRe.lastIndex=0;var i=this.session.getFoldAt(e,t,1);if(i)this.moveCursorTo(i.end.row,i.end.column);else{if(this.session.nonTokenRe.exec(r)&&(t+=this.session.nonTokenRe.lastIndex,this.session.nonTokenRe.lastIndex=0,r=n.substring(t)),t>=n.length)return this.moveCursorTo(e,n.length),this.moveCursorRight(),void(e<this.doc.getLength()-1&&this.moveCursorWordRight());this.session.tokenRe.exec(r)&&(t+=this.session.tokenRe.lastIndex,this.session.tokenRe.lastIndex=0),this.moveCursorTo(e,t)}},e.prototype.moveCursorLongWordLeft=function(){var e,t=this.lead.row,n=this.lead.column;if(e=this.session.getFoldAt(t,n,-1))this.moveCursorTo(e.start.row,e.start.column);else{var r=this.session.getFoldStringAt(t,n,-1);null==r&&(r=this.doc.getLine(t).substring(0,n));var o=i.stringReverse(r);if(this.session.nonTokenRe.lastIndex=0,this.session.tokenRe.lastIndex=0,this.session.nonTokenRe.exec(o)&&(n-=this.session.nonTokenRe.lastIndex,o=o.slice(this.session.nonTokenRe.lastIndex),this.session.nonTokenRe.lastIndex=0),n<=0)return this.moveCursorTo(t,0),this.moveCursorLeft(),void(t>0&&this.moveCursorWordLeft());this.session.tokenRe.exec(o)&&(n-=this.session.tokenRe.lastIndex,this.session.tokenRe.lastIndex=0),this.moveCursorTo(t,n)}},e.prototype.$shortWordEndIndex=function(e){var t,n=0,r=/\s/,i=this.session.tokenRe;if(i.lastIndex=0,this.session.tokenRe.exec(e))n=this.session.tokenRe.lastIndex;else{for(;(t=e[n])&&r.test(t);)n++;if(n<1)for(i.lastIndex=0;(t=e[n])&&!i.test(t);)if(i.lastIndex=0,n++,r.test(t)){if(n>2){n--;break}for(;(t=e[n])&&r.test(t);)n++;if(n>2)break}}return i.lastIndex=0,n},e.prototype.moveCursorShortWordRight=function(){var e=this.lead.row,t=this.lead.column,n=this.doc.getLine(e),r=n.substring(t),i=this.session.getFoldAt(e,t,1);if(i)return this.moveCursorTo(i.end.row,i.end.column);if(t==n.length){var o=this.doc.getLength();do{e++,r=this.doc.getLine(e)}while(e<o&&/^\s*$/.test(r));/^\s+/.test(r)||(r=""),t=0}var a=this.$shortWordEndIndex(r);this.moveCursorTo(e,t+a)},e.prototype.moveCursorShortWordLeft=function(){var e,t=this.lead.row,n=this.lead.column;if(e=this.session.getFoldAt(t,n,-1))return this.moveCursorTo(e.start.row,e.start.column);var r=this.session.getLine(t).substring(0,n);if(0===n){do{t--,r=this.doc.getLine(t)}while(t>0&&/^\s*$/.test(r));n=r.length,/\s+$/.test(r)||(r="")}var o=i.stringReverse(r),a=this.$shortWordEndIndex(o);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,r=this.session.documentToScreenPosition(this.lead.row,this.lead.column);if(0===t&&(0!==e&&(this.session.$bidiHandler.isBidiRow(r.row,this.lead.row)?(n=this.session.$bidiHandler.getPosLeft(r.column),r.column=Math.round(n/this.session.$bidiHandler.charWidths[0])):n=r.column*this.session.$bidiHandler.charWidths[0]),this.$desiredColumn?r.column=this.$desiredColumn:this.$desiredColumn=r.column),0!=e&&this.session.lineWidgets&&this.session.lineWidgets[this.lead.row]){var i=this.session.lineWidgets[this.lead.row];e<0?e-=i.rowsAbove||0:e>0&&(e+=i.rowCount-(i.rowsAbove||0))}var o=this.session.screenToDocumentPosition(r.row+e,r.column,n);0!==e&&0===t&&o.row===this.lead.row&&(o.column,this.lead.column),this.moveCursorTo(o.row,o.column+t,0===t)},e.prototype.moveCursorToPosition=function(e){this.moveCursorTo(e.row,e.column)},e.prototype.moveCursorTo=function(e,t,n){var r=this.session.getFoldAt(e,t,1);r&&(e=r.start.row,t=r.start.column),this.$keepDesiredColumnOnChange=!0;var i=this.session.getLine(e);/[\uDC00-\uDFFF]/.test(i.charAt(t))&&i.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 r=this.session.screenToDocumentPosition(e,t);this.moveCursorTo(r.row,r.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(r){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(void 0==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,r.implement(s.prototype,o),t.Selection=s}),ace.define("ace/tokenizer",["require","exports","module","ace/lib/report_error"],function(e,t,n){"use strict";var r=e("./lib/report_error").reportError,i=2e3,o=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],r=[],i=0,o=this.matchMappings[t]={defaultToken:"text"},a="g",s=[],l=0;l<n.length;l++){var c=n[l];if(c.defaultToken&&(o.defaultToken=c.defaultToken),c.caseInsensitive&&-1===a.indexOf("i")&&(a+="i"),c.unicode&&-1===a.indexOf("u")&&(a+="u"),null!=c.regex){c.regex instanceof RegExp&&(c.regex=c.regex.toString().slice(1,-1));var d=c.regex,u=new RegExp("(?:("+d+")|(.))").exec("a").length-2;Array.isArray(c.token)?1==c.token.length||1==u?c.token=c.token[0]:u-1!=c.token.length?(this.reportError("number of classes and regexp groups doesn't match",{rule:c,groupCount:u-1}),c.token=c.token[0]):(c.tokenArray=c.token,c.token=null,c.onMatch=this.$arrayTokens):"function"!=typeof c.token||c.onMatch||(c.onMatch=u>1?this.$applyToken:c.token),u>1&&(/\\\d/.test(c.regex)?d=c.regex.replace(/\\([0-9]+)/g,function(e,t){return"\\"+(parseInt(t,10)+i+1)}):(u=1,d=this.removeCapturingGroups(c.regex)),c.splitRegex||"string"==typeof c.token||s.push(c)),o[i]=l,i+=u,r.push(d),c.onMatch||(c.onMatch=null)}}r.length||(o[0]=0,r.push("$")),s.forEach(function(e){e.splitRegex=this.createSplitterRegexp(e.regex,a)},this),this.regExps[t]=new RegExp("("+r.join(")|(")+")|($)",a)}}return e.prototype.$setMaxTokenCount=function(e){i=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 r=[],i=0,o=n.length;i<o;i++)t[i]&&(r[r.length]={type:n[i],value:t[i]});return r},e.prototype.$arrayTokens=function(e){if(!e)return[];var t=this.splitRegex.exec(e);if(!t)return"text";for(var n=[],r=this.tokenArray,i=0,o=r.length;i<o;i++)t[i+1]&&(n[n.length]={type:r[i],value:t[i+1]});return n},e.prototype.removeCapturingGroups=function(e){return e.replace(/\\.|\[(?:\\.|[^\\\]])*|\(\?[:=!<]|(\()/g,function(e,t){return t?"(?:":e})},e.prototype.createSplitterRegexp=function(e,t){if(-1!=e.indexOf("(?=")){var n=0,r=!1,i={};e.replace(/(\\.)|(\((?:\?[=!])?)|(\))|([\[\]])/g,function(e,t,o,a,s,l){return r?r="]"!=s:s?r=!0:a?(n==i.stack&&(i.end=l+1,i.stack=-1),n--):o&&(n++,1!=o.length&&(i.stack=n,i.start=l)),e}),null!=i.end&&/^\)*$/.test(e.substr(i.end))&&(e=e.substring(0,i.start)+e.substr(i.end))}return"^"!=e.charAt(0)&&(e="^"+e),"$"!=e.charAt(e.length-1)&&(e+="$"),new RegExp(e,(t||"").replace("g",""))},e.prototype.getLineTokens=function(e,t){if(t&&"string"!=typeof t){var n=t.slice(0);"#tmp"===(t=n[0])&&(n.shift(),t=n.shift())}else n=[];var r=t||"start",o=this.states[r];o||(r="start",o=this.states[r]);var a=this.matchMappings[r],s=this.regExps[r];s.lastIndex=0;for(var l,c=[],d=0,u=0,p={type:null,value:""};l=s.exec(e);){var h=a.defaultToken,m=null,f=l[0],g=s.lastIndex;if(g-f.length>d){var v=e.substring(d,g-f.length);p.type==h?p.value+=v:(p.type&&c.push(p),p={type:h,value:v})}for(var x=0;x<l.length-2;x++)if(void 0!==l[x+1]){h=(m=o[a[x]]).onMatch?m.onMatch(f,r,n,e):m.token,m.next&&(r="string"==typeof m.next?m.next:m.next(r,n),(o=this.states[r])||(this.reportError("state doesn't exist",r),r="start",o=this.states[r]),a=this.matchMappings[r],d=g,(s=this.regExps[r]).lastIndex=g),m.consumeLineEnd&&(d=g);break}if(f)if("string"===typeof h)m&&!1===m.merge||p.type!==h?(p.type&&c.push(p),p={type:h,value:f}):p.value+=f;else if(h){p.type&&c.push(p),p={type:null,value:""};for(x=0;x<h.length;x++)c.push(h[x])}if(d==e.length)break;if(d=g,u++>i){for(u>2*e.length&&this.reportError("infinite loop with in ace tokenizer",{startState:t,line:e});d<e.length;)p.type&&c.push(p),p={value:e.substring(d,d+=500),type:"overflow"};r="start",n=[];break}}return p.type&&c.push(p),n.length>1&&n[0]!==r&&n.unshift("#tmp",r),{tokens:c,state:n.length?n:r}},e}();o.prototype.reportError=r,t.Tokenizer=o}),ace.define("ace/mode/text_highlight_rules",["require","exports","module","ace/lib/deep_copy"],function(e,t,n){"use strict";var r,i=e("../lib/deep_copy").deepCopy;(function(){this.addRules=function(e,t){if(t)for(var n in e){for(var r=e[n],i=0;i<r.length;i++){var o=r[i];(o.next||o.onMatch)&&("string"==typeof o.next&&0!==o.next.indexOf(t)&&(o.next=t+o.next),o.nextState&&0!==o.nextState.indexOf(t)&&(o.nextState=t+o.nextState))}this.$rules[t+n]=r}else for(var n in e)this.$rules[n]=e[n]},this.getRules=function(){return this.$rules},this.embedRules=function(e,t,n,r,o){var a="function"==typeof e?(new e).getRules():e;if(r)for(var s=0;s<r.length;s++)r[s]=t+r[s];else for(var l in r=[],a)r.push(t+l);if(this.addRules(a,t),n){var c=Array.prototype[o?"push":"unshift"];for(s=0;s<r.length;s++)c.apply(this.$rules[r[s]],i(n))}this.$embeds||(this.$embeds=[]),this.$embeds.push(t)},this.getEmbeds=function(){return this.$embeds};var e=function(e,t){return("start"!=e||t.length)&&t.unshift(this.nextState,e),this.nextState},t=function(e,t){return t.shift(),t.shift()||"start"};this.normalizeRules=function(){var n=0,r=this.$rules;Object.keys(r).forEach(function i(o){var a=r[o];a.processed=!0;for(var s=0;s<a.length;s++){var l=a[s],c=null;Array.isArray(l)&&(c=l,l={}),!l.regex&&l.start&&(l.regex=l.start,l.next||(l.next=[]),l.next.push({defaultToken:l.token},{token:l.token+".end",regex:l.end||l.start,next:"pop"}),l.token=l.token+".start",l.push=!0);var d=l.next||l.push;if(d&&Array.isArray(d)){var u=l.stateName;u||("string"!=typeof(u=l.token)&&(u=u[0]||""),r[u]&&(u+=n++)),r[u]=d,l.next=u,i(u)}else"pop"==d&&(l.next=t);if(l.push&&(l.nextState=l.next||l.push,l.next=e,delete l.push),l.rules)for(var p in l.rules)r[p]?r[p].push&&r[p].push.apply(r[p],l.rules[p]):r[p]=l.rules[p];var h="string"==typeof l?l:l.include;if(h&&("$self"===h&&(h="start"),c=Array.isArray(h)?h.map(function(e){return r[e]}):r[h]),c){var m=[s,1].concat(c);l.noEscape&&(m=m.filter(function(e){return!e.next})),a.splice.apply(a,m),s--}l.keywordMap&&(l.token=this.createKeywordMapper(l.keywordMap,l.defaultToken||"text",l.caseInsensitive),delete l.defaultToken)}},this)},this.createKeywordMapper=function(e,t,n,r){var i=Object.create(null);return this.$keywordList=[],Object.keys(e).forEach(function(t){for(var o=e[t].split(r||"|"),a=o.length;a--;){var s=o[a];this.$keywordList.push(s),n&&(s=s.toLowerCase()),i[s]=t}},this),e=null,n?function(e){return i[e.toLowerCase()]||t}:function(e){return i[e]||t}},this.getKeywords=function(){return this.$keywords}}).call((r=function(){this.$rules={start:[{token:"empty_line",regex:"^$"},{defaultToken:"text"}]}}).prototype),t.TextHighlightRules=r}),ace.define("ace/mode/behaviour",["require","exports","module"],function(e,t,n){"use strict";var r;(function(){this.add=function(e,t,n){switch(void 0){case this.$behaviours:this.$behaviours={};case this.$behaviours[e]:this.$behaviours[e]={}}this.$behaviours[e][t]=n},this.addBehaviours=function(e){for(var t in e)for(var n in e[t])this.add(t,n,e[t][n])},this.remove=function(e){this.$behaviours&&this.$behaviours[e]&&delete this.$behaviours[e]},this.inherit=function(e,t){if("function"===typeof e)var n=(new e).getBehaviours(t);else n=e.getBehaviours(t);this.addBehaviours(n)},this.getBehaviours=function(e){if(e){for(var t={},n=0;n<e.length;n++)this.$behaviours[e[n]]&&(t[e[n]]=this.$behaviours[e[n]]);return t}return this.$behaviours}}).call((r=function(){this.$behaviours={}}).prototype),t.Behaviour=r}),ace.define("ace/token_iterator",["require","exports","module","ace/range"],function(e,t,n){"use strict";var r=e("./range").Range,i=function(){function e(e,t,n){this.$session=e,this.$row=t,this.$rowTokens=e.getTokens(t);var r=e.getTokenAt(t,n);this.$tokenIndex=r?r.index:-1}return e.prototype.stepBackward=function(){for(this.$tokenIndex-=1;this.$tokenIndex<0;){if(this.$row-=1,this.$row<0)return this.$row=0,null;this.$rowTokens=this.$session.getTokens(this.$row),this.$tokenIndex=this.$rowTokens.length-1}return this.$rowTokens[this.$tokenIndex]},e.prototype.stepForward=function(){var e;for(this.$tokenIndex+=1;this.$tokenIndex>=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 r(this.$row,t,this.$row,t+e.value.length)},e}();t.TokenIterator=i}),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){"use strict";var r,i,o=e("../../lib/oop"),a=e("../behaviour").Behaviour,s=e("../../token_iterator").TokenIterator,l=e("../../lib/lang"),c=["text","paren.rparen","rparen","paren","punctuation.operator"],d=["text","paren.rparen","rparen","paren","punctuation.operator","comment"],u={},p={'"':'"',"'":"'"},h=function(e){var t=-1;if(e.multiSelect&&(t=e.selection.index,u.rangeCount!=e.multiSelect.rangeCount&&(u={rangeCount:e.multiSelect.rangeCount})),u[t])return r=u[t];r=u[t]={autoInsertedBrackets:0,autoInsertedRow:-1,autoInsertedLineEnd:"",maybeInsertedBrackets:0,maybeInsertedRow:-1,maybeInsertedLineStart:"",maybeInsertedLineEnd:""}},m=function(e,t,n,r){var i=e.end.row-e.start.row;return{text:n+t+r,selection:[0,e.start.column+1,i,e.end.column+(i?0:1)]}};(i=function(e){e=e||{},this.add("braces","insertion",function(t,n,o,a,s){var c=o.getCursorPosition(),d=a.doc.getLine(c.row);if("{"==s){h(o);var u=o.getSelectionRange(),p=a.doc.getTextRange(u),f=a.getTokenAt(c.row,c.column);if(""!==p&&"{"!==p&&o.getWrapBehavioursEnabled())return m(u,p,"{","}");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 i.recordAutoInsert(o,a,"}"),{text:"{}",selection:[1,1]}}if(i.isSaneInsertion(o,a))return/[\]\}\)]/.test(d[c.column])||o.inMultiSelectMode||e.braces?(i.recordAutoInsert(o,a,"}"),{text:"{}",selection:[1,1]}):(i.recordMaybeInsert(o,a,"{"),{text:"{",selection:[1,1]})}else if("}"==s){if(h(o),"}"==d.substring(c.column,c.column+1))if(null!==a.$findOpeningBracket("}",{column:c.column+1,row:c.row})&&i.isAutoInsertedClosing(c,d,s))return i.popAutoInsertedClosing(),{text:"",selection:[1,1]}}else{if("\n"==s||"\r\n"==s){h(o);var g="";if(i.isMaybeInsertedClosing(c,d)&&(g=l.stringRepeat("}",r.maybeInsertedBrackets),i.clearMaybeInsertedClosing()),"}"===d.substring(c.column,c.column+1)){var v=a.findMatchingBracket({row:c.row,column:c.column+1},"}");if(!v)return null;var x=this.$getIndent(a.getLine(v.row))}else{if(!g)return void i.clearMaybeInsertedClosing();x=this.$getIndent(d)}var y=x+a.getTabString();return{text:"\n"+y+"\n"+x+g,selection:[1,y.length,1,y.length]}}i.clearMaybeInsertedClosing()}}),this.add("braces","deletion",function(e,t,n,i,o){var a=i.doc.getTextRange(o);if(!o.isMultiLine()&&"{"==a){if(h(n),"}"==i.doc.getLine(o.start.row).substring(o.end.column,o.end.column+1))return o.end.column++,o;r.maybeInsertedBrackets--}}),this.add("parens","insertion",function(e,t,n,r,o){if("("==o){h(n);var a=n.getSelectionRange(),s=r.doc.getTextRange(a);if(""!==s&&n.getWrapBehavioursEnabled())return m(a,s,"(",")");if(i.isSaneInsertion(n,r))return i.recordAutoInsert(n,r,")"),{text:"()",selection:[1,1]}}else if(")"==o){h(n);var l=n.getCursorPosition(),c=r.doc.getLine(l.row);if(")"==c.substring(l.column,l.column+1))if(null!==r.$findOpeningBracket(")",{column:l.column+1,row:l.row})&&i.isAutoInsertedClosing(l,c,o))return i.popAutoInsertedClosing(),{text:"",selection:[1,1]}}}),this.add("parens","deletion",function(e,t,n,r,i){var o=r.doc.getTextRange(i);if(!i.isMultiLine()&&"("==o&&(h(n),")"==r.doc.getLine(i.start.row).substring(i.start.column+1,i.start.column+2)))return i.end.column++,i}),this.add("brackets","insertion",function(e,t,n,r,o){if("["==o){h(n);var a=n.getSelectionRange(),s=r.doc.getTextRange(a);if(""!==s&&n.getWrapBehavioursEnabled())return m(a,s,"[","]");if(i.isSaneInsertion(n,r))return i.recordAutoInsert(n,r,"]"),{text:"[]",selection:[1,1]}}else if("]"==o){h(n);var l=n.getCursorPosition(),c=r.doc.getLine(l.row);if("]"==c.substring(l.column,l.column+1))if(null!==r.$findOpeningBracket("]",{column:l.column+1,row:l.row})&&i.isAutoInsertedClosing(l,c,o))return i.popAutoInsertedClosing(),{text:"",selection:[1,1]}}}),this.add("brackets","deletion",function(e,t,n,r,i){var o=r.doc.getTextRange(i);if(!i.isMultiLine()&&"["==o&&(h(n),"]"==r.doc.getLine(i.start.row).substring(i.start.column+1,i.start.column+2)))return i.end.column++,i}),this.add("string_dquotes","insertion",function(e,t,n,r,i){var o=r.$mode.$quotes||p;if(1==i.length&&o[i]){if(this.lineCommentStart&&-1!=this.lineCommentStart.indexOf(i))return;h(n);var a=i,s=n.getSelectionRange(),l=r.doc.getTextRange(s);if(!(""===l||1==l.length&&o[l])&&n.getWrapBehavioursEnabled())return m(s,l,a,a);if(!l){var c=n.getCursorPosition(),d=r.doc.getLine(c.row),u=d.substring(c.column-1,c.column),f=d.substring(c.column,c.column+1),g=r.getTokenAt(c.row,c.column),v=r.getTokenAt(c.row,c.column+1);if("\\"==u&&g&&/escape/.test(g.type))return null;var x,y=g&&/string|escape/.test(g.type),b=!v||/string|escape/.test(v.type);if(f==a)(x=y!==b)&&/string\.end/.test(v.type)&&(x=!1);else{if(y&&!b)return null;if(y&&b)return null;var j=r.$mode.tokenRe;j.lastIndex=0;var _=j.test(u);j.lastIndex=0;var C=j.test(f),w=r.$mode.$pairQuotesAfter;if(!(w&&w[a]&&w[a].test(u))&&_||C)return null;if(f&&!/[\s;,.})\]\\]/.test(f))return null;var S=d[c.column-2];if(u==a&&(S==a||j.test(S)))return null;x=!0}return{text:x?a+a:"",selection:[1,1]}}}}),this.add("string_dquotes","deletion",function(e,t,n,r,i){var o=r.$mode.$quotes||p,a=r.doc.getTextRange(i);if(!i.isMultiLine()&&o.hasOwnProperty(a)&&(h(n),r.doc.getLine(i.start.row).substring(i.start.column+1,i.start.column+2)==a))return i.end.column++,i}),!1!==e.closeDocComment&&this.add("doc comment end","insertion",function(e,t,n,r,i){if("doc-start"===e&&("\n"===i||"\r\n"===i)&&n.selection.isEmpty()){var o=n.getCursorPosition();if(0===o.column)return;for(var a=r.doc.getLine(o.row),s=r.doc.getLine(o.row+1),l=r.getTokens(o.row),c=0,d=0;d<l.length;d++){c+=l[d].value.length;var u=l[d];if(c>=o.column){if(c===o.column){if(!/\.doc/.test(u.type))return;if(/\*\//.test(u.value)){var p=l[d+1];if(!p||!/\.doc/.test(p.type))return}}var h=o.column-(c-u.value.length),m=u.value.indexOf("*/"),f=u.value.indexOf("/**",m>-1?m+2:0);if(-1!==f&&h>f&&h<f+3)return;if(-1!==m&&-1!==f&&h>=m&&h<=f||!/\.doc/.test(u.type))return;break}}var g=this.$getIndent(a);if(/\s*\*/.test(s))return/^\s*\*/.test(a)?{text:i+g+"* ",selection:[1,2+g.length,1,2+g.length]}:{text:i+g+" * ",selection:[1,3+g.length,1,3+g.length]};if(/\/\*\*/.test(a.substring(0,o.column)))return{text:i+g+" * "+i+" "+g+"*/",selection:[1,4+g.length,1,4+g.length]}}})}).isSaneInsertion=function(e,t){var n=e.getCursorPosition(),r=new s(t,n.row,n.column);if(!this.$matchTokenType(r.getCurrentToken()||"text",c)){if(/[)}\]]/.test(e.session.getLine(n.row)[n.column]))return!0;var i=new s(t,n.row,n.column+1);if(!this.$matchTokenType(i.getCurrentToken()||"text",c))return!1}return r.stepForward(),r.getCurrentTokenRow()!==n.row||this.$matchTokenType(r.getCurrentToken()||"text",d)},i.$matchTokenType=function(e,t){return t.indexOf(e.type||e)>-1},i.recordAutoInsert=function(e,t,n){var i=e.getCursorPosition(),o=t.doc.getLine(i.row);this.isAutoInsertedClosing(i,o,r.autoInsertedLineEnd[0])||(r.autoInsertedBrackets=0),r.autoInsertedRow=i.row,r.autoInsertedLineEnd=n+o.substr(i.column),r.autoInsertedBrackets++},i.recordMaybeInsert=function(e,t,n){var i=e.getCursorPosition(),o=t.doc.getLine(i.row);this.isMaybeInsertedClosing(i,o)||(r.maybeInsertedBrackets=0),r.maybeInsertedRow=i.row,r.maybeInsertedLineStart=o.substr(0,i.column)+n,r.maybeInsertedLineEnd=o.substr(i.column),r.maybeInsertedBrackets++},i.isAutoInsertedClosing=function(e,t,n){return r.autoInsertedBrackets>0&&e.row===r.autoInsertedRow&&n===r.autoInsertedLineEnd[0]&&t.substr(e.column)===r.autoInsertedLineEnd},i.isMaybeInsertedClosing=function(e,t){return r.maybeInsertedBrackets>0&&e.row===r.maybeInsertedRow&&t.substr(e.column)===r.maybeInsertedLineEnd&&t.substr(0,e.column)==r.maybeInsertedLineStart},i.popAutoInsertedClosing=function(){r.autoInsertedLineEnd=r.autoInsertedLineEnd.substr(1),r.autoInsertedBrackets--},i.clearMaybeInsertedClosing=function(){r&&(r.maybeInsertedBrackets=0,r.maybeInsertedRow=-1)},o.inherits(i,a),t.CstyleBehaviour=i}),ace.define("ace/unicode",["require","exports","module"],function(e,t,n){"use strict";for(var r=[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],i=0,o=[],a=0;a<r.length;a+=2)o.push(i+=r[a]),r[a+1]&&o.push(45,i+=r[a+1]);t.wordChars=String.fromCharCode.apply(null,o)}),ace.define("ace/mode/text",["require","exports","module","ace/config","ace/tokenizer","ace/mode/text_highlight_rules","ace/mode/behaviour/cstyle","ace/unicode","ace/lib/lang","ace/token_iterator","ace/range"],function(e,t,n){"use strict";var r,i=e("../config"),o=e("../tokenizer").Tokenizer,a=e("./text_highlight_rules").TextHighlightRules,s=e("./behaviour/cstyle").CstyleBehaviour,l=e("../unicode"),c=e("../lib/lang"),d=e("../token_iterator").TokenIterator,u=e("../range").Range;(function(){this.$defaultBehaviour=new s,this.tokenRe=new RegExp("^["+l.wordChars+"\\$_]+","g"),this.nonTokenRe=new RegExp("^(?:[^"+l.wordChars+"\\$_]|\\s])+","g"),this.getTokenizer=function(){return this.$tokenizer||(this.$highlightRules=this.$highlightRules||new this.HighlightRules(this.$highlightRuleConfig),this.$tokenizer=new o(this.$highlightRules.getRules())),this.$tokenizer},this.lineCommentStart="",this.blockComment="",this.toggleCommentLines=function(e,t,n,r){var i=t.doc,o=!0,a=!0,s=1/0,l=t.getTabSize(),d=!1;if(this.lineCommentStart){if(Array.isArray(this.lineCommentStart))f=this.lineCommentStart.map(c.escapeRegExp).join("|"),h=this.lineCommentStart[0];else f=c.escapeRegExp(this.lineCommentStart),h=this.lineCommentStart;f=new RegExp("^(\\s*)(?:"+f+") ?"),d=t.getUseSoftTabs();x=function(e,t){var n=e.match(f);if(n){var r=n[1].length,o=n[0].length;p(e,r,o)||" "!=n[0][o-1]||o--,i.removeInLine(t,r,o)}};var u=h+" ",p=(v=function(e,t){o&&!/\S/.test(e)||(p(e,s,s)?i.insertInLine({row:t,column:s},u):i.insertInLine({row:t,column:s},h))},y=function(e,t){return f.test(e)},function(e,t,n){for(var r=0;t--&&" "==e.charAt(t);)r++;if(r%l!=0)return!1;for(r=0;" "==e.charAt(n++);)r++;return l>2?r%l!=l-1:r%l==0})}else{if(!this.blockComment)return!1;var h=this.blockComment.start,m=this.blockComment.end,f=new RegExp("^(\\s*)(?:"+c.escapeRegExp(h)+")"),g=new RegExp("(?:"+c.escapeRegExp(m)+")\\s*$"),v=function(e,t){y(e,t)||o&&!/\S/.test(e)||(i.insertInLine({row:t,column:e.length},m),i.insertInLine({row:t,column:s},h))},x=function(e,t){var n;(n=e.match(g))&&i.removeInLine(t,e.length-n[0].length,e.length),(n=e.match(f))&&i.removeInLine(t,n[1].length,n[0].length)},y=function(e,n){if(f.test(e))return!0;for(var r=t.getTokens(n),i=0;i<r.length;i++)if("comment"===r[i].type)return!0}}function b(e){for(var t=n;t<=r;t++)e(i.getLine(t),t)}var j=1/0;b(function(e,t){var n=e.search(/\S/);-1!==n?(n<s&&(s=n),a&&!y(e,t)&&(a=!1)):j>e.length&&(j=e.length)}),s==1/0&&(s=j,o=!1,a=!1),d&&s%l!=0&&(s=Math.floor(s/l)*l),b(a?x:v)},this.toggleBlockComment=function(e,t,n,r){var i=this.blockComment;if(i){!i.start&&i[0]&&(i=i[0]);var o,a,s=(f=new d(t,r.row,r.column)).getCurrentToken(),l=(t.selection,t.selection.toOrientedRange());if(s&&/comment/.test(s.type)){for(var c,p;s&&/comment/.test(s.type);){if(-1!=(g=s.value.indexOf(i.start))){var h=f.getCurrentTokenRow(),m=f.getCurrentTokenColumn()+g;c=new u(h,m,h,m+i.start.length);break}s=f.stepBackward()}var f;for(s=(f=new d(t,r.row,r.column)).getCurrentToken();s&&/comment/.test(s.type);){var g;if(-1!=(g=s.value.indexOf(i.end))){h=f.getCurrentTokenRow(),m=f.getCurrentTokenColumn()+g;p=new u(h,m,h,m+i.end.length);break}s=f.stepForward()}p&&t.remove(p),c&&(t.remove(c),o=c.start.row,a=-i.start.length)}else a=i.start.length,o=n.start.row,t.insert(n.end,i.end),t.insert(n.start,i.start);l.start.row==o&&(l.start.column+=a),l.end.row==o&&(l.end.column+=a),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],r=n.prototype.$id,o=i.$modes[r];o||(i.$modes[r]=o=new n),i.$modes[t]||(i.$modes[t]=o),this.$embeds.push(t),this.$modes[t]=o}var a=["toggleBlockComment","toggleCommentLines","getNextLineIndent","checkOutdent","autoOutdent","transformAction","getCompletions"],s=function(e){!function(t){var n=a[e],r=t[n];t[a[e]]=function(){return this.$delegator(n,arguments,r)}}(l)},l=this;for(t=0;t<a.length;t++)s(t)},this.$delegator=function(e,t,n){var r=t[0]||"start";if("string"!=typeof r){if(Array.isArray(r[2])){var i=r[2][r[2].length-1];if(a=this.$modes[i])return a[e].apply(a,[r[1]].concat([].slice.call(t,1)))}r=r[0]||"start"}for(var o=0;o<this.$embeds.length;o++)if(this.$modes[this.$embeds[o]]){var a,s=r.split(this.$embeds[o]);if(!s[0]&&s[1])return t[0]=s[1],(a=this.$modes[this.$embeds[o]])[e].apply(a,t)}var l=n.apply(this,t);return n?l:void 0},this.transformAction=function(e,t,n,r,i){if(this.$behaviour){var o=this.$behaviour.getBehaviours();for(var a in o)if(o[a][t]){var s=o[a][t].apply(this,arguments);if(s)return s}}},this.getKeywords=function(e){if(!this.completionKeywords){var t=this.$tokenizer.rules,n=[];for(var r in t)for(var i=t[r],o=0,a=i.length;o<a;o++)if("string"===typeof i[o].token)/keyword|support|storage/.test(i[o].token)&&n.push(i[o].regex);else if("object"===typeof i[o].token)for(var s=0,l=i[o].token.length;s<l;s++)if(/keyword|support|storage/.test(i[o].token[s])){r=i[o].regex.match(/\(.+?\)/g)[s];n.push(r.substr(1,r.length-2))}this.completionKeywords=n}return e?n.concat(this.$keywordList||[]):this.$keywordList},this.$createKeywordList=function(){return this.$highlightRules||this.getTokenizer(),this.$keywordList=this.$highlightRules.$keywordList||[]},this.getCompletions=function(e,t,n,r){return(this.$keywordList||this.$createKeywordList()).map(function(e){return{name:e,value:e,score:0,meta:"keyword"}})},this.$id="ace/mode/text"}).call((r=function(){this.HighlightRules=a}).prototype),t.Mode=r}),ace.define("ace/line_widgets",["require","exports","module","ace/lib/dom"],function(e,t,n){"use strict";var r=e("./lib/dom"),i=function(){function e(e){this.session=e,this.session.widgetManager=this,this.session.getRowLength=this.getRowLength,this.session.$getWidgetScreenLength=this.$getWidgetScreenLength,this.updateOnChange=this.updateOnChange.bind(this),this.renderWidgets=this.renderWidgets.bind(this),this.measureWidgets=this.measureWidgets.bind(this),this.session._changedWidgets=[],this.$onChangeEditor=this.$onChangeEditor.bind(this),this.session.on("change",this.updateOnChange),this.session.on("changeFold",this.updateOnFold),this.session.on("changeEditor",this.$onChangeEditor)}return e.prototype.getRowLength=function(e){var t;return t=this.lineWidgets&&this.lineWidgets[e]&&this.lineWidgets[e].rowCount||0,this.$useWrapMode&&this.$wrapData[e]?this.$wrapData[e].length+1+t:1+t},e.prototype.$getWidgetScreenLength=function(){var e=0;return this.lineWidgets.forEach(function(t){t&&t.rowCount&&!t.hidden&&(e+=t.rowCount)}),e},e.prototype.$onChangeEditor=function(e){this.attach(e.editor)},e.prototype.attach=function(e){e&&e.widgetManager&&e.widgetManager!=this&&e.widgetManager.detach(),this.editor!=e&&(this.detach(),this.editor=e,e&&(e.widgetManager=this,e.renderer.on("beforeRender",this.measureWidgets),e.renderer.on("afterRender",this.renderWidgets)))},e.prototype.detach=function(e){var t=this.editor;if(t){this.editor=null,t.widgetManager=null,t.renderer.off("beforeRender",this.measureWidgets),t.renderer.off("afterRender",this.renderWidgets);var n=this.session.lineWidgets;n&&n.forEach(function(e){e&&e.el&&e.el.parentNode&&(e._inDocument=!1,e.el.parentNode.removeChild(e.el))})}},e.prototype.updateOnFold=function(e,t){var n=t.lineWidgets;if(n&&e.action){for(var r=e.data,i=r.start.row,o=r.end.row,a="add"==e.action,s=i+1;s<o;s++)n[s]&&(n[s].hidden=a);n[o]&&(a?n[i]?n[o].hidden=a:n[i]=n[o]:(n[i]==n[o]&&(n[i]=void 0),n[o].hidden=a))}},e.prototype.updateOnChange=function(e){var t=this.session.lineWidgets;if(t){var n=e.start.row,r=e.end.row-n;if(0===r);else if("remove"==e.action){var i=t.splice(n+1,r);!t[n]&&i[i.length-1]&&(t[n]=i.pop()),i.forEach(function(e){e&&this.removeLineWidget(e)},this),this.$updateRows()}else{var o=new Array(r);t[n]&&null!=t[n].column&&e.start.column>t[n].column&&n++,o.unshift(n,0),t.splice.apply(t,o),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=r.createElement("div"),e.el.innerHTML=e.html),e.text&&!e.el&&(e.el=r.createElement("div"),e.el.textContent=e.text),e.el&&(r.addCssClass(e.el,"ace_lineWidgetContainer"),e.className&&r.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 i=this.session.lineWidgets;e.row!=n.end.row||i[n.start.row]?e.hidden=!0:i[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],r=[];n;)r.push(n),n=n.$oldWidget;return r},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,r=t.layerConfig;if(n&&n.length){for(var i=1/0,o=0;o<n.length;o++){var a=n[o];if(a&&a.el&&a.session==this.session){if(!a._inDocument){if(this.session.lineWidgets[a.row]!=a)continue;a._inDocument=!0,t.container.appendChild(a.el)}a.h=a.el.offsetHeight,a.fixedWidth||(a.w=a.el.offsetWidth,a.screenWidth=Math.ceil(a.w/r.characterWidth));var s=a.h/r.lineHeight;a.coverLine&&(s-=this.session.getRowLineCount(a.row))<0&&(s=0),a.rowCount!=s&&(a.rowCount=s,a.row<i&&(i=a.row))}}i!=1/0&&(this.session._emit("changeFold",{data:{start:{row:i}}}),this.session.lineWidgetWidth=null),this.session._changedWidgets=[]}},e.prototype.renderWidgets=function(e,t){var n=t.layerConfig,r=this.session.lineWidgets;if(r){for(var i=Math.min(this.firstRow,n.firstRow),o=Math.max(this.lastRow,n.lastRow,r.length);i>0&&!r[i];)i--;this.firstRow=n.firstRow,this.lastRow=n.lastRow,t.$cursorLayer.config=n;for(var a=i;a<=o;a++){var s=r[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=i}),ace.define("ace/apply_delta",["require","exports","module"],function(e,t,n){"use strict";t.applyDelta=function(e,t,n){var r=t.start.row,i=t.start.column,o=e[r]||"";switch(t.action){case"insert":if(1===t.lines.length)e[r]=o.substring(0,i)+t.lines[0]+o.substring(i);else{var a=[r,1].concat(t.lines);e.splice.apply(e,a),e[r]=o.substring(0,i)+e[r],e[r+t.lines.length-1]+=o.substring(i)}break;case"remove":var s=t.end.column,l=t.end.row;r===l?e[r]=o.substring(0,i)+o.substring(s):e.splice(r,l-r+1,o.substring(0,i)+e[l].substring(s))}}}),ace.define("ace/anchor",["require","exports","module","ace/lib/oop","ace/lib/event_emitter"],function(e,t,n){"use strict";var r=e("./lib/oop"),i=e("./lib/event_emitter").EventEmitter,o=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 r="insert"==e.action,i=(r?1:-1)*(e.end.row-e.start.row),o=(r?1:-1)*(e.end.column-e.start.column),s=e.start,l=r?s:e.end;if(a(t,s,n))return{row:t.row,column:t.column};if(a(l,t,!n))return{row:t.row+i,column:t.column+(t.row==l.row?o:0)};return{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 r;if(r=n?{row:e,column:t}:this.$clipPositionToDocument(e,t),this.row!=r.row||this.column!=r.column){var i={row:this.row,column:this.column};this.row=r.row,this.column=r.column,this._signal("change",{old:i,value:r})}},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 r=n?e.column<=t.column:e.column<t.column;return e.row<t.row||e.row==t.row&&r}o.prototype.$insertRight=!1,r.implement(o.prototype,i),t.Anchor=o}),ace.define("ace/document",["require","exports","module","ace/lib/oop","ace/apply_delta","ace/lib/event_emitter","ace/range","ace/anchor"],function(e,t,n){"use strict";var r=e("./lib/oop"),i=e("./apply_delta").applyDelta,o=e("./lib/event_emitter").EventEmitter,a=e("./range").Range,s=e("./anchor").Anchor,l=function(){function e(e){this.$lines=[""],0===e.length?this.$lines=[""]:Array.isArray(e)?this.insertMergedLines({row:0,column:0},e):this.insert({row:0,column:0},e)}return e.prototype.setValue=function(e){var t=this.getLength()-1;this.remove(new a(0,0,t,this.getLine(t).length)),this.insert({row:0,column:0},e||"")},e.prototype.getValue=function(){return this.getAllLines().join(this.getNewLineCharacter())},e.prototype.createAnchor=function(e,t){return new s(this,e,t)},e.prototype.$detectNewLine=function(e){var t=e.match(/^.*?(\r\n|\r|\n)/m);this.$autoNewLine=t?t[1]:"\n",this._signal("changeNewLineMode")},e.prototype.getNewLineCharacter=function(){switch(this.$newLineMode){case"windows":return"\r\n";case"unix":return"\n";default:return this.$autoNewLine||"\n"}},e.prototype.setNewLineMode=function(e){this.$newLineMode!==e&&(this.$newLineMode=e,this._signal("changeNewLineMode"))},e.prototype.getNewLineMode=function(){return this.$newLineMode},e.prototype.isNewLine=function(e){return"\r\n"==e||"\r"==e||"\n"==e},e.prototype.getLine=function(e){return this.$lines[e]||""},e.prototype.getLines=function(e,t){return this.$lines.slice(e,t+1)},e.prototype.getAllLines=function(){return this.getLines(0,this.getLength())},e.prototype.getLength=function(){return this.$lines.length},e.prototype.getTextRange=function(e){return this.getLinesForRange(e).join(this.getNewLineCharacter())},e.prototype.getLinesForRange=function(e){var t;if(e.start.row===e.end.row)t=[this.getLine(e.start.row).substring(e.start.column,e.end.column)];else{(t=this.getLines(e.start.row,e.end.row))[0]=(t[0]||"").substring(e.start.column);var n=t.length-1;e.end.row-e.start.row==n&&(t[n]=t[n].substring(0,e.end.column))}return t},e.prototype.insertLines=function(e,t){return console.warn("Use of document.insertLines is deprecated. Use the insertFullLines method instead."),this.insertFullLines(e,t)},e.prototype.removeLines=function(e,t){return console.warn("Use of document.removeLines is deprecated. Use the removeFullLines method instead."),this.removeFullLines(e,t)},e.prototype.insertNewLine=function(e){return console.warn("Use of document.insertNewLine is deprecated. Use insertMergedLines(position, ['', '']) instead."),this.insertMergedLines(e,["",""])},e.prototype.insert=function(e,t){return this.getLength()<=1&&this.$detectNewLine(t),this.insertMergedLines(e,this.$split(t))},e.prototype.insertInLine=function(e,t){var n=this.clippedPos(e.row,e.column),r=this.pos(e.row,e.column+t.length);return this.applyDelta({start:n,end:r,action:"insert",lines:[t]},!0),this.clonePos(r)},e.prototype.clippedPos=function(e,t){var n=this.getLength();void 0===e?e=n:e<0?e=0:e>=n&&(e=n-1,t=void 0);var r=this.getLine(e);return void 0==t&&(t=r.length),{row:e,column:t=Math.min(Math.max(t,0),r.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()))<this.getLength()?(t=t.concat([""]),n=0):(t=[""].concat(t),e--,n=this.$lines[e].length),this.insertMergedLines({row:e,column:n},t)},e.prototype.insertMergedLines=function(e,t){var n=this.clippedPos(e.row,e.column),r={row:n.row+t.length-1,column:(1==t.length?n.column:0)+t[t.length-1].length};return this.applyDelta({start:n,end:r,action:"insert",lines:t}),this.clonePos(r)},e.prototype.remove=function(e){var t=this.clippedPos(e.start.row,e.start.column),n=this.clippedPos(e.end.row,e.end.column);return this.applyDelta({start:t,end:n,action:"remove",lines:this.getLinesForRange({start:t,end:n})}),this.clonePos(t)},e.prototype.removeInLine=function(e,t,n){var r=this.clippedPos(e,t),i=this.clippedPos(e,n);return this.applyDelta({start:r,end:i,action:"remove",lines:this.getLinesForRange({start:r,end:i})},!0),this.clonePos(r)},e.prototype.removeFullLines=function(e,t){e=Math.min(Math.max(0,e),this.getLength()-1);var n=(t=Math.min(Math.max(0,t),this.getLength()-1))==this.getLength()-1&&e>0,r=t<this.getLength()-1,i=n?e-1:e,o=n?this.getLine(i).length:0,s=r?t+1:t,l=r?0:this.getLine(s).length,c=new a(i,o,s,l),d=this.$lines.slice(e,t+1);return this.applyDelta({start:c.start,end:c.end,action:"remove",lines:this.getLinesForRange(c)}),d},e.prototype.removeNewLine=function(e){e<this.getLength()-1&&e>=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<e.length;t++)this.applyDelta(e[t])},e.prototype.revertDeltas=function(e){for(var t=e.length-1;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):(i(this.$lines,e,t),this._signal("change",e)))},e.prototype.$safeApplyDelta=function(e){var t=this.$lines.length;("remove"==e.action&&e.start.row<t&&e.end.row<t||"insert"==e.action&&e.start.row<=t)&&this.applyDelta(e)},e.prototype.$splitAndapplyLargeDelta=function(e,t){for(var n=e.lines,r=n.length-t+1,i=e.start.row,o=e.start.column,a=0,s=0;a<r;a=s){s+=t-1;var l=n.slice(a,s);l.push(""),this.applyDelta({start:this.pos(i+a,o),end:this.pos(i+s,o=0),action:e.action,lines:l},!0)}e.lines=n.slice(a),e.start.row=i+a,e.start.column=o,this.applyDelta(e,!0)},e.prototype.revertDelta=function(e){this.$safeApplyDelta({start:this.clonePos(e.start),end:this.clonePos(e.end),action:"insert"==e.action?"remove":"insert",lines:e.lines.slice()})},e.prototype.indexToPosition=function(e,t){for(var n=this.$lines||this.getAllLines(),r=this.getNewLineCharacter().length,i=t||0,o=n.length;i<o;i++)if((e-=n[i].length+r)<0)return{row:i,column:e+n[i].length+r};return{row:o-1,column:e+n[o-1].length+r}},e.prototype.positionToIndex=function(e,t){for(var n=this.$lines||this.getAllLines(),r=this.getNewLineCharacter().length,i=0,o=Math.min(e.row,n.length),a=t||0;a<o;++a)i+=n[a].length+r;return i+e.column},e.prototype.$split=function(e){return e.split(/\r\n|\r|\n/)},e}();l.prototype.$autoNewLine="",l.prototype.$newLineMode="auto",r.implement(l.prototype,o),t.Document=l}),ace.define("ace/background_tokenizer",["require","exports","module","ace/lib/oop","ace/lib/event_emitter"],function(e,t,n){"use strict";var r=e("./lib/oop"),i=e("./lib/event_emitter").EventEmitter,o=function(){function e(e,t){this.running=!1,this.lines=[],this.states=[],this.currentLine=0,this.tokenizer=e;var n=this;this.$worker=function(){if(n.running){for(var e=new Date,t=n.currentLine,r=-1,i=n.doc,o=t;n.lines[t];)t++;var a=i.getLength(),s=0;for(n.running=!1;t<a;){n.$tokenizeRow(t),r=t;do{t++}while(n.lines[t]);if(++s%5===0&&new Date-e>20){n.running=setTimeout(n.$worker,20);break}}n.currentLine=t,-1==r&&(r=t),o<=r&&n.fireUpdateEvent(o,r)}}}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 r=Array(n+1);r.unshift(t,1),this.lines.splice.apply(this.lines,r),this.states.splice.apply(this.states,r)}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],r=this.tokenizer.getLineTokens(t,n,e);return this.states[e]+""!==r.state+""?(this.states[e]=r.state,this.lines[e+1]=null,this.currentLine>e+1&&(this.currentLine=e+1)):this.currentLine==e&&(this.currentLine=e+1),this.lines[e]=r.tokens},e.prototype.cleanup=function(){this.running=!1,this.lines=[],this.states=[],this.currentLine=0,this.removeAllListeners()},e}();r.implement(o.prototype,i),t.BackgroundTokenizer=o}),ace.define("ace/search_highlight",["require","exports","module","ace/lib/lang","ace/range"],function(e,t,n){"use strict";var r=e("./lib/lang"),i=e("./range").Range,o=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,o){if(this.regExp){for(var a=o.firstRow,s=o.lastRow,l={},c=n.$editor&&n.$editor.$search,d=c&&c.$isMultilineSearch(n.$editor.getLastSearchOptions()),u=a;u<=s;u++){var p=this.cache[u];if(null==p||n.getValue().length!=this.docLen){if(d){p=[];var h=c.$multiLineForward(n,this.regExp,u,s);if(h){var m=h.endRow<=s?h.endRow-1:s;m>u&&(u=m),p.push(new i(h.startRow,h.startCol,h.endRow,h.endCol))}p.length>this.MAX_RANGES&&(p=p.slice(0,this.MAX_RANGES))}else(p=r.getMatchOffsets(n.getLine(u),this.regExp)).length>this.MAX_RANGES&&(p=p.slice(0,this.MAX_RANGES)),p=p.map(function(e){return new i(u,e.offset,u,e.offset+e.length)});this.cache[u]=p.length?p:""}if(0!==p.length)for(var f=p.length;f--;){var g=p[f].toScreenRange(n),v=g.toString();l[v]||(l[v]=!0,t.drawSingleLineMarker(e,g,this.clazz,o))}}this.docLen=n.getValue().length}},e}();o.prototype.MAX_RANGES=500,t.SearchHighlight=o}),ace.define("ace/undomanager",["require","exports","module","ace/range"],function(e,t,n){"use strict";var r=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 r=this.$undoStack.length;r>this.$undoDepth-1&&this.$undoStack.splice(0,r-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,r=n.length;r--;){var i=n[r][0];if(i.id<=e)break;i.id<t&&(i.ignore=!0)}this.lastDeltas=null},e.prototype.getSelection=function(e,t){for(var n=this.selections,r=n.length;r--;){var i=n[r];if(i.rev<e)return t&&(i=n[r+1]),i}},e.prototype.getRevision=function(){return this.$rev},e.prototype.getDeltas=function(e,t){null==t&&(t=this.$rev+1);for(var n=this.$undoStack,r=null,i=0,o=n.length;o--;){var a=n[o][0];if(a.id<t&&!r&&(r=o+1),a.id<=e){i=o+1;break}}return n.slice(i,r)},e.prototype.getChangedRanges=function(e,t){null==t&&(t=this.$rev+1)},e.prototype.getChangedLines=function(e,t){null==t&&(t=this.$rev+1)},e.prototype.undo=function(e,t){this.lastDeltas=null;var n=this.$undoStack;if(function(e,t){for(var n=t;n--;){var r=e[n];if(r&&!r[0].ignore){for(;n<t-1;){var i=d(e[n],e[n+1]);e[n]=i[0],e[n+1]=i[1],n++}return!0}}}(n,n.length)){e||(e=this.$session),this.$redoStackBaseRev!==this.$rev&&this.$redoStack.length&&(this.$redoStack=[]),this.$fromUndo=!0;var r=n.pop(),i=null;return r&&(i=e.undoChanges(r,t),this.$redoStack.push(r),this.$syncRev()),this.$fromUndo=!1,i}},e.prototype.redo=function(e,t){if(this.lastDeltas=null,e||(e=this.$session),this.$fromUndo=!0,this.$redoStackBaseRev!=this.$rev){var n=this.getDeltas(this.$redoStackBaseRev,this.$rev+1);!function(e,t){for(var n=0;n<t.length;n++)for(var r=t[n],i=0;i<r.length;i++)f(e,r[i])}(this.$redoStack,n),this.$redoStackBaseRev=this.$rev,this.$redoStack.forEach(function(e){e[0].id=++this.$maxRev},this)}var r=this.$redoStack.pop(),i=null;return r&&(i=e.redoChanges(r,t),this.$undoStack.push(r),this.$syncRev()),this.$fromUndo=!1,i},e.prototype.$syncRev=function(){var e=this.$undoStack,t=e[e.length-1],n=t&&t[0].id||0;this.$redoStackBaseRev=n,this.$rev=n},e.prototype.reset=function(){this.lastDeltas=null,this.$lastDelta=null,this.$undoStack=[],this.$redoStack=[],this.$rev=0,this.mark=0,this.$redoStackBaseRev=this.$rev,this.selections=[]},e.prototype.canUndo=function(){return this.$undoStack.length>0},e.prototype.canRedo=function(){return this.$redoStack.length>0},e.prototype.bookmark=function(e){void 0==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}();r.prototype.hasUndo=r.prototype.canUndo,r.prototype.hasRedo=r.prototype.canRedo,r.prototype.isClean=r.prototype.isAtBookmark,r.prototype.markClean=r.prototype.bookmark;var i=e("./range").Range,o=i.comparePoints;i.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,r="insert"==t.action;if(n&&r)if(o(t.start,e.end)>=0)p(t,e,-1);else{if(!(o(t.start,e.start)<=0))return null;p(e,t,1)}else if(n&&!r)if(o(t.start,e.end)>=0)p(t,e,-1);else{if(!(o(t.end,e.start)<=0))return null;p(e,t,-1)}else if(!n&&r)if(o(t.start,e.start)>=0)p(t,e,1);else{if(!(o(t.start,e.start)<=0))return null;p(e,t,1)}else if(!n&&!r)if(o(t.start,e.start)>=0)p(t,e,1);else{if(!(o(t.end,e.start)<=0))return null;p(e,t,-1)}return[t,e]}function d(e,t){for(var n=e.length;n--;)for(var r=0;r<t.length;r++)if(!c(e[n],t[r])){for(;n<e.length;){for(;r--;)c(t[r],e[n]);r=t.length,n++}return[e,t]}return e.selectionBefore=t.selectionBefore=e.selectionAfter=t.selectionAfter=null,[t,e]}function u(e,t){var n="insert"==e.action,r="insert"==t.action;if(n&&r)o(e.start,t.start)<0?p(t,e,1):p(e,t,1);else if(n&&!r)o(e.start,t.end)>=0?p(e,t,-1):(o(e.start,t.start)<=0||p(e,i.fromPoints(t.start,e.start),-1),p(t,e,1));else if(!n&&r)o(t.start,e.end)>=0?p(t,e,-1):(o(t.start,e.start)<=0||p(t,i.fromPoints(e.start,t.start),-1),p(e,t,1));else if(!n&&!r)if(o(t.start,e.end)>=0)p(t,e,-1);else{var a,s;if(!(o(t.end,e.start)<=0))return o(e.start,t.start)<0&&(a=e,e=m(e,t.start)),o(e.end,t.end)>0&&(s=m(e,t.end)),h(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);p(e,t,-1)}return[t,e]}function p(e,t,n){h(e.start,t.start,t.end,n),h(e.end,t.start,t.end,n)}function h(e,t,n,r){e.row==(1==r?t:n).row&&(e.column+=r*(n.column-t.column)),e.row+=r*(n.row-t.row)}function m(e,t){var n=e.lines,r=e.end;e.end=a(t);var i=e.end.row-e.start.row,o=n.splice(i,n.length),s=i?t.column:t.column-e.start.column;return n.push(o[0].substring(0,s)),o[0]=o[0].substr(s),{start:a(t),end:r,lines:o,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 r=e[n],i=0;i<r.length;i++){var o=u(r[i],t);t=o[0],2!=o.length&&(o[2]?(r.splice(i+1,1,o[1],o[2]),i++):o[1]||(r.splice(i,1),i--))}r.length||e.splice(n,1)}return e}t.UndoManager=r}),ace.define("ace/edit_session/fold_line",["require","exports","module","ace/range"],function(e,t,n){"use strict";var r=e("../range").Range,i=function(){function e(e,t){this.foldData=e,Array.isArray(t)?this.folds=t:t=this.folds=[t];var n=t[t.length-1];this.range=new r(t[0].start.row,t[0].start.column,n.end.row,n.end.column),this.start=this.range.start,this.end=this.range.end,this.folds.forEach(function(e){e.setFoldLine(this)},this)}return e.prototype.shiftRow=function(e){this.start.row+=e,this.end.row+=e,this.folds.forEach(function(t){t.start.row+=e,t.end.row+=e})},e.prototype.addFold=function(e){if(e.sameRow){if(e.start.row<this.startRow||e.endRow>this.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 r,i,o=0,a=this.folds,s=!0;null==t&&(t=this.end.row,n=this.end.column);for(var l=0;l<a.length;l++){if(-1==(i=(r=a[l]).range.compareStart(t,n)))return void e(null,t,n,o,s);if(!e(null,r.start.row,r.start.column,o,s)&&e(r.placeholder,r.start.row,r.start.column,o)||0===i)return;s=!r.sameRow,o=r.end.column}e(null,t,n,o,s)},e.prototype.getNextFoldTo=function(e,t){for(var n,r,i=0;i<this.folds.length;i++){if(-1==(r=(n=this.folds[i]).range.compareEnd(e,t)))return{fold:n,kind:"after"};if(0===r)return{fold:n,kind:"inside"}}return null},e.prototype.addRemoveChars=function(e,t,n){var r,i,o=this.getNextFoldTo(e,t);if(o)if(r=o.fold,"inside"==o.kind&&r.start.column!=t&&r.start.row!=e)window.console&&window.console.log(e,t,r);else if(r.start.row==e){var a=(i=this.folds).indexOf(r);for(0===a&&(this.start.column+=n);a<i.length;a++){if((r=i[a]).start.column+=n,!r.sameRow)return;r.end.column+=n}this.end.column+=n}},e.prototype.split=function(t,n){var r=this.getNextFoldTo(t,n);if(!r||"inside"==r.kind)return null;var i=r.fold,o=this.folds,a=this.foldData,s=o.indexOf(i),l=o[s-1];this.end.row=l.end.row,this.end.column=l.end.column;var c=new e(a,o=o.splice(s,o.length-s));return a.splice(a.indexOf(this)+1,0,c),c},e.prototype.merge=function(e){for(var t=e.folds,n=0;n<t.length;n++)this.addFold(t[n]);var r=this.foldData;r.splice(r.indexOf(e),1)},e.prototype.toString=function(){var e=[this.range.toString()+": ["];return this.folds.forEach(function(t){e.push("  "+t.toString())}),e.push("]"),e.join("\n")},e.prototype.idxToPosition=function(e){for(var t=0,n=0;n<this.folds.length;n++){var r=this.folds[n];if((e-=r.start.column-t)<0)return{row:r.start.row,column:r.start.column+e};if((e-=r.placeholder.length)<0)return r.start;t=r.end.column}return{row:this.end.row,column:this.end.column+e}},e}();t.FoldLine=i}),ace.define("ace/range_list",["require","exports","module","ace/range"],function(e,t,n){"use strict";var r=e("./range").Range.comparePoints,i=function(){function e(){this.ranges=[],this.$bias=1}return e.prototype.pointIndex=function(e,t,n){for(var i=this.ranges,o=n||0;o<i.length;o++){var a=i[o],s=r(e,a.end);if(!(s>0)){var l=r(e,a.start);return 0===s?t&&0!==l?-o-2:o:l>0||0===l&&!t?o:-o-1}}return-o-1},e.prototype.add=function(e){var t=!e.isEmpty(),n=this.pointIndex(e.start,t);n<0&&(n=-n-1);var r=this.pointIndex(e.end,t,n);return r<0?r=-r-1:r++,this.ranges.splice(n,r-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,i=(n=n.sort(function(e,t){return r(e.start,t.start)}))[0],o=1;o<n.length;o++){e=i,i=n[o];var a=r(e.end,i.start);a<0||(0!=a||e.isEmpty()||i.isEmpty())&&(r(e.end,i.end)<0&&(e.end.row=i.end.row,e.end.column=i.end.column),n.splice(o,1),t.push(i),i=e,o--)}return this.ranges=n,t},e.prototype.contains=function(e,t){return this.pointIndex({row:e,column:t})>=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<e)return[];var r=this.pointIndex({row:e,column:0});r<0&&(r=-r-1);var i=this.pointIndex({row:t,column:0},r);i<0&&(i=-i-1);for(var o=[],a=r;a<i;a++)o.push(n[a]);return o},e.prototype.removeAll=function(){return this.ranges.splice(0,this.ranges.length)},e.prototype.attach=function(e){this.session&&this.detach(),this.session=e,this.onChange=this.$onChange.bind(this),this.session.on("change",this.onChange)},e.prototype.detach=function(){this.session&&(this.session.removeListener("change",this.onChange),this.session=null)},e.prototype.$onChange=function(e){for(var t=e.start,n=e.end,r=t.row,i=n.row,o=this.ranges,a=0,s=o.length;a<s;a++){if((d=o[a]).end.row>=r)break}if("insert"==e.action)for(var l=i-r,c=-t.column+n.column;a<s;a++){if((d=o[a]).start.row>r)break;if(d.start.row==r&&d.start.column>=t.column&&(d.start.column==t.column&&this.$bias<=0||(d.start.column+=c,d.start.row+=l)),d.end.row==r&&d.end.column>=t.column){if(d.end.column==t.column&&this.$bias<0)continue;d.end.column==t.column&&c>0&&a<s-1&&d.end.column>d.start.column&&d.end.column==o[a+1].start.column&&(d.end.column-=c),d.end.column+=c,d.end.row+=l}}else for(l=r-i,c=t.column-n.column;a<s;a++){if((d=o[a]).start.row>i)break;d.end.row<i&&(r<d.end.row||r==d.end.row&&t.column<d.end.column)?(d.end.row=r,d.end.column=t.column):d.end.row==i?d.end.column<=n.column?(l||d.end.column>t.column)&&(d.end.column=t.column,d.end.row=t.row):(d.end.column+=c,d.end.row+=l):d.end.row>i&&(d.end.row+=l),d.start.row<i&&(r<d.start.row||r==d.start.row&&t.column<d.start.column)?(d.start.row=r,d.start.column=t.column):d.start.row==i?d.start.column<=n.column?(l||d.start.column>t.column)&&(d.start.column=t.column,d.start.row=t.row):(d.start.column+=c,d.start.row+=l):d.start.row>i&&(d.start.row+=l)}if(0!=l&&a<s)for(;a<s;a++){var d;(d=o[a]).start.row+=l,d.end.row+=l}},e}();i.prototype.comparePoints=r,t.RangeList=i}),ace.define("ace/edit_session/fold",["require","exports","module","ace/range_list"],function(e,t,n){"use strict";var r=this&&this.__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])},e(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 r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),i=function(e){function t(t,n){var r=e.call(this)||this;return r.foldLine=null,r.placeholder=n,r.range=t,r.start=t.start,r.end=t.end,r.sameRow=t.start.row==t.end.row,r.subFolds=r.ranges=[],r}return r(t,e),t.prototype.toString=function(){return'"'+this.placeholder+'" '+this.range.toString()},t.prototype.setFoldLine=function(e){this.foldLine=e,this.subFolds.forEach(function(t){t.setFoldLine(e)})},t.prototype.clone=function(){var e=new t(this.range.clone(),this.placeholder);return this.subFolds.forEach(function(t){e.subFolds.push(t.clone())}),e.collapseChildren=this.collapseChildren,e},t.prototype.addSubFold=function(e){if(!this.range.isEqual(e)){var t,n;t=e,n=this.start,o(t.start,n),o(t.end,n);for(var r=e.start.row,i=e.start.column,a=0,s=-1;a<this.subFolds.length&&1==(s=this.subFolds[a].range.compare(r,i));a++);var l=this.subFolds[a],c=0;if(0==s){if(l.range.containsRange(e))return l.addSubFold(e);c=1}r=e.range.end.row,i=e.range.end.column;var d=a;for(s=-1;d<this.subFolds.length&&1==(s=this.subFolds[d].range.compare(r,i));d++);0==s&&d++;for(var u=this.subFolds.splice(a,d-a,e),p=0==s?u.length-1:u.length,h=c;h<p;h++)e.addSubFold(u[h]);return e.setFoldLine(this.foldLine),e}},t.prototype.restoreRange=function(e){return function(e,t){a(e.start,t),a(e.end,t)}(e,this.start)},t}(e("../range_list").RangeList);function o(e,t){e.row-=t.row,0==e.row&&(e.column-=t.column)}function a(e,t){0==e.row&&(e.column+=t.column),e.row+=t.row}t.Fold=i}),ace.define("ace/edit_session/folding",["require","exports","module","ace/range","ace/edit_session/fold_line","ace/edit_session/fold","ace/token_iterator","ace/mouse/mouse_event"],function(e,t,n){"use strict";var r=e("../range").Range,i=e("./fold_line").FoldLine,o=e("./fold").Fold,a=e("../token_iterator").TokenIterator,s=e("../mouse/mouse_event").MouseEvent;t.Folding=function(){this.getFoldAt=function(e,t,n){var r=this.getFoldLine(e);if(!r)return null;for(var i=r.folds,o=0;o<i.length;o++){var a=i[o].range;if(a.contains(e,t)){if(1==n&&a.isEnd(e,t)&&!a.isEmpty())continue;if(-1==n&&a.isStart(e,t)&&!a.isEmpty())continue;return i[o]}}},this.getFoldsInRange=function(e){var t=e.start,n=e.end,r=this.$foldData,i=[];t.column+=1,n.column-=1;for(var o=0;o<r.length;o++){var a=r[o].range.compareRange(e);if(2!=a){if(-2==a)break;for(var s=r[o].folds,l=0;l<s.length;l++){var c=s[l];if(-2==(a=c.range.compareRange(e)))break;if(2!=a){if(42==a)break;i.push(c)}}}}return t.column-=1,n.column+=1,i},this.getFoldsInRangeList=function(e){if(Array.isArray(e)){var t=[];e.forEach(function(e){t=t.concat(this.getFoldsInRange(e))},this)}else t=this.getFoldsInRange(e);return t},this.getAllFolds=function(){for(var e=[],t=this.$foldData,n=0;n<t.length;n++)for(var r=0;r<t[n].folds.length;r++)e.push(t[n].folds[r]);return e},this.getFoldStringAt=function(e,t,n,r){if(!(r=r||this.getFoldLine(e)))return null;for(var i,o,a={end:{column:0}},s=0;s<r.folds.length;s++){var l=(o=r.folds[s]).range.compareEnd(e,t);if(-1==l){i=this.getLine(o.start.row).substring(a.end.column,o.start.column);break}if(0===l)return null;a=o}return i||(i=this.getLine(o.start.row).substring(a.end.column)),-1==n?i.substring(0,t-a.end.column):1==n?i.substring(t-a.end.column):i},this.getFoldLine=function(e,t){var n=this.$foldData,r=0;for(t&&(r=n.indexOf(t)),-1==r&&(r=0);r<n.length;r++){var i=n[r];if(i.start.row<=e&&i.end.row>=e)return i;if(i.end.row>e)return null}return null},this.getNextFoldLine=function(e,t){var n=this.$foldData,r=0;for(t&&(r=n.indexOf(t)),-1==r&&(r=0);r<n.length;r++){var i=n[r];if(i.end.row>=e)return i}return null},this.getFoldedRowCount=function(e,t){for(var n=this.$foldData,r=t-e+1,i=0;i<n.length;i++){var o=n[i],a=o.end.row,s=o.start.row;if(a>=t){s<t&&(s>=e?r-=t-s:r=0);break}a>=e&&(r-=s>=e?a-s:a-e+1)}return r},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,r=this.$foldData,a=!1;e instanceof o?n=e:(n=new o(t,e)).collapseChildren=t.collapseChildren,this.$clipRangeToDocument(n.range);var s=n.start.row,l=n.start.column,c=n.end.row,d=n.end.column,u=this.getFoldAt(s,l,1),p=this.getFoldAt(c,d,-1);if(u&&p==u)return u.addSubFold(n);u&&!u.range.isStart(s,l)&&this.removeFold(u),p&&!p.range.isEnd(c,d)&&this.removeFold(p);var h=this.getFoldsInRange(n.range);h.length>0&&(this.removeFolds(h),n.collapseChildren||h.forEach(function(e){n.addSubFold(e)}));for(var m=0;m<r.length;m++){var f=r[m];if(c==f.start.row){f.addFold(n),a=!0;break}if(s==f.end.row){if(f.addFold(n),a=!0,!n.sameRow){var g=r[m+1];if(g&&g.start.row==c){f.merge(g);break}}break}if(c<=f.start.row)break}return a||(f=this.$addFoldLine(new i(this.$foldData,n))),this.$useWrapMode?this.$updateWrapData(f.start.row,f.start.row):this.$updateRowLengthCache(f.start.row,f.start.row),this.$modified=!0,this._signal("changeFold",{data:n,action:"add"}),n},this.addFolds=function(e){e.forEach(function(e){this.addFold(e)},this)},this.removeFold=function(e){var t=e.foldLine,n=t.start.row,r=t.end.row,i=this.$foldData,o=t.folds;if(1==o.length)i.splice(i.indexOf(t),1);else if(t.range.isEnd(e.end.row,e.end.column))o.pop(),t.end.row=o[o.length-1].end.row,t.end.column=o[o.length-1].end.column;else if(t.range.isStart(e.start.row,e.start.column))o.shift(),t.start.row=o[0].start.row,t.start.column=o[0].start.column;else if(e.sameRow)o.splice(o.indexOf(e),1);else{var a=t.split(e.start.row,e.start.column);(o=a.folds).shift(),a.start.row=o[0].start.row,a.start.column=o[0].start.column}this.$updating||(this.$useWrapMode?this.$updateWrapData(n,r):this.$updateRowLengthCache(n,r)),this.$modified=!0,this._signal("changeFold",{data:e,action:"remove"})},this.removeFolds=function(e){for(var t=[],n=0;n<e.length;n++)t.push(e[n]);t.forEach(function(e){this.removeFold(e)},this),this.$modified=!0},this.expandFold=function(e){this.removeFold(e),e.subFolds.forEach(function(t){e.restoreRange(t),this.addFold(t)},this),e.collapseChildren>0&&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,i;if(null==e)n=new r(0,0,this.getLength(),0),null==t&&(t=!0);else if("number"==typeof e)n=new r(e,0,e,this.getLine(e).length);else if("row"in e)n=r.fromPoints(e,e);else{if(Array.isArray(e))return i=[],e.forEach(function(e){i=i.concat(this.unfold(e))},this),i;n=e}for(var o=i=this.getFoldsInRangeList(n);1==i.length&&r.comparePoints(i[0].start,n.start)<0&&r.comparePoints(i[0].end,n.end)>0;)this.expandFolds(i),i=this.getFoldsInRangeList(n);if(0!=t?this.removeFolds(i):this.expandFolds(i),o.length)return o},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,r,i){null==r&&(r=e.start.row),null==i&&(i=0),null==t&&(t=e.end.row),null==n&&(n=this.getLine(t).length);var o=this.doc,a="";return e.walk(function(e,t,n,s){if(!(t<r)){if(t==r){if(n<i)return;s=Math.max(i,s)}a+=null!=e?e:o.getLine(t).substring(s,n)}},t,n),a},this.getDisplayLine=function(e,t,n,r){var i,o=this.getFoldLine(e);return o?this.getFoldDisplayLine(o,e,t,n,r):(i=this.doc.getLine(e)).substring(r||0,t||i.length)},this.$cloneFoldData=function(){var e=[];return e=this.$foldData.map(function(t){var n=t.folds.map(function(e){return e.clone()});return new i(e,n)})},this.toggleFold=function(e){var t,n,r=this.selection.getRange();if(r.isEmpty()){var i=r.start;if(t=this.getFoldAt(i.row,i.column))return void this.expandFold(t);if(e){var o=this.getFoldLine(i.row);return void(o&&this.expandFolds(o.folds))}(n=this.findMatchingBracket(i))?1==r.comparePoint(n)?r.end=n:(r.start=n,r.start.column++,r.end.column--):(n=this.findMatchingBracket({row:i.row,column:i.column+1}))?(1==r.comparePoint(n)?r.end=n:r.start=n,r.start.column++):r=this.getCommentFoldRange(i.row,i.column)||r}else{var a=this.getFoldsInRange(r);if(e&&a.length)return void this.expandFolds(a);1==a.length&&(t=a[0])}if(t||(t=this.getFoldAt(r.start.row,r.start.column)),t&&t.range.toString()==r.toString())this.expandFold(t);else{var s="...";if(!r.isMultiLine()){if((s=this.getTextRange(r)).length<4)return;s=s.trim().substring(0,2)+".."}this.addFold(s,r)}},this.getCommentFoldRange=function(e,t,n){var i=new a(this,e,t),o=i.getCurrentToken(),s=o&&o.type;if(o&&/^comment|string/.test(s)){"comment"==(s=s.match(/comment|string/)[0])&&(s+="|doc-start|\\.doc");var l=new RegExp(s),c=new r;if(1!=n){do{o=i.stepBackward()}while(o&&l.test(o.type));o=i.stepForward()}c.start.row=i.getCurrentTokenRow(),c.start.column=i.getCurrentTokenColumn()+o.value.length,i=new a(this,e,t);var d=this.getState(i.$row);if(-1!=n){var u=-1;do{if(o=i.stepForward(),-1==u){var p=this.getState(i.$row);d.toString()!==p.toString()&&(u=i.$row)}else if(i.$row>u)break}while(o&&l.test(o.type));o=i.stepBackward()}else o=i.getCurrentToken();if(c.end.row=i.getCurrentTokenRow(),c.end.column=i.getCurrentTokenColumn(),c.start.row==c.end.row&&c.start.column>c.end.column)return;return c}},this.foldAll=function(e,t,n,r){void 0==n&&(n=1e5);var i=this.foldWidgets;if(i){t=t||this.getLength();for(var o=e=e||0;o<t;o++)if(null==i[o]&&(i[o]=this.getFoldWidget(o)),"start"==i[o]&&(!r||r(o))){var a=this.getFoldWidgetRange(o);a&&a.isMultiLine()&&a.end.row<=t&&a.start.row>=e&&(o=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),r=0;r<n.length;r++){var i=n[r];if("text"!=i.type||!/^\s+$/.test(i.value))return!!/comment/.test(i.type)}})},this.$foldStyles={manual:1,markbegin:1,markbeginend:1},this.$foldStyle="markbegin",this.setFoldStyle=function(e){if(!this.$foldStyles[e])throw new Error("invalid fold style: "+e+"["+Object.keys(this.$foldStyles).join(", ")+"]");if(this.$foldStyle!=e){this.$foldStyle=e,"manual"==e&&this.unfold();var t=this.$foldMode;this.$setFolding(null),this.$setFolding(t)}},this.$setFolding=function(e){this.$foldMode!=e&&(this.$foldMode=e,this.off("change",this.$updateFoldWidgets),this.off("tokenizerUpdate",this.$tokenizerUpdateFoldWidgets),this._signal("changeAnnotation"),e&&"manual"!=this.$foldStyle?(this.foldWidgets=[],this.getFoldWidget=e.getFoldWidget.bind(e,this,this.$foldStyle),this.getFoldWidgetRange=e.getFoldWidgetRange.bind(e,this,this.$foldStyle),this.$updateFoldWidgets=this.updateFoldWidgets.bind(this),this.$tokenizerUpdateFoldWidgets=this.tokenizerUpdateFoldWidgets.bind(this),this.on("change",this.$updateFoldWidgets),this.on("tokenizerUpdate",this.$tokenizerUpdateFoldWidgets)):this.foldWidgets=null)},this.getParentFoldRangeData=function(e,t){var n=this.foldWidgets;if(!n||t&&n[e])return{};for(var r,i=e-1;i>=0;){var o=n[i];if(null==o&&(o=n[i]=this.getFoldWidget(i)),"start"==o){var a=this.getFoldWidgetRange(i);if(r||(r=a),a&&a.end.row>=e)break}i--}return{range:-1!==i&&a,firstRange:r}},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 r=t.target||t.srcElement;r&&/ace_fold-widget/.test(r.className)&&(r.className+=" ace_invalid")}},this.$toggleFoldWidget=function(e,t){if(this.getFoldWidget){var n=this.getFoldWidget(e),r=this.getLine(e),i="end"===n?-1:1,o=this.getFoldAt(e,-1===i?0:r.length,i);if(o)return t.children||t.all?this.removeFold(o):this.expandFold(o),o;var a=this.getFoldWidgetRange(e,!0);if(a&&!a.isMultiLine()&&(o=this.getFoldAt(a.start.row,a.start.column,1))&&a.isEqual(o.range))return this.removeFold(o),o;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 r=this.getParentFoldRangeData(t,!0);if(n=r.range||r.firstRange){t=n.start.row;var i=this.getFoldAt(t,this.getLine(t).length,1);i?this.removeFold(i):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 r=Array(n+1);r.unshift(t,1),this.foldWidgets.splice.apply(this.foldWidgets,r)}},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){"use strict";var r=e("../token_iterator").TokenIterator,i=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 r=n.match(/([\(\[\{])|([\)\]\}])/);return r?r[1]?this.$findClosingBracket(r[1],e):this.$findOpeningBracket(r[2],e):null},this.getBracketRange=function(e){var t,n=this.getLine(e.row),r=!0,o=n.charAt(e.column-1),a=o&&o.match(/([\(\[\{])|([\)\]\}])/);if(a||(o=n.charAt(e.column),e={row:e.row,column:e.column+1},a=o&&o.match(/([\(\[\{])|([\)\]\}])/),r=!1),!a)return null;if(a[1]){if(!(s=this.$findClosingBracket(a[1],e)))return null;t=i.fromPoints(e,s),r||(t.end.column++,t.start.column--),t.cursor=t.end}else{var s;if(!(s=this.$findOpeningBracket(a[2],e)))return null;t=i.fromPoints(s,e),r||(t.start.column++,t.end.column--),t.cursor=t.start}return t},this.getMatchingBracketRanges=function(e,t){var n=this.getLine(e.row),r=/([\(\[\{])|([\)\]\}])/,o=!t&&n.charAt(e.column-1),a=o&&o.match(r);if(a||(o=(void 0===t||t)&&n.charAt(e.column),e={row:e.row,column:e.column+1},a=o&&o.match(r)),!a)return null;var s=new i(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 i(l.row,l.column,l.row,l.column+1)]:[s]},this.$brackets={")":"(","(":")","]":"[","[":"]","{":"}","}":"{","<":">",">":"<"},this.$findOpeningBracket=function(e,t,n){var i=this.$brackets[e],o=1,a=new r(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 d=c.charAt(l);if(d==i){if(0==(o-=1))return{row:a.getCurrentTokenRow(),column:l+a.getCurrentTokenColumn()}}else d==e&&(o+=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 i=this.$brackets[e],o=1,a=new r(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,d=c.length;l<d;){var u=c.charAt(l);if(u==i){if(0==(o-=1))return{row:a.getCurrentTokenRow(),column:l+a.getCurrentTokenColumn()}}else u==e&&(o+=1);l+=1}do{s=a.stepForward()}while(s&&!n.test(s.type));if(null==s)break;l=0}return null}},this.getMatchingTags=function(e){var t=new r(this,e.row,e.column),n=this.$findTagName(t);if(n)return"<"===t.stepBackward().value?this.$findClosingTag(t,n):this.$findOpeningTag(t,n)},this.$findTagName=function(e){var t=e.getCurrentToken(),n=!1,r=!1;if(t&&-1===t.type.indexOf("tag-name"))do{(t=r?e.stepBackward():e.stepForward())&&("/>"===t.value?r=!0:-1!==t.type.indexOf("tag-name")&&(n=!0))}while(t&&!n);return t},this.$findClosingTag=function(e,t){var n,r=t.value,o=t.value,a=0,s=new i(e.getCurrentTokenRow(),e.getCurrentTokenColumn(),e.getCurrentTokenRow(),e.getCurrentTokenColumn()+1);t=e.stepForward();var l=new i(e.getCurrentTokenRow(),e.getCurrentTokenColumn(),e.getCurrentTokenRow(),e.getCurrentTokenColumn()+t.value.length),c=!1;do{if(-1!==(n=t).type.indexOf("tag-close")&&!c){var d=new i(e.getCurrentTokenRow(),e.getCurrentTokenColumn(),e.getCurrentTokenRow(),e.getCurrentTokenColumn()+1);c=!0}if(t=e.stepForward()){if(">"===t.value&&!c){d=new i(e.getCurrentTokenRow(),e.getCurrentTokenColumn(),e.getCurrentTokenRow(),e.getCurrentTokenColumn()+1);c=!0}if(-1!==t.type.indexOf("tag-name")){if(o===(r=t.value))if("<"===n.value)a++;else if("</"===n.value&&--a<0){e.stepBackward();var u=new i(e.getCurrentTokenRow(),e.getCurrentTokenColumn(),e.getCurrentTokenRow(),e.getCurrentTokenColumn()+2);t=e.stepForward();var p=new i(e.getCurrentTokenRow(),e.getCurrentTokenColumn(),e.getCurrentTokenRow(),e.getCurrentTokenColumn()+t.value.length);if(-1===t.type.indexOf("tag-close")&&(t=e.stepForward()),!t||">"!==t.value)return;var h=new i(e.getCurrentTokenRow(),e.getCurrentTokenColumn(),e.getCurrentTokenRow(),e.getCurrentTokenColumn()+1)}}else if(o===r&&"/>"===t.value&&--a<0)h=p=u=new i(e.getCurrentTokenRow(),e.getCurrentTokenColumn(),e.getCurrentTokenRow(),e.getCurrentTokenColumn()+2),d=new i(l.end.row,l.end.column,l.end.row,l.end.column+1)}}while(t&&a>=0);if(s&&d&&u&&h&&l&&p)return{openTag:new i(s.start.row,s.start.column,d.end.row,d.end.column),closeTag:new i(u.start.row,u.start.column,h.end.row,h.end.column),openTagName:l,closeTagName:p}},this.$findOpeningTag=function(e,t){var n=e.getCurrentToken(),r=t.value,o=0,a=e.getCurrentTokenRow(),s=e.getCurrentTokenColumn(),l=s+2,c=new i(a,s,a,l);e.stepForward();var d=new i(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 u=new i(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(r===t.value)if("<"===n.value){if(++o>0){var p=new i(a,s,a,l),h=new i(e.getCurrentTokenRow(),e.getCurrentTokenColumn(),e.getCurrentTokenRow(),e.getCurrentTokenColumn()+1);do{t=e.stepForward()}while(t&&">"!==t.value);var m=new i(e.getCurrentTokenRow(),e.getCurrentTokenColumn(),e.getCurrentTokenRow(),e.getCurrentTokenColumn()+1)}}else"</"===n.value&&o--}else if("/>"===t.value){for(var f=0,g=n;g;){if(-1!==g.type.indexOf("tag-name")&&g.value===r){o--;break}if("<"===g.value)break;g=e.stepBackward(),f++}for(var v=0;v<f;v++)e.stepForward()}}while(n&&o<=0);return h&&m&&c&&u&&p&&d?{openTag:new i(h.start.row,h.start.column,m.end.row,m.end.column),closeTag:new i(c.start.row,c.start.column,u.end.row,u.end.column),openTagName:p,closeTagName:d}:void 0}}}}),ace.define("ace/edit_session",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/bidihandler","ace/config","ace/lib/event_emitter","ace/selection","ace/mode/text","ace/range","ace/line_widgets","ace/document","ace/background_tokenizer","ace/search_highlight","ace/undomanager","ace/edit_session/folding","ace/edit_session/bracket_match"],function(e,t,n){"use strict";var r=e("./lib/oop"),i=e("./lib/lang"),o=e("./bidihandler").BidiHandler,a=e("./config"),s=e("./lib/event_emitter").EventEmitter,l=e("./selection").Selection,c=e("./mode/text").Mode,d=e("./range").Range,u=e("./line_widgets").LineWidgets,p=e("./document").Document,h=e("./background_tokenizer").BackgroundTokenizer,m=e("./search_highlight").SearchHighlight,f=e("./undomanager").UndoManager,g=function(){function e(t,n){this.doc,this.$breakpoints=[],this.$decorations=[],this.$frontMarkers={},this.$backMarkers={},this.$markerId=1,this.$undoSelect=!0,this.$editor=null,this.prevOp={},this.$foldData=[],this.id="session"+ ++e.$uid,this.$foldData.toString=function(){return this.join("\n")},this.$gutterCustomWidgets={},this.bgTokenizer=new h((new c).getTokenizer(),this);var r=this;this.bgTokenizer.on("update",function(e){r._signal("tokenizerUpdate",e)}),this.on("changeFold",this.onChangeFold.bind(this)),this.$onChange=this.onChange.bind(this),"object"==typeof t&&t.getLine||(t=new p(t)),this.setDocument(t),this.selection=new l(this),this.$onSelectionChange=this.onSelectionChange.bind(this),this.selection.on("changeSelection",this.$onSelectionChange),this.selection.on("changeCursor",this.$onSelectionChange),this.$bidiHandler=new o(this),a.resetOptions(this),this.setMode(n),a._signal("session",this),this.destroyed=!1,this.$initOperationListeners()}return e.prototype.$initOperationListeners=function(){var e=this;this.curOp=null,this.on("change",function(){e.curOp||(e.startOperation(),e.curOp.selectionBefore=e.$lastSel),e.curOp.docChanged=!0},!0),this.on("changeSelection",function(){e.curOp||(e.startOperation(),e.curOp.selectionBefore=e.$lastSel),e.curOp.selectionChanged=!0},!0),this.$operationResetTimer=i.delayedCall(this.endOperation.bind(this,!0))},e.prototype.startOperation=function(e){if(this.curOp){if(!e||this.curOp.command)return;this.prevOp=this.curOp}e||(e={}),this.$operationResetTimer.schedule(),this.curOp={command:e.command||{},args:e.args},this.curOp.selectionBefore=this.selection.toJSON(),this._signal("startOperation",e)},e.prototype.endOperation=function(e){if(this.curOp){if(e&&!1===e.returnValue)return this.curOp=null,void this._signal("endOperation",e);if(1==e&&this.curOp.command&&"mouse"==this.curOp.command.name)return;var t=this.selection.toJSON();this.curOp.selectionAfter=t,this.$lastSel=this.selection.toJSON(),this.getUndoManager().addSelection(t),this._signal("beforeEndOperation"),this.prevOp=this.curOp,this.curOp=null,this._signal("endOperation",e)}},e.prototype.setDocument=function(e){this.doc&&this.doc.off("change",this.$onChange),this.doc=e,e.on("change",this.$onChange,!0),this.bgTokenizer.setDocument(this.getDocument()),this.resetCaches()},e.prototype.getDocument=function(){return this.doc},Object.defineProperty(e.prototype,"widgetManager",{get:function(){var e=new u(this);return this.widgetManager=e,this.$editor&&e.attach(this.$editor),e},set:function(e){Object.defineProperty(this,"widgetManager",{writable:!0,enumerable:!0,configurable:!0,value:e})},enumerable:!1,configurable:!0}),e.prototype.$resetRowCache=function(e){if(!e)return this.$docRowCache=[],void(this.$screenRowCache=[]);var t=this.$docRowCache.length,n=this.$getRowCacheIndex(this.$docRowCache,e)+1;t>n&&(this.$docRowCache.splice(n,t),this.$screenRowCache.splice(n,t))},e.prototype.$getRowCacheIndex=function(e,t){for(var n=0,r=e.length-1;n<=r;){var i=n+r>>1,o=e[i];if(t>o)n=i+1;else{if(!(t<o))return i;r=i-1}}return n-1},e.prototype.resetCaches=function(){this.$modified=!0,this.$wrapData=[],this.$rowLengthCache=[],this.$resetRowCache(0),this.destroyed||this.bgTokenizer.start(0)},e.prototype.onChangeFold=function(e){var t=e.data;this.$resetRowCache(t.start.row)},e.prototype.onChange=function(e){this.$modified=!0,this.$bidiHandler.onChange(e),this.$resetRowCache(e.start.row);var t=this.$updateInternalDataOnChange(e);!this.$fromUndo&&this.$undoManager&&(t&&t.length&&(this.$undoManager.add({action:"removeFolds",folds:t},this.mergeUndoDeltas),this.mergeUndoDeltas=!0),this.$undoManager.add(e,this.mergeUndoDeltas),this.mergeUndoDeltas=!0,this.$informUndoManager.schedule()),this.bgTokenizer.$updateOnChange(e),this._signal("change",e)},e.prototype.onSelectionChange=function(){this._signal("changeSelection")},e.prototype.setValue=function(e){this.doc.setValue(e),this.selection.moveTo(0,0),this.$resetRowCache(0),this.setUndoManager(this.$undoManager),this.getUndoManager().reset()},e.fromJSON=function(t){"string"==typeof t&&(t=JSON.parse(t));var n=new f;n.$undoStack=t.history.undo,n.$redoStack=t.history.redo,n.mark=t.history.mark,n.$rev=t.history.rev;var r=new e(t.value);return t.folds.forEach(function(e){r.addFold("...",d.fromPoints(e.start,e.end))}),r.setAnnotations(t.annotations),r.setBreakpoints(t.breakpoints),r.setMode(t.mode),r.setScrollLeft(t.scrollLeft),r.setScrollTop(t.scrollTop),r.setUndoManager(n),r.selection.fromJSON(t.selection),r},e.prototype.toJSON=function(){return{annotations:this.$annotations,breakpoints:this.$breakpoints,folds:this.getAllFolds().map(function(e){return e.range}),history:this.getUndoManager(),mode:this.$mode.$id,scrollLeft:this.$scrollLeft,scrollTop:this.$scrollTop,selection:this.selection.toJSON(),value:this.doc.getValue()}},e.prototype.toString=function(){return this.doc.getValue()},e.prototype.getSelection=function(){return this.selection},e.prototype.getState=function(e){return this.bgTokenizer.getState(e)},e.prototype.getTokens=function(e){return this.bgTokenizer.getTokens(e)},e.prototype.getTokenAt=function(e,t){var n,r=this.bgTokenizer.getTokens(e),i=0;if(null==t){var o=r.length-1;i=this.getLine(e).length}else for(o=0;o<r.length&&!((i+=r[o].value.length)>=t);o++);return(n=r[o])?(n.index=o,n.start=i-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=i.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()?i.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;t<e.length;t++)this.$breakpoints[e[t]]="ace_breakpoint";this._signal("changeBreakpoint",{})},e.prototype.clearBreakpoints=function(){this.$breakpoints=[],this._signal("changeBreakpoint",{})},e.prototype.setBreakpoint=function(e,t){void 0===t&&(t="ace_breakpoint"),t?this.$breakpoints[e]=t:delete this.$breakpoints[e],this._signal("changeBreakpoint",{})},e.prototype.clearBreakpoint=function(e){delete this.$breakpoints[e],this._signal("changeBreakpoint",{})},e.prototype.addMarker=function(e,t,n,r){var i=this.$markerId++,o={range:e,type:n||"line",renderer:"function"==typeof n?n:null,clazz:t,inFront:!!r,id:i};return r?(this.$frontMarkers[i]=o,this._signal("changeFrontMarker")):(this.$backMarkers[i]=o,this._signal("changeBackMarker")),i},e.prototype.addDynamicMarker=function(e,t){if(e.update){var n=this.$markerId++;return e.id=n,e.inFront=!!t,t?(this.$frontMarkers[n]=e,this._signal("changeFrontMarker")):(this.$backMarkers[n]=e,this._signal("changeBackMarker")),e}},e.prototype.removeMarker=function(e){var t=this.$frontMarkers[e]||this.$backMarkers[e];t&&(delete(t.inFront?this.$frontMarkers:this.$backMarkers)[e],this._signal(t.inFront?"changeFrontMarker":"changeBackMarker"))},e.prototype.getMarkers=function(e){return e?this.$frontMarkers:this.$backMarkers},e.prototype.highlight=function(e){if(!this.$searchHighlight){var t=new m(null,"ace_selected-word","text");this.$searchHighlight=this.addDynamicMarker(t)}this.$searchHighlight.setRegexp(e)},e.prototype.highlightLines=function(e,t,n,r){"number"!=typeof t&&(n=t,t=e),n||(n="ace_step");var i=new d(e,0,t,1/0);return i.id=this.addMarker(i,n,"fullLine",r),i},e.prototype.setAnnotations=function(e){this.$annotations=e,this._signal("changeAnnotation",{})},e.prototype.getAnnotations=function(){return this.$annotations||[]},e.prototype.clearAnnotations=function(){this.setAnnotations([])},e.prototype.$detectNewLine=function(e){var t=e.match(/^.*?(\r?\n)/m);this.$autoNewLine=t?t[1]:"\n"},e.prototype.getWordRange=function(e,t){var n=this.getLine(e),r=!1;if(t>0&&(r=!!n.charAt(t-1).match(this.tokenRe)),r||(r=!!n.charAt(t).match(this.tokenRe)),r)var i=this.tokenRe;else if(/^\s+$/.test(n.slice(t-1,t+1)))i=/\s/;else i=this.nonTokenRe;var o=t;if(o>0){do{o--}while(o>=0&&n.charAt(o).match(i));o++}for(var a=t;a<n.length&&n.charAt(a).match(i);)a++;return new d(e,o,e,a)},e.prototype.getAWordRange=function(e,t){for(var n=this.getWordRange(e,t),r=this.getLine(n.end.row);r.charAt(n.end.column).match(/[ \t]/);)n.end.column+=1;return n},e.prototype.setNewLineMode=function(e){this.doc.setNewLineMode(e)},e.prototype.getNewLineMode=function(){return this.doc.getNewLineMode()},e.prototype.setUseWorker=function(e){this.setOption("useWorker",e)},e.prototype.getUseWorker=function(){return this.$useWorker},e.prototype.onReloadTokenizer=function(e){var t=e.data;this.bgTokenizer.start(t.first),this._signal("tokenizerUpdate",e)},e.prototype.setMode=function(e,t){if(e&&"object"===typeof e){if(e.getTokenizer)return this.$onChangeMode(e);var n=e,r=n.path}else r=e||"ace/mode/text";if(this.$modes["ace/mode/text"]||(this.$modes["ace/mode/text"]=new c),this.$modes[r]&&!n)return this.$onChangeMode(this.$modes[r]),void(t&&t());this.$modeId=r,a.loadModule(["mode",r],function(e){if(!this.destroyed){if(this.$modeId!==r)return t&&t();this.$modes[r]&&!n?this.$onChangeMode(this.$modes[r]):e&&e.Mode&&(e=new e.Mode(n),n||(this.$modes[r]=e,e.$id=r),this.$onChangeMode(e)),t&&t()}}.bind(this)),this.$mode||this.$onChangeMode(this.$modes["ace/mode/text"],!0)},e.prototype.$onChangeMode=function(e,t){if(t||(this.$modeId=e.$id),this.$mode!==e){var n=this.$mode;this.$mode=e,this.$stopWorker(),this.$useWorker&&this.$startWorker();var r=e.getTokenizer();if(void 0!==r.on){var i=this.onReloadTokenizer.bind(this);r.on("update",i)}this.bgTokenizer.setTokenizer(r),this.bgTokenizer.setDocument(this.getDocument()),this.tokenRe=e.tokenRe,this.nonTokenRe=e.nonTokenRe,t||(e.attachToSession&&e.attachToSession(this),this.$options.wrapMethod.set.call(this,this.$wrapMethod),this.$setFolding(e.foldingRules),this.bgTokenizer.start(0),this._emit("changeMode",{oldMode:n,mode:e}))}},e.prototype.$stopWorker=function(){this.$worker&&(this.$worker.terminate(),this.$worker=null)},e.prototype.$startWorker=function(){try{this.$worker=this.$mode.createWorker(this)}catch(e){a.warn("Could not load worker",e),this.$worker=null}},e.prototype.getMode=function(){return this.$mode},e.prototype.setScrollTop=function(e){this.$scrollTop===e||isNaN(e)||(this.$scrollTop=e,this._signal("changeScrollTop",e))},e.prototype.getScrollTop=function(){return this.$scrollTop},e.prototype.setScrollLeft=function(e){this.$scrollLeft===e||isNaN(e)||(this.$scrollLeft=e,this._signal("changeScrollLeft",e))},e.prototype.getScrollLeft=function(){return this.$scrollLeft},e.prototype.getScreenWidth=function(){return this.$computeWidth(),this.lineWidgets?Math.max(this.getLineWidgetMaxWidth(),this.screenWidth):this.screenWidth},e.prototype.getLineWidgetMaxWidth=function(){if(null!=this.lineWidgetsWidth)return this.lineWidgetsWidth;var e=0;return this.lineWidgets.forEach(function(t){t&&t.screenWidth>e&&(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,r=0,i=0,o=this.$foldData[i],a=o?o.start.row:1/0,s=t.length,l=0;l<s;l++){if(l>a){if((l=o.end.row+1)>=s)break;a=(o=this.$foldData[i++])?o.start.row:1/0}null==n[l]&&(n[l]=this.$getStringScreenWidth(t[l])[0]),n[l]>r&&(r=n[l])}this.screenWidth=r}},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 r=e[n];"insert"==r.action||"remove"==r.action?this.doc.revertDelta(r):r.folds&&this.addFolds(r.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;n<e.length;n++){var r=e[n];"insert"!=r.action&&"remove"!=r.action||this.doc.$safeApplyDelta(r)}!t&&this.$undoSelect&&(e.selectionAfter?this.selection.fromJSON(e.selectionAfter):this.selection.setRange(this.$getUndoSelection(e,!1))),this.$fromUndo=!1}},e.prototype.setUndoSelect=function(e){this.$undoSelect=e},e.prototype.$getUndoSelection=function(e,t){function n(e){return t?"insert"!==e.action:"insert"===e.action}for(var r,i,o=0;o<e.length;o++){var a=e[o];a.start&&(r?n(a)?(i=a.start,-1==r.compare(i.row,i.column)&&r.setStart(i),i=a.end,1==r.compare(i.row,i.column)&&r.setEnd(i)):(i=a.start,-1==r.compare(i.row,i.column)&&(r=d.fromPoints(a.start,a.start))):r=n(a)?d.fromPoints(a.start,a.end):d.fromPoints(a.start,a.start))}return r},e.prototype.replace=function(e,t){return this.doc.replace(e,t)},e.prototype.moveText=function(e,t,n){var r=this.getTextRange(e),i=this.getFoldsInRange(e),o=d.fromPoints(t,t);if(!n){this.remove(e);var a=e.start.row-e.end.row;(c=a?-e.end.column:e.start.column-e.end.column)&&(o.start.row==e.end.row&&o.start.column>e.end.column&&(o.start.column+=c),o.end.row==e.end.row&&o.end.column>e.end.column&&(o.end.column+=c)),a&&o.start.row>=e.end.row&&(o.start.row+=a,o.end.row+=a)}if(o.end=this.insert(o.start,r),i.length){var s=e.start,l=o.start,c=(a=l.row-s.row,l.column-s.column);this.addFolds(i.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 o},e.prototype.indentRows=function(e,t,n){n=n.replace(/\t/g,this.getTabString());for(var r=e;r<=t;r++)this.doc.insertInLine({row:r,column:0},n)},e.prototype.outdentRows=function(e){for(var t=e.collapseRows(),n=new d(0,0,0,0),r=this.getTabSize(),i=t.start.row;i<=t.end.row;++i){var o=this.getLine(i);n.start.row=i,n.end.row=i;for(var a=0;a<r&&" "==o.charAt(a);++a);a<r&&"\t"==o.charAt(a)?(n.start.column=a,n.end.column=a+1):(n.start.column=0,n.end.column=a),this.remove(n)}},e.prototype.$moveLines=function(e,t,n){if(e=this.getRowFoldStart(e),t=this.getRowFoldEnd(t),n<0){if((i=this.getRowFoldStart(e+n))<0)return 0;var r=i-e}else if(n>0){var i;if((i=this.getRowFoldEnd(t+n))>this.doc.getLength()-1)return 0;r=i-t}else{e=this.$clipRowToDocument(e);r=(t=this.$clipRowToDocument(t))-e+1}var o=new d(e,0,t,Number.MAX_VALUE),a=this.getFoldsInRange(o).map(function(e){return(e=e.clone()).start.row+=r,e.end.row+=r,e}),s=0==n?this.doc.getLines(e,t):this.doc.removeFullLines(e,t);return this.doc.insertFullLines(e+r,s),a.length&&this.addFolds(a),r},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 r=this.$constrainWrapLimit(e,n.min,n.max);return r!=this.$wrapLimit&&r>1&&(this.$wrapLimit=r,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,r=e.start,i=e.end,o=r.row,a=i.row,s=a-o,l=null;if(this.$updating=!0,0!=s)if("remove"===n){this[t?"$wrapData":"$rowLengthCache"].splice(o,s);var c=this.$foldData;l=this.getFoldsInRange(e),this.removeFolds(l);var d=0;if(f=this.getFoldLine(i.row)){f.addRemoveChars(i.row,i.column,r.column-i.column),f.shiftRow(-s);var u=this.getFoldLine(o);u&&u!==f&&(u.merge(f),f=u),d=c.indexOf(f)+1}for(;d<c.length;d++){(f=c[d]).start.row>=i.row&&f.shiftRow(-s)}a=o}else{var p=Array(s);p.unshift(o,0);var h=t?this.$wrapData:this.$rowLengthCache;h.splice.apply(h,p);c=this.$foldData,d=0;if(f=this.getFoldLine(o)){var m=f.range.compareInside(r.row,r.column);0==m?(f=f.split(r.row,r.column))&&(f.shiftRow(s),f.addRemoveChars(a,0,i.column-r.column)):-1==m&&(f.addRemoveChars(o,0,i.column-r.column),f.shiftRow(s)),d=c.indexOf(f)+1}for(;d<c.length;d++){var f;(f=c[d]).start.row>=o&&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(o))&&f.addRemoveChars(o,r.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(o,a):this.$updateRowLengthCache(o,a),l},e.prototype.$updateRowLengthCache=function(e,t){this.$rowLengthCache[e]=null,this.$rowLengthCache[t]=null},e.prototype.$updateWrapData=function(e,t){var n,r,i=this.doc.getAllLines(),o=this.getTabSize(),a=this.$wrapData,s=this.$wrapLimit,l=e;for(t=Math.min(t,i.length-1);l<=t;)(r=this.getFoldLine(l,r))?(n=[],r.walk(function(e,t,r,o){var a;if(null!=e){(a=this.$getDisplayTokens(e,n.length))[0]=y;for(var s=1;s<a.length;s++)a[s]=b}else a=this.$getDisplayTokens(i[t].substring(o,r),n.length);n=n.concat(a)}.bind(this),r.end.row,i[r.end.row].length+1),a[r.start.row]=this.$computeWrapSplits(n,s,o),l=r.end.row+1):(n=this.$getDisplayTokens(i[l]),a[l]=this.$computeWrapSplits(n,s,o),l++)},e.prototype.$computeWrapSplits=function(e,t,n){if(0==e.length)return[];var r=[],i=e.length,o=0,a=0,s=this.$wrapAsCode,l=this.$indentedSoftWrap,c=t<=Math.max(2*n,8)||!1===l?0:Math.floor(t/2);function d(t){for(var i=t-o,d=o;d<t;d++){var p=e[d];12!==p&&2!==p||(i-=1)}r.length||(u=function(){var t=0;if(0===c)return t;if(l)for(var r=0;r<e.length;r++){var i=e[r];if(i==_)t+=1;else{if(i!=C){if(i==w)continue;break}t+=n}}return s&&!1!==l&&(t+=n),Math.min(t,c)}(),r.indent=u),a+=i,r.push(a),o=t}for(var u=0;i-o>t-u;){var p=o+t-u;if(e[p-1]>=_&&e[p]>=_)d(p);else if(e[p]!=y&&e[p]!=b){for(var h=Math.max(p-(t-(t>>2)),o-1);p>h&&e[p]<y;)p--;if(s){for(;p>h&&e[p]<y;)p--;for(;p>h&&e[p]==j;)p--}else for(;p>h&&e[p]<_;)p--;p>h?d(++p):(e[p=o+t]==x&&p--,d(p-u))}else{for(;p!=o-1&&e[p]!=y;p--);if(p>o){d(p);continue}for(p=o+t;p<e.length&&e[p]==b;p++);if(p==e.length)break;d(p)}}return r},e.prototype.$getDisplayTokens=function(e,t){var n,r=[];t=t||0;for(var i=0;i<e.length;i++){var o=e.charCodeAt(i);if(9==o){n=this.getScreenTabSize(r.length+t),r.push(C);for(var a=1;a<n;a++)r.push(w)}else 32==o?r.push(_):o>39&&o<48||o>57&&o<64?r.push(j):o>=4352&&S(o)?r.push(v,x):r.push(v)}return r},e.prototype.$getStringScreenWidth=function(e,t,n){if(0==t)return[0,0];var r,i;for(null==t&&(t=1/0),n=n||0,i=0;i<e.length&&(9==(r=e.charCodeAt(i))?n+=this.getScreenTabSize(n):r>=4352&&S(r)?n+=2:n+=1,!(n>t));i++);return[n,i]},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]<t.column?n.indent:0}return 0},e.prototype.getScreenLastRowColumn=function(e){var t=this.screenToDocumentPosition(e,Number.MAX_VALUE);return this.documentToScreenColumn(t.row,t.column)},e.prototype.getDocumentLastRowColumn=function(e,t){var n=this.documentToScreenRow(e,t);return this.getScreenLastRowColumn(n)},e.prototype.getDocumentLastRowColumnPosition=function(e,t){var n=this.documentToScreenRow(e,t);return this.screenToDocumentPosition(n,Number.MAX_VALUE/10)},e.prototype.getRowSplitData=function(e){return this.$useWrapMode?this.$wrapData[e]:void 0},e.prototype.getScreenTabSize=function(e){return this.$tabSize-(e%this.$tabSize|0)},e.prototype.screenToDocumentRow=function(e,t){return this.screenToDocumentPosition(e,t).row},e.prototype.screenToDocumentColumn=function(e,t){return this.screenToDocumentPosition(e,t).column},e.prototype.screenToDocumentPosition=function(e,t,n){if(e<0)return{row:0,column:0};var r,i,o=0,a=0,s=0,l=0,c=this.$screenRowCache,d=this.$getRowCacheIndex(c,e),u=c.length;if(u&&d>=0){s=c[d],o=this.$docRowCache[d];var p=e>c[u-1]}else p=!u;for(var h=this.getLength()-1,m=this.getNextFoldLine(o),f=m?m.start.row:1/0;s<=e&&!(s+(l=this.getRowLength(o))>e||o>=h);)s+=l,++o>f&&(o=m.end.row+1,f=(m=this.getNextFoldLine(o,m))?m.start.row:1/0),p&&(this.$docRowCache.push(o),this.$screenRowCache.push(s));if(m&&m.start.row<=o)r=this.getFoldDisplayLine(m),o=m.start.row;else{if(s+l<=e||o>h)return{row:h,column:this.getLine(h).length};r=this.getLine(o),m=null}var g=0,v=Math.floor(e-s);if(this.$useWrapMode){var x=this.$wrapData[o];x&&(i=x[v],v>0&&x.length&&(g=x.indent,a=x[v-1]||x[x.length-1],r=r.substring(a)))}return void 0!==n&&this.$bidiHandler.isBidiRow(s+v,o,v)&&(t=this.$bidiHandler.offsetToCol(n)),a+=this.$getStringScreenWidth(r,t-g)[1],this.$useWrapMode&&a>=i&&(a=i-1),m?m.idxToPosition(a):{row:o,column:a}},e.prototype.documentToScreenPosition=function(e,t){if("undefined"===typeof t)var n=this.$clipPositionToDocument(e.row,e.column);else n=this.$clipPositionToDocument(e,t);e=n.row,t=n.column;var r,i=0,o=null;(r=this.getFoldAt(e,t,1))&&(e=r.start.row,t=r.start.column);var a,s=0,l=this.$docRowCache,c=this.$getRowCacheIndex(l,e),d=l.length;if(d&&c>=0){s=l[c],i=this.$screenRowCache[c];var u=e>l[d-1]}else u=!d;for(var p=this.getNextFoldLine(s),h=p?p.start.row:1/0;s<e;){if(s>=h){if((a=p.end.row+1)>e)break;h=(p=this.getNextFoldLine(a,p))?p.start.row:1/0}else a=s+1;i+=this.getRowLength(s),s=a,u&&(this.$docRowCache.push(s),this.$screenRowCache.push(i))}var m="";p&&s>=h?(m=this.getFoldDisplayLine(p,e,t),o=p.start.row):(m=this.getLine(e).substring(0,t),o=e);var f=0;if(this.$useWrapMode){var g=this.$wrapData[o];if(g){for(var v=0;m.length>=g[v];)i++,v++;m=m.substring(g[v-1]||0,m.length),f=v>0?g.indent:0}}return this.lineWidgets&&this.lineWidgets[s]&&this.lineWidgets[s].rowsAbove&&(i+=this.lineWidgets[s].rowsAbove),{row:i,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,r=0,i=(s=0,(t=this.$foldData[s++])?t.start.row:1/0);r<n;){var o=this.$wrapData[r];e+=o?o.length+1:1,++r>i&&(r=t.end.row+1,i=(t=this.$foldData[s++])?t.start.row:1/0)}else{e=this.getLength();for(var a=this.$foldData,s=0;s<a.length;s++)e-=(t=a[s]).end.row-t.start.row}return this.lineWidgets&&(e+=this.$getWidgetScreenLength()),e},e.prototype.$setFontMetrics=function(e){this.$enableVarChar&&(this.$getStringScreenWidth=function(t,n,r){if(0===n)return[0,0];var i,o;for(n||(n=1/0),r=r||0,o=0;o<t.length&&!((r+="\t"===(i=t.charAt(o))?this.getScreenTabSize(r):e.getCharacterWidth(i))>n);o++);return[r,o]})},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=S,r.implement(g.prototype,s);var v=1,x=2,y=3,b=4,j=9,_=10,C=11,w=12;function S(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){"use strict";var r=e("./lib/lang"),i=e("./lib/oop"),o=e("./range").Range,a=function(){function e(){this.$options={}}return e.prototype.set=function(e){return i.mixin(this.$options,e),this},e.prototype.getOptions=function(){return r.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 r=null;return n.forEach(function(e,n,i,a){return r=new o(e,n,i,a),!(n==a&&t.start&&t.start.start&&0!=t.skipCurrent&&r.isEqual(t.start))||(r=null,!1)}),r},e.prototype.findAll=function(e){var t=this.$options;if(!t.needle)return[];this.$assembleRegExp(t);var n=t.range,i=n?e.getLines(n.start.row,n.end.row):e.doc.getAllLines(),a=[],s=t.re;if(t.$isMultiLine){var l,c=s.length,d=i.length-c;e:for(var u=s.offset||0;u<=d;u++){for(var p=0;p<c;p++)if(-1==i[u+p].search(s[p]))continue e;var h=i[u],m=i[u+c-1],f=h.length-h.match(s[0])[0].length,g=m.match(s[c-1])[0].length;l&&l.end.row===u&&l.end.column>f||(a.push(l=new o(u,f,u+c-1,g)),c>2&&(u=u+c-2))}}else for(var v,x=0;x<i.length;x++)if(this.$isMultilineSearch(t)){var y=i.length-1;if(v=this.$multiLineForward(e,s,x,y)){var b=v.endRow<=y?v.endRow-1:y;b>x&&(x=b),a.push(new o(v.startRow,v.startCol,v.endRow,v.endCol))}}else{v=r.getMatchOffsets(i[x],s);for(p=0;p<v.length;p++){var j=v[p];a.push(new o(x,j.offset,x,j.offset+j.length))}}if(n){var _=n.start.column,C=n.end.column;for(x=0,p=a.length-1;x<p&&a[x].start.column<_&&0==a[x].start.row;)x++;for(var w=n.end.row-n.start.row;x<p&&a[p].end.column>C&&a[p].end.row==w;)p--;for(a=a.slice(x,p+1),x=0,p=a.length;x<p;x++)a[x].start.row+=n.start.row,a[x].end.row+=n.start.row}return a},e.prototype.parseReplaceString=function(e){for(var t=36,n=38,r=48,i=49,o=57,a=92,s=110,l=116,c="",d=0,u=e.length;d<u;d++){var p=e.charCodeAt(d);if(p!==a){if(p===t){if(++d>=u){c+="$";break}var h=e.charCodeAt(d);if(h===t){c+="$$";continue}if(h===r||h===n){c+="$&";continue}if(i<=h&&h<=o){c+="$"+e[d];continue}}c+=e[d]}else{if(++d>=u){c+="\\";break}switch(e.charCodeAt(d)){case a:c+="\\";break;case s:c+="\n";break;case l:c+="\t"}}}return c||e},e.prototype.replace=function(e,t){var n=this.$options,r=this.$assembleRegExp(n);if(n.$isMultiLine)return t;if(r){var i=this.$isMultilineSearch(n);i&&(e=e.replace(/\r\n|\r|\n/g,"\n"));var o=r.exec(e);if(!o||!i&&o[0].length!=e.length)return null;if(t=n.regExp?this.parseReplaceString(t):t.replace(/\$/g,"$$$$"),t=e.replace(r,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=r.escapeRegExp(n));var i=e.caseSensitive?"gm":"gmi";try{new RegExp(n,"u"),e.$supportsUnicodeFlag=!0,i+="u"}catch(a){e.$supportsUnicodeFlag=!1}if(e.wholeWord&&(n=function(e,t){var n=r.supportsLookbehind();function i(e,r){return void 0===r&&(r=!0),(n&&t.$supportsUnicodeFlag?new RegExp("[\\p{L}\\p{N}_]","u"):new RegExp("\\w")).test(e)||t.regExp?n&&t.$supportsUnicodeFlag?r?"(?<=^|[^\\p{L}\\p{N}_])":"(?=[^\\p{L}\\p{N}_]|$)":"\\b":""}var o=Array.from(e),a=o[0],s=o[o.length-1];return i(a)+e+i(s,!1)}(n,e)),e.$isMultiLine=!t&&/[\n\r]/.test(n),e.$isMultiLine)return e.re=this.$assembleMultilineRegExp(n,i);try{var o=new RegExp(n,i)}catch(a){o=!1}return e.re=o},e.prototype.$assembleMultilineRegExp=function(e,t){for(var n=e.replace(/\r\n|\r|\n/g,"$\n^").split("\n"),r=[],i=0;i<n.length;i++)try{r.push(new RegExp(n[i],t))}catch(o){return!1}return r},e.prototype.$isMultilineSearch=function(e){return e.re&&/\\r\\n|\\r|\\n/.test(e.re.source)&&e.regExp&&!e.$isMultiLine},e.prototype.$multiLineForward=function(e,t,n,r){for(var i,o=l(e,n),a=n;a<=r;){for(var s=0;s<o&&!(a>r);s++){var c=e.getLine(a++);i=null==i?c:i+"\n"+c}var d=t.exec(i);if(t.lastIndex=0,d){var u=i.slice(0,d.index).split("\n"),p=d[0].split("\n"),h=n+u.length-1,m=u[u.length-1].length;return{startRow:h,startCol:m,endRow:h+p.length-1,endCol:1==p.length?m+p[0].length:p[p.length-1].length}}}return null},e.prototype.$multiLineBackward=function(e,t,n,r,i){for(var o,a=l(e,r),c=e.getLine(r).length-n,d=r;d>=i;){for(var u=0;u<a&&d>=i;u++){var p=e.getLine(d--);o=null==o?p:p+"\n"+o}var h=s(o,t,c);if(h){var m=o.slice(0,h.index).split("\n"),f=h[0].split("\n"),g=d+m.length,v=m[m.length-1].length;return{startRow:g,startCol:v,endRow:g+f.length-1,endCol:1==f.length?v+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 i=this.$isMultilineSearch(t),o=this.$multiLineForward,a=this.$multiLineBackward,s=1==t.backwards,l=0!=t.skipCurrent,c=n.unicode,d=t.range,u=t.start;u||(u=d?d[s?"end":"start"]:e.selection.getRange()),u.start&&(u=u[l!=s?"end":"start"]);var p=d?d.start.row:0,h=d?d.end.row:e.getLength()-1;if(s)var m=function(e){var n=u.row;if(!g(n,u.column,e)){for(n--;n>=p;n--)if(g(n,Number.MAX_VALUE,e))return;if(0!=t.wrap)for(n=h,p=u.row;n>=p;n--)if(g(n,Number.MAX_VALUE,e))return}};else m=function(e){var n=u.row;if(!g(n,u.column,e)){for(n+=1;n<=h;n++)if(g(n,0,e))return;if(0!=t.wrap)for(n=p,h=u.row;n<=h;n++)if(g(n,0,e))return}};if(t.$isMultiLine)var f=n.length,g=function(t,r,i){var o=s?t-f+1:t;if(!(o<0||o+f>e.getLength())){var a=e.getLine(o),l=a.search(n[0]);if(!(!s&&l<r||-1===l)){for(var c=1;c<f;c++)if(-1==(a=e.getLine(o+c)).search(n[c]))return;var d=a.match(n[f-1])[0].length;if(!(s&&d>r))return!!i(o,l,o+f-1,d)||void 0}}};else if(s)g=function(t,o,s){if(i){var l=a(e,n,o,t,p);if(!l)return!1;if(s(l.startRow,l.startCol,l.endRow,l.endCol))return!0}else{var d,u=e.getLine(t),h=[],m=0;for(n.lastIndex=0;d=n.exec(u);){var f=d[0].length;if(m=d.index,!f){if(m>=u.length)break;n.lastIndex=m+=r.skipEmptyMatch(u,m,c)}if(d.index+f>o)break;h.push(d.index,f)}for(var g=h.length-1;g>=0;g-=2){var v=h[g-1];if(s(t,v,t,v+(f=h[g])))return!0}}};else g=function(t,a,s){if(n.lastIndex=a,i){var l=o(e,n,t,h);if(l){var d=l.endRow<=h?l.endRow-1:h;d>t&&(t=d)}if(!l)return!1;if(s(l.startRow,l.startCol,l.endRow,l.endCol))return!0}else for(var u,p,m=e.getLine(t);p=n.exec(m);){var f=p[0].length;if(s(t,u=p.index,t,u+f))return!0;if(!f&&(n.lastIndex=u+=r.skipEmptyMatch(m,u,c),u>=m.length))return!1}};return{forEach:m}},e}();function s(e,t,n){for(var r=null,i=0;i<=e.length;){t.lastIndex=i;var o=t.exec(e);if(!o)break;var a=o.index+o[0].length;if(a>e.length-n)break;(!r||a>r.index+r[0].length)&&(r=o),i=o.index+1}return r}function l(e,t){var n={row:t,column:0},r=e.doc.positionToIndex(n)+5e3;return e.doc.indexToPosition(r).row+1}t.Search=a}),ace.define("ace/keyboard/hash_handler",["require","exports","module","ace/lib/keys","ace/lib/useragent"],function(e,t,n){"use strict";var r=this&&this.__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])},e(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 r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),i=e("../lib/keys"),o=e("../lib/useragent"),a=i.KEY_MODS,s=function(){function e(e,t){this.$init(e,t,!1)}return e.prototype.$init=function(e,t,n){this.platform=t||(o.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 r=this.commandKeyBinding;for(var i in r){var o=r[i];if(o==e)delete r[i];else if(Array.isArray(o)){var a=o.indexOf(e);-1!=a&&(o.splice(a,1),1==o.length&&(r[i]=o[0]))}}},e.prototype.bindKey=function(e,t,n){if("object"==typeof e&&e&&(void 0==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 r="";if(-1!=e.indexOf(" ")){var i=e.split(/\s+/);e=i.pop(),i.forEach(function(e){var t=this.parseKeys(e),n=a[t.hashId]+t.key;r+=(r?" ":"")+n,this._addCommandToBinding(r,"chainKeys")},this),r+=" "}var o=this.parseKeys(e),s=a[o.hashId]+o.key;this._addCommandToBinding(r+s,t,n)},this)},e.prototype._addCommandToBinding=function(e,t,n){var r,i=this.commandKeyBinding;if(t)if(!i[e]||this.$singleCommand)i[e]=t;else{Array.isArray(i[e])?-1!=(r=i[e].indexOf(t))&&i[e].splice(r,1):i[e]=[i[e]],"number"!=typeof n&&(n=l(t));var o=i[e];for(r=0;r<o.length;r++){if(l(o[r])>n)break}o.splice(r,0,t)}else delete i[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(),r=i[n];if(i.FUNCTION_KEYS[r])n=i.FUNCTION_KEYS[r].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=i.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=a[e]+t;return this.commandKeyBinding[n]},e.prototype.handleKeyboard=function(e,t,n,r){if(!(r<0)){var i=a[t]+n,o=this.commandKeyBinding[i];return e.$keyChain&&(e.$keyChain+=" "+i,o=this.commandKeyBinding[e.$keyChain]||o),!o||"chainKeys"!=o&&"chainKeys"!=o[o.length-1]?(e.$keyChain&&(t&&4!=t||1!=n.length?(-1==t||r>0)&&(e.$keyChain=""):e.$keyChain=e.$keyChain.slice(0,-i.length-1)),{command:o}):(e.$keyChain=e.$keyChain||i,{command:"null"})}},e.prototype.getStatusText=function(e,t){return t.$keyChain||""},e}();function l(e){return"object"==typeof e&&e.bindKey&&e.bindKey.position||(e.isDefault?-100:0)}var c=function(e){function t(t,n){var r=e.call(this,t,n)||this;return r.$singleCommand=!0,r}return r(t,e),t}(s);c.call=function(e,t,n){s.prototype.$init.call(e,t,n,!0)},s.call=function(e,t,n){s.prototype.$init.call(e,t,n,!1)},t.HashHandler=c,t.MultiHashHandler=s}),ace.define("ace/commands/command_manager",["require","exports","module","ace/lib/oop","ace/keyboard/hash_handler","ace/lib/event_emitter"],function(e,t,n){"use strict";var r=this&&this.__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])},e(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 r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),i=e("../lib/oop"),o=e("../keyboard/hash_handler").MultiHashHandler,a=e("../lib/event_emitter").EventEmitter,s=function(e){function t(t,n){var r=e.call(this,n,t)||this;return r.byName=r.commands,r.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)}),r}return r(t,e),t.prototype.exec=function(e,t,n){if(Array.isArray(e)){for(var r=e.length;r--;)if(this.exec(e[r],t,n))return!0;return!1}"string"===typeof e&&(e=this.commands[e]);var i={editor:t,command:e,args:n};return this.canExecute(e,t)?(i.returnValue=this._emit("exec",i),this._signal("afterExec",i),!1!==i.returnValue):(this._signal("commandUnavailable",i),!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}(o);i.implement(s.prototype,a),t.CommandManager=s}),ace.define("ace/commands/default_commands",["require","exports","module","ace/lib/lang","ace/config","ace/range"],function(e,t,n){"use strict";var r=e("../lib/lang"),i=e("../config"),o=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){i.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){i.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){i.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){i.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){i.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(r.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(),i=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<=i.row+1;c++){var d=r.stringTrimLeft(r.stringTrimRight(e.session.doc.getLine(c)));0!==d.length&&(d=" "+d),l+=d}i.row+1<e.session.doc.getLength()-1&&(l+=e.session.doc.getNewLineCharacter()),e.clearSelection(),e.session.doc.replace(new o(n.row,0,i.row+2,0),l),s>0?(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,r=e.selection.rangeList.ranges,i=[];r.length<1&&(r=[e.selection.getRange()]);for(var a=0;a<r.length;a++)a==r.length-1&&(r[a].end.row===t&&r[a].end.column===n||i.push(new o(r[a].end.row,r[a].end.column,t,n))),0===a?0===r[a].start.row&&0===r[a].start.column||i.push(new o(0,0,r[a].start.row,r[a].start.column)):i.push(new o(r[a-1].end.row,r[a-1].end.column,r[a].start.row,r[a].start.column));e.exitMultiSelectMode(),e.clearSelection();for(a=0;a<i.length;a++)e.selection.addRange(i[a],!1)},readOnly:!0,scrollIntoView:"none"},{name:"addLineAfter",description:"Add new line after the current line",exec:function(e){e.selection.clearSelection(),e.navigateLineEnd(),e.insert("\n")},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"addLineBefore",description:"Add new line before the current line",exec:function(e){e.selection.clearSelection();var t=e.getCursorPosition();e.selection.moveTo(t.row-1,Number.MAX_VALUE),e.insert("\n"),0===t.row&&e.navigateUp()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"openCommandPallete",exec:function(e){console.warn("This is an obsolete command. Please use `openCommandPalette` instead."),e.prompt({$type:"commands"})},readOnly:!0},{name:"openCommandPalette",description:"Open command palette",bindKey:a("F1","F1"),exec:function(e){e.prompt({$type:"commands"})},readOnly:!0},{name:"modeSelect",description:"Change language mode...",bindKey:a(null,null),exec:function(e){e.prompt({$type:"modes"})},readOnly:!0}];for(var s=1;s<9;s++)t.commands.push({name:"foldToLevel"+s,description:"Fold To Level "+s,level:s,exec:function(e){e.session.foldToLevel(this.level)},scrollIntoView:"center",readOnly:!0})}),ace.define("ace/keyboard/gutter_handler",["require","exports","module","ace/lib/keys","ace/mouse/default_gutter_handler"],function(e,t,n){"use strict";var r=e("../lib/keys"),i=e("../mouse/default_gutter_handler").GutterTooltip,o=function(){function e(e){this.editor=e,this.gutterLayer=e.renderer.$gutterLayer,this.element=e.renderer.$gutter,this.lines=e.renderer.$gutterLayer.$lines,this.activeRowIndex=null,this.activeLane=null,this.annotationTooltip=new i(this.editor)}return e.prototype.addListener=function(){this.element.addEventListener("keydown",this.$onGutterKeyDown.bind(this)),this.element.addEventListener("focusout",this.$blurGutter.bind(this)),this.editor.on("mousewheel",this.$blurGutter.bind(this))},e.prototype.removeListener=function(){this.element.removeEventListener("keydown",this.$onGutterKeyDown.bind(this)),this.element.removeEventListener("focusout",this.$blurGutter.bind(this)),this.editor.off("mousewheel",this.$blurGutter.bind(this))},e.prototype.$onGutterKeyDown=function(e){if(this.annotationTooltip.isOpen)return e.preventDefault(),void(e.keyCode===r.escape&&this.annotationTooltip.hideTooltip());if(e.target===this.element){if(e.keyCode!=r.enter)return;e.preventDefault();var t=this.editor.getCursorPosition().row;return this.editor.isRowVisible(t)||this.editor.scrollToLine(t,!0,!0),void setTimeout(function(){var e=this.$rowToRowIndex(this.gutterLayer.$cursorCell.row),t=this.$findNearestFoldLaneWidget(e),n=this.$findNearestAnnotation(e);if(null!==t||null!==n)return this.$findClosestNumber(t,n,e)===t?(this.activeLane="fold",this.activeRowIndex=t,this.$isCustomWidgetVisible(t)?void this.$focusCustomWidget(this.activeRowIndex):void this.$focusFoldWidget(this.activeRowIndex)):(this.activeRowIndex=n,this.activeLane="annotation",void this.$focusAnnotation(this.activeRowIndex))}.bind(this),10)}this.$handleGutterKeyboardInteraction(e),setTimeout(function(){this.editor._signal("gutterkeydown",new a(e,this))}.bind(this),10)},e.prototype.$handleGutterKeyboardInteraction=function(e){if(e.keyCode!==r.tab){if(e.keyCode===r.escape)return e.preventDefault(),this.$blurGutter(),this.element.focus(),void(this.lane=null);if(e.keyCode!==r.up)if(e.keyCode!==r.down){if(e.keyCode===r.left)return e.preventDefault(),void this.$switchLane("annotation");if(e.keyCode===r.right)return e.preventDefault(),void this.$switchLane("fold");if(e.keyCode!==r.enter&&e.keyCode!==r.space);else switch(e.preventDefault(),this.activeLane){case"fold":var t=this.$rowIndexToRow(this.activeRowIndex),n=this.editor.session.$gutterCustomWidgets[t];if(n)n.callbacks&&n.callbacks.onClick&&n.callbacks.onClick(e,t);else{if("start"===this.gutterLayer.session.foldWidgets[t]){this.editor.session.onFoldWidgetClick(this.$rowIndexToRow(this.activeRowIndex),e),setTimeout(function(){this.$rowIndexToRow(this.activeRowIndex)!==t&&(this.$blurFoldWidget(this.activeRowIndex),this.activeRowIndex=this.$rowToRowIndex(t),this.$focusFoldWidget(this.activeRowIndex))}.bind(this),10);break}if("end"===this.gutterLayer.session.foldWidgets[this.$rowIndexToRow(this.activeRowIndex)])break}return;case"annotation":var i=this.lines.cells[this.activeRowIndex].element.childNodes[2].getBoundingClientRect(),o=this.annotationTooltip.getElement().style;o.left=i.right+"px",o.top=i.bottom+"px",this.annotationTooltip.showTooltip(this.$rowIndexToRow(this.activeRowIndex))}}else switch(e.preventDefault(),this.activeLane){case"fold":this.$moveFoldWidgetDown();break;case"annotation":this.$moveAnnotationDown()}else switch(e.preventDefault(),this.activeLane){case"fold":this.$moveFoldWidgetUp();break;case"annotation":this.$moveAnnotationUp()}}else e.preventDefault()},e.prototype.$blurGutter=function(){if(null!==this.activeRowIndex)switch(this.activeLane){case"fold":this.$blurFoldWidget(this.activeRowIndex),this.$blurCustomWidget(this.activeRowIndex);break;case"annotation":this.$blurAnnotation(this.activeRowIndex)}this.annotationTooltip.isOpen&&this.annotationTooltip.hideTooltip()},e.prototype.$isFoldWidgetVisible=function(e){var t=this.editor.isRowFullyVisible(this.$rowIndexToRow(e)),n="none"!==this.$getFoldWidget(e).style.display;return t&&n},e.prototype.$isCustomWidgetVisible=function(e){var t=this.editor.isRowFullyVisible(this.$rowIndexToRow(e)),n=!!this.$getCustomWidget(e);return t&&n},e.prototype.$isAnnotationVisible=function(e){var t=this.editor.isRowFullyVisible(this.$rowIndexToRow(e)),n="none"!==this.$getAnnotation(e).style.display;return t&&n},e.prototype.$getFoldWidget=function(e){return this.lines.get(e).element.childNodes[1]},e.prototype.$getCustomWidget=function(e){return this.lines.get(e).element.childNodes[3]},e.prototype.$getAnnotation=function(e){return this.lines.get(e).element.childNodes[2]},e.prototype.$findNearestFoldLaneWidget=function(e){if(this.$isCustomWidgetVisible(e))return e;if(this.$isFoldWidgetVisible(e))return e;for(var t=0;e-t>0||e+t<this.lines.getLength()-1;){if(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<this.lines.getLength()-1;){if(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;e<this.lines.getLength()-1;)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.$moveAnnotationUp=function(){for(var e=this.activeRowIndex;e>0;)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<this.lines.getLength()-1;)if(e++,this.$isAnnotationVisible(e))return this.$blurAnnotation(this.activeRowIndex),this.activeRowIndex=e,void this.$focusAnnotation(this.activeRowIndex)},e.prototype.$findClosestNumber=function(e,t,n){return null===e?t:null===t||Math.abs(n-e)<=Math.abs(n-t)?e:t},e.prototype.$switchLane=function(e){switch(e){case"annotation":if("annotation"===this.activeLane)break;var t=this.$findNearestAnnotation(this.activeRowIndex);if(null==t)break;this.activeLane="annotation",this.$blurFoldWidget(this.activeRowIndex),this.$blurCustomWidget(this.activeRowIndex),this.activeRowIndex=t,this.$focusAnnotation(this.activeRowIndex);break;case"fold":if("fold"===this.activeLane)break;var n=this.$findNearestFoldLaneWidget(this.activeRowIndex);if(null===n)break;this.activeLane="fold",this.$blurAnnotation(this.activeRowIndex),this.activeRowIndex=n,this.$isCustomWidgetVisible(n)?this.$focusCustomWidget(this.activeRowIndex):this.$focusFoldWidget(this.activeRowIndex)}},e.prototype.$rowIndexToRow=function(e){var t=this.lines.get(e);return t?t.row:null},e.prototype.$rowToRowIndex=function(e){for(var t=0;t<this.lines.getLength();t++){if(this.lines.get(t).row==e)return t}return null},e}();t.GutterKeyboardHandler=o;var a=function(){function e(e,t){this.gutterKeyboardHandler=t,this.domEvent=e}return e.prototype.getKey=function(){return r.keyCodeToString(this.domEvent.keyCode)},e.prototype.getRow=function(){return this.gutterKeyboardHandler.$rowIndexToRow(this.gutterKeyboardHandler.activeRowIndex)},e.prototype.isInAnnotationLane=function(){return"annotation"===this.gutterKeyboardHandler.activeLane},e.prototype.isInFoldLane=function(){return"fold"===this.gutterKeyboardHandler.activeLane},e}();t.GutterKeyboardEvent=a}),ace.define("ace/editor",["require","exports","module","ace/lib/oop","ace/lib/dom","ace/lib/lang","ace/lib/useragent","ace/keyboard/textinput","ace/mouse/mouse_handler","ace/mouse/fold_handler","ace/keyboard/keybinding","ace/edit_session","ace/search","ace/range","ace/lib/event_emitter","ace/commands/command_manager","ace/commands/default_commands","ace/config","ace/token_iterator","ace/keyboard/gutter_handler","ace/config","ace/clipboard","ace/lib/keys","ace/lib/event","ace/tooltip"],function(e,t,n){"use strict";var r=this&&this.__values||function(e){var t="function"===typeof Symbol&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&"number"===typeof e.length)return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")},i=e("./lib/oop"),o=e("./lib/dom"),a=e("./lib/lang"),s=e("./lib/useragent"),l=e("./keyboard/textinput").TextInput,c=e("./mouse/mouse_handler").MouseHandler,d=e("./mouse/fold_handler").FoldHandler,u=e("./keyboard/keybinding").KeyBinding,p=e("./edit_session").EditSession,h=e("./search").Search,m=e("./range").Range,f=e("./lib/event_emitter").EventEmitter,g=e("./commands/command_manager").CommandManager,v=e("./commands/default_commands").commands,x=e("./config"),y=e("./token_iterator").TokenIterator,b=e("./keyboard/gutter_handler").GutterKeyboardHandler,j=e("./config").nls,_=e("./clipboard"),C=e("./lib/keys"),w=e("./lib/event"),S=e("./tooltip").HoverTooltip,A=function(){function e(t,n,r){this.id="editor"+ ++e.$uid,this.session,this.$toDestroy=[];var i=t.getContainerElement();this.container=i,this.renderer=t,this.commands=new g(s.isMac?"mac":"win",v),"object"==typeof document&&(this.textInput=new l(t.getTextAreaContainer(),this),this.renderer.textarea=this.textInput.getElement(),this.$mouseHandler=new c(this),new d(this)),this.keyBinding=new u(this),this.$search=(new h).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||r&&r.session||new p("")),x.resetOptions(this),r&&this.setOptions(r),x._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 r=this.selection.getRange(),i=this.renderer.layerConfig;(r.start.row>=i.lastRow||r.end.row<=i.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,r=t.command&&e.command.name==t.command.name;if("insertstring"==e.command.name){var i=e.args;void 0===this.mergeNextCommand&&(this.mergeNextCommand=!0),r=r&&this.mergeNextCommand&&(!/\s/.test(i)||/\s/.test(t.args)),this.mergeNextCommand=!0}else r=r&&-1!==n.indexOf(e.command.name);"always"!=this.$mergeUndoDeltas&&Date.now()-this.sequenceStartTime>2e3&&(r=!1),r?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;x.loadModule(["keybinding",e],function(r){n.$keybindingId==e&&n.keyBinding.setKeyboardHandler(r&&r.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")||o.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(),r=e.getKeyboardHandler(),i=r&&r.$getDirectionForHighlight&&r.$getDirectionForHighlight(e),o=t.getMatchingBracketRanges(n,i);if(!o){var a=new y(t,n.row,n.column).getCurrentToken();if(a&&/\b(?:tag-open|tag-name)/.test(a.type)){var s=t.getMatchingTags(n);s&&(o=[s.openTagName.isEmpty()?s.openTag:s.openTagName,s.closeTagName.isEmpty()?s.closeTag:s.closeTagName])}}if(!o&&t.$mode.getMatching&&(o=t.$mode.getMatching(e.session)),o){var l="ace_bracket";Array.isArray(o)?1==o.length&&(l="ace_error_bracket"):o=[o],2==o.length&&(0==m.comparePoints(o[0].end,o[1].start)?o=[m.fromPoints(o[0].start,o[1].end)]:0==m.comparePoints(o[0].start,o[1].end)&&(o=[m.fromPoints(o[1].start,o[0].end)])),t.$bracketHighlight={ranges:o,markerIds:o.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(),r=this.getSelectionStyle();t.$selectionMarker=t.addMarker(n,"ace_selection",r)}var i=this.$highlightSelectedWord&&this.$getSelectionHighLightRegexp();this.session.highlight(i),this._signal("changeSelection")},e.prototype.$getSelectionHighLightRegexp=function(){var e=this.session,t=this.getSelectionRange();if(!t.isEmpty()&&!t.isMultiLine()){var n=t.start.column,r=t.end.column,i=e.getLine(t.start.row),o=i.substring(n,r);if(!(o.length>5e3)&&/[\w\d]/.test(o)){var a=this.$search.$assembleRegExp({wholeWord:!0,caseSensitive:!0,needle:o}),s=i.substring(n-1,r+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 r=this.selection.getAllRanges(),i=0;i<r.length;i++){var o=r[i];i&&r[i-1].start.row==o.start.row||(e+=this.session.getLine(o.start.row)+t)}}var a={text:e};return this._signal("copy",a),_.lineMode=!!n&&a.text,a.text},e.prototype.onCopy=function(){this.commands.exec("copy",this)},e.prototype.onCut=function(){this.commands.exec("cut",this)},e.prototype.onPaste=function(e,t){var n={text:e,event:t};this.commands.exec("paste",this,n)},e.prototype.$handlePaste=function(e){"string"==typeof e&&(e={text:e}),this._signal("paste",e);var t=e.text,n=t===_.lineMode,r=this.session;if(!this.inMultiSelectMode||this.inVirtualSelectionMode)n?r.insert({row:this.selection.lead.row,column:0},t):this.insert(t);else if(n)this.selection.rangeList.ranges.forEach(function(e){r.insert({row:e.start.row,column:0},t)});else{var i=t.split(/\r\n|\r|\n/),o=this.selection.rangeList.ranges,a=2==i.length&&(!i[0]||!i[1]);if(i.length!=o.length||a)return this.commands.exec("insertstring",this,t);for(var s=o.length;s--;){var l=o[s];l.isEmpty()||r.remove(l),r.insert(l.start,i[s])}}},e.prototype.execCommand=function(e,t){return this.commands.exec(e,this,t)},e.prototype.insert=function(e,t){var n=this.session,r=n.getMode(),i=this.getCursorPosition();if(this.getBehavioursEnabled()&&!t){var o=r.transformAction(n.getState(i.row),"insertion",this,n,e);o&&(e!==o.text&&(this.inVirtualSelectionMode||(this.session.mergeUndoDeltas=!1,this.mergeNextCommand=!1)),e=o.text)}if("\t"==e&&(e=this.session.getTabString()),this.selection.isEmpty()){if(this.session.getOverwrite()&&-1==e.indexOf("\n")){(a=m.fromPoints(i,i)).end.column+=e.length,this.session.remove(a)}}else{var a=this.getSelectionRange();i=this.session.remove(a),this.clearSelection()}if("\n"==e||"\r\n"==e){var s=n.getLine(i.row);if(i.column>s.search(/\S|$/)){var l=s.substr(i.column).search(/\S|$/);n.doc.removeInLine(i.row,i.column,i.column+l)}}this.clearSelection();var c=i.column,d=n.getState(i.row),u=(s=n.getLine(i.row),r.checkOutdent(d,s,e));if(n.insert(i,e),o&&o.selection&&(2==o.selection.length?this.selection.setSelectionRange(new m(i.row,c+o.selection[0],i.row,c+o.selection[1])):this.selection.setSelectionRange(new m(i.row+o.selection[0],o.selection[1],i.row+o.selection[2],o.selection[3]))),this.$enableAutoIndent){if(n.getDocument().isNewLine(e)){var p=r.getNextLineIndent(d,s.slice(0,i.column),n.getTabString());n.insert({row:i.row+1,column:0},p)}u&&r.autoOutdent(d,n,i.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(),r="",i="",o="",a=e.getTabString(),s=0;s<n.length;s++)for(var l=n[s].start.row,c=n[s].end.row,d=l;d<=c;d++){d>0&&(r=e.getState(d-1),i=e.getLine(d-1),o=t.getNextLineIndent(r,i,a));var u=e.getLine(d),p=t.$getIndent(u);if(o!==p){if(p.length>0){var h=new m(d,0,d,p.length);e.remove(h)}o.length>0&&e.insert({row:d,column:0},o)}t.autoOutdent(r,e,d)}},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,r=n.getState(t.start.row),i=n.getMode().transformAction(r,"deletion",this,n,t);if(0===t.end.column){var o=n.getTextRange(t);if("\n"==o[o.length-1]){var a=n.getLine(t.end.row);/^\s+$/.test(a)&&(t.end.column=a.length)}}i&&(t=i)}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,r,i=this.session.getLine(e.row);t<i.length?(n=i.charAt(t)+i.charAt(t-1),r=new m(e.row,t-1,e.row,t+1)):(n=i.charAt(t-1)+i.charAt(t-2),r=new m(e.row,t-2,e.row,t)),this.session.replace(r,n),this.session.selection.moveToPosition(r.end)}}},e.prototype.toLowerCase=function(){var e=this.getSelectionRange();this.selection.isEmpty()&&this.selection.selectWord();var t=this.getSelectionRange(),n=this.session.getTextRange(t);this.session.replace(t,n.toLowerCase()),this.selection.setSelectionRange(e)},e.prototype.toUpperCase=function(){var e=this.getSelectionRange();this.selection.isEmpty()&&this.selection.selectWord();var t=this.getSelectionRange(),n=this.session.getTextRange(t);this.session.replace(t,n.toUpperCase()),this.selection.setSelectionRange(e)},e.prototype.indent=function(){var e=this.session,t=this.getSelectionRange();if(!(t.start.row<t.end.row)){if(t.start.column<t.end.column){var n=e.getTextRange(t);if(!/^\s+$/.test(n)){d=this.$getSelectedRows();return void e.indentRows(d.first,d.last,"\t")}}var r=e.getLine(t.start.row),i=t.start,o=e.getTabSize(),s=e.documentToScreenColumn(i.row,i.column);if(this.session.getUseSoftTabs())var l=o-s%o,c=a.stringRepeat(" ",l);else{for(l=s%o;" "==r[t.start.column-1]&&l;)t.start.column--,l--;this.selection.setSelectionRange(t),c="\t"}return this.insert(c)}var d=this.$getSelectedRows();e.indentRows(d.first,d.last,"\t")},e.prototype.blockIndent=function(){var e=this.$getSelectedRows();this.session.indentRows(e.first,e.last,"\t")},e.prototype.blockOutdent=function(){var e=this.session.getSelection();this.session.outdentRows(e.getRange())},e.prototype.sortLines=function(){for(var e=this.$getSelectedRows(),t=this.session,n=[],r=e.first;r<=e.last;r++)n.push(t.getLine(r));n.sort(function(e,t){return e.toLowerCase()<t.toLowerCase()?-1:e.toLowerCase()>t.toLowerCase()?1:0});var i=new m(0,0,0,0);for(r=e.first;r<=e.last;r++){var o=t.getLine(r);i.start.row=r,i.end.row=r,i.end.column=o.length,t.replace(i,n[r-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 r=this.session.getLine(e);n.lastIndex<t;){var i=n.exec(r);if(i.index<=t&&i.index+i[0].length>=t)return{value:i[0],start:i.index,end:i.index+i[0].length}}return null},e.prototype.modifyNumber=function(e){var t=this.selection.getCursor().row,n=this.selection.getCursor().column,r=new m(t,n-1,t,n),i=this.session.getTextRange(r);if(!isNaN(parseFloat(i))&&isFinite(i)){var o=this.getNumberAt(t,n);if(o){var a=o.value.indexOf(".")>=0?o.start+o.value.indexOf(".")+1:o.end,s=o.start+o.value.length-a,l=parseFloat(o.value);l*=Math.pow(10,s),a!==o.end&&n<a?e*=Math.pow(10,o.end-n-1):e*=Math.pow(10,o.end-n),l+=e;var c=(l/=Math.pow(10,s)).toFixed(s),d=new m(t,o.start,t,o.end);this.session.replace(d,c),this.moveCursorTo(t,Math.max(o.start+1,n+c.length-o.value.length))}}else this.toggleWord()},e.prototype.toggleWord=function(){var e=this.selection.getCursor().row,t=this.selection.getCursor().column;this.selection.selectWord();var n=this.getSelectedText(),r=this.selection.getWordRange().start.column,i=n.replace(/([a-z]+|[A-Z]+)(?=[A-Z_]|$)/g,"$1 ").split(/\s/),o=t-r-1;o<0&&(o=0);var s=0,l=0,c=this;n.match(/[A-Za-z0-9_]+/)&&i.forEach(function(t,i){l=s+t.length,o>=s&&o<=l&&(n=t,c.selection.clearSelection(),c.moveCursorTo(e,s+r),c.selection.selectTo(e,l+r)),s=l});for(var d,u=this.$toggleWordPairs,p=0;p<u.length;p++)for(var h=u[p],m=0;m<=1;m++){var f=+!m,g=n.match(new RegExp("^\\s?_?("+a.escapeRegExp(h[m])+")\\s?$","i"));if(g)n.match(new RegExp("([_]|^|\\s)("+a.escapeRegExp(g[1])+")($|\\s)","g"))&&(d=n.replace(new RegExp(a.escapeRegExp(h[m]),"i"),function(e){var t=h[f];return e.toUpperCase()==e?t=t.toUpperCase():e.charAt(0).toUpperCase()==e.charAt(0)&&(t=t.substr(0,0)+h[f].charAt(0).toUpperCase()+t.substr(1)),t}),this.insert(d),d="")}},e.prototype.findLinkAt=function(e,t){var n,i,o=this.session.getLine(e).split(/((?:https?|ftp):\/\/[\S]+)/),a=t;a<0&&(a=0);var s,l=0,c=0;try{for(var d=r(o),u=d.next();!u.done;u=d.next()){var p=u.value;if(c=l+p.length,a>=l&&a<=c&&p.match(/((?:https?|ftp):\/\/[\S]+)/)){s=p.replace(/[\s:.,'";}\]]+$/,"");break}l=c}}catch(h){n={error:h}}finally{try{u&&!u.done&&(i=d.return)&&i.call(d)}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(),r=e.isBackwards();if(n.isEmpty()){var i=n.start.row;t.duplicateLines(i,i)}else{var o=r?n.start:n.end,a=t.insert(o,t.getTextRange(n));n.start=o,n.end=a,e.setSelectionRange(n,r)}},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,r,i=this.selection;if(!i.inMultiSelectMode||this.inVirtualSelectionMode){var o=i.toOrientedRange();n=this.$getSelectedRows(o),r=this.session.$moveLines(n.first,n.last,t?0:e),t&&-1==e&&(r=0),o.moveBy(r,0),i.fromOrientedRange(o)}else{var a=i.rangeList.ranges;i.rangeList.detach(this.session),this.inVirtualSelectionMode=!0;for(var s=0,l=0,c=a.length,d=0;d<c;d++){var u=d;a[d].moveBy(s,0);for(var p=(n=this.$getSelectedRows(a[d])).first,h=n.last;++d<c;){l&&a[d].moveBy(l,0);var m=this.$getSelectedRows(a[d]);if(t&&m.first!=h)break;if(!t&&m.first>h+1)break;h=m.last}for(d--,s=this.session.$moveLines(p,h,t?0:e),t&&-1==e&&(u=d+1);u<=d;)a[u].moveBy(s,0),u++;t||(s=0),l+=s}i.fromOrientedRange(i.ranges[0]),i.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,r=this.renderer.layerConfig,i=e*Math.floor(r.height/r.lineHeight);!0===t?this.selection.$moveSelection(function(){this.moveCursorBy(i,0)}):!1===t&&(this.selection.moveCursorBy(i,0),this.selection.clearSelection());var o=n.scrollTop;n.scrollBy(0,i*r.lineHeight),null!=t&&n.scrollCursorIntoView(null,.5),n.animateScrolling(o)},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,r){this.renderer.scrollToLine(e,t,n,r)},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(),r=new y(this.session,n.row,n.column),i=r.getCurrentToken(),o=0;i&&-1!==i.type.indexOf("tag-name")&&(i=r.stepBackward());var a=i||r.stepForward();if(a){var s,l,c=!1,d={},u=n.column-a.start,p={")":"(","(":"(","]":"[","[":"[","{":"{","}":"{"};do{if(a.value.match(/[{}()\[\]]/g)){for(;u<a.value.length&&!c;u++)if(p[a.value[u]])switch(l=p[a.value[u]]+"."+a.type.replace("rparen","lparen"),isNaN(d[l])&&(d[l]=0),a.value[u]){case"(":case"[":case"{":d[l]++;break;case")":case"]":case"}":d[l]--,-1===d[l]&&(s="bracket",c=!0)}}else-1!==a.type.indexOf("tag-name")&&(isNaN(d[a.value])&&(d[a.value]=0),"<"===i.value&&o>1?d[a.value]++:"</"===i.value&&d[a.value]--,-1===d[a.value]&&(s="tag",c=!0));c||(i=a,o++,a=r.stepForward(),u=0)}while(a&&!c);if(s){var h,f;if("bracket"===s)(h=this.session.getBracketRange(n))||(f=(h=new m(r.getCurrentTokenRow(),r.getCurrentTokenColumn()+u-1,r.getCurrentTokenRow(),r.getCurrentTokenColumn()+u-1)).start,(t||f.row===n.row&&Math.abs(f.column-n.column)<2)&&(h=this.session.getBracketRange(f)));else if("tag"===s){if(!a||-1===a.type.indexOf("tag-name"))return;if(0===(h=new m(r.getCurrentTokenRow(),r.getCurrentTokenColumn()-2,r.getCurrentTokenRow(),r.getCurrentTokenColumn()-2)).compare(n.row,n.column)){var g=this.session.getMatchingTags(n);g&&(g.openTag.contains(n.row,n.column)?f=(h=g.closeTag).start:(h=g.openTag,f=g.closeTag.start.row===n.row&&g.closeTag.start.column===n.column?h.end:h.start))}f=f||h.start}(f=h&&h.cursor||f)&&(e?h&&t?this.selection.setRange(h):h&&h.isEqual(this.getSelectionRange())?this.clearSelection():this.selection.selectTo(f.row,f.column):this.selection.moveTo(f.row,f.column))}}},e.prototype.gotoLine=function(e,t,n){this.selection.clearSelection(),this.session.unfold({row:e-1,column:t||0}),this.exitMultiSelectMode&&this.exitMultiSelectMode(),this.moveCursorTo(e-1,t||0),this.isRowFullyVisible(e-1)||this.scrollToLine(e-1,!0,n)},e.prototype.navigateTo=function(e,t){this.selection.moveTo(e,t)},e.prototype.navigateUp=function(e){if(this.selection.isMultiLine()&&!this.selection.isBackwards()){var t=this.selection.anchor.getPosition();return this.moveCursorToPosition(t)}this.selection.clearSelection(),this.selection.moveCursorBy(-e||-1,0)},e.prototype.navigateDown=function(e){if(this.selection.isMultiLine()&&this.selection.isBackwards()){var t=this.selection.anchor.getPosition();return this.moveCursorToPosition(t)}this.selection.clearSelection(),this.selection.moveCursorBy(e||1,0)},e.prototype.navigateLeft=function(e){if(this.selection.isEmpty())for(e=e||1;e--;)this.selection.moveCursorLeft();else{var t=this.getSelectionRange().start;this.moveCursorToPosition(t)}this.clearSelection()},e.prototype.navigateRight=function(e){if(this.selection.isEmpty())for(e=e||1;e--;)this.selection.moveCursorRight();else{var t=this.getSelectionRange().end;this.moveCursorToPosition(t)}this.clearSelection()},e.prototype.navigateLineStart=function(){this.selection.moveCursorLineStart(),this.clearSelection()},e.prototype.navigateLineEnd=function(){this.selection.moveCursorLineEnd(),this.clearSelection()},e.prototype.navigateFileEnd=function(){this.selection.moveCursorFileEnd(),this.clearSelection()},e.prototype.navigateFileStart=function(){this.selection.moveCursorFileStart(),this.clearSelection()},e.prototype.navigateWordRight=function(){this.selection.moveCursorWordRight(),this.clearSelection()},e.prototype.navigateWordLeft=function(){this.selection.moveCursorWordLeft(),this.clearSelection()},e.prototype.replace=function(e,t){t&&this.$search.set(t);var n=this.$search.find(this.session),r=0;return n?(this.$tryReplace(n,e)&&(r=1),this.selection.setSelectionRange(n),this.renderer.scrollSelectionIntoView(n.start,n.end),r):r},e.prototype.replaceAll=function(e,t){t&&this.$search.set(t);var n=this.$search.findAll(this.session),r=0;if(!n.length)return r;var i=this.getSelectionRange();this.selection.moveTo(0,0);for(var o=n.length-1;o>=0;--o)this.$tryReplace(n[o],e)&&r++;return this.selection.setSelectionRange(i),r},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&&i.mixin(t,e);var r=this.selection.getRange();null==t.needle&&((e=this.session.getTextRange(r)||this.$search.$options.needle)||(r=this.session.getWordRange(r.start.row,r.start.column),e=this.session.getTextRange(r)),this.$search.set({needle:e})),this.$search.set(t),t.start||this.$search.set({start:r});var o=this.$search.find(this.session);return t.preventScroll?o:o?(this.revealRange(o,n),o):(t.backwards?r.start=r.end:r.end=r.start,void this.selection.setRange(r))},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,r=!1;this.$scrollAnchor||(this.$scrollAnchor=document.createElement("div"));var i=this.$scrollAnchor;i.style.cssText="position:absolute",this.container.insertBefore(i,this.container.firstChild);var o=this.on("changeSelection",function(){r=!0}),a=this.renderer.on("beforeRender",function(){r&&(t=n.renderer.container.getBoundingClientRect())}),s=this.renderer.on("afterRender",function(){if(r&&t&&(n.isFocused()||n.searchBox&&n.searchBox.isFocused())){var e=n.renderer,o=e.$cursorLayer.$pixelPos,a=e.layerConfig,s=o.top-a.offset;null!=(r=o.top>=0&&s+t.top<0||!(o.top<a.height&&o.top+t.top+a.lineHeight>window.innerHeight)&&null)&&(i.style.top=s+"px",i.style.left=o.left+"px",i.style.height=a.lineHeight+"px",i.scrollIntoView(r)),r=t=null}});this.setAutoScrollEditorIntoView=function(e){e||(delete this.setAutoScrollEditorIntoView,this.off("changeSelection",o),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,o.setCssClass(t.element,"ace_slim-cursors",/slim/.test(e)))},e.prototype.prompt=function(e,t,n){var r=this;x.loadModule("ace/ext/prompt",function(i){i.prompt(r,e,t,n)})},e}();A.$uid=0,A.prototype.curOp=null,A.prototype.prevOp={},A.prototype.$mergeableCommands=["backspace","del","insertstring"],A.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"],["&&","||"],["==","!="]],i.implement(A.prototype,f),x.defineOptions(A.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 S);var r=o.createElement("div");r.textContent=j("editor.tooltip.disable-editing","Editing is disabled"),t.hoverTooltip.isOpen||t.hoverTooltip.showForRange(t,t.getSelectionRange(),r)}else t.hoverTooltip&&t.hoverTooltip.isOpen&&t.hoverTooltip.hide()});var n=this.textInput.getElement();e?(w.addListener(n,"keydown",this.$readOnlyCallback,this),this.commands.on("exec",this.$readOnlyCallback),this.commands.on("commandUnavailable",this.$readOnlyCallback)):(w.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?k.attach(this):k.detach(this)},initialValue:!0},relativeLineNumbers:{set:function(e){this.$showLineNumbers&&e?k.attach(this):k.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),o.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),o.addCssClass(this.container,"ace_hasPlaceholder");var t=o.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},r=function(e){if(e.target==this.renderer.scroller&&e.keyCode===C.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",j("editor.scroller.aria-roledescription","editor")),this.renderer.scroller.classList.add(this.renderer.keyboardFocusClassName),this.renderer.scroller.setAttribute("aria-label",j("editor.scroller.aria-label","Editor content, press Enter to start editing, press Escape to exit")),this.renderer.scroller.addEventListener("keyup",r.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",j("editor.gutter.aria-roledescription","editor gutter")),this.renderer.$gutter.setAttribute("aria-label",j("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 b(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",r.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 k={getText:function(e,t){return(Math.abs(e.selection.lead.row-t)||t+1+(t<9?"\xb7":""))+""},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=A}),ace.define("ace/layer/lines",["require","exports","module","ace/lib/dom"],function(e,t,n){"use strict";var r=e("../lib/dom"),i=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){r.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 r=t.firstRowScreen*t.lineHeight,i=Math.floor(r/this.canvasHeight);return n.documentToScreenRow(e,0)*t.lineHeight-i*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=r.createFragment(this.element),n=0;n<e.length;n++)t.appendChild(e[n].element);this.element.appendChild(t)}else this.cells.push(e),this.element.appendChild(e.element)},e.prototype.unshift=function(e){if(Array.isArray(e)){this.cells.unshift.apply(this.cells,e);for(var t=r.createFragment(this.element),n=0;n<e.length;n++)t.appendChild(e[n].element);this.element.firstChild?this.element.insertBefore(t,this.element.firstChild):this.element.appendChild(t)}else this.cells.unshift(e),this.element.insertAdjacentElement("afterbegin",e.element)},e.prototype.last=function(){return this.cells.length?this.cells[this.cells.length-1]:null},e.prototype.$cacheCell=function(e){e&&(e.element.remove(),this.cellCache.push(e))},e.prototype.createCell=function(e,t,n,i){var o=this.cellCache.pop();if(!o){var a=r.createElement("div");i&&i(a),this.element.appendChild(a),o={element:a,text:"",row:e}}return o.row=e,o},e}();t.Lines=i}),ace.define("ace/layer/gutter",["require","exports","module","ace/lib/dom","ace/lib/oop","ace/lib/lang","ace/lib/event_emitter","ace/layer/lines","ace/config"],function(e,t,n){"use strict";var r=e("../lib/dom"),i=e("../lib/oop"),o=e("../lib/lang"),a=e("../lib/event_emitter").EventEmitter,s=e("./lines").Lines,l=e("../config").nls,c=function(){function e(e){this.element=r.createElement("div"),this.element.className="ace_layer ace_gutter-layer",e.appendChild(this.element),this.setShowFoldWidgets(this.$showFoldWidgets),this.gutterWidth=0,this.$annotations=[],this.$updateAnnotations=this.$updateAnnotations.bind(this),this.$lines=new s(this.element),this.$lines.$offsetCoefficient=1}return e.prototype.setSession=function(e){this.session&&this.session.off("change",this.$updateAnnotations),this.session=e,e&&e.on("change",this.$updateAnnotations)},e.prototype.addGutterDecoration=function(e,t){window.console&&console.warn&&console.warn("deprecated use session.addGutterDecoration"),this.session.addGutterDecoration(e,t)},e.prototype.removeGutterDecoration=function(e,t){window.console&&console.warn&&console.warn("deprecated use session.removeGutterDecoration"),this.session.removeGutterDecoration(e,t)},e.prototype.setAnnotations=function(e){this.$annotations=[];for(var t=0;t<e.length;t++){var n=e[t],r=n.row,i=this.$annotations[r];i||(i=this.$annotations[r]={text:[],type:[],displayText:[]});var a=n.text,s=n.text,l=n.type;a=a?o.escapeHTML(a):n.html||"",s=s||(n.html||""),-1===i.text.indexOf(a)&&(i.text.push(a),i.type.push(l),i.displayText.push(s));var c=n.className;c?i.className=c:"error"===l?i.className=" ace_error":"security"!==l||/\bace_error\b/.test(i.className)?"warning"!==l||/\bace_(error|security)\b/.test(i.className)?"info"!==l||i.className?"hint"!==l||i.className||(i.className=" ace_hint"):i.className=" ace_info":i.className=" ace_warning":i.className=" ace_security"}},e.prototype.$updateAnnotations=function(e){if(this.$annotations.length){var t=e.start.row,n=e.end.row-t;if(0===n);else if("remove"==e.action)this.$annotations.splice(t,n+1,null);else{var r=new Array(n+1);r.unshift(t,1),this.$annotations.splice.apply(this.$annotations,r)}}},e.prototype.update=function(e){this.config=e;var t=this.session,n=e.firstRow,r=Math.min(e.lastRow+e.gutterOffset,t.getLength()-1);this.oldLastRow=r,this.config=e,this.$lines.moveContainer(e),this.$updateCursorRow();for(var i=t.getNextFoldLine(n),o=i?i.start.row:1/0,a=null,s=-1,l=n;;){if(l>o&&(l=i.end.row+1,o=(i=t.getNextFoldLine(l,i))?i.start.row:1/0),l>r){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,d),this.$lines.push(a)),this.$renderCell(a,e,i,l),l++}this._signal("afterRender"),this.$updateGutterWidth(e)},e.prototype.$updateGutterWidth=function(e){var t=this.session,n=t.gutterRenderer||this.$renderer,r=t.$firstLineNumber,i=this.$lines.last()?this.$lines.last().text:"";(this.$fixedWidth||t.$useWrapMode)&&(i=t.getLength()+r-1);var o=n?n.getWidth(t,i,e):i.toString().length*e.characterWidth,a=this.$padding||this.$computePadding();(o+=a.left+a.right)===this.gutterWidth||isNaN(o)||(this.gutterWidth=o,this.element.parentNode.style.width=this.element.style.width=Math.ceil(this.gutterWidth)+"px",this._signal("changeGutterWidth",o))},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<t.length;n++){var r=t[n];if(r.row>=this.$cursorRow){if(r.row>this.$cursorRow){var i=this.session.getFoldLine(this.$cursorRow);if(!(n>0&&i&&i.start.row==t[n-1].row))break;r=t[n-1]}r.element.className="ace_gutter-active-line "+r.element.className,this.$cursorCell=r;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),r=this.oldLastRow;if(this.oldLastRow=n,!t||r<e.firstRow)return this.update(e);if(n<t.firstRow)return this.update(e);if(t.firstRow<e.firstRow)for(var i=this.session.getFoldedRowCount(t.firstRow,e.firstRow-1);i>0;i--)this.$lines.shift();if(r>n)for(i=this.session.getFoldedRowCount(n+1,r);i>0;i--)this.$lines.pop();e.firstRow<t.firstRow&&this.$lines.unshift(this.$renderLines(e,e.firstRow,t.firstRow-1)),n>r&&this.$lines.push(this.$renderLines(e,r+1,n)),this.updateLineHighlight(),this._signal("afterRender"),this.$updateGutterWidth(e)},e.prototype.$renderLines=function(e,t,n){for(var r=[],i=t,o=this.session.getNextFoldLine(i),a=o?o.start.row:1/0;i>a&&(i=o.end.row+1,a=(o=this.session.getNextFoldLine(i,o))?o.start.row:1/0),!(i>n);){var s=this.$lines.createCell(i,e,this.session,d);this.$renderCell(s,e,o,i),r.push(s),i++}return r},e.prototype.$renderCell=function(e,t,n,i){var o=e.element,a=this.session,s=o.childNodes[0],c=o.childNodes[1],d=o.childNodes[2],u=o.childNodes[3],p=d.firstChild,h=a.$firstLineNumber,m=a.$breakpoints,f=a.$decorations,g=a.gutterRenderer||this.$renderer,v=this.$showFoldWidgets&&a.foldWidgets,x=n?n.start.row:Number.MAX_VALUE,y=t.lineHeight+"px",b=this.$useSvgGutterIcons?"ace_gutter-cell_svg-icons ":"ace_gutter-cell ",j=this.$useSvgGutterIcons?"ace_icon_svg":"ace_icon",_=(g?g.getText(a,i):i+h).toString();if(this.$highlightGutterLine&&(i==this.$cursorRow||n&&i<this.$cursorRow&&i>=x&&this.$cursorRow<=n.end.row)&&(b+="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[i]&&(b+=m[i]),f[i]&&(b+=f[i]),this.$annotations[i]&&i!==x&&(b+=this.$annotations[i].className),v){var C=v[i];null==C&&(C=v[i]=a.getFoldWidget(i))}if(C){var w="ace_fold-widget ace_"+C,S="start"==C&&i==x&&i<n.end.row;if(S){w+=" ace_closed";for(var A="",k=!1,T=i+1;T<=n.end.row;T++)if(this.$annotations[T]){if(" ace_error"===this.$annotations[T].className){k=!0,A=" ace_error_fold";break}" ace_security"===this.$annotations[T].className?(k=!0,A=" ace_security_fold"):" ace_warning"===this.$annotations[T].className&&" ace_security_fold"!==A&&(k=!0,A=" ace_warning_fold")}b+=A}else w+=" ace_open";c.className!=w&&(c.className=w),r.setStyle(c.style,"height",y),r.setStyle(c.style,"display","inline-block"),c.setAttribute("role","button"),c.setAttribute("tabindex","-1");var E=a.getFoldWidgetRange(i);E?c.setAttribute("aria-label",l("gutter.code-folding.range.aria-label","Toggle code folding, rows $0 through $1",[E.start.row+1,E.end.row+1])):n?c.setAttribute("aria-label",l("gutter.code-folding.closed.aria-label","Toggle code folding, rows $0 through $1",[n.start.row+1,n.end.row+1])):c.setAttribute("aria-label",l("gutter.code-folding.open.aria-label","Toggle code folding, row $0",[i+1])),S?(c.setAttribute("aria-expanded","false"),c.setAttribute("title",l("gutter.code-folding.closed.title","Unfold code"))):(c.setAttribute("aria-expanded","true"),c.setAttribute("title",l("gutter.code-folding.open.title","Fold code")))}else c&&(r.setStyle(c.style,"display","none"),c.setAttribute("tabindex","0"),c.removeAttribute("role"),c.removeAttribute("aria-label"));var M=this.session.$gutterCustomWidgets[i];if(M?this.$addCustomWidget(i,M,e):u&&this.$removeCustomWidget(i,e),k&&this.$showFoldedAnnotations){switch(d.className="ace_gutter_annotation",p.className=j,p.className+=A,r.setStyle(p.style,"height",y),r.setStyle(d.style,"display","block"),r.setStyle(d.style,"height",y),A){case" ace_error_fold":O=l("gutter.annotation.aria-label.error","Error, read annotations row $0",[_]);break;case" ace_security_fold":O=l("gutter.annotation.aria-label.security","Security finding, read annotations row $0",[_]);break;case" ace_warning_fold":O=l("gutter.annotation.aria-label.warning","Warning, read annotations row $0",[_])}d.setAttribute("aria-label",O),d.setAttribute("tabindex","-1"),d.setAttribute("role","button")}else if(this.$annotations[i]){var O;switch(d.className="ace_gutter_annotation",p.className=j,this.$useSvgGutterIcons?p.className+=this.$annotations[i].className:o.classList.add(this.$annotations[i].className.replace(" ","")),r.setStyle(p.style,"height",y),r.setStyle(d.style,"display","block"),r.setStyle(d.style,"height",y),this.$annotations[i].className){case" ace_error":O=l("gutter.annotation.aria-label.error","Error, read annotations row $0",[_]);break;case" ace_security":O=l("gutter.annotation.aria-label.security","Security finding, read annotations row $0",[_]);break;case" ace_warning":O=l("gutter.annotation.aria-label.warning","Warning, read annotations row $0",[_]);break;case" ace_info":O=l("gutter.annotation.aria-label.info","Info, read annotations row $0",[_]);break;case" ace_hint":O=l("gutter.annotation.aria-label.hint","Suggestion, read annotations row $0",[_])}d.setAttribute("aria-label",O),d.setAttribute("tabindex","-1"),d.setAttribute("role","button")}else r.setStyle(d.style,"display","none"),d.removeAttribute("aria-label"),d.removeAttribute("role"),d.setAttribute("tabindex","0");return _!==s.data&&(s.data=_),o.className!=b&&(o.className=b),r.setStyle(e.element.style,"height",this.$lines.computeLineHeight(i,t,a)+"px"),r.setStyle(e.element.style,"top",this.$lines.computeLineTop(i,t,a)+"px"),e.text=_,"none"!==d.style.display||"none"!==c.style.display||M?e.element.setAttribute("aria-hidden",!1):e.element.setAttribute("aria-hidden",!0),e},e.prototype.setHighlightGutterLine=function(e){this.$highlightGutterLine=e},e.prototype.setShowLineNumbers=function(e){this.$renderer=!e&&{getWidth:function(){return 0},getText:function(){return""}}},e.prototype.getShowLineNumbers=function(){return this.$showLineNumbers},e.prototype.setShowFoldWidgets=function(e){e?r.addCssClass(this.element,"ace_folding-enabled"):r.removeCssClass(this.element,"ace_folding-enabled"),this.$showFoldWidgets=e,this.$padding=null},e.prototype.getShowFoldWidgets=function(){return this.$showFoldWidgets},e.prototype.$hideFoldWidget=function(e,t){var n=t||this.$getGutterCell(e);if(n&&n.element){var i=n.element.childNodes[1];i&&r.setStyle(i.style,"display","none")}},e.prototype.$showFoldWidget=function(e,t){var n=t||this.$getGutterCell(e);if(n&&n.element){var i=n.element.childNodes[1];i&&this.session.foldWidgets&&this.session.foldWidgets[n.row]&&r.setStyle(i.style,"display","inline-block")}},e.prototype.$getGutterCell=function(e){var t=this.$lines.cells,n=this.session.documentToScreenRow(e,0);return t[e-this.config.firstRowScreen-(e-n)]},e.prototype.$addCustomWidget=function(e,t,n){var i=t.className,o=t.label,a=t.title,s=t.callbacks;this.session.$gutterCustomWidgets[e]={className:i,label:o,title:a,callbacks:s},this.$hideFoldWidget(e,n);var l=n||this.$getGutterCell(e);if(l&&l.element){var c=l.element.querySelector(".ace_custom-widget");c&&c.remove(),(c=r.createElement("span")).className="ace_custom-widget ".concat(i),c.setAttribute("tabindex","-1"),c.setAttribute("role","button"),c.setAttribute("aria-label",o),c.setAttribute("title",a),r.setStyle(c.style,"display","inline-block"),r.setStyle(c.style,"height","inherit"),s&&s.onClick&&c.addEventListener("click",function(t){s.onClick(t,e),t.stopPropagation()}),l.element.appendChild(c)}},e.prototype.$removeCustomWidget=function(e,t){delete this.session.$gutterCustomWidgets[e],this.$showFoldWidget(e,t);var n=t||this.$getGutterCell(e);if(n&&n.element){var r=n.element.querySelector(".ace_custom-widget");r&&n.element.removeChild(r)}},e.prototype.$computePadding=function(){if(!this.element.firstChild)return{left:0,right:0};var e=r.computedStyle(this.element.firstChild);return this.$padding={},this.$padding.left=(parseInt(e.borderLeftWidth)||0)+(parseInt(e.paddingLeft)||0)+1,this.$padding.right=(parseInt(e.borderRightWidth)||0)+(parseInt(e.paddingRight)||0),this.$padding},e.prototype.getRegion=function(e){var t=this.$padding||this.$computePadding(),n=this.element.getBoundingClientRect();return e.x<t.left+n.left?"markers":this.$showFoldWidgets&&e.x>n.right-t.right?"foldWidgets":void 0},e}();function d(e){var t=document.createTextNode("");e.appendChild(t);var n=r.createElement("span");e.appendChild(n);var i=r.createElement("span");e.appendChild(i);var o=r.createElement("span");return i.appendChild(o),e}c.prototype.$fixedWidth=!1,c.prototype.$highlightGutterLine=!0,c.prototype.$renderer="",c.prototype.$showLineNumbers=!0,c.prototype.$showFoldWidgets=!0,i.implement(c.prototype,a),t.Gutter=c}),ace.define("ace/layer/marker",["require","exports","module","ace/range","ace/lib/dom"],function(e,t,n){"use strict";var r=e("../range").Range,i=e("../lib/dom"),o=function(){function e(e){this.element=i.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 r=this.markers[n];if(r.range){var i=r.range.clipRows(e.firstRow,e.lastRow);if(!i.isEmpty())if(i=i.toScreenRange(this.session),r.renderer){var o=this.$getTop(i.start.row,e),a=this.$padding+i.start.column*e.characterWidth;r.renderer(t,i,a,o,e)}else"fullLine"==r.type?this.drawFullLineMarker(t,i,r.clazz,e):"screenLine"==r.type?this.drawScreenLineMarker(t,i,r.clazz,e):i.isMultiLine()?"text"==r.type?this.drawTextMarker(t,i,r.clazz,e):this.drawMultiLineMarker(t,i,r.clazz,e):this.drawSingleLineMarker(t,i,r.clazz+" ace_start ace_br15",e)}else r.update(t,this,this.session,e)}if(-1!=this.i)for(;this.i<this.element.childElementCount;)this.element.removeChild(this.element.lastChild)}},e.prototype.$getTop=function(e,t){return(e-t.firstRowScreen)*t.lineHeight},e.prototype.drawTextMarker=function(e,t,n,i,o){for(var s=this.session,l=t.start.row,c=t.end.row,d=l,u=0,p=0,h=s.getScreenLastRowColumn(d),m=new r(d,t.start.column,d,p);d<=c;d++)m.start.row=m.end.row=d,m.start.column=d==l?t.start.column:s.getRowWrapIndent(d),m.end.column=h,u=p,p=h,h=d+1<c?s.getScreenLastRowColumn(d+1):d==c?0:t.end.column,this.drawSingleLineMarker(e,m,n+(d==l?" ace_start":"")+" ace_br"+a(d==l||d==l+1&&t.start.column,u<p,p>h,d==c),i,d==c?0:1,o)},e.prototype.drawMultiLineMarker=function(e,t,n,r,i){var o=this.$padding,a=r.lineHeight,s=this.$getTop(t.start.row,r),l=o+t.start.column*r.characterWidth;(i=i||"",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",r,null,i)):this.elt(n+" ace_br1 ace_start","height:"+a+"px;right:"+o+"px;top:"+s+"px;left:"+l+"px;"+(i||""));if(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",r,null,i)}else{s=this.$getTop(t.end.row,r);var d=t.end.column*r.characterWidth;this.elt(n+" ace_br12","height:"+a+"px;width:"+d+"px;top:"+s+"px;left:"+o+"px;"+(i||""))}if(!((a=(t.end.row-t.start.row-1)*r.lineHeight)<=0)){s=this.$getTop(t.start.row+1,r);var u=(t.start.column?1:0)|(t.end.column?0:8);this.elt(n+(u?" ace_br"+u:""),"height:"+a+"px;right:"+o+"px;top:"+s+"px;left:"+o+"px;"+(i||""))}},e.prototype.drawSingleLineMarker=function(e,t,n,r,i,o){if(this.session.$bidiHandler.isBidiRow(t.start.row))return this.drawBidiSingleLineMarker(e,t,n,r,i,o);var a=r.lineHeight,s=(t.end.column+(i||0)-t.start.column)*r.characterWidth,l=this.$getTop(t.start.row,r),c=this.$padding+t.start.column*r.characterWidth;this.elt(n,"height:"+a+"px;width:"+s+"px;top:"+l+"px;left:"+c+"px;"+(o||""))},e.prototype.drawBidiSingleLineMarker=function(e,t,n,r,i,o){var a=r.lineHeight,s=this.$getTop(t.start.row,r),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+(i||0))+"px;top:"+s+"px;left:"+(l+e.left)+"px;"+(o||""))},this)},e.prototype.drawFullLineMarker=function(e,t,n,r,i){var o=this.$getTop(t.start.row,r),a=r.lineHeight;t.start.row!=t.end.row&&(a+=this.$getTop(t.end.row,r)-o),this.elt(n,"height:"+a+"px;top:"+o+"px;left:0;right:0;"+(i||""))},e.prototype.drawScreenLineMarker=function(e,t,n,r,i){var o=this.$getTop(t.start.row,r),a=r.lineHeight;this.elt(n,"height:"+a+"px;top:"+o+"px;left:0;right:0;"+(i||""))},e}();function a(e,t,n,r){return(e?1:0)|(t?2:0)|(n?4:0)|(r?8:0)}o.prototype.$padding=0,t.Marker=o}),ace.define("ace/layer/text_util",["require","exports","module"],function(e,t,n){var r=new Set(["text","rparen","lparen"]);t.isTextToken=function(e){return r.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){"use strict";var r=e("../lib/oop"),i=e("../lib/dom"),o=e("../lib/lang"),a=e("./lines").Lines,s=e("../lib/event_emitter").EventEmitter,l=e("../config").nls,c=e("./text_util").isTextToken,d=function(){function e(e){this.dom=i,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;n<e+1;n++){if(this.showTabs)(r=this.dom.createElement("span")).className="ace_invisible ace_invisible_tab",r.textContent=o.stringRepeat(this.TAB_CHAR,n),t.push(r);else t.push(this.dom.createTextNode(o.stringRepeat(" ",n),this.element))}if(this.displayIndentGuides){this.$indentGuideRe=/\s\S| \t|\t |\s$/;var r,i="ace_indent-guide",a=this.showSpaces?" ace_invisible ace_invisible_space":"",s=this.showSpaces?o.stringRepeat(this.SPACE_CHAR,this.tabSize):o.stringRepeat(" ",this.tabSize),l=this.showTabs?" ace_invisible ace_invisible_tab":"",c=this.showTabs?o.stringRepeat(this.TAB_CHAR,this.tabSize):s;(r=this.dom.createElement("span")).className=i+a,r.textContent=s,this.$tabStrings[" "]=r,(r=this.dom.createElement("span")).className=i+l,r.textContent=c,this.$tabStrings["\t"]=r}},e.prototype.updateLines=function(e,t,n){if(this.config.lastRow!=e.lastRow||this.config.firstRow!=e.firstRow)return this.update(e);this.config=e;for(var r=Math.max(t,e.firstRow),i=Math.min(n,e.lastRow),o=this.element.childNodes,a=0,s=e.firstRow;s<r;s++){if(l=this.session.getFoldLine(s)){if(l.containsRow(r)){r=l.start.row;break}s=l.end.row}a++}for(var l,c=!1,d=(s=r,(l=this.session.getNextFoldLine(s))?l.start.row:1/0);s>d&&(s=l.end.row+1,d=(l=this.session.getNextFoldLine(s,l))?l.start.row:1/0),!(s>i);){var u=o[a++];if(u){this.dom.removeChildren(u),this.$renderLine(u,s,s==d&&l),c&&(u.style.top=this.$lines.computeLineTop(s,e,this.session)+"px");var p=e.lineHeight*this.session.getRowLength(s)+"px";u.style.height!=p&&(c=!0,u.style.height=p)}s++}if(c)for(;a<this.$lines.cells.length;){var h=this.$lines.cells[a++];h.element.style.top=this.$lines.computeLineTop(h.row,e,this.session)+"px"}},e.prototype.scrollLines=function(e){var t=this.config;if(this.config=e,this.$lines.pageChanged(t,e))return this.update(e);this.$lines.moveContainer(e);var n=e.lastRow,r=t?t.lastRow:-1;if(!t||r<e.firstRow)return this.update(e);if(n<t.firstRow)return this.update(e);if(!t||t.lastRow<e.firstRow)return this.update(e);if(e.lastRow<t.firstRow)return this.update(e);if(t.firstRow<e.firstRow)for(var i=this.session.getFoldedRowCount(t.firstRow,e.firstRow-1);i>0;i--)this.$lines.shift();if(t.lastRow>e.lastRow)for(i=this.session.getFoldedRowCount(e.lastRow+1,t.lastRow);i>0;i--)this.$lines.pop();e.firstRow<t.firstRow&&this.$lines.unshift(this.$renderLinesFragment(e,e.firstRow,t.firstRow-1)),e.lastRow>t.lastRow&&this.$lines.push(this.$renderLinesFragment(e,t.lastRow+1,e.lastRow)),this.$highlightIndentGuide()},e.prototype.$renderLinesFragment=function(e,t,n){for(var r=[],o=t,a=this.session.getNextFoldLine(o),s=a?a.start.row:1/0;o>s&&(o=a.end.row+1,s=(a=this.session.getNextFoldLine(o,a))?a.start.row:1/0),!(o>n);){var l=this.$lines.createCell(o,e,this.session),c=l.element;this.dom.removeChildren(c),i.setStyle(c.style,"height",this.$lines.computeLineHeight(o,e,this.session)+"px"),i.setStyle(c.style,"top",this.$lines.computeLineTop(o,e,this.session)+"px"),this.$renderLine(c,o,o==s&&a),this.$useLineGroups()?c.className="ace_line_group":c.className="ace_line",r.push(l),o++}return r},e.prototype.update=function(e){this.$lines.moveContainer(e),this.config=e;for(var t=e.firstRow,n=e.lastRow,r=this.$lines;r.getLength();)r.pop();r.push(this.$renderLinesFragment(e,t,n))},e.prototype.$renderToken=function(e,t,n,r){for(var i,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,d=this.dom.createFragment(this.element),u=0;i=s.exec(r);){var p=i[1],h=i[2],m=i[3],f=i[4],g=i[5];if(a.showSpaces||!h){var v=u!=i.index?r.slice(u,i.index):"";if(u=i.index+i[0].length,v&&d.appendChild(this.dom.createTextNode(v,this.element)),p){var x=a.session.getScreenTabSize(t+i.index),y=a.$tabStrings[x].cloneNode(!0);y.charCount=1,d.appendChild(y),t+=x-1}else if(h){if(a.showSpaces)(j=this.dom.createElement("span")).className="ace_invisible ace_invisible_space",j.textContent=o.stringRepeat(a.SPACE_CHAR,h.length),d.appendChild(j);else d.appendChild(this.dom.createTextNode(h,this.element))}else if(m){(j=this.dom.createElement("span")).className="ace_invisible ace_invisible_space ace_invalid",j.textContent=o.stringRepeat(a.SPACE_CHAR,m.length),d.appendChild(j)}else if(f){t+=1,(j=this.dom.createElement("span")).style.width=2*a.config.characterWidth+"px",j.className=a.showSpaces?"ace_cjk ace_invisible ace_invisible_space":"ace_cjk",j.textContent=a.showSpaces?a.SPACE_CHAR:f,d.appendChild(j)}else if(g){t+=1,(j=this.dom.createElement("span")).style.width=2*a.config.characterWidth+"px",j.className="ace_cjk",j.textContent=g,d.appendChild(j)}}}if(d.appendChild(this.dom.createTextNode(u?r.slice(u):r,this.element)),c(n.type))e.appendChild(d);else{var b="ace_"+n.type.replace(/\./g," ace_"),j=this.dom.createElement("span");"fold"==n.type&&(j.style.width=n.value.length*this.config.characterWidth+"px",j.setAttribute("title",l("inline-fold.closed.title","Unfold code"))),j.className=b,j.appendChild(d),e.appendChild(j)}return t+r.length},e.prototype.renderIndentGuide=function(e,t,n){var r=t.search(this.$indentGuideRe);if(r<=0||r>=n)return t;if(" "==t[0]){for(var i=(r-=r%this.tabSize)/this.tabSize,o=0;o<i;o++)e.appendChild(this.$tabStrings[" "].cloneNode(!0));return this.$highlightIndentGuide(),t.substr(r)}if("\t"==t[0]){for(o=0;o<r;o++)e.appendChild(this.$tabStrings["\t"].cloneNode(!0));return this.$highlightIndentGuide(),t.substr(r)}return this.$highlightIndentGuide(),t},e.prototype.$highlightIndentGuide=function(){if(this.$highlightIndentGuides&&this.displayIndentGuides){this.$highlightIndentGuideMarker={indentLevel:void 0,start:void 0,end:void 0,dir:void 0};var e=this.session.doc.$lines;if(e){var t=this.session.selection.getCursor(),n=/^\s*/.exec(this.session.doc.getLine(t.row))[0].length,r=Math.floor(n/this.tabSize);if(this.$highlightIndentGuideMarker={indentLevel:r,start:t.row},this.session.$bracketHighlight)for(var i=this.session.$bracketHighlight.ranges,o=0;o<i.length;o++)if(t.row!==i[o].start.row){this.$highlightIndentGuideMarker.end=i[o].start.row+1,t.row>i[o].start.row?this.$highlightIndentGuideMarker.dir=-1:this.$highlightIndentGuideMarker.dir=1;break}if(!this.$highlightIndentGuideMarker.end&&""!==e[t.row]&&t.column===e[t.row].length){this.$highlightIndentGuideMarker.dir=1;for(o=t.row+1;o<e.length;o++){var a=e[o],s=/^\s*/.exec(a)[0].length;if(""!==a&&(this.$highlightIndentGuideMarker.end=o,s<=n))break}}this.$renderHighlightIndentGuide()}}},e.prototype.$clearActiveIndentGuide=function(){for(var e=this.element.querySelectorAll(".ace_indent-guide-active"),t=0;t<e.length;t++)e[t].classList.remove("ace_indent-guide-active")},e.prototype.$setIndentGuideActive=function(e,t){if(""!==this.session.doc.getLine(e.row)){var n=e.element;if(e.element.classList&&e.element.classList.contains("ace_line_group")){if(!(e.element.childNodes.length>0))return;n=e.element.childNodes[0]}var r=n.childNodes;if(r){var i=r[t-1];i&&i.classList&&i.classList.contains("ace_indent-guide")&&i.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<e.length;n++){var r=e[n];if(this.$highlightIndentGuideMarker.end&&r.row>=this.$highlightIndentGuideMarker.start+1){if(r.row>=this.$highlightIndentGuideMarker.end)break;this.$setIndentGuideActive(r,t)}}else for(n=e.length-1;n>=0;n--){r=e[n];if(this.$highlightIndentGuideMarker.end&&r.row<this.$highlightIndentGuideMarker.start){if(r.row<this.$highlightIndentGuideMarker.end)break;this.$setIndentGuideActive(r,t)}}}},e.prototype.$createLineElement=function(e){var t=this.dom.createElement("div");return t.className="ace_line",t.style.height=this.config.lineHeight+"px",t},e.prototype.$renderWrappedLine=function(e,t,n){var r=0,i=0,a=n[0],s=0,l=this.$createLineElement();e.appendChild(l);for(var c=0;c<t.length;c++){var d=t[c],u=d.value;if(0==c&&this.displayIndentGuides){if(r=u.length,!(u=this.renderIndentGuide(l,u,a)))continue;r-=u.length}if(r+u.length<a)s=this.$renderToken(l,s,d,u),r+=u.length;else{for(;r+u.length>=a;){s=this.$renderToken(l,s,d,u.substring(0,a-r)),u=u.substring(a-r),r=a,l=this.$createLineElement(),e.appendChild(l);var p=this.dom.createTextNode(o.stringRepeat("\xa0",n.indent),this.element);p.charCount=0,l.appendChild(p),s=0,a=n[++i]||Number.MAX_VALUE}0!=u.length&&(r+=u.length,s=this.$renderToken(l,s,d,u))}}n[n.length-1]>this.MAX_LINE_LENGTH&&this.$renderOverflowMessage(l,s,null,"",!0)},e.prototype.$renderSimpleLine=function(e,t){for(var n=0,r=0;r<t.length;r++){var i=t[r],o=i.value;if(0!=r||!this.displayIndentGuides||(o=this.renderIndentGuide(e,o))){if(n+o.length>this.MAX_LINE_LENGTH)return this.$renderOverflowMessage(e,n,i,o);n=this.$renderToken(e,n,i,o)}}},e.prototype.$renderOverflowMessage=function(e,t,n,r,i){n&&this.$renderToken(e,t,n,r.slice(0,this.MAX_LINE_LENGTH-t));var o=this.dom.createElement("span");o.className="ace_inline_button ace_keyword ace_toggle_wrap",o.textContent=i?"<hide>":"<click to see more...>",e.appendChild(o)},e.prototype.$renderLine=function(e,t,n){if(n||0==n||(n=this.session.getFoldLine(t)),n)var r=this.$getFoldLineTokens(t,n);else r=this.session.getTokens(t);var i=e;if(r.length){var o=this.session.getRowSplitData(t);if(o&&o.length){this.$renderWrappedLine(e,r,o);i=e.lastChild}else{i=e;this.$useLineGroups()&&(i=this.$createLineElement(),e.appendChild(i)),this.$renderSimpleLine(i,r)}}else this.$useLineGroups()&&(i=this.$createLineElement(),e.appendChild(i));if(this.showEOL&&i){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,i.appendChild(a)}},e.prototype.$getFoldLineTokens=function(e,t){var n=this.session,r=[];var i=n.getTokens(e);return t.walk(function(e,t,o,a,s){null!=e?r.push({type:"fold",value:e}):(s&&(i=n.getTokens(t)),i.length&&function(e,t,n){for(var i=0,o=0;o+e[i].value.length<t;)if(o+=e[i].value.length,++i==e.length)return;for(o!=t&&((a=e[i].value.substring(t-o)).length>n-t&&(a=a.substring(0,n-t)),r.push({type:e[i].type,value:a}),o=t+a.length,i+=1);o<n&&i<e.length;){var a;(a=e[i].value).length+o>n?r.push({type:e[i].type,value:a.substring(0,n-o)}):r.push(e[i]),o+=a.length,i+=1}}(i,a,o))},t.end.row,this.session.getLine(t.end.row).length),r},e.prototype.$useLineGroups=function(){return this.session.getUseWrapMode()},e}();d.prototype.EOF_CHAR="\xb6",d.prototype.EOL_CHAR_LF="\xac",d.prototype.EOL_CHAR_CRLF="\xa4",d.prototype.EOL_CHAR=d.prototype.EOL_CHAR_LF,d.prototype.TAB_CHAR="\u2014",d.prototype.SPACE_CHAR="\xb7",d.prototype.$padding=0,d.prototype.MAX_LINE_LENGTH=1e4,d.prototype.showInvisibles=!1,d.prototype.showSpaces=!1,d.prototype.showTabs=!1,d.prototype.showEOL=!1,d.prototype.displayIndentGuides=!0,d.prototype.$highlightIndentGuides=!0,d.prototype.$tabStrings=[],d.prototype.destroy={},d.prototype.onChangeTabSize=d.prototype.$computeTabString,r.implement(d.prototype,s),t.Text=d}),ace.define("ace/layer/cursor",["require","exports","module","ace/lib/dom"],function(e,t,n){"use strict";var r=e("../lib/dom"),i=function(){function e(e){this.element=r.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(),r.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--;)r.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&&r.addCssClass(this.element,"ace_animate-blinking")}.bind(this))},e.prototype.$stopCssAnimation=function(){this.$isAnimating=!1,r.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,r.setCssClass(this.element,"ace_smooth-blinking",e),this.$updateCursors(!0),this.restartTimer())},e.prototype.addCursor=function(){var e=r.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,r.addCssClass(this.element,"ace_hidden-cursors"),this.restartTimer()},e.prototype.showCursor=function(){this.isVisible=!0,r.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,r.removeCssClass(this.element,"ace_smooth-blinking")),e(!0),this.isBlinking&&this.blinkInterval&&this.isVisible)if(this.smoothBlinking&&(this.$isSmoothBlinking=!0,setTimeout(function(){this.$isSmoothBlinking&&r.addCssClass(this.element,"ace_smooth-blinking")}.bind(this))),r.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.top<t.maxHeight},e.prototype.update=function(e){this.config=e;var t=this.session.$selectionMarkers,n=0,i=0;void 0!==t&&0!==t.length||(t=[{cursor:null}]);n=0;for(var o=t.length;n<o;n++){var a=this.getPixelPosition(t[n].cursor,!0);if(!((a.top>e.height+e.offset||a.top<0)&&n>1)){var s=this.cursors[i++]||this.addCursor(),l=s.style;this.drawCursor?this.drawCursor(s,a,e,t[n],this.session):this.isCursorInView(a,e)?(r.setStyle(l,"display","block"),r.translate(s,a.left,a.top),r.setStyle(l,"width",Math.round(e.characterWidth)+"px"),r.setStyle(l,"height",e.lineHeight+"px")):r.setStyle(l,"display","none")}}for(;this.cursors.length>i;)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?r.addCssClass(this.element,"ace_overwrite-cursors"):r.removeCssClass(this.element,"ace_overwrite-cursors"))},e.prototype.destroy=function(){clearInterval(this.intervalId),clearTimeout(this.timeoutId)},e}();i.prototype.$padding=0,i.prototype.drawCursor=null,t.Cursor=i}),ace.define("ace/scrollbar",["require","exports","module","ace/lib/oop","ace/lib/dom","ace/lib/event","ace/lib/event_emitter"],function(e,t,n){"use strict";var r=this&&this.__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])},e(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 r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),i=e("./lib/oop"),o=e("./lib/dom"),a=e("./lib/event"),s=e("./lib/event_emitter").EventEmitter,l=32768,c=function(){function e(e,t){this.element=o.createElement("div"),this.element.className="ace_scrollbar ace_scrollbar"+t,this.inner=o.createElement("div"),this.inner.className="ace_scrollbar-inner",this.inner.textContent="\xa0",this.element.appendChild(this.inner),e.appendChild(this.element),this.setVisible(!1),this.skipEvent=!1,a.addListener(this.element,"scroll",this.onScroll.bind(this)),a.addListener(this.element,"mousedown",a.preventDefault)}return e.prototype.setVisible=function(e){this.element.style.display=e?"":"none",this.isVisible=e,this.coeff=1},e}();i.implement(c.prototype,s);var d=function(e){function t(t,n){var r=e.call(this,t,"-v")||this;return r.scrollTop=0,r.scrollHeight=0,n.$scrollbarWidth=r.width=o.scrollbarWidth(t.ownerDocument),r.inner.style.width=r.element.style.width=(r.width||15)+5+"px",r.$minWidth=0,r}return r(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>l?(this.coeff=l/e,e=l):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}(c);d.prototype.setInnerHeight=d.prototype.setScrollHeight;var u=function(e){function t(t,n){var r=e.call(this,t,"-h")||this;return r.scrollLeft=0,r.height=n.$scrollbarWidth,r.inner.style.height=r.element.style.height=(r.height||15)+5+"px",r}return r(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}(c);t.ScrollBar=d,t.ScrollBarV=d,t.ScrollBarH=u,t.VScrollBar=d,t.HScrollBar=u}),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){"use strict";var r=this&&this.__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])},e(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 r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),i=e("./lib/oop"),o=e("./lib/dom"),a=e("./lib/event"),s=e("./lib/event_emitter").EventEmitter;o.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 l=function(){function e(e,t){this.element=o.createElement("div"),this.element.className="ace_sb"+t,this.inner=o.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,a.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}();i.implement(l.prototype,s);var c=function(e){function t(t,n){var r=e.call(this,t,"-v")||this;return r.scrollTop=0,r.scrollHeight=0,r.parent=t,r.width=r.VScrollWidth,r.renderer=n,r.inner.style.width=r.element.style.width=(r.width||15)+"px",r.$minWidth=0,r}return r(t,e),t.prototype.onMouseDown=function(e,t){if("mousedown"===e&&0===a.getButton(t)&&2!==t.detail){if(t.target===this.inner){var n=this,r=t.clientY,i=t.clientY,o=this.thumbTop;a.capture(this.inner,function(e){r=e.clientY},function(){clearInterval(s)});var s=setInterval(function(){if(void 0!==r){var e=n.scrollTopFromThumbTop(o+r-i);e!==n.scrollTop&&n._emit("scroll",{data:e})}},20);return a.preventDefault(t)}var l=t.clientY-this.element.getBoundingClientRect().top-this.thumbHeight/2;return this._emit("scroll",{data:this.scrollTopFromThumbTop(l)}),a.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}(l);c.prototype.setInnerHeight=c.prototype.setScrollHeight;var d=function(e){function t(t,n){var r=e.call(this,t,"-h")||this;return r.scrollLeft=0,r.scrollWidth=0,r.height=r.HScrollHeight,r.inner.style.height=r.element.style.height=(r.height||12)+"px",r.renderer=n,r}return r(t,e),t.prototype.onMouseDown=function(e,t){if("mousedown"===e&&0===a.getButton(t)&&2!==t.detail){if(t.target===this.inner){var n=this,r=t.clientX,i=t.clientX,o=this.thumbLeft;a.capture(this.inner,function(e){r=e.clientX},function(){clearInterval(s)});var s=setInterval(function(){if(void 0!==r){var e=n.scrollLeftFromThumbLeft(o+r-i);e!==n.scrollLeft&&n._emit("scroll",{data:e})}},20);return a.preventDefault(t)}var l=t.clientX-this.element.getBoundingClientRect().left-this.thumbWidth/2;return this._emit("scroll",{data:this.scrollLeftFromThumbLeft(l)}),a.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}(l);d.prototype.setInnerWidth=d.prototype.setScrollWidth,t.ScrollBar=c,t.ScrollBarV=c,t.ScrollBarH=d,t.VScrollBar=c,t.HScrollBar=d}),ace.define("ace/renderloop",["require","exports","module","ace/lib/event"],function(e,t,n){"use strict";var r=e("./lib/event"),i=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&&(r.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&&(r.nextFrame(this._flush),this.pending=!0)},e.prototype.clear=function(e){var t=this.changes;return this.changes=0,t},e}();t.RenderLoop=i}),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 r=e("../lib/oop"),i=e("../lib/dom"),o=e("../lib/lang"),a=e("../lib/event"),s=e("../lib/useragent"),l=e("../lib/event_emitter").EventEmitter,c=512,d="function"==typeof ResizeObserver,u=200,p=function(){function e(e){this.el=i.createElement("div"),this.$setMeasureNodeStyles(this.el.style,!0),this.$main=i.createElement("div"),this.$setMeasureNodeStyles(this.$main.style),this.$measureNode=i.createElement("div"),this.$setMeasureNodeStyles(this.$measureNode.style),this.el.appendChild(this.$main),this.el.appendChild(this.$measureNode),e.appendChild(this.el),this.$measureNode.textContent=o.stringRepeat("X",c),this.$characterSize={width:0,height:0},d?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=o.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=i.buildDom([e(0,0),e(u,0),e(0,u),e(u,u)],this.el)},e.prototype.transformCoordinates=function(e,t){e&&(e=o(1/this.$getZoom(this.el),e));function n(e,t,n){var r=e[1]*t[0]-e[0]*t[1];return[(-t[1]*n[0]+t[0]*n[1])/r,(+e[1]*n[0]-e[0]*n[1])/r]}function r(e,t){return[e[0]-t[0],e[1]-t[1]]}function i(e,t){return[e[0]+t[0],e[1]+t[1]]}function o(e,t){return[e*t[0],e*t[1]]}function a(e){var t=e.getBoundingClientRect();return[t.left,t.top]}this.els||this.$initTransformMeasureNodes();var s=a(this.els[0]),l=a(this.els[1]),c=a(this.els[2]),d=a(this.els[3]),p=n(r(d,l),r(d,c),r(i(l,c),i(d,s))),h=o(1+p[0],r(l,s)),m=o(1+p[1],r(c,s));if(t){var f=t,g=p[0]*f[0]/u+p[1]*f[1]/u+1,v=i(o(f[0],h),o(f[1],m));return i(o(1/g/u,v),s)}var x=r(e,s),y=n(r(h,o(p[0],x)),r(m,o(p[1],x)),x);return o(u,y)},e}();p.prototype.$characterSize={width:0,height:0},r.implement(p.prototype,l),t.FontMetrics=p}),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 &nbsp; 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: "\u21a9";\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){"use strict";var r=e("../lib/dom"),i=e("../lib/oop"),o=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=r.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"),r=this.renderer.session.$annotations;if(n.clearRect(0,0,this.canvas.width,this.canvas.height),r){var i={info:1,warning:2,error:3};r.forEach(function(e){e.priority=i[e.type]||null}),r=r.sort(function(e,t){return e.priority<t.priority?-1:e.priority>t.priority?1:0});for(var o=0;o<r.length;o++){var a=r[o].row,s=this.getVerticalOffsetForRow(a),l=s+this.lineHeight,c=Math.round(this.heightRatio*s),d=Math.round(this.heightRatio*l),u=Math.round((c+d)/2),p=d-u;p<this.halfMinDecorationHeight&&(p=this.halfMinDecorationHeight),u-p<0&&(u=p),u+p>this.canvasHeight&&(u=this.canvasHeight-p);var h=u-p,m=u+p-h;n.fillStyle=t[r[o].type]||null,n.fillRect(0,h,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.maxHeight<this.canvasHeight?this.heightRatio=1:this.heightRatio=this.canvasHeight/this.maxHeight},e.prototype.setZoneWidth=function(){this.oneZoneWidth=this.canvasWidth},e.prototype.destroy=function(){this.canvas.parentNode.removeChild(this.canvas)},e}();i.implement(a.prototype,o),t.Decorator=a}),ace.define("ace/virtual_renderer",["require","exports","module","ace/lib/oop","ace/lib/dom","ace/lib/lang","ace/config","ace/layer/gutter","ace/layer/marker","ace/layer/text","ace/layer/cursor","ace/scrollbar","ace/scrollbar","ace/scrollbar_custom","ace/scrollbar_custom","ace/renderloop","ace/layer/font_metrics","ace/lib/event_emitter","ace/css/editor-css","ace/layer/decorators","ace/lib/useragent","ace/layer/text_util"],function(e,t,n){"use strict";var r=e("./lib/oop"),i=e("./lib/dom"),o=e("./lib/lang"),a=e("./config"),s=e("./layer/gutter").Gutter,l=e("./layer/marker").Marker,c=e("./layer/text").Text,d=e("./layer/cursor").Cursor,u=e("./scrollbar").HScrollBar,p=e("./scrollbar").VScrollBar,h=e("./scrollbar_custom").HScrollBar,m=e("./scrollbar_custom").VScrollBar,f=e("./renderloop").RenderLoop,g=e("./layer/font_metrics").FontMetrics,v=e("./lib/event_emitter").EventEmitter,x=e("./css/editor-css"),y=e("./layer/decorators").Decorator,b=e("./lib/useragent"),j=e("./layer/text_util").isTextToken;i.importCssString(x,"ace_editor.css",!1);var _=function(){function e(e,t){var n=this;this.container=e||i.createElement("div"),i.addCssClass(this.container,"ace_editor"),i.HI_DPI&&i.addCssClass(this.container,"ace_hidpi"),this.setTheme(t),null==a.get("useStrictCSP")&&a.set("useStrictCSP",!1),this.$gutter=i.createElement("div"),this.$gutter.className="ace_gutter",this.container.appendChild(this.$gutter),this.$gutter.setAttribute("aria-hidden","true"),this.scroller=i.createElement("div"),this.scroller.className="ace_scroller",this.container.appendChild(this.scroller),this.content=i.createElement("div"),this.content.className="ace_content",this.scroller.appendChild(this.content),this.$gutterLayer=new s(this.$gutter),this.$gutterLayer.on("changeGutterWidth",this.onGutterResize.bind(this)),this.$markerBack=new l(this.content);var r=this.$textLayer=new c(this.content);this.canvas=r.element,this.$markerFront=new l(this.content),this.$cursorLayer=new d(this.content),this.$horizScroll=!1,this.$vScroll=!1,this.scrollBar=this.scrollBarV=new p(this.container,this),this.scrollBarH=new u(this.container,this),this.scrollBarV.on("scroll",function(e){n.$scrollAnimation||n.session.setScrollTop(e.data-n.scrollMargin.top)}),this.scrollBarH.on("scroll",function(e){n.$scrollAnimation||n.session.setScrollLeft(e.data-n.scrollMargin.left)}),this.scrollTop=0,this.scrollLeft=0,this.cursorPos={row:0,column:0},this.$fontMetrics=new g(this.container),this.$textLayer.$setFontMetrics(this.$fontMetrics),this.$textLayer.on("changeCharacterSize",function(e){n.updateCharacterSize(),n.onResize(!0,n.gutterWidth,n.$size.width,n.$size.height),n._signal("changeCharacterSize",e)}),this.$size={width:0,height:0,scrollerHeight:0,scrollerWidth:0,$dirty:!0},this.layerConfig={width:1,padding:0,firstRow:0,firstRowScreen:0,lastRow:0,lineHeight:0,characterWidth:0,minHeight:1,maxHeight:1,offset:0,height:1,gutterOffset:1},this.scrollMargin={left:0,right:0,top:0,bottom:0,v:0,h:0},this.margin={left:0,right:0,top:0,bottom:0,v:0,h:0},this.$keepTextAreaAtCursor=!b.isIOS,this.$loop=new f(this.$renderChanges.bind(this),this.container.ownerDocument.defaultView),this.$loop.schedule(this.CHANGE_FULL),this.updateCharacterSize(),this.setPadding(4),this.$addResizeObserver(),a.resetOptions(this),a._signal("renderer",this)}return e.prototype.updateCharacterSize=function(){this.$textLayer.allowBoldFonts!=this.$allowBoldFonts&&(this.$allowBoldFonts=this.$textLayer.allowBoldFonts,this.setStyle("ace_nobold",!this.$allowBoldFonts)),this.layerConfig.characterWidth=this.characterWidth=this.$textLayer.getCharacterWidth(),this.layerConfig.lineHeight=this.lineHeight=this.$textLayer.getLineHeight(),this.$updatePrintMargin(),i.setStyle(this.scroller.style,"line-height",this.lineHeight+"px")},e.prototype.setSession=function(e){this.session&&this.session.doc.off("changeNewLineMode",this.onChangeNewLineMode),this.session=e,e&&this.scrollMargin.top&&e.getScrollTop()<=0&&e.setScrollTop(-this.scrollMargin.top),this.$cursorLayer.setSession(e),this.$markerBack.setSession(e),this.$markerFront.setSession(e),this.$gutterLayer.setSession(e),this.$textLayer.setSession(e),e&&(this.$loop.schedule(this.CHANGE_FULL),this.session.$setFontMetrics(this.$fontMetrics),this.scrollBarH.scrollLeft=this.scrollBarV.scrollTop=null,this.onChangeNewLineMode=this.onChangeNewLineMode.bind(this),this.onChangeNewLineMode(),this.session.doc.on("changeNewLineMode",this.onChangeNewLineMode))},e.prototype.updateLines=function(e,t,n){if(void 0===t&&(t=1/0),this.$changedLines?(this.$changedLines.firstRow>e&&(this.$changedLines.firstRow=e),this.$changedLines.lastRow<t&&(this.$changedLines.lastRow=t)):this.$changedLines={firstRow:e,lastRow:t},this.$changedLines.lastRow<this.layerConfig.firstRow){if(!n)return;this.$changedLines.lastRow=this.layerConfig.lastRow}this.$changedLines.firstRow>this.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,r){if(!(this.resizing>2)){this.resizing>0?this.resizing++:this.resizing=e?1:0;var i=this.container;r||(r=i.clientHeight||i.scrollHeight),!r&&this.$maxLines&&this.lineHeight>1&&(i.style.height&&"0px"!=i.style.height||(i.style.height="1px",r=i.clientHeight||i.scrollHeight)),n||(n=i.clientWidth||i.scrollWidth);var o=this.$updateCachedSize(e,t,n,r);if(this.$resizeTimer&&this.$resizeTimer.cancel(),!this.$size.scrollerHeight||!n&&!r)return this.resizing=0;e&&(this.$gutterLayer.$padding=null),e?this.$renderChanges(o|this.$changes,!0):this.$loop.schedule(o|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,r){r-=this.$extraHeight||0;var o=0,a=this.$size,s={width:a.width,height:a.height,scrollerHeight:a.scrollerHeight,scrollerWidth:a.scrollerWidth};if(r&&(e||a.height!=r)&&(a.height=r,o|=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",o|=this.CHANGE_SCROLL),n&&(e||a.width!=n)){o|=this.CHANGE_SIZE,a.width=n,null==t&&(t=this.$showGutter?this.$gutter.offsetWidth:0),this.gutterWidth=t,i.setStyle(this.scrollBarH.element.style,"left",t+"px"),i.setStyle(this.scroller.style,"left",t+this.margin.left+"px"),a.scrollerWidth=Math.max(0,n-t-this.scrollBarV.getWidth()-this.margin.h),i.setStyle(this.$gutter.style,"left",this.margin.left+"px");var l=this.scrollBarV.getWidth()+"px";i.setStyle(this.scrollBarH.element.style,"right",l),i.setStyle(this.scroller.style,"right",l),i.setStyle(this.scroller.style,"bottom",this.scrollBarH.getHeight()),this.scrollBarH.setWidth(a.scrollerWidth),(this.session&&this.session.getUseWrapMode()&&this.adjustWrapLimit()||e)&&(o|=this.CHANGE_FULL)}return a.$dirty=!n||!r,o&&this._signal("resize",s),o},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=i.createElement("div");e.className="ace_layer ace_print-margin-layer",this.$printMarginEl=i.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 r=this.layerConfig,o=n.top,a=n.left;o-=r.offset;var s=t&&t.useTextareaForIME||b.isMobile?this.lineHeight:1;if(o<0||o>r.height-s)i.translate(this.textarea,0,0);else{var l=1,c=this.$size.height-s;if(t)if(t.useTextareaForIME){var d=this.textarea.value;l=this.characterWidth*this.session.$getStringScreenWidth(d)[0]}else o+=this.lineHeight+2;else o+=this.lineHeight;(a-=this.scrollLeft)>this.$size.scrollerWidth-l&&(a=this.$size.scrollerWidth-l),a+=this.gutterWidth+this.margin.left,i.setStyle(e,"height",s+"px"),i.setStyle(e,"width",l+"px"),i.translate(this.textarea,Math.min(a,this.$size.scrollerWidth-l),Math.min(o,c))}}}else i.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,r){var i=this.scrollMargin;i.top=0|e,i.bottom=0|t,i.right=0|r,i.left=0|n,i.v=i.top+i.bottom,i.h=i.left+i.right,i.top&&this.scrollTop<=0&&this.session&&this.session.setScrollTop(-i.top),this.updateFull()},e.prototype.setMargin=function(e,t,n,r){var i=this.margin;i.top=0|e,i.bottom=0|t,i.right=0|r,i.left=0|n,i.v=i.top+i.bottom,i.h=i.left+i.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 r=this.scrollTop+(n.firstRow-Math.max(this.layerConfig.firstRow,0))*this.lineHeight;r>0&&(this.scrollTop=r,e|=this.CHANGE_SCROLL,e|=this.$computeLayerConfig()|this.$loop.clear())}n=this.layerConfig,this.$updateScrollBarV(),e&this.CHANGE_H_SCROLL&&this.$updateScrollBarH(),i.translate(this.content,-this.scrollLeft,-n.offset);var o=n.width+2*this.$padding+"px",a=n.minHeight+"px";i.setStyle(this.content.style,"width",o),i.setStyle(this.content.style,"height",a)}if(e&this.CHANGE_H_SCROLL&&(i.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 r=!(n<=2*this.lineHeight)&&e>t;if(n!=this.desiredHeight||this.$size.height!=this.desiredHeight||r!=this.$vScroll){r!=this.$vScroll&&(this.$vScroll=r,this.scrollBarV.setVisible(r));var i=this.container.clientWidth;this.container.style.height=n+"px",this.$updateCachedSize(!0,this.$gutterWidth,i,n),this.desiredHeight=n,this._signal("autosize")}},e.prototype.$computeLayerConfig=function(){var e=this.session,t=this.$size,n=t.height<=2*this.lineHeight,r=this.session.getScreenLength()*this.lineHeight,i=this.$getLongestLine(),o=!n&&(this.$hScrollBarAlwaysVisible||t.scrollerWidth-i-2*this.$padding<0),a=this.$horizScroll!==o;a&&(this.$horizScroll=o,this.scrollBarH.setVisible(o));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;r+=c;var d=this.scrollMargin;this.session.setScrollTop(Math.max(-d.top,Math.min(this.scrollTop,r-t.scrollerHeight+d.bottom))),this.session.setScrollLeft(Math.max(-d.left,Math.min(this.scrollLeft,i+2*this.$padding-t.scrollerWidth+d.right)));var u=!n&&(this.$vScrollBarAlwaysVisible||t.scrollerHeight-r+c<0||this.scrollTop>d.top),p=s!==u;p&&(this.$vScroll=u,this.scrollBarV.setVisible(u));var h,m,f=this.scrollTop%this.lineHeight,g=Math.ceil(l/this.lineHeight)-1,v=Math.max(0,Math.round((this.scrollTop-f)/this.lineHeight)),x=v+g,y=this.lineHeight;v=e.screenToDocumentRow(v,0);var b=e.getFoldLine(v);b&&(v=b.start.row),h=e.documentToScreenRow(v,0),m=e.getRowLength(v)*y,x=Math.min(e.screenToDocumentRow(x,0),e.getLength()-1),l=t.scrollerHeight+e.getRowLength(x)*y+m,(f=this.scrollTop-h*y)<0&&h>0&&(h=Math.max(0,h+Math.floor(f/y)),f=this.scrollTop-h*y);var j=0;return(this.layerConfig.width!=i||a)&&(j=this.CHANGE_H_SCROLL),(a||p)&&(j|=this.$updateCachedSize(!0,this.gutterWidth,t.width,t.height),this._signal("scrollbarVisibilityChanged"),p&&(i=this.$getLongestLine())),this.layerConfig={width:i,padding:this.$padding,firstRow:v,firstRowScreen:h,lastRow:x,lineHeight:y,characterWidth:this.characterWidth,minHeight:l,maxHeight:r,offset:f,gutterOffset:y?Math.max(0,Math.ceil((f+t.height-t.scrollerHeight)/y)):0,height:this.$size.scrollerHeight},this.session.$bidiHandler&&this.session.$bidiHandler.setContentWidth(i-this.$padding),j},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)&&!(t<n.firstRow))return t===1/0?(this.$showGutter&&this.$gutterLayer.update(n),void this.$textLayer.update(n)):(this.$textLayer.updateLines(n,e,t),!0)}},e.prototype.$getLongestLine=function(){var e=this.session.getScreenWidth();return this.showInvisibles&&!this.session.$useWrapMode&&(e+=1),this.$textLayer&&e>this.$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 r=this.$cursorLayer.getPixelPosition(e),i=r.left,o=r.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>o?(t&&l+a>o+this.lineHeight&&(o-=t*this.$size.scrollerHeight),0===o&&(o=-this.scrollMargin.top),this.session.setScrollTop(o)):l+this.$size.scrollerHeight-s<o+this.lineHeight&&(t&&l+this.$size.scrollerHeight-s<o-this.lineHeight&&(o+=t*this.$size.scrollerHeight),this.session.setScrollTop(o+this.lineHeight+s-this.$size.scrollerHeight));var c=this.scrollLeft,d=2*this.layerConfig.characterWidth;i-d<c?((i-=d)<this.$padding+d&&(i=-this.scrollMargin.left),this.session.setScrollLeft(i)):(i+=d,c+this.$size.scrollerWidth<i+this.characterWidth?this.session.setScrollLeft(Math.round(i+this.characterWidth-this.$size.scrollerWidth)):c<=this.$padding&&i-c<this.characterWidth&&this.session.setScrollLeft(0))}},e.prototype.getScrollTop=function(){return this.session.getScrollTop()},e.prototype.getScrollLeft=function(){return this.session.getScrollLeft()},e.prototype.getScrollTopRow=function(){return this.scrollTop/this.lineHeight},e.prototype.getScrollBottomRow=function(){return Math.max(0,Math.floor((this.scrollTop+this.$size.scrollerHeight)/this.lineHeight)-1)},e.prototype.scrollToRow=function(e){this.session.setScrollTop(e*this.lineHeight)},e.prototype.alignCursor=function(e,t){"number"==typeof e&&(e={row:e,column:0});var n=this.$cursorLayer.getPixelPosition(e),r=this.$size.scrollerHeight-this.lineHeight,i=n.top-r*(t||0);return this.session.setScrollTop(i),i},e.prototype.$calcSteps=function(e,t){var n=0,r=this.STEPS,i=[],o=function(e,t,n){return n*(Math.pow(e-1,3)+1)+t};for(n=0;n<r;++n)i.push(o(n/this.STEPS,e,t-e));return i},e.prototype.scrollToLine=function(e,t,n,r){var i=this.$cursorLayer.getPixelPosition({row:e,column:0}).top;t&&(i-=this.$size.scrollerHeight/2);var o=this.scrollTop;this.session.setScrollTop(i),!1!==n&&this.animateScrolling(o,r)},e.prototype.animateScrolling=function(e,t){var n=this.scrollTop;if(this.$animatedScroll){var r=this;if(e!=n){if(this.$scrollAnimation){var i=this.$scrollAnimation.steps;if(i.length&&(e=i[0])==n)return}var o=r.$calcSteps(e,n);this.$scrollAnimation={from:e,to:n,steps:o},clearInterval(this.$timer),r.session.setScrollTop(o.shift()),r.session.$scrollTop=n,this.$timer=setInterval(function(){if(!r.$stopAnimation)return r.session?void(o.length?(r.session.setScrollTop(o.shift()),r.session.$scrollTop=n):null!=n?(r.session.$scrollTop=-1,r.session.setScrollTop(n),n=null):a()):clearInterval(r.$timer);a()},10)}}function a(){r.$timer=clearInterval(r.$timer),r.$scrollAnimation=null,r.$stopAnimation=!1,t&&t()}},e.prototype.scrollToY=function(e){this.scrollTop!==e&&(this.$loop.schedule(this.CHANGE_SCROLL),this.scrollTop=e)},e.prototype.scrollToX=function(e){this.scrollLeft!==e&&(this.scrollLeft=e),this.$loop.schedule(this.CHANGE_H_SCROLL)},e.prototype.scrollTo=function(e,t){this.session.setScrollTop(t),this.session.setScrollLeft(e)},e.prototype.scrollBy=function(e,t){t&&this.session.setScrollTop(this.session.getScrollTop()+t),e&&this.session.setScrollLeft(this.session.getScrollLeft()+e)},e.prototype.isScrollableBy=function(e,t){return t<0&&this.session.getScrollTop()>=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 r=this.$fontMetrics.transformCoordinates([e,t]);e=r[1]-this.gutterWidth-this.margin.left,t=r[0]}else n=this.scroller.getBoundingClientRect();var i=e+this.scrollLeft-n.left-this.$padding,o=i/this.characterWidth,a=Math.floor((t+this.scrollTop-n.top)/this.lineHeight),s=this.$blockCursor?Math.floor(o):Math.round(o);return{row:a,column:s,side:o-s>0?1:-1,offsetX:i}},e.prototype.screenToTextCoordinates=function(e,t){var n;if(this.$hasCssTransforms){n={top:0,left:0};var r=this.$fontMetrics.transformCoordinates([e,t]);e=r[1]-this.gutterWidth-this.margin.left,t=r[0]}else n=this.scroller.getBoundingClientRect();var i=e+this.scrollLeft-n.left-this.$padding,o=i/this.characterWidth,a=this.$blockCursor?Math.floor(o):Math.round(o),s=Math.floor((t+this.scrollTop-n.top)/this.lineHeight);return this.session.screenToDocumentPosition(s,Math.max(a,0),i)},e.prototype.textToScreenCoordinates=function(e,t){var n=this.scroller.getBoundingClientRect(),r=this.session.documentToScreenPosition(e,t),i=this.$padding+(this.session.$bidiHandler.isBidiRow(r.row,e)?this.session.$bidiHandler.getPosLeft(r.column):Math.round(r.column*this.characterWidth)),o=r.row*this.lineHeight;return{pageX:n.left+i-this.scrollLeft,pageY:n.top+o-this.scrollTop}},e.prototype.visualizeFocus=function(){i.addCssClass(this.container,"ace_focus")},e.prototype.visualizeBlur=function(){i.removeCssClass(this.container,"ace_focus")},e.prototype.showComposition=function(e){this.$composition=e,e.cssText||(e.cssText=this.textarea.style.cssText),void 0==e.useTextareaForIME&&(e.useTextareaForIME=this.$useTextareaForIME),this.$useTextareaForIME?(i.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),i.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,r=t||{row:n.row,column:n.column};this.removeGhostText();var o=this.$calculateWrappedTextChunks(e,r);this.addToken(o[0].text,"ghost_text",r.row,r.column),this.$ghostText={text:e,position:{row:r.row,column:r.column}};var a=i.createElement("div");if(o.length>1){var s,l=this.hideTokensAfterPosition(r.row,r.column);o.slice(1).forEach(function(e){var t=i.createElement("div"),n=i.createElement("span");n.className="ace_ghost_text",e.wrapped&&(t.className="ghost_text_line_wrapped"),0===e.text.length&&(e.text=" "),n.appendChild(i.createTextNode(e.text)),t.appendChild(n),a.appendChild(t),s=t}),l.forEach(function(e){var t=i.createElement("span");j(e.type)||(t.className="ace_"+e.type.replace(/\./g," ace_")),t.appendChild(i.createTextNode(e.value)),s.appendChild(t)}),this.$ghostTextWidget={el:a,row:r.row,column:r.column,className:"ace_ghost_text_container"},this.session.widgetManager.addLineWidget(this.$ghostTextWidget);var c=this.$cursorLayer.getPixelPosition(r,!0),d=this.container.getBoundingClientRect().height,u=o.length*this.lineHeight;if(u<d-c.top)return;u<d?this.scrollBy(0,(o.length-1)*this.lineHeight):this.scrollToRow(r.row)}},e.prototype.$calculateWrappedTextChunks=function(e,t){var n=this.$size.scrollerWidth-2*this.$padding,r=Math.floor(n/this.characterWidth)-2;r=r<=0?60:r;for(var i=e.split(/\r?\n/),o=[],a=0;a<i.length;a++){var s=this.session.$getDisplayTokens(i[a],t.column),l=this.session.$computeWrapSplits(s,r,this.session.$tabSize);if(l.length>0){var c=0;l.push(i[a].length);for(var d=0;d<l.length;d++){var u=i[a].slice(c,l[d]);o.push({text:u,wrapped:!0}),c=l[d]}}else o.push({text:i[a],wrapped:!1})}return o},e.prototype.removeGhostText=function(){if(this.$ghostText){var e=this.$ghostText.position;this.removeExtraToken(e.row,e.column),this.$ghostTextWidget&&(this.session.widgetManager.removeLineWidget(this.$ghostTextWidget),this.$ghostTextWidget=null),this.$ghostText=null}},e.prototype.addToken=function(e,t,n,r){var i=this.session;i.bgTokenizer.lines[n]=null;var o={type:t,value:e},a=i.getTokens(n);if(null!=r&&a.length)for(var s=0,l=0;l<a.length;l++){var c=a[l];if(r<=(s+=c.value.length)){var d=c.value.length-(s-r),u=c.value.slice(0,d),p=c.value.slice(d);a.splice(l,1,{type:c.type,value:u},o,{type:c.type,value:p});break}}else a.push(o);this.updateLines(n,n)},e.prototype.hideTokensAfterPosition=function(e,t){for(var n=this.session.getTokens(e),r=0,i=!1,o=[],a=0;a<n.length;a++){var s=n[a];r+=s.value.length,"ghost_text"!==s.type&&(i?(o.push({type:s.type,value:s.value}),s.type="hidden_token"):r===t&&(i=!0))}return this.updateLines(e,e),o},e.prototype.removeExtraToken=function(e,t){this.session.bgTokenizer.lines[e]=null,this.updateLines(e,e)},e.prototype.setTheme=function(e,t){var n=this;if(this.$themeId=e,n._dispatchEvent("themeChange",{theme:e}),e&&"string"!=typeof e)o(e);else{var r=e||this.$options.theme.initialValue;a.loadModule(["theme",r],o)}function o(r){if(n.$themeId!=e)return t&&t();if(!r||!r.cssClass)throw new Error("couldn't load module "+e+" or it didn't call define");r.$id&&(n.$themeId=r.$id),i.importCssString(r.cssText,r.cssClass,n.container),n.theme&&i.removeCssClass(n.container,n.theme.cssClass);var o="padding"in r?r.padding:"padding"in(n.theme||{})?4:n.$padding;n.$padding&&o!=n.$padding&&n.setPadding(o),n.$theme=r.cssClass,n.theme=r,i.addCssClass(n.container,r.cssClass),i.setCssClass(n.container,"ace_dark",r.isDark),n.$size&&(n.$size.width=0,n.$updateSizeAsync()),n._dispatchEvent("themeLoaded",{theme:r}),t&&t(),b.isSafari&&n.scroller&&(n.scroller.style.background="red",n.scroller.style.background="")}},e.prototype.getTheme=function(){return this.$themeId},e.prototype.setStyle=function(e,t){i.setCssClass(this.container,e,!1!==t)},e.prototype.unsetStyle=function(e){i.removeCssClass(this.container,e)},e.prototype.setCursorStyle=function(e){i.setStyle(this.scroller.style,"cursor",e)},e.prototype.setMouseCursor=function(e){i.setStyle(this.scroller.style,"cursor",e)},e.prototype.attachToShadowRoot=function(){i.importCssString(x,"ace_editor.css",this.container)},e.prototype.destroy=function(){this.freeze(),this.$fontMetrics.destroy(),this.$cursorLayer.destroy(),this.removeAllListeners(),this.container.textContent="",this.setOption("useResizeObserver",!1)},e.prototype.$updateCustomScrollbar=function(e){var t=this;this.$horizScroll=this.$vScroll=null,this.scrollBarV.element.remove(),this.scrollBarH.element.remove(),!0===e?(this.scrollBarV=new m(this.container,this),this.scrollBarH=new h(this.container,this),this.scrollBarV.setHeight(this.$size.scrollerHeight),this.scrollBarH.setWidth(this.$size.scrollerWidth),this.scrollBarV.addEventListener("scroll",function(e){t.$scrollAnimation||t.session.setScrollTop(e.data-t.scrollMargin.top)}),this.scrollBarH.addEventListener("scroll",function(e){t.$scrollAnimation||t.session.setScrollLeft(e.data-t.scrollMargin.left)}),this.$scrollDecorator?(this.$scrollDecorator.setScrollBarV(this.scrollBarV),this.$scrollDecorator.$updateDecorators()):(this.$scrollDecorator=new y(this.scrollBarV,this),this.$scrollDecorator.$updateDecorators())):(this.scrollBarV=new p(this.container,this),this.scrollBarH=new u(this.container,this),this.scrollBarV.addEventListener("scroll",function(e){t.$scrollAnimation||t.session.setScrollTop(e.data-t.scrollMargin.top)}),this.scrollBarH.addEventListener("scroll",function(e){t.$scrollAnimation||t.session.setScrollLeft(e.data-t.scrollMargin.left)}))},e.prototype.$addResizeObserver=function(){if(window.ResizeObserver&&!this.$resizeObserver){var e=this;this.$resizeTimer=o.delayedCall(function(){e.destroyed||e.onResize()},50),this.$resizeObserver=new window.ResizeObserver(function(t){var n=t[0].contentRect.width,r=t[0].contentRect.height;Math.abs(e.$size.width-n)>1||Math.abs(e.$size.height-r)>1?e.$resizeTimer.delay():e.$resizeTimer.cancel()}),this.$resizeObserver.observe(this.container)}},e}();_.prototype.CHANGE_CURSOR=1,_.prototype.CHANGE_MARKER=2,_.prototype.CHANGE_GUTTER=4,_.prototype.CHANGE_SCROLL=8,_.prototype.CHANGE_LINES=16,_.prototype.CHANGE_TEXT=32,_.prototype.CHANGE_SIZE=64,_.prototype.CHANGE_MARKER_BACK=128,_.prototype.CHANGE_MARKER_FRONT=256,_.prototype.CHANGE_FULL=512,_.prototype.CHANGE_H_SCROLL=1024,_.prototype.$changes=0,_.prototype.$padding=null,_.prototype.$frozen=!1,_.prototype.STEPS=8,r.implement(_.prototype,v),a.defineOptions(_.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){i.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:!b.isMobile&&!b.isIE}}),t.VirtualRenderer=_}),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){"use strict";var r=e("../lib/oop"),i=e("../lib/net"),o=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('"+i.qualifyURL(e)+"');";try{return new Blob([t],{type:"application/javascript"})}catch(r){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(){r.implement(this,o),this.$createWorkerFromOldConfig=function(t,n,r,i,o){if(e.nameToUrl&&!e.toUrl&&(e.toUrl=e.nameToUrl),a.get("packaged")||!e.toUrl)i=i||a.moduleUrl(n,"worker");else{var l=this.$normalizePath;i=i||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(i),o&&this.send("importScripts",o),this.$worker.postMessage({init:!0,tlns:c,module:n,classname:r}),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 i.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 r=this.callbackId++;this.callbacks[r]=n,t.push(r)}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 r=null,i=!1,s=Object.create(o),c=[],d=new l({messageBuffer:c,terminate:function(){},postMessage:function(e){c.push(e),r&&(i?setTimeout(u):u())}});d.setEmitSync=function(e){i=e};var u=function(){var e=c.shift();e.command?r[e.command].apply(r,e.args):e.event&&s._signal(e.event,e.data)};return s.postMessage=function(e){d.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(r=new e[n](s);c.length;)u()}),d},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){"use strict";var r=e("./range").Range,i=e("./lib/event_emitter").EventEmitter,o=e("./lib/oop"),a=function(){function e(e,t,n,r,i,o){var a=this;this.length=t,this.session=e,this.doc=e.getDocument(),this.mainClass=i,this.othersClass=o,this.$onUpdate=this.onUpdate.bind(this),this.doc.on("change",this.$onUpdate,!0),this.$others=r,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 i=this.pos;i.$insertRight=!0,i.detach(),i.markerId=n.addMarker(new r(i.row,i.column,i.row,i.column+this.length),this.mainClass,null,!1),this.others=[],this.$others.forEach(function(n){var r=t.createAnchor(n.row,n.column);r.$insertRight=!0,r.detach(),e.others.push(r)}),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 r(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.others.length;e++)this.session.removeMarker(this.others[e].markerId)}},e.prototype.onUpdate=function(e){if(this.$updating)return this.updateAnchors(e);var t=e;if(t.start.row===t.end.row&&t.start.row===this.pos.row){this.$updating=!0;var n="insert"===e.action?t.end.column-t.start.column:t.start.column-t.end.column,i=t.start.column>=this.pos.column&&t.start.column<=this.pos.column+this.length+1,o=t.start.column-this.pos.column;if(this.updateAnchors(e),i&&(this.length+=n),i&&!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+o};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+o};this.doc.remove(new r(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,i){t.removeMarker(n.markerId),n.markerId=t.addMarker(new r(n.row,n.column,n.row,n.column+e.length),i,null,!1)};n(this.pos,this.mainClass);for(var i=this.others.length;i--;)n(this.others[i],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;n<t;n++)e.undo(this.session,!0);this.selectionBefore&&this.session.selection.fromJSON(this.selectionBefore)}},e}();o.implement(a.prototype,i),t.PlaceHolder=a}),ace.define("ace/mouse/multi_select_handler",["require","exports","module","ace/lib/event","ace/lib/useragent"],function(e,t,n){var r=e("../lib/event"),i=e("../lib/useragent");function o(e,t){return e.row==t.row&&e.column==t.column}t.onMouseDown=function(e){var t=e.domEvent,n=t.altKey,a=t.shiftKey,s=t.ctrlKey,l=e.getAccelKey(),c=e.getButton();if(s&&i.isMac&&(c=t.button),e.editor.inMultiSelectMode&&2==c)e.editor.textInput.onContextMenu(e.domEvent);else if(s||n||l){if(0===c){var d,u=e.editor,p=u.selection,h=u.inMultiSelectMode,m=e.getDocumentPosition(),f=p.getCursor(),g=e.inSelection()||p.isEmpty()&&o(m,f),v=e.x,x=e.y,y=u.session,b=u.renderer.pixelToScreenCoordinates(v,x),j=b;if(u.$mouseHandler.$enableJumpToDef)s&&n||l&&n?d=a?"block":"add":n&&u.$blockSelectEnabled&&(d="block");else if(l&&!n){if(d="add",!h&&a)return}else n&&u.$blockSelectEnabled&&(d="block");if(d&&i.isMac&&t.ctrlKey&&u.$mouseHandler.cancelContextMenu(),"add"==d){if(!h&&g)return;if(!h){var _=p.toOrientedRange();u.addSelectionMarker(_)}var C=p.rangeList.rangeAtPoint(m);u.inVirtualSelectionMode=!0,a&&(C=null,_=p.ranges[0]||_,u.removeSelectionMarker(_)),u.once("mouseup",function(){var e=p.toOrientedRange();C&&e.isEmpty()&&o(C.cursor,e.cursor)?p.substractPoint(e.cursor):(a?p.substractPoint(_.cursor):_&&(u.removeSelectionMarker(_),p.addRange(_)),p.addRange(e)),u.inVirtualSelectionMode=!1})}else if("block"==d){var w;e.stop(),u.inVirtualSelectionMode=!0;var S=[],A=function(){var e=u.renderer.pixelToScreenCoordinates(v,x),t=y.screenToDocumentPosition(e.row,e.column,e.offsetX);o(j,e)&&o(t,p.lead)||(j=e,u.selection.moveToPosition(t),u.renderer.scrollCursorIntoView(),u.removeSelectionMarkers(S),S=p.rectangularRangeBlock(j,b),u.$mouseHandler.$clickSelection&&1==S.length&&S[0].isEmpty()&&(S[0]=u.$mouseHandler.$clickSelection.clone()),S.forEach(u.addSelectionMarker,u),u.updateSelectionMarkers())};h&&!l?p.toSingleRange():!h&&l&&(w=p.toOrientedRange(),u.addSelectionMarker(w)),a?b=y.documentToScreenPosition(p.lead):p.moveToPosition(m),j={row:-1,column:-1};var k=A;r.capture(u.container,function(e){v=e.clientX,x=e.clientY},function(e){A(),clearInterval(T),u.removeSelectionMarkers(S),S.length||(S=[p.toOrientedRange()]),w&&(u.removeSelectionMarker(w),p.toSingleRange(w));for(var t=0;t<S.length;t++)p.addRange(S[t]);u.inVirtualSelectionMode=!1,u.$mouseHandler.$clickSelection=null});var T=setInterval(function(){k()},20);return e.preventDefault()}}}else 0===c&&e.editor.inMultiSelectMode&&e.editor.exitMultiSelectMode()}}),ace.define("ace/commands/multi_select_commands",["require","exports","module","ace/keyboard/hash_handler"],function(e,t,n){t.defaultCommands=[{name:"addCursorAbove",description:"Add cursor above",exec:function(e){e.selectMoreLines(-1)},bindKey:{win:"Ctrl-Alt-Up",mac:"Ctrl-Alt-Up"},scrollIntoView:"cursor",readOnly:!0},{name:"addCursorBelow",description:"Add cursor below",exec:function(e){e.selectMoreLines(1)},bindKey:{win:"Ctrl-Alt-Down",mac:"Ctrl-Alt-Down"},scrollIntoView:"cursor",readOnly:!0},{name:"addCursorAboveSkipCurrent",description:"Add cursor above (skip current)",exec:function(e){e.selectMoreLines(-1,!0)},bindKey:{win:"Ctrl-Alt-Shift-Up",mac:"Ctrl-Alt-Shift-Up"},scrollIntoView:"cursor",readOnly:!0},{name:"addCursorBelowSkipCurrent",description:"Add cursor below (skip current)",exec:function(e){e.selectMoreLines(1,!0)},bindKey:{win:"Ctrl-Alt-Shift-Down",mac:"Ctrl-Alt-Shift-Down"},scrollIntoView:"cursor",readOnly:!0},{name:"selectMoreBefore",description:"Select more before",exec:function(e){e.selectMore(-1)},bindKey:{win:"Ctrl-Alt-Left",mac:"Ctrl-Alt-Left"},scrollIntoView:"cursor",readOnly:!0},{name:"selectMoreAfter",description:"Select more after",exec:function(e){e.selectMore(1)},bindKey:{win:"Ctrl-Alt-Right",mac:"Ctrl-Alt-Right"},scrollIntoView:"cursor",readOnly:!0},{name:"selectNextBefore",description:"Select next before",exec:function(e){e.selectMore(-1,!0)},bindKey:{win:"Ctrl-Alt-Shift-Left",mac:"Ctrl-Alt-Shift-Left"},scrollIntoView:"cursor",readOnly:!0},{name:"selectNextAfter",description:"Select next after",exec:function(e){e.selectMore(1,!0)},bindKey:{win:"Ctrl-Alt-Shift-Right",mac:"Ctrl-Alt-Shift-Right"},scrollIntoView:"cursor",readOnly:!0},{name:"toggleSplitSelectionIntoLines",description:"Split selection into lines",exec:function(e){e.multiSelect.rangeCount>1?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 r=e("../keyboard/hash_handler").HashHandler;t.keyboardHandler=new r(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 r=e("./range_list").RangeList,i=e("./range").Range,o=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 d=new(0,e("./search").Search);var u=e("./edit_session").EditSession;(function(){this.getSelectionMarkers=function(){return this.$selectionMarkers}}).call(u.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 r=this.rangeList.add(e);return this.$onAddRange(e),r.length&&this.$onRemoveRange(r),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 r=this.ranges.indexOf(e[n]);this.ranges.splice(r,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 r,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;n<e.length;n++){var r=e[n],o=r.start.row,a=r.end.row;if(o===a)t.push(r.clone());else{for(t.push(new i(o,r.start.column,o,this.session.getLine(o).length));++o<a;)t.push(this.getLineRange(o,!0));t.push(new i(a,0,a,r.end.column))}0!=n||this.isBackwards()||(t=t.reverse())}this.toSingleRange();for(n=t.length;n--;)this.addRange(t[n])},this.joinSelections=function(){var e=this.rangeList.ranges,t=e[e.length-1],n=i.fromPoints(e[0].start,t.end);this.toSingleRange(),this.setSelectionRange(n,t.cursor==t.start)},this.toggleBlockSelection=function(){if(this.rangeCount>1){var e=this.rangeList.ranges,t=e[e.length-1],n=i.fromPoints(e[0].start,t.end);this.toSingleRange(),this.setSelectionRange(n,t.cursor==t.start)}else{var r=this.session.documentToScreenPosition(this.cursor),o=this.session.documentToScreenPosition(this.anchor);this.rectangularRangeBlock(r,o).forEach(this.addRange,this)}},this.rectangularRangeBlock=function(e,t,n){var r=[],o=e.column<t.column;if(o)var a=e.column,s=t.column,l=e.offsetX,c=t.offsetX;else a=t.column,s=e.column,l=t.offsetX,c=e.offsetX;var d,u=e.row<t.row;if(u)var p=e.row,m=t.row;else p=t.row,m=e.row;a<0&&(a=0),p<0&&(p=0),p==m&&(n=!0);for(var f=p;f<=m;f++){var g=i.fromPoints(this.session.screenToDocumentPosition(f,a,l),this.session.screenToDocumentPosition(f,s,c));if(g.isEmpty()){if(d&&h(g.end,d))break;d=g.end}g.cursor=o?g.start:g.end,r.push(g)}if(u&&r.reverse(),!n){for(var v=r.length-1;r[v].isEmpty()&&v>0;)v--;if(v>0)for(var x=0;r[x].isEmpty();)x++;for(var y=v;y>=x;y--)r[y].isEmpty()&&r.splice(y,1)}return r}}.call(o.prototype);var p=e("./editor").Editor;function h(e,t){return e.row==t.row&&e.column==t.column}function m(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)return;var t=e.textInput.getElement(),n=!1;function r(t){n&&(e.renderer.setMouseCursor(""),n=!1)}s.addListener(t,"keydown",function(t){var i=18==t.keyCode&&!(t.ctrlKey||t.shiftKey||t.metaKey);e.$blockSelectEnabled&&i?n||(e.renderer.setMouseCursor("crosshair"),n=!0):n&&r()},e),s.addListener(t,"keyup",r,e),s.addListener(t,"blur",r,e)}(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 r=e[n];if(r.marker){this.session.removeMarker(r.marker);var i=t.indexOf(r);-1!=i&&t.splice(i,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?r=n.forEachSelection(t,e.args):"forEachLine"==t.multiSelectAction?r=n.forEachSelection(t,e.args,!0):"single"==t.multiSelectAction?(n.exitMultiSelectMode(),r=t.exec(n,e.args||{})):r=t.multiSelectAction(n,e.args||{});else{var r=t.exec(n,e.args||{});n.multiSelect.addRange(n.multiSelect.toOrientedRange()),n.multiSelect.mergeOverlappingRanges()}return r}},this.forEachSelection=function(e,t,n){if(!this.inVirtualSelectionMode){var r,i=n&&n.keepOrder,a=1==n||n&&n.$byLines,s=this.session,l=this.selection,c=l.rangeList,d=(i?l:c).ranges;if(!d.length)return e.exec?e.exec(this,t||{}):e(this,t||{});var u=l._eventRegistry;l._eventRegistry={};var p=new o(s);this.inVirtualSelectionMode=!0;for(var h=d.length;h--;){if(a)for(;h>0&&d[h].start.row==d[h-1].end.row;)h--;p.fromOrientedRange(d[h]),p.index=h,this.selection=s.selection=p;var m=e.exec?e.exec(this,t||{}):e(this,t||{});r||void 0===m||(r=m),p.toOrientedRange(d[h])}p.detach(),this.selection=s.selection=l,this.inVirtualSelectionMode=!1,l._eventRegistry=u,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),r}},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=[],r=0;r<t.length;r++)n.push(this.session.getTextRange(t[r]));var i=this.session.getDocument().getNewLineCharacter();(e=n.join(i)).length==(n.length-1)*i.length&&(e="")}else this.selection.isEmpty()||(e=this.session.getTextRange(this.getSelectionRange()));return e},this.$checkMultiselectChange=function(e,t){if(this.inMultiSelectMode&&!this.inVirtualSelectionMode){var n=this.multiSelect.ranges[0];if(this.multiSelect.isEmpty()&&t==this.multiSelect.anchor)return;var r=t==this.multiSelect.anchor?n.cursor==n.start?n.end:n.start:n.cursor;r.row!=t.row||this.session.$clipPositionToDocument(r.row,r.column).column!=t.column?this.multiSelect.toSingleRange(this.multiSelect.toOrientedRange()):this.multiSelect.mergeOverlappingRanges()}},this.findAll=function(e,t,n){if((t=t||{}).needle=e||t.needle,void 0==t.needle){var r=this.selection.isEmpty()?this.selection.getWordRange():this.selection.getRange();t.needle=this.session.getTextRange(r)}this.$search.set(t);var i=this.$search.findAll(this.session);if(!i.length)return 0;var o=this.multiSelect;n||o.toSingleRange(i[0]);for(var a=i.length;a--;)o.addRange(i[a],!0);return r&&o.rangeList.rangeAtPoint(r.start)&&o.addRange(r,!0),i.length},this.selectMoreLines=function(e,t){var n=this.selection.toOrientedRange(),r=n.cursor==n.end,o=this.session.documentToScreenPosition(n.cursor);this.selection.$desiredColumn&&(o.column=this.selection.$desiredColumn);var a,s=this.session.screenToDocumentPosition(o.row+e,o.column);if(n.isEmpty())c=s;else var l=this.session.documentToScreenPosition(r?n.end:n.start),c=this.session.screenToDocumentPosition(l.row+e,l.column);r?(a=i.fromPoints(s,c)).cursor=a.start:(a=i.fromPoints(c,s)).cursor=a.end;if(a.desiredColumn=o.column,this.selection.inMultiSelectMode){if(t)var d=n.cursor}else this.selection.addRange(n);this.selection.addRange(a),d&&this.selection.substractPoint(d)},this.transposeSelections=function(e){for(var t=this.session,n=t.multiSelect,r=n.ranges,i=r.length;i--;){if((s=r[i]).isEmpty()){var o=t.getWordRange(s.start.row,s.start.column);s.start.row=o.start.row,s.start.column=o.start.column,s.end.row=o.end.row,s.end.column=o.end.column}}n.mergeOverlappingRanges();var a=[];for(i=r.length;i--;){var s=r[i];a.unshift(t.getTextRange(s))}e<0?a.unshift(a.pop()):a.push(a.shift());for(i=r.length;i--;){var l=(s=r[i]).clone();t.replace(s,a[i]),s.start.row=l.start.row,s.start.column=l.start.column}n.fromOrientedRange(n.ranges[0])},this.selectMore=function(e,t,n){var r=this.session,i=r.multiSelect.toOrientedRange();if(!i.isEmpty()||((i=r.getWordRange(i.start.row,i.start.column)).cursor=-1==e?i.start:i.end,this.multiSelect.addRange(i),!n)){var o=r.getTextRange(i),a=function(e,t,n){return d.$options.wrap=!0,d.$options.needle=t,d.$options.backwards=-1==n,d.find(e)}(r,o,e);a&&(a.cursor=-1==e?a.start:a.end,this.session.unfold(a),this.multiSelect.addRange(a),this.renderer.scrollCursorIntoView(null,.5)),t&&this.multiSelect.substractPoint(i.cursor)}},this.alignCursors=function(){var e=this.session,t=e.multiSelect,n=t.ranges,r=-1,o=n.filter(function(e){if(e.cursor.row==r)return!0;r=e.cursor.row});if(n.length&&o.length!=n.length-1){o.forEach(function(e){t.substractPoint(e.cursor)});var a=0,s=1/0,c=n.map(function(t){var n=t.cursor,r=e.getLine(n.row).substr(n.column).search(/\S/g);return-1==r&&(r=0),n.column>a&&(a=n.column),r<s&&(s=r),r});n.forEach(function(t,n){var r=t.cursor,o=a-r.column,d=c[n]-s;o>d?e.insert(r,l.stringRepeat(" ",o-d)):e.remove(new i(r.row,r.column,r.row,r.column-o+d)),t.start.column=t.end.column=a,t.start.row=t.end.row=r.row,t.cursor=t.end}),t.fromOrientedRange(n[0]),this.renderer.updateCursor(),this.renderer.updateBackMarkers()}else{var d=this.selection.getRange(),u=d.start.row,p=d.end.row,h=u==p;if(h){var m,f=this.session.getLength();do{m=this.session.getLine(p)}while(/[=:]/.test(m)&&++p<f);do{m=this.session.getLine(u)}while(/[=:]/.test(m)&&--u>0);u<0&&(u=0),p>=f&&(p=f-1)}var g=this.session.removeFullLines(u,p);g=this.$reAlignText(g,h),this.session.insert({row:u,column:0},g.join("\n")+"\n"),h||(d.start.column=0,d.end.column=g[g.length-1].length),this.selection.setRange(d)}},this.$reAlignText=function(e,t){var n,r,i,o=!0,a=!0;return e.map(function(e){var t=e.match(/(\s*)(.*?)(\s*)([=:].*)/);return t?null==n?(n=t[1].length,r=t[2].length,i=t[3].length,t):(n+r+i!=t[1].length+t[2].length+t[3].length&&(a=!1),n!=t[1].length&&(o=!1),n>t[1].length&&(n=t[1].length),r<t[2].length&&(r=t[2].length),i>t[3].length&&(i=t[3].length),t):[e]}).map(t?c:o?a?function(e){return e[2]?s(n+r-e[2].length)+e[2]+s(i)+e[4].replace(/^([=:])\s+/,"$1 "):e[0]}:c:function(e){return e[2]?s(n)+e[2]+s(i)+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(r-e[2].length+i)+e[4].replace(/^([=:])\s+/,"$1 "):e[0]}}}).call(p.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=m,e("./config").defineOptions(p.prototype,"editor",{enableMultiselect:{set:function(e){m(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){"use strict";var r=e("../../range").Range,i=t.FoldMode=function(){};(function(){this.foldingStartMarker=null,this.foldingStopMarker=null,this.getFoldWidget=function(e,t,n){var r=e.getLine(n);return this.foldingStartMarker.test(r)?"start":"markbeginend"==t&&this.foldingStopMarker&&this.foldingStopMarker.test(r)?"end":""},this.getFoldWidgetRange=function(e,t,n){return null},this.indentationBlock=function(e,t,n){var i=/\S/,o=e.getLine(t),a=o.search(i);if(-1!=a){for(var s=n||o.length,l=e.getLength(),c=t,d=t;++t<l;){var u=e.getLine(t).search(i);if(-1!=u){if(u<=a){var p=e.getTokenAt(t,0);if(!p||"string"!==p.type)break}d=t}}if(d>c){var h=e.getLine(d).length;return new r(c,s,d,h)}}},this.openingBracketBlock=function(e,t,n,i,o){var a={row:n,column:i+1},s=e.$findClosingBracket(t,a,o);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),r.fromPoints(a,s)}},this.closingBracketBlock=function(e,t,n,i,o){var a={row:n,column:i},s=e.$findOpeningBracket(t,a);if(s)return s.column++,a.column--,r.fromPoints(s,a)}}).call(i.prototype)}),ace.define("ace/ext/error_marker",["require","exports","module","ace/lib/dom","ace/range","ace/config"],function(e,t,n){"use strict";var r=e("../lib/dom"),i=e("../range").Range,o=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,d=function(e,t,n){var r=e.getAnnotations().sort(i.comparePoints);if(r.length){var o=function(e,t,n){for(var r=0,i=e.length-1;r<=i;){var o=r+i>>1,a=n(t,e[o]);if(a>0)r=o+1;else{if(!(a<0))return o;i=o-1}}return-(r+1)}(r,{row:t,column:-1},i.comparePoints);o<0&&(o=-o-1),o>=r.length?o=n>0?0:r.length-1:0===o&&n<0&&(o=r.length-1);var a=r[o];if(a&&n){if(a.row===t){do{a=r[o+=n]}while(a&&a.row===t);if(!a)return r.slice()}var s=[];t=a.row;do{s[n<0?"unshift":"push"](a),a=r[o+=n]}while(a&&a.row==t);return s.length&&s}}}(n,s,t);if(d){var u=d[0];a.column=(u.pos&&"number"!=typeof u.column?u.pos.sc:u.column)||0,a.row=u.row,c=e.renderer.$gutterLayer.$annotations[a.row]}else{if(l)return;c={displayText:[o("error-marker.good-state","Looks good!")],className:"ace_ok"}}e.session.unfold(a.row),e.selection.moveToPosition(a);var p={row:a.row,fixedWidth:!0,coverGutter:!0,el:r.createElement("div"),type:"errorMarker"},h=p.el.appendChild(r.createElement("div")),m=p.el.appendChild(r.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",p.el.className="error_widget_wrapper",h.className="error_widget "+c.className,c.displayText.forEach(function(e,t){h.appendChild(r.createTextNode(e)),t<c.displayText.length-1&&h.appendChild(r.createElement("br"))}),h.appendChild(r.createElement("div"));var g=function(e,t,n){if(0===t&&("esc"===n||"return"===n))return p.destroy(),{command:"null"}};p.destroy=function(){e.$mouseHandler.isMousePressed||(e.keyBinding.removeKeyboardHandler(g),n.widgetManager.removeLineWidget(p),e.off("changeSelection",p.destroy),e.off("changeSession",p.destroy),e.off("mouseup",p.destroy),e.off("change",p.destroy))},e.keyBinding.addKeyboardHandler(g),e.on("changeSelection",p.destroy),e.on("changeSession",p.destroy),e.on("mouseup",p.destroy),e.on("change",p.destroy),e.session.widgetManager.addLineWidget(p),p.el.onmousedown=e.focus.bind(e),e.renderer.scrollCursorIntoView(null,.5,{bottom:p.el.offsetHeight})},r.importCssString("\n    .error_widget_wrapper {\n        background: inherit;\n        color: inherit;\n        border:none\n    }\n    .error_widget {\n        border-top: solid 2px;\n        border-bottom: solid 2px;\n        margin: 5px 0;\n        padding: 10px 40px;\n        white-space: pre-wrap;\n    }\n    .error_widget.ace_error, .error_widget_arrow.ace_error{\n        border-color: #ff5a5a\n    }\n    .error_widget.ace_warning, .error_widget_arrow.ace_warning{\n        border-color: #F1D817\n    }\n    .error_widget.ace_info, .error_widget_arrow.ace_info{\n        border-color: #5a5a5a\n    }\n    .error_widget.ace_ok, .error_widget_arrow.ace_ok{\n        border-color: #5aaa5a\n    }\n    .error_widget_arrow {\n        position: absolute;\n        border: solid 5px;\n        border-top-color: transparent!important;\n        border-right-color: transparent!important;\n        border-left-color: transparent!important;\n        top: -5px;\n    }\n","error_marker.css",!1)}),ace.define("ace/ace",["require","exports","module","ace/lib/dom","ace/range","ace/editor","ace/edit_session","ace/undomanager","ace/virtual_renderer","ace/worker/worker_client","ace/keyboard/hash_handler","ace/placeholder","ace/multi_select","ace/mode/folding/fold_mode","ace/theme/textmate","ace/ext/error_marker","ace/config","ace/loader_build"],function(e,t,n){"use strict";e("./loader_build")(t);var r=e("./lib/dom"),i=e("./range").Range,o=e("./editor").Editor,a=e("./edit_session").EditSession,s=e("./undomanager").UndoManager,l=e("./virtual_renderer").VirtualRenderer;e("./worker/worker_client"),e("./keyboard/hash_handler"),e("./placeholder"),e("./multi_select"),e("./mode/folding/fold_mode"),e("./theme/textmate"),e("./ext/error_marker"),t.config=e("./config"),t.edit=function(e,n){if("string"==typeof e){var i=e;if(!(e=document.getElementById(i)))throw new Error("ace.edit can't find div #"+i)}if(e&&e.env&&e.env.editor instanceof o)return e.env.editor;var a="";if(e&&/input|textarea/i.test(e.tagName)){var s=e;a=s.value,e=r.createElement("pre"),s.parentNode.replaceChild(e,s)}else e&&(a=e.textContent,e.innerHTML="");var c=t.createEditSession(a),d=new o(new l(e),c,n),u={document:c,editor:d,onResize:d.resize.bind(d,null)};return s&&(u.textarea=s),d.on("destroy",function(){u.editor.container.env=null}),d.container.env=d.env=u,d},t.createEditSession=function(e,t){var n=new a(e,t);return n.setUndoManager(new s),n},t.Range=i,t.Editor=o,t.EditSession=a,t.UndoManager=s,t.VirtualRenderer=l;var c=t.config.version;t.version=c}),ace.require(["ace/ace"],function(t){t&&(t.config.init(!0),t.define=ace.define);var n=function(){return this}();for(var r in n||"undefined"==typeof window||(n=window),n||"undefined"==typeof self||(n=self),n.ace||(n.ace=t),t)t.hasOwnProperty(r)&&(n.ace[r]=t[r]);n.ace.default=n.ace,e&&(e.exports=n.ace)})},56658:(e,t,n)=>{"use strict";var r=n(24994);t.A=void 0;var i=r(n(40039)),o=n(70579);t.A=(0,i.default)((0,o.jsx)("path",{d:"M10 6 8.59 7.41 13.17 12l-4.58 4.59L10 18l6-6z"}),"NavigateNext")},56776:(e,t,n)=>{"use strict";var r=n(24994);t.A=void 0;var i=r(n(40039)),o=n(70579);t.A=(0,i.default)([(0,o.jsx)("path",{d:"M19.5 3.5 18 2l-1.5 1.5L15 2l-1.5 1.5L12 2l-1.5 1.5L9 2 7.5 3.5 6 2v14H3v3c0 1.66 1.34 3 3 3h12c1.66 0 3-1.34 3-3V2zM19 19c0 .55-.45 1-1 1s-1-.45-1-1v-3H8V5h11z"},"0"),(0,o.jsx)("path",{d:"M9 7h6v2H9zm7 0h2v2h-2zm-7 3h6v2H9zm7 0h2v2h-2z"},"1")],"ReceiptLong")},56832:(e,t,n)=>{e=n.nmd(e);var r=n(37105),i=t&&!t.nodeType&&t,o=i&&e&&!e.nodeType&&e,a=o&&o.exports===i&&r.process,s=function(){try{var e=o&&o.require&&o.require("util").types;return e||a&&a.binding&&a.binding("util")}catch(t){}}();e.exports=s},56874:(e,t,n)=>{var r=n(12622);e.exports=function(e,t){var n=r(this,e),i=n.size;return n.set(e,t),this.size+=n.size==i?0:1,this}},56893:(e,t,n)=>{"use strict";var r=n(24994);t.A=void 0;var i=r(n(40039)),o=n(70579);t.A=(0,i.default)((0,o.jsx)("path",{d:"M16 11c1.66 0 2.99-1.34 2.99-3S17.66 5 16 5c-1.66 0-3 1.34-3 3s1.34 3 3 3m-8 0c1.66 0 2.99-1.34 2.99-3S9.66 5 8 5C6.34 5 5 6.34 5 8s1.34 3 3 3m0 2c-2.33 0-7 1.17-7 3.5V19h14v-2.5c0-2.33-4.67-3.5-7-3.5m8 0c-.29 0-.62.02-.97.05 1.16.84 1.97 1.97 1.97 3.45V19h6v-2.5c0-2.33-4.67-3.5-7-3.5"}),"Group")},57566:(e,t,n)=>{"use strict";var r=n(24994);t.A=void 0;var i=r(n(40039)),o=n(70579);t.A=(0,i.default)((0,o.jsx)("path",{d:"M15 12c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4m-9-2V7H4v3H1v2h3v3h2v-3h3v-2zm9 4c-2.67 0-8 1.34-8 4v2h16v-2c0-2.66-5.33-4-8-4"}),"PersonAdd")},57676:(e,t,n)=>{var r=n(28189),i=n(36311),o=n(39115),a=n(41069);e.exports=function(e){return function(t){t=a(t);var n=i(t)?o(t):void 0,s=n?n[0]:t.charAt(0),l=n?r(n,1).join(""):t.slice(1);return s[e]()+l}}},57828:e=>{e.exports=function(){return[]}},57887:(e,t,n)=>{var r=n(5791),i=n(47574),o=n(56832),a=o&&o.isMap,s=a?i(a):r;e.exports=s},58114:e=>{e.exports=function(e,t){return e.has(t)}},58122:(e,t,n)=>{var r=n(46686),i=n(36140),o=n(43516),a=Object.prototype.hasOwnProperty;e.exports=function(e){if(!r(e))return o(e);var t=i(e),n=[];for(var s in e)("constructor"!=s||!t&&a.call(e,s))&&n.push(s);return n}},58168:(e,t,n)=>{"use strict";function r(){return r=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},r.apply(null,arguments)}n.d(t,{A:()=>r})},58812:(e,t,n)=>{"use strict";n.d(t,{A:()=>d,k:()=>l});var r=n(67598),i=n(13815),o=n(17162),a=n(89751),s=n(37758);function l(){function e(e,t,n,i){const s={[e]:t,theme:n},l=i[e];if(!l)return{[e]:t};const{cssProperty:c=e,themeKey:d,transform:u,style:p}=l;if(null==t)return null;if("typography"===d&&"inherit"===t)return{[e]:t};const h=(0,o.Yn)(n,d)||{};if(p)return p(s);return(0,a.NI)(s,t,t=>{let n=(0,o.BO)(h,u,t);return t===n&&"string"===typeof t&&(n=(0,o.BO)(h,u,"".concat(e).concat("default"===t?"":(0,r.A)(t)),t)),!1===c?n:{[c]:n}})}return function t(n){var r;const{sx:o,theme:l={},nested:c}=n||{};if(!o)return null;const d=null!=(r=l.unstable_sxConfig)?r:s.A;function u(n){let r=n;if("function"===typeof n)r=n(l);else if("object"!==typeof n)return n;if(!r)return null;const o=(0,a.EU)(l.breakpoints),s=Object.keys(o);let u=o;return Object.keys(r).forEach(n=>{const o=(s=r[n],c=l,"function"===typeof s?s(c):s);var s,c;if(null!==o&&void 0!==o)if("object"===typeof o)if(d[n])u=(0,i.A)(u,e(n,o,l,d));else{const e=(0,a.NI)({theme:l},o,e=>({[n]:e}));!function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];const r=t.reduce((e,t)=>e.concat(Object.keys(t)),[]),i=new Set(r);return t.every(e=>i.size===Object.keys(e).length)}(e,o)?u=(0,i.A)(u,e):u[n]=t({sx:o,theme:l,nested:!0})}else u=(0,i.A)(u,e(n,o,l,d))}),!c&&l.modularCssLayers?{"@layer sx":(0,a.vf)(s,u)}:(0,a.vf)(s,u)}return Array.isArray(o)?o.map(u):u(o)}}const c=l();c.filterProps=["sx"];const d=c},59131:(e,t,n)=>{"use strict";var r=n(24994);t.A=void 0;var i=r(n(40039)),o=n(70579);t.A=(0,i.default)((0,o.jsx)("path",{d:"M12 1 3 5v6c0 5.55 3.84 10.74 9 12 5.16-1.26 9-6.45 9-12V5zm-2 16-4-4 1.41-1.41L10 14.17l6.59-6.59L18 9z"}),"VerifiedUser")},59364:(e,t,n)=>{var r=n(79742),i=n(9096),o=n(50061);e.exports=function(e,t){return e&&e.length?r(e,i(t,2),o):void 0}},59395:(e,t,n)=>{var r=n(4262),i=n(69621),o=n(28673);e.exports=function(e){return r(e,o,i)}},60014:e=>{e.exports=function(){return!1}},60225:function(e,t,n){"use strict";var r=this&&this.__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])},e(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 r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),i=this&&this.__assign||function(){return i=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},i.apply(this,arguments)};Object.defineProperty(t,"__esModule",{value:!0});var o=n(44288),a=(0,o.getAceInstance)(),s=n(56603),l=n(54878),c=n(65173),d=n(65043),u=n(20067),p=n(92043),h=function(e){function t(t){var n=e.call(this,t)||this;return o.editorEvents.forEach(function(e){n[e]=n[e].bind(n)}),n.debounce=o.debounce,n}return r(t,e),t.prototype.isInShadow=function(e){for(var t=e&&e.parentNode;t;){if("[object ShadowRoot]"===t.toString())return!0;t=t.parentNode}return!1},t.prototype.componentDidMount=function(){var e=this,t=this.props,n=t.className,r=t.onBeforeLoad,i=t.mode,s=t.focus,c=t.theme,d=t.fontSize,u=t.value,h=t.defaultValue,m=t.cursorStart,f=t.showGutter,g=t.wrapEnabled,v=t.showPrintMargin,x=t.scrollMargin,y=void 0===x?[0,0,0,0]:x,b=t.keyboardHandler,j=t.onLoad,_=t.commands,C=t.annotations,w=t.markers,S=t.splits;this.editor=a.edit(this.refEditor),this.isInShadow(this.refEditor)&&this.editor.renderer.attachToShadowRoot(),this.editor.setTheme("ace/theme/".concat(c)),r&&r(a);var A=Object.keys(this.props.editorProps),k=new l.Split(this.editor.container,"ace/theme/".concat(c),S);this.editor.env.split=k,this.splitEditor=k.getEditor(0),this.split=k,this.editor.setShowPrintMargin(!1),this.editor.renderer.setShowGutter(!1);var T=this.splitEditor.$options;this.props.debounceChangePeriod&&(this.onChange=this.debounce(this.onChange,this.props.debounceChangePeriod)),k.forEach(function(t,n){for(var r=0;r<A.length;r++)t[A[r]]=e.props.editorProps[A[r]];var s=p(h,n),l=p(u,n,"");t.session.setUndoManager(new a.UndoManager),t.setTheme("ace/theme/".concat(c)),t.renderer.setScrollMargin(y[0],y[1],y[2],y[3]),t.getSession().setMode("ace/mode/".concat(i)),t.setFontSize(d),t.renderer.setShowGutter(f),t.getSession().setUseWrapMode(g),t.setShowPrintMargin(v),t.on("focus",e.onFocus),t.on("blur",e.onBlur),t.on("input",e.onInput),t.on("copy",e.onCopy),t.on("paste",e.onPaste),t.on("change",e.onChange),t.getSession().selection.on("changeSelection",e.onSelectionChange),t.getSession().selection.on("changeCursor",e.onCursorChange),t.session.on("changeScrollTop",e.onScroll),t.setValue(void 0===s?l:s,m);var x=p(C,n,[]),j=p(w,n,[]);t.getSession().setAnnotations(x),j&&j.length>0&&e.handleMarkers(j,t);for(r=0;r<o.editorOptions.length;r++){var S=o.editorOptions[r];T.hasOwnProperty(S)?t.setOption(S,e.props[S]):e.props[S]&&console.warn("ReaceAce: editor option ".concat(S," was activated but not found. Did you need to import a related tool or did you possibly mispell the option?"))}e.handleOptions(e.props,t),Array.isArray(_)&&_.forEach(function(e){"string"===typeof e.exec?t.commands.bindKey(e.bindKey,e.exec):t.commands.addCommand(e)}),b&&t.setKeyboardHandler("ace/keyboard/"+b)}),n&&(this.refEditor.className+=" "+n),s&&this.splitEditor.focus();var E=this.editor.env.split;E.setOrientation("below"===this.props.orientation?E.BELOW:E.BESIDE),E.resize(!0),j&&j(E)},t.prototype.componentDidUpdate=function(e){var t=this,n=e,r=this.props,i=this.editor.env.split;if(r.splits!==n.splits&&i.setSplits(r.splits),r.orientation!==n.orientation&&i.setOrientation("below"===r.orientation?i.BELOW:i.BESIDE),i.forEach(function(e,i){r.mode!==n.mode&&e.getSession().setMode("ace/mode/"+r.mode),r.keyboardHandler!==n.keyboardHandler&&(r.keyboardHandler?e.setKeyboardHandler("ace/keyboard/"+r.keyboardHandler):e.setKeyboardHandler(null)),r.fontSize!==n.fontSize&&e.setFontSize(r.fontSize),r.wrapEnabled!==n.wrapEnabled&&e.getSession().setUseWrapMode(r.wrapEnabled),r.showPrintMargin!==n.showPrintMargin&&e.setShowPrintMargin(r.showPrintMargin),r.showGutter!==n.showGutter&&e.renderer.setShowGutter(r.showGutter);for(var a=0;a<o.editorOptions.length;a++){var s=o.editorOptions[a];r[s]!==n[s]&&e.setOption(s,r[s])}u(r.setOptions,n.setOptions)||t.handleOptions(r,e);var l=p(r.value,i,"");if(e.getValue()!==l){t.silent=!0;var c=e.session.selection.toJSON();e.setValue(l,r.cursorStart),e.session.selection.fromJSON(c),t.silent=!1}var d=p(r.annotations,i,[]),h=p(n.annotations,i,[]);u(d,h)||e.getSession().setAnnotations(d);var m=p(r.markers,i,[]),f=p(n.markers,i,[]);!u(m,f)&&Array.isArray(m)&&t.handleMarkers(m,e)}),r.className!==n.className){var a=this.refEditor.className.trim().split(" ");n.className.trim().split(" ").forEach(function(e){var t=a.indexOf(e);a.splice(t,1)}),this.refEditor.className=" "+r.className+" "+a.join(" ")}r.theme!==n.theme&&i.setTheme("ace/theme/"+r.theme),r.focus&&!n.focus&&this.splitEditor.focus(),r.height===this.props.height&&r.width===this.props.width||this.editor.resize()},t.prototype.componentWillUnmount=function(){this.editor.destroy(),this.editor=null},t.prototype.onChange=function(e){if(this.props.onChange&&!this.silent){var t=[];this.editor.env.split.forEach(function(e){t.push(e.getValue())}),this.props.onChange(t,e)}},t.prototype.onSelectionChange=function(e){if(this.props.onSelectionChange){var t=[];this.editor.env.split.forEach(function(e){t.push(e.getSelection())}),this.props.onSelectionChange(t,e)}},t.prototype.onCursorChange=function(e){if(this.props.onCursorChange){var t=[];this.editor.env.split.forEach(function(e){t.push(e.getSelection())}),this.props.onCursorChange(t,e)}},t.prototype.onFocus=function(e){this.props.onFocus&&this.props.onFocus(e)},t.prototype.onInput=function(e){this.props.onInput&&this.props.onInput(e)},t.prototype.onBlur=function(e){this.props.onBlur&&this.props.onBlur(e)},t.prototype.onCopy=function(e){this.props.onCopy&&this.props.onCopy(e)},t.prototype.onPaste=function(e){this.props.onPaste&&this.props.onPaste(e)},t.prototype.onScroll=function(){this.props.onScroll&&this.props.onScroll(this.editor)},t.prototype.handleOptions=function(e,t){for(var n=Object.keys(e.setOptions),r=0;r<n.length;r++)t.setOption(n[r],e.setOptions[n[r]])},t.prototype.handleMarkers=function(e,t){var n=t.getSession().getMarkers(!0);for(var r in n)n.hasOwnProperty(r)&&t.getSession().removeMarker(n[r].id);for(var r in n=t.getSession().getMarkers(!1))n.hasOwnProperty(r)&&t.getSession().removeMarker(n[r].id);e.forEach(function(e){var n=e.startRow,r=e.startCol,i=e.endRow,o=e.endCol,a=e.className,l=e.type,c=e.inFront,d=void 0!==c&&c,u=new s.Range(n,r,i,o);t.getSession().addMarker(u,a,l,d)})},t.prototype.updateRef=function(e){this.refEditor=e},t.prototype.render=function(){var e=this.props,t=e.name,n=e.width,r=e.height,o=e.style,a=i({width:n,height:r},o);return d.createElement("div",{ref:this.updateRef,id:t,style:a})},t.propTypes={className:c.string,debounceChangePeriod:c.number,defaultValue:c.arrayOf(c.string),focus:c.bool,fontSize:c.oneOfType([c.number,c.string]),height:c.string,mode:c.string,name:c.string,onBlur:c.func,onChange:c.func,onCopy:c.func,onFocus:c.func,onInput:c.func,onLoad:c.func,onPaste:c.func,onScroll:c.func,orientation:c.string,showGutter:c.bool,splits:c.number,theme:c.string,value:c.arrayOf(c.string),width:c.string,onSelectionChange:c.func,onCursorChange:c.func,onBeforeLoad:c.func,minLines:c.number,maxLines:c.number,readOnly:c.bool,highlightActiveLine:c.bool,tabSize:c.number,showPrintMargin:c.bool,cursorStart:c.number,editorProps:c.object,setOptions:c.object,style:c.object,scrollMargin:c.array,annotations:c.array,markers:c.array,keyboardHandler:c.string,wrapEnabled:c.bool,enableBasicAutocompletion:c.oneOfType([c.bool,c.array]),enableLiveAutocompletion:c.oneOfType([c.bool,c.array]),commands:c.array},t.defaultProps={name:"ace-editor",focus:!1,orientation:"beside",splits:2,mode:"",theme:"",height:"500px",width:"500px",value:[],fontSize:12,showGutter:!0,onChange:null,onPaste:null,onLoad:null,onScroll:null,minLines:null,maxLines:null,readOnly:!1,highlightActiveLine:!0,showPrintMargin:!0,tabSize:4,cursorStart:1,editorProps:{},style:{},scrollMargin:[0,0,0,0],setOptions:{},wrapEnabled:!1,enableBasicAutocompletion:!1,enableLiveAutocompletion:!1},t}(d.Component);t.default=h},60320:e=>{e.exports=function(e,t){var n=e.length;for(e.sort(t);n--;)e[n]=e[n].value;return e}},60929:(e,t,n)=>{var r=n(93211),i=n(6571),o=n(69194),a=n(46686);e.exports=function(e,t,n){if(!a(n))return!1;var s=typeof t;return!!("number"==s?i(n)&&o(t,n.length):"string"==s&&t in n)&&r(n[t],e)}},60991:(e,t,n)=>{"use strict";var r=n(24994);t.A=void 0;var i=r(n(40039)),o=n(70579);t.A=(0,i.default)((0,o.jsx)("path",{d:"M12 2 4 5v6.09c0 5.05 3.41 9.76 8 10.91 4.59-1.15 8-5.86 8-10.91V5zm1 14h-2v-2h2zm0-4h-2V7h2z"}),"GppMaybe")},61141:(e,t,n)=>{var r=n(10143),i=/^\s+/;e.exports=function(e){return e?e.slice(0,r(e)+1).replace(i,""):e}},61143:(e,t,n)=>{var r=n(13028)(Object.keys,Object);e.exports=r},61340:(e,t,n)=>{var r=n(93211);e.exports=function(e,t){for(var n=e.length;n--;)if(r(e[n][0],t))return n;return-1}},61460:(e,t,n)=>{var r=n(50149),i=n(8820),o=n(55647),a=n(50046),s=o(function(e){var t=r(e,a);return t.length&&t[0]===e[0]?i(t):[]});e.exports=s},61475:(e,t,n)=>{"use strict";n.d(t,{A:()=>i});var r=n(47123);const i=e=>(0,r.A)(e)&&"classes"!==e},61516:(e,t,n)=>{var r=n(22929);e.exports=function(e){var t=new e.constructor(e.byteLength);return new r(t).set(new r(e)),t}},61540:e=>{var t="\\ud800-\\udfff",n="\\u2700-\\u27bf",r="a-z\\xdf-\\xf6\\xf8-\\xff",i="A-Z\\xc0-\\xd6\\xd8-\\xde",o="\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2000-\\u206f \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",a="["+o+"]",s="\\d+",l="["+n+"]",c="["+r+"]",d="[^"+t+o+s+n+r+i+"]",u="(?:\\ud83c[\\udde6-\\uddff]){2}",p="[\\ud800-\\udbff][\\udc00-\\udfff]",h="["+i+"]",m="(?:"+c+"|"+d+")",f="(?:"+h+"|"+d+")",g="(?:['\u2019](?:d|ll|m|re|s|t|ve))?",v="(?:['\u2019](?:D|LL|M|RE|S|T|VE))?",x="(?:[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]|\\ud83c[\\udffb-\\udfff])?",y="[\\ufe0e\\ufe0f]?",b=y+x+("(?:\\u200d(?:"+["[^"+t+"]",u,p].join("|")+")"+y+x+")*"),j="(?:"+[l,u,p].join("|")+")"+b,_=RegExp([h+"?"+c+"+"+g+"(?="+[a,h,"$"].join("|")+")",f+"+"+v+"(?="+[a,h+m,"$"].join("|")+")",h+"?"+m+"+"+g,h+"+"+v,"\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])","\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",s,j].join("|"),"g");e.exports=function(e){return e.match(_)||[]}},61552:(e,t)=>{"use strict";var n=60103,r=60106,i=60107,o=60108,a=60114,s=60109,l=60110,c=60112,d=60113,u=60120,p=60115,h=60116,m=60121,f=60122,g=60117,v=60129,x=60131;if("function"===typeof Symbol&&Symbol.for){var y=Symbol.for;n=y("react.element"),r=y("react.portal"),i=y("react.fragment"),o=y("react.strict_mode"),a=y("react.profiler"),s=y("react.provider"),l=y("react.context"),c=y("react.forward_ref"),d=y("react.suspense"),u=y("react.suspense_list"),p=y("react.memo"),h=y("react.lazy"),m=y("react.block"),f=y("react.server.block"),g=y("react.fundamental"),v=y("react.debug_trace_mode"),x=y("react.legacy_hidden")}function b(e){if("object"===typeof e&&null!==e){var t=e.$$typeof;switch(t){case n:switch(e=e.type){case i:case a:case o:case d:case u:return e;default:switch(e=e&&e.$$typeof){case l:case c:case h:case p:case s:return e;default:return t}}case r:return t}}}t.isContextConsumer=function(e){return b(e)===l}},61714:(e,t,n)=>{var r=n(61340);e.exports=function(e,t){var n=this.__data__,i=r(n,e);return i<0?(++this.size,n.push([e,t])):n[i][1]=t,this}},62117:(e,t,n)=>{var r=n(36741),i=n(99057);e.exports=function(e,t){return null!=e&&i(e,t,r)}},62597:(e,t,n)=>{var r=n(54052),i=n(19841),o=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,a=/^\w*$/;e.exports=function(e,t){if(r(e))return!1;var n=typeof e;return!("number"!=n&&"symbol"!=n&&"boolean"!=n&&null!=e&&!i(e))||(a.test(e)||!o.test(e)||null!=t&&e in Object(t))}},63101:(e,t,n)=>{"use strict";var r=n(86267),i=["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"];e.exports=function(e){var t,n,o,a={};return e?(r.forEach(e.split("\n"),function(e){if(o=e.indexOf(":"),t=r.trim(e.substr(0,o)).toLowerCase(),n=r.trim(e.substr(o+1)),t){if(a[t]&&i.indexOf(t)>=0)return;a[t]="set-cookie"===t?(a[t]?a[t]:[]).concat([n]):a[t]?a[t]+", "+n:n}}),a):a}},63102:(e,t,n)=>{"use strict";var r=n(24994);t.A=void 0;var i=r(n(40039)),o=n(70579);t.A=(0,i.default)((0,o.jsx)("path",{d:"M1 21h22L12 2zm12-3h-2v-2h2zm0-4h-2v-4h2z"}),"Warning")},63462:(e,t,n)=>{"use strict";n.d(t,{A:()=>o});var r=n(65043),i=n(26564);function o(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return r.useMemo(()=>t.every(e=>null==e)?null:e=>{t.forEach(t=>{(0,i.A)(t,e)})},t)}},63538:(e,t,n)=>{var r=n(80755),i=n(33411);e.exports=function(e,t){return r(i(e,t),1)}},63709:(e,t,n)=>{"use strict";var r=n(24994);t.A=void 0;var i=r(n(40039)),o=n(70579);t.A=(0,i.default)((0,o.jsx)("path",{d:"M19 8H5c-1.66 0-3 1.34-3 3v6h4v4h12v-4h4v-6c0-1.66-1.34-3-3-3m-3 11H8v-5h8zm3-7c-.55 0-1-.45-1-1s.45-1 1-1 1 .45 1 1-.45 1-1 1m-1-9H6v4h12z"}),"Print")},63932:(e,t,n)=>{var r=n(10396),i=n(52866),o=n(62597),a=n(70914);e.exports=function(e){return o(e)?r(a(e)):i(e)}},63940:(e,t,n)=>{"use strict";n.d(t,{A:()=>i});var r=n(31668);function i(e){return(0,r.A)(e).defaultView||window}},64395:(e,t,n)=>{"use strict";var r=n(86267),i=n(3024),o=n(87767),a=n(52989),s=n(47482);function l(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new s}e.exports=function(e){return l(e),e.headers=e.headers||{},e.data=i.call(e,e.data,e.headers,e.transformRequest),e.headers=r.merge(e.headers.common||{},e.headers[e.method]||{},e.headers),r.forEach(["delete","get","head","post","put","patch","common"],function(t){delete e.headers[t]}),(e.adapter||a.adapter)(e).then(function(t){return l(e),t.data=i.call(e,t.data,t.headers,e.transformResponse),t},function(t){return o(t)||(l(e),t&&t.response&&(t.response.data=i.call(e,t.response.data,t.response.headers,e.transformResponse))),Promise.reject(t)})}},64416:(e,t,n)=>{var r=n(18902),i=n(75866),o=n(41558),a=n(58114),s=n(68182),l=n(52074);e.exports=function(e,t,n){var c=-1,d=i,u=e.length,p=!0,h=[],m=h;if(n)p=!1,d=o;else if(u>=200){var f=t?null:s(e);if(f)return l(f);p=!1,d=a,m=new r}else m=t?[]:h;e:for(;++c<u;){var g=e[c],v=t?t(g):g;if(g=n||0!==g?g:0,p&&v===v){for(var x=m.length;x--;)if(m[x]===v)continue e;t&&m.push(v),h.push(g)}else d(m,v,n)||(m!==h&&m.push(v),h.push(g))}return h}},64467:(e,t,n)=>{"use strict";n.d(t,{A:()=>i});var r=n(20816);function i(e,t,n){return(t=(0,r.A)(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}},64816:(e,t,n)=>{var r=n(47251),i=n(37159),o=n(80438),a=n(69394),s=n(56874);function l(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}l.prototype.clear=r,l.prototype.delete=i,l.prototype.get=o,l.prototype.has=a,l.prototype.set=s,e.exports=l},65043:(e,t,n)=>{"use strict";e.exports=n(14202)},65173:(e,t,n)=>{e.exports=n(41497)()},65387:(e,t,n)=>{var r=n(87937)(n(56552),"Promise");e.exports=r},65893:(e,t,n)=>{var r=n(16599);e.exports=function(e,t,n){for(var i=-1,o=e.criteria,a=t.criteria,s=o.length,l=n.length;++i<s;){var c=r(o[i],a[i]);if(c)return i>=l?c:c*("desc"==n[i]?-1:1)}return e.index-t.index}},66360:(e,t,n)=>{"use strict";var r=n(24994);t.A=void 0;var i=r(n(40039)),o=n(70579);t.A=(0,i.default)((0,o.jsx)("path",{d:"M15.5 14h-.79l-.28-.27C15.41 12.59 16 11.11 16 9.5 16 5.91 13.09 3 9.5 3S3 5.91 3 9.5 5.91 16 9.5 16c1.61 0 3.09-.59 4.23-1.57l.27.28v.79l5 4.99L20.49 19zm-6 0C7.01 14 5 11.99 5 9.5S7.01 5 9.5 5 14 7.01 14 9.5 11.99 14 9.5 14"}),"Search")},66366:e=>{"use strict";var t=Array.isArray,n=Object.keys,r=Object.prototype.hasOwnProperty,i="undefined"!==typeof Element;function o(e,a){if(e===a)return!0;if(e&&a&&"object"==typeof e&&"object"==typeof a){var s,l,c,d=t(e),u=t(a);if(d&&u){if((l=e.length)!=a.length)return!1;for(s=l;0!==s--;)if(!o(e[s],a[s]))return!1;return!0}if(d!=u)return!1;var p=e instanceof Date,h=a instanceof Date;if(p!=h)return!1;if(p&&h)return e.getTime()==a.getTime();var m=e instanceof RegExp,f=a instanceof RegExp;if(m!=f)return!1;if(m&&f)return e.toString()==a.toString();var g=n(e);if((l=g.length)!==n(a).length)return!1;for(s=l;0!==s--;)if(!r.call(a,g[s]))return!1;if(i&&e instanceof Element&&a instanceof Element)return e===a;for(s=l;0!==s--;)if(("_owner"!==(c=g[s])||!e.$$typeof)&&!o(e[c],a[c]))return!1;return!0}return e!==e&&a!==a}e.exports=function(e,t){try{return o(e,t)}catch(n){if(n.message&&n.message.match(/stack|recursion/i)||-2146828260===n.number)return console.warn("Warning: react-fast-compare does not handle circular references.",n.name,n.message),!1;throw n}}},66598:(e,t,n)=>{"use strict";n.d(t,{J:()=>g});var r={animationIterationCount:1,aspectRatio:1,borderImageOutset:1,borderImageSlice:1,borderImageWidth:1,boxFlex:1,boxFlexGroup:1,boxOrdinalGroup:1,columnCount:1,columns:1,flex:1,flexGrow:1,flexPositive:1,flexShrink:1,flexNegative:1,flexOrder:1,gridRow:1,gridRowEnd:1,gridRowSpan:1,gridRowStart:1,gridColumn:1,gridColumnEnd:1,gridColumnSpan:1,gridColumnStart:1,msGridRow:1,msGridRowSpan:1,msGridColumn:1,msGridColumnSpan:1,fontWeight:1,lineHeight:1,opacity:1,order:1,orphans:1,scale:1,tabSize:1,widows:1,zIndex:1,zoom:1,WebkitLineClamp:1,fillOpacity:1,floodOpacity:1,stopOpacity:1,strokeDasharray:1,strokeDashoffset:1,strokeMiterlimit:1,strokeOpacity:1,strokeWidth:1},i=n(30918),o=!1,a=/[A-Z]|^ms/g,s=/_EMO_([^_]+?)_([^]*?)_EMO_/g,l=function(e){return 45===e.charCodeAt(1)},c=function(e){return null!=e&&"boolean"!==typeof e},d=(0,i.A)(function(e){return l(e)?e:e.replace(a,"-$&").toLowerCase()}),u=function(e,t){switch(e){case"animation":case"animationName":if("string"===typeof t)return t.replace(s,function(e,t,n){return m={name:t,styles:n,next:m},t})}return 1===r[e]||l(e)||"number"!==typeof t||0===t?t:t+"px"},p="Component selectors can only be used in conjunction with @emotion/babel-plugin, the swc Emotion plugin, or another Emotion-aware compiler transform.";function h(e,t,n){if(null==n)return"";var r=n;if(void 0!==r.__emotion_styles)return r;switch(typeof n){case"boolean":return"";case"object":var i=n;if(1===i.anim)return m={name:i.name,styles:i.styles,next:m},i.name;var a=n;if(void 0!==a.styles){var s=a.next;if(void 0!==s)for(;void 0!==s;)m={name:s.name,styles:s.styles,next:m},s=s.next;return a.styles+";"}return function(e,t,n){var r="";if(Array.isArray(n))for(var i=0;i<n.length;i++)r+=h(e,t,n[i])+";";else for(var a in n){var s=n[a];if("object"!==typeof s){var l=s;null!=t&&void 0!==t[l]?r+=a+"{"+t[l]+"}":c(l)&&(r+=d(a)+":"+u(a,l)+";")}else{if("NO_COMPONENT_SELECTOR"===a&&o)throw new Error(p);if(!Array.isArray(s)||"string"!==typeof s[0]||null!=t&&void 0!==t[s[0]]){var m=h(e,t,s);switch(a){case"animation":case"animationName":r+=d(a)+":"+m+";";break;default:r+=a+"{"+m+"}"}}else for(var f=0;f<s.length;f++)c(s[f])&&(r+=d(a)+":"+u(a,s[f])+";")}}return r}(e,t,n);case"function":if(void 0!==e){var l=m,f=n(e);return m=l,h(e,t,f)}}var g=n;if(null==t)return g;var v=t[g];return void 0!==v?v:g}var m,f=/label:\s*([^\s;{]+)\s*(;|$)/g;function g(e,t,n){if(1===e.length&&"object"===typeof e[0]&&null!==e[0]&&void 0!==e[0].styles)return e[0];var r=!0,i="";m=void 0;var o=e[0];null==o||void 0===o.raw?(r=!1,i+=h(n,t,o)):i+=o[0];for(var a=1;a<e.length;a++){if(i+=h(n,t,e[a]),r)i+=o[a]}f.lastIndex=0;for(var s,l="";null!==(s=f.exec(i));)l+="-"+s[1];var c=function(e){for(var t,n=0,r=0,i=e.length;i>=4;++r,i-=4)t=1540483477*(65535&(t=255&e.charCodeAt(r)|(255&e.charCodeAt(++r))<<8|(255&e.charCodeAt(++r))<<16|(255&e.charCodeAt(++r))<<24))+(59797*(t>>>16)<<16),n=1540483477*(65535&(t^=t>>>24))+(59797*(t>>>16)<<16)^1540483477*(65535&n)+(59797*(n>>>16)<<16);switch(i){case 3:n^=(255&e.charCodeAt(r+2))<<16;case 2:n^=(255&e.charCodeAt(r+1))<<8;case 1:n=1540483477*(65535&(n^=255&e.charCodeAt(r)))+(59797*(n>>>16)<<16)}return(((n=1540483477*(65535&(n^=n>>>13))+(59797*(n>>>16)<<16))^n>>>15)>>>0).toString(36)}(i)+l;return{name:c,styles:i,next:m}}},66723:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=function(e,t){switch(e){case"P":return t.date({width:"short"});case"PP":return t.date({width:"medium"});case"PPP":return t.date({width:"long"});default:return t.date({width:"full"})}},r=function(e,t){switch(e){case"p":return t.time({width:"short"});case"pp":return t.time({width:"medium"});case"ppp":return t.time({width:"long"});default:return t.time({width:"full"})}},i={p:r,P:function(e,t){var i,o=e.match(/(P+)(p+)?/)||[],a=o[1],s=o[2];if(!s)return n(e,t);switch(a){case"P":i=t.dateTime({width:"short"});break;case"PP":i=t.dateTime({width:"medium"});break;case"PPP":i=t.dateTime({width:"long"});break;default:i=t.dateTime({width:"full"})}return i.replace("{{date}}",n(a,t)).replace("{{time}}",r(s,t))}};t.default=i,e.exports=t.default},66734:(e,t,n)=>{"use strict";n.d(t,{A:()=>s});var r=n(58168),i=n(65043),o=n(8122),a=n(70579);function s(e,t){function n(n,i){return(0,a.jsx)(o.A,(0,r.A)({"data-testid":"".concat(t,"Icon"),ref:i},n,{children:e}))}return n.muiName=o.A.muiName,i.memo(i.forwardRef(n))}},67266:(e,t,n)=>{"use strict";var r=n(24994);t.X4=h,t.e$=m,t.tL=g,t.eM=function(e,t){const n=p(e),r=p(t);return(Math.max(n,r)+.05)/(Math.min(n,r)+.05)},t.a=f;var i=r(n(10457)),o=r(n(6531));function a(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1;return(0,o.default)(e,t,n)}function s(e){e=e.slice(1);const t=new RegExp(".{1,".concat(e.length>=6?2:1,"}"),"g");let n=e.match(t);return n&&1===n[0].length&&(n=n.map(e=>e+e)),n?"rgb".concat(4===n.length?"a":"","(").concat(n.map((e,t)=>t<3?parseInt(e,16):Math.round(parseInt(e,16)/255*1e3)/1e3).join(", "),")"):""}function l(e){if(e.type)return e;if("#"===e.charAt(0))return l(s(e));const t=e.indexOf("("),n=e.substring(0,t);if(-1===["rgb","rgba","hsl","hsla","color"].indexOf(n))throw new Error((0,i.default)(9,e));let r,o=e.substring(t+1,e.length-1);if("color"===n){if(o=o.split(" "),r=o.shift(),4===o.length&&"/"===o[3].charAt(0)&&(o[3]=o[3].slice(1)),-1===["srgb","display-p3","a98-rgb","prophoto-rgb","rec-2020"].indexOf(r))throw new Error((0,i.default)(10,r))}else o=o.split(",");return o=o.map(e=>parseFloat(e)),{type:n,values:o,colorSpace:r}}const c=e=>{const t=l(e);return t.values.slice(0,3).map((e,n)=>-1!==t.type.indexOf("hsl")&&0!==n?"".concat(e,"%"):e).join(" ")};function d(e){const{type:t,colorSpace:n}=e;let{values:r}=e;return-1!==t.indexOf("rgb")?r=r.map((e,t)=>t<3?parseInt(e,10):e):-1!==t.indexOf("hsl")&&(r[1]="".concat(r[1],"%"),r[2]="".concat(r[2],"%")),r=-1!==t.indexOf("color")?"".concat(n," ").concat(r.join(" ")):"".concat(r.join(", ")),"".concat(t,"(").concat(r,")")}function u(e){e=l(e);const{values:t}=e,n=t[0],r=t[1]/100,i=t[2]/100,o=r*Math.min(i,1-i),a=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:(e+n/30)%12;return i-o*Math.max(Math.min(t-3,9-t,1),-1)};let s="rgb";const c=[Math.round(255*a(0)),Math.round(255*a(8)),Math.round(255*a(4))];return"hsla"===e.type&&(s+="a",c.push(t[3])),d({type:s,values:c})}function p(e){let t="hsl"===(e=l(e)).type||"hsla"===e.type?l(u(e)).values:e.values;return t=t.map(t=>("color"!==e.type&&(t/=255),t<=.03928?t/12.92:((t+.055)/1.055)**2.4)),Number((.2126*t[0]+.7152*t[1]+.0722*t[2]).toFixed(3))}function h(e,t){return e=l(e),t=a(t),"rgb"!==e.type&&"hsl"!==e.type||(e.type+="a"),"color"===e.type?e.values[3]="/".concat(t):e.values[3]=t,d(e)}function m(e,t){if(e=l(e),t=a(t),-1!==e.type.indexOf("hsl"))e.values[2]*=1-t;else if(-1!==e.type.indexOf("rgb")||-1!==e.type.indexOf("color"))for(let n=0;n<3;n+=1)e.values[n]*=1-t;return d(e)}function f(e,t){if(e=l(e),t=a(t),-1!==e.type.indexOf("hsl"))e.values[2]+=(100-e.values[2])*t;else if(-1!==e.type.indexOf("rgb"))for(let n=0;n<3;n+=1)e.values[n]+=(255-e.values[n])*t;else if(-1!==e.type.indexOf("color"))for(let n=0;n<3;n+=1)e.values[n]+=(1-e.values[n])*t;return d(e)}function g(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:.15;return p(e)>.5?m(e,t):f(e,t)}},67395:(e,t,n)=>{"use strict";var r=n(24994);t.A=void 0;var i=r(n(40039)),o=n(70579);t.A=(0,i.default)((0,o.jsx)("path",{d:"M3 10h11v2H3zm0-4h11v2H3zm0 8h7v2H3zm17.59-2.07-4.25 4.24-2.12-2.12-1.41 1.41L16.34 19 22 13.34z"}),"PlaylistAddCheck")},67445:(e,t,n)=>{"use strict";var r=n(24994);t.A=void 0;var i=r(n(40039)),o=n(70579);t.A=(0,i.default)((0,o.jsx)("path",{d:"M14 12c0-1.1-.9-2-2-2s-2 .9-2 2 .9 2 2 2 2-.9 2-2m-2-9c-4.97 0-9 4.03-9 9H0l4 4 4-4H5c0-3.87 3.13-7 7-7s7 3.13 7 7-3.13 7-7 7c-1.51 0-2.91-.49-4.06-1.3l-1.42 1.44C8.04 20.3 9.94 21 12 21c4.97 0 9-4.03 9-9s-4.03-9-9-9"}),"SettingsBackupRestore")},67500:(e,t,n)=>{"use strict";var r=n(24994);t.A=void 0;var i=r(n(40039)),o=n(70579);t.A=(0,i.default)((0,o.jsx)("path",{d:"M9 16.2 4.8 12l-1.4 1.4L9 19 21 7l-1.4-1.4z"}),"Done")},67598:(e,t,n)=>{"use strict";n.d(t,{A:()=>i});var r=n(17868);function i(e){if("string"!==typeof e)throw new Error((0,r.A)(7));return e.charAt(0).toUpperCase()+e.slice(1)}},68182:(e,t,n)=>{var r=n(72070),i=n(75713),o=n(52074),a=r&&1/o(new r([,-0]))[1]==1/0?function(e){return new r(e)}:i;e.exports=a},68592:(e,t,n)=>{var r=n(4262),i=n(56326),o=n(30474);e.exports=function(e){return r(e,o,i)}},68859:(e,t,n)=>{e=n.nmd(e),ace.define("ace/mode/jsdoc_comment_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text_highlight_rules").TextHighlightRules,o=function(){this.$rules={start:[{token:["comment.doc.tag","comment.doc.text","lparen.doc"],regex:"(@(?:param|member|typedef|property|namespace|var|const|callback))(\\s*)({)",push:[{token:"lparen.doc",regex:"{",push:[{include:"doc-syntax"},{token:"rparen.doc",regex:"}|(?=$)",next:"pop"}]},{token:["rparen.doc","text.doc","variable.parameter.doc","lparen.doc","variable.parameter.doc","rparen.doc"],regex:/(})(\s*)(?:([\w=:\/\.]+)|(?:(\[)([\w=:\/\.\-\'\" ]+)(\])))/,next:"pop"},{token:"rparen.doc",regex:"}|(?=$)",next:"pop"},{include:"doc-syntax"},{defaultToken:"text.doc"}]},{token:["comment.doc.tag","text.doc","lparen.doc"],regex:"(@(?:returns?|yields|type|this|suppress|public|protected|private|package|modifies|implements|external|exception|throws|enum|define|extends))(\\s*)({)",push:[{token:"lparen.doc",regex:"{",push:[{include:"doc-syntax"},{token:"rparen.doc",regex:"}|(?=$)",next:"pop"}]},{token:"rparen.doc",regex:"}|(?=$)",next:"pop"},{include:"doc-syntax"},{defaultToken:"text.doc"}]},{token:["comment.doc.tag","text.doc","variable.parameter.doc"],regex:'(@(?:alias|memberof|instance|module|name|lends|namespace|external|this|template|requires|param|implements|function|extends|typedef|mixes|constructor|var|memberof\\!|event|listens|exports|class|constructs|interface|emits|fires|throws|const|callback|borrows|augments))(\\s+)(\\w[\\w#.:/~"\\-]*)?'},{token:["comment.doc.tag","text.doc","variable.parameter.doc"],regex:"(@method)(\\s+)(\\w[\\w.\\(\\)]*)"},{token:"comment.doc.tag",regex:"@access\\s+(?:private|public|protected)"},{token:"comment.doc.tag",regex:"@kind\\s+(?:class|constant|event|external|file|function|member|mixin|module|namespace|typedef)"},{token:"comment.doc.tag",regex:"@\\w+(?=\\s|$)"},o.getTagRule(),{defaultToken:"comment.doc.body",caseInsensitive:!0}],"doc-syntax":[{token:"operator.doc",regex:/[|:]/},{token:"paren.doc",regex:/[\[\]]/}]},this.normalizeRules()};r.inherits(o,i),o.getTagRule=function(e){return{token:"comment.doc.tag.storage.type",regex:"\\b(?:TODO|FIXME|XXX|HACK)\\b"}},o.getStartRule=function(e){return{token:"comment.doc",regex:/\/\*\*(?!\/)/,next:e}},o.getEndRule=function(e){return{token:"comment.doc",regex:"\\*\\/",next:e}},t.JsDocCommentHighlightRules=o}),ace.define("ace/mode/javascript_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/jsdoc_comment_highlight_rules","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./jsdoc_comment_highlight_rules").JsDocCommentHighlightRules,o=e("./text_highlight_rules").TextHighlightRules,a="[a-zA-Z\\$_\xa1-\uffff][a-zA-Z\\d\\$_\xa1-\uffff]*",s=function(e){var t={"variable.language":"Array|Boolean|Date|Function|Iterator|Number|Object|RegExp|String|Proxy|Symbol|Namespace|QName|XML|XMLList|ArrayBuffer|Float32Array|Float64Array|Int16Array|Int32Array|Int8Array|Uint16Array|Uint32Array|Uint8Array|Uint8ClampedArray|Error|EvalError|InternalError|RangeError|ReferenceError|StopIteration|SyntaxError|TypeError|URIError|decodeURI|decodeURIComponent|encodeURI|encodeURIComponent|eval|isFinite|isNaN|parseFloat|parseInt|JSON|Math|this|arguments|prototype|window|document",keyword:"const|yield|import|get|set|async|await|break|case|catch|continue|default|delete|do|else|finally|for|if|in|of|instanceof|new|return|switch|throw|try|typeof|let|var|while|with|debugger|__parent__|__count__|escape|unescape|with|__proto__|class|enum|extends|super|export|implements|private|public|interface|package|protected|static|constructor","storage.type":"const|let|var|function","constant.language":"null|Infinity|NaN|undefined","support.function":"alert","constant.language.boolean":"true|false"},n=this.createKeywordMapper(t,"identifier"),r="\\\\(?:x[0-9a-fA-F]{2}|u[0-9a-fA-F]{4}|u{[0-9a-fA-F]{1,6}}|[0-2][0-7]{0,2}|3[0-7][0-7]?|[4-7][0-7]?|.)",o="(function)(\\s*)(\\*?)",s={token:["identifier","text","paren.lparen"],regex:"(\\b(?!"+Object.values(t).join("|")+"\\b)"+a+")(\\s*)(\\()"};this.$rules={no_regex:[i.getStartRule("doc-start"),c("no_regex"),s,{token:"string",regex:"'(?=.)",next:"qstring"},{token:"string",regex:'"(?=.)',next:"qqstring"},{token:"constant.numeric",regex:/0(?:[xX][0-9a-fA-F]+|[oO][0-7]+|[bB][01]+)\b/},{token:"constant.numeric",regex:/(?:\d\d*(?:\.\d*)?|\.\d+)(?:[eE][+-]?\d+\b)?/},{token:["entity.name.function","text","keyword.operator","text","storage.type","text","storage.type","text","paren.lparen"],regex:"("+a+")(\\s*)(=)(\\s*)"+o+"(\\s*)(\\()",next:"function_arguments"},{token:["storage.type","text","storage.type","text","text","entity.name.function","text","paren.lparen"],regex:"(function)(?:(?:(\\s*)(\\*)(\\s*))|(\\s+))("+a+")(\\s*)(\\()",next:"function_arguments"},{token:["entity.name.function","text","punctuation.operator","text","storage.type","text","storage.type","text","paren.lparen"],regex:"("+a+")(\\s*)(:)(\\s*)"+o+"(\\s*)(\\()",next:"function_arguments"},{token:["text","text","storage.type","text","storage.type","text","paren.lparen"],regex:"(:)(\\s*)"+o+"(\\s*)(\\()",next:"function_arguments"},{token:"keyword",regex:"from(?=\\s*('|\"))"},{token:"keyword",regex:"(?:case|do|else|finally|in|instanceof|return|throw|try|typeof|yield|void)\\b",next:"start"},{token:"support.constant",regex:/that\b/},{token:["storage.type","punctuation.operator","support.function.firebug"],regex:/(console)(\.)(warn|info|log|error|debug|time|trace|timeEnd|assert)\b/},{token:n,regex:a},{token:"punctuation.operator",regex:/[.](?![.])/,next:"property"},{token:"storage.type",regex:/=>/,next:"start"},{token:"keyword.operator",regex:/--|\+\+|\.{3}|===|==|=|!=|!==|<+=?|>+=?|!|&&|\|\||\?:|[!$%&*+\-~\/^]=?/,next:"start"},{token:"punctuation.operator",regex:/[?:,;.]/,next:"start"},{token:"paren.lparen",regex:/[\[({]/,next:"start"},{token:"paren.rparen",regex:/[\])}]/},{token:"comment",regex:/^#!.*$/}],property:[{token:"text",regex:"\\s+"},{token:"keyword.operator",regex:/=/},{token:["storage.type","text","storage.type","text","paren.lparen"],regex:o+"(\\s*)(\\()",next:"function_arguments"},{token:["storage.type","text","storage.type","text","text","entity.name.function","text","paren.lparen"],regex:"(function)(?:(?:(\\s*)(\\*)(\\s*))|(\\s+))(\\w+)(\\s*)(\\()",next:"function_arguments"},{token:"punctuation.operator",regex:/[.](?![.])/},{token:"support.function",regex:"prototype"},{token:"support.function",regex:/(s(?:h(?:ift|ow(?:Mod(?:elessDialog|alDialog)|Help))|croll(?:X|By(?:Pages|Lines)?|Y|To)?|t(?:op|rike)|i(?:n|zeToContent|debar|gnText)|ort|u(?:p|b(?:str(?:ing)?)?)|pli(?:ce|t)|e(?:nd|t(?:Re(?:sizable|questHeader)|M(?:i(?:nutes|lliseconds)|onth)|Seconds|Ho(?:tKeys|urs)|Year|Cursor|Time(?:out)?|Interval|ZOptions|Date|UTC(?:M(?:i(?:nutes|lliseconds)|onth)|Seconds|Hours|Date|FullYear)|FullYear|Active)|arch)|qrt|lice|avePreferences|mall)|h(?:ome|andleEvent)|navigate|c(?:har(?:CodeAt|At)|o(?:s|n(?:cat|textual|firm)|mpile)|eil|lear(?:Timeout|Interval)?|a(?:ptureEvents|ll)|reate(?:StyleSheet|Popup|EventObject))|t(?:o(?:GMTString|S(?:tring|ource)|U(?:TCString|pperCase)|Lo(?:caleString|werCase))|est|a(?:n|int(?:Enabled)?))|i(?:s(?:NaN|Finite)|ndexOf|talics)|d(?:isableExternalCapture|ump|etachEvent)|u(?:n(?:shift|taint|escape|watch)|pdateCommands)|j(?:oin|avaEnabled)|p(?:o(?:p|w)|ush|lugins.refresh|a(?:ddings|rse(?:Int|Float)?)|r(?:int|ompt|eference))|e(?:scape|nableExternalCapture|val|lementFromPoint|x(?:p|ec(?:Script|Command)?))|valueOf|UTC|queryCommand(?:State|Indeterm|Enabled|Value)|f(?:i(?:nd|lter|le(?:ModifiedDate|Size|CreatedDate|UpdatedDate)|xed)|o(?:nt(?:size|color)|rward|rEach)|loor|romCharCode)|watch|l(?:ink|o(?:ad|g)|astIndexOf)|a(?:sin|nchor|cos|t(?:tachEvent|ob|an(?:2)?)|pply|lert|b(?:s|ort))|r(?:ou(?:nd|teEvents)|e(?:size(?:By|To)|calc|turnValue|place|verse|l(?:oad|ease(?:Capture|Events)))|andom)|g(?:o|et(?:ResponseHeader|M(?:i(?:nutes|lliseconds)|onth)|Se(?:conds|lection)|Hours|Year|Time(?:zoneOffset)?|Da(?:y|te)|UTC(?:M(?:i(?:nutes|lliseconds)|onth)|Seconds|Hours|Da(?:y|te)|FullYear)|FullYear|A(?:ttention|llResponseHeaders)))|m(?:in|ove(?:B(?:y|elow)|To(?:Absolute)?|Above)|ergeAttributes|a(?:tch|rgins|x))|b(?:toa|ig|o(?:ld|rderWidths)|link|ack))\b(?=\()/},{token:"support.function.dom",regex:/(s(?:ub(?:stringData|mit)|plitText|e(?:t(?:NamedItem|Attribute(?:Node)?)|lect))|has(?:ChildNodes|Feature)|namedItem|c(?:l(?:ick|o(?:se|neNode))|reate(?:C(?:omment|DATASection|aption)|T(?:Head|extNode|Foot)|DocumentFragment|ProcessingInstruction|E(?:ntityReference|lement)|Attribute))|tabIndex|i(?:nsert(?:Row|Before|Cell|Data)|tem)|open|delete(?:Row|C(?:ell|aption)|T(?:Head|Foot)|Data)|focus|write(?:ln)?|a(?:dd|ppend(?:Child|Data))|re(?:set|place(?:Child|Data)|move(?:NamedItem|Child|Attribute(?:Node)?)?)|get(?:NamedItem|Element(?:sBy(?:Name|TagName|ClassName)|ById)|Attribute(?:Node)?)|blur)\b(?=\()/},{token:"support.constant",regex:/(s(?:ystemLanguage|cr(?:ipts|ollbars|een(?:X|Y|Top|Left))|t(?:yle(?:Sheets)?|atus(?:Text|bar)?)|ibling(?:Below|Above)|ource|uffixes|e(?:curity(?:Policy)?|l(?:ection|f)))|h(?:istory|ost(?:name)?|as(?:h|Focus))|y|X(?:MLDocument|SLDocument)|n(?:ext|ame(?:space(?:s|URI)|Prop))|M(?:IN_VALUE|AX_VALUE)|c(?:haracterSet|o(?:n(?:structor|trollers)|okieEnabled|lorDepth|mp(?:onents|lete))|urrent|puClass|l(?:i(?:p(?:boardData)?|entInformation)|osed|asses)|alle(?:e|r)|rypto)|t(?:o(?:olbar|p)|ext(?:Transform|Indent|Decoration|Align)|ags)|SQRT(?:1_2|2)|i(?:n(?:ner(?:Height|Width)|put)|ds|gnoreCase)|zIndex|o(?:scpu|n(?:readystatechange|Line)|uter(?:Height|Width)|p(?:sProfile|ener)|ffscreenBuffering)|NEGATIVE_INFINITY|d(?:i(?:splay|alog(?:Height|Top|Width|Left|Arguments)|rectories)|e(?:scription|fault(?:Status|Ch(?:ecked|arset)|View)))|u(?:ser(?:Profile|Language|Agent)|n(?:iqueID|defined)|pdateInterval)|_content|p(?:ixelDepth|ort|ersonalbar|kcs11|l(?:ugins|atform)|a(?:thname|dding(?:Right|Bottom|Top|Left)|rent(?:Window|Layer)?|ge(?:X(?:Offset)?|Y(?:Offset)?))|r(?:o(?:to(?:col|type)|duct(?:Sub)?|mpter)|e(?:vious|fix)))|e(?:n(?:coding|abledPlugin)|x(?:ternal|pando)|mbeds)|v(?:isibility|endor(?:Sub)?|Linkcolor)|URLUnencoded|P(?:I|OSITIVE_INFINITY)|f(?:ilename|o(?:nt(?:Size|Family|Weight)|rmName)|rame(?:s|Element)|gColor)|E|whiteSpace|l(?:i(?:stStyleType|n(?:eHeight|kColor))|o(?:ca(?:tion(?:bar)?|lName)|wsrc)|e(?:ngth|ft(?:Context)?)|a(?:st(?:M(?:odified|atch)|Index|Paren)|yer(?:s|X)|nguage))|a(?:pp(?:MinorVersion|Name|Co(?:deName|re)|Version)|vail(?:Height|Top|Width|Left)|ll|r(?:ity|guments)|Linkcolor|bove)|r(?:ight(?:Context)?|e(?:sponse(?:XML|Text)|adyState))|global|x|m(?:imeTypes|ultiline|enubar|argin(?:Right|Bottom|Top|Left))|L(?:N(?:10|2)|OG(?:10E|2E))|b(?:o(?:ttom|rder(?:Width|RightWidth|BottomWidth|Style|Color|TopWidth|LeftWidth))|ufferDepth|elow|ackground(?:Color|Image)))\b/},{token:"identifier",regex:a},{regex:"",token:"empty",next:"no_regex"}],start:[i.getStartRule("doc-start"),c("start"),{token:"string.regexp",regex:"\\/",next:"regex"},{token:"text",regex:"\\s+|^$",next:"start"},{token:"empty",regex:"",next:"no_regex"}],regex:[{token:"regexp.keyword.operator",regex:"\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)"},{token:"string.regexp",regex:"/[sxngimy]*",next:"no_regex"},{token:"invalid",regex:/\{\d+\b,?\d*\}[+*]|[+*$^?][+*]|[$^][?]|\?{3,}/},{token:"constant.language.escape",regex:/\(\?[:=!]|\)|\{\d+\b,?\d*\}|[+*]\?|[()$^+*?.]/},{token:"constant.language.delimiter",regex:/\|/},{token:"constant.language.escape",regex:/\[\^?/,next:"regex_character_class"},{token:"empty",regex:"$",next:"no_regex"},{defaultToken:"string.regexp"}],regex_character_class:[{token:"regexp.charclass.keyword.operator",regex:"\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)"},{token:"constant.language.escape",regex:"]",next:"regex"},{token:"constant.language.escape",regex:"-"},{token:"empty",regex:"$",next:"no_regex"},{defaultToken:"string.regexp.charachterclass"}],default_parameter:[{token:"string",regex:"'(?=.)",push:[{token:"string",regex:"'|$",next:"pop"},{include:"qstring"}]},{token:"string",regex:'"(?=.)',push:[{token:"string",regex:'"|$',next:"pop"},{include:"qqstring"}]},{token:"constant.language",regex:"null|Infinity|NaN|undefined"},{token:"constant.numeric",regex:/0(?:[xX][0-9a-fA-F]+|[oO][0-7]+|[bB][01]+)\b/},{token:"constant.numeric",regex:/(?:\d\d*(?:\.\d*)?|\.\d+)(?:[eE][+-]?\d+\b)?/},{token:"punctuation.operator",regex:",",next:"function_arguments"},{token:"text",regex:"\\s+"},{token:"punctuation.operator",regex:"$"},{token:"empty",regex:"",next:"no_regex"}],function_arguments:[c("function_arguments"),{token:"variable.parameter",regex:a},{token:"punctuation.operator",regex:","},{token:"text",regex:"\\s+"},{token:"punctuation.operator",regex:"$"},{token:"empty",regex:"",next:"no_regex"}],qqstring:[{token:"constant.language.escape",regex:r},{token:"string",regex:"\\\\$",consumeLineEnd:!0},{token:"string",regex:'"|$',next:"no_regex"},{defaultToken:"string"}],qstring:[{token:"constant.language.escape",regex:r},{token:"string",regex:"\\\\$",consumeLineEnd:!0},{token:"string",regex:"'|$",next:"no_regex"},{defaultToken:"string"}]},e&&e.noES6||(this.$rules.no_regex.unshift({regex:"[{}]",onMatch:function(e,t,n){if(this.next="{"==e?this.nextState:"","{"==e&&n.length)n.unshift("start",t);else if("}"==e&&n.length&&(n.shift(),this.next=n.shift(),-1!=this.next.indexOf("string")||-1!=this.next.indexOf("jsx")))return"paren.quasi.end";return"{"==e?"paren.lparen":"paren.rparen"},nextState:"start"},{token:"string.quasi.start",regex:/`/,push:[{token:"constant.language.escape",regex:r},{token:"paren.quasi.start",regex:/\${/,push:"start"},{token:"string.quasi.end",regex:/`/,next:"pop"},{defaultToken:"string.quasi"}]},{token:["variable.parameter","text"],regex:"("+a+")(\\s*)(?=\\=>)"},{token:"paren.lparen",regex:"(\\()(?=[^\\(]+\\s*=>)",next:"function_arguments"},{token:"variable.language",regex:"(?:(?:(?:Weak)?(?:Set|Map))|Promise)\\b"}),this.$rules.function_arguments.unshift({token:"keyword.operator",regex:"=",next:"default_parameter"},{token:"keyword.operator",regex:"\\.{3}"}),this.$rules.property.unshift({token:"support.function",regex:"(findIndex|repeat|startsWith|endsWith|includes|isSafeInteger|trunc|cbrt|log2|log10|sign|then|catch|finally|resolve|reject|race|any|all|allSettled|keys|entries|isInteger)\\b(?=\\()"},{token:"constant.language",regex:"(?:MAX_SAFE_INTEGER|MIN_SAFE_INTEGER|EPSILON)\\b"}),e&&0==e.jsx||l.call(this)),this.embedRules(i,"doc-",[i.getEndRule("no_regex")]),this.normalizeRules()};function l(){var e=a.replace("\\d","\\d\\-"),t={onMatch:function(e,t,n){var r="/"==e.charAt(1)?2:1;return 1==r?(t!=this.nextState?n.unshift(this.next,this.nextState,0):n.unshift(this.next),n[2]++):2==r&&t==this.nextState&&(n[1]--,(!n[1]||n[1]<0)&&(n.shift(),n.shift())),[{type:"meta.tag.punctuation."+(1==r?"":"end-")+"tag-open.xml",value:e.slice(0,r)},{type:"meta.tag.tag-name.xml",value:e.substr(r)}]},regex:"</?(?:"+e+"|(?=>))",next:"jsxAttributes",nextState:"jsx"};this.$rules.start.unshift(t);var n={regex:"{",token:"paren.quasi.start",push:"start"};this.$rules.jsx=[n,t,{include:"reference"},{defaultToken:"string.xml"}],this.$rules.jsxAttributes=[{token:"meta.tag.punctuation.tag-close.xml",regex:"/?>",onMatch:function(e,t,n){return t==n[0]&&n.shift(),2==e.length&&(n[0]==this.nextState&&n[1]--,(!n[1]||n[1]<0)&&n.splice(0,2)),this.next=n[0]||"start",[{type:this.token,value:e}]},nextState:"jsx"},n,c("jsxAttributes"),{token:"entity.other.attribute-name.xml",regex:e},{token:"keyword.operator.attribute-equals.xml",regex:"="},{token:"text.tag-whitespace.xml",regex:"\\s+"},{token:"string.attribute-value.xml",regex:"'",stateName:"jsx_attr_q",push:[{token:"string.attribute-value.xml",regex:"'",next:"pop"},{include:"reference"},{defaultToken:"string.attribute-value.xml"}]},{token:"string.attribute-value.xml",regex:'"',stateName:"jsx_attr_qq",push:[{token:"string.attribute-value.xml",regex:'"',next:"pop"},{include:"reference"},{defaultToken:"string.attribute-value.xml"}]},t],this.$rules.reference=[{token:"constant.language.escape.reference.xml",regex:"(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)"}]}function c(e){return[{token:"comment",regex:/\/\*/,next:[i.getTagRule(),{token:"comment",regex:"\\*\\/",next:e||"pop"},{defaultToken:"comment",caseInsensitive:!0}]},{token:"comment",regex:"\\/\\/",next:[i.getTagRule(),{token:"comment",regex:"$|^",next:e||"pop"},{defaultToken:"comment",caseInsensitive:!0}]}]}r.inherits(s,o),t.JavaScriptHighlightRules=s}),ace.define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"],function(e,t,n){"use strict";var r=e("../range").Range,i=function(){};(function(){this.checkOutdent=function(e,t){return!!/^\s+$/.test(e)&&/^\s*\}/.test(t)},this.autoOutdent=function(e,t){var n=e.getLine(t).match(/^(\s*\})/);if(!n)return 0;var i=n[1].length,o=e.findMatchingBracket({row:t,column:i});if(!o||o.row==t)return 0;var a=this.$getIndent(e.getLine(o.row));e.replace(new r(t,0,t,i-1),a)},this.$getIndent=function(e){return e.match(/^\s*/)[0]}}).call(i.prototype),t.MatchingBraceOutdent=i}),ace.define("ace/mode/behaviour/xml",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/token_iterator"],function(e,t,n){"use strict";var r=e("../../lib/oop"),i=e("../behaviour").Behaviour,o=e("../../token_iterator").TokenIterator;function a(e,t){return e&&e.type.lastIndexOf(t+".xml")>-1}var s=function(){this.add("string_dquotes","insertion",function(e,t,n,r,i){if('"'==i||"'"==i){var s=i,l=r.doc.getTextRange(n.getSelectionRange());if(""!==l&&"'"!==l&&'"'!=l&&n.getWrapBehavioursEnabled())return{text:s+l+s,selection:!1};var c=n.getCursorPosition(),d=r.doc.getLine(c.row).substring(c.column,c.column+1),u=new o(r,c.row,c.column),p=u.getCurrentToken();if(d==s&&(a(p,"attribute-value")||a(p,"string")))return{text:"",selection:[1,1]};if(p||(p=u.stepBackward()),!p)return;for(;a(p,"tag-whitespace")||a(p,"whitespace");)p=u.stepBackward();var h=!d||d.match(/\s/);if(a(p,"attribute-equals")&&(h||">"==d)||a(p,"decl-attribute-equals")&&(h||"?"==d))return{text:s+s,selection:[1,1]}}}),this.add("string_dquotes","deletion",function(e,t,n,r,i){var o=r.doc.getTextRange(i);if(!i.isMultiLine()&&('"'==o||"'"==o)&&r.doc.getLine(i.start.row).substring(i.start.column+1,i.start.column+2)==o)return i.end.column++,i}),this.add("autoclosing","insertion",function(e,t,n,r,i){if(">"==i){var s=n.getSelectionRange().start,l=new o(r,s.row,s.column),c=l.getCurrentToken()||l.stepBackward();if(!c||!(a(c,"tag-name")||a(c,"tag-whitespace")||a(c,"attribute-name")||a(c,"attribute-equals")||a(c,"attribute-value")))return;if(a(c,"reference.attribute-value"))return;if(a(c,"attribute-value")){var d=l.getCurrentTokenColumn()+c.value.length;if(s.column<d)return;if(s.column==d){var u=l.stepForward();if(u&&a(u,"attribute-value"))return;l.stepBackward()}}if(/^\s*>/.test(r.getLine(s.row).slice(s.column)))return;for(;!a(c,"tag-name");)if("<"==(c=l.stepBackward()).value){c=l.stepForward();break}var p=l.getCurrentTokenRow(),h=l.getCurrentTokenColumn();if(a(l.stepBackward(),"end-tag-open"))return;var m=c.value;if(p==s.row&&(m=m.substring(0,s.column-h)),this.voidElements&&this.voidElements.hasOwnProperty(m.toLowerCase()))return;return{text:"></"+m+">",selection:[1,1]}}}),this.add("autoindent","insertion",function(e,t,n,r,i){if("\n"==i){var s=n.getCursorPosition(),l=r.getLine(s.row),c=new o(r,s.row,s.column),d=c.getCurrentToken();if(a(d,"")&&-1!==d.type.indexOf("tag-close")){if("/>"==d.value)return;for(;d&&-1===d.type.indexOf("tag-name");)d=c.stepBackward();if(!d)return;var u=d.value,p=c.getCurrentTokenRow();if(!(d=c.stepBackward())||-1!==d.type.indexOf("end-tag"))return;if(this.voidElements&&!this.voidElements[u]||!this.voidElements){var h=r.getTokenAt(s.row,s.column+1),m=(l=r.getLine(p),this.$getIndent(l)),f=m+r.getTabString();return h&&"</"===h.value?{text:"\n"+f+"\n"+m,selection:[1,f.length,1,f.length]}:{text:"\n"+f}}}}})};r.inherits(s,i),t.XmlBehaviour=s}),ace.define("ace/mode/behaviour/javascript",["require","exports","module","ace/lib/oop","ace/token_iterator","ace/mode/behaviour/cstyle","ace/mode/behaviour/xml"],function(e,t,n){"use strict";var r=e("../../lib/oop"),i=e("../../token_iterator").TokenIterator,o=e("../behaviour/cstyle").CstyleBehaviour,a=e("../behaviour/xml").XmlBehaviour,s=function(){var e=new a({closeCurlyBraces:!0}).getBehaviours();this.addBehaviours(e),this.inherit(o),this.add("autoclosing-fragment","insertion",function(e,t,n,r,o){if(">"==o){var a=n.getSelectionRange().start,s=new i(r,a.row,a.column),l=s.getCurrentToken()||s.stepBackward();if(!l)return;if("<"==l.value)return{text:"></>",selection:[1,1]}}})};r.inherits(s,o),t.JavaScriptBehaviour=s}),ace.define("ace/mode/folding/xml",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"],function(e,t,n){"use strict";var r=e("../../lib/oop"),i=e("../../range").Range,o=e("./fold_mode").FoldMode,a=t.FoldMode=function(e,t){o.call(this),this.voidElements=e||{},this.optionalEndTags=r.mixin({},this.voidElements),t&&r.mixin(this.optionalEndTags,t)};r.inherits(a,o);var s=function(){this.tagName="",this.closing=!1,this.selfClosing=!1,this.start={row:0,column:0},this.end={row:0,column:0}};function l(e,t){return e&&e.type&&e.type.lastIndexOf(t+".xml")>-1}(function(){this.getFoldWidget=function(e,t,n){var r=this._getFirstTagInLine(e,n);return r?r.closing||!r.tagName&&r.selfClosing?"markbeginend"===t?"end":"":!r.tagName||r.selfClosing||this.voidElements.hasOwnProperty(r.tagName.toLowerCase())||this._findEndTagInLine(e,n,r.tagName,r.end.column)?"":"start":this.getCommentFoldWidget(e,n)},this.getCommentFoldWidget=function(e,t){return/comment/.test(e.getState(t))&&/<!-/.test(e.getLine(t))?"start":""},this._getFirstTagInLine=function(e,t){for(var n=e.getTokens(t),r=new s,i=0;i<n.length;i++){var o=n[i];if(l(o,"tag-open")){if(r.end.column=r.start.column+o.value.length,r.closing=l(o,"end-tag-open"),!(o=n[++i]))return null;if(r.tagName=o.value,""===o.value){if(!(o=n[++i]))return null;r.tagName=o.value}for(r.end.column+=o.value.length,i++;i<n.length;i++)if(o=n[i],r.end.column+=o.value.length,l(o,"tag-close")){r.selfClosing="/>"==o.value;break}return r}if(l(o,"tag-close"))return r.selfClosing="/>"==o.value,r;r.start.column+=o.value.length}return null},this._findEndTagInLine=function(e,t,n,r){for(var i=e.getTokens(t),o=0,a=0;a<i.length;a++){var s=i[a];if(!((o+=s.value.length)<r-1)&&l(s,"end-tag-open")&&(l(s=i[a+1],"tag-name")&&""===s.value&&(s=i[a+2]),s&&s.value==n))return!0}return!1},this.getFoldWidgetRange=function(e,t,n){if(!this._getFirstTagInLine(e,n))return this.getCommentFoldWidget(e,n)&&e.getCommentFoldRange(n,e.getLine(n).length);var r=e.getMatchingTags({row:n,column:0});return r?new i(r.openTag.end.row,r.openTag.end.column,r.closeTag.start.row,r.closeTag.start.column):void 0}}).call(a.prototype)}),ace.define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"],function(e,t,n){"use strict";var r=e("../../lib/oop"),i=e("../../range").Range,o=e("./fold_mode").FoldMode,a=t.FoldMode=function(e){e&&(this.foldingStartMarker=new RegExp(this.foldingStartMarker.source.replace(/\|[^|]*?$/,"|"+e.start)),this.foldingStopMarker=new RegExp(this.foldingStopMarker.source.replace(/\|[^|]*?$/,"|"+e.end)))};r.inherits(a,o),function(){this.foldingStartMarker=/([\{\[\(])[^\}\]\)]*$|^\s*(\/\*)/,this.foldingStopMarker=/^[^\[\{\(]*([\}\]\)])|^[\s\*]*(\*\/)/,this.singleLineBlockCommentRe=/^\s*(\/\*).*\*\/\s*$/,this.tripleStarBlockCommentRe=/^\s*(\/\*\*\*).*\*\/\s*$/,this.startRegionRe=/^\s*(\/\*|\/\/)#?region\b/,this._getFoldWidgetBase=this.getFoldWidget,this.getFoldWidget=function(e,t,n){var r=e.getLine(n);if(this.singleLineBlockCommentRe.test(r)&&!this.startRegionRe.test(r)&&!this.tripleStarBlockCommentRe.test(r))return"";var i=this._getFoldWidgetBase(e,t,n);return!i&&this.startRegionRe.test(r)?"start":i},this.getFoldWidgetRange=function(e,t,n,r){var i,o=e.getLine(n);if(this.startRegionRe.test(o))return this.getCommentRegionBlock(e,o,n);if(i=o.match(this.foldingStartMarker)){var a=i.index;if(i[1])return this.openingBracketBlock(e,i[1],n,a);var s=e.getCommentFoldRange(n,a+i[0].length,1);return s&&!s.isMultiLine()&&(r?s=this.getSectionRange(e,n):"all"!=t&&(s=null)),s}if("markbegin"!==t&&(i=o.match(this.foldingStopMarker))){a=i.index+i[0].length;return i[1]?this.closingBracketBlock(e,i[1],n,a):e.getCommentFoldRange(n,a,-1)}},this.getSectionRange=function(e,t){for(var n=e.getLine(t),r=n.search(/\S/),o=t,a=n.length,s=t+=1,l=e.getLength();++t<l;){var c=(n=e.getLine(t)).search(/\S/);if(-1!==c){if(r>c)break;var d=this.getFoldWidgetRange(e,"all",t);if(d){if(d.start.row<=o)break;if(d.isMultiLine())t=d.end.row;else if(r==c)break}s=t}}return new i(o,a,s,e.getLine(s).length)},this.getCommentRegionBlock=function(e,t,n){for(var r=t.search(/\s*$/),o=e.getLength(),a=n,s=/^\s*(?:\/\*|\/\/|--)#?(end)?region\b/,l=1;++n<o;){t=e.getLine(n);var c=s.exec(t);if(c&&(c[1]?l--:l++,!l))break}if(n>a)return new i(a,r,n,t.length)}}.call(a.prototype)}),ace.define("ace/mode/folding/javascript",["require","exports","module","ace/lib/oop","ace/mode/folding/xml","ace/mode/folding/cstyle"],function(e,t,n){"use strict";var r=e("../../lib/oop"),i=e("./xml").FoldMode,o=e("./cstyle").FoldMode,a=t.FoldMode=function(e){e&&(this.foldingStartMarker=new RegExp(this.foldingStartMarker.source.replace(/\|[^|]*?$/,"|"+e.start)),this.foldingStopMarker=new RegExp(this.foldingStopMarker.source.replace(/\|[^|]*?$/,"|"+e.end))),this.xmlFoldMode=new i};r.inherits(a,o),function(){this.getFoldWidgetRangeBase=this.getFoldWidgetRange,this.getFoldWidgetBase=this.getFoldWidget,this.getFoldWidget=function(e,t,n){var r=this.getFoldWidgetBase(e,t,n);return r||this.xmlFoldMode.getFoldWidget(e,t,n)},this.getFoldWidgetRange=function(e,t,n,r){var i=this.getFoldWidgetRangeBase(e,t,n,r);return i||this.xmlFoldMode.getFoldWidgetRange(e,t,n)}}.call(a.prototype)}),ace.define("ace/mode/javascript",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/javascript_highlight_rules","ace/mode/matching_brace_outdent","ace/worker/worker_client","ace/mode/behaviour/javascript","ace/mode/folding/javascript"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text").Mode,o=e("./javascript_highlight_rules").JavaScriptHighlightRules,a=e("./matching_brace_outdent").MatchingBraceOutdent,s=e("../worker/worker_client").WorkerClient,l=e("./behaviour/javascript").JavaScriptBehaviour,c=e("./folding/javascript").FoldMode,d=function(){this.HighlightRules=o,this.$outdent=new a,this.$behaviour=new l,this.foldingRules=new c};r.inherits(d,i),function(){this.lineCommentStart="//",this.blockComment={start:"/*",end:"*/"},this.$quotes={'"':'"',"'":"'","`":"`"},this.$pairQuotesAfter={"`":/\w/},this.getNextLineIndent=function(e,t,n){var r=this.$getIndent(t),i=this.getTokenizer().getLineTokens(t,e),o=i.tokens,a=i.state;if(o.length&&"comment"==o[o.length-1].type)return r;if("start"==e||"no_regex"==e)t.match(/^.*(?:\bcase\b.*:|[\{\(\[])\s*$/)&&(r+=n);else if("doc-start"==e&&("start"==a||"no_regex"==a))return"";return r},this.checkOutdent=function(e,t,n){return this.$outdent.checkOutdent(t,n)},this.autoOutdent=function(e,t,n){this.$outdent.autoOutdent(t,n)},this.createWorker=function(e){var t=new s(["ace"],"ace/mode/javascript_worker","JavaScriptWorker");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/javascript",this.snippetFileId="ace/snippets/javascript"}.call(d.prototype),t.Mode=d}),ace.define("ace/mode/css_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=(e("../lib/lang"),e("./text_highlight_rules").TextHighlightRules),o=t.supportType="align-content|align-items|align-self|all|animation|animation-delay|animation-direction|animation-duration|animation-fill-mode|animation-iteration-count|animation-name|animation-play-state|animation-timing-function|backface-visibility|background|background-attachment|background-blend-mode|background-clip|background-color|background-image|background-origin|background-position|background-repeat|background-size|border|border-bottom|border-bottom-color|border-bottom-left-radius|border-bottom-right-radius|border-bottom-style|border-bottom-width|border-collapse|border-color|border-image|border-image-outset|border-image-repeat|border-image-slice|border-image-source|border-image-width|border-left|border-left-color|border-left-style|border-left-width|border-radius|border-right|border-right-color|border-right-style|border-right-width|border-spacing|border-style|border-top|border-top-color|border-top-left-radius|border-top-right-radius|border-top-style|border-top-width|border-width|bottom|box-shadow|box-sizing|caption-side|clear|clip|color|column-count|column-fill|column-gap|column-rule|column-rule-color|column-rule-style|column-rule-width|column-span|column-width|columns|content|counter-increment|counter-reset|cursor|direction|display|empty-cells|filter|flex|flex-basis|flex-direction|flex-flow|flex-grow|flex-shrink|flex-wrap|float|font|font-family|font-size|font-size-adjust|font-stretch|font-style|font-variant|font-weight|hanging-punctuation|height|justify-content|left|letter-spacing|line-height|list-style|list-style-image|list-style-position|list-style-type|margin|margin-bottom|margin-left|margin-right|margin-top|max-height|max-width|max-zoom|min-height|min-width|min-zoom|nav-down|nav-index|nav-left|nav-right|nav-up|opacity|order|outline|outline-color|outline-offset|outline-style|outline-width|overflow|overflow-x|overflow-y|padding|padding-bottom|padding-left|padding-right|padding-top|page-break-after|page-break-before|page-break-inside|perspective|perspective-origin|position|quotes|resize|right|tab-size|table-layout|text-align|text-align-last|text-decoration|text-decoration-color|text-decoration-line|text-decoration-style|text-indent|text-justify|text-overflow|text-shadow|text-transform|top|transform|transform-origin|transform-style|transition|transition-delay|transition-duration|transition-property|transition-timing-function|unicode-bidi|user-select|user-zoom|vertical-align|visibility|white-space|width|word-break|word-spacing|word-wrap|z-index",a=t.supportFunction="rgb|rgba|url|attr|counter|counters",s=t.supportConstant="absolute|after-edge|after|all-scroll|all|alphabetic|always|antialiased|armenian|auto|avoid-column|avoid-page|avoid|balance|baseline|before-edge|before|below|bidi-override|block-line-height|block|bold|bolder|border-box|both|bottom|box|break-all|break-word|capitalize|caps-height|caption|center|central|char|circle|cjk-ideographic|clone|close-quote|col-resize|collapse|column|consider-shifts|contain|content-box|cover|crosshair|cubic-bezier|dashed|decimal-leading-zero|decimal|default|disabled|disc|disregard-shifts|distribute-all-lines|distribute-letter|distribute-space|distribute|dotted|double|e-resize|ease-in|ease-in-out|ease-out|ease|ellipsis|end|exclude-ruby|flex-end|flex-start|fill|fixed|georgian|glyphs|grid-height|groove|hand|hanging|hebrew|help|hidden|hiragana-iroha|hiragana|horizontal|icon|ideograph-alpha|ideograph-numeric|ideograph-parenthesis|ideograph-space|ideographic|inactive|include-ruby|inherit|initial|inline-block|inline-box|inline-line-height|inline-table|inline|inset|inside|inter-ideograph|inter-word|invert|italic|justify|katakana-iroha|katakana|keep-all|last|left|lighter|line-edge|line-through|line|linear|list-item|local|loose|lower-alpha|lower-greek|lower-latin|lower-roman|lowercase|lr-tb|ltr|mathematical|max-height|max-size|medium|menu|message-box|middle|move|n-resize|ne-resize|newspaper|no-change|no-close-quote|no-drop|no-open-quote|no-repeat|none|normal|not-allowed|nowrap|nw-resize|oblique|open-quote|outset|outside|overline|padding-box|page|pointer|pre-line|pre-wrap|pre|preserve-3d|progress|relative|repeat-x|repeat-y|repeat|replaced|reset-size|ridge|right|round|row-resize|rtl|s-resize|scroll|se-resize|separate|slice|small-caps|small-caption|solid|space|square|start|static|status-bar|step-end|step-start|steps|stretch|strict|sub|super|sw-resize|table-caption|table-cell|table-column-group|table-column|table-footer-group|table-header-group|table-row-group|table-row|table|tb-rl|text-after-edge|text-before-edge|text-bottom|text-size|text-top|text|thick|thin|transparent|underline|upper-alpha|upper-latin|upper-roman|uppercase|use-script|vertical-ideographic|vertical-text|visible|w-resize|wait|whitespace|z-index|zero|zoom",l=t.supportConstantColor="aliceblue|antiquewhite|aqua|aquamarine|azure|beige|bisque|black|blanchedalmond|blue|blueviolet|brown|burlywood|cadetblue|chartreuse|chocolate|coral|cornflowerblue|cornsilk|crimson|cyan|darkblue|darkcyan|darkgoldenrod|darkgray|darkgreen|darkgrey|darkkhaki|darkmagenta|darkolivegreen|darkorange|darkorchid|darkred|darksalmon|darkseagreen|darkslateblue|darkslategray|darkslategrey|darkturquoise|darkviolet|deeppink|deepskyblue|dimgray|dimgrey|dodgerblue|firebrick|floralwhite|forestgreen|fuchsia|gainsboro|ghostwhite|gold|goldenrod|gray|green|greenyellow|grey|honeydew|hotpink|indianred|indigo|ivory|khaki|lavender|lavenderblush|lawngreen|lemonchiffon|lightblue|lightcoral|lightcyan|lightgoldenrodyellow|lightgray|lightgreen|lightgrey|lightpink|lightsalmon|lightseagreen|lightskyblue|lightslategray|lightslategrey|lightsteelblue|lightyellow|lime|limegreen|linen|magenta|maroon|mediumaquamarine|mediumblue|mediumorchid|mediumpurple|mediumseagreen|mediumslateblue|mediumspringgreen|mediumturquoise|mediumvioletred|midnightblue|mintcream|mistyrose|moccasin|navajowhite|navy|oldlace|olive|olivedrab|orange|orangered|orchid|palegoldenrod|palegreen|paleturquoise|palevioletred|papayawhip|peachpuff|peru|pink|plum|powderblue|purple|rebeccapurple|red|rosybrown|royalblue|saddlebrown|salmon|sandybrown|seagreen|seashell|sienna|silver|skyblue|slateblue|slategray|slategrey|snow|springgreen|steelblue|tan|teal|thistle|tomato|turquoise|violet|wheat|white|whitesmoke|yellow|yellowgreen",c=t.supportConstantFonts="arial|century|comic|courier|cursive|fantasy|garamond|georgia|helvetica|impact|lucida|symbol|system|tahoma|times|trebuchet|utopia|verdana|webdings|sans-serif|serif|monospace",d=t.numRe="\\-?(?:(?:[0-9]+(?:\\.[0-9]+)?)|(?:\\.[0-9]+))",u=t.pseudoElements="(\\:+)\\b(after|before|first-letter|first-line|moz-selection|selection)\\b",p=t.pseudoClasses="(:)\\b(active|checked|disabled|empty|enabled|first-child|first-of-type|focus|hover|indeterminate|invalid|last-child|last-of-type|link|not|nth-child|nth-last-child|nth-last-of-type|nth-of-type|only-child|only-of-type|required|root|target|valid|visited)\\b",h=function(){var e=this.createKeywordMapper({"support.function":a,"support.constant":s,"support.type":o,"support.constant.color":l,"support.constant.fonts":c},"text",!0);this.$rules={start:[{include:["strings","url","comments"]},{token:"paren.lparen",regex:"\\{",next:"ruleset"},{token:"paren.rparen",regex:"\\}"},{token:"string",regex:"@(?!viewport)",next:"media"},{token:"keyword",regex:"#[a-z0-9-_]+"},{token:"keyword",regex:"%"},{token:"variable",regex:"\\.[a-z0-9-_]+"},{token:"string",regex:":[a-z0-9-_]+"},{token:"constant.numeric",regex:d},{token:"constant",regex:"[a-z0-9-_]+"},{caseInsensitive:!0}],media:[{include:["strings","url","comments"]},{token:"paren.lparen",regex:"\\{",next:"start"},{token:"paren.rparen",regex:"\\}",next:"start"},{token:"string",regex:";",next:"start"},{token:"keyword",regex:"(?:media|supports|document|charset|import|namespace|media|supports|document|page|font|keyframes|viewport|counter-style|font-feature-values|swash|ornaments|annotation|stylistic|styleset|character-variant)"}],comments:[{token:"comment",regex:"\\/\\*",push:[{token:"comment",regex:"\\*\\/",next:"pop"},{defaultToken:"comment"}]}],ruleset:[{regex:"-(webkit|ms|moz|o)-",token:"text"},{token:"punctuation.operator",regex:"[:;]"},{token:"paren.rparen",regex:"\\}",next:"start"},{include:["strings","url","comments"]},{token:["constant.numeric","keyword"],regex:"("+d+")(ch|cm|deg|em|ex|fr|gd|grad|Hz|in|kHz|mm|ms|pc|pt|px|rad|rem|s|turn|vh|vmax|vmin|vm|vw|%)"},{token:"constant.numeric",regex:d},{token:"constant.numeric",regex:"#[a-f0-9]{6}"},{token:"constant.numeric",regex:"#[a-f0-9]{3}"},{token:["punctuation","entity.other.attribute-name.pseudo-element.css"],regex:u},{token:["punctuation","entity.other.attribute-name.pseudo-class.css"],regex:p},{include:"url"},{token:e,regex:"\\-?[a-zA-Z_][a-zA-Z0-9_\\-]*"},{token:"paren.lparen",regex:"\\{"},{caseInsensitive:!0}],url:[{token:"support.function",regex:"(?:url(:?-prefix)?|domain|regexp)\\(",push:[{token:"support.function",regex:"\\)",next:"pop"},{defaultToken:"string"}]}],strings:[{token:"string.start",regex:"'",push:[{token:"string.end",regex:"'|$",next:"pop"},{include:"escapes"},{token:"constant.language.escape",regex:/\\$/,consumeLineEnd:!0},{defaultToken:"string"}]},{token:"string.start",regex:'"',push:[{token:"string.end",regex:'"|$',next:"pop"},{include:"escapes"},{token:"constant.language.escape",regex:/\\$/,consumeLineEnd:!0},{defaultToken:"string"}]}],escapes:[{token:"constant.language.escape",regex:/\\([a-fA-F\d]{1,6}|[^a-fA-F\d])/}]},this.normalizeRules()};r.inherits(h,i),t.CssHighlightRules=h}),ace.define("ace/mode/css_completions",["require","exports","module"],function(e,t,n){"use strict";var r={background:{"#$0":1},"background-color":{"#$0":1,transparent:1,fixed:1},"background-image":{"url('/$0')":1},"background-repeat":{repeat:1,"repeat-x":1,"repeat-y":1,"no-repeat":1,inherit:1},"background-position":{bottom:2,center:2,left:2,right:2,top:2,inherit:2},"background-attachment":{scroll:1,fixed:1},"background-size":{cover:1,contain:1},"background-clip":{"border-box":1,"padding-box":1,"content-box":1},"background-origin":{"border-box":1,"padding-box":1,"content-box":1},border:{"solid $0":1,"dashed $0":1,"dotted $0":1,"#$0":1},"border-color":{"#$0":1},"border-style":{solid:2,dashed:2,dotted:2,double:2,groove:2,hidden:2,inherit:2,inset:2,none:2,outset:2,ridged:2},"border-collapse":{collapse:1,separate:1},bottom:{px:1,em:1,"%":1},clear:{left:1,right:1,both:1,none:1},color:{"#$0":1,"rgb(#$00,0,0)":1},cursor:{default:1,pointer:1,move:1,text:1,wait:1,help:1,progress:1,"n-resize":1,"ne-resize":1,"e-resize":1,"se-resize":1,"s-resize":1,"sw-resize":1,"w-resize":1,"nw-resize":1},display:{none:1,block:1,inline:1,"inline-block":1,"table-cell":1},"empty-cells":{show:1,hide:1},float:{left:1,right:1,none:1},"font-family":{Arial:2,"Comic Sans MS":2,Consolas:2,"Courier New":2,Courier:2,Georgia:2,Monospace:2,"Sans-Serif":2,"Segoe UI":2,Tahoma:2,"Times New Roman":2,"Trebuchet MS":2,Verdana:1},"font-size":{px:1,em:1,"%":1},"font-weight":{bold:1,normal:1},"font-style":{italic:1,normal:1},"font-variant":{normal:1,"small-caps":1},height:{px:1,em:1,"%":1},left:{px:1,em:1,"%":1},"letter-spacing":{normal:1},"line-height":{normal:1},"list-style-type":{none:1,disc:1,circle:1,square:1,decimal:1,"decimal-leading-zero":1,"lower-roman":1,"upper-roman":1,"lower-greek":1,"lower-latin":1,"upper-latin":1,georgian:1,"lower-alpha":1,"upper-alpha":1},margin:{px:1,em:1,"%":1},"margin-right":{px:1,em:1,"%":1},"margin-left":{px:1,em:1,"%":1},"margin-top":{px:1,em:1,"%":1},"margin-bottom":{px:1,em:1,"%":1},"max-height":{px:1,em:1,"%":1},"max-width":{px:1,em:1,"%":1},"min-height":{px:1,em:1,"%":1},"min-width":{px:1,em:1,"%":1},overflow:{hidden:1,visible:1,auto:1,scroll:1},"overflow-x":{hidden:1,visible:1,auto:1,scroll:1},"overflow-y":{hidden:1,visible:1,auto:1,scroll:1},padding:{px:1,em:1,"%":1},"padding-top":{px:1,em:1,"%":1},"padding-right":{px:1,em:1,"%":1},"padding-bottom":{px:1,em:1,"%":1},"padding-left":{px:1,em:1,"%":1},"page-break-after":{auto:1,always:1,avoid:1,left:1,right:1},"page-break-before":{auto:1,always:1,avoid:1,left:1,right:1},position:{absolute:1,relative:1,fixed:1,static:1},right:{px:1,em:1,"%":1},"table-layout":{fixed:1,auto:1},"text-decoration":{none:1,underline:1,"line-through":1,blink:1},"text-align":{left:1,right:1,center:1,justify:1},"text-transform":{capitalize:1,uppercase:1,lowercase:1,none:1},top:{px:1,em:1,"%":1},"vertical-align":{top:1,bottom:1},visibility:{hidden:1,visible:1},"white-space":{nowrap:1,normal:1,pre:1,"pre-line":1,"pre-wrap":1},width:{px:1,em:1,"%":1},"word-spacing":{normal:1},filter:{"alpha(opacity=$0100)":1},"text-shadow":{"$02px 2px 2px #777":1},"text-overflow":{"ellipsis-word":1,clip:1,ellipsis:1},"-moz-border-radius":1,"-moz-border-radius-topright":1,"-moz-border-radius-bottomright":1,"-moz-border-radius-topleft":1,"-moz-border-radius-bottomleft":1,"-webkit-border-radius":1,"-webkit-border-top-right-radius":1,"-webkit-border-top-left-radius":1,"-webkit-border-bottom-right-radius":1,"-webkit-border-bottom-left-radius":1,"-moz-box-shadow":1,"-webkit-box-shadow":1,transform:{"rotate($00deg)":1,"skew($00deg)":1},"-moz-transform":{"rotate($00deg)":1,"skew($00deg)":1},"-webkit-transform":{"rotate($00deg)":1,"skew($00deg)":1}},i=function(){};(function(){this.completionsDefined=!1,this.defineCompletions=function(){if(document){var e=document.createElement("c").style;for(var t in e)if("string"===typeof e[t]){var n=t.replace(/[A-Z]/g,function(e){return"-"+e.toLowerCase()});r.hasOwnProperty(n)||(r[n]=1)}}this.completionsDefined=!0},this.getCompletions=function(e,t,n,r){if(this.completionsDefined||this.defineCompletions(),"ruleset"===e||"ace/mode/scss"==t.$mode.$id){var i=t.getLine(n.row).substr(0,n.column),o=/\([^)]*$/.test(i);return o&&(i=i.substr(i.lastIndexOf("(")+1)),/:[^;]+$/.test(i)?(/([\w\-]+):[^:]*$/.test(i),this.getPropertyValueCompletions(e,t,n,r)):this.getPropertyCompletions(e,t,n,r,o)}return[]},this.getPropertyCompletions=function(e,t,n,i,o){return o=o||!1,Object.keys(r).map(function(e){return{caption:e,snippet:e+": $0"+(o?"":";"),meta:"property",score:1e6}})},this.getPropertyValueCompletions=function(e,t,n,i){var o=t.getLine(n.row).substr(0,n.column),a=(/([\w\-]+):[^:]*$/.exec(o)||{})[1];if(!a)return[];var s=[];return a in r&&"object"===typeof r[a]&&(s=Object.keys(r[a])),s.map(function(e){return{caption:e,snippet:e,meta:"property value",score:1e6}})}}).call(i.prototype),t.CssCompletions=i}),ace.define("ace/mode/behaviour/css",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/mode/behaviour/cstyle","ace/token_iterator"],function(e,t,n){"use strict";var r=e("../../lib/oop"),i=(e("../behaviour").Behaviour,e("./cstyle").CstyleBehaviour),o=e("../../token_iterator").TokenIterator,a=function(){this.inherit(i),this.add("colon","insertion",function(e,t,n,r,i){if(":"===i&&n.selection.isEmpty()){var a=n.getCursorPosition(),s=new o(r,a.row,a.column),l=s.getCurrentToken();if(l&&l.value.match(/\s+/)&&(l=s.stepBackward()),l&&"support.type"===l.type){var c=r.doc.getLine(a.row);if(":"===c.substring(a.column,a.column+1))return{text:"",selection:[1,1]};if(/^(\s+[^;]|\s*$)/.test(c.substring(a.column)))return{text:":;",selection:[1,1]}}}}),this.add("colon","deletion",function(e,t,n,r,i){var a=r.doc.getTextRange(i);if(!i.isMultiLine()&&":"===a){var s=n.getCursorPosition(),l=new o(r,s.row,s.column),c=l.getCurrentToken();if(c&&c.value.match(/\s+/)&&(c=l.stepBackward()),c&&"support.type"===c.type)if(";"===r.doc.getLine(i.start.row).substring(i.end.column,i.end.column+1))return i.end.column++,i}}),this.add("semicolon","insertion",function(e,t,n,r,i){if(";"===i&&n.selection.isEmpty()){var o=n.getCursorPosition();if(";"===r.doc.getLine(o.row).substring(o.column,o.column+1))return{text:"",selection:[1,1]}}}),this.add("!important","insertion",function(e,t,n,r,i){if("!"===i&&n.selection.isEmpty()){var o=n.getCursorPosition(),a=r.doc.getLine(o.row);if(/^\s*(;|}|$)/.test(a.substring(o.column)))return{text:"!important",selection:[10,10]}}})};r.inherits(a,i),t.CssBehaviour=a}),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){"use strict";var r=e("../lib/oop"),i=e("./text").Mode,o=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,d=e("./folding/cstyle").FoldMode,u=function(){this.HighlightRules=o,this.$outdent=new a,this.$behaviour=new c,this.$completer=new l,this.foldingRules=new d};r.inherits(u,i),function(){this.foldingRules="cStyle",this.blockComment={start:"/*",end:"*/"},this.getNextLineIndent=function(e,t,n){var r=this.$getIndent(t),i=this.getTokenizer().getLineTokens(t,e).tokens;return i.length&&"comment"==i[i.length-1].type||t.match(/^.*\{\s*$/)&&(r+=n),r},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,r){return this.$completer.getCompletions(e,t,n,r)},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(u.prototype),t.Mode=u}),ace.define("ace/mode/xml_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text_highlight_rules").TextHighlightRules,o=function(e){var t="[_:a-zA-Z\xc0-\uffff][-_:.a-zA-Z0-9\xc0-\uffff]*";this.$rules={start:[{token:"string.cdata.xml",regex:"<\\!\\[CDATA\\[",next:"cdata"},{token:["punctuation.instruction.xml","keyword.instruction.xml"],regex:"(<\\?)("+t+")",next:"processing_instruction"},{token:"comment.start.xml",regex:"<\\!--",next:"comment"},{token:["xml-pe.doctype.xml","xml-pe.doctype.xml"],regex:"(<\\!)(DOCTYPE)(?=[\\s])",next:"doctype",caseInsensitive:!0},{include:"tag"},{token:"text.end-tag-open.xml",regex:"</"},{token:"text.tag-open.xml",regex:"<"},{include:"reference"},{defaultToken:"text.xml"}],processing_instruction:[{token:"entity.other.attribute-name.decl-attribute-name.xml",regex:t},{token:"keyword.operator.decl-attribute-equals.xml",regex:"="},{include:"whitespace"},{include:"string"},{token:"punctuation.xml-decl.xml",regex:"\\?>",next:"start"}],doctype:[{include:"whitespace"},{include:"string"},{token:"xml-pe.doctype.xml",regex:">",next:"start"},{token:"xml-pe.xml",regex:"[-_a-zA-Z0-9:]+"},{token:"punctuation.int-subset",regex:"\\[",push:"int_subset"}],int_subset:[{token:"text.xml",regex:"\\s+"},{token:"punctuation.int-subset.xml",regex:"]",next:"pop"},{token:["punctuation.markup-decl.xml","keyword.markup-decl.xml"],regex:"(<\\!)("+t+")",push:[{token:"text",regex:"\\s+"},{token:"punctuation.markup-decl.xml",regex:">",next:"pop"},{include:"string"}]}],cdata:[{token:"string.cdata.xml",regex:"\\]\\]>",next:"start"},{token:"text.xml",regex:"\\s+"},{token:"text.xml",regex:"(?:[^\\]]|\\](?!\\]>))+"}],comment:[{token:"comment.end.xml",regex:"--\x3e",next:"start"},{defaultToken:"comment.xml"}],reference:[{token:"constant.language.escape.reference.xml",regex:"(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)"}],attr_reference:[{token:"constant.language.escape.reference.attribute-value.xml",regex:"(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)"}],tag:[{token:["meta.tag.punctuation.tag-open.xml","meta.tag.punctuation.end-tag-open.xml","meta.tag.tag-name.xml"],regex:"(?:(<)|(</))((?:"+t+":)?"+t+")",next:[{include:"attributes"},{token:"meta.tag.punctuation.tag-close.xml",regex:"/?>",next:"start"}]}],tag_whitespace:[{token:"text.tag-whitespace.xml",regex:"\\s+"}],whitespace:[{token:"text.whitespace.xml",regex:"\\s+"}],string:[{token:"string.xml",regex:"'",push:[{token:"string.xml",regex:"'",next:"pop"},{defaultToken:"string.xml"}]},{token:"string.xml",regex:'"',push:[{token:"string.xml",regex:'"',next:"pop"},{defaultToken:"string.xml"}]}],attributes:[{token:"entity.other.attribute-name.xml",regex:t},{token:"keyword.operator.attribute-equals.xml",regex:"="},{include:"tag_whitespace"},{include:"attribute_value"}],attribute_value:[{token:"string.attribute-value.xml",regex:"'",push:[{token:"string.attribute-value.xml",regex:"'",next:"pop"},{include:"attr_reference"},{defaultToken:"string.attribute-value.xml"}]},{token:"string.attribute-value.xml",regex:'"',push:[{token:"string.attribute-value.xml",regex:'"',next:"pop"},{include:"attr_reference"},{defaultToken:"string.attribute-value.xml"}]}]},this.constructor===o&&this.normalizeRules()};(function(){this.embedTagRules=function(e,t,n){this.$rules.tag.unshift({token:["meta.tag.punctuation.tag-open.xml","meta.tag."+n+".tag-name.xml"],regex:"(<)("+n+"(?=\\s|>|$))",next:[{include:"attributes"},{token:"meta.tag.punctuation.tag-close.xml",regex:"/?>",next:t+"start"}]}),this.$rules[n+"-end"]=[{include:"attributes"},{token:"meta.tag.punctuation.tag-close.xml",regex:"/?>",next:"start",onMatch:function(e,t,n){return n.splice(0),this.token}}],this.embedRules(e,t,[{token:["meta.tag.punctuation.end-tag-open.xml","meta.tag."+n+".tag-name.xml"],regex:"(</)("+n+"(?=\\s|>|$))",next:n+"-end"},{token:"string.cdata.xml",regex:"<\\!\\[CDATA\\["},{token:"string.cdata.xml",regex:"\\]\\]>"}])}}).call(i.prototype),r.inherits(o,i),t.XmlHighlightRules=o}),ace.define("ace/mode/html_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/css_highlight_rules","ace/mode/javascript_highlight_rules","ace/mode/xml_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("../lib/lang"),o=e("./css_highlight_rules").CssHighlightRules,a=e("./javascript_highlight_rules").JavaScriptHighlightRules,s=e("./xml_highlight_rules").XmlHighlightRules,l=i.createMap({a:"anchor",button:"form",form:"form",img:"image",input:"form",label:"form",option:"form",script:"script",select:"form",textarea:"form",style:"style",table:"table",tbody:"table",td:"table",tfoot:"table",th:"table",tr:"table"}),c=function(){s.call(this),this.addRules({attributes:[{include:"tag_whitespace"},{token:"entity.other.attribute-name.xml",regex:"[-_a-zA-Z0-9:.]+"},{token:"keyword.operator.attribute-equals.xml",regex:"=",push:[{include:"tag_whitespace"},{token:"string.unquoted.attribute-value.html",regex:"[^<>='\"`\\s]+",next:"pop"},{token:"empty",regex:"",next:"pop"}]},{include:"attribute_value"}],tag:[{token:function(e,t){var n=l[t];return["meta.tag.punctuation."+("<"==e?"":"end-")+"tag-open.xml","meta.tag"+(n?"."+n:"")+".tag-name.xml"]},regex:"(</?)([-_a-zA-Z0-9:.]+)",next:"tag_stuff"}],tag_stuff:[{include:"attributes"},{token:"meta.tag.punctuation.tag-close.xml",regex:"/?>",next:"start"}]}),this.embedTagRules(o,"css-","style"),this.embedTagRules(new a({jsx:!1}).getRules(),"js-","script"),this.constructor===c&&this.normalizeRules()};r.inherits(c,s),t.HtmlHighlightRules=c}),ace.define("ace/mode/folding/mixed",["require","exports","module","ace/lib/oop","ace/mode/folding/fold_mode"],function(e,t,n){"use strict";var r=e("../../lib/oop"),i=e("./fold_mode").FoldMode,o=t.FoldMode=function(e,t){this.defaultMode=e,this.subModes=t};r.inherits(o,i),function(){this.$getMode=function(e){for(var t in"string"!=typeof e&&(e=e[0]),this.subModes)if(0===e.indexOf(t))return this.subModes[t];return null},this.$tryMode=function(e,t,n,r){var i=this.$getMode(e);return i?i.getFoldWidget(t,n,r):""},this.getFoldWidget=function(e,t,n){return this.$tryMode(e.getState(n-1),e,t,n)||this.$tryMode(e.getState(n),e,t,n)||this.defaultMode.getFoldWidget(e,t,n)},this.getFoldWidgetRange=function(e,t,n){var r=this.$getMode(e.getState(n-1));return r&&r.getFoldWidget(e,t,n)||(r=this.$getMode(e.getState(n))),r&&r.getFoldWidget(e,t,n)||(r=this.defaultMode),r.getFoldWidgetRange(e,t,n)}}.call(o.prototype)}),ace.define("ace/mode/folding/html",["require","exports","module","ace/lib/oop","ace/mode/folding/mixed","ace/mode/folding/xml","ace/mode/folding/cstyle"],function(e,t,n){"use strict";var r=e("../../lib/oop"),i=e("./mixed").FoldMode,o=e("./xml").FoldMode,a=e("./cstyle").FoldMode,s=t.FoldMode=function(e,t){i.call(this,new o(e,t),{"js-":new a,"css-":new a})};r.inherits(s,i)}),ace.define("ace/mode/html_completions",["require","exports","module","ace/token_iterator"],function(e,t,n){"use strict";var r=e("../token_iterator").TokenIterator,i=["accesskey","class","contenteditable","contextmenu","dir","draggable","dropzone","hidden","id","inert","itemid","itemprop","itemref","itemscope","itemtype","lang","spellcheck","style","tabindex","title","translate"].concat(["onabort","onblur","oncancel","oncanplay","oncanplaythrough","onchange","onclick","onclose","oncontextmenu","oncuechange","ondblclick","ondrag","ondragend","ondragenter","ondragleave","ondragover","ondragstart","ondrop","ondurationchange","onemptied","onended","onerror","onfocus","oninput","oninvalid","onkeydown","onkeypress","onkeyup","onload","onloadeddata","onloadedmetadata","onloadstart","onmousedown","onmousemove","onmouseout","onmouseover","onmouseup","onmousewheel","onpause","onplay","onplaying","onprogress","onratechange","onreset","onscroll","onseeked","onseeking","onselect","onshow","onstalled","onsubmit","onsuspend","ontimeupdate","onvolumechange","onwaiting"]),o={a:{href:1,target:{_blank:1,top:1},ping:1,rel:{nofollow:1,alternate:1,author:1,bookmark:1,help:1,license:1,next:1,noreferrer:1,prefetch:1,prev:1,search:1,tag:1},media:1,hreflang:1,type:1},abbr:{},address:{},area:{shape:1,coords:1,href:1,hreflang:1,alt:1,target:1,media:1,rel:1,ping:1,type:1},article:{pubdate:1},aside:{},audio:{src:1,autobuffer:1,autoplay:{autoplay:1},loop:{loop:1},controls:{controls:1},muted:{muted:1},preload:{auto:1,metadata:1,none:1}},b:{},base:{href:1,target:1},bdi:{},bdo:{},blockquote:{cite:1},body:{onafterprint:1,onbeforeprint:1,onbeforeunload:1,onhashchange:1,onmessage:1,onoffline:1,onpopstate:1,onredo:1,onresize:1,onstorage:1,onundo:1,onunload:1},br:{},button:{autofocus:1,disabled:{disabled:1},form:1,formaction:1,formenctype:1,formmethod:1,formnovalidate:1,formtarget:1,name:1,value:1,type:{button:1,submit:1}},canvas:{width:1,height:1},caption:{},cite:{},code:{},col:{span:1},colgroup:{span:1},command:{type:1,label:1,icon:1,disabled:1,checked:1,radiogroup:1,command:1},data:{},datalist:{},dd:{},del:{cite:1,datetime:1},details:{open:1},dfn:{},dialog:{open:1},div:{},dl:{},dt:{},em:{},embed:{src:1,height:1,width:1,type:1},fieldset:{disabled:1,form:1,name:1},figcaption:{},figure:{},footer:{},form:{"accept-charset":1,action:1,autocomplete:1,enctype:{"multipart/form-data":1,"application/x-www-form-urlencoded":1},method:{get:1,post:1},name:1,novalidate:1,target:{_blank:1,top:1}},h1:{},h2:{},h3:{},h4:{},h5:{},h6:{},head:{},header:{},hr:{},html:{manifest:1},i:{},iframe:{name:1,src:1,height:1,width:1,sandbox:{"allow-same-origin":1,"allow-top-navigation":1,"allow-forms":1,"allow-scripts":1},seamless:{seamless:1}},img:{alt:1,src:1,height:1,width:1,usemap:1,ismap:1},input:{type:{text:1,password:1,hidden:1,checkbox:1,submit:1,radio:1,file:1,button:1,reset:1,image:31,color:1,date:1,datetime:1,"datetime-local":1,email:1,month:1,number:1,range:1,search:1,tel:1,time:1,url:1,week:1},accept:1,alt:1,autocomplete:{on:1,off:1},autofocus:{autofocus:1},checked:{checked:1},disabled:{disabled:1},form:1,formaction:1,formenctype:{"application/x-www-form-urlencoded":1,"multipart/form-data":1,"text/plain":1},formmethod:{get:1,post:1},formnovalidate:{formnovalidate:1},formtarget:{_blank:1,_self:1,_parent:1,_top:1},height:1,list:1,max:1,maxlength:1,min:1,multiple:{multiple:1},name:1,pattern:1,placeholder:1,readonly:{readonly:1},required:{required:1},size:1,src:1,step:1,width:1,files:1,value:1},ins:{cite:1,datetime:1},kbd:{},keygen:{autofocus:1,challenge:{challenge:1},disabled:{disabled:1},form:1,keytype:{rsa:1,dsa:1,ec:1},name:1},label:{form:1,for:1},legend:{},li:{value:1},link:{href:1,hreflang:1,rel:{stylesheet:1,icon:1},media:{all:1,screen:1,print:1},type:{"text/css":1,"image/png":1,"image/jpeg":1,"image/gif":1},sizes:1},main:{},map:{name:1},mark:{},math:{},menu:{type:1,label:1},meta:{"http-equiv":{"content-type":1},name:{description:1,keywords:1},content:{"text/html; charset=UTF-8":1},charset:1},meter:{value:1,min:1,max:1,low:1,high:1,optimum:1},nav:{},noscript:{href:1},object:{param:1,data:1,type:1,height:1,width:1,usemap:1,name:1,form:1,classid:1},ol:{start:1,reversed:1},optgroup:{disabled:1,label:1},option:{disabled:1,selected:1,label:1,value:1},output:{for:1,form:1,name:1},p:{},param:{name:1,value:1},pre:{},progress:{value:1,max:1},q:{cite:1},rp:{},rt:{},ruby:{},s:{},samp:{},script:{charset:1,type:{"text/javascript":1},src:1,defer:1,async:1},select:{autofocus:1,disabled:1,form:1,multiple:{multiple:1},name:1,size:1,readonly:{readonly:1}},small:{},source:{src:1,type:1,media:1},span:{},strong:{},style:{type:1,media:{all:1,screen:1,print:1},scoped:1},sub:{},sup:{},svg:{},table:{summary:1},tbody:{},td:{headers:1,rowspan:1,colspan:1},textarea:{autofocus:{autofocus:1},disabled:{disabled:1},form:1,maxlength:1,name:1,placeholder:1,readonly:{readonly:1},required:{required:1},rows:1,cols:1,wrap:{on:1,off:1,hard:1,soft:1}},tfoot:{},th:{headers:1,rowspan:1,colspan:1,scope:1},thead:{},time:{datetime:1},title:{},tr:{},track:{kind:1,src:1,srclang:1,label:1,default:1},section:{},summary:{},u:{},ul:{},var:{},video:{src:1,autobuffer:1,autoplay:{autoplay:1},loop:{loop:1},controls:{controls:1},width:1,height:1,poster:1,muted:{muted:1},preload:{auto:1,metadata:1,none:1}},wbr:{}},a=Object.keys(o);function s(e,t){return e.type.lastIndexOf(t+".xml")>-1}function l(e,t){for(var n=new r(e,t.row,t.column),i=n.getCurrentToken();i&&!s(i,"tag-name");)i=n.stepBackward();if(i)return i.value}var c=function(){};(function(){this.getCompletions=function(e,t,n,r){var i=t.getTokenAt(n.row,n.column);if(!i)return[];if(s(i,"tag-name")||s(i,"tag-open")||s(i,"end-tag-open"))return this.getTagCompletions(e,t,n,r);if(s(i,"tag-whitespace")||s(i,"attribute-name"))return this.getAttributeCompletions(e,t,n,r);if(s(i,"attribute-value"))return this.getAttributeValueCompletions(e,t,n,r);var o=t.getLine(n.row).substr(0,n.column);return/&[a-z]*$/i.test(o)?this.getHTMLEntityCompletions(e,t,n,r):[]},this.getTagCompletions=function(e,t,n,r){return a.map(function(e){return{value:e,meta:"tag",score:1e6}})},this.getAttributeCompletions=function(e,t,n,r){var a=l(t,n);if(!a)return[];var s=i;return a in o&&(s=s.concat(Object.keys(o[a]))),s.map(function(e){return{caption:e,snippet:e+'="$0"',meta:"attribute",score:1e6}})},this.getAttributeValueCompletions=function(e,t,n,i){var a=l(t,n),c=function(e,t){for(var n=new r(e,t.row,t.column),i=n.getCurrentToken();i&&!s(i,"attribute-name");)i=n.stepBackward();if(i)return i.value}(t,n);if(!a)return[];var d=[];return a in o&&c in o[a]&&"object"===typeof o[a][c]&&(d=Object.keys(o[a][c])),d.map(function(e){return{caption:e,snippet:e,meta:"attribute value",score:1e6}})},this.getHTMLEntityCompletions=function(e,t,n,r){return["Aacute;","aacute;","Acirc;","acirc;","acute;","AElig;","aelig;","Agrave;","agrave;","alefsym;","Alpha;","alpha;","amp;","and;","ang;","Aring;","aring;","asymp;","Atilde;","atilde;","Auml;","auml;","bdquo;","Beta;","beta;","brvbar;","bull;","cap;","Ccedil;","ccedil;","cedil;","cent;","Chi;","chi;","circ;","clubs;","cong;","copy;","crarr;","cup;","curren;","Dagger;","dagger;","dArr;","darr;","deg;","Delta;","delta;","diams;","divide;","Eacute;","eacute;","Ecirc;","ecirc;","Egrave;","egrave;","empty;","emsp;","ensp;","Epsilon;","epsilon;","equiv;","Eta;","eta;","ETH;","eth;","Euml;","euml;","euro;","exist;","fnof;","forall;","frac12;","frac14;","frac34;","frasl;","Gamma;","gamma;","ge;","gt;","hArr;","harr;","hearts;","hellip;","Iacute;","iacute;","Icirc;","icirc;","iexcl;","Igrave;","igrave;","image;","infin;","int;","Iota;","iota;","iquest;","isin;","Iuml;","iuml;","Kappa;","kappa;","Lambda;","lambda;","lang;","laquo;","lArr;","larr;","lceil;","ldquo;","le;","lfloor;","lowast;","loz;","lrm;","lsaquo;","lsquo;","lt;","macr;","mdash;","micro;","middot;","minus;","Mu;","mu;","nabla;","nbsp;","ndash;","ne;","ni;","not;","notin;","nsub;","Ntilde;","ntilde;","Nu;","nu;","Oacute;","oacute;","Ocirc;","ocirc;","OElig;","oelig;","Ograve;","ograve;","oline;","Omega;","omega;","Omicron;","omicron;","oplus;","or;","ordf;","ordm;","Oslash;","oslash;","Otilde;","otilde;","otimes;","Ouml;","ouml;","para;","part;","permil;","perp;","Phi;","phi;","Pi;","pi;","piv;","plusmn;","pound;","Prime;","prime;","prod;","prop;","Psi;","psi;","quot;","radic;","rang;","raquo;","rArr;","rarr;","rceil;","rdquo;","real;","reg;","rfloor;","Rho;","rho;","rlm;","rsaquo;","rsquo;","sbquo;","Scaron;","scaron;","sdot;","sect;","shy;","Sigma;","sigma;","sigmaf;","sim;","spades;","sub;","sube;","sum;","sup;","sup1;","sup2;","sup3;","supe;","szlig;","Tau;","tau;","there4;","Theta;","theta;","thetasym;","thinsp;","THORN;","thorn;","tilde;","times;","trade;","Uacute;","uacute;","uArr;","uarr;","Ucirc;","ucirc;","Ugrave;","ugrave;","uml;","upsih;","Upsilon;","upsilon;","Uuml;","uuml;","weierp;","Xi;","xi;","Yacute;","yacute;","yen;","Yuml;","yuml;","Zeta;","zeta;","zwj;","zwnj;"].map(function(e){return{caption:e,snippet:e,meta:"html entity",score:1e6}})}}).call(c.prototype),t.HtmlCompletions=c}),ace.define("ace/mode/html",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/text","ace/mode/javascript","ace/mode/css","ace/mode/html_highlight_rules","ace/mode/behaviour/xml","ace/mode/folding/html","ace/mode/html_completions","ace/worker/worker_client"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("../lib/lang"),o=e("./text").Mode,a=e("./javascript").Mode,s=e("./css").Mode,l=e("./html_highlight_rules").HtmlHighlightRules,c=e("./behaviour/xml").XmlBehaviour,d=e("./folding/html").FoldMode,u=e("./html_completions").HtmlCompletions,p=e("../worker/worker_client").WorkerClient,h=["area","base","br","col","embed","hr","img","input","keygen","link","meta","menuitem","param","source","track","wbr"],m=["li","dt","dd","p","rt","rp","optgroup","option","colgroup","td","th"],f=function(e){this.fragmentContext=e&&e.fragmentContext,this.HighlightRules=l,this.$behaviour=new c,this.$completer=new u,this.createModeDelegates({"js-":a,"css-":s}),this.foldingRules=new d(this.voidElements,i.arrayToMap(m))};r.inherits(f,o),function(){this.blockComment={start:"\x3c!--",end:"--\x3e"},this.voidElements=i.arrayToMap(h),this.getNextLineIndent=function(e,t,n){return this.$getIndent(t)},this.checkOutdent=function(e,t,n){return!1},this.getCompletions=function(e,t,n,r){return this.$completer.getCompletions(e,t,n,r)},this.createWorker=function(e){if(this.constructor==f){var t=new p(["ace"],"ace/mode/html_worker","Worker");return t.attachToDocument(e.getDocument()),this.fragmentContext&&t.call("setOptions",[{context:this.fragmentContext}]),t.on("error",function(t){e.setAnnotations(t.data)}),t.on("terminate",function(){e.clearAnnotations()}),t}},this.$id="ace/mode/html",this.snippetFileId="ace/snippets/html"}.call(f.prototype),t.Mode=f}),ace.require(["ace/mode/html"],function(t){e&&(e.exports=t)})},68864:(e,t,n)=>{"use strict";var r=n(24994);t.A=void 0;var i=r(n(40039)),o=n(70579);t.A=(0,i.default)((0,o.jsx)("path",{d:"M3 18h6v-2H3zM3 6v2h18V6zm0 7h12v-2H3z"}),"Sort")},69062:(e,t,n)=>{"use strict";e.exports=n(6378)},69120:(e,t,n)=>{"use strict";var r=n(24994);t.A=void 0;var i=r(n(40039)),o=n(70579);t.A=(0,i.default)((0,o.jsx)("path",{d:"M20 11H7.83l5.59-5.59L12 4l-8 8 8 8 1.41-1.41L7.83 13H20z"}),"ArrowBack")},69194:e=>{var t=/^(?:0|[1-9]\d*)$/;e.exports=function(e,n){var r=typeof e;return!!(n=null==n?9007199254740991:n)&&("number"==r||"symbol"!=r&&t.test(e))&&e>-1&&e%1==0&&e<n}},69292:(e,t,n)=>{"use strict";function r(e){var t,n,i="";if("string"==typeof e||"number"==typeof e)i+=e;else if("object"==typeof e)if(Array.isArray(e)){var o=e.length;for(t=0;t<o;t++)e[t]&&(n=r(e[t]))&&(i&&(i+=" "),i+=n)}else for(n in e)e[n]&&(i&&(i+=" "),i+=n);return i}n.d(t,{A:()=>i});const i=function(){for(var e,t,n=0,i="",o=arguments.length;n<o;n++)(e=arguments[n])&&(t=r(e))&&(i&&(i+=" "),i+=t);return i}},69369:(e,t,n)=>{"use strict";n.d(t,{C:()=>c,E:()=>g,T:()=>u,c:()=>m,h:()=>p,w:()=>d});var r=n(65043),i=n(93803),o=n(81722),a=n(66598),s=n(69436),l=r.createContext("undefined"!==typeof HTMLElement?(0,i.A)({key:"css"}):null),c=l.Provider,d=function(e){return(0,r.forwardRef)(function(t,n){var i=(0,r.useContext)(l);return e(t,i,n)})},u=r.createContext({});var p={}.hasOwnProperty,h="__EMOTION_TYPE_PLEASE_DO_NOT_USE__",m=function(e,t){var n={};for(var r in t)p.call(t,r)&&(n[r]=t[r]);return n[h]=e,n},f=function(e){var t=e.cache,n=e.serialized,r=e.isStringTag;return(0,o.SF)(t,n,r),(0,s.s)(function(){return(0,o.sk)(t,n,r)}),null},g=d(function(e,t,n){var i=e.css;"string"===typeof i&&void 0!==t.registered[i]&&(i=t.registered[i]);var s=e[h],l=[i],c="";"string"===typeof e.className?c=(0,o.Rk)(t.registered,l,e.className):null!=e.className&&(c=e.className+" ");var d=(0,a.J)(l,void 0,r.useContext(u));c+=t.key+"-"+d.name;var m={};for(var g in e)p.call(e,g)&&"css"!==g&&g!==h&&(m[g]=e[g]);return m.className=c,n&&(m.ref=n),r.createElement(r.Fragment,null,r.createElement(f,{cache:t,serialized:d,isStringTag:"string"===typeof s}),r.createElement(s,m))})},69394:(e,t,n)=>{var r=n(12622);e.exports=function(e){return r(this,e).has(e)}},69436:(e,t,n)=>{"use strict";var r;n.d(t,{i:()=>s,s:()=>a});var i=n(65043),o=!!(r||(r=n.t(i,2))).useInsertionEffect&&(r||(r=n.t(i,2))).useInsertionEffect,a=o||function(e){return e()},s=o||i.useLayoutEffect},69613:(e,t,n)=>{var r=n(9261);e.exports=function(e,t,n){return null==e?e:r(e,t,n)}},69621:(e,t,n)=>{var r=n(17529),i=n(57828),o=Object.prototype.propertyIsEnumerable,a=Object.getOwnPropertySymbols,s=a?function(e){return null==e?[]:(e=Object(e),r(a(e),function(t){return o.call(e,t)}))}:i;e.exports=s},69987:(e,t,n)=>{var r=n(9812),i=n(22929),o=n(93211),a=n(43668),s=n(54160),l=n(52074),c=r?r.prototype:void 0,d=c?c.valueOf:void 0;e.exports=function(e,t,n,r,c,u,p){switch(n){case"[object DataView]":if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case"[object ArrayBuffer]":return!(e.byteLength!=t.byteLength||!u(new i(e),new i(t)));case"[object Boolean]":case"[object Date]":case"[object Number]":return o(+e,+t);case"[object Error]":return e.name==t.name&&e.message==t.message;case"[object RegExp]":case"[object String]":return e==t+"";case"[object Map]":var h=s;case"[object Set]":var m=1&r;if(h||(h=l),e.size!=t.size&&!m)return!1;var f=p.get(e);if(f)return f==t;r|=2,p.set(e,t);var g=a(h(e),h(t),r,c,u,p);return p.delete(e),g;case"[object Symbol]":if(d)return d.call(e)==d.call(t)}return!1}},69995:(e,t,n)=>{var r=n(9096),i=n(6571),o=n(28673);e.exports=function(e){return function(t,n,a){var s=Object(t);if(!i(t)){var l=r(n,3);t=o(t),n=function(e){return l(s[e],e,s)}}var c=e(t,n,a);return c>-1?s[l?t[c]:c]:void 0}}},70245:(e,t,n)=>{"use strict";var r=n(24994);t.A=void 0;var i=r(n(40039)),o=n(70579);t.A=(0,i.default)((0,o.jsx)("path",{d:"M12 1 3 5v6c0 5.55 3.84 10.74 9 12 5.16-1.26 9-6.45 9-12V5zm-1 6h2v2h-2zm0 4h2v6h-2z"}),"PrivacyTip")},70569:(e,t,n)=>{"use strict";var r=n(24994);t.A=void 0;var i=r(n(40039)),o=n(70579);t.A=(0,i.default)((0,o.jsx)("path",{d:"M18 2H6c-1.1 0-2 .9-2 2v16c0 1.1.9 2 2 2h12c1.1 0 2-.9 2-2V4c0-1.1-.9-2-2-2M6 4h5v8l-2.5-1.5L6 12z"}),"Book")},70579:(e,t,n)=>{"use strict";e.exports=n(51153)},70705:e=>{e.exports=function(e){var t=typeof e;return"string"==t||"number"==t||"symbol"==t||"boolean"==t?"__proto__"!==e:null===e}},70869:(e,t,n)=>{"use strict";n.d(t,{A:()=>o});n(65043);var r=n(83290),i=n(70579);function o(e){const{styles:t,defaultTheme:n={}}=e,o="function"===typeof t?e=>{return t(void 0===(r=e)||null===r||0===Object.keys(r).length?n:e);var r}:t;return(0,i.jsx)(r.mL,{styles:o})}},70914:(e,t,n)=>{var r=n(19841);e.exports=function(e){if("string"==typeof e||r(e))return e;var t=e+"";return"0"==t&&1/e==-1/0?"-0":t}},71612:(e,t,n)=>{"use strict";var r=n(24994);t.A=void 0;var i=r(n(40039)),o=n(70579);t.A=(0,i.default)((0,o.jsx)("path",{d:"M19 6.41 17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z"}),"CloseOutlined")},71723:(e,t,n)=>{"use strict";var r=n(24994);t.A=void 0;var i=r(n(40039)),o=n(70579);t.A=(0,i.default)([(0,o.jsx)("path",{d:"M6.41 6 5 7.41 9.58 12 5 16.59 6.41 18l6-6z"},"0"),(0,o.jsx)("path",{d:"m13 6-1.41 1.41L16.17 12l-4.58 4.59L13 18l6-6z"},"1")],"KeyboardDoubleArrowRightOutlined")},71775:(e,t,n)=>{var r=n(5654);e.exports=function(e,t,n){"__proto__"==t&&r?r(e,t,{configurable:!0,enumerable:!0,value:n,writable:!0}):e[t]=n}},71989:(e,t,n)=>{"use strict";var r=n(86267),i=n(93229),o=n(47903),a=n(86735),s=n(17638),l=n(63101),c=n(20705),d=n(89335),u=n(82702),p=n(47482),h=n(93403);e.exports=function(e){return new Promise(function(t,n){var m,f=e.data,g=e.headers,v=e.responseType;function x(){e.cancelToken&&e.cancelToken.unsubscribe(m),e.signal&&e.signal.removeEventListener("abort",m)}r.isFormData(f)&&r.isStandardBrowserEnv()&&delete g["Content-Type"];var y=new XMLHttpRequest;if(e.auth){var b=e.auth.username||"",j=e.auth.password?unescape(encodeURIComponent(e.auth.password)):"";g.Authorization="Basic "+btoa(b+":"+j)}var _=s(e.baseURL,e.url);function C(){if(y){var r="getAllResponseHeaders"in y?l(y.getAllResponseHeaders()):null,o={data:v&&"text"!==v&&"json"!==v?y.response:y.responseText,status:y.status,statusText:y.statusText,headers:r,config:e,request:y};i(function(e){t(e),x()},function(e){n(e),x()},o),y=null}}if(y.open(e.method.toUpperCase(),a(_,e.params,e.paramsSerializer),!0),y.timeout=e.timeout,"onloadend"in y?y.onloadend=C:y.onreadystatechange=function(){y&&4===y.readyState&&(0!==y.status||y.responseURL&&0===y.responseURL.indexOf("file:"))&&setTimeout(C)},y.onabort=function(){y&&(n(new u("Request aborted",u.ECONNABORTED,e,y)),y=null)},y.onerror=function(){n(new u("Network Error",u.ERR_NETWORK,e,y,y)),y=null},y.ontimeout=function(){var t=e.timeout?"timeout of "+e.timeout+"ms exceeded":"timeout exceeded",r=e.transitional||d;e.timeoutErrorMessage&&(t=e.timeoutErrorMessage),n(new u(t,r.clarifyTimeoutError?u.ETIMEDOUT:u.ECONNABORTED,e,y)),y=null},r.isStandardBrowserEnv()){var w=(e.withCredentials||c(_))&&e.xsrfCookieName?o.read(e.xsrfCookieName):void 0;w&&(g[e.xsrfHeaderName]=w)}"setRequestHeader"in y&&r.forEach(g,function(e,t){"undefined"===typeof f&&"content-type"===t.toLowerCase()?delete g[t]:y.setRequestHeader(t,e)}),r.isUndefined(e.withCredentials)||(y.withCredentials=!!e.withCredentials),v&&"json"!==v&&(y.responseType=e.responseType),"function"===typeof e.onDownloadProgress&&y.addEventListener("progress",e.onDownloadProgress),"function"===typeof e.onUploadProgress&&y.upload&&y.upload.addEventListener("progress",e.onUploadProgress),(e.cancelToken||e.signal)&&(m=function(e){y&&(n(!e||e&&e.type?new p:e),y.abort(),y=null)},e.cancelToken&&e.cancelToken.subscribe(m),e.signal&&(e.signal.aborted?m():e.signal.addEventListener("abort",m))),f||(f=null);var S=h(_);S&&-1===["http","https","file"].indexOf(S)?n(new u("Unsupported protocol "+S+":",u.ERR_BAD_REQUEST,e)):y.send(f)})}},72023:(e,t,n)=>{"use strict";var r=n(24994);t.A=void 0;var i=r(n(40039)),o=n(70579);t.A=(0,i.default)((0,o.jsx)("path",{fillRule:"evenodd",d:"m9 17 3-2.94c-.39-.04-.68-.06-1-.06-2.67 0-8 1.34-8 4v2h9zm2-5c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4m4.47 8.5L12 17l1.4-1.41 2.07 2.08 5.13-5.17 1.4 1.41z"}),"HowToReg")},72037:e=>{e.exports=function(e){return function(t){return null==e?void 0:e[t]}}},72070:(e,t,n)=>{var r=n(87937)(n(56552),"Set");e.exports=r},72154:(e,t,n)=>{var r=n(95575),i=Object.prototype.hasOwnProperty;e.exports=function(e){var t=this.__data__;if(r){var n=t[e];return"__lodash_hash_undefined__"===n?void 0:n}return i.call(t,e)?t[e]:void 0}},72330:(e,t,n)=>{"use strict";var r=n(65043);var i="function"===typeof Object.is?Object.is:function(e,t){return e===t&&(0!==e||1/e===1/t)||e!==e&&t!==t},o=r.useState,a=r.useEffect,s=r.useLayoutEffect,l=r.useDebugValue;function c(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!i(e,n)}catch(r){return!0}}var d="undefined"===typeof window||"undefined"===typeof window.document||"undefined"===typeof window.document.createElement?function(e,t){return t()}:function(e,t){var n=t(),r=o({inst:{value:n,getSnapshot:t}}),i=r[0].inst,d=r[1];return s(function(){i.value=n,i.getSnapshot=t,c(i)&&d({inst:i})},[e,n,t]),a(function(){return c(i)&&d({inst:i}),e(function(){c(i)&&d({inst:i})})},[e]),l(n),n};t.useSyncExternalStore=void 0!==r.useSyncExternalStore?r.useSyncExternalStore:d},72372:(e,t,n)=>{"use strict";n.d(t,{Ay:()=>o});var r=n(79386);const i={active:"active",checked:"checked",completed:"completed",disabled:"disabled",error:"error",expanded:"expanded",focused:"focused",focusVisible:"focusVisible",open:"open",readOnly:"readOnly",required:"required",selected:"selected"};function o(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"Mui";const o=i[t];return o?"".concat(n,"-").concat(o):"".concat(r.A.generate(e),"-").concat(t)}},72450:function(e,t,n){var r,i,o;i=[],void 0===(o="function"===typeof(r=function(){"use strict";function t(e,t){return"undefined"==typeof t?t={autoBom:!1}:"object"!=typeof t&&(console.warn("Deprecated: Expected third argument to be a object"),t={autoBom:!t}),t.autoBom&&/^\s*(?:text\/\S*|application\/xml|\S*\/\S*\+xml)\s*;.*charset\s*=\s*utf-8/i.test(e.type)?new Blob(["\ufeff",e],{type:e.type}):e}function r(e,t,n){var r=new XMLHttpRequest;r.open("GET",e),r.responseType="blob",r.onload=function(){l(r.response,t,n)},r.onerror=function(){console.error("could not download file")},r.send()}function i(e){var t=new XMLHttpRequest;t.open("HEAD",e,!1);try{t.send()}catch(e){}return 200<=t.status&&299>=t.status}function o(e){try{e.dispatchEvent(new MouseEvent("click"))}catch(r){var t=document.createEvent("MouseEvents");t.initMouseEvent("click",!0,!0,window,0,0,0,80,20,!1,!1,!1,!1,0,null),e.dispatchEvent(t)}}var a="object"==typeof window&&window.window===window?window:"object"==typeof self&&self.self===self?self:"object"==typeof n.g&&n.g.global===n.g?n.g:void 0,s=a.navigator&&/Macintosh/.test(navigator.userAgent)&&/AppleWebKit/.test(navigator.userAgent)&&!/Safari/.test(navigator.userAgent),l=a.saveAs||("object"!=typeof window||window!==a?function(){}:"download"in HTMLAnchorElement.prototype&&!s?function(e,t,n){var s=a.URL||a.webkitURL,l=document.createElement("a");t=t||e.name||"download",l.download=t,l.rel="noopener","string"==typeof e?(l.href=e,l.origin===location.origin?o(l):i(l.href)?r(e,t,n):o(l,l.target="_blank")):(l.href=s.createObjectURL(e),setTimeout(function(){s.revokeObjectURL(l.href)},4e4),setTimeout(function(){o(l)},0))}:"msSaveOrOpenBlob"in navigator?function(e,n,a){if(n=n||e.name||"download","string"!=typeof e)navigator.msSaveOrOpenBlob(t(e,a),n);else if(i(e))r(e,n,a);else{var s=document.createElement("a");s.href=e,s.target="_blank",setTimeout(function(){o(s)})}}:function(e,t,n,i){if((i=i||open("","_blank"))&&(i.document.title=i.document.body.innerText="downloading..."),"string"==typeof e)return r(e,t,n);var o="application/octet-stream"===e.type,l=/constructor/i.test(a.HTMLElement)||a.safari,c=/CriOS\/[\d]+/.test(navigator.userAgent);if((c||o&&l||s)&&"undefined"!=typeof FileReader){var d=new FileReader;d.onloadend=function(){var e=d.result;e=c?e:e.replace(/^data:[^;]*;/,"data:attachment/file;"),i?i.location.href=e:location=e,i=null},d.readAsDataURL(e)}else{var u=a.URL||a.webkitURL,p=u.createObjectURL(e);i?i.location=p:location.href=p,i=null,setTimeout(function(){u.revokeObjectURL(p)},4e4)}});a.saveAs=l.saveAs=l,e.exports=l})?r.apply(t,i):r)||(e.exports=o)},72762:e=>{"use strict";e.exports=function(e){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}},72819:(e,t,n)=>{"use strict";var r=n(24994);t.A=void 0;var i=r(n(40039)),o=n(70579);t.A=(0,i.default)((0,o.jsx)("path",{d:"M12 7c2.76 0 5 2.24 5 5 0 .65-.13 1.26-.36 1.83l2.92 2.92c1.51-1.26 2.7-2.89 3.43-4.75-1.73-4.39-6-7.5-11-7.5-1.4 0-2.74.25-3.98.7l2.16 2.16C10.74 7.13 11.35 7 12 7M2 4.27l2.28 2.28.46.46C3.08 8.3 1.78 10.02 1 12c1.73 4.39 6 7.5 11 7.5 1.55 0 3.03-.3 4.38-.84l.42.42L19.73 22 21 20.73 3.27 3zM7.53 9.8l1.55 1.55c-.05.21-.08.43-.08.65 0 1.66 1.34 3 3 3 .22 0 .44-.03.65-.08l1.55 1.55c-.67.33-1.41.53-2.2.53-2.76 0-5-2.24-5-5 0-.79.2-1.53.53-2.2m4.31-.78 3.15 3.15.02-.16c0-1.66-1.34-3-3-3z"}),"VisibilityOff")},73055:e=>{e.exports=null},73204:(e,t,n)=>{var r=n(3343),i=n(22777),o=n(54052),a=n(44543),s=n(69194),l=n(51268),c=Object.prototype.hasOwnProperty;e.exports=function(e,t){var n=o(e),d=!n&&i(e),u=!n&&!d&&a(e),p=!n&&!d&&!u&&l(e),h=n||d||u||p,m=h?r(e.length,String):[],f=m.length;for(var g in e)!t&&!c.call(e,g)||h&&("length"==g||u&&("offset"==g||"parent"==g)||p&&("buffer"==g||"byteLength"==g||"byteOffset"==g)||s(g,f))||m.push(g);return m}},73234:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>r.A,extendSxProp:()=>i.A,unstable_createStyleFunctionSx:()=>r.k,unstable_defaultSxConfig:()=>o.A});var r=n(58812),i=n(18698),o=n(37758)},74065:e=>{e.exports=function(e){var t=null==e?0:e.length;return t?e[t-1]:void 0}},74175:function(e){var t;"undefined"!==typeof self&&self,t=function(){return function(e){var t={};function n(r){if(t[r])return t[r].exports;var i=t[r]={i:r,l:!1,exports:{}};return e[r].call(i.exports,i,i.exports,n),i.l=!0,i.exports}return n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{configurable:!1,enumerable:!0,get:r})},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=109)}([function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(17),i=n(18),o=n(19),a=n(45),s=n(46),l=n(47),c=n(48),d=n(49),u=n(12),p=n(32),h=n(33),m=n(31),f=n(1),g={Scope:f.Scope,create:f.create,find:f.find,query:f.query,register:f.register,Container:r.default,Format:i.default,Leaf:o.default,Embed:c.default,Scroll:a.default,Block:l.default,Inline:s.default,Text:d.default,Attributor:{Attribute:u.default,Class:p.default,Style:h.default,Store:m.default}};t.default=g},function(e,t,n){"use strict";var r=this&&this.__extends||function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}();Object.defineProperty(t,"__esModule",{value:!0});var i=function(e){function t(t){var n=this;return t="[Parchment] "+t,(n=e.call(this,t)||this).message=t,n.name=n.constructor.name,n}return r(t,e),t}(Error);t.ParchmentError=i;var o,a={},s={},l={},c={};function d(e,t){var n;if(void 0===t&&(t=o.ANY),"string"===typeof e)n=c[e]||a[e];else if(e instanceof Text||e.nodeType===Node.TEXT_NODE)n=c.text;else if("number"===typeof e)e&o.LEVEL&o.BLOCK?n=c.block:e&o.LEVEL&o.INLINE&&(n=c.inline);else if(e instanceof HTMLElement){var r=(e.getAttribute("class")||"").split(/\s+/);for(var i in r)if(n=s[r[i]])break;n=n||l[e.tagName]}return null==n?null:t&o.LEVEL&n.scope&&t&o.TYPE&n.scope?n:null}t.DATA_KEY="__blot",function(e){e[e.TYPE=3]="TYPE",e[e.LEVEL=12]="LEVEL",e[e.ATTRIBUTE=13]="ATTRIBUTE",e[e.BLOT=14]="BLOT",e[e.INLINE=7]="INLINE",e[e.BLOCK=11]="BLOCK",e[e.BLOCK_BLOT=10]="BLOCK_BLOT",e[e.INLINE_BLOT=6]="INLINE_BLOT",e[e.BLOCK_ATTRIBUTE=9]="BLOCK_ATTRIBUTE",e[e.INLINE_ATTRIBUTE=5]="INLINE_ATTRIBUTE",e[e.ANY=15]="ANY"}(o=t.Scope||(t.Scope={})),t.create=function(e,t){var n=d(e);if(null==n)throw new i("Unable to create "+e+" blot");var r=n,o=e instanceof Node||e.nodeType===Node.TEXT_NODE?e:r.create(t);return new r(o,t)},t.find=function e(n,r){return void 0===r&&(r=!1),null==n?null:null!=n[t.DATA_KEY]?n[t.DATA_KEY].blot:r?e(n.parentNode,r):null},t.query=d,t.register=function e(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];if(t.length>1)return t.map(function(t){return e(t)});var r=t[0];if("string"!==typeof r.blotName&&"string"!==typeof r.attrName)throw new i("Invalid definition");if("abstract"===r.blotName)throw new i("Cannot register abstract class");return c[r.blotName||r.attrName]=r,"string"===typeof r.keyName?a[r.keyName]=r:(null!=r.className&&(s[r.className]=r),null!=r.tagName&&(Array.isArray(r.tagName)?r.tagName=r.tagName.map(function(e){return e.toUpperCase()}):r.tagName=r.tagName.toUpperCase(),(Array.isArray(r.tagName)?r.tagName:[r.tagName]).forEach(function(e){null!=l[e]&&null!=r.className||(l[e]=r)}))),r}},function(e,t,n){var r=n(51),i=n(11),o=n(3),a=n(20),s=String.fromCharCode(0),l=function(e){Array.isArray(e)?this.ops=e:null!=e&&Array.isArray(e.ops)?this.ops=e.ops:this.ops=[]};l.prototype.insert=function(e,t){var n={};return 0===e.length?this:(n.insert=e,null!=t&&"object"===typeof t&&Object.keys(t).length>0&&(n.attributes=t),this.push(n))},l.prototype.delete=function(e){return e<=0?this:this.push({delete:e})},l.prototype.retain=function(e,t){if(e<=0)return this;var n={retain:e};return null!=t&&"object"===typeof t&&Object.keys(t).length>0&&(n.attributes=t),this.push(n)},l.prototype.push=function(e){var t=this.ops.length,n=this.ops[t-1];if(e=o(!0,{},e),"object"===typeof n){if("number"===typeof e.delete&&"number"===typeof n.delete)return this.ops[t-1]={delete:n.delete+e.delete},this;if("number"===typeof n.delete&&null!=e.insert&&(t-=1,"object"!==typeof(n=this.ops[t-1])))return this.ops.unshift(e),this;if(i(e.attributes,n.attributes)){if("string"===typeof e.insert&&"string"===typeof n.insert)return this.ops[t-1]={insert:n.insert+e.insert},"object"===typeof e.attributes&&(this.ops[t-1].attributes=e.attributes),this;if("number"===typeof e.retain&&"number"===typeof n.retain)return this.ops[t-1]={retain:n.retain+e.retain},"object"===typeof e.attributes&&(this.ops[t-1].attributes=e.attributes),this}}return t===this.ops.length?this.ops.push(e):this.ops.splice(t,0,e),this},l.prototype.chop=function(){var e=this.ops[this.ops.length-1];return e&&e.retain&&!e.attributes&&this.ops.pop(),this},l.prototype.filter=function(e){return this.ops.filter(e)},l.prototype.forEach=function(e){this.ops.forEach(e)},l.prototype.map=function(e){return this.ops.map(e)},l.prototype.partition=function(e){var t=[],n=[];return this.forEach(function(r){(e(r)?t:n).push(r)}),[t,n]},l.prototype.reduce=function(e,t){return this.ops.reduce(e,t)},l.prototype.changeLength=function(){return this.reduce(function(e,t){return t.insert?e+a.length(t):t.delete?e-t.delete:e},0)},l.prototype.length=function(){return this.reduce(function(e,t){return e+a.length(t)},0)},l.prototype.slice=function(e,t){e=e||0,"number"!==typeof t&&(t=1/0);for(var n=[],r=a.iterator(this.ops),i=0;i<t&&r.hasNext();){var o;i<e?o=r.next(e-i):(o=r.next(t-i),n.push(o)),i+=a.length(o)}return new l(n)},l.prototype.compose=function(e){var t=a.iterator(this.ops),n=a.iterator(e.ops),r=[],o=n.peek();if(null!=o&&"number"===typeof o.retain&&null==o.attributes){for(var s=o.retain;"insert"===t.peekType()&&t.peekLength()<=s;)s-=t.peekLength(),r.push(t.next());o.retain-s>0&&n.next(o.retain-s)}for(var c=new l(r);t.hasNext()||n.hasNext();)if("insert"===n.peekType())c.push(n.next());else if("delete"===t.peekType())c.push(t.next());else{var d=Math.min(t.peekLength(),n.peekLength()),u=t.next(d),p=n.next(d);if("number"===typeof p.retain){var h={};"number"===typeof u.retain?h.retain=d:h.insert=u.insert;var m=a.attributes.compose(u.attributes,p.attributes,"number"===typeof u.retain);if(m&&(h.attributes=m),c.push(h),!n.hasNext()&&i(c.ops[c.ops.length-1],h)){var f=new l(t.rest());return c.concat(f).chop()}}else"number"===typeof p.delete&&"number"===typeof u.retain&&c.push(p)}return c.chop()},l.prototype.concat=function(e){var t=new l(this.ops.slice());return e.ops.length>0&&(t.push(e.ops[0]),t.ops=t.ops.concat(e.ops.slice(1))),t},l.prototype.diff=function(e,t){if(this.ops===e.ops)return new l;var n=[this,e].map(function(t){return t.map(function(n){if(null!=n.insert)return"string"===typeof n.insert?n.insert:s;throw new Error("diff() called "+(t===e?"on":"with")+" non-document")}).join("")}),o=new l,c=r(n[0],n[1],t),d=a.iterator(this.ops),u=a.iterator(e.ops);return c.forEach(function(e){for(var t=e[1].length;t>0;){var n=0;switch(e[0]){case r.INSERT:n=Math.min(u.peekLength(),t),o.push(u.next(n));break;case r.DELETE:n=Math.min(t,d.peekLength()),d.next(n),o.delete(n);break;case r.EQUAL:n=Math.min(d.peekLength(),u.peekLength(),t);var s=d.next(n),l=u.next(n);i(s.insert,l.insert)?o.retain(n,a.attributes.diff(s.attributes,l.attributes)):o.push(l).delete(n)}t-=n}}),o.chop()},l.prototype.eachLine=function(e,t){t=t||"\n";for(var n=a.iterator(this.ops),r=new l,i=0;n.hasNext();){if("insert"!==n.peekType())return;var o=n.peek(),s=a.length(o)-n.peekLength(),c="string"===typeof o.insert?o.insert.indexOf(t,s)-s:-1;if(c<0)r.push(n.next());else if(c>0)r.push(n.next(c));else{if(!1===e(r,n.next(1).attributes||{},i))return;i+=1,r=new l}}r.length()>0&&e(r,{},i)},l.prototype.transform=function(e,t){if(t=!!t,"number"===typeof e)return this.transformPosition(e,t);for(var n=a.iterator(this.ops),r=a.iterator(e.ops),i=new l;n.hasNext()||r.hasNext();)if("insert"!==n.peekType()||!t&&"insert"===r.peekType())if("insert"===r.peekType())i.push(r.next());else{var o=Math.min(n.peekLength(),r.peekLength()),s=n.next(o),c=r.next(o);if(s.delete)continue;c.delete?i.push(c):i.retain(o,a.attributes.transform(s.attributes,c.attributes,t))}else i.retain(a.length(n.next()));return i.chop()},l.prototype.transformPosition=function(e,t){t=!!t;for(var n=a.iterator(this.ops),r=0;n.hasNext()&&r<=e;){var i=n.peekLength(),o=n.peekType();n.next(),"delete"!==o?("insert"===o&&(r<e||!t)&&(e+=i),r+=i):e-=Math.min(i,e-r)}return e},e.exports=l},function(e,t){"use strict";var n=Object.prototype.hasOwnProperty,r=Object.prototype.toString,i=Object.defineProperty,o=Object.getOwnPropertyDescriptor,a=function(e){return"function"===typeof Array.isArray?Array.isArray(e):"[object Array]"===r.call(e)},s=function(e){if(!e||"[object Object]"!==r.call(e))return!1;var t,i=n.call(e,"constructor"),o=e.constructor&&e.constructor.prototype&&n.call(e.constructor.prototype,"isPrototypeOf");if(e.constructor&&!i&&!o)return!1;for(t in e);return"undefined"===typeof t||n.call(e,t)},l=function(e,t){i&&"__proto__"===t.name?i(e,t.name,{enumerable:!0,configurable:!0,value:t.newValue,writable:!0}):e[t.name]=t.newValue},c=function(e,t){if("__proto__"===t){if(!n.call(e,t))return;if(o)return o(e,t).value}return e[t]};e.exports=function e(){var t,n,r,i,o,d,u=arguments[0],p=1,h=arguments.length,m=!1;for("boolean"===typeof u&&(m=u,u=arguments[1]||{},p=2),(null==u||"object"!==typeof u&&"function"!==typeof u)&&(u={});p<h;++p)if(null!=(t=arguments[p]))for(n in t)r=c(u,n),u!==(i=c(t,n))&&(m&&i&&(s(i)||(o=a(i)))?(o?(o=!1,d=r&&a(r)?r:[]):d=r&&s(r)?r:{},l(u,{name:n,newValue:e(m,d,i)})):"undefined"!==typeof i&&l(u,{name:n,newValue:i}));return u}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=t.BlockEmbed=t.bubbleFormats=void 0;var r=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),i=function e(t,n,r){null===t&&(t=Function.prototype);var i=Object.getOwnPropertyDescriptor(t,n);if(void 0===i){var o=Object.getPrototypeOf(t);return null===o?void 0:e(o,n,r)}if("value"in i)return i.value;var a=i.get;return void 0!==a?a.call(r):void 0},o=u(n(3)),a=u(n(2)),s=u(n(0)),l=u(n(16)),c=u(n(6)),d=u(n(7));function u(e){return e&&e.__esModule?e:{default:e}}function p(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function h(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!==typeof t&&"function"!==typeof t?e:t}function m(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var f=function(e){function t(){return p(this,t),h(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return m(t,e),r(t,[{key:"attach",value:function(){i(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"attach",this).call(this),this.attributes=new s.default.Attributor.Store(this.domNode)}},{key:"delta",value:function(){return(new a.default).insert(this.value(),(0,o.default)(this.formats(),this.attributes.values()))}},{key:"format",value:function(e,t){var n=s.default.query(e,s.default.Scope.BLOCK_ATTRIBUTE);null!=n&&this.attributes.attribute(n,t)}},{key:"formatAt",value:function(e,t,n,r){this.format(n,r)}},{key:"insertAt",value:function(e,n,r){if("string"===typeof n&&n.endsWith("\n")){var o=s.default.create(g.blotName);this.parent.insertBefore(o,0===e?this:this.next),o.insertAt(0,n.slice(0,-1))}else i(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"insertAt",this).call(this,e,n,r)}}]),t}(s.default.Embed);f.scope=s.default.Scope.BLOCK_BLOT;var g=function(e){function t(e){p(this,t);var n=h(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return n.cache={},n}return m(t,e),r(t,[{key:"delta",value:function(){return null==this.cache.delta&&(this.cache.delta=this.descendants(s.default.Leaf).reduce(function(e,t){return 0===t.length()?e:e.insert(t.value(),v(t))},new a.default).insert("\n",v(this))),this.cache.delta}},{key:"deleteAt",value:function(e,n){i(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"deleteAt",this).call(this,e,n),this.cache={}}},{key:"formatAt",value:function(e,n,r,o){n<=0||(s.default.query(r,s.default.Scope.BLOCK)?e+n===this.length()&&this.format(r,o):i(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"formatAt",this).call(this,e,Math.min(n,this.length()-e-1),r,o),this.cache={})}},{key:"insertAt",value:function(e,n,r){if(null!=r)return i(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"insertAt",this).call(this,e,n,r);if(0!==n.length){var o=n.split("\n"),a=o.shift();a.length>0&&(e<this.length()-1||null==this.children.tail?i(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"insertAt",this).call(this,Math.min(e,this.length()-1),a):this.children.tail.insertAt(this.children.tail.length(),a),this.cache={});var s=this;o.reduce(function(e,t){return(s=s.split(e,!0)).insertAt(0,t),t.length},e+a.length)}}},{key:"insertBefore",value:function(e,n){var r=this.children.head;i(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"insertBefore",this).call(this,e,n),r instanceof l.default&&r.remove(),this.cache={}}},{key:"length",value:function(){return null==this.cache.length&&(this.cache.length=i(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"length",this).call(this)+1),this.cache.length}},{key:"moveChildren",value:function(e,n){i(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"moveChildren",this).call(this,e,n),this.cache={}}},{key:"optimize",value:function(e){i(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"optimize",this).call(this,e),this.cache={}}},{key:"path",value:function(e){return i(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"path",this).call(this,e,!0)}},{key:"removeChild",value:function(e){i(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"removeChild",this).call(this,e),this.cache={}}},{key:"split",value:function(e){var n=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(n&&(0===e||e>=this.length()-1)){var r=this.clone();return 0===e?(this.parent.insertBefore(r,this),this):(this.parent.insertBefore(r,this.next),r)}var o=i(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"split",this).call(this,e,n);return this.cache={},o}}]),t}(s.default.Block);function v(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return null==e?t:("function"===typeof e.formats&&(t=(0,o.default)(t,e.formats())),null==e.parent||"scroll"==e.parent.blotName||e.parent.statics.scope!==e.statics.scope?t:v(e.parent,t))}g.blotName="block",g.tagName="P",g.defaultChild="break",g.allowedChildren=[c.default,s.default.Embed,d.default],t.bubbleFormats=v,t.BlockEmbed=f,t.default=g},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=t.overload=t.expandConfig=void 0;var r="function"===typeof Symbol&&"symbol"===typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"===typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},i=function(e,t){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return function(e,t){var n=[],r=!0,i=!1,o=void 0;try{for(var a,s=e[Symbol.iterator]();!(r=(a=s.next()).done)&&(n.push(a.value),!t||n.length!==t);r=!0);}catch(l){i=!0,o=l}finally{try{!r&&s.return&&s.return()}finally{if(i)throw o}}return n}(e,t);throw new TypeError("Invalid attempt to destructure non-iterable instance")},o=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}();n(50);var a=g(n(2)),s=g(n(14)),l=g(n(8)),c=g(n(9)),d=g(n(0)),u=n(15),p=g(u),h=g(n(3)),m=g(n(10)),f=g(n(34));function g(e){return e&&e.__esModule?e:{default:e}}function v(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var x=(0,m.default)("quill"),y=function(){function e(t){var n=this,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.options=b(t,r),this.container=this.options.container,null==this.container)return x.error("Invalid Quill container",t);this.options.debug&&e.debug(this.options.debug);var i=this.container.innerHTML.trim();this.container.classList.add("ql-container"),this.container.innerHTML="",this.container.__quill=this,this.root=this.addContainer("ql-editor"),this.root.classList.add("ql-blank"),this.root.setAttribute("data-gramm",!1),this.scrollingContainer=this.options.scrollingContainer||this.root,this.emitter=new l.default,this.scroll=d.default.create(this.root,{emitter:this.emitter,whitelist:this.options.formats}),this.editor=new s.default(this.scroll),this.selection=new p.default(this.scroll,this.emitter),this.theme=new this.options.theme(this,this.options),this.keyboard=this.theme.addModule("keyboard"),this.clipboard=this.theme.addModule("clipboard"),this.history=this.theme.addModule("history"),this.theme.init(),this.emitter.on(l.default.events.EDITOR_CHANGE,function(e){e===l.default.events.TEXT_CHANGE&&n.root.classList.toggle("ql-blank",n.editor.isBlank())}),this.emitter.on(l.default.events.SCROLL_UPDATE,function(e,t){var r=n.selection.lastRange,i=r&&0===r.length?r.index:void 0;j.call(n,function(){return n.editor.update(null,t,i)},e)});var o=this.clipboard.convert("<div class='ql-editor' style=\"white-space: normal;\">"+i+"<p><br></p></div>");this.setContents(o),this.history.clear(),this.options.placeholder&&this.root.setAttribute("data-placeholder",this.options.placeholder),this.options.readOnly&&this.disable()}return o(e,null,[{key:"debug",value:function(e){!0===e&&(e="log"),m.default.level(e)}},{key:"find",value:function(e){return e.__quill||d.default.find(e)}},{key:"import",value:function(e){return null==this.imports[e]&&x.error("Cannot import "+e+". Are you sure it was registered?"),this.imports[e]}},{key:"register",value:function(e,t){var n=this,r=arguments.length>2&&void 0!==arguments[2]&&arguments[2];if("string"!==typeof e){var i=e.attrName||e.blotName;"string"===typeof i?this.register("formats/"+i,e,t):Object.keys(e).forEach(function(r){n.register(r,e[r],t)})}else null==this.imports[e]||r||x.warn("Overwriting "+e+" with",t),this.imports[e]=t,(e.startsWith("blots/")||e.startsWith("formats/"))&&"abstract"!==t.blotName?d.default.register(t):e.startsWith("modules")&&"function"===typeof t.register&&t.register()}}]),o(e,[{key:"addContainer",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;if("string"===typeof e){var n=e;(e=document.createElement("div")).classList.add(n)}return this.container.insertBefore(e,t),e}},{key:"blur",value:function(){this.selection.setRange(null)}},{key:"deleteText",value:function(e,t,n){var r=this,o=_(e,t,n),a=i(o,4);return e=a[0],t=a[1],n=a[3],j.call(this,function(){return r.editor.deleteText(e,t)},n,e,-1*t)}},{key:"disable",value:function(){this.enable(!1)}},{key:"enable",value:function(){var e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];this.scroll.enable(e),this.container.classList.toggle("ql-disabled",!e)}},{key:"focus",value:function(){var e=this.scrollingContainer.scrollTop;this.selection.focus(),this.scrollingContainer.scrollTop=e,this.scrollIntoView()}},{key:"format",value:function(e,t){var n=this,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:l.default.sources.API;return j.call(this,function(){var r=n.getSelection(!0),i=new a.default;if(null==r)return i;if(d.default.query(e,d.default.Scope.BLOCK))i=n.editor.formatLine(r.index,r.length,v({},e,t));else{if(0===r.length)return n.selection.format(e,t),i;i=n.editor.formatText(r.index,r.length,v({},e,t))}return n.setSelection(r,l.default.sources.SILENT),i},r)}},{key:"formatLine",value:function(e,t,n,r,o){var a,s=this,l=_(e,t,n,r,o),c=i(l,4);return e=c[0],t=c[1],a=c[2],o=c[3],j.call(this,function(){return s.editor.formatLine(e,t,a)},o,e,0)}},{key:"formatText",value:function(e,t,n,r,o){var a,s=this,l=_(e,t,n,r,o),c=i(l,4);return e=c[0],t=c[1],a=c[2],o=c[3],j.call(this,function(){return s.editor.formatText(e,t,a)},o,e,0)}},{key:"getBounds",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=void 0;n="number"===typeof e?this.selection.getBounds(e,t):this.selection.getBounds(e.index,e.length);var r=this.container.getBoundingClientRect();return{bottom:n.bottom-r.top,height:n.height,left:n.left-r.left,right:n.right-r.left,top:n.top-r.top,width:n.width}}},{key:"getContents",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.getLength()-e,n=_(e,t),r=i(n,2);return e=r[0],t=r[1],this.editor.getContents(e,t)}},{key:"getFormat",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.getSelection(!0),t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return"number"===typeof e?this.editor.getFormat(e,t):this.editor.getFormat(e.index,e.length)}},{key:"getIndex",value:function(e){return e.offset(this.scroll)}},{key:"getLength",value:function(){return this.scroll.length()}},{key:"getLeaf",value:function(e){return this.scroll.leaf(e)}},{key:"getLine",value:function(e){return this.scroll.line(e)}},{key:"getLines",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Number.MAX_VALUE;return"number"!==typeof e?this.scroll.lines(e.index,e.length):this.scroll.lines(e,t)}},{key:"getModule",value:function(e){return this.theme.modules[e]}},{key:"getSelection",value:function(){return arguments.length>0&&void 0!==arguments[0]&&arguments[0]&&this.focus(),this.update(),this.selection.getRange()[0]}},{key:"getText",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.getLength()-e,n=_(e,t),r=i(n,2);return e=r[0],t=r[1],this.editor.getText(e,t)}},{key:"hasFocus",value:function(){return this.selection.hasFocus()}},{key:"insertEmbed",value:function(t,n,r){var i=this,o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:e.sources.API;return j.call(this,function(){return i.editor.insertEmbed(t,n,r)},o,t)}},{key:"insertText",value:function(e,t,n,r,o){var a,s=this,l=_(e,0,n,r,o),c=i(l,4);return e=c[0],a=c[2],o=c[3],j.call(this,function(){return s.editor.insertText(e,t,a)},o,e,t.length)}},{key:"isEnabled",value:function(){return!this.container.classList.contains("ql-disabled")}},{key:"off",value:function(){return this.emitter.off.apply(this.emitter,arguments)}},{key:"on",value:function(){return this.emitter.on.apply(this.emitter,arguments)}},{key:"once",value:function(){return this.emitter.once.apply(this.emitter,arguments)}},{key:"pasteHTML",value:function(e,t,n){this.clipboard.dangerouslyPasteHTML(e,t,n)}},{key:"removeFormat",value:function(e,t,n){var r=this,o=_(e,t,n),a=i(o,4);return e=a[0],t=a[1],n=a[3],j.call(this,function(){return r.editor.removeFormat(e,t)},n,e)}},{key:"scrollIntoView",value:function(){this.selection.scrollIntoView(this.scrollingContainer)}},{key:"setContents",value:function(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:l.default.sources.API;return j.call(this,function(){e=new a.default(e);var n=t.getLength(),r=t.editor.deleteText(0,n),i=t.editor.applyDelta(e),o=i.ops[i.ops.length-1];return null!=o&&"string"===typeof o.insert&&"\n"===o.insert[o.insert.length-1]&&(t.editor.deleteText(t.getLength()-1,1),i.delete(1)),r.compose(i)},n)}},{key:"setSelection",value:function(t,n,r){if(null==t)this.selection.setRange(null,n||e.sources.API);else{var o=_(t,n,r),a=i(o,4);t=a[0],n=a[1],r=a[3],this.selection.setRange(new u.Range(t,n),r),r!==l.default.sources.SILENT&&this.selection.scrollIntoView(this.scrollingContainer)}}},{key:"setText",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:l.default.sources.API,n=(new a.default).insert(e);return this.setContents(n,t)}},{key:"update",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:l.default.sources.USER,t=this.scroll.update(e);return this.selection.update(e),t}},{key:"updateContents",value:function(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:l.default.sources.API;return j.call(this,function(){return e=new a.default(e),t.editor.applyDelta(e,n)},n,!0)}}]),e}();function b(e,t){if((t=(0,h.default)(!0,{container:e,modules:{clipboard:!0,keyboard:!0,history:!0}},t)).theme&&t.theme!==y.DEFAULTS.theme){if(t.theme=y.import("themes/"+t.theme),null==t.theme)throw new Error("Invalid theme "+t.theme+". Did you register it?")}else t.theme=f.default;var n=(0,h.default)(!0,{},t.theme.DEFAULTS);[n,t].forEach(function(e){e.modules=e.modules||{},Object.keys(e.modules).forEach(function(t){!0===e.modules[t]&&(e.modules[t]={})})});var r=Object.keys(n.modules).concat(Object.keys(t.modules)).reduce(function(e,t){var n=y.import("modules/"+t);return null==n?x.error("Cannot load "+t+" module. Are you sure you registered it?"):e[t]=n.DEFAULTS||{},e},{});return null!=t.modules&&t.modules.toolbar&&t.modules.toolbar.constructor!==Object&&(t.modules.toolbar={container:t.modules.toolbar}),t=(0,h.default)(!0,{},y.DEFAULTS,{modules:r},n,t),["bounds","container","scrollingContainer"].forEach(function(e){"string"===typeof t[e]&&(t[e]=document.querySelector(t[e]))}),t.modules=Object.keys(t.modules).reduce(function(e,n){return t.modules[n]&&(e[n]=t.modules[n]),e},{}),t}function j(e,t,n,r){if(this.options.strict&&!this.isEnabled()&&t===l.default.sources.USER)return new a.default;var i=null==n?null:this.getSelection(),o=this.editor.delta,s=e();if(null!=i&&(!0===n&&(n=i.index),null==r?i=C(i,s,t):0!==r&&(i=C(i,n,r,t)),this.setSelection(i,l.default.sources.SILENT)),s.length()>0){var c,d,u=[l.default.events.TEXT_CHANGE,s,o,t];(c=this.emitter).emit.apply(c,[l.default.events.EDITOR_CHANGE].concat(u)),t!==l.default.sources.SILENT&&(d=this.emitter).emit.apply(d,u)}return s}function _(e,t,n,i,o){var a={};return"number"===typeof e.index&&"number"===typeof e.length?"number"!==typeof t?(o=i,i=n,n=t,t=e.length,e=e.index):(t=e.length,e=e.index):"number"!==typeof t&&(o=i,i=n,n=t,t=0),"object"===("undefined"===typeof n?"undefined":r(n))?(a=n,o=i):"string"===typeof n&&(null!=i?a[n]=i:o=n),[e,t,a,o=o||l.default.sources.API]}function C(e,t,n,r){if(null==e)return null;var o=void 0,s=void 0;if(t instanceof a.default){var c=[e.index,e.index+e.length].map(function(e){return t.transformPosition(e,r!==l.default.sources.USER)}),d=i(c,2);o=d[0],s=d[1]}else{var p=[e.index,e.index+e.length].map(function(e){return e<t||e===t&&r===l.default.sources.USER?e:n>=0?e+n:Math.max(t,e+n)}),h=i(p,2);o=h[0],s=h[1]}return new u.Range(o,s-o)}y.DEFAULTS={bounds:null,formats:null,modules:{},placeholder:"",readOnly:!1,scrollingContainer:null,strict:!0,theme:"default"},y.events=l.default.events,y.sources=l.default.sources,y.version="1.3.7",y.imports={delta:a.default,parchment:d.default,"core/module":c.default,"core/theme":f.default},t.expandConfig=b,t.overload=_,t.default=y},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),i=function e(t,n,r){null===t&&(t=Function.prototype);var i=Object.getOwnPropertyDescriptor(t,n);if(void 0===i){var o=Object.getPrototypeOf(t);return null===o?void 0:e(o,n,r)}if("value"in i)return i.value;var a=i.get;return void 0!==a?a.call(r):void 0},o=s(n(7)),a=s(n(0));function s(e){return e&&e.__esModule?e:{default:e}}var l=function(e){function t(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!==typeof t&&"function"!==typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return function(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),r(t,[{key:"formatAt",value:function(e,n,r,o){if(t.compare(this.statics.blotName,r)<0&&a.default.query(r,a.default.Scope.BLOT)){var s=this.isolate(e,n);o&&s.wrap(r,o)}else i(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"formatAt",this).call(this,e,n,r,o)}},{key:"optimize",value:function(e){if(i(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"optimize",this).call(this,e),this.parent instanceof t&&t.compare(this.statics.blotName,this.parent.statics.blotName)>0){var n=this.parent.isolate(this.offset(),this.length());this.moveChildren(n),n.wrap(this)}}}],[{key:"compare",value:function(e,n){var r=t.order.indexOf(e),i=t.order.indexOf(n);return r>=0||i>=0?r-i:e===n?0:e<n?-1:1}}]),t}(a.default.Inline);l.allowedChildren=[l,a.default.Embed,o.default],l.order=["cursor","inline","underline","strike","italic","bold","script","link","code"],t.default=l},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r,i=n(0),o=function(e){function t(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!==typeof t&&"function"!==typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return function(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),t}(((r=i)&&r.__esModule?r:{default:r}).default.Text);t.default=o},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),i=function e(t,n,r){null===t&&(t=Function.prototype);var i=Object.getOwnPropertyDescriptor(t,n);if(void 0===i){var o=Object.getPrototypeOf(t);return null===o?void 0:e(o,n,r)}if("value"in i)return i.value;var a=i.get;return void 0!==a?a.call(r):void 0},o=a(n(54));function a(e){return e&&e.__esModule?e:{default:e}}var s=(0,a(n(10)).default)("quill:events");["selectionchange","mousedown","mouseup","click"].forEach(function(e){document.addEventListener(e,function(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];[].slice.call(document.querySelectorAll(".ql-container")).forEach(function(e){var n;e.__quill&&e.__quill.emitter&&(n=e.__quill.emitter).handleDOM.apply(n,t)})})});var l=function(e){function t(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var e=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!==typeof t&&"function"!==typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this));return e.listeners={},e.on("error",s.error),e}return function(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),r(t,[{key:"emit",value:function(){s.log.apply(s,arguments),i(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"emit",this).apply(this,arguments)}},{key:"handleDOM",value:function(e){for(var t=arguments.length,n=Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];(this.listeners[e.type]||[]).forEach(function(t){var r=t.node,i=t.handler;(e.target===r||r.contains(e.target))&&i.apply(void 0,[e].concat(n))})}},{key:"listenDOM",value:function(e,t,n){this.listeners[e]||(this.listeners[e]=[]),this.listeners[e].push({node:t,handler:n})}}]),t}(o.default);l.events={EDITOR_CHANGE:"editor-change",SCROLL_BEFORE_UPDATE:"scroll-before-update",SCROLL_OPTIMIZE:"scroll-optimize",SCROLL_UPDATE:"scroll-update",SELECTION_CHANGE:"selection-change",TEXT_CHANGE:"text-change"},l.sources={API:"api",SILENT:"silent",USER:"user"},t.default=l},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=function e(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.quill=t,this.options=n};r.DEFAULTS={},t.default=r},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=["error","warn","log","info"],i="warn";function o(e){if(r.indexOf(e)<=r.indexOf(i)){for(var t,n=arguments.length,o=Array(n>1?n-1:0),a=1;a<n;a++)o[a-1]=arguments[a];(t=console)[e].apply(t,o)}}function a(e){return r.reduce(function(t,n){return t[n]=o.bind(console,n,e),t},{})}o.level=a.level=function(e){i=e},t.default=a},function(e,t,n){var r=Array.prototype.slice,i=n(52),o=n(53),a=e.exports=function(e,t,n){return n||(n={}),e===t||(e instanceof Date&&t instanceof Date?e.getTime()===t.getTime():!e||!t||"object"!=typeof e&&"object"!=typeof t?n.strict?e===t:e==t:function(e,t,n){var c,d;if(s(e)||s(t))return!1;if(e.prototype!==t.prototype)return!1;if(o(e))return!!o(t)&&(e=r.call(e),t=r.call(t),a(e,t,n));if(l(e)){if(!l(t))return!1;if(e.length!==t.length)return!1;for(c=0;c<e.length;c++)if(e[c]!==t[c])return!1;return!0}try{var u=i(e),p=i(t)}catch(h){return!1}if(u.length!=p.length)return!1;for(u.sort(),p.sort(),c=u.length-1;c>=0;c--)if(u[c]!=p[c])return!1;for(c=u.length-1;c>=0;c--)if(d=u[c],!a(e[d],t[d],n))return!1;return typeof e===typeof t}(e,t,n))};function s(e){return null===e||void 0===e}function l(e){return!(!e||"object"!==typeof e||"number"!==typeof e.length)&&"function"===typeof e.copy&&"function"===typeof e.slice&&!(e.length>0&&"number"!==typeof e[0])}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(1),i=function(){function e(e,t,n){void 0===n&&(n={}),this.attrName=e,this.keyName=t;var i=r.Scope.TYPE&r.Scope.ATTRIBUTE;null!=n.scope?this.scope=n.scope&r.Scope.LEVEL|i:this.scope=r.Scope.ATTRIBUTE,null!=n.whitelist&&(this.whitelist=n.whitelist)}return e.keys=function(e){return[].map.call(e.attributes,function(e){return e.name})},e.prototype.add=function(e,t){return!!this.canAdd(e,t)&&(e.setAttribute(this.keyName,t),!0)},e.prototype.canAdd=function(e,t){return null!=r.query(e,r.Scope.BLOT&(this.scope|r.Scope.TYPE))&&(null==this.whitelist||("string"===typeof t?this.whitelist.indexOf(t.replace(/["']/g,""))>-1:this.whitelist.indexOf(t)>-1))},e.prototype.remove=function(e){e.removeAttribute(this.keyName)},e.prototype.value=function(e){var t=e.getAttribute(this.keyName);return this.canAdd(e,t)&&t?t:""},e}();t.default=i},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=t.Code=void 0;var r=function(e,t){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return function(e,t){var n=[],r=!0,i=!1,o=void 0;try{for(var a,s=e[Symbol.iterator]();!(r=(a=s.next()).done)&&(n.push(a.value),!t||n.length!==t);r=!0);}catch(l){i=!0,o=l}finally{try{!r&&s.return&&s.return()}finally{if(i)throw o}}return n}(e,t);throw new TypeError("Invalid attempt to destructure non-iterable instance")},i=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),o=function e(t,n,r){null===t&&(t=Function.prototype);var i=Object.getOwnPropertyDescriptor(t,n);if(void 0===i){var o=Object.getPrototypeOf(t);return null===o?void 0:e(o,n,r)}if("value"in i)return i.value;var a=i.get;return void 0!==a?a.call(r):void 0},a=u(n(2)),s=u(n(0)),l=u(n(4)),c=u(n(6)),d=u(n(7));function u(e){return e&&e.__esModule?e:{default:e}}function p(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function h(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!==typeof t&&"function"!==typeof t?e:t}function m(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var f=function(e){function t(){return p(this,t),h(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return m(t,e),t}(c.default);f.blotName="code",f.tagName="CODE";var g=function(e){function t(){return p(this,t),h(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return m(t,e),i(t,[{key:"delta",value:function(){var e=this,t=this.domNode.textContent;return t.endsWith("\n")&&(t=t.slice(0,-1)),t.split("\n").reduce(function(t,n){return t.insert(n).insert("\n",e.formats())},new a.default)}},{key:"format",value:function(e,n){if(e!==this.statics.blotName||!n){var i=this.descendant(d.default,this.length()-1),a=r(i,1)[0];null!=a&&a.deleteAt(a.length()-1,1),o(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"format",this).call(this,e,n)}}},{key:"formatAt",value:function(e,n,r,i){if(0!==n&&null!=s.default.query(r,s.default.Scope.BLOCK)&&(r!==this.statics.blotName||i!==this.statics.formats(this.domNode))){var o=this.newlineIndex(e);if(!(o<0||o>=e+n)){var a=this.newlineIndex(e,!0)+1,l=o-a+1,c=this.isolate(a,l),d=c.next;c.format(r,i),d instanceof t&&d.formatAt(0,e-a+n-l,r,i)}}}},{key:"insertAt",value:function(e,t,n){if(null==n){var i=this.descendant(d.default,e),o=r(i,2),a=o[0],s=o[1];a.insertAt(s,t)}}},{key:"length",value:function(){var e=this.domNode.textContent.length;return this.domNode.textContent.endsWith("\n")?e:e+1}},{key:"newlineIndex",value:function(e){if(arguments.length>1&&void 0!==arguments[1]&&arguments[1])return this.domNode.textContent.slice(0,e).lastIndexOf("\n");var t=this.domNode.textContent.slice(e).indexOf("\n");return t>-1?e+t:-1}},{key:"optimize",value:function(e){this.domNode.textContent.endsWith("\n")||this.appendChild(s.default.create("text","\n")),o(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"optimize",this).call(this,e);var n=this.next;null!=n&&n.prev===this&&n.statics.blotName===this.statics.blotName&&this.statics.formats(this.domNode)===n.statics.formats(n.domNode)&&(n.optimize(e),n.moveChildren(this),n.remove())}},{key:"replace",value:function(e){o(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"replace",this).call(this,e),[].slice.call(this.domNode.querySelectorAll("*")).forEach(function(e){var t=s.default.find(e);null==t?e.parentNode.removeChild(e):t instanceof s.default.Embed?t.remove():t.unwrap()})}}],[{key:"create",value:function(e){var n=o(t.__proto__||Object.getPrototypeOf(t),"create",this).call(this,e);return n.setAttribute("spellcheck",!1),n}},{key:"formats",value:function(){return!0}}]),t}(l.default);g.blotName="code-block",g.tagName="PRE",g.TAB="  ",t.Code=f,t.default=g},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r="function"===typeof Symbol&&"symbol"===typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"===typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},i=function(e,t){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return function(e,t){var n=[],r=!0,i=!1,o=void 0;try{for(var a,s=e[Symbol.iterator]();!(r=(a=s.next()).done)&&(n.push(a.value),!t||n.length!==t);r=!0);}catch(l){i=!0,o=l}finally{try{!r&&s.return&&s.return()}finally{if(i)throw o}}return n}(e,t);throw new TypeError("Invalid attempt to destructure non-iterable instance")},o=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),a=v(n(2)),s=v(n(20)),l=v(n(0)),c=v(n(13)),d=v(n(24)),u=n(4),p=v(u),h=v(n(16)),m=v(n(21)),f=v(n(11)),g=v(n(3));function v(e){return e&&e.__esModule?e:{default:e}}var x=/^[ -~]*$/,y=function(){function e(t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.scroll=t,this.delta=this.getDelta()}return o(e,[{key:"applyDelta",value:function(e){var t=this,n=!1;this.scroll.update();var o=this.scroll.length();return this.scroll.batchStart(),(e=function(e){return e.reduce(function(e,t){if(1===t.insert){var n=(0,m.default)(t.attributes);return delete n.image,e.insert({image:t.attributes.image},n)}if(null==t.attributes||!0!==t.attributes.list&&!0!==t.attributes.bullet||((t=(0,m.default)(t)).attributes.list?t.attributes.list="ordered":(t.attributes.list="bullet",delete t.attributes.bullet)),"string"===typeof t.insert){var r=t.insert.replace(/\r\n/g,"\n").replace(/\r/g,"\n");return e.insert(r,t.attributes)}return e.push(t)},new a.default)}(e)).reduce(function(e,a){var c=a.retain||a.delete||a.insert.length||1,d=a.attributes||{};if(null!=a.insert){if("string"===typeof a.insert){var h=a.insert;h.endsWith("\n")&&n&&(n=!1,h=h.slice(0,-1)),e>=o&&!h.endsWith("\n")&&(n=!0),t.scroll.insertAt(e,h);var m=t.scroll.line(e),f=i(m,2),v=f[0],x=f[1],y=(0,g.default)({},(0,u.bubbleFormats)(v));if(v instanceof p.default){var b=v.descendant(l.default.Leaf,x),j=i(b,1)[0];y=(0,g.default)(y,(0,u.bubbleFormats)(j))}d=s.default.attributes.diff(y,d)||{}}else if("object"===r(a.insert)){var _=Object.keys(a.insert)[0];if(null==_)return e;t.scroll.insertAt(e,_,a.insert[_])}o+=c}return Object.keys(d).forEach(function(n){t.scroll.formatAt(e,c,n,d[n])}),e+c},0),e.reduce(function(e,n){return"number"===typeof n.delete?(t.scroll.deleteAt(e,n.delete),e):e+(n.retain||n.insert.length||1)},0),this.scroll.batchEnd(),this.update(e)}},{key:"deleteText",value:function(e,t){return this.scroll.deleteAt(e,t),this.update((new a.default).retain(e).delete(t))}},{key:"formatLine",value:function(e,t){var n=this,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return this.scroll.update(),Object.keys(r).forEach(function(i){if(null==n.scroll.whitelist||n.scroll.whitelist[i]){var o=n.scroll.lines(e,Math.max(t,1)),a=t;o.forEach(function(t){var o=t.length();if(t instanceof c.default){var s=e-t.offset(n.scroll),l=t.newlineIndex(s+a)-s+1;t.formatAt(s,l,i,r[i])}else t.format(i,r[i]);a-=o})}}),this.scroll.optimize(),this.update((new a.default).retain(e).retain(t,(0,m.default)(r)))}},{key:"formatText",value:function(e,t){var n=this,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return Object.keys(r).forEach(function(i){n.scroll.formatAt(e,t,i,r[i])}),this.update((new a.default).retain(e).retain(t,(0,m.default)(r)))}},{key:"getContents",value:function(e,t){return this.delta.slice(e,e+t)}},{key:"getDelta",value:function(){return this.scroll.lines().reduce(function(e,t){return e.concat(t.delta())},new a.default)}},{key:"getFormat",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=[],r=[];0===t?this.scroll.path(e).forEach(function(e){var t=i(e,1)[0];t instanceof p.default?n.push(t):t instanceof l.default.Leaf&&r.push(t)}):(n=this.scroll.lines(e,t),r=this.scroll.descendants(l.default.Leaf,e,t));var o=[n,r].map(function(e){if(0===e.length)return{};for(var t=(0,u.bubbleFormats)(e.shift());Object.keys(t).length>0;){var n=e.shift();if(null==n)return t;t=b((0,u.bubbleFormats)(n),t)}return t});return g.default.apply(g.default,o)}},{key:"getText",value:function(e,t){return this.getContents(e,t).filter(function(e){return"string"===typeof e.insert}).map(function(e){return e.insert}).join("")}},{key:"insertEmbed",value:function(e,t,n){return this.scroll.insertAt(e,t,n),this.update((new a.default).retain(e).insert(function(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}({},t,n)))}},{key:"insertText",value:function(e,t){var n=this,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return t=t.replace(/\r\n/g,"\n").replace(/\r/g,"\n"),this.scroll.insertAt(e,t),Object.keys(r).forEach(function(i){n.scroll.formatAt(e,t.length,i,r[i])}),this.update((new a.default).retain(e).insert(t,(0,m.default)(r)))}},{key:"isBlank",value:function(){if(0==this.scroll.children.length)return!0;if(this.scroll.children.length>1)return!1;var e=this.scroll.children.head;return e.statics.blotName===p.default.blotName&&!(e.children.length>1)&&e.children.head instanceof h.default}},{key:"removeFormat",value:function(e,t){var n=this.getText(e,t),r=this.scroll.line(e+t),o=i(r,2),s=o[0],l=o[1],d=0,u=new a.default;null!=s&&(d=s instanceof c.default?s.newlineIndex(l)-l+1:s.length()-l,u=s.delta().slice(l,l+d-1).insert("\n"));var p=this.getContents(e,t+d).diff((new a.default).insert(n).concat(u)),h=(new a.default).retain(e).concat(p);return this.applyDelta(h)}},{key:"update",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:void 0,r=this.delta;if(1===t.length&&"characterData"===t[0].type&&t[0].target.data.match(x)&&l.default.find(t[0].target)){var i=l.default.find(t[0].target),o=(0,u.bubbleFormats)(i),s=i.offset(this.scroll),c=t[0].oldValue.replace(d.default.CONTENTS,""),p=(new a.default).insert(c),h=(new a.default).insert(i.value());e=(new a.default).retain(s).concat(p.diff(h,n)).reduce(function(e,t){return t.insert?e.insert(t.insert,o):e.push(t)},new a.default),this.delta=r.compose(e)}else this.delta=this.getDelta(),e&&(0,f.default)(r.compose(e),this.delta)||(e=r.diff(this.delta,n));return e}}]),e}();function b(e,t){return Object.keys(t).reduce(function(n,r){return null==e[r]||(t[r]===e[r]?n[r]=t[r]:Array.isArray(t[r])?t[r].indexOf(e[r])<0&&(n[r]=t[r].concat([e[r]])):n[r]=[t[r],e[r]]),n},{})}t.default=y},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=t.Range=void 0;var r=function(e,t){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return function(e,t){var n=[],r=!0,i=!1,o=void 0;try{for(var a,s=e[Symbol.iterator]();!(r=(a=s.next()).done)&&(n.push(a.value),!t||n.length!==t);r=!0);}catch(l){i=!0,o=l}finally{try{!r&&s.return&&s.return()}finally{if(i)throw o}}return n}(e,t);throw new TypeError("Invalid attempt to destructure non-iterable instance")},i=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),o=c(n(0)),a=c(n(21)),s=c(n(11)),l=c(n(8));function c(e){return e&&e.__esModule?e:{default:e}}function d(e){if(Array.isArray(e)){for(var t=0,n=Array(e.length);t<e.length;t++)n[t]=e[t];return n}return Array.from(e)}function u(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}var p=(0,c(n(10)).default)("quill:selection"),h=function e(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;u(this,e),this.index=t,this.length=n},m=function(){function e(t,n){var r=this;u(this,e),this.emitter=n,this.scroll=t,this.composing=!1,this.mouseDown=!1,this.root=this.scroll.domNode,this.cursor=o.default.create("cursor",this),this.lastRange=this.savedRange=new h(0,0),this.handleComposition(),this.handleDragging(),this.emitter.listenDOM("selectionchange",document,function(){r.mouseDown||setTimeout(r.update.bind(r,l.default.sources.USER),1)}),this.emitter.on(l.default.events.EDITOR_CHANGE,function(e,t){e===l.default.events.TEXT_CHANGE&&t.length()>0&&r.update(l.default.sources.SILENT)}),this.emitter.on(l.default.events.SCROLL_BEFORE_UPDATE,function(){if(r.hasFocus()){var e=r.getNativeRange();null!=e&&e.start.node!==r.cursor.textNode&&r.emitter.once(l.default.events.SCROLL_UPDATE,function(){try{r.setNativeRange(e.start.node,e.start.offset,e.end.node,e.end.offset)}catch(t){}})}}),this.emitter.on(l.default.events.SCROLL_OPTIMIZE,function(e,t){if(t.range){var n=t.range,i=n.startNode,o=n.startOffset,a=n.endNode,s=n.endOffset;r.setNativeRange(i,o,a,s)}}),this.update(l.default.sources.SILENT)}return i(e,[{key:"handleComposition",value:function(){var e=this;this.root.addEventListener("compositionstart",function(){e.composing=!0}),this.root.addEventListener("compositionend",function(){if(e.composing=!1,e.cursor.parent){var t=e.cursor.restore();if(!t)return;setTimeout(function(){e.setNativeRange(t.startNode,t.startOffset,t.endNode,t.endOffset)},1)}})}},{key:"handleDragging",value:function(){var e=this;this.emitter.listenDOM("mousedown",document.body,function(){e.mouseDown=!0}),this.emitter.listenDOM("mouseup",document.body,function(){e.mouseDown=!1,e.update(l.default.sources.USER)})}},{key:"focus",value:function(){this.hasFocus()||(this.root.focus(),this.setRange(this.savedRange))}},{key:"format",value:function(e,t){if(null==this.scroll.whitelist||this.scroll.whitelist[e]){this.scroll.update();var n=this.getNativeRange();if(null!=n&&n.native.collapsed&&!o.default.query(e,o.default.Scope.BLOCK)){if(n.start.node!==this.cursor.textNode){var r=o.default.find(n.start.node,!1);if(null==r)return;if(r instanceof o.default.Leaf){var i=r.split(n.start.offset);r.parent.insertBefore(this.cursor,i)}else r.insertBefore(this.cursor,n.start.node);this.cursor.attach()}this.cursor.format(e,t),this.scroll.optimize(),this.setNativeRange(this.cursor.textNode,this.cursor.textNode.data.length),this.update()}}}},{key:"getBounds",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=this.scroll.length();e=Math.min(e,n-1),t=Math.min(e+t,n-1)-e;var i=void 0,o=this.scroll.leaf(e),a=r(o,2),s=a[0],l=a[1];if(null==s)return null;var c=s.position(l,!0),d=r(c,2);i=d[0],l=d[1];var u=document.createRange();if(t>0){u.setStart(i,l);var p=this.scroll.leaf(e+t),h=r(p,2);if(s=h[0],l=h[1],null==s)return null;var m=s.position(l,!0),f=r(m,2);return i=f[0],l=f[1],u.setEnd(i,l),u.getBoundingClientRect()}var g="left",v=void 0;return i instanceof Text?(l<i.data.length?(u.setStart(i,l),u.setEnd(i,l+1)):(u.setStart(i,l-1),u.setEnd(i,l),g="right"),v=u.getBoundingClientRect()):(v=s.domNode.getBoundingClientRect(),l>0&&(g="right")),{bottom:v.top+v.height,height:v.height,left:v[g],right:v[g],top:v.top,width:0}}},{key:"getNativeRange",value:function(){var e=document.getSelection();if(null==e||e.rangeCount<=0)return null;var t=e.getRangeAt(0);if(null==t)return null;var n=this.normalizeNative(t);return p.info("getNativeRange",n),n}},{key:"getRange",value:function(){var e=this.getNativeRange();return null==e?[null,null]:[this.normalizedToRange(e),e]}},{key:"hasFocus",value:function(){return document.activeElement===this.root}},{key:"normalizedToRange",value:function(e){var t=this,n=[[e.start.node,e.start.offset]];e.native.collapsed||n.push([e.end.node,e.end.offset]);var i=n.map(function(e){var n=r(e,2),i=n[0],a=n[1],s=o.default.find(i,!0),l=s.offset(t.scroll);return 0===a?l:s instanceof o.default.Container?l+s.length():l+s.index(i,a)}),a=Math.min(Math.max.apply(Math,d(i)),this.scroll.length()-1),s=Math.min.apply(Math,[a].concat(d(i)));return new h(s,a-s)}},{key:"normalizeNative",value:function(e){if(!f(this.root,e.startContainer)||!e.collapsed&&!f(this.root,e.endContainer))return null;var t={start:{node:e.startContainer,offset:e.startOffset},end:{node:e.endContainer,offset:e.endOffset},native:e};return[t.start,t.end].forEach(function(e){for(var t=e.node,n=e.offset;!(t instanceof Text)&&t.childNodes.length>0;)if(t.childNodes.length>n)t=t.childNodes[n],n=0;else{if(t.childNodes.length!==n)break;n=(t=t.lastChild)instanceof Text?t.data.length:t.childNodes.length+1}e.node=t,e.offset=n}),t}},{key:"rangeToNative",value:function(e){var t=this,n=e.collapsed?[e.index]:[e.index,e.index+e.length],i=[],o=this.scroll.length();return n.forEach(function(e,n){e=Math.min(o-1,e);var a,s=t.scroll.leaf(e),l=r(s,2),c=l[0],d=l[1],u=c.position(d,0!==n),p=r(u,2);a=p[0],d=p[1],i.push(a,d)}),i.length<2&&(i=i.concat(i)),i}},{key:"scrollIntoView",value:function(e){var t=this.lastRange;if(null!=t){var n=this.getBounds(t.index,t.length);if(null!=n){var i=this.scroll.length()-1,o=this.scroll.line(Math.min(t.index,i)),a=r(o,1)[0],s=a;if(t.length>0){var l=this.scroll.line(Math.min(t.index+t.length,i));s=r(l,1)[0]}if(null!=a&&null!=s){var c=e.getBoundingClientRect();n.top<c.top?e.scrollTop-=c.top-n.top:n.bottom>c.bottom&&(e.scrollTop+=n.bottom-c.bottom)}}}}},{key:"setNativeRange",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:e,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:t,i=arguments.length>4&&void 0!==arguments[4]&&arguments[4];if(p.info("setNativeRange",e,t,n,r),null==e||null!=this.root.parentNode&&null!=e.parentNode&&null!=n.parentNode){var o=document.getSelection();if(null!=o)if(null!=e){this.hasFocus()||this.root.focus();var a=(this.getNativeRange()||{}).native;if(null==a||i||e!==a.startContainer||t!==a.startOffset||n!==a.endContainer||r!==a.endOffset){"BR"==e.tagName&&(t=[].indexOf.call(e.parentNode.childNodes,e),e=e.parentNode),"BR"==n.tagName&&(r=[].indexOf.call(n.parentNode.childNodes,n),n=n.parentNode);var s=document.createRange();s.setStart(e,t),s.setEnd(n,r),o.removeAllRanges(),o.addRange(s)}}else o.removeAllRanges(),this.root.blur(),document.body.focus()}}},{key:"setRange",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:l.default.sources.API;if("string"===typeof t&&(n=t,t=!1),p.info("setRange",e),null!=e){var r=this.rangeToNative(e);this.setNativeRange.apply(this,d(r).concat([t]))}else this.setNativeRange(null);this.update(n)}},{key:"update",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:l.default.sources.USER,t=this.lastRange,n=this.getRange(),i=r(n,2),o=i[0],c=i[1];if(this.lastRange=o,null!=this.lastRange&&(this.savedRange=this.lastRange),!(0,s.default)(t,this.lastRange)){var d;!this.composing&&null!=c&&c.native.collapsed&&c.start.node!==this.cursor.textNode&&this.cursor.restore();var u,p=[l.default.events.SELECTION_CHANGE,(0,a.default)(this.lastRange),(0,a.default)(t),e];(d=this.emitter).emit.apply(d,[l.default.events.EDITOR_CHANGE].concat(p)),e!==l.default.sources.SILENT&&(u=this.emitter).emit.apply(u,p)}}}]),e}();function f(e,t){try{t.parentNode}catch(n){return!1}return t instanceof Text&&(t=t.parentNode),e.contains(t)}t.Range=h,t.default=m},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r,i=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),o=function e(t,n,r){null===t&&(t=Function.prototype);var i=Object.getOwnPropertyDescriptor(t,n);if(void 0===i){var o=Object.getPrototypeOf(t);return null===o?void 0:e(o,n,r)}if("value"in i)return i.value;var a=i.get;return void 0!==a?a.call(r):void 0},a=n(0),s=function(e){function t(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!==typeof t&&"function"!==typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return function(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),i(t,[{key:"insertInto",value:function(e,n){0===e.children.length?o(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"insertInto",this).call(this,e,n):this.remove()}},{key:"length",value:function(){return 0}},{key:"value",value:function(){return""}}],[{key:"value",value:function(){}}]),t}(((r=a)&&r.__esModule?r:{default:r}).default.Embed);s.blotName="break",s.tagName="BR",t.default=s},function(e,t,n){"use strict";var r=this&&this.__extends||function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}();Object.defineProperty(t,"__esModule",{value:!0});var i=n(44),o=n(30),a=n(1),s=function(e){function t(t){var n=e.call(this,t)||this;return n.build(),n}return r(t,e),t.prototype.appendChild=function(e){this.insertBefore(e)},t.prototype.attach=function(){e.prototype.attach.call(this),this.children.forEach(function(e){e.attach()})},t.prototype.build=function(){var e=this;this.children=new i.default,[].slice.call(this.domNode.childNodes).reverse().forEach(function(t){try{var n=l(t);e.insertBefore(n,e.children.head||void 0)}catch(r){if(r instanceof a.ParchmentError)return;throw r}})},t.prototype.deleteAt=function(e,t){if(0===e&&t===this.length())return this.remove();this.children.forEachAt(e,t,function(e,t,n){e.deleteAt(t,n)})},t.prototype.descendant=function(e,n){var r=this.children.find(n),i=r[0],o=r[1];return null==e.blotName&&e(i)||null!=e.blotName&&i instanceof e?[i,o]:i instanceof t?i.descendant(e,o):[null,-1]},t.prototype.descendants=function(e,n,r){void 0===n&&(n=0),void 0===r&&(r=Number.MAX_VALUE);var i=[],o=r;return this.children.forEachAt(n,r,function(n,r,a){(null==e.blotName&&e(n)||null!=e.blotName&&n instanceof e)&&i.push(n),n instanceof t&&(i=i.concat(n.descendants(e,r,o))),o-=a}),i},t.prototype.detach=function(){this.children.forEach(function(e){e.detach()}),e.prototype.detach.call(this)},t.prototype.formatAt=function(e,t,n,r){this.children.forEachAt(e,t,function(e,t,i){e.formatAt(t,i,n,r)})},t.prototype.insertAt=function(e,t,n){var r=this.children.find(e),i=r[0],o=r[1];if(i)i.insertAt(o,t,n);else{var s=null==n?a.create("text",t):a.create(t,n);this.appendChild(s)}},t.prototype.insertBefore=function(e,t){if(null!=this.statics.allowedChildren&&!this.statics.allowedChildren.some(function(t){return e instanceof t}))throw new a.ParchmentError("Cannot insert "+e.statics.blotName+" into "+this.statics.blotName);e.insertInto(this,t)},t.prototype.length=function(){return this.children.reduce(function(e,t){return e+t.length()},0)},t.prototype.moveChildren=function(e,t){this.children.forEach(function(n){e.insertBefore(n,t)})},t.prototype.optimize=function(t){if(e.prototype.optimize.call(this,t),0===this.children.length)if(null!=this.statics.defaultChild){var n=a.create(this.statics.defaultChild);this.appendChild(n),n.optimize(t)}else this.remove()},t.prototype.path=function(e,n){void 0===n&&(n=!1);var r=this.children.find(e,n),i=r[0],o=r[1],a=[[this,e]];return i instanceof t?a.concat(i.path(o,n)):(null!=i&&a.push([i,o]),a)},t.prototype.removeChild=function(e){this.children.remove(e)},t.prototype.replace=function(n){n instanceof t&&n.moveChildren(this),e.prototype.replace.call(this,n)},t.prototype.split=function(e,t){if(void 0===t&&(t=!1),!t){if(0===e)return this;if(e===this.length())return this.next}var n=this.clone();return this.parent.insertBefore(n,this.next),this.children.forEachAt(e,this.length(),function(e,r,i){e=e.split(r,t),n.appendChild(e)}),n},t.prototype.unwrap=function(){this.moveChildren(this.parent,this.next),this.remove()},t.prototype.update=function(e,t){var n=this,r=[],i=[];e.forEach(function(e){e.target===n.domNode&&"childList"===e.type&&(r.push.apply(r,e.addedNodes),i.push.apply(i,e.removedNodes))}),i.forEach(function(e){if(!(null!=e.parentNode&&"IFRAME"!==e.tagName&&document.body.compareDocumentPosition(e)&Node.DOCUMENT_POSITION_CONTAINED_BY)){var t=a.find(e);null!=t&&(null!=t.domNode.parentNode&&t.domNode.parentNode!==n.domNode||t.detach())}}),r.filter(function(e){return e.parentNode==n.domNode}).sort(function(e,t){return e===t?0:e.compareDocumentPosition(t)&Node.DOCUMENT_POSITION_FOLLOWING?1:-1}).forEach(function(e){var t=null;null!=e.nextSibling&&(t=a.find(e.nextSibling));var r=l(e);r.next==t&&null!=r.next||(null!=r.parent&&r.parent.removeChild(n),n.insertBefore(r,t||void 0))})},t}(o.default);function l(e){var t=a.find(e);if(null==t)try{t=a.create(e)}catch(n){t=a.create(a.Scope.INLINE),[].slice.call(e.childNodes).forEach(function(e){t.domNode.appendChild(e)}),e.parentNode&&e.parentNode.replaceChild(t.domNode,e),t.attach()}return t}t.default=s},function(e,t,n){"use strict";var r=this&&this.__extends||function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}();Object.defineProperty(t,"__esModule",{value:!0});var i=n(12),o=n(31),a=n(17),s=n(1),l=function(e){function t(t){var n=e.call(this,t)||this;return n.attributes=new o.default(n.domNode),n}return r(t,e),t.formats=function(e){return"string"===typeof this.tagName||(Array.isArray(this.tagName)?e.tagName.toLowerCase():void 0)},t.prototype.format=function(e,t){var n=s.query(e);n instanceof i.default?this.attributes.attribute(n,t):t&&(null==n||e===this.statics.blotName&&this.formats()[e]===t||this.replaceWith(e,t))},t.prototype.formats=function(){var e=this.attributes.values(),t=this.statics.formats(this.domNode);return null!=t&&(e[this.statics.blotName]=t),e},t.prototype.replaceWith=function(t,n){var r=e.prototype.replaceWith.call(this,t,n);return this.attributes.copy(r),r},t.prototype.update=function(t,n){var r=this;e.prototype.update.call(this,t,n),t.some(function(e){return e.target===r.domNode&&"attributes"===e.type})&&this.attributes.build()},t.prototype.wrap=function(n,r){var i=e.prototype.wrap.call(this,n,r);return i instanceof t&&i.statics.scope===this.statics.scope&&this.attributes.move(i),i},t}(a.default);t.default=l},function(e,t,n){"use strict";var r=this&&this.__extends||function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}();Object.defineProperty(t,"__esModule",{value:!0});var i=n(30),o=n(1),a=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return r(t,e),t.value=function(e){return!0},t.prototype.index=function(e,t){return this.domNode===e||this.domNode.compareDocumentPosition(e)&Node.DOCUMENT_POSITION_CONTAINED_BY?Math.min(t,1):-1},t.prototype.position=function(e,t){var n=[].indexOf.call(this.parent.domNode.childNodes,this.domNode);return e>0&&(n+=1),[this.parent.domNode,n]},t.prototype.value=function(){var e;return(e={})[this.statics.blotName]=this.statics.value(this.domNode)||!0,e},t.scope=o.Scope.INLINE_BLOT,t}(i.default);t.default=a},function(e,t,n){var r=n(11),i=n(3),o={attributes:{compose:function(e,t,n){"object"!==typeof e&&(e={}),"object"!==typeof t&&(t={});var r=i(!0,{},t);for(var o in n||(r=Object.keys(r).reduce(function(e,t){return null!=r[t]&&(e[t]=r[t]),e},{})),e)void 0!==e[o]&&void 0===t[o]&&(r[o]=e[o]);return Object.keys(r).length>0?r:void 0},diff:function(e,t){"object"!==typeof e&&(e={}),"object"!==typeof t&&(t={});var n=Object.keys(e).concat(Object.keys(t)).reduce(function(n,i){return r(e[i],t[i])||(n[i]=void 0===t[i]?null:t[i]),n},{});return Object.keys(n).length>0?n:void 0},transform:function(e,t,n){if("object"!==typeof e)return t;if("object"===typeof t){if(!n)return t;var r=Object.keys(t).reduce(function(n,r){return void 0===e[r]&&(n[r]=t[r]),n},{});return Object.keys(r).length>0?r:void 0}}},iterator:function(e){return new a(e)},length:function(e){return"number"===typeof e.delete?e.delete:"number"===typeof e.retain?e.retain:"string"===typeof e.insert?e.insert.length:1}};function a(e){this.ops=e,this.index=0,this.offset=0}a.prototype.hasNext=function(){return this.peekLength()<1/0},a.prototype.next=function(e){e||(e=1/0);var t=this.ops[this.index];if(t){var n=this.offset,r=o.length(t);if(e>=r-n?(e=r-n,this.index+=1,this.offset=0):this.offset+=e,"number"===typeof t.delete)return{delete:e};var i={};return t.attributes&&(i.attributes=t.attributes),"number"===typeof t.retain?i.retain=e:"string"===typeof t.insert?i.insert=t.insert.substr(n,e):i.insert=t.insert,i}return{retain:1/0}},a.prototype.peek=function(){return this.ops[this.index]},a.prototype.peekLength=function(){return this.ops[this.index]?o.length(this.ops[this.index])-this.offset:1/0},a.prototype.peekType=function(){return this.ops[this.index]?"number"===typeof this.ops[this.index].delete?"delete":"number"===typeof this.ops[this.index].retain?"retain":"insert":"retain"},a.prototype.rest=function(){if(this.hasNext()){if(0===this.offset)return this.ops.slice(this.index);var e=this.offset,t=this.index,n=this.next(),r=this.ops.slice(this.index);return this.offset=e,this.index=t,[n].concat(r)}return[]},e.exports=o},function(e,t){var n=function(){"use strict";function e(e,t){return null!=t&&e instanceof t}var t,n,r;try{t=Map}catch(s){t=function(){}}try{n=Set}catch(s){n=function(){}}try{r=Promise}catch(s){r=function(){}}function i(o,s,l,c,d){"object"===typeof s&&(l=s.depth,c=s.prototype,d=s.includeNonEnumerable,s=s.circular);var u=[],p=[],h="undefined"!=typeof Buffer;return"undefined"==typeof s&&(s=!0),"undefined"==typeof l&&(l=1/0),function o(l,m){if(null===l)return null;if(0===m)return l;var f,g;if("object"!=typeof l)return l;if(e(l,t))f=new t;else if(e(l,n))f=new n;else if(e(l,r))f=new r(function(e,t){l.then(function(t){e(o(t,m-1))},function(e){t(o(e,m-1))})});else if(i.__isArray(l))f=[];else if(i.__isRegExp(l))f=new RegExp(l.source,a(l)),l.lastIndex&&(f.lastIndex=l.lastIndex);else if(i.__isDate(l))f=new Date(l.getTime());else{if(h&&Buffer.isBuffer(l))return f=Buffer.allocUnsafe?Buffer.allocUnsafe(l.length):new Buffer(l.length),l.copy(f),f;e(l,Error)?f=Object.create(l):"undefined"==typeof c?(g=Object.getPrototypeOf(l),f=Object.create(g)):(f=Object.create(c),g=c)}if(s){var v=u.indexOf(l);if(-1!=v)return p[v];u.push(l),p.push(f)}for(var x in e(l,t)&&l.forEach(function(e,t){var n=o(t,m-1),r=o(e,m-1);f.set(n,r)}),e(l,n)&&l.forEach(function(e){var t=o(e,m-1);f.add(t)}),l){var y;g&&(y=Object.getOwnPropertyDescriptor(g,x)),y&&null==y.set||(f[x]=o(l[x],m-1))}if(Object.getOwnPropertySymbols){var b=Object.getOwnPropertySymbols(l);for(x=0;x<b.length;x++){var j=b[x];(!(C=Object.getOwnPropertyDescriptor(l,j))||C.enumerable||d)&&(f[j]=o(l[j],m-1),C.enumerable||Object.defineProperty(f,j,{enumerable:!1}))}}if(d){var _=Object.getOwnPropertyNames(l);for(x=0;x<_.length;x++){var C,w=_[x];(C=Object.getOwnPropertyDescriptor(l,w))&&C.enumerable||(f[w]=o(l[w],m-1),Object.defineProperty(f,w,{enumerable:!1}))}}return f}(o,l)}function o(e){return Object.prototype.toString.call(e)}function a(e){var t="";return e.global&&(t+="g"),e.ignoreCase&&(t+="i"),e.multiline&&(t+="m"),t}return i.clonePrototype=function(e){if(null===e)return null;var t=function(){};return t.prototype=e,new t},i.__objToStr=o,i.__isDate=function(e){return"object"===typeof e&&"[object Date]"===o(e)},i.__isArray=function(e){return"object"===typeof e&&"[object Array]"===o(e)},i.__isRegExp=function(e){return"object"===typeof e&&"[object RegExp]"===o(e)},i.__getRegExpFlags=a,i}();"object"===typeof e&&e.exports&&(e.exports=n)},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=function(e,t){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return function(e,t){var n=[],r=!0,i=!1,o=void 0;try{for(var a,s=e[Symbol.iterator]();!(r=(a=s.next()).done)&&(n.push(a.value),!t||n.length!==t);r=!0);}catch(l){i=!0,o=l}finally{try{!r&&s.return&&s.return()}finally{if(i)throw o}}return n}(e,t);throw new TypeError("Invalid attempt to destructure non-iterable instance")},i=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),o=function e(t,n,r){null===t&&(t=Function.prototype);var i=Object.getOwnPropertyDescriptor(t,n);if(void 0===i){var o=Object.getPrototypeOf(t);return null===o?void 0:e(o,n,r)}if("value"in i)return i.value;var a=i.get;return void 0!==a?a.call(r):void 0},a=h(n(0)),s=h(n(8)),l=n(4),c=h(l),d=h(n(16)),u=h(n(13)),p=h(n(25));function h(e){return e&&e.__esModule?e:{default:e}}function m(e){return e instanceof c.default||e instanceof l.BlockEmbed}var f=function(e){function t(e,n){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var r=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!==typeof t&&"function"!==typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return r.emitter=n.emitter,Array.isArray(n.whitelist)&&(r.whitelist=n.whitelist.reduce(function(e,t){return e[t]=!0,e},{})),r.domNode.addEventListener("DOMNodeInserted",function(){}),r.optimize(),r.enable(),r}return function(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),i(t,[{key:"batchStart",value:function(){this.batch=!0}},{key:"batchEnd",value:function(){this.batch=!1,this.optimize()}},{key:"deleteAt",value:function(e,n){var i=this.line(e),a=r(i,2),s=a[0],c=a[1],p=this.line(e+n),h=r(p,1)[0];if(o(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"deleteAt",this).call(this,e,n),null!=h&&s!==h&&c>0){if(s instanceof l.BlockEmbed||h instanceof l.BlockEmbed)return void this.optimize();if(s instanceof u.default){var m=s.newlineIndex(s.length(),!0);if(m>-1&&(s=s.split(m+1))===h)return void this.optimize()}else if(h instanceof u.default){var f=h.newlineIndex(0);f>-1&&h.split(f+1)}var g=h.children.head instanceof d.default?null:h.children.head;s.moveChildren(h,g),s.remove()}this.optimize()}},{key:"enable",value:function(){var e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];this.domNode.setAttribute("contenteditable",e)}},{key:"formatAt",value:function(e,n,r,i){(null==this.whitelist||this.whitelist[r])&&(o(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"formatAt",this).call(this,e,n,r,i),this.optimize())}},{key:"insertAt",value:function(e,n,r){if(null==r||null==this.whitelist||this.whitelist[n]){if(e>=this.length())if(null==r||null==a.default.query(n,a.default.Scope.BLOCK)){var i=a.default.create(this.statics.defaultChild);this.appendChild(i),null==r&&n.endsWith("\n")&&(n=n.slice(0,-1)),i.insertAt(0,n,r)}else{var s=a.default.create(n,r);this.appendChild(s)}else o(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"insertAt",this).call(this,e,n,r);this.optimize()}}},{key:"insertBefore",value:function(e,n){if(e.statics.scope===a.default.Scope.INLINE_BLOT){var r=a.default.create(this.statics.defaultChild);r.appendChild(e),e=r}o(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"insertBefore",this).call(this,e,n)}},{key:"leaf",value:function(e){return this.path(e).pop()||[null,-1]}},{key:"line",value:function(e){return e===this.length()?this.line(e-1):this.descendant(m,e)}},{key:"lines",value:function(){return function e(t,n,r){var i=[],o=r;return t.children.forEachAt(n,r,function(t,n,r){m(t)?i.push(t):t instanceof a.default.Container&&(i=i.concat(e(t,n,o))),o-=r}),i}(this,arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,arguments.length>1&&void 0!==arguments[1]?arguments[1]:Number.MAX_VALUE)}},{key:"optimize",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};!0!==this.batch&&(o(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"optimize",this).call(this,e,n),e.length>0&&this.emitter.emit(s.default.events.SCROLL_OPTIMIZE,e,n))}},{key:"path",value:function(e){return o(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"path",this).call(this,e).slice(1)}},{key:"update",value:function(e){if(!0!==this.batch){var n=s.default.sources.USER;"string"===typeof e&&(n=e),Array.isArray(e)||(e=this.observer.takeRecords()),e.length>0&&this.emitter.emit(s.default.events.SCROLL_BEFORE_UPDATE,n,e),o(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"update",this).call(this,e.concat([])),e.length>0&&this.emitter.emit(s.default.events.SCROLL_UPDATE,n,e)}}}]),t}(a.default.Scroll);f.blotName="scroll",f.className="ql-editor",f.tagName="DIV",f.defaultChild="block",f.allowedChildren=[c.default,l.BlockEmbed,p.default],t.default=f},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SHORTKEY=t.default=void 0;var r="function"===typeof Symbol&&"symbol"===typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"===typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},i=function(e,t){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return function(e,t){var n=[],r=!0,i=!1,o=void 0;try{for(var a,s=e[Symbol.iterator]();!(r=(a=s.next()).done)&&(n.push(a.value),!t||n.length!==t);r=!0);}catch(l){i=!0,o=l}finally{try{!r&&s.return&&s.return()}finally{if(i)throw o}}return n}(e,t);throw new TypeError("Invalid attempt to destructure non-iterable instance")},o=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),a=f(n(21)),s=f(n(11)),l=f(n(3)),c=f(n(2)),d=f(n(20)),u=f(n(0)),p=f(n(5)),h=f(n(10)),m=f(n(9));function f(e){return e&&e.__esModule?e:{default:e}}function g(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var v=(0,h.default)("quill:keyboard"),x=/Mac/i.test(navigator.platform)?"metaKey":"ctrlKey",y=function(e){function t(e,n){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var r=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!==typeof t&&"function"!==typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e,n));return r.bindings={},Object.keys(r.options.bindings).forEach(function(t){("list autofill"!==t||null==e.scroll.whitelist||e.scroll.whitelist.list)&&r.options.bindings[t]&&r.addBinding(r.options.bindings[t])}),r.addBinding({key:t.keys.ENTER,shiftKey:null},w),r.addBinding({key:t.keys.ENTER,metaKey:null,ctrlKey:null,altKey:null},function(){}),/Firefox/i.test(navigator.userAgent)?(r.addBinding({key:t.keys.BACKSPACE},{collapsed:!0},j),r.addBinding({key:t.keys.DELETE},{collapsed:!0},_)):(r.addBinding({key:t.keys.BACKSPACE},{collapsed:!0,prefix:/^.?$/},j),r.addBinding({key:t.keys.DELETE},{collapsed:!0,suffix:/^.?$/},_)),r.addBinding({key:t.keys.BACKSPACE},{collapsed:!1},C),r.addBinding({key:t.keys.DELETE},{collapsed:!1},C),r.addBinding({key:t.keys.BACKSPACE,altKey:null,ctrlKey:null,metaKey:null,shiftKey:null},{collapsed:!0,offset:0},j),r.listen(),r}return function(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),o(t,null,[{key:"match",value:function(e,t){return t=k(t),!["altKey","ctrlKey","metaKey","shiftKey"].some(function(n){return!!t[n]!==e[n]&&null!==t[n]})&&t.key===(e.which||e.keyCode)}}]),o(t,[{key:"addBinding",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=k(e);if(null==r||null==r.key)return v.warn("Attempted to add invalid keyboard binding",r);"function"===typeof t&&(t={handler:t}),"function"===typeof n&&(n={handler:n}),r=(0,l.default)(r,t,n),this.bindings[r.key]=this.bindings[r.key]||[],this.bindings[r.key].push(r)}},{key:"listen",value:function(){var e=this;this.quill.root.addEventListener("keydown",function(n){if(!n.defaultPrevented){var o=n.which||n.keyCode,a=(e.bindings[o]||[]).filter(function(e){return t.match(n,e)});if(0!==a.length){var l=e.quill.getSelection();if(null!=l&&e.quill.hasFocus()){var c=e.quill.getLine(l.index),d=i(c,2),p=d[0],h=d[1],m=e.quill.getLeaf(l.index),f=i(m,2),g=f[0],v=f[1],x=0===l.length?[g,v]:e.quill.getLeaf(l.index+l.length),y=i(x,2),b=y[0],j=y[1],_=g instanceof u.default.Text?g.value().slice(0,v):"",C=b instanceof u.default.Text?b.value().slice(j):"",w={collapsed:0===l.length,empty:0===l.length&&p.length()<=1,format:e.quill.getFormat(l),offset:h,prefix:_,suffix:C};a.some(function(t){if(null!=t.collapsed&&t.collapsed!==w.collapsed)return!1;if(null!=t.empty&&t.empty!==w.empty)return!1;if(null!=t.offset&&t.offset!==w.offset)return!1;if(Array.isArray(t.format)){if(t.format.every(function(e){return null==w.format[e]}))return!1}else if("object"===r(t.format)&&!Object.keys(t.format).every(function(e){return!0===t.format[e]?null!=w.format[e]:!1===t.format[e]?null==w.format[e]:(0,s.default)(t.format[e],w.format[e])}))return!1;return!(null!=t.prefix&&!t.prefix.test(w.prefix))&&!(null!=t.suffix&&!t.suffix.test(w.suffix))&&!0!==t.handler.call(e,l,w)})&&n.preventDefault()}}}})}}]),t}(m.default);function b(e,t){var n,r=e===y.keys.LEFT?"prefix":"suffix";return g(n={key:e,shiftKey:t,altKey:null},r,/^$/),g(n,"handler",function(n){var r=n.index;e===y.keys.RIGHT&&(r+=n.length+1);var o=this.quill.getLeaf(r);return!(i(o,1)[0]instanceof u.default.Embed)||(e===y.keys.LEFT?t?this.quill.setSelection(n.index-1,n.length+1,p.default.sources.USER):this.quill.setSelection(n.index-1,p.default.sources.USER):t?this.quill.setSelection(n.index,n.length+1,p.default.sources.USER):this.quill.setSelection(n.index+n.length+1,p.default.sources.USER),!1)}),n}function j(e,t){if(!(0===e.index||this.quill.getLength()<=1)){var n=this.quill.getLine(e.index),r=i(n,1)[0],o={};if(0===t.offset){var a=this.quill.getLine(e.index-1),s=i(a,1)[0];if(null!=s&&s.length()>1){var l=r.formats(),c=this.quill.getFormat(e.index-1,1);o=d.default.attributes.diff(l,c)||{}}}var u=/[\uD800-\uDBFF][\uDC00-\uDFFF]$/.test(t.prefix)?2:1;this.quill.deleteText(e.index-u,u,p.default.sources.USER),Object.keys(o).length>0&&this.quill.formatLine(e.index-u,u,o,p.default.sources.USER),this.quill.focus()}}function _(e,t){var n=/^[\uD800-\uDBFF][\uDC00-\uDFFF]/.test(t.suffix)?2:1;if(!(e.index>=this.quill.getLength()-n)){var r={},o=0,a=this.quill.getLine(e.index),s=i(a,1)[0];if(t.offset>=s.length()-1){var l=this.quill.getLine(e.index+1),c=i(l,1)[0];if(c){var u=s.formats(),h=this.quill.getFormat(e.index,1);r=d.default.attributes.diff(u,h)||{},o=c.length()}}this.quill.deleteText(e.index,n,p.default.sources.USER),Object.keys(r).length>0&&this.quill.formatLine(e.index+o-1,n,r,p.default.sources.USER)}}function C(e){var t=this.quill.getLines(e),n={};if(t.length>1){var r=t[0].formats(),i=t[t.length-1].formats();n=d.default.attributes.diff(i,r)||{}}this.quill.deleteText(e,p.default.sources.USER),Object.keys(n).length>0&&this.quill.formatLine(e.index,1,n,p.default.sources.USER),this.quill.setSelection(e.index,p.default.sources.SILENT),this.quill.focus()}function w(e,t){var n=this;e.length>0&&this.quill.scroll.deleteAt(e.index,e.length);var r=Object.keys(t.format).reduce(function(e,n){return u.default.query(n,u.default.Scope.BLOCK)&&!Array.isArray(t.format[n])&&(e[n]=t.format[n]),e},{});this.quill.insertText(e.index,"\n",r,p.default.sources.USER),this.quill.setSelection(e.index+1,p.default.sources.SILENT),this.quill.focus(),Object.keys(t.format).forEach(function(e){null==r[e]&&(Array.isArray(t.format[e])||"link"!==e&&n.quill.format(e,t.format[e],p.default.sources.USER))})}function S(e){return{key:y.keys.TAB,shiftKey:!e,format:{"code-block":!0},handler:function(t){var n=u.default.query("code-block"),r=t.index,o=t.length,a=this.quill.scroll.descendant(n,r),s=i(a,2),l=s[0],c=s[1];if(null!=l){var d=this.quill.getIndex(l),h=l.newlineIndex(c,!0)+1,m=l.newlineIndex(d+c+o),f=l.domNode.textContent.slice(h,m).split("\n");c=0,f.forEach(function(t,i){e?(l.insertAt(h+c,n.TAB),c+=n.TAB.length,0===i?r+=n.TAB.length:o+=n.TAB.length):t.startsWith(n.TAB)&&(l.deleteAt(h+c,n.TAB.length),c-=n.TAB.length,0===i?r-=n.TAB.length:o-=n.TAB.length),c+=t.length+1}),this.quill.update(p.default.sources.USER),this.quill.setSelection(r,o,p.default.sources.SILENT)}}}}function A(e){return{key:e[0].toUpperCase(),shortKey:!0,handler:function(t,n){this.quill.format(e,!n.format[e],p.default.sources.USER)}}}function k(e){if("string"===typeof e||"number"===typeof e)return k({key:e});if("object"===("undefined"===typeof e?"undefined":r(e))&&(e=(0,a.default)(e,!1)),"string"===typeof e.key)if(null!=y.keys[e.key.toUpperCase()])e.key=y.keys[e.key.toUpperCase()];else{if(1!==e.key.length)return null;e.key=e.key.toUpperCase().charCodeAt(0)}return e.shortKey&&(e[x]=e.shortKey,delete e.shortKey),e}y.keys={BACKSPACE:8,TAB:9,ENTER:13,ESCAPE:27,LEFT:37,UP:38,RIGHT:39,DOWN:40,DELETE:46},y.DEFAULTS={bindings:{bold:A("bold"),italic:A("italic"),underline:A("underline"),indent:{key:y.keys.TAB,format:["blockquote","indent","list"],handler:function(e,t){if(t.collapsed&&0!==t.offset)return!0;this.quill.format("indent","+1",p.default.sources.USER)}},outdent:{key:y.keys.TAB,shiftKey:!0,format:["blockquote","indent","list"],handler:function(e,t){if(t.collapsed&&0!==t.offset)return!0;this.quill.format("indent","-1",p.default.sources.USER)}},"outdent backspace":{key:y.keys.BACKSPACE,collapsed:!0,shiftKey:null,metaKey:null,ctrlKey:null,altKey:null,format:["indent","list"],offset:0,handler:function(e,t){null!=t.format.indent?this.quill.format("indent","-1",p.default.sources.USER):null!=t.format.list&&this.quill.format("list",!1,p.default.sources.USER)}},"indent code-block":S(!0),"outdent code-block":S(!1),"remove tab":{key:y.keys.TAB,shiftKey:!0,collapsed:!0,prefix:/\t$/,handler:function(e){this.quill.deleteText(e.index-1,1,p.default.sources.USER)}},tab:{key:y.keys.TAB,handler:function(e){this.quill.history.cutoff();var t=(new c.default).retain(e.index).delete(e.length).insert("\t");this.quill.updateContents(t,p.default.sources.USER),this.quill.history.cutoff(),this.quill.setSelection(e.index+1,p.default.sources.SILENT)}},"list empty enter":{key:y.keys.ENTER,collapsed:!0,format:["list"],empty:!0,handler:function(e,t){this.quill.format("list",!1,p.default.sources.USER),t.format.indent&&this.quill.format("indent",!1,p.default.sources.USER)}},"checklist enter":{key:y.keys.ENTER,collapsed:!0,format:{list:"checked"},handler:function(e){var t=this.quill.getLine(e.index),n=i(t,2),r=n[0],o=n[1],a=(0,l.default)({},r.formats(),{list:"checked"}),s=(new c.default).retain(e.index).insert("\n",a).retain(r.length()-o-1).retain(1,{list:"unchecked"});this.quill.updateContents(s,p.default.sources.USER),this.quill.setSelection(e.index+1,p.default.sources.SILENT),this.quill.scrollIntoView()}},"header enter":{key:y.keys.ENTER,collapsed:!0,format:["header"],suffix:/^$/,handler:function(e,t){var n=this.quill.getLine(e.index),r=i(n,2),o=r[0],a=r[1],s=(new c.default).retain(e.index).insert("\n",t.format).retain(o.length()-a-1).retain(1,{header:null});this.quill.updateContents(s,p.default.sources.USER),this.quill.setSelection(e.index+1,p.default.sources.SILENT),this.quill.scrollIntoView()}},"list autofill":{key:" ",collapsed:!0,format:{list:!1},prefix:/^\s*?(\d+\.|-|\*|\[ ?\]|\[x\])$/,handler:function(e,t){var n=t.prefix.length,r=this.quill.getLine(e.index),o=i(r,2),a=o[0],s=o[1];if(s>n)return!0;var l=void 0;switch(t.prefix.trim()){case"[]":case"[ ]":l="unchecked";break;case"[x]":l="checked";break;case"-":case"*":l="bullet";break;default:l="ordered"}this.quill.insertText(e.index," ",p.default.sources.USER),this.quill.history.cutoff();var d=(new c.default).retain(e.index-s).delete(n+1).retain(a.length()-2-s).retain(1,{list:l});this.quill.updateContents(d,p.default.sources.USER),this.quill.history.cutoff(),this.quill.setSelection(e.index-n,p.default.sources.SILENT)}},"code exit":{key:y.keys.ENTER,collapsed:!0,format:["code-block"],prefix:/\n\n$/,suffix:/^\s+$/,handler:function(e){var t=this.quill.getLine(e.index),n=i(t,2),r=n[0],o=n[1],a=(new c.default).retain(e.index+r.length()-o-2).retain(1,{"code-block":null}).delete(1);this.quill.updateContents(a,p.default.sources.USER)}},"embed left":b(y.keys.LEFT,!1),"embed left shift":b(y.keys.LEFT,!0),"embed right":b(y.keys.RIGHT,!1),"embed right shift":b(y.keys.RIGHT,!0)}},t.default=y,t.SHORTKEY=x},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=function(e,t){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return function(e,t){var n=[],r=!0,i=!1,o=void 0;try{for(var a,s=e[Symbol.iterator]();!(r=(a=s.next()).done)&&(n.push(a.value),!t||n.length!==t);r=!0);}catch(l){i=!0,o=l}finally{try{!r&&s.return&&s.return()}finally{if(i)throw o}}return n}(e,t);throw new TypeError("Invalid attempt to destructure non-iterable instance")},i=function e(t,n,r){null===t&&(t=Function.prototype);var i=Object.getOwnPropertyDescriptor(t,n);if(void 0===i){var o=Object.getPrototypeOf(t);return null===o?void 0:e(o,n,r)}if("value"in i)return i.value;var a=i.get;return void 0!==a?a.call(r):void 0},o=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),a=l(n(0)),s=l(n(7));function l(e){return e&&e.__esModule?e:{default:e}}var c=function(e){function t(e,n){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var r=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!==typeof t&&"function"!==typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return r.selection=n,r.textNode=document.createTextNode(t.CONTENTS),r.domNode.appendChild(r.textNode),r._length=0,r}return function(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),o(t,null,[{key:"value",value:function(){}}]),o(t,[{key:"detach",value:function(){null!=this.parent&&this.parent.removeChild(this)}},{key:"format",value:function(e,n){if(0!==this._length)return i(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"format",this).call(this,e,n);for(var r=this,o=0;null!=r&&r.statics.scope!==a.default.Scope.BLOCK_BLOT;)o+=r.offset(r.parent),r=r.parent;null!=r&&(this._length=t.CONTENTS.length,r.optimize(),r.formatAt(o,t.CONTENTS.length,e,n),this._length=0)}},{key:"index",value:function(e,n){return e===this.textNode?0:i(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"index",this).call(this,e,n)}},{key:"length",value:function(){return this._length}},{key:"position",value:function(){return[this.textNode,this.textNode.data.length]}},{key:"remove",value:function(){i(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"remove",this).call(this),this.parent=null}},{key:"restore",value:function(){if(!this.selection.composing&&null!=this.parent){var e=this.textNode,n=this.selection.getNativeRange(),i=void 0,o=void 0,l=void 0;if(null!=n&&n.start.node===e&&n.end.node===e){var c=[e,n.start.offset,n.end.offset];i=c[0],o=c[1],l=c[2]}for(;null!=this.domNode.lastChild&&this.domNode.lastChild!==this.textNode;)this.domNode.parentNode.insertBefore(this.domNode.lastChild,this.domNode);if(this.textNode.data!==t.CONTENTS){var d=this.textNode.data.split(t.CONTENTS).join("");this.next instanceof s.default?(i=this.next.domNode,this.next.insertAt(0,d),this.textNode.data=t.CONTENTS):(this.textNode.data=d,this.parent.insertBefore(a.default.create(this.textNode),this),this.textNode=document.createTextNode(t.CONTENTS),this.domNode.appendChild(this.textNode))}if(this.remove(),null!=o){var u=[o,l].map(function(e){return Math.max(0,Math.min(i.data.length,e-1))}),p=r(u,2);return o=p[0],l=p[1],{startNode:i,startOffset:o,endNode:i,endOffset:l}}}}},{key:"update",value:function(e,t){var n=this;if(e.some(function(e){return"characterData"===e.type&&e.target===n.textNode})){var r=this.restore();r&&(t.range=r)}}},{key:"value",value:function(){return""}}]),t}(a.default.Embed);c.blotName="cursor",c.className="ql-cursor",c.tagName="span",c.CONTENTS="\ufeff",t.default=c},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=a(n(0)),i=n(4),o=a(i);function a(e){return e&&e.__esModule?e:{default:e}}var s=function(e){function t(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!==typeof t&&"function"!==typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return function(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),t}(r.default.Container);s.allowedChildren=[o.default,i.BlockEmbed,s],t.default=s},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ColorStyle=t.ColorClass=t.ColorAttributor=void 0;var r,i=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),o=function e(t,n,r){null===t&&(t=Function.prototype);var i=Object.getOwnPropertyDescriptor(t,n);if(void 0===i){var o=Object.getPrototypeOf(t);return null===o?void 0:e(o,n,r)}if("value"in i)return i.value;var a=i.get;return void 0!==a?a.call(r):void 0},a=n(0),s=(r=a)&&r.__esModule?r:{default:r},l=function(e){function t(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!==typeof t&&"function"!==typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return function(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),i(t,[{key:"value",value:function(e){var n=o(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"value",this).call(this,e);return n.startsWith("rgb(")?(n=n.replace(/^[^\d]+/,"").replace(/[^\d]+$/,""),"#"+n.split(",").map(function(e){return("00"+parseInt(e).toString(16)).slice(-2)}).join("")):n}}]),t}(s.default.Attributor.Style),c=new s.default.Attributor.Class("color","ql-color",{scope:s.default.Scope.INLINE}),d=new l("color","color",{scope:s.default.Scope.INLINE});t.ColorAttributor=l,t.ColorClass=c,t.ColorStyle=d},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.sanitize=t.default=void 0;var r,i=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),o=function e(t,n,r){null===t&&(t=Function.prototype);var i=Object.getOwnPropertyDescriptor(t,n);if(void 0===i){var o=Object.getPrototypeOf(t);return null===o?void 0:e(o,n,r)}if("value"in i)return i.value;var a=i.get;return void 0!==a?a.call(r):void 0},a=n(6),s=function(e){function t(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!==typeof t&&"function"!==typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return function(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),i(t,[{key:"format",value:function(e,n){if(e!==this.statics.blotName||!n)return o(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"format",this).call(this,e,n);n=this.constructor.sanitize(n),this.domNode.setAttribute("href",n)}}],[{key:"create",value:function(e){var n=o(t.__proto__||Object.getPrototypeOf(t),"create",this).call(this,e);return e=this.sanitize(e),n.setAttribute("href",e),n.setAttribute("rel","noopener noreferrer"),n.setAttribute("target","_blank"),n}},{key:"formats",value:function(e){return e.getAttribute("href")}},{key:"sanitize",value:function(e){return l(e,this.PROTOCOL_WHITELIST)?e:this.SANITIZED_URL}}]),t}(((r=a)&&r.__esModule?r:{default:r}).default);function l(e,t){var n=document.createElement("a");n.href=e;var r=n.href.slice(0,n.href.indexOf(":"));return t.indexOf(r)>-1}s.blotName="link",s.tagName="A",s.SANITIZED_URL="about:blank",s.PROTOCOL_WHITELIST=["http","https","mailto","tel"],t.default=s,t.sanitize=l},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r="function"===typeof Symbol&&"symbol"===typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"===typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},i=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),o=s(n(23)),a=s(n(107));function s(e){return e&&e.__esModule?e:{default:e}}var l=0;function c(e,t){e.setAttribute(t,!("true"===e.getAttribute(t)))}var d=function(){function e(t){var n=this;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.select=t,this.container=document.createElement("span"),this.buildPicker(),this.select.style.display="none",this.select.parentNode.insertBefore(this.container,this.select),this.label.addEventListener("mousedown",function(){n.togglePicker()}),this.label.addEventListener("keydown",function(e){switch(e.keyCode){case o.default.keys.ENTER:n.togglePicker();break;case o.default.keys.ESCAPE:n.escape(),e.preventDefault()}}),this.select.addEventListener("change",this.update.bind(this))}return i(e,[{key:"togglePicker",value:function(){this.container.classList.toggle("ql-expanded"),c(this.label,"aria-expanded"),c(this.options,"aria-hidden")}},{key:"buildItem",value:function(e){var t=this,n=document.createElement("span");return n.tabIndex="0",n.setAttribute("role","button"),n.classList.add("ql-picker-item"),e.hasAttribute("value")&&n.setAttribute("data-value",e.getAttribute("value")),e.textContent&&n.setAttribute("data-label",e.textContent),n.addEventListener("click",function(){t.selectItem(n,!0)}),n.addEventListener("keydown",function(e){switch(e.keyCode){case o.default.keys.ENTER:t.selectItem(n,!0),e.preventDefault();break;case o.default.keys.ESCAPE:t.escape(),e.preventDefault()}}),n}},{key:"buildLabel",value:function(){var e=document.createElement("span");return e.classList.add("ql-picker-label"),e.innerHTML=a.default,e.tabIndex="0",e.setAttribute("role","button"),e.setAttribute("aria-expanded","false"),this.container.appendChild(e),e}},{key:"buildOptions",value:function(){var e=this,t=document.createElement("span");t.classList.add("ql-picker-options"),t.setAttribute("aria-hidden","true"),t.tabIndex="-1",t.id="ql-picker-options-"+l,l+=1,this.label.setAttribute("aria-controls",t.id),this.options=t,[].slice.call(this.select.options).forEach(function(n){var r=e.buildItem(n);t.appendChild(r),!0===n.selected&&e.selectItem(r)}),this.container.appendChild(t)}},{key:"buildPicker",value:function(){var e=this;[].slice.call(this.select.attributes).forEach(function(t){e.container.setAttribute(t.name,t.value)}),this.container.classList.add("ql-picker"),this.label=this.buildLabel(),this.buildOptions()}},{key:"escape",value:function(){var e=this;this.close(),setTimeout(function(){return e.label.focus()},1)}},{key:"close",value:function(){this.container.classList.remove("ql-expanded"),this.label.setAttribute("aria-expanded","false"),this.options.setAttribute("aria-hidden","true")}},{key:"selectItem",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=this.container.querySelector(".ql-selected");if(e!==n&&(null!=n&&n.classList.remove("ql-selected"),null!=e&&(e.classList.add("ql-selected"),this.select.selectedIndex=[].indexOf.call(e.parentNode.children,e),e.hasAttribute("data-value")?this.label.setAttribute("data-value",e.getAttribute("data-value")):this.label.removeAttribute("data-value"),e.hasAttribute("data-label")?this.label.setAttribute("data-label",e.getAttribute("data-label")):this.label.removeAttribute("data-label"),t))){if("function"===typeof Event)this.select.dispatchEvent(new Event("change"));else if("object"===("undefined"===typeof Event?"undefined":r(Event))){var i=document.createEvent("Event");i.initEvent("change",!0,!0),this.select.dispatchEvent(i)}this.close()}}},{key:"update",value:function(){var e=void 0;if(this.select.selectedIndex>-1){var t=this.container.querySelector(".ql-picker-options").children[this.select.selectedIndex];e=this.select.options[this.select.selectedIndex],this.selectItem(t)}else this.selectItem(null);var n=null!=e&&e!==this.select.querySelector("option[selected]");this.label.classList.toggle("ql-active",n)}}]),e}();t.default=d},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=v(n(0)),i=v(n(5)),o=n(4),a=v(o),s=v(n(16)),l=v(n(25)),c=v(n(24)),d=v(n(35)),u=v(n(6)),p=v(n(22)),h=v(n(7)),m=v(n(55)),f=v(n(42)),g=v(n(23));function v(e){return e&&e.__esModule?e:{default:e}}i.default.register({"blots/block":a.default,"blots/block/embed":o.BlockEmbed,"blots/break":s.default,"blots/container":l.default,"blots/cursor":c.default,"blots/embed":d.default,"blots/inline":u.default,"blots/scroll":p.default,"blots/text":h.default,"modules/clipboard":m.default,"modules/history":f.default,"modules/keyboard":g.default}),r.default.register(a.default,s.default,c.default,u.default,p.default,h.default),t.default=i.default},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(1),i=function(){function e(e){this.domNode=e,this.domNode[r.DATA_KEY]={blot:this}}return Object.defineProperty(e.prototype,"statics",{get:function(){return this.constructor},enumerable:!0,configurable:!0}),e.create=function(e){if(null==this.tagName)throw new r.ParchmentError("Blot definition missing tagName");var t;return Array.isArray(this.tagName)?("string"===typeof e&&(e=e.toUpperCase(),parseInt(e).toString()===e&&(e=parseInt(e))),t="number"===typeof e?document.createElement(this.tagName[e-1]):this.tagName.indexOf(e)>-1?document.createElement(e):document.createElement(this.tagName[0])):t=document.createElement(this.tagName),this.className&&t.classList.add(this.className),t},e.prototype.attach=function(){null!=this.parent&&(this.scroll=this.parent.scroll)},e.prototype.clone=function(){var e=this.domNode.cloneNode(!1);return r.create(e)},e.prototype.detach=function(){null!=this.parent&&this.parent.removeChild(this),delete this.domNode[r.DATA_KEY]},e.prototype.deleteAt=function(e,t){this.isolate(e,t).remove()},e.prototype.formatAt=function(e,t,n,i){var o=this.isolate(e,t);if(null!=r.query(n,r.Scope.BLOT)&&i)o.wrap(n,i);else if(null!=r.query(n,r.Scope.ATTRIBUTE)){var a=r.create(this.statics.scope);o.wrap(a),a.format(n,i)}},e.prototype.insertAt=function(e,t,n){var i=null==n?r.create("text",t):r.create(t,n),o=this.split(e);this.parent.insertBefore(i,o)},e.prototype.insertInto=function(e,t){void 0===t&&(t=null),null!=this.parent&&this.parent.children.remove(this);var n=null;e.children.insertBefore(this,t),null!=t&&(n=t.domNode),this.domNode.parentNode==e.domNode&&this.domNode.nextSibling==n||e.domNode.insertBefore(this.domNode,n),this.parent=e,this.attach()},e.prototype.isolate=function(e,t){var n=this.split(e);return n.split(t),n},e.prototype.length=function(){return 1},e.prototype.offset=function(e){return void 0===e&&(e=this.parent),null==this.parent||this==e?0:this.parent.children.offset(this)+this.parent.offset(e)},e.prototype.optimize=function(e){null!=this.domNode[r.DATA_KEY]&&delete this.domNode[r.DATA_KEY].mutations},e.prototype.remove=function(){null!=this.domNode.parentNode&&this.domNode.parentNode.removeChild(this.domNode),this.detach()},e.prototype.replace=function(e){null!=e.parent&&(e.parent.insertBefore(this,e.next),e.remove())},e.prototype.replaceWith=function(e,t){var n="string"===typeof e?r.create(e,t):e;return n.replace(this),n},e.prototype.split=function(e,t){return 0===e?this:this.next},e.prototype.update=function(e,t){},e.prototype.wrap=function(e,t){var n="string"===typeof e?r.create(e,t):e;return null!=this.parent&&this.parent.insertBefore(n,this.next),n.appendChild(this),n},e.blotName="abstract",e}();t.default=i},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(12),i=n(32),o=n(33),a=n(1),s=function(){function e(e){this.attributes={},this.domNode=e,this.build()}return e.prototype.attribute=function(e,t){t?e.add(this.domNode,t)&&(null!=e.value(this.domNode)?this.attributes[e.attrName]=e:delete this.attributes[e.attrName]):(e.remove(this.domNode),delete this.attributes[e.attrName])},e.prototype.build=function(){var e=this;this.attributes={};var t=r.default.keys(this.domNode),n=i.default.keys(this.domNode),s=o.default.keys(this.domNode);t.concat(n).concat(s).forEach(function(t){var n=a.query(t,a.Scope.ATTRIBUTE);n instanceof r.default&&(e.attributes[n.attrName]=n)})},e.prototype.copy=function(e){var t=this;Object.keys(this.attributes).forEach(function(n){var r=t.attributes[n].value(t.domNode);e.format(n,r)})},e.prototype.move=function(e){var t=this;this.copy(e),Object.keys(this.attributes).forEach(function(e){t.attributes[e].remove(t.domNode)}),this.attributes={}},e.prototype.values=function(){var e=this;return Object.keys(this.attributes).reduce(function(t,n){return t[n]=e.attributes[n].value(e.domNode),t},{})},e}();t.default=s},function(e,t,n){"use strict";var r=this&&this.__extends||function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}();function i(e,t){return(e.getAttribute("class")||"").split(/\s+/).filter(function(e){return 0===e.indexOf(t+"-")})}Object.defineProperty(t,"__esModule",{value:!0});var o=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return r(t,e),t.keys=function(e){return(e.getAttribute("class")||"").split(/\s+/).map(function(e){return e.split("-").slice(0,-1).join("-")})},t.prototype.add=function(e,t){return!!this.canAdd(e,t)&&(this.remove(e),e.classList.add(this.keyName+"-"+t),!0)},t.prototype.remove=function(e){i(e,this.keyName).forEach(function(t){e.classList.remove(t)}),0===e.classList.length&&e.removeAttribute("class")},t.prototype.value=function(e){var t=(i(e,this.keyName)[0]||"").slice(this.keyName.length+1);return this.canAdd(e,t)?t:""},t}(n(12).default);t.default=o},function(e,t,n){"use strict";var r=this&&this.__extends||function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}();function i(e){var t=e.split("-"),n=t.slice(1).map(function(e){return e[0].toUpperCase()+e.slice(1)}).join("");return t[0]+n}Object.defineProperty(t,"__esModule",{value:!0});var o=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return r(t,e),t.keys=function(e){return(e.getAttribute("style")||"").split(";").map(function(e){return e.split(":")[0].trim()})},t.prototype.add=function(e,t){return!!this.canAdd(e,t)&&(e.style[i(this.keyName)]=t,!0)},t.prototype.remove=function(e){e.style[i(this.keyName)]="",e.getAttribute("style")||e.removeAttribute("style")},t.prototype.value=function(e){var t=e.style[i(this.keyName)];return this.canAdd(e,t)?t:""},t}(n(12).default);t.default=o},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),i=function(){function e(t,n){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.quill=t,this.options=n,this.modules={}}return r(e,[{key:"init",value:function(){var e=this;Object.keys(this.options.modules).forEach(function(t){null==e.modules[t]&&e.addModule(t)})}},{key:"addModule",value:function(e){var t=this.quill.constructor.import("modules/"+e);return this.modules[e]=new t(this.quill,this.options.modules[e]||{}),this.modules[e]}}]),e}();i.DEFAULTS={modules:{}},i.themes={default:i},t.default=i},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),i=function e(t,n,r){null===t&&(t=Function.prototype);var i=Object.getOwnPropertyDescriptor(t,n);if(void 0===i){var o=Object.getPrototypeOf(t);return null===o?void 0:e(o,n,r)}if("value"in i)return i.value;var a=i.get;return void 0!==a?a.call(r):void 0},o=s(n(0)),a=s(n(7));function s(e){return e&&e.__esModule?e:{default:e}}var l="\ufeff",c=function(e){function t(e){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var n=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!==typeof t&&"function"!==typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return n.contentNode=document.createElement("span"),n.contentNode.setAttribute("contenteditable",!1),[].slice.call(n.domNode.childNodes).forEach(function(e){n.contentNode.appendChild(e)}),n.leftGuard=document.createTextNode(l),n.rightGuard=document.createTextNode(l),n.domNode.appendChild(n.leftGuard),n.domNode.appendChild(n.contentNode),n.domNode.appendChild(n.rightGuard),n}return function(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),r(t,[{key:"index",value:function(e,n){return e===this.leftGuard?0:e===this.rightGuard?1:i(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"index",this).call(this,e,n)}},{key:"restore",value:function(e){var t=void 0,n=void 0,r=e.data.split(l).join("");if(e===this.leftGuard)if(this.prev instanceof a.default){var i=this.prev.length();this.prev.insertAt(i,r),t={startNode:this.prev.domNode,startOffset:i+r.length}}else n=document.createTextNode(r),this.parent.insertBefore(o.default.create(n),this),t={startNode:n,startOffset:r.length};else e===this.rightGuard&&(this.next instanceof a.default?(this.next.insertAt(0,r),t={startNode:this.next.domNode,startOffset:r.length}):(n=document.createTextNode(r),this.parent.insertBefore(o.default.create(n),this.next),t={startNode:n,startOffset:r.length}));return e.data=l,t}},{key:"update",value:function(e,t){var n=this;e.forEach(function(e){if("characterData"===e.type&&(e.target===n.leftGuard||e.target===n.rightGuard)){var r=n.restore(e.target);r&&(t.range=r)}})}}]),t}(o.default.Embed);t.default=c},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.AlignStyle=t.AlignClass=t.AlignAttribute=void 0;var r,i=n(0),o=(r=i)&&r.__esModule?r:{default:r},a={scope:o.default.Scope.BLOCK,whitelist:["right","center","justify"]},s=new o.default.Attributor.Attribute("align","align",a),l=new o.default.Attributor.Class("align","ql-align",a),c=new o.default.Attributor.Style("align","text-align",a);t.AlignAttribute=s,t.AlignClass=l,t.AlignStyle=c},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.BackgroundStyle=t.BackgroundClass=void 0;var r,i=n(0),o=(r=i)&&r.__esModule?r:{default:r},a=n(26),s=new o.default.Attributor.Class("background","ql-bg",{scope:o.default.Scope.INLINE}),l=new a.ColorAttributor("background","background-color",{scope:o.default.Scope.INLINE});t.BackgroundClass=s,t.BackgroundStyle=l},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DirectionStyle=t.DirectionClass=t.DirectionAttribute=void 0;var r,i=n(0),o=(r=i)&&r.__esModule?r:{default:r},a={scope:o.default.Scope.BLOCK,whitelist:["rtl"]},s=new o.default.Attributor.Attribute("direction","dir",a),l=new o.default.Attributor.Class("direction","ql-direction",a),c=new o.default.Attributor.Style("direction","direction",a);t.DirectionAttribute=s,t.DirectionClass=l,t.DirectionStyle=c},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.FontClass=t.FontStyle=void 0;var r,i=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),o=function e(t,n,r){null===t&&(t=Function.prototype);var i=Object.getOwnPropertyDescriptor(t,n);if(void 0===i){var o=Object.getPrototypeOf(t);return null===o?void 0:e(o,n,r)}if("value"in i)return i.value;var a=i.get;return void 0!==a?a.call(r):void 0},a=n(0),s=(r=a)&&r.__esModule?r:{default:r},l={scope:s.default.Scope.INLINE,whitelist:["serif","monospace"]},c=new s.default.Attributor.Class("font","ql-font",l),d=function(e){function t(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!==typeof t&&"function"!==typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return function(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),i(t,[{key:"value",value:function(e){return o(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"value",this).call(this,e).replace(/["']/g,"")}}]),t}(s.default.Attributor.Style),u=new d("font","font-family",l);t.FontStyle=u,t.FontClass=c},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SizeStyle=t.SizeClass=void 0;var r,i=n(0),o=(r=i)&&r.__esModule?r:{default:r},a=new o.default.Attributor.Class("size","ql-size",{scope:o.default.Scope.INLINE,whitelist:["small","large","huge"]}),s=new o.default.Attributor.Style("size","font-size",{scope:o.default.Scope.INLINE,whitelist:["10px","18px","32px"]});t.SizeClass=a,t.SizeStyle=s},function(e,t,n){"use strict";e.exports={align:{"":n(76),center:n(77),right:n(78),justify:n(79)},background:n(80),blockquote:n(81),bold:n(82),clean:n(83),code:n(58),"code-block":n(58),color:n(84),direction:{"":n(85),rtl:n(86)},float:{center:n(87),full:n(88),left:n(89),right:n(90)},formula:n(91),header:{1:n(92),2:n(93)},italic:n(94),image:n(95),indent:{"+1":n(96),"-1":n(97)},link:n(98),list:{ordered:n(99),bullet:n(100),check:n(101)},script:{sub:n(102),super:n(103)},strike:n(104),underline:n(105),video:n(106)}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getLastChangeIndex=t.default=void 0;var r=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),i=a(n(0)),o=a(n(5));function a(e){return e&&e.__esModule?e:{default:e}}var s=function(e){function t(e,n){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var r=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!==typeof t&&"function"!==typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e,n));return r.lastRecorded=0,r.ignoreChange=!1,r.clear(),r.quill.on(o.default.events.EDITOR_CHANGE,function(e,t,n,i){e!==o.default.events.TEXT_CHANGE||r.ignoreChange||(r.options.userOnly&&i!==o.default.sources.USER?r.transform(t):r.record(t,n))}),r.quill.keyboard.addBinding({key:"Z",shortKey:!0},r.undo.bind(r)),r.quill.keyboard.addBinding({key:"Z",shortKey:!0,shiftKey:!0},r.redo.bind(r)),/Win/i.test(navigator.platform)&&r.quill.keyboard.addBinding({key:"Y",shortKey:!0},r.redo.bind(r)),r}return function(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),r(t,[{key:"change",value:function(e,t){if(0!==this.stack[e].length){var n=this.stack[e].pop();this.stack[t].push(n),this.lastRecorded=0,this.ignoreChange=!0,this.quill.updateContents(n[e],o.default.sources.USER),this.ignoreChange=!1;var r=l(n[e]);this.quill.setSelection(r)}}},{key:"clear",value:function(){this.stack={undo:[],redo:[]}}},{key:"cutoff",value:function(){this.lastRecorded=0}},{key:"record",value:function(e,t){if(0!==e.ops.length){this.stack.redo=[];var n=this.quill.getContents().diff(t),r=Date.now();if(this.lastRecorded+this.options.delay>r&&this.stack.undo.length>0){var i=this.stack.undo.pop();n=n.compose(i.undo),e=i.redo.compose(e)}else this.lastRecorded=r;this.stack.undo.push({redo:e,undo:n}),this.stack.undo.length>this.options.maxStack&&this.stack.undo.shift()}}},{key:"redo",value:function(){this.change("redo","undo")}},{key:"transform",value:function(e){this.stack.undo.forEach(function(t){t.undo=e.transform(t.undo,!0),t.redo=e.transform(t.redo,!0)}),this.stack.redo.forEach(function(t){t.undo=e.transform(t.undo,!0),t.redo=e.transform(t.redo,!0)})}},{key:"undo",value:function(){this.change("undo","redo")}}]),t}(a(n(9)).default);function l(e){var t=e.reduce(function(e,t){return e+=t.delete||0},0),n=e.length()-t;return function(e){var t=e.ops[e.ops.length-1];return null!=t&&(null!=t.insert?"string"===typeof t.insert&&t.insert.endsWith("\n"):null!=t.attributes&&Object.keys(t.attributes).some(function(e){return null!=i.default.query(e,i.default.Scope.BLOCK)}))}(e)&&(n-=1),n}s.DEFAULTS={delay:1e3,maxStack:100,userOnly:!1},t.default=s,t.getLastChangeIndex=l},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=t.BaseTooltip=void 0;var r=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),i=function e(t,n,r){null===t&&(t=Function.prototype);var i=Object.getOwnPropertyDescriptor(t,n);if(void 0===i){var o=Object.getPrototypeOf(t);return null===o?void 0:e(o,n,r)}if("value"in i)return i.value;var a=i.get;return void 0!==a?a.call(r):void 0},o=m(n(3)),a=m(n(2)),s=m(n(8)),l=m(n(23)),c=m(n(34)),d=m(n(59)),u=m(n(60)),p=m(n(28)),h=m(n(61));function m(e){return e&&e.__esModule?e:{default:e}}function f(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function g(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!==typeof t&&"function"!==typeof t?e:t}function v(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var x=[!1,"center","right","justify"],y=["#000000","#e60000","#ff9900","#ffff00","#008a00","#0066cc","#9933ff","#ffffff","#facccc","#ffebcc","#ffffcc","#cce8cc","#cce0f5","#ebd6ff","#bbbbbb","#f06666","#ffc266","#ffff66","#66b966","#66a3e0","#c285ff","#888888","#a10000","#b26b00","#b2b200","#006100","#0047b2","#6b24b2","#444444","#5c0000","#663d00","#666600","#003700","#002966","#3d1466"],b=[!1,"serif","monospace"],j=["1","2","3",!1],_=["small",!1,"large","huge"],C=function(e){function t(e,n){f(this,t);var r=g(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e,n));return e.emitter.listenDOM("click",document.body,function t(n){if(!document.body.contains(e.root))return document.body.removeEventListener("click",t);null==r.tooltip||r.tooltip.root.contains(n.target)||document.activeElement===r.tooltip.textbox||r.quill.hasFocus()||r.tooltip.hide(),null!=r.pickers&&r.pickers.forEach(function(e){e.container.contains(n.target)||e.close()})}),r}return v(t,e),r(t,[{key:"addModule",value:function(e){var n=i(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"addModule",this).call(this,e);return"toolbar"===e&&this.extendToolbar(n),n}},{key:"buildButtons",value:function(e,t){e.forEach(function(e){(e.getAttribute("class")||"").split(/\s+/).forEach(function(n){if(n.startsWith("ql-")&&(n=n.slice(3),null!=t[n]))if("direction"===n)e.innerHTML=t[n][""]+t[n].rtl;else if("string"===typeof t[n])e.innerHTML=t[n];else{var r=e.value||"";null!=r&&t[n][r]&&(e.innerHTML=t[n][r])}})})}},{key:"buildPickers",value:function(e,t){var n=this;this.pickers=e.map(function(e){if(e.classList.contains("ql-align"))return null==e.querySelector("option")&&S(e,x),new u.default(e,t.align);if(e.classList.contains("ql-background")||e.classList.contains("ql-color")){var n=e.classList.contains("ql-background")?"background":"color";return null==e.querySelector("option")&&S(e,y,"background"===n?"#ffffff":"#000000"),new d.default(e,t[n])}return null==e.querySelector("option")&&(e.classList.contains("ql-font")?S(e,b):e.classList.contains("ql-header")?S(e,j):e.classList.contains("ql-size")&&S(e,_)),new p.default(e)}),this.quill.on(s.default.events.EDITOR_CHANGE,function(){n.pickers.forEach(function(e){e.update()})})}}]),t}(c.default);C.DEFAULTS=(0,o.default)(!0,{},c.default.DEFAULTS,{modules:{toolbar:{handlers:{formula:function(){this.quill.theme.tooltip.edit("formula")},image:function(){var e=this,t=this.container.querySelector("input.ql-image[type=file]");null==t&&((t=document.createElement("input")).setAttribute("type","file"),t.setAttribute("accept","image/png, image/gif, image/jpeg, image/bmp, image/x-icon"),t.classList.add("ql-image"),t.addEventListener("change",function(){if(null!=t.files&&null!=t.files[0]){var n=new FileReader;n.onload=function(n){var r=e.quill.getSelection(!0);e.quill.updateContents((new a.default).retain(r.index).delete(r.length).insert({image:n.target.result}),s.default.sources.USER),e.quill.setSelection(r.index+1,s.default.sources.SILENT),t.value=""},n.readAsDataURL(t.files[0])}}),this.container.appendChild(t)),t.click()},video:function(){this.quill.theme.tooltip.edit("video")}}}}});var w=function(e){function t(e,n){f(this,t);var r=g(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e,n));return r.textbox=r.root.querySelector('input[type="text"]'),r.listen(),r}return v(t,e),r(t,[{key:"listen",value:function(){var e=this;this.textbox.addEventListener("keydown",function(t){l.default.match(t,"enter")?(e.save(),t.preventDefault()):l.default.match(t,"escape")&&(e.cancel(),t.preventDefault())})}},{key:"cancel",value:function(){this.hide()}},{key:"edit",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"link",t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;this.root.classList.remove("ql-hidden"),this.root.classList.add("ql-editing"),null!=t?this.textbox.value=t:e!==this.root.getAttribute("data-mode")&&(this.textbox.value=""),this.position(this.quill.getBounds(this.quill.selection.savedRange)),this.textbox.select(),this.textbox.setAttribute("placeholder",this.textbox.getAttribute("data-"+e)||""),this.root.setAttribute("data-mode",e)}},{key:"restoreFocus",value:function(){var e=this.quill.scrollingContainer.scrollTop;this.quill.focus(),this.quill.scrollingContainer.scrollTop=e}},{key:"save",value:function(){var e=this.textbox.value;switch(this.root.getAttribute("data-mode")){case"link":var t=this.quill.root.scrollTop;this.linkRange?(this.quill.formatText(this.linkRange,"link",e,s.default.sources.USER),delete this.linkRange):(this.restoreFocus(),this.quill.format("link",e,s.default.sources.USER)),this.quill.root.scrollTop=t;break;case"video":e=function(e){var t=e.match(/^(?:(https?):\/\/)?(?:(?:www|m)\.)?youtube\.com\/watch.*v=([a-zA-Z0-9_-]+)/)||e.match(/^(?:(https?):\/\/)?(?:(?:www|m)\.)?youtu\.be\/([a-zA-Z0-9_-]+)/);return t?(t[1]||"https")+"://www.youtube.com/embed/"+t[2]+"?showinfo=0":(t=e.match(/^(?:(https?):\/\/)?(?:www\.)?vimeo\.com\/(\d+)/))?(t[1]||"https")+"://player.vimeo.com/video/"+t[2]+"/":e}(e);case"formula":if(!e)break;var n=this.quill.getSelection(!0);if(null!=n){var r=n.index+n.length;this.quill.insertEmbed(r,this.root.getAttribute("data-mode"),e,s.default.sources.USER),"formula"===this.root.getAttribute("data-mode")&&this.quill.insertText(r+1," ",s.default.sources.USER),this.quill.setSelection(r+2,s.default.sources.USER)}}this.textbox.value="",this.hide()}}]),t}(h.default);function S(e,t){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];t.forEach(function(t){var r=document.createElement("option");t===n?r.setAttribute("selected","selected"):r.setAttribute("value",t),e.appendChild(r)})}t.BaseTooltip=w,t.default=C},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=function(){function e(){this.head=this.tail=null,this.length=0}return e.prototype.append=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];this.insertBefore(e[0],null),e.length>1&&this.append.apply(this,e.slice(1))},e.prototype.contains=function(e){for(var t,n=this.iterator();t=n();)if(t===e)return!0;return!1},e.prototype.insertBefore=function(e,t){e&&(e.next=t,null!=t?(e.prev=t.prev,null!=t.prev&&(t.prev.next=e),t.prev=e,t===this.head&&(this.head=e)):null!=this.tail?(this.tail.next=e,e.prev=this.tail,this.tail=e):(e.prev=null,this.head=this.tail=e),this.length+=1)},e.prototype.offset=function(e){for(var t=0,n=this.head;null!=n;){if(n===e)return t;t+=n.length(),n=n.next}return-1},e.prototype.remove=function(e){this.contains(e)&&(null!=e.prev&&(e.prev.next=e.next),null!=e.next&&(e.next.prev=e.prev),e===this.head&&(this.head=e.next),e===this.tail&&(this.tail=e.prev),this.length-=1)},e.prototype.iterator=function(e){return void 0===e&&(e=this.head),function(){var t=e;return null!=e&&(e=e.next),t}},e.prototype.find=function(e,t){void 0===t&&(t=!1);for(var n,r=this.iterator();n=r();){var i=n.length();if(e<i||t&&e===i&&(null==n.next||0!==n.next.length()))return[n,e];e-=i}return[null,0]},e.prototype.forEach=function(e){for(var t,n=this.iterator();t=n();)e(t)},e.prototype.forEachAt=function(e,t,n){if(!(t<=0))for(var r,i=this.find(e),o=i[0],a=e-i[1],s=this.iterator(o);(r=s())&&a<e+t;){var l=r.length();e>a?n(r,e-a,Math.min(t,a+l-e)):n(r,0,Math.min(l,e+t-a)),a+=l}},e.prototype.map=function(e){return this.reduce(function(t,n){return t.push(e(n)),t},[])},e.prototype.reduce=function(e,t){for(var n,r=this.iterator();n=r();)t=e(t,n);return t},e}();t.default=r},function(e,t,n){"use strict";var r=this&&this.__extends||function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}();Object.defineProperty(t,"__esModule",{value:!0});var i=n(17),o=n(1),a={attributes:!0,characterData:!0,characterDataOldValue:!0,childList:!0,subtree:!0},s=function(e){function t(t){var n=e.call(this,t)||this;return n.scroll=n,n.observer=new MutationObserver(function(e){n.update(e)}),n.observer.observe(n.domNode,a),n.attach(),n}return r(t,e),t.prototype.detach=function(){e.prototype.detach.call(this),this.observer.disconnect()},t.prototype.deleteAt=function(t,n){this.update(),0===t&&n===this.length()?this.children.forEach(function(e){e.remove()}):e.prototype.deleteAt.call(this,t,n)},t.prototype.formatAt=function(t,n,r,i){this.update(),e.prototype.formatAt.call(this,t,n,r,i)},t.prototype.insertAt=function(t,n,r){this.update(),e.prototype.insertAt.call(this,t,n,r)},t.prototype.optimize=function(t,n){var r=this;void 0===t&&(t=[]),void 0===n&&(n={}),e.prototype.optimize.call(this,n);for(var a=[].slice.call(this.observer.takeRecords());a.length>0;)t.push(a.pop());for(var s=function(e,t){void 0===t&&(t=!0),null!=e&&e!==r&&null!=e.domNode.parentNode&&(null==e.domNode[o.DATA_KEY].mutations&&(e.domNode[o.DATA_KEY].mutations=[]),t&&s(e.parent))},l=function(e){null!=e.domNode[o.DATA_KEY]&&null!=e.domNode[o.DATA_KEY].mutations&&(e instanceof i.default&&e.children.forEach(l),e.optimize(n))},c=t,d=0;c.length>0;d+=1){if(d>=100)throw new Error("[Parchment] Maximum optimize iterations reached");for(c.forEach(function(e){var t=o.find(e.target,!0);null!=t&&(t.domNode===e.target&&("childList"===e.type?(s(o.find(e.previousSibling,!1)),[].forEach.call(e.addedNodes,function(e){var t=o.find(e,!1);s(t,!1),t instanceof i.default&&t.children.forEach(function(e){s(e,!1)})})):"attributes"===e.type&&s(t.prev)),s(t))}),this.children.forEach(l),a=(c=[].slice.call(this.observer.takeRecords())).slice();a.length>0;)t.push(a.pop())}},t.prototype.update=function(t,n){var r=this;void 0===n&&(n={}),(t=t||this.observer.takeRecords()).map(function(e){var t=o.find(e.target,!0);return null==t?null:null==t.domNode[o.DATA_KEY].mutations?(t.domNode[o.DATA_KEY].mutations=[e],t):(t.domNode[o.DATA_KEY].mutations.push(e),null)}).forEach(function(e){null!=e&&e!==r&&null!=e.domNode[o.DATA_KEY]&&e.update(e.domNode[o.DATA_KEY].mutations||[],n)}),null!=this.domNode[o.DATA_KEY].mutations&&e.prototype.update.call(this,this.domNode[o.DATA_KEY].mutations,n),this.optimize(t,n)},t.blotName="scroll",t.defaultChild="block",t.scope=o.Scope.BLOCK_BLOT,t.tagName="DIV",t}(i.default);t.default=s},function(e,t,n){"use strict";var r=this&&this.__extends||function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}();Object.defineProperty(t,"__esModule",{value:!0});var i=n(18),o=n(1),a=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return r(t,e),t.formats=function(n){if(n.tagName!==t.tagName)return e.formats.call(this,n)},t.prototype.format=function(n,r){var o=this;n!==this.statics.blotName||r?e.prototype.format.call(this,n,r):(this.children.forEach(function(e){e instanceof i.default||(e=e.wrap(t.blotName,!0)),o.attributes.copy(e)}),this.unwrap())},t.prototype.formatAt=function(t,n,r,i){null!=this.formats()[r]||o.query(r,o.Scope.ATTRIBUTE)?this.isolate(t,n).format(r,i):e.prototype.formatAt.call(this,t,n,r,i)},t.prototype.optimize=function(n){e.prototype.optimize.call(this,n);var r=this.formats();if(0===Object.keys(r).length)return this.unwrap();var i=this.next;i instanceof t&&i.prev===this&&function(e,t){if(Object.keys(e).length!==Object.keys(t).length)return!1;for(var n in e)if(e[n]!==t[n])return!1;return!0}(r,i.formats())&&(i.moveChildren(this),i.remove())},t.blotName="inline",t.scope=o.Scope.INLINE_BLOT,t.tagName="SPAN",t}(i.default);t.default=a},function(e,t,n){"use strict";var r=this&&this.__extends||function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}();Object.defineProperty(t,"__esModule",{value:!0});var i=n(18),o=n(1),a=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return r(t,e),t.formats=function(n){var r=o.query(t.blotName).tagName;if(n.tagName!==r)return e.formats.call(this,n)},t.prototype.format=function(n,r){null!=o.query(n,o.Scope.BLOCK)&&(n!==this.statics.blotName||r?e.prototype.format.call(this,n,r):this.replaceWith(t.blotName))},t.prototype.formatAt=function(t,n,r,i){null!=o.query(r,o.Scope.BLOCK)?this.format(r,i):e.prototype.formatAt.call(this,t,n,r,i)},t.prototype.insertAt=function(t,n,r){if(null==r||null!=o.query(n,o.Scope.INLINE))e.prototype.insertAt.call(this,t,n,r);else{var i=this.split(t),a=o.create(n,r);i.parent.insertBefore(a,i)}},t.prototype.update=function(t,n){navigator.userAgent.match(/Trident/)?this.build():e.prototype.update.call(this,t,n)},t.blotName="block",t.scope=o.Scope.BLOCK_BLOT,t.tagName="P",t}(i.default);t.default=a},function(e,t,n){"use strict";var r=this&&this.__extends||function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}();Object.defineProperty(t,"__esModule",{value:!0});var i=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return r(t,e),t.formats=function(e){},t.prototype.format=function(t,n){e.prototype.formatAt.call(this,0,this.length(),t,n)},t.prototype.formatAt=function(t,n,r,i){0===t&&n===this.length()?this.format(r,i):e.prototype.formatAt.call(this,t,n,r,i)},t.prototype.formats=function(){return this.statics.formats(this.domNode)},t}(n(19).default);t.default=i},function(e,t,n){"use strict";var r=this&&this.__extends||function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}();Object.defineProperty(t,"__esModule",{value:!0});var i=n(19),o=n(1),a=function(e){function t(t){var n=e.call(this,t)||this;return n.text=n.statics.value(n.domNode),n}return r(t,e),t.create=function(e){return document.createTextNode(e)},t.value=function(e){var t=e.data;return t.normalize&&(t=t.normalize()),t},t.prototype.deleteAt=function(e,t){this.domNode.data=this.text=this.text.slice(0,e)+this.text.slice(e+t)},t.prototype.index=function(e,t){return this.domNode===e?t:-1},t.prototype.insertAt=function(t,n,r){null==r?(this.text=this.text.slice(0,t)+n+this.text.slice(t),this.domNode.data=this.text):e.prototype.insertAt.call(this,t,n,r)},t.prototype.length=function(){return this.text.length},t.prototype.optimize=function(n){e.prototype.optimize.call(this,n),this.text=this.statics.value(this.domNode),0===this.text.length?this.remove():this.next instanceof t&&this.next.prev===this&&(this.insertAt(this.length(),this.next.value()),this.next.remove())},t.prototype.position=function(e,t){return void 0===t&&(t=!1),[this.domNode,e]},t.prototype.split=function(e,t){if(void 0===t&&(t=!1),!t){if(0===e)return this;if(e===this.length())return this.next}var n=o.create(this.domNode.splitText(e));return this.parent.insertBefore(n,this.next),this.text=this.statics.value(this.domNode),n},t.prototype.update=function(e,t){var n=this;e.some(function(e){return"characterData"===e.type&&e.target===n.domNode})&&(this.text=this.statics.value(this.domNode))},t.prototype.value=function(){return this.text},t.blotName="text",t.scope=o.Scope.INLINE_BLOT,t}(i.default);t.default=a},function(e,t,n){"use strict";var r=document.createElement("div");if(r.classList.toggle("test-class",!1),r.classList.contains("test-class")){var i=DOMTokenList.prototype.toggle;DOMTokenList.prototype.toggle=function(e,t){return arguments.length>1&&!this.contains(e)===!t?t:i.call(this,e)}}String.prototype.startsWith||(String.prototype.startsWith=function(e,t){return t=t||0,this.substr(t,e.length)===e}),String.prototype.endsWith||(String.prototype.endsWith=function(e,t){var n=this.toString();("number"!==typeof t||!isFinite(t)||Math.floor(t)!==t||t>n.length)&&(t=n.length),t-=e.length;var r=n.indexOf(e,t);return-1!==r&&r===t}),Array.prototype.find||Object.defineProperty(Array.prototype,"find",{value:function(e){if(null===this)throw new TypeError("Array.prototype.find called on null or undefined");if("function"!==typeof e)throw new TypeError("predicate must be a function");for(var t,n=Object(this),r=n.length>>>0,i=arguments[1],o=0;o<r;o++)if(t=n[o],e.call(i,t,o,n))return t}}),document.addEventListener("DOMContentLoaded",function(){document.execCommand("enableObjectResizing",!1,!1),document.execCommand("autoUrlDetect",!1,!1)})},function(e,t){var n=-1;function r(e,t,l){if(e==t)return e?[[0,e]]:[];(l<0||e.length<l)&&(l=null);var d=o(e,t),u=e.substring(0,d);d=a(e=e.substring(d),t=t.substring(d));var p=e.substring(e.length-d),h=function(e,t){var s;if(!e)return[[1,t]];if(!t)return[[n,e]];var l=e.length>t.length?e:t,c=e.length>t.length?t:e,d=l.indexOf(c);if(-1!=d)return s=[[1,l.substring(0,d)],[0,c],[1,l.substring(d+c.length)]],e.length>t.length&&(s[0][0]=s[2][0]=n),s;if(1==c.length)return[[n,e],[1,t]];var u=function(e,t){var n=e.length>t.length?e:t,r=e.length>t.length?t:e;if(n.length<4||2*r.length<n.length)return null;function i(e,t,n){for(var r,i,s,l,c=e.substring(n,n+Math.floor(e.length/4)),d=-1,u="";-1!=(d=t.indexOf(c,d+1));){var p=o(e.substring(n),t.substring(d)),h=a(e.substring(0,n),t.substring(0,d));u.length<h+p&&(u=t.substring(d-h,d)+t.substring(d,d+p),r=e.substring(0,n-h),i=e.substring(n+p),s=t.substring(0,d-h),l=t.substring(d+p))}return 2*u.length>=e.length?[r,i,s,l,u]:null}var s,l,c,d,u,p=i(n,r,Math.ceil(n.length/4)),h=i(n,r,Math.ceil(n.length/2));if(!p&&!h)return null;s=h?p&&p[4].length>h[4].length?p:h:p,e.length>t.length?(l=s[0],c=s[1],d=s[2],u=s[3]):(d=s[0],u=s[1],l=s[2],c=s[3]);var m=s[4];return[l,c,d,u,m]}(e,t);if(u){var p=u[0],h=u[1],m=u[2],f=u[3],g=u[4],v=r(p,m),x=r(h,f);return v.concat([[0,g]],x)}return function(e,t){for(var r=e.length,o=t.length,a=Math.ceil((r+o)/2),s=a,l=2*a,c=new Array(l),d=new Array(l),u=0;u<l;u++)c[u]=-1,d[u]=-1;c[s+1]=0,d[s+1]=0;for(var p=r-o,h=p%2!=0,m=0,f=0,g=0,v=0,x=0;x<a;x++){for(var y=-x+m;y<=x-f;y+=2){for(var b=s+y,j=(A=y==-x||y!=x&&c[b-1]<c[b+1]?c[b+1]:c[b-1]+1)-y;A<r&&j<o&&e.charAt(A)==t.charAt(j);)A++,j++;if(c[b]=A,A>r)f+=2;else if(j>o)m+=2;else if(h&&(w=s+p-y)>=0&&w<l&&-1!=d[w]&&A>=(C=r-d[w]))return i(e,t,A,j)}for(var _=-x+g;_<=x-v;_+=2){for(var C,w=s+_,S=(C=_==-x||_!=x&&d[w-1]<d[w+1]?d[w+1]:d[w-1]+1)-_;C<r&&S<o&&e.charAt(r-C-1)==t.charAt(o-S-1);)C++,S++;if(d[w]=C,C>r)v+=2;else if(S>o)g+=2;else if(!h){var A;if((b=s+p-_)>=0&&b<l&&-1!=c[b])if(j=s+(A=c[b])-b,A>=(C=r-C))return i(e,t,A,j)}}}return[[n,e],[1,t]]}(e,t)}(e=e.substring(0,e.length-d),t=t.substring(0,t.length-d));return u&&h.unshift([0,u]),p&&h.push([0,p]),s(h),null!=l&&(h=function(e,t){var r=function(e,t){if(0===t)return[0,e];for(var r=0,i=0;i<e.length;i++){var o=e[i];if(o[0]===n||0===o[0]){var a=r+o[1].length;if(t===a)return[i+1,e];if(t<a){e=e.slice();var s=t-r,l=[o[0],o[1].slice(0,s)],c=[o[0],o[1].slice(s)];return e.splice(i,1,l,c),[i+1,e]}r=a}}throw new Error("cursor_pos is out of bounds!")}(e,t),i=r[1],o=r[0],a=i[o],s=i[o+1];if(null==a)return e;if(0!==a[0])return e;if(null!=s&&a[1]+s[1]===s[1]+a[1])return i.splice(o,2,s,a),c(i,o,2);if(null!=s&&0===s[1].indexOf(a[1])){i.splice(o,2,[s[0],a[1]],[0,a[1]]);var l=s[1].slice(a[1].length);return l.length>0&&i.splice(o+2,0,[s[0],l]),c(i,o,3)}return e}(h,l)),h=function(e){for(var t=!1,r=function(e){return e.charCodeAt(0)>=56320&&e.charCodeAt(0)<=57343},i=function(e){return e.charCodeAt(e.length-1)>=55296&&e.charCodeAt(e.length-1)<=56319},o=2;o<e.length;o+=1)0===e[o-2][0]&&i(e[o-2][1])&&e[o-1][0]===n&&r(e[o-1][1])&&1===e[o][0]&&r(e[o][1])&&(t=!0,e[o-1][1]=e[o-2][1].slice(-1)+e[o-1][1],e[o][1]=e[o-2][1].slice(-1)+e[o][1],e[o-2][1]=e[o-2][1].slice(0,-1));if(!t)return e;var a=[];for(o=0;o<e.length;o+=1)e[o][1].length>0&&a.push(e[o]);return a}(h)}function i(e,t,n,i){var o=e.substring(0,n),a=t.substring(0,i),s=e.substring(n),l=t.substring(i),c=r(o,a),d=r(s,l);return c.concat(d)}function o(e,t){if(!e||!t||e.charAt(0)!=t.charAt(0))return 0;for(var n=0,r=Math.min(e.length,t.length),i=r,o=0;n<i;)e.substring(o,i)==t.substring(o,i)?o=n=i:r=i,i=Math.floor((r-n)/2+n);return i}function a(e,t){if(!e||!t||e.charAt(e.length-1)!=t.charAt(t.length-1))return 0;for(var n=0,r=Math.min(e.length,t.length),i=r,o=0;n<i;)e.substring(e.length-i,e.length-o)==t.substring(t.length-i,t.length-o)?o=n=i:r=i,i=Math.floor((r-n)/2+n);return i}function s(e){e.push([0,""]);for(var t,r=0,i=0,l=0,c="",d="";r<e.length;)switch(e[r][0]){case 1:l++,d+=e[r][1],r++;break;case n:i++,c+=e[r][1],r++;break;case 0:i+l>1?(0!==i&&0!==l&&(0!==(t=o(d,c))&&(r-i-l>0&&0==e[r-i-l-1][0]?e[r-i-l-1][1]+=d.substring(0,t):(e.splice(0,0,[0,d.substring(0,t)]),r++),d=d.substring(t),c=c.substring(t)),0!==(t=a(d,c))&&(e[r][1]=d.substring(d.length-t)+e[r][1],d=d.substring(0,d.length-t),c=c.substring(0,c.length-t))),0===i?e.splice(r-l,i+l,[1,d]):0===l?e.splice(r-i,i+l,[n,c]):e.splice(r-i-l,i+l,[n,c],[1,d]),r=r-i-l+(i?1:0)+(l?1:0)+1):0!==r&&0==e[r-1][0]?(e[r-1][1]+=e[r][1],e.splice(r,1)):r++,l=0,i=0,c="",d=""}""===e[e.length-1][1]&&e.pop();var u=!1;for(r=1;r<e.length-1;)0==e[r-1][0]&&0==e[r+1][0]&&(e[r][1].substring(e[r][1].length-e[r-1][1].length)==e[r-1][1]?(e[r][1]=e[r-1][1]+e[r][1].substring(0,e[r][1].length-e[r-1][1].length),e[r+1][1]=e[r-1][1]+e[r+1][1],e.splice(r-1,1),u=!0):e[r][1].substring(0,e[r+1][1].length)==e[r+1][1]&&(e[r-1][1]+=e[r+1][1],e[r][1]=e[r][1].substring(e[r+1][1].length)+e[r+1][1],e.splice(r+1,1),u=!0)),r++;u&&s(e)}var l=r;function c(e,t,n){for(var r=t+n-1;r>=0&&r>=t-1;r--)if(r+1<e.length){var i=e[r],o=e[r+1];i[0]===o[1]&&e.splice(r,2,[i[0],i[1]+o[1]])}return e}l.INSERT=1,l.DELETE=n,l.EQUAL=0,e.exports=l},function(e,t){function n(e){var t=[];for(var n in e)t.push(n);return t}(e.exports="function"===typeof Object.keys?Object.keys:n).shim=n},function(e,t){var n="[object Arguments]"==function(){return Object.prototype.toString.call(arguments)}();function r(e){return"[object Arguments]"==Object.prototype.toString.call(e)}function i(e){return e&&"object"==typeof e&&"number"==typeof e.length&&Object.prototype.hasOwnProperty.call(e,"callee")&&!Object.prototype.propertyIsEnumerable.call(e,"callee")||!1}(t=e.exports=n?r:i).supported=r,t.unsupported=i},function(e,t){"use strict";var n=Object.prototype.hasOwnProperty,r="~";function i(){}function o(e,t,n){this.fn=e,this.context=t,this.once=n||!1}function a(){this._events=new i,this._eventsCount=0}Object.create&&(i.prototype=Object.create(null),(new i).__proto__||(r=!1)),a.prototype.eventNames=function(){var e,t,i=[];if(0===this._eventsCount)return i;for(t in e=this._events)n.call(e,t)&&i.push(r?t.slice(1):t);return Object.getOwnPropertySymbols?i.concat(Object.getOwnPropertySymbols(e)):i},a.prototype.listeners=function(e,t){var n=r?r+e:e,i=this._events[n];if(t)return!!i;if(!i)return[];if(i.fn)return[i.fn];for(var o=0,a=i.length,s=new Array(a);o<a;o++)s[o]=i[o].fn;return s},a.prototype.emit=function(e,t,n,i,o,a){var s=r?r+e:e;if(!this._events[s])return!1;var l,c,d=this._events[s],u=arguments.length;if(d.fn){switch(d.once&&this.removeListener(e,d.fn,void 0,!0),u){case 1:return d.fn.call(d.context),!0;case 2:return d.fn.call(d.context,t),!0;case 3:return d.fn.call(d.context,t,n),!0;case 4:return d.fn.call(d.context,t,n,i),!0;case 5:return d.fn.call(d.context,t,n,i,o),!0;case 6:return d.fn.call(d.context,t,n,i,o,a),!0}for(c=1,l=new Array(u-1);c<u;c++)l[c-1]=arguments[c];d.fn.apply(d.context,l)}else{var p,h=d.length;for(c=0;c<h;c++)switch(d[c].once&&this.removeListener(e,d[c].fn,void 0,!0),u){case 1:d[c].fn.call(d[c].context);break;case 2:d[c].fn.call(d[c].context,t);break;case 3:d[c].fn.call(d[c].context,t,n);break;case 4:d[c].fn.call(d[c].context,t,n,i);break;default:if(!l)for(p=1,l=new Array(u-1);p<u;p++)l[p-1]=arguments[p];d[c].fn.apply(d[c].context,l)}}return!0},a.prototype.on=function(e,t,n){var i=new o(t,n||this),a=r?r+e:e;return this._events[a]?this._events[a].fn?this._events[a]=[this._events[a],i]:this._events[a].push(i):(this._events[a]=i,this._eventsCount++),this},a.prototype.once=function(e,t,n){var i=new o(t,n||this,!0),a=r?r+e:e;return this._events[a]?this._events[a].fn?this._events[a]=[this._events[a],i]:this._events[a].push(i):(this._events[a]=i,this._eventsCount++),this},a.prototype.removeListener=function(e,t,n,o){var a=r?r+e:e;if(!this._events[a])return this;if(!t)return 0===--this._eventsCount?this._events=new i:delete this._events[a],this;var s=this._events[a];if(s.fn)s.fn!==t||o&&!s.once||n&&s.context!==n||(0===--this._eventsCount?this._events=new i:delete this._events[a]);else{for(var l=0,c=[],d=s.length;l<d;l++)(s[l].fn!==t||o&&!s[l].once||n&&s[l].context!==n)&&c.push(s[l]);c.length?this._events[a]=1===c.length?c[0]:c:0===--this._eventsCount?this._events=new i:delete this._events[a]}return this},a.prototype.removeAllListeners=function(e){var t;return e?(t=r?r+e:e,this._events[t]&&(0===--this._eventsCount?this._events=new i:delete this._events[t])):(this._events=new i,this._eventsCount=0),this},a.prototype.off=a.prototype.removeListener,a.prototype.addListener=a.prototype.on,a.prototype.setMaxListeners=function(){return this},a.prefixed=r,a.EventEmitter=a,"undefined"!==typeof e&&(e.exports=a)},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.matchText=t.matchSpacing=t.matchNewline=t.matchBlot=t.matchAttributor=t.default=void 0;var r="function"===typeof Symbol&&"symbol"===typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"===typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},i=function(e,t){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return function(e,t){var n=[],r=!0,i=!1,o=void 0;try{for(var a,s=e[Symbol.iterator]();!(r=(a=s.next()).done)&&(n.push(a.value),!t||n.length!==t);r=!0);}catch(l){i=!0,o=l}finally{try{!r&&s.return&&s.return()}finally{if(i)throw o}}return n}(e,t);throw new TypeError("Invalid attempt to destructure non-iterable instance")},o=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),a=y(n(3)),s=y(n(2)),l=y(n(0)),c=y(n(5)),d=y(n(10)),u=y(n(9)),p=n(36),h=n(37),m=y(n(13)),f=n(26),g=n(38),v=n(39),x=n(40);function y(e){return e&&e.__esModule?e:{default:e}}function b(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var j=(0,d.default)("quill:clipboard"),_="__ql-matcher",C=[[Node.TEXT_NODE,I],[Node.TEXT_NODE,N],["br",function(e,t){return E(t,"\n")||t.insert("\n"),t}],[Node.ELEMENT_NODE,N],[Node.ELEMENT_NODE,D],[Node.ELEMENT_NODE,L],[Node.ELEMENT_NODE,P],[Node.ELEMENT_NODE,function(e,t){var n={},r=e.style||{};return r.fontStyle&&"italic"===T(e).fontStyle&&(n.italic=!0),r.fontWeight&&(T(e).fontWeight.startsWith("bold")||parseInt(T(e).fontWeight)>=700)&&(n.bold=!0),Object.keys(n).length>0&&(t=k(t,n)),parseFloat(r.textIndent||0)>0&&(t=(new s.default).insert("\t").concat(t)),t}],["li",function(e,t){var n=l.default.query(e);if(null==n||"list-item"!==n.blotName||!E(t,"\n"))return t;for(var r=-1,i=e.parentNode;!i.classList.contains("ql-clipboard");)"list"===(l.default.query(i)||{}).blotName&&(r+=1),i=i.parentNode;return r<=0?t:t.compose((new s.default).retain(t.length()-1).retain(1,{indent:r}))}],["b",R.bind(R,"bold")],["i",R.bind(R,"italic")],["style",function(){return new s.default}]],w=[p.AlignAttribute,g.DirectionAttribute].reduce(function(e,t){return e[t.keyName]=t,e},{}),S=[p.AlignStyle,h.BackgroundStyle,f.ColorStyle,g.DirectionStyle,v.FontStyle,x.SizeStyle].reduce(function(e,t){return e[t.keyName]=t,e},{}),A=function(e){function t(e,n){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var r=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!==typeof t&&"function"!==typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e,n));return r.quill.root.addEventListener("paste",r.onPaste.bind(r)),r.container=r.quill.addContainer("ql-clipboard"),r.container.setAttribute("contenteditable",!0),r.container.setAttribute("tabindex",-1),r.matchers=[],C.concat(r.options.matchers).forEach(function(e){var t=i(e,2),o=t[0],a=t[1];(n.matchVisual||a!==L)&&r.addMatcher(o,a)}),r}return function(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),o(t,[{key:"addMatcher",value:function(e,t){this.matchers.push([e,t])}},{key:"convert",value:function(e){if("string"===typeof e)return this.container.innerHTML=e.replace(/\>\r?\n +\</g,"><"),this.convert();var t=this.quill.getFormat(this.quill.selection.savedRange.index);if(t[m.default.blotName]){var n=this.container.innerText;return this.container.innerHTML="",(new s.default).insert(n,b({},m.default.blotName,t[m.default.blotName]))}var r=this.prepareMatching(),o=i(r,2),a=o[0],l=o[1],c=O(this.container,a,l);return E(c,"\n")&&null==c.ops[c.ops.length-1].attributes&&(c=c.compose((new s.default).retain(c.length()-1).delete(1))),j.log("convert",this.container.innerHTML,c),this.container.innerHTML="",c}},{key:"dangerouslyPasteHTML",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:c.default.sources.API;if("string"===typeof e)this.quill.setContents(this.convert(e),t),this.quill.setSelection(0,c.default.sources.SILENT);else{var r=this.convert(t);this.quill.updateContents((new s.default).retain(e).concat(r),n),this.quill.setSelection(e+r.length(),c.default.sources.SILENT)}}},{key:"onPaste",value:function(e){var t=this;if(!e.defaultPrevented&&this.quill.isEnabled()){var n=this.quill.getSelection(),r=(new s.default).retain(n.index),i=this.quill.scrollingContainer.scrollTop;this.container.focus(),this.quill.selection.update(c.default.sources.SILENT),setTimeout(function(){r=r.concat(t.convert()).delete(n.length),t.quill.updateContents(r,c.default.sources.USER),t.quill.setSelection(r.length()-n.length,c.default.sources.SILENT),t.quill.scrollingContainer.scrollTop=i,t.quill.focus()},1)}}},{key:"prepareMatching",value:function(){var e=this,t=[],n=[];return this.matchers.forEach(function(r){var o=i(r,2),a=o[0],s=o[1];switch(a){case Node.TEXT_NODE:n.push(s);break;case Node.ELEMENT_NODE:t.push(s);break;default:[].forEach.call(e.container.querySelectorAll(a),function(e){e[_]=e[_]||[],e[_].push(s)})}}),[t,n]}}]),t}(u.default);function k(e,t,n){return"object"===("undefined"===typeof t?"undefined":r(t))?Object.keys(t).reduce(function(e,n){return k(e,n,t[n])},e):e.reduce(function(e,r){return r.attributes&&r.attributes[t]?e.push(r):e.insert(r.insert,(0,a.default)({},b({},t,n),r.attributes))},new s.default)}function T(e){if(e.nodeType!==Node.ELEMENT_NODE)return{};var t="__ql-computed-style";return e[t]||(e[t]=window.getComputedStyle(e))}function E(e,t){for(var n="",r=e.ops.length-1;r>=0&&n.length<t.length;--r){var i=e.ops[r];if("string"!==typeof i.insert)break;n=i.insert+n}return n.slice(-1*t.length)===t}function M(e){if(0===e.childNodes.length)return!1;var t=T(e);return["block","list-item"].indexOf(t.display)>-1}function O(e,t,n){return e.nodeType===e.TEXT_NODE?n.reduce(function(t,n){return n(e,t)},new s.default):e.nodeType===e.ELEMENT_NODE?[].reduce.call(e.childNodes||[],function(r,i){var o=O(i,t,n);return i.nodeType===e.ELEMENT_NODE&&(o=t.reduce(function(e,t){return t(i,e)},o),o=(i[_]||[]).reduce(function(e,t){return t(i,e)},o)),r.concat(o)},new s.default):new s.default}function R(e,t,n){return k(n,e,!0)}function P(e,t){var n=l.default.Attributor.Attribute.keys(e),r=l.default.Attributor.Class.keys(e),i=l.default.Attributor.Style.keys(e),o={};return n.concat(r).concat(i).forEach(function(t){var n=l.default.query(t,l.default.Scope.ATTRIBUTE);null!=n&&(o[n.attrName]=n.value(e),o[n.attrName])||(null==(n=w[t])||n.attrName!==t&&n.keyName!==t||(o[n.attrName]=n.value(e)||void 0),null==(n=S[t])||n.attrName!==t&&n.keyName!==t||(n=S[t],o[n.attrName]=n.value(e)||void 0))}),Object.keys(o).length>0&&(t=k(t,o)),t}function D(e,t){var n=l.default.query(e);if(null==n)return t;if(n.prototype instanceof l.default.Embed){var r={},i=n.value(e);null!=i&&(r[n.blotName]=i,t=(new s.default).insert(r,n.formats(e)))}else"function"===typeof n.formats&&(t=k(t,n.blotName,n.formats(e)));return t}function N(e,t){return E(t,"\n")||(M(e)||t.length()>0&&e.nextSibling&&M(e.nextSibling))&&t.insert("\n"),t}function L(e,t){if(M(e)&&null!=e.nextElementSibling&&!E(t,"\n\n")){var n=e.offsetHeight+parseFloat(T(e).marginTop)+parseFloat(T(e).marginBottom);e.nextElementSibling.offsetTop>e.offsetTop+1.5*n&&t.insert("\n")}return t}function I(e,t){var n=e.data;if("O:P"===e.parentNode.tagName)return t.insert(n.trim());if(0===n.trim().length&&e.parentNode.classList.contains("ql-clipboard"))return t;if(!T(e.parentNode).whiteSpace.startsWith("pre")){var r=function(e,t){return(t=t.replace(/[^\u00a0]/g,"")).length<1&&e?" ":t};n=(n=n.replace(/\r\n/g," ").replace(/\n/g," ")).replace(/\s\s+/g,r.bind(r,!0)),(null==e.previousSibling&&M(e.parentNode)||null!=e.previousSibling&&M(e.previousSibling))&&(n=n.replace(/^\s+/,r.bind(r,!1))),(null==e.nextSibling&&M(e.parentNode)||null!=e.nextSibling&&M(e.nextSibling))&&(n=n.replace(/\s+$/,r.bind(r,!1)))}return t.insert(n)}A.DEFAULTS={matchers:[],matchVisual:!0},t.default=A,t.matchAttributor=P,t.matchBlot=D,t.matchNewline=N,t.matchSpacing=L,t.matchText=I},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r,i=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),o=function e(t,n,r){null===t&&(t=Function.prototype);var i=Object.getOwnPropertyDescriptor(t,n);if(void 0===i){var o=Object.getPrototypeOf(t);return null===o?void 0:e(o,n,r)}if("value"in i)return i.value;var a=i.get;return void 0!==a?a.call(r):void 0},a=n(6),s=function(e){function t(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!==typeof t&&"function"!==typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return function(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),i(t,[{key:"optimize",value:function(e){o(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"optimize",this).call(this,e),this.domNode.tagName!==this.statics.tagName[0]&&this.replaceWith(this.statics.blotName)}}],[{key:"create",value:function(){return o(t.__proto__||Object.getPrototypeOf(t),"create",this).call(this)}},{key:"formats",value:function(){return!0}}]),t}(((r=a)&&r.__esModule?r:{default:r}).default);s.blotName="bold",s.tagName=["STRONG","B"],t.default=s},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.addControls=t.default=void 0;var r=function(e,t){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return function(e,t){var n=[],r=!0,i=!1,o=void 0;try{for(var a,s=e[Symbol.iterator]();!(r=(a=s.next()).done)&&(n.push(a.value),!t||n.length!==t);r=!0);}catch(l){i=!0,o=l}finally{try{!r&&s.return&&s.return()}finally{if(i)throw o}}return n}(e,t);throw new TypeError("Invalid attempt to destructure non-iterable instance")},i=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),o=d(n(2)),a=d(n(0)),s=d(n(5)),l=d(n(10)),c=d(n(9));function d(e){return e&&e.__esModule?e:{default:e}}function u(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!==typeof t&&"function"!==typeof t?e:t}var p=(0,l.default)("quill:toolbar"),h=function(e){function t(e,n){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var i,o=u(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e,n));if(Array.isArray(o.options.container)){var a=document.createElement("div");f(a,o.options.container),e.container.parentNode.insertBefore(a,e.container),o.container=a}else"string"===typeof o.options.container?o.container=document.querySelector(o.options.container):o.container=o.options.container;return o.container instanceof HTMLElement?(o.container.classList.add("ql-toolbar"),o.controls=[],o.handlers={},Object.keys(o.options.handlers).forEach(function(e){o.addHandler(e,o.options.handlers[e])}),[].forEach.call(o.container.querySelectorAll("button, select"),function(e){o.attach(e)}),o.quill.on(s.default.events.EDITOR_CHANGE,function(e,t){e===s.default.events.SELECTION_CHANGE&&o.update(t)}),o.quill.on(s.default.events.SCROLL_OPTIMIZE,function(){var e=o.quill.selection.getRange(),t=r(e,1)[0];o.update(t)}),o):(i=p.error("Container required for toolbar",o.options),u(o,i))}return function(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),i(t,[{key:"addHandler",value:function(e,t){this.handlers[e]=t}},{key:"attach",value:function(e){var t=this,n=[].find.call(e.classList,function(e){return 0===e.indexOf("ql-")});if(n){if(n=n.slice(3),"BUTTON"===e.tagName&&e.setAttribute("type","button"),null==this.handlers[n]){if(null!=this.quill.scroll.whitelist&&null==this.quill.scroll.whitelist[n])return void p.warn("ignoring attaching to disabled format",n,e);if(null==a.default.query(n))return void p.warn("ignoring attaching to nonexistent format",n,e)}var i="SELECT"===e.tagName?"change":"click";e.addEventListener(i,function(i){var l=void 0;if("SELECT"===e.tagName){if(e.selectedIndex<0)return;var c=e.options[e.selectedIndex];l=!c.hasAttribute("selected")&&(c.value||!1)}else l=!e.classList.contains("ql-active")&&(e.value||!e.hasAttribute("value")),i.preventDefault();t.quill.focus();var d=t.quill.selection.getRange(),u=r(d,1)[0];if(null!=t.handlers[n])t.handlers[n].call(t,l);else if(a.default.query(n).prototype instanceof a.default.Embed){if(!(l=prompt("Enter "+n)))return;t.quill.updateContents((new o.default).retain(u.index).delete(u.length).insert(function(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}({},n,l)),s.default.sources.USER)}else t.quill.format(n,l,s.default.sources.USER);t.update(u)}),this.controls.push([n,e])}}},{key:"update",value:function(e){var t=null==e?{}:this.quill.getFormat(e);this.controls.forEach(function(n){var i=r(n,2),o=i[0],a=i[1];if("SELECT"===a.tagName){var s=void 0;if(null==e)s=null;else if(null==t[o])s=a.querySelector("option[selected]");else if(!Array.isArray(t[o])){var l=t[o];"string"===typeof l&&(l=l.replace(/\"/g,'\\"')),s=a.querySelector('option[value="'+l+'"]')}null==s?(a.value="",a.selectedIndex=-1):s.selected=!0}else if(null==e)a.classList.remove("ql-active");else if(a.hasAttribute("value")){var c=t[o]===a.getAttribute("value")||null!=t[o]&&t[o].toString()===a.getAttribute("value")||null==t[o]&&!a.getAttribute("value");a.classList.toggle("ql-active",c)}else a.classList.toggle("ql-active",null!=t[o])})}}]),t}(c.default);function m(e,t,n){var r=document.createElement("button");r.setAttribute("type","button"),r.classList.add("ql-"+t),null!=n&&(r.value=n),e.appendChild(r)}function f(e,t){Array.isArray(t[0])||(t=[t]),t.forEach(function(t){var n=document.createElement("span");n.classList.add("ql-formats"),t.forEach(function(e){if("string"===typeof e)m(n,e);else{var t=Object.keys(e)[0],r=e[t];Array.isArray(r)?function(e,t,n){var r=document.createElement("select");r.classList.add("ql-"+t),n.forEach(function(e){var t=document.createElement("option");!1!==e?t.setAttribute("value",e):t.setAttribute("selected","selected"),r.appendChild(t)}),e.appendChild(r)}(n,t,r):m(n,t,r)}}),e.appendChild(n)})}h.DEFAULTS={},h.DEFAULTS={container:null,handlers:{clean:function(){var e=this,t=this.quill.getSelection();if(null!=t)if(0==t.length){var n=this.quill.getFormat();Object.keys(n).forEach(function(t){null!=a.default.query(t,a.default.Scope.INLINE)&&e.quill.format(t,!1)})}else this.quill.removeFormat(t,s.default.sources.USER)},direction:function(e){var t=this.quill.getFormat().align;"rtl"===e&&null==t?this.quill.format("align","right",s.default.sources.USER):e||"right"!==t||this.quill.format("align",!1,s.default.sources.USER),this.quill.format("direction",e,s.default.sources.USER)},indent:function(e){var t=this.quill.getSelection(),n=this.quill.getFormat(t),r=parseInt(n.indent||0);if("+1"===e||"-1"===e){var i="+1"===e?1:-1;"rtl"===n.direction&&(i*=-1),this.quill.format("indent",r+i,s.default.sources.USER)}},link:function(e){!0===e&&(e=prompt("Enter link URL:")),this.quill.format("link",e,s.default.sources.USER)},list:function(e){var t=this.quill.getSelection(),n=this.quill.getFormat(t);"check"===e?"checked"===n.list||"unchecked"===n.list?this.quill.format("list",!1,s.default.sources.USER):this.quill.format("list","unchecked",s.default.sources.USER):this.quill.format("list",e,s.default.sources.USER)}}},t.default=h,t.addControls=f},function(e,t){e.exports='<svg viewbox="0 0 18 18"> <polyline class="ql-even ql-stroke" points="5 7 3 9 5 11"></polyline> <polyline class="ql-even ql-stroke" points="13 7 15 9 13 11"></polyline> <line class=ql-stroke x1=10 x2=8 y1=5 y2=13></line> </svg>'},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r,i=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),o=function e(t,n,r){null===t&&(t=Function.prototype);var i=Object.getOwnPropertyDescriptor(t,n);if(void 0===i){var o=Object.getPrototypeOf(t);return null===o?void 0:e(o,n,r)}if("value"in i)return i.value;var a=i.get;return void 0!==a?a.call(r):void 0},a=n(28),s=function(e){function t(e,n){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var r=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!==typeof t&&"function"!==typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return r.label.innerHTML=n,r.container.classList.add("ql-color-picker"),[].slice.call(r.container.querySelectorAll(".ql-picker-item"),0,7).forEach(function(e){e.classList.add("ql-primary")}),r}return function(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),i(t,[{key:"buildItem",value:function(e){var n=o(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"buildItem",this).call(this,e);return n.style.backgroundColor=e.getAttribute("value")||"",n}},{key:"selectItem",value:function(e,n){o(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"selectItem",this).call(this,e,n);var r=this.label.querySelector(".ql-color-label"),i=e&&e.getAttribute("data-value")||"";r&&("line"===r.tagName?r.style.stroke=i:r.style.fill=i)}}]),t}(((r=a)&&r.__esModule?r:{default:r}).default);t.default=s},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r,i=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),o=function e(t,n,r){null===t&&(t=Function.prototype);var i=Object.getOwnPropertyDescriptor(t,n);if(void 0===i){var o=Object.getPrototypeOf(t);return null===o?void 0:e(o,n,r)}if("value"in i)return i.value;var a=i.get;return void 0!==a?a.call(r):void 0},a=n(28),s=function(e){function t(e,n){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var r=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!==typeof t&&"function"!==typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return r.container.classList.add("ql-icon-picker"),[].forEach.call(r.container.querySelectorAll(".ql-picker-item"),function(e){e.innerHTML=n[e.getAttribute("data-value")||""]}),r.defaultItem=r.container.querySelector(".ql-selected"),r.selectItem(r.defaultItem),r}return function(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),i(t,[{key:"selectItem",value:function(e,n){o(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"selectItem",this).call(this,e,n),e=e||this.defaultItem,this.label.innerHTML=e.innerHTML}}]),t}(((r=a)&&r.__esModule?r:{default:r}).default);t.default=s},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),i=function(){function e(t,n){var r=this;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.quill=t,this.boundsContainer=n||document.body,this.root=t.addContainer("ql-tooltip"),this.root.innerHTML=this.constructor.TEMPLATE,this.quill.root===this.quill.scrollingContainer&&this.quill.root.addEventListener("scroll",function(){r.root.style.marginTop=-1*r.quill.root.scrollTop+"px"}),this.hide()}return r(e,[{key:"hide",value:function(){this.root.classList.add("ql-hidden")}},{key:"position",value:function(e){var t=e.left+e.width/2-this.root.offsetWidth/2,n=e.bottom+this.quill.root.scrollTop;this.root.style.left=t+"px",this.root.style.top=n+"px",this.root.classList.remove("ql-flip");var r=this.boundsContainer.getBoundingClientRect(),i=this.root.getBoundingClientRect(),o=0;if(i.right>r.right&&(o=r.right-i.right,this.root.style.left=t+o+"px"),i.left<r.left&&(o=r.left-i.left,this.root.style.left=t+o+"px"),i.bottom>r.bottom){var a=i.bottom-i.top,s=e.bottom-e.top+a;this.root.style.top=n-s+"px",this.root.classList.add("ql-flip")}return o}},{key:"show",value:function(){this.root.classList.remove("ql-editing"),this.root.classList.remove("ql-hidden")}}]),e}();t.default=i},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=function(e,t){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return function(e,t){var n=[],r=!0,i=!1,o=void 0;try{for(var a,s=e[Symbol.iterator]();!(r=(a=s.next()).done)&&(n.push(a.value),!t||n.length!==t);r=!0);}catch(l){i=!0,o=l}finally{try{!r&&s.return&&s.return()}finally{if(i)throw o}}return n}(e,t);throw new TypeError("Invalid attempt to destructure non-iterable instance")},i=function e(t,n,r){null===t&&(t=Function.prototype);var i=Object.getOwnPropertyDescriptor(t,n);if(void 0===i){var o=Object.getPrototypeOf(t);return null===o?void 0:e(o,n,r)}if("value"in i)return i.value;var a=i.get;return void 0!==a?a.call(r):void 0},o=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),a=h(n(3)),s=h(n(8)),l=n(43),c=h(l),d=h(n(27)),u=n(15),p=h(n(41));function h(e){return e&&e.__esModule?e:{default:e}}function m(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function f(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!==typeof t&&"function"!==typeof t?e:t}function g(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var v=[[{header:["1","2","3",!1]}],["bold","italic","underline","link"],[{list:"ordered"},{list:"bullet"}],["clean"]],x=function(e){function t(e,n){m(this,t),null!=n.modules.toolbar&&null==n.modules.toolbar.container&&(n.modules.toolbar.container=v);var r=f(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e,n));return r.quill.container.classList.add("ql-snow"),r}return g(t,e),o(t,[{key:"extendToolbar",value:function(e){e.container.classList.add("ql-snow"),this.buildButtons([].slice.call(e.container.querySelectorAll("button")),p.default),this.buildPickers([].slice.call(e.container.querySelectorAll("select")),p.default),this.tooltip=new y(this.quill,this.options.bounds),e.container.querySelector(".ql-link")&&this.quill.keyboard.addBinding({key:"K",shortKey:!0},function(t,n){e.handlers.link.call(e,!n.format.link)})}}]),t}(c.default);x.DEFAULTS=(0,a.default)(!0,{},c.default.DEFAULTS,{modules:{toolbar:{handlers:{link:function(e){if(e){var t=this.quill.getSelection();if(null==t||0==t.length)return;var n=this.quill.getText(t);/^\S+@\S+\.\S+$/.test(n)&&0!==n.indexOf("mailto:")&&(n="mailto:"+n),this.quill.theme.tooltip.edit("link",n)}else this.quill.format("link",!1)}}}}});var y=function(e){function t(e,n){m(this,t);var r=f(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e,n));return r.preview=r.root.querySelector("a.ql-preview"),r}return g(t,e),o(t,[{key:"listen",value:function(){var e=this;i(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"listen",this).call(this),this.root.querySelector("a.ql-action").addEventListener("click",function(t){e.root.classList.contains("ql-editing")?e.save():e.edit("link",e.preview.textContent),t.preventDefault()}),this.root.querySelector("a.ql-remove").addEventListener("click",function(t){if(null!=e.linkRange){var n=e.linkRange;e.restoreFocus(),e.quill.formatText(n,"link",!1,s.default.sources.USER),delete e.linkRange}t.preventDefault(),e.hide()}),this.quill.on(s.default.events.SELECTION_CHANGE,function(t,n,i){if(null!=t){if(0===t.length&&i===s.default.sources.USER){var o=e.quill.scroll.descendant(d.default,t.index),a=r(o,2),l=a[0],c=a[1];if(null!=l){e.linkRange=new u.Range(t.index-c,l.length());var p=d.default.formats(l.domNode);return e.preview.textContent=p,e.preview.setAttribute("href",p),e.show(),void e.position(e.quill.getBounds(e.linkRange))}}else delete e.linkRange;e.hide()}})}},{key:"show",value:function(){i(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"show",this).call(this),this.root.removeAttribute("data-mode")}}]),t}(l.BaseTooltip);y.TEMPLATE=['<a class="ql-preview" rel="noopener noreferrer" target="_blank" href="about:blank"></a>','<input type="text" data-formula="e=mc^2" data-link="https://quilljs.com" data-video="Embed URL">','<a class="ql-action"></a>','<a class="ql-remove"></a>'].join(""),t.default=x},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=N(n(29)),i=n(36),o=n(38),a=n(64),s=N(n(65)),l=N(n(66)),c=n(67),d=N(c),u=n(37),p=n(26),h=n(39),m=n(40),f=N(n(56)),g=N(n(68)),v=N(n(27)),x=N(n(69)),y=N(n(70)),b=N(n(71)),j=N(n(72)),_=N(n(73)),C=n(13),w=N(C),S=N(n(74)),A=N(n(75)),k=N(n(57)),T=N(n(41)),E=N(n(28)),M=N(n(59)),O=N(n(60)),R=N(n(61)),P=N(n(108)),D=N(n(62));function N(e){return e&&e.__esModule?e:{default:e}}r.default.register({"attributors/attribute/direction":o.DirectionAttribute,"attributors/class/align":i.AlignClass,"attributors/class/background":u.BackgroundClass,"attributors/class/color":p.ColorClass,"attributors/class/direction":o.DirectionClass,"attributors/class/font":h.FontClass,"attributors/class/size":m.SizeClass,"attributors/style/align":i.AlignStyle,"attributors/style/background":u.BackgroundStyle,"attributors/style/color":p.ColorStyle,"attributors/style/direction":o.DirectionStyle,"attributors/style/font":h.FontStyle,"attributors/style/size":m.SizeStyle},!0),r.default.register({"formats/align":i.AlignClass,"formats/direction":o.DirectionClass,"formats/indent":a.IndentClass,"formats/background":u.BackgroundStyle,"formats/color":p.ColorStyle,"formats/font":h.FontClass,"formats/size":m.SizeClass,"formats/blockquote":s.default,"formats/code-block":w.default,"formats/header":l.default,"formats/list":d.default,"formats/bold":f.default,"formats/code":C.Code,"formats/italic":g.default,"formats/link":v.default,"formats/script":x.default,"formats/strike":y.default,"formats/underline":b.default,"formats/image":j.default,"formats/video":_.default,"formats/list/item":c.ListItem,"modules/formula":S.default,"modules/syntax":A.default,"modules/toolbar":k.default,"themes/bubble":P.default,"themes/snow":D.default,"ui/icons":T.default,"ui/picker":E.default,"ui/icon-picker":O.default,"ui/color-picker":M.default,"ui/tooltip":R.default},!0),t.default=r.default},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.IndentClass=void 0;var r,i=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),o=function e(t,n,r){null===t&&(t=Function.prototype);var i=Object.getOwnPropertyDescriptor(t,n);if(void 0===i){var o=Object.getPrototypeOf(t);return null===o?void 0:e(o,n,r)}if("value"in i)return i.value;var a=i.get;return void 0!==a?a.call(r):void 0},a=n(0),s=(r=a)&&r.__esModule?r:{default:r},l=function(e){function t(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!==typeof t&&"function"!==typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return function(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),i(t,[{key:"add",value:function(e,n){if("+1"===n||"-1"===n){var r=this.value(e)||0;n="+1"===n?r+1:r-1}return 0===n?(this.remove(e),!0):o(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"add",this).call(this,e,n)}},{key:"canAdd",value:function(e,n){return o(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"canAdd",this).call(this,e,n)||o(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"canAdd",this).call(this,e,parseInt(n))}},{key:"value",value:function(e){return parseInt(o(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"value",this).call(this,e))||void 0}}]),t}(s.default.Attributor.Class),c=new l("indent","ql-indent",{scope:s.default.Scope.BLOCK,whitelist:[1,2,3,4,5,6,7,8]});t.IndentClass=c},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r,i=n(4),o=function(e){function t(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!==typeof t&&"function"!==typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return function(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),t}(((r=i)&&r.__esModule?r:{default:r}).default);o.blotName="blockquote",o.tagName="blockquote",t.default=o},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r,i=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),o=n(4),a=function(e){function t(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!==typeof t&&"function"!==typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return function(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),i(t,null,[{key:"formats",value:function(e){return this.tagName.indexOf(e.tagName)+1}}]),t}(((r=o)&&r.__esModule?r:{default:r}).default);a.blotName="header",a.tagName=["H1","H2","H3","H4","H5","H6"],t.default=a},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=t.ListItem=void 0;var r=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),i=function e(t,n,r){null===t&&(t=Function.prototype);var i=Object.getOwnPropertyDescriptor(t,n);if(void 0===i){var o=Object.getPrototypeOf(t);return null===o?void 0:e(o,n,r)}if("value"in i)return i.value;var a=i.get;return void 0!==a?a.call(r):void 0},o=l(n(0)),a=l(n(4)),s=l(n(25));function l(e){return e&&e.__esModule?e:{default:e}}function c(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function d(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!==typeof t&&"function"!==typeof t?e:t}function u(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var p=function(e){function t(){return c(this,t),d(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return u(t,e),r(t,[{key:"format",value:function(e,n){e!==h.blotName||n?i(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"format",this).call(this,e,n):this.replaceWith(o.default.create(this.statics.scope))}},{key:"remove",value:function(){null==this.prev&&null==this.next?this.parent.remove():i(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"remove",this).call(this)}},{key:"replaceWith",value:function(e,n){return this.parent.isolate(this.offset(this.parent),this.length()),e===this.parent.statics.blotName?(this.parent.replaceWith(e,n),this):(this.parent.unwrap(),i(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"replaceWith",this).call(this,e,n))}}],[{key:"formats",value:function(e){return e.tagName===this.tagName?void 0:i(t.__proto__||Object.getPrototypeOf(t),"formats",this).call(this,e)}}]),t}(a.default);p.blotName="list-item",p.tagName="LI";var h=function(e){function t(e){c(this,t);var n=d(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e)),r=function(t){if(t.target.parentNode===e){var r=n.statics.formats(e),i=o.default.find(t.target);"checked"===r?i.format("list","unchecked"):"unchecked"===r&&i.format("list","checked")}};return e.addEventListener("touchstart",r),e.addEventListener("mousedown",r),n}return u(t,e),r(t,null,[{key:"create",value:function(e){var n="ordered"===e?"OL":"UL",r=i(t.__proto__||Object.getPrototypeOf(t),"create",this).call(this,n);return"checked"!==e&&"unchecked"!==e||r.setAttribute("data-checked","checked"===e),r}},{key:"formats",value:function(e){return"OL"===e.tagName?"ordered":"UL"===e.tagName?e.hasAttribute("data-checked")?"true"===e.getAttribute("data-checked")?"checked":"unchecked":"bullet":void 0}}]),r(t,[{key:"format",value:function(e,t){this.children.length>0&&this.children.tail.format(e,t)}},{key:"formats",value:function(){return e={},t=this.statics.blotName,n=this.statics.formats(this.domNode),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e;var e,t,n}},{key:"insertBefore",value:function(e,n){if(e instanceof p)i(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"insertBefore",this).call(this,e,n);else{var r=null==n?this.length():n.offset(this),o=this.split(r);o.parent.insertBefore(e,o)}}},{key:"optimize",value:function(e){i(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"optimize",this).call(this,e);var n=this.next;null!=n&&n.prev===this&&n.statics.blotName===this.statics.blotName&&n.domNode.tagName===this.domNode.tagName&&n.domNode.getAttribute("data-checked")===this.domNode.getAttribute("data-checked")&&(n.moveChildren(this),n.remove())}},{key:"replace",value:function(e){if(e.statics.blotName!==this.statics.blotName){var n=o.default.create(this.statics.defaultChild);e.moveChildren(n),this.appendChild(n)}i(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"replace",this).call(this,e)}}]),t}(s.default);h.blotName="list",h.scope=o.default.Scope.BLOCK_BLOT,h.tagName=["OL","UL"],h.defaultChild="list-item",h.allowedChildren=[p],t.ListItem=p,t.default=h},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r,i=n(56),o=function(e){function t(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!==typeof t&&"function"!==typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return function(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),t}(((r=i)&&r.__esModule?r:{default:r}).default);o.blotName="italic",o.tagName=["EM","I"],t.default=o},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r,i=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),o=function e(t,n,r){null===t&&(t=Function.prototype);var i=Object.getOwnPropertyDescriptor(t,n);if(void 0===i){var o=Object.getPrototypeOf(t);return null===o?void 0:e(o,n,r)}if("value"in i)return i.value;var a=i.get;return void 0!==a?a.call(r):void 0},a=n(6),s=function(e){function t(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!==typeof t&&"function"!==typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return function(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),i(t,null,[{key:"create",value:function(e){return"super"===e?document.createElement("sup"):"sub"===e?document.createElement("sub"):o(t.__proto__||Object.getPrototypeOf(t),"create",this).call(this,e)}},{key:"formats",value:function(e){return"SUB"===e.tagName?"sub":"SUP"===e.tagName?"super":void 0}}]),t}(((r=a)&&r.__esModule?r:{default:r}).default);s.blotName="script",s.tagName=["SUB","SUP"],t.default=s},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r,i=n(6),o=function(e){function t(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!==typeof t&&"function"!==typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return function(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),t}(((r=i)&&r.__esModule?r:{default:r}).default);o.blotName="strike",o.tagName="S",t.default=o},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r,i=n(6),o=function(e){function t(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!==typeof t&&"function"!==typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return function(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),t}(((r=i)&&r.__esModule?r:{default:r}).default);o.blotName="underline",o.tagName="U",t.default=o},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r,i=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),o=function e(t,n,r){null===t&&(t=Function.prototype);var i=Object.getOwnPropertyDescriptor(t,n);if(void 0===i){var o=Object.getPrototypeOf(t);return null===o?void 0:e(o,n,r)}if("value"in i)return i.value;var a=i.get;return void 0!==a?a.call(r):void 0},a=n(0),s=(r=a)&&r.__esModule?r:{default:r},l=n(27),c=["alt","height","width"],d=function(e){function t(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!==typeof t&&"function"!==typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return function(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),i(t,[{key:"format",value:function(e,n){c.indexOf(e)>-1?n?this.domNode.setAttribute(e,n):this.domNode.removeAttribute(e):o(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"format",this).call(this,e,n)}}],[{key:"create",value:function(e){var n=o(t.__proto__||Object.getPrototypeOf(t),"create",this).call(this,e);return"string"===typeof e&&n.setAttribute("src",this.sanitize(e)),n}},{key:"formats",value:function(e){return c.reduce(function(t,n){return e.hasAttribute(n)&&(t[n]=e.getAttribute(n)),t},{})}},{key:"match",value:function(e){return/\.(jpe?g|gif|png)$/.test(e)||/^data:image\/.+;base64/.test(e)}},{key:"sanitize",value:function(e){return(0,l.sanitize)(e,["http","https","data"])?e:"//:0"}},{key:"value",value:function(e){return e.getAttribute("src")}}]),t}(s.default.Embed);d.blotName="image",d.tagName="IMG",t.default=d},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r,i=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),o=function e(t,n,r){null===t&&(t=Function.prototype);var i=Object.getOwnPropertyDescriptor(t,n);if(void 0===i){var o=Object.getPrototypeOf(t);return null===o?void 0:e(o,n,r)}if("value"in i)return i.value;var a=i.get;return void 0!==a?a.call(r):void 0},a=n(4),s=n(27),l=(r=s)&&r.__esModule?r:{default:r},c=["height","width"],d=function(e){function t(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!==typeof t&&"function"!==typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return function(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),i(t,[{key:"format",value:function(e,n){c.indexOf(e)>-1?n?this.domNode.setAttribute(e,n):this.domNode.removeAttribute(e):o(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"format",this).call(this,e,n)}}],[{key:"create",value:function(e){var n=o(t.__proto__||Object.getPrototypeOf(t),"create",this).call(this,e);return n.setAttribute("frameborder","0"),n.setAttribute("allowfullscreen",!0),n.setAttribute("src",this.sanitize(e)),n}},{key:"formats",value:function(e){return c.reduce(function(t,n){return e.hasAttribute(n)&&(t[n]=e.getAttribute(n)),t},{})}},{key:"sanitize",value:function(e){return l.default.sanitize(e)}},{key:"value",value:function(e){return e.getAttribute("src")}}]),t}(a.BlockEmbed);d.blotName="video",d.className="ql-video",d.tagName="IFRAME",t.default=d},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=t.FormulaBlot=void 0;var r=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),i=function e(t,n,r){null===t&&(t=Function.prototype);var i=Object.getOwnPropertyDescriptor(t,n);if(void 0===i){var o=Object.getPrototypeOf(t);return null===o?void 0:e(o,n,r)}if("value"in i)return i.value;var a=i.get;return void 0!==a?a.call(r):void 0},o=l(n(35)),a=l(n(5)),s=l(n(9));function l(e){return e&&e.__esModule?e:{default:e}}function c(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function d(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!==typeof t&&"function"!==typeof t?e:t}function u(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var p=function(e){function t(){return c(this,t),d(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return u(t,e),r(t,null,[{key:"create",value:function(e){var n=i(t.__proto__||Object.getPrototypeOf(t),"create",this).call(this,e);return"string"===typeof e&&(window.katex.render(e,n,{throwOnError:!1,errorColor:"#f00"}),n.setAttribute("data-value",e)),n}},{key:"value",value:function(e){return e.getAttribute("data-value")}}]),t}(o.default);p.blotName="formula",p.className="ql-formula",p.tagName="SPAN";var h=function(e){function t(){c(this,t);var e=d(this,(t.__proto__||Object.getPrototypeOf(t)).call(this));if(null==window.katex)throw new Error("Formula module requires KaTeX.");return e}return u(t,e),r(t,null,[{key:"register",value:function(){a.default.register(p,!0)}}]),t}(s.default);t.FormulaBlot=p,t.default=h},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=t.CodeToken=t.CodeBlock=void 0;var r=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),i=function e(t,n,r){null===t&&(t=Function.prototype);var i=Object.getOwnPropertyDescriptor(t,n);if(void 0===i){var o=Object.getPrototypeOf(t);return null===o?void 0:e(o,n,r)}if("value"in i)return i.value;var a=i.get;return void 0!==a?a.call(r):void 0},o=l(n(0)),a=l(n(5)),s=l(n(9));function l(e){return e&&e.__esModule?e:{default:e}}function c(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function d(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!==typeof t&&"function"!==typeof t?e:t}function u(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var p=function(e){function t(){return c(this,t),d(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return u(t,e),r(t,[{key:"replaceWith",value:function(e){this.domNode.textContent=this.domNode.textContent,this.attach(),i(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"replaceWith",this).call(this,e)}},{key:"highlight",value:function(e){var t=this.domNode.textContent;this.cachedText!==t&&((t.trim().length>0||null==this.cachedText)&&(this.domNode.innerHTML=e(t),this.domNode.normalize(),this.attach()),this.cachedText=t)}}]),t}(l(n(13)).default);p.className="ql-syntax";var h=new o.default.Attributor.Class("token","hljs",{scope:o.default.Scope.INLINE}),m=function(e){function t(e,n){c(this,t);var r=d(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e,n));if("function"!==typeof r.options.highlight)throw new Error("Syntax module requires highlight.js. Please include the library on the page before Quill.");var i=null;return r.quill.on(a.default.events.SCROLL_OPTIMIZE,function(){clearTimeout(i),i=setTimeout(function(){r.highlight(),i=null},r.options.interval)}),r.highlight(),r}return u(t,e),r(t,null,[{key:"register",value:function(){a.default.register(h,!0),a.default.register(p,!0)}}]),r(t,[{key:"highlight",value:function(){var e=this;if(!this.quill.selection.composing){this.quill.update(a.default.sources.USER);var t=this.quill.getSelection();this.quill.scroll.descendants(p).forEach(function(t){t.highlight(e.options.highlight)}),this.quill.update(a.default.sources.SILENT),null!=t&&this.quill.setSelection(t,a.default.sources.SILENT)}}}]),t}(s.default);m.DEFAULTS={highlight:null==window.hljs?null:function(e){return window.hljs.highlightAuto(e).value},interval:1e3},t.CodeBlock=p,t.CodeToken=h,t.default=m},function(e,t){e.exports='<svg viewbox="0 0 18 18"> <line class=ql-stroke x1=3 x2=15 y1=9 y2=9></line> <line class=ql-stroke x1=3 x2=13 y1=14 y2=14></line> <line class=ql-stroke x1=3 x2=9 y1=4 y2=4></line> </svg>'},function(e,t){e.exports='<svg viewbox="0 0 18 18"> <line class=ql-stroke x1=15 x2=3 y1=9 y2=9></line> <line class=ql-stroke x1=14 x2=4 y1=14 y2=14></line> <line class=ql-stroke x1=12 x2=6 y1=4 y2=4></line> </svg>'},function(e,t){e.exports='<svg viewbox="0 0 18 18"> <line class=ql-stroke x1=15 x2=3 y1=9 y2=9></line> <line class=ql-stroke x1=15 x2=5 y1=14 y2=14></line> <line class=ql-stroke x1=15 x2=9 y1=4 y2=4></line> </svg>'},function(e,t){e.exports='<svg viewbox="0 0 18 18"> <line class=ql-stroke x1=15 x2=3 y1=9 y2=9></line> <line class=ql-stroke x1=15 x2=3 y1=14 y2=14></line> <line class=ql-stroke x1=15 x2=3 y1=4 y2=4></line> </svg>'},function(e,t){e.exports='<svg viewbox="0 0 18 18"> <g class="ql-fill ql-color-label"> <polygon points="6 6.868 6 6 5 6 5 7 5.942 7 6 6.868"></polygon> <rect height=1 width=1 x=4 y=4></rect> <polygon points="6.817 5 6 5 6 6 6.38 6 6.817 5"></polygon> <rect height=1 width=1 x=2 y=6></rect> <rect height=1 width=1 x=3 y=5></rect> <rect height=1 width=1 x=4 y=7></rect> <polygon points="4 11.439 4 11 3 11 3 12 3.755 12 4 11.439"></polygon> <rect height=1 width=1 x=2 y=12></rect> <rect height=1 width=1 x=2 y=9></rect> <rect height=1 width=1 x=2 y=15></rect> <polygon points="4.63 10 4 10 4 11 4.192 11 4.63 10"></polygon> <rect height=1 width=1 x=3 y=8></rect> <path d=M10.832,4.2L11,4.582V4H10.708A1.948,1.948,0,0,1,10.832,4.2Z></path> <path d=M7,4.582L7.168,4.2A1.929,1.929,0,0,1,7.292,4H7V4.582Z></path> <path d=M8,13H7.683l-0.351.8a1.933,1.933,0,0,1-.124.2H8V13Z></path> <rect height=1 width=1 x=12 y=2></rect> <rect height=1 width=1 x=11 y=3></rect> <path d=M9,3H8V3.282A1.985,1.985,0,0,1,9,3Z></path> <rect height=1 width=1 x=2 y=3></rect> <rect height=1 width=1 x=6 y=2></rect> <rect height=1 width=1 x=3 y=2></rect> <rect height=1 width=1 x=5 y=3></rect> <rect height=1 width=1 x=9 y=2></rect> <rect height=1 width=1 x=15 y=14></rect> <polygon points="13.447 10.174 13.469 10.225 13.472 10.232 13.808 11 14 11 14 10 13.37 10 13.447 10.174"></polygon> <rect height=1 width=1 x=13 y=7></rect> <rect height=1 width=1 x=15 y=5></rect> <rect height=1 width=1 x=14 y=6></rect> <rect height=1 width=1 x=15 y=8></rect> <rect height=1 width=1 x=14 y=9></rect> <path d=M3.775,14H3v1H4V14.314A1.97,1.97,0,0,1,3.775,14Z></path> <rect height=1 width=1 x=14 y=3></rect> <polygon points="12 6.868 12 6 11.62 6 12 6.868"></polygon> <rect height=1 width=1 x=15 y=2></rect> <rect height=1 width=1 x=12 y=5></rect> <rect height=1 width=1 x=13 y=4></rect> <polygon points="12.933 9 13 9 13 8 12.495 8 12.933 9"></polygon> <rect height=1 width=1 x=9 y=14></rect> <rect height=1 width=1 x=8 y=15></rect> <path d=M6,14.926V15H7V14.316A1.993,1.993,0,0,1,6,14.926Z></path> <rect height=1 width=1 x=5 y=15></rect> <path d=M10.668,13.8L10.317,13H10v1h0.792A1.947,1.947,0,0,1,10.668,13.8Z></path> <rect height=1 width=1 x=11 y=15></rect> <path d=M14.332,12.2a1.99,1.99,0,0,1,.166.8H15V12H14.245Z></path> <rect height=1 width=1 x=14 y=15></rect> <rect height=1 width=1 x=15 y=11></rect> </g> <polyline class=ql-stroke points="5.5 13 9 5 12.5 13"></polyline> <line class=ql-stroke x1=11.63 x2=6.38 y1=11 y2=11></line> </svg>'},function(e,t){e.exports='<svg viewbox="0 0 18 18"> <rect class="ql-fill ql-stroke" height=3 width=3 x=4 y=5></rect> <rect class="ql-fill ql-stroke" height=3 width=3 x=11 y=5></rect> <path class="ql-even ql-fill ql-stroke" d=M7,8c0,4.031-3,5-3,5></path> <path class="ql-even ql-fill ql-stroke" d=M14,8c0,4.031-3,5-3,5></path> </svg>'},function(e,t){e.exports='<svg viewbox="0 0 18 18"> <path class=ql-stroke d=M5,4H9.5A2.5,2.5,0,0,1,12,6.5v0A2.5,2.5,0,0,1,9.5,9H5A0,0,0,0,1,5,9V4A0,0,0,0,1,5,4Z></path> <path class=ql-stroke d=M5,9h5.5A2.5,2.5,0,0,1,13,11.5v0A2.5,2.5,0,0,1,10.5,14H5a0,0,0,0,1,0,0V9A0,0,0,0,1,5,9Z></path> </svg>'},function(e,t){e.exports='<svg class="" viewbox="0 0 18 18"> <line class=ql-stroke x1=5 x2=13 y1=3 y2=3></line> <line class=ql-stroke x1=6 x2=9.35 y1=12 y2=3></line> <line class=ql-stroke x1=11 x2=15 y1=11 y2=15></line> <line class=ql-stroke x1=15 x2=11 y1=11 y2=15></line> <rect class=ql-fill height=1 rx=0.5 ry=0.5 width=7 x=2 y=14></rect> </svg>'},function(e,t){e.exports='<svg viewbox="0 0 18 18"> <line class="ql-color-label ql-stroke ql-transparent" x1=3 x2=15 y1=15 y2=15></line> <polyline class=ql-stroke points="5.5 11 9 3 12.5 11"></polyline> <line class=ql-stroke x1=11.63 x2=6.38 y1=9 y2=9></line> </svg>'},function(e,t){e.exports='<svg viewbox="0 0 18 18"> <polygon class="ql-stroke ql-fill" points="3 11 5 9 3 7 3 11"></polygon> <line class="ql-stroke ql-fill" x1=15 x2=11 y1=4 y2=4></line> <path class=ql-fill d=M11,3a3,3,0,0,0,0,6h1V3H11Z></path> <rect class=ql-fill height=11 width=1 x=11 y=4></rect> <rect class=ql-fill height=11 width=1 x=13 y=4></rect> </svg>'},function(e,t){e.exports='<svg viewbox="0 0 18 18"> <polygon class="ql-stroke ql-fill" points="15 12 13 10 15 8 15 12"></polygon> <line class="ql-stroke ql-fill" x1=9 x2=5 y1=4 y2=4></line> <path class=ql-fill d=M5,3A3,3,0,0,0,5,9H6V3H5Z></path> <rect class=ql-fill height=11 width=1 x=5 y=4></rect> <rect class=ql-fill height=11 width=1 x=7 y=4></rect> </svg>'},function(e,t){e.exports='<svg viewbox="0 0 18 18"> <path class=ql-fill d=M14,16H4a1,1,0,0,1,0-2H14A1,1,0,0,1,14,16Z /> <path class=ql-fill d=M14,4H4A1,1,0,0,1,4,2H14A1,1,0,0,1,14,4Z /> <rect class=ql-fill x=3 y=6 width=12 height=6 rx=1 ry=1 /> </svg>'},function(e,t){e.exports='<svg viewbox="0 0 18 18"> <path class=ql-fill d=M13,16H5a1,1,0,0,1,0-2h8A1,1,0,0,1,13,16Z /> <path class=ql-fill d=M13,4H5A1,1,0,0,1,5,2h8A1,1,0,0,1,13,4Z /> <rect class=ql-fill x=2 y=6 width=14 height=6 rx=1 ry=1 /> </svg>'},function(e,t){e.exports='<svg viewbox="0 0 18 18"> <path class=ql-fill d=M15,8H13a1,1,0,0,1,0-2h2A1,1,0,0,1,15,8Z /> <path class=ql-fill d=M15,12H13a1,1,0,0,1,0-2h2A1,1,0,0,1,15,12Z /> <path class=ql-fill d=M15,16H5a1,1,0,0,1,0-2H15A1,1,0,0,1,15,16Z /> <path class=ql-fill d=M15,4H5A1,1,0,0,1,5,2H15A1,1,0,0,1,15,4Z /> <rect class=ql-fill x=2 y=6 width=8 height=6 rx=1 ry=1 /> </svg>'},function(e,t){e.exports='<svg viewbox="0 0 18 18"> <path class=ql-fill d=M5,8H3A1,1,0,0,1,3,6H5A1,1,0,0,1,5,8Z /> <path class=ql-fill d=M5,12H3a1,1,0,0,1,0-2H5A1,1,0,0,1,5,12Z /> <path class=ql-fill d=M13,16H3a1,1,0,0,1,0-2H13A1,1,0,0,1,13,16Z /> <path class=ql-fill d=M13,4H3A1,1,0,0,1,3,2H13A1,1,0,0,1,13,4Z /> <rect class=ql-fill x=8 y=6 width=8 height=6 rx=1 ry=1 transform="translate(24 18) rotate(-180)"/> </svg>'},function(e,t){e.exports='<svg viewbox="0 0 18 18"> <path class=ql-fill d=M11.759,2.482a2.561,2.561,0,0,0-3.53.607A7.656,7.656,0,0,0,6.8,6.2C6.109,9.188,5.275,14.677,4.15,14.927a1.545,1.545,0,0,0-1.3-.933A0.922,0.922,0,0,0,2,15.036S1.954,16,4.119,16s3.091-2.691,3.7-5.553c0.177-.826.36-1.726,0.554-2.6L8.775,6.2c0.381-1.421.807-2.521,1.306-2.676a1.014,1.014,0,0,0,1.02.56A0.966,0.966,0,0,0,11.759,2.482Z></path> <rect class=ql-fill height=1.6 rx=0.8 ry=0.8 width=5 x=5.15 y=6.2></rect> <path class=ql-fill d=M13.663,12.027a1.662,1.662,0,0,1,.266-0.276q0.193,0.069.456,0.138a2.1,2.1,0,0,0,.535.069,1.075,1.075,0,0,0,.767-0.3,1.044,1.044,0,0,0,.314-0.8,0.84,0.84,0,0,0-.238-0.619,0.8,0.8,0,0,0-.594-0.239,1.154,1.154,0,0,0-.781.3,4.607,4.607,0,0,0-.781,1q-0.091.15-.218,0.346l-0.246.38c-0.068-.288-0.137-0.582-0.212-0.885-0.459-1.847-2.494-.984-2.941-0.8-0.482.2-.353,0.647-0.094,0.529a0.869,0.869,0,0,1,1.281.585c0.217,0.751.377,1.436,0.527,2.038a5.688,5.688,0,0,1-.362.467,2.69,2.69,0,0,1-.264.271q-0.221-.08-0.471-0.147a2.029,2.029,0,0,0-.522-0.066,1.079,1.079,0,0,0-.768.3A1.058,1.058,0,0,0,9,15.131a0.82,0.82,0,0,0,.832.852,1.134,1.134,0,0,0,.787-0.3,5.11,5.11,0,0,0,.776-0.993q0.141-.219.215-0.34c0.046-.076.122-0.194,0.223-0.346a2.786,2.786,0,0,0,.918,1.726,2.582,2.582,0,0,0,2.376-.185c0.317-.181.212-0.565,0-0.494A0.807,0.807,0,0,1,14.176,15a5.159,5.159,0,0,1-.913-2.446l0,0Q13.487,12.24,13.663,12.027Z></path> </svg>'},function(e,t){e.exports='<svg viewBox="0 0 18 18"> <path class=ql-fill d=M10,4V14a1,1,0,0,1-2,0V10H3v4a1,1,0,0,1-2,0V4A1,1,0,0,1,3,4V8H8V4a1,1,0,0,1,2,0Zm6.06787,9.209H14.98975V7.59863a.54085.54085,0,0,0-.605-.60547h-.62744a1.01119,1.01119,0,0,0-.748.29688L11.645,8.56641a.5435.5435,0,0,0-.022.8584l.28613.30762a.53861.53861,0,0,0,.84717.0332l.09912-.08789a1.2137,1.2137,0,0,0,.2417-.35254h.02246s-.01123.30859-.01123.60547V13.209H12.041a.54085.54085,0,0,0-.605.60547v.43945a.54085.54085,0,0,0,.605.60547h4.02686a.54085.54085,0,0,0,.605-.60547v-.43945A.54085.54085,0,0,0,16.06787,13.209Z /> </svg>'},function(e,t){e.exports='<svg viewBox="0 0 18 18"> <path class=ql-fill d=M16.73975,13.81445v.43945a.54085.54085,0,0,1-.605.60547H11.855a.58392.58392,0,0,1-.64893-.60547V14.0127c0-2.90527,3.39941-3.42187,3.39941-4.55469a.77675.77675,0,0,0-.84717-.78125,1.17684,1.17684,0,0,0-.83594.38477c-.2749.26367-.561.374-.85791.13184l-.4292-.34082c-.30811-.24219-.38525-.51758-.1543-.81445a2.97155,2.97155,0,0,1,2.45361-1.17676,2.45393,2.45393,0,0,1,2.68408,2.40918c0,2.45312-3.1792,2.92676-3.27832,3.93848h2.79443A.54085.54085,0,0,1,16.73975,13.81445ZM9,3A.99974.99974,0,0,0,8,4V8H3V4A1,1,0,0,0,1,4V14a1,1,0,0,0,2,0V10H8v4a1,1,0,0,0,2,0V4A.99974.99974,0,0,0,9,3Z /> </svg>'},function(e,t){e.exports='<svg viewbox="0 0 18 18"> <line class=ql-stroke x1=7 x2=13 y1=4 y2=4></line> <line class=ql-stroke x1=5 x2=11 y1=14 y2=14></line> <line class=ql-stroke x1=8 x2=10 y1=14 y2=4></line> </svg>'},function(e,t){e.exports='<svg viewbox="0 0 18 18"> <rect class=ql-stroke height=10 width=12 x=3 y=4></rect> <circle class=ql-fill cx=6 cy=7 r=1></circle> <polyline class="ql-even ql-fill" points="5 12 5 11 7 9 8 10 11 7 13 9 13 12 5 12"></polyline> </svg>'},function(e,t){e.exports='<svg viewbox="0 0 18 18"> <line class=ql-stroke x1=3 x2=15 y1=14 y2=14></line> <line class=ql-stroke x1=3 x2=15 y1=4 y2=4></line> <line class=ql-stroke x1=9 x2=15 y1=9 y2=9></line> <polyline class="ql-fill ql-stroke" points="3 7 3 11 5 9 3 7"></polyline> </svg>'},function(e,t){e.exports='<svg viewbox="0 0 18 18"> <line class=ql-stroke x1=3 x2=15 y1=14 y2=14></line> <line class=ql-stroke x1=3 x2=15 y1=4 y2=4></line> <line class=ql-stroke x1=9 x2=15 y1=9 y2=9></line> <polyline class=ql-stroke points="5 7 5 11 3 9 5 7"></polyline> </svg>'},function(e,t){e.exports='<svg viewbox="0 0 18 18"> <line class=ql-stroke x1=7 x2=11 y1=7 y2=11></line> <path class="ql-even ql-stroke" d=M8.9,4.577a3.476,3.476,0,0,1,.36,4.679A3.476,3.476,0,0,1,4.577,8.9C3.185,7.5,2.035,6.4,4.217,4.217S7.5,3.185,8.9,4.577Z></path> <path class="ql-even ql-stroke" d=M13.423,9.1a3.476,3.476,0,0,0-4.679-.36,3.476,3.476,0,0,0,.36,4.679c1.392,1.392,2.5,2.542,4.679.36S14.815,10.5,13.423,9.1Z></path> </svg>'},function(e,t){e.exports='<svg viewbox="0 0 18 18"> <line class=ql-stroke x1=7 x2=15 y1=4 y2=4></line> <line class=ql-stroke x1=7 x2=15 y1=9 y2=9></line> <line class=ql-stroke x1=7 x2=15 y1=14 y2=14></line> <line class="ql-stroke ql-thin" x1=2.5 x2=4.5 y1=5.5 y2=5.5></line> <path class=ql-fill d=M3.5,6A0.5,0.5,0,0,1,3,5.5V3.085l-0.276.138A0.5,0.5,0,0,1,2.053,3c-0.124-.247-0.023-0.324.224-0.447l1-.5A0.5,0.5,0,0,1,4,2.5v3A0.5,0.5,0,0,1,3.5,6Z></path> <path class="ql-stroke ql-thin" d=M4.5,10.5h-2c0-.234,1.85-1.076,1.85-2.234A0.959,0.959,0,0,0,2.5,8.156></path> <path class="ql-stroke ql-thin" d=M2.5,14.846a0.959,0.959,0,0,0,1.85-.109A0.7,0.7,0,0,0,3.75,14a0.688,0.688,0,0,0,.6-0.736,0.959,0.959,0,0,0-1.85-.109></path> </svg>'},function(e,t){e.exports='<svg viewbox="0 0 18 18"> <line class=ql-stroke x1=6 x2=15 y1=4 y2=4></line> <line class=ql-stroke x1=6 x2=15 y1=9 y2=9></line> <line class=ql-stroke x1=6 x2=15 y1=14 y2=14></line> <line class=ql-stroke x1=3 x2=3 y1=4 y2=4></line> <line class=ql-stroke x1=3 x2=3 y1=9 y2=9></line> <line class=ql-stroke x1=3 x2=3 y1=14 y2=14></line> </svg>'},function(e,t){e.exports='<svg class="" viewbox="0 0 18 18"> <line class=ql-stroke x1=9 x2=15 y1=4 y2=4></line> <polyline class=ql-stroke points="3 4 4 5 6 3"></polyline> <line class=ql-stroke x1=9 x2=15 y1=14 y2=14></line> <polyline class=ql-stroke points="3 14 4 15 6 13"></polyline> <line class=ql-stroke x1=9 x2=15 y1=9 y2=9></line> <polyline class=ql-stroke points="3 9 4 10 6 8"></polyline> </svg>'},function(e,t){e.exports='<svg viewbox="0 0 18 18"> <path class=ql-fill d=M15.5,15H13.861a3.858,3.858,0,0,0,1.914-2.975,1.8,1.8,0,0,0-1.6-1.751A1.921,1.921,0,0,0,12.021,11.7a0.50013,0.50013,0,1,0,.957.291h0a0.914,0.914,0,0,1,1.053-.725,0.81,0.81,0,0,1,.744.762c0,1.076-1.16971,1.86982-1.93971,2.43082A1.45639,1.45639,0,0,0,12,15.5a0.5,0.5,0,0,0,.5.5h3A0.5,0.5,0,0,0,15.5,15Z /> <path class=ql-fill d=M9.65,5.241a1,1,0,0,0-1.409.108L6,7.964,3.759,5.349A1,1,0,0,0,2.192,6.59178Q2.21541,6.6213,2.241,6.649L4.684,9.5,2.241,12.35A1,1,0,0,0,3.71,13.70722q0.02557-.02768.049-0.05722L6,11.036,8.241,13.65a1,1,0,1,0,1.567-1.24277Q9.78459,12.3777,9.759,12.35L7.316,9.5,9.759,6.651A1,1,0,0,0,9.65,5.241Z /> </svg>'},function(e,t){e.exports='<svg viewbox="0 0 18 18"> <path class=ql-fill d=M15.5,7H13.861a4.015,4.015,0,0,0,1.914-2.975,1.8,1.8,0,0,0-1.6-1.751A1.922,1.922,0,0,0,12.021,3.7a0.5,0.5,0,1,0,.957.291,0.917,0.917,0,0,1,1.053-.725,0.81,0.81,0,0,1,.744.762c0,1.077-1.164,1.925-1.934,2.486A1.423,1.423,0,0,0,12,7.5a0.5,0.5,0,0,0,.5.5h3A0.5,0.5,0,0,0,15.5,7Z /> <path class=ql-fill d=M9.651,5.241a1,1,0,0,0-1.41.108L6,7.964,3.759,5.349a1,1,0,1,0-1.519,1.3L4.683,9.5,2.241,12.35a1,1,0,1,0,1.519,1.3L6,11.036,8.241,13.65a1,1,0,0,0,1.519-1.3L7.317,9.5,9.759,6.651A1,1,0,0,0,9.651,5.241Z /> </svg>'},function(e,t){e.exports='<svg viewbox="0 0 18 18"> <line class="ql-stroke ql-thin" x1=15.5 x2=2.5 y1=8.5 y2=9.5></line> <path class=ql-fill d=M9.007,8C6.542,7.791,6,7.519,6,6.5,6,5.792,7.283,5,9,5c1.571,0,2.765.679,2.969,1.309a1,1,0,0,0,1.9-.617C13.356,4.106,11.354,3,9,3,6.2,3,4,4.538,4,6.5a3.2,3.2,0,0,0,.5,1.843Z></path> <path class=ql-fill d=M8.984,10C11.457,10.208,12,10.479,12,11.5c0,0.708-1.283,1.5-3,1.5-1.571,0-2.765-.679-2.969-1.309a1,1,0,1,0-1.9.617C4.644,13.894,6.646,15,9,15c2.8,0,5-1.538,5-3.5a3.2,3.2,0,0,0-.5-1.843Z></path> </svg>'},function(e,t){e.exports='<svg viewbox="0 0 18 18"> <path class=ql-stroke d=M5,3V9a4.012,4.012,0,0,0,4,4H9a4.012,4.012,0,0,0,4-4V3></path> <rect class=ql-fill height=1 rx=0.5 ry=0.5 width=12 x=3 y=15></rect> </svg>'},function(e,t){e.exports='<svg viewbox="0 0 18 18"> <rect class=ql-stroke height=12 width=12 x=3 y=3></rect> <rect class=ql-fill height=12 width=1 x=5 y=3></rect> <rect class=ql-fill height=12 width=1 x=12 y=3></rect> <rect class=ql-fill height=2 width=8 x=5 y=8></rect> <rect class=ql-fill height=1 width=3 x=3 y=5></rect> <rect class=ql-fill height=1 width=3 x=3 y=7></rect> <rect class=ql-fill height=1 width=3 x=3 y=10></rect> <rect class=ql-fill height=1 width=3 x=3 y=12></rect> <rect class=ql-fill height=1 width=3 x=12 y=5></rect> <rect class=ql-fill height=1 width=3 x=12 y=7></rect> <rect class=ql-fill height=1 width=3 x=12 y=10></rect> <rect class=ql-fill height=1 width=3 x=12 y=12></rect> </svg>'},function(e,t){e.exports='<svg viewbox="0 0 18 18"> <polygon class=ql-stroke points="7 11 9 13 11 11 7 11"></polygon> <polygon class=ql-stroke points="7 7 9 5 11 7 7 7"></polygon> </svg>'},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=t.BubbleTooltip=void 0;var r=function e(t,n,r){null===t&&(t=Function.prototype);var i=Object.getOwnPropertyDescriptor(t,n);if(void 0===i){var o=Object.getPrototypeOf(t);return null===o?void 0:e(o,n,r)}if("value"in i)return i.value;var a=i.get;return void 0!==a?a.call(r):void 0},i=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),o=u(n(3)),a=u(n(8)),s=n(43),l=u(s),c=n(15),d=u(n(41));function u(e){return e&&e.__esModule?e:{default:e}}function p(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function h(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!==typeof t&&"function"!==typeof t?e:t}function m(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var f=[["bold","italic","link"],[{header:1},{header:2},"blockquote"]],g=function(e){function t(e,n){p(this,t),null!=n.modules.toolbar&&null==n.modules.toolbar.container&&(n.modules.toolbar.container=f);var r=h(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e,n));return r.quill.container.classList.add("ql-bubble"),r}return m(t,e),i(t,[{key:"extendToolbar",value:function(e){this.tooltip=new v(this.quill,this.options.bounds),this.tooltip.root.appendChild(e.container),this.buildButtons([].slice.call(e.container.querySelectorAll("button")),d.default),this.buildPickers([].slice.call(e.container.querySelectorAll("select")),d.default)}}]),t}(l.default);g.DEFAULTS=(0,o.default)(!0,{},l.default.DEFAULTS,{modules:{toolbar:{handlers:{link:function(e){e?this.quill.theme.tooltip.edit():this.quill.format("link",!1)}}}}});var v=function(e){function t(e,n){p(this,t);var r=h(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e,n));return r.quill.on(a.default.events.EDITOR_CHANGE,function(e,t,n,i){if(e===a.default.events.SELECTION_CHANGE)if(null!=t&&t.length>0&&i===a.default.sources.USER){r.show(),r.root.style.left="0px",r.root.style.width="",r.root.style.width=r.root.offsetWidth+"px";var o=r.quill.getLines(t.index,t.length);if(1===o.length)r.position(r.quill.getBounds(t));else{var s=o[o.length-1],l=r.quill.getIndex(s),d=Math.min(s.length()-1,t.index+t.length-l),u=r.quill.getBounds(new c.Range(l,d));r.position(u)}}else document.activeElement!==r.textbox&&r.quill.hasFocus()&&r.hide()}),r}return m(t,e),i(t,[{key:"listen",value:function(){var e=this;r(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"listen",this).call(this),this.root.querySelector(".ql-close").addEventListener("click",function(){e.root.classList.remove("ql-editing")}),this.quill.on(a.default.events.SCROLL_OPTIMIZE,function(){setTimeout(function(){if(!e.root.classList.contains("ql-hidden")){var t=e.quill.getSelection();null!=t&&e.position(e.quill.getBounds(t))}},1)})}},{key:"cancel",value:function(){this.show()}},{key:"position",value:function(e){var n=r(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"position",this).call(this,e),i=this.root.querySelector(".ql-tooltip-arrow");if(i.style.marginLeft="",0===n)return n;i.style.marginLeft=-1*n-i.offsetWidth/2+"px"}}]),t}(s.BaseTooltip);v.TEMPLATE=['<span class="ql-tooltip-arrow"></span>','<div class="ql-tooltip-editor">','<input type="text" data-formula="e=mc^2" data-link="https://quilljs.com" data-video="Embed URL">','<a class="ql-close"></a>',"</div>"].join(""),t.BubbleTooltip=v,t.default=g},function(e,t,n){e.exports=n(63)}]).default},e.exports=t()},74802:(e,t,n)=>{"use strict";var r=n(24994);t.A=void 0;var i=r(n(40039)),o=n(70579);t.A=(0,i.default)((0,o.jsx)("path",{d:"M19 6.41 17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z"}),"Close")},75494:function(e,t,n){"use strict";var r=this&&this.__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])},e(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 r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),i=this&&this.__assign||function(){return i=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},i.apply(this,arguments)};Object.defineProperty(t,"__esModule",{value:!0});var o=n(56603),a=n(65173),s=n(65043),l=n(20067),c=n(44288),d=(0,c.getAceInstance)(),u=function(e){function t(t){var n=e.call(this,t)||this;return c.editorEvents.forEach(function(e){n[e]=n[e].bind(n)}),n.debounce=c.debounce,n}return r(t,e),t.prototype.isInShadow=function(e){for(var t=e&&e.parentNode;t;){if("[object ShadowRoot]"===t.toString())return!0;t=t.parentNode}return!1},t.prototype.componentDidMount=function(){var e=this,t=this.props,n=t.className,r=t.onBeforeLoad,i=t.onValidate,o=t.mode,a=t.focus,s=t.theme,l=t.fontSize,u=t.value,p=t.defaultValue,h=t.showGutter,m=t.wrapEnabled,f=t.showPrintMargin,g=t.scrollMargin,v=void 0===g?[0,0,0,0]:g,x=t.keyboardHandler,y=t.onLoad,b=t.commands,j=t.annotations,_=t.markers,C=t.placeholder;this.editor=d.edit(this.refEditor),r&&r(d);for(var w=Object.keys(this.props.editorProps),S=0;S<w.length;S++)this.editor[w[S]]=this.props.editorProps[w[S]];this.props.debounceChangePeriod&&(this.onChange=this.debounce(this.onChange,this.props.debounceChangePeriod)),this.editor.renderer.setScrollMargin(v[0],v[1],v[2],v[3]),this.isInShadow(this.refEditor)&&this.editor.renderer.attachToShadowRoot(),this.editor.getSession().setMode("string"===typeof o?"ace/mode/".concat(o):o),s&&""!==s&&this.editor.setTheme("ace/theme/".concat(s)),this.editor.setFontSize("number"===typeof l?"".concat(l,"px"):l),this.editor.getSession().setValue(p||(u||"")),this.props.navigateToFileEnd&&this.editor.navigateFileEnd(),this.editor.renderer.setShowGutter(h),this.editor.getSession().setUseWrapMode(m),this.editor.setShowPrintMargin(f),this.editor.on("focus",this.onFocus),this.editor.on("blur",this.onBlur),this.editor.on("copy",this.onCopy),this.editor.on("paste",this.onPaste),this.editor.on("change",this.onChange),this.editor.on("input",this.onInput),C&&this.updatePlaceholder(),this.editor.getSession().selection.on("changeSelection",this.onSelectionChange),this.editor.getSession().selection.on("changeCursor",this.onCursorChange),i&&this.editor.getSession().on("changeAnnotation",function(){var t=e.editor.getSession().getAnnotations();e.props.onValidate(t)}),this.editor.session.on("changeScrollTop",this.onScroll),this.editor.getSession().setAnnotations(j||[]),_&&_.length>0&&this.handleMarkers(_);var A=this.editor.$options;c.editorOptions.forEach(function(t){A.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)}),x&&this.editor.setKeyboardHandler("ace/keyboard/"+x),n&&(this.refEditor.className+=" "+n),y&&y(this.editor),this.editor.resize(),a&&this.editor.focus()},t.prototype.componentDidUpdate=function(e){for(var t=e,n=this.props,r=0;r<c.editorOptions.length;r++){var i=c.editorOptions[r];n[i]!==t[i]&&this.editor.setOption(i,n[i])}if(n.className!==t.className){var o=this.refEditor.className.trim().split(" ");t.className.trim().split(" ").forEach(function(e){var t=o.indexOf(e);o.splice(t,1)}),this.refEditor.className=" "+n.className+" "+o.join(" ")}var a=this.editor&&null!=n.value&&this.editor.getValue()!==n.value;if(a){this.silent=!0;var s=this.editor.session.selection.toJSON();this.editor.setValue(n.value,n.cursorStart),this.editor.session.selection.fromJSON(s),this.silent=!1}n.placeholder!==t.placeholder&&this.updatePlaceholder(),n.mode!==t.mode&&this.editor.getSession().setMode("string"===typeof n.mode?"ace/mode/".concat(n.mode):n.mode),n.theme!==t.theme&&this.editor.setTheme("ace/theme/"+n.theme),n.keyboardHandler!==t.keyboardHandler&&(n.keyboardHandler?this.editor.setKeyboardHandler("ace/keyboard/"+n.keyboardHandler):this.editor.setKeyboardHandler(null)),n.fontSize!==t.fontSize&&this.editor.setFontSize("number"===typeof n.fontSize?"".concat(n.fontSize,"px"):n.fontSize),n.wrapEnabled!==t.wrapEnabled&&this.editor.getSession().setUseWrapMode(n.wrapEnabled),n.showPrintMargin!==t.showPrintMargin&&this.editor.setShowPrintMargin(n.showPrintMargin),n.showGutter!==t.showGutter&&this.editor.renderer.setShowGutter(n.showGutter),l(n.setOptions,t.setOptions)||this.handleOptions(n),!a&&l(n.annotations,t.annotations)||this.editor.getSession().setAnnotations(n.annotations||[]),!l(n.markers,t.markers)&&Array.isArray(n.markers)&&this.handleMarkers(n.markers),l(n.scrollMargin,t.scrollMargin)||this.handleScrollMargins(n.scrollMargin),e.height===this.props.height&&e.width===this.props.width||this.editor.resize(),this.props.focus&&!e.focus&&this.editor.focus()},t.prototype.handleScrollMargins=function(e){void 0===e&&(e=[0,0,0,0]),this.editor.renderer.setScrollMargin(e[0],e[1],e[2],e[3])},t.prototype.componentWillUnmount=function(){this.editor&&(this.editor.destroy(),this.editor=null)},t.prototype.onChange=function(e){if(this.props.onChange&&!this.silent){var t=this.editor.getValue();this.props.onChange(t,e)}},t.prototype.onSelectionChange=function(e){if(this.props.onSelectionChange){var t=this.editor.getSelection();this.props.onSelectionChange(t,e)}},t.prototype.onCursorChange=function(e){if(this.props.onCursorChange){var t=this.editor.getSelection();this.props.onCursorChange(t,e)}},t.prototype.onInput=function(e){this.props.onInput&&this.props.onInput(e),this.props.placeholder&&this.updatePlaceholder()},t.prototype.onFocus=function(e){this.props.onFocus&&this.props.onFocus(e,this.editor)},t.prototype.onBlur=function(e){this.props.onBlur&&this.props.onBlur(e,this.editor)},t.prototype.onCopy=function(e){var t=e.text;this.props.onCopy&&this.props.onCopy(t)},t.prototype.onPaste=function(e){var t=e.text;this.props.onPaste&&this.props.onPaste(t)},t.prototype.onScroll=function(){this.props.onScroll&&this.props.onScroll(this.editor)},t.prototype.handleOptions=function(e){for(var t=Object.keys(e.setOptions),n=0;n<t.length;n++)this.editor.setOption(t[n],e.setOptions[t[n]])},t.prototype.handleMarkers=function(e){var t=this,n=this.editor.getSession().getMarkers(!0);for(var r in n)n.hasOwnProperty(r)&&this.editor.getSession().removeMarker(n[r].id);for(var r in n=this.editor.getSession().getMarkers(!1))n.hasOwnProperty(r)&&"ace_active-line"!==n[r].clazz&&"ace_selected-word"!==n[r].clazz&&this.editor.getSession().removeMarker(n[r].id);e.forEach(function(e){var n=e.startRow,r=e.startCol,i=e.endRow,a=e.endCol,s=e.className,l=e.type,c=e.inFront,d=void 0!==c&&c,u=new o.Range(n,r,i,a);t.editor.getSession().addMarker(u,s,l,d)})},t.prototype.updatePlaceholder=function(){var e=this.editor,t=this.props.placeholder,n=!e.session.getValue().length,r=e.renderer.placeholderNode;!n&&r?(e.renderer.scroller.removeChild(e.renderer.placeholderNode),e.renderer.placeholderNode=null):n&&!r?((r=e.renderer.placeholderNode=document.createElement("div")).textContent=t||"",r.className="ace_comment ace_placeholder",r.style.padding="0 9px",r.style.position="absolute",r.style.zIndex="3",e.renderer.scroller.appendChild(r)):n&&r&&(r.textContent=t)},t.prototype.updateRef=function(e){this.refEditor=e},t.prototype.render=function(){var e=this.props,t=e.name,n=e.width,r=e.height,o=e.style,a=i({width:n,height:r},o);return s.createElement("div",{ref:this.updateRef,id:t,style:a})},t.propTypes={mode:a.oneOfType([a.string,a.object]),focus:a.bool,theme:a.string,name:a.string,className:a.string,height:a.string,width:a.string,fontSize:a.oneOfType([a.number,a.string]),showGutter:a.bool,onChange:a.func,onCopy:a.func,onPaste:a.func,onFocus:a.func,onInput:a.func,onBlur:a.func,onScroll:a.func,value:a.string,defaultValue:a.string,onLoad:a.func,onSelectionChange:a.func,onCursorChange:a.func,onBeforeLoad:a.func,onValidate:a.func,minLines:a.number,maxLines:a.number,readOnly:a.bool,highlightActiveLine:a.bool,tabSize:a.number,showPrintMargin:a.bool,cursorStart:a.number,debounceChangePeriod:a.number,editorProps:a.object,setOptions:a.object,style:a.object,scrollMargin:a.array,annotations:a.array,markers:a.array,keyboardHandler:a.string,wrapEnabled:a.bool,enableSnippets:a.bool,enableBasicAutocompletion:a.oneOfType([a.bool,a.array]),enableLiveAutocompletion:a.oneOfType([a.bool,a.array]),navigateToFileEnd:a.bool,commands:a.array,placeholder:a.string},t.defaultProps={name:"ace-editor",focus:!1,mode:"",theme:"",height:"500px",width:"500px",fontSize:12,enableSnippets:!1,showGutter:!0,onChange:null,onPaste:null,onLoad:null,onScroll:null,minLines:null,maxLines:null,readOnly:!1,highlightActiveLine:!0,showPrintMargin:!0,tabSize:4,cursorStart:1,editorProps:{},style:{},scrollMargin:[0,0,0,0],setOptions:{},wrapEnabled:!1,enableBasicAutocompletion:!1,enableLiveAutocompletion:!1,placeholder:null,navigateToFileEnd:!0},t}(s.Component);t.default=u},75713:e=>{e.exports=function(){}},75816:e=>{e.exports=function(e,t,n,r){for(var i=e.length,o=n+(r?1:-1);r?o--:++o<i;)if(t(e[o],o,e))return o;return-1}},75824:(e,t,n)=>{"use strict";var r=n(24994);t.A=void 0;var i=r(n(40039)),o=n(70579);t.A=(0,i.default)((0,o.jsx)("path",{d:"M3 17.25V21h3.75L17.81 9.94l-3.75-3.75zM20.71 7.04c.39-.39.39-1.02 0-1.41l-2.34-2.34a.9959.9959 0 0 0-1.41 0l-1.83 1.83 3.75 3.75z"}),"Create")},75866:(e,t,n)=>{var r=n(88468);e.exports=function(e,t){return!!(null==e?0:e.length)&&r(e,t,0)>-1}},76164:(e,t,n)=>{"use strict";var r=n(24994);t.A=void 0;var i=r(n(40039)),o=n(70579);t.A=(0,i.default)((0,o.jsx)("path",{d:"M19 13H5v-2h14z"}),"Remove")},76272:(e,t,n)=>{var r=n(6571),i=n(22761);e.exports=function(e){return i(e)&&r(e)}},76372:(e,t,n)=>{var r=n(88468);e.exports=function(e,t){for(var n=e.length;n--&&r(t,e[n],0)>-1;);return n}},76378:(e,t,n)=>{"use strict";var r=n(24994);t.A=void 0;var i=r(n(40039)),o=n(70579);t.A=(0,i.default)((0,o.jsx)("path",{d:"M12 2 4 5v6.09c0 5.05 3.41 9.76 8 10.91 4.59-1.15 8-5.86 8-10.91V5zm-1.06 13.54L7.4 12l1.41-1.41 2.12 2.12 4.24-4.24 1.41 1.41z"}),"GppGood")},76516:(e,t,n)=>{var r=n(6571);e.exports=function(e,t){return function(n,i){if(null==n)return n;if(!r(n))return e(n,i);for(var o=n.length,a=t?o:-1,s=Object(n);(t?a--:++a<o)&&!1!==i(s[a],a,s););return n}}},76745:(e,t,n)=>{var r=n(79742),i=n(50061),o=n(33279);e.exports=function(e){return e&&e.length?r(e,o,i):void 0}},76788:(e,t,n)=>{var r=n(97160),i=n(85204),o=n(64816);e.exports=function(e,t){var n=this.__data__;if(n instanceof r){var a=n.__data__;if(!i||a.length<199)return a.push([e,t]),this.size=++n.size,this;n=this.__data__=new o(a)}return n.set(e,t),this.size=n.size,this}},77067:(e,t,n)=>{"use strict";e.exports=n(34612)},77116:(e,t,n)=>{var r=n(9812),i=n(22777),o=n(54052),a=r?r.isConcatSpreadable:void 0;e.exports=function(e){return o(e)||i(e)||!!(a&&e&&e[a])}},78420:(e,t,n)=>{var r=n(71775),i=n(93211),o=Object.prototype.hasOwnProperty;e.exports=function(e,t,n){var a=e[t];o.call(e,t)&&i(a,n)&&(void 0!==n||t in e)||r(e,t,n)}},79160:(e,t,n)=>{var r=n(16913),i=n(22761);e.exports=function(e){return"number"==typeof e||i(e)&&"[object Number]"==r(e)}},79167:(e,t,n)=>{"use strict";var r=n(24994);t.A=void 0;var i=r(n(40039)),o=n(70579);t.A=(0,i.default)((0,o.jsx)("path",{d:"M16.5 6v11.5c0 2.21-1.79 4-4 4s-4-1.79-4-4V5c0-1.38 1.12-2.5 2.5-2.5s2.5 1.12 2.5 2.5v10.5c0 .55-.45 1-1 1s-1-.45-1-1V6H10v9.5c0 1.38 1.12 2.5 2.5 2.5s2.5-1.12 2.5-2.5V5c0-2.21-1.79-4-4-4S7 2.79 7 5v12.5c0 3.04 2.46 5.5 5.5 5.5s5.5-2.46 5.5-5.5V6z"}),"AttachFile")},79386:(e,t,n)=>{"use strict";n.d(t,{A:()=>i});const r=e=>e,i=(()=>{let e=r;return{configure(t){e=t},generate:t=>e(t),reset(){e=r}}})()},79686:e=>{e.exports=function(e){return null==e}},79717:(e,t,n)=>{"use strict";var r=n(65043),i=n(29461);var o="function"===typeof Object.is?Object.is:function(e,t){return e===t&&(0!==e||1/e===1/t)||e!==e&&t!==t},a=i.useSyncExternalStore,s=r.useRef,l=r.useEffect,c=r.useMemo,d=r.useDebugValue;t.useSyncExternalStoreWithSelector=function(e,t,n,r,i){var u=s(null);if(null===u.current){var p={hasValue:!1,value:null};u.current=p}else p=u.current;u=c(function(){function e(e){if(!l){if(l=!0,a=e,e=r(e),void 0!==i&&p.hasValue){var t=p.value;if(i(t,e))return s=t}return s=e}if(t=s,o(a,e))return t;var n=r(e);return void 0!==i&&i(t,n)?(a=e,t):(a=e,s=n)}var a,s,l=!1,c=void 0===n?null:n;return[function(){return e(t())},null===c?void 0:function(){return e(c())}]},[t,n,r,i]);var h=a(e,u[0],u[1]);return l(function(){p.hasValue=!0,p.value=h},[h]),d(h),h}},79742:(e,t,n)=>{var r=n(19841);e.exports=function(e,t,n){for(var i=-1,o=e.length;++i<o;){var a=e[i],s=t(a);if(null!=s&&(void 0===l?s===s&&!r(s):n(s,l)))var l=s,c=a}return c}},79889:(e,t,n)=>{var r=n(93950),i=n(46686);e.exports=function(e,t,n){var o=!0,a=!0;if("function"!=typeof e)throw new TypeError("Expected a function");return i(n)&&(o="leading"in n?!!n.leading:o,a="trailing"in n?!!n.trailing:a),r(e,t,{leading:o,maxWait:t,trailing:a})}},80219:(e,t,n)=>{"use strict";var r=n(2086),i={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},o={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},a={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},s={};function l(e){return r.isMemo(e)?a:s[e.$$typeof]||i}s[r.ForwardRef]={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},s[r.Memo]=a;var c=Object.defineProperty,d=Object.getOwnPropertyNames,u=Object.getOwnPropertySymbols,p=Object.getOwnPropertyDescriptor,h=Object.getPrototypeOf,m=Object.prototype;e.exports=function e(t,n,r){if("string"!==typeof n){if(m){var i=h(n);i&&i!==m&&e(t,i,r)}var a=d(n);u&&(a=a.concat(u(n)));for(var s=l(t),f=l(n),g=0;g<a.length;++g){var v=a[g];if(!o[v]&&(!r||!r[v])&&(!f||!f[v])&&(!s||!s[v])){var x=p(n,v);try{c(t,v,x)}catch(y){}}}}return t}},80438:(e,t,n)=>{var r=n(12622);e.exports=function(e){return r(this,e).get(e)}},80726:e=>{e.exports=function(e,t){for(var n=-1,r=null==e?0:e.length;++n<r&&!1!==t(e[n],n,e););return e}},80755:(e,t,n)=>{var r=n(48895),i=n(77116);e.exports=function e(t,n,o,a,s){var l=-1,c=t.length;for(o||(o=i),s||(s=[]);++l<c;){var d=t[l];n>0&&o(d)?n>1?e(d,n-1,o,a,s):r(s,d):a||(s[s.length]=d)}return s}},80950:(e,t,n)=>{"use strict";n.d(t,{A:()=>r});const r=n(83468).A},81722:(e,t,n)=>{"use strict";n.d(t,{Rk:()=>r,SF:()=>i,sk:()=>o});function r(e,t,n){var r="";return n.split(" ").forEach(function(n){void 0!==e[n]?t.push(e[n]+";"):n&&(r+=n+" ")}),r}var i=function(e,t,n){var r=e.key+"-"+t.name;!1===n&&void 0===e.registered[r]&&(e.registered[r]=t.styles)},o=function(e,t,n){i(e,t,n);var r=e.key+"-"+t.name;if(void 0===e.inserted[t.name]){var o=t;do{e.insert(t===o?"."+r:"",o,e.sheet,!0),o=o.next}while(void 0!==o)}}},82284:(e,t,n)=>{"use strict";function r(e){return r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},r(e)}n.d(t,{A:()=>r})},82702:(e,t,n)=>{"use strict";var r=n(86267);function i(e,t,n,r,i){Error.call(this),this.message=e,this.name="AxiosError",t&&(this.code=t),n&&(this.config=n),r&&(this.request=r),i&&(this.response=i)}r.inherits(i,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:this.config,code:this.code,status:this.response&&this.response.status?this.response.status:null}}});var o=i.prototype,a={};["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"].forEach(function(e){a[e]={value:e}}),Object.defineProperties(i,a),Object.defineProperty(o,"isAxiosError",{value:!0}),i.from=function(e,t,n,a,s,l){var c=Object.create(o);return r.toFlatObject(e,c,function(e){return e!==Error.prototype}),i.call(c,e.message,t,n,a,s),c.name=e.name,l&&Object.assign(c,l),c},e.exports=i},82730:(e,t,n)=>{"use strict";var r=n(65043),i=n(77067);function o(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,n=1;n<arguments.length;n++)t+="&args[]="+encodeURIComponent(arguments[n]);return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var a=new Set,s={};function l(e,t){c(e,t),c(e+"Capture",t)}function c(e,t){for(s[e]=t,e=0;e<t.length;e++)a.add(t[e])}var d=!("undefined"===typeof window||"undefined"===typeof window.document||"undefined"===typeof window.document.createElement),u=Object.prototype.hasOwnProperty,p=/^[:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD][:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\-.0-9\u00B7\u0300-\u036F\u203F-\u2040]*$/,h={},m={};function f(e,t,n,r,i,o,a){this.acceptsBooleans=2===t||3===t||4===t,this.attributeName=r,this.attributeNamespace=i,this.mustUseProperty=n,this.propertyName=e,this.type=t,this.sanitizeURL=o,this.removeEmptyString=a}var g={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){g[e]=new f(e,0,!1,e,null,!1,!1)}),[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];g[t]=new f(t,1,!1,e[1],null,!1,!1)}),["contentEditable","draggable","spellCheck","value"].forEach(function(e){g[e]=new f(e,2,!1,e.toLowerCase(),null,!1,!1)}),["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){g[e]=new f(e,2,!1,e,null,!1,!1)}),"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(e){g[e]=new f(e,3,!1,e.toLowerCase(),null,!1,!1)}),["checked","multiple","muted","selected"].forEach(function(e){g[e]=new f(e,3,!0,e,null,!1,!1)}),["capture","download"].forEach(function(e){g[e]=new f(e,4,!1,e,null,!1,!1)}),["cols","rows","size","span"].forEach(function(e){g[e]=new f(e,6,!1,e,null,!1,!1)}),["rowSpan","start"].forEach(function(e){g[e]=new f(e,5,!1,e.toLowerCase(),null,!1,!1)});var v=/[\-:]([a-z])/g;function x(e){return e[1].toUpperCase()}function y(e,t,n,r){var i=g.hasOwnProperty(t)?g[t]:null;(null!==i?0!==i.type:r||!(2<t.length)||"o"!==t[0]&&"O"!==t[0]||"n"!==t[1]&&"N"!==t[1])&&(function(e,t,n,r){if(null===t||"undefined"===typeof t||function(e,t,n,r){if(null!==n&&0===n.type)return!1;switch(typeof t){case"function":case"symbol":return!0;case"boolean":return!r&&(null!==n?!n.acceptsBooleans:"data-"!==(e=e.toLowerCase().slice(0,5))&&"aria-"!==e);default:return!1}}(e,t,n,r))return!0;if(r)return!1;if(null!==n)switch(n.type){case 3:return!t;case 4:return!1===t;case 5:return isNaN(t);case 6:return isNaN(t)||1>t}return!1}(t,n,i,r)&&(n=null),r||null===i?function(e){return!!u.call(m,e)||!u.call(h,e)&&(p.test(e)?m[e]=!0:(h[e]=!0,!1))}(t)&&(null===n?e.removeAttribute(t):e.setAttribute(t,""+n)):i.mustUseProperty?e[i.propertyName]=null===n?3!==i.type&&"":n:(t=i.attributeName,r=i.attributeNamespace,null===n?e.removeAttribute(t):(n=3===(i=i.type)||4===i&&!0===n?"":""+n,r?e.setAttributeNS(r,t,n):e.setAttribute(t,n))))}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(e){var t=e.replace(v,x);g[t]=new f(t,1,!1,e,null,!1,!1)}),"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(e){var t=e.replace(v,x);g[t]=new f(t,1,!1,e,"http://www.w3.org/1999/xlink",!1,!1)}),["xml:base","xml:lang","xml:space"].forEach(function(e){var t=e.replace(v,x);g[t]=new f(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)}),["tabIndex","crossOrigin"].forEach(function(e){g[e]=new f(e,1,!1,e.toLowerCase(),null,!1,!1)}),g.xlinkHref=new f("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1),["src","href","action","formAction"].forEach(function(e){g[e]=new f(e,1,!1,e.toLowerCase(),null,!0,!0)});var b=r.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,j=Symbol.for("react.element"),_=Symbol.for("react.portal"),C=Symbol.for("react.fragment"),w=Symbol.for("react.strict_mode"),S=Symbol.for("react.profiler"),A=Symbol.for("react.provider"),k=Symbol.for("react.context"),T=Symbol.for("react.forward_ref"),E=Symbol.for("react.suspense"),M=Symbol.for("react.suspense_list"),O=Symbol.for("react.memo"),R=Symbol.for("react.lazy");Symbol.for("react.scope"),Symbol.for("react.debug_trace_mode");var P=Symbol.for("react.offscreen");Symbol.for("react.legacy_hidden"),Symbol.for("react.cache"),Symbol.for("react.tracing_marker");var D=Symbol.iterator;function N(e){return null===e||"object"!==typeof e?null:"function"===typeof(e=D&&e[D]||e["@@iterator"])?e:null}var L,I=Object.assign;function F(e){if(void 0===L)try{throw Error()}catch(n){var t=n.stack.trim().match(/\n( *(at )?)/);L=t&&t[1]||""}return"\n"+L+e}var $=!1;function B(e,t){if(!e||$)return"";$=!0;var n=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{if(t)if(t=function(){throw Error()},Object.defineProperty(t.prototype,"props",{set:function(){throw Error()}}),"object"===typeof Reflect&&Reflect.construct){try{Reflect.construct(t,[])}catch(c){var r=c}Reflect.construct(e,[],t)}else{try{t.call()}catch(c){r=c}e.call(t.prototype)}else{try{throw Error()}catch(c){r=c}e()}}catch(c){if(c&&r&&"string"===typeof c.stack){for(var i=c.stack.split("\n"),o=r.stack.split("\n"),a=i.length-1,s=o.length-1;1<=a&&0<=s&&i[a]!==o[s];)s--;for(;1<=a&&0<=s;a--,s--)if(i[a]!==o[s]){if(1!==a||1!==s)do{if(a--,0>--s||i[a]!==o[s]){var l="\n"+i[a].replace(" at new "," at ");return e.displayName&&l.includes("<anonymous>")&&(l=l.replace("<anonymous>",e.displayName)),l}}while(1<=a&&0<=s);break}}}finally{$=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?F(e):""}function z(e){switch(e.tag){case 5:return F(e.type);case 16:return F("Lazy");case 13:return F("Suspense");case 19:return F("SuspenseList");case 0:case 2:case 15:return e=B(e.type,!1);case 11:return e=B(e.type.render,!1);case 1:return e=B(e.type,!0);default:return""}}function H(e){if(null==e)return null;if("function"===typeof e)return e.displayName||e.name||null;if("string"===typeof e)return e;switch(e){case C:return"Fragment";case _:return"Portal";case S:return"Profiler";case w:return"StrictMode";case E:return"Suspense";case M:return"SuspenseList"}if("object"===typeof e)switch(e.$$typeof){case k:return(e.displayName||"Context")+".Consumer";case A:return(e._context.displayName||"Context")+".Provider";case T:var t=e.render;return(e=e.displayName)||(e=""!==(e=t.displayName||t.name||"")?"ForwardRef("+e+")":"ForwardRef"),e;case O:return null!==(t=e.displayName||null)?t:H(e.type)||"Memo";case R:t=e._payload,e=e._init;try{return H(e(t))}catch(n){}}return null}function W(e){var t=e.type;switch(e.tag){case 24:return"Cache";case 9:return(t.displayName||"Context")+".Consumer";case 10:return(t._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return e=(e=t.render).displayName||e.name||"",t.displayName||(""!==e?"ForwardRef("+e+")":"ForwardRef");case 7:return"Fragment";case 5:return t;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return H(t);case 8:return t===w?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if("function"===typeof t)return t.displayName||t.name||null;if("string"===typeof t)return t}return null}function U(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":case"object":return e;default:return""}}function V(e){var t=e.type;return(e=e.nodeName)&&"input"===e.toLowerCase()&&("checkbox"===t||"radio"===t)}function G(e){e._valueTracker||(e._valueTracker=function(e){var t=V(e)?"checked":"value",n=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),r=""+e[t];if(!e.hasOwnProperty(t)&&"undefined"!==typeof n&&"function"===typeof n.get&&"function"===typeof n.set){var i=n.get,o=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return i.call(this)},set:function(e){r=""+e,o.call(this,e)}}),Object.defineProperty(e,t,{enumerable:n.enumerable}),{getValue:function(){return r},setValue:function(e){r=""+e},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}(e))}function q(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=V(e)?e.checked?"true":"false":e.value),(e=r)!==n&&(t.setValue(e),!0)}function Y(e){if("undefined"===typeof(e=e||("undefined"!==typeof document?document:void 0)))return null;try{return e.activeElement||e.body}catch(t){return e.body}}function Z(e,t){var n=t.checked;return I({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:null!=n?n:e._wrapperState.initialChecked})}function K(e,t){var n=null==t.defaultValue?"":t.defaultValue,r=null!=t.checked?t.checked:t.defaultChecked;n=U(null!=t.value?t.value:n),e._wrapperState={initialChecked:r,initialValue:n,controlled:"checkbox"===t.type||"radio"===t.type?null!=t.checked:null!=t.value}}function X(e,t){null!=(t=t.checked)&&y(e,"checked",t,!1)}function Q(e,t){X(e,t);var n=U(t.value),r=t.type;if(null!=n)"number"===r?(0===n&&""===e.value||e.value!=n)&&(e.value=""+n):e.value!==""+n&&(e.value=""+n);else if("submit"===r||"reset"===r)return void e.removeAttribute("value");t.hasOwnProperty("value")?ee(e,t.type,n):t.hasOwnProperty("defaultValue")&&ee(e,t.type,U(t.defaultValue)),null==t.checked&&null!=t.defaultChecked&&(e.defaultChecked=!!t.defaultChecked)}function J(e,t,n){if(t.hasOwnProperty("value")||t.hasOwnProperty("defaultValue")){var r=t.type;if(!("submit"!==r&&"reset"!==r||void 0!==t.value&&null!==t.value))return;t=""+e._wrapperState.initialValue,n||t===e.value||(e.value=t),e.defaultValue=t}""!==(n=e.name)&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,""!==n&&(e.name=n)}function ee(e,t,n){"number"===t&&Y(e.ownerDocument)===e||(null==n?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}var te=Array.isArray;function ne(e,t,n,r){if(e=e.options,t){t={};for(var i=0;i<n.length;i++)t["$"+n[i]]=!0;for(n=0;n<e.length;n++)i=t.hasOwnProperty("$"+e[n].value),e[n].selected!==i&&(e[n].selected=i),i&&r&&(e[n].defaultSelected=!0)}else{for(n=""+U(n),t=null,i=0;i<e.length;i++){if(e[i].value===n)return e[i].selected=!0,void(r&&(e[i].defaultSelected=!0));null!==t||e[i].disabled||(t=e[i])}null!==t&&(t.selected=!0)}}function re(e,t){if(null!=t.dangerouslySetInnerHTML)throw Error(o(91));return I({},t,{value:void 0,defaultValue:void 0,children:""+e._wrapperState.initialValue})}function ie(e,t){var n=t.value;if(null==n){if(n=t.children,t=t.defaultValue,null!=n){if(null!=t)throw Error(o(92));if(te(n)){if(1<n.length)throw Error(o(93));n=n[0]}t=n}null==t&&(t=""),n=t}e._wrapperState={initialValue:U(n)}}function oe(e,t){var n=U(t.value),r=U(t.defaultValue);null!=n&&((n=""+n)!==e.value&&(e.value=n),null==t.defaultValue&&e.defaultValue!==n&&(e.defaultValue=n)),null!=r&&(e.defaultValue=""+r)}function ae(e){var t=e.textContent;t===e._wrapperState.initialValue&&""!==t&&null!==t&&(e.value=t)}function se(e){switch(e){case"svg":return"http://www.w3.org/2000/svg";case"math":return"http://www.w3.org/1998/Math/MathML";default:return"http://www.w3.org/1999/xhtml"}}function le(e,t){return null==e||"http://www.w3.org/1999/xhtml"===e?se(t):"http://www.w3.org/2000/svg"===e&&"foreignObject"===t?"http://www.w3.org/1999/xhtml":e}var ce,de,ue=(de=function(e,t){if("http://www.w3.org/2000/svg"!==e.namespaceURI||"innerHTML"in e)e.innerHTML=t;else{for((ce=ce||document.createElement("div")).innerHTML="<svg>"+t.valueOf().toString()+"</svg>",t=ce.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}},"undefined"!==typeof MSApp&&MSApp.execUnsafeLocalFunction?function(e,t,n,r){MSApp.execUnsafeLocalFunction(function(){return de(e,t)})}:de);function pe(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&3===n.nodeType)return void(n.nodeValue=t)}e.textContent=t}var he={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},me=["Webkit","ms","Moz","O"];function fe(e,t,n){return null==t||"boolean"===typeof t||""===t?"":n||"number"!==typeof t||0===t||he.hasOwnProperty(e)&&he[e]?(""+t).trim():t+"px"}function ge(e,t){for(var n in e=e.style,t)if(t.hasOwnProperty(n)){var r=0===n.indexOf("--"),i=fe(n,t[n],r);"float"===n&&(n="cssFloat"),r?e.setProperty(n,i):e[n]=i}}Object.keys(he).forEach(function(e){me.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),he[t]=he[e]})});var ve=I({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function xe(e,t){if(t){if(ve[e]&&(null!=t.children||null!=t.dangerouslySetInnerHTML))throw Error(o(137,e));if(null!=t.dangerouslySetInnerHTML){if(null!=t.children)throw Error(o(60));if("object"!==typeof t.dangerouslySetInnerHTML||!("__html"in t.dangerouslySetInnerHTML))throw Error(o(61))}if(null!=t.style&&"object"!==typeof t.style)throw Error(o(62))}}function ye(e,t){if(-1===e.indexOf("-"))return"string"===typeof t.is;switch(e){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var be=null;function je(e){return(e=e.target||e.srcElement||window).correspondingUseElement&&(e=e.correspondingUseElement),3===e.nodeType?e.parentNode:e}var _e=null,Ce=null,we=null;function Se(e){if(e=yi(e)){if("function"!==typeof _e)throw Error(o(280));var t=e.stateNode;t&&(t=ji(t),_e(e.stateNode,e.type,t))}}function Ae(e){Ce?we?we.push(e):we=[e]:Ce=e}function ke(){if(Ce){var e=Ce,t=we;if(we=Ce=null,Se(e),t)for(e=0;e<t.length;e++)Se(t[e])}}function Te(e,t){return e(t)}function Ee(){}var Me=!1;function Oe(e,t,n){if(Me)return e(t,n);Me=!0;try{return Te(e,t,n)}finally{Me=!1,(null!==Ce||null!==we)&&(Ee(),ke())}}function Re(e,t){var n=e.stateNode;if(null===n)return null;var r=ji(n);if(null===r)return null;n=r[t];e:switch(t){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(r=!r.disabled)||(r=!("button"===(e=e.type)||"input"===e||"select"===e||"textarea"===e)),e=!r;break e;default:e=!1}if(e)return null;if(n&&"function"!==typeof n)throw Error(o(231,t,typeof n));return n}var Pe=!1;if(d)try{var De={};Object.defineProperty(De,"passive",{get:function(){Pe=!0}}),window.addEventListener("test",De,De),window.removeEventListener("test",De,De)}catch(de){Pe=!1}function Ne(e,t,n,r,i,o,a,s,l){var c=Array.prototype.slice.call(arguments,3);try{t.apply(n,c)}catch(d){this.onError(d)}}var Le=!1,Ie=null,Fe=!1,$e=null,Be={onError:function(e){Le=!0,Ie=e}};function ze(e,t,n,r,i,o,a,s,l){Le=!1,Ie=null,Ne.apply(Be,arguments)}function He(e){var t=e,n=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do{0!==(4098&(t=e).flags)&&(n=t.return),e=t.return}while(e)}return 3===t.tag?n:null}function We(e){if(13===e.tag){var t=e.memoizedState;if(null===t&&(null!==(e=e.alternate)&&(t=e.memoizedState)),null!==t)return t.dehydrated}return null}function Ue(e){if(He(e)!==e)throw Error(o(188))}function Ve(e){return null!==(e=function(e){var t=e.alternate;if(!t){if(null===(t=He(e)))throw Error(o(188));return t!==e?null:e}for(var n=e,r=t;;){var i=n.return;if(null===i)break;var a=i.alternate;if(null===a){if(null!==(r=i.return)){n=r;continue}break}if(i.child===a.child){for(a=i.child;a;){if(a===n)return Ue(i),e;if(a===r)return Ue(i),t;a=a.sibling}throw Error(o(188))}if(n.return!==r.return)n=i,r=a;else{for(var s=!1,l=i.child;l;){if(l===n){s=!0,n=i,r=a;break}if(l===r){s=!0,r=i,n=a;break}l=l.sibling}if(!s){for(l=a.child;l;){if(l===n){s=!0,n=a,r=i;break}if(l===r){s=!0,r=a,n=i;break}l=l.sibling}if(!s)throw Error(o(189))}}if(n.alternate!==r)throw Error(o(190))}if(3!==n.tag)throw Error(o(188));return n.stateNode.current===n?e:t}(e))?Ge(e):null}function Ge(e){if(5===e.tag||6===e.tag)return e;for(e=e.child;null!==e;){var t=Ge(e);if(null!==t)return t;e=e.sibling}return null}var qe=i.unstable_scheduleCallback,Ye=i.unstable_cancelCallback,Ze=i.unstable_shouldYield,Ke=i.unstable_requestPaint,Xe=i.unstable_now,Qe=i.unstable_getCurrentPriorityLevel,Je=i.unstable_ImmediatePriority,et=i.unstable_UserBlockingPriority,tt=i.unstable_NormalPriority,nt=i.unstable_LowPriority,rt=i.unstable_IdlePriority,it=null,ot=null;var at=Math.clz32?Math.clz32:function(e){return e>>>=0,0===e?32:31-(st(e)/lt|0)|0},st=Math.log,lt=Math.LN2;var ct=64,dt=4194304;function ut(e){switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return 4194240&e;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return 130023424&e;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return e}}function pt(e,t){var n=e.pendingLanes;if(0===n)return 0;var r=0,i=e.suspendedLanes,o=e.pingedLanes,a=268435455&n;if(0!==a){var s=a&~i;0!==s?r=ut(s):0!==(o&=a)&&(r=ut(o))}else 0!==(a=n&~i)?r=ut(a):0!==o&&(r=ut(o));if(0===r)return 0;if(0!==t&&t!==r&&0===(t&i)&&((i=r&-r)>=(o=t&-t)||16===i&&0!==(4194240&o)))return t;if(0!==(4&r)&&(r|=16&n),0!==(t=e.entangledLanes))for(e=e.entanglements,t&=r;0<t;)i=1<<(n=31-at(t)),r|=e[n],t&=~i;return r}function ht(e,t){switch(e){case 1:case 2:case 4:return t+250;case 8:case 16:case 32:case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return t+5e3;default:return-1}}function mt(e){return 0!==(e=-1073741825&e.pendingLanes)?e:1073741824&e?1073741824:0}function ft(){var e=ct;return 0===(4194240&(ct<<=1))&&(ct=64),e}function gt(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function vt(e,t,n){e.pendingLanes|=t,536870912!==t&&(e.suspendedLanes=0,e.pingedLanes=0),(e=e.eventTimes)[t=31-at(t)]=n}function xt(e,t){var n=e.entangledLanes|=t;for(e=e.entanglements;n;){var r=31-at(n),i=1<<r;i&t|e[r]&t&&(e[r]|=t),n&=~i}}var yt=0;function bt(e){return 1<(e&=-e)?4<e?0!==(268435455&e)?16:536870912:4:1}var jt,_t,Ct,wt,St,At=!1,kt=[],Tt=null,Et=null,Mt=null,Ot=new Map,Rt=new Map,Pt=[],Dt="mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset submit".split(" ");function Nt(e,t){switch(e){case"focusin":case"focusout":Tt=null;break;case"dragenter":case"dragleave":Et=null;break;case"mouseover":case"mouseout":Mt=null;break;case"pointerover":case"pointerout":Ot.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":Rt.delete(t.pointerId)}}function Lt(e,t,n,r,i,o){return null===e||e.nativeEvent!==o?(e={blockedOn:t,domEventName:n,eventSystemFlags:r,nativeEvent:o,targetContainers:[i]},null!==t&&(null!==(t=yi(t))&&_t(t)),e):(e.eventSystemFlags|=r,t=e.targetContainers,null!==i&&-1===t.indexOf(i)&&t.push(i),e)}function It(e){var t=xi(e.target);if(null!==t){var n=He(t);if(null!==n)if(13===(t=n.tag)){if(null!==(t=We(n)))return e.blockedOn=t,void St(e.priority,function(){Ct(n)})}else if(3===t&&n.stateNode.current.memoizedState.isDehydrated)return void(e.blockedOn=3===n.tag?n.stateNode.containerInfo:null)}e.blockedOn=null}function Ft(e){if(null!==e.blockedOn)return!1;for(var t=e.targetContainers;0<t.length;){var n=Zt(e.domEventName,e.eventSystemFlags,t[0],e.nativeEvent);if(null!==n)return null!==(t=yi(n))&&_t(t),e.blockedOn=n,!1;var r=new(n=e.nativeEvent).constructor(n.type,n);be=r,n.target.dispatchEvent(r),be=null,t.shift()}return!0}function $t(e,t,n){Ft(e)&&n.delete(t)}function Bt(){At=!1,null!==Tt&&Ft(Tt)&&(Tt=null),null!==Et&&Ft(Et)&&(Et=null),null!==Mt&&Ft(Mt)&&(Mt=null),Ot.forEach($t),Rt.forEach($t)}function zt(e,t){e.blockedOn===t&&(e.blockedOn=null,At||(At=!0,i.unstable_scheduleCallback(i.unstable_NormalPriority,Bt)))}function Ht(e){function t(t){return zt(t,e)}if(0<kt.length){zt(kt[0],e);for(var n=1;n<kt.length;n++){var r=kt[n];r.blockedOn===e&&(r.blockedOn=null)}}for(null!==Tt&&zt(Tt,e),null!==Et&&zt(Et,e),null!==Mt&&zt(Mt,e),Ot.forEach(t),Rt.forEach(t),n=0;n<Pt.length;n++)(r=Pt[n]).blockedOn===e&&(r.blockedOn=null);for(;0<Pt.length&&null===(n=Pt[0]).blockedOn;)It(n),null===n.blockedOn&&Pt.shift()}var Wt=b.ReactCurrentBatchConfig,Ut=!0;function Vt(e,t,n,r){var i=yt,o=Wt.transition;Wt.transition=null;try{yt=1,qt(e,t,n,r)}finally{yt=i,Wt.transition=o}}function Gt(e,t,n,r){var i=yt,o=Wt.transition;Wt.transition=null;try{yt=4,qt(e,t,n,r)}finally{yt=i,Wt.transition=o}}function qt(e,t,n,r){if(Ut){var i=Zt(e,t,n,r);if(null===i)Ur(e,t,r,Yt,n),Nt(e,r);else if(function(e,t,n,r,i){switch(t){case"focusin":return Tt=Lt(Tt,e,t,n,r,i),!0;case"dragenter":return Et=Lt(Et,e,t,n,r,i),!0;case"mouseover":return Mt=Lt(Mt,e,t,n,r,i),!0;case"pointerover":var o=i.pointerId;return Ot.set(o,Lt(Ot.get(o)||null,e,t,n,r,i)),!0;case"gotpointercapture":return o=i.pointerId,Rt.set(o,Lt(Rt.get(o)||null,e,t,n,r,i)),!0}return!1}(i,e,t,n,r))r.stopPropagation();else if(Nt(e,r),4&t&&-1<Dt.indexOf(e)){for(;null!==i;){var o=yi(i);if(null!==o&&jt(o),null===(o=Zt(e,t,n,r))&&Ur(e,t,r,Yt,n),o===i)break;i=o}null!==i&&r.stopPropagation()}else Ur(e,t,r,null,n)}}var Yt=null;function Zt(e,t,n,r){if(Yt=null,null!==(e=xi(e=je(r))))if(null===(t=He(e)))e=null;else if(13===(n=t.tag)){if(null!==(e=We(t)))return e;e=null}else if(3===n){if(t.stateNode.current.memoizedState.isDehydrated)return 3===t.tag?t.stateNode.containerInfo:null;e=null}else t!==e&&(e=null);return Yt=e,null}function Kt(e){switch(e){case"cancel":case"click":case"close":case"contextmenu":case"copy":case"cut":case"auxclick":case"dblclick":case"dragend":case"dragstart":case"drop":case"focusin":case"focusout":case"input":case"invalid":case"keydown":case"keypress":case"keyup":case"mousedown":case"mouseup":case"paste":case"pause":case"play":case"pointercancel":case"pointerdown":case"pointerup":case"ratechange":case"reset":case"resize":case"seeked":case"submit":case"touchcancel":case"touchend":case"touchstart":case"volumechange":case"change":case"selectionchange":case"textInput":case"compositionstart":case"compositionend":case"compositionupdate":case"beforeblur":case"afterblur":case"beforeinput":case"blur":case"fullscreenchange":case"focus":case"hashchange":case"popstate":case"select":case"selectstart":return 1;case"drag":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"mousemove":case"mouseout":case"mouseover":case"pointermove":case"pointerout":case"pointerover":case"scroll":case"toggle":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 4;case"message":switch(Qe()){case Je:return 1;case et:return 4;case tt:case nt:return 16;case rt:return 536870912;default:return 16}default:return 16}}var Xt=null,Qt=null,Jt=null;function en(){if(Jt)return Jt;var e,t,n=Qt,r=n.length,i="value"in Xt?Xt.value:Xt.textContent,o=i.length;for(e=0;e<r&&n[e]===i[e];e++);var a=r-e;for(t=1;t<=a&&n[r-t]===i[o-t];t++);return Jt=i.slice(e,1<t?1-t:void 0)}function tn(e){var t=e.keyCode;return"charCode"in e?0===(e=e.charCode)&&13===t&&(e=13):e=t,10===e&&(e=13),32<=e||13===e?e:0}function nn(){return!0}function rn(){return!1}function on(e){function t(t,n,r,i,o){for(var a in this._reactName=t,this._targetInst=r,this.type=n,this.nativeEvent=i,this.target=o,this.currentTarget=null,e)e.hasOwnProperty(a)&&(t=e[a],this[a]=t?t(i):i[a]);return this.isDefaultPrevented=(null!=i.defaultPrevented?i.defaultPrevented:!1===i.returnValue)?nn:rn,this.isPropagationStopped=rn,this}return I(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var e=this.nativeEvent;e&&(e.preventDefault?e.preventDefault():"unknown"!==typeof e.returnValue&&(e.returnValue=!1),this.isDefaultPrevented=nn)},stopPropagation:function(){var e=this.nativeEvent;e&&(e.stopPropagation?e.stopPropagation():"unknown"!==typeof e.cancelBubble&&(e.cancelBubble=!0),this.isPropagationStopped=nn)},persist:function(){},isPersistent:nn}),t}var an,sn,ln,cn={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},dn=on(cn),un=I({},cn,{view:0,detail:0}),pn=on(un),hn=I({},un,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Sn,button:0,buttons:0,relatedTarget:function(e){return void 0===e.relatedTarget?e.fromElement===e.srcElement?e.toElement:e.fromElement:e.relatedTarget},movementX:function(e){return"movementX"in e?e.movementX:(e!==ln&&(ln&&"mousemove"===e.type?(an=e.screenX-ln.screenX,sn=e.screenY-ln.screenY):sn=an=0,ln=e),an)},movementY:function(e){return"movementY"in e?e.movementY:sn}}),mn=on(hn),fn=on(I({},hn,{dataTransfer:0})),gn=on(I({},un,{relatedTarget:0})),vn=on(I({},cn,{animationName:0,elapsedTime:0,pseudoElement:0})),xn=I({},cn,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),yn=on(xn),bn=on(I({},cn,{data:0})),jn={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},_n={8:"Backspace",9:"Tab",12:"Clear",13:"Enter",16:"Shift",17:"Control",18:"Alt",19:"Pause",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",45:"Insert",46:"Delete",112:"F1",113:"F2",114:"F3",115:"F4",116:"F5",117:"F6",118:"F7",119:"F8",120:"F9",121:"F10",122:"F11",123:"F12",144:"NumLock",145:"ScrollLock",224:"Meta"},Cn={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function wn(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):!!(e=Cn[e])&&!!t[e]}function Sn(){return wn}var An=I({},un,{key:function(e){if(e.key){var t=jn[e.key]||e.key;if("Unidentified"!==t)return t}return"keypress"===e.type?13===(e=tn(e))?"Enter":String.fromCharCode(e):"keydown"===e.type||"keyup"===e.type?_n[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Sn,charCode:function(e){return"keypress"===e.type?tn(e):0},keyCode:function(e){return"keydown"===e.type||"keyup"===e.type?e.keyCode:0},which:function(e){return"keypress"===e.type?tn(e):"keydown"===e.type||"keyup"===e.type?e.keyCode:0}}),kn=on(An),Tn=on(I({},hn,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0})),En=on(I({},un,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Sn})),Mn=on(I({},cn,{propertyName:0,elapsedTime:0,pseudoElement:0})),On=I({},hn,{deltaX:function(e){return"deltaX"in e?e.deltaX:"wheelDeltaX"in e?-e.wheelDeltaX:0},deltaY:function(e){return"deltaY"in e?e.deltaY:"wheelDeltaY"in e?-e.wheelDeltaY:"wheelDelta"in e?-e.wheelDelta:0},deltaZ:0,deltaMode:0}),Rn=on(On),Pn=[9,13,27,32],Dn=d&&"CompositionEvent"in window,Nn=null;d&&"documentMode"in document&&(Nn=document.documentMode);var Ln=d&&"TextEvent"in window&&!Nn,In=d&&(!Dn||Nn&&8<Nn&&11>=Nn),Fn=String.fromCharCode(32),$n=!1;function Bn(e,t){switch(e){case"keyup":return-1!==Pn.indexOf(t.keyCode);case"keydown":return 229!==t.keyCode;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function zn(e){return"object"===typeof(e=e.detail)&&"data"in e?e.data:null}var Hn=!1;var Wn={color:!0,date:!0,datetime:!0,"datetime-local":!0,email:!0,month:!0,number:!0,password:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0};function Un(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return"input"===t?!!Wn[e.type]:"textarea"===t}function Vn(e,t,n,r){Ae(r),0<(t=Gr(t,"onChange")).length&&(n=new dn("onChange","change",null,n,r),e.push({event:n,listeners:t}))}var Gn=null,qn=null;function Yn(e){Fr(e,0)}function Zn(e){if(q(bi(e)))return e}function Kn(e,t){if("change"===e)return t}var Xn=!1;if(d){var Qn;if(d){var Jn="oninput"in document;if(!Jn){var er=document.createElement("div");er.setAttribute("oninput","return;"),Jn="function"===typeof er.oninput}Qn=Jn}else Qn=!1;Xn=Qn&&(!document.documentMode||9<document.documentMode)}function tr(){Gn&&(Gn.detachEvent("onpropertychange",nr),qn=Gn=null)}function nr(e){if("value"===e.propertyName&&Zn(qn)){var t=[];Vn(t,qn,e,je(e)),Oe(Yn,t)}}function rr(e,t,n){"focusin"===e?(tr(),qn=n,(Gn=t).attachEvent("onpropertychange",nr)):"focusout"===e&&tr()}function ir(e){if("selectionchange"===e||"keyup"===e||"keydown"===e)return Zn(qn)}function or(e,t){if("click"===e)return Zn(t)}function ar(e,t){if("input"===e||"change"===e)return Zn(t)}var sr="function"===typeof Object.is?Object.is:function(e,t){return e===t&&(0!==e||1/e===1/t)||e!==e&&t!==t};function lr(e,t){if(sr(e,t))return!0;if("object"!==typeof e||null===e||"object"!==typeof t||null===t)return!1;var n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(r=0;r<n.length;r++){var i=n[r];if(!u.call(t,i)||!sr(e[i],t[i]))return!1}return!0}function cr(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function dr(e,t){var n,r=cr(e);for(e=0;r;){if(3===r.nodeType){if(n=e+r.textContent.length,e<=t&&n>=t)return{node:r,offset:t-e};e=n}e:{for(;r;){if(r.nextSibling){r=r.nextSibling;break e}r=r.parentNode}r=void 0}r=cr(r)}}function ur(e,t){return!(!e||!t)&&(e===t||(!e||3!==e.nodeType)&&(t&&3===t.nodeType?ur(e,t.parentNode):"contains"in e?e.contains(t):!!e.compareDocumentPosition&&!!(16&e.compareDocumentPosition(t))))}function pr(){for(var e=window,t=Y();t instanceof e.HTMLIFrameElement;){try{var n="string"===typeof t.contentWindow.location.href}catch(r){n=!1}if(!n)break;t=Y((e=t.contentWindow).document)}return t}function hr(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&("input"===t&&("text"===e.type||"search"===e.type||"tel"===e.type||"url"===e.type||"password"===e.type)||"textarea"===t||"true"===e.contentEditable)}function mr(e){var t=pr(),n=e.focusedElem,r=e.selectionRange;if(t!==n&&n&&n.ownerDocument&&ur(n.ownerDocument.documentElement,n)){if(null!==r&&hr(n))if(t=r.start,void 0===(e=r.end)&&(e=t),"selectionStart"in n)n.selectionStart=t,n.selectionEnd=Math.min(e,n.value.length);else if((e=(t=n.ownerDocument||document)&&t.defaultView||window).getSelection){e=e.getSelection();var i=n.textContent.length,o=Math.min(r.start,i);r=void 0===r.end?o:Math.min(r.end,i),!e.extend&&o>r&&(i=r,r=o,o=i),i=dr(n,o);var a=dr(n,r);i&&a&&(1!==e.rangeCount||e.anchorNode!==i.node||e.anchorOffset!==i.offset||e.focusNode!==a.node||e.focusOffset!==a.offset)&&((t=t.createRange()).setStart(i.node,i.offset),e.removeAllRanges(),o>r?(e.addRange(t),e.extend(a.node,a.offset)):(t.setEnd(a.node,a.offset),e.addRange(t)))}for(t=[],e=n;e=e.parentNode;)1===e.nodeType&&t.push({element:e,left:e.scrollLeft,top:e.scrollTop});for("function"===typeof n.focus&&n.focus(),n=0;n<t.length;n++)(e=t[n]).element.scrollLeft=e.left,e.element.scrollTop=e.top}}var fr=d&&"documentMode"in document&&11>=document.documentMode,gr=null,vr=null,xr=null,yr=!1;function br(e,t,n){var r=n.window===n?n.document:9===n.nodeType?n:n.ownerDocument;yr||null==gr||gr!==Y(r)||("selectionStart"in(r=gr)&&hr(r)?r={start:r.selectionStart,end:r.selectionEnd}:r={anchorNode:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection()).anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset},xr&&lr(xr,r)||(xr=r,0<(r=Gr(vr,"onSelect")).length&&(t=new dn("onSelect","select",null,t,n),e.push({event:t,listeners:r}),t.target=gr)))}function jr(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n["Webkit"+e]="webkit"+t,n["Moz"+e]="moz"+t,n}var _r={animationend:jr("Animation","AnimationEnd"),animationiteration:jr("Animation","AnimationIteration"),animationstart:jr("Animation","AnimationStart"),transitionend:jr("Transition","TransitionEnd")},Cr={},wr={};function Sr(e){if(Cr[e])return Cr[e];if(!_r[e])return e;var t,n=_r[e];for(t in n)if(n.hasOwnProperty(t)&&t in wr)return Cr[e]=n[t];return e}d&&(wr=document.createElement("div").style,"AnimationEvent"in window||(delete _r.animationend.animation,delete _r.animationiteration.animation,delete _r.animationstart.animation),"TransitionEvent"in window||delete _r.transitionend.transition);var Ar=Sr("animationend"),kr=Sr("animationiteration"),Tr=Sr("animationstart"),Er=Sr("transitionend"),Mr=new Map,Or="abort auxClick cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel".split(" ");function Rr(e,t){Mr.set(e,t),l(t,[e])}for(var Pr=0;Pr<Or.length;Pr++){var Dr=Or[Pr];Rr(Dr.toLowerCase(),"on"+(Dr[0].toUpperCase()+Dr.slice(1)))}Rr(Ar,"onAnimationEnd"),Rr(kr,"onAnimationIteration"),Rr(Tr,"onAnimationStart"),Rr("dblclick","onDoubleClick"),Rr("focusin","onFocus"),Rr("focusout","onBlur"),Rr(Er,"onTransitionEnd"),c("onMouseEnter",["mouseout","mouseover"]),c("onMouseLeave",["mouseout","mouseover"]),c("onPointerEnter",["pointerout","pointerover"]),c("onPointerLeave",["pointerout","pointerover"]),l("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),l("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),l("onBeforeInput",["compositionend","keypress","textInput","paste"]),l("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),l("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),l("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Nr="abort canplay canplaythrough durationchange emptied encrypted ended error loadeddata loadedmetadata loadstart pause play playing progress ratechange resize seeked seeking stalled suspend timeupdate volumechange waiting".split(" "),Lr=new Set("cancel close invalid load scroll toggle".split(" ").concat(Nr));function Ir(e,t,n){var r=e.type||"unknown-event";e.currentTarget=n,function(e,t,n,r,i,a,s,l,c){if(ze.apply(this,arguments),Le){if(!Le)throw Error(o(198));var d=Ie;Le=!1,Ie=null,Fe||(Fe=!0,$e=d)}}(r,t,void 0,e),e.currentTarget=null}function Fr(e,t){t=0!==(4&t);for(var n=0;n<e.length;n++){var r=e[n],i=r.event;r=r.listeners;e:{var o=void 0;if(t)for(var a=r.length-1;0<=a;a--){var s=r[a],l=s.instance,c=s.currentTarget;if(s=s.listener,l!==o&&i.isPropagationStopped())break e;Ir(i,s,c),o=l}else for(a=0;a<r.length;a++){if(l=(s=r[a]).instance,c=s.currentTarget,s=s.listener,l!==o&&i.isPropagationStopped())break e;Ir(i,s,c),o=l}}}if(Fe)throw e=$e,Fe=!1,$e=null,e}function $r(e,t){var n=t[fi];void 0===n&&(n=t[fi]=new Set);var r=e+"__bubble";n.has(r)||(Wr(t,e,2,!1),n.add(r))}function Br(e,t,n){var r=0;t&&(r|=4),Wr(n,e,r,t)}var zr="_reactListening"+Math.random().toString(36).slice(2);function Hr(e){if(!e[zr]){e[zr]=!0,a.forEach(function(t){"selectionchange"!==t&&(Lr.has(t)||Br(t,!1,e),Br(t,!0,e))});var t=9===e.nodeType?e:e.ownerDocument;null===t||t[zr]||(t[zr]=!0,Br("selectionchange",!1,t))}}function Wr(e,t,n,r){switch(Kt(t)){case 1:var i=Vt;break;case 4:i=Gt;break;default:i=qt}n=i.bind(null,t,n,e),i=void 0,!Pe||"touchstart"!==t&&"touchmove"!==t&&"wheel"!==t||(i=!0),r?void 0!==i?e.addEventListener(t,n,{capture:!0,passive:i}):e.addEventListener(t,n,!0):void 0!==i?e.addEventListener(t,n,{passive:i}):e.addEventListener(t,n,!1)}function Ur(e,t,n,r,i){var o=r;if(0===(1&t)&&0===(2&t)&&null!==r)e:for(;;){if(null===r)return;var a=r.tag;if(3===a||4===a){var s=r.stateNode.containerInfo;if(s===i||8===s.nodeType&&s.parentNode===i)break;if(4===a)for(a=r.return;null!==a;){var l=a.tag;if((3===l||4===l)&&((l=a.stateNode.containerInfo)===i||8===l.nodeType&&l.parentNode===i))return;a=a.return}for(;null!==s;){if(null===(a=xi(s)))return;if(5===(l=a.tag)||6===l){r=o=a;continue e}s=s.parentNode}}r=r.return}Oe(function(){var r=o,i=je(n),a=[];e:{var s=Mr.get(e);if(void 0!==s){var l=dn,c=e;switch(e){case"keypress":if(0===tn(n))break e;case"keydown":case"keyup":l=kn;break;case"focusin":c="focus",l=gn;break;case"focusout":c="blur",l=gn;break;case"beforeblur":case"afterblur":l=gn;break;case"click":if(2===n.button)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":l=mn;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":l=fn;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":l=En;break;case Ar:case kr:case Tr:l=vn;break;case Er:l=Mn;break;case"scroll":l=pn;break;case"wheel":l=Rn;break;case"copy":case"cut":case"paste":l=yn;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":l=Tn}var d=0!==(4&t),u=!d&&"scroll"===e,p=d?null!==s?s+"Capture":null:s;d=[];for(var h,m=r;null!==m;){var f=(h=m).stateNode;if(5===h.tag&&null!==f&&(h=f,null!==p&&(null!=(f=Re(m,p))&&d.push(Vr(m,f,h)))),u)break;m=m.return}0<d.length&&(s=new l(s,c,null,n,i),a.push({event:s,listeners:d}))}}if(0===(7&t)){if(l="mouseout"===e||"pointerout"===e,(!(s="mouseover"===e||"pointerover"===e)||n===be||!(c=n.relatedTarget||n.fromElement)||!xi(c)&&!c[mi])&&(l||s)&&(s=i.window===i?i:(s=i.ownerDocument)?s.defaultView||s.parentWindow:window,l?(l=r,null!==(c=(c=n.relatedTarget||n.toElement)?xi(c):null)&&(c!==(u=He(c))||5!==c.tag&&6!==c.tag)&&(c=null)):(l=null,c=r),l!==c)){if(d=mn,f="onMouseLeave",p="onMouseEnter",m="mouse","pointerout"!==e&&"pointerover"!==e||(d=Tn,f="onPointerLeave",p="onPointerEnter",m="pointer"),u=null==l?s:bi(l),h=null==c?s:bi(c),(s=new d(f,m+"leave",l,n,i)).target=u,s.relatedTarget=h,f=null,xi(i)===r&&((d=new d(p,m+"enter",c,n,i)).target=h,d.relatedTarget=u,f=d),u=f,l&&c)e:{for(p=c,m=0,h=d=l;h;h=qr(h))m++;for(h=0,f=p;f;f=qr(f))h++;for(;0<m-h;)d=qr(d),m--;for(;0<h-m;)p=qr(p),h--;for(;m--;){if(d===p||null!==p&&d===p.alternate)break e;d=qr(d),p=qr(p)}d=null}else d=null;null!==l&&Yr(a,s,l,d,!1),null!==c&&null!==u&&Yr(a,u,c,d,!0)}if("select"===(l=(s=r?bi(r):window).nodeName&&s.nodeName.toLowerCase())||"input"===l&&"file"===s.type)var g=Kn;else if(Un(s))if(Xn)g=ar;else{g=ir;var v=rr}else(l=s.nodeName)&&"input"===l.toLowerCase()&&("checkbox"===s.type||"radio"===s.type)&&(g=or);switch(g&&(g=g(e,r))?Vn(a,g,n,i):(v&&v(e,s,r),"focusout"===e&&(v=s._wrapperState)&&v.controlled&&"number"===s.type&&ee(s,"number",s.value)),v=r?bi(r):window,e){case"focusin":(Un(v)||"true"===v.contentEditable)&&(gr=v,vr=r,xr=null);break;case"focusout":xr=vr=gr=null;break;case"mousedown":yr=!0;break;case"contextmenu":case"mouseup":case"dragend":yr=!1,br(a,n,i);break;case"selectionchange":if(fr)break;case"keydown":case"keyup":br(a,n,i)}var x;if(Dn)e:{switch(e){case"compositionstart":var y="onCompositionStart";break e;case"compositionend":y="onCompositionEnd";break e;case"compositionupdate":y="onCompositionUpdate";break e}y=void 0}else Hn?Bn(e,n)&&(y="onCompositionEnd"):"keydown"===e&&229===n.keyCode&&(y="onCompositionStart");y&&(In&&"ko"!==n.locale&&(Hn||"onCompositionStart"!==y?"onCompositionEnd"===y&&Hn&&(x=en()):(Qt="value"in(Xt=i)?Xt.value:Xt.textContent,Hn=!0)),0<(v=Gr(r,y)).length&&(y=new bn(y,e,null,n,i),a.push({event:y,listeners:v}),x?y.data=x:null!==(x=zn(n))&&(y.data=x))),(x=Ln?function(e,t){switch(e){case"compositionend":return zn(t);case"keypress":return 32!==t.which?null:($n=!0,Fn);case"textInput":return(e=t.data)===Fn&&$n?null:e;default:return null}}(e,n):function(e,t){if(Hn)return"compositionend"===e||!Dn&&Bn(e,t)?(e=en(),Jt=Qt=Xt=null,Hn=!1,e):null;switch(e){case"paste":default:return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1<t.char.length)return t.char;if(t.which)return String.fromCharCode(t.which)}return null;case"compositionend":return In&&"ko"!==t.locale?null:t.data}}(e,n))&&(0<(r=Gr(r,"onBeforeInput")).length&&(i=new bn("onBeforeInput","beforeinput",null,n,i),a.push({event:i,listeners:r}),i.data=x))}Fr(a,t)})}function Vr(e,t,n){return{instance:e,listener:t,currentTarget:n}}function Gr(e,t){for(var n=t+"Capture",r=[];null!==e;){var i=e,o=i.stateNode;5===i.tag&&null!==o&&(i=o,null!=(o=Re(e,n))&&r.unshift(Vr(e,o,i)),null!=(o=Re(e,t))&&r.push(Vr(e,o,i))),e=e.return}return r}function qr(e){if(null===e)return null;do{e=e.return}while(e&&5!==e.tag);return e||null}function Yr(e,t,n,r,i){for(var o=t._reactName,a=[];null!==n&&n!==r;){var s=n,l=s.alternate,c=s.stateNode;if(null!==l&&l===r)break;5===s.tag&&null!==c&&(s=c,i?null!=(l=Re(n,o))&&a.unshift(Vr(n,l,s)):i||null!=(l=Re(n,o))&&a.push(Vr(n,l,s))),n=n.return}0!==a.length&&e.push({event:t,listeners:a})}var Zr=/\r\n?/g,Kr=/\u0000|\uFFFD/g;function Xr(e){return("string"===typeof e?e:""+e).replace(Zr,"\n").replace(Kr,"")}function Qr(e,t,n){if(t=Xr(t),Xr(e)!==t&&n)throw Error(o(425))}function Jr(){}var ei=null,ti=null;function ni(e,t){return"textarea"===e||"noscript"===e||"string"===typeof t.children||"number"===typeof t.children||"object"===typeof t.dangerouslySetInnerHTML&&null!==t.dangerouslySetInnerHTML&&null!=t.dangerouslySetInnerHTML.__html}var ri="function"===typeof setTimeout?setTimeout:void 0,ii="function"===typeof clearTimeout?clearTimeout:void 0,oi="function"===typeof Promise?Promise:void 0,ai="function"===typeof queueMicrotask?queueMicrotask:"undefined"!==typeof oi?function(e){return oi.resolve(null).then(e).catch(si)}:ri;function si(e){setTimeout(function(){throw e})}function li(e,t){var n=t,r=0;do{var i=n.nextSibling;if(e.removeChild(n),i&&8===i.nodeType)if("/$"===(n=i.data)){if(0===r)return e.removeChild(i),void Ht(t);r--}else"$"!==n&&"$?"!==n&&"$!"!==n||r++;n=i}while(n);Ht(t)}function ci(e){for(;null!=e;e=e.nextSibling){var t=e.nodeType;if(1===t||3===t)break;if(8===t){if("$"===(t=e.data)||"$!"===t||"$?"===t)break;if("/$"===t)return null}}return e}function di(e){e=e.previousSibling;for(var t=0;e;){if(8===e.nodeType){var n=e.data;if("$"===n||"$!"===n||"$?"===n){if(0===t)return e;t--}else"/$"===n&&t++}e=e.previousSibling}return null}var ui=Math.random().toString(36).slice(2),pi="__reactFiber$"+ui,hi="__reactProps$"+ui,mi="__reactContainer$"+ui,fi="__reactEvents$"+ui,gi="__reactListeners$"+ui,vi="__reactHandles$"+ui;function xi(e){var t=e[pi];if(t)return t;for(var n=e.parentNode;n;){if(t=n[mi]||n[pi]){if(n=t.alternate,null!==t.child||null!==n&&null!==n.child)for(e=di(e);null!==e;){if(n=e[pi])return n;e=di(e)}return t}n=(e=n).parentNode}return null}function yi(e){return!(e=e[pi]||e[mi])||5!==e.tag&&6!==e.tag&&13!==e.tag&&3!==e.tag?null:e}function bi(e){if(5===e.tag||6===e.tag)return e.stateNode;throw Error(o(33))}function ji(e){return e[hi]||null}var _i=[],Ci=-1;function wi(e){return{current:e}}function Si(e){0>Ci||(e.current=_i[Ci],_i[Ci]=null,Ci--)}function Ai(e,t){Ci++,_i[Ci]=e.current,e.current=t}var ki={},Ti=wi(ki),Ei=wi(!1),Mi=ki;function Oi(e,t){var n=e.type.contextTypes;if(!n)return ki;var r=e.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===t)return r.__reactInternalMemoizedMaskedChildContext;var i,o={};for(i in n)o[i]=t[i];return r&&((e=e.stateNode).__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=o),o}function Ri(e){return null!==(e=e.childContextTypes)&&void 0!==e}function Pi(){Si(Ei),Si(Ti)}function Di(e,t,n){if(Ti.current!==ki)throw Error(o(168));Ai(Ti,t),Ai(Ei,n)}function Ni(e,t,n){var r=e.stateNode;if(t=t.childContextTypes,"function"!==typeof r.getChildContext)return n;for(var i in r=r.getChildContext())if(!(i in t))throw Error(o(108,W(e)||"Unknown",i));return I({},n,r)}function Li(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||ki,Mi=Ti.current,Ai(Ti,e),Ai(Ei,Ei.current),!0}function Ii(e,t,n){var r=e.stateNode;if(!r)throw Error(o(169));n?(e=Ni(e,t,Mi),r.__reactInternalMemoizedMergedChildContext=e,Si(Ei),Si(Ti),Ai(Ti,e)):Si(Ei),Ai(Ei,n)}var Fi=null,$i=!1,Bi=!1;function zi(e){null===Fi?Fi=[e]:Fi.push(e)}function Hi(){if(!Bi&&null!==Fi){Bi=!0;var e=0,t=yt;try{var n=Fi;for(yt=1;e<n.length;e++){var r=n[e];do{r=r(!0)}while(null!==r)}Fi=null,$i=!1}catch(i){throw null!==Fi&&(Fi=Fi.slice(e+1)),qe(Je,Hi),i}finally{yt=t,Bi=!1}}return null}var Wi=[],Ui=0,Vi=null,Gi=0,qi=[],Yi=0,Zi=null,Ki=1,Xi="";function Qi(e,t){Wi[Ui++]=Gi,Wi[Ui++]=Vi,Vi=e,Gi=t}function Ji(e,t,n){qi[Yi++]=Ki,qi[Yi++]=Xi,qi[Yi++]=Zi,Zi=e;var r=Ki;e=Xi;var i=32-at(r)-1;r&=~(1<<i),n+=1;var o=32-at(t)+i;if(30<o){var a=i-i%5;o=(r&(1<<a)-1).toString(32),r>>=a,i-=a,Ki=1<<32-at(t)+i|n<<i|r,Xi=o+e}else Ki=1<<o|n<<i|r,Xi=e}function eo(e){null!==e.return&&(Qi(e,1),Ji(e,1,0))}function to(e){for(;e===Vi;)Vi=Wi[--Ui],Wi[Ui]=null,Gi=Wi[--Ui],Wi[Ui]=null;for(;e===Zi;)Zi=qi[--Yi],qi[Yi]=null,Xi=qi[--Yi],qi[Yi]=null,Ki=qi[--Yi],qi[Yi]=null}var no=null,ro=null,io=!1,oo=null;function ao(e,t){var n=Oc(5,null,null,0);n.elementType="DELETED",n.stateNode=t,n.return=e,null===(t=e.deletions)?(e.deletions=[n],e.flags|=16):t.push(n)}function so(e,t){switch(e.tag){case 5:var n=e.type;return null!==(t=1!==t.nodeType||n.toLowerCase()!==t.nodeName.toLowerCase()?null:t)&&(e.stateNode=t,no=e,ro=ci(t.firstChild),!0);case 6:return null!==(t=""===e.pendingProps||3!==t.nodeType?null:t)&&(e.stateNode=t,no=e,ro=null,!0);case 13:return null!==(t=8!==t.nodeType?null:t)&&(n=null!==Zi?{id:Ki,overflow:Xi}:null,e.memoizedState={dehydrated:t,treeContext:n,retryLane:1073741824},(n=Oc(18,null,null,0)).stateNode=t,n.return=e,e.child=n,no=e,ro=null,!0);default:return!1}}function lo(e){return 0!==(1&e.mode)&&0===(128&e.flags)}function co(e){if(io){var t=ro;if(t){var n=t;if(!so(e,t)){if(lo(e))throw Error(o(418));t=ci(n.nextSibling);var r=no;t&&so(e,t)?ao(r,n):(e.flags=-4097&e.flags|2,io=!1,no=e)}}else{if(lo(e))throw Error(o(418));e.flags=-4097&e.flags|2,io=!1,no=e}}}function uo(e){for(e=e.return;null!==e&&5!==e.tag&&3!==e.tag&&13!==e.tag;)e=e.return;no=e}function po(e){if(e!==no)return!1;if(!io)return uo(e),io=!0,!1;var t;if((t=3!==e.tag)&&!(t=5!==e.tag)&&(t="head"!==(t=e.type)&&"body"!==t&&!ni(e.type,e.memoizedProps)),t&&(t=ro)){if(lo(e))throw ho(),Error(o(418));for(;t;)ao(e,t),t=ci(t.nextSibling)}if(uo(e),13===e.tag){if(!(e=null!==(e=e.memoizedState)?e.dehydrated:null))throw Error(o(317));e:{for(e=e.nextSibling,t=0;e;){if(8===e.nodeType){var n=e.data;if("/$"===n){if(0===t){ro=ci(e.nextSibling);break e}t--}else"$"!==n&&"$!"!==n&&"$?"!==n||t++}e=e.nextSibling}ro=null}}else ro=no?ci(e.stateNode.nextSibling):null;return!0}function ho(){for(var e=ro;e;)e=ci(e.nextSibling)}function mo(){ro=no=null,io=!1}function fo(e){null===oo?oo=[e]:oo.push(e)}var go=b.ReactCurrentBatchConfig;function vo(e,t,n){if(null!==(e=n.ref)&&"function"!==typeof e&&"object"!==typeof e){if(n._owner){if(n=n._owner){if(1!==n.tag)throw Error(o(309));var r=n.stateNode}if(!r)throw Error(o(147,e));var i=r,a=""+e;return null!==t&&null!==t.ref&&"function"===typeof t.ref&&t.ref._stringRef===a?t.ref:(t=function(e){var t=i.refs;null===e?delete t[a]:t[a]=e},t._stringRef=a,t)}if("string"!==typeof e)throw Error(o(284));if(!n._owner)throw Error(o(290,e))}return e}function xo(e,t){throw e=Object.prototype.toString.call(t),Error(o(31,"[object Object]"===e?"object with keys {"+Object.keys(t).join(", ")+"}":e))}function yo(e){return(0,e._init)(e._payload)}function bo(e){function t(t,n){if(e){var r=t.deletions;null===r?(t.deletions=[n],t.flags|=16):r.push(n)}}function n(n,r){if(!e)return null;for(;null!==r;)t(n,r),r=r.sibling;return null}function r(e,t){for(e=new Map;null!==t;)null!==t.key?e.set(t.key,t):e.set(t.index,t),t=t.sibling;return e}function i(e,t){return(e=Pc(e,t)).index=0,e.sibling=null,e}function a(t,n,r){return t.index=r,e?null!==(r=t.alternate)?(r=r.index)<n?(t.flags|=2,n):r:(t.flags|=2,n):(t.flags|=1048576,n)}function s(t){return e&&null===t.alternate&&(t.flags|=2),t}function l(e,t,n,r){return null===t||6!==t.tag?((t=Ic(n,e.mode,r)).return=e,t):((t=i(t,n)).return=e,t)}function c(e,t,n,r){var o=n.type;return o===C?u(e,t,n.props.children,r,n.key):null!==t&&(t.elementType===o||"object"===typeof o&&null!==o&&o.$$typeof===R&&yo(o)===t.type)?((r=i(t,n.props)).ref=vo(e,t,n),r.return=e,r):((r=Dc(n.type,n.key,n.props,null,e.mode,r)).ref=vo(e,t,n),r.return=e,r)}function d(e,t,n,r){return null===t||4!==t.tag||t.stateNode.containerInfo!==n.containerInfo||t.stateNode.implementation!==n.implementation?((t=Fc(n,e.mode,r)).return=e,t):((t=i(t,n.children||[])).return=e,t)}function u(e,t,n,r,o){return null===t||7!==t.tag?((t=Nc(n,e.mode,r,o)).return=e,t):((t=i(t,n)).return=e,t)}function p(e,t,n){if("string"===typeof t&&""!==t||"number"===typeof t)return(t=Ic(""+t,e.mode,n)).return=e,t;if("object"===typeof t&&null!==t){switch(t.$$typeof){case j:return(n=Dc(t.type,t.key,t.props,null,e.mode,n)).ref=vo(e,null,t),n.return=e,n;case _:return(t=Fc(t,e.mode,n)).return=e,t;case R:return p(e,(0,t._init)(t._payload),n)}if(te(t)||N(t))return(t=Nc(t,e.mode,n,null)).return=e,t;xo(e,t)}return null}function h(e,t,n,r){var i=null!==t?t.key:null;if("string"===typeof n&&""!==n||"number"===typeof n)return null!==i?null:l(e,t,""+n,r);if("object"===typeof n&&null!==n){switch(n.$$typeof){case j:return n.key===i?c(e,t,n,r):null;case _:return n.key===i?d(e,t,n,r):null;case R:return h(e,t,(i=n._init)(n._payload),r)}if(te(n)||N(n))return null!==i?null:u(e,t,n,r,null);xo(e,n)}return null}function m(e,t,n,r,i){if("string"===typeof r&&""!==r||"number"===typeof r)return l(t,e=e.get(n)||null,""+r,i);if("object"===typeof r&&null!==r){switch(r.$$typeof){case j:return c(t,e=e.get(null===r.key?n:r.key)||null,r,i);case _:return d(t,e=e.get(null===r.key?n:r.key)||null,r,i);case R:return m(e,t,n,(0,r._init)(r._payload),i)}if(te(r)||N(r))return u(t,e=e.get(n)||null,r,i,null);xo(t,r)}return null}function f(i,o,s,l){for(var c=null,d=null,u=o,f=o=0,g=null;null!==u&&f<s.length;f++){u.index>f?(g=u,u=null):g=u.sibling;var v=h(i,u,s[f],l);if(null===v){null===u&&(u=g);break}e&&u&&null===v.alternate&&t(i,u),o=a(v,o,f),null===d?c=v:d.sibling=v,d=v,u=g}if(f===s.length)return n(i,u),io&&Qi(i,f),c;if(null===u){for(;f<s.length;f++)null!==(u=p(i,s[f],l))&&(o=a(u,o,f),null===d?c=u:d.sibling=u,d=u);return io&&Qi(i,f),c}for(u=r(i,u);f<s.length;f++)null!==(g=m(u,i,f,s[f],l))&&(e&&null!==g.alternate&&u.delete(null===g.key?f:g.key),o=a(g,o,f),null===d?c=g:d.sibling=g,d=g);return e&&u.forEach(function(e){return t(i,e)}),io&&Qi(i,f),c}function g(i,s,l,c){var d=N(l);if("function"!==typeof d)throw Error(o(150));if(null==(l=d.call(l)))throw Error(o(151));for(var u=d=null,f=s,g=s=0,v=null,x=l.next();null!==f&&!x.done;g++,x=l.next()){f.index>g?(v=f,f=null):v=f.sibling;var y=h(i,f,x.value,c);if(null===y){null===f&&(f=v);break}e&&f&&null===y.alternate&&t(i,f),s=a(y,s,g),null===u?d=y:u.sibling=y,u=y,f=v}if(x.done)return n(i,f),io&&Qi(i,g),d;if(null===f){for(;!x.done;g++,x=l.next())null!==(x=p(i,x.value,c))&&(s=a(x,s,g),null===u?d=x:u.sibling=x,u=x);return io&&Qi(i,g),d}for(f=r(i,f);!x.done;g++,x=l.next())null!==(x=m(f,i,g,x.value,c))&&(e&&null!==x.alternate&&f.delete(null===x.key?g:x.key),s=a(x,s,g),null===u?d=x:u.sibling=x,u=x);return e&&f.forEach(function(e){return t(i,e)}),io&&Qi(i,g),d}return function e(r,o,a,l){if("object"===typeof a&&null!==a&&a.type===C&&null===a.key&&(a=a.props.children),"object"===typeof a&&null!==a){switch(a.$$typeof){case j:e:{for(var c=a.key,d=o;null!==d;){if(d.key===c){if((c=a.type)===C){if(7===d.tag){n(r,d.sibling),(o=i(d,a.props.children)).return=r,r=o;break e}}else if(d.elementType===c||"object"===typeof c&&null!==c&&c.$$typeof===R&&yo(c)===d.type){n(r,d.sibling),(o=i(d,a.props)).ref=vo(r,d,a),o.return=r,r=o;break e}n(r,d);break}t(r,d),d=d.sibling}a.type===C?((o=Nc(a.props.children,r.mode,l,a.key)).return=r,r=o):((l=Dc(a.type,a.key,a.props,null,r.mode,l)).ref=vo(r,o,a),l.return=r,r=l)}return s(r);case _:e:{for(d=a.key;null!==o;){if(o.key===d){if(4===o.tag&&o.stateNode.containerInfo===a.containerInfo&&o.stateNode.implementation===a.implementation){n(r,o.sibling),(o=i(o,a.children||[])).return=r,r=o;break e}n(r,o);break}t(r,o),o=o.sibling}(o=Fc(a,r.mode,l)).return=r,r=o}return s(r);case R:return e(r,o,(d=a._init)(a._payload),l)}if(te(a))return f(r,o,a,l);if(N(a))return g(r,o,a,l);xo(r,a)}return"string"===typeof a&&""!==a||"number"===typeof a?(a=""+a,null!==o&&6===o.tag?(n(r,o.sibling),(o=i(o,a)).return=r,r=o):(n(r,o),(o=Ic(a,r.mode,l)).return=r,r=o),s(r)):n(r,o)}}var jo=bo(!0),_o=bo(!1),Co=wi(null),wo=null,So=null,Ao=null;function ko(){Ao=So=wo=null}function To(e){var t=Co.current;Si(Co),e._currentValue=t}function Eo(e,t,n){for(;null!==e;){var r=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,null!==r&&(r.childLanes|=t)):null!==r&&(r.childLanes&t)!==t&&(r.childLanes|=t),e===n)break;e=e.return}}function Mo(e,t){wo=e,Ao=So=null,null!==(e=e.dependencies)&&null!==e.firstContext&&(0!==(e.lanes&t)&&(ys=!0),e.firstContext=null)}function Oo(e){var t=e._currentValue;if(Ao!==e)if(e={context:e,memoizedValue:t,next:null},null===So){if(null===wo)throw Error(o(308));So=e,wo.dependencies={lanes:0,firstContext:e}}else So=So.next=e;return t}var Ro=null;function Po(e){null===Ro?Ro=[e]:Ro.push(e)}function Do(e,t,n,r){var i=t.interleaved;return null===i?(n.next=n,Po(t)):(n.next=i.next,i.next=n),t.interleaved=n,No(e,r)}function No(e,t){e.lanes|=t;var n=e.alternate;for(null!==n&&(n.lanes|=t),n=e,e=e.return;null!==e;)e.childLanes|=t,null!==(n=e.alternate)&&(n.childLanes|=t),n=e,e=e.return;return 3===n.tag?n.stateNode:null}var Lo=!1;function Io(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function Fo(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,effects:e.effects})}function $o(e,t){return{eventTime:e,lane:t,tag:0,payload:null,callback:null,next:null}}function Bo(e,t,n){var r=e.updateQueue;if(null===r)return null;if(r=r.shared,0!==(2&Tl)){var i=r.pending;return null===i?t.next=t:(t.next=i.next,i.next=t),r.pending=t,No(e,n)}return null===(i=r.interleaved)?(t.next=t,Po(r)):(t.next=i.next,i.next=t),r.interleaved=t,No(e,n)}function zo(e,t,n){if(null!==(t=t.updateQueue)&&(t=t.shared,0!==(4194240&n))){var r=t.lanes;n|=r&=e.pendingLanes,t.lanes=n,xt(e,n)}}function Ho(e,t){var n=e.updateQueue,r=e.alternate;if(null!==r&&n===(r=r.updateQueue)){var i=null,o=null;if(null!==(n=n.firstBaseUpdate)){do{var a={eventTime:n.eventTime,lane:n.lane,tag:n.tag,payload:n.payload,callback:n.callback,next:null};null===o?i=o=a:o=o.next=a,n=n.next}while(null!==n);null===o?i=o=t:o=o.next=t}else i=o=t;return n={baseState:r.baseState,firstBaseUpdate:i,lastBaseUpdate:o,shared:r.shared,effects:r.effects},void(e.updateQueue=n)}null===(e=n.lastBaseUpdate)?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}function Wo(e,t,n,r){var i=e.updateQueue;Lo=!1;var o=i.firstBaseUpdate,a=i.lastBaseUpdate,s=i.shared.pending;if(null!==s){i.shared.pending=null;var l=s,c=l.next;l.next=null,null===a?o=c:a.next=c,a=l;var d=e.alternate;null!==d&&((s=(d=d.updateQueue).lastBaseUpdate)!==a&&(null===s?d.firstBaseUpdate=c:s.next=c,d.lastBaseUpdate=l))}if(null!==o){var u=i.baseState;for(a=0,d=c=l=null,s=o;;){var p=s.lane,h=s.eventTime;if((r&p)===p){null!==d&&(d=d.next={eventTime:h,lane:0,tag:s.tag,payload:s.payload,callback:s.callback,next:null});e:{var m=e,f=s;switch(p=t,h=n,f.tag){case 1:if("function"===typeof(m=f.payload)){u=m.call(h,u,p);break e}u=m;break e;case 3:m.flags=-65537&m.flags|128;case 0:if(null===(p="function"===typeof(m=f.payload)?m.call(h,u,p):m)||void 0===p)break e;u=I({},u,p);break e;case 2:Lo=!0}}null!==s.callback&&0!==s.lane&&(e.flags|=64,null===(p=i.effects)?i.effects=[s]:p.push(s))}else h={eventTime:h,lane:p,tag:s.tag,payload:s.payload,callback:s.callback,next:null},null===d?(c=d=h,l=u):d=d.next=h,a|=p;if(null===(s=s.next)){if(null===(s=i.shared.pending))break;s=(p=s).next,p.next=null,i.lastBaseUpdate=p,i.shared.pending=null}}if(null===d&&(l=u),i.baseState=l,i.firstBaseUpdate=c,i.lastBaseUpdate=d,null!==(t=i.shared.interleaved)){i=t;do{a|=i.lane,i=i.next}while(i!==t)}else null===o&&(i.shared.lanes=0);Ll|=a,e.lanes=a,e.memoizedState=u}}function Uo(e,t,n){if(e=t.effects,t.effects=null,null!==e)for(t=0;t<e.length;t++){var r=e[t],i=r.callback;if(null!==i){if(r.callback=null,r=n,"function"!==typeof i)throw Error(o(191,i));i.call(r)}}}var Vo={},Go=wi(Vo),qo=wi(Vo),Yo=wi(Vo);function Zo(e){if(e===Vo)throw Error(o(174));return e}function Ko(e,t){switch(Ai(Yo,t),Ai(qo,e),Ai(Go,Vo),e=t.nodeType){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:le(null,"");break;default:t=le(t=(e=8===e?t.parentNode:t).namespaceURI||null,e=e.tagName)}Si(Go),Ai(Go,t)}function Xo(){Si(Go),Si(qo),Si(Yo)}function Qo(e){Zo(Yo.current);var t=Zo(Go.current),n=le(t,e.type);t!==n&&(Ai(qo,e),Ai(Go,n))}function Jo(e){qo.current===e&&(Si(Go),Si(qo))}var ea=wi(0);function ta(e){for(var t=e;null!==t;){if(13===t.tag){var n=t.memoizedState;if(null!==n&&(null===(n=n.dehydrated)||"$?"===n.data||"$!"===n.data))return t}else if(19===t.tag&&void 0!==t.memoizedProps.revealOrder){if(0!==(128&t.flags))return t}else if(null!==t.child){t.child.return=t,t=t.child;continue}if(t===e)break;for(;null===t.sibling;){if(null===t.return||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var na=[];function ra(){for(var e=0;e<na.length;e++)na[e]._workInProgressVersionPrimary=null;na.length=0}var ia=b.ReactCurrentDispatcher,oa=b.ReactCurrentBatchConfig,aa=0,sa=null,la=null,ca=null,da=!1,ua=!1,pa=0,ha=0;function ma(){throw Error(o(321))}function fa(e,t){if(null===t)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!sr(e[n],t[n]))return!1;return!0}function ga(e,t,n,r,i,a){if(aa=a,sa=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,ia.current=null===e||null===e.memoizedState?Ja:es,e=n(r,i),ua){a=0;do{if(ua=!1,pa=0,25<=a)throw Error(o(301));a+=1,ca=la=null,t.updateQueue=null,ia.current=ts,e=n(r,i)}while(ua)}if(ia.current=Qa,t=null!==la&&null!==la.next,aa=0,ca=la=sa=null,da=!1,t)throw Error(o(300));return e}function va(){var e=0!==pa;return pa=0,e}function xa(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return null===ca?sa.memoizedState=ca=e:ca=ca.next=e,ca}function ya(){if(null===la){var e=sa.alternate;e=null!==e?e.memoizedState:null}else e=la.next;var t=null===ca?sa.memoizedState:ca.next;if(null!==t)ca=t,la=e;else{if(null===e)throw Error(o(310));e={memoizedState:(la=e).memoizedState,baseState:la.baseState,baseQueue:la.baseQueue,queue:la.queue,next:null},null===ca?sa.memoizedState=ca=e:ca=ca.next=e}return ca}function ba(e,t){return"function"===typeof t?t(e):t}function ja(e){var t=ya(),n=t.queue;if(null===n)throw Error(o(311));n.lastRenderedReducer=e;var r=la,i=r.baseQueue,a=n.pending;if(null!==a){if(null!==i){var s=i.next;i.next=a.next,a.next=s}r.baseQueue=i=a,n.pending=null}if(null!==i){a=i.next,r=r.baseState;var l=s=null,c=null,d=a;do{var u=d.lane;if((aa&u)===u)null!==c&&(c=c.next={lane:0,action:d.action,hasEagerState:d.hasEagerState,eagerState:d.eagerState,next:null}),r=d.hasEagerState?d.eagerState:e(r,d.action);else{var p={lane:u,action:d.action,hasEagerState:d.hasEagerState,eagerState:d.eagerState,next:null};null===c?(l=c=p,s=r):c=c.next=p,sa.lanes|=u,Ll|=u}d=d.next}while(null!==d&&d!==a);null===c?s=r:c.next=l,sr(r,t.memoizedState)||(ys=!0),t.memoizedState=r,t.baseState=s,t.baseQueue=c,n.lastRenderedState=r}if(null!==(e=n.interleaved)){i=e;do{a=i.lane,sa.lanes|=a,Ll|=a,i=i.next}while(i!==e)}else null===i&&(n.lanes=0);return[t.memoizedState,n.dispatch]}function _a(e){var t=ya(),n=t.queue;if(null===n)throw Error(o(311));n.lastRenderedReducer=e;var r=n.dispatch,i=n.pending,a=t.memoizedState;if(null!==i){n.pending=null;var s=i=i.next;do{a=e(a,s.action),s=s.next}while(s!==i);sr(a,t.memoizedState)||(ys=!0),t.memoizedState=a,null===t.baseQueue&&(t.baseState=a),n.lastRenderedState=a}return[a,r]}function Ca(){}function wa(e,t){var n=sa,r=ya(),i=t(),a=!sr(r.memoizedState,i);if(a&&(r.memoizedState=i,ys=!0),r=r.queue,La(ka.bind(null,n,r,e),[e]),r.getSnapshot!==t||a||null!==ca&&1&ca.memoizedState.tag){if(n.flags|=2048,Oa(9,Aa.bind(null,n,r,i,t),void 0,null),null===El)throw Error(o(349));0!==(30&aa)||Sa(n,t,i)}return i}function Sa(e,t,n){e.flags|=16384,e={getSnapshot:t,value:n},null===(t=sa.updateQueue)?(t={lastEffect:null,stores:null},sa.updateQueue=t,t.stores=[e]):null===(n=t.stores)?t.stores=[e]:n.push(e)}function Aa(e,t,n,r){t.value=n,t.getSnapshot=r,Ta(t)&&Ea(e)}function ka(e,t,n){return n(function(){Ta(t)&&Ea(e)})}function Ta(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!sr(e,n)}catch(r){return!0}}function Ea(e){var t=No(e,1);null!==t&&nc(t,e,1,-1)}function Ma(e){var t=xa();return"function"===typeof e&&(e=e()),t.memoizedState=t.baseState=e,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:ba,lastRenderedState:e},t.queue=e,e=e.dispatch=Ya.bind(null,sa,e),[t.memoizedState,e]}function Oa(e,t,n,r){return e={tag:e,create:t,destroy:n,deps:r,next:null},null===(t=sa.updateQueue)?(t={lastEffect:null,stores:null},sa.updateQueue=t,t.lastEffect=e.next=e):null===(n=t.lastEffect)?t.lastEffect=e.next=e:(r=n.next,n.next=e,e.next=r,t.lastEffect=e),e}function Ra(){return ya().memoizedState}function Pa(e,t,n,r){var i=xa();sa.flags|=e,i.memoizedState=Oa(1|t,n,void 0,void 0===r?null:r)}function Da(e,t,n,r){var i=ya();r=void 0===r?null:r;var o=void 0;if(null!==la){var a=la.memoizedState;if(o=a.destroy,null!==r&&fa(r,a.deps))return void(i.memoizedState=Oa(t,n,o,r))}sa.flags|=e,i.memoizedState=Oa(1|t,n,o,r)}function Na(e,t){return Pa(8390656,8,e,t)}function La(e,t){return Da(2048,8,e,t)}function Ia(e,t){return Da(4,2,e,t)}function Fa(e,t){return Da(4,4,e,t)}function $a(e,t){return"function"===typeof t?(e=e(),t(e),function(){t(null)}):null!==t&&void 0!==t?(e=e(),t.current=e,function(){t.current=null}):void 0}function Ba(e,t,n){return n=null!==n&&void 0!==n?n.concat([e]):null,Da(4,4,$a.bind(null,t,e),n)}function za(){}function Ha(e,t){var n=ya();t=void 0===t?null:t;var r=n.memoizedState;return null!==r&&null!==t&&fa(t,r[1])?r[0]:(n.memoizedState=[e,t],e)}function Wa(e,t){var n=ya();t=void 0===t?null:t;var r=n.memoizedState;return null!==r&&null!==t&&fa(t,r[1])?r[0]:(e=e(),n.memoizedState=[e,t],e)}function Ua(e,t,n){return 0===(21&aa)?(e.baseState&&(e.baseState=!1,ys=!0),e.memoizedState=n):(sr(n,t)||(n=ft(),sa.lanes|=n,Ll|=n,e.baseState=!0),t)}function Va(e,t){var n=yt;yt=0!==n&&4>n?n:4,e(!0);var r=oa.transition;oa.transition={};try{e(!1),t()}finally{yt=n,oa.transition=r}}function Ga(){return ya().memoizedState}function qa(e,t,n){var r=tc(e);if(n={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null},Za(e))Ka(t,n);else if(null!==(n=Do(e,t,n,r))){nc(n,e,r,ec()),Xa(n,t,r)}}function Ya(e,t,n){var r=tc(e),i={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null};if(Za(e))Ka(t,i);else{var o=e.alternate;if(0===e.lanes&&(null===o||0===o.lanes)&&null!==(o=t.lastRenderedReducer))try{var a=t.lastRenderedState,s=o(a,n);if(i.hasEagerState=!0,i.eagerState=s,sr(s,a)){var l=t.interleaved;return null===l?(i.next=i,Po(t)):(i.next=l.next,l.next=i),void(t.interleaved=i)}}catch(c){}null!==(n=Do(e,t,i,r))&&(nc(n,e,r,i=ec()),Xa(n,t,r))}}function Za(e){var t=e.alternate;return e===sa||null!==t&&t===sa}function Ka(e,t){ua=da=!0;var n=e.pending;null===n?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function Xa(e,t,n){if(0!==(4194240&n)){var r=t.lanes;n|=r&=e.pendingLanes,t.lanes=n,xt(e,n)}}var Qa={readContext:Oo,useCallback:ma,useContext:ma,useEffect:ma,useImperativeHandle:ma,useInsertionEffect:ma,useLayoutEffect:ma,useMemo:ma,useReducer:ma,useRef:ma,useState:ma,useDebugValue:ma,useDeferredValue:ma,useTransition:ma,useMutableSource:ma,useSyncExternalStore:ma,useId:ma,unstable_isNewReconciler:!1},Ja={readContext:Oo,useCallback:function(e,t){return xa().memoizedState=[e,void 0===t?null:t],e},useContext:Oo,useEffect:Na,useImperativeHandle:function(e,t,n){return n=null!==n&&void 0!==n?n.concat([e]):null,Pa(4194308,4,$a.bind(null,t,e),n)},useLayoutEffect:function(e,t){return Pa(4194308,4,e,t)},useInsertionEffect:function(e,t){return Pa(4,2,e,t)},useMemo:function(e,t){var n=xa();return t=void 0===t?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var r=xa();return t=void 0!==n?n(t):t,r.memoizedState=r.baseState=t,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:t},r.queue=e,e=e.dispatch=qa.bind(null,sa,e),[r.memoizedState,e]},useRef:function(e){return e={current:e},xa().memoizedState=e},useState:Ma,useDebugValue:za,useDeferredValue:function(e){return xa().memoizedState=e},useTransition:function(){var e=Ma(!1),t=e[0];return e=Va.bind(null,e[1]),xa().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,n){var r=sa,i=xa();if(io){if(void 0===n)throw Error(o(407));n=n()}else{if(n=t(),null===El)throw Error(o(349));0!==(30&aa)||Sa(r,t,n)}i.memoizedState=n;var a={value:n,getSnapshot:t};return i.queue=a,Na(ka.bind(null,r,a,e),[e]),r.flags|=2048,Oa(9,Aa.bind(null,r,a,n,t),void 0,null),n},useId:function(){var e=xa(),t=El.identifierPrefix;if(io){var n=Xi;t=":"+t+"R"+(n=(Ki&~(1<<32-at(Ki)-1)).toString(32)+n),0<(n=pa++)&&(t+="H"+n.toString(32)),t+=":"}else t=":"+t+"r"+(n=ha++).toString(32)+":";return e.memoizedState=t},unstable_isNewReconciler:!1},es={readContext:Oo,useCallback:Ha,useContext:Oo,useEffect:La,useImperativeHandle:Ba,useInsertionEffect:Ia,useLayoutEffect:Fa,useMemo:Wa,useReducer:ja,useRef:Ra,useState:function(){return ja(ba)},useDebugValue:za,useDeferredValue:function(e){return Ua(ya(),la.memoizedState,e)},useTransition:function(){return[ja(ba)[0],ya().memoizedState]},useMutableSource:Ca,useSyncExternalStore:wa,useId:Ga,unstable_isNewReconciler:!1},ts={readContext:Oo,useCallback:Ha,useContext:Oo,useEffect:La,useImperativeHandle:Ba,useInsertionEffect:Ia,useLayoutEffect:Fa,useMemo:Wa,useReducer:_a,useRef:Ra,useState:function(){return _a(ba)},useDebugValue:za,useDeferredValue:function(e){var t=ya();return null===la?t.memoizedState=e:Ua(t,la.memoizedState,e)},useTransition:function(){return[_a(ba)[0],ya().memoizedState]},useMutableSource:Ca,useSyncExternalStore:wa,useId:Ga,unstable_isNewReconciler:!1};function ns(e,t){if(e&&e.defaultProps){for(var n in t=I({},t),e=e.defaultProps)void 0===t[n]&&(t[n]=e[n]);return t}return t}function rs(e,t,n,r){n=null===(n=n(r,t=e.memoizedState))||void 0===n?t:I({},t,n),e.memoizedState=n,0===e.lanes&&(e.updateQueue.baseState=n)}var is={isMounted:function(e){return!!(e=e._reactInternals)&&He(e)===e},enqueueSetState:function(e,t,n){e=e._reactInternals;var r=ec(),i=tc(e),o=$o(r,i);o.payload=t,void 0!==n&&null!==n&&(o.callback=n),null!==(t=Bo(e,o,i))&&(nc(t,e,i,r),zo(t,e,i))},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var r=ec(),i=tc(e),o=$o(r,i);o.tag=1,o.payload=t,void 0!==n&&null!==n&&(o.callback=n),null!==(t=Bo(e,o,i))&&(nc(t,e,i,r),zo(t,e,i))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=ec(),r=tc(e),i=$o(n,r);i.tag=2,void 0!==t&&null!==t&&(i.callback=t),null!==(t=Bo(e,i,r))&&(nc(t,e,r,n),zo(t,e,r))}};function os(e,t,n,r,i,o,a){return"function"===typeof(e=e.stateNode).shouldComponentUpdate?e.shouldComponentUpdate(r,o,a):!t.prototype||!t.prototype.isPureReactComponent||(!lr(n,r)||!lr(i,o))}function as(e,t,n){var r=!1,i=ki,o=t.contextType;return"object"===typeof o&&null!==o?o=Oo(o):(i=Ri(t)?Mi:Ti.current,o=(r=null!==(r=t.contextTypes)&&void 0!==r)?Oi(e,i):ki),t=new t(n,o),e.memoizedState=null!==t.state&&void 0!==t.state?t.state:null,t.updater=is,e.stateNode=t,t._reactInternals=e,r&&((e=e.stateNode).__reactInternalMemoizedUnmaskedChildContext=i,e.__reactInternalMemoizedMaskedChildContext=o),t}function ss(e,t,n,r){e=t.state,"function"===typeof t.componentWillReceiveProps&&t.componentWillReceiveProps(n,r),"function"===typeof t.UNSAFE_componentWillReceiveProps&&t.UNSAFE_componentWillReceiveProps(n,r),t.state!==e&&is.enqueueReplaceState(t,t.state,null)}function ls(e,t,n,r){var i=e.stateNode;i.props=n,i.state=e.memoizedState,i.refs={},Io(e);var o=t.contextType;"object"===typeof o&&null!==o?i.context=Oo(o):(o=Ri(t)?Mi:Ti.current,i.context=Oi(e,o)),i.state=e.memoizedState,"function"===typeof(o=t.getDerivedStateFromProps)&&(rs(e,t,o,n),i.state=e.memoizedState),"function"===typeof t.getDerivedStateFromProps||"function"===typeof i.getSnapshotBeforeUpdate||"function"!==typeof i.UNSAFE_componentWillMount&&"function"!==typeof i.componentWillMount||(t=i.state,"function"===typeof i.componentWillMount&&i.componentWillMount(),"function"===typeof i.UNSAFE_componentWillMount&&i.UNSAFE_componentWillMount(),t!==i.state&&is.enqueueReplaceState(i,i.state,null),Wo(e,n,i,r),i.state=e.memoizedState),"function"===typeof i.componentDidMount&&(e.flags|=4194308)}function cs(e,t){try{var n="",r=t;do{n+=z(r),r=r.return}while(r);var i=n}catch(o){i="\nError generating stack: "+o.message+"\n"+o.stack}return{value:e,source:t,stack:i,digest:null}}function ds(e,t,n){return{value:e,source:null,stack:null!=n?n:null,digest:null!=t?t:null}}function us(e,t){try{console.error(t.value)}catch(n){setTimeout(function(){throw n})}}var ps="function"===typeof WeakMap?WeakMap:Map;function hs(e,t,n){(n=$o(-1,n)).tag=3,n.payload={element:null};var r=t.value;return n.callback=function(){Ul||(Ul=!0,Vl=r),us(0,t)},n}function ms(e,t,n){(n=$o(-1,n)).tag=3;var r=e.type.getDerivedStateFromError;if("function"===typeof r){var i=t.value;n.payload=function(){return r(i)},n.callback=function(){us(0,t)}}var o=e.stateNode;return null!==o&&"function"===typeof o.componentDidCatch&&(n.callback=function(){us(0,t),"function"!==typeof r&&(null===Gl?Gl=new Set([this]):Gl.add(this));var e=t.stack;this.componentDidCatch(t.value,{componentStack:null!==e?e:""})}),n}function fs(e,t,n){var r=e.pingCache;if(null===r){r=e.pingCache=new ps;var i=new Set;r.set(t,i)}else void 0===(i=r.get(t))&&(i=new Set,r.set(t,i));i.has(n)||(i.add(n),e=Sc.bind(null,e,t,n),t.then(e,e))}function gs(e){do{var t;if((t=13===e.tag)&&(t=null===(t=e.memoizedState)||null!==t.dehydrated),t)return e;e=e.return}while(null!==e);return null}function vs(e,t,n,r,i){return 0===(1&e.mode)?(e===t?e.flags|=65536:(e.flags|=128,n.flags|=131072,n.flags&=-52805,1===n.tag&&(null===n.alternate?n.tag=17:((t=$o(-1,1)).tag=2,Bo(n,t,1))),n.lanes|=1),e):(e.flags|=65536,e.lanes=i,e)}var xs=b.ReactCurrentOwner,ys=!1;function bs(e,t,n,r){t.child=null===e?_o(t,null,n,r):jo(t,e.child,n,r)}function js(e,t,n,r,i){n=n.render;var o=t.ref;return Mo(t,i),r=ga(e,t,n,r,o,i),n=va(),null===e||ys?(io&&n&&eo(t),t.flags|=1,bs(e,t,r,i),t.child):(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~i,Us(e,t,i))}function _s(e,t,n,r,i){if(null===e){var o=n.type;return"function"!==typeof o||Rc(o)||void 0!==o.defaultProps||null!==n.compare||void 0!==n.defaultProps?((e=Dc(n.type,null,r,t,t.mode,i)).ref=t.ref,e.return=t,t.child=e):(t.tag=15,t.type=o,Cs(e,t,o,r,i))}if(o=e.child,0===(e.lanes&i)){var a=o.memoizedProps;if((n=null!==(n=n.compare)?n:lr)(a,r)&&e.ref===t.ref)return Us(e,t,i)}return t.flags|=1,(e=Pc(o,r)).ref=t.ref,e.return=t,t.child=e}function Cs(e,t,n,r,i){if(null!==e){var o=e.memoizedProps;if(lr(o,r)&&e.ref===t.ref){if(ys=!1,t.pendingProps=r=o,0===(e.lanes&i))return t.lanes=e.lanes,Us(e,t,i);0!==(131072&e.flags)&&(ys=!0)}}return As(e,t,n,r,i)}function ws(e,t,n){var r=t.pendingProps,i=r.children,o=null!==e?e.memoizedState:null;if("hidden"===r.mode)if(0===(1&t.mode))t.memoizedState={baseLanes:0,cachePool:null,transitions:null},Ai(Pl,Rl),Rl|=n;else{if(0===(1073741824&n))return e=null!==o?o.baseLanes|n:n,t.lanes=t.childLanes=1073741824,t.memoizedState={baseLanes:e,cachePool:null,transitions:null},t.updateQueue=null,Ai(Pl,Rl),Rl|=e,null;t.memoizedState={baseLanes:0,cachePool:null,transitions:null},r=null!==o?o.baseLanes:n,Ai(Pl,Rl),Rl|=r}else null!==o?(r=o.baseLanes|n,t.memoizedState=null):r=n,Ai(Pl,Rl),Rl|=r;return bs(e,t,i,n),t.child}function Ss(e,t){var n=t.ref;(null===e&&null!==n||null!==e&&e.ref!==n)&&(t.flags|=512,t.flags|=2097152)}function As(e,t,n,r,i){var o=Ri(n)?Mi:Ti.current;return o=Oi(t,o),Mo(t,i),n=ga(e,t,n,r,o,i),r=va(),null===e||ys?(io&&r&&eo(t),t.flags|=1,bs(e,t,n,i),t.child):(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~i,Us(e,t,i))}function ks(e,t,n,r,i){if(Ri(n)){var o=!0;Li(t)}else o=!1;if(Mo(t,i),null===t.stateNode)Ws(e,t),as(t,n,r),ls(t,n,r,i),r=!0;else if(null===e){var a=t.stateNode,s=t.memoizedProps;a.props=s;var l=a.context,c=n.contextType;"object"===typeof c&&null!==c?c=Oo(c):c=Oi(t,c=Ri(n)?Mi:Ti.current);var d=n.getDerivedStateFromProps,u="function"===typeof d||"function"===typeof a.getSnapshotBeforeUpdate;u||"function"!==typeof a.UNSAFE_componentWillReceiveProps&&"function"!==typeof a.componentWillReceiveProps||(s!==r||l!==c)&&ss(t,a,r,c),Lo=!1;var p=t.memoizedState;a.state=p,Wo(t,r,a,i),l=t.memoizedState,s!==r||p!==l||Ei.current||Lo?("function"===typeof d&&(rs(t,n,d,r),l=t.memoizedState),(s=Lo||os(t,n,s,r,p,l,c))?(u||"function"!==typeof a.UNSAFE_componentWillMount&&"function"!==typeof a.componentWillMount||("function"===typeof a.componentWillMount&&a.componentWillMount(),"function"===typeof a.UNSAFE_componentWillMount&&a.UNSAFE_componentWillMount()),"function"===typeof a.componentDidMount&&(t.flags|=4194308)):("function"===typeof a.componentDidMount&&(t.flags|=4194308),t.memoizedProps=r,t.memoizedState=l),a.props=r,a.state=l,a.context=c,r=s):("function"===typeof a.componentDidMount&&(t.flags|=4194308),r=!1)}else{a=t.stateNode,Fo(e,t),s=t.memoizedProps,c=t.type===t.elementType?s:ns(t.type,s),a.props=c,u=t.pendingProps,p=a.context,"object"===typeof(l=n.contextType)&&null!==l?l=Oo(l):l=Oi(t,l=Ri(n)?Mi:Ti.current);var h=n.getDerivedStateFromProps;(d="function"===typeof h||"function"===typeof a.getSnapshotBeforeUpdate)||"function"!==typeof a.UNSAFE_componentWillReceiveProps&&"function"!==typeof a.componentWillReceiveProps||(s!==u||p!==l)&&ss(t,a,r,l),Lo=!1,p=t.memoizedState,a.state=p,Wo(t,r,a,i);var m=t.memoizedState;s!==u||p!==m||Ei.current||Lo?("function"===typeof h&&(rs(t,n,h,r),m=t.memoizedState),(c=Lo||os(t,n,c,r,p,m,l)||!1)?(d||"function"!==typeof a.UNSAFE_componentWillUpdate&&"function"!==typeof a.componentWillUpdate||("function"===typeof a.componentWillUpdate&&a.componentWillUpdate(r,m,l),"function"===typeof a.UNSAFE_componentWillUpdate&&a.UNSAFE_componentWillUpdate(r,m,l)),"function"===typeof a.componentDidUpdate&&(t.flags|=4),"function"===typeof a.getSnapshotBeforeUpdate&&(t.flags|=1024)):("function"!==typeof a.componentDidUpdate||s===e.memoizedProps&&p===e.memoizedState||(t.flags|=4),"function"!==typeof a.getSnapshotBeforeUpdate||s===e.memoizedProps&&p===e.memoizedState||(t.flags|=1024),t.memoizedProps=r,t.memoizedState=m),a.props=r,a.state=m,a.context=l,r=c):("function"!==typeof a.componentDidUpdate||s===e.memoizedProps&&p===e.memoizedState||(t.flags|=4),"function"!==typeof a.getSnapshotBeforeUpdate||s===e.memoizedProps&&p===e.memoizedState||(t.flags|=1024),r=!1)}return Ts(e,t,n,r,o,i)}function Ts(e,t,n,r,i,o){Ss(e,t);var a=0!==(128&t.flags);if(!r&&!a)return i&&Ii(t,n,!1),Us(e,t,o);r=t.stateNode,xs.current=t;var s=a&&"function"!==typeof n.getDerivedStateFromError?null:r.render();return t.flags|=1,null!==e&&a?(t.child=jo(t,e.child,null,o),t.child=jo(t,null,s,o)):bs(e,t,s,o),t.memoizedState=r.state,i&&Ii(t,n,!0),t.child}function Es(e){var t=e.stateNode;t.pendingContext?Di(0,t.pendingContext,t.pendingContext!==t.context):t.context&&Di(0,t.context,!1),Ko(e,t.containerInfo)}function Ms(e,t,n,r,i){return mo(),fo(i),t.flags|=256,bs(e,t,n,r),t.child}var Os,Rs,Ps,Ds,Ns={dehydrated:null,treeContext:null,retryLane:0};function Ls(e){return{baseLanes:e,cachePool:null,transitions:null}}function Is(e,t,n){var r,i=t.pendingProps,a=ea.current,s=!1,l=0!==(128&t.flags);if((r=l)||(r=(null===e||null!==e.memoizedState)&&0!==(2&a)),r?(s=!0,t.flags&=-129):null!==e&&null===e.memoizedState||(a|=1),Ai(ea,1&a),null===e)return co(t),null!==(e=t.memoizedState)&&null!==(e=e.dehydrated)?(0===(1&t.mode)?t.lanes=1:"$!"===e.data?t.lanes=8:t.lanes=1073741824,null):(l=i.children,e=i.fallback,s?(i=t.mode,s=t.child,l={mode:"hidden",children:l},0===(1&i)&&null!==s?(s.childLanes=0,s.pendingProps=l):s=Lc(l,i,0,null),e=Nc(e,i,n,null),s.return=t,e.return=t,s.sibling=e,t.child=s,t.child.memoizedState=Ls(n),t.memoizedState=Ns,e):Fs(t,l));if(null!==(a=e.memoizedState)&&null!==(r=a.dehydrated))return function(e,t,n,r,i,a,s){if(n)return 256&t.flags?(t.flags&=-257,$s(e,t,s,r=ds(Error(o(422))))):null!==t.memoizedState?(t.child=e.child,t.flags|=128,null):(a=r.fallback,i=t.mode,r=Lc({mode:"visible",children:r.children},i,0,null),(a=Nc(a,i,s,null)).flags|=2,r.return=t,a.return=t,r.sibling=a,t.child=r,0!==(1&t.mode)&&jo(t,e.child,null,s),t.child.memoizedState=Ls(s),t.memoizedState=Ns,a);if(0===(1&t.mode))return $s(e,t,s,null);if("$!"===i.data){if(r=i.nextSibling&&i.nextSibling.dataset)var l=r.dgst;return r=l,$s(e,t,s,r=ds(a=Error(o(419)),r,void 0))}if(l=0!==(s&e.childLanes),ys||l){if(null!==(r=El)){switch(s&-s){case 4:i=2;break;case 16:i=8;break;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:i=32;break;case 536870912:i=268435456;break;default:i=0}0!==(i=0!==(i&(r.suspendedLanes|s))?0:i)&&i!==a.retryLane&&(a.retryLane=i,No(e,i),nc(r,e,i,-1))}return fc(),$s(e,t,s,r=ds(Error(o(421))))}return"$?"===i.data?(t.flags|=128,t.child=e.child,t=kc.bind(null,e),i._reactRetry=t,null):(e=a.treeContext,ro=ci(i.nextSibling),no=t,io=!0,oo=null,null!==e&&(qi[Yi++]=Ki,qi[Yi++]=Xi,qi[Yi++]=Zi,Ki=e.id,Xi=e.overflow,Zi=t),t=Fs(t,r.children),t.flags|=4096,t)}(e,t,l,i,r,a,n);if(s){s=i.fallback,l=t.mode,r=(a=e.child).sibling;var c={mode:"hidden",children:i.children};return 0===(1&l)&&t.child!==a?((i=t.child).childLanes=0,i.pendingProps=c,t.deletions=null):(i=Pc(a,c)).subtreeFlags=14680064&a.subtreeFlags,null!==r?s=Pc(r,s):(s=Nc(s,l,n,null)).flags|=2,s.return=t,i.return=t,i.sibling=s,t.child=i,i=s,s=t.child,l=null===(l=e.child.memoizedState)?Ls(n):{baseLanes:l.baseLanes|n,cachePool:null,transitions:l.transitions},s.memoizedState=l,s.childLanes=e.childLanes&~n,t.memoizedState=Ns,i}return e=(s=e.child).sibling,i=Pc(s,{mode:"visible",children:i.children}),0===(1&t.mode)&&(i.lanes=n),i.return=t,i.sibling=null,null!==e&&(null===(n=t.deletions)?(t.deletions=[e],t.flags|=16):n.push(e)),t.child=i,t.memoizedState=null,i}function Fs(e,t){return(t=Lc({mode:"visible",children:t},e.mode,0,null)).return=e,e.child=t}function $s(e,t,n,r){return null!==r&&fo(r),jo(t,e.child,null,n),(e=Fs(t,t.pendingProps.children)).flags|=2,t.memoizedState=null,e}function Bs(e,t,n){e.lanes|=t;var r=e.alternate;null!==r&&(r.lanes|=t),Eo(e.return,t,n)}function zs(e,t,n,r,i){var o=e.memoizedState;null===o?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:r,tail:n,tailMode:i}:(o.isBackwards=t,o.rendering=null,o.renderingStartTime=0,o.last=r,o.tail=n,o.tailMode=i)}function Hs(e,t,n){var r=t.pendingProps,i=r.revealOrder,o=r.tail;if(bs(e,t,r.children,n),0!==(2&(r=ea.current)))r=1&r|2,t.flags|=128;else{if(null!==e&&0!==(128&e.flags))e:for(e=t.child;null!==e;){if(13===e.tag)null!==e.memoizedState&&Bs(e,n,t);else if(19===e.tag)Bs(e,n,t);else if(null!==e.child){e.child.return=e,e=e.child;continue}if(e===t)break e;for(;null===e.sibling;){if(null===e.return||e.return===t)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}r&=1}if(Ai(ea,r),0===(1&t.mode))t.memoizedState=null;else switch(i){case"forwards":for(n=t.child,i=null;null!==n;)null!==(e=n.alternate)&&null===ta(e)&&(i=n),n=n.sibling;null===(n=i)?(i=t.child,t.child=null):(i=n.sibling,n.sibling=null),zs(t,!1,i,n,o);break;case"backwards":for(n=null,i=t.child,t.child=null;null!==i;){if(null!==(e=i.alternate)&&null===ta(e)){t.child=i;break}e=i.sibling,i.sibling=n,n=i,i=e}zs(t,!0,n,null,o);break;case"together":zs(t,!1,null,null,void 0);break;default:t.memoizedState=null}return t.child}function Ws(e,t){0===(1&t.mode)&&null!==e&&(e.alternate=null,t.alternate=null,t.flags|=2)}function Us(e,t,n){if(null!==e&&(t.dependencies=e.dependencies),Ll|=t.lanes,0===(n&t.childLanes))return null;if(null!==e&&t.child!==e.child)throw Error(o(153));if(null!==t.child){for(n=Pc(e=t.child,e.pendingProps),t.child=n,n.return=t;null!==e.sibling;)e=e.sibling,(n=n.sibling=Pc(e,e.pendingProps)).return=t;n.sibling=null}return t.child}function Vs(e,t){if(!io)switch(e.tailMode){case"hidden":t=e.tail;for(var n=null;null!==t;)null!==t.alternate&&(n=t),t=t.sibling;null===n?e.tail=null:n.sibling=null;break;case"collapsed":n=e.tail;for(var r=null;null!==n;)null!==n.alternate&&(r=n),n=n.sibling;null===r?t||null===e.tail?e.tail=null:e.tail.sibling=null:r.sibling=null}}function Gs(e){var t=null!==e.alternate&&e.alternate.child===e.child,n=0,r=0;if(t)for(var i=e.child;null!==i;)n|=i.lanes|i.childLanes,r|=14680064&i.subtreeFlags,r|=14680064&i.flags,i.return=e,i=i.sibling;else for(i=e.child;null!==i;)n|=i.lanes|i.childLanes,r|=i.subtreeFlags,r|=i.flags,i.return=e,i=i.sibling;return e.subtreeFlags|=r,e.childLanes=n,t}function qs(e,t,n){var r=t.pendingProps;switch(to(t),t.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Gs(t),null;case 1:case 17:return Ri(t.type)&&Pi(),Gs(t),null;case 3:return r=t.stateNode,Xo(),Si(Ei),Si(Ti),ra(),r.pendingContext&&(r.context=r.pendingContext,r.pendingContext=null),null!==e&&null!==e.child||(po(t)?t.flags|=4:null===e||e.memoizedState.isDehydrated&&0===(256&t.flags)||(t.flags|=1024,null!==oo&&(ac(oo),oo=null))),Rs(e,t),Gs(t),null;case 5:Jo(t);var i=Zo(Yo.current);if(n=t.type,null!==e&&null!=t.stateNode)Ps(e,t,n,r,i),e.ref!==t.ref&&(t.flags|=512,t.flags|=2097152);else{if(!r){if(null===t.stateNode)throw Error(o(166));return Gs(t),null}if(e=Zo(Go.current),po(t)){r=t.stateNode,n=t.type;var a=t.memoizedProps;switch(r[pi]=t,r[hi]=a,e=0!==(1&t.mode),n){case"dialog":$r("cancel",r),$r("close",r);break;case"iframe":case"object":case"embed":$r("load",r);break;case"video":case"audio":for(i=0;i<Nr.length;i++)$r(Nr[i],r);break;case"source":$r("error",r);break;case"img":case"image":case"link":$r("error",r),$r("load",r);break;case"details":$r("toggle",r);break;case"input":K(r,a),$r("invalid",r);break;case"select":r._wrapperState={wasMultiple:!!a.multiple},$r("invalid",r);break;case"textarea":ie(r,a),$r("invalid",r)}for(var l in xe(n,a),i=null,a)if(a.hasOwnProperty(l)){var c=a[l];"children"===l?"string"===typeof c?r.textContent!==c&&(!0!==a.suppressHydrationWarning&&Qr(r.textContent,c,e),i=["children",c]):"number"===typeof c&&r.textContent!==""+c&&(!0!==a.suppressHydrationWarning&&Qr(r.textContent,c,e),i=["children",""+c]):s.hasOwnProperty(l)&&null!=c&&"onScroll"===l&&$r("scroll",r)}switch(n){case"input":G(r),J(r,a,!0);break;case"textarea":G(r),ae(r);break;case"select":case"option":break;default:"function"===typeof a.onClick&&(r.onclick=Jr)}r=i,t.updateQueue=r,null!==r&&(t.flags|=4)}else{l=9===i.nodeType?i:i.ownerDocument,"http://www.w3.org/1999/xhtml"===e&&(e=se(n)),"http://www.w3.org/1999/xhtml"===e?"script"===n?((e=l.createElement("div")).innerHTML="<script><\/script>",e=e.removeChild(e.firstChild)):"string"===typeof r.is?e=l.createElement(n,{is:r.is}):(e=l.createElement(n),"select"===n&&(l=e,r.multiple?l.multiple=!0:r.size&&(l.size=r.size))):e=l.createElementNS(e,n),e[pi]=t,e[hi]=r,Os(e,t,!1,!1),t.stateNode=e;e:{switch(l=ye(n,r),n){case"dialog":$r("cancel",e),$r("close",e),i=r;break;case"iframe":case"object":case"embed":$r("load",e),i=r;break;case"video":case"audio":for(i=0;i<Nr.length;i++)$r(Nr[i],e);i=r;break;case"source":$r("error",e),i=r;break;case"img":case"image":case"link":$r("error",e),$r("load",e),i=r;break;case"details":$r("toggle",e),i=r;break;case"input":K(e,r),i=Z(e,r),$r("invalid",e);break;case"option":default:i=r;break;case"select":e._wrapperState={wasMultiple:!!r.multiple},i=I({},r,{value:void 0}),$r("invalid",e);break;case"textarea":ie(e,r),i=re(e,r),$r("invalid",e)}for(a in xe(n,i),c=i)if(c.hasOwnProperty(a)){var d=c[a];"style"===a?ge(e,d):"dangerouslySetInnerHTML"===a?null!=(d=d?d.__html:void 0)&&ue(e,d):"children"===a?"string"===typeof d?("textarea"!==n||""!==d)&&pe(e,d):"number"===typeof d&&pe(e,""+d):"suppressContentEditableWarning"!==a&&"suppressHydrationWarning"!==a&&"autoFocus"!==a&&(s.hasOwnProperty(a)?null!=d&&"onScroll"===a&&$r("scroll",e):null!=d&&y(e,a,d,l))}switch(n){case"input":G(e),J(e,r,!1);break;case"textarea":G(e),ae(e);break;case"option":null!=r.value&&e.setAttribute("value",""+U(r.value));break;case"select":e.multiple=!!r.multiple,null!=(a=r.value)?ne(e,!!r.multiple,a,!1):null!=r.defaultValue&&ne(e,!!r.multiple,r.defaultValue,!0);break;default:"function"===typeof i.onClick&&(e.onclick=Jr)}switch(n){case"button":case"input":case"select":case"textarea":r=!!r.autoFocus;break e;case"img":r=!0;break e;default:r=!1}}r&&(t.flags|=4)}null!==t.ref&&(t.flags|=512,t.flags|=2097152)}return Gs(t),null;case 6:if(e&&null!=t.stateNode)Ds(e,t,e.memoizedProps,r);else{if("string"!==typeof r&&null===t.stateNode)throw Error(o(166));if(n=Zo(Yo.current),Zo(Go.current),po(t)){if(r=t.stateNode,n=t.memoizedProps,r[pi]=t,(a=r.nodeValue!==n)&&null!==(e=no))switch(e.tag){case 3:Qr(r.nodeValue,n,0!==(1&e.mode));break;case 5:!0!==e.memoizedProps.suppressHydrationWarning&&Qr(r.nodeValue,n,0!==(1&e.mode))}a&&(t.flags|=4)}else(r=(9===n.nodeType?n:n.ownerDocument).createTextNode(r))[pi]=t,t.stateNode=r}return Gs(t),null;case 13:if(Si(ea),r=t.memoizedState,null===e||null!==e.memoizedState&&null!==e.memoizedState.dehydrated){if(io&&null!==ro&&0!==(1&t.mode)&&0===(128&t.flags))ho(),mo(),t.flags|=98560,a=!1;else if(a=po(t),null!==r&&null!==r.dehydrated){if(null===e){if(!a)throw Error(o(318));if(!(a=null!==(a=t.memoizedState)?a.dehydrated:null))throw Error(o(317));a[pi]=t}else mo(),0===(128&t.flags)&&(t.memoizedState=null),t.flags|=4;Gs(t),a=!1}else null!==oo&&(ac(oo),oo=null),a=!0;if(!a)return 65536&t.flags?t:null}return 0!==(128&t.flags)?(t.lanes=n,t):((r=null!==r)!==(null!==e&&null!==e.memoizedState)&&r&&(t.child.flags|=8192,0!==(1&t.mode)&&(null===e||0!==(1&ea.current)?0===Dl&&(Dl=3):fc())),null!==t.updateQueue&&(t.flags|=4),Gs(t),null);case 4:return Xo(),Rs(e,t),null===e&&Hr(t.stateNode.containerInfo),Gs(t),null;case 10:return To(t.type._context),Gs(t),null;case 19:if(Si(ea),null===(a=t.memoizedState))return Gs(t),null;if(r=0!==(128&t.flags),null===(l=a.rendering))if(r)Vs(a,!1);else{if(0!==Dl||null!==e&&0!==(128&e.flags))for(e=t.child;null!==e;){if(null!==(l=ta(e))){for(t.flags|=128,Vs(a,!1),null!==(r=l.updateQueue)&&(t.updateQueue=r,t.flags|=4),t.subtreeFlags=0,r=n,n=t.child;null!==n;)e=r,(a=n).flags&=14680066,null===(l=a.alternate)?(a.childLanes=0,a.lanes=e,a.child=null,a.subtreeFlags=0,a.memoizedProps=null,a.memoizedState=null,a.updateQueue=null,a.dependencies=null,a.stateNode=null):(a.childLanes=l.childLanes,a.lanes=l.lanes,a.child=l.child,a.subtreeFlags=0,a.deletions=null,a.memoizedProps=l.memoizedProps,a.memoizedState=l.memoizedState,a.updateQueue=l.updateQueue,a.type=l.type,e=l.dependencies,a.dependencies=null===e?null:{lanes:e.lanes,firstContext:e.firstContext}),n=n.sibling;return Ai(ea,1&ea.current|2),t.child}e=e.sibling}null!==a.tail&&Xe()>Hl&&(t.flags|=128,r=!0,Vs(a,!1),t.lanes=4194304)}else{if(!r)if(null!==(e=ta(l))){if(t.flags|=128,r=!0,null!==(n=e.updateQueue)&&(t.updateQueue=n,t.flags|=4),Vs(a,!0),null===a.tail&&"hidden"===a.tailMode&&!l.alternate&&!io)return Gs(t),null}else 2*Xe()-a.renderingStartTime>Hl&&1073741824!==n&&(t.flags|=128,r=!0,Vs(a,!1),t.lanes=4194304);a.isBackwards?(l.sibling=t.child,t.child=l):(null!==(n=a.last)?n.sibling=l:t.child=l,a.last=l)}return null!==a.tail?(t=a.tail,a.rendering=t,a.tail=t.sibling,a.renderingStartTime=Xe(),t.sibling=null,n=ea.current,Ai(ea,r?1&n|2:1&n),t):(Gs(t),null);case 22:case 23:return uc(),r=null!==t.memoizedState,null!==e&&null!==e.memoizedState!==r&&(t.flags|=8192),r&&0!==(1&t.mode)?0!==(1073741824&Rl)&&(Gs(t),6&t.subtreeFlags&&(t.flags|=8192)):Gs(t),null;case 24:case 25:return null}throw Error(o(156,t.tag))}function Ys(e,t){switch(to(t),t.tag){case 1:return Ri(t.type)&&Pi(),65536&(e=t.flags)?(t.flags=-65537&e|128,t):null;case 3:return Xo(),Si(Ei),Si(Ti),ra(),0!==(65536&(e=t.flags))&&0===(128&e)?(t.flags=-65537&e|128,t):null;case 5:return Jo(t),null;case 13:if(Si(ea),null!==(e=t.memoizedState)&&null!==e.dehydrated){if(null===t.alternate)throw Error(o(340));mo()}return 65536&(e=t.flags)?(t.flags=-65537&e|128,t):null;case 19:return Si(ea),null;case 4:return Xo(),null;case 10:return To(t.type._context),null;case 22:case 23:return uc(),null;default:return null}}Os=function(e,t){for(var n=t.child;null!==n;){if(5===n.tag||6===n.tag)e.appendChild(n.stateNode);else if(4!==n.tag&&null!==n.child){n.child.return=n,n=n.child;continue}if(n===t)break;for(;null===n.sibling;){if(null===n.return||n.return===t)return;n=n.return}n.sibling.return=n.return,n=n.sibling}},Rs=function(){},Ps=function(e,t,n,r){var i=e.memoizedProps;if(i!==r){e=t.stateNode,Zo(Go.current);var o,a=null;switch(n){case"input":i=Z(e,i),r=Z(e,r),a=[];break;case"select":i=I({},i,{value:void 0}),r=I({},r,{value:void 0}),a=[];break;case"textarea":i=re(e,i),r=re(e,r),a=[];break;default:"function"!==typeof i.onClick&&"function"===typeof r.onClick&&(e.onclick=Jr)}for(d in xe(n,r),n=null,i)if(!r.hasOwnProperty(d)&&i.hasOwnProperty(d)&&null!=i[d])if("style"===d){var l=i[d];for(o in l)l.hasOwnProperty(o)&&(n||(n={}),n[o]="")}else"dangerouslySetInnerHTML"!==d&&"children"!==d&&"suppressContentEditableWarning"!==d&&"suppressHydrationWarning"!==d&&"autoFocus"!==d&&(s.hasOwnProperty(d)?a||(a=[]):(a=a||[]).push(d,null));for(d in r){var c=r[d];if(l=null!=i?i[d]:void 0,r.hasOwnProperty(d)&&c!==l&&(null!=c||null!=l))if("style"===d)if(l){for(o in l)!l.hasOwnProperty(o)||c&&c.hasOwnProperty(o)||(n||(n={}),n[o]="");for(o in c)c.hasOwnProperty(o)&&l[o]!==c[o]&&(n||(n={}),n[o]=c[o])}else n||(a||(a=[]),a.push(d,n)),n=c;else"dangerouslySetInnerHTML"===d?(c=c?c.__html:void 0,l=l?l.__html:void 0,null!=c&&l!==c&&(a=a||[]).push(d,c)):"children"===d?"string"!==typeof c&&"number"!==typeof c||(a=a||[]).push(d,""+c):"suppressContentEditableWarning"!==d&&"suppressHydrationWarning"!==d&&(s.hasOwnProperty(d)?(null!=c&&"onScroll"===d&&$r("scroll",e),a||l===c||(a=[])):(a=a||[]).push(d,c))}n&&(a=a||[]).push("style",n);var d=a;(t.updateQueue=d)&&(t.flags|=4)}},Ds=function(e,t,n,r){n!==r&&(t.flags|=4)};var Zs=!1,Ks=!1,Xs="function"===typeof WeakSet?WeakSet:Set,Qs=null;function Js(e,t){var n=e.ref;if(null!==n)if("function"===typeof n)try{n(null)}catch(r){wc(e,t,r)}else n.current=null}function el(e,t,n){try{n()}catch(r){wc(e,t,r)}}var tl=!1;function nl(e,t,n){var r=t.updateQueue;if(null!==(r=null!==r?r.lastEffect:null)){var i=r=r.next;do{if((i.tag&e)===e){var o=i.destroy;i.destroy=void 0,void 0!==o&&el(t,n,o)}i=i.next}while(i!==r)}}function rl(e,t){if(null!==(t=null!==(t=t.updateQueue)?t.lastEffect:null)){var n=t=t.next;do{if((n.tag&e)===e){var r=n.create;n.destroy=r()}n=n.next}while(n!==t)}}function il(e){var t=e.ref;if(null!==t){var n=e.stateNode;e.tag,e=n,"function"===typeof t?t(e):t.current=e}}function ol(e){var t=e.alternate;null!==t&&(e.alternate=null,ol(t)),e.child=null,e.deletions=null,e.sibling=null,5===e.tag&&(null!==(t=e.stateNode)&&(delete t[pi],delete t[hi],delete t[fi],delete t[gi],delete t[vi])),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}function al(e){return 5===e.tag||3===e.tag||4===e.tag}function sl(e){e:for(;;){for(;null===e.sibling;){if(null===e.return||al(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;5!==e.tag&&6!==e.tag&&18!==e.tag;){if(2&e.flags)continue e;if(null===e.child||4===e.tag)continue e;e.child.return=e,e=e.child}if(!(2&e.flags))return e.stateNode}}function ll(e,t,n){var r=e.tag;if(5===r||6===r)e=e.stateNode,t?8===n.nodeType?n.parentNode.insertBefore(e,t):n.insertBefore(e,t):(8===n.nodeType?(t=n.parentNode).insertBefore(e,n):(t=n).appendChild(e),null!==(n=n._reactRootContainer)&&void 0!==n||null!==t.onclick||(t.onclick=Jr));else if(4!==r&&null!==(e=e.child))for(ll(e,t,n),e=e.sibling;null!==e;)ll(e,t,n),e=e.sibling}function cl(e,t,n){var r=e.tag;if(5===r||6===r)e=e.stateNode,t?n.insertBefore(e,t):n.appendChild(e);else if(4!==r&&null!==(e=e.child))for(cl(e,t,n),e=e.sibling;null!==e;)cl(e,t,n),e=e.sibling}var dl=null,ul=!1;function pl(e,t,n){for(n=n.child;null!==n;)hl(e,t,n),n=n.sibling}function hl(e,t,n){if(ot&&"function"===typeof ot.onCommitFiberUnmount)try{ot.onCommitFiberUnmount(it,n)}catch(s){}switch(n.tag){case 5:Ks||Js(n,t);case 6:var r=dl,i=ul;dl=null,pl(e,t,n),ul=i,null!==(dl=r)&&(ul?(e=dl,n=n.stateNode,8===e.nodeType?e.parentNode.removeChild(n):e.removeChild(n)):dl.removeChild(n.stateNode));break;case 18:null!==dl&&(ul?(e=dl,n=n.stateNode,8===e.nodeType?li(e.parentNode,n):1===e.nodeType&&li(e,n),Ht(e)):li(dl,n.stateNode));break;case 4:r=dl,i=ul,dl=n.stateNode.containerInfo,ul=!0,pl(e,t,n),dl=r,ul=i;break;case 0:case 11:case 14:case 15:if(!Ks&&(null!==(r=n.updateQueue)&&null!==(r=r.lastEffect))){i=r=r.next;do{var o=i,a=o.destroy;o=o.tag,void 0!==a&&(0!==(2&o)||0!==(4&o))&&el(n,t,a),i=i.next}while(i!==r)}pl(e,t,n);break;case 1:if(!Ks&&(Js(n,t),"function"===typeof(r=n.stateNode).componentWillUnmount))try{r.props=n.memoizedProps,r.state=n.memoizedState,r.componentWillUnmount()}catch(s){wc(n,t,s)}pl(e,t,n);break;case 21:pl(e,t,n);break;case 22:1&n.mode?(Ks=(r=Ks)||null!==n.memoizedState,pl(e,t,n),Ks=r):pl(e,t,n);break;default:pl(e,t,n)}}function ml(e){var t=e.updateQueue;if(null!==t){e.updateQueue=null;var n=e.stateNode;null===n&&(n=e.stateNode=new Xs),t.forEach(function(t){var r=Tc.bind(null,e,t);n.has(t)||(n.add(t),t.then(r,r))})}}function fl(e,t){var n=t.deletions;if(null!==n)for(var r=0;r<n.length;r++){var i=n[r];try{var a=e,s=t,l=s;e:for(;null!==l;){switch(l.tag){case 5:dl=l.stateNode,ul=!1;break e;case 3:case 4:dl=l.stateNode.containerInfo,ul=!0;break e}l=l.return}if(null===dl)throw Error(o(160));hl(a,s,i),dl=null,ul=!1;var c=i.alternate;null!==c&&(c.return=null),i.return=null}catch(d){wc(i,t,d)}}if(12854&t.subtreeFlags)for(t=t.child;null!==t;)gl(t,e),t=t.sibling}function gl(e,t){var n=e.alternate,r=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:if(fl(t,e),vl(e),4&r){try{nl(3,e,e.return),rl(3,e)}catch(g){wc(e,e.return,g)}try{nl(5,e,e.return)}catch(g){wc(e,e.return,g)}}break;case 1:fl(t,e),vl(e),512&r&&null!==n&&Js(n,n.return);break;case 5:if(fl(t,e),vl(e),512&r&&null!==n&&Js(n,n.return),32&e.flags){var i=e.stateNode;try{pe(i,"")}catch(g){wc(e,e.return,g)}}if(4&r&&null!=(i=e.stateNode)){var a=e.memoizedProps,s=null!==n?n.memoizedProps:a,l=e.type,c=e.updateQueue;if(e.updateQueue=null,null!==c)try{"input"===l&&"radio"===a.type&&null!=a.name&&X(i,a),ye(l,s);var d=ye(l,a);for(s=0;s<c.length;s+=2){var u=c[s],p=c[s+1];"style"===u?ge(i,p):"dangerouslySetInnerHTML"===u?ue(i,p):"children"===u?pe(i,p):y(i,u,p,d)}switch(l){case"input":Q(i,a);break;case"textarea":oe(i,a);break;case"select":var h=i._wrapperState.wasMultiple;i._wrapperState.wasMultiple=!!a.multiple;var m=a.value;null!=m?ne(i,!!a.multiple,m,!1):h!==!!a.multiple&&(null!=a.defaultValue?ne(i,!!a.multiple,a.defaultValue,!0):ne(i,!!a.multiple,a.multiple?[]:"",!1))}i[hi]=a}catch(g){wc(e,e.return,g)}}break;case 6:if(fl(t,e),vl(e),4&r){if(null===e.stateNode)throw Error(o(162));i=e.stateNode,a=e.memoizedProps;try{i.nodeValue=a}catch(g){wc(e,e.return,g)}}break;case 3:if(fl(t,e),vl(e),4&r&&null!==n&&n.memoizedState.isDehydrated)try{Ht(t.containerInfo)}catch(g){wc(e,e.return,g)}break;case 4:default:fl(t,e),vl(e);break;case 13:fl(t,e),vl(e),8192&(i=e.child).flags&&(a=null!==i.memoizedState,i.stateNode.isHidden=a,!a||null!==i.alternate&&null!==i.alternate.memoizedState||(zl=Xe())),4&r&&ml(e);break;case 22:if(u=null!==n&&null!==n.memoizedState,1&e.mode?(Ks=(d=Ks)||u,fl(t,e),Ks=d):fl(t,e),vl(e),8192&r){if(d=null!==e.memoizedState,(e.stateNode.isHidden=d)&&!u&&0!==(1&e.mode))for(Qs=e,u=e.child;null!==u;){for(p=Qs=u;null!==Qs;){switch(m=(h=Qs).child,h.tag){case 0:case 11:case 14:case 15:nl(4,h,h.return);break;case 1:Js(h,h.return);var f=h.stateNode;if("function"===typeof f.componentWillUnmount){r=h,n=h.return;try{t=r,f.props=t.memoizedProps,f.state=t.memoizedState,f.componentWillUnmount()}catch(g){wc(r,n,g)}}break;case 5:Js(h,h.return);break;case 22:if(null!==h.memoizedState){jl(p);continue}}null!==m?(m.return=h,Qs=m):jl(p)}u=u.sibling}e:for(u=null,p=e;;){if(5===p.tag){if(null===u){u=p;try{i=p.stateNode,d?"function"===typeof(a=i.style).setProperty?a.setProperty("display","none","important"):a.display="none":(l=p.stateNode,s=void 0!==(c=p.memoizedProps.style)&&null!==c&&c.hasOwnProperty("display")?c.display:null,l.style.display=fe("display",s))}catch(g){wc(e,e.return,g)}}}else if(6===p.tag){if(null===u)try{p.stateNode.nodeValue=d?"":p.memoizedProps}catch(g){wc(e,e.return,g)}}else if((22!==p.tag&&23!==p.tag||null===p.memoizedState||p===e)&&null!==p.child){p.child.return=p,p=p.child;continue}if(p===e)break e;for(;null===p.sibling;){if(null===p.return||p.return===e)break e;u===p&&(u=null),p=p.return}u===p&&(u=null),p.sibling.return=p.return,p=p.sibling}}break;case 19:fl(t,e),vl(e),4&r&&ml(e);case 21:}}function vl(e){var t=e.flags;if(2&t){try{e:{for(var n=e.return;null!==n;){if(al(n)){var r=n;break e}n=n.return}throw Error(o(160))}switch(r.tag){case 5:var i=r.stateNode;32&r.flags&&(pe(i,""),r.flags&=-33),cl(e,sl(e),i);break;case 3:case 4:var a=r.stateNode.containerInfo;ll(e,sl(e),a);break;default:throw Error(o(161))}}catch(s){wc(e,e.return,s)}e.flags&=-3}4096&t&&(e.flags&=-4097)}function xl(e,t,n){Qs=e,yl(e,t,n)}function yl(e,t,n){for(var r=0!==(1&e.mode);null!==Qs;){var i=Qs,o=i.child;if(22===i.tag&&r){var a=null!==i.memoizedState||Zs;if(!a){var s=i.alternate,l=null!==s&&null!==s.memoizedState||Ks;s=Zs;var c=Ks;if(Zs=a,(Ks=l)&&!c)for(Qs=i;null!==Qs;)l=(a=Qs).child,22===a.tag&&null!==a.memoizedState?_l(i):null!==l?(l.return=a,Qs=l):_l(i);for(;null!==o;)Qs=o,yl(o,t,n),o=o.sibling;Qs=i,Zs=s,Ks=c}bl(e)}else 0!==(8772&i.subtreeFlags)&&null!==o?(o.return=i,Qs=o):bl(e)}}function bl(e){for(;null!==Qs;){var t=Qs;if(0!==(8772&t.flags)){var n=t.alternate;try{if(0!==(8772&t.flags))switch(t.tag){case 0:case 11:case 15:Ks||rl(5,t);break;case 1:var r=t.stateNode;if(4&t.flags&&!Ks)if(null===n)r.componentDidMount();else{var i=t.elementType===t.type?n.memoizedProps:ns(t.type,n.memoizedProps);r.componentDidUpdate(i,n.memoizedState,r.__reactInternalSnapshotBeforeUpdate)}var a=t.updateQueue;null!==a&&Uo(t,a,r);break;case 3:var s=t.updateQueue;if(null!==s){if(n=null,null!==t.child)switch(t.child.tag){case 5:case 1:n=t.child.stateNode}Uo(t,s,n)}break;case 5:var l=t.stateNode;if(null===n&&4&t.flags){n=l;var c=t.memoizedProps;switch(t.type){case"button":case"input":case"select":case"textarea":c.autoFocus&&n.focus();break;case"img":c.src&&(n.src=c.src)}}break;case 6:case 4:case 12:case 19:case 17:case 21:case 22:case 23:case 25:break;case 13:if(null===t.memoizedState){var d=t.alternate;if(null!==d){var u=d.memoizedState;if(null!==u){var p=u.dehydrated;null!==p&&Ht(p)}}}break;default:throw Error(o(163))}Ks||512&t.flags&&il(t)}catch(h){wc(t,t.return,h)}}if(t===e){Qs=null;break}if(null!==(n=t.sibling)){n.return=t.return,Qs=n;break}Qs=t.return}}function jl(e){for(;null!==Qs;){var t=Qs;if(t===e){Qs=null;break}var n=t.sibling;if(null!==n){n.return=t.return,Qs=n;break}Qs=t.return}}function _l(e){for(;null!==Qs;){var t=Qs;try{switch(t.tag){case 0:case 11:case 15:var n=t.return;try{rl(4,t)}catch(l){wc(t,n,l)}break;case 1:var r=t.stateNode;if("function"===typeof r.componentDidMount){var i=t.return;try{r.componentDidMount()}catch(l){wc(t,i,l)}}var o=t.return;try{il(t)}catch(l){wc(t,o,l)}break;case 5:var a=t.return;try{il(t)}catch(l){wc(t,a,l)}}}catch(l){wc(t,t.return,l)}if(t===e){Qs=null;break}var s=t.sibling;if(null!==s){s.return=t.return,Qs=s;break}Qs=t.return}}var Cl,wl=Math.ceil,Sl=b.ReactCurrentDispatcher,Al=b.ReactCurrentOwner,kl=b.ReactCurrentBatchConfig,Tl=0,El=null,Ml=null,Ol=0,Rl=0,Pl=wi(0),Dl=0,Nl=null,Ll=0,Il=0,Fl=0,$l=null,Bl=null,zl=0,Hl=1/0,Wl=null,Ul=!1,Vl=null,Gl=null,ql=!1,Yl=null,Zl=0,Kl=0,Xl=null,Ql=-1,Jl=0;function ec(){return 0!==(6&Tl)?Xe():-1!==Ql?Ql:Ql=Xe()}function tc(e){return 0===(1&e.mode)?1:0!==(2&Tl)&&0!==Ol?Ol&-Ol:null!==go.transition?(0===Jl&&(Jl=ft()),Jl):0!==(e=yt)?e:e=void 0===(e=window.event)?16:Kt(e.type)}function nc(e,t,n,r){if(50<Kl)throw Kl=0,Xl=null,Error(o(185));vt(e,n,r),0!==(2&Tl)&&e===El||(e===El&&(0===(2&Tl)&&(Il|=n),4===Dl&&sc(e,Ol)),rc(e,r),1===n&&0===Tl&&0===(1&t.mode)&&(Hl=Xe()+500,$i&&Hi()))}function rc(e,t){var n=e.callbackNode;!function(e,t){for(var n=e.suspendedLanes,r=e.pingedLanes,i=e.expirationTimes,o=e.pendingLanes;0<o;){var a=31-at(o),s=1<<a,l=i[a];-1===l?0!==(s&n)&&0===(s&r)||(i[a]=ht(s,t)):l<=t&&(e.expiredLanes|=s),o&=~s}}(e,t);var r=pt(e,e===El?Ol:0);if(0===r)null!==n&&Ye(n),e.callbackNode=null,e.callbackPriority=0;else if(t=r&-r,e.callbackPriority!==t){if(null!=n&&Ye(n),1===t)0===e.tag?function(e){$i=!0,zi(e)}(lc.bind(null,e)):zi(lc.bind(null,e)),ai(function(){0===(6&Tl)&&Hi()}),n=null;else{switch(bt(r)){case 1:n=Je;break;case 4:n=et;break;case 16:default:n=tt;break;case 536870912:n=rt}n=Ec(n,ic.bind(null,e))}e.callbackPriority=t,e.callbackNode=n}}function ic(e,t){if(Ql=-1,Jl=0,0!==(6&Tl))throw Error(o(327));var n=e.callbackNode;if(_c()&&e.callbackNode!==n)return null;var r=pt(e,e===El?Ol:0);if(0===r)return null;if(0!==(30&r)||0!==(r&e.expiredLanes)||t)t=gc(e,r);else{t=r;var i=Tl;Tl|=2;var a=mc();for(El===e&&Ol===t||(Wl=null,Hl=Xe()+500,pc(e,t));;)try{xc();break}catch(l){hc(e,l)}ko(),Sl.current=a,Tl=i,null!==Ml?t=0:(El=null,Ol=0,t=Dl)}if(0!==t){if(2===t&&(0!==(i=mt(e))&&(r=i,t=oc(e,i))),1===t)throw n=Nl,pc(e,0),sc(e,r),rc(e,Xe()),n;if(6===t)sc(e,r);else{if(i=e.current.alternate,0===(30&r)&&!function(e){for(var t=e;;){if(16384&t.flags){var n=t.updateQueue;if(null!==n&&null!==(n=n.stores))for(var r=0;r<n.length;r++){var i=n[r],o=i.getSnapshot;i=i.value;try{if(!sr(o(),i))return!1}catch(s){return!1}}}if(n=t.child,16384&t.subtreeFlags&&null!==n)n.return=t,t=n;else{if(t===e)break;for(;null===t.sibling;){if(null===t.return||t.return===e)return!0;t=t.return}t.sibling.return=t.return,t=t.sibling}}return!0}(i)&&(2===(t=gc(e,r))&&(0!==(a=mt(e))&&(r=a,t=oc(e,a))),1===t))throw n=Nl,pc(e,0),sc(e,r),rc(e,Xe()),n;switch(e.finishedWork=i,e.finishedLanes=r,t){case 0:case 1:throw Error(o(345));case 2:case 5:jc(e,Bl,Wl);break;case 3:if(sc(e,r),(130023424&r)===r&&10<(t=zl+500-Xe())){if(0!==pt(e,0))break;if(((i=e.suspendedLanes)&r)!==r){ec(),e.pingedLanes|=e.suspendedLanes&i;break}e.timeoutHandle=ri(jc.bind(null,e,Bl,Wl),t);break}jc(e,Bl,Wl);break;case 4:if(sc(e,r),(4194240&r)===r)break;for(t=e.eventTimes,i=-1;0<r;){var s=31-at(r);a=1<<s,(s=t[s])>i&&(i=s),r&=~a}if(r=i,10<(r=(120>(r=Xe()-r)?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*wl(r/1960))-r)){e.timeoutHandle=ri(jc.bind(null,e,Bl,Wl),r);break}jc(e,Bl,Wl);break;default:throw Error(o(329))}}}return rc(e,Xe()),e.callbackNode===n?ic.bind(null,e):null}function oc(e,t){var n=$l;return e.current.memoizedState.isDehydrated&&(pc(e,t).flags|=256),2!==(e=gc(e,t))&&(t=Bl,Bl=n,null!==t&&ac(t)),e}function ac(e){null===Bl?Bl=e:Bl.push.apply(Bl,e)}function sc(e,t){for(t&=~Fl,t&=~Il,e.suspendedLanes|=t,e.pingedLanes&=~t,e=e.expirationTimes;0<t;){var n=31-at(t),r=1<<n;e[n]=-1,t&=~r}}function lc(e){if(0!==(6&Tl))throw Error(o(327));_c();var t=pt(e,0);if(0===(1&t))return rc(e,Xe()),null;var n=gc(e,t);if(0!==e.tag&&2===n){var r=mt(e);0!==r&&(t=r,n=oc(e,r))}if(1===n)throw n=Nl,pc(e,0),sc(e,t),rc(e,Xe()),n;if(6===n)throw Error(o(345));return e.finishedWork=e.current.alternate,e.finishedLanes=t,jc(e,Bl,Wl),rc(e,Xe()),null}function cc(e,t){var n=Tl;Tl|=1;try{return e(t)}finally{0===(Tl=n)&&(Hl=Xe()+500,$i&&Hi())}}function dc(e){null!==Yl&&0===Yl.tag&&0===(6&Tl)&&_c();var t=Tl;Tl|=1;var n=kl.transition,r=yt;try{if(kl.transition=null,yt=1,e)return e()}finally{yt=r,kl.transition=n,0===(6&(Tl=t))&&Hi()}}function uc(){Rl=Pl.current,Si(Pl)}function pc(e,t){e.finishedWork=null,e.finishedLanes=0;var n=e.timeoutHandle;if(-1!==n&&(e.timeoutHandle=-1,ii(n)),null!==Ml)for(n=Ml.return;null!==n;){var r=n;switch(to(r),r.tag){case 1:null!==(r=r.type.childContextTypes)&&void 0!==r&&Pi();break;case 3:Xo(),Si(Ei),Si(Ti),ra();break;case 5:Jo(r);break;case 4:Xo();break;case 13:case 19:Si(ea);break;case 10:To(r.type._context);break;case 22:case 23:uc()}n=n.return}if(El=e,Ml=e=Pc(e.current,null),Ol=Rl=t,Dl=0,Nl=null,Fl=Il=Ll=0,Bl=$l=null,null!==Ro){for(t=0;t<Ro.length;t++)if(null!==(r=(n=Ro[t]).interleaved)){n.interleaved=null;var i=r.next,o=n.pending;if(null!==o){var a=o.next;o.next=i,r.next=a}n.pending=r}Ro=null}return e}function hc(e,t){for(;;){var n=Ml;try{if(ko(),ia.current=Qa,da){for(var r=sa.memoizedState;null!==r;){var i=r.queue;null!==i&&(i.pending=null),r=r.next}da=!1}if(aa=0,ca=la=sa=null,ua=!1,pa=0,Al.current=null,null===n||null===n.return){Dl=1,Nl=t,Ml=null;break}e:{var a=e,s=n.return,l=n,c=t;if(t=Ol,l.flags|=32768,null!==c&&"object"===typeof c&&"function"===typeof c.then){var d=c,u=l,p=u.tag;if(0===(1&u.mode)&&(0===p||11===p||15===p)){var h=u.alternate;h?(u.updateQueue=h.updateQueue,u.memoizedState=h.memoizedState,u.lanes=h.lanes):(u.updateQueue=null,u.memoizedState=null)}var m=gs(s);if(null!==m){m.flags&=-257,vs(m,s,l,0,t),1&m.mode&&fs(a,d,t),c=d;var f=(t=m).updateQueue;if(null===f){var g=new Set;g.add(c),t.updateQueue=g}else f.add(c);break e}if(0===(1&t)){fs(a,d,t),fc();break e}c=Error(o(426))}else if(io&&1&l.mode){var v=gs(s);if(null!==v){0===(65536&v.flags)&&(v.flags|=256),vs(v,s,l,0,t),fo(cs(c,l));break e}}a=c=cs(c,l),4!==Dl&&(Dl=2),null===$l?$l=[a]:$l.push(a),a=s;do{switch(a.tag){case 3:a.flags|=65536,t&=-t,a.lanes|=t,Ho(a,hs(0,c,t));break e;case 1:l=c;var x=a.type,y=a.stateNode;if(0===(128&a.flags)&&("function"===typeof x.getDerivedStateFromError||null!==y&&"function"===typeof y.componentDidCatch&&(null===Gl||!Gl.has(y)))){a.flags|=65536,t&=-t,a.lanes|=t,Ho(a,ms(a,l,t));break e}}a=a.return}while(null!==a)}bc(n)}catch(b){t=b,Ml===n&&null!==n&&(Ml=n=n.return);continue}break}}function mc(){var e=Sl.current;return Sl.current=Qa,null===e?Qa:e}function fc(){0!==Dl&&3!==Dl&&2!==Dl||(Dl=4),null===El||0===(268435455&Ll)&&0===(268435455&Il)||sc(El,Ol)}function gc(e,t){var n=Tl;Tl|=2;var r=mc();for(El===e&&Ol===t||(Wl=null,pc(e,t));;)try{vc();break}catch(i){hc(e,i)}if(ko(),Tl=n,Sl.current=r,null!==Ml)throw Error(o(261));return El=null,Ol=0,Dl}function vc(){for(;null!==Ml;)yc(Ml)}function xc(){for(;null!==Ml&&!Ze();)yc(Ml)}function yc(e){var t=Cl(e.alternate,e,Rl);e.memoizedProps=e.pendingProps,null===t?bc(e):Ml=t,Al.current=null}function bc(e){var t=e;do{var n=t.alternate;if(e=t.return,0===(32768&t.flags)){if(null!==(n=qs(n,t,Rl)))return void(Ml=n)}else{if(null!==(n=Ys(n,t)))return n.flags&=32767,void(Ml=n);if(null===e)return Dl=6,void(Ml=null);e.flags|=32768,e.subtreeFlags=0,e.deletions=null}if(null!==(t=t.sibling))return void(Ml=t);Ml=t=e}while(null!==t);0===Dl&&(Dl=5)}function jc(e,t,n){var r=yt,i=kl.transition;try{kl.transition=null,yt=1,function(e,t,n,r){do{_c()}while(null!==Yl);if(0!==(6&Tl))throw Error(o(327));n=e.finishedWork;var i=e.finishedLanes;if(null===n)return null;if(e.finishedWork=null,e.finishedLanes=0,n===e.current)throw Error(o(177));e.callbackNode=null,e.callbackPriority=0;var a=n.lanes|n.childLanes;if(function(e,t){var n=e.pendingLanes&~t;e.pendingLanes=t,e.suspendedLanes=0,e.pingedLanes=0,e.expiredLanes&=t,e.mutableReadLanes&=t,e.entangledLanes&=t,t=e.entanglements;var r=e.eventTimes;for(e=e.expirationTimes;0<n;){var i=31-at(n),o=1<<i;t[i]=0,r[i]=-1,e[i]=-1,n&=~o}}(e,a),e===El&&(Ml=El=null,Ol=0),0===(2064&n.subtreeFlags)&&0===(2064&n.flags)||ql||(ql=!0,Ec(tt,function(){return _c(),null})),a=0!==(15990&n.flags),0!==(15990&n.subtreeFlags)||a){a=kl.transition,kl.transition=null;var s=yt;yt=1;var l=Tl;Tl|=4,Al.current=null,function(e,t){if(ei=Ut,hr(e=pr())){if("selectionStart"in e)var n={start:e.selectionStart,end:e.selectionEnd};else e:{var r=(n=(n=e.ownerDocument)&&n.defaultView||window).getSelection&&n.getSelection();if(r&&0!==r.rangeCount){n=r.anchorNode;var i=r.anchorOffset,a=r.focusNode;r=r.focusOffset;try{n.nodeType,a.nodeType}catch(j){n=null;break e}var s=0,l=-1,c=-1,d=0,u=0,p=e,h=null;t:for(;;){for(var m;p!==n||0!==i&&3!==p.nodeType||(l=s+i),p!==a||0!==r&&3!==p.nodeType||(c=s+r),3===p.nodeType&&(s+=p.nodeValue.length),null!==(m=p.firstChild);)h=p,p=m;for(;;){if(p===e)break t;if(h===n&&++d===i&&(l=s),h===a&&++u===r&&(c=s),null!==(m=p.nextSibling))break;h=(p=h).parentNode}p=m}n=-1===l||-1===c?null:{start:l,end:c}}else n=null}n=n||{start:0,end:0}}else n=null;for(ti={focusedElem:e,selectionRange:n},Ut=!1,Qs=t;null!==Qs;)if(e=(t=Qs).child,0!==(1028&t.subtreeFlags)&&null!==e)e.return=t,Qs=e;else for(;null!==Qs;){t=Qs;try{var f=t.alternate;if(0!==(1024&t.flags))switch(t.tag){case 0:case 11:case 15:case 5:case 6:case 4:case 17:break;case 1:if(null!==f){var g=f.memoizedProps,v=f.memoizedState,x=t.stateNode,y=x.getSnapshotBeforeUpdate(t.elementType===t.type?g:ns(t.type,g),v);x.__reactInternalSnapshotBeforeUpdate=y}break;case 3:var b=t.stateNode.containerInfo;1===b.nodeType?b.textContent="":9===b.nodeType&&b.documentElement&&b.removeChild(b.documentElement);break;default:throw Error(o(163))}}catch(j){wc(t,t.return,j)}if(null!==(e=t.sibling)){e.return=t.return,Qs=e;break}Qs=t.return}f=tl,tl=!1}(e,n),gl(n,e),mr(ti),Ut=!!ei,ti=ei=null,e.current=n,xl(n,e,i),Ke(),Tl=l,yt=s,kl.transition=a}else e.current=n;if(ql&&(ql=!1,Yl=e,Zl=i),a=e.pendingLanes,0===a&&(Gl=null),function(e){if(ot&&"function"===typeof ot.onCommitFiberRoot)try{ot.onCommitFiberRoot(it,e,void 0,128===(128&e.current.flags))}catch(t){}}(n.stateNode),rc(e,Xe()),null!==t)for(r=e.onRecoverableError,n=0;n<t.length;n++)i=t[n],r(i.value,{componentStack:i.stack,digest:i.digest});if(Ul)throw Ul=!1,e=Vl,Vl=null,e;0!==(1&Zl)&&0!==e.tag&&_c(),a=e.pendingLanes,0!==(1&a)?e===Xl?Kl++:(Kl=0,Xl=e):Kl=0,Hi()}(e,t,n,r)}finally{kl.transition=i,yt=r}return null}function _c(){if(null!==Yl){var e=bt(Zl),t=kl.transition,n=yt;try{if(kl.transition=null,yt=16>e?16:e,null===Yl)var r=!1;else{if(e=Yl,Yl=null,Zl=0,0!==(6&Tl))throw Error(o(331));var i=Tl;for(Tl|=4,Qs=e.current;null!==Qs;){var a=Qs,s=a.child;if(0!==(16&Qs.flags)){var l=a.deletions;if(null!==l){for(var c=0;c<l.length;c++){var d=l[c];for(Qs=d;null!==Qs;){var u=Qs;switch(u.tag){case 0:case 11:case 15:nl(8,u,a)}var p=u.child;if(null!==p)p.return=u,Qs=p;else for(;null!==Qs;){var h=(u=Qs).sibling,m=u.return;if(ol(u),u===d){Qs=null;break}if(null!==h){h.return=m,Qs=h;break}Qs=m}}}var f=a.alternate;if(null!==f){var g=f.child;if(null!==g){f.child=null;do{var v=g.sibling;g.sibling=null,g=v}while(null!==g)}}Qs=a}}if(0!==(2064&a.subtreeFlags)&&null!==s)s.return=a,Qs=s;else e:for(;null!==Qs;){if(0!==(2048&(a=Qs).flags))switch(a.tag){case 0:case 11:case 15:nl(9,a,a.return)}var x=a.sibling;if(null!==x){x.return=a.return,Qs=x;break e}Qs=a.return}}var y=e.current;for(Qs=y;null!==Qs;){var b=(s=Qs).child;if(0!==(2064&s.subtreeFlags)&&null!==b)b.return=s,Qs=b;else e:for(s=y;null!==Qs;){if(0!==(2048&(l=Qs).flags))try{switch(l.tag){case 0:case 11:case 15:rl(9,l)}}catch(_){wc(l,l.return,_)}if(l===s){Qs=null;break e}var j=l.sibling;if(null!==j){j.return=l.return,Qs=j;break e}Qs=l.return}}if(Tl=i,Hi(),ot&&"function"===typeof ot.onPostCommitFiberRoot)try{ot.onPostCommitFiberRoot(it,e)}catch(_){}r=!0}return r}finally{yt=n,kl.transition=t}}return!1}function Cc(e,t,n){e=Bo(e,t=hs(0,t=cs(n,t),1),1),t=ec(),null!==e&&(vt(e,1,t),rc(e,t))}function wc(e,t,n){if(3===e.tag)Cc(e,e,n);else for(;null!==t;){if(3===t.tag){Cc(t,e,n);break}if(1===t.tag){var r=t.stateNode;if("function"===typeof t.type.getDerivedStateFromError||"function"===typeof r.componentDidCatch&&(null===Gl||!Gl.has(r))){t=Bo(t,e=ms(t,e=cs(n,e),1),1),e=ec(),null!==t&&(vt(t,1,e),rc(t,e));break}}t=t.return}}function Sc(e,t,n){var r=e.pingCache;null!==r&&r.delete(t),t=ec(),e.pingedLanes|=e.suspendedLanes&n,El===e&&(Ol&n)===n&&(4===Dl||3===Dl&&(130023424&Ol)===Ol&&500>Xe()-zl?pc(e,0):Fl|=n),rc(e,t)}function Ac(e,t){0===t&&(0===(1&e.mode)?t=1:(t=dt,0===(130023424&(dt<<=1))&&(dt=4194304)));var n=ec();null!==(e=No(e,t))&&(vt(e,t,n),rc(e,n))}function kc(e){var t=e.memoizedState,n=0;null!==t&&(n=t.retryLane),Ac(e,n)}function Tc(e,t){var n=0;switch(e.tag){case 13:var r=e.stateNode,i=e.memoizedState;null!==i&&(n=i.retryLane);break;case 19:r=e.stateNode;break;default:throw Error(o(314))}null!==r&&r.delete(t),Ac(e,n)}function Ec(e,t){return qe(e,t)}function Mc(e,t,n,r){this.tag=e,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=r,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Oc(e,t,n,r){return new Mc(e,t,n,r)}function Rc(e){return!(!(e=e.prototype)||!e.isReactComponent)}function Pc(e,t){var n=e.alternate;return null===n?((n=Oc(e.tag,t,e.key,e.mode)).elementType=e.elementType,n.type=e.type,n.stateNode=e.stateNode,n.alternate=e,e.alternate=n):(n.pendingProps=t,n.type=e.type,n.flags=0,n.subtreeFlags=0,n.deletions=null),n.flags=14680064&e.flags,n.childLanes=e.childLanes,n.lanes=e.lanes,n.child=e.child,n.memoizedProps=e.memoizedProps,n.memoizedState=e.memoizedState,n.updateQueue=e.updateQueue,t=e.dependencies,n.dependencies=null===t?null:{lanes:t.lanes,firstContext:t.firstContext},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n}function Dc(e,t,n,r,i,a){var s=2;if(r=e,"function"===typeof e)Rc(e)&&(s=1);else if("string"===typeof e)s=5;else e:switch(e){case C:return Nc(n.children,i,a,t);case w:s=8,i|=8;break;case S:return(e=Oc(12,n,t,2|i)).elementType=S,e.lanes=a,e;case E:return(e=Oc(13,n,t,i)).elementType=E,e.lanes=a,e;case M:return(e=Oc(19,n,t,i)).elementType=M,e.lanes=a,e;case P:return Lc(n,i,a,t);default:if("object"===typeof e&&null!==e)switch(e.$$typeof){case A:s=10;break e;case k:s=9;break e;case T:s=11;break e;case O:s=14;break e;case R:s=16,r=null;break e}throw Error(o(130,null==e?e:typeof e,""))}return(t=Oc(s,n,t,i)).elementType=e,t.type=r,t.lanes=a,t}function Nc(e,t,n,r){return(e=Oc(7,e,r,t)).lanes=n,e}function Lc(e,t,n,r){return(e=Oc(22,e,r,t)).elementType=P,e.lanes=n,e.stateNode={isHidden:!1},e}function Ic(e,t,n){return(e=Oc(6,e,null,t)).lanes=n,e}function Fc(e,t,n){return(t=Oc(4,null!==e.children?e.children:[],e.key,t)).lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function $c(e,t,n,r,i){this.tag=t,this.containerInfo=e,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=gt(0),this.expirationTimes=gt(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=gt(0),this.identifierPrefix=r,this.onRecoverableError=i,this.mutableSourceEagerHydrationData=null}function Bc(e,t,n,r,i,o,a,s,l){return e=new $c(e,t,n,s,l),1===t?(t=1,!0===o&&(t|=8)):t=0,o=Oc(3,null,null,t),e.current=o,o.stateNode=e,o.memoizedState={element:r,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},Io(o),e}function zc(e){if(!e)return ki;e:{if(He(e=e._reactInternals)!==e||1!==e.tag)throw Error(o(170));var t=e;do{switch(t.tag){case 3:t=t.stateNode.context;break e;case 1:if(Ri(t.type)){t=t.stateNode.__reactInternalMemoizedMergedChildContext;break e}}t=t.return}while(null!==t);throw Error(o(171))}if(1===e.tag){var n=e.type;if(Ri(n))return Ni(e,n,t)}return t}function Hc(e,t,n,r,i,o,a,s,l){return(e=Bc(n,r,!0,e,0,o,0,s,l)).context=zc(null),n=e.current,(o=$o(r=ec(),i=tc(n))).callback=void 0!==t&&null!==t?t:null,Bo(n,o,i),e.current.lanes=i,vt(e,i,r),rc(e,r),e}function Wc(e,t,n,r){var i=t.current,o=ec(),a=tc(i);return n=zc(n),null===t.context?t.context=n:t.pendingContext=n,(t=$o(o,a)).payload={element:e},null!==(r=void 0===r?null:r)&&(t.callback=r),null!==(e=Bo(i,t,a))&&(nc(e,i,a,o),zo(e,i,a)),a}function Uc(e){return(e=e.current).child?(e.child.tag,e.child.stateNode):null}function Vc(e,t){if(null!==(e=e.memoizedState)&&null!==e.dehydrated){var n=e.retryLane;e.retryLane=0!==n&&n<t?n:t}}function Gc(e,t){Vc(e,t),(e=e.alternate)&&Vc(e,t)}Cl=function(e,t,n){if(null!==e)if(e.memoizedProps!==t.pendingProps||Ei.current)ys=!0;else{if(0===(e.lanes&n)&&0===(128&t.flags))return ys=!1,function(e,t,n){switch(t.tag){case 3:Es(t),mo();break;case 5:Qo(t);break;case 1:Ri(t.type)&&Li(t);break;case 4:Ko(t,t.stateNode.containerInfo);break;case 10:var r=t.type._context,i=t.memoizedProps.value;Ai(Co,r._currentValue),r._currentValue=i;break;case 13:if(null!==(r=t.memoizedState))return null!==r.dehydrated?(Ai(ea,1&ea.current),t.flags|=128,null):0!==(n&t.child.childLanes)?Is(e,t,n):(Ai(ea,1&ea.current),null!==(e=Us(e,t,n))?e.sibling:null);Ai(ea,1&ea.current);break;case 19:if(r=0!==(n&t.childLanes),0!==(128&e.flags)){if(r)return Hs(e,t,n);t.flags|=128}if(null!==(i=t.memoizedState)&&(i.rendering=null,i.tail=null,i.lastEffect=null),Ai(ea,ea.current),r)break;return null;case 22:case 23:return t.lanes=0,ws(e,t,n)}return Us(e,t,n)}(e,t,n);ys=0!==(131072&e.flags)}else ys=!1,io&&0!==(1048576&t.flags)&&Ji(t,Gi,t.index);switch(t.lanes=0,t.tag){case 2:var r=t.type;Ws(e,t),e=t.pendingProps;var i=Oi(t,Ti.current);Mo(t,n),i=ga(null,t,r,e,i,n);var a=va();return t.flags|=1,"object"===typeof i&&null!==i&&"function"===typeof i.render&&void 0===i.$$typeof?(t.tag=1,t.memoizedState=null,t.updateQueue=null,Ri(r)?(a=!0,Li(t)):a=!1,t.memoizedState=null!==i.state&&void 0!==i.state?i.state:null,Io(t),i.updater=is,t.stateNode=i,i._reactInternals=t,ls(t,r,e,n),t=Ts(null,t,r,!0,a,n)):(t.tag=0,io&&a&&eo(t),bs(null,t,i,n),t=t.child),t;case 16:r=t.elementType;e:{switch(Ws(e,t),e=t.pendingProps,r=(i=r._init)(r._payload),t.type=r,i=t.tag=function(e){if("function"===typeof e)return Rc(e)?1:0;if(void 0!==e&&null!==e){if((e=e.$$typeof)===T)return 11;if(e===O)return 14}return 2}(r),e=ns(r,e),i){case 0:t=As(null,t,r,e,n);break e;case 1:t=ks(null,t,r,e,n);break e;case 11:t=js(null,t,r,e,n);break e;case 14:t=_s(null,t,r,ns(r.type,e),n);break e}throw Error(o(306,r,""))}return t;case 0:return r=t.type,i=t.pendingProps,As(e,t,r,i=t.elementType===r?i:ns(r,i),n);case 1:return r=t.type,i=t.pendingProps,ks(e,t,r,i=t.elementType===r?i:ns(r,i),n);case 3:e:{if(Es(t),null===e)throw Error(o(387));r=t.pendingProps,i=(a=t.memoizedState).element,Fo(e,t),Wo(t,r,null,n);var s=t.memoizedState;if(r=s.element,a.isDehydrated){if(a={element:r,isDehydrated:!1,cache:s.cache,pendingSuspenseBoundaries:s.pendingSuspenseBoundaries,transitions:s.transitions},t.updateQueue.baseState=a,t.memoizedState=a,256&t.flags){t=Ms(e,t,r,n,i=cs(Error(o(423)),t));break e}if(r!==i){t=Ms(e,t,r,n,i=cs(Error(o(424)),t));break e}for(ro=ci(t.stateNode.containerInfo.firstChild),no=t,io=!0,oo=null,n=_o(t,null,r,n),t.child=n;n;)n.flags=-3&n.flags|4096,n=n.sibling}else{if(mo(),r===i){t=Us(e,t,n);break e}bs(e,t,r,n)}t=t.child}return t;case 5:return Qo(t),null===e&&co(t),r=t.type,i=t.pendingProps,a=null!==e?e.memoizedProps:null,s=i.children,ni(r,i)?s=null:null!==a&&ni(r,a)&&(t.flags|=32),Ss(e,t),bs(e,t,s,n),t.child;case 6:return null===e&&co(t),null;case 13:return Is(e,t,n);case 4:return Ko(t,t.stateNode.containerInfo),r=t.pendingProps,null===e?t.child=jo(t,null,r,n):bs(e,t,r,n),t.child;case 11:return r=t.type,i=t.pendingProps,js(e,t,r,i=t.elementType===r?i:ns(r,i),n);case 7:return bs(e,t,t.pendingProps,n),t.child;case 8:case 12:return bs(e,t,t.pendingProps.children,n),t.child;case 10:e:{if(r=t.type._context,i=t.pendingProps,a=t.memoizedProps,s=i.value,Ai(Co,r._currentValue),r._currentValue=s,null!==a)if(sr(a.value,s)){if(a.children===i.children&&!Ei.current){t=Us(e,t,n);break e}}else for(null!==(a=t.child)&&(a.return=t);null!==a;){var l=a.dependencies;if(null!==l){s=a.child;for(var c=l.firstContext;null!==c;){if(c.context===r){if(1===a.tag){(c=$o(-1,n&-n)).tag=2;var d=a.updateQueue;if(null!==d){var u=(d=d.shared).pending;null===u?c.next=c:(c.next=u.next,u.next=c),d.pending=c}}a.lanes|=n,null!==(c=a.alternate)&&(c.lanes|=n),Eo(a.return,n,t),l.lanes|=n;break}c=c.next}}else if(10===a.tag)s=a.type===t.type?null:a.child;else if(18===a.tag){if(null===(s=a.return))throw Error(o(341));s.lanes|=n,null!==(l=s.alternate)&&(l.lanes|=n),Eo(s,n,t),s=a.sibling}else s=a.child;if(null!==s)s.return=a;else for(s=a;null!==s;){if(s===t){s=null;break}if(null!==(a=s.sibling)){a.return=s.return,s=a;break}s=s.return}a=s}bs(e,t,i.children,n),t=t.child}return t;case 9:return i=t.type,r=t.pendingProps.children,Mo(t,n),r=r(i=Oo(i)),t.flags|=1,bs(e,t,r,n),t.child;case 14:return i=ns(r=t.type,t.pendingProps),_s(e,t,r,i=ns(r.type,i),n);case 15:return Cs(e,t,t.type,t.pendingProps,n);case 17:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:ns(r,i),Ws(e,t),t.tag=1,Ri(r)?(e=!0,Li(t)):e=!1,Mo(t,n),as(t,r,i),ls(t,r,i,n),Ts(null,t,r,!0,e,n);case 19:return Hs(e,t,n);case 22:return ws(e,t,n)}throw Error(o(156,t.tag))};var qc="function"===typeof reportError?reportError:function(e){console.error(e)};function Yc(e){this._internalRoot=e}function Zc(e){this._internalRoot=e}function Kc(e){return!(!e||1!==e.nodeType&&9!==e.nodeType&&11!==e.nodeType)}function Xc(e){return!(!e||1!==e.nodeType&&9!==e.nodeType&&11!==e.nodeType&&(8!==e.nodeType||" react-mount-point-unstable "!==e.nodeValue))}function Qc(){}function Jc(e,t,n,r,i){var o=n._reactRootContainer;if(o){var a=o;if("function"===typeof i){var s=i;i=function(){var e=Uc(a);s.call(e)}}Wc(t,a,e,i)}else a=function(e,t,n,r,i){if(i){if("function"===typeof r){var o=r;r=function(){var e=Uc(a);o.call(e)}}var a=Hc(t,r,e,0,null,!1,0,"",Qc);return e._reactRootContainer=a,e[mi]=a.current,Hr(8===e.nodeType?e.parentNode:e),dc(),a}for(;i=e.lastChild;)e.removeChild(i);if("function"===typeof r){var s=r;r=function(){var e=Uc(l);s.call(e)}}var l=Bc(e,0,!1,null,0,!1,0,"",Qc);return e._reactRootContainer=l,e[mi]=l.current,Hr(8===e.nodeType?e.parentNode:e),dc(function(){Wc(t,l,n,r)}),l}(n,t,e,i,r);return Uc(a)}Zc.prototype.render=Yc.prototype.render=function(e){var t=this._internalRoot;if(null===t)throw Error(o(409));Wc(e,t,null,null)},Zc.prototype.unmount=Yc.prototype.unmount=function(){var e=this._internalRoot;if(null!==e){this._internalRoot=null;var t=e.containerInfo;dc(function(){Wc(null,e,null,null)}),t[mi]=null}},Zc.prototype.unstable_scheduleHydration=function(e){if(e){var t=wt();e={blockedOn:null,target:e,priority:t};for(var n=0;n<Pt.length&&0!==t&&t<Pt[n].priority;n++);Pt.splice(n,0,e),0===n&&It(e)}},jt=function(e){switch(e.tag){case 3:var t=e.stateNode;if(t.current.memoizedState.isDehydrated){var n=ut(t.pendingLanes);0!==n&&(xt(t,1|n),rc(t,Xe()),0===(6&Tl)&&(Hl=Xe()+500,Hi()))}break;case 13:dc(function(){var t=No(e,1);if(null!==t){var n=ec();nc(t,e,1,n)}}),Gc(e,1)}},_t=function(e){if(13===e.tag){var t=No(e,134217728);if(null!==t)nc(t,e,134217728,ec());Gc(e,134217728)}},Ct=function(e){if(13===e.tag){var t=tc(e),n=No(e,t);if(null!==n)nc(n,e,t,ec());Gc(e,t)}},wt=function(){return yt},St=function(e,t){var n=yt;try{return yt=e,t()}finally{yt=n}},_e=function(e,t,n){switch(t){case"input":if(Q(e,n),t=n.name,"radio"===n.type&&null!=t){for(n=e;n.parentNode;)n=n.parentNode;for(n=n.querySelectorAll("input[name="+JSON.stringify(""+t)+'][type="radio"]'),t=0;t<n.length;t++){var r=n[t];if(r!==e&&r.form===e.form){var i=ji(r);if(!i)throw Error(o(90));q(r),Q(r,i)}}}break;case"textarea":oe(e,n);break;case"select":null!=(t=n.value)&&ne(e,!!n.multiple,t,!1)}},Te=cc,Ee=dc;var ed={usingClientEntryPoint:!1,Events:[yi,bi,ji,Ae,ke,cc]},td={findFiberByHostInstance:xi,bundleType:0,version:"18.3.1",rendererPackageName:"react-dom"},nd={bundleType:td.bundleType,version:td.version,rendererPackageName:td.rendererPackageName,rendererConfig:td.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:b.ReactCurrentDispatcher,findHostInstanceByFiber:function(e){return null===(e=Ve(e))?null:e.stateNode},findFiberByHostInstance:td.findFiberByHostInstance||function(){return null},findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null,reconcilerVersion:"18.3.1-next-f1338f8080-20240426"};if("undefined"!==typeof __REACT_DEVTOOLS_GLOBAL_HOOK__){var rd=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!rd.isDisabled&&rd.supportsFiber)try{it=rd.inject(nd),ot=rd}catch(de){}}t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=ed,t.createPortal=function(e,t){var n=2<arguments.length&&void 0!==arguments[2]?arguments[2]:null;if(!Kc(t))throw Error(o(200));return function(e,t,n){var r=3<arguments.length&&void 0!==arguments[3]?arguments[3]:null;return{$$typeof:_,key:null==r?null:""+r,children:e,containerInfo:t,implementation:n}}(e,t,null,n)},t.createRoot=function(e,t){if(!Kc(e))throw Error(o(299));var n=!1,r="",i=qc;return null!==t&&void 0!==t&&(!0===t.unstable_strictMode&&(n=!0),void 0!==t.identifierPrefix&&(r=t.identifierPrefix),void 0!==t.onRecoverableError&&(i=t.onRecoverableError)),t=Bc(e,1,!1,null,0,n,0,r,i),e[mi]=t.current,Hr(8===e.nodeType?e.parentNode:e),new Yc(t)},t.findDOMNode=function(e){if(null==e)return null;if(1===e.nodeType)return e;var t=e._reactInternals;if(void 0===t){if("function"===typeof e.render)throw Error(o(188));throw e=Object.keys(e).join(","),Error(o(268,e))}return e=null===(e=Ve(t))?null:e.stateNode},t.flushSync=function(e){return dc(e)},t.hydrate=function(e,t,n){if(!Xc(t))throw Error(o(200));return Jc(null,e,t,!0,n)},t.hydrateRoot=function(e,t,n){if(!Kc(e))throw Error(o(405));var r=null!=n&&n.hydratedSources||null,i=!1,a="",s=qc;if(null!==n&&void 0!==n&&(!0===n.unstable_strictMode&&(i=!0),void 0!==n.identifierPrefix&&(a=n.identifierPrefix),void 0!==n.onRecoverableError&&(s=n.onRecoverableError)),t=Hc(t,null,e,1,null!=n?n:null,i,0,a,s),e[mi]=t.current,Hr(e),r)for(e=0;e<r.length;e++)i=(i=(n=r[e])._getVersion)(n._source),null==t.mutableSourceEagerHydrationData?t.mutableSourceEagerHydrationData=[n,i]:t.mutableSourceEagerHydrationData.push(n,i);return new Zc(t)},t.render=function(e,t,n){if(!Xc(t))throw Error(o(200));return Jc(null,e,t,!1,n)},t.unmountComponentAtNode=function(e){if(!Xc(e))throw Error(o(40));return!!e._reactRootContainer&&(dc(function(){Jc(null,null,e,!1,function(){e._reactRootContainer=null,e[mi]=null})}),!0)},t.unstable_batchedUpdates=cc,t.unstable_renderSubtreeIntoContainer=function(e,t,n,r){if(!Xc(n))throw Error(o(200));if(null==e||void 0===e._reactInternals)throw Error(o(38));return Jc(e,t,n,!1,r)},t.version="18.3.1-next-f1338f8080-20240426"},83290:(e,t,n)=>{"use strict";n.d(t,{AH:()=>d,i7:()=>u,mL:()=>c});var r=n(69369),i=n(65043),o=n(81722),a=n(69436),s=n(66598),l=(n(93803),n(80219),function(e,t){var n=arguments;if(null==t||!r.h.call(t,"css"))return i.createElement.apply(void 0,n);var o=n.length,a=new Array(o);a[0]=r.E,a[1]=(0,r.c)(e,t);for(var s=2;s<o;s++)a[s]=n[s];return i.createElement.apply(null,a)});!function(e){var t;t||(t=e.JSX||(e.JSX={}))}(l||(l={}));var c=(0,r.w)(function(e,t){var n=e.styles,l=(0,s.J)([n],void 0,i.useContext(r.T)),c=i.useRef();return(0,a.i)(function(){var e=t.key+"-global",n=new t.sheet.constructor({key:e,nonce:t.sheet.nonce,container:t.sheet.container,speedy:t.sheet.isSpeedy}),r=!1,i=document.querySelector('style[data-emotion="'+e+" "+l.name+'"]');return t.sheet.tags.length&&(n.before=t.sheet.tags[0]),null!==i&&(r=!0,i.setAttribute("data-emotion",e),n.hydrate([i])),c.current=[n,r],function(){n.flush()}},[t]),(0,a.i)(function(){var e=c.current,n=e[0];if(e[1])e[1]=!1;else{if(void 0!==l.next&&(0,o.sk)(t,l.next,!0),n.tags.length){var r=n.tags[n.tags.length-1].nextElementSibling;n.before=r,n.flush()}t.insert("",l,n,!1)}},[t,l.name]),null});function d(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return(0,s.J)(t)}function u(){var e=d.apply(void 0,arguments),t="animation-"+e.name;return{name:t,styles:"@keyframes "+t+"{"+e.styles+"}",anim:1,toString:function(){return"_EMO_"+this.name+"_"+this.styles+"_EMO_"}}}},83382:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>l,getFunctionName:()=>o});var r=n(90191);const i=/^\s*function(?:\s|\s*\/\*.*\*\/\s*)+([^(\s/]*)\s*/;function o(e){const t="".concat(e).match(i);return t&&t[1]||""}function a(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";return e.displayName||e.name||o(e)||t}function s(e,t,n){const r=a(t);return e.displayName||(""!==r?"".concat(n,"(").concat(r,")"):n)}function l(e){if(null!=e){if("string"===typeof e)return e;if("function"===typeof e)return a(e,"Component");if("object"===typeof e)switch(e.$$typeof){case r.vM:return s(e,e.render,"ForwardRef");case r.lD:return s(e,e.type,"memo");default:return}}}},83468:(e,t,n)=>{"use strict";function r(e){let t,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:166;function r(){for(var r=arguments.length,i=new Array(r),o=0;o<r;o++)i[o]=arguments[o];clearTimeout(t),t=setTimeout(()=>{e.apply(this,i)},n)}return r.clear=()=>{clearTimeout(t)},r}n.d(t,{A:()=>r})},83713:(e,t,n)=>{var r=n(36140),i=n(61143),o=Object.prototype.hasOwnProperty;e.exports=function(e){if(!r(e))return i(e);var t=[];for(var n in Object(e))o.call(e,n)&&"constructor"!=n&&t.push(n);return t}},83950:e=>{for(var t=[],n=0;n<256;++n)t[n]=(n+256).toString(16).substr(1);e.exports=function(e,n){var r=n||0,i=t;return[i[e[r++]],i[e[r++]],i[e[r++]],i[e[r++]],"-",i[e[r++]],i[e[r++]],"-",i[e[r++]],i[e[r++]],"-",i[e[r++]],i[e[r++]],"-",i[e[r++]],i[e[r++]],i[e[r++]],i[e[r++]],i[e[r++]],i[e[r++]]].join("")}},84391:(e,t,n)=>{"use strict";var r=n(97950);t.createRoot=r.createRoot,t.hydrateRoot=r.hydrateRoot},84440:(e,t,n)=>{"use strict";n.d(t,{A:()=>i});var r=n(65043);const i="undefined"!==typeof window?r.useLayoutEffect:r.useEffect},84445:(e,t,n)=>{"use strict";var r=n(24994);t.A=void 0;var i=r(n(40039)),o=n(70579);t.A=(0,i.default)((0,o.jsx)("path",{d:"M21 10h-8.35C11.83 7.67 9.61 6 7 6c-3.31 0-6 2.69-6 6s2.69 6 6 6c2.61 0 4.83-1.67 5.65-4H13l2 2 2-2 2 2 4-4.04zM7 15c-1.65 0-3-1.35-3-3s1.35-3 3-3 3 1.35 3 3-1.35 3-3 3"}),"Key")},84545:(e,t,n)=>{var r=n(97160);e.exports=function(){this.__data__=new r,this.size=0}},85204:(e,t,n)=>{var r=n(87937)(n(56552),"Map");e.exports=r},85473:(e,t,n)=>{"use strict";var r=n(24994);t.A=void 0;var i=r(n(40039)),o=n(70579);t.A=(0,i.default)((0,o.jsx)("path",{d:"m12 8-6 6 1.41 1.41L12 10.83l4.59 4.58L18 14z"}),"ExpandLess")},85990:(e,t,n)=>{var r=n(13028)(Object.getPrototypeOf,Object);e.exports=r},86178:function(e,t,n){(e=n.nmd(e)).exports=function(){"use strict";var t,n;function r(){return t.apply(null,arguments)}function i(e){t=e}function o(e){return e instanceof Array||"[object Array]"===Object.prototype.toString.call(e)}function a(e){return null!=e&&"[object Object]"===Object.prototype.toString.call(e)}function s(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function l(e){if(Object.getOwnPropertyNames)return 0===Object.getOwnPropertyNames(e).length;var t;for(t in e)if(s(e,t))return!1;return!0}function c(e){return void 0===e}function d(e){return"number"===typeof e||"[object Number]"===Object.prototype.toString.call(e)}function u(e){return e instanceof Date||"[object Date]"===Object.prototype.toString.call(e)}function p(e,t){var n,r=[],i=e.length;for(n=0;n<i;++n)r.push(t(e[n],n));return r}function h(e,t){for(var n in t)s(t,n)&&(e[n]=t[n]);return s(t,"toString")&&(e.toString=t.toString),s(t,"valueOf")&&(e.valueOf=t.valueOf),e}function m(e,t,n,r){return Yn(e,t,n,r,!0).utc()}function f(){return{empty:!1,unusedTokens:[],unusedInput:[],overflow:-2,charsLeftOver:0,nullInput:!1,invalidEra:null,invalidMonth:null,invalidFormat:!1,userInvalidated:!1,iso:!1,parsedDateParts:[],era:null,meridiem:null,rfc2822:!1,weekdayMismatch:!1}}function g(e){return null==e._pf&&(e._pf=f()),e._pf}function v(e){var t=null,r=!1,i=e._d&&!isNaN(e._d.getTime());return i&&(t=g(e),r=n.call(t.parsedDateParts,function(e){return null!=e}),i=t.overflow<0&&!t.empty&&!t.invalidEra&&!t.invalidMonth&&!t.invalidWeekday&&!t.weekdayMismatch&&!t.nullInput&&!t.invalidFormat&&!t.userInvalidated&&(!t.meridiem||t.meridiem&&r),e._strict&&(i=i&&0===t.charsLeftOver&&0===t.unusedTokens.length&&void 0===t.bigHour)),null!=Object.isFrozen&&Object.isFrozen(e)?i:(e._isValid=i,e._isValid)}function x(e){var t=m(NaN);return null!=e?h(g(t),e):g(t).userInvalidated=!0,t}n=Array.prototype.some?Array.prototype.some:function(e){var t,n=Object(this),r=n.length>>>0;for(t=0;t<r;t++)if(t in n&&e.call(this,n[t],t,n))return!0;return!1};var y=r.momentProperties=[],b=!1;function j(e,t){var n,r,i,o=y.length;if(c(t._isAMomentObject)||(e._isAMomentObject=t._isAMomentObject),c(t._i)||(e._i=t._i),c(t._f)||(e._f=t._f),c(t._l)||(e._l=t._l),c(t._strict)||(e._strict=t._strict),c(t._tzm)||(e._tzm=t._tzm),c(t._isUTC)||(e._isUTC=t._isUTC),c(t._offset)||(e._offset=t._offset),c(t._pf)||(e._pf=g(t)),c(t._locale)||(e._locale=t._locale),o>0)for(n=0;n<o;n++)c(i=t[r=y[n]])||(e[r]=i);return e}function _(e){j(this,e),this._d=new Date(null!=e._d?e._d.getTime():NaN),this.isValid()||(this._d=new Date(NaN)),!1===b&&(b=!0,r.updateOffset(this),b=!1)}function C(e){return e instanceof _||null!=e&&null!=e._isAMomentObject}function w(e){!1===r.suppressDeprecationWarnings&&"undefined"!==typeof console&&console.warn&&console.warn("Deprecation warning: "+e)}function S(e,t){var n=!0;return h(function(){if(null!=r.deprecationHandler&&r.deprecationHandler(null,e),n){var i,o,a,l=[],c=arguments.length;for(o=0;o<c;o++){if(i="","object"===typeof arguments[o]){for(a in i+="\n["+o+"] ",arguments[0])s(arguments[0],a)&&(i+=a+": "+arguments[0][a]+", ");i=i.slice(0,-2)}else i=arguments[o];l.push(i)}w(e+"\nArguments: "+Array.prototype.slice.call(l).join("")+"\n"+(new Error).stack),n=!1}return t.apply(this,arguments)},t)}var A,k={};function T(e,t){null!=r.deprecationHandler&&r.deprecationHandler(e,t),k[e]||(w(t),k[e]=!0)}function E(e){return"undefined"!==typeof Function&&e instanceof Function||"[object Function]"===Object.prototype.toString.call(e)}function M(e){var t,n;for(n in e)s(e,n)&&(E(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)}function O(e,t){var n,r=h({},e);for(n in t)s(t,n)&&(a(e[n])&&a(t[n])?(r[n]={},h(r[n],e[n]),h(r[n],t[n])):null!=t[n]?r[n]=t[n]:delete r[n]);for(n in e)s(e,n)&&!s(t,n)&&a(e[n])&&(r[n]=h({},r[n]));return r}function R(e){null!=e&&this.set(e)}r.suppressDeprecationWarnings=!1,r.deprecationHandler=null,A=Object.keys?Object.keys:function(e){var t,n=[];for(t in e)s(e,t)&&n.push(t);return n};var P={sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"};function D(e,t,n){var r=this._calendar[e]||this._calendar.sameElse;return E(r)?r.call(t,n):r}function N(e,t,n){var r=""+Math.abs(e),i=t-r.length;return(e>=0?n?"+":"":"-")+Math.pow(10,Math.max(0,i)).toString().substr(1)+r}var L=/(\[[^\[]*\])|(\\)?([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,I=/(\[[^\[]*\])|(\\)?(LTS|LT|LL?L?L?|l{1,4})/g,F={},$={};function B(e,t,n,r){var i=r;"string"===typeof r&&(i=function(){return this[r]()}),e&&($[e]=i),t&&($[t[0]]=function(){return N(i.apply(this,arguments),t[1],t[2])}),n&&($[n]=function(){return this.localeData().ordinal(i.apply(this,arguments),e)})}function z(e){return e.match(/\[[\s\S]/)?e.replace(/^\[|\]$/g,""):e.replace(/\\/g,"")}function H(e){var t,n,r=e.match(L);for(t=0,n=r.length;t<n;t++)$[r[t]]?r[t]=$[r[t]]:r[t]=z(r[t]);return function(t){var i,o="";for(i=0;i<n;i++)o+=E(r[i])?r[i].call(t,e):r[i];return o}}function W(e,t){return e.isValid()?(t=U(t,e.localeData()),F[t]=F[t]||H(t),F[t](e)):e.localeData().invalidDate()}function U(e,t){var n=5;function r(e){return t.longDateFormat(e)||e}for(I.lastIndex=0;n>=0&&I.test(e);)e=e.replace(I,r),I.lastIndex=0,n-=1;return e}var V={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"};function G(e){var t=this._longDateFormat[e],n=this._longDateFormat[e.toUpperCase()];return t||!n?t:(this._longDateFormat[e]=n.match(L).map(function(e){return"MMMM"===e||"MM"===e||"DD"===e||"dddd"===e?e.slice(1):e}).join(""),this._longDateFormat[e])}var q="Invalid date";function Y(){return this._invalidDate}var Z="%d",K=/\d{1,2}/;function X(e){return this._ordinal.replace("%d",e)}var Q={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"};function J(e,t,n,r){var i=this._relativeTime[n];return E(i)?i(e,t,n,r):i.replace(/%d/i,e)}function ee(e,t){var n=this._relativeTime[e>0?"future":"past"];return E(n)?n(t):n.replace(/%s/i,t)}var te={D:"date",dates:"date",date:"date",d:"day",days:"day",day:"day",e:"weekday",weekdays:"weekday",weekday:"weekday",E:"isoWeekday",isoweekdays:"isoWeekday",isoweekday:"isoWeekday",DDD:"dayOfYear",dayofyears:"dayOfYear",dayofyear:"dayOfYear",h:"hour",hours:"hour",hour:"hour",ms:"millisecond",milliseconds:"millisecond",millisecond:"millisecond",m:"minute",minutes:"minute",minute:"minute",M:"month",months:"month",month:"month",Q:"quarter",quarters:"quarter",quarter:"quarter",s:"second",seconds:"second",second:"second",gg:"weekYear",weekyears:"weekYear",weekyear:"weekYear",GG:"isoWeekYear",isoweekyears:"isoWeekYear",isoweekyear:"isoWeekYear",w:"week",weeks:"week",week:"week",W:"isoWeek",isoweeks:"isoWeek",isoweek:"isoWeek",y:"year",years:"year",year:"year"};function ne(e){return"string"===typeof e?te[e]||te[e.toLowerCase()]:void 0}function re(e){var t,n,r={};for(n in e)s(e,n)&&(t=ne(n))&&(r[t]=e[n]);return r}var ie={date:9,day:11,weekday:11,isoWeekday:11,dayOfYear:4,hour:13,millisecond:16,minute:14,month:8,quarter:7,second:15,weekYear:1,isoWeekYear:1,week:5,isoWeek:5,year:1};function oe(e){var t,n=[];for(t in e)s(e,t)&&n.push({unit:t,priority:ie[t]});return n.sort(function(e,t){return e.priority-t.priority}),n}var ae,se=/\d/,le=/\d\d/,ce=/\d{3}/,de=/\d{4}/,ue=/[+-]?\d{6}/,pe=/\d\d?/,he=/\d\d\d\d?/,me=/\d\d\d\d\d\d?/,fe=/\d{1,3}/,ge=/\d{1,4}/,ve=/[+-]?\d{1,6}/,xe=/\d+/,ye=/[+-]?\d+/,be=/Z|[+-]\d\d:?\d\d/gi,je=/Z|[+-]\d\d(?::?\d\d)?/gi,_e=/[+-]?\d+(\.\d{1,3})?/,Ce=/[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,we=/^[1-9]\d?/,Se=/^([1-9]\d|\d)/;function Ae(e,t,n){ae[e]=E(t)?t:function(e,r){return e&&n?n:t}}function ke(e,t){return s(ae,e)?ae[e](t._strict,t._locale):new RegExp(Te(e))}function Te(e){return Ee(e.replace("\\","").replace(/\\(\[)|\\(\])|\[([^\]\[]*)\]|\\(.)/g,function(e,t,n,r,i){return t||n||r||i}))}function Ee(e){return e.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&")}function Me(e){return e<0?Math.ceil(e)||0:Math.floor(e)}function Oe(e){var t=+e,n=0;return 0!==t&&isFinite(t)&&(n=Me(t)),n}ae={};var Re={};function Pe(e,t){var n,r,i=t;for("string"===typeof e&&(e=[e]),d(t)&&(i=function(e,n){n[t]=Oe(e)}),r=e.length,n=0;n<r;n++)Re[e[n]]=i}function De(e,t){Pe(e,function(e,n,r,i){r._w=r._w||{},t(e,r._w,r,i)})}function Ne(e,t,n){null!=t&&s(Re,e)&&Re[e](t,n._a,n,e)}function Le(e){return e%4===0&&e%100!==0||e%400===0}var Ie=0,Fe=1,$e=2,Be=3,ze=4,He=5,We=6,Ue=7,Ve=8;function Ge(e){return Le(e)?366:365}B("Y",0,0,function(){var e=this.year();return e<=9999?N(e,4):"+"+e}),B(0,["YY",2],0,function(){return this.year()%100}),B(0,["YYYY",4],0,"year"),B(0,["YYYYY",5],0,"year"),B(0,["YYYYYY",6,!0],0,"year"),Ae("Y",ye),Ae("YY",pe,le),Ae("YYYY",ge,de),Ae("YYYYY",ve,ue),Ae("YYYYYY",ve,ue),Pe(["YYYYY","YYYYYY"],Ie),Pe("YYYY",function(e,t){t[Ie]=2===e.length?r.parseTwoDigitYear(e):Oe(e)}),Pe("YY",function(e,t){t[Ie]=r.parseTwoDigitYear(e)}),Pe("Y",function(e,t){t[Ie]=parseInt(e,10)}),r.parseTwoDigitYear=function(e){return Oe(e)+(Oe(e)>68?1900:2e3)};var qe,Ye=Ke("FullYear",!0);function Ze(){return Le(this.year())}function Ke(e,t){return function(n){return null!=n?(Qe(this,e,n),r.updateOffset(this,t),this):Xe(this,e)}}function Xe(e,t){if(!e.isValid())return NaN;var n=e._d,r=e._isUTC;switch(t){case"Milliseconds":return r?n.getUTCMilliseconds():n.getMilliseconds();case"Seconds":return r?n.getUTCSeconds():n.getSeconds();case"Minutes":return r?n.getUTCMinutes():n.getMinutes();case"Hours":return r?n.getUTCHours():n.getHours();case"Date":return r?n.getUTCDate():n.getDate();case"Day":return r?n.getUTCDay():n.getDay();case"Month":return r?n.getUTCMonth():n.getMonth();case"FullYear":return r?n.getUTCFullYear():n.getFullYear();default:return NaN}}function Qe(e,t,n){var r,i,o,a,s;if(e.isValid()&&!isNaN(n)){switch(r=e._d,i=e._isUTC,t){case"Milliseconds":return void(i?r.setUTCMilliseconds(n):r.setMilliseconds(n));case"Seconds":return void(i?r.setUTCSeconds(n):r.setSeconds(n));case"Minutes":return void(i?r.setUTCMinutes(n):r.setMinutes(n));case"Hours":return void(i?r.setUTCHours(n):r.setHours(n));case"Date":return void(i?r.setUTCDate(n):r.setDate(n));case"FullYear":break;default:return}o=n,a=e.month(),s=29!==(s=e.date())||1!==a||Le(o)?s:28,i?r.setUTCFullYear(o,a,s):r.setFullYear(o,a,s)}}function Je(e){return E(this[e=ne(e)])?this[e]():this}function et(e,t){if("object"===typeof e){var n,r=oe(e=re(e)),i=r.length;for(n=0;n<i;n++)this[r[n].unit](e[r[n].unit])}else if(E(this[e=ne(e)]))return this[e](t);return this}function tt(e,t){return(e%t+t)%t}function nt(e,t){if(isNaN(e)||isNaN(t))return NaN;var n=tt(t,12);return e+=(t-n)/12,1===n?Le(e)?29:28:31-n%7%2}qe=Array.prototype.indexOf?Array.prototype.indexOf:function(e){var t;for(t=0;t<this.length;++t)if(this[t]===e)return t;return-1},B("M",["MM",2],"Mo",function(){return this.month()+1}),B("MMM",0,0,function(e){return this.localeData().monthsShort(this,e)}),B("MMMM",0,0,function(e){return this.localeData().months(this,e)}),Ae("M",pe,we),Ae("MM",pe,le),Ae("MMM",function(e,t){return t.monthsShortRegex(e)}),Ae("MMMM",function(e,t){return t.monthsRegex(e)}),Pe(["M","MM"],function(e,t){t[Fe]=Oe(e)-1}),Pe(["MMM","MMMM"],function(e,t,n,r){var i=n._locale.monthsParse(e,r,n._strict);null!=i?t[Fe]=i:g(n).invalidMonth=e});var rt="January_February_March_April_May_June_July_August_September_October_November_December".split("_"),it="Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_"),ot=/D[oD]?(\[[^\[\]]*\]|\s)+MMMM?/,at=Ce,st=Ce;function lt(e,t){return e?o(this._months)?this._months[e.month()]:this._months[(this._months.isFormat||ot).test(t)?"format":"standalone"][e.month()]:o(this._months)?this._months:this._months.standalone}function ct(e,t){return e?o(this._monthsShort)?this._monthsShort[e.month()]:this._monthsShort[ot.test(t)?"format":"standalone"][e.month()]:o(this._monthsShort)?this._monthsShort:this._monthsShort.standalone}function dt(e,t,n){var r,i,o,a=e.toLocaleLowerCase();if(!this._monthsParse)for(this._monthsParse=[],this._longMonthsParse=[],this._shortMonthsParse=[],r=0;r<12;++r)o=m([2e3,r]),this._shortMonthsParse[r]=this.monthsShort(o,"").toLocaleLowerCase(),this._longMonthsParse[r]=this.months(o,"").toLocaleLowerCase();return n?"MMM"===t?-1!==(i=qe.call(this._shortMonthsParse,a))?i:null:-1!==(i=qe.call(this._longMonthsParse,a))?i:null:"MMM"===t?-1!==(i=qe.call(this._shortMonthsParse,a))||-1!==(i=qe.call(this._longMonthsParse,a))?i:null:-1!==(i=qe.call(this._longMonthsParse,a))||-1!==(i=qe.call(this._shortMonthsParse,a))?i:null}function ut(e,t,n){var r,i,o;if(this._monthsParseExact)return dt.call(this,e,t,n);for(this._monthsParse||(this._monthsParse=[],this._longMonthsParse=[],this._shortMonthsParse=[]),r=0;r<12;r++){if(i=m([2e3,r]),n&&!this._longMonthsParse[r]&&(this._longMonthsParse[r]=new RegExp("^"+this.months(i,"").replace(".","")+"$","i"),this._shortMonthsParse[r]=new RegExp("^"+this.monthsShort(i,"").replace(".","")+"$","i")),n||this._monthsParse[r]||(o="^"+this.months(i,"")+"|^"+this.monthsShort(i,""),this._monthsParse[r]=new RegExp(o.replace(".",""),"i")),n&&"MMMM"===t&&this._longMonthsParse[r].test(e))return r;if(n&&"MMM"===t&&this._shortMonthsParse[r].test(e))return r;if(!n&&this._monthsParse[r].test(e))return r}}function pt(e,t){if(!e.isValid())return e;if("string"===typeof t)if(/^\d+$/.test(t))t=Oe(t);else if(!d(t=e.localeData().monthsParse(t)))return e;var n=t,r=e.date();return r=r<29?r:Math.min(r,nt(e.year(),n)),e._isUTC?e._d.setUTCMonth(n,r):e._d.setMonth(n,r),e}function ht(e){return null!=e?(pt(this,e),r.updateOffset(this,!0),this):Xe(this,"Month")}function mt(){return nt(this.year(),this.month())}function ft(e){return this._monthsParseExact?(s(this,"_monthsRegex")||vt.call(this),e?this._monthsShortStrictRegex:this._monthsShortRegex):(s(this,"_monthsShortRegex")||(this._monthsShortRegex=at),this._monthsShortStrictRegex&&e?this._monthsShortStrictRegex:this._monthsShortRegex)}function gt(e){return this._monthsParseExact?(s(this,"_monthsRegex")||vt.call(this),e?this._monthsStrictRegex:this._monthsRegex):(s(this,"_monthsRegex")||(this._monthsRegex=st),this._monthsStrictRegex&&e?this._monthsStrictRegex:this._monthsRegex)}function vt(){function e(e,t){return t.length-e.length}var t,n,r,i,o=[],a=[],s=[];for(t=0;t<12;t++)n=m([2e3,t]),r=Ee(this.monthsShort(n,"")),i=Ee(this.months(n,"")),o.push(r),a.push(i),s.push(i),s.push(r);o.sort(e),a.sort(e),s.sort(e),this._monthsRegex=new RegExp("^("+s.join("|")+")","i"),this._monthsShortRegex=this._monthsRegex,this._monthsStrictRegex=new RegExp("^("+a.join("|")+")","i"),this._monthsShortStrictRegex=new RegExp("^("+o.join("|")+")","i")}function xt(e,t,n,r,i,o,a){var s;return e<100&&e>=0?(s=new Date(e+400,t,n,r,i,o,a),isFinite(s.getFullYear())&&s.setFullYear(e)):s=new Date(e,t,n,r,i,o,a),s}function yt(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 bt(e,t,n){var r=7+t-n;return-(7+yt(e,0,r).getUTCDay()-t)%7+r-1}function jt(e,t,n,r,i){var o,a,s=1+7*(t-1)+(7+n-r)%7+bt(e,r,i);return s<=0?a=Ge(o=e-1)+s:s>Ge(e)?(o=e+1,a=s-Ge(e)):(o=e,a=s),{year:o,dayOfYear:a}}function _t(e,t,n){var r,i,o=bt(e.year(),t,n),a=Math.floor((e.dayOfYear()-o-1)/7)+1;return a<1?r=a+Ct(i=e.year()-1,t,n):a>Ct(e.year(),t,n)?(r=a-Ct(e.year(),t,n),i=e.year()+1):(i=e.year(),r=a),{week:r,year:i}}function Ct(e,t,n){var r=bt(e,t,n),i=bt(e+1,t,n);return(Ge(e)-r+i)/7}function wt(e){return _t(e,this._week.dow,this._week.doy).week}B("w",["ww",2],"wo","week"),B("W",["WW",2],"Wo","isoWeek"),Ae("w",pe,we),Ae("ww",pe,le),Ae("W",pe,we),Ae("WW",pe,le),De(["w","ww","W","WW"],function(e,t,n,r){t[r.substr(0,1)]=Oe(e)});var St={dow:0,doy:6};function At(){return this._week.dow}function kt(){return this._week.doy}function Tt(e){var t=this.localeData().week(this);return null==e?t:this.add(7*(e-t),"d")}function Et(e){var t=_t(this,1,4).week;return null==e?t:this.add(7*(e-t),"d")}function Mt(e,t){return"string"!==typeof e?e:isNaN(e)?"number"===typeof(e=t.weekdaysParse(e))?e:null:parseInt(e,10)}function Ot(e,t){return"string"===typeof e?t.weekdaysParse(e)%7||7:isNaN(e)?null:e}function Rt(e,t){return e.slice(t,7).concat(e.slice(0,t))}B("d",0,"do","day"),B("dd",0,0,function(e){return this.localeData().weekdaysMin(this,e)}),B("ddd",0,0,function(e){return this.localeData().weekdaysShort(this,e)}),B("dddd",0,0,function(e){return this.localeData().weekdays(this,e)}),B("e",0,0,"weekday"),B("E",0,0,"isoWeekday"),Ae("d",pe),Ae("e",pe),Ae("E",pe),Ae("dd",function(e,t){return t.weekdaysMinRegex(e)}),Ae("ddd",function(e,t){return t.weekdaysShortRegex(e)}),Ae("dddd",function(e,t){return t.weekdaysRegex(e)}),De(["dd","ddd","dddd"],function(e,t,n,r){var i=n._locale.weekdaysParse(e,r,n._strict);null!=i?t.d=i:g(n).invalidWeekday=e}),De(["d","e","E"],function(e,t,n,r){t[r]=Oe(e)});var Pt="Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),Dt="Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),Nt="Su_Mo_Tu_We_Th_Fr_Sa".split("_"),Lt=Ce,It=Ce,Ft=Ce;function $t(e,t){var n=o(this._weekdays)?this._weekdays:this._weekdays[e&&!0!==e&&this._weekdays.isFormat.test(t)?"format":"standalone"];return!0===e?Rt(n,this._week.dow):e?n[e.day()]:n}function Bt(e){return!0===e?Rt(this._weekdaysShort,this._week.dow):e?this._weekdaysShort[e.day()]:this._weekdaysShort}function zt(e){return!0===e?Rt(this._weekdaysMin,this._week.dow):e?this._weekdaysMin[e.day()]:this._weekdaysMin}function Ht(e,t,n){var r,i,o,a=e.toLocaleLowerCase();if(!this._weekdaysParse)for(this._weekdaysParse=[],this._shortWeekdaysParse=[],this._minWeekdaysParse=[],r=0;r<7;++r)o=m([2e3,1]).day(r),this._minWeekdaysParse[r]=this.weekdaysMin(o,"").toLocaleLowerCase(),this._shortWeekdaysParse[r]=this.weekdaysShort(o,"").toLocaleLowerCase(),this._weekdaysParse[r]=this.weekdays(o,"").toLocaleLowerCase();return n?"dddd"===t?-1!==(i=qe.call(this._weekdaysParse,a))?i:null:"ddd"===t?-1!==(i=qe.call(this._shortWeekdaysParse,a))?i:null:-1!==(i=qe.call(this._minWeekdaysParse,a))?i:null:"dddd"===t?-1!==(i=qe.call(this._weekdaysParse,a))||-1!==(i=qe.call(this._shortWeekdaysParse,a))||-1!==(i=qe.call(this._minWeekdaysParse,a))?i:null:"ddd"===t?-1!==(i=qe.call(this._shortWeekdaysParse,a))||-1!==(i=qe.call(this._weekdaysParse,a))||-1!==(i=qe.call(this._minWeekdaysParse,a))?i:null:-1!==(i=qe.call(this._minWeekdaysParse,a))||-1!==(i=qe.call(this._weekdaysParse,a))||-1!==(i=qe.call(this._shortWeekdaysParse,a))?i:null}function Wt(e,t,n){var r,i,o;if(this._weekdaysParseExact)return Ht.call(this,e,t,n);for(this._weekdaysParse||(this._weekdaysParse=[],this._minWeekdaysParse=[],this._shortWeekdaysParse=[],this._fullWeekdaysParse=[]),r=0;r<7;r++){if(i=m([2e3,1]).day(r),n&&!this._fullWeekdaysParse[r]&&(this._fullWeekdaysParse[r]=new RegExp("^"+this.weekdays(i,"").replace(".","\\.?")+"$","i"),this._shortWeekdaysParse[r]=new RegExp("^"+this.weekdaysShort(i,"").replace(".","\\.?")+"$","i"),this._minWeekdaysParse[r]=new RegExp("^"+this.weekdaysMin(i,"").replace(".","\\.?")+"$","i")),this._weekdaysParse[r]||(o="^"+this.weekdays(i,"")+"|^"+this.weekdaysShort(i,"")+"|^"+this.weekdaysMin(i,""),this._weekdaysParse[r]=new RegExp(o.replace(".",""),"i")),n&&"dddd"===t&&this._fullWeekdaysParse[r].test(e))return r;if(n&&"ddd"===t&&this._shortWeekdaysParse[r].test(e))return r;if(n&&"dd"===t&&this._minWeekdaysParse[r].test(e))return r;if(!n&&this._weekdaysParse[r].test(e))return r}}function Ut(e){if(!this.isValid())return null!=e?this:NaN;var t=Xe(this,"Day");return null!=e?(e=Mt(e,this.localeData()),this.add(e-t,"d")):t}function Vt(e){if(!this.isValid())return null!=e?this:NaN;var t=(this.day()+7-this.localeData()._week.dow)%7;return null==e?t:this.add(e-t,"d")}function Gt(e){if(!this.isValid())return null!=e?this:NaN;if(null!=e){var t=Ot(e,this.localeData());return this.day(this.day()%7?t:t-7)}return this.day()||7}function qt(e){return this._weekdaysParseExact?(s(this,"_weekdaysRegex")||Kt.call(this),e?this._weekdaysStrictRegex:this._weekdaysRegex):(s(this,"_weekdaysRegex")||(this._weekdaysRegex=Lt),this._weekdaysStrictRegex&&e?this._weekdaysStrictRegex:this._weekdaysRegex)}function Yt(e){return this._weekdaysParseExact?(s(this,"_weekdaysRegex")||Kt.call(this),e?this._weekdaysShortStrictRegex:this._weekdaysShortRegex):(s(this,"_weekdaysShortRegex")||(this._weekdaysShortRegex=It),this._weekdaysShortStrictRegex&&e?this._weekdaysShortStrictRegex:this._weekdaysShortRegex)}function Zt(e){return this._weekdaysParseExact?(s(this,"_weekdaysRegex")||Kt.call(this),e?this._weekdaysMinStrictRegex:this._weekdaysMinRegex):(s(this,"_weekdaysMinRegex")||(this._weekdaysMinRegex=Ft),this._weekdaysMinStrictRegex&&e?this._weekdaysMinStrictRegex:this._weekdaysMinRegex)}function Kt(){function e(e,t){return t.length-e.length}var t,n,r,i,o,a=[],s=[],l=[],c=[];for(t=0;t<7;t++)n=m([2e3,1]).day(t),r=Ee(this.weekdaysMin(n,"")),i=Ee(this.weekdaysShort(n,"")),o=Ee(this.weekdays(n,"")),a.push(r),s.push(i),l.push(o),c.push(r),c.push(i),c.push(o);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 Xt(){return this.hours()%12||12}function Qt(){return this.hours()||24}function Jt(e,t){B(e,0,0,function(){return this.localeData().meridiem(this.hours(),this.minutes(),t)})}function en(e,t){return t._meridiemParse}function tn(e){return"p"===(e+"").toLowerCase().charAt(0)}B("H",["HH",2],0,"hour"),B("h",["hh",2],0,Xt),B("k",["kk",2],0,Qt),B("hmm",0,0,function(){return""+Xt.apply(this)+N(this.minutes(),2)}),B("hmmss",0,0,function(){return""+Xt.apply(this)+N(this.minutes(),2)+N(this.seconds(),2)}),B("Hmm",0,0,function(){return""+this.hours()+N(this.minutes(),2)}),B("Hmmss",0,0,function(){return""+this.hours()+N(this.minutes(),2)+N(this.seconds(),2)}),Jt("a",!0),Jt("A",!1),Ae("a",en),Ae("A",en),Ae("H",pe,Se),Ae("h",pe,we),Ae("k",pe,we),Ae("HH",pe,le),Ae("hh",pe,le),Ae("kk",pe,le),Ae("hmm",he),Ae("hmmss",me),Ae("Hmm",he),Ae("Hmmss",me),Pe(["H","HH"],Be),Pe(["k","kk"],function(e,t,n){var r=Oe(e);t[Be]=24===r?0:r}),Pe(["a","A"],function(e,t,n){n._isPm=n._locale.isPM(e),n._meridiem=e}),Pe(["h","hh"],function(e,t,n){t[Be]=Oe(e),g(n).bigHour=!0}),Pe("hmm",function(e,t,n){var r=e.length-2;t[Be]=Oe(e.substr(0,r)),t[ze]=Oe(e.substr(r)),g(n).bigHour=!0}),Pe("hmmss",function(e,t,n){var r=e.length-4,i=e.length-2;t[Be]=Oe(e.substr(0,r)),t[ze]=Oe(e.substr(r,2)),t[He]=Oe(e.substr(i)),g(n).bigHour=!0}),Pe("Hmm",function(e,t,n){var r=e.length-2;t[Be]=Oe(e.substr(0,r)),t[ze]=Oe(e.substr(r))}),Pe("Hmmss",function(e,t,n){var r=e.length-4,i=e.length-2;t[Be]=Oe(e.substr(0,r)),t[ze]=Oe(e.substr(r,2)),t[He]=Oe(e.substr(i))});var nn=/[ap]\.?m?\.?/i,rn=Ke("Hours",!0);function on(e,t,n){return e>11?n?"pm":"PM":n?"am":"AM"}var an,sn={calendar:P,longDateFormat:V,invalidDate:q,ordinal:Z,dayOfMonthOrdinalParse:K,relativeTime:Q,months:rt,monthsShort:it,week:St,weekdays:Pt,weekdaysMin:Nt,weekdaysShort:Dt,meridiemParse:nn},ln={},cn={};function dn(e,t){var n,r=Math.min(e.length,t.length);for(n=0;n<r;n+=1)if(e[n]!==t[n])return n;return r}function un(e){return e?e.toLowerCase().replace("_","-"):e}function pn(e){for(var t,n,r,i,o=0;o<e.length;){for(t=(i=un(e[o]).split("-")).length,n=(n=un(e[o+1]))?n.split("-"):null;t>0;){if(r=mn(i.slice(0,t).join("-")))return r;if(n&&n.length>=t&&dn(i,n)>=t-1)break;t--}o++}return an}function hn(e){return!(!e||!e.match("^[^/\\\\]*$"))}function mn(t){var n=null;if(void 0===ln[t]&&e&&e.exports&&hn(t))try{n=an._abbr,Object(function(){var e=new Error("Cannot find module 'undefined'");throw e.code="MODULE_NOT_FOUND",e}()),fn(n)}catch(r){ln[t]=null}return ln[t]}function fn(e,t){var n;return e&&((n=c(t)?xn(e):gn(e,t))?an=n:"undefined"!==typeof console&&console.warn&&console.warn("Locale "+e+" not found. Did you forget to load it?")),an._abbr}function gn(e,t){if(null!==t){var n,r=sn;if(t.abbr=e,null!=ln[e])T("defineLocaleOverride","use moment.updateLocale(localeName, config) to change an existing locale. moment.defineLocale(localeName, config) should only be used for creating a new locale See http://momentjs.com/guides/#/warnings/define-locale/ for more info."),r=ln[e]._config;else if(null!=t.parentLocale)if(null!=ln[t.parentLocale])r=ln[t.parentLocale]._config;else{if(null==(n=mn(t.parentLocale)))return cn[t.parentLocale]||(cn[t.parentLocale]=[]),cn[t.parentLocale].push({name:e,config:t}),null;r=n._config}return ln[e]=new R(O(r,t)),cn[e]&&cn[e].forEach(function(e){gn(e.name,e.config)}),fn(e),ln[e]}return delete ln[e],null}function vn(e,t){if(null!=t){var n,r,i=sn;null!=ln[e]&&null!=ln[e].parentLocale?ln[e].set(O(ln[e]._config,t)):(null!=(r=mn(e))&&(i=r._config),t=O(i,t),null==r&&(t.abbr=e),(n=new R(t)).parentLocale=ln[e],ln[e]=n),fn(e)}else null!=ln[e]&&(null!=ln[e].parentLocale?(ln[e]=ln[e].parentLocale,e===fn()&&fn(e)):null!=ln[e]&&delete ln[e]);return ln[e]}function xn(e){var t;if(e&&e._locale&&e._locale._abbr&&(e=e._locale._abbr),!e)return an;if(!o(e)){if(t=mn(e))return t;e=[e]}return pn(e)}function yn(){return A(ln)}function bn(e){var t,n=e._a;return n&&-2===g(e).overflow&&(t=n[Fe]<0||n[Fe]>11?Fe:n[$e]<1||n[$e]>nt(n[Ie],n[Fe])?$e:n[Be]<0||n[Be]>24||24===n[Be]&&(0!==n[ze]||0!==n[He]||0!==n[We])?Be:n[ze]<0||n[ze]>59?ze:n[He]<0||n[He]>59?He:n[We]<0||n[We]>999?We:-1,g(e)._overflowDayOfYear&&(t<Ie||t>$e)&&(t=$e),g(e)._overflowWeeks&&-1===t&&(t=Ue),g(e)._overflowWeekday&&-1===t&&(t=Ve),g(e).overflow=t),e}var jn=/^\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)?)?$/,_n=/^\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)?)?$/,Cn=/Z|[+-]\d\d(?::?\d\d)?/,wn=[["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]],Sn=[["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/]],An=/^\/?Date\((-?\d+)/i,kn=/^(?:(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}))$/,Tn={UT:0,GMT:0,EDT:-240,EST:-300,CDT:-300,CST:-360,MDT:-360,MST:-420,PDT:-420,PST:-480};function En(e){var t,n,r,i,o,a,s=e._i,l=jn.exec(s)||_n.exec(s),c=wn.length,d=Sn.length;if(l){for(g(e).iso=!0,t=0,n=c;t<n;t++)if(wn[t][1].exec(l[1])){i=wn[t][0],r=!1!==wn[t][2];break}if(null==i)return void(e._isValid=!1);if(l[3]){for(t=0,n=d;t<n;t++)if(Sn[t][1].exec(l[3])){o=(l[2]||" ")+Sn[t][0];break}if(null==o)return void(e._isValid=!1)}if(!r&&null!=o)return void(e._isValid=!1);if(l[4]){if(!Cn.exec(l[4]))return void(e._isValid=!1);a="Z"}e._f=i+(o||"")+(a||""),zn(e)}else e._isValid=!1}function Mn(e,t,n,r,i,o){var a=[On(e),it.indexOf(t),parseInt(n,10),parseInt(r,10),parseInt(i,10)];return o&&a.push(parseInt(o,10)),a}function On(e){var t=parseInt(e,10);return t<=49?2e3+t:t<=999?1900+t:t}function Rn(e){return e.replace(/\([^()]*\)|[\n\t]/g," ").replace(/(\s\s+)/g," ").replace(/^\s\s*/,"").replace(/\s\s*$/,"")}function Pn(e,t,n){return!e||Dt.indexOf(e)===new Date(t[0],t[1],t[2]).getDay()||(g(n).weekdayMismatch=!0,n._isValid=!1,!1)}function Dn(e,t,n){if(e)return Tn[e];if(t)return 0;var r=parseInt(n,10),i=r%100;return(r-i)/100*60+i}function Nn(e){var t,n=kn.exec(Rn(e._i));if(n){if(t=Mn(n[4],n[3],n[2],n[5],n[6],n[7]),!Pn(n[1],t,e))return;e._a=t,e._tzm=Dn(n[8],n[9],n[10]),e._d=yt.apply(null,e._a),e._d.setUTCMinutes(e._d.getUTCMinutes()-e._tzm),g(e).rfc2822=!0}else e._isValid=!1}function Ln(e){var t=An.exec(e._i);null===t?(En(e),!1===e._isValid&&(delete e._isValid,Nn(e),!1===e._isValid&&(delete e._isValid,e._strict?e._isValid=!1:r.createFromInputFallback(e)))):e._d=new Date(+t[1])}function In(e,t,n){return null!=e?e:null!=t?t:n}function Fn(e){var t=new Date(r.now());return e._useUTC?[t.getUTCFullYear(),t.getUTCMonth(),t.getUTCDate()]:[t.getFullYear(),t.getMonth(),t.getDate()]}function $n(e){var t,n,r,i,o,a=[];if(!e._d){for(r=Fn(e),e._w&&null==e._a[$e]&&null==e._a[Fe]&&Bn(e),null!=e._dayOfYear&&(o=In(e._a[Ie],r[Ie]),(e._dayOfYear>Ge(o)||0===e._dayOfYear)&&(g(e)._overflowDayOfYear=!0),n=yt(o,0,e._dayOfYear),e._a[Fe]=n.getUTCMonth(),e._a[$e]=n.getUTCDate()),t=0;t<3&&null==e._a[t];++t)e._a[t]=a[t]=r[t];for(;t<7;t++)e._a[t]=a[t]=null==e._a[t]?2===t?1:0:e._a[t];24===e._a[Be]&&0===e._a[ze]&&0===e._a[He]&&0===e._a[We]&&(e._nextDay=!0,e._a[Be]=0),e._d=(e._useUTC?yt:xt).apply(null,a),i=e._useUTC?e._d.getUTCDay():e._d.getDay(),null!=e._tzm&&e._d.setUTCMinutes(e._d.getUTCMinutes()-e._tzm),e._nextDay&&(e._a[Be]=24),e._w&&"undefined"!==typeof e._w.d&&e._w.d!==i&&(g(e).weekdayMismatch=!0)}}function Bn(e){var t,n,r,i,o,a,s,l,c;null!=(t=e._w).GG||null!=t.W||null!=t.E?(o=1,a=4,n=In(t.GG,e._a[Ie],_t(Zn(),1,4).year),r=In(t.W,1),((i=In(t.E,1))<1||i>7)&&(l=!0)):(o=e._locale._week.dow,a=e._locale._week.doy,c=_t(Zn(),o,a),n=In(t.gg,e._a[Ie],c.year),r=In(t.w,c.week),null!=t.d?((i=t.d)<0||i>6)&&(l=!0):null!=t.e?(i=t.e+o,(t.e<0||t.e>6)&&(l=!0)):i=o),r<1||r>Ct(n,o,a)?g(e)._overflowWeeks=!0:null!=l?g(e)._overflowWeekday=!0:(s=jt(n,r,i,o,a),e._a[Ie]=s.year,e._dayOfYear=s.dayOfYear)}function zn(e){if(e._f!==r.ISO_8601)if(e._f!==r.RFC_2822){e._a=[],g(e).empty=!0;var t,n,i,o,a,s,l,c=""+e._i,d=c.length,u=0;for(l=(i=U(e._f,e._locale).match(L)||[]).length,t=0;t<l;t++)o=i[t],(n=(c.match(ke(o,e))||[])[0])&&((a=c.substr(0,c.indexOf(n))).length>0&&g(e).unusedInput.push(a),c=c.slice(c.indexOf(n)+n.length),u+=n.length),$[o]?(n?g(e).empty=!1:g(e).unusedTokens.push(o),Ne(o,n,e)):e._strict&&!n&&g(e).unusedTokens.push(o);g(e).charsLeftOver=d-u,c.length>0&&g(e).unusedInput.push(c),e._a[Be]<=12&&!0===g(e).bigHour&&e._a[Be]>0&&(g(e).bigHour=void 0),g(e).parsedDateParts=e._a.slice(0),g(e).meridiem=e._meridiem,e._a[Be]=Hn(e._locale,e._a[Be],e._meridiem),null!==(s=g(e).era)&&(e._a[Ie]=e._locale.erasConvertYear(s,e._a[Ie])),$n(e),bn(e)}else Nn(e);else En(e)}function Hn(e,t,n){var r;return null==n?t:null!=e.meridiemHour?e.meridiemHour(t,n):null!=e.isPM?((r=e.isPM(n))&&t<12&&(t+=12),r||12!==t||(t=0),t):t}function Wn(e){var t,n,r,i,o,a,s=!1,l=e._f.length;if(0===l)return g(e).invalidFormat=!0,void(e._d=new Date(NaN));for(i=0;i<l;i++)o=0,a=!1,t=j({},e),null!=e._useUTC&&(t._useUTC=e._useUTC),t._f=e._f[i],zn(t),v(t)&&(a=!0),o+=g(t).charsLeftOver,o+=10*g(t).unusedTokens.length,g(t).score=o,s?o<r&&(r=o,n=t):(null==r||o<r||a)&&(r=o,n=t,a&&(s=!0));h(e,n||t)}function Un(e){if(!e._d){var t=re(e._i),n=void 0===t.day?t.date:t.day;e._a=p([t.year,t.month,n,t.hour,t.minute,t.second,t.millisecond],function(e){return e&&parseInt(e,10)}),$n(e)}}function Vn(e){var t=new _(bn(Gn(e)));return t._nextDay&&(t.add(1,"d"),t._nextDay=void 0),t}function Gn(e){var t=e._i,n=e._f;return e._locale=e._locale||xn(e._l),null===t||void 0===n&&""===t?x({nullInput:!0}):("string"===typeof t&&(e._i=t=e._locale.preparse(t)),C(t)?new _(bn(t)):(u(t)?e._d=t:o(n)?Wn(e):n?zn(e):qn(e),v(e)||(e._d=null),e))}function qn(e){var t=e._i;c(t)?e._d=new Date(r.now()):u(t)?e._d=new Date(t.valueOf()):"string"===typeof t?Ln(e):o(t)?(e._a=p(t.slice(0),function(e){return parseInt(e,10)}),$n(e)):a(t)?Un(e):d(t)?e._d=new Date(t):r.createFromInputFallback(e)}function Yn(e,t,n,r,i){var s={};return!0!==t&&!1!==t||(r=t,t=void 0),!0!==n&&!1!==n||(r=n,n=void 0),(a(e)&&l(e)||o(e)&&0===e.length)&&(e=void 0),s._isAMomentObject=!0,s._useUTC=s._isUTC=i,s._l=n,s._i=e,s._f=t,s._strict=r,Vn(s)}function Zn(e,t,n,r){return Yn(e,t,n,r,!1)}r.createFromInputFallback=S("value provided is not in a recognized RFC2822 or ISO format. moment construction falls back to js Date(), which is not reliable across all browsers and versions. Non RFC2822/ISO date formats are discouraged. Please refer to http://momentjs.com/guides/#/warnings/js-date/ for more info.",function(e){e._d=new Date(e._i+(e._useUTC?" UTC":""))}),r.ISO_8601=function(){},r.RFC_2822=function(){};var Kn=S("moment().min is deprecated, use moment.max instead. http://momentjs.com/guides/#/warnings/min-max/",function(){var e=Zn.apply(null,arguments);return this.isValid()&&e.isValid()?e<this?this:e:x()}),Xn=S("moment().max is deprecated, use moment.min instead. http://momentjs.com/guides/#/warnings/min-max/",function(){var e=Zn.apply(null,arguments);return this.isValid()&&e.isValid()?e>this?this:e:x()});function Qn(e,t){var n,r;if(1===t.length&&o(t[0])&&(t=t[0]),!t.length)return Zn();for(n=t[0],r=1;r<t.length;++r)t[r].isValid()&&!t[r][e](n)||(n=t[r]);return n}function Jn(){return Qn("isBefore",[].slice.call(arguments,0))}function er(){return Qn("isAfter",[].slice.call(arguments,0))}var tr=function(){return Date.now?Date.now():+new Date},nr=["year","quarter","month","week","day","hour","minute","second","millisecond"];function rr(e){var t,n,r=!1,i=nr.length;for(t in e)if(s(e,t)&&(-1===qe.call(nr,t)||null!=e[t]&&isNaN(e[t])))return!1;for(n=0;n<i;++n)if(e[nr[n]]){if(r)return!1;parseFloat(e[nr[n]])!==Oe(e[nr[n]])&&(r=!0)}return!0}function ir(){return this._isValid}function or(){return Tr(NaN)}function ar(e){var t=re(e),n=t.year||0,r=t.quarter||0,i=t.month||0,o=t.week||t.isoWeek||0,a=t.day||0,s=t.hour||0,l=t.minute||0,c=t.second||0,d=t.millisecond||0;this._isValid=rr(t),this._milliseconds=+d+1e3*c+6e4*l+1e3*s*60*60,this._days=+a+7*o,this._months=+i+3*r+12*n,this._data={},this._locale=xn(),this._bubble()}function sr(e){return e instanceof ar}function lr(e){return e<0?-1*Math.round(-1*e):Math.round(e)}function cr(e,t,n){var r,i=Math.min(e.length,t.length),o=Math.abs(e.length-t.length),a=0;for(r=0;r<i;r++)(n&&e[r]!==t[r]||!n&&Oe(e[r])!==Oe(t[r]))&&a++;return a+o}function dr(e,t){B(e,0,0,function(){var e=this.utcOffset(),n="+";return e<0&&(e=-e,n="-"),n+N(~~(e/60),2)+t+N(~~e%60,2)})}dr("Z",":"),dr("ZZ",""),Ae("Z",je),Ae("ZZ",je),Pe(["Z","ZZ"],function(e,t,n){n._useUTC=!0,n._tzm=pr(je,e)});var ur=/([\+\-]|\d\d)/gi;function pr(e,t){var n,r,i=(t||"").match(e);return null===i?null:0===(r=60*(n=((i[i.length-1]||[])+"").match(ur)||["-",0,0])[1]+Oe(n[2]))?0:"+"===n[0]?r:-r}function hr(e,t){var n,i;return t._isUTC?(n=t.clone(),i=(C(e)||u(e)?e.valueOf():Zn(e).valueOf())-n.valueOf(),n._d.setTime(n._d.valueOf()+i),r.updateOffset(n,!1),n):Zn(e).local()}function mr(e){return-Math.round(e._d.getTimezoneOffset())}function fr(e,t,n){var i,o=this._offset||0;if(!this.isValid())return null!=e?this:NaN;if(null!=e){if("string"===typeof e){if(null===(e=pr(je,e)))return this}else Math.abs(e)<16&&!n&&(e*=60);return!this._isUTC&&t&&(i=mr(this)),this._offset=e,this._isUTC=!0,null!=i&&this.add(i,"m"),o!==e&&(!t||this._changeInProgress?Pr(this,Tr(e-o,"m"),1,!1):this._changeInProgress||(this._changeInProgress=!0,r.updateOffset(this,!0),this._changeInProgress=null)),this}return this._isUTC?o:mr(this)}function gr(e,t){return null!=e?("string"!==typeof e&&(e=-e),this.utcOffset(e,t),this):-this.utcOffset()}function vr(e){return this.utcOffset(0,e)}function xr(e){return this._isUTC&&(this.utcOffset(0,e),this._isUTC=!1,e&&this.subtract(mr(this),"m")),this}function yr(){if(null!=this._tzm)this.utcOffset(this._tzm,!1,!0);else if("string"===typeof this._i){var e=pr(be,this._i);null!=e?this.utcOffset(e):this.utcOffset(0,!0)}return this}function br(e){return!!this.isValid()&&(e=e?Zn(e).utcOffset():0,(this.utcOffset()-e)%60===0)}function jr(){return this.utcOffset()>this.clone().month(0).utcOffset()||this.utcOffset()>this.clone().month(5).utcOffset()}function _r(){if(!c(this._isDSTShifted))return this._isDSTShifted;var e,t={};return j(t,this),(t=Gn(t))._a?(e=t._isUTC?m(t._a):Zn(t._a),this._isDSTShifted=this.isValid()&&cr(t._a,e.toArray())>0):this._isDSTShifted=!1,this._isDSTShifted}function Cr(){return!!this.isValid()&&!this._isUTC}function wr(){return!!this.isValid()&&this._isUTC}function Sr(){return!!this.isValid()&&this._isUTC&&0===this._offset}r.updateOffset=function(){};var Ar=/^(-|\+)?(?:(\d*)[. ])?(\d+):(\d+)(?::(\d+)(\.\d*)?)?$/,kr=/^(-|\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/;function Tr(e,t){var n,r,i,o=e,a=null;return sr(e)?o={ms:e._milliseconds,d:e._days,M:e._months}:d(e)||!isNaN(+e)?(o={},t?o[t]=+e:o.milliseconds=+e):(a=Ar.exec(e))?(n="-"===a[1]?-1:1,o={y:0,d:Oe(a[$e])*n,h:Oe(a[Be])*n,m:Oe(a[ze])*n,s:Oe(a[He])*n,ms:Oe(lr(1e3*a[We]))*n}):(a=kr.exec(e))?(n="-"===a[1]?-1:1,o={y:Er(a[2],n),M:Er(a[3],n),w:Er(a[4],n),d:Er(a[5],n),h:Er(a[6],n),m:Er(a[7],n),s:Er(a[8],n)}):null==o?o={}:"object"===typeof o&&("from"in o||"to"in o)&&(i=Or(Zn(o.from),Zn(o.to)),(o={}).ms=i.milliseconds,o.M=i.months),r=new ar(o),sr(e)&&s(e,"_locale")&&(r._locale=e._locale),sr(e)&&s(e,"_isValid")&&(r._isValid=e._isValid),r}function Er(e,t){var n=e&&parseFloat(e.replace(",","."));return(isNaN(n)?0:n)*t}function Mr(e,t){var n={};return n.months=t.month()-e.month()+12*(t.year()-e.year()),e.clone().add(n.months,"M").isAfter(t)&&--n.months,n.milliseconds=+t-+e.clone().add(n.months,"M"),n}function Or(e,t){var n;return e.isValid()&&t.isValid()?(t=hr(t,e),e.isBefore(t)?n=Mr(e,t):((n=Mr(t,e)).milliseconds=-n.milliseconds,n.months=-n.months),n):{milliseconds:0,months:0}}function Rr(e,t){return function(n,r){var i;return null===r||isNaN(+r)||(T(t,"moment()."+t+"(period, number) is deprecated. Please use moment()."+t+"(number, period). See http://momentjs.com/guides/#/warnings/add-inverted-param/ for more info."),i=n,n=r,r=i),Pr(this,Tr(n,r),e),this}}function Pr(e,t,n,i){var o=t._milliseconds,a=lr(t._days),s=lr(t._months);e.isValid()&&(i=null==i||i,s&&pt(e,Xe(e,"Month")+s*n),a&&Qe(e,"Date",Xe(e,"Date")+a*n),o&&e._d.setTime(e._d.valueOf()+o*n),i&&r.updateOffset(e,a||s))}Tr.fn=ar.prototype,Tr.invalid=or;var Dr=Rr(1,"add"),Nr=Rr(-1,"subtract");function Lr(e){return"string"===typeof e||e instanceof String}function Ir(e){return C(e)||u(e)||Lr(e)||d(e)||$r(e)||Fr(e)||null===e||void 0===e}function Fr(e){var t,n,r=a(e)&&!l(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"],c=o.length;for(t=0;t<c;t+=1)n=o[t],i=i||s(e,n);return r&&i}function $r(e){var t=o(e),n=!1;return t&&(n=0===e.filter(function(t){return!d(t)&&Lr(e)}).length),t&&n}function Br(e){var t,n,r=a(e)&&!l(e),i=!1,o=["sameDay","nextDay","lastDay","nextWeek","lastWeek","sameElse"];for(t=0;t<o.length;t+=1)n=o[t],i=i||s(e,n);return r&&i}function zr(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"}function Hr(e,t){1===arguments.length&&(arguments[0]?Ir(arguments[0])?(e=arguments[0],t=void 0):Br(arguments[0])&&(t=arguments[0],e=void 0):(e=void 0,t=void 0));var n=e||Zn(),i=hr(n,this).startOf("day"),o=r.calendarFormat(this,i)||"sameElse",a=t&&(E(t[o])?t[o].call(this,n):t[o]);return this.format(a||this.localeData().calendar(o,this,Zn(n)))}function Wr(){return new _(this)}function Ur(e,t){var n=C(e)?e:Zn(e);return!(!this.isValid()||!n.isValid())&&("millisecond"===(t=ne(t)||"millisecond")?this.valueOf()>n.valueOf():n.valueOf()<this.clone().startOf(t).valueOf())}function Vr(e,t){var n=C(e)?e:Zn(e);return!(!this.isValid()||!n.isValid())&&("millisecond"===(t=ne(t)||"millisecond")?this.valueOf()<n.valueOf():this.clone().endOf(t).valueOf()<n.valueOf())}function Gr(e,t,n,r){var i=C(e)?e:Zn(e),o=C(t)?t:Zn(t);return!!(this.isValid()&&i.isValid()&&o.isValid())&&("("===(r=r||"()")[0]?this.isAfter(i,n):!this.isBefore(i,n))&&(")"===r[1]?this.isBefore(o,n):!this.isAfter(o,n))}function qr(e,t){var n,r=C(e)?e:Zn(e);return!(!this.isValid()||!r.isValid())&&("millisecond"===(t=ne(t)||"millisecond")?this.valueOf()===r.valueOf():(n=r.valueOf(),this.clone().startOf(t).valueOf()<=n&&n<=this.clone().endOf(t).valueOf()))}function Yr(e,t){return this.isSame(e,t)||this.isAfter(e,t)}function Zr(e,t){return this.isSame(e,t)||this.isBefore(e,t)}function Kr(e,t,n){var r,i,o;if(!this.isValid())return NaN;if(!(r=hr(e,this)).isValid())return NaN;switch(i=6e4*(r.utcOffset()-this.utcOffset()),t=ne(t)){case"year":o=Xr(this,r)/12;break;case"month":o=Xr(this,r);break;case"quarter":o=Xr(this,r)/3;break;case"second":o=(this-r)/1e3;break;case"minute":o=(this-r)/6e4;break;case"hour":o=(this-r)/36e5;break;case"day":o=(this-r-i)/864e5;break;case"week":o=(this-r-i)/6048e5;break;default:o=this-r}return n?o:Me(o)}function Xr(e,t){if(e.date()<t.date())return-Xr(t,e);var n=12*(t.year()-e.year())+(t.month()-e.month()),r=e.clone().add(n,"months");return-(n+(t-r<0?(t-r)/(r-e.clone().add(n-1,"months")):(t-r)/(e.clone().add(n+1,"months")-r)))||0}function Qr(){return this.clone().locale("en").format("ddd MMM DD YYYY HH:mm:ss [GMT]ZZ")}function Jr(e){if(!this.isValid())return null;var t=!0!==e,n=t?this.clone().utc():this;return n.year()<0||n.year()>9999?W(n,t?"YYYYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYYYY-MM-DD[T]HH:mm:ss.SSSZ"):E(Date.prototype.toISOString)?t?this.toDate().toISOString():new Date(this.valueOf()+60*this.utcOffset()*1e3).toISOString().replace("Z",W(n,"Z")):W(n,t?"YYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYY-MM-DD[T]HH:mm:ss.SSSZ")}function ei(){if(!this.isValid())return"moment.invalid(/* "+this._i+" */)";var e,t,n,r,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="-MM-DD[T]HH:mm:ss.SSS",r=o+'[")]',this.format(e+t+n+r)}function ti(e){e||(e=this.isUtc()?r.defaultFormatUtc:r.defaultFormat);var t=W(this,e);return this.localeData().postformat(t)}function ni(e,t){return this.isValid()&&(C(e)&&e.isValid()||Zn(e).isValid())?Tr({to:this,from:e}).locale(this.locale()).humanize(!t):this.localeData().invalidDate()}function ri(e){return this.from(Zn(),e)}function ii(e,t){return this.isValid()&&(C(e)&&e.isValid()||Zn(e).isValid())?Tr({from:this,to:e}).locale(this.locale()).humanize(!t):this.localeData().invalidDate()}function oi(e){return this.to(Zn(),e)}function ai(e){var t;return void 0===e?this._locale._abbr:(null!=(t=xn(e))&&(this._locale=t),this)}r.defaultFormat="YYYY-MM-DDTHH:mm:ssZ",r.defaultFormatUtc="YYYY-MM-DDTHH:mm:ss[Z]";var si=S("moment().lang() is deprecated. Instead, use moment().localeData() to get the language configuration. Use moment().locale() to change languages.",function(e){return void 0===e?this.localeData():this.locale(e)});function li(){return this._locale}var ci=1e3,di=60*ci,ui=60*di,pi=3506328*ui;function hi(e,t){return(e%t+t)%t}function mi(e,t,n){return e<100&&e>=0?new Date(e+400,t,n)-pi:new Date(e,t,n).valueOf()}function fi(e,t,n){return e<100&&e>=0?Date.UTC(e+400,t,n)-pi:Date.UTC(e,t,n)}function gi(e){var t,n;if(void 0===(e=ne(e))||"millisecond"===e||!this.isValid())return this;switch(n=this._isUTC?fi:mi,e){case"year":t=n(this.year(),0,1);break;case"quarter":t=n(this.year(),this.month()-this.month()%3,1);break;case"month":t=n(this.year(),this.month(),1);break;case"week":t=n(this.year(),this.month(),this.date()-this.weekday());break;case"isoWeek":t=n(this.year(),this.month(),this.date()-(this.isoWeekday()-1));break;case"day":case"date":t=n(this.year(),this.month(),this.date());break;case"hour":t=this._d.valueOf(),t-=hi(t+(this._isUTC?0:this.utcOffset()*di),ui);break;case"minute":t=this._d.valueOf(),t-=hi(t,di);break;case"second":t=this._d.valueOf(),t-=hi(t,ci)}return this._d.setTime(t),r.updateOffset(this,!0),this}function vi(e){var t,n;if(void 0===(e=ne(e))||"millisecond"===e||!this.isValid())return this;switch(n=this._isUTC?fi:mi,e){case"year":t=n(this.year()+1,0,1)-1;break;case"quarter":t=n(this.year(),this.month()-this.month()%3+3,1)-1;break;case"month":t=n(this.year(),this.month()+1,1)-1;break;case"week":t=n(this.year(),this.month(),this.date()-this.weekday()+7)-1;break;case"isoWeek":t=n(this.year(),this.month(),this.date()-(this.isoWeekday()-1)+7)-1;break;case"day":case"date":t=n(this.year(),this.month(),this.date()+1)-1;break;case"hour":t=this._d.valueOf(),t+=ui-hi(t+(this._isUTC?0:this.utcOffset()*di),ui)-1;break;case"minute":t=this._d.valueOf(),t+=di-hi(t,di)-1;break;case"second":t=this._d.valueOf(),t+=ci-hi(t,ci)-1}return this._d.setTime(t),r.updateOffset(this,!0),this}function xi(){return this._d.valueOf()-6e4*(this._offset||0)}function yi(){return Math.floor(this.valueOf()/1e3)}function bi(){return new Date(this.valueOf())}function ji(){var e=this;return[e.year(),e.month(),e.date(),e.hour(),e.minute(),e.second(),e.millisecond()]}function _i(){var e=this;return{years:e.year(),months:e.month(),date:e.date(),hours:e.hours(),minutes:e.minutes(),seconds:e.seconds(),milliseconds:e.milliseconds()}}function Ci(){return this.isValid()?this.toISOString():null}function wi(){return v(this)}function Si(){return h({},g(this))}function Ai(){return g(this).overflow}function ki(){return{input:this._i,format:this._f,locale:this._locale,isUTC:this._isUTC,strict:this._strict}}function Ti(e,t){var n,i,o,a=this._eras||xn("en")._eras;for(n=0,i=a.length;n<i;++n)switch("string"===typeof a[n].since&&(o=r(a[n].since).startOf("day"),a[n].since=o.valueOf()),typeof a[n].until){case"undefined":a[n].until=1/0;break;case"string":o=r(a[n].until).startOf("day").valueOf(),a[n].until=o.valueOf()}return a}function Ei(e,t,n){var r,i,o,a,s,l=this.eras();for(e=e.toUpperCase(),r=0,i=l.length;r<i;++r)if(o=l[r].name.toUpperCase(),a=l[r].abbr.toUpperCase(),s=l[r].narrow.toUpperCase(),n)switch(t){case"N":case"NN":case"NNN":if(a===e)return l[r];break;case"NNNN":if(o===e)return l[r];break;case"NNNNN":if(s===e)return l[r]}else if([o,a,s].indexOf(e)>=0)return l[r]}function Mi(e,t){var n=e.since<=e.until?1:-1;return void 0===t?r(e.since).year():r(e.since).year()+(t-e.offset)*n}function Oi(){var e,t,n,r=this.localeData().eras();for(e=0,t=r.length;e<t;++e){if(n=this.clone().startOf("day").valueOf(),r[e].since<=n&&n<=r[e].until)return r[e].name;if(r[e].until<=n&&n<=r[e].since)return r[e].name}return""}function Ri(){var e,t,n,r=this.localeData().eras();for(e=0,t=r.length;e<t;++e){if(n=this.clone().startOf("day").valueOf(),r[e].since<=n&&n<=r[e].until)return r[e].narrow;if(r[e].until<=n&&n<=r[e].since)return r[e].narrow}return""}function Pi(){var e,t,n,r=this.localeData().eras();for(e=0,t=r.length;e<t;++e){if(n=this.clone().startOf("day").valueOf(),r[e].since<=n&&n<=r[e].until)return r[e].abbr;if(r[e].until<=n&&n<=r[e].since)return r[e].abbr}return""}function Di(){var e,t,n,i,o=this.localeData().eras();for(e=0,t=o.length;e<t;++e)if(n=o[e].since<=o[e].until?1:-1,i=this.clone().startOf("day").valueOf(),o[e].since<=i&&i<=o[e].until||o[e].until<=i&&i<=o[e].since)return(this.year()-r(o[e].since).year())*n+o[e].offset;return this.year()}function Ni(e){return s(this,"_erasNameRegex")||Hi.call(this),e?this._erasNameRegex:this._erasRegex}function Li(e){return s(this,"_erasAbbrRegex")||Hi.call(this),e?this._erasAbbrRegex:this._erasRegex}function Ii(e){return s(this,"_erasNarrowRegex")||Hi.call(this),e?this._erasNarrowRegex:this._erasRegex}function Fi(e,t){return t.erasAbbrRegex(e)}function $i(e,t){return t.erasNameRegex(e)}function Bi(e,t){return t.erasNarrowRegex(e)}function zi(e,t){return t._eraYearOrdinalRegex||xe}function Hi(){var e,t,n,r,i,o=[],a=[],s=[],l=[],c=this.eras();for(e=0,t=c.length;e<t;++e)n=Ee(c[e].name),r=Ee(c[e].abbr),i=Ee(c[e].narrow),a.push(n),o.push(r),s.push(i),l.push(n),l.push(r),l.push(i);this._erasRegex=new RegExp("^("+l.join("|")+")","i"),this._erasNameRegex=new RegExp("^("+a.join("|")+")","i"),this._erasAbbrRegex=new RegExp("^("+o.join("|")+")","i"),this._erasNarrowRegex=new RegExp("^("+s.join("|")+")","i")}function Wi(e,t){B(0,[e,e.length],0,t)}function Ui(e){return Ki.call(this,e,this.week(),this.weekday()+this.localeData()._week.dow,this.localeData()._week.dow,this.localeData()._week.doy)}function Vi(e){return Ki.call(this,e,this.isoWeek(),this.isoWeekday(),1,4)}function Gi(){return Ct(this.year(),1,4)}function qi(){return Ct(this.isoWeekYear(),1,4)}function Yi(){var e=this.localeData()._week;return Ct(this.year(),e.dow,e.doy)}function Zi(){var e=this.localeData()._week;return Ct(this.weekYear(),e.dow,e.doy)}function Ki(e,t,n,r,i){var o;return null==e?_t(this,r,i).year:(t>(o=Ct(e,r,i))&&(t=o),Xi.call(this,e,t,n,r,i))}function Xi(e,t,n,r,i){var o=jt(e,t,n,r,i),a=yt(o.year,0,o.dayOfYear);return this.year(a.getUTCFullYear()),this.month(a.getUTCMonth()),this.date(a.getUTCDate()),this}function Qi(e){return null==e?Math.ceil((this.month()+1)/3):this.month(3*(e-1)+this.month()%3)}B("N",0,0,"eraAbbr"),B("NN",0,0,"eraAbbr"),B("NNN",0,0,"eraAbbr"),B("NNNN",0,0,"eraName"),B("NNNNN",0,0,"eraNarrow"),B("y",["y",1],"yo","eraYear"),B("y",["yy",2],0,"eraYear"),B("y",["yyy",3],0,"eraYear"),B("y",["yyyy",4],0,"eraYear"),Ae("N",Fi),Ae("NN",Fi),Ae("NNN",Fi),Ae("NNNN",$i),Ae("NNNNN",Bi),Pe(["N","NN","NNN","NNNN","NNNNN"],function(e,t,n,r){var i=n._locale.erasParse(e,r,n._strict);i?g(n).era=i:g(n).invalidEra=e}),Ae("y",xe),Ae("yy",xe),Ae("yyy",xe),Ae("yyyy",xe),Ae("yo",zi),Pe(["y","yy","yyy","yyyy"],Ie),Pe(["yo"],function(e,t,n,r){var i;n._locale._eraYearOrdinalRegex&&(i=e.match(n._locale._eraYearOrdinalRegex)),n._locale.eraYearOrdinalParse?t[Ie]=n._locale.eraYearOrdinalParse(e,i):t[Ie]=parseInt(e,10)}),B(0,["gg",2],0,function(){return this.weekYear()%100}),B(0,["GG",2],0,function(){return this.isoWeekYear()%100}),Wi("gggg","weekYear"),Wi("ggggg","weekYear"),Wi("GGGG","isoWeekYear"),Wi("GGGGG","isoWeekYear"),Ae("G",ye),Ae("g",ye),Ae("GG",pe,le),Ae("gg",pe,le),Ae("GGGG",ge,de),Ae("gggg",ge,de),Ae("GGGGG",ve,ue),Ae("ggggg",ve,ue),De(["gggg","ggggg","GGGG","GGGGG"],function(e,t,n,r){t[r.substr(0,2)]=Oe(e)}),De(["gg","GG"],function(e,t,n,i){t[i]=r.parseTwoDigitYear(e)}),B("Q",0,"Qo","quarter"),Ae("Q",se),Pe("Q",function(e,t){t[Fe]=3*(Oe(e)-1)}),B("D",["DD",2],"Do","date"),Ae("D",pe,we),Ae("DD",pe,le),Ae("Do",function(e,t){return e?t._dayOfMonthOrdinalParse||t._ordinalParse:t._dayOfMonthOrdinalParseLenient}),Pe(["D","DD"],$e),Pe("Do",function(e,t){t[$e]=Oe(e.match(pe)[0])});var Ji=Ke("Date",!0);function eo(e){var t=Math.round((this.clone().startOf("day")-this.clone().startOf("year"))/864e5)+1;return null==e?t:this.add(e-t,"d")}B("DDD",["DDDD",3],"DDDo","dayOfYear"),Ae("DDD",fe),Ae("DDDD",ce),Pe(["DDD","DDDD"],function(e,t,n){n._dayOfYear=Oe(e)}),B("m",["mm",2],0,"minute"),Ae("m",pe,Se),Ae("mm",pe,le),Pe(["m","mm"],ze);var to=Ke("Minutes",!1);B("s",["ss",2],0,"second"),Ae("s",pe,Se),Ae("ss",pe,le),Pe(["s","ss"],He);var no,ro,io=Ke("Seconds",!1);for(B("S",0,0,function(){return~~(this.millisecond()/100)}),B(0,["SS",2],0,function(){return~~(this.millisecond()/10)}),B(0,["SSS",3],0,"millisecond"),B(0,["SSSS",4],0,function(){return 10*this.millisecond()}),B(0,["SSSSS",5],0,function(){return 100*this.millisecond()}),B(0,["SSSSSS",6],0,function(){return 1e3*this.millisecond()}),B(0,["SSSSSSS",7],0,function(){return 1e4*this.millisecond()}),B(0,["SSSSSSSS",8],0,function(){return 1e5*this.millisecond()}),B(0,["SSSSSSSSS",9],0,function(){return 1e6*this.millisecond()}),Ae("S",fe,se),Ae("SS",fe,le),Ae("SSS",fe,ce),no="SSSS";no.length<=9;no+="S")Ae(no,xe);function oo(e,t){t[We]=Oe(1e3*("0."+e))}for(no="S";no.length<=9;no+="S")Pe(no,oo);function ao(){return this._isUTC?"UTC":""}function so(){return this._isUTC?"Coordinated Universal Time":""}ro=Ke("Milliseconds",!1),B("z",0,0,"zoneAbbr"),B("zz",0,0,"zoneName");var lo=_.prototype;function co(e){return Zn(1e3*e)}function uo(){return Zn.apply(null,arguments).parseZone()}function po(e){return e}lo.add=Dr,lo.calendar=Hr,lo.clone=Wr,lo.diff=Kr,lo.endOf=vi,lo.format=ti,lo.from=ni,lo.fromNow=ri,lo.to=ii,lo.toNow=oi,lo.get=Je,lo.invalidAt=Ai,lo.isAfter=Ur,lo.isBefore=Vr,lo.isBetween=Gr,lo.isSame=qr,lo.isSameOrAfter=Yr,lo.isSameOrBefore=Zr,lo.isValid=wi,lo.lang=si,lo.locale=ai,lo.localeData=li,lo.max=Xn,lo.min=Kn,lo.parsingFlags=Si,lo.set=et,lo.startOf=gi,lo.subtract=Nr,lo.toArray=ji,lo.toObject=_i,lo.toDate=bi,lo.toISOString=Jr,lo.inspect=ei,"undefined"!==typeof Symbol&&null!=Symbol.for&&(lo[Symbol.for("nodejs.util.inspect.custom")]=function(){return"Moment<"+this.format()+">"}),lo.toJSON=Ci,lo.toString=Qr,lo.unix=yi,lo.valueOf=xi,lo.creationData=ki,lo.eraName=Oi,lo.eraNarrow=Ri,lo.eraAbbr=Pi,lo.eraYear=Di,lo.year=Ye,lo.isLeapYear=Ze,lo.weekYear=Ui,lo.isoWeekYear=Vi,lo.quarter=lo.quarters=Qi,lo.month=ht,lo.daysInMonth=mt,lo.week=lo.weeks=Tt,lo.isoWeek=lo.isoWeeks=Et,lo.weeksInYear=Yi,lo.weeksInWeekYear=Zi,lo.isoWeeksInYear=Gi,lo.isoWeeksInISOWeekYear=qi,lo.date=Ji,lo.day=lo.days=Ut,lo.weekday=Vt,lo.isoWeekday=Gt,lo.dayOfYear=eo,lo.hour=lo.hours=rn,lo.minute=lo.minutes=to,lo.second=lo.seconds=io,lo.millisecond=lo.milliseconds=ro,lo.utcOffset=fr,lo.utc=vr,lo.local=xr,lo.parseZone=yr,lo.hasAlignedHourOffset=br,lo.isDST=jr,lo.isLocal=Cr,lo.isUtcOffset=wr,lo.isUtc=Sr,lo.isUTC=Sr,lo.zoneAbbr=ao,lo.zoneName=so,lo.dates=S("dates accessor is deprecated. Use date instead.",Ji),lo.months=S("months accessor is deprecated. Use month instead",ht),lo.years=S("years accessor is deprecated. Use year instead",Ye),lo.zone=S("moment().zone is deprecated, use moment().utcOffset instead. http://momentjs.com/guides/#/warnings/zone/",gr),lo.isDSTShifted=S("isDSTShifted is deprecated. See http://momentjs.com/guides/#/warnings/dst-shifted/ for more information",_r);var ho=R.prototype;function mo(e,t,n,r){var i=xn(),o=m().set(r,t);return i[n](o,e)}function fo(e,t,n){if(d(e)&&(t=e,e=void 0),e=e||"",null!=t)return mo(e,t,n,"month");var r,i=[];for(r=0;r<12;r++)i[r]=mo(e,r,n,"month");return i}function go(e,t,n,r){"boolean"===typeof e?(d(t)&&(n=t,t=void 0),t=t||""):(n=t=e,e=!1,d(t)&&(n=t,t=void 0),t=t||"");var i,o=xn(),a=e?o._week.dow:0,s=[];if(null!=n)return mo(t,(n+a)%7,r,"day");for(i=0;i<7;i++)s[i]=mo(t,(i+a)%7,r,"day");return s}function vo(e,t){return fo(e,t,"months")}function xo(e,t){return fo(e,t,"monthsShort")}function yo(e,t,n){return go(e,t,n,"weekdays")}function bo(e,t,n){return go(e,t,n,"weekdaysShort")}function jo(e,t,n){return go(e,t,n,"weekdaysMin")}ho.calendar=D,ho.longDateFormat=G,ho.invalidDate=Y,ho.ordinal=X,ho.preparse=po,ho.postformat=po,ho.relativeTime=J,ho.pastFuture=ee,ho.set=M,ho.eras=Ti,ho.erasParse=Ei,ho.erasConvertYear=Mi,ho.erasAbbrRegex=Li,ho.erasNameRegex=Ni,ho.erasNarrowRegex=Ii,ho.months=lt,ho.monthsShort=ct,ho.monthsParse=ut,ho.monthsRegex=gt,ho.monthsShortRegex=ft,ho.week=wt,ho.firstDayOfYear=kt,ho.firstDayOfWeek=At,ho.weekdays=$t,ho.weekdaysMin=zt,ho.weekdaysShort=Bt,ho.weekdaysParse=Wt,ho.weekdaysRegex=qt,ho.weekdaysShortRegex=Yt,ho.weekdaysMinRegex=Zt,ho.isPM=tn,ho.meridiem=on,fn("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===Oe(e%100/10)?"th":1===t?"st":2===t?"nd":3===t?"rd":"th")}}),r.lang=S("moment.lang is deprecated. Use moment.locale instead.",fn),r.langData=S("moment.langData is deprecated. Use moment.localeData instead.",xn);var _o=Math.abs;function Co(){var e=this._data;return this._milliseconds=_o(this._milliseconds),this._days=_o(this._days),this._months=_o(this._months),e.milliseconds=_o(e.milliseconds),e.seconds=_o(e.seconds),e.minutes=_o(e.minutes),e.hours=_o(e.hours),e.months=_o(e.months),e.years=_o(e.years),this}function wo(e,t,n,r){var i=Tr(t,n);return e._milliseconds+=r*i._milliseconds,e._days+=r*i._days,e._months+=r*i._months,e._bubble()}function So(e,t){return wo(this,e,t,1)}function Ao(e,t){return wo(this,e,t,-1)}function ko(e){return e<0?Math.floor(e):Math.ceil(e)}function To(){var e,t,n,r,i,o=this._milliseconds,a=this._days,s=this._months,l=this._data;return o>=0&&a>=0&&s>=0||o<=0&&a<=0&&s<=0||(o+=864e5*ko(Mo(s)+a),a=0,s=0),l.milliseconds=o%1e3,e=Me(o/1e3),l.seconds=e%60,t=Me(e/60),l.minutes=t%60,n=Me(t/60),l.hours=n%24,a+=Me(n/24),s+=i=Me(Eo(a)),a-=ko(Mo(i)),r=Me(s/12),s%=12,l.days=a,l.months=s,l.years=r,this}function Eo(e){return 4800*e/146097}function Mo(e){return 146097*e/4800}function Oo(e){if(!this.isValid())return NaN;var t,n,r=this._milliseconds;if("month"===(e=ne(e))||"quarter"===e||"year"===e)switch(t=this._days+r/864e5,n=this._months+Eo(t),e){case"month":return n;case"quarter":return n/3;case"year":return n/12}else switch(t=this._days+Math.round(Mo(this._months)),e){case"week":return t/7+r/6048e5;case"day":return t+r/864e5;case"hour":return 24*t+r/36e5;case"minute":return 1440*t+r/6e4;case"second":return 86400*t+r/1e3;case"millisecond":return Math.floor(864e5*t)+r;default:throw new Error("Unknown unit "+e)}}function Ro(e){return function(){return this.as(e)}}var Po=Ro("ms"),Do=Ro("s"),No=Ro("m"),Lo=Ro("h"),Io=Ro("d"),Fo=Ro("w"),$o=Ro("M"),Bo=Ro("Q"),zo=Ro("y"),Ho=Po;function Wo(){return Tr(this)}function Uo(e){return e=ne(e),this.isValid()?this[e+"s"]():NaN}function Vo(e){return function(){return this.isValid()?this._data[e]:NaN}}var Go=Vo("milliseconds"),qo=Vo("seconds"),Yo=Vo("minutes"),Zo=Vo("hours"),Ko=Vo("days"),Xo=Vo("months"),Qo=Vo("years");function Jo(){return Me(this.days()/7)}var ea=Math.round,ta={ss:44,s:45,m:45,h:22,d:26,w:null,M:11};function na(e,t,n,r,i){return i.relativeTime(t||1,!!n,e,r)}function ra(e,t,n,r){var i=Tr(e).abs(),o=ea(i.as("s")),a=ea(i.as("m")),s=ea(i.as("h")),l=ea(i.as("d")),c=ea(i.as("M")),d=ea(i.as("w")),u=ea(i.as("y")),p=o<=n.ss&&["s",o]||o<n.s&&["ss",o]||a<=1&&["m"]||a<n.m&&["mm",a]||s<=1&&["h"]||s<n.h&&["hh",s]||l<=1&&["d"]||l<n.d&&["dd",l];return null!=n.w&&(p=p||d<=1&&["w"]||d<n.w&&["ww",d]),(p=p||c<=1&&["M"]||c<n.M&&["MM",c]||u<=1&&["y"]||["yy",u])[2]=t,p[3]=+e>0,p[4]=r,na.apply(null,p)}function ia(e){return void 0===e?ea:"function"===typeof e&&(ea=e,!0)}function oa(e,t){return void 0!==ta[e]&&(void 0===t?ta[e]:(ta[e]=t,"s"===e&&(ta.ss=t-1),!0))}function aa(e,t){if(!this.isValid())return this.localeData().invalidDate();var n,r,i=!1,o=ta;return"object"===typeof e&&(t=e,e=!1),"boolean"===typeof e&&(i=e),"object"===typeof t&&(o=Object.assign({},ta,t),null!=t.s&&null==t.ss&&(o.ss=t.s-1)),r=ra(this,!i,o,n=this.localeData()),i&&(r=n.pastFuture(+this,r)),n.postformat(r)}var sa=Math.abs;function la(e){return(e>0)-(e<0)||+e}function ca(){if(!this.isValid())return this.localeData().invalidDate();var e,t,n,r,i,o,a,s,l=sa(this._milliseconds)/1e3,c=sa(this._days),d=sa(this._months),u=this.asSeconds();return u?(e=Me(l/60),t=Me(e/60),l%=60,e%=60,n=Me(d/12),d%=12,r=l?l.toFixed(3).replace(/\.?0+$/,""):"",i=u<0?"-":"",o=la(this._months)!==la(u)?"-":"",a=la(this._days)!==la(u)?"-":"",s=la(this._milliseconds)!==la(u)?"-":"",i+"P"+(n?o+n+"Y":"")+(d?o+d+"M":"")+(c?a+c+"D":"")+(t||e||l?"T":"")+(t?s+t+"H":"")+(e?s+e+"M":"")+(l?s+r+"S":"")):"P0D"}var da=ar.prototype;return da.isValid=ir,da.abs=Co,da.add=So,da.subtract=Ao,da.as=Oo,da.asMilliseconds=Po,da.asSeconds=Do,da.asMinutes=No,da.asHours=Lo,da.asDays=Io,da.asWeeks=Fo,da.asMonths=$o,da.asQuarters=Bo,da.asYears=zo,da.valueOf=Ho,da._bubble=To,da.clone=Wo,da.get=Uo,da.milliseconds=Go,da.seconds=qo,da.minutes=Yo,da.hours=Zo,da.days=Ko,da.weeks=Jo,da.months=Xo,da.years=Qo,da.humanize=aa,da.toISOString=ca,da.toString=ca,da.toJSON=ca,da.locale=ai,da.localeData=li,da.toIsoString=S("toIsoString() is deprecated. Please use toISOString() instead (notice the capitals)",ca),da.lang=si,B("X",0,0,"unix"),B("x",0,0,"valueOf"),Ae("x",ye),Ae("X",_e),Pe("X",function(e,t,n){n._d=new Date(1e3*parseFloat(e))}),Pe("x",function(e,t,n){n._d=new Date(Oe(e))}),r.version="2.30.1",i(Zn),r.fn=lo,r.min=Jn,r.max=er,r.now=tr,r.utc=m,r.unix=co,r.months=vo,r.isDate=u,r.locale=fn,r.invalid=x,r.duration=Tr,r.isMoment=C,r.weekdays=yo,r.parseZone=uo,r.localeData=xn,r.isDuration=sr,r.monthsShort=xo,r.weekdaysMin=jo,r.defineLocale=gn,r.updateLocale=vn,r.locales=yn,r.weekdaysShort=bo,r.normalizeUnits=ne,r.relativeTimeRounding=ia,r.relativeTimeThreshold=oa,r.calendarFormat=zr,r.prototype=lo,r.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"},r}()},86179:e=>{e.exports=function(e){return this.__data__.set(e,"__lodash_hash_undefined__"),this}},86267:(e,t,n)=>{"use strict";var r,i=n(26973),o=Object.prototype.toString,a=(r=Object.create(null),function(e){var t=o.call(e);return r[t]||(r[t]=t.slice(8,-1).toLowerCase())});function s(e){return e=e.toLowerCase(),function(t){return a(t)===e}}function l(e){return Array.isArray(e)}function c(e){return"undefined"===typeof e}var d=s("ArrayBuffer");function u(e){return null!==e&&"object"===typeof e}function p(e){if("object"!==a(e))return!1;var t=Object.getPrototypeOf(e);return null===t||t===Object.prototype}var h=s("Date"),m=s("File"),f=s("Blob"),g=s("FileList");function v(e){return"[object Function]"===o.call(e)}var x=s("URLSearchParams");function y(e,t){if(null!==e&&"undefined"!==typeof e)if("object"!==typeof e&&(e=[e]),l(e))for(var n=0,r=e.length;n<r;n++)t.call(null,e[n],n,e);else for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&t.call(null,e[i],i,e)}var b,j=(b="undefined"!==typeof Uint8Array&&Object.getPrototypeOf(Uint8Array),function(e){return b&&e instanceof b});e.exports={isArray:l,isArrayBuffer:d,isBuffer:function(e){return null!==e&&!c(e)&&null!==e.constructor&&!c(e.constructor)&&"function"===typeof e.constructor.isBuffer&&e.constructor.isBuffer(e)},isFormData:function(e){var t="[object FormData]";return e&&("function"===typeof FormData&&e instanceof FormData||o.call(e)===t||v(e.toString)&&e.toString()===t)},isArrayBufferView:function(e){return"undefined"!==typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer.isView(e):e&&e.buffer&&d(e.buffer)},isString:function(e){return"string"===typeof e},isNumber:function(e){return"number"===typeof e},isObject:u,isPlainObject:p,isUndefined:c,isDate:h,isFile:m,isBlob:f,isFunction:v,isStream:function(e){return u(e)&&v(e.pipe)},isURLSearchParams:x,isStandardBrowserEnv:function(){return("undefined"===typeof navigator||"ReactNative"!==navigator.product&&"NativeScript"!==navigator.product&&"NS"!==navigator.product)&&("undefined"!==typeof window&&"undefined"!==typeof document)},forEach:y,merge:function e(){var t={};function n(n,r){p(t[r])&&p(n)?t[r]=e(t[r],n):p(n)?t[r]=e({},n):l(n)?t[r]=n.slice():t[r]=n}for(var r=0,i=arguments.length;r<i;r++)y(arguments[r],n);return t},extend:function(e,t,n){return y(t,function(t,r){e[r]=n&&"function"===typeof t?i(t,n):t}),e},trim:function(e){return e.trim?e.trim():e.replace(/^\s+|\s+$/g,"")},stripBOM:function(e){return 65279===e.charCodeAt(0)&&(e=e.slice(1)),e},inherits:function(e,t,n,r){e.prototype=Object.create(t.prototype,r),e.prototype.constructor=e,n&&Object.assign(e.prototype,n)},toFlatObject:function(e,t,n){var r,i,o,a={};t=t||{};do{for(i=(r=Object.getOwnPropertyNames(e)).length;i-- >0;)a[o=r[i]]||(t[o]=e[o],a[o]=!0);e=Object.getPrototypeOf(e)}while(e&&(!n||n(e,t))&&e!==Object.prototype);return t},kindOf:a,kindOfTest:s,endsWith:function(e,t,n){e=String(e),(void 0===n||n>e.length)&&(n=e.length),n-=t.length;var r=e.indexOf(t,n);return-1!==r&&r===n},toArray:function(e){if(!e)return null;var t=e.length;if(c(t))return null;for(var n=new Array(t);t-- >0;)n[t]=e[t];return n},isTypedArray:j,isFileList:g}},86532:(e,t,n)=>{var r=n(5538),i=n(26989);e.exports=function(e,t,n,o){var a=n.length,s=a,l=!o;if(null==e)return!s;for(e=Object(e);a--;){var c=n[a];if(l&&c[2]?c[1]!==e[c[0]]:!(c[0]in e))return!1}for(;++a<s;){var d=(c=n[a])[0],u=e[d],p=c[1];if(l&&c[2]){if(void 0===u&&!(d in e))return!1}else{var h=new r;if(o)var m=o(u,p,d,e,t,h);if(!(void 0===m?i(p,u,3,o,h):m))return!1}}return!0}},86578:e=>{var t=Date.now;e.exports=function(e){var n=0,r=0;return function(){var i=t(),o=16-(i-r);if(r=i,o>0){if(++n>=800)return arguments[0]}else n=0;return e.apply(void 0,arguments)}}},86735:(e,t,n)=>{"use strict";var r=n(86267);function i(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}e.exports=function(e,t,n){if(!t)return e;var o;if(n)o=n(t);else if(r.isURLSearchParams(t))o=t.toString();else{var a=[];r.forEach(t,function(e,t){null!==e&&"undefined"!==typeof e&&(r.isArray(e)?t+="[]":e=[e],r.forEach(e,function(e){r.isDate(e)?e=e.toISOString():r.isObject(e)&&(e=JSON.stringify(e)),a.push(i(t)+"="+i(e))}))}),o=a.join("&")}if(o){var s=e.indexOf("#");-1!==s&&(e=e.slice(0,s)),e+=(-1===e.indexOf("?")?"?":"&")+o}return e}},87424:(e,t,n)=>{var r=n(80755),i=n(12536),o=n(55647),a=n(60929),s=o(function(e,t){if(null==e)return[];var n=t.length;return n>1&&a(e,t[0],t[1])?t=[]:n>2&&a(t[0],t[1],t[2])&&(t=[t[0]]),i(e,r(t,1),[])});e.exports=s},87563:e=>{e.exports=function(){this.__data__=[],this.size=0}},87676:(e,t,n)=>{var r=n(19648),i=n(35967),o=n(41069),a=n(61540);e.exports=function(e,t,n){return e=o(e),void 0===(t=n?void 0:t)?i(e)?a(e):r(e):e.match(t)||[]}},87767:e=>{"use strict";e.exports=function(e){return!(!e||!e.__CANCEL__)}},87884:(e,t,n)=>{"use strict";var r=n(24994);t.A=void 0;var i=r(n(40039)),o=n(70579);t.A=(0,i.default)((0,o.jsx)("path",{d:"M6 19c0 1.1.9 2 2 2h8c1.1 0 2-.9 2-2V7H6zm2.46-7.12 1.41-1.41L12 12.59l2.12-2.12 1.41 1.41L13.41 14l2.12 2.12-1.41 1.41L12 15.41l-2.12 2.12-1.41-1.41L10.59 14zM15.5 4l-1-1h-5l-1 1H5v2h14V4z"}),"DeleteForever")},87918:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>r.A});var r=n(67598)},87937:(e,t,n)=>{var r=n(36954),i=n(14657);e.exports=function(e,t){var n=i(e,t);return r(n)?n:void 0}},88259:(e,t,n)=>{var r=n(15797);e.exports=function(e){var t=r(e,function(e){return 500===n.size&&n.clear(),e}),n=t.cache;return t}},88468:(e,t,n)=>{var r=n(75816),i=n(40644),o=n(94020);e.exports=function(e,t,n){return t===t?o(e,t,n):r(e,i,n)}},88938:(e,t,n)=>{"use strict";var r=n(86267),i=n(86735),o=n(6664),a=n(64395),s=n(56438),l=n(17638),c=n(42478),d=c.validators;function u(e){this.defaults=e,this.interceptors={request:new o,response:new o}}u.prototype.request=function(e,t){"string"===typeof e?(t=t||{}).url=e:t=e||{},(t=s(this.defaults,t)).method?t.method=t.method.toLowerCase():this.defaults.method?t.method=this.defaults.method.toLowerCase():t.method="get";var n=t.transitional;void 0!==n&&c.assertOptions(n,{silentJSONParsing:d.transitional(d.boolean),forcedJSONParsing:d.transitional(d.boolean),clarifyTimeoutError:d.transitional(d.boolean)},!1);var r=[],i=!0;this.interceptors.request.forEach(function(e){"function"===typeof e.runWhen&&!1===e.runWhen(t)||(i=i&&e.synchronous,r.unshift(e.fulfilled,e.rejected))});var o,l=[];if(this.interceptors.response.forEach(function(e){l.push(e.fulfilled,e.rejected)}),!i){var u=[a,void 0];for(Array.prototype.unshift.apply(u,r),u=u.concat(l),o=Promise.resolve(t);u.length;)o=o.then(u.shift(),u.shift());return o}for(var p=t;r.length;){var h=r.shift(),m=r.shift();try{p=h(p)}catch(f){m(f);break}}try{o=a(p)}catch(f){return Promise.reject(f)}for(;l.length;)o=o.then(l.shift(),l.shift());return o},u.prototype.getUri=function(e){e=s(this.defaults,e);var t=l(e.baseURL,e.url);return i(t,e.params,e.paramsSerializer)},r.forEach(["delete","get","head","options"],function(e){u.prototype[e]=function(t,n){return this.request(s(n||{},{method:e,url:t,data:(n||{}).data}))}}),r.forEach(["post","put","patch"],function(e){function t(t){return function(n,r,i){return this.request(s(i||{},{method:e,headers:t?{"Content-Type":"multipart/form-data"}:{},url:n,data:r}))}}u.prototype[e]=t(),u.prototype[e+"Form"]=t(!0)}),e.exports=u},89335:e=>{"use strict";e.exports={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1}},89379:(e,t,n)=>{"use strict";n.d(t,{A:()=>o});var r=n(64467);function i(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function o(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?i(Object(n),!0).forEach(function(t){(0,r.A)(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):i(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}},89496:function(e,t){var n,r,i;r=[],void 0===(i="function"===typeof(n=function(){function e(e){var t=getComputedStyle(e,null).getPropertyValue("overflow");return t.indexOf("scroll")>-1||t.indexOf("auto")>-1}function t(t){if(t instanceof HTMLElement||t instanceof SVGElement){for(var n=t.parentNode;n.parentNode;){if(e(n))return n;n=n.parentNode}return document.scrollingElement||document.documentElement}}return t})?n.apply(t,r):n)||(e.exports=i)},89611:(e,t,n)=>{"use strict";var r=n(24994);t.A=void 0;var i=r(n(40039)),o=n(70579);t.A=(0,i.default)((0,o.jsx)("path",{d:"M3 18h18v-2H3zm0-5h18v-2H3zm0-7v2h18V6z"}),"Menu")},89703:(e,t,n)=>{"use strict";function r(e,t){const n=this;if(n.vars&&"function"===typeof n.getColorSchemeSelector){const r=n.getColorSchemeSelector(e).replace(/(\[[^\]]+\])/,"*:where($1)");return{[r]:t}}return n.palette.mode===e?t:{}}n.d(t,{A:()=>r})},89751:(e,t,n)=>{"use strict";n.d(t,{EU:()=>s,NI:()=>a,iZ:()=>c,kW:()=>d,vf:()=>l,zu:()=>i});var r=n(19172);const i={xs:0,sm:600,md:900,lg:1200,xl:1536},o={keys:["xs","sm","md","lg","xl"],up:e=>"@media (min-width:".concat(i[e],"px)")};function a(e,t,n){const r=e.theme||{};if(Array.isArray(t)){const e=r.breakpoints||o;return t.reduce((r,i,o)=>(r[e.up(e.keys[o])]=n(t[o]),r),{})}if("object"===typeof t){const e=r.breakpoints||o;return Object.keys(t).reduce((r,o)=>{if(-1!==Object.keys(e.values||i).indexOf(o)){r[e.up(o)]=n(t[o],o)}else{const e=o;r[e]=t[e]}return r},{})}return n(t)}function s(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};var t;return(null==(t=e.keys)?void 0:t.reduce((t,n)=>(t[e.up(n)]={},t),{}))||{}}function l(e,t){return e.reduce((e,t)=>{const n=e[t];return(!n||0===Object.keys(n).length)&&delete e[t],e},t)}function c(e){const t=s(e);for(var n=arguments.length,i=new Array(n>1?n-1:0),o=1;o<n;o++)i[o-1]=arguments[o];const a=[t,...i].reduce((e,t)=>(0,r.A)(e,t),{});return l(Object.keys(t),a)}function d(e){let{values:t,breakpoints:n,base:r}=e;const i=r||function(e,t){if("object"!==typeof e)return{};const n={},r=Object.keys(t);return Array.isArray(e)?r.forEach((t,r)=>{r<e.length&&(n[t]=!0)}):r.forEach(t=>{null!=e[t]&&(n[t]=!0)}),n}(t,n),o=Object.keys(i);if(0===o.length)return t;let a;return o.reduce((e,n,r)=>(Array.isArray(t)?(e[n]=null!=t[r]?t[r]:t[a],a=r):"object"===typeof t?(e[n]=null!=t[n]?t[n]:t[a],a=n):e[n]=t,e),{})}},90191:(e,t)=>{"use strict";var n=Symbol.for("react.transitional.element"),r=Symbol.for("react.portal"),i=Symbol.for("react.fragment"),o=Symbol.for("react.strict_mode"),a=Symbol.for("react.profiler"),s=Symbol.for("react.consumer"),l=Symbol.for("react.context"),c=Symbol.for("react.forward_ref"),d=Symbol.for("react.suspense"),u=Symbol.for("react.suspense_list"),p=Symbol.for("react.memo"),h=Symbol.for("react.lazy"),m=Symbol.for("react.view_transition"),f=Symbol.for("react.client.reference");function g(e){if("object"===typeof e&&null!==e){var t=e.$$typeof;switch(t){case n:switch(e=e.type){case i:case a:case o:case d:case u:case m:return e;default:switch(e=e&&e.$$typeof){case l:case c:case h:case p:case s:return e;default:return t}}case r:return t}}}t.vM=c,t.lD=p},90198:(e,t,n)=>{e=n.nmd(e),ace.define("ace/theme/solarized_dark-css",["require","exports","module"],function(e,t,n){n.exports=".ace-solarized-dark .ace_gutter {\n  background: #01313f;\n  color: #d0edf7\n}\n\n.ace-solarized-dark .ace_print-margin {\n  width: 1px;\n  background: #33555E\n}\n\n.ace-solarized-dark {\n  background-color: #002B36;\n  color: #839496\n}\n\n.ace-solarized-dark .ace_entity.ace_other.ace_attribute-name,\n.ace-solarized-dark .ace_storage {\n  color: #839496\n}\n\n.ace-solarized-dark .ace_cursor,\n.ace-solarized-dark .ace_string.ace_regexp {\n  color: #D30102\n}\n\n.ace-solarized-dark .ace_marker-layer .ace_active-line,\n.ace-solarized-dark .ace_marker-layer .ace_selection {\n  background: rgba(255, 255, 255, 0.1)\n}\n\n.ace-solarized-dark.ace_multiselect .ace_selection.ace_start {\n  box-shadow: 0 0 3px 0px #002B36;\n}\n\n.ace-solarized-dark .ace_marker-layer .ace_step {\n  background: rgb(102, 82, 0)\n}\n\n.ace-solarized-dark .ace_marker-layer .ace_bracket {\n  margin: -1px 0 0 -1px;\n  border: 1px solid rgba(147, 161, 161, 0.50)\n}\n\n.ace-solarized-dark .ace_gutter-active-line {\n  background-color: #0d3440\n}\n\n.ace-solarized-dark .ace_marker-layer .ace_selected-word {\n  border: 1px solid #073642\n}\n\n.ace-solarized-dark .ace_invisible {\n  color: rgba(147, 161, 161, 0.50)\n}\n\n.ace-solarized-dark .ace_keyword,\n.ace-solarized-dark .ace_meta,\n.ace-solarized-dark .ace_support.ace_class,\n.ace-solarized-dark .ace_support.ace_type {\n  color: #859900\n}\n\n.ace-solarized-dark .ace_constant.ace_character,\n.ace-solarized-dark .ace_constant.ace_other {\n  color: #CB4B16\n}\n\n.ace-solarized-dark .ace_constant.ace_language {\n  color: #B58900\n}\n\n.ace-solarized-dark .ace_constant.ace_numeric {\n  color: #D33682\n}\n\n.ace-solarized-dark .ace_fold {\n  background-color: #268BD2;\n  border-color: #93A1A1\n}\n\n.ace-solarized-dark .ace_entity.ace_name.ace_function,\n.ace-solarized-dark .ace_entity.ace_name.ace_tag,\n.ace-solarized-dark .ace_support.ace_function,\n.ace-solarized-dark .ace_variable,\n.ace-solarized-dark .ace_variable.ace_language {\n  color: #268BD2\n}\n\n.ace-solarized-dark .ace_string {\n  color: #2AA198\n}\n\n.ace-solarized-dark .ace_comment {\n  font-style: italic;\n  color: #657B83\n}\n\n.ace-solarized-dark .ace_indent-guide {\n  background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAAEklEQVQImWNg0Db1ZVCxc/sPAAd4AlUHlLenAAAAAElFTkSuQmCC) right repeat-y\n}\n\n.ace-solarized-dark .ace_indent-guide-active {\n  background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAAEklEQVQIW2PQ1dX9zzBz5sz/ABCcBFFentLlAAAAAElFTkSuQmCC) right repeat-y;\n}\n"}),ace.define("ace/theme/solarized_dark",["require","exports","module","ace/theme/solarized_dark-css","ace/lib/dom"],function(e,t,n){t.isDark=!0,t.cssClass="ace-solarized-dark",t.cssText=e("./solarized_dark-css"),e("../lib/dom").importCssString(t.cssText,t.cssClass,!1)}),ace.require(["ace/theme/solarized_dark"],function(t){e&&(e.exports=t)})},90620:(e,t,n)=>{var r=n(16913),i=n(54052),o=n(22761);e.exports=function(e){return"string"==typeof e||!i(e)&&o(e)&&"[object String]"==r(e)}},91310:e=>{e.exports=function(e,t){return function(n){return null!=n&&(n[e]===t&&(void 0!==t||e in Object(n)))}}},91733:(e,t,n)=>{var r=n(71775),i=n(94664),o=n(9096);e.exports=function(e,t){var n={};return t=o(t,3),i(e,function(e,i,o){r(n,i,t(e,i,o))}),n}},91980:e=>{e.exports=function(e,t){var n=-1,r=e.length;for(t||(t=Array(r));++n<r;)t[n]=e[n];return t}},92043:(e,t,n)=>{var r="__lodash_hash_undefined__",i="[object Function]",o="[object GeneratorFunction]",a=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,s=/^\w*$/,l=/^\./,c=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,d=/\\(\\)?/g,u=/^\[object .+?Constructor\]$/,p="object"==typeof n.g&&n.g&&n.g.Object===Object&&n.g,h="object"==typeof self&&self&&self.Object===Object&&self,m=p||h||Function("return this")();var f=Array.prototype,g=Function.prototype,v=Object.prototype,x=m["__core-js_shared__"],y=function(){var e=/[^.]+$/.exec(x&&x.keys&&x.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}(),b=g.toString,j=v.hasOwnProperty,_=v.toString,C=RegExp("^"+b.call(j).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),w=m.Symbol,S=f.splice,A=I(m,"Map"),k=I(Object,"create"),T=w?w.prototype:void 0,E=T?T.toString:void 0;function M(e){var t=-1,n=e?e.length:0;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function O(e){var t=-1,n=e?e.length:0;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function R(e){var t=-1,n=e?e.length:0;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function P(e,t){for(var n=e.length;n--;)if(z(e[n][0],t))return n;return-1}function D(e,t){var n;t=function(e,t){if(H(e))return!1;var n=typeof e;if("number"==n||"symbol"==n||"boolean"==n||null==e||U(e))return!0;return s.test(e)||!a.test(e)||null!=t&&e in Object(t)}(t,e)?[t]:H(n=t)?n:F(n);for(var r=0,i=t.length;null!=e&&r<i;)e=e[$(t[r++])];return r&&r==i?e:void 0}function N(e){if(!W(e)||(t=e,y&&y in t))return!1;var t,n=function(e){var t=W(e)?_.call(e):"";return t==i||t==o}(e)||function(e){var t=!1;if(null!=e&&"function"!=typeof e.toString)try{t=!!(e+"")}catch(n){}return t}(e)?C:u;return n.test(function(e){if(null!=e){try{return b.call(e)}catch(t){}try{return e+""}catch(t){}}return""}(e))}function L(e,t){var n=e.__data__;return function(e){var t=typeof e;return"string"==t||"number"==t||"symbol"==t||"boolean"==t?"__proto__"!==e:null===e}(t)?n["string"==typeof t?"string":"hash"]:n.map}function I(e,t){var n=function(e,t){return null==e?void 0:e[t]}(e,t);return N(n)?n:void 0}M.prototype.clear=function(){this.__data__=k?k(null):{}},M.prototype.delete=function(e){return this.has(e)&&delete this.__data__[e]},M.prototype.get=function(e){var t=this.__data__;if(k){var n=t[e];return n===r?void 0:n}return j.call(t,e)?t[e]:void 0},M.prototype.has=function(e){var t=this.__data__;return k?void 0!==t[e]:j.call(t,e)},M.prototype.set=function(e,t){return this.__data__[e]=k&&void 0===t?r:t,this},O.prototype.clear=function(){this.__data__=[]},O.prototype.delete=function(e){var t=this.__data__,n=P(t,e);return!(n<0)&&(n==t.length-1?t.pop():S.call(t,n,1),!0)},O.prototype.get=function(e){var t=this.__data__,n=P(t,e);return n<0?void 0:t[n][1]},O.prototype.has=function(e){return P(this.__data__,e)>-1},O.prototype.set=function(e,t){var n=this.__data__,r=P(n,e);return r<0?n.push([e,t]):n[r][1]=t,this},R.prototype.clear=function(){this.__data__={hash:new M,map:new(A||O),string:new M}},R.prototype.delete=function(e){return L(this,e).delete(e)},R.prototype.get=function(e){return L(this,e).get(e)},R.prototype.has=function(e){return L(this,e).has(e)},R.prototype.set=function(e,t){return L(this,e).set(e,t),this};var F=B(function(e){var t;e=null==(t=e)?"":function(e){if("string"==typeof e)return e;if(U(e))return E?E.call(e):"";var t=e+"";return"0"==t&&1/e==-1/0?"-0":t}(t);var n=[];return l.test(e)&&n.push(""),e.replace(c,function(e,t,r,i){n.push(r?i.replace(d,"$1"):t||e)}),n});function $(e){if("string"==typeof e||U(e))return e;var t=e+"";return"0"==t&&1/e==-1/0?"-0":t}function B(e,t){if("function"!=typeof e||t&&"function"!=typeof t)throw new TypeError("Expected a function");var n=function(){var r=arguments,i=t?t.apply(this,r):r[0],o=n.cache;if(o.has(i))return o.get(i);var a=e.apply(this,r);return n.cache=o.set(i,a),a};return n.cache=new(B.Cache||R),n}function z(e,t){return e===t||e!==e&&t!==t}B.Cache=R;var H=Array.isArray;function W(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}function U(e){return"symbol"==typeof e||function(e){return!!e&&"object"==typeof e}(e)&&"[object Symbol]"==_.call(e)}e.exports=function(e,t,n){var r=null==e?void 0:D(e,t);return void 0===r?n:r}},92374:(e,t,n)=>{"use strict";t.A=void 0;var r=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var n=o(t);if(n&&n.has(e))return n.get(e);var r={__proto__:null},i=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if("default"!==a&&Object.prototype.hasOwnProperty.call(e,a)){var s=i?Object.getOwnPropertyDescriptor(e,a):null;s&&(s.get||s.set)?Object.defineProperty(r,a,s):r[a]=e[a]}return r.default=e,n&&n.set(e,r),r}(n(65043)),i=n(13174);function o(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(o=function(e){return e?n:t})(e)}t.A=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;const t=r.useContext(i.ThemeContext);return t&&(n=t,0!==Object.keys(n).length)?t:e;var n}},92532:(e,t,n)=>{"use strict";n.d(t,{A:()=>i});var r=n(72372);function i(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"Mui";const i={};return t.forEach(t=>{i[t]=(0,r.Ay)(e,t,n)}),i}},92577:(e,t,n)=>{"use strict";var r=n(24994);t.A=void 0;var i=r(n(40039)),o=n(70579);t.A=(0,i.default)((0,o.jsx)("path",{d:"M19.14 12.94c.04-.3.06-.61.06-.94 0-.32-.02-.64-.07-.94l2.03-1.58c.18-.14.23-.41.12-.61l-1.92-3.32c-.12-.22-.37-.29-.59-.22l-2.39.96c-.5-.38-1.03-.7-1.62-.94l-.36-2.54c-.04-.24-.24-.41-.48-.41h-3.84c-.24 0-.43.17-.47.41l-.36 2.54c-.59.24-1.13.57-1.62.94l-2.39-.96c-.22-.08-.47 0-.59.22L2.74 8.87c-.12.21-.08.47.12.61l2.03 1.58c-.05.3-.09.63-.09.94s.02.64.07.94l-2.03 1.58c-.18.14-.23.41-.12.61l1.92 3.32c.12.22.37.29.59.22l2.39-.96c.5.38 1.03.7 1.62.94l.36 2.54c.05.24.24.41.48.41h3.84c.24 0 .44-.17.47-.41l.36-2.54c.59-.24 1.13-.56 1.62-.94l2.39.96c.22.08.47 0 .59-.22l1.92-3.32c.12-.22.07-.47-.12-.61zM12 15.6c-1.98 0-3.6-1.62-3.6-3.6s1.62-3.6 3.6-3.6 3.6 1.62 3.6 3.6-1.62 3.6-3.6 3.6"}),"Settings")},92823:function(e,t,n){"use strict";var r=this&&this.__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)t.hasOwnProperty(n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),i=this&&this.__assign||function(){return i=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},i.apply(this,arguments)},o=this&&this.__spreadArrays||function(){for(var e=0,t=0,n=arguments.length;t<n;t++)e+=arguments[t].length;var r=Array(e),i=0;for(t=0;t<n;t++)for(var o=arguments[t],a=0,s=o.length;a<s;a++,i++)r[i]=o[a];return r},a=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},s=a(n(65043)),l=a(n(97950)),c=a(n(19853)),d=a(n(74175)),u=function(e){function t(t){var n=e.call(this,t)||this;n.dirtyProps=["modules","formats","bounds","theme","children"],n.cleanProps=["id","className","style","placeholder","tabIndex","onChange","onChangeSelection","onFocus","onBlur","onKeyPress","onKeyDown","onKeyUp"],n.state={generation:0},n.selection=null,n.onEditorChange=function(e,t,r,i){var o,a,s,l;"text-change"===e?null===(a=(o=n).onEditorChangeText)||void 0===a||a.call(o,n.editor.root.innerHTML,t,i,n.unprivilegedEditor):"selection-change"===e&&(null===(l=(s=n).onEditorChangeSelection)||void 0===l||l.call(s,t,i,n.unprivilegedEditor))};var r=n.isControlled()?t.value:t.defaultValue;return n.value=null!==r&&void 0!==r?r:"",n}return r(t,e),t.prototype.validateProps=function(e){var t;if(s.default.Children.count(e.children)>1)throw new Error("The Quill editing area can only be composed of a single React element.");if(s.default.Children.count(e.children)&&"textarea"===(null===(t=s.default.Children.only(e.children))||void 0===t?void 0:t.type))throw new Error("Quill does not support editing on a <textarea>. Use a <div> instead.");if(this.lastDeltaChangeSet&&e.value===this.lastDeltaChangeSet)throw new Error("You are passing the `delta` object from the `onChange` event back as `value`. You most probably want `editor.getContents()` instead. See: https://github.com/zenoamaro/react-quill#using-deltas")},t.prototype.shouldComponentUpdate=function(e,t){var n,r=this;if(this.validateProps(e),!this.editor||this.state.generation!==t.generation)return!0;if("value"in e){var i=this.getEditorContents(),a=null!==(n=e.value)&&void 0!==n?n:"";this.isEqualValue(a,i)||this.setEditorContents(this.editor,a)}return e.readOnly!==this.props.readOnly&&this.setEditorReadOnly(this.editor,e.readOnly),o(this.cleanProps,this.dirtyProps).some(function(t){return!c.default(e[t],r.props[t])})},t.prototype.shouldComponentRegenerate=function(e){var t=this;return this.dirtyProps.some(function(n){return!c.default(e[n],t.props[n])})},t.prototype.componentDidMount=function(){this.instantiateEditor(),this.setEditorContents(this.editor,this.getEditorContents())},t.prototype.componentWillUnmount=function(){this.destroyEditor()},t.prototype.componentDidUpdate=function(e,t){var n=this;if(this.editor&&this.shouldComponentRegenerate(e)){var r=this.editor.getContents(),i=this.editor.getSelection();this.regenerationSnapshot={delta:r,selection:i},this.setState({generation:this.state.generation+1}),this.destroyEditor()}if(this.state.generation!==t.generation){var o=this.regenerationSnapshot,a=(r=o.delta,o.selection);delete this.regenerationSnapshot,this.instantiateEditor();var s=this.editor;s.setContents(r),p(function(){return n.setEditorSelection(s,a)})}},t.prototype.instantiateEditor=function(){this.editor?this.hookEditor(this.editor):this.editor=this.createEditor(this.getEditingArea(),this.getEditorConfig())},t.prototype.destroyEditor=function(){this.editor&&this.unhookEditor(this.editor)},t.prototype.isControlled=function(){return"value"in this.props},t.prototype.getEditorConfig=function(){return{bounds:this.props.bounds,formats:this.props.formats,modules:this.props.modules,placeholder:this.props.placeholder,readOnly:this.props.readOnly,scrollingContainer:this.props.scrollingContainer,tabIndex:this.props.tabIndex,theme:this.props.theme}},t.prototype.getEditor=function(){if(!this.editor)throw new Error("Accessing non-instantiated editor");return this.editor},t.prototype.createEditor=function(e,t){var n=new d.default(e,t);return null!=t.tabIndex&&this.setEditorTabIndex(n,t.tabIndex),this.hookEditor(n),n},t.prototype.hookEditor=function(e){this.unprivilegedEditor=this.makeUnprivilegedEditor(e),e.on("editor-change",this.onEditorChange)},t.prototype.unhookEditor=function(e){e.off("editor-change",this.onEditorChange)},t.prototype.getEditorContents=function(){return this.value},t.prototype.getEditorSelection=function(){return this.selection},t.prototype.isDelta=function(e){return e&&e.ops},t.prototype.isEqualValue=function(e,t){return this.isDelta(e)&&this.isDelta(t)?c.default(e.ops,t.ops):c.default(e,t)},t.prototype.setEditorContents=function(e,t){var n=this;this.value=t;var r=this.getEditorSelection();"string"===typeof t?e.setContents(e.clipboard.convert(t)):e.setContents(t),p(function(){return n.setEditorSelection(e,r)})},t.prototype.setEditorSelection=function(e,t){if(this.selection=t,t){var n=e.getLength();t.index=Math.max(0,Math.min(t.index,n-1)),t.length=Math.max(0,Math.min(t.length,n-1-t.index)),e.setSelection(t)}},t.prototype.setEditorTabIndex=function(e,t){var n,r;(null===(r=null===(n=e)||void 0===n?void 0:n.scroll)||void 0===r?void 0:r.domNode)&&(e.scroll.domNode.tabIndex=t)},t.prototype.setEditorReadOnly=function(e,t){t?e.disable():e.enable()},t.prototype.makeUnprivilegedEditor=function(e){var t=e;return{getHTML:function(){return t.root.innerHTML},getLength:t.getLength.bind(t),getText:t.getText.bind(t),getContents:t.getContents.bind(t),getSelection:t.getSelection.bind(t),getBounds:t.getBounds.bind(t)}},t.prototype.getEditingArea=function(){if(!this.editingArea)throw new Error("Instantiating on missing editing area");var e=l.default.findDOMNode(this.editingArea);if(!e)throw new Error("Cannot find element for editing area");if(3===e.nodeType)throw new Error("Editing area cannot be a text node");return e},t.prototype.renderEditingArea=function(){var e=this,t=this.props,n=t.children,r=t.preserveWhitespace,o={key:this.state.generation,ref:function(t){e.editingArea=t}};return s.default.Children.count(n)?s.default.cloneElement(s.default.Children.only(n),o):r?s.default.createElement("pre",i({},o)):s.default.createElement("div",i({},o))},t.prototype.render=function(){var e;return s.default.createElement("div",{id:this.props.id,style:this.props.style,key:this.state.generation,className:"quill "+(e=this.props.className,null!==e&&void 0!==e?e:""),onKeyPress:this.props.onKeyPress,onKeyDown:this.props.onKeyDown,onKeyUp:this.props.onKeyUp},this.renderEditingArea())},t.prototype.onEditorChangeText=function(e,t,n,r){var i,o;if(this.editor){var a=this.isDelta(this.value)?r.getContents():r.getHTML();a!==this.getEditorContents()&&(this.lastDeltaChangeSet=t,this.value=a,null===(o=(i=this.props).onChange)||void 0===o||o.call(i,e,t,n,r))}},t.prototype.onEditorChangeSelection=function(e,t,n){var r,i,o,a,s,l;if(this.editor){var d=this.getEditorSelection(),u=!d&&e,p=d&&!e;c.default(e,d)||(this.selection=e,null===(i=(r=this.props).onChangeSelection)||void 0===i||i.call(r,e,t,n),u?null===(a=(o=this.props).onFocus)||void 0===a||a.call(o,e,t,n):p&&(null===(l=(s=this.props).onBlur)||void 0===l||l.call(s,d,t,n)))}},t.prototype.focus=function(){this.editor&&this.editor.focus()},t.prototype.blur=function(){this.editor&&(this.selection=null,this.editor.blur())},t.displayName="React Quill",t.Quill=d.default,t.defaultProps={theme:"snow",modules:{},readOnly:!1},t}(s.default.Component);function p(e){Promise.resolve().then(e)}e.exports=u},93086:(e,t,n)=>{var r=n(72037)({"\xc0":"A","\xc1":"A","\xc2":"A","\xc3":"A","\xc4":"A","\xc5":"A","\xe0":"a","\xe1":"a","\xe2":"a","\xe3":"a","\xe4":"a","\xe5":"a","\xc7":"C","\xe7":"c","\xd0":"D","\xf0":"d","\xc8":"E","\xc9":"E","\xca":"E","\xcb":"E","\xe8":"e","\xe9":"e","\xea":"e","\xeb":"e","\xcc":"I","\xcd":"I","\xce":"I","\xcf":"I","\xec":"i","\xed":"i","\xee":"i","\xef":"i","\xd1":"N","\xf1":"n","\xd2":"O","\xd3":"O","\xd4":"O","\xd5":"O","\xd6":"O","\xd8":"O","\xf2":"o","\xf3":"o","\xf4":"o","\xf5":"o","\xf6":"o","\xf8":"o","\xd9":"U","\xda":"U","\xdb":"U","\xdc":"U","\xf9":"u","\xfa":"u","\xfb":"u","\xfc":"u","\xdd":"Y","\xfd":"y","\xff":"y","\xc6":"Ae","\xe6":"ae","\xde":"Th","\xfe":"th","\xdf":"ss","\u0100":"A","\u0102":"A","\u0104":"A","\u0101":"a","\u0103":"a","\u0105":"a","\u0106":"C","\u0108":"C","\u010a":"C","\u010c":"C","\u0107":"c","\u0109":"c","\u010b":"c","\u010d":"c","\u010e":"D","\u0110":"D","\u010f":"d","\u0111":"d","\u0112":"E","\u0114":"E","\u0116":"E","\u0118":"E","\u011a":"E","\u0113":"e","\u0115":"e","\u0117":"e","\u0119":"e","\u011b":"e","\u011c":"G","\u011e":"G","\u0120":"G","\u0122":"G","\u011d":"g","\u011f":"g","\u0121":"g","\u0123":"g","\u0124":"H","\u0126":"H","\u0125":"h","\u0127":"h","\u0128":"I","\u012a":"I","\u012c":"I","\u012e":"I","\u0130":"I","\u0129":"i","\u012b":"i","\u012d":"i","\u012f":"i","\u0131":"i","\u0134":"J","\u0135":"j","\u0136":"K","\u0137":"k","\u0138":"k","\u0139":"L","\u013b":"L","\u013d":"L","\u013f":"L","\u0141":"L","\u013a":"l","\u013c":"l","\u013e":"l","\u0140":"l","\u0142":"l","\u0143":"N","\u0145":"N","\u0147":"N","\u014a":"N","\u0144":"n","\u0146":"n","\u0148":"n","\u014b":"n","\u014c":"O","\u014e":"O","\u0150":"O","\u014d":"o","\u014f":"o","\u0151":"o","\u0154":"R","\u0156":"R","\u0158":"R","\u0155":"r","\u0157":"r","\u0159":"r","\u015a":"S","\u015c":"S","\u015e":"S","\u0160":"S","\u015b":"s","\u015d":"s","\u015f":"s","\u0161":"s","\u0162":"T","\u0164":"T","\u0166":"T","\u0163":"t","\u0165":"t","\u0167":"t","\u0168":"U","\u016a":"U","\u016c":"U","\u016e":"U","\u0170":"U","\u0172":"U","\u0169":"u","\u016b":"u","\u016d":"u","\u016f":"u","\u0171":"u","\u0173":"u","\u0174":"W","\u0175":"w","\u0176":"Y","\u0177":"y","\u0178":"Y","\u0179":"Z","\u017b":"Z","\u017d":"Z","\u017a":"z","\u017c":"z","\u017e":"z","\u0132":"IJ","\u0133":"ij","\u0152":"Oe","\u0153":"oe","\u0149":"'n","\u017f":"s"});e.exports=r},93141:function(e,t,n){var r,i;"undefined"!=typeof self&&self,e.exports=(r=n(65043),i=n(97950),function(){"use strict";var e={328:function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.PrintContextConsumer=t.PrintContext=void 0;var r=n(496),i=Object.prototype.hasOwnProperty.call(r,"createContext");t.PrintContext=i?r.createContext({}):null,t.PrintContextConsumer=t.PrintContext?t.PrintContext.Consumer:function(){return null}},428:function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.ReactToPrint=void 0;var r=n(316),i=n(496),o=n(190),a=n(328),s=n(940),l=function(e){function t(){var t=e.apply(this,r.__spreadArray([],r.__read(arguments),!1))||this;return t.startPrint=function(e){var n=t.props,r=n.onAfterPrint,i=n.onPrintError,o=n.print,a=n.documentTitle;setTimeout(function(){var n,s;if(e.contentWindow)if(e.contentWindow.focus(),o)o(e).then(function(){return null==r?void 0:r()}).then(function(){return t.handleRemoveIframe()}).catch(function(e){i?i("print",e):t.logMessages(["An error was thrown by the specified `print` function"])});else{if(e.contentWindow.print){var l=null!==(s=null===(n=e.contentDocument)||void 0===n?void 0:n.title)&&void 0!==s?s:"",c=e.ownerDocument.title;a&&(e.ownerDocument.title=a,e.contentDocument&&(e.contentDocument.title=a)),e.contentWindow.print(),a&&(e.ownerDocument.title=c,e.contentDocument&&(e.contentDocument.title=l))}else t.logMessages(["Printing for this browser is not currently possible: the browser does not have a `print` method available for iframes."]);null==r||r(),t.handleRemoveIframe()}else t.logMessages(["Printing failed because the `contentWindow` of the print iframe did not load. This is possibly an error with `react-to-print`. Please file an issue: https://github.com/gregnb/react-to-print/issues/"])},500)},t.triggerPrint=function(e){var n=t.props,r=n.onBeforePrint,i=n.onPrintError;if(r){var o=r();o&&"function"==typeof o.then?o.then(function(){t.startPrint(e)}).catch(function(e){i&&i("onBeforePrint",e)}):t.startPrint(e)}else t.startPrint(e)},t.handlePrint=function(e){var n=t.props,i=n.bodyClass,a=n.content,s=n.copyStyles,l=n.fonts,c=n.pageStyle,d=n.nonce,u="function"==typeof e?e():null;if(u&&"function"==typeof a&&t.logMessages(['"react-to-print" received a `content` prop and a content param passed the callback return by `useReactToPrint. The `content` prop will be ignored.'],"warning"),u||"function"!=typeof a||(u=a()),void 0!==u)if(null!==u){var p=document.createElement("iframe");p.width="".concat(document.documentElement.clientWidth,"px"),p.height="".concat(document.documentElement.clientHeight,"px"),p.style.position="absolute",p.style.top="-".concat(document.documentElement.clientHeight+100,"px"),p.style.left="-".concat(document.documentElement.clientWidth+100,"px"),p.id="printWindow",p.srcdoc="<!DOCTYPE html>";var h=(0,o.findDOMNode)(u);if(h){var m=h.cloneNode(!0),f=m instanceof Text,g=document.querySelectorAll("link[rel~='stylesheet'], link[as='style']"),v=f?[]:m.querySelectorAll("img"),x=f?[]:m.querySelectorAll("video"),y=l?l.length:0;t.numResourcesToLoad=g.length+v.length+x.length+y,t.resourcesLoaded=[],t.resourcesErrored=[];var b=function(e,n){t.resourcesLoaded.includes(e)?t.logMessages(["Tried to mark a resource that has already been handled",e],"debug"):(n?(t.logMessages(r.__spreadArray(['"react-to-print" was unable to load a resource but will continue attempting to print the page'],r.__read(n),!1)),t.resourcesErrored.push(e)):t.resourcesLoaded.push(e),t.resourcesLoaded.length+t.resourcesErrored.length===t.numResourcesToLoad&&t.triggerPrint(p))};p.onload=function(){var e,n,o,a;p.onload=null;var u=p.contentDocument||(null===(n=p.contentWindow)||void 0===n?void 0:n.document);if(u){u.body.appendChild(m),l&&((null===(o=p.contentDocument)||void 0===o?void 0:o.fonts)&&(null===(a=p.contentWindow)||void 0===a?void 0:a.FontFace)?l.forEach(function(e){var t=new FontFace(e.family,e.source,{weight:e.weight,style:e.style});p.contentDocument.fonts.add(t),t.loaded.then(function(){b(t)}).catch(function(e){b(t,["Failed loading the font:",t,"Load error:",e])})}):(l.forEach(function(e){return b(e)}),t.logMessages(['"react-to-print" is not able to load custom fonts because the browser does not support the FontFace API but will continue attempting to print the page'])));var g="function"==typeof c?c():c;if("string"!=typeof g)t.logMessages(['"react-to-print" expected a "string" from `pageStyle` but received "'.concat(typeof g,'". Styles from `pageStyle` will not be applied.')]);else{var y=u.createElement("style");d&&(y.setAttribute("nonce",d),u.head.setAttribute("nonce",d)),y.appendChild(u.createTextNode(g)),u.head.appendChild(y)}if(i&&(e=u.body.classList).add.apply(e,r.__spreadArray([],r.__read(i.split(" ")),!1)),!f){for(var j=f?[]:h.querySelectorAll("canvas"),_=u.querySelectorAll("canvas"),C=0;C<j.length;++C){var w=j[C],S=_[C].getContext("2d");S&&S.drawImage(w,0,0)}var A=function(e){var t=v[e],n=t.getAttribute("src");if(n){var r=new Image;r.onload=function(){return b(t)},r.onerror=function(e,n,r,i,o){return b(t,["Error loading <img>",t,"Error",o])},r.src=n}else b(t,['Found an <img> tag with an empty "src" attribute. This prevents pre-loading it. The <img> is:',t])};for(C=0;C<v.length;C++)A(C);var k=function(e){var t=x[e];t.preload="auto";var n=t.getAttribute("poster");if(n){var r=new Image;r.onload=function(){return b(t)},r.onerror=function(e,r,i,o,a){return b(t,["Error loading video poster",n,"for video",t,"Error:",a])},r.src=n}else t.readyState>=2?b(t):(t.onloadeddata=function(){return b(t)},t.onerror=function(e,n,r,i,o){return b(t,["Error loading video",t,"Error",o])},t.onstalled=function(){return b(t,["Loading video stalled, skipping",t])})};for(C=0;C<x.length;C++)k(C);var T="input",E=h.querySelectorAll(T),M=u.querySelectorAll(T);for(C=0;C<E.length;C++)M[C].value=E[C].value;var O="input[type=checkbox],input[type=radio]",R=h.querySelectorAll(O),P=u.querySelectorAll(O);for(C=0;C<R.length;C++)P[C].checked=R[C].checked;var D="select",N=h.querySelectorAll(D),L=u.querySelectorAll(D);for(C=0;C<N.length;C++)L[C].value=N[C].value}if(s)for(var I=document.querySelectorAll("style, link[rel~='stylesheet'], link[as='style']"),F=function(e,n){var r=I[e];if("style"===r.tagName.toLowerCase()){var i=u.createElement(r.tagName),o=r.sheet;if(o){var a="";try{for(var s=o.cssRules.length,l=0;l<s;++l)"string"==typeof o.cssRules[l].cssText&&(a+="".concat(o.cssRules[l].cssText,"\r\n"))}catch(e){t.logMessages(["A stylesheet could not be accessed. This is likely due to the stylesheet having cross-origin imports, and many browsers block script access to cross-origin stylesheets. See https://github.com/gregnb/react-to-print/issues/429 for details. You may be able to load the sheet by both marking the stylesheet with the cross `crossorigin` attribute, and setting the `Access-Control-Allow-Origin` header on the server serving the stylesheet. Alternatively, host the stylesheet on your domain to avoid this issue entirely.",r],"warning")}i.setAttribute("id","react-to-print-".concat(e)),d&&i.setAttribute("nonce",d),i.appendChild(u.createTextNode(a)),u.head.appendChild(i)}}else if(r.getAttribute("href"))if(r.hasAttribute("disabled"))t.logMessages(["`react-to-print` encountered a <link> tag with a `disabled` attribute and will ignore it. Note that the `disabled` attribute is deprecated, and some browsers ignore it. You should stop using it. https://developer.mozilla.org/en-US/docs/Web/HTML/Element/link#attr-disabled. The <link> is:",r],"warning"),b(r);else{for(var c=u.createElement(r.tagName),p=(l=0,r.attributes.length);l<p;++l){var h=r.attributes[l];h&&c.setAttribute(h.nodeName,h.nodeValue||"")}c.onload=function(){return b(c)},c.onerror=function(e,t,n,r,i){return b(c,["Failed to load",c,"Error:",i])},d&&c.setAttribute("nonce",d),u.head.appendChild(c)}else t.logMessages(["`react-to-print` encountered a <link> tag with an empty `href` attribute. In addition to being invalid HTML, this can cause problems in many browsers, and so the <link> was not loaded. The <link> is:",r],"warning"),b(r)},$=(C=0,I.length);C<$;++C)F(C)}0!==t.numResourcesToLoad&&s||t.triggerPrint(p)},t.handleRemoveIframe(!0),document.body.appendChild(p)}else t.logMessages(['"react-to-print" could not locate the DOM node corresponding with the `content` prop'])}else t.logMessages(['There is nothing to print because the "content" prop returned "null". Please ensure "content" is renderable before allowing "react-to-print" to be called.']);else t.logMessages(["To print a functional component ensure it is wrapped with `React.forwardRef`, and ensure the forwarded ref is used. See the README for an example: https://github.com/gregnb/react-to-print#examples"])},t.handleRemoveIframe=function(e){var n=t.props.removeAfterPrint;if(e||n){var r=document.getElementById("printWindow");r&&document.body.removeChild(r)}},t.logMessages=function(e,n){void 0===n&&(n="error"),t.props.suppressErrors||("error"===n?console.error(e):"warning"===n?console.warn(e):"debug"===n&&console.debug(e))},t}return r.__extends(t,e),t.prototype.handleClick=function(e,t){var n=this,r=this.props,i=r.onBeforeGetContent,o=r.onPrintError;if(i){var a=i();a&&"function"==typeof a.then?a.then(function(){return n.handlePrint(t)}).catch(function(e){o&&o("onBeforeGetContent",e)}):this.handlePrint(t)}else this.handlePrint(t)},t.prototype.render=function(){var e=this.props,t=e.children,n=e.trigger;if(n)return i.cloneElement(n(),{onClick:this.handleClick.bind(this)});if(!a.PrintContext)return this.logMessages(['"react-to-print" requires React ^16.3.0 to be able to use "PrintContext"']),null;var r={handlePrint:this.handleClick.bind(this)};return i.createElement(a.PrintContext.Provider,{value:r},t)},t.defaultProps=s.defaultProps,t}(i.Component);t.ReactToPrint=l},940:function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.defaultProps=void 0,t.defaultProps={copyStyles:!0,pageStyle:"\n        @page {\n            /* Remove browser default header (title) and footer (url) */\n            margin: 0;\n        }\n        @media print {\n            body {\n                /* Tell browsers to print background colors */\n                -webkit-print-color-adjust: exact; /* Chrome/Safari/Edge/Opera */\n                color-adjust: exact; /* Firefox */\n            }\n        }\n    ",removeAfterPrint:!1,suppressErrors:!1}},892:function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.useReactToPrint=void 0;var r=n(316),i=n(496),o=n(428),a=n(940),s=n(860),l=Object.prototype.hasOwnProperty.call(i,"useMemo")&&Object.prototype.hasOwnProperty.call(i,"useCallback");t.useReactToPrint=function(e){if(!l)return e.suppressErrors||console.error('"react-to-print" requires React ^16.8.0 to be able to use "useReactToPrint"'),function(){throw new Error('"react-to-print" requires React ^16.8.0 to be able to use "useReactToPrint"')};var t=i.useMemo(function(){return new o.ReactToPrint(r.__assign(r.__assign({},a.defaultProps),e))},[e]);return i.useCallback(function(e,n){return(0,s.wrapCallbackWithArgs)(t,t.handleClick,n)(e)},[t])}},860:function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.wrapCallbackWithArgs=void 0;var r=n(316);t.wrapCallbackWithArgs=function(e,t){for(var n=[],i=2;i<arguments.length;i++)n[i-2]=arguments[i];return function(){for(var i=[],o=0;o<arguments.length;o++)i[o]=arguments[o];return t.apply(e,r.__spreadArray(r.__spreadArray([],r.__read(i),!1),r.__read(n),!1))}}},496:function(e){e.exports=r},190:function(e){e.exports=i},316:function(e,t,n){n.r(t),n.d(t,{__addDisposableResource:function(){return D},__assign:function(){return o},__asyncDelegator:function(){return S},__asyncGenerator:function(){return w},__asyncValues:function(){return A},__await:function(){return C},__awaiter:function(){return m},__classPrivateFieldGet:function(){return O},__classPrivateFieldIn:function(){return P},__classPrivateFieldSet:function(){return R},__createBinding:function(){return g},__decorate:function(){return s},__disposeResources:function(){return L},__esDecorate:function(){return c},__exportStar:function(){return v},__extends:function(){return i},__generator:function(){return f},__importDefault:function(){return M},__importStar:function(){return E},__makeTemplateObject:function(){return k},__metadata:function(){return h},__param:function(){return l},__propKey:function(){return u},__read:function(){return y},__rest:function(){return a},__runInitializers:function(){return d},__setFunctionName:function(){return p},__spread:function(){return b},__spreadArray:function(){return _},__spreadArrays:function(){return j},__values:function(){return x}});var r=function(e,t){return r=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])},r(e,t)};function i(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}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}var o=function(){return o=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},o.apply(this,arguments)};function a(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]])}return n}function s(e,t,n,r){var i,o=arguments.length,a=o<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,n,r);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(a=(o<3?i(a):o>3?i(t,n,a):i(t,n))||a);return o>3&&a&&Object.defineProperty(t,n,a),a}function l(e,t){return function(n,r){t(n,r,e)}}function c(e,t,n,r,i,o){function a(e){if(void 0!==e&&"function"!=typeof e)throw new TypeError("Function expected");return e}for(var s,l=r.kind,c="getter"===l?"get":"setter"===l?"set":"value",d=!t&&e?r.static?e:e.prototype:null,u=t||(d?Object.getOwnPropertyDescriptor(d,r.name):{}),p=!1,h=n.length-1;h>=0;h--){var m={};for(var f in r)m[f]="access"===f?{}:r[f];for(var f in r.access)m.access[f]=r.access[f];m.addInitializer=function(e){if(p)throw new TypeError("Cannot add initializers after decoration has completed");o.push(a(e||null))};var g=(0,n[h])("accessor"===l?{get:u.get,set:u.set}:u[c],m);if("accessor"===l){if(void 0===g)continue;if(null===g||"object"!=typeof g)throw new TypeError("Object expected");(s=a(g.get))&&(u.get=s),(s=a(g.set))&&(u.set=s),(s=a(g.init))&&i.unshift(s)}else(s=a(g))&&("field"===l?i.unshift(s):u[c]=s)}d&&Object.defineProperty(d,r.name,u),p=!0}function d(e,t,n){for(var r=arguments.length>2,i=0;i<t.length;i++)n=r?t[i].call(e,n):t[i].call(e);return r?n:void 0}function u(e){return"symbol"==typeof e?e:"".concat(e)}function p(e,t,n){return"symbol"==typeof t&&(t=t.description?"[".concat(t.description,"]"):""),Object.defineProperty(e,"name",{configurable:!0,value:n?"".concat(n," ",t):t})}function h(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)}function m(e,t,n,r){return new(n||(n=Promise))(function(i,o){function a(e){try{l(r.next(e))}catch(e){o(e)}}function s(e){try{l(r.throw(e))}catch(e){o(e)}}function l(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n(function(e){e(t)})).then(a,s)}l((r=r.apply(e,t||[])).next())})}function f(e,t){var n,r,i,o,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function s(s){return function(l){return function(s){if(n)throw new TypeError("Generator is already executing.");for(;o&&(o=0,s[0]&&(a=0)),a;)try{if(n=1,r&&(i=2&s[0]?r.return:s[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,s[1])).done)return i;switch(r=0,i&&(s=[2&s[0],i.value]),s[0]){case 0:case 1:i=s;break;case 4:return a.label++,{value:s[1],done:!1};case 5:a.label++,r=s[1],s=[0];continue;case 7:s=a.ops.pop(),a.trys.pop();continue;default:if(!((i=(i=a.trys).length>0&&i[i.length-1])||6!==s[0]&&2!==s[0])){a=0;continue}if(3===s[0]&&(!i||s[1]>i[0]&&s[1]<i[3])){a.label=s[1];break}if(6===s[0]&&a.label<i[1]){a.label=i[1],i=s;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(s);break}i[2]&&a.ops.pop(),a.trys.pop();continue}s=t.call(e,a)}catch(e){s=[6,e],r=0}finally{n=i=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}([s,l])}}}var g=Object.create?function(e,t,n,r){void 0===r&&(r=n);var i=Object.getOwnPropertyDescriptor(t,n);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,i)}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]};function v(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||g(t,e,n)}function x(e){var t="function"==typeof Symbol&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function y(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,i,o=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(r=o.next()).done;)a.push(r.value)}catch(e){i={error:e}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(i)throw i.error}}return a}function b(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(y(arguments[t]));return e}function j(){for(var e=0,t=0,n=arguments.length;t<n;t++)e+=arguments[t].length;var r=Array(e),i=0;for(t=0;t<n;t++)for(var o=arguments[t],a=0,s=o.length;a<s;a++,i++)r[i]=o[a];return r}function _(e,t,n){if(n||2===arguments.length)for(var r,i=0,o=t.length;i<o;i++)!r&&i in t||(r||(r=Array.prototype.slice.call(t,0,i)),r[i]=t[i]);return e.concat(r||Array.prototype.slice.call(t))}function C(e){return this instanceof C?(this.v=e,this):new C(e)}function w(e,t,n){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var r,i=n.apply(e,t||[]),o=[];return r={},a("next"),a("throw"),a("return"),r[Symbol.asyncIterator]=function(){return this},r;function a(e){i[e]&&(r[e]=function(t){return new Promise(function(n,r){o.push([e,t,n,r])>1||s(e,t)})})}function s(e,t){try{(n=i[e](t)).value instanceof C?Promise.resolve(n.value.v).then(l,c):d(o[0][2],n)}catch(e){d(o[0][3],e)}var n}function l(e){s("next",e)}function c(e){s("throw",e)}function d(e,t){e(t),o.shift(),o.length&&s(o[0][0],o[0][1])}}function S(e){var t,n;return t={},r("next"),r("throw",function(e){throw e}),r("return"),t[Symbol.iterator]=function(){return this},t;function r(r,i){t[r]=e[r]?function(t){return(n=!n)?{value:C(e[r](t)),done:!1}:i?i(t):t}:i}}function A(e){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var t,n=e[Symbol.asyncIterator];return n?n.call(e):(e=x(e),t={},r("next"),r("throw"),r("return"),t[Symbol.asyncIterator]=function(){return this},t);function r(n){t[n]=e[n]&&function(t){return new Promise(function(r,i){!function(e,t,n,r){Promise.resolve(r).then(function(t){e({value:t,done:n})},t)}(r,i,(t=e[n](t)).done,t.value)})}}}function k(e,t){return Object.defineProperty?Object.defineProperty(e,"raw",{value:t}):e.raw=t,e}var T=Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t};function E(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&g(t,e,n);return T(t,e),t}function M(e){return e&&e.__esModule?e:{default:e}}function O(e,t,n,r){if("a"===n&&!r)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof t?e!==t||!r:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===n?r:"a"===n?r.call(e):r?r.value:t.get(e)}function R(e,t,n,r,i){if("m"===r)throw new TypeError("Private method is not writable");if("a"===r&&!i)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof t?e!==t||!i:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===r?i.call(e,n):i?i.value=n:t.set(e,n),n}function P(e,t){if(null===t||"object"!=typeof t&&"function"!=typeof t)throw new TypeError("Cannot use 'in' operator on non-object");return"function"==typeof e?t===e:e.has(t)}function D(e,t,n){if(null!=t){if("object"!=typeof t&&"function"!=typeof t)throw new TypeError("Object expected.");var r;if(n){if(!Symbol.asyncDispose)throw new TypeError("Symbol.asyncDispose is not defined.");r=t[Symbol.asyncDispose]}if(void 0===r){if(!Symbol.dispose)throw new TypeError("Symbol.dispose is not defined.");r=t[Symbol.dispose]}if("function"!=typeof r)throw new TypeError("Object not disposable.");e.stack.push({value:t,dispose:r,async:n})}else n&&e.stack.push({async:!0});return t}var N="function"==typeof SuppressedError?SuppressedError:function(e,t,n){var r=new Error(n);return r.name="SuppressedError",r.error=e,r.suppressed=t,r};function L(e){function t(t){e.error=e.hasError?new N(t,e.error,"An error was suppressed during disposal."):t,e.hasError=!0}return function n(){for(;e.stack.length;){var r=e.stack.pop();try{var i=r.dispose&&r.dispose.call(r.value);if(r.async)return Promise.resolve(i).then(n,function(e){return t(e),n()})}catch(e){t(e)}}if(e.hasError)throw e.error}()}t.default={__extends:i,__assign:o,__rest:a,__decorate:s,__param:l,__metadata:h,__awaiter:m,__generator:f,__createBinding:g,__exportStar:v,__values:x,__read:y,__spread:b,__spreadArrays:j,__spreadArray:_,__await:C,__asyncGenerator:w,__asyncDelegator:S,__asyncValues:A,__makeTemplateObject:k,__importStar:E,__importDefault:M,__classPrivateFieldGet:O,__classPrivateFieldSet:R,__classPrivateFieldIn:P,__addDisposableResource:D,__disposeResources:L}}},t={};function n(r){var i=t[r];if(void 0!==i)return i.exports;var o=t[r]={exports:{}};return e[r](o,o.exports,n),o.exports}n.d=function(e,t){for(var r in t)n.o(t,r)&&!n.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var o={};return function(){var e=o;Object.defineProperty(e,"__esModule",{value:!0}),e.useReactToPrint=e.ReactToPrint=e.PrintContextConsumer=void 0;var t=n(328);Object.defineProperty(e,"PrintContextConsumer",{enumerable:!0,get:function(){return t.PrintContextConsumer}});var r=n(428);Object.defineProperty(e,"ReactToPrint",{enumerable:!0,get:function(){return r.ReactToPrint}});var i=n(892);Object.defineProperty(e,"useReactToPrint",{enumerable:!0,get:function(){return i.useReactToPrint}});var a=n(428);e.default=a.ReactToPrint}(),o}())},93211:e=>{e.exports=function(e,t){return e===t||e!==e&&t!==t}},93229:(e,t,n)=>{"use strict";var r=n(82702);e.exports=function(e,t,n){var i=n.config.validateStatus;n.status&&i&&!i(n.status)?t(new r("Request failed with status code "+n.status,[r.ERR_BAD_REQUEST,r.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n)):e(n)}},93319:(e,t,n)=>{"use strict";n.d(t,{A:()=>r});const r=n(31782).A},93403:e=>{"use strict";e.exports=function(e){var t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}},93795:e=>{var t="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)||"undefined"!=typeof msCrypto&&"function"==typeof window.msCrypto.getRandomValues&&msCrypto.getRandomValues.bind(msCrypto);if(t){var n=new Uint8Array(16);e.exports=function(){return t(n),n}}else{var r=new Array(16);e.exports=function(){for(var e,t=0;t<16;t++)0===(3&t)&&(e=4294967296*Math.random()),r[t]=e>>>((3&t)<<3)&255;return r}}},93803:(e,t,n)=>{"use strict";n.d(t,{A:()=>ie});var r=function(){function e(e){var t=this;this._insertTag=function(e){var n;n=0===t.tags.length?t.insertionPoint?t.insertionPoint.nextSibling:t.prepend?t.container.firstChild:t.before:t.tags[t.tags.length-1].nextSibling,t.container.insertBefore(e,n),t.tags.push(e)},this.isSpeedy=void 0===e.speedy||e.speedy,this.tags=[],this.ctr=0,this.nonce=e.nonce,this.key=e.key,this.container=e.container,this.prepend=e.prepend,this.insertionPoint=e.insertionPoint,this.before=null}var t=e.prototype;return t.hydrate=function(e){e.forEach(this._insertTag)},t.insert=function(e){this.ctr%(this.isSpeedy?65e3:1)===0&&this._insertTag(function(e){var t=document.createElement("style");return t.setAttribute("data-emotion",e.key),void 0!==e.nonce&&t.setAttribute("nonce",e.nonce),t.appendChild(document.createTextNode("")),t.setAttribute("data-s",""),t}(this));var t=this.tags[this.tags.length-1];if(this.isSpeedy){var n=function(e){if(e.sheet)return e.sheet;for(var t=0;t<document.styleSheets.length;t++)if(document.styleSheets[t].ownerNode===e)return document.styleSheets[t]}(t);try{n.insertRule(e,n.cssRules.length)}catch(r){}}else t.appendChild(document.createTextNode(e));this.ctr++},t.flush=function(){this.tags.forEach(function(e){var t;return null==(t=e.parentNode)?void 0:t.removeChild(e)}),this.tags=[],this.ctr=0},e}(),i=Math.abs,o=String.fromCharCode,a=Object.assign;function s(e){return e.trim()}function l(e,t,n){return e.replace(t,n)}function c(e,t){return e.indexOf(t)}function d(e,t){return 0|e.charCodeAt(t)}function u(e,t,n){return e.slice(t,n)}function p(e){return e.length}function h(e){return e.length}function m(e,t){return t.push(e),e}var f=1,g=1,v=0,x=0,y=0,b="";function j(e,t,n,r,i,o,a){return{value:e,root:t,parent:n,type:r,props:i,children:o,line:f,column:g,length:a,return:""}}function _(e,t){return a(j("",null,null,"",null,null,0),e,{length:-e.length},t)}function C(){return y=x>0?d(b,--x):0,g--,10===y&&(g=1,f--),y}function w(){return y=x<v?d(b,x++):0,g++,10===y&&(g=1,f++),y}function S(){return d(b,x)}function A(){return x}function k(e,t){return u(b,e,t)}function T(e){switch(e){case 0:case 9:case 10:case 13:case 32:return 5;case 33:case 43:case 44:case 47:case 62:case 64:case 126:case 59:case 123:case 125:return 4;case 58:return 3;case 34:case 39:case 40:case 91:return 2;case 41:case 93:return 1}return 0}function E(e){return f=g=1,v=p(b=e),x=0,[]}function M(e){return b="",e}function O(e){return s(k(x-1,D(91===e?e+2:40===e?e+1:e)))}function R(e){for(;(y=S())&&y<33;)w();return T(e)>2||T(y)>3?"":" "}function P(e,t){for(;--t&&w()&&!(y<48||y>102||y>57&&y<65||y>70&&y<97););return k(e,A()+(t<6&&32==S()&&32==w()))}function D(e){for(;w();)switch(y){case e:return x;case 34:case 39:34!==e&&39!==e&&D(y);break;case 40:41===e&&D(e);break;case 92:w()}return x}function N(e,t){for(;w()&&e+y!==57&&(e+y!==84||47!==S()););return"/*"+k(t,x-1)+"*"+o(47===e?e:w())}function L(e){for(;!T(S());)w();return k(e,x)}var I="-ms-",F="-moz-",$="-webkit-",B="comm",z="rule",H="decl",W="@keyframes";function U(e,t){for(var n="",r=h(e),i=0;i<r;i++)n+=t(e[i],i,e,t)||"";return n}function V(e,t,n,r){switch(e.type){case"@layer":if(e.children.length)break;case"@import":case H:return e.return=e.return||e.value;case B:return"";case W:return e.return=e.value+"{"+U(e.children,r)+"}";case z:e.value=e.props.join(",")}return p(n=U(e.children,r))?e.return=e.value+"{"+n+"}":""}function G(e){return M(q("",null,null,null,[""],e=E(e),0,[0],e))}function q(e,t,n,r,i,a,s,u,h){for(var f=0,g=0,v=s,x=0,y=0,b=0,j=1,_=1,k=1,T=0,E="",M=i,D=a,I=r,F=E;_;)switch(b=T,T=w()){case 40:if(108!=b&&58==d(F,v-1)){-1!=c(F+=l(O(T),"&","&\f"),"&\f")&&(k=-1);break}case 34:case 39:case 91:F+=O(T);break;case 9:case 10:case 13:case 32:F+=R(b);break;case 92:F+=P(A()-1,7);continue;case 47:switch(S()){case 42:case 47:m(Z(N(w(),A()),t,n),h);break;default:F+="/"}break;case 123*j:u[f++]=p(F)*k;case 125*j:case 59:case 0:switch(T){case 0:case 125:_=0;case 59+g:-1==k&&(F=l(F,/\f/g,"")),y>0&&p(F)-v&&m(y>32?K(F+";",r,n,v-1):K(l(F," ","")+";",r,n,v-2),h);break;case 59:F+=";";default:if(m(I=Y(F,t,n,f,g,i,u,E,M=[],D=[],v),a),123===T)if(0===g)q(F,t,I,I,M,a,v,u,D);else switch(99===x&&110===d(F,3)?100:x){case 100:case 108:case 109:case 115:q(e,I,I,r&&m(Y(e,I,I,0,0,i,u,E,i,M=[],v),D),i,D,v,u,r?M:D);break;default:q(F,I,I,I,[""],D,0,u,D)}}f=g=y=0,j=k=1,E=F="",v=s;break;case 58:v=1+p(F),y=b;default:if(j<1)if(123==T)--j;else if(125==T&&0==j++&&125==C())continue;switch(F+=o(T),T*j){case 38:k=g>0?1:(F+="\f",-1);break;case 44:u[f++]=(p(F)-1)*k,k=1;break;case 64:45===S()&&(F+=O(w())),x=S(),g=v=p(E=F+=L(A())),T++;break;case 45:45===b&&2==p(F)&&(j=0)}}return a}function Y(e,t,n,r,o,a,c,d,p,m,f){for(var g=o-1,v=0===o?a:[""],x=h(v),y=0,b=0,_=0;y<r;++y)for(var C=0,w=u(e,g+1,g=i(b=c[y])),S=e;C<x;++C)(S=s(b>0?v[C]+" "+w:l(w,/&\f/g,v[C])))&&(p[_++]=S);return j(e,t,n,0===o?z:d,p,m,f)}function Z(e,t,n){return j(e,t,n,B,o(y),u(e,2,-2),0)}function K(e,t,n,r){return j(e,t,n,H,u(e,0,r),u(e,r+1,-1),r)}var X=function(e,t,n){for(var r=0,i=0;r=i,i=S(),38===r&&12===i&&(t[n]=1),!T(i);)w();return k(e,x)},Q=function(e,t){return M(function(e,t){var n=-1,r=44;do{switch(T(r)){case 0:38===r&&12===S()&&(t[n]=1),e[n]+=X(x-1,t,n);break;case 2:e[n]+=O(r);break;case 4:if(44===r){e[++n]=58===S()?"&\f":"",t[n]=e[n].length;break}default:e[n]+=o(r)}}while(r=w());return e}(E(e),t))},J=new WeakMap,ee=function(e){if("rule"===e.type&&e.parent&&!(e.length<1)){for(var t=e.value,n=e.parent,r=e.column===n.column&&e.line===n.line;"rule"!==n.type;)if(!(n=n.parent))return;if((1!==e.props.length||58===t.charCodeAt(0)||J.get(n))&&!r){J.set(e,!0);for(var i=[],o=Q(t,i),a=n.props,s=0,l=0;s<o.length;s++)for(var c=0;c<a.length;c++,l++)e.props[l]=i[s]?o[s].replace(/&\f/g,a[c]):a[c]+" "+o[s]}}},te=function(e){if("decl"===e.type){var t=e.value;108===t.charCodeAt(0)&&98===t.charCodeAt(2)&&(e.return="",e.value="")}};function ne(e,t){switch(function(e,t){return 45^d(e,0)?(((t<<2^d(e,0))<<2^d(e,1))<<2^d(e,2))<<2^d(e,3):0}(e,t)){case 5103:return $+"print-"+e+e;case 5737:case 4201:case 3177:case 3433:case 1641:case 4457:case 2921:case 5572:case 6356:case 5844:case 3191:case 6645:case 3005:case 6391:case 5879:case 5623:case 6135:case 4599:case 4855:case 4215:case 6389:case 5109:case 5365:case 5621:case 3829:return $+e+e;case 5349:case 4246:case 4810:case 6968:case 2756:return $+e+F+e+I+e+e;case 6828:case 4268:return $+e+I+e+e;case 6165:return $+e+I+"flex-"+e+e;case 5187:return $+e+l(e,/(\w+).+(:[^]+)/,$+"box-$1$2"+I+"flex-$1$2")+e;case 5443:return $+e+I+"flex-item-"+l(e,/flex-|-self/,"")+e;case 4675:return $+e+I+"flex-line-pack"+l(e,/align-content|flex-|-self/,"")+e;case 5548:return $+e+I+l(e,"shrink","negative")+e;case 5292:return $+e+I+l(e,"basis","preferred-size")+e;case 6060:return $+"box-"+l(e,"-grow","")+$+e+I+l(e,"grow","positive")+e;case 4554:return $+l(e,/([^-])(transform)/g,"$1"+$+"$2")+e;case 6187:return l(l(l(e,/(zoom-|grab)/,$+"$1"),/(image-set)/,$+"$1"),e,"")+e;case 5495:case 3959:return l(e,/(image-set\([^]*)/,$+"$1$`$1");case 4968:return l(l(e,/(.+:)(flex-)?(.*)/,$+"box-pack:$3"+I+"flex-pack:$3"),/s.+-b[^;]+/,"justify")+$+e+e;case 4095:case 3583:case 4068:case 2532:return l(e,/(.+)-inline(.+)/,$+"$1$2")+e;case 8116:case 7059:case 5753:case 5535:case 5445:case 5701:case 4933:case 4677:case 5533:case 5789:case 5021:case 4765:if(p(e)-1-t>6)switch(d(e,t+1)){case 109:if(45!==d(e,t+4))break;case 102:return l(e,/(.+:)(.+)-([^]+)/,"$1"+$+"$2-$3$1"+F+(108==d(e,t+3)?"$3":"$2-$3"))+e;case 115:return~c(e,"stretch")?ne(l(e,"stretch","fill-available"),t)+e:e}break;case 4949:if(115!==d(e,t+1))break;case 6444:switch(d(e,p(e)-3-(~c(e,"!important")&&10))){case 107:return l(e,":",":"+$)+e;case 101:return l(e,/(.+:)([^;!]+)(;|!.+)?/,"$1"+$+(45===d(e,14)?"inline-":"")+"box$3$1"+$+"$2$3$1"+I+"$2box$3")+e}break;case 5936:switch(d(e,t+11)){case 114:return $+e+I+l(e,/[svh]\w+-[tblr]{2}/,"tb")+e;case 108:return $+e+I+l(e,/[svh]\w+-[tblr]{2}/,"tb-rl")+e;case 45:return $+e+I+l(e,/[svh]\w+-[tblr]{2}/,"lr")+e}return $+e+I+e+e}return e}var re=[function(e,t,n,r){if(e.length>-1&&!e.return)switch(e.type){case H:e.return=ne(e.value,e.length);break;case W:return U([_(e,{value:l(e.value,"@","@"+$)})],r);case z:if(e.length)return function(e,t){return e.map(t).join("")}(e.props,function(t){switch(function(e,t){return(e=t.exec(e))?e[0]:e}(t,/(::plac\w+|:read-\w+)/)){case":read-only":case":read-write":return U([_(e,{props:[l(t,/:(read-\w+)/,":-moz-$1")]})],r);case"::placeholder":return U([_(e,{props:[l(t,/:(plac\w+)/,":"+$+"input-$1")]}),_(e,{props:[l(t,/:(plac\w+)/,":-moz-$1")]}),_(e,{props:[l(t,/:(plac\w+)/,I+"input-$1")]})],r)}return""})}}],ie=function(e){var t=e.key;if("css"===t){var n=document.querySelectorAll("style[data-emotion]:not([data-s])");Array.prototype.forEach.call(n,function(e){-1!==e.getAttribute("data-emotion").indexOf(" ")&&(document.head.appendChild(e),e.setAttribute("data-s",""))})}var i,o,a=e.stylisPlugins||re,s={},l=[];i=e.container||document.head,Array.prototype.forEach.call(document.querySelectorAll('style[data-emotion^="'+t+' "]'),function(e){for(var t=e.getAttribute("data-emotion").split(" "),n=1;n<t.length;n++)s[t[n]]=!0;l.push(e)});var c,d,u=[V,(d=function(e){c.insert(e)},function(e){e.root||(e=e.return)&&d(e)})],p=function(e){var t=h(e);return function(n,r,i,o){for(var a="",s=0;s<t;s++)a+=e[s](n,r,i,o)||"";return a}}([ee,te].concat(a,u));o=function(e,t,n,r){c=n,U(G(e?e+"{"+t.styles+"}":t.styles),p),r&&(m.inserted[t.name]=!0)};var m={key:t,sheet:new r({key:t,container:i,nonce:e.nonce,speedy:e.speedy,prepend:e.prepend,insertionPoint:e.insertionPoint}),nonce:e.nonce,inserted:s,registered:{},insert:o};return m.sheet.hydrate(l),m}},93950:(e,t,n)=>{var r=n(46686),i=n(4757),o=n(40801),a=Math.max,s=Math.min;e.exports=function(e,t,n){var l,c,d,u,p,h,m=0,f=!1,g=!1,v=!0;if("function"!=typeof e)throw new TypeError("Expected a function");function x(t){var n=l,r=c;return l=c=void 0,m=t,u=e.apply(r,n)}function y(e){var n=e-h;return void 0===h||n>=t||n<0||g&&e-m>=d}function b(){var e=i();if(y(e))return j(e);p=setTimeout(b,function(e){var n=t-(e-h);return g?s(n,d-(e-m)):n}(e))}function j(e){return p=void 0,v&&l?x(e):(l=c=void 0,u)}function _(){var e=i(),n=y(e);if(l=arguments,c=this,h=e,n){if(void 0===p)return function(e){return m=e,p=setTimeout(b,t),f?x(e):u}(h);if(g)return clearTimeout(p),p=setTimeout(b,t),x(h)}return void 0===p&&(p=setTimeout(b,t)),u}return t=o(t)||0,r(n)&&(f=!!n.leading,d=(g="maxWait"in n)?a(o(n.maxWait)||0,t):d,v="trailing"in n?!!n.trailing:v),_.cancel=function(){void 0!==p&&clearTimeout(p),m=0,l=h=c=p=void 0},_.flush=function(){return void 0===p?u:j(i())},_}},94020:e=>{e.exports=function(e,t,n){for(var r=n-1,i=e.length;++r<i;)if(e[r]===t)return r;return-1}},94258:(e,t,n)=>{var r=n(55906)();e.exports=r},94329:(e,t,n)=>{"use strict";var r=n(24994);t.A=void 0;var i=r(n(40039)),o=n(70579);t.A=(0,i.default)((0,o.jsx)("path",{d:"M17 3H5c-1.11 0-2 .9-2 2v14c0 1.1.89 2 2 2h14c1.1 0 2-.9 2-2V7zm-5 16c-1.66 0-3-1.34-3-3s1.34-3 3-3 3 1.34 3 3-1.34 3-3 3m3-10H5V5h10z"}),"Save")},94634:e=>{function t(){return e.exports=t=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},e.exports.__esModule=!0,e.exports.default=e.exports,t.apply(null,arguments)}e.exports=t,e.exports.__esModule=!0,e.exports.default=e.exports},94664:(e,t,n)=>{var r=n(94258),i=n(28673);e.exports=function(e,t){return e&&r(e,t,i)}},94992:(e,t,n)=>{"use strict";var r=n(24994);t.A=void 0;var i=r(n(40039)),o=n(70579);t.A=(0,i.default)((0,o.jsx)("path",{d:"M12 2C6.47 2 2 6.47 2 12s4.47 10 10 10 10-4.47 10-10S17.53 2 12 2"}),"Circle")},95082:(e,t)=>{"use strict";var n="function"===typeof Symbol&&Symbol.for,r=n?Symbol.for("react.element"):60103,i=n?Symbol.for("react.portal"):60106,o=n?Symbol.for("react.fragment"):60107,a=n?Symbol.for("react.strict_mode"):60108,s=n?Symbol.for("react.profiler"):60114,l=n?Symbol.for("react.provider"):60109,c=n?Symbol.for("react.context"):60110,d=n?Symbol.for("react.async_mode"):60111,u=n?Symbol.for("react.concurrent_mode"):60111,p=n?Symbol.for("react.forward_ref"):60112,h=n?Symbol.for("react.suspense"):60113,m=n?Symbol.for("react.suspense_list"):60120,f=n?Symbol.for("react.memo"):60115,g=n?Symbol.for("react.lazy"):60116,v=n?Symbol.for("react.block"):60121,x=n?Symbol.for("react.fundamental"):60117,y=n?Symbol.for("react.responder"):60118,b=n?Symbol.for("react.scope"):60119;function j(e){if("object"===typeof e&&null!==e){var t=e.$$typeof;switch(t){case r:switch(e=e.type){case d:case u:case o:case s:case a:case h:return e;default:switch(e=e&&e.$$typeof){case c:case p:case g:case f:case l:return e;default:return t}}case i:return t}}}function _(e){return j(e)===u}t.AsyncMode=d,t.ConcurrentMode=u,t.ContextConsumer=c,t.ContextProvider=l,t.Element=r,t.ForwardRef=p,t.Fragment=o,t.Lazy=g,t.Memo=f,t.Portal=i,t.Profiler=s,t.StrictMode=a,t.Suspense=h,t.isAsyncMode=function(e){return _(e)||j(e)===d},t.isConcurrentMode=_,t.isContextConsumer=function(e){return j(e)===c},t.isContextProvider=function(e){return j(e)===l},t.isElement=function(e){return"object"===typeof e&&null!==e&&e.$$typeof===r},t.isForwardRef=function(e){return j(e)===p},t.isFragment=function(e){return j(e)===o},t.isLazy=function(e){return j(e)===g},t.isMemo=function(e){return j(e)===f},t.isPortal=function(e){return j(e)===i},t.isProfiler=function(e){return j(e)===s},t.isStrictMode=function(e){return j(e)===a},t.isSuspense=function(e){return j(e)===h},t.isValidElementType=function(e){return"string"===typeof e||"function"===typeof e||e===o||e===u||e===s||e===a||e===h||e===m||"object"===typeof e&&null!==e&&(e.$$typeof===g||e.$$typeof===f||e.$$typeof===l||e.$$typeof===c||e.$$typeof===p||e.$$typeof===x||e.$$typeof===y||e.$$typeof===b||e.$$typeof===v)},t.typeOf=j},95382:(e,t,n)=>{"use strict";var r=n(24994);t.A=void 0;var i=r(n(40039)),o=n(70579);t.A=(0,i.default)((0,o.jsx)("path",{d:"M9 16.17 4.83 12l-1.42 1.41L9 19 21 7l-1.41-1.41z"}),"Check")},95419:e=>{"use strict";var t=function(e){return function(e){return!!e&&"object"===typeof e}(e)&&!function(e){var t=Object.prototype.toString.call(e);return"[object RegExp]"===t||"[object Date]"===t||function(e){return e.$$typeof===n}(e)}(e)};var n="function"===typeof Symbol&&Symbol.for?Symbol.for("react.element"):60103;function r(e,t){return!1!==t.clone&&t.isMergeableObject(e)?l((n=e,Array.isArray(n)?[]:{}),e,t):e;var n}function i(e,t,n){return e.concat(t).map(function(e){return r(e,n)})}function o(e){return Object.keys(e).concat(function(e){return Object.getOwnPropertySymbols?Object.getOwnPropertySymbols(e).filter(function(t){return Object.propertyIsEnumerable.call(e,t)}):[]}(e))}function a(e,t){try{return t in e}catch(n){return!1}}function s(e,t,n){var i={};return n.isMergeableObject(e)&&o(e).forEach(function(t){i[t]=r(e[t],n)}),o(t).forEach(function(o){(function(e,t){return a(e,t)&&!(Object.hasOwnProperty.call(e,t)&&Object.propertyIsEnumerable.call(e,t))})(e,o)||(a(e,o)&&n.isMergeableObject(t[o])?i[o]=function(e,t){if(!t.customMerge)return l;var n=t.customMerge(e);return"function"===typeof n?n:l}(o,n)(e[o],t[o],n):i[o]=r(t[o],n))}),i}function l(e,n,o){(o=o||{}).arrayMerge=o.arrayMerge||i,o.isMergeableObject=o.isMergeableObject||t,o.cloneUnlessOtherwiseSpecified=r;var a=Array.isArray(n);return a===Array.isArray(e)?a?o.arrayMerge(e,n,o):s(e,n,o):r(n,o)}l.all=function(e,t){if(!Array.isArray(e))throw new Error("first argument should be an array");return e.reduce(function(e,n){return l(e,n,t)},{})};var c=l;e.exports=c},95540:(e,t,n)=>{"use strict";var r=n(24994);t.A=void 0;var i=r(n(40039)),o=n(70579);t.A=(0,i.default)((0,o.jsx)("path",{d:"M3 17.25V21h3.75L17.81 9.94l-3.75-3.75zM20.71 7.04c.39-.39.39-1.02 0-1.41l-2.34-2.34a.9959.9959 0 0 0-1.41 0l-1.83 1.83 3.75 3.75z"}),"Edit")},95575:(e,t,n)=>{var r=n(87937)(Object,"create");e.exports=r},95849:(e,t,n)=>{"use strict";n.d(t,{A:()=>r});const r=n(63462).A},96361:(e,t,n)=>{var r=n(16913),i=n(22761);e.exports=function(e){return!0===e||!1===e||i(e)&&"[object Boolean]"==r(e)}},96604:(e,t,n)=>{var r=n(3331)();e.exports=r},96614:(e,t,n)=>{var r=n(78420),i=n(71775);e.exports=function(e,t,n,o){var a=!n;n||(n={});for(var s=-1,l=t.length;++s<l;){var c=t[s],d=o?o(n[c],e[c],c,n,e):void 0;void 0===d&&(d=e[c]),a?i(n,c,d):r(n,c,d)}return n}},96996:e=>{var t=Function.prototype.toString;e.exports=function(e){if(null!=e){try{return t.call(e)}catch(n){}try{return e+""}catch(n){}}return""}},97132:(e,t,n)=>{var r=n(5538),i=n(80726),o=n(78420),a=n(51104),s=n(55119),l=n(44353),c=n(91980),d=n(98124),u=n(29075),p=n(59395),h=n(68592),m=n(26924),f=n(38268),g=n(18630),v=n(20310),x=n(54052),y=n(44543),b=n(57887),j=n(46686),_=n(45921),C=n(28673),w=n(30474),S="[object Arguments]",A="[object Function]",k="[object Object]",T={};T[S]=T["[object Array]"]=T["[object ArrayBuffer]"]=T["[object DataView]"]=T["[object Boolean]"]=T["[object Date]"]=T["[object Float32Array]"]=T["[object Float64Array]"]=T["[object Int8Array]"]=T["[object Int16Array]"]=T["[object Int32Array]"]=T["[object Map]"]=T["[object Number]"]=T[k]=T["[object RegExp]"]=T["[object Set]"]=T["[object String]"]=T["[object Symbol]"]=T["[object Uint8Array]"]=T["[object Uint8ClampedArray]"]=T["[object Uint16Array]"]=T["[object Uint32Array]"]=!0,T["[object Error]"]=T[A]=T["[object WeakMap]"]=!1,e.exports=function e(t,n,E,M,O,R){var P,D=1&n,N=2&n,L=4&n;if(E&&(P=O?E(t,M,O,R):E(t)),void 0!==P)return P;if(!j(t))return t;var I=x(t);if(I){if(P=f(t),!D)return c(t,P)}else{var F=m(t),$=F==A||"[object GeneratorFunction]"==F;if(y(t))return l(t,D);if(F==k||F==S||$&&!O){if(P=N||$?{}:v(t),!D)return N?u(t,s(P,t)):d(t,a(P,t))}else{if(!T[F])return O?t:{};P=g(t,F,D)}}R||(R=new r);var B=R.get(t);if(B)return B;R.set(t,P),_(t)?t.forEach(function(r){P.add(e(r,n,E,r,t,R))}):b(t)&&t.forEach(function(r,i){P.set(i,e(r,n,E,i,t,R))});var z=I?void 0:(L?N?h:p:N?w:C)(t);return i(z||t,function(r,i){z&&(r=t[i=r]),o(P,i,e(r,n,E,i,t,R))}),P}},97160:(e,t,n)=>{var r=n(87563),i=n(29935),o=n(24190),a=n(51946),s=n(61714);function l(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}l.prototype.clear=r,l.prototype.delete=i,l.prototype.get=o,l.prototype.has=a,l.prototype.set=s,e.exports=l},97498:e=>{e.exports=function(e,t){return e>t}},97685:(e,t,n)=>{var r=n(87937)(n(56552),"DataView");e.exports=r},97950:(e,t,n)=>{"use strict";!function e(){if("undefined"!==typeof __REACT_DEVTOOLS_GLOBAL_HOOK__&&"function"===typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE)try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(t){console.error(t)}}(),e.exports=n(82730)},98082:(e,t,n)=>{"use strict";var r=n(24994);t.A=void 0;var i=r(n(40039)),o=n(70579);t.A=(0,i.default)((0,o.jsx)("path",{d:"M12 8c1.1 0 2-.9 2-2s-.9-2-2-2-2 .9-2 2 .9 2 2 2m0 2c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2m0 6c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2"}),"MoreVert")},98124:(e,t,n)=>{var r=n(96614),i=n(69621);e.exports=function(e,t){return r(e,i(e),t)}},98206:(e,t,n)=>{"use strict";n.d(t,{b:()=>i});n(65043);var r=n(13654);n(70579);function i(e){return(0,r.b)(e)}},98210:function(e,t,n){var r;!function(){"use strict";var i,o=1e9,a={precision:20,rounding:4,toExpNeg:-7,toExpPos:21,LN10:"2.302585092994045684017991454684364207601101488628772976033327900967572609677352480235997205089598298341967784042286"},s=!0,l="[DecimalError] ",c=l+"Invalid argument: ",d=l+"Exponent out of range: ",u=Math.floor,p=Math.pow,h=/^(\d+(\.\d*)?|\.\d+)(e[+-]?\d+)?$/i,m=1e7,f=9007199254740991,g=u(1286742750677284.5),v={};function x(e,t){var n,r,i,o,a,l,c,d,u=e.constructor,p=u.precision;if(!e.s||!t.s)return t.s||(t=new u(e)),s?T(t,p):t;if(c=e.d,d=t.d,a=e.e,i=t.e,c=c.slice(),o=a-i){for(o<0?(r=c,o=-o,l=d.length):(r=d,i=a,l=c.length),o>(l=(a=Math.ceil(p/7))>l?a+1:l+1)&&(o=l,r.length=1),r.reverse();o--;)r.push(0);r.reverse()}for((l=c.length)-(o=d.length)<0&&(o=l,r=d,d=c,c=r),n=0;o;)n=(c[--o]=c[o]+d[o]+n)/m|0,c[o]%=m;for(n&&(c.unshift(n),++i),l=c.length;0==c[--l];)c.pop();return t.d=c,t.e=i,s?T(t,p):t}function y(e,t,n){if(e!==~~e||e<t||e>n)throw Error(c+e)}function b(e){var t,n,r,i=e.length-1,o="",a=e[0];if(i>0){for(o+=a,t=1;t<i;t++)(n=7-(r=e[t]+"").length)&&(o+=S(n)),o+=r;(n=7-(r=(a=e[t])+"").length)&&(o+=S(n))}else if(0===a)return"0";for(;a%10===0;)a/=10;return o+a}v.absoluteValue=v.abs=function(){var e=new this.constructor(this);return e.s&&(e.s=1),e},v.comparedTo=v.cmp=function(e){var t,n,r,i,o=this;if(e=new o.constructor(e),o.s!==e.s)return o.s||-e.s;if(o.e!==e.e)return o.e>e.e^o.s<0?1:-1;for(t=0,n=(r=o.d.length)<(i=e.d.length)?r:i;t<n;++t)if(o.d[t]!==e.d[t])return o.d[t]>e.d[t]^o.s<0?1:-1;return r===i?0:r>i^o.s<0?1:-1},v.decimalPlaces=v.dp=function(){var e=this,t=e.d.length-1,n=7*(t-e.e);if(t=e.d[t])for(;t%10==0;t/=10)n--;return n<0?0:n},v.dividedBy=v.div=function(e){return j(this,new this.constructor(e))},v.dividedToIntegerBy=v.idiv=function(e){var t=this.constructor;return T(j(this,new t(e),0,1),t.precision)},v.equals=v.eq=function(e){return!this.cmp(e)},v.exponent=function(){return C(this)},v.greaterThan=v.gt=function(e){return this.cmp(e)>0},v.greaterThanOrEqualTo=v.gte=function(e){return this.cmp(e)>=0},v.isInteger=v.isint=function(){return this.e>this.d.length-2},v.isNegative=v.isneg=function(){return this.s<0},v.isPositive=v.ispos=function(){return this.s>0},v.isZero=function(){return 0===this.s},v.lessThan=v.lt=function(e){return this.cmp(e)<0},v.lessThanOrEqualTo=v.lte=function(e){return this.cmp(e)<1},v.logarithm=v.log=function(e){var t,n=this,r=n.constructor,o=r.precision,a=o+5;if(void 0===e)e=new r(10);else if((e=new r(e)).s<1||e.eq(i))throw Error(l+"NaN");if(n.s<1)throw Error(l+(n.s?"NaN":"-Infinity"));return n.eq(i)?new r(0):(s=!1,t=j(A(n,a),A(e,a),a),s=!0,T(t,o))},v.minus=v.sub=function(e){var t=this;return e=new t.constructor(e),t.s==e.s?E(t,e):x(t,(e.s=-e.s,e))},v.modulo=v.mod=function(e){var t,n=this,r=n.constructor,i=r.precision;if(!(e=new r(e)).s)throw Error(l+"NaN");return n.s?(s=!1,t=j(n,e,0,1).times(e),s=!0,n.minus(t)):T(new r(n),i)},v.naturalExponential=v.exp=function(){return _(this)},v.naturalLogarithm=v.ln=function(){return A(this)},v.negated=v.neg=function(){var e=new this.constructor(this);return e.s=-e.s||0,e},v.plus=v.add=function(e){var t=this;return e=new t.constructor(e),t.s==e.s?x(t,e):E(t,(e.s=-e.s,e))},v.precision=v.sd=function(e){var t,n,r,i=this;if(void 0!==e&&e!==!!e&&1!==e&&0!==e)throw Error(c+e);if(t=C(i)+1,n=7*(r=i.d.length-1)+1,r=i.d[r]){for(;r%10==0;r/=10)n--;for(r=i.d[0];r>=10;r/=10)n++}return e&&t>n?t:n},v.squareRoot=v.sqrt=function(){var e,t,n,r,i,o,a,c=this,d=c.constructor;if(c.s<1){if(!c.s)return new d(0);throw Error(l+"NaN")}for(e=C(c),s=!1,0==(i=Math.sqrt(+c))||i==1/0?(((t=b(c.d)).length+e)%2==0&&(t+="0"),i=Math.sqrt(t),e=u((e+1)/2)-(e<0||e%2),r=new d(t=i==1/0?"5e"+e:(t=i.toExponential()).slice(0,t.indexOf("e")+1)+e)):r=new d(i.toString()),i=a=(n=d.precision)+3;;)if(r=(o=r).plus(j(c,o,a+2)).times(.5),b(o.d).slice(0,a)===(t=b(r.d)).slice(0,a)){if(t=t.slice(a-3,a+1),i==a&&"4999"==t){if(T(o,n+1,0),o.times(o).eq(c)){r=o;break}}else if("9999"!=t)break;a+=4}return s=!0,T(r,n)},v.times=v.mul=function(e){var t,n,r,i,o,a,l,c,d,u=this,p=u.constructor,h=u.d,f=(e=new p(e)).d;if(!u.s||!e.s)return new p(0);for(e.s*=u.s,n=u.e+e.e,(c=h.length)<(d=f.length)&&(o=h,h=f,f=o,a=c,c=d,d=a),o=[],r=a=c+d;r--;)o.push(0);for(r=d;--r>=0;){for(t=0,i=c+r;i>r;)l=o[i]+f[r]*h[i-r-1]+t,o[i--]=l%m|0,t=l/m|0;o[i]=(o[i]+t)%m|0}for(;!o[--a];)o.pop();return t?++n:o.shift(),e.d=o,e.e=n,s?T(e,p.precision):e},v.toDecimalPlaces=v.todp=function(e,t){var n=this,r=n.constructor;return n=new r(n),void 0===e?n:(y(e,0,o),void 0===t?t=r.rounding:y(t,0,8),T(n,e+C(n)+1,t))},v.toExponential=function(e,t){var n,r=this,i=r.constructor;return void 0===e?n=M(r,!0):(y(e,0,o),void 0===t?t=i.rounding:y(t,0,8),n=M(r=T(new i(r),e+1,t),!0,e+1)),n},v.toFixed=function(e,t){var n,r,i=this,a=i.constructor;return void 0===e?M(i):(y(e,0,o),void 0===t?t=a.rounding:y(t,0,8),n=M((r=T(new a(i),e+C(i)+1,t)).abs(),!1,e+C(r)+1),i.isneg()&&!i.isZero()?"-"+n:n)},v.toInteger=v.toint=function(){var e=this,t=e.constructor;return T(new t(e),C(e)+1,t.rounding)},v.toNumber=function(){return+this},v.toPower=v.pow=function(e){var t,n,r,o,a,c,d=this,p=d.constructor,h=+(e=new p(e));if(!e.s)return new p(i);if(!(d=new p(d)).s){if(e.s<1)throw Error(l+"Infinity");return d}if(d.eq(i))return d;if(r=p.precision,e.eq(i))return T(d,r);if(c=(t=e.e)>=(n=e.d.length-1),a=d.s,c){if((n=h<0?-h:h)<=f){for(o=new p(i),t=Math.ceil(r/7+4),s=!1;n%2&&O((o=o.times(d)).d,t),0!==(n=u(n/2));)O((d=d.times(d)).d,t);return s=!0,e.s<0?new p(i).div(o):T(o,r)}}else if(a<0)throw Error(l+"NaN");return a=a<0&&1&e.d[Math.max(t,n)]?-1:1,d.s=1,s=!1,o=e.times(A(d,r+12)),s=!0,(o=_(o)).s=a,o},v.toPrecision=function(e,t){var n,r,i=this,a=i.constructor;return void 0===e?r=M(i,(n=C(i))<=a.toExpNeg||n>=a.toExpPos):(y(e,1,o),void 0===t?t=a.rounding:y(t,0,8),r=M(i=T(new a(i),e,t),e<=(n=C(i))||n<=a.toExpNeg,e)),r},v.toSignificantDigits=v.tosd=function(e,t){var n=this.constructor;return void 0===e?(e=n.precision,t=n.rounding):(y(e,1,o),void 0===t?t=n.rounding:y(t,0,8)),T(new n(this),e,t)},v.toString=v.valueOf=v.val=v.toJSON=function(){var e=this,t=C(e),n=e.constructor;return M(e,t<=n.toExpNeg||t>=n.toExpPos)};var j=function(){function e(e,t){var n,r=0,i=e.length;for(e=e.slice();i--;)n=e[i]*t+r,e[i]=n%m|0,r=n/m|0;return r&&e.unshift(r),e}function t(e,t,n,r){var i,o;if(n!=r)o=n>r?1:-1;else for(i=o=0;i<n;i++)if(e[i]!=t[i]){o=e[i]>t[i]?1:-1;break}return o}function n(e,t,n){for(var r=0;n--;)e[n]-=r,r=e[n]<t[n]?1:0,e[n]=r*m+e[n]-t[n];for(;!e[0]&&e.length>1;)e.shift()}return function(r,i,o,a){var s,c,d,u,p,h,f,g,v,x,y,b,j,_,w,S,A,k,E=r.constructor,M=r.s==i.s?1:-1,O=r.d,R=i.d;if(!r.s)return new E(r);if(!i.s)throw Error(l+"Division by zero");for(c=r.e-i.e,A=R.length,w=O.length,g=(f=new E(M)).d=[],d=0;R[d]==(O[d]||0);)++d;if(R[d]>(O[d]||0)&&--c,(b=null==o?o=E.precision:a?o+(C(r)-C(i))+1:o)<0)return new E(0);if(b=b/7+2|0,d=0,1==A)for(u=0,R=R[0],b++;(d<w||u)&&b--;d++)j=u*m+(O[d]||0),g[d]=j/R|0,u=j%R|0;else{for((u=m/(R[0]+1)|0)>1&&(R=e(R,u),O=e(O,u),A=R.length,w=O.length),_=A,x=(v=O.slice(0,A)).length;x<A;)v[x++]=0;(k=R.slice()).unshift(0),S=R[0],R[1]>=m/2&&++S;do{u=0,(s=t(R,v,A,x))<0?(y=v[0],A!=x&&(y=y*m+(v[1]||0)),(u=y/S|0)>1?(u>=m&&(u=m-1),1==(s=t(p=e(R,u),v,h=p.length,x=v.length))&&(u--,n(p,A<h?k:R,h))):(0==u&&(s=u=1),p=R.slice()),(h=p.length)<x&&p.unshift(0),n(v,p,x),-1==s&&(s=t(R,v,A,x=v.length))<1&&(u++,n(v,A<x?k:R,x)),x=v.length):0===s&&(u++,v=[0]),g[d++]=u,s&&v[0]?v[x++]=O[_]||0:(v=[O[_]],x=1)}while((_++<w||void 0!==v[0])&&b--)}return g[0]||g.shift(),f.e=c,T(f,a?o+C(f)+1:o)}}();function _(e,t){var n,r,o,a,l,c=0,u=0,h=e.constructor,m=h.precision;if(C(e)>16)throw Error(d+C(e));if(!e.s)return new h(i);for(null==t?(s=!1,l=m):l=t,a=new h(.03125);e.abs().gte(.1);)e=e.times(a),u+=5;for(l+=Math.log(p(2,u))/Math.LN10*2+5|0,n=r=o=new h(i),h.precision=l;;){if(r=T(r.times(e),l),n=n.times(++c),b((a=o.plus(j(r,n,l))).d).slice(0,l)===b(o.d).slice(0,l)){for(;u--;)o=T(o.times(o),l);return h.precision=m,null==t?(s=!0,T(o,m)):o}o=a}}function C(e){for(var t=7*e.e,n=e.d[0];n>=10;n/=10)t++;return t}function w(e,t,n){if(t>e.LN10.sd())throw s=!0,n&&(e.precision=n),Error(l+"LN10 precision limit exceeded");return T(new e(e.LN10),t)}function S(e){for(var t="";e--;)t+="0";return t}function A(e,t){var n,r,o,a,c,d,u,p,h,m=1,f=e,g=f.d,v=f.constructor,x=v.precision;if(f.s<1)throw Error(l+(f.s?"NaN":"-Infinity"));if(f.eq(i))return new v(0);if(null==t?(s=!1,p=x):p=t,f.eq(10))return null==t&&(s=!0),w(v,p);if(p+=10,v.precision=p,r=(n=b(g)).charAt(0),a=C(f),!(Math.abs(a)<15e14))return u=w(v,p+2,x).times(a+""),f=A(new v(r+"."+n.slice(1)),p-10).plus(u),v.precision=x,null==t?(s=!0,T(f,x)):f;for(;r<7&&1!=r||1==r&&n.charAt(1)>3;)r=(n=b((f=f.times(e)).d)).charAt(0),m++;for(a=C(f),r>1?(f=new v("0."+n),a++):f=new v(r+"."+n.slice(1)),d=c=f=j(f.minus(i),f.plus(i),p),h=T(f.times(f),p),o=3;;){if(c=T(c.times(h),p),b((u=d.plus(j(c,new v(o),p))).d).slice(0,p)===b(d.d).slice(0,p))return d=d.times(2),0!==a&&(d=d.plus(w(v,p+2,x).times(a+""))),d=j(d,new v(m),p),v.precision=x,null==t?(s=!0,T(d,x)):d;d=u,o+=2}}function k(e,t){var n,r,i;for((n=t.indexOf("."))>-1&&(t=t.replace(".","")),(r=t.search(/e/i))>0?(n<0&&(n=r),n+=+t.slice(r+1),t=t.substring(0,r)):n<0&&(n=t.length),r=0;48===t.charCodeAt(r);)++r;for(i=t.length;48===t.charCodeAt(i-1);)--i;if(t=t.slice(r,i)){if(i-=r,n=n-r-1,e.e=u(n/7),e.d=[],r=(n+1)%7,n<0&&(r+=7),r<i){for(r&&e.d.push(+t.slice(0,r)),i-=7;r<i;)e.d.push(+t.slice(r,r+=7));r=7-(t=t.slice(r)).length}else r-=i;for(;r--;)t+="0";if(e.d.push(+t),s&&(e.e>g||e.e<-g))throw Error(d+n)}else e.s=0,e.e=0,e.d=[0];return e}function T(e,t,n){var r,i,o,a,l,c,h,f,v=e.d;for(a=1,o=v[0];o>=10;o/=10)a++;if((r=t-a)<0)r+=7,i=t,h=v[f=0];else{if((f=Math.ceil((r+1)/7))>=(o=v.length))return e;for(h=o=v[f],a=1;o>=10;o/=10)a++;i=(r%=7)-7+a}if(void 0!==n&&(l=h/(o=p(10,a-i-1))%10|0,c=t<0||void 0!==v[f+1]||h%o,c=n<4?(l||c)&&(0==n||n==(e.s<0?3:2)):l>5||5==l&&(4==n||c||6==n&&(r>0?i>0?h/p(10,a-i):0:v[f-1])%10&1||n==(e.s<0?8:7))),t<1||!v[0])return c?(o=C(e),v.length=1,t=t-o-1,v[0]=p(10,(7-t%7)%7),e.e=u(-t/7)||0):(v.length=1,v[0]=e.e=e.s=0),e;if(0==r?(v.length=f,o=1,f--):(v.length=f+1,o=p(10,7-r),v[f]=i>0?(h/p(10,a-i)%p(10,i)|0)*o:0),c)for(;;){if(0==f){(v[0]+=o)==m&&(v[0]=1,++e.e);break}if(v[f]+=o,v[f]!=m)break;v[f--]=0,o=1}for(r=v.length;0===v[--r];)v.pop();if(s&&(e.e>g||e.e<-g))throw Error(d+C(e));return e}function E(e,t){var n,r,i,o,a,l,c,d,u,p,h=e.constructor,f=h.precision;if(!e.s||!t.s)return t.s?t.s=-t.s:t=new h(e),s?T(t,f):t;if(c=e.d,p=t.d,r=t.e,d=e.e,c=c.slice(),a=d-r){for((u=a<0)?(n=c,a=-a,l=p.length):(n=p,r=d,l=c.length),a>(i=Math.max(Math.ceil(f/7),l)+2)&&(a=i,n.length=1),n.reverse(),i=a;i--;)n.push(0);n.reverse()}else{for((u=(i=c.length)<(l=p.length))&&(l=i),i=0;i<l;i++)if(c[i]!=p[i]){u=c[i]<p[i];break}a=0}for(u&&(n=c,c=p,p=n,t.s=-t.s),l=c.length,i=p.length-l;i>0;--i)c[l++]=0;for(i=p.length;i>a;){if(c[--i]<p[i]){for(o=i;o&&0===c[--o];)c[o]=m-1;--c[o],c[i]+=m}c[i]-=p[i]}for(;0===c[--l];)c.pop();for(;0===c[0];c.shift())--r;return c[0]?(t.d=c,t.e=r,s?T(t,f):t):new h(0)}function M(e,t,n){var r,i=C(e),o=b(e.d),a=o.length;return t?(n&&(r=n-a)>0?o=o.charAt(0)+"."+o.slice(1)+S(r):a>1&&(o=o.charAt(0)+"."+o.slice(1)),o=o+(i<0?"e":"e+")+i):i<0?(o="0."+S(-i-1)+o,n&&(r=n-a)>0&&(o+=S(r))):i>=a?(o+=S(i+1-a),n&&(r=n-i-1)>0&&(o=o+"."+S(r))):((r=i+1)<a&&(o=o.slice(0,r)+"."+o.slice(r)),n&&(r=n-a)>0&&(i+1===a&&(o+="."),o+=S(r))),e.s<0?"-"+o:o}function O(e,t){if(e.length>t)return e.length=t,!0}function R(e){if(!e||"object"!==typeof e)throw Error(l+"Object expected");var t,n,r,i=["precision",1,o,"rounding",0,8,"toExpNeg",-1/0,0,"toExpPos",0,1/0];for(t=0;t<i.length;t+=3)if(void 0!==(r=e[n=i[t]])){if(!(u(r)===r&&r>=i[t+1]&&r<=i[t+2]))throw Error(c+n+": "+r);this[n]=r}if(void 0!==(r=e[n="LN10"])){if(r!=Math.LN10)throw Error(c+n+": "+r);this[n]=new this(r)}return this}a=function e(t){var n,r,i;function o(e){var t=this;if(!(t instanceof o))return new o(e);if(t.constructor=o,e instanceof o)return t.s=e.s,t.e=e.e,void(t.d=(e=e.d)?e.slice():e);if("number"===typeof e){if(0*e!==0)throw Error(c+e);if(e>0)t.s=1;else{if(!(e<0))return t.s=0,t.e=0,void(t.d=[0]);e=-e,t.s=-1}return e===~~e&&e<1e7?(t.e=0,void(t.d=[e])):k(t,e.toString())}if("string"!==typeof e)throw Error(c+e);if(45===e.charCodeAt(0)?(e=e.slice(1),t.s=-1):t.s=1,!h.test(e))throw Error(c+e);k(t,e)}if(o.prototype=v,o.ROUND_UP=0,o.ROUND_DOWN=1,o.ROUND_CEIL=2,o.ROUND_FLOOR=3,o.ROUND_HALF_UP=4,o.ROUND_HALF_DOWN=5,o.ROUND_HALF_EVEN=6,o.ROUND_HALF_CEIL=7,o.ROUND_HALF_FLOOR=8,o.clone=e,o.config=o.set=R,void 0===t&&(t={}),t)for(i=["precision","rounding","toExpNeg","toExpPos","LN10"],n=0;n<i.length;)t.hasOwnProperty(r=i[n++])||(t[r]=this[r]);return o.config(t),o}(a),a.default=a.Decimal=a,i=new a(1),void 0===(r=function(){return a}.call(t,n,t,e))||(e.exports=r)}()},98348:(e,t,n)=>{"use strict";var r=n(24994);t.A=void 0;var i=r(n(40039)),o=n(70579);t.A=(0,i.default)((0,o.jsx)("path",{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2m1 15h-2v-6h2zm0-8h-2V7h2z"}),"Info")},98443:(e,t,n)=>{"use strict";e.exports=n(79717)},98587:(e,t,n)=>{"use strict";function r(e,t){if(null==e)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(-1!==t.indexOf(r))continue;n[r]=e[r]}return n}n.d(t,{A:()=>r})},98610:(e,t,n)=>{"use strict";function r(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:void 0;const r={};return Object.keys(e).forEach(i=>{r[i]=e[i].reduce((e,r)=>{if(r){const i=t(r);""!==i&&e.push(i),n&&n[r]&&e.push(n[r])}return e},[]).join(" ")}),r}n.d(t,{A:()=>r})},98724:(e,t,n)=>{var r=n(27615),i=n(25051),o=n(72154),a=n(48734),s=n(22662);function l(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}l.prototype.clear=r,l.prototype.delete=i,l.prototype.get=o,l.prototype.has=a,l.prototype.set=s,e.exports=l},98738:(e,t,n)=>{"use strict";var r=n(86267);e.exports=function(e){return r.isObject(e)&&!0===e.isAxiosError}},98990:(e,t,n)=>{var r=n(69995)(n(32520));e.exports=r},99057:(e,t,n)=>{var r=n(35324),i=n(22777),o=n(54052),a=n(69194),s=n(56173),l=n(70914);e.exports=function(e,t,n){for(var c=-1,d=(t=r(t,e)).length,u=!1;++c<d;){var p=l(t[c]);if(!(u=null!=e&&n(e,p)))break;e=e[p]}return u||++c!=d?u:!!(d=null==e?0:e.length)&&s(d)&&a(p,d)&&(o(e)||i(e))}},99140:(e,t,n)=>{var r=n(37303);e.exports=function(e){var t=r(e),n=t%1;return t===t?n?t-n:t:0}},99303:(e,t,n)=>{"use strict";n.d(t,{E:()=>a,A:()=>s});var r=n(65043);const i={};const o=[];class a{constructor(){this.currentId=null,this.clear=()=>{null!==this.currentId&&(clearTimeout(this.currentId),this.currentId=null)},this.disposeEffect=()=>this.clear}static create(){return new a}start(e,t){this.clear(),this.currentId=setTimeout(()=>{this.currentId=null,t()},e)}}function s(){const e=function(e,t){const n=r.useRef(i);return n.current===i&&(n.current=e(t)),n}(a.create).current;var t;return t=e.disposeEffect,r.useEffect(t,o),e}},99421:e=>{e.exports=function(e,t,n,r){var i=-1,o=null==e?0:e.length;for(r&&o&&(n=e[++i]);++i<o;)n=t(n,e[i],i,e);return n}},99466:(e,t,n)=>{"use strict";var r=n(24994);t.A=void 0;var i=r(n(40039)),o=n(70579);t.A=(0,i.default)((0,o.jsx)("path",{d:"M9.5 6.5v3h-3v-3zM11 5H5v6h6zm-1.5 9.5v3h-3v-3zM11 13H5v6h6zm6.5-6.5v3h-3v-3zM19 5h-6v6h6zm-6 8h1.5v1.5H13zm1.5 1.5H16V16h-1.5zM16 13h1.5v1.5H16zm-3 3h1.5v1.5H13zm1.5 1.5H16V19h-1.5zM16 16h1.5v1.5H16zm1.5-1.5H19V16h-1.5zm0 3H19V19h-1.5zM22 7h-2V4h-3V2h5zm0 15v-5h-2v3h-3v2zM2 22h5v-2H4v-3H2zM2 2v5h2V4h3V2z"}),"QrCodeScanner")},99604:(e,t,n)=>{"use strict";var r=n(24994);t.A=void 0;var i=r(n(40039)),o=n(70579);t.A=(0,i.default)((0,o.jsx)("path",{d:"M14.17 5 19 9.83V19H5V5zm0-2H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V9.83c0-.53-.21-1.04-.59-1.41l-4.83-4.83c-.37-.38-.88-.59-1.41-.59M7 15h10v2H7zm0-4h10v2H7zm0-4h7v2H7z"}),"TextSnippetOutlined")},99641:(e,t,n)=>{"use strict";var r=n(24994);t.A=void 0;var i=r(n(40039)),o=n(70579);t.A=(0,i.default)((0,o.jsx)("path",{d:"M14 2H6c-1.1 0-1.99.9-1.99 2L4 20c0 1.1.89 2 1.99 2H18c1.1 0 2-.9 2-2V8zM6 20V4h7v5h5v11z"}),"InsertDriveFileOutlined")}},t={};function n(r){var i=t[r];if(void 0!==i)return i.exports;var o=t[r]={id:r,loaded:!1,exports:{}};return e[r].call(o.exports,o,o.exports,n),o.loaded=!0,o.exports}n.m=e,n.amdD=function(){throw new Error("define cannot be used indirect")},n.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return n.d(t,{a:t}),t},(()=>{var e,t=Object.getPrototypeOf?e=>Object.getPrototypeOf(e):e=>e.__proto__;n.t=function(r,i){if(1&i&&(r=this(r)),8&i)return r;if("object"===typeof r&&r){if(4&i&&r.__esModule)return r;if(16&i&&"function"===typeof r.then)return r}var o=Object.create(null);n.r(o);var a={};e=e||[null,t({}),t([]),t(t)];for(var s=2&i&&r;("object"==typeof s||"function"==typeof s)&&!~e.indexOf(s);s=t(s))Object.getOwnPropertyNames(s).forEach(e=>a[e]=()=>r[e]);return a.default=()=>r,n.d(o,a),o}})(),n.d=(e,t)=>{for(var r in t)n.o(t,r)&&!n.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},n.f={},n.e=e=>Promise.all(Object.keys(n.f).reduce((t,r)=>(n.f[r](e,t),t),[])),n.u=e=>"static/js/"+e+".6dd53eaf.chunk.js",n.miniCssF=e=>{},n.g=function(){if("object"===typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"===typeof window)return window}}(),n.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),(()=>{var e={},t="rpm-frontend:";n.l=(r,i,o,a)=>{if(e[r])e[r].push(i);else{var s,l;if(void 0!==o)for(var c=document.getElementsByTagName("script"),d=0;d<c.length;d++){var u=c[d];if(u.getAttribute("src")==r||u.getAttribute("data-webpack")==t+o){s=u;break}}s||(l=!0,(s=document.createElement("script")).charset="utf-8",n.nc&&s.setAttribute("nonce",n.nc),s.setAttribute("data-webpack",t+o),s.src=r),e[r]=[i];var p=(t,n)=>{s.onerror=s.onload=null,clearTimeout(h);var i=e[r];if(delete e[r],s.parentNode&&s.parentNode.removeChild(s),i&&i.forEach(e=>e(n)),t)return t(n)},h=setTimeout(p.bind(null,void 0,{type:"timeout",target:s}),12e4);s.onerror=p.bind(null,s.onerror),s.onload=p.bind(null,s.onload),l&&document.head.appendChild(s)}}})(),n.r=e=>{"undefined"!==typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.nmd=e=>(e.paths=[],e.children||(e.children=[]),e),n.p="/",(()=>{var e={792:0};n.f.j=(t,r)=>{var i=n.o(e,t)?e[t]:void 0;if(0!==i)if(i)r.push(i[2]);else{var o=new Promise((n,r)=>i=e[t]=[n,r]);r.push(i[2]=o);var a=n.p+n.u(t),s=new Error;n.l(a,r=>{if(n.o(e,t)&&(0!==(i=e[t])&&(e[t]=void 0),i)){var o=r&&("load"===r.type?"missing":r.type),a=r&&r.target&&r.target.src;s.message="Loading chunk "+t+" failed.\n("+o+": "+a+")",s.name="ChunkLoadError",s.type=o,s.request=a,i[1](s)}},"chunk-"+t,t)}};var t=(t,r)=>{var i,o,a=r[0],s=r[1],l=r[2],c=0;if(a.some(t=>0!==e[t])){for(i in s)n.o(s,i)&&(n.m[i]=s[i]);if(l)l(n)}for(t&&t(r);c<a.length;c++)o=a[c],n.o(e,o)&&e[o]&&e[o][0](),e[o]=0},r=self.webpackChunkrpm_frontend=self.webpackChunkrpm_frontend||[];r.forEach(t.bind(null,0)),r.push=t.bind(null,r.push.bind(r))})(),(()=>{"use strict";var e={};n.r(e),n.d(e,{exclude:()=>ns,extract:()=>Ka,parse:()=>Xa,parseUrl:()=>Ja,pick:()=>ts,stringify:()=>Qa,stringifyUrl:()=>es});var t={};n.r(t),n.d(t,{scaleBand:()=>d3,scaleDiverging:()=>zee,scaleDivergingLog:()=>Hee,scaleDivergingPow:()=>Uee,scaleDivergingSqrt:()=>Vee,scaleDivergingSymlog:()=>Wee,scaleIdentity:()=>N9,scaleImplicit:()=>l3,scaleLinear:()=>D9,scaleLog:()=>U9,scaleOrdinal:()=>c3,scalePoint:()=>p3,scalePow:()=>J9,scaleQuantile:()=>u8,scaleQuantize:()=>p8,scaleRadial:()=>n8,scaleSequential:()=>Dee,scaleSequentialLog:()=>Nee,scaleSequentialPow:()=>Iee,scaleSequentialQuantile:()=>$ee,scaleSequentialSqrt:()=>Fee,scaleSequentialSymlog:()=>Lee,scaleSqrt:()=>e8,scaleSymlog:()=>Y9,scaleThreshold:()=>h8,scaleTime:()=>Mee,scaleUtc:()=>Oee,tickFormat:()=>R9});var r={};n.r(r),n.d(r,{amber:()=>Dde,blue:()=>Nde,blueGrey:()=>Lde,brown:()=>Ide,cyan:()=>Fde,deepOrange:()=>Pde,deepPurple:()=>$de,green:()=>Bde,grey:()=>zde,indigo:()=>Rde,lightBlue:()=>Hde,lightGreen:()=>Wde,lime:()=>Ude,orange:()=>Vde,pink:()=>Gde,purple:()=>qde,red:()=>Yde,teal:()=>Zde,yellow:()=>Kde});var i=n(89379),o=n(82284);function a(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}var s=n(20816);function l(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,(0,s.A)(r.key),r)}}function c(e,t,n){return t&&l(e.prototype,t),n&&l(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function d(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function u(e,t){return u=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},u(e,t)}function p(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&u(e,t)}function h(e,t){if(t&&("object"==(0,o.A)(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return d(e)}function m(e){return m=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},m(e)}var f=n(64467);function g(e){if(Array.isArray(e))return e}function v(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}function x(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function y(e,t){if(e){if("string"==typeof e)return x(e,t);var n={}.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)?x(e,t):void 0}}function b(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function j(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function _(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?j(Object(n),!0).forEach(function(t){(0,f.A)(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):j(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}var C={type:"logger",log:function(e){this.output("log",e)},warn:function(e){this.output("warn",e)},error:function(e){this.output("error",e)},output:function(e,t){console&&console[e]&&console[e].apply(console,t)}},w=function(){function e(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};a(this,e),this.init(t,n)}return c(e,[{key:"init",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.prefix=t.prefix||"i18next:",this.logger=e||C,this.options=t,this.debug=t.debug}},{key:"setDebug",value:function(e){this.debug=e}},{key:"log",value:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return this.forward(t,"log","",!0)}},{key:"warn",value:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return this.forward(t,"warn","",!0)}},{key:"error",value:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return this.forward(t,"error","")}},{key:"deprecate",value:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return this.forward(t,"warn","WARNING DEPRECATED: ",!0)}},{key:"forward",value:function(e,t,n,r){return r&&!this.debug?null:("string"===typeof e[0]&&(e[0]="".concat(n).concat(this.prefix," ").concat(e[0])),this.logger[t](e))}},{key:"create",value:function(t){return new e(this.logger,_(_({},{prefix:"".concat(this.prefix,":").concat(t,":")}),this.options))}},{key:"clone",value:function(t){return(t=t||this.options).prefix=t.prefix||this.prefix,new e(this.logger,t)}}]),e}(),S=new w,A=function(){function e(){a(this,e),this.observers={}}return c(e,[{key:"on",value:function(e,t){var n=this;return e.split(" ").forEach(function(e){n.observers[e]=n.observers[e]||[],n.observers[e].push(t)}),this}},{key:"off",value:function(e,t){this.observers[e]&&(t?this.observers[e]=this.observers[e].filter(function(e){return e!==t}):delete this.observers[e])}},{key:"emit",value:function(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];this.observers[e]&&[].concat(this.observers[e]).forEach(function(e){e.apply(void 0,n)});this.observers["*"]&&[].concat(this.observers["*"]).forEach(function(t){t.apply(t,[e].concat(n))})}}]),e}();function k(){var e,t,n=new Promise(function(n,r){e=n,t=r});return n.resolve=e,n.reject=t,n}function T(e){return null==e?"":""+e}function E(e,t,n){function r(e){return e&&e.indexOf("###")>-1?e.replace(/###/g,"."):e}function i(){return!e||"string"===typeof e}for(var o="string"!==typeof t?[].concat(t):t.split(".");o.length>1;){if(i())return{};var a=r(o.shift());!e[a]&&n&&(e[a]=new n),e=Object.prototype.hasOwnProperty.call(e,a)?e[a]:{}}return i()?{}:{obj:e,k:r(o.shift())}}function M(e,t,n){var r=E(e,t,Object);r.obj[r.k]=n}function O(e,t){var n=E(e,t),r=n.obj,i=n.k;if(r)return r[i]}function R(e,t,n){var r=O(e,n);return void 0!==r?r:O(t,n)}function P(e,t,n){for(var r in t)"__proto__"!==r&&"constructor"!==r&&(r in e?"string"===typeof e[r]||e[r]instanceof String||"string"===typeof t[r]||t[r]instanceof String?n&&(e[r]=t[r]):P(e[r],t[r],n):e[r]=t[r]);return e}function D(e){return e.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&")}var N={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;","/":"&#x2F;"};function L(e){return"string"===typeof e?e.replace(/[&<>"'\/]/g,function(e){return N[e]}):e}var I="undefined"!==typeof window&&window.navigator&&"undefined"===typeof window.navigator.userAgentData&&window.navigator.userAgent&&window.navigator.userAgent.indexOf("MSIE")>-1,F=[" ",",","?","!",";"];function $(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function B(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?$(Object(n),!0).forEach(function(t){(0,f.A)(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):$(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function z(e){var t=function(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(Ca){return!1}}();return function(){var n,r=m(e);if(t){var i=m(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return h(this,n)}}function H(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:".";if(e){if(e[t])return e[t];for(var r=t.split(n),i=e,o=0;o<r.length;++o){if(!i)return;if("string"===typeof i[r[o]]&&o+1<r.length)return;if(void 0===i[r[o]]){for(var a=2,s=r.slice(o,o+a).join(n),l=i[s];void 0===l&&r.length>o+a;)a++,l=i[s=r.slice(o,o+a).join(n)];if(void 0===l)return;if(null===l)return null;if(t.endsWith(s)){if("string"===typeof l)return l;if(s&&"string"===typeof l[s])return l[s]}var c=r.slice(o+a).join(n);return c?H(l,c,n):void 0}i=i[r[o]]}return i}}var W=function(e){p(n,e);var t=z(n);function n(e){var r,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{ns:["translation"],defaultNS:"translation"};return a(this,n),r=t.call(this),I&&A.call(d(r)),r.data=e||{},r.options=i,void 0===r.options.keySeparator&&(r.options.keySeparator="."),void 0===r.options.ignoreJSONStructure&&(r.options.ignoreJSONStructure=!0),r}return c(n,[{key:"addNamespaces",value:function(e){this.options.ns.indexOf(e)<0&&this.options.ns.push(e)}},{key:"removeNamespaces",value:function(e){var t=this.options.ns.indexOf(e);t>-1&&this.options.ns.splice(t,1)}},{key:"getResource",value:function(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},i=void 0!==r.keySeparator?r.keySeparator:this.options.keySeparator,o=void 0!==r.ignoreJSONStructure?r.ignoreJSONStructure:this.options.ignoreJSONStructure,a=[e,t];n&&"string"!==typeof n&&(a=a.concat(n)),n&&"string"===typeof n&&(a=a.concat(i?n.split(i):n)),e.indexOf(".")>-1&&(a=e.split("."));var s=O(this.data,a);return s||!o||"string"!==typeof n?s:H(this.data&&this.data[e]&&this.data[e][t],n,i)}},{key:"addResource",value:function(e,t,n,r){var i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:{silent:!1},o=this.options.keySeparator;void 0===o&&(o=".");var a=[e,t];n&&(a=a.concat(o?n.split(o):n)),e.indexOf(".")>-1&&(r=t,t=(a=e.split("."))[1]),this.addNamespaces(t),M(this.data,a,r),i.silent||this.emit("added",e,t,n,r)}},{key:"addResources",value:function(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{silent:!1};for(var i in n)"string"!==typeof n[i]&&"[object Array]"!==Object.prototype.toString.apply(n[i])||this.addResource(e,t,i,n[i],{silent:!0});r.silent||this.emit("added",e,t,n)}},{key:"addResourceBundle",value:function(e,t,n,r,i){var o=arguments.length>5&&void 0!==arguments[5]?arguments[5]:{silent:!1},a=[e,t];e.indexOf(".")>-1&&(r=n,n=t,t=(a=e.split("."))[1]),this.addNamespaces(t);var s=O(this.data,a)||{};r?P(s,n,i):s=B(B({},s),n),M(this.data,a,s),o.silent||this.emit("added",e,t,n)}},{key:"removeResourceBundle",value:function(e,t){this.hasResourceBundle(e,t)&&delete this.data[e][t],this.removeNamespaces(t),this.emit("removed",e,t)}},{key:"hasResourceBundle",value:function(e,t){return void 0!==this.getResource(e,t)}},{key:"getResourceBundle",value:function(e,t){return t||(t=this.options.defaultNS),"v1"===this.options.compatibilityAPI?B(B({},{}),this.getResource(e,t)):this.getResource(e,t)}},{key:"getDataByLanguage",value:function(e){return this.data[e]}},{key:"hasLanguageSomeTranslations",value:function(e){var t=this.getDataByLanguage(e);return!!(t&&Object.keys(t)||[]).find(function(e){return t[e]&&Object.keys(t[e]).length>0})}},{key:"toJSON",value:function(){return this.data}}]),n}(A),U={processors:{},addPostProcessor:function(e){this.processors[e.name]=e},handle:function(e,t,n,r,i){var o=this;return e.forEach(function(e){o.processors[e]&&(t=o.processors[e].process(t,n,r,i))}),t}};function V(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function G(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?V(Object(n),!0).forEach(function(t){(0,f.A)(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):V(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function q(e){var t=function(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(Ca){return!1}}();return function(){var n,r=m(e);if(t){var i=m(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return h(this,n)}}var Y={},Z=function(e){p(n,e);var t=q(n);function n(e){var r,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return a(this,n),r=t.call(this),I&&A.call(d(r)),function(e,t,n){e.forEach(function(e){t[e]&&(n[e]=t[e])})}(["resourceStore","languageUtils","pluralResolver","interpolator","backendConnector","i18nFormat","utils"],e,d(r)),r.options=i,void 0===r.options.keySeparator&&(r.options.keySeparator="."),r.logger=S.create("translator"),r}return c(n,[{key:"changeLanguage",value:function(e){e&&(this.language=e)}},{key:"exists",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{interpolation:{}};if(void 0===e||null===e)return!1;var n=this.resolve(e,t);return n&&void 0!==n.res}},{key:"extractFromKey",value:function(e,t){var n=void 0!==t.nsSeparator?t.nsSeparator:this.options.nsSeparator;void 0===n&&(n=":");var r=void 0!==t.keySeparator?t.keySeparator:this.options.keySeparator,i=t.ns||this.options.defaultNS||[],o=n&&e.indexOf(n)>-1,a=!this.options.userDefinedKeySeparator&&!t.keySeparator&&!this.options.userDefinedNsSeparator&&!t.nsSeparator&&!function(e,t,n){t=t||"",n=n||"";var r=F.filter(function(e){return t.indexOf(e)<0&&n.indexOf(e)<0});if(0===r.length)return!0;var i=new RegExp("(".concat(r.map(function(e){return"?"===e?"\\?":e}).join("|"),")")),o=!i.test(e);if(!o){var a=e.indexOf(n);a>0&&!i.test(e.substring(0,a))&&(o=!0)}return o}(e,n,r);if(o&&!a){var s=e.match(this.interpolator.nestingRegexp);if(s&&s.length>0)return{key:e,namespaces:i};var l=e.split(n);(n!==r||n===r&&this.options.ns.indexOf(l[0])>-1)&&(i=l.shift()),e=l.join(r)}return"string"===typeof i&&(i=[i]),{key:e,namespaces:i}}},{key:"translate",value:function(e,t,r){var i=this;if("object"!==(0,o.A)(t)&&this.options.overloadTranslationOptionHandler&&(t=this.options.overloadTranslationOptionHandler(arguments)),t||(t={}),void 0===e||null===e)return"";Array.isArray(e)||(e=[String(e)]);var a=void 0!==t.returnDetails?t.returnDetails:this.options.returnDetails,s=void 0!==t.keySeparator?t.keySeparator:this.options.keySeparator,l=this.extractFromKey(e[e.length-1],t),c=l.key,d=l.namespaces,u=d[d.length-1],p=t.lng||this.language,h=t.appendNamespaceToCIMode||this.options.appendNamespaceToCIMode;if(p&&"cimode"===p.toLowerCase()){if(h){var m=t.nsSeparator||this.options.nsSeparator;return a?(f.res="".concat(u).concat(m).concat(c),f):"".concat(u).concat(m).concat(c)}return a?(f.res=c,f):c}var f=this.resolve(e,t),g=f&&f.res,v=f&&f.usedKey||c,x=f&&f.exactUsedKey||c,y=Object.prototype.toString.apply(g),b=void 0!==t.joinArrays?t.joinArrays:this.options.joinArrays,j=!this.i18nFormat||this.i18nFormat.handleAsObject;if(j&&g&&("string"!==typeof g&&"boolean"!==typeof g&&"number"!==typeof g)&&["[object Number]","[object Function]","[object RegExp]"].indexOf(y)<0&&("string"!==typeof b||"[object Array]"!==y)){if(!t.returnObjects&&!this.options.returnObjects){this.options.returnedObjectHandler||this.logger.warn("accessing an object - but returnObjects options is not enabled!");var _=this.options.returnedObjectHandler?this.options.returnedObjectHandler(v,g,G(G({},t),{},{ns:d})):"key '".concat(c," (").concat(this.language,")' returned an object instead of string.");return a?(f.res=_,f):_}if(s){var C="[object Array]"===y,w=C?[]:{},S=C?x:v;for(var A in g)if(Object.prototype.hasOwnProperty.call(g,A)){var k="".concat(S).concat(s).concat(A);w[A]=this.translate(k,G(G({},t),{joinArrays:!1,ns:d})),w[A]===k&&(w[A]=g[A])}g=w}}else if(j&&"string"===typeof b&&"[object Array]"===y)(g=g.join(b))&&(g=this.extendTranslation(g,e,t,r));else{var T=!1,E=!1,M=void 0!==t.count&&"string"!==typeof t.count,O=n.hasDefaultValue(t),R=M?this.pluralResolver.getSuffix(p,t.count,t):"",P=t["defaultValue".concat(R)]||t.defaultValue;!this.isValidLookup(g)&&O&&(T=!0,g=P),this.isValidLookup(g)||(E=!0,g=c);var D=(t.missingKeyNoValueFallbackToKey||this.options.missingKeyNoValueFallbackToKey)&&E?void 0:g,N=O&&P!==g&&this.options.updateMissing;if(E||T||N){if(this.logger.log(N?"updateKey":"missingKey",p,u,c,N?P:g),s){var L=this.resolve(c,G(G({},t),{},{keySeparator:!1}));L&&L.res&&this.logger.warn("Seems the loaded translations were in flat JSON format instead of nested. Either set keySeparator: false on init or make sure your translations are published in nested format.")}var I=[],F=this.languageUtils.getFallbackCodes(this.options.fallbackLng,t.lng||this.language);if("fallback"===this.options.saveMissingTo&&F&&F[0])for(var $=0;$<F.length;$++)I.push(F[$]);else"all"===this.options.saveMissingTo?I=this.languageUtils.toResolveHierarchy(t.lng||this.language):I.push(t.lng||this.language);var B=function(e,n,r){var o=O&&r!==g?r:D;i.options.missingKeyHandler?i.options.missingKeyHandler(e,u,n,o,N,t):i.backendConnector&&i.backendConnector.saveMissing&&i.backendConnector.saveMissing(e,u,n,o,N,t),i.emit("missingKey",e,u,n,g)};this.options.saveMissing&&(this.options.saveMissingPlurals&&M?I.forEach(function(e){i.pluralResolver.getSuffixes(e,t).forEach(function(n){B([e],c+n,t["defaultValue".concat(n)]||P)})}):B(I,c,P))}g=this.extendTranslation(g,e,t,f,r),E&&g===c&&this.options.appendNamespaceToMissingKey&&(g="".concat(u,":").concat(c)),(E||T)&&this.options.parseMissingKeyHandler&&(g="v1"!==this.options.compatibilityAPI?this.options.parseMissingKeyHandler(this.options.appendNamespaceToMissingKey?"".concat(u,":").concat(c):c,T?g:void 0):this.options.parseMissingKeyHandler(g))}return a?(f.res=g,f):g}},{key:"extendTranslation",value:function(e,t,n,r,i){var o=this;if(this.i18nFormat&&this.i18nFormat.parse)e=this.i18nFormat.parse(e,G(G({},this.options.interpolation.defaultVariables),n),r.usedLng,r.usedNS,r.usedKey,{resolved:r});else if(!n.skipInterpolation){n.interpolation&&this.interpolator.init(G(G({},n),{interpolation:G(G({},this.options.interpolation),n.interpolation)}));var a,s="string"===typeof e&&(n&&n.interpolation&&void 0!==n.interpolation.skipOnVariables?n.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables);if(s){var l=e.match(this.interpolator.nestingRegexp);a=l&&l.length}var c=n.replace&&"string"!==typeof n.replace?n.replace:n;if(this.options.interpolation.defaultVariables&&(c=G(G({},this.options.interpolation.defaultVariables),c)),e=this.interpolator.interpolate(e,c,n.lng||this.language,n),s){var d=e.match(this.interpolator.nestingRegexp);a<(d&&d.length)&&(n.nest=!1)}!1!==n.nest&&(e=this.interpolator.nest(e,function(){for(var e=arguments.length,r=new Array(e),a=0;a<e;a++)r[a]=arguments[a];return i&&i[0]===r[0]&&!n.context?(o.logger.warn("It seems you are nesting recursively key: ".concat(r[0]," in key: ").concat(t[0])),null):o.translate.apply(o,r.concat([t]))},n)),n.interpolation&&this.interpolator.reset()}var u=n.postProcess||this.options.postProcess,p="string"===typeof u?[u]:u;return void 0!==e&&null!==e&&p&&p.length&&!1!==n.applyPostProcessor&&(e=U.handle(p,e,t,this.options&&this.options.postProcessPassResolved?G({i18nResolved:r},n):n,this)),e}},{key:"resolve",value:function(e){var t,n,r,i,o,a=this,s=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return"string"===typeof e&&(e=[e]),e.forEach(function(e){if(!a.isValidLookup(t)){var l=a.extractFromKey(e,s),c=l.key;n=c;var d=l.namespaces;a.options.fallbackNS&&(d=d.concat(a.options.fallbackNS));var u=void 0!==s.count&&"string"!==typeof s.count,p=u&&!s.ordinal&&0===s.count&&a.pluralResolver.shouldUseIntlApi(),h=void 0!==s.context&&("string"===typeof s.context||"number"===typeof s.context)&&""!==s.context,m=s.lngs?s.lngs:a.languageUtils.toResolveHierarchy(s.lng||a.language,s.fallbackLng);d.forEach(function(e){a.isValidLookup(t)||(o=e,!Y["".concat(m[0],"-").concat(e)]&&a.utils&&a.utils.hasLoadedNamespace&&!a.utils.hasLoadedNamespace(o)&&(Y["".concat(m[0],"-").concat(e)]=!0,a.logger.warn('key "'.concat(n,'" for languages "').concat(m.join(", "),'" won\'t get resolved as namespace "').concat(o,'" was not yet loaded'),"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!")),m.forEach(function(n){if(!a.isValidLookup(t)){i=n;var o,l=[c];if(a.i18nFormat&&a.i18nFormat.addLookupKeys)a.i18nFormat.addLookupKeys(l,c,n,e,s);else{var d;u&&(d=a.pluralResolver.getSuffix(n,s.count,s));var m="".concat(a.options.pluralSeparator,"zero");if(u&&(l.push(c+d),p&&l.push(c+m)),h){var f="".concat(c).concat(a.options.contextSeparator).concat(s.context);l.push(f),u&&(l.push(f+d),p&&l.push(f+m))}}for(;o=l.pop();)a.isValidLookup(t)||(r=o,t=a.getResource(n,e,o,s))}}))})}}),{res:t,usedKey:n,exactUsedKey:r,usedLng:i,usedNS:o}}},{key:"isValidLookup",value:function(e){return void 0!==e&&!(!this.options.returnNull&&null===e)&&!(!this.options.returnEmptyString&&""===e)}},{key:"getResource",value:function(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};return this.i18nFormat&&this.i18nFormat.getResource?this.i18nFormat.getResource(e,t,n,r):this.resourceStore.getResource(e,t,n,r)}}],[{key:"hasDefaultValue",value:function(e){var t="defaultValue";for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)&&t===n.substring(0,12)&&void 0!==e[n])return!0;return!1}}]),n}(A);function K(e){return e.charAt(0).toUpperCase()+e.slice(1)}var X=function(){function e(t){a(this,e),this.options=t,this.supportedLngs=this.options.supportedLngs||!1,this.logger=S.create("languageUtils")}return c(e,[{key:"getScriptPartFromCode",value:function(e){if(!e||e.indexOf("-")<0)return null;var t=e.split("-");return 2===t.length?null:(t.pop(),"x"===t[t.length-1].toLowerCase()?null:this.formatLanguageCode(t.join("-")))}},{key:"getLanguagePartFromCode",value:function(e){if(!e||e.indexOf("-")<0)return e;var t=e.split("-");return this.formatLanguageCode(t[0])}},{key:"formatLanguageCode",value:function(e){if("string"===typeof e&&e.indexOf("-")>-1){var t=["hans","hant","latn","cyrl","cans","mong","arab"],n=e.split("-");return this.options.lowerCaseLng?n=n.map(function(e){return e.toLowerCase()}):2===n.length?(n[0]=n[0].toLowerCase(),n[1]=n[1].toUpperCase(),t.indexOf(n[1].toLowerCase())>-1&&(n[1]=K(n[1].toLowerCase()))):3===n.length&&(n[0]=n[0].toLowerCase(),2===n[1].length&&(n[1]=n[1].toUpperCase()),"sgn"!==n[0]&&2===n[2].length&&(n[2]=n[2].toUpperCase()),t.indexOf(n[1].toLowerCase())>-1&&(n[1]=K(n[1].toLowerCase())),t.indexOf(n[2].toLowerCase())>-1&&(n[2]=K(n[2].toLowerCase()))),n.join("-")}return this.options.cleanCode||this.options.lowerCaseLng?e.toLowerCase():e}},{key:"isSupportedCode",value:function(e){return("languageOnly"===this.options.load||this.options.nonExplicitSupportedLngs)&&(e=this.getLanguagePartFromCode(e)),!this.supportedLngs||!this.supportedLngs.length||this.supportedLngs.indexOf(e)>-1}},{key:"getBestMatchFromCodes",value:function(e){var t,n=this;return e?(e.forEach(function(e){if(!t){var r=n.formatLanguageCode(e);n.options.supportedLngs&&!n.isSupportedCode(r)||(t=r)}}),!t&&this.options.supportedLngs&&e.forEach(function(e){if(!t){var r=n.getLanguagePartFromCode(e);if(n.isSupportedCode(r))return t=r;t=n.options.supportedLngs.find(function(e){if(0===e.indexOf(r))return e})}}),t||(t=this.getFallbackCodes(this.options.fallbackLng)[0]),t):null}},{key:"getFallbackCodes",value:function(e,t){if(!e)return[];if("function"===typeof e&&(e=e(t)),"string"===typeof e&&(e=[e]),"[object Array]"===Object.prototype.toString.apply(e))return e;if(!t)return e.default||[];var n=e[t];return n||(n=e[this.getScriptPartFromCode(t)]),n||(n=e[this.formatLanguageCode(t)]),n||(n=e[this.getLanguagePartFromCode(t)]),n||(n=e.default),n||[]}},{key:"toResolveHierarchy",value:function(e,t){var n=this,r=this.getFallbackCodes(t||this.options.fallbackLng||[],e),i=[],o=function(e){e&&(n.isSupportedCode(e)?i.push(e):n.logger.warn("rejecting language code not found in supportedLngs: ".concat(e)))};return"string"===typeof e&&e.indexOf("-")>-1?("languageOnly"!==this.options.load&&o(this.formatLanguageCode(e)),"languageOnly"!==this.options.load&&"currentOnly"!==this.options.load&&o(this.getScriptPartFromCode(e)),"currentOnly"!==this.options.load&&o(this.getLanguagePartFromCode(e))):"string"===typeof e&&o(this.formatLanguageCode(e)),r.forEach(function(e){i.indexOf(e)<0&&o(n.formatLanguageCode(e))}),i}}]),e}(),Q=[{lngs:["ach","ak","am","arn","br","fil","gun","ln","mfe","mg","mi","oc","pt","pt-BR","tg","tl","ti","tr","uz","wa"],nr:[1,2],fc:1},{lngs:["af","an","ast","az","bg","bn","ca","da","de","dev","el","en","eo","es","et","eu","fi","fo","fur","fy","gl","gu","ha","hi","hu","hy","ia","it","kk","kn","ku","lb","mai","ml","mn","mr","nah","nap","nb","ne","nl","nn","no","nso","pa","pap","pms","ps","pt-PT","rm","sco","se","si","so","son","sq","sv","sw","ta","te","tk","ur","yo"],nr:[1,2],fc:2},{lngs:["ay","bo","cgg","fa","ht","id","ja","jbo","ka","km","ko","ky","lo","ms","sah","su","th","tt","ug","vi","wo","zh"],nr:[1],fc:3},{lngs:["be","bs","cnr","dz","hr","ru","sr","uk"],nr:[1,2,5],fc:4},{lngs:["ar"],nr:[0,1,2,3,11,100],fc:5},{lngs:["cs","sk"],nr:[1,2,5],fc:6},{lngs:["csb","pl"],nr:[1,2,5],fc:7},{lngs:["cy"],nr:[1,2,3,8],fc:8},{lngs:["fr"],nr:[1,2],fc:9},{lngs:["ga"],nr:[1,2,3,7,11],fc:10},{lngs:["gd"],nr:[1,2,3,20],fc:11},{lngs:["is"],nr:[1,2],fc:12},{lngs:["jv"],nr:[0,1],fc:13},{lngs:["kw"],nr:[1,2,3,4],fc:14},{lngs:["lt"],nr:[1,2,10],fc:15},{lngs:["lv"],nr:[1,2,0],fc:16},{lngs:["mk"],nr:[1,2],fc:17},{lngs:["mnk"],nr:[0,1,2],fc:18},{lngs:["mt"],nr:[1,2,11,20],fc:19},{lngs:["or"],nr:[2,1],fc:2},{lngs:["ro"],nr:[1,2,20],fc:20},{lngs:["sl"],nr:[5,1,2,3],fc:21},{lngs:["he","iw"],nr:[1,2,20,21],fc:22}],J={1:function(e){return Number(e>1)},2:function(e){return Number(1!=e)},3:function(e){return 0},4:function(e){return Number(e%10==1&&e%100!=11?0:e%10>=2&&e%10<=4&&(e%100<10||e%100>=20)?1:2)},5:function(e){return Number(0==e?0:1==e?1:2==e?2:e%100>=3&&e%100<=10?3:e%100>=11?4:5)},6:function(e){return Number(1==e?0:e>=2&&e<=4?1:2)},7:function(e){return Number(1==e?0:e%10>=2&&e%10<=4&&(e%100<10||e%100>=20)?1:2)},8:function(e){return Number(1==e?0:2==e?1:8!=e&&11!=e?2:3)},9:function(e){return Number(e>=2)},10:function(e){return Number(1==e?0:2==e?1:e<7?2:e<11?3:4)},11:function(e){return Number(1==e||11==e?0:2==e||12==e?1:e>2&&e<20?2:3)},12:function(e){return Number(e%10!=1||e%100==11)},13:function(e){return Number(0!==e)},14:function(e){return Number(1==e?0:2==e?1:3==e?2:3)},15:function(e){return Number(e%10==1&&e%100!=11?0:e%10>=2&&(e%100<10||e%100>=20)?1:2)},16:function(e){return Number(e%10==1&&e%100!=11?0:0!==e?1:2)},17:function(e){return Number(1==e||e%10==1&&e%100!=11?0:1)},18:function(e){return Number(0==e?0:1==e?1:2)},19:function(e){return Number(1==e?0:0==e||e%100>1&&e%100<11?1:e%100>10&&e%100<20?2:3)},20:function(e){return Number(1==e?0:0==e||e%100>0&&e%100<20?1:2)},21:function(e){return Number(e%100==1?1:e%100==2?2:e%100==3||e%100==4?3:0)},22:function(e){return Number(1==e?0:2==e?1:(e<0||e>10)&&e%10==0?2:3)}},ee=["v1","v2","v3"],te={zero:0,one:1,two:2,few:3,many:4,other:5};var ne=function(){function e(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};a(this,e),this.languageUtils=t,this.options=n,this.logger=S.create("pluralResolver"),this.options.compatibilityJSON&&"v4"!==this.options.compatibilityJSON||"undefined"!==typeof Intl&&Intl.PluralRules||(this.options.compatibilityJSON="v3",this.logger.error("Your environment seems not to be Intl API compatible, use an Intl.PluralRules polyfill. Will fallback to the compatibilityJSON v3 format handling.")),this.rules=function(){var e={};return Q.forEach(function(t){t.lngs.forEach(function(n){e[n]={numbers:t.nr,plurals:J[t.fc]}})}),e}()}return c(e,[{key:"addRule",value:function(e,t){this.rules[e]=t}},{key:"getRule",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(this.shouldUseIntlApi())try{return new Intl.PluralRules(e,{type:t.ordinal?"ordinal":"cardinal"})}catch(n){return}return this.rules[e]||this.rules[this.languageUtils.getLanguagePartFromCode(e)]}},{key:"needsPlural",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=this.getRule(e,t);return this.shouldUseIntlApi()?n&&n.resolvedOptions().pluralCategories.length>1:n&&n.numbers.length>1}},{key:"getPluralFormsOfKey",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return this.getSuffixes(e,n).map(function(e){return"".concat(t).concat(e)})}},{key:"getSuffixes",value:function(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=this.getRule(e,n);return r?this.shouldUseIntlApi()?r.resolvedOptions().pluralCategories.sort(function(e,t){return te[e]-te[t]}).map(function(e){return"".concat(t.options.prepend).concat(e)}):r.numbers.map(function(r){return t.getSuffix(e,r,n)}):[]}},{key:"getSuffix",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=this.getRule(e,n);return r?this.shouldUseIntlApi()?"".concat(this.options.prepend).concat(r.select(t)):this.getSuffixRetroCompatible(r,t):(this.logger.warn("no plural rule found for: ".concat(e)),"")}},{key:"getSuffixRetroCompatible",value:function(e,t){var n=this,r=e.noAbs?e.plurals(t):e.plurals(Math.abs(t)),i=e.numbers[r];this.options.simplifyPluralSuffix&&2===e.numbers.length&&1===e.numbers[0]&&(2===i?i="plural":1===i&&(i=""));var o=function(){return n.options.prepend&&i.toString()?n.options.prepend+i.toString():i.toString()};return"v1"===this.options.compatibilityJSON?1===i?"":"number"===typeof i?"_plural_".concat(i.toString()):o():"v2"===this.options.compatibilityJSON||this.options.simplifyPluralSuffix&&2===e.numbers.length&&1===e.numbers[0]?o():this.options.prepend&&r.toString()?this.options.prepend+r.toString():r.toString()}},{key:"shouldUseIntlApi",value:function(){return!ee.includes(this.options.compatibilityJSON)}}]),e}();function re(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function ie(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?re(Object(n),!0).forEach(function(t){(0,f.A)(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):re(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}var oe=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};a(this,e),this.logger=S.create("interpolator"),this.options=t,this.format=t.interpolation&&t.interpolation.format||function(e){return e},this.init(t)}return c(e,[{key:"init",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};e.interpolation||(e.interpolation={escapeValue:!0});var t=e.interpolation;this.escape=void 0!==t.escape?t.escape:L,this.escapeValue=void 0===t.escapeValue||t.escapeValue,this.useRawValueToEscape=void 0!==t.useRawValueToEscape&&t.useRawValueToEscape,this.prefix=t.prefix?D(t.prefix):t.prefixEscaped||"{{",this.suffix=t.suffix?D(t.suffix):t.suffixEscaped||"}}",this.formatSeparator=t.formatSeparator?t.formatSeparator:t.formatSeparator||",",this.unescapePrefix=t.unescapeSuffix?"":t.unescapePrefix||"-",this.unescapeSuffix=this.unescapePrefix?"":t.unescapeSuffix||"",this.nestingPrefix=t.nestingPrefix?D(t.nestingPrefix):t.nestingPrefixEscaped||D("$t("),this.nestingSuffix=t.nestingSuffix?D(t.nestingSuffix):t.nestingSuffixEscaped||D(")"),this.nestingOptionsSeparator=t.nestingOptionsSeparator?t.nestingOptionsSeparator:t.nestingOptionsSeparator||",",this.maxReplaces=t.maxReplaces?t.maxReplaces:1e3,this.alwaysFormat=void 0!==t.alwaysFormat&&t.alwaysFormat,this.resetRegExp()}},{key:"reset",value:function(){this.options&&this.init(this.options)}},{key:"resetRegExp",value:function(){var e="".concat(this.prefix,"(.+?)").concat(this.suffix);this.regexp=new RegExp(e,"g");var t="".concat(this.prefix).concat(this.unescapePrefix,"(.+?)").concat(this.unescapeSuffix).concat(this.suffix);this.regexpUnescape=new RegExp(t,"g");var n="".concat(this.nestingPrefix,"(.+?)").concat(this.nestingSuffix);this.nestingRegexp=new RegExp(n,"g")}},{key:"interpolate",value:function(e,t,n,r){var i,o,a,s=this,l=this.options&&this.options.interpolation&&this.options.interpolation.defaultVariables||{};function c(e){return e.replace(/\$/g,"$$$$")}var d=function(e){if(e.indexOf(s.formatSeparator)<0){var i=R(t,l,e);return s.alwaysFormat?s.format(i,void 0,n,ie(ie(ie({},r),t),{},{interpolationkey:e})):i}var o=e.split(s.formatSeparator),a=o.shift().trim(),c=o.join(s.formatSeparator).trim();return s.format(R(t,l,a),c,n,ie(ie(ie({},r),t),{},{interpolationkey:a}))};this.resetRegExp();var u=r&&r.missingInterpolationHandler||this.options.missingInterpolationHandler,p=r&&r.interpolation&&void 0!==r.interpolation.skipOnVariables?r.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables;return[{regex:this.regexpUnescape,safeValue:function(e){return c(e)}},{regex:this.regexp,safeValue:function(e){return s.escapeValue?c(s.escape(e)):c(e)}}].forEach(function(t){for(a=0;i=t.regex.exec(e);){var n=i[1].trim();if(void 0===(o=d(n)))if("function"===typeof u){var l=u(e,i,r);o="string"===typeof l?l:""}else if(r&&r.hasOwnProperty(n))o="";else{if(p){o=i[0];continue}s.logger.warn("missed to pass in variable ".concat(n," for interpolating ").concat(e)),o=""}else"string"===typeof o||s.useRawValueToEscape||(o=T(o));var c=t.safeValue(o);if(e=e.replace(i[0],c),p?(t.regex.lastIndex+=o.length,t.regex.lastIndex-=i[0].length):t.regex.lastIndex=0,++a>=s.maxReplaces)break}}),e}},{key:"nest",value:function(e,t){var n,r,i=this,o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},a=ie({},o);function s(e,t){var n=this.nestingOptionsSeparator;if(e.indexOf(n)<0)return e;var r=e.split(new RegExp("".concat(n,"[ ]*{"))),i="{".concat(r[1]);e=r[0];var o=(i=this.interpolate(i,a)).match(/'/g),s=i.match(/"/g);(o&&o.length%2===0&&!s||s.length%2!==0)&&(i=i.replace(/'/g,'"'));try{a=JSON.parse(i),t&&(a=ie(ie({},t),a))}catch(Ca){return this.logger.warn("failed parsing options string in nesting for key ".concat(e),Ca),"".concat(e).concat(n).concat(i)}return delete a.defaultValue,e}for(a.applyPostProcessor=!1,delete a.defaultValue;n=this.nestingRegexp.exec(e);){var l=[],c=!1;if(-1!==n[0].indexOf(this.formatSeparator)&&!/{.*}/.test(n[1])){var d=n[1].split(this.formatSeparator).map(function(e){return e.trim()});n[1]=d.shift(),l=d,c=!0}if((r=t(s.call(this,n[1].trim(),a),a))&&n[0]===e&&"string"!==typeof r)return r;"string"!==typeof r&&(r=T(r)),r||(this.logger.warn("missed to resolve ".concat(n[1]," for nesting ").concat(e)),r=""),c&&(r=l.reduce(function(e,t){return i.format(e,t,o.lng,ie(ie({},o),{},{interpolationkey:n[1].trim()}))},r.trim())),e=e.replace(n[0],r),this.regexp.lastIndex=0}return e}}]),e}();function ae(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function se(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?ae(Object(n),!0).forEach(function(t){(0,f.A)(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):ae(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function le(e){var t=e.toLowerCase().trim(),n={};if(e.indexOf("(")>-1){var r=e.split("(");t=r[0].toLowerCase().trim();var i=r[1].substring(0,r[1].length-1);if("currency"===t&&i.indexOf(":")<0)n.currency||(n.currency=i.trim());else if("relativetime"===t&&i.indexOf(":")<0)n.range||(n.range=i.trim());else{i.split(";").forEach(function(e){if(e){var t=function(e){return g(e)||v(e)||y(e)||b()}(e.split(":")),r=t[0],i=t.slice(1).join(":").trim().replace(/^'+|'+$/g,"");n[r.trim()]||(n[r.trim()]=i),"false"===i&&(n[r.trim()]=!1),"true"===i&&(n[r.trim()]=!0),isNaN(i)||(n[r.trim()]=parseInt(i,10))}})}}return{formatName:t,formatOptions:n}}function ce(e){var t={};return function(n,r,i){var o=r+JSON.stringify(i),a=t[o];return a||(a=e(r,i),t[o]=a),a(n)}}var de=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};a(this,e),this.logger=S.create("formatter"),this.options=t,this.formats={number:ce(function(e,t){var n=new Intl.NumberFormat(e,t);return function(e){return n.format(e)}}),currency:ce(function(e,t){var n=new Intl.NumberFormat(e,se(se({},t),{},{style:"currency"}));return function(e){return n.format(e)}}),datetime:ce(function(e,t){var n=new Intl.DateTimeFormat(e,se({},t));return function(e){return n.format(e)}}),relativetime:ce(function(e,t){var n=new Intl.RelativeTimeFormat(e,se({},t));return function(e){return n.format(e,t.range||"day")}}),list:ce(function(e,t){var n=new Intl.ListFormat(e,se({},t));return function(e){return n.format(e)}})},this.init(t)}return c(e,[{key:"init",value:function(e){var t=(arguments.length>1&&void 0!==arguments[1]?arguments[1]:{interpolation:{}}).interpolation;this.formatSeparator=t.formatSeparator?t.formatSeparator:t.formatSeparator||","}},{key:"add",value:function(e,t){this.formats[e.toLowerCase().trim()]=t}},{key:"addCached",value:function(e,t){this.formats[e.toLowerCase().trim()]=ce(t)}},{key:"format",value:function(e,t,n,r){var i=this,o=t.split(this.formatSeparator).reduce(function(e,t){var o=le(t),a=o.formatName,s=o.formatOptions;if(i.formats[a]){var l=e;try{var c=r&&r.formatParams&&r.formatParams[r.interpolationkey]||{},d=c.locale||c.lng||r.locale||r.lng||n;l=i.formats[a](e,d,se(se(se({},s),r),c))}catch(u){i.logger.warn(u)}return l}return i.logger.warn("there was no format function for ".concat(a)),e},e);return o}}]),e}();function ue(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function pe(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?ue(Object(n),!0).forEach(function(t){(0,f.A)(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):ue(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function he(e){var t=function(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(Ca){return!1}}();return function(){var n,r=m(e);if(t){var i=m(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return h(this,n)}}var me=function(e){p(n,e);var t=he(n);function n(e,r,i){var o,s=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};return a(this,n),o=t.call(this),I&&A.call(d(o)),o.backend=e,o.store=r,o.services=i,o.languageUtils=i.languageUtils,o.options=s,o.logger=S.create("backendConnector"),o.waitingReads=[],o.maxParallelReads=s.maxParallelReads||10,o.readingCalls=0,o.maxRetries=s.maxRetries>=0?s.maxRetries:5,o.retryTimeout=s.retryTimeout>=1?s.retryTimeout:350,o.state={},o.queue=[],o.backend&&o.backend.init&&o.backend.init(i,s.backend,s),o}return c(n,[{key:"queueLoad",value:function(e,t,n,r){var i=this,o={},a={},s={},l={};return e.forEach(function(e){var r=!0;t.forEach(function(t){var s="".concat(e,"|").concat(t);!n.reload&&i.store.hasResourceBundle(e,t)?i.state[s]=2:i.state[s]<0||(1===i.state[s]?void 0===a[s]&&(a[s]=!0):(i.state[s]=1,r=!1,void 0===a[s]&&(a[s]=!0),void 0===o[s]&&(o[s]=!0),void 0===l[t]&&(l[t]=!0)))}),r||(s[e]=!0)}),(Object.keys(o).length||Object.keys(a).length)&&this.queue.push({pending:a,pendingCount:Object.keys(a).length,loaded:{},errors:[],callback:r}),{toLoad:Object.keys(o),pending:Object.keys(a),toLoadLanguages:Object.keys(s),toLoadNamespaces:Object.keys(l)}}},{key:"loaded",value:function(e,t,n){var r=e.split("|"),i=r[0],o=r[1];t&&this.emit("failedLoading",i,o,t),n&&this.store.addResourceBundle(i,o,n),this.state[e]=t?-1:2;var a={};this.queue.forEach(function(n){!function(e,t,n,r){var i=E(e,t,Object),o=i.obj,a=i.k;o[a]=o[a]||[],r&&(o[a]=o[a].concat(n)),r||o[a].push(n)}(n.loaded,[i],o),function(e,t){void 0!==e.pending[t]&&(delete e.pending[t],e.pendingCount--)}(n,e),t&&n.errors.push(t),0!==n.pendingCount||n.done||(Object.keys(n.loaded).forEach(function(e){a[e]||(a[e]={});var t=n.loaded[e];t.length&&t.forEach(function(t){void 0===a[e][t]&&(a[e][t]=!0)})}),n.done=!0,n.errors.length?n.callback(n.errors):n.callback())}),this.emit("loaded",a),this.queue=this.queue.filter(function(e){return!e.done})}},{key:"read",value:function(e,t,n){var r=this,i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0,o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:this.retryTimeout,a=arguments.length>5?arguments[5]:void 0;return e.length?this.readingCalls>=this.maxParallelReads?void this.waitingReads.push({lng:e,ns:t,fcName:n,tried:i,wait:o,callback:a}):(this.readingCalls++,this.backend[n](e,t,function(s,l){if(r.readingCalls--,r.waitingReads.length>0){var c=r.waitingReads.shift();r.read(c.lng,c.ns,c.fcName,c.tried,c.wait,c.callback)}s&&l&&i<r.maxRetries?setTimeout(function(){r.read.call(r,e,t,n,i+1,2*o,a)},o):a(s,l)})):a(null,{})}},{key:"prepareLoading",value:function(e,t){var n=this,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},i=arguments.length>3?arguments[3]:void 0;if(!this.backend)return this.logger.warn("No backend was added via i18next.use. Will not load resources."),i&&i();"string"===typeof e&&(e=this.languageUtils.toResolveHierarchy(e)),"string"===typeof t&&(t=[t]);var o=this.queueLoad(e,t,r,i);if(!o.toLoad.length)return o.pending.length||i(),null;o.toLoad.forEach(function(e){n.loadOne(e)})}},{key:"load",value:function(e,t,n){this.prepareLoading(e,t,{},n)}},{key:"reload",value:function(e,t,n){this.prepareLoading(e,t,{reload:!0},n)}},{key:"loadOne",value:function(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",r=e.split("|"),i=r[0],o=r[1];this.read(i,o,"read",void 0,void 0,function(r,a){r&&t.logger.warn("".concat(n,"loading namespace ").concat(o," for language ").concat(i," failed"),r),!r&&a&&t.logger.log("".concat(n,"loaded namespace ").concat(o," for language ").concat(i),a),t.loaded(e,r,a)})}},{key:"saveMissing",value:function(e,t,n,r,i){var o=arguments.length>5&&void 0!==arguments[5]?arguments[5]:{};this.services.utils&&this.services.utils.hasLoadedNamespace&&!this.services.utils.hasLoadedNamespace(t)?this.logger.warn('did not save key "'.concat(n,'" as the namespace "').concat(t,'" was not yet loaded'),"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!"):void 0!==n&&null!==n&&""!==n&&(this.backend&&this.backend.create&&this.backend.create(e,t,n,r,null,pe(pe({},o),{},{isUpdate:i})),e&&e[0]&&this.store.addResource(e[0],t,n,r))}}]),n}(A);function fe(e){return"string"===typeof e.ns&&(e.ns=[e.ns]),"string"===typeof e.fallbackLng&&(e.fallbackLng=[e.fallbackLng]),"string"===typeof e.fallbackNS&&(e.fallbackNS=[e.fallbackNS]),e.supportedLngs&&e.supportedLngs.indexOf("cimode")<0&&(e.supportedLngs=e.supportedLngs.concat(["cimode"])),e}function ge(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function ve(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?ge(Object(n),!0).forEach(function(t){(0,f.A)(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):ge(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function xe(e){var t=function(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(Ca){return!1}}();return function(){var n,r=m(e);if(t){var i=m(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return h(this,n)}}function ye(){}var be=function(e){p(n,e);var t=xe(n);function n(){var e,r,i=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},o=arguments.length>1?arguments[1]:void 0;if(a(this,n),e=t.call(this),I&&A.call(d(e)),e.options=fe(i),e.services={},e.logger=S,e.modules={external:[]},r=d(e),Object.getOwnPropertyNames(Object.getPrototypeOf(r)).forEach(function(e){"function"===typeof r[e]&&(r[e]=r[e].bind(r))}),o&&!e.isInitialized&&!i.isClone){if(!e.options.initImmediate)return e.init(i,o),h(e,d(e));setTimeout(function(){e.init(i,o)},0)}return e}return c(n,[{key:"init",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=arguments.length>1?arguments[1]:void 0;"function"===typeof t&&(n=t,t={}),!t.defaultNS&&!1!==t.defaultNS&&t.ns&&("string"===typeof t.ns?t.defaultNS=t.ns:t.ns.indexOf("translation")<0&&(t.defaultNS=t.ns[0]));var r={debug:!1,initImmediate:!0,ns:["translation"],defaultNS:["translation"],fallbackLng:["dev"],fallbackNS:!1,supportedLngs:!1,nonExplicitSupportedLngs:!1,load:"all",preload:!1,simplifyPluralSuffix:!0,keySeparator:".",nsSeparator:":",pluralSeparator:"_",contextSeparator:"_",partialBundledLanguages:!1,saveMissing:!1,updateMissing:!1,saveMissingTo:"fallback",saveMissingPlurals:!0,missingKeyHandler:!1,missingInterpolationHandler:!1,postProcess:!1,postProcessPassResolved:!1,returnNull:!0,returnEmptyString:!0,returnObjects:!1,joinArrays:!1,returnedObjectHandler:!1,parseMissingKeyHandler:!1,appendNamespaceToMissingKey:!1,appendNamespaceToCIMode:!1,overloadTranslationOptionHandler:function(e){var t={};if("object"===(0,o.A)(e[1])&&(t=e[1]),"string"===typeof e[1]&&(t.defaultValue=e[1]),"string"===typeof e[2]&&(t.tDescription=e[2]),"object"===(0,o.A)(e[2])||"object"===(0,o.A)(e[3])){var n=e[3]||e[2];Object.keys(n).forEach(function(e){t[e]=n[e]})}return t},interpolation:{escapeValue:!0,format:function(e,t,n,r){return e},prefix:"{{",suffix:"}}",formatSeparator:",",unescapePrefix:"-",nestingPrefix:"$t(",nestingSuffix:")",nestingOptionsSeparator:",",maxReplaces:1e3,skipOnVariables:!0}};function i(e){return e?"function"===typeof e?new e:e:null}if(this.options=ve(ve(ve({},r),this.options),fe(t)),"v1"!==this.options.compatibilityAPI&&(this.options.interpolation=ve(ve({},r.interpolation),this.options.interpolation)),void 0!==t.keySeparator&&(this.options.userDefinedKeySeparator=t.keySeparator),void 0!==t.nsSeparator&&(this.options.userDefinedNsSeparator=t.nsSeparator),!this.options.isClone){var a;this.modules.logger?S.init(i(this.modules.logger),this.options):S.init(null,this.options),this.modules.formatter?a=this.modules.formatter:"undefined"!==typeof Intl&&(a=de);var s=new X(this.options);this.store=new W(this.options.resources,this.options);var l=this.services;l.logger=S,l.resourceStore=this.store,l.languageUtils=s,l.pluralResolver=new ne(s,{prepend:this.options.pluralSeparator,compatibilityJSON:this.options.compatibilityJSON,simplifyPluralSuffix:this.options.simplifyPluralSuffix}),!a||this.options.interpolation.format&&this.options.interpolation.format!==r.interpolation.format||(l.formatter=i(a),l.formatter.init(l,this.options),this.options.interpolation.format=l.formatter.format.bind(l.formatter)),l.interpolator=new oe(this.options),l.utils={hasLoadedNamespace:this.hasLoadedNamespace.bind(this)},l.backendConnector=new me(i(this.modules.backend),l.resourceStore,l,this.options),l.backendConnector.on("*",function(t){for(var n=arguments.length,r=new Array(n>1?n-1:0),i=1;i<n;i++)r[i-1]=arguments[i];e.emit.apply(e,[t].concat(r))}),this.modules.languageDetector&&(l.languageDetector=i(this.modules.languageDetector),l.languageDetector.init(l,this.options.detection,this.options)),this.modules.i18nFormat&&(l.i18nFormat=i(this.modules.i18nFormat),l.i18nFormat.init&&l.i18nFormat.init(this)),this.translator=new Z(this.services,this.options),this.translator.on("*",function(t){for(var n=arguments.length,r=new Array(n>1?n-1:0),i=1;i<n;i++)r[i-1]=arguments[i];e.emit.apply(e,[t].concat(r))}),this.modules.external.forEach(function(t){t.init&&t.init(e)})}if(this.format=this.options.interpolation.format,n||(n=ye),this.options.fallbackLng&&!this.services.languageDetector&&!this.options.lng){var c=this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);c.length>0&&"dev"!==c[0]&&(this.options.lng=c[0])}this.services.languageDetector||this.options.lng||this.logger.warn("init: no languageDetector is used and no lng is defined");["getResource","hasResourceBundle","getResourceBundle","getDataByLanguage"].forEach(function(t){e[t]=function(){var n;return(n=e.store)[t].apply(n,arguments)}});["addResource","addResources","addResourceBundle","removeResourceBundle"].forEach(function(t){e[t]=function(){var n;return(n=e.store)[t].apply(n,arguments),e}});var d=k(),u=function(){var t=function(t,r){e.isInitialized&&!e.initializedStoreOnce&&e.logger.warn("init: i18next is already initialized. You should call init just once!"),e.isInitialized=!0,e.options.isClone||e.logger.log("initialized",e.options),e.emit("initialized",e.options),d.resolve(r),n(t,r)};if(e.languages&&"v1"!==e.options.compatibilityAPI&&!e.isInitialized)return t(null,e.t.bind(e));e.changeLanguage(e.options.lng,t)};return this.options.resources||!this.options.initImmediate?u():setTimeout(u,0),d}},{key:"loadResources",value:function(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:ye,r="string"===typeof e?e:this.language;if("function"===typeof e&&(n=e),!this.options.resources||this.options.partialBundledLanguages){if(r&&"cimode"===r.toLowerCase())return n();var i=[],o=function(e){e&&t.services.languageUtils.toResolveHierarchy(e).forEach(function(e){i.indexOf(e)<0&&i.push(e)})};if(r)o(r);else this.services.languageUtils.getFallbackCodes(this.options.fallbackLng).forEach(function(e){return o(e)});this.options.preload&&this.options.preload.forEach(function(e){return o(e)}),this.services.backendConnector.load(i,this.options.ns,function(e){e||t.resolvedLanguage||!t.language||t.setResolvedLanguage(t.language),n(e)})}else n(null)}},{key:"reloadResources",value:function(e,t,n){var r=k();return e||(e=this.languages),t||(t=this.options.ns),n||(n=ye),this.services.backendConnector.reload(e,t,function(e){r.resolve(),n(e)}),r}},{key:"use",value:function(e){if(!e)throw new Error("You are passing an undefined module! Please check the object you are passing to i18next.use()");if(!e.type)throw new Error("You are passing a wrong module! Please check the object you are passing to i18next.use()");return"backend"===e.type&&(this.modules.backend=e),("logger"===e.type||e.log&&e.warn&&e.error)&&(this.modules.logger=e),"languageDetector"===e.type&&(this.modules.languageDetector=e),"i18nFormat"===e.type&&(this.modules.i18nFormat=e),"postProcessor"===e.type&&U.addPostProcessor(e),"formatter"===e.type&&(this.modules.formatter=e),"3rdParty"===e.type&&this.modules.external.push(e),this}},{key:"setResolvedLanguage",value:function(e){if(e&&this.languages&&!(["cimode","dev"].indexOf(e)>-1))for(var t=0;t<this.languages.length;t++){var n=this.languages[t];if(!(["cimode","dev"].indexOf(n)>-1)&&this.store.hasLanguageSomeTranslations(n)){this.resolvedLanguage=n;break}}}},{key:"changeLanguage",value:function(e,t){var n=this;this.isLanguageChangingTo=e;var r=k();this.emit("languageChanging",e);var i=function(e){n.language=e,n.languages=n.services.languageUtils.toResolveHierarchy(e),n.resolvedLanguage=void 0,n.setResolvedLanguage(e)},o=function(o){e||o||!n.services.languageDetector||(o=[]);var a="string"===typeof o?o:n.services.languageUtils.getBestMatchFromCodes(o);a&&(n.language||i(a),n.translator.language||n.translator.changeLanguage(a),n.services.languageDetector&&n.services.languageDetector.cacheUserLanguage(a)),n.loadResources(a,function(e){!function(e,o){o?(i(o),n.translator.changeLanguage(o),n.isLanguageChangingTo=void 0,n.emit("languageChanged",o),n.logger.log("languageChanged",o)):n.isLanguageChangingTo=void 0,r.resolve(function(){return n.t.apply(n,arguments)}),t&&t(e,function(){return n.t.apply(n,arguments)})}(e,a)})};return e||!this.services.languageDetector||this.services.languageDetector.async?!e&&this.services.languageDetector&&this.services.languageDetector.async?this.services.languageDetector.detect(o):o(e):o(this.services.languageDetector.detect()),r}},{key:"getFixedT",value:function(e,t,n){var r=this,i=function e(t,i){var a;if("object"!==(0,o.A)(i)){for(var s=arguments.length,l=new Array(s>2?s-2:0),c=2;c<s;c++)l[c-2]=arguments[c];a=r.options.overloadTranslationOptionHandler([t,i].concat(l))}else a=ve({},i);a.lng=a.lng||e.lng,a.lngs=a.lngs||e.lngs,a.ns=a.ns||e.ns,a.keyPrefix=a.keyPrefix||n||e.keyPrefix;var d=r.options.keySeparator||".",u=a.keyPrefix?"".concat(a.keyPrefix).concat(d).concat(t):t;return r.t(u,a)};return"string"===typeof e?i.lng=e:i.lngs=e,i.ns=t,i.keyPrefix=n,i}},{key:"t",value:function(){var e;return this.translator&&(e=this.translator).translate.apply(e,arguments)}},{key:"exists",value:function(){var e;return this.translator&&(e=this.translator).exists.apply(e,arguments)}},{key:"setDefaultNamespace",value:function(e){this.options.defaultNS=e}},{key:"hasLoadedNamespace",value:function(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(!this.isInitialized)return this.logger.warn("hasLoadedNamespace: i18next was not initialized",this.languages),!1;if(!this.languages||!this.languages.length)return this.logger.warn("hasLoadedNamespace: i18n.languages were undefined or empty",this.languages),!1;var r=this.resolvedLanguage||this.languages[0],i=!!this.options&&this.options.fallbackLng,o=this.languages[this.languages.length-1];if("cimode"===r.toLowerCase())return!0;var a=function(e,n){var r=t.services.backendConnector.state["".concat(e,"|").concat(n)];return-1===r||2===r};if(n.precheck){var s=n.precheck(this,a);if(void 0!==s)return s}return!!this.hasResourceBundle(r,e)||(!(this.services.backendConnector.backend&&(!this.options.resources||this.options.partialBundledLanguages))||!(!a(r,e)||i&&!a(o,e)))}},{key:"loadNamespaces",value:function(e,t){var n=this,r=k();return this.options.ns?("string"===typeof e&&(e=[e]),e.forEach(function(e){n.options.ns.indexOf(e)<0&&n.options.ns.push(e)}),this.loadResources(function(e){r.resolve(),t&&t(e)}),r):(t&&t(),Promise.resolve())}},{key:"loadLanguages",value:function(e,t){var n=k();"string"===typeof e&&(e=[e]);var r=this.options.preload||[],i=e.filter(function(e){return r.indexOf(e)<0});return i.length?(this.options.preload=r.concat(i),this.loadResources(function(e){n.resolve(),t&&t(e)}),n):(t&&t(),Promise.resolve())}},{key:"dir",value:function(e){if(e||(e=this.resolvedLanguage||(this.languages&&this.languages.length>0?this.languages[0]:this.language)),!e)return"rtl";return["ar","shu","sqr","ssh","xaa","yhd","yud","aao","abh","abv","acm","acq","acw","acx","acy","adf","ads","aeb","aec","afb","ajp","apc","apd","arb","arq","ars","ary","arz","auz","avl","ayh","ayl","ayn","ayp","bbz","pga","he","iw","ps","pbt","pbu","pst","prp","prd","ug","ur","ydd","yds","yih","ji","yi","hbo","men","xmn","fa","jpr","peo","pes","prs","dv","sam","ckb"].indexOf(this.services.languageUtils.getLanguagePartFromCode(e))>-1||e.toLowerCase().indexOf("-arab")>1?"rtl":"ltr"}},{key:"cloneInstance",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:ye,i=ve(ve(ve({},this.options),t),{isClone:!0}),o=new n(i);void 0===t.debug&&void 0===t.prefix||(o.logger=o.logger.clone(t));return["store","services","language"].forEach(function(t){o[t]=e[t]}),o.services=ve({},this.services),o.services.utils={hasLoadedNamespace:o.hasLoadedNamespace.bind(o)},o.translator=new Z(o.services,o.options),o.translator.on("*",function(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];o.emit.apply(o,[e].concat(n))}),o.init(i,r),o.translator.options=o.options,o.translator.backendConnector.services.utils={hasLoadedNamespace:o.hasLoadedNamespace.bind(o)},o}},{key:"toJSON",value:function(){return{options:this.options,store:this.store,language:this.language,languages:this.languages,resolvedLanguage:this.resolvedLanguage}}}]),n}(A);(0,f.A)(be,"createInstance",function(){return new be(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},arguments.length>1?arguments[1]:void 0)});var je=be.createInstance();je.createInstance=be.createInstance;je.createInstance,je.init,je.loadResources,je.reloadResources,je.use,je.changeLanguage,je.getFixedT;var _e=je.t;je.exists,je.setDefaultNamespace,je.hasLoadedNamespace,je.loadNamespaces,je.loadLanguages;const Ce=je;var we=[],Se=we.forEach,Ae=we.slice;var ke=/^[\u0009\u0020-\u007e\u0080-\u00ff]+$/,Te=function(e,t,n,r){var i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:{path:"/",sameSite:"strict"};n&&(i.expires=new Date,i.expires.setTime(i.expires.getTime()+60*n*1e3)),r&&(i.domain=r),document.cookie=function(e,t,n){var r=n||{};r.path=r.path||"/";var i=encodeURIComponent(t),o="".concat(e,"=").concat(i);if(r.maxAge>0){var a=r.maxAge-0;if(Number.isNaN(a))throw new Error("maxAge should be a Number");o+="; Max-Age=".concat(Math.floor(a))}if(r.domain){if(!ke.test(r.domain))throw new TypeError("option domain is invalid");o+="; Domain=".concat(r.domain)}if(r.path){if(!ke.test(r.path))throw new TypeError("option path is invalid");o+="; Path=".concat(r.path)}if(r.expires){if("function"!==typeof r.expires.toUTCString)throw new TypeError("option expires is invalid");o+="; Expires=".concat(r.expires.toUTCString())}if(r.httpOnly&&(o+="; HttpOnly"),r.secure&&(o+="; Secure"),r.sameSite)switch("string"===typeof r.sameSite?r.sameSite.toLowerCase():r.sameSite){case!0:o+="; SameSite=Strict";break;case"lax":o+="; SameSite=Lax";break;case"strict":o+="; SameSite=Strict";break;case"none":o+="; SameSite=None";break;default:throw new TypeError("option sameSite is invalid")}return o}(e,encodeURIComponent(t),i)},Ee=function(e){for(var t="".concat(e,"="),n=document.cookie.split(";"),r=0;r<n.length;r++){for(var i=n[r];" "===i.charAt(0);)i=i.substring(1,i.length);if(0===i.indexOf(t))return i.substring(t.length,i.length)}return null},Me={name:"cookie",lookup:function(e){var t;if(e.lookupCookie&&"undefined"!==typeof document){var n=Ee(e.lookupCookie);n&&(t=n)}return t},cacheUserLanguage:function(e,t){t.lookupCookie&&"undefined"!==typeof document&&Te(t.lookupCookie,e,t.cookieMinutes,t.cookieDomain,t.cookieOptions)}},Oe={name:"querystring",lookup:function(e){var t;if("undefined"!==typeof window){var n=window.location.search;!window.location.search&&window.location.hash&&window.location.hash.indexOf("?")>-1&&(n=window.location.hash.substring(window.location.hash.indexOf("?")));for(var r=n.substring(1).split("&"),i=0;i<r.length;i++){var o=r[i].indexOf("=");if(o>0)r[i].substring(0,o)===e.lookupQuerystring&&(t=r[i].substring(o+1))}}return t}},Re=null,Pe=function(){if(null!==Re)return Re;try{Re="undefined"!==window&&null!==window.localStorage;var e="i18next.translate.boo";window.localStorage.setItem(e,"foo"),window.localStorage.removeItem(e)}catch(Ca){Re=!1}return Re},De={name:"localStorage",lookup:function(e){var t;if(e.lookupLocalStorage&&Pe()){var n=window.localStorage.getItem(e.lookupLocalStorage);n&&(t=n)}return t},cacheUserLanguage:function(e,t){t.lookupLocalStorage&&Pe()&&window.localStorage.setItem(t.lookupLocalStorage,e)}},Ne=null,Le=function(){if(null!==Ne)return Ne;try{Ne="undefined"!==window&&null!==window.sessionStorage;var e="i18next.translate.boo";window.sessionStorage.setItem(e,"foo"),window.sessionStorage.removeItem(e)}catch(Ca){Ne=!1}return Ne},Ie={name:"sessionStorage",lookup:function(e){var t;if(e.lookupSessionStorage&&Le()){var n=window.sessionStorage.getItem(e.lookupSessionStorage);n&&(t=n)}return t},cacheUserLanguage:function(e,t){t.lookupSessionStorage&&Le()&&window.sessionStorage.setItem(t.lookupSessionStorage,e)}},Fe={name:"navigator",lookup:function(e){var t=[];if("undefined"!==typeof navigator){if(navigator.languages)for(var n=0;n<navigator.languages.length;n++)t.push(navigator.languages[n]);navigator.userLanguage&&t.push(navigator.userLanguage),navigator.language&&t.push(navigator.language)}return t.length>0?t:void 0}},$e={name:"htmlTag",lookup:function(e){var t,n=e.htmlTag||("undefined"!==typeof document?document.documentElement:null);return n&&"function"===typeof n.getAttribute&&(t=n.getAttribute("lang")),t}},Be={name:"path",lookup:function(e){var t;if("undefined"!==typeof window){var n=window.location.pathname.match(/\/([a-zA-Z-]*)/g);if(n instanceof Array)if("number"===typeof e.lookupFromPathIndex){if("string"!==typeof n[e.lookupFromPathIndex])return;t=n[e.lookupFromPathIndex].replace("/","")}else t=n[0].replace("/","")}return t}},ze={name:"subdomain",lookup:function(e){var t="number"===typeof e.lookupFromSubdomainIndex?e.lookupFromSubdomainIndex+1:1,n="undefined"!==typeof window&&window.location&&window.location.hostname&&window.location.hostname.match(/^(\w{2,5})\.(([a-z0-9-]{1,63}\.[a-z]{2,6})|localhost)/i);if(n)return n[t]}};var He=function(){function e(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};a(this,e),this.type="languageDetector",this.detectors={},this.init(t,n)}return c(e,[{key:"init",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};this.services=e,this.options=function(e){return Se.call(Ae.call(arguments,1),function(t){if(t)for(var n in t)void 0===e[n]&&(e[n]=t[n])}),e}(t,this.options||{},{order:["querystring","cookie","localStorage","sessionStorage","navigator","htmlTag"],lookupQuerystring:"lng",lookupCookie:"i18next",lookupLocalStorage:"i18nextLng",lookupSessionStorage:"i18nextLng",caches:["localStorage"],excludeCacheFor:["cimode"]}),this.options.lookupFromUrlIndex&&(this.options.lookupFromPathIndex=this.options.lookupFromUrlIndex),this.i18nOptions=n,this.addDetector(Me),this.addDetector(Oe),this.addDetector(De),this.addDetector(Ie),this.addDetector(Fe),this.addDetector($e),this.addDetector(Be),this.addDetector(ze)}},{key:"addDetector",value:function(e){this.detectors[e.name]=e}},{key:"detect",value:function(e){var t=this;e||(e=this.options.order);var n=[];return e.forEach(function(e){if(t.detectors[e]){var r=t.detectors[e].lookup(t.options);r&&"string"===typeof r&&(r=[r]),r&&(n=n.concat(r))}}),this.services.languageUtils.getBestMatchFromCodes?n:n.length>0?n[0]:null}},{key:"cacheUserLanguage",value:function(e,t){var n=this;t||(t=this.options.caches),t&&(this.options.excludeCacheFor&&this.options.excludeCacheFor.indexOf(e)>-1||t.forEach(function(t){n.detectors[t]&&n.detectors[t].cacheUserLanguage(e,n.options)}))}}]),e}();He.type="languageDetector";var We=n(65043),Ue=n.t(We,2),Ve=/&(?:amp|#38|lt|#60|gt|#62|apos|#39|quot|#34|nbsp|#160|copy|#169|reg|#174|hellip|#8230|#x2F|#47);/g,Ge={"&amp;":"&","&#38;":"&","&lt;":"<","&#60;":"<","&gt;":">","&#62;":">","&apos;":"'","&#39;":"'","&quot;":'"',"&#34;":'"',"&nbsp;":" ","&#160;":" ","&copy;":"\xa9","&#169;":"\xa9","&reg;":"\xae","&#174;":"\xae","&hellip;":"\u2026","&#8230;":"\u2026","&#x2F;":"/","&#47;":"/"},qe=function(e){return Ge[e]};function Ye(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function Ze(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Ye(Object(n),!0).forEach(function(t){(0,f.A)(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Ye(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}var Ke,Xe={bindI18n:"languageChanged",bindI18nStore:"",transEmptyNodeValue:"",transSupportBasicHtmlNodes:!0,transWrapTextNodes:"",transKeepBasicHtmlNodesFor:["br","strong","i","p"],useSuspense:!0,unescape:function(e){return e.replace(Ve,qe)}},Qe=(0,We.createContext)();var Je=function(){function e(){a(this,e),this.usedNamespaces={}}return c(e,[{key:"addUsedNamespaces",value:function(e){var t=this;e.forEach(function(e){t.usedNamespaces[e]||(t.usedNamespaces[e]=!0)})}},{key:"getUsedNamespaces",value:function(){return Object.keys(this.usedNamespaces)}}]),e}();function et(){return Ke}var tt={type:"3rdParty",init:function(e){!function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};Xe=Ze(Ze({},Xe),e)}(e.options.react),function(e){Ke=e}(e)}};const nt=JSON.parse('{"rpm_noWhiteSpaceAllowed":"Space not allowed","rpm_stringError":"Please enter a correct value","rpm_required":"{{field}} is a required field.","rpm_minLength":"Minimum {{length}} characters are required.","rpm_maxLength":"Maximum length must be equal to or less than {{length}} characters.","rpm_minLengthNumber":"Minimum {{length}} number are required.","rpm_maxLengthNumber":"Maximum length must be equal to or less than {{length}} number.","rpm_specialCharacter":"Special characters are not allowed","rpm_TypeError":"{{field}} must be a number","ERR_500":"Operation cannot be performed.","ERR_DUPLICATE":"Duplicate value","ERR_FAILED":"Failed","ERR_DEFAULT":"Error","errorUnAuthorized":"Request is unauthorized!","errorResourceNotFound":"Resource not found!","errorTimeout":"Request timed out.","errorConflict":"Record already exists.","errorUnauthorized":"Unauthorized","errorAuthBruteForce":"Your account has been locked temporarily due to excessive failed login attempts.","errorAuthPasswordWxpired":"Your password has expired and must be reset before you can log in. An email has been sent to your email address containing further instructions.","errorAuthGeneral":"Invalid Username or Password. Please try again or contact the administrator.","errorAccessDenied":"Access/Action is restricted for the current user","rpm_PasswordTestLowerCaseErr":"At least 1 lowercase letter is required.","rpm_PasswordTestUpperCaseErr":"At least 1 uppercase letter is required.","rpm_PasswordTestDigitErr":"At least 1 digit is required.","rpm_PasswordTestSpecialErr":"At least 1 special character is required.","rpm_PasswordConfirmNotMatchErr":"Password does not match.","rpm_ValidPhone":"Please Provide a valid {{field}}.","rpm_ValidZipCode":"Please provide a valid Pincode.","rpm_emailValid":"Please provide valid email address.","errorSpace":"Empty space is not allowed","rpm_minMaxDateErr":"Date must be between 1900 and 2004","rpm_invailidDateErr":"Please enter a valid date","rpm_err_matching_passwords":"Password already in use","rpm_UserCreateFailed":"User account creation failed.","rpm_err_user_exists":"User already exists.","rpm_err_group_not_found":"Group not found.","rpm_UsernameValidation":"Invalid username. Please use lowercase/uppercase letters, digits, underscore(_) and dot(.)","rpm_err_empty_path":"Program group empty","rpm_PasswordFailure":"Password updation failed","rpm_err_password_too_weak":"Password strength is too weak","rpm_err_empty_value":"Password field cannot be empty","rpm_PasswordResetFailed":"Password reset failed","rpm_ProfileUpdationFailed":"Profile updation failed","rpm_PolicyCreateFailed":"Something went wrong while creating a new policy.","rpm_PolicyAttachFailed":"Policy attachment to the role failed.","rpm_PolicyUpdateFailed":"Policy updation on the role is failed.","rpm_resource_access_denied":"Access denied","rpm_err_invalid_creds":"Bad Credentials","rpm_ProgramRemoveFailed":"Program removal failed","rpm_err_bad_escalation":"Bad Escalation","rpm_minMaxTimeErr":"End-time should be greater then start-time","rpm_SameTimeErr":"The duration between the start time & end time of a mandate should be greater than 10 minutes and less than 180 minutes","rpm_err_bad_password":"Bad password","rpm_err_bad_group_update":"You cannot remove the program if want to remove please assign another program then remove","rpm_err_role_exists":"Role name already exist at this level or program","rpm_durationLength":"Duration must be greater then 0 and less then 100","rpm_overlapping_time_range":"Overlapping mandates\' timings","rpm_bad_time_range":"End time should be greater than start time.","rpm_batchSize":"Batch size must be greater than 1 and less than {{length}}","rpm_AlreadyAttachCourse":"Course already attached to the patient.","rpm_err_max_value":"Maximum length error","rpm_validEmail":"Please enter a valid email address","rpm_err_access_denied":"Access Denied","rpm_program_not_found":"Program not found","rpm_ProgramUpdateFailed":"Program action failed","rpm_NotFound":"Page Not Found!","rpm_invalidDateErr":"Please enter a valid time.(eg: 00:00 - 23:59)","rpm_ScheduleCreatedFailed":"Course creation failed.","rpm_err_schedule_already_assigned":"The attached course can not be edited. Kindly delete the existing course and attach a new one.","rpm_DiseaseCreatedFailed":"Record addition failed.","rpm_DiseaseUpdateFailed":"Record updation failed.","rpm_DiseaseDeleteFailed":"Record deletion failed.","rpm_err_not_found":"Error not found.","rpm_FileDeleteFailed":"File deletion failed.","rpm_OtherHealthIssuesUpdateFailed":"Social History updation failed.","rpm_ScheduleUpdateFailed":"Schedule Updation failed.","rpm_DownloadFileFailed":"File downloading unsuccessful.","rpm_ImageSize":"Please upload image having size less then 5MB.","rpm_SameFileName":"Please upload a file with a different name","rpm_MinNumber":"Minimum {{length}} numbers are required.","rpm_MaxNumber":"Maximum length must be equal to or less than {{length}}.","rpm_FetchRolesFailed":"Roles could not be fetched.","rpm_FetchUsersFailed":"Users could not be fetched.","rpm_NoteCreatedFailed":"Note creation failed.","rpm_NoteUpdateFailed":"Note updation failed.","rpm_NoteDeleteFailed":"Note deletion failed.","rpm_PrescriptionCreatedFailed":"Consultation creation failed.","rpm_PrescriptionUpdateFailed":"Consultation updation failed.","rpm_PrescriptionDeleteFailed":"Consultation deletion failed.","rpm_durationErr":"Please enter a valid number.","rpm_durationErrYear":"Year should be equal or less then {{length}}","rpm_durationErrMonth":"Month should be equal or less then {{length}}","rpm_durationErrDay":"Days should be equal or less then {{length}}","rpm_minYear":"Selected year must be greater than {{length}}","rpm_equalYear":"Year cannot be same","rpm_invalidYear":"Please enter a valid year","rpm_err_incorrect_medical_history_duration":"Duration should be less then your age","rpm_ActivityName":"Activity name","rpm_ActivityType":"Activity type","validWholeNumber":"Enter a valid whole number only","rpm_err_only_one_future_course_can_be_assigned":"More than one course can not be assigned to the patient for a future date.","rpm_err_medicine_start_date_cannot_be_after_end_date":"Start date must be less than end date.","rpm_err_template_name_already_exist":"Template name already exists.","rpm_timingError":"Kindly set reminders for the remaining dosages as well.","rpm_sameTimingError":"Please use different times","rpm_bothFields":"Both fields are required","rpm_TemplateCreatedFailed":"Template creation failed","rpm_TemplateDeleteFailed":"Template deletion failed","rpm_PatientTransferFailed":"Patient already exist in this program.","rpm_err_mobile_number_already_exist":"Mobile number already exists.","rpm_err_rule_already_exist":"Rule already exists.","rpm_RuleCreatedFailed":"Rule creation failed","rpm_PatientAlreadyExisted":"Patient already exists in this program.","rpm_AgeError":"Age required above 17 and below 100","rpm_patient_not_created":"Patient could not be created","rpm_QrDownloadedFailed":"QR download failed","rpm_providerAssignFailed":"Provider update failed","rpm_providerEditFailed":"Provder Edit Failed","rpm_GoalCreatedFailed":"Goal creation failed","rpm_ExerciseCreatedFailed":"Exercise creation failed","rpm_err_workout_already_exists":"Workout already exists","rpm_PackageAddedFailed":"Failed to Add the Package","rpm_package_already_exists_within_specified_date_range":"The Package is already assigned or Active to the selected program for the specified date range."}'),rt=JSON.parse('{"ERR_500":"Operation cannot be performed.","ERR_DUPLICATE":"Duplicate value","ERR_FAILED":"Failed","ERR_DEFAULT":"Error","errorUnAuthorized":"Request is unauthorized!","errorResourceNotFound":"Resource not found!","errorTimeout":"Request timeout.","errorConflict":"Record already exists.","errorUnauthorized":"Unauthorized","errorAuthBruteForce":"Your account has been locked temporarily due to excessive failed login attempts.","errorAuthPasswordWxpired":"Your password has expired and must be reset before you can log in. An email has been sent to your email address containing further instructions.","errorAuthGeneral":"Invalid Username or Password. Please try again or contact the administrator.","errorAccessDenied":"Access/Action is restricted for the current user","rpm_AlertResolvedTitle":"Alert Follow-Up","rpm_AlertResolvedBody":"Are you sure you want to resolve this alert?","rpm_AlertResolvedSub":"Resolved item will be removed from the active alerts\' list.","rpm_DeleteTitle":"Delete Record","rpm_DeleteCourse":"Delete Course","rpm_DeleteCourseBodyText":"Are you sure you want to delete this course?","rpm_DeleteBodyText":"Are you sure you want to delete this record?","rpm_DeleteSubText":"Do you really want to delete this record?","rpm_DeleteReadingText":"Are you sure you want to delete this reading?","rpm_DeleteAlertText":"Are you sure you want to delete this alert?","rpm_PatientCreatedSuccessfully":"Patient created successfully!","rpm_PatientRequestedSuccessfully":"Request successfully sent to patient.","rpm_PatientCreatedFailed":"Patient account creation failed!","rpm_RuleCreatedSuccessfully":"Rule created successfully!","rpm_RuleCreatedFailed":"Rule creation failed!","rpm_ResolveAlertSuccess":"Alert resolved successfully!","rpm_DeleteRuleSuccess":"Rule deleted successfully!","rpm_DeletePatientSuccess":"Patient deleted successfully!","rpm_SystemRootRoleDescription":"The root account has root privileges. This means it can read and write  any files on the system, perform operations as any us","rpm_UnassignBodyText":"Are you sure you want to unassign the client level?","rpm_DeleteRoleSuccess":"Role deleted successfully!","rpm_UpdatePasswordSuccessfully":"Password updated successfully!","rpm_UpdateSuccessUserProfile":"Profile updated successfully!","rpm_PatientUpdateSuccessfully":"Patient record updated successfully!","rpm_DeletePatientBodyText":"Confirm","rpm_DeletePatientSubText":"Are you sure you want to delete this record? This process cannot be undone.","rpm_FirstNameHelp":"Enter the first name of the patient","rpm_LastNameHelp":"Enter the last name of the patient","rpm_AgeHelp":"Enter the age of the patient","rpm_MobileHelp":"Enter the 10 digit registered mobile number of the patient. Patient will login into the application through this number.","rpm_DOBHelp":"Enter the date of birth of the patient","rpm_EmailHelp":"Enter the valid email ID of the patient","rpm_DeviceHelp":"Select the device that needs to be assigned to the patient.","rpm_ObserverHelp":"Enter the name of the Doctor who is observing this patient.","rpm_GenderHelp":"Select the gender of the patient from the list.","rpm_FacilityHelp":"Select the type of the facility from the list.","rpm_MaritalStatusHelp":"Select marital status of the patient from the list ","rpm_ParentHelp":"Enter the name of the guardian or parent","rpm_BloodGroupHelp":"Select the blood group of the patient","rpm_HeightHelp":"Enter the height in ft. ","rpm_HeightFeetHelp":"Select the height in ft.","rpm_HeightInchesHelp":"Select the height in inches","rpm_WeightHelp":"Enter the weight in kgs","rpm_CountryHelp":"Enter the country name of the patient","rpm_StateHelp":"Enter the state/province name of the patient","rpm_CityHelp":"Enter the city name of the patient","rpm_ZipCodeHelp":"Enter the pincode/zipcode upto 6 digits","rpm_Address1Help":"Enter the street address, P.O. Box, and company name of the patient. ","rpm_Address2Help":"Enter the apartment, suite, unit, building, floor, etc., of the patient. ","rpm_VitalTypeHelp":"Select vital type for the rule.","rpm_ProcessingModeHelp":"Select the processing mode for the rule.","rpm_DescriptionHelp":"Provide your comment(s) to resolve this alert.","rpm_ShortDescriptionHelp":"Provide a brief description of the rule. ","rpm_BatchDataSizeHelp":"The batch size can lie within the range of 2-20","rpm_FirstNameDrHelp":"Enter your first name","rpm_LastNameDrHelp":"Enter your last name","rpm_MobileDrHelp":"Enter your mobile number","rpm_DOBDrHelp":"Select your date of birth","rpm_EmailDrHelp":"Enter your Email id","rpm_GenderDrHelp":"Select your gender","rpm_SpecialityHelp":"Select your speciality","rpm_ExperienceHelp":"Enter your experience","rpm_ConsultingLanguageHelp":"Enter your preferred language","rpm_RegistrationHelp":"Enter your registeration number","rpm_ProfessionalBioHelp":"Enter your professional bio","rpm_HighestQualificationsHelp":"Enter your highest qualification","rpm_AddressLine1Help":"Enter your address","rpm_AddressLine2Help":"Enter your address","rpm_CountryDrHelp":"Enter the name of your country/region","rpm_StateDrHelp":"Enter the name of your state/province","rpm_CityDrHelp":"Enter the name of your city","rpm_PostalCodeZipHelp":"Enter your postal code","rpm_CurrentPasswordHelp":"Enter your current password.","rpm_NewPasswordHelp":"Enter a new password.","rpm_ConfirmPasswordHelp":"Re-enter the new password.","rpm_ProgramCreatedSuccessfully":"Program Created Successfully!","rpm_ProgramUpdatedSuccessfully":"Program Updated Successfully!","rpm_AttachDeviceSuccess":"Device attached successfully!","rpm_DeAttachDeviceSuccess":"Device removed successfully!","rpm_AssignDeviceRuleText":"You can assign only one device to a patient. Kindly remove the current device from the patient to enable this option.","rpm_PleaseSelectDevice":"Please select a device.","rpm_PleaseSelectCourse":"Please select the course.","rpm_RoleCreatedSuccessfully":"Role created successfully!","rpm_AttachRoleSuccess":"Role attached successfully!","rpm_RemoveRoleSuccess":"Role removed  successfully!","rpm_UserCreatedSuccessfully":"User created successfully!","rpm_DeleteUserSuccess":"User deleted successfully!","rpm_ProgramRemoveSuccess":"Program removed successfully!","rpm_ProgramAttachSuccess":"Program attached successfully!","rpm_UpdateRoleSuccess":"Permissions updated successfully!","rpm_RoleUpdatedSuccessfully":"Role updated successfully!","rpm_RuleNameHelp":"Provide an appropriate name for the rule.","rpm_RuleDescriptionHelp":"Provide a brief description for the rule","rpm_VitalOperatorHelp":"Select an appropriate operator for the rule","rpm_VitalValueHelp":"Select a value for the rule.","rpm_ConditionBetweenVitalsHelp":"Select the condition for the rule","rpm_ScheduleCreatedSuccessfully":"Course created successfully!","rpm_DeleteScheduleSuccess":"Course deleted successfully!","rpm_MandateCreatedSuccessfully":"Mandate created successfully!","rpm_ScheduleUpdatedSuccessfully":"Course updated successfully!","rpm_DeleteMandateSuccess":"Mandate deleted successfully!","rpm_AttachScheduleSuccess":"Course attached successfully!","rpm_DeAttachScheduleSuccess":"Course removed successfully!","rpm_ScheduleTitleHelp":"Provide a suitable title for the course","rpm_VitalNameHelp":"Select the vital to be added in the course","rpm_DurationHelp":"Enter the duration of the course.","rpm_MaxStrikeHelp":"Select the limit of strikes, crossing which the patient becomes non-compliant ","rpm_NotificationTitleHelp":"Provide a suitable title for non-compliance.","rpm_NotificationDescriptionHelp":"Provide a brief description for the non-compliance.","rpm_MandateStartTimeHelp":"Enter the time from which you want to start the mandate","rpm_MandateEndTimeHelp":"Enter the time at which you want to end the mandate","rpm_ReadingReminderTitle":"Provide a suitable title to be sent as reminder.","rpm_ReadingReminderEveryMinHelp":"Select the duration of interval for shooting the reminder ","rpm_ReadingReminderRepetitionHelp":"Select the number of times you want to shoot the reminder ","rpm_ReadingReminderMsgHelp":"Provide a suitable description for the reminder","rpm_MissedReadingTitleHelp":"Provide a suitable title to be sent as reminder.","rpm_MissedReadingMsgHelp":"Provide a suitable description for the reminder","rpm_ActionDescriptionListUsers":"This permission allows the user to view the list of users.","rpm_ActionDescriptionReadUser":"This permission allows the user to view details of a user.","rpm_ActionDescriptionCreateUser":"This permission allows the user to create a new user.","rpm_ActionDescriptionUpdateUser":"This permission allows the user to update/edit details of a user.","rpm_ActionDescriptionDeleteUser":"This permission allows the user to delete a user.","rpm_ActionDescriptionManageUserPolicies":"This permission allows the user to manage user policies.","rpm_ActionDescriptionListRoles":"This permission allows the user to view the list of roles added.","rpm_ActionDescriptionReadRole":"This permission allows the user to access the details of the role added.","rpm_ActionDescriptionCreateRole":"This permission allows the user to add a new role.","rpm_ActionDescriptionUpdateRole":"This permission allows the user to edit/update an existing role.","rpm_ActionDescriptionDeleteRole":"This permission allows the user to delete an existing role.","rpm_ActionDescriptionManageRolePolicies":"This permission allows the user to manage role policies.","rpm_ActionDescriptionListGroups":"This permission allows the user to view the list of programs on user details screen.","rpm_ActionDescriptionReadGroup":"This permission allows the user to view the list of groups.","rpm_ActionDescriptionCreateGroup":"This permission allows the user to create a new group.","rpm_ActionDescriptionDeleteGroup":"This permission allows the user to delete an existing group.","rpm_ActionDescriptionUpdateGroup":"This permission allows the user to update an existing group.","rpm_ActionDescriptionListPolicies":"This permission allows the user to view the list of policies.","rpm_ActionDescriptionReadPolicy":"This permission allows the user to read the policies.","rpm_ActionDescriptionCreatePolicy":"This permission allows the user to create new policies.","rpm_ActionDescriptionUpdatePolicy":"This permission allows the user to update a policy.","rpm_ActionDescriptionDeletePolicy":"This permission allows the user to delete a policy.","rpm_ActionDescriptionListTemplates":"This permission allows the user to view the list of templates.","rpm_ActionDescriptionReadTemplate":"This permission allows the user to read templates.","rpm_ActionDescriptionCreateTemplate":"This permission allows the user to create new templates.","rpm_ActionDescriptionUpdateTemplate":"This permission allows the user to update a template.","rpm_ActionDescriptionDeleteTemplate":"This permission allows the user to delete a template.","rpm_ActionDescriptionUpdateConsoleElements":"This permission allows the user to update the console elements.","rpm_ActionDescriptionReadMFASettings":"This permission allows the user to read the MFA settings.","rpm_ActionDescriptionUpdateMFASettings":"This permission allows the user to update the MFA settings.","rpm_ActionDescriptionReadPasswordPolicy":"This permission allows the user to read the password policy.","rpm_ActionDescriptionUpdatePasswordPolicy":"This permission allows the user to update the password policy.","rpm_ActionDescriptionListPrograms":"This permission allows the user to view list of programs.","rpm_ActionDescriptionReadProgram":"This permission allows the user to access the program details and its patients.","rpm_ActionDescriptionCreateProgram":"This permission allows the user to add a new program.","rpm_ActionDescriptionUpdateProgram":"This permission allows the user to update a program.","rpm_ActionDescriptionListAllPatients":"This permission allows the user to view the global list of patients.","rpm_ActionDescriptionListPatients":"This permission allows the user to view the list of patients.","rpm_ActionDescriptionReadPatient":"This permission allows the user to view the dashboard of a patient.","rpm_ActionDescriptionCreatePatient":"This permission allows the user to add a patient in a program.","rpm_ActionDescriptionUpdatePatientProfile":"This permission allows the user to edit personal details of a patient.","rpm_ActionDescriptionUpdatePatientConfiguration":"This permission allows the user to read personal details of a patient.","rpm_ActionDescriptionDeletePatients":"This permission allows the user to delete a patient.","rpm_ActionDescriptionListPatientRules":"This permission allows the user to view the list of patient rules.","rpm_ActionDescriptionReadPatientRule":"This permission allows the user to read patient rules.","rpm_ActionDescriptionCreatePatientRule":"This permission allows the user to create patient rules.","rpm_ActionDescriptionDeletePatientRule":"This permission allows the user to delete patient rules.","rpm_ActionDescriptionDismissAlerts":"This permission allows the user to post followup on an active alert.","rpm_ActionDescriptionListRule":"This permission allows the user to view the list of rules attached to patients.","rpm_ActionDescriptionReadRule":"This permission allows the user to view the rule added.","rpm_ActionDescriptionCreateRule":"This permission allows the user to add a new rule to the patient.","rpm_ActionDescriptionDeleteRule":"This permission allows the user to delete a rule.","rpm_ActionDescriptionListCourses":"This permission allows the user to see the list of courses.","rpm_ActionDescriptionReadCourse":"This permission allows the user to read/view courses.","rpm_ActionDescriptionCreateCourse":"This permission allows the user to create a course.","rpm_ActionDescriptionUpdateCourse":"This permission allows the user to update a course.","rpm_ActionDescriptionDeleteCourse":"This permission allows the user to delete a course.","rpm_ActionDescriptionListMedicalHistory":"This permission allows the user to view the list of medical history.","rpm_ActionDescriptionReadMedicalHistory":"This permission allows the user to read the medical history.","rpm_ActionDescriptionCreateMedicalHistory":"This permission allows the user to create the medical history.","rpm_ActionDescriptionUpdateListMedicalHistory":"This permission allows the user to update the medical history.","rpm_ActionDescriptionDeleteMedicalHistory":"This permission allows the user to delete the medical history.","rpm_ActionDescriptionReadMedicalQuestion":"This permission allows the user to read a medical question.","rpm_ActionDescriptionUpdateMedicalQuestion":"This permission allows the user to update a medical question.","rpm_ActionDescriptionListPractitionerNote":"This permission allows the user to view the list of practitioner\'s notes.","rpm_ActionDescriptionCreatePractitionerNote":"This permission allows the user to create practitioner\'s notes.","rpm_ActionDescriptionUpdatePractitionerNote":"This permission allows the user to update practitioner\'s notes.","rpm_ActionDescriptionDeletePractitionerNote":"This permission allows the user to delete practitioner\'s notes.","rpm_ActionDescriptionListNote":"This permission allows the user to view the list of notes.","rpm_ActionDescriptionCreateNote":"This permission allows the user to create notes.","rpm_ActionDescriptionUpdateNote":"This permission allows the user to update notes.","rpm_ActionDescriptionDeleteNote":"This permission allows the user to delete notes.","rpm_ActionDescriptionListTemplate":"This permission allows the user to view list of templates.","rpm_ActionDescriptionListConsultation":"This permission allows the user to view list of consultations.","rpm_RoleLevelTextHelp":"Select the level for which the role is to be made","rpm_ProgramHelp":"Select the program for which the role is to be made","rpm_RoleNameHelp":"Provide a suitable name for the role","rpm_RoleDescriptionHelp":"Provide a brief description for the role","rpm_AddUser_UserNameHelp":"Provide a suitable user name.","rpm_AddUser_FirstNameHelp":"Enter first name of the user.","rpm_AddUser_LastNameHelp":"Enter last name of the user.","rpm_AddUser_EmailHelp":"Enter the email address of the user.","rpm_AddUser_MobileHelp":"Enter the mobile number of the user.","rpm_AddUser_RegistrationHelp":"Enter the registration number of the user.","rpm_UserLevelTextHelp":"Select the level at which the user is to be created","rpm_UserLevelProgramHelp":"Select the program in which the user is to be created","rpm_SystemRoleHelp":"By assigning system role, you are providing root access to the user.","rpm_CustomRoleHelp":"Select the role you want to assign to the user","rpm_ProgramNameHelp":"Select a program to apply the filter","rpm_RoleHelp":"Select the role to be assigned to the user","rpm_ProgramCodeHelp":"Unique program code for self-registration","rpm_DisplayNameHelp":"Enter the name of the program","rpm_ProgramLocationHelp":"Enter the location of the program","rpm_DiseaseCreatedSuccessfully":"Disease added successfully!","rpm_DiseaseUpdateSuccessfully":"Disease updated successfully!","rpm_DiseaseDeleteSuccessfully":"Disease deleted successfully!","rpm_FileDeletedSuccessfully":"File deleted successfully!","rpm_OtherHealthIssuesUpdateSuccessfully":"Other health issues Updated successfully!","rpm_SocialHistoryUpdateSuccessfully":"Social History Updated successfully!","rpm_DownloadFileSuccessfully":"File downloaded successfully!","rpm_DurationValueHelp":"Enter the duration","rpm_DiseaseDurationHelp":"Select the period of duration","rpm_DiseaseRemarkHelp":"Enter your remarks.","rpm_RemarkPlaceHolder":"Enter your remarks here.","rpm_NotePlaceHolder":"Enter your notes here.","rpm_InDays":"in days","rpm_SearchTital":"Search by title","rpm_SearchCourseFilterBar":"Enter a title for the course","rpm_SearchProgramFilterBar":"Enter name of program","rpm_NumericDurationHelp":"Enter the duration of the course","rpm_DurationValuePlaceHolder":"Enter the duration","rpm_DiseaseRelationHelp":"Please select relationship","rpm_DeleteReadingSuccess":"Reading deleted successfully!","rpm_DeleteAlertSuccess":"Alert deleted successfully!","rpm_NoteCreatedSuccessfully":"Note created successfully!","rpm_NoteUpdateSuccessfully":"Note updated successfully!","rpm_NoteDeleteSuccessfully":"Note deleted successfully!","rpm_VitalTypeNoteHelp":"Select the vital type","rpm_FrequencyTypeNoteHelp":"Select the frequency to consume the medication","rpm_AttachCourse":"Attach Course","rpm_AttachCourseText":"The patient already has an active course. Assigning a new course will make the current one inactive. Do you wish to proceed?","rpm_ProgramCityHelp":"Enter the name of the city.","rpm_RepeatCourseHelp":"Select the frequency of the mandate","rpm_ActiveCourseNotDelete":"You cannot delete a course till it is active.","rpm_ProgramCountryHelp":"Select the country in which the program is situated","rpm_ProgramStateHelp":"Select the state in which the program is situated","rpm_PatientCountryHelp":"Select the country of the patient","rpm_PatientStateHelp":"Select the state of the patient","rpm_MedicationNameHelp":"Enter the name of the medicine","rpm_CommentsHelp":"Enter suitable comments for consumption of the medicine","rpm_commentsPlaceHolder":"Enter your comments here ","rpm_ActivityNameHelp":"Enter a name for the activity","rpm_ActivityTypeHelp":"Select the type of activity","rpm_SettingsSavedSuccessfully":"Settings saved successfully","rpm_QrDownloadedSuccessfully":"QR download successfully","rpm_notificationSettingMessage":"This notification has been disabled, please contact the administrator to enable it.","rpm_SearchName":"Search by name","rpm_MedicineNameHelp":"Enter the medicine name","rpm_MedicineFormHelp":"Select the medcine form","rpm_MedicineShapeIconHelp":"Select the medicine\'s shape","rpm_MedicineDaysHelp":"Enter number of days","rpm_PrescriptionCreatedSuccessfully":"Consultation created successfully!","rpm_PrescriptionUpdateSuccessfully":"Consultation updated successfully!","rpm_PrescriptionDeleteSuccessfully":"Consultation deleted successfully!","rpm_FrequencyHelp":"Select the medicine frequency.","rpm_FormHelp":"Select the medicine form.","rpm_CompositionHelp":"Select the medicine salt composition.","rpm_TemplateCreatedSuccessfully":"Template created successfully","rpm_TemplateUpdatedSuccessfully":"Template updated successfully","rpm_TemplateDeleteSuccessfully":"Template deleted successfully","rpm_PatientTransferedSuccessfully":"Patient transfered successfully","rpm_SearchPatientFilterBar":"Enter name of the patient","rpm_SearchUserNumber":"Enter the  mobile number of the user","rpm_SearchTemplateFilterBar":"Enter name of the template","rpm_TemplateDurationHelp":"Enter the duration","rpm_Username":"Username","rpm_SearchByUsername":"Enter the username","rpm_ActionTypeHelp":"Select the action type","rpm_EventCode":"Event Code","rpm_SearchByEventCode":"Enter the event code","rpm_ServiceCode":"Service","rpm_SearchByService":"Enter the name of service","rpm_AddressHelp":"Enter the address","rpm_Description":"Description","rpm_SearchByDescription":"Enter the log description here","rpm_DefaultRuleTitle":"Default Rule","rpm_DefautRuleBodyText":"Making this rule default will also make it active and will reset the existing default rule. Do you wish to continue?","rpm_SaveTitle":"Conflicting Reminders","rpm_SearchProgramNameSearchBar":"Enter the program name","rpm_FormikFieldError":"All required fields must be filled to continue.","rpm_confirmation":"Default Program","rpm_defaultProgramConfirm":"Do you want to make this as your default program for mobile? This action will change your current default program, which is \\"{{program}}\\". Want to continue?","rpm_downloadStart":"File download in progress","rpm_CountryCodeHelp":"Select the country code","rpm_FacilityProgramHelp":"Select the facility type of the program.","rpm_GoalCreatedSuccessfully":"Goal Created Successfully!","rpm_DeleteGoalSuccess":"Goal deleted successfully!","rpm_DeleteWorkoutSuccess":"Workout deleted successfully!","rpm_ExerciseUpdatedSuccessfully":"Exercise Updated Successfully","rpm_GoalSelectedSuccessfully":"Goals saved successfully!","rpm_UnassignTitle":"Unassign Record","rpm_UnassignBody":"Are you sure you want to Unassign?","assign_unassignRootUser":"You can\u2019t unassign yourself as the root user.","rpm_PackageAdded":"Package Attached successfully","rpm_ProgramPackageEditedSuccess":"Package edited successfully","rpm_packageDeleteSuccess":"Package deleted successfully","rpm_DeletePackage":"Delete Package","rpm_DeletePackageText":"Are you sure you want to delete {{packageName}} Package?","rpm_packageUpdatedSuccess":"Package Updated Successfully.","rpm_packageCreatedSuccess":"Package created successfully.","rpm_packageSaveFailed":"Failed to save package. Please try again."}'),it=JSON.parse('{"rpm_RPM":"All Programs","rpm_Back":"Back","rpm_Next":"Next","rpm_Copy":"Copy","rpm_Download":"Download","rpm_Save":"Save","rpm_Update":"Update","rpm_Undo":"Undo","rpm_Cancel":"Cancel","rpm_Submit":"Submit","rpm_SelectAll":"Select All","rpm_Value":"Value","rpm_Confirm":"Confirm","rpm_Delete":"Delete","rpm_Edit":"Edit","rpm_Add":"Add","rpm_BackToHome":"Back To Home","rpm_Message":"Message","rpm_Active":"Active","rpm_Home":"Home","rpm_Select":"Select","rpm_AlertMessage":"Follow Up Message","rpm_AccountId":"Account Id","rpm_Login":"Login","rpm_LoginWelcomeText":"Welcome! Please login to your account.","rpm_JohnDeo":"John Deo","rpm_Name":"Name","rpm_Time":"Time","rpm_Systolic":"Systolic","rpm_Diastolic":"Diastolic","rpm_Status":"Status","rpm_O2Level":"O2Level","rpm_Search":"Search","rpm_Reset":"Reset","rpm_Filter":"Filter","rpm_ViewConsultation":"View Consultation","rpm_CreateConsultation":"Create Consultation","rpm_MoreOption":"More Option","rpm_edit":"Edit","rpm_Yes":"Yes","rpm_No":"No","rpm_Activity":"Activity","rpm_AllPatients":"All Patients","rpm_Patient":"Patient","rpm_Patients":"Patients","rpm_PatientWelcome":"Welcome to the patient list explore the reports","rpm_AddPatient":"Add Patient","rpm_ViewAllPatient":"Click here for all Yourpal patients","rpm_AllUsersList":"All Users List","rpm_PatientID":"Patient ID","rpm_PatientName":"Patient Name","rpm_bp":"Blood Pressure","rpm_BP":"Blood Pressure","rpm_BPr":"Blood Pressure(Sys/Dia/Pulse)","rpm_Flags":"Flags","rpm_PulseRate":"Pulse Rate","rpm_Glucose":"Glucose","rpm_Date":"Date","rpm_Actions":"Actions","rpm_Pulse":"Pulse","rpm_Dia":"Dia","rpm_Sys":"Sys","rpm_MobileNumber":"Mobile Number","rpm_DateOfBirth":"Date Of Birth","rpm_RecordedOn":"Recorded On","rpm_Mobile":"Mobile","rpm_CountryCode":"Country Code","rpm_Registration":"Registration No.","rpm_ListView":"List View","rpm_GridView":"Grid View","rpm_TableCellSetting":"Table cell settings","rpm_AddNewPatient":"Add New Patient","rpm_TableSetting":"Table Column Settings","rpm_TableSettingInfo":"Select/unselect the checkbox to show/hide the columns in the table","rpm_medicalCharts":"Medical Chart","rpm_medicalHistory":"Medical History","rpm_patientCourses":"Patient Courses","rpm_patientRules":"Patient Rules","rpm_personalDetails":"Personal Details","rpm_devices":"Devices","rpm_TotalPatient":"Total Patients","rpm_CriticalPatient":"Critical Patient","rpm_AlertPatient":"Alert Patients","rpm_InactivePatient":"Inactive Patients","rpm_ActivePatient":"Active Patients","rpm_NonCompliancePatient":"Non Compliance Patient","rpm_NonCompliance":"Non Compliance","rpm_ComplianceSummary":"Compliance Summary","rpm_Vitals":"Vitals","rpm_Population":"Population","rpm_AgeGroup":"Age Group","rpm_Gender":"Gender","rpm_PersonalDisease":"Personal Disease","rpm_OtherHealthIssue":"Addiction","rpm_FamilyDisease":"Family Disease","rpm_Disease":"Disease","rpm_SubCategory":"Sub Category","rpm_TimePeriod":"Time Period","rpm_Rule":"Rule","rpm_Rules":"Rules","rpm_AddRule":"Add Rule","rpm_Operator":"Operator","rpm_Id":"Id","rpm_AppliedOn":"Applied On","rpm_VitalType":"Vital Type","rpm_ProcessingMode":"Processing Mode","rpm_BatchSize":"Batch Size","rpm_BatchDataSize":"Batch Size","rpm_DateCreated":"Date Created","rpm_DateModified":"Modified date","rpm_AddNewRule":"Add New Rule","rpm_ShortDescription":"Description","rpm_Programs":"All Programs","rpm_Location":"Location","rpm_ProgramLocation":"Program Location","rpm_ModifiedBy":"Modified by","rpm_AddProgram":"Add Program","rpm_FirstName":"First Name","rpm_LastName":"Last Name","rpm_Email":"Email","rpm_DOB":"DOB","rpm_Device":"Device","rpm_Observer":"Observer","rpm_Devices":"Devices","rpm_SerialNumber":"Serial Number","rpm_ModelNumber":"Model Number","rpm_LastActivity":"Last Activity","rpm_ViewRule":"View Rule","rpm_AssignDevice":"Assign Device","rpm_Dashboard":"Dashboard","rpm_PersonalDetail":"Personal Detail","rpm_PatientHistory":"Patient History","rpm_Title":"Title","rpm_Description":"Description","rpm_Readings":"Readings","rpm_activity":"Activity","rpm_Conditions":"Conditions","rpm_CreatedAt":"Created At","rpm_Vital":"Vital","rpm_MedicalHistory":"Medical History","rpm_AddDisease":"Add Disease","rpm_AddNewDisease":"Add New Disease","rpm_Category":"Category","rpm_primary_muscle":"Primary Muscle","rpm_Duration":"Duration","rpm_FollowUpDate":"Follow-Up Date","rpm_ConsultationId":"Id","rpm_ChangePassword":"Change Password","rpm_CurrentPassword":"Current Password","rpm_NewPassword":"New Password","rpm_ConfirmPassword":"Confirm Password","rpm_passwordStandards":"Password Must Contain","rpm_passwordInstruction1":"At least 8 characters in length.","rpm_passwordInstruction2":"Maximum 20 characters allowed.","rpm_passwordInstruction3":"At least one uppercase letter (A-Z).","rpm_passwordInstruction4":"At least one lowercase letter (a-z).","rpm_passwordInstruction5":"At least one digit (0-9).","rpm_passwordInstruction6":"At least one special character.","rpm_Profile":"Profile","rpm_EditProfile":"Edit Profile","rpm_GeneralInformation":"General Details","rpm_AddressInformation":"Address","rpm_Address":"Address","rpm_AddressLine1":"Address Line 1","rpm_AddressLine2":"Address Line 2","rpm_CountryRegion":"Country / Region","rpm_StateProvince":"State / Province","rpm_City":"City","rpm_PostalCodeZip":"Postal Code / Zip","rpm_Role":"Role","rpm_SelectRole":"Select Role","rpm_Roles":"Roles","rpm_RoleName":"Role Name","rpm_RoleDescription":"Role Description","rpm_AccessLevel":"Access Level","rpm_CreateRole":"Create Role","rpm_AddNewCustomRole":"Add New Custom Role","rpm_RoleLevelText":"Where do you want to create this role?","rpm_AddRole":"Add Role","rpm_EditRole":"Edit Role","rpm_SelectProgram":"Select Program","rpm_SelectRoleType":"Select Role Type","rpm_rootTypeRole":"Client","rpm_programTypeRole":"Program","rpm_Permissions":"Permissions","rpm_Details":"Details","rpm_RoleUserText":"Select the level of the user","rpm_Users":"Users","rpm_RoleLevel":"Role Level","rpm_UserLevel":"User Level","rpm_UserName":"User Name","rpm_FullName":"Full Name","rpm_Staff":"Staff","rpm_CreateUser":"Create User","rpm_CreateAnotherUser":"Create Another User","rpm_EmailAddress":"Email Address","rpm_SystemRole":"System Role","rpm_CustomRole":"Custom Role","rpm_PredefinedRole":"Predefined Role","rpm_SystemRoles":"System Roles","rpm_CustomRoles":"Custom Roles","rpm_PredefinedRoles":"Predefined Roles","rpm_rootTypeRoleSystem":"Root","rpm_EditUser":"Edit User","rpm_UserDetail":"User Detail","rpm_MyInformation":"My Information","rpm_AssignedRoles":"Assigned Roles","rpm_PasswordReset":"Password Reset","rpm_ProgramId":"Program Id","rpm_ProgramName":"Program Name","rpm_AssignedDate":"Assigned Date","rpm_UnassignClient":"Unassign Client","rpm_Assign":"Assign","rpm_AssignLevel":"Assign Level","rpm_SelectLevel":"Select Level","rpm_AssignRole":"Assign Role","rpm_UnassignRole":"Unassign Role","rpm_RemoveProgram":"Remove Program","rpm_Minimum":"Minimum","rpm_Maximum":"Maximum","rpm_Average":"Average","rpm_FollowUpComment":"Follow Up Comment","rpm_Followupcomment":"Follow-up comment","rpm_SearchByName":"Search by name","rpm_SearchHere":"Search here.....","rpm_ActiveAlerts":"Active Alerts","rpm_ResolvedAlerts":"Resolved Alerts","rpm_FollowUp":"Follow Up","rpm_PatientInfo":"Personal Details","rpm_MaritalStatus":"Marital Status","rpm_Country":"Country","rpm_Address1":"Address 1","rpm_Address2":"Address 2","rpm_Parent":"Parent","rpm_Height":"Height","rpm_Weight":"Weight","rpm_Age":"Age","rpm_Pin":"Pin","rpm_State":"State","rpm_BloodGroup":"Blood Group","rpm_ProfessionalDetail":"Professional Details","rpm_Speciality":"Speciality","rpm_Experience":"Experience","rpm_ConsultingLanguage":"Preferred Language","rpm_ProfessionalBio":"Professional Bio","rpm_HighestQualifications":"Highest Qualifications","rpm_AddNewProgram":"Add New Program","rpm_EditProgram":"Edit Program","rpm_ProgramCode":"Program Code","rpm_DisplayName":"Program Name","rpm_ChartView":"Chart View","rpm_TableView":"Table View","rpm_Trend":"Trend","rpm_AllStage":"All","rpm_StageDistribution":"Stage Distribution","rpm_NormalPressure":"Normal Blood Pressure","rpm_NormalBP":"Normal Blood Pressure","rpm_LowBloodPressure":"Low Blood Pressure","rpm_ElevatedBloodPressure":"Elevated Blood Pressure","rpm_HighBloodPressure":"High Blood Pressure Stage1","rpm_HighBloodPressureStage2":"High Blood Pressure Stage2","rpm_HypertensiveCrisis":"Hypertensive Crisis","rpm_CheckLowBP_Batch":"Low Blood Pressure","rpm_ElevatedBloodPressure_Batch":"Elevated Blood Pressure","rpm_Hypertension_Stage1_Batch":"Hypertension Stage 1","rpm_Hypertensive_Stage2_Batch":"Hypertensive Stage 2","rpm_Hypertensive_Crisis_Batch":"Hypertensive Crisis","rpm_Schedule":"Course","rpm_Schedules":"Courses","rpm_ScheduleTitle":"Course Title","rpm_AddNew":"Add New","rpm_AddNewSchedule":"Add New Course","rpm_CreateNewSchedule":"Create New Course","rpm_StartDate":"Start Date","rpm_EndDate":"End Date","rpm_CreateAMandate":"Create a mandate","rpm_CreateMandate":"Create Mandate","rpm_Mandate":"Mandate","rpm_ChooseVital":"Choose Vital","rpm_StartTime":"Start Time","rpm_EndTime":"End Time","rpm_MissedReadingNotification":"Missed Reading Notification","rpm_ReminderNotificationText":"Reading Reminder Notification","rpm_PREReminderNotificationText":"Pre Reminder Notification","rpm_SendPreReminder":"Send Pre-reminder","preReminder_helpText":"One pre-reminder notification will be sent to the patient.","rpm_Mins":"mins","rpm_MissedReading":"Missed Reading","rpm_ReadingReminder":"Reading Reminder","rpm_ReadingReminderTime":"Reminder Time","rpm_ReadingReminderMsg":"Reminder Message","rpm_ScheduleDetails":"Course Details","rpm_MandateDetails":"Mandate Details","rpm_NoOfMandate":"No. Of Mandate","rpm_MaxStrike":"Max Strike","rpm_EditSchedule":"Edit Course","rpm_SendBefore":"Send Before","rpm_NonComplianceSetting":"Non Compliance Settings","rpm_MandateSetting":"Mandate Settings","rpm_ScheduleName":"Course Name","rpm_Program":"Program","rpm_NonComplianceNotification":"Non Compliance Notification","rpm_MaxStrikes":"Max Strikes","rpm_CreateAnotherSchedule":"Create Another Course","rpm_RuleName":"Rule Name","rpm_BpLevel":"Blood Pressure Level","rpm_Condition":"Condition","rpm_DurationOfCourse":"Course Duration (in days)","rpm_VitalName":"Vital Name","rpm_SendInEveryMin":"Send in every mins","rpm_Repetition":"Repetition","rpm_Notification":"Notification","rpm_Mandates":"Mandates","rpm_AssignSchedule":"Assign Course","rpm_SearchSchedule":"Search Course","rpm_SearchProgram":"Search Program","rpm_SendInEvery":"Send in Every ","rpm_SystolicRange":"Systolic Range","rpm_DiastolicRange":"Diastolic Range","rpm_PulseRange":"Pulse Range","rpm_ActionTag_users":"Users","rpm_ActionTag_roles":"Roles","rpm_ActionTag_groups":"Groups","rpm_ActionTag_policies":"Policies","rpm_ActionTag_appearance":"Appearance","rpm_ActionTag_global-settings":"Global Settings","rpm_ActionTag_programs":"Programs","rpm_ActionTag_patients":"Patients","rpm_ActionTag_rules":"Rules","rpm_ActionTag_courses":"Courses","rpm_ActionTag_medical-history":"Medical History","rpm_ActionTag_notes":"Notes","rpm_ActionTag_prescription-templates":"Rx Templates","rpm_ActionTag_consultation-permission":"Consultations","rpm_ActionListUsers":"List Users","rpm_ActionReadUser":"Read User","rpm_ActionCreateUser":"Create User","rpm_ActionUpdateUser":"Update User","rpm_ActionDeleteUser":"Delete User","rpm_ActionManageUserPolicies":"Manage User\'s Policies","rpm_ActionListRoles":"List Roles","rpm_ActionReadRole":"Read Role","rpm_ActionCreateRole":"Create Role","rpm_ActionUpdateRole":"Update Role","rpm_ActionDeleteRole":"Delete Role","rpm_ActionManageRolePolicies":"Manage Role Policies","rpm_ActionListGroups":"List Groups","rpm_ActionReadGroup":"Read Group","rpm_ActionCreateGroup":"Create Group","rpm_ActionDeleteGroup":"Delete Group","rpm_ActionUpdateGroup":"Update Group","rpm_ActionListPolicies":"List Policies","rpm_ActionReadPolicy":"Read Policy","rpm_ActionCreatePolicy":"Create Policy","rpm_ActionUpdatePolicy":"Update Policy","rpm_ActionDeletePolicy":"Delete Policy","rpm_ActionListTemplates":"List Templates","rpm_ActionReadTemplate":"Read Template","rpm_ActionCreateTemplate":"Create Template","rpm_ActionUpdateTemplate":"Update Template","rpm_ActionDeleteTemplate":"Delete Template","rpm_ActionUpdateConsoleElements":"Update Console Elements","rpm_ActionReadMFASettings":"Read MFA Settings","rpm_ActionUpdateMFASettings":"Update MFA Settings","rpm_ActionReadPasswordPolicy":"Read Password Policy","rpm_ActionUpdatePasswordPolicy":"Update Password Policy","rpm_ActionListPrograms":"List Programs","rpm_ActionReadProgram":"Read Program","rpm_ActionCreateProgram":"Create Program","rpm_ActionUpdateProgram":"Update Program","rpm_ActionListAllPatients":"All Yourpal Patients","rpm_ActionListPatients":"List of Patients","rpm_ActionReadPatient":"Read Patient","rpm_ActionCreatePatient":"Create Patient","rpm_ActionUpdatePatientProfile":"Update Patient Profile","rpm_ActionUpdatePatientConfiguration":"Update Patient Configuration","rpm_ActionDeletePatients":"Delete Patients","rpm_ActionListPatientRules":"List Patient Rules","rpm_ActionReadPatientRule":"Read Patient Rule","rpm_ActionCreatePatientRule":"Create Patient Rule","rpm_ActionDeletePatientRule":"Delete Patient Rule","rpm_ActionDismissAlerts":"Dismiss Alerts","rpm_ActionListRule":"List Rules","rpm_ActionReadRule":"Read Rule","rpm_ActionCreateRule":"Create Rule","rpm_ActionDeleteRule":"Delete Rule","rpm_ActionListCourses":"List Courses","rpm_ActionReadCourse":"Read Course","rpm_ActionCreateCourse":"Create Course","rpm_ActionUpdateCourse":"Update/Edit Course","rpm_ActionDeleteCourse":"Delete Course","rpm_ActionListMedicalHistory":"List Medical History","rpm_ActionReadMedicalHistory":"Read Medical History","rpm_ActionCreateMedicalHistory":"Create Medical History","rpm_ActionUpdateListMedicalHistory":"Update Medical History","rpm_ActionDeleteMedicalHistory":"Delete Medical History","rpm_ActionReadMedicalQuestion":"Read Medical Question","rpm_ActionUpdateMedicalQuestion":"Update Medical Question","rpm_ActionListPractitionerNote":"List Practitioner Notes","rpm_ActionCreatePractitionerNote":"Create Practitioner Note","rpm_ActionUpdatePractitionerNote":"Update Practitioner Note","rpm_ActionDeletePractitionerNote":"Delete Practitioner Note","rpm_ActionListNote":"List Notes","rpm_ActionCreateNote":"Create Note","rpm_ActionUpdateNote":"Update Note","rpm_ActionDeleteNote":"Delete Note","rpm_ActionListConsultation":"List of Consultations","rpm_ActionListTemplate":"List Prescription Templates","rpm_Male":"Male","rpm_Female":"Female","rpm_Other":"Other","rpm_TotalReadings":"Total Readings","rpm_TotalAlerts":"Total Alerts","rpm_DiseaseName":"Disease Name","rpm_Remarks":"Remarks","rpm_Reports":"Reports","rpm_AddReports":"Add Reports","rpm_UploadReport":"Add reports here","rpm_Days":"Days","rpm_Months":"Months","rpm_Years":"Years","rpm_OtherHealthIssues":"Social History","rpm_AddReportsHere":"Add Reports Here","rpm_ChooseFile":"Choose File","rpm_FamilyMedicalHistory":"Family Medical History","rpm_Relationship":"Relationship","rpm_Father":"Father","rpm_Mother":"Mother","rpm_Sibling":"Sibling","rpm_Child_Son/Daughter":"Child (Son/Daughter)","rpm_GrandParent":"GrandParent","rpm_Note":"Note","rpm_Notes":"Notes","rpm_AddNote":"Add Note","rpm_AddNewNote":"Add New Note","rpm_AddNewPrescription":"Add New Prescription","rpm_snum":"S.No.","rpm_NoteResolvedAlerts":"Resolved Alerts","rpm_NotePrescription":"Prescription","rpm_AdminNote":"Admin Note","rpm_AdminNoteSearch":"Add your consultation advice in note more than 4000 characters","rpm_SummaryNote":"Summary Notes","rpm_at":"At","rpm_Created_By":"Created By","rpm_Modified_By":"Modified By","rpm_ConsultationNote":"Consultation Notes","rpm_UploadMore":"Upload More","rpm_ShowMore":"Show More","rpm_Less":"Less","rpm_NotificationsSetting":"Notification Settings","rpm_BMI":"BMI","rpm_Courses":"Courses","rpm_Prescribed":"Prescribed","rpm_LastReading":"Last Reading","rpm_Donut":"Donut","rpm_BloodPressure":"Blood Pressure","rpm_BloodGlucose":"Blood Glucose","rpm_glucose":"Blood Glucose","rpm_GlucoseFasting":"Glucose Fasting","rpm_GlucosePP":"Glucose PP","rpm_fasting":"Fasting","rpm_nonFasting":"Non Fasting","rpm_after_breakfast_2hr":"After Breakfast","rpm_before_lunch":"Before Lunch","rpm_after_lunch_2hr":"After Lunch","rpm_before_dinner":"Before Dinner","rpm_after_dinner_2hrs":"After Dinner","rpm_Event":"Event","rpm_NormalGlucose":"Normal Glucose Level","rpm_hypoglycemia":"Hypoglycemia","rpm_prediabetes":"Prediabetes","rpm_diabetes":"Diabetes","rpm_normal":"Normal","rpm_HypoglycemiaDescPP":"Hypoglycemia in non fasting state","rpm_PrediabetesDescPP":"Prediabetes in non fasting state","rpm_DiabetesDescPP":"Diabetes in non fasting state","rpm_DiabetesFastingDesc":"Diabetes in fasting state","rpm_PrediabetesFastingDesc":"Prediabetes in fasting state","rpm_HypoglycemiaFastingDesc":"Hypoglycemia in fasting state","rpm_NormalPPDesc":"Normal in non fasting state","rpm_NormalFastingDesc":"Normal in fasting state","rpm_FastingRule":"Fasting Rule","rpm_PPRule":"Non Fasting Rule","rpm_ApplyFilters":"Apply Filters","rpm_ClearFilters":"Clear Filters","rpm_Medication":"Medication","rpm_Frequency":"Frequency","rpm_Dosage":"Dosage","rpm_Comment":"Comment","rpm_Comments":"Comments","rpm_MedicationName":"Medication Name","rpm_EmptyNotesText":"You haven\u2019t added any note yet","rpm_AddNewMedication":"+ Add new medication","rpm_High blood pressure (Hypertensive Crisis)":"Hypertension Crisis","rpm_High blood pressure (Hypertension Stage 2)":"Hypertension Stage 2","rpm_High blood pressure (Hypertension Stage 1)":"Hypertension Stage 1","rpm_Elevated blood pressure":"Elevated blood pressure","rpm_Low blood pressure":"Low blood pressure","rpm_shapeColor":"Shape & Color","rpm_Shape":"Shape","rpm_Color":"Color","rpm_form":"Form","rpm_strength":"Strength","rpm_days":"Days","rpm_unit":"Unit","rpm_prescriptionID":"Prescription ID","rpm_view":"View","rpm_print":"Print","rpm_Hypertensive_CrisisDesc":"High blood pressure (Hypertensive Crisis)","rpm_Hypertensive_Stage2Desc":"High blood pressure (Hypertensive Stage 2)","rpm_Hypertension_Stage1Desc":"Hypertension Stage 1","rpm_ElevatedBloodPressureDesc":"Elevated blood pressure","rpm_CheckLowBPDesc":"Low blood pressure","rpm_CheckLowBP":"Low Blood Pressure","rpm_Hypertension_Stage1":"Hypertension Stage 1","rpm_Hypertensive_Stage2":"Hypertensive Stage 2","rpm_Hypertensive_Crisis":"Hypertensive Crisis","rpm_PrescriptionNotes":"Prescription Notes","rpm_AdminNotes":"Admin Notes","rpm_ConsultationNotes":"Consultation Notes","rpm_SummaryNotes":"Summary Notes","rpm_OtherNotes":"Other Notes","rpm_ResolvedNotes":"Resolved Notes","rpm_DoctorName":"Doctor\'s Name:","rpm_PrescriptionId":" Prescription Id:","rpm_NameOfPatient":" Name Of Patient:","rpm_Medicine":"Medicine","rpm_Custom":"Custom","rpm_Present":"Present","rpm_Close":"Close","rpm_AgeGender":"Age/Gender","rpm_PatientId":"Patient Id","rpm_VitalStats":"Vital Stats","rpm_Relation":"Relation","rpm_ReadingAlerts":"Reading Alerts","rpm_RecentReadings":"Recent Readings","rpm_DoctorNotes":"Doctor Notes","rpm_COURSE":"COURSE","rpm_Print":"Print","rpm_sign":"sign","rpm_BgLevel":"Blood Glucose Level","rpm_AdditionalNotes":"Additional Notes","rpm_Attachment":"Attachments","rpm_Addprescription":"Add prescription","rpm_AddConsultation":"Add consultation","rpm_AgeYears_one":"{{count}} Year","rpm_AgeYears_other":"{{count}} Years","rpm_Signature":"Signature","rpm_Compliance":"Compliance","rpm_Compliant":"Compliant","rpm_NonCompliant":"Non-Compliant","rpm_DiabetesFasting":"Diabetes Fasting","rpm_PrediabetesFasting":"Prediabetes Fasting","rpm_HypoglycemiaFasting":"Hypoglycemia Fasting","rpm_DiabetesPP":"Diabetes PP","rpm_PrediabetesPP":"Prediabetes PP","rpm_HypoglycemiaPP":"Hypoglycemia PP","rpm_NormalFasting":"Normal Fasting","rpm_NormalPP":"Normal PP","rpm_diabetesfasting":"Diabetes","rpm_prediabetesfasting":"Prediabetes","rpm_hypoglycemiafasting":"Hypoglycemia","rpm_diabetespp":"Diabetes","rpm_prediabetespp":"Prediabetes","rpm_hypoglycemiapp":"Hypoglycemia","rpm_normalfasting":"Normal","rpm_normalpp":"Normal","rpm_normalBP":"Normal blood pressure","rpm_From":"From","rpm_To":"To","rpm_alreadyAttachedCourseEdit":"The course can not be edited as it is assigned to the patient","rpm_alreadyAttachedCourseDelete":"The course can not be deleted as it is assigned to the patient","rpm_Repeat":"Repeat","rpm_DateTime":"Date & Time","rpm_ProgramCity":"City","rpm_ProgramCountry":"Country","rpm_ProgramState":"State","rpm_NonCompliantPatients":"Non-Compliant Patients","rpm_CompliantPatients":"Compliant Patients","rpm_NotificationsDetails":"Notifications Details","rpm_PrintReport":"Print Report","rpm_PulseLevel":"Pulse Level","rpm_Tachycardia":"Tachycardia","rpm_Bradycardia":"Bradycardia","rpm_NormalPulse":"Normal Pulse","rpm_pulse":"Pulse","rpm_bp.pulse":"Pulse","rpm_bradycardia":"Bradycardia","rpm_tachycardia":"Tachycardia","rpm_TachycardiaDesc":"Tachycardia","rpm_BradycardiaDesc":"Bradycardia","rpm_Trends":"Trends","rpm_InstrumentReadings":"Instrument Readings","rpm_PrescribedMedications":"Prescribed Medications","rpm_AdvisedBy":"Advised By","rpm_MissedReadings":"Missed Readings","rpm_summarized":"Summarized","rpm_detailed":"Detailed","rpm_ActivityName":"Activity Name","rpm_ActivityType":"Activity Type","rpm_nonfasting":"Non-Fasting","rpm_preReminderTime":"Pre-Reminder Time","rpm_PreReminder":"Pre Reminder","rpm_Level":"Level","rpm_PulseRule":"Pulse Rule","rpm_Breakfast":"Breakfast","rpm_BloodPressureRule":"Blood Pressure Rule","rpm_EmailNotification":"Email Notification","rpm_NotificationSettings":" Notification Settings","rpm_SMSNotifications":"SMS Notifications","rpm_EmailNotifications":"Email Notifications","rpm_PushNotifications":"Push Notifications","rpm_OTPLogin":"OTP at the time of login","rpm_OTPLoginDescription":"The patient receives an OTP at the time of login.","rpm_EmailReadingReminderDescription":" The patient will receive reading reminders on their registered email ID.","rpm_MissedMandate":"Missed Mandate","rpm_EmailMissedMandateDescription":"The patient will receive an email for every mandate missed on their registered email ID.","rpm_NonCompliantUser":"Non-Compliant User","rpm_EmailNonCompliantUserDescription":"The patient will receive an email on their registered email id on becoming non-compliant.","rpm_PushReadingReminderDescription":"The patient will receive reading reminders through the in-app notifications.","rpm_PushMissedMandateDescription":"The patient will receive an in-app notification on every mandate missed.","rpm_PushNonCompliantUserDescription":" The patient will receive an in-app notification on becoming non-compliant on an assigned course.","rpm_ScheduleDescription":"The patient will receive in-app notifications on their registered mobile number on course assignment, before the assigned course ends, and on assigned course termination.","rpm_PrescriptionDescription":"The patient will receive in-app notification on their registered mobile number on every prescription issuance.","rpm_MedicalHistoryDescription":"The patient will receive in-app notification on their registered mobile number on every medical history record creation or updation.","rpm_ProfileDescription":" The patient will receive in-app notification on their registered mobile number on every profile updation.","rpm_RuleDescription":" The patient will receive in-app notification on their registered mobile number on every personalized rule creation.","rpm_WhatsappNotifications":"WhatsApp Notifications","rpm_WhatsappDescription":"The patient will receive welcome messages through WhatsApp on their registered mobile number.","rpm_NotesDescription":"The patient will receive in-app notification on their registered mobile number on every consultation note issuance.","rpm_Stages":"Stages","rpm_BpRange(Sys/Dia)":"Range (Sys/Dia)","rpm_Range":"Range","rpm_Notifications":"Notifications","rpm_NoCourseAttached":"No course attached","rpm_PatientsEnrolled":"Patients Enrolled","rpm_active":"Active","rpm_inactive":"Inactive","rpm_upcoming":"Upcoming","rpm_Alerts":"Alerts","rpm_Calendar":"Calendar","rpm_ALLPatients":"All Patients","rpm_ALLCourses":"All Courses","rpm_NON_COMPLIANT":"Non Compliant","rpm_ErrorInSlider":"Error in rule slider","rpm_Diabetes":"Diabetes","rpm_Pre-diabetes":"Pre-Diabetes","rpm_Hypoglycemia(Low)":"Hypoglycemia(Low)","rpm_Normal":"Normal","rpm_PrescriptionForReminder":"Prescription For Reminder","rpm_Shape&Color":"Shape & Color","rpm_Composition":"Salt Composition","rpm_Strength":"Strength","rpm_Form":"Form","setReminder":"Set Reminders","rpm_prescriptionDuration":"Prescription Duration","rpm_consultationDuration":"Consultation Duration","rpm_consultationID":"Consultation Id","rpm_RxTemplates":"Rx Templates","rpm_MedicineName":"Medicine name","rpm_MedicineForm":"Medicine form","uploadImage":"Upload Image","rpm_prescription":"Prescriptions","rpm_consultation":"Consultations","rpm_SaveAsTemplate":"Save As Template","rpm_SaveTemplate":"Save Template","rpm_UseTemplate":"Use Template","rpm_TemplateName":"Template Name","rpm_savePrescription":"Save Prescription","rpm_other":"Other","rpm_Others":"Others","rpm_others":"Others","rpm_UpdatedOn":"Updated On","rpm_PrescriptionTemplates":"Prescription Templates","rpm_PrescriptionTemplate":"Prescription Template","rpm_TemplateId":"Template ID","rpm_Addtemplate":"Add Template","rpm_UploadRx":"Upload Rx","rpm_templateName":"Template Name","rpm_templateId":"Template Id","rpm_TemplateDetails":"Template Details","rpm_AddMedicine":"Add Medicine","rpm_TransferProgram":"Transfer Program","rpm_Transfer":"Transfer","rpm_AddNewTemplate":"Add new template","rpm_RxUploadError":"This is a required field","rpm_RxUploadFileError":"Only PDF and image files (JPEG, PNG, GIF, BMP) are allowed","tableSettingsTitle":"Table Column Settings","tableSettingsContent":"Table can be customized with the required columns as per your needs. Click on the gear icon and select the columns you want to display on the screen.","tourProgramTitleStep0":"List of Programs/Hospitals","tourProgramContentStep0":"This table shows a list of all the programs/hospitals you have access to. You can click on a program/hospital name to access its dashboard.","tourProgramTitleStep1":"Actions Column","tourProgramContentStep1":"You can view program-level dashboard, courses and rules by clicking on the relevant icons in this column.","tourProgramTitleStep2":"Add New Program","tourProgramContentStep2":"You can add a new program by clicking on this button.","tourProgramTitleStep3":"Search Programs","tourProgramContentStep3":"Click on search for a program using the program\'s name.","tourProgramTitleStep4":"My Profile","tourProgramContentStep4":"Click the profile icon to access your account, change your password, view the user manual, or log out.","tourProgramTitleStep5":"Select Program","tourProgramContentStep5":"Click on the search bar to search for a program by its name.","tourProgramTitleStep6":"Manage users","tourProgramContentStep6":"From here, you can access staff members, roles, and their permissions.","tourDashboardTitleStep0":"Program Matrices","tourDashboardContentStep0":"These matrices provide information like total number of patients registered under YourPal, total number of patients currently having active courses for each vital, total number of alerts generated per vital, number of patients that have taken readings as per doctor\'s prescribed mandates and are therefore compliant, etc.","tourDashboardTitleStep1":"All Patients List","tourDashboardContentStep1":"This is a list of patients enrolled in YourPal. You can either click on a patient\'s name or search by the patient\'s name for more details.","tourDashboardTitleStep2":"All Courses List","tourDashboardContentStep2":"This is a list of courses created for your hospital. You can either click on a course\'s name or search by the course\'s name for more details.","tourDashboardTitleStep3":"Program Medicine Database","tourDashboardContentStep3":"Download the program medicine database to view all saved medicines.","tourPatientsTitleStep0":"Filter Patients","tourPatientsContentStep0":"You can search for a patient using the patient\'s name.","tourPatientsTitleStep1":"Add New Patient","tourPatientsContentStep1":"You can add a new patient by clicking on this button.","tourPatientsTitleStep2":"Add Patient to the Program","tourPatientsContentStep2":"View the list of all YourPal patients. Click on a patient to add them to the program.","tourPatientsTitleStep3":"Actions Column","tourPatientsContentStep3":"You can view patient details, access all patient-level features, and delete a patient.","tourScheduleTitleStep0":"Filter Courses","tourScheduleContentStep0":"You can search a course using a course name, vital type and/or duration.","tourScheduleTitleStep2":"Add New Course","tourScheduleContentStep2":"You can create a new course by clicking on this button.","tourProgramRulesTitleStep0":"Add New Rule","tourProgramRulesContentStep0":"You can create a new rule by clicking on this button.","tourTemplateTitleStep0":"Filter Templates","tourTemplateContentStep0":"You can search templates using its name, vital type and/or duration.","tourTemplateTitleStep1":"Add New Template","tourTemplateContentStep1":"You can create a new template for prescriptions by clicking on this button.","tourMedicalHistoryTitleStep0":"Add New Disease","tourMedicalHistoryContentStep0":"You can add details of a disease for this section by clicking on this button.","tourMedicalHistoryTitleStep1":"Social History","tourMedicalHistoryContentStep1":"You can provide details regarding patient\'s social activities by clicking on this button.","tourMedicalHistoryTitleStep2":"Family Medical History","tourMedicalHistoryContentStep2":"You can visit patient\'s family medical history section by clicking on this button.","tourMedicalHistoryTitleStep3":"Actions","tourMedicalHistoryContentStep3":"From this column, you can edit, or delete medical history by clicking on the appropriate icons.","tourPatientCoursesTitleStep0":"Filter Patient Courses","tourPatientCoursesContentStep0":"You can filter courses assigned to this patient based on vital type from here.","tourPatientCoursesTitleStep1":"Assign Courses","tourPatientCoursesContentStep1":"You can assign a new course to this patient and set its start date from here.","tourPatientRulesTitleStep0":"Add Rule","tourPatientRulesContentStep0":"You can add a personalized rule for this patient from here.","tourPatientRulesTitleStep1":"Rules List","tourPatientRulesContentStep1":"This table lists all the personalized rules of a patient. You can click on a rule title to view its details.","tourPrescriptionTitleStep0":"Filter Consultation","tourPrescriptionContentStep0":"You can filter prescriptions for this patient using vital type and duration from here.","tourPrescriptionTitleStep1":"Add New Consultation","tourPrescriptionContentStep1":"You can create a new prescription for this patient by clicking on this button.","tourPrescriptionTitleStep2":"Actions","tourPrescriptionContentStep2":"From here, you can view, edit, print, or delete consultations by clicking on the appropriate icons in the column.","tourNotesTitleStep0":"Filter Notes","tourNotesContentStep0":"You can filter the available notes by vital type and duration from here.","tourNotesTitleStep1":"Notes Type","tourNotesContentStep1":"You can view different types of notes issued for this patient by clicking on the relevant button.","tourNotesTitleStep2":"Resolved alert","tourNotesContentStep2":"You can view the resolved alerts from here.","tourNotesTitleStep3":"Add new Notes","tourNotesContentStep3":"You can add different personalized notes from here.","tourPersonalTitleStep0":"Edit Patient Details","tourPersonalContentStep0":"You can edit the patient\'s details by clicking here.","tourPatientDashboardTitleStep0":"Patient\'s Header Data","tourPatientDashboardContentStep0":"Details like the patient\'s vital information, course name, the selected course\'s start and end dates, etc. will be displayed here.","tourPatientDashboardTitleStep1":"Resolved Alerts","tourPatientDashboardContentStep1":"You can see the alerts resolved for the patient by clicking here.","tourPatientDashboardTitleStep2":"Active Alerts","tourPatientDashboardContentStep2":"You can see the active alerts generated on the patient account by clicking here.","tourPatientDashboardTitleStep3":"Reports","tourPatientDashboardContentStep3":"You can download the summarized and detailed versions of the reports from here.","tourPatientDashboardTitleStep4":"Dashboard Filter","tourPatientDashboardContentStep4":"You can filter the dashboard data from here.","tourPatientDashboardTitleStep5":"Dashboard","tourPatientDashboardContentStep5":"You can see the graphical representation of patient\'s data here.","tourPatientDashboardTitleStep6":"Alert Summary","tourPatientDashboardContentStep6":"From here you can view summarized details, of active alerts and resolved alerts.","tourProfileTourTitleStep0":"Edit Your Profile","tourProfileTourContentStep0":"You can edit your profile by clicking here.","tourStaffTitleStep0":"Filter User","tourStaffContentStep0":"You can filter your user using this filter.","tourStaffTitleStep1":"Search User","tourStaffContentStep1":"You can search the user by his/her name.","tourStaffTitleStep2":"Create New User","tourStaffContentStep2":"You can create a new user by clicking here.","tourFollowupTitleStep0":"Filter Follow Up","tourFollowupContentStep0":"Search for a follow-up using a follow-up name, or duration.","tourFollowupTitleStep1":"Follow-up List","tourFollowupContentStep1":"View all follow-ups for this program in this list.","tourAdherenceReportTitleStep0":"Adherence filter","tourAdherenceReportContentStep0":"You can choose to view adherence by the desired vital type, or time duration.","tourAdherenceReportTitleStep1":"Vital graph","tourAdherenceReportContentStep1":"You can see the graphical representation of the patient\u2019s vital reading here.","tourAdherenceReportTitleStep2":"Legends","tourAdherenceReportContentStep2":"Color-coded legends represent vital stages & Medicine %. Click a box to display the graph for a specific reading & Course.","tourAdherenceReportTitleStep3":"Medicine %","tourAdherenceReportContentStep3":"Tracks daily medication adherence. You can see the graphical representation of the patient\u2019s medication percentage here.","tourProgramSettingsTitleStep0":"Program Settings","tourProgramSettingsContentStep0":"Customize general information, consultation options, and notification settings for your program.","tourProgramSettingsTitleStep1":"General Information","tourProgramSettingsContentStep1":"View or edit program information from here.","tourProgramSettingsTitleStep2":"Consultation Options","tourProgramSettingsContentStep2":"Add or edit the Consultation form for the Program.","tourProgramSettingsTitleStep3":"Notification","tourProgramSettingsContentStep3":"Enable the toggle to edit follow-up notifications sent to patients for their next follow-up.","tourRolesTitleStep0":"Filter Roles","tourRolesContentStep0":"You can filter roles from here.","tourRolesTitleStep1":"Search Roles","tourRolesContentStep1":"You can search roles by its name.","tourRolesTitleStep2":"Create New Role","tourRolesContentStep2":"You can create a new role by clicking here.","rpm_AuditLogs":"Audit Logs","rpm_Logs":"Logs","rpm_LogDetails":"Log Details","rpm_Descriptions":"Descriptions","rpm_EventCode":"Event Code","rpm_TriggeredBy":"Triggered By","rpm_TimeLog":"Time Log","rpm_Service":"Service","rpm_EventTime":"Event Time","rpm_UserPrincipal":"User Principal","rpm_Attributes":"Attributes","rpm_Error":"Error","rpm_Event_Information":"Event Information","rpm_Create":"Create","rpm_Read":"Read","rpm_Action":"Action","rpm_ServiceCode":"Service Code","rpm_ChildrenLogs":"Child Logs","rpm_DefaultRule":"Default Rule","rpm_Duration&Time":"Duration & Timings","rpm_IssuedFor":"Issued For","rpm_PrescriptionDate":"Prescription Date","rpm_age/gender":"Age/Gender","rpm_mob":"Mob.","rpm_event_id":"Event Code","rpm_service_code":"Service","rpm_start_date":"Start Date","rpm_end_date":"End Date","rpm_program":"Program","rpm_description":"Description","rpm_username":"Triggered By","rpm_consultationId":"Consultation Id","rpm_ChiefComplaints":"Chief Complaints","rpm_Diagnosis":"Diagnosis","rpm_testsRequired":"Test Required","rpm_advice":"Advice","rpm_testrequest":"Tests requested","rpm_followUpDate":"Follow-up date","rpm_complaints":"Compliants","rpm_Symptoms":"Symptoms","rpm_diagnosis":"Diagnosis","rpm_saveConsultation":"Save Consultation","rpm_dr.name":"Dr. Name","rpm_GeneralAdvice":"General Advice:","rpm_TestRequired":"Tests Required:","rpm_NextFollowUpDate":"Next Follow-Up Date","rpm_AddNewConsultation":"Add New Consultation","rpm_AddNewDiagnosis":"Add New Diagnosis","rpm_AddMore":"Add More","rpm_Save&Continue":"Save & Continue","rpm_Collapse":"Collapse","rpm_Expand":"Expand","rpm_ViewAll":"View all","rpm_ViewLess":"View less","rpm_ProgramSettings":"Program Settings","rpm_GeneralSettings":"General Information","rpm_Consultation":"Consultation","rpm_AdherenceReport":"Adherence Report","rpm_ConsultationTemplate":"Consultation Template","rpm_ViewReports":"View Report","rpm_UploadReports":"Upload Report","rpm_defaultProgram":"Make default for mobile app","rpm_continue":"Continue","downloadMedicineFile":"Download Medicine File","rpm_facility_type":"Facility Type","rpm_Hospital":"Hospital","hospital":"Hospital","rpm_Clinic":"Clinic","clinic":"Clinic","rpm_Fitness_Center":"Fitness Center","fitnessCenter":"Fitness Center","rpm_Wellness_Center":"Wellness Center","wellnessCenter":"Wellness Center","rpm_ShowProgramQr":"Program QR","rpm_Program_qr":"Program QR","rpm_Assign_Role":"Assign Role","rpm_UsersMobileNumber":"User\u2019s Mobile Number","rpm_PleaseProvideMoblieNumber":"Enter mobile number to find the user","rpm_AddToProgram":"Add to Program","rpm_Enter_Mobile_Number_to_Search":"Enter Mobile Number to Search","rpm_RoleType":"Role Type","rpm_Account_Menu":"Account Menu","rpm_To_Explore_This":"To explore this module further, kindly use the YourPal+ application for complete access.","rpm_Providers":"Providers","rpm_Unassign":"Unassign","rpm_EditProvider":"Change Provider","rpm_Loading":"Loading...","rpm_providerAssignSuccess":"Provider updated successfully","rpm_viewPrograms":"View Programs","rpm_assignedPrograms":"Assigned Programs","rpm_AllUsers":"All Users","rpm_CreateGoal":"Create Goal","rpm_CreateExercise":"Create Exercise","rpm_EditExerciseGoal":"Edit Exercise","rpm_DefaultMetrics":" Default Metrics","rpm_CreateNewMetric":"Create New Metric","rpm_NewMetric":"New Metric","rpm_FieldType":"Field Type","rpm_SelectType":"Select type","rpm_SaveMetric":"Save Metric","rpm_MetricPriority":"Metric Priority","rpm_DragToReorder":"Drag to reorder","rpm_GoalName":"Goal Name","rpm_ExerciseName":"Exercise Name","rpm_Priority":"Priority","rpm_PrimaryMuscle":"Primary Muscle","rpm_SecondaryMuscle":"Secondary Muscle","rpm_Required":"Required","rpm_TraceableBy":"Traceable By","rpm_Provider":"Provider","rpm_Client":"Client","rpm_WellnessGoals":"Wellness Goals","rpm_ExerciseGoals":"Exercise Goals","rpm_GoalDetails":"Goal Details","rpm_Categories":"Categories","rpm_Metrics":"Metrics","rpm_Unit":"Unit","rpm_NoMetricsFound":"No Metrics Found","rpm_EditGoal":"Edit Goal","rpm_PreAssessment":"Pre Assessment","rpm_ProviderName":"Provider Name","rpm_ClientName":"Client Name","rpm_SearchProvider":"Search by Provider","rpm_providerAssignment":"Provider Assign successfully","rpm_providerUnassignSuccess":"Provider Unassign successfully","rpm_Assignments":"Assignments","rpm_AssignPatients":"Assign Patient","rpm_EditAssignedProvider":"Change Assigned Provider","rpm_SelectPatient":"Select Patient","rpm_SelectProvider":"Select Provider","rpm_Equipment":"Equipment","rpm_ExerciseType":"Exercise Type","rpm_MovementPattern":"Movement Pattern","rpm_ExerciseLevel":"Exercise Level","rpm_Instructions":"Instructions","rpm_Tips":"Tips","rpm_CommonMistakes":"Common Mistakes","rpm_Calorie_burn_rate":"Calorie Burn Rate","strategy":"Calorie Strategy","rpm_LicenseManager":"License Manager","rpm_UserType":"User Type","rpm_EnquiryList":"Enquiry List","rpm_Package":"Package","rpm_AddPackage":"Add Package","rpm_PackageName":"Package Name","rpm_BasePrice":"Base Price","rpm_BasePriceHeading":"Base Price (\u20b9)","rpm_UserLimit":"User Limit","rpm_PaymentScheme":"Payment Scheme","rpm_Plans":"Plans","rpm_Features":"Features","rpm_UserPaymentType":"User Payment Type","rpm_OriginalPrice":"Original Price","rpm_PackageTemplates":"Package Templates","rpm_CreatePackage":"Create Package","rpm_EditPackage":"Edit Package","Active":"Active","Inactive":"Inactive","rpm_BasicInformation":"Basic Information","rpm_PackageDescription":"Package Description","rpm_FeaturesIncluded":"Features Included","rpm_Feature":"Feature","rpm_Unlimited":"Unlimited","rpm_UserAccessLimit":"User Access Limit","rpm_UserPlans":"User Plans","rpm_UserPlan":"User Plan","rpm_PlanName":"Plan Name","rpm_OriginalPricePlan":"Original Price","rpm_DiscountedPrice":"Discounted Price","rpm_DurationDays":"Duration (days)","rpm_LongDescription":"Long Description","rpm_PlanFeatures":"User Access Features","rpm_DailyLimit":"Daily Limit","rpm_MonthlyLimit":"Monthly Limit","rpm_AccessLimit":"Access Limit","rpm_NoFeaturesSelected":"No features selected. Please enable features in the Features Included section above.","rpm_AddPlan":"Add Plan","rpm_Saving":"Saving...","rpm_UpdatePackage":"Update Package","rpm_ProviderCommission":"Provider Commission","rpm_ProviderCommissionHint":"Percentage of plan amount paid to the provider.","rpm_UserShortDescription":"Short Description","rpm_ProgramPackages":"Program Packages","rpm_PackageStatus":"Package Status","rpm_UserSubscriptionPlans":"User Subscription Plans","rpm_UserSubscriptionPlan":"User Subscription Plan","rpm_StandardPrice":"Standard Price","rpm_providerAccessFeatures":"Provider Access Features"}'),ot=JSON.parse('{"rpm_testMsg":"Liste de t\xe2ches avec texte et ic\xf4ne"}'),at=JSON.parse('{"Home":"Accueil","Todo":"TOUT","Login":"Connexion","SignUp":"S\'inscrire","TodoDesc":"Liste de t\xe2ches avec texte et ic\xf4ne"}'),st={en:{translation:(0,i.A)({},it),message:(0,i.A)({},rt),error:(0,i.A)({},nt)},fr:{translation:(0,i.A)({},at),message:(0,i.A)({},ot)}};Ce.use(He).use(tt).init({resources:st,debug:!1,lng:"en",fallbackLng:"en",interpolation:{escapeValue:!1}});var lt=n(84391),ct=n(29461),dt=n(98443),ut=n(97950),pt=n.t(ut,2);let ht=function(e){e()};const mt=()=>ht,ft=Symbol.for("react-redux-context"),gt="undefined"!==typeof globalThis?globalThis:{};function vt(){var e;if(!We.createContext)return{};const t=null!=(e=gt[ft])?e:gt[ft]=new Map;let n=t.get(We.createContext);return n||(n=We.createContext(null),t.set(We.createContext,n)),n}const xt=vt();function yt(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:xt;return function(){return(0,We.useContext)(e)}}const bt=yt();let jt=()=>{throw new Error("uSES not initialized!")};const _t=(e,t)=>e===t;function Ct(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:xt;const t=e===xt?bt:yt(e);return function(e){let n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const{equalityFn:r=_t,stabilityCheck:i,noopCheck:o}="function"===typeof n?{equalityFn:n}:n;const{store:a,subscription:s,getServerState:l,stabilityCheck:c,noopCheck:d}=t(),u=((0,We.useRef)(!0),(0,We.useCallback)({[e.name]:t=>e(t)}[e.name],[e,c,i])),p=jt(s.addNestedSub,a.getState,l||a.getState,u,r);return(0,We.useDebugValue)(p),p}}const wt=Ct();var St=n(80219),At=n.n(St);n(32706);const kt={notify(){},get:()=>[]};function Tt(e,t){let n,r=kt,i=0,o=!1;function a(){c.onStateChange&&c.onStateChange()}function s(){i++,n||(n=t?t.addNestedSub(a):e.subscribe(a),r=function(){const e=mt();let t=null,n=null;return{clear(){t=null,n=null},notify(){e(()=>{let e=t;for(;e;)e.callback(),e=e.next})},get(){let e=[],n=t;for(;n;)e.push(n),n=n.next;return e},subscribe(e){let r=!0,i=n={callback:e,next:null,prev:n};return i.prev?i.prev.next=i:t=i,function(){r&&null!==t&&(r=!1,i.next?i.next.prev=i.prev:n=i.prev,i.prev?i.prev.next=i.next:t=i.next)}}}}())}function l(){i--,n&&0===i&&(n(),n=void 0,r.clear(),r=kt)}const c={addNestedSub:function(e){s();const t=r.subscribe(e);let n=!1;return()=>{n||(n=!0,t(),l())}},notifyNestedSubs:function(){r.notify()},handleChangeWrapper:a,isSubscribed:function(){return o},trySubscribe:function(){o||(o=!0,s())},tryUnsubscribe:function(){o&&(o=!1,l())},getListeners:()=>r};return c}const Et=!("undefined"===typeof window||"undefined"===typeof window.document||"undefined"===typeof window.document.createElement)?We.useLayoutEffect:We.useEffect;let Mt=null;const Ot=function(e){let{store:t,context:n,children:r,serverState:i,stabilityCheck:o="once",noopCheck:a="once"}=e;const s=We.useMemo(()=>{const e=Tt(t);return{store:t,subscription:e,getServerState:i?()=>i:void 0,stabilityCheck:o,noopCheck:a}},[t,i,o,a]),l=We.useMemo(()=>t.getState(),[t]);Et(()=>{const{subscription:e}=s;return e.onStateChange=e.notifyNestedSubs,e.trySubscribe(),l!==t.getState()&&e.notifyNestedSubs(),()=>{e.tryUnsubscribe(),e.onStateChange=void 0}},[s,l]);const c=n||xt;return We.createElement(c.Provider,{value:s},r)};function Rt(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:xt;const t=e===xt?bt:yt(e);return function(){const{store:e}=t();return e}}const Pt=Rt();function Dt(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:xt;const t=e===xt?Pt:Rt(e);return function(){return t().dispatch}}const Nt=Dt();var Lt,It;Lt=dt.useSyncExternalStoreWithSelector,jt=Lt,(e=>{Mt=e})(ct.useSyncExternalStore),It=ut.unstable_batchedUpdates,ht=It;var Ft=n(58168),$t=n(98206),Bt=n(13174),zt=n(70869),Ht=n(18280),Wt=n(69369);const Ut=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;const t=We.useContext(Wt.T);return t&&(n=t,0!==Object.keys(n).length)?t:e;var n},Vt=(0,Ht.A)();const Gt=function(){return Ut(arguments.length>0&&void 0!==arguments[0]?arguments[0]:Vt)};var qt=n(70579);function Yt(e){const t=(0,Bt.internal_serializeStyles)(e);return e!==t&&t.styles?(t.styles.match(/^@layer\s+[^{]*$/)||(t.styles="@layer global{".concat(t.styles,"}")),t):e}const Zt=function(e){let{styles:t,themeId:n,defaultTheme:r={}}=e;const i=Gt(r),o=n&&i[n]||i;let a="function"===typeof t?t(o):t;return o.modularCssLayers&&(a=Array.isArray(a)?a.map(e=>Yt("function"===typeof e?e(o):e)):Yt(a)),(0,qt.jsx)(zt.A,{styles:a})};var Kt=n(15170),Xt=n(13375);const Qt=function(e){return(0,qt.jsx)(Zt,(0,Ft.A)({},e,{defaultTheme:Kt.A,themeId:Xt.A}))},Jt=(e,t)=>(0,Ft.A)({WebkitFontSmoothing:"antialiased",MozOsxFontSmoothing:"grayscale",boxSizing:"border-box",WebkitTextSizeAdjust:"100%"},t&&!e.vars&&{colorScheme:e.palette.mode}),en=e=>(0,Ft.A)({color:(e.vars||e).palette.text.primary},e.typography.body1,{backgroundColor:(e.vars||e).palette.background.default,"@media print":{backgroundColor:(e.vars||e).palette.common.white}});const tn=function(e){const t=(0,$t.b)({props:e,name:"MuiCssBaseline"}),{children:n,enableColorScheme:r=!1}=t;return(0,qt.jsxs)(We.Fragment,{children:[(0,qt.jsx)(Qt,{styles:e=>function(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];var n;const r={};t&&e.colorSchemes&&Object.entries(e.colorSchemes).forEach(t=>{let[n,i]=t;var o;r[e.getColorSchemeSelector(n).replace(/\s*&/,"")]={colorScheme:null==(o=i.palette)?void 0:o.mode}});let i=(0,Ft.A)({html:Jt(e,t),"*, *::before, *::after":{boxSizing:"inherit"},"strong, b":{fontWeight:e.typography.fontWeightBold},body:(0,Ft.A)({margin:0},en(e),{"&::backdrop":{backgroundColor:(e.vars||e).palette.background.default}})},r);const o=null==(n=e.components)||null==(n=n.MuiCssBaseline)?void 0:n.styleOverrides;return o&&(i=[i,o]),i}(e,r)}),n]})};var nn=n(98587);const rn=We.createContext(null);function on(){return We.useContext(rn)}const an="function"===typeof Symbol&&Symbol.for?Symbol.for("mui.nested"):"__THEME_NESTED__";const sn=function(e){const{children:t,theme:n}=e,r=on(),i=We.useMemo(()=>{const e=null===r?n:function(e,t){if("function"===typeof t)return t(e);return(0,Ft.A)({},e,t)}(r,n);return null!=e&&(e[an]=null!==r),e},[n,r]);return(0,qt.jsx)(rn.Provider,{value:i,children:t})},ln=["value"],cn=We.createContext();const dn=()=>{const e=We.useContext(cn);return null!=e&&e},un=function(e){let{value:t}=e,n=(0,nn.A)(e,ln);return(0,qt.jsx)(cn.Provider,(0,Ft.A)({value:null==t||t},n))};var pn=n(13654),hn=n(84440),mn=n(5844);const fn={};function gn(e,t,n){let r=arguments.length>3&&void 0!==arguments[3]&&arguments[3];return We.useMemo(()=>{const i=e&&t[e]||t;if("function"===typeof n){const o=n(i),a=e?(0,Ft.A)({},t,{[e]:o}):o;return r?()=>a:a}return e?(0,Ft.A)({},t,{[e]:n}):(0,Ft.A)({},t,n)},[e,t,n,r])}const vn=function(e){const{children:t,theme:n,themeId:r}=e,i=Ut(fn),o=on()||fn,a=gn(r,i,n),s=gn(r,o,n,!0),l="rtl"===a.direction,c=function(e){const t=Ut(),n=(0,mn.A)()||"",{modularCssLayers:r}=e;let i="mui.global, mui.components, mui.theme, mui.custom, mui.sx";return i=r&&null===t?"string"===typeof r?r.replace(/mui(?!\.)/g,i):"@layer ".concat(i,";"):"",(0,hn.A)(()=>{const e=document.querySelector("head");if(!e)return;const t=e.firstChild;if(i){var r;if(t&&null!=(r=t.hasAttribute)&&r.call(t,"data-mui-layer-order")&&t.getAttribute("data-mui-layer-order")===n)return;const o=document.createElement("style");o.setAttribute("data-mui-layer-order",n),o.textContent=i,e.prepend(o)}else{var o;null==(o=e.querySelector('style[data-mui-layer-order="'.concat(n,'"]')))||o.remove()}},[i,n]),i?(0,qt.jsx)(Zt,{styles:i}):null}(a);return(0,qt.jsx)(sn,{theme:s,children:(0,qt.jsx)(Wt.T.Provider,{value:a,children:(0,qt.jsx)(un,{value:l,children:(0,qt.jsxs)(pn.A,{value:null==a?void 0:a.components,children:[c,t]})})})})},xn=["theme"];function yn(e){let{theme:t}=e,n=(0,nn.A)(e,xn);const r=t[Xt.A];let i=r||t;return"function"!==typeof t&&(r&&!r.vars?i=(0,Ft.A)({},r,{vars:null}):t&&!t.vars&&(i=(0,Ft.A)({},t,{vars:null}))),(0,qt.jsx)(vn,(0,Ft.A)({},n,{themeId:r?Xt.A:void 0,theme:i}))}function bn(e){var t,n,r="";if("string"==typeof e||"number"==typeof e)r+=e;else if("object"==typeof e)if(Array.isArray(e))for(t=0;t<e.length;t++)e[t]&&(n=bn(e[t]))&&(r&&(r+=" "),r+=n);else for(t in e)e[t]&&(r&&(r+=" "),r+=t);return r}const jn=function(){for(var e,t,n=0,r="";n<arguments.length;)(e=arguments[n++])&&(t=bn(e))&&(r&&(r+=" "),r+=t);return r};function _n(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,u(e,t)}const Cn=!1,wn=We.createContext(null);var Sn=function(e){return e.scrollTop},An="unmounted",kn="exited",Tn="entering",En="entered",Mn="exiting",On=function(e){function t(t,n){var r;r=e.call(this,t,n)||this;var i,o=n&&!n.isMounting?t.enter:t.appear;return r.appearStatus=null,t.in?o?(i=kn,r.appearStatus=Tn):i=En:i=t.unmountOnExit||t.mountOnEnter?An:kn,r.state={status:i},r.nextCallback=null,r}_n(t,e),t.getDerivedStateFromProps=function(e,t){return e.in&&t.status===An?{status:kn}:null};var n=t.prototype;return n.componentDidMount=function(){this.updateStatus(!0,this.appearStatus)},n.componentDidUpdate=function(e){var t=null;if(e!==this.props){var n=this.state.status;this.props.in?n!==Tn&&n!==En&&(t=Tn):n!==Tn&&n!==En||(t=Mn)}this.updateStatus(!1,t)},n.componentWillUnmount=function(){this.cancelNextCallback()},n.getTimeouts=function(){var e,t,n,r=this.props.timeout;return e=t=n=r,null!=r&&"number"!==typeof r&&(e=r.exit,t=r.enter,n=void 0!==r.appear?r.appear:t),{exit:e,enter:t,appear:n}},n.updateStatus=function(e,t){if(void 0===e&&(e=!1),null!==t)if(this.cancelNextCallback(),t===Tn){if(this.props.unmountOnExit||this.props.mountOnEnter){var n=this.props.nodeRef?this.props.nodeRef.current:ut.findDOMNode(this);n&&Sn(n)}this.performEnter(e)}else this.performExit();else this.props.unmountOnExit&&this.state.status===kn&&this.setState({status:An})},n.performEnter=function(e){var t=this,n=this.props.enter,r=this.context?this.context.isMounting:e,i=this.props.nodeRef?[r]:[ut.findDOMNode(this),r],o=i[0],a=i[1],s=this.getTimeouts(),l=r?s.appear:s.enter;!e&&!n||Cn?this.safeSetState({status:En},function(){t.props.onEntered(o)}):(this.props.onEnter(o,a),this.safeSetState({status:Tn},function(){t.props.onEntering(o,a),t.onTransitionEnd(l,function(){t.safeSetState({status:En},function(){t.props.onEntered(o,a)})})}))},n.performExit=function(){var e=this,t=this.props.exit,n=this.getTimeouts(),r=this.props.nodeRef?void 0:ut.findDOMNode(this);t&&!Cn?(this.props.onExit(r),this.safeSetState({status:Mn},function(){e.props.onExiting(r),e.onTransitionEnd(n.exit,function(){e.safeSetState({status:kn},function(){e.props.onExited(r)})})})):this.safeSetState({status:kn},function(){e.props.onExited(r)})},n.cancelNextCallback=function(){null!==this.nextCallback&&(this.nextCallback.cancel(),this.nextCallback=null)},n.safeSetState=function(e,t){t=this.setNextCallback(t),this.setState(e,t)},n.setNextCallback=function(e){var t=this,n=!0;return this.nextCallback=function(r){n&&(n=!1,t.nextCallback=null,e(r))},this.nextCallback.cancel=function(){n=!1},this.nextCallback},n.onTransitionEnd=function(e,t){this.setNextCallback(t);var n=this.props.nodeRef?this.props.nodeRef.current:ut.findDOMNode(this),r=null==e&&!this.props.addEndListener;if(n&&!r){if(this.props.addEndListener){var i=this.props.nodeRef?[this.nextCallback]:[n,this.nextCallback],o=i[0],a=i[1];this.props.addEndListener(o,a)}null!=e&&setTimeout(this.nextCallback,e)}else setTimeout(this.nextCallback,0)},n.render=function(){var e=this.state.status;if(e===An)return null;var t=this.props,n=t.children,r=(t.in,t.mountOnEnter,t.unmountOnExit,t.appear,t.enter,t.exit,t.timeout,t.addEndListener,t.onEnter,t.onEntering,t.onEntered,t.onExit,t.onExiting,t.onExited,t.nodeRef,(0,nn.A)(t,["children","in","mountOnEnter","unmountOnExit","appear","enter","exit","timeout","addEndListener","onEnter","onEntering","onEntered","onExit","onExiting","onExited","nodeRef"]));return We.createElement(wn.Provider,{value:null},"function"===typeof n?n(e,r):We.cloneElement(We.Children.only(n),r))},t}(We.Component);function Rn(){}On.contextType=wn,On.propTypes={},On.defaultProps={in:!1,mountOnEnter:!1,unmountOnExit:!1,appear:!1,enter:!0,exit:!0,onEnter:Rn,onEntering:Rn,onEntered:Rn,onExit:Rn,onExiting:Rn,onExited:Rn},On.UNMOUNTED=An,On.EXITED=kn,On.ENTERING=Tn,On.ENTERED=En,On.EXITING=Mn;const Pn=On;function Dn(e){var t;return parseInt(We.version,10)>=19?(null==e||null==(t=e.props)?void 0:t.ref)||null:(null==e?void 0:e.ref)||null}var Nn=n(80950),Ln=n(95849);function In(){const e=Gt(Kt.A);return e[Xt.A]||e}const Fn=e=>e.scrollTop;function $n(e,t){var n,r;const{timeout:i,easing:o,style:a={}}=e;return{duration:null!=(n=a.transitionDuration)?n:"number"===typeof i?i:i[t.mode]||0,easing:null!=(r=a.transitionTimingFunction)?r:"object"===typeof o?o[t.mode]:o,delay:a.transitionDelay}}var Bn=n(36078);const zn=["addEndListener","appear","children","container","direction","easing","in","onEnter","onEntered","onEntering","onExit","onExited","onExiting","style","timeout","TransitionComponent"];function Hn(e,t,n){var r;const i=function(e,t,n){const r=t.getBoundingClientRect(),i=n&&n.getBoundingClientRect(),o=(0,Bn.A)(t);let a;if(t.fakeTransform)a=t.fakeTransform;else{const e=o.getComputedStyle(t);a=e.getPropertyValue("-webkit-transform")||e.getPropertyValue("transform")}let s=0,l=0;if(a&&"none"!==a&&"string"===typeof a){const e=a.split("(")[1].split(")")[0].split(",");s=parseInt(e[4],10),l=parseInt(e[5],10)}return"left"===e?"translateX(".concat(i?i.right+s-r.left:o.innerWidth+s-r.left,"px)"):"right"===e?"translateX(-".concat(i?r.right-i.left-s:r.left+r.width-s,"px)"):"up"===e?"translateY(".concat(i?i.bottom+l-r.top:o.innerHeight+l-r.top,"px)"):"translateY(-".concat(i?r.top-i.top+r.height-l:r.top+r.height-l,"px)")}(e,t,"function"===typeof(r=n)?r():r);i&&(t.style.webkitTransform=i,t.style.transform=i)}const Wn=We.forwardRef(function(e,t){const n=In(),r={enter:n.transitions.easing.easeOut,exit:n.transitions.easing.sharp},i={enter:n.transitions.duration.enteringScreen,exit:n.transitions.duration.leavingScreen},{addEndListener:o,appear:a=!0,children:s,container:l,direction:c="down",easing:d=r,in:u,onEnter:p,onEntered:h,onEntering:m,onExit:f,onExited:g,onExiting:v,style:x,timeout:y=i,TransitionComponent:b=Pn}=e,j=(0,nn.A)(e,zn),_=We.useRef(null),C=(0,Ln.A)(Dn(s),_,t),w=e=>t=>{e&&(void 0===t?e(_.current):e(_.current,t))},S=w((e,t)=>{Hn(c,e,l),Fn(e),p&&p(e,t)}),A=w((e,t)=>{const r=$n({timeout:y,style:x,easing:d},{mode:"enter"});e.style.webkitTransition=n.transitions.create("-webkit-transform",(0,Ft.A)({},r)),e.style.transition=n.transitions.create("transform",(0,Ft.A)({},r)),e.style.webkitTransform="none",e.style.transform="none",m&&m(e,t)}),k=w(h),T=w(v),E=w(e=>{const t=$n({timeout:y,style:x,easing:d},{mode:"exit"});e.style.webkitTransition=n.transitions.create("-webkit-transform",t),e.style.transition=n.transitions.create("transform",t),Hn(c,e,l),f&&f(e)}),M=w(e=>{e.style.webkitTransition="",e.style.transition="",g&&g(e)}),O=We.useCallback(()=>{_.current&&Hn(c,_.current,l)},[c,l]);return We.useEffect(()=>{if(u||"down"===c||"right"===c)return;const e=(0,Nn.A)(()=>{_.current&&Hn(c,_.current,l)}),t=(0,Bn.A)(_.current);return t.addEventListener("resize",e),()=>{e.clear(),t.removeEventListener("resize",e)}},[c,u,l]),We.useEffect(()=>{u||O()},[u,O]),(0,qt.jsx)(b,(0,Ft.A)({nodeRef:_,onEnter:S,onEntered:k,onEntering:A,onExit:E,onExited:M,onExiting:T,addEndListener:e=>{o&&o(_.current,e)},appear:a,in:u,timeout:y},j,{children:(e,t)=>We.cloneElement(s,(0,Ft.A)({ref:C,style:(0,Ft.A)({visibility:"exited"!==e||u?void 0:"hidden"},x,s.props.style)},t))}))}),Un=Wn;var Vn=n(34535),Gn=n(17868),qn=n(11188);function Yn(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1;return(0,qn.A)(e,t,n)}function Zn(e){if(e.type)return e;if("#"===e.charAt(0))return Zn(function(e){e=e.slice(1);const t=new RegExp(".{1,".concat(e.length>=6?2:1,"}"),"g");let n=e.match(t);return n&&1===n[0].length&&(n=n.map(e=>e+e)),n?"rgb".concat(4===n.length?"a":"","(").concat(n.map((e,t)=>t<3?parseInt(e,16):Math.round(parseInt(e,16)/255*1e3)/1e3).join(", "),")"):""}(e));const t=e.indexOf("("),n=e.substring(0,t);if(-1===["rgb","rgba","hsl","hsla","color"].indexOf(n))throw new Error((0,Gn.A)(9,e));let r,i=e.substring(t+1,e.length-1);if("color"===n){if(i=i.split(" "),r=i.shift(),4===i.length&&"/"===i[3].charAt(0)&&(i[3]=i[3].slice(1)),-1===["srgb","display-p3","a98-rgb","prophoto-rgb","rec-2020"].indexOf(r))throw new Error((0,Gn.A)(10,r))}else i=i.split(",");return i=i.map(e=>parseFloat(e)),{type:n,values:i,colorSpace:r}}function Kn(e){const{type:t,colorSpace:n}=e;let{values:r}=e;return-1!==t.indexOf("rgb")?r=r.map((e,t)=>t<3?parseInt(e,10):e):-1!==t.indexOf("hsl")&&(r[1]="".concat(r[1],"%"),r[2]="".concat(r[2],"%")),r=-1!==t.indexOf("color")?"".concat(n," ").concat(r.join(" ")):"".concat(r.join(", ")),"".concat(t,"(").concat(r,")")}function Xn(e){let t="hsl"===(e=Zn(e)).type||"hsla"===e.type?Zn(function(e){e=Zn(e);const{values:t}=e,n=t[0],r=t[1]/100,i=t[2]/100,o=r*Math.min(i,1-i),a=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:(e+n/30)%12;return i-o*Math.max(Math.min(t-3,9-t,1),-1)};let s="rgb";const l=[Math.round(255*a(0)),Math.round(255*a(8)),Math.round(255*a(4))];return"hsla"===e.type&&(s+="a",l.push(t[3])),Kn({type:s,values:l})}(e)).values:e.values;return t=t.map(t=>("color"!==e.type&&(t/=255),t<=.03928?t/12.92:((t+.055)/1.055)**2.4)),Number((.2126*t[0]+.7152*t[1]+.0722*t[2]).toFixed(3))}function Qn(e,t){return e=Zn(e),t=Yn(t),"rgb"!==e.type&&"hsl"!==e.type||(e.type+="a"),"color"===e.type?e.values[3]="/".concat(t):e.values[3]=t,Kn(e)}function Jn(e,t){if(e=Zn(e),t=Yn(t),-1!==e.type.indexOf("hsl"))e.values[2]*=1-t;else if(-1!==e.type.indexOf("rgb")||-1!==e.type.indexOf("color"))for(let n=0;n<3;n+=1)e.values[n]*=1-t;return Kn(e)}function er(e,t){if(e=Zn(e),t=Yn(t),-1!==e.type.indexOf("hsl"))e.values[2]+=(100-e.values[2])*t;else if(-1!==e.type.indexOf("rgb"))for(let n=0;n<3;n+=1)e.values[n]+=(255-e.values[n])*t;else if(-1!==e.type.indexOf("color"))for(let n=0;n<3;n+=1)e.values[n]+=(1-e.values[n])*t;return Kn(e)}function tr(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:.15;return Xn(e)>.5?Jn(e,t):er(e,t)}var nr=n(69292),rr=n(99303),ir=n(98610),or=n(14318),ar=n(92532),sr=n(72372);function lr(e){return(0,sr.Ay)("MuiCollapse",e)}(0,ar.A)("MuiCollapse",["root","horizontal","vertical","entered","hidden","wrapper","wrapperInner"]);const cr=["addEndListener","children","className","collapsedSize","component","easing","in","onEnter","onEntered","onEntering","onExit","onExited","onExiting","orientation","style","timeout","TransitionComponent"],dr=(0,Vn.Ay)("div",{name:"MuiCollapse",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[n.orientation],"entered"===n.state&&t.entered,"exited"===n.state&&!n.in&&"0px"===n.collapsedSize&&t.hidden]}})(e=>{let{theme:t,ownerState:n}=e;return(0,Ft.A)({height:0,overflow:"hidden",transition:t.transitions.create("height")},"horizontal"===n.orientation&&{height:"auto",width:0,transition:t.transitions.create("width")},"entered"===n.state&&(0,Ft.A)({height:"auto",overflow:"visible"},"horizontal"===n.orientation&&{width:"auto"}),"exited"===n.state&&!n.in&&"0px"===n.collapsedSize&&{visibility:"hidden"})}),ur=(0,Vn.Ay)("div",{name:"MuiCollapse",slot:"Wrapper",overridesResolver:(e,t)=>t.wrapper})(e=>{let{ownerState:t}=e;return(0,Ft.A)({display:"flex",width:"100%"},"horizontal"===t.orientation&&{width:"auto",height:"100%"})}),pr=(0,Vn.Ay)("div",{name:"MuiCollapse",slot:"WrapperInner",overridesResolver:(e,t)=>t.wrapperInner})(e=>{let{ownerState:t}=e;return(0,Ft.A)({width:"100%"},"horizontal"===t.orientation&&{width:"auto",height:"100%"})}),hr=We.forwardRef(function(e,t){const n=(0,$t.b)({props:e,name:"MuiCollapse"}),{addEndListener:r,children:i,className:o,collapsedSize:a="0px",component:s,easing:l,in:c,onEnter:d,onEntered:u,onEntering:p,onExit:h,onExited:m,onExiting:f,orientation:g="vertical",style:v,timeout:x=or.p0.standard,TransitionComponent:y=Pn}=n,b=(0,nn.A)(n,cr),j=(0,Ft.A)({},n,{orientation:g,collapsedSize:a}),_=(e=>{const{orientation:t,classes:n}=e,r={root:["root","".concat(t)],entered:["entered"],hidden:["hidden"],wrapper:["wrapper","".concat(t)],wrapperInner:["wrapperInner","".concat(t)]};return(0,ir.A)(r,lr,n)})(j),C=In(),w=(0,rr.A)(),S=We.useRef(null),A=We.useRef(),k="number"===typeof a?"".concat(a,"px"):a,T="horizontal"===g,E=T?"width":"height",M=We.useRef(null),O=(0,Ln.A)(t,M),R=e=>t=>{if(e){const n=M.current;void 0===t?e(n):e(n,t)}},P=()=>S.current?S.current[T?"clientWidth":"clientHeight"]:0,D=R((e,t)=>{S.current&&T&&(S.current.style.position="absolute"),e.style[E]=k,d&&d(e,t)}),N=R((e,t)=>{const n=P();S.current&&T&&(S.current.style.position="");const{duration:r,easing:i}=$n({style:v,timeout:x,easing:l},{mode:"enter"});if("auto"===x){const t=C.transitions.getAutoHeightDuration(n);e.style.transitionDuration="".concat(t,"ms"),A.current=t}else e.style.transitionDuration="string"===typeof r?r:"".concat(r,"ms");e.style[E]="".concat(n,"px"),e.style.transitionTimingFunction=i,p&&p(e,t)}),L=R((e,t)=>{e.style[E]="auto",u&&u(e,t)}),I=R(e=>{e.style[E]="".concat(P(),"px"),h&&h(e)}),F=R(m),$=R(e=>{const t=P(),{duration:n,easing:r}=$n({style:v,timeout:x,easing:l},{mode:"exit"});if("auto"===x){const n=C.transitions.getAutoHeightDuration(t);e.style.transitionDuration="".concat(n,"ms"),A.current=n}else e.style.transitionDuration="string"===typeof n?n:"".concat(n,"ms");e.style[E]=k,e.style.transitionTimingFunction=r,f&&f(e)});return(0,qt.jsx)(y,(0,Ft.A)({in:c,onEnter:D,onEntered:L,onEntering:N,onExit:I,onExited:F,onExiting:$,addEndListener:e=>{"auto"===x&&w.start(A.current||0,e),r&&r(M.current,e)},nodeRef:M,timeout:"auto"===x?null:x},b,{children:(e,t)=>(0,qt.jsx)(dr,(0,Ft.A)({as:s,className:(0,nr.A)(_.root,o,{entered:_.entered,exited:!c&&"0px"===k&&_.hidden}[e]),style:(0,Ft.A)({[T?"minWidth":"minHeight"]:k},v),ref:O},t,{ownerState:(0,Ft.A)({},j,{state:e}),children:(0,qt.jsx)(ur,{ownerState:(0,Ft.A)({},j,{state:e}),className:_.wrapper,ref:S,children:(0,qt.jsx)(pr,{ownerState:(0,Ft.A)({},j,{state:e}),className:_.wrapperInner,children:i})})}))}))});hr.muiSupportAuto=!0;const mr=hr;var fr=n(8122),gr=n(63462),vr=n(31782),xr=n(31668);function yr(e){return e.substring(2).toLowerCase()}function br(e){const{children:t,disableReactTree:n=!1,mouseEvent:r="onClick",onClickAway:i,touchEvent:o="onTouchEnd"}=e,a=We.useRef(!1),s=We.useRef(null),l=We.useRef(!1),c=We.useRef(!1);We.useEffect(()=>(setTimeout(()=>{l.current=!0},0),()=>{l.current=!1}),[]);const d=(0,gr.A)(Dn(t),s),u=(0,vr.A)(e=>{const t=c.current;c.current=!1;const r=(0,xr.A)(s.current);if(!l.current||!s.current||"clientX"in e&&function(e,t){return t.documentElement.clientWidth<e.clientX||t.documentElement.clientHeight<e.clientY}(e,r))return;if(a.current)return void(a.current=!1);let o;o=e.composedPath?e.composedPath().indexOf(s.current)>-1:!r.documentElement.contains(e.target)||s.current.contains(e.target),o||!n&&t||i(e)}),p=e=>n=>{c.current=!0;const r=t.props[e];r&&r(n)},h={ref:d};return!1!==o&&(h[o]=p(o)),We.useEffect(()=>{if(!1!==o){const e=yr(o),t=(0,xr.A)(s.current),n=()=>{a.current=!0};return t.addEventListener(e,u),t.addEventListener("touchmove",n),()=>{t.removeEventListener(e,u),t.removeEventListener("touchmove",n)}}},[u,o]),!1!==r&&(h[r]=p(r)),We.useEffect(()=>{if(!1!==r){const e=yr(r),t=(0,xr.A)(s.current);return t.addEventListener(e,u),()=>{t.removeEventListener(e,u)}}},[u,r]),(0,qt.jsx)(We.Fragment,{children:We.cloneElement(t,h)})}function jr(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function _r(){return _r=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},_r.apply(this,arguments)}function Cr(e,t){if(null==e)return{};var n,r,i={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(i[n]=e[n]);return i}function wr(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}var Sr=We.createContext(),Ar={containerRoot:{},containerAnchorOriginTopCenter:{},containerAnchorOriginBottomCenter:{},containerAnchorOriginTopRight:{},containerAnchorOriginBottomRight:{},containerAnchorOriginTopLeft:{},containerAnchorOriginBottomLeft:{}},kr={default:20,dense:4},Tr={default:6,dense:2},Er={maxSnack:3,dense:!1,hideIconVariant:!1,variant:"default",autoHideDuration:5e3,anchorOrigin:{vertical:"bottom",horizontal:"left"},TransitionComponent:Un,transitionDuration:{enter:225,exit:195}},Mr=function(e){return e.charAt(0).toUpperCase()+e.slice(1)},Or=function(e){return Object.keys(e).filter(function(e){return!Ar[e]}).reduce(function(t,n){var r;return _r({},t,((r={})[n]=e[n],r))},{})},Rr={TIMEOUT:"timeout",CLICKAWAY:"clickaway",MAXSNACK:"maxsnack",INSTRUCTED:"instructed"},Pr=function(e){return"containerAnchorOrigin"+e},Dr=function(e){var t=e.vertical,n=e.horizontal;return"anchorOrigin"+Mr(t)+Mr(n)},Nr=function(e){return"variant"+Mr(e)},Lr=function(e){return!!e||0===e},Ir=function(e){return"number"===typeof e||null===e};function Fr(e,t,n){return void 0===e&&(e={}),void 0===t&&(t={}),void 0===n&&(n={}),_r({},n,{},t,{},e)}var $r={root:"SnackbarContent-root"},Br=(0,Vn.Ay)("div")(function(e){var t,n,r=e.theme;return(n={})["&."+$r.root]=((t={display:"flex",flexWrap:"wrap",flexGrow:1})[r.breakpoints.up("sm")]={flexGrow:"initial",minWidth:288},t),n}),zr=(0,We.forwardRef)(function(e,t){var n=e.className,r=Cr(e,["className"]);return We.createElement(Br,Object.assign({ref:t,className:jn($r.root,n)},r))}),Hr={right:"left",left:"right",bottom:"up",top:"down"},Wr=function(e){return"center"!==e.horizontal?Hr[e.horizontal]:Hr[e.vertical]},Ur=function(e){return We.createElement(fr.A,Object.assign({},e),We.createElement("path",{d:"M12 2C6.5 2 2 6.5 2 12S6.5 22 12 22 22 17.5 22 12 17.5 2 12 2M10 17L5 12L6.41\n        10.59L10 14.17L17.59 6.58L19 8L10 17Z"}))},Vr=function(e){return We.createElement(fr.A,Object.assign({},e),We.createElement("path",{d:"M13,14H11V10H13M13,18H11V16H13M1,21H23L12,2L1,21Z"}))},Gr=function(e){return We.createElement(fr.A,Object.assign({},e),We.createElement("path",{d:"M12,2C17.53,2 22,6.47 22,12C22,17.53 17.53,22 12,22C6.47,22 2,17.53 2,12C2,\n        6.47 6.47,2 12,2M15.59,7L12,10.59L8.41,7L7,8.41L10.59,12L7,15.59L8.41,17L12,\n        13.41L15.59,17L17,15.59L13.41,12L17,8.41L15.59,7Z"}))},qr=function(e){return We.createElement(fr.A,Object.assign({},e),We.createElement("path",{d:"M13,9H11V7H13M13,17H11V11H13M12,2A10,10 0 0,0 2,12A10,10 0 0,0 12,22A10,10 0 0,\n        0 22,12A10,10 0 0,0 12,2Z"}))},Yr={fontSize:20,marginInlineEnd:8},Zr={default:void 0,success:We.createElement(Ur,{style:Yr}),warning:We.createElement(Vr,{style:Yr}),error:We.createElement(Gr,{style:Yr}),info:We.createElement(qr,{style:Yr})};function Kr(e,t){return e.reduce(function(e,n){return null==n?e:function(){for(var r=arguments.length,i=new Array(r),o=0;o<r;o++)i[o]=arguments[o];var a=[].concat(i);t&&-1===a.indexOf(t)&&a.push(t),e.apply(this,a),n.apply(this,a)}},function(){})}var Xr="undefined"!==typeof window?We.useLayoutEffect:We.useEffect;function Qr(e){var t=(0,We.useRef)(e);return Xr(function(){t.current=e}),(0,We.useCallback)(function(){return t.current.apply(void 0,arguments)},[])}var Jr,ei=(0,We.forwardRef)(function(e,t){var n=e.children,r=e.autoHideDuration,i=e.ClickAwayListenerProps,o=e.disableWindowBlurListener,a=void 0!==o&&o,s=e.onClose,l=e.onMouseEnter,c=e.onMouseLeave,d=e.open,u=e.resumeHideDuration,p=Cr(e,["children","autoHideDuration","ClickAwayListenerProps","disableWindowBlurListener","onClose","onMouseEnter","onMouseLeave","open","resumeHideDuration"]),h=(0,We.useRef)(),m=Qr(function(){s&&s.apply(void 0,arguments)}),f=Qr(function(e){s&&null!=e&&(clearTimeout(h.current),h.current=setTimeout(function(){m(null,Rr.TIMEOUT)},e))});(0,We.useEffect)(function(){return d&&f(r),function(){clearTimeout(h.current)}},[d,r,f]);var g=function(){clearTimeout(h.current)},v=(0,We.useCallback)(function(){null!=r&&f(null!=u?u:.5*r)},[r,u,f]);return(0,We.useEffect)(function(){if(!a&&d)return window.addEventListener("focus",v),window.addEventListener("blur",g),function(){window.removeEventListener("focus",v),window.removeEventListener("blur",g)}},[a,v,d]),(0,We.createElement)(br,_r({onClickAway:function(e){s&&s(e,Rr.CLICKAWAY)}},i),(0,We.createElement)("div",_r({onMouseEnter:function(e){l&&l(e),g()},onMouseLeave:function(e){c&&c(e),v()},ref:t},p),n))}),ti="SnackbarItem",ni={contentRoot:ti+"-contentRoot",lessPadding:ti+"-lessPadding",variantSuccess:ti+"-variantSuccess",variantError:ti+"-variantError",variantInfo:ti+"-variantInfo",variantWarning:ti+"-variantWarning",message:ti+"-message",action:ti+"-action",wrappedRoot:ti+"-wrappedRoot"},ri=(0,Vn.Ay)(ei)(function(e){var t,n=e.theme,r=n.palette.mode||n.palette.type,i=tr(n.palette.background.default,"light"===r?.8:.98);return(t={})["&."+ni.wrappedRoot]={position:"relative",transform:"translateX(0)",top:0,right:0,bottom:0,left:0},t["."+ni.contentRoot]=_r({},n.typography.body2,{backgroundColor:i,color:n.palette.getContrastText(i),alignItems:"center",padding:"6px 16px",borderRadius:"4px",boxShadow:"0px 3px 5px -1px rgba(0,0,0,0.2),0px 6px 10px 0px rgba(0,0,0,0.14),0px 1px 18px 0px rgba(0,0,0,0.12)"}),t["."+ni.lessPadding]={paddingLeft:20},t["."+ni.variantSuccess]={backgroundColor:"#43a047",color:"#fff"},t["."+ni.variantError]={backgroundColor:"#d32f2f",color:"#fff"},t["."+ni.variantInfo]={backgroundColor:"#2196f3",color:"#fff"},t["."+ni.variantWarning]={backgroundColor:"#ff9800",color:"#fff"},t["."+ni.message]={display:"flex",alignItems:"center",padding:"8px 0"},t["."+ni.action]={display:"flex",alignItems:"center",marginLeft:"auto",paddingLeft:16,marginRight:-8},t}),ii=function(e){var t=e.classes,n=Cr(e,["classes"]),r=(0,We.useRef)(),i=(0,We.useState)(!0),o=i[0],a=i[1];(0,We.useEffect)(function(){return function(){r.current&&clearTimeout(r.current)}},[]);var s=Kr([n.snack.onClose,n.onClose],n.snack.key),l=n.style,c=n.ariaAttributes,d=n.className,u=n.hideIconVariant,p=n.iconVariant,h=n.snack,m=n.action,f=n.content,g=n.TransitionComponent,v=n.TransitionProps,x=n.transitionDuration,y=Cr(n,["style","dense","ariaAttributes","className","hideIconVariant","iconVariant","snack","action","content","TransitionComponent","TransitionProps","transitionDuration","onEnter","onEntered","onEntering","onExit","onExited","onExiting"]),b=h.key,j=h.open,_=h.className,C=h.variant,w=h.content,S=h.action,A=h.ariaAttributes,k=h.anchorOrigin,T=h.message,E=h.TransitionComponent,M=h.TransitionProps,O=h.transitionDuration,R=Cr(h,["persist","key","open","entered","requestClose","className","variant","content","action","ariaAttributes","anchorOrigin","message","TransitionComponent","TransitionProps","transitionDuration","onEnter","onEntered","onEntering","onExit","onExited","onExiting"]),P=_r({},Zr,{},p)[C],D=_r({"aria-describedby":"notistack-snackbar"},Fr(A,c)),N=E||g||Er.TransitionComponent,L=Fr(O,x,Er.transitionDuration),I=_r({direction:Wr(k)},Fr(M,v)),F=S||m;"function"===typeof F&&(F=F(b));var $=w||f;"function"===typeof $&&($=$(b,h.message));var B=["onEnter","onEntering","onEntered","onExit","onExiting","onExited"].reduce(function(e,t){var r;return _r({},e,((r={})[t]=Kr([n.snack[t],n[t]],n.snack.key),r))},{});return We.createElement(mr,{unmountOnExit:!0,timeout:175,in:o,onExited:B.onExited},We.createElement(ri,Object.assign({},y,R,{open:j,className:jn(t.root,ni.wrappedRoot,t[Dr(k)]),onClose:s}),We.createElement(N,Object.assign({appear:!0,in:j,timeout:L},I,{onExit:B.onExit,onExiting:B.onExiting,onExited:function(){r.current=setTimeout(function(){a(!o)},125)},onEnter:B.onEnter,onEntering:B.onEntering,onEntered:Kr([B.onEntered,function(){n.snack.requestClose&&s(null,Rr.INSTRCUTED)}])}),$||We.createElement(zr,Object.assign({},D,{role:"alert",style:l,className:jn(ni.contentRoot,ni[Nr(C)],t[Nr(C)],d,_,!u&&P&&ni.lessPadding)}),We.createElement("div",{id:D["aria-describedby"],className:ni.message},u?null:P,T),F&&We.createElement("div",{className:ni.action},F)))))},oi="& > .MuiCollapse-container, & > .MuiCollapse-root",ai="& > .MuiCollapse-container > .MuiCollapse-wrapper, & > .MuiCollapse-root > .MuiCollapse-wrapper",si="SnackbarContainer",li={root:si+"-root",rootDense:si+"-rootDense",top:si+"-top",bottom:si+"-bottom",left:si+"-left",right:si+"-right",center:si+"-center"},ci=(0,Vn.Ay)("div")(function(e){var t,n,r,i,o,a,s=e.theme;return(a={})["&."+li.root]=((t={boxSizing:"border-box",display:"flex",maxHeight:"100%",position:"fixed",zIndex:s.zIndex.snackbar,height:"auto",width:"auto",transition:"top 300ms ease 0ms, right 300ms ease 0ms, bottom 300ms ease 0ms, left 300ms ease 0ms, margin 300ms ease 0ms, max-width 300ms ease 0ms",pointerEvents:"none"})[oi]={pointerEvents:"all"},t[ai]={padding:Tr.default+"px 0px",transition:"padding 300ms ease 0ms"},t.maxWidth="calc(100% - "+2*kr.default+"px)",t[s.breakpoints.down("sm")]={width:"100%",maxWidth:"calc(100% - 32px)"},t),a["&."+li.rootDense]=((n={})[ai]={padding:Tr.dense+"px 0px"},n),a["&."+li.top]={top:kr.default-Tr.default,flexDirection:"column"},a["&."+li.bottom]={bottom:kr.default-Tr.default,flexDirection:"column-reverse"},a["&."+li.left]=((r={left:kr.default})[s.breakpoints.up("sm")]={alignItems:"flex-start"},r[s.breakpoints.down("sm")]={left:"16px"},r),a["&."+li.right]=((i={right:kr.default})[s.breakpoints.up("sm")]={alignItems:"flex-end"},i[s.breakpoints.down("sm")]={right:"16px"},i),a["&."+li.center]=((o={left:"50%",transform:"translateX(-50%)"})[s.breakpoints.up("sm")]={alignItems:"center"},o),a}),di=function(e){var t=e.className,n=e.anchorOrigin,r=e.dense,i=Cr(e,["className","anchorOrigin","dense"]),o=jn(li[n.vertical],li[n.horizontal],li.root,t,r&&li.rootDense);return We.createElement(ci,Object.assign({className:o},i))},ui=We.memo(di),pi=function(e){var t,n,r,i,o;function a(t){var n;return(n=e.call(this,t)||this).enqueueSnackbar=function(e,t){void 0===t&&(t={});var r=t,i=r.key,o=r.preventDuplicate,a=Cr(r,["key","preventDuplicate"]),s=Lr(i),l=s?i:(new Date).getTime()+Math.random(),c=function(e,t,n){return function(r){return"autoHideDuration"===r?Ir(e.autoHideDuration)?e.autoHideDuration:Ir(t.autoHideDuration)?t.autoHideDuration:Er.autoHideDuration:e[r]||t[r]||n[r]}}(a,n.props,Er),d=_r({key:l},a,{message:e,open:!0,entered:!1,requestClose:!1,variant:c("variant"),anchorOrigin:c("anchorOrigin"),autoHideDuration:c("autoHideDuration")});return a.persist&&(d.autoHideDuration=void 0),n.setState(function(t){if(void 0===o&&n.props.preventDuplicate||o){var r=function(t){return s?t.key===i:t.message===e},a=t.queue.findIndex(r)>-1,l=t.snacks.findIndex(r)>-1;if(a||l)return t}return n.handleDisplaySnack(_r({},t,{queue:[].concat(t.queue,[d])}))}),l},n.handleDisplaySnack=function(e){return e.snacks.length>=n.maxSnack?n.handleDismissOldest(e):n.processQueue(e)},n.processQueue=function(e){var t=e.queue,n=e.snacks;return t.length>0?_r({},e,{snacks:[].concat(n,[t[0]]),queue:t.slice(1,t.length)}):e},n.handleDismissOldest=function(e){if(e.snacks.some(function(e){return!e.open||e.requestClose}))return e;var t=!1,r=!1;e.snacks.reduce(function(e,t){return e+(t.open&&t.persist?1:0)},0)===n.maxSnack&&(r=!0);var i=e.snacks.map(function(e){return t||e.persist&&!r?_r({},e):(t=!0,e.entered?(e.onClose&&e.onClose(null,Rr.MAXSNACK,e.key),n.props.onClose&&n.props.onClose(null,Rr.MAXSNACK,e.key),_r({},e,{open:!1})):_r({},e,{requestClose:!0}))});return _r({},e,{snacks:i})},n.handleEnteredSnack=function(e,t,r){if(!Lr(r))throw new Error("handleEnteredSnack Cannot be called with undefined key");n.setState(function(e){return{snacks:e.snacks.map(function(e){return e.key===r?_r({},e,{entered:!0}):_r({},e)})}})},n.handleCloseSnack=function(e,t,r){if(n.props.onClose&&n.props.onClose(e,t,r),t!==Rr.CLICKAWAY){var i=void 0===r;n.setState(function(e){var t=e.snacks,n=e.queue;return{snacks:t.map(function(e){return i||e.key===r?e.entered?_r({},e,{open:!1}):_r({},e,{requestClose:!0}):_r({},e)}),queue:n.filter(function(e){return e.key!==r})}})}},n.closeSnackbar=function(e){var t=n.state.snacks.find(function(t){return t.key===e});Lr(e)&&t&&t.onClose&&t.onClose(null,Rr.INSTRUCTED,e),n.handleCloseSnack(null,Rr.INSTRUCTED,e)},n.handleExitedSnack=function(e,t,r){var i=t||r;if(!Lr(i))throw new Error("handleExitedSnack Cannot be called with undefined key");n.setState(function(e){var t=n.processQueue(_r({},e,{snacks:e.snacks.filter(function(e){return e.key!==i})}));return 0===t.queue.length?t:n.handleDismissOldest(t)})},n.state={snacks:[],queue:[],contextValue:{enqueueSnackbar:n.enqueueSnackbar.bind(wr(n)),closeSnackbar:n.closeSnackbar.bind(wr(n))}},n}return n=e,(t=a).prototype=Object.create(n.prototype),t.prototype.constructor=t,t.__proto__=n,a.prototype.render=function(){var e=this,t=this.state.contextValue,n=this.props,r=n.iconVariant,i=n.dense,o=void 0===i?Er.dense:i,a=n.hideIconVariant,s=void 0===a?Er.hideIconVariant:a,l=n.domRoot,c=n.children,d=n.classes,u=void 0===d?{}:d,p=Cr(n,["maxSnack","preventDuplicate","variant","anchorOrigin","iconVariant","dense","hideIconVariant","domRoot","children","classes"]),h=this.state.snacks.reduce(function(e,t){var n,r,i=(r=t.anchorOrigin,""+Mr(r.vertical)+Mr(r.horizontal)),o=e[i]||[];return _r({},e,((n={})[i]=[].concat(o,[t]),n))},{}),m=Object.keys(h).map(function(t){var n=h[t];return We.createElement(ui,{key:t,dense:o,anchorOrigin:n[0].anchorOrigin,className:jn(u.containerRoot,u[Pr(t)])},n.map(function(t){return We.createElement(ii,Object.assign({},p,{key:t.key,snack:t,dense:o,iconVariant:r,hideIconVariant:s,classes:Or(u),onClose:e.handleCloseSnack,onExited:Kr([e.handleExitedSnack,e.props.onExited]),onEntered:Kr([e.handleEnteredSnack,e.props.onEntered])}))}))});return We.createElement(Sr.Provider,{value:t},c,l?(0,ut.createPortal)(m,l):m)},r=a,(i=[{key:"maxSnack",get:function(){return this.props.maxSnack||Er.maxSnack}}])&&jr(r.prototype,i),o&&jr(r,o),a}(We.Component),hi=function(){return(0,We.useContext)(Sr)};function mi(){return mi=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},mi.apply(this,arguments)}!function(e){e.Pop="POP",e.Push="PUSH",e.Replace="REPLACE"}(Jr||(Jr={}));const fi="popstate";function gi(e,t){if(!1===e||null===e||"undefined"===typeof e)throw new Error(t)}function vi(e,t){if(!e){"undefined"!==typeof console&&console.warn(t);try{throw new Error(t)}catch(Ca){}}}function xi(e,t){return{usr:e.state,key:e.key,idx:t}}function yi(e,t,n,r){return void 0===n&&(n=null),mi({pathname:"string"===typeof e?e:e.pathname,search:"",hash:""},"string"===typeof t?ji(t):t,{state:n,key:t&&t.key||r||Math.random().toString(36).substr(2,8)})}function bi(e){let{pathname:t="/",search:n="",hash:r=""}=e;return n&&"?"!==n&&(t+="?"===n.charAt(0)?n:"?"+n),r&&"#"!==r&&(t+="#"===r.charAt(0)?r:"#"+r),t}function ji(e){let t={};if(e){let n=e.indexOf("#");n>=0&&(t.hash=e.substr(n),e=e.substr(0,n));let r=e.indexOf("?");r>=0&&(t.search=e.substr(r),e=e.substr(0,r)),e&&(t.pathname=e)}return t}function _i(e,t,n,r){void 0===r&&(r={});let{window:i=document.defaultView,v5Compat:o=!1}=r,a=i.history,s=Jr.Pop,l=null,c=d();function d(){return(a.state||{idx:null}).idx}function u(){s=Jr.Pop;let e=d(),t=null==e?null:e-c;c=e,l&&l({action:s,location:h.location,delta:t})}function p(e){let t="null"!==i.location.origin?i.location.origin:i.location.href,n="string"===typeof e?e:bi(e);return n=n.replace(/ $/,"%20"),gi(t,"No window.location.(origin|href) available to create URL for href: "+n),new URL(n,t)}null==c&&(c=0,a.replaceState(mi({},a.state,{idx:c}),""));let h={get action(){return s},get location(){return e(i,a)},listen(e){if(l)throw new Error("A history only accepts one active listener");return i.addEventListener(fi,u),l=e,()=>{i.removeEventListener(fi,u),l=null}},createHref:e=>t(i,e),createURL:p,encodeLocation(e){let t=p(e);return{pathname:t.pathname,search:t.search,hash:t.hash}},push:function(e,t){s=Jr.Push;let r=yi(h.location,e,t);n&&n(r,e),c=d()+1;let u=xi(r,c),p=h.createHref(r);try{a.pushState(u,"",p)}catch(m){if(m instanceof DOMException&&"DataCloneError"===m.name)throw m;i.location.assign(p)}o&&l&&l({action:s,location:h.location,delta:1})},replace:function(e,t){s=Jr.Replace;let r=yi(h.location,e,t);n&&n(r,e),c=d();let i=xi(r,c),u=h.createHref(r);a.replaceState(i,"",u),o&&l&&l({action:s,location:h.location,delta:0})},go:e=>a.go(e)};return h}var Ci;!function(e){e.data="data",e.deferred="deferred",e.redirect="redirect",e.error="error"}(Ci||(Ci={}));new Set(["lazy","caseSensitive","path","id","index","children"]);function wi(e,t,n){return void 0===n&&(n="/"),Si(e,t,n,!1)}function Si(e,t,n,r){let i=$i(("string"===typeof t?ji(t):t).pathname||"/",n);if(null==i)return null;let o=Ai(e);!function(e){e.sort((e,t)=>e.score!==t.score?t.score-e.score:function(e,t){let n=e.length===t.length&&e.slice(0,-1).every((e,n)=>e===t[n]);return n?e[e.length-1]-t[t.length-1]:0}(e.routesMeta.map(e=>e.childrenIndex),t.routesMeta.map(e=>e.childrenIndex)))}(o);let a=null;for(let s=0;null==a&&s<o.length;++s){let e=Fi(i);a=Li(o[s],e,r)}return a}function Ai(e,t,n,r){void 0===t&&(t=[]),void 0===n&&(n=[]),void 0===r&&(r="");let i=(e,i,o)=>{let a={relativePath:void 0===o?e.path||"":o,caseSensitive:!0===e.caseSensitive,childrenIndex:i,route:e};a.relativePath.startsWith("/")&&(gi(a.relativePath.startsWith(r),'Absolute route path "'+a.relativePath+'" nested under path "'+r+'" is not valid. An absolute child route path must start with the combined path of all its parent routes.'),a.relativePath=a.relativePath.slice(r.length));let s=Ui([r,a.relativePath]),l=n.concat(a);e.children&&e.children.length>0&&(gi(!0!==e.index,'Index routes must not have child routes. Please remove all child routes from route path "'+s+'".'),Ai(e.children,t,l,s)),(null!=e.path||e.index)&&t.push({path:s,score:Ni(s,e.index),routesMeta:l})};return e.forEach((e,t)=>{var n;if(""!==e.path&&null!=(n=e.path)&&n.includes("?"))for(let r of ki(e.path))i(e,t,r);else i(e,t)}),t}function ki(e){let t=e.split("/");if(0===t.length)return[];let[n,...r]=t,i=n.endsWith("?"),o=n.replace(/\?$/,"");if(0===r.length)return i?[o,""]:[o];let a=ki(r.join("/")),s=[];return s.push(...a.map(e=>""===e?o:[o,e].join("/"))),i&&s.push(...a),s.map(t=>e.startsWith("/")&&""===t?"/":t)}const Ti=/^:[\w-]+$/,Ei=3,Mi=2,Oi=1,Ri=10,Pi=-2,Di=e=>"*"===e;function Ni(e,t){let n=e.split("/"),r=n.length;return n.some(Di)&&(r+=Pi),t&&(r+=Mi),n.filter(e=>!Di(e)).reduce((e,t)=>e+(Ti.test(t)?Ei:""===t?Oi:Ri),r)}function Li(e,t,n){void 0===n&&(n=!1);let{routesMeta:r}=e,i={},o="/",a=[];for(let s=0;s<r.length;++s){let e=r[s],l=s===r.length-1,c="/"===o?t:t.slice(o.length)||"/",d=Ii({path:e.relativePath,caseSensitive:e.caseSensitive,end:l},c),u=e.route;if(!d&&l&&n&&!r[r.length-1].route.index&&(d=Ii({path:e.relativePath,caseSensitive:e.caseSensitive,end:!1},c)),!d)return null;Object.assign(i,d.params),a.push({params:i,pathname:Ui([o,d.pathname]),pathnameBase:Vi(Ui([o,d.pathnameBase])),route:u}),"/"!==d.pathnameBase&&(o=Ui([o,d.pathnameBase]))}return a}function Ii(e,t){"string"===typeof e&&(e={path:e,caseSensitive:!1,end:!0});let[n,r]=function(e,t,n){void 0===t&&(t=!1);void 0===n&&(n=!0);vi("*"===e||!e.endsWith("*")||e.endsWith("/*"),'Route path "'+e+'" will be treated as if it were "'+e.replace(/\*$/,"/*")+'" because the `*` character must always follow a `/` in the pattern. To get rid of this warning, please change the route path to "'+e.replace(/\*$/,"/*")+'".');let r=[],i="^"+e.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(e,t,n)=>(r.push({paramName:t,isOptional:null!=n}),n?"/?([^\\/]+)?":"/([^\\/]+)"));e.endsWith("*")?(r.push({paramName:"*"}),i+="*"===e||"/*"===e?"(.*)$":"(?:\\/(.+)|\\/*)$"):n?i+="\\/*$":""!==e&&"/"!==e&&(i+="(?:(?=\\/|$))");let o=new RegExp(i,t?void 0:"i");return[o,r]}(e.path,e.caseSensitive,e.end),i=t.match(n);if(!i)return null;let o=i[0],a=o.replace(/(.)\/+$/,"$1"),s=i.slice(1),l=r.reduce((e,t,n)=>{let{paramName:r,isOptional:i}=t;if("*"===r){let e=s[n]||"";a=o.slice(0,o.length-e.length).replace(/(.)\/+$/,"$1")}const l=s[n];return e[r]=i&&!l?void 0:(l||"").replace(/%2F/g,"/"),e},{});return{params:l,pathname:o,pathnameBase:a,pattern:e}}function Fi(e){try{return e.split("/").map(e=>decodeURIComponent(e).replace(/\//g,"%2F")).join("/")}catch(t){return vi(!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 $i(e,t){if("/"===t)return e;if(!e.toLowerCase().startsWith(t.toLowerCase()))return null;let n=t.endsWith("/")?t.length-1:t.length,r=e.charAt(n);return r&&"/"!==r?null:e.slice(n)||"/"}function Bi(e,t,n,r){return"Cannot include a '"+e+"' character in a manually specified `to."+t+"` field ["+JSON.stringify(r)+"].  Please separate it out to the `to."+n+'` field. Alternatively you may provide the full path as a string in <Link to="..."> and the router will parse it for you.'}function zi(e){return e.filter((e,t)=>0===t||e.route.path&&e.route.path.length>0)}function Hi(e,t){let n=zi(e);return t?n.map((e,t)=>t===n.length-1?e.pathname:e.pathnameBase):n.map(e=>e.pathnameBase)}function Wi(e,t,n,r){let i;void 0===r&&(r=!1),"string"===typeof e?i=ji(e):(i=mi({},e),gi(!i.pathname||!i.pathname.includes("?"),Bi("?","pathname","search",i)),gi(!i.pathname||!i.pathname.includes("#"),Bi("#","pathname","hash",i)),gi(!i.search||!i.search.includes("#"),Bi("#","search","hash",i)));let o,a=""===e||""===i.pathname,s=a?"/":i.pathname;if(null==s)o=n;else{let e=t.length-1;if(!r&&s.startsWith("..")){let t=s.split("/");for(;".."===t[0];)t.shift(),e-=1;i.pathname=t.join("/")}o=e>=0?t[e]:"/"}let l=function(e,t){void 0===t&&(t="/");let{pathname:n,search:r="",hash:i=""}="string"===typeof e?ji(e):e,o=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:o,search:Gi(r),hash:qi(i)}}(i,o),c=s&&"/"!==s&&s.endsWith("/"),d=(a||"."===s)&&n.endsWith("/");return l.pathname.endsWith("/")||!c&&!d||(l.pathname+="/"),l}const Ui=e=>e.join("/").replace(/\/\/+/g,"/"),Vi=e=>e.replace(/\/+$/,"").replace(/^\/*/,"/"),Gi=e=>e&&"?"!==e?e.startsWith("?")?e:"?"+e:"",qi=e=>e&&"#"!==e?e.startsWith("#")?e:"#"+e:"";Error;function Yi(e){return null!=e&&"number"===typeof e.status&&"string"===typeof e.statusText&&"boolean"===typeof e.internal&&"data"in e}const Zi=["post","put","patch","delete"],Ki=(new Set(Zi),["get",...Zi]);new Set(Ki),new Set([301,302,303,307,308]),new Set([307,308]);Symbol("deferred");function Xi(){return Xi=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Xi.apply(this,arguments)}const Qi=We.createContext(null);const Ji=We.createContext(null);const eo=We.createContext(null);const to=We.createContext(null);const no=We.createContext({outlet:null,matches:[],isDataRoute:!1});const ro=We.createContext(null);function io(){return null!=We.useContext(to)}function oo(){return io()||gi(!1),We.useContext(to).location}function ao(e){We.useContext(eo).static||We.useLayoutEffect(e)}function so(){let{isDataRoute:e}=We.useContext(no);return e?function(){let{router:e}=yo(vo.UseNavigateStable),t=jo(xo.UseNavigateStable),n=We.useRef(!1);return ao(()=>{n.current=!0}),We.useCallback(function(r,i){void 0===i&&(i={}),n.current&&("number"===typeof r?e.navigate(r):e.navigate(r,Xi({fromRouteId:t},i)))},[e,t])}():function(){io()||gi(!1);let e=We.useContext(Qi),{basename:t,future:n,navigator:r}=We.useContext(eo),{matches:i}=We.useContext(no),{pathname:o}=oo(),a=JSON.stringify(Hi(i,n.v7_relativeSplatPath)),s=We.useRef(!1);ao(()=>{s.current=!0});let l=We.useCallback(function(n,i){if(void 0===i&&(i={}),!s.current)return;if("number"===typeof n)return void r.go(n);let l=Wi(n,JSON.parse(a),o,"path"===i.relative);null==e&&"/"!==t&&(l.pathname="/"===l.pathname?t:Ui([t,l.pathname])),(i.replace?r.replace:r.push)(l,i.state,i)},[t,r,a,o,e]);return l}()}function lo(){let{matches:e}=We.useContext(no),t=e[e.length-1];return t?t.params:{}}function co(e,t){let{relative:n}=void 0===t?{}:t,{future:r}=We.useContext(eo),{matches:i}=We.useContext(no),{pathname:o}=oo(),a=JSON.stringify(Hi(i,r.v7_relativeSplatPath));return We.useMemo(()=>Wi(e,JSON.parse(a),o,"path"===n),[e,a,o,n])}function uo(e,t,n,r){io()||gi(!1);let{navigator:i}=We.useContext(eo),{matches:o}=We.useContext(no),a=o[o.length-1],s=a?a.params:{},l=(a&&a.pathname,a?a.pathnameBase:"/");a&&a.route;let c,d=oo();if(t){var u;let e="string"===typeof t?ji(t):t;"/"===l||(null==(u=e.pathname)?void 0:u.startsWith(l))||gi(!1),c=e}else c=d;let p=c.pathname||"/",h=p;if("/"!==l){let e=l.replace(/^\//,"").split("/");h="/"+p.replace(/^\//,"").split("/").slice(e.length).join("/")}let m=wi(e,{pathname:h});let f=go(m&&m.map(e=>Object.assign({},e,{params:Object.assign({},s,e.params),pathname:Ui([l,i.encodeLocation?i.encodeLocation(e.pathname).pathname:e.pathname]),pathnameBase:"/"===e.pathnameBase?l:Ui([l,i.encodeLocation?i.encodeLocation(e.pathnameBase).pathname:e.pathnameBase])})),o,n,r);return t&&f?We.createElement(to.Provider,{value:{location:Xi({pathname:"/",search:"",hash:"",state:null,key:"default"},c),navigationType:Jr.Pop}},f):f}function po(){let e=function(){var e;let t=We.useContext(ro),n=bo(xo.UseRouteError),r=jo(xo.UseRouteError);if(void 0!==t)return t;return null==(e=n.errors)?void 0:e[r]}(),t=Yi(e)?e.status+" "+e.statusText:e instanceof Error?e.message:JSON.stringify(e),n=e instanceof Error?e.stack:null,r="rgba(200,200,200, 0.5)",i={padding:"0.5rem",backgroundColor:r};return We.createElement(We.Fragment,null,We.createElement("h2",null,"Unexpected Application Error!"),We.createElement("h3",{style:{fontStyle:"italic"}},t),n?We.createElement("pre",{style:i},n):null,null)}const ho=We.createElement(po,null);class mo extends We.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:void 0!==e.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 void 0!==this.state.error?We.createElement(no.Provider,{value:this.props.routeContext},We.createElement(ro.Provider,{value:this.state.error,children:this.props.component})):this.props.children}}function fo(e){let{routeContext:t,match:n,children:r}=e,i=We.useContext(Qi);return i&&i.static&&i.staticContext&&(n.route.errorElement||n.route.ErrorBoundary)&&(i.staticContext._deepestRenderedBoundaryId=n.route.id),We.createElement(no.Provider,{value:t},r)}function go(e,t,n,r){var i;if(void 0===t&&(t=[]),void 0===n&&(n=null),void 0===r&&(r=null),null==e){var o;if(!n)return null;if(n.errors)e=n.matches;else{if(!(null!=(o=r)&&o.v7_partialHydration&&0===t.length&&!n.initialized&&n.matches.length>0))return null;e=n.matches}}let a=e,s=null==(i=n)?void 0:i.errors;if(null!=s){let e=a.findIndex(e=>e.route.id&&void 0!==(null==s?void 0:s[e.route.id]));e>=0||gi(!1),a=a.slice(0,Math.min(a.length,e+1))}let l=!1,c=-1;if(n&&r&&r.v7_partialHydration)for(let d=0;d<a.length;d++){let e=a[d];if((e.route.HydrateFallback||e.route.hydrateFallbackElement)&&(c=d),e.route.id){let{loaderData:t,errors:r}=n,i=e.route.loader&&void 0===t[e.route.id]&&(!r||void 0===r[e.route.id]);if(e.route.lazy||i){l=!0,a=c>=0?a.slice(0,c+1):[a[0]];break}}}return a.reduceRight((e,r,i)=>{let o,d=!1,u=null,p=null;n&&(o=s&&r.route.id?s[r.route.id]:void 0,u=r.route.errorElement||ho,l&&(c<0&&0===i?(!function(e,t){t||_o[e]||(_o[e]=!0)}("route-fallback",!1),d=!0,p=null):c===i&&(d=!0,p=r.route.hydrateFallbackElement||null)));let h=t.concat(a.slice(0,i+1)),m=()=>{let t;return t=o?u:d?p:r.route.Component?We.createElement(r.route.Component,null):r.route.element?r.route.element:e,We.createElement(fo,{match:r,routeContext:{outlet:e,matches:h,isDataRoute:null!=n},children:t})};return n&&(r.route.ErrorBoundary||r.route.errorElement||0===i)?We.createElement(mo,{location:n.location,revalidation:n.revalidation,component:u,error:o,children:m(),routeContext:{outlet:null,matches:h,isDataRoute:!0}}):m()},null)}var vo=function(e){return e.UseBlocker="useBlocker",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate",e}(vo||{}),xo=function(e){return e.UseBlocker="useBlocker",e.UseLoaderData="useLoaderData",e.UseActionData="useActionData",e.UseRouteError="useRouteError",e.UseNavigation="useNavigation",e.UseRouteLoaderData="useRouteLoaderData",e.UseMatches="useMatches",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate",e.UseRouteId="useRouteId",e}(xo||{});function yo(e){let t=We.useContext(Qi);return t||gi(!1),t}function bo(e){let t=We.useContext(Ji);return t||gi(!1),t}function jo(e){let t=function(){let e=We.useContext(no);return e||gi(!1),e}(),n=t.matches[t.matches.length-1];return n.route.id||gi(!1),n.route.id}const _o={};function Co(e,t){null==e||e.v7_startTransition,void 0===(null==e?void 0:e.v7_relativeSplatPath)&&(!t||t.v7_relativeSplatPath),t&&(t.v7_fetcherPersist,t.v7_normalizeFormMethod,t.v7_partialHydration,t.v7_skipActionErrorRevalidation)}Ue.startTransition;function wo(e){let{to:t,replace:n,state:r,relative:i}=e;io()||gi(!1);let{future:o,static:a}=We.useContext(eo),{matches:s}=We.useContext(no),{pathname:l}=oo(),c=so(),d=Wi(t,Hi(s,o.v7_relativeSplatPath),l,"path"===i),u=JSON.stringify(d);return We.useEffect(()=>c(JSON.parse(u),{replace:n,state:r,relative:i}),[c,u,i,n,r]),null}function So(e){gi(!1)}function Ao(e){let{basename:t="/",children:n=null,location:r,navigationType:i=Jr.Pop,navigator:o,static:a=!1,future:s}=e;io()&&gi(!1);let l=t.replace(/^\/*/,"/"),c=We.useMemo(()=>({basename:l,navigator:o,static:a,future:Xi({v7_relativeSplatPath:!1},s)}),[l,s,o,a]);"string"===typeof r&&(r=ji(r));let{pathname:d="/",search:u="",hash:p="",state:h=null,key:m="default"}=r,f=We.useMemo(()=>{let e=$i(d,l);return null==e?null:{location:{pathname:e,search:u,hash:p,state:h,key:m},navigationType:i}},[l,d,u,p,h,m,i]);return null==f?null:We.createElement(eo.Provider,{value:c},We.createElement(to.Provider,{children:n,value:f}))}function ko(e){let{children:t,location:n}=e;return uo(To(t),n)}new Promise(()=>{});We.Component;function To(e,t){void 0===t&&(t=[]);let n=[];return We.Children.forEach(e,(e,r)=>{if(!We.isValidElement(e))return;let i=[...t,r];if(e.type===We.Fragment)return void n.push.apply(n,To(e.props.children,i));e.type!==So&&gi(!1),e.props.index&&e.props.children&&gi(!1);let o={id:e.props.id||i.join("-"),caseSensitive:e.props.caseSensitive,element:e.props.element,Component:e.props.Component,index:e.props.index,path:e.props.path,loader:e.props.loader,action:e.props.action,errorElement:e.props.errorElement,ErrorBoundary:e.props.ErrorBoundary,hasErrorBoundary:null!=e.props.ErrorBoundary||null!=e.props.errorElement,shouldRevalidate:e.props.shouldRevalidate,handle:e.props.handle,lazy:e.props.lazy};e.props.children&&(o.children=To(e.props.children,i)),n.push(o)}),n}function Eo(){return Eo=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Eo.apply(this,arguments)}function Mo(e,t){if(null==e)return{};var n,r,i={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(i[n]=e[n]);return i}new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);const Oo=["onClick","relative","reloadDocument","replace","state","target","to","preventScrollReset","viewTransition"];try{window.__reactRouterVersion="6"}catch(Ca){}new Map;const Ro=Ue.startTransition;pt.flushSync,Ue.useId;function Po(e){let{basename:t,children:n,future:r,window:i}=e,o=We.useRef();var a;null==o.current&&(o.current=(void 0===(a={window:i,v5Compat:!0})&&(a={}),_i(function(e,t){let{pathname:n,search:r,hash:i}=e.location;return yi("",{pathname:n,search:r,hash:i},t.state&&t.state.usr||null,t.state&&t.state.key||"default")},function(e,t){return"string"===typeof t?t:bi(t)},null,a)));let s=o.current,[l,c]=We.useState({action:s.action,location:s.location}),{v7_startTransition:d}=r||{},u=We.useCallback(e=>{d&&Ro?Ro(()=>c(e)):c(e)},[c,d]);return We.useLayoutEffect(()=>s.listen(u),[s,u]),We.useEffect(()=>Co(r),[r]),We.createElement(Ao,{basename:t,children:n,location:l.location,navigationType:l.action,navigator:s,future:r})}const Do="undefined"!==typeof window&&"undefined"!==typeof window.document&&"undefined"!==typeof window.document.createElement,No=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,Lo=We.forwardRef(function(e,t){let n,{onClick:r,relative:i,reloadDocument:o,replace:a,state:s,target:l,to:c,preventScrollReset:d,viewTransition:u}=e,p=Mo(e,Oo),{basename:h}=We.useContext(eo),m=!1;if("string"===typeof c&&No.test(c)&&(n=c,Do))try{let e=new URL(window.location.href),t=c.startsWith("//")?new URL(e.protocol+c):new URL(c),n=$i(t.pathname,h);t.origin===e.origin&&null!=n?c=n+t.search+t.hash:m=!0}catch(Ca){}let f=function(e,t){let{relative:n}=void 0===t?{}:t;io()||gi(!1);let{basename:r,navigator:i}=We.useContext(eo),{hash:o,pathname:a,search:s}=co(e,{relative:n}),l=a;return"/"!==r&&(l="/"===a?r:Ui([r,a])),i.createHref({pathname:l,search:s,hash:o})}(c,{relative:i}),g=function(e,t){let{target:n,replace:r,state:i,preventScrollReset:o,relative:a,viewTransition:s}=void 0===t?{}:t,l=so(),c=oo(),d=co(e,{relative:a});return We.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!==r?r:bi(c)===bi(d);l(e,{replace:n,state:i,preventScrollReset:o,relative:a,viewTransition:s})}},[c,l,d,r,i,n,e,o,a,s])}(c,{replace:a,state:s,target:l,preventScrollReset:d,relative:i,viewTransition:u});return We.createElement("a",Eo({},p,{href:n||f,onClick:m||o?r:function(e){r&&r(e),e.defaultPrevented||g(e)},ref:t,target:l}))});var Io,Fo;(function(e){e.UseScrollRestoration="useScrollRestoration",e.UseSubmit="useSubmit",e.UseSubmitFetcher="useSubmitFetcher",e.UseFetcher="useFetcher",e.useViewTransitionState="useViewTransitionState"})(Io||(Io={})),function(e){e.UseFetcher="useFetcher",e.UseFetchers="useFetchers",e.UseScrollRestoration="useScrollRestoration"}(Fo||(Fo={}));const $o=function(){var e;return{setAssignmentCells:function(e){localStorage.setItem("assignmentCells",JSON.stringify(e))},getAssignmentCells:function(){return JSON.parse(localStorage.getItem("assignmentCells"))},getTourState:function(){return JSON.parse(localStorage.getItem("tourState"))||{}},setTourState:function(e){localStorage.setItem("tourState",JSON.stringify((0,i.A)((0,i.A)({},this.getTourState()),e)))},clearTourState:function(){localStorage.setItem("tourState",JSON.stringify({}))},getService:function(){return e||(e=this)},setToken:function(e){localStorage.setItem("auth_data",JSON.stringify(e))},getAccessToken:function(){return JSON.parse(localStorage.getItem("auth_data"))},setUrl:function(e){localStorage.setItem("url_data",JSON.stringify(e))},getUrl:function(){return JSON.parse(localStorage.getItem("url_data"))},clearToken:function(){localStorage.removeItem("auth_data")},setAdminToken:function(e){localStorage.setItem("admin_auth_data",JSON.stringify(e))},getAdminAccessToken:function(){return JSON.parse(localStorage.getItem("admin_auth_data"))},clearAdminToken:function(){localStorage.removeItem("admin_auth_data")},getHeadCellsPatient:function(){return JSON.parse(localStorage.getItem("headCellsPatient"))},setHeadCellsPatient:function(e){localStorage.setItem("headCellsPatient",JSON.stringify(e))},getHeadCellsPrescription:function(){return JSON.parse(localStorage.getItem("headCellsPrescription"))},setHeadCellsPrescription:function(e){localStorage.setItem("headCellsPrescription",JSON.stringify(e))},getHeadCellsTemplates:function(){return JSON.parse(localStorage.getItem("headCellsTemplates"))},setHeadCellsTemplates:function(e){localStorage.setItem("headCellsTemplates",JSON.stringify(e))},getTemplateDetailsHeadcells:function(){return JSON.parse(localStorage.getItem("tempDetailsHeadCells"))},setTemplateDetailsHeadcells:function(e){localStorage.setItem("tempDetailsHeadCells",JSON.stringify(e))},getScheduleHeadcells:function(){return JSON.parse(localStorage.getItem("scheduleHeadCells"))},setScheduleHeadcells:function(e){localStorage.setItem("scheduleHeadCells",JSON.stringify(e))},getProgramScheduleHeadcells:function(){return JSON.parse(localStorage.getItem("programScheduleHeadCells"))},setProgramScheduleHeadcells:function(e){localStorage.setItem("programScheduleHeadCells",JSON.stringify(e))},getAllProgramsCells:function(){return JSON.parse(localStorage.getItem("AllProgramsCells"))},setAllProgramsCells:function(e){localStorage.setItem("AllProgramsCells",JSON.stringify(e))},getLogsCell:function(){return JSON.parse(localStorage.getItem("LogsCell"))},setLogsCell:function(e){localStorage.setItem("LogsCell",JSON.stringify(e))},getUsersHeadCells:function(){return JSON.parse(localStorage.getItem("UsersHeadCells"))},setUsersHeadCells:function(e){localStorage.setItem("UsersHeadCells",JSON.stringify(e))},getProvidersHeadCells:function(){return JSON.parse(localStorage.getItem("UsersHeadCells"))},setProvidersHeadCells:function(e){localStorage.setItem("UsersHeadCells",JSON.stringify(e))},getProgramRulesHeadcells:function(){return JSON.parse(localStorage.getItem("programRulesHeadCells"))},setProgramRulesHeadcells:function(e){localStorage.setItem("programRulesHeadCells",JSON.stringify(e))},getRolesHeadcells:function(){return JSON.parse(localStorage.getItem("rolesHeadCells"))},setRolesHeadcells:function(e){localStorage.setItem("rolesHeadCells",JSON.stringify(e))},getAssignedProgramsHeadcells:function(){return JSON.parse(localStorage.getItem("assignedProgramsHeadCells"))},setAssignedProgramsHeadcells:function(e){localStorage.setItem("assignedProgramsHeadCells",JSON.stringify(e))},getAssignedRolesHeadcells:function(){return JSON.parse(localStorage.getItem("assignedRolesHeadCells"))},setAssignedRolesHeadcells:function(e){localStorage.setItem("assignedRolesHeadCells",JSON.stringify(e))},getMedicalHistoryHeadcells:function(){return JSON.parse(localStorage.getItem("medicalHistoryHeadCells"))},setMedicalHistoryHeadcells:function(e){localStorage.setItem("medicalHistoryHeadCells",JSON.stringify(e))},getResolvedAlertsHeadcells:function(){return JSON.parse(localStorage.getItem("resolvedAlertsHeadCells"))},setResolvedAlertsHeadcells:function(e){localStorage.setItem("resolvedAlertsHeadCells",JSON.stringify(e))},getPatientRulesHeadcells:function(){return JSON.parse(localStorage.getItem("patientRulesHeadCells"))},setPatientRulesHeadcells:function(e){localStorage.setItem("patientRulesHeadCells",JSON.stringify(e))},getTabPatient:function(){return JSON.parse(localStorage.getItem("patient_tab"))},setTabPatient:function(e){localStorage.setItem("patient_tab",JSON.stringify(e))},getPatientTableView:function(){return JSON.parse(localStorage.getItem("appUI"))},setPatientTableView:function(e){localStorage.setItem("appUI",JSON.stringify(e))},getPatientDefaultCourse:function(){return JSON.parse(localStorage.getItem("course"))},setPatientDefaultCourse:function(e){localStorage.setItem("course",JSON.stringify(e))},getPatientDefaultCourseGlucose:function(){return JSON.parse(localStorage.getItem("course_glucose"))},setPatientDefaultCourseGlucose:function(e){localStorage.setItem("course_glucose",JSON.stringify(e))},getFilterDate:function(){return JSON.parse(localStorage.getItem("filterDate"))},setFilterDate:function(e){localStorage.setItem("filterDate",JSON.stringify(e))},getFollowupCell:function(){return JSON.parse(localStorage.getItem("FollowupCells"))},setFollowupCell:function(e){localStorage.setItem("FollowupCells",JSON.stringify(e))}}}(),Bo="APP",zo="HEADER",Ho="PATIENT_TAB",Wo="LOADER",Uo="MESSAGE",Vo="LIST_GRID_VIEW",Go="DASHBOARD",qo="NOTIFICATIONS",Yo="PROGRAMS",Zo=e=>t=>{t({type:Uo,data:e})};function Ko(e,t){if(null==e)return{};var n,r,i=(0,nn.A)(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],-1===t.indexOf(n)&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}var Xo=n(40854),Qo=n.n(Xo),Jo=n(53536),ea=n(54320),ta=n.n(ea);const na=e=>t=>{t({type:Wo,data:e})};var ra=n(72450),ia=n(33097),oa=n.n(ia),aa=n(86178),sa=n.n(aa);const la={program:"/rpmcore/programs",schedules:"schedules"},ca={patients:"/rpmcore/patients",patient_course:"/rpmcore/patient-course",utility:"/rpmcore/utility",provider:"rpmcore/provider/assignment"},da={devices_list:"devices"},ua={medical:"medical-history",notes:"medical-history/patient-note",prescription:"medical-history/patient-prescription",template:"medical-history/template"},pa={by_patient:"reports/by-patient",by_course:"reports/by-schedule",consultation:"reports/doctor-report"},ha={refresh:"/authgateway/api/token",logout:"/authgateway/api/logout"},ma={INTROSPECT:"/agm/introspect/self",ROLES:"/agm/roles",USERS:"/agm/users",UPDATEPASSWORD:"/agm/self/update-password",GROUP:"/agm/groups",ACTIONS:"/actionsvc/actions",POLICY:"/agm/policies"},fa={logs:"/auditing/v2"},ga={WELLNESS_GOAL:"wellness-goal-manager/wellness-goal"},va={EXERCISE_GOAL:"wellness-goal-manager/workout-plan",ENUM:"wellness-goal-manager/api/enum",GYM_EQUIPMENTS:"wellness-goal-manager/api/gym-equipment"},xa={ENQUIRY_LIST:"dietitian/enquiry/list"},ya="/templates",ba={ACCOUNT_PACKAGE:"license/account-package",LICENSE_FEATURES:"/license/license-features"},ja={PROGRAM_PACKAGE:"license/program-package"},_a="/master-data-service/";function Ca(e){this.message=e}Ca.prototype=new Error,Ca.prototype.name="InvalidCharacterError";var wa="undefined"!=typeof window&&window.atob&&window.atob.bind(window)||function(e){var t=String(e).replace(/=+$/,"");if(t.length%4==1)throw new Ca("'atob' failed: The string to be decoded is not correctly encoded.");for(var n,r,i=0,o=0,a="";r=t.charAt(o++);~r&&(n=i%4?64*n+r:r,i++%4)?a+=String.fromCharCode(255&n>>(-2*i&6)):0)r="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".indexOf(r);return a};function Sa(e){this.message=e}Sa.prototype=new Error,Sa.prototype.name="InvalidTokenError";const Aa=function(e,t){if("string"!=typeof e)throw new Sa("Invalid token specified");var n=!0===(t=t||{}).header?0:1;try{return JSON.parse(function(e){var t=e.replace(/-/g,"+").replace(/_/g,"/");switch(t.length%4){case 0:break;case 2:t+="==";break;case 3:t+="=";break;default:throw"Illegal base64url string!"}try{return function(e){return decodeURIComponent(wa(e).replace(/(.)/g,function(e,t){var n=t.charCodeAt(0).toString(16).toUpperCase();return n.length<2&&(n="0"+n),"%"+n}))}(t)}catch(e){return wa(t)}}(e.split(".")[n]))}catch(e){throw new Sa("Invalid token specified: "+e.message)}};n(56434);var ka=n(93950),Ta=n.n(ka),Ea=n(62117),Ma=n.n(Ea),Oa=(n(61460),n(69613)),Ra=n.n(Oa);n(39829);const Pa="%[a-f0-9]{2}",Da=new RegExp("("+Pa+")|([^%]+?)","gi"),Na=new RegExp("("+Pa+")+","gi");function La(e,t){try{return[decodeURIComponent(e.join(""))]}catch(i){}if(1===e.length)return e;t=t||1;const n=e.slice(0,t),r=e.slice(t);return Array.prototype.concat.call([],La(n),La(r))}function Ia(e){try{return decodeURIComponent(e)}catch(t){let n=e.match(Da)||[];for(let r=1;r<n.length;r++)n=(e=La(n,r).join("")).match(Da)||[];return e}}function Fa(e){if("string"!==typeof e)throw new TypeError("Expected `encodedURI` to be of type `string`, got `"+typeof e+"`");try{return decodeURIComponent(e)}catch(t){return function(e){const t={"%FE%FF":"\ufffd\ufffd","%FF%FE":"\ufffd\ufffd"};let n=Na.exec(e);for(;n;){try{t[n[0]]=decodeURIComponent(n[0])}catch(i){const e=Ia(n[0]);e!==n[0]&&(t[n[0]]=e)}n=Na.exec(e)}t["%C2"]="\ufffd";const r=Object.keys(t);for(const o of r)e=e.replace(new RegExp(o,"g"),t[o]);return e}(e)}}function $a(e,t){if("string"!==typeof e||"string"!==typeof t)throw new TypeError("Expected the arguments to be of type `string`");if(""===e||""===t)return[];const n=e.indexOf(t);return-1===n?[]:[e.slice(0,n),e.slice(n+t.length)]}function Ba(e,t){const n={};if(Array.isArray(t))for(const r of t){const t=Object.getOwnPropertyDescriptor(e,r);null!==t&&void 0!==t&&t.enumerable&&Object.defineProperty(n,r,t)}else for(const r of Reflect.ownKeys(e)){const i=Object.getOwnPropertyDescriptor(e,r);if(i.enumerable){t(r,e[r],e)&&Object.defineProperty(n,r,i)}}return n}const za=e=>null===e||void 0===e,Ha=e=>encodeURIComponent(e).replace(/[!'()*]/g,e=>"%".concat(e.charCodeAt(0).toString(16).toUpperCase())),Wa=Symbol("encodeFragmentIdentifier");function Ua(e){if("string"!==typeof e||1!==e.length)throw new TypeError("arrayFormatSeparator must be single character string")}function Va(e,t){return t.encode?t.strict?Ha(e):encodeURIComponent(e):e}function Ga(e,t){return t.decode?Fa(e):e}function qa(e){return Array.isArray(e)?e.sort():"object"===typeof e?qa(Object.keys(e)).sort((e,t)=>Number(e)-Number(t)).map(t=>e[t]):e}function Ya(e){const t=e.indexOf("#");return-1!==t&&(e=e.slice(0,t)),e}function Za(e,t){return t.parseNumbers&&!Number.isNaN(Number(e))&&"string"===typeof e&&""!==e.trim()?e=Number(e):!t.parseBooleans||null===e||"true"!==e.toLowerCase()&&"false"!==e.toLowerCase()||(e="true"===e.toLowerCase()),e}function Ka(e){const t=(e=Ya(e)).indexOf("?");return-1===t?"":e.slice(t+1)}function Xa(e,t){Ua((t=(0,i.A)({decode:!0,sort:!0,arrayFormat:"none",arrayFormatSeparator:",",parseNumbers:!1,parseBooleans:!1},t)).arrayFormatSeparator);const n=function(e){let t;switch(e.arrayFormat){case"index":return(e,n,r)=>{t=/\[(\d*)]$/.exec(e),e=e.replace(/\[\d*]$/,""),t?(void 0===r[e]&&(r[e]={}),r[e][t[1]]=n):r[e]=n};case"bracket":return(e,n,r)=>{t=/(\[])$/.exec(e),e=e.replace(/\[]$/,""),t?void 0!==r[e]?r[e]=[...r[e],n]:r[e]=[n]:r[e]=n};case"colon-list-separator":return(e,n,r)=>{t=/(:list)$/.exec(e),e=e.replace(/:list$/,""),t?void 0!==r[e]?r[e]=[...r[e],n]:r[e]=[n]:r[e]=n};case"comma":case"separator":return(t,n,r)=>{const i="string"===typeof n&&n.includes(e.arrayFormatSeparator),o="string"===typeof n&&!i&&Ga(n,e).includes(e.arrayFormatSeparator);n=o?Ga(n,e):n;const a=i||o?n.split(e.arrayFormatSeparator).map(t=>Ga(t,e)):null===n?n:Ga(n,e);r[t]=a};case"bracket-separator":return(t,n,r)=>{const i=/(\[])$/.test(t);if(t=t.replace(/\[]$/,""),!i)return void(r[t]=n?Ga(n,e):n);const o=null===n?[]:n.split(e.arrayFormatSeparator).map(t=>Ga(t,e));void 0!==r[t]?r[t]=[...r[t],...o]:r[t]=o};default:return(e,t,n)=>{void 0!==n[e]?n[e]=[...[n[e]].flat(),t]:n[e]=t}}}(t),r=Object.create(null);if("string"!==typeof e)return r;if(!(e=e.trim().replace(/^[?#&]/,"")))return r;for(const i of e.split("&")){if(""===i)continue;const e=t.decode?i.replace(/\+/g," "):i;let[o,a]=$a(e,"=");void 0===o&&(o=e),a=void 0===a?null:["comma","separator","bracket-separator"].includes(t.arrayFormat)?a:Ga(a,t),n(Ga(o,t),a,r)}for(const[i,o]of Object.entries(r))if("object"===typeof o&&null!==o)for(const[e,n]of Object.entries(o))o[e]=Za(n,t);else r[i]=Za(o,t);return!1===t.sort?r:(!0===t.sort?Object.keys(r).sort():Object.keys(r).sort(t.sort)).reduce((e,t)=>{const n=r[t];return e[t]=Boolean(n)&&"object"===typeof n&&!Array.isArray(n)?qa(n):n,e},Object.create(null))}function Qa(e,t){if(!e)return"";Ua((t=(0,i.A)({encode:!0,strict:!0,arrayFormat:"none",arrayFormatSeparator:","},t)).arrayFormatSeparator);const n=n=>t.skipNull&&za(e[n])||t.skipEmptyString&&""===e[n],r=function(e){switch(e.arrayFormat){case"index":return t=>(n,r)=>{const i=n.length;return void 0===r||e.skipNull&&null===r||e.skipEmptyString&&""===r?n:null===r?[...n,[Va(t,e),"[",i,"]"].join("")]:[...n,[Va(t,e),"[",Va(i,e),"]=",Va(r,e)].join("")]};case"bracket":return t=>(n,r)=>void 0===r||e.skipNull&&null===r||e.skipEmptyString&&""===r?n:null===r?[...n,[Va(t,e),"[]"].join("")]:[...n,[Va(t,e),"[]=",Va(r,e)].join("")];case"colon-list-separator":return t=>(n,r)=>void 0===r||e.skipNull&&null===r||e.skipEmptyString&&""===r?n:null===r?[...n,[Va(t,e),":list="].join("")]:[...n,[Va(t,e),":list=",Va(r,e)].join("")];case"comma":case"separator":case"bracket-separator":{const t="bracket-separator"===e.arrayFormat?"[]=":"=";return n=>(r,i)=>void 0===i||e.skipNull&&null===i||e.skipEmptyString&&""===i?r:(i=null===i?"":i,0===r.length?[[Va(n,e),t,Va(i,e)].join("")]:[[r,Va(i,e)].join(e.arrayFormatSeparator)])}default:return t=>(n,r)=>void 0===r||e.skipNull&&null===r||e.skipEmptyString&&""===r?n:null===r?[...n,Va(t,e)]:[...n,[Va(t,e),"=",Va(r,e)].join("")]}}(t),o={};for(const[i,s]of Object.entries(e))n(i)||(o[i]=s);const a=Object.keys(o);return!1!==t.sort&&a.sort(t.sort),a.map(n=>{const i=e[n];return void 0===i?"":null===i?Va(n,t):Array.isArray(i)?0===i.length&&"bracket-separator"===t.arrayFormat?Va(n,t)+"[]":i.reduce(r(n),[]).join("&"):Va(n,t)+"="+Va(i,t)}).filter(e=>e.length>0).join("&")}function Ja(e,t){var n,r;t=(0,i.A)({decode:!0},t);let[o,a]=$a(e,"#");return void 0===o&&(o=e),(0,i.A)({url:null!==(n=null===(r=o)||void 0===r||null===(r=r.split("?"))||void 0===r?void 0:r[0])&&void 0!==n?n:"",query:Xa(Ka(e),t)},t&&t.parseFragmentIdentifier&&a?{fragmentIdentifier:Ga(a,t)}:{})}function es(e,t){t=(0,i.A)({encode:!0,strict:!0,[Wa]:!0},t);const n=Ya(e.url).split("?")[0]||"",r=Ka(e.url);let o=Qa((0,i.A)((0,i.A)({},Xa(r,{sort:!1})),e.query),t);o&&(o="?".concat(o));let a=function(e){let t="";const n=e.indexOf("#");return-1!==n&&(t=e.slice(n)),t}(e.url);if(e.fragmentIdentifier){const r=new URL(n);r.hash=e.fragmentIdentifier,a=t[Wa]?r.hash:"#".concat(e.fragmentIdentifier)}return"".concat(n).concat(o).concat(a)}function ts(e,t,n){n=(0,i.A)({parseFragmentIdentifier:!0,[Wa]:!1},n);const{url:r,query:o,fragmentIdentifier:a}=Ja(e,n);return es({url:r,query:Ba(o,t),fragmentIdentifier:a},n)}function ns(e,t,n){const r=Array.isArray(t)?e=>!t.includes(e):(e,n)=>!t(e,n);return ts(e,r,n)}const rs=e,is=(e,t)=>{if(e&&t){const n=sa()(e).startOf("day");return sa()(t).endOf("day").diff(n,"days")+parseInt(1)}return 0},os=(e,t)=>{const n=sa()(e).startOf("day");return sa()(n).add(t,"days")-1},as=function(e){return(e||"").trim()},ss=function(e){if(cs(e))return e;if("object"===typeof e&&!Array.isArray(e)){let t={};return Object.entries(e).map(e=>{if("string"===typeof e[1])t=(0,i.A)((0,i.A)({},t),{},{[e[0]]:e[1].trim()});else if("object"===typeof e[1]){let n=ss(e[1]);t=(0,i.A)((0,i.A)({},t),{},{[e[0]]:n})}else t=(0,i.A)((0,i.A)({},t),{},{[e[0]]:e[1]})}),t}if("object"===typeof e&&Array.isArray(e)){let t=[];return e.map(e=>{if("string"===typeof e)t.push(e.trim());else if("object"===typeof e){let n=ss(e);t.push(n)}else t.push(e)}),t}},ls=function(e,t){let n={};return Object.keys(t).forEach(r=>{n[r]=ps(e[r])?t[r]:e[r]}),n},cs=ta(),ds=Ta(),us=oa(),ps=function(e){return null===e||void 0===e||""===e},hs=function(e,t){const n={};return Object.keys(e).forEach(r=>{n[r]=ps(t[r])?e[r]:t[r]}),n},ms=function(e,t){return sa()(e).format(t)},fs=e=>{if(!e)return"";if("string"===typeof e&&/^\d{4}-\d{2}-\d{2}/.test(e))return e.slice(0,10);const t=new Date(e);if(Number.isNaN(t.getTime()))return"";const n=t.getFullYear(),r="".concat(t.getMonth()+1).padStart(2,"0"),i="".concat(t.getDate()).padStart(2,"0");return"".concat(n,"-").concat(r,"-").concat(i)},gs=function(e,t,n){const r=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:new Date;return t.setFullYear(t.getFullYear()-e),t}(e).getFullYear();return new Date(r,t,n)},vs=function(e){if(!e||0===e)return{years:"NA"};const t=sa()().valueOf(),n=sa()(e).valueOf();return{years:Math.round(Math.abs(sa().duration(n-t).asYears()))}},xs=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return e.charAt(0).toUpperCase()+e.slice(1)},ys=(e,t)=>{const n=e.split(":"),r=sa()().utc();return r.set({hour:n[0],minute:n[1],second:0,millisecond:0}),t?r.add(t,"seconds").local().format("HH:mm"):r.local().format("HH:mm")},bs=e=>{const t=e.split(":"),n=sa()().utc();return n.set({hour:t[0],minute:t[1],second:0,millisecond:0}),n.local()},js=function(){return rs.parse(location.search)},_s=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];const n=e.filter(e=>-1===t.indexOf(e)),r=t.filter(t=>-1===e.indexOf(t));return n.concat(r)},Cs=e=>{switch(e){case"active":return"success";case"inactive":return"error";case"upcoming":return"warning";default:return"default"}},ws=(e,t,n,r)=>({[t]:function(){let t=[];for(let o=0;o<r;o++)t.push({[n]:e[n].map(e=>{const t=Object.keys(e).toString();return(0,i.A)((0,i.A)({},e),{},{[t]:[e[t][0].split("0").join(o),e[t][1]]})})});return t}()}),Ss=(e,t)=>{let n=[];for(let r=0;r<t;r++)n.push("Data[".concat(r,"].values.").concat(e)),r!==t-1&&n.push('" "');return n},As=async e=>e&&e.lastModifiedDate?new Promise(t=>{const n=new FileReader;n.readAsDataURL(e),n.onloadend=()=>{const e=n.result.split(",")[1];t(e)}}):null,ks=async(e,t)=>{if(e&&t){const n=atob(e),r=new Array(n.length);for(let e=0;e<n.length;e++)r[e]=n.charCodeAt(e);const i=new Uint8Array(r),o=new Blob([i],{type:"image/jpeg"});return new File([o],t,{type:"image/jpeg"})}return null},Ts=(e,t,n)=>({[t]:function(){let t=[];const r=Object.keys(e).toString();for(let o=0;o<n;o++)t.push((0,i.A)((0,i.A)({},e),{},{[r]:[e[r][0].split("0").join(o),e[r][1]]}));return t}()}),Es=e=>{var t;const n=null===e||void 0===e||null===(t=e.alerts)||void 0===t?void 0:t.filter(e=>"systolic"===e.data_name||"diastolic"===e.data_name),r=null===n||void 0===n?void 0:n.map(e=>e.text),i=[...new Set(r)];return i.length>1?i[i.length-1]:i.join(" ")},Ms=e=>{var t;const n=null===e||void 0===e||null===(t=e.alerts)||void 0===t?void 0:t.filter(e=>"systolic"!==e.data_name&&"diastolic"!==e.data_name&&"pulse"!==e.data_name),r=null===n||void 0===n?void 0:n.map(e=>e.text),i=[...new Set(r)];return i.length>1?i[i.length-1]:i.join(" ")},Os=(e,t)=>e.reduce(function(e,n){return-1===e.indexOf(n[t])&&e.push(n[t]),e},[]),Rs=e=>{var t;const n=null===e||void 0===e||null===(t=e.alerts)||void 0===t?void 0:t.filter(e=>"pulse"===e.data_name),r=null===n||void 0===n?void 0:n.map(e=>e.text),i=[...new Set(r)];return i.length>1?i[i.length-1]:i.join(" ")},Ps=(e,t)=>{if(cs(e)||cs(t))return null;const[n,r]=null===e||void 0===e?void 0:e.split(".");let i=2.54*[12*Number(n)+Number(r)],o=1e4*[t/(Number(i)*Number(i))];return""===t?"--":(o=Number.isFinite(o)?o:0,o.toFixed(2))},Ds=(e,t)=>sa().utc("2023-01-01T".concat(e,":00")).clone().utcOffset("+05:30").format(t),Ns=e=>{const t=sa()().valueOf(),n=sa()(e).valueOf(),r=Math.round(Math.abs(sa().duration(n-t).asYears()));return r||"NA"},Ls=e=>{if(!e)return"";const[t,n]=e.split("@");return(t.length>2?t[0]+"*".repeat(t.length-2)+t[t.length-1]:t[0]+"*")+"@"+n},Is=e=>e?e.length<=2?e[0]+"*":e[0]+"*".repeat(e.length-2)+e[e.length-1]:"",Fs=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";if(!t)return e;const n=e.split(new RegExp("(".concat(t,")"),"gi"));return(0,qt.jsx)(qt.Fragment,{children:n.map((e,n)=>e.toLowerCase()===t.toLowerCase()?(0,qt.jsx)("span",{style:{fontWeight:700},children:e},n):(0,qt.jsx)("span",{children:e},n))})},$s=e=>t=>t({type:Go,payload:e}),Bs=function(e){if(null===(null===e||void 0===e?void 0:e.updated_at))return!1;e.updated_at=sa()(e.updated_at).format("DD MMM YYYY hh:mm A")},zs=e=>async t=>{t(na(!0));const n=(0,i.A)((0,i.A)({},e),{},{image:await As(null===e||void 0===e?void 0:e.image)});try{const e="".concat(la.program);return await Fu(e,n)}finally{t(na(!1))}},Hs=e=>async t=>{t(na(!0));const n={display_name:e.display_name,country:e.country,state:e.state,city:e.city,address:e.address,image:await As(e.image),def:e.def,facility_type:null===e||void 0===e?void 0:e.facility_type};try{const t="".concat(la.program,"/").concat(e.id);return await $u(t,n)}finally{t(na(!1))}},Ws=(e,t)=>async n=>{n(na(!0));try{const n="".concat(la.program,"?&programName=").concat((null===t||void 0===t?void 0:t.programName)||"","&page=").concat(e.current_page||"","&perPage=").concat(e.per_page||"","&sortBy=").concat(e.sort_by||"","&sortOrder=").concat(e.sort_order||""),r=await Iu(n,{});return oa()(r,"data.content",[]).forEach(e=>Bs(e)),r}catch(r){return r}finally{n(na(!1))}},Us=e=>async t=>{t(na(!0));try{const t="".concat(la.program,"/").concat(e,"/download/qr"),n=await Iu(t,{responseType:"arraybuffer"}),r=new Blob([null===n||void 0===n?void 0:n.data],{type:"image/png"});return(0,ra.saveAs)(r,"".concat(e,"-qr.png")),null===n||void 0===n?void 0:n.data}catch(n){return console.error(n),n}finally{t(na(!1))}},Vs=(e,t)=>async n=>{n(na(!0));try{const n="".concat(la.program,"/").concat(e,"/rules?page=").concat(t.current_page||"","&perPage=").concat(t.per_page||"","&sortBy=").concat(t.sort_by||"","&sortOrder=").concat(t.sort_order||"","&dataName=").concat(t.dataName||"","&includeInactive=").concat(t.includeInactive||""),r=await Iu(n,{});return oa()(r,"data.content",[]).forEach(e=>Bs(e)),r}finally{n(na(!1))}},Gs=(e,t)=>async n=>{n(na(!0));const r=(0,i.A)((0,i.A)({},t),{},{data_batch_size:"BATCH"===(null===t||void 0===t?void 0:t.processing_mode)?null===t||void 0===t?void 0:t.data_batch_size:"",status:!0,default_rule:!0});try{const t="".concat(la.program,"/").concat(e,"/rules");return await Fu(t,r)}finally{n(na(!1))}},qs=e=>async t=>{t(na(!0));try{const t="".concat(la.program,"/").concat(null===e||void 0===e?void 0:e.programId,"/rules/").concat(null===e||void 0===e?void 0:e.ruleId,"?rule_status=").concat(null===e||void 0===e?void 0:e.status,"&default_rule=").concat(null===e||void 0===e?void 0:e.defaultRule);return await $u(t,{})}finally{t(na(!1))}},Ys=(e,t)=>async n=>{n(na(!0));try{const n="".concat(la.program,"/").concat(e,"/rules/").concat(t);return await Iu(n,{})}catch(r){return r}finally{n(na(!1))}},Zs=e=>async t=>{t(na(!0));try{const t="".concat(la.program,"/").concat(null===e||void 0===e?void 0:e.programId,"/rules?vital=").concat(null===e||void 0===e?void 0:e.data_type,"&ruleId=").concat(null===e||void 0===e?void 0:e.ruleId);return await Bu(t,{})}finally{t(na(!1))}},Ks=(e,t)=>async n=>{n(na(!0));try{const n="".concat(la.program,"/").concat(e,"/notification-settings");return await Fu(n,t)}finally{n(na(!1))}},Xs=e=>async t=>{t(na(!0));try{const n="".concat(la.program,"/").concat(e,"/notification-settings"),r=await Iu(n,{});return await t({type:qo,payload:r.data}),r}catch(n){return n}finally{t(na(!1))}},Qs=e=>async t=>{t(na(!0));const n=$o.getAccessToken();try{const t="".concat(la.program,"/list-program?tenant_id=").concat(null===n||void 0===n?void 0:n.accountId);return await Fu(t,e)}catch(r){return r}finally{t(na(!1))}},Js=e=>async t=>{t(na(!0));try{const t="".concat(fa.logs,"/events/").concat(e);return await Iu(t,{})}catch(n){return n}finally{t(na(!1))}},el=function(e){cs(e)||(e.updated_at=ms(e.updated_at,md),e.created_at=ms(e.created_at,md))},tl=function(e){var t;null!==(null===e||void 0===e?void 0:e.last_vital_frames)&&(null===e||void 0===e||null===(t=e.last_vital_frames)||void 0===t||t.forEach(e=>{e.ts=sa()(e.ts).format("DD MMM YYYY hh:mm A")}),e.birth_date=sa()(e.birth_date).format("DD/MM/YYYY"))},nl=function(e){null===(null===e||void 0===e?void 0:e.ts)&&null===e.dismissed_at||(e.ts=sa()(e.ts).format("DD MMM YYYY hh:mm A"),e.dismissed_at=sa()(e.dismissed_at).format("DD MMM YYYY hh:mm A"))},rl=function(e){null!==(null===e||void 0===e?void 0:e.date)&&(e.date=sa()(e.date).format("DD MMM YYYY"))},il=function(e){null!==(null===e||void 0===e?void 0:e.last_activity)&&(e.last_activity=sa()(e.last_activity).format("DD MMM YYYY hh:mm A"))},ol=(e,t)=>async n=>{let r;var o;(n(na(!0)),t.email)?r=(0,i.A)({},t):r={birth_date:t.birth_date,device:t.device,first_name:t.first_name,last_name:t.last_name,mobile:t.mobile,observer:t.observer,profile:{gender:null===t||void 0===t||null===(o=t.profile)||void 0===o?void 0:o.gender}};try{const t="".concat(ca.patients,"/").concat(e);return await Fu(t,r)}finally{n(na(!1))}},al=e=>async t=>{t(na(!0));let n="";e.flag&&"ALL"!==e.flag&&(n="COMPLIANT"==e.flag?"&excludedFlag=NON_COMPLIANT":"&flag=".concat(e.flag));try{var r;const t="".concat(ca.patients,"/").concat(e.program_code,"?").concat(n,"&q=").concat(as(null===e||void 0===e||null===(r=e.filterState)||void 0===r?void 0:r.patientName),"&page=").concat(e.current_page||"","&perPage=").concat(e.per_page||"","&sortBy=").concat(e.sort_by||"","&sortOrder=").concat(e.sort_order||""),i=await Iu(t,{});return i.data.content.map(e=>{el(e)}),i}catch(i){return i}finally{t(na(!1))}},sl=(e,t)=>async n=>{n(na(!0));try{var r,i;const n="".concat(ca.patients,"/").concat(e||"","/all-patientList?&q=").concat(as(null===t||void 0===t||null===(r=t.newFilterState)||void 0===r?void 0:r.patientName),"&userMobile=").concat(as(null===t||void 0===t||null===(i=t.newFilterState)||void 0===i?void 0:i.userMobile),"&page=").concat(t.current_page||"","&perPage=").concat(t.per_page||"","&sortBy=").concat(t.sort_by||"","&sortOrder=").concat(t.sort_order||"");return await Iu(n,{})}catch(o){return o}finally{n(na(!1))}},ll=e=>async()=>{try{return await Iu("".concat(ca.provider,"?programUrn=").concat(null===e||void 0===e?void 0:e.programUrn),{})}catch(t){return t}},cl=e=>async t=>{t(na(!0));try{const t="".concat(ca.provider);return await Fu(t,e)}catch(n){return n}finally{t(na(!1))}},dl=e=>async t=>{t(na(!0));try{const t="".concat(la.program,"/").concat((null===e||void 0===e?void 0:e.programId)||"","/compliance/compliant-info?status=").concat((null===e||void 0===e?void 0:e.status)||"");return await Iu(t,{})}catch(n){return n}finally{t(na(!1))}},ul=e=>async t=>{t(na(!0));try{const t="".concat(la.schedules,"/-/").concat(e.programCode,"/read-course-vital");return await Fu(t,{patient_id:e.patientIds})}finally{t(na(!1))}},pl=(e,t)=>async n=>{n(na(!0));try{const n="".concat(ca.patients,"/").concat(e,"/").concat(t),r=await Iu(n,{});return oa()(r,"data.content",[]).forEach(e=>tl(e)),r}catch(r){return r}finally{n(na(!1))}},hl=(e,t)=>async n=>{n(na(!0));try{const n="".concat(ca.patients,"/").concat(e,"/data/last-frame?dataNames=").concat(t),r=await Iu(n,{});return oa()(r,"data.content",[]).forEach(e=>tl(e)),r}catch(r){return r}finally{n(na(!1))}},ml=(e,t,n)=>async r=>{r(na(!0));try{const r="".concat(ca.patient_course,"/compliant-info?patientCourseId=").concat(n,"&patientId=").concat(e,"&courseId=").concat(t),i=await Iu(r,{});return oa()(i,"data.content",[]).forEach(e=>tl(e)),i}catch(i){return i}finally{r(na(!1))}},fl=e=>async t=>{t(na(!0));try{const t="".concat(ca.patients,"/").concat(e.patient_id,"/data?dataNames=").concat(e.desease,"&start=").concat(e.duration[0],"&end=").concat(e.duration[1]),n=await Iu(t,{});return oa()(n,"data",[]).forEach(e=>nl(e)),n}catch(n){return n}finally{t(na(!1))}},gl=(e,t,n)=>async r=>{r(na(!0));try{const r="".concat(ca.patients,"/").concat(e,"/").concat(t,"/rules?page=").concat(n.current_page||"","&perPage=").concat(n.per_page||"","&sortBy=").concat(n.sort_by||"","&sortOrder=").concat(n.sort_order||""),i=await Iu(r,{});return oa()(i,"data.content",[]).forEach(e=>tl(e)),i}finally{r(na(!1))}},vl=(e,t)=>async n=>{n(na(!0));try{let n="".concat(ca.patients,"/").concat(e,"/alerts?dataName=").concat(t.vitalType||"","&page=").concat(t.current_page||"","&perPage=").concat(t.per_page||"","&sortBy=").concat(t.sort_by||"","&sortOrder=").concat(t.sort_order||"","&minTs=").concat(t.minTs||"","&maxTs=").concat(t.maxTs||"");t.includeDismissed&&(n+="&includeDismissed=".concat(t.includeDismissed));const r=await Iu(n,{});return oa()(r,"data.content",[]).forEach(e=>nl(e)),r}catch(r){return r}finally{n(na(!1))}},xl=(e,t,n)=>async r=>{r(na(!0));try{const r="".concat(ca.patients,"/").concat(e,"/alerts/dismiss?alertId=").concat(t),i=await $u(r,n);return oa()(i,"data.content",[]).forEach(e=>nl(e)),i}catch(i){return i}finally{r(na(!1))}},yl=(e,t,n)=>async r=>{r(na(!0));const o=(0,i.A)((0,i.A)({},n),{},{data_batch_size:"BATCH"===(null===n||void 0===n?void 0:n.processing_mode)?null===n||void 0===n?void 0:n.data_batch_size:"",status:!0,default_rule:!0});try{const n="".concat(ca.patients,"/").concat(e,"/").concat(t,"/rules");return await Fu(n,o)}finally{r(na(!1))}},bl=e=>async t=>{t(na(!0));try{const t="".concat(ca.patients,"/").concat(null===e||void 0===e?void 0:e.programId,"/").concat(null===e||void 0===e?void 0:e.patientId,"/rules/").concat(null===e||void 0===e?void 0:e.ruleId,"?rule_status=").concat(null===e||void 0===e?void 0:e.status,"&default_rule=").concat(null===e||void 0===e?void 0:e.defaultRule);return await $u(t,{})}finally{t(na(!1))}},jl=e=>async t=>{t(na(!0));try{const t="".concat(ca.patients,"/").concat(null===e||void 0===e?void 0:e.programId,"/").concat(null===e||void 0===e?void 0:e.patientId,"/rules?vital=").concat(null===e||void 0===e?void 0:e.data_type,"&ruleId=").concat(null===e||void 0===e?void 0:e.ruleId);return await Bu(t,{})}finally{t(na(!1))}},_l=(e,t,n)=>async r=>{r(na(!0));try{const r="".concat(ca.patients,"/").concat(e,"/").concat(t,"/rules/").concat(n);return await Iu(r,{})}catch(i){return i}finally{r(na(!1))}},Cl=(e,t)=>async n=>{n(na(!0));try{const n="".concat(da.devices_list,"?association=").concat(t,"&q=").concat(as(e.q),"&page=").concat(e.current_page||"","&perPage=").concat(e.per_page||"","&sortBy=").concat(e.sort_by||"","&sortOrder=").concat(e.sort_order||"","&search=").concat(e.search||""),r=await Iu(n,{});return oa()(r,"data.content",[]).forEach(e=>il(e)),r}catch(r){return r}finally{n(na(!1))}},wl=(e,t)=>async n=>{n(na(!0));try{const n="".concat(da.devices_list,"/associated-to/").concat(t,"?q=").concat(as(e.q),"&page=").concat(e.current_page||"","&perPage=").concat(e.per_page||"","&sortBy=").concat(e.sort_by||"","&sortOrder=").concat(e.sort_order||""),r=await Iu(n,{});return oa()(r,"data.content",[]).forEach(e=>il(e)),r}catch(r){return r}finally{n(na(!1))}},Sl=(e,t)=>async n=>{n(na(!0));try{const r="".concat(la.schedules,"/-/").concat(t.programId,"/patient/").concat(t.patientId,"?q=").concat(as(e.q)||"","&vital=").concat(e.filter||"","&page=").concat(e.current_page||"","&perPage=").concat(e.per_page||"","&sortBy=").concat(e.sort_by||"","&sortOrder=").concat(e.sort_order||""),i=await Iu(r,{}),{data:o}=i,a={vitals:{bp:{course:null===o||void 0===o?void 0:o.filter(e=>"bp"===e.schedule.vital_name)},glucose:{course:null===o||void 0===o?void 0:o.filter(e=>"glucose"===e.schedule.vital_name)}}};return n($s(a)),i}catch(r){return r}finally{n(na(!1))}},Al=(e,t,n)=>async r=>{r(na(!0));try{const r="".concat(ua.medical,"/").concat(e||"","/").concat(t||"","?kind=").concat(n.kind,"&page=").concat(n.current_page||"","&perPage=").concat(n.per_page||"","&sortBy=").concat(n.sort_by||"","&sortOrder=").concat(n.sort_order||"");return await Iu(r,{})}finally{r(na(!1))}},kl=(e,t,n)=>async r=>{r(na(!0));try{var i;let a=new FormData;a.append("disease_name",null===n||void 0===n?void 0:n.disease_name),a.append("start_date",null===n||void 0===n?void 0:n.start_date),a.append("end_date",null===n||void 0===n?void 0:n.end_date),a.append("remark",null===n||void 0===n?void 0:n.remark),a.append("duration_unit",null===n||void 0===n?void 0:n.duration_unit),a.append("custom_duration",null===n||void 0===n?void 0:n.custom_duration),a.append("kind",null===n||void 0===n?void 0:n.kind),a.append("relationship",null===n||void 0===n?void 0:n.relationship);const s="".concat(ua.medical,"/").concat(e,"/").concat(t),l=await Fu(s,a);var o;if(Object.keys(null===n||void 0===n?void 0:n.upload).length||(null===n||void 0===n||null===(i=n.upload)||void 0===i?void 0:i.length))await r(El(e,t,null===l||void 0===l||null===(o=l.data)||void 0===o?void 0:o.id,n));return l}finally{r(na(!1))}},Tl=(e,t,n)=>async r=>{r(na(!0));try{var i;let a=new FormData;a.append("disease_name",null===n||void 0===n?void 0:n.disease_name),a.append("start_date",null===n||void 0===n?void 0:n.start_date),a.append("end_date",null===n||void 0===n?void 0:n.end_date),a.append("remark",null===n||void 0===n?void 0:n.remark),a.append("duration_unit",null===n||void 0===n?void 0:n.duration_unit),a.append("custom_duration",null===n||void 0===n?void 0:n.custom_duration),a.append("kind",null===n||void 0===n?void 0:n.kind),a.append("relationship",null===n||void 0===n?void 0:n.relationship);const s="".concat(ua.medical,"/").concat(e,"/").concat(t,"/").concat(null===n||void 0===n?void 0:n.id),l=await $u(s,a);var o;if(Object.keys(null===n||void 0===n?void 0:n.upload).length||(null===n||void 0===n||null===(i=n.upload)||void 0===i?void 0:i.length))await r(El(e,t,null===l||void 0===l||null===(o=l.data)||void 0===o?void 0:o.id,n));return l}finally{r(na(!1))}},El=(e,t,n,r)=>async i=>{i(na(!0));try{var o;let i=new FormData;null===r||void 0===r||null===(o=r.upload.local)||void 0===o||o.files.forEach(e=>{let t="".concat(e.name);i.append("upload",e,t)});const a="".concat(ua.medical,"/").concat(e,"/").concat(t,"/").concat(n,"/attach-files");return await Fu(a,i)}catch(a){return a}finally{i(na(!1))}},Ml=(e,t,n)=>async r=>{r(na(!0));try{const r="".concat(ua.medical,"/").concat(e,"/").concat(t,"/").concat(n);return await Bu(r,{})}finally{r(na(!1))}},Ol=(e,t)=>async n=>{n(na(!0));try{const n="".concat(ua.medical,"/").concat(e,"/").concat(t,"/medical-question");return await Iu(n,{})}finally{n(na(!1))}},Rl=(e,t,n,r)=>async i=>{i(na(!0));try{const i="".concat(ua.medical,"/").concat(e,"/").concat(t,"/").concat(n,"/delete/").concat(r);return await Bu(i,{})}finally{i(na(!1))}},Pl=(e,t,n)=>async r=>{r(na(!0));try{const r="".concat(ua.medical,"/").concat(e,"/").concat(t,"/download/").concat(null===n||void 0===n?void 0:n.id),i=await Iu(r,{"Content-Type":"multipart/form-data",responseType:"arraybuffer"}),o=new Blob([null===i||void 0===i?void 0:i.data],{type:"octet/stream"}),a=new File([o],null===n||void 0===n?void 0:n.file_name,{type:"octet/stream"});return(0,ra.saveAs)(a),null===i||void 0===i?void 0:i.data}finally{r(na(!1))}},Dl=(e,t)=>async n=>{n(na(!0));try{const n="".concat(ca.patients,"/").concat(e,"/alerts/delete?alertId=").concat(t);return await Bu(n,{})}catch(r){return r}finally{n(na(!1))}},Nl=(e,t)=>async n=>{n(na(!0));try{const n="".concat(ca.patients,"/").concat(e,"/data/").concat(t);return await Bu(n,{})}catch(r){return r}finally{n(na(!1))}},Ll=e=>async t=>{t(na(!0));try{const t="".concat(ca.patients,"/").concat(e.patient_id,"/data?dataNames=").concat(e.disease,"&start=").concat(e.duration[0],"&end=").concat(e.duration[1]),n=await Iu(t,{});return oa()(n,"data",[]).forEach(e=>nl(e)),n}catch(n){return n}},Il=(e,t,n,r,i)=>async o=>{o(na(!0));try{const o="".concat(ua.notes,"/").concat(e,"/").concat(t,"?page=").concat(r.current_page||"","&perPage=").concat(r.per_page||"","&sortBy=").concat(r.sort_by||"","&sortOrder=").concat(r.sort_order,"&type=").concat(n.type||"","&vital=").concat(i.vital||"","&start=").concat(i.start_date?sa()(i.start_date).startOf("day").valueOf():"","&end=").concat(i.end_date?sa()(i.end_date).endOf("day").valueOf():"");return await Iu(o,{})}finally{o(na(!1))}},Fl=(e,t,n)=>async r=>{r(na(!0));try{var i;let a=new FormData;n.note&&a.append("note",null===n||void 0===n?void 0:n.note),n.vital&&a.append("vital",null===n||void 0===n?void 0:n.vital),a.append("type",null===n||void 0===n?void 0:n.type);const s="".concat(ua.notes,"/").concat(e,"/").concat(t),l=await Fu(s,a);var o;if(Object.keys(null===n||void 0===n?void 0:n.upload).length||(null===n||void 0===n||null===(i=n.upload)||void 0===i?void 0:i.length))await r($l(e,t,null===l||void 0===l||null===(o=l.data)||void 0===o?void 0:o.id,n));return l}finally{r(na(!1))}},$l=(e,t,n,r)=>async i=>{i(na(!0));try{var o;let i=new FormData;null===r||void 0===r||null===(o=r.upload.local)||void 0===o||o.files.forEach(e=>{let t="".concat(e.name);i.append("upload",e,t)});const a="".concat(ua.notes,"/").concat(e,"/").concat(t,"/").concat(n,"/attach-files?noteType=").concat(null===r||void 0===r?void 0:r.type);return await Fu(a,i)}catch(a){return a}finally{i(na(!1))}},Bl=(e,t,n)=>async r=>{r(na(!0));try{var i;let a=new FormData;n.note&&a.append("note",null===n||void 0===n?void 0:n.note),n.vital&&a.append("vital",null===n||void 0===n?void 0:n.vital),n.type&&a.append("type",null===n||void 0===n?void 0:n.type);const s="".concat(ua.notes,"/").concat(e,"/").concat(t,"/").concat(null===n||void 0===n?void 0:n.id,"/").concat(null===n||void 0===n?void 0:n.type),l=await $u(s,a);var o;if(Object.keys(null===n||void 0===n?void 0:n.upload).length||(null===n||void 0===n||null===(i=n.upload)||void 0===i?void 0:i.length))await r($l(e,t,null===l||void 0===l||null===(o=l.data)||void 0===o?void 0:o.id,n));return l}finally{r(na(!1))}},zl=(e,t,n)=>async r=>{r(na(!0));try{const r="".concat(ua.notes,"/").concat(e,"/").concat(t,"/").concat(n.noteId,"/").concat(n.type);return await Bu(r,{})}finally{r(na(!1))}},Hl=(e,t,n)=>async r=>{r(na(!0));try{var i,o;const r="".concat(ua.notes,"/").concat(e,"/").concat(t,"/").concat(n.noteId,"/").concat(n.type,"/download/").concat(null===(i=n.fileData)||void 0===i?void 0:i.id),a=await Iu(r,{"Content-Type":"multipart/form-data",responseType:"arraybuffer"}),s=new Blob([null===a||void 0===a?void 0:a.data],{type:"octet/stream"}),l=new File([s],null===(o=n.fileData)||void 0===o?void 0:o.file_name,{type:"octet/stream"});return(0,ra.saveAs)(l),null===a||void 0===a?void 0:a.data}finally{r(na(!1))}},Wl=(e,t,n)=>async r=>{r(na(!0));try{const r="".concat(ua.notes,"/").concat(e,"/").concat(t,"/").concat(n.noteId,"/").concat(n.type,"/delete/").concat(n.fileId);return await Bu(r,{})}finally{r(na(!1))}},Ul=(e,t)=>async n=>{n(na(!0));try{const n="".concat(ua.notes,"/").concat(e,"/").concat(t,"/note-types");return await Iu(n)}finally{n(na(!1))}},Vl=(e,t,n,r)=>async i=>{try{const i="".concat(ua.prescription,"/").concat(e,"/").concat(t,"?page=").concat(n.current_page||"","&perPage=").concat(n.per_page||"","&sortBy=").concat(n.sort_by||"","&sortOrder=").concat(n.sort_order,"&vital=").concat(r.vital||"","&start=").concat(r.start_date?sa()(r.start_date).startOf("day").valueOf():"","&end=").concat(r.end_date?sa()(r.end_date).endOf("day").valueOf():"");return await Iu(i,{})}finally{i(na(!1))}},Gl=e=>async t=>{t(na(!0));try{const t="".concat(ua.medical,"/program/consultation-info?program=").concat(e);return await Iu(t,{})}finally{t(na(!1))}},ql=(e,t,n)=>async r=>{try{const r="".concat(ua.prescription,"/").concat(e,"/").concat(t,"/").concat(n);return await Iu(r,{})}finally{r(na(!1))}},Yl=e=>async t=>{try{const t="".concat(ua.medical,"/medicine-info?page=").concat(e.current_page||"","&perPage=").concat(e.per_page||"","&q=").concat(e.q||"");return await Iu(t,{})}finally{t(na(!1))}},Zl=(e,t)=>async n=>{n(na(!0));const r=await Jl(null===t||void 0===t?void 0:t.values),o=(0,i.A)((0,i.A)({},r),{},{auto_generate_flag:null===t||void 0===t?void 0:t.flag});try{const t="".concat(ua.template,"/").concat(e);return await Fu(t,o)}finally{n(na(!1))}},Kl=(e,t)=>async n=>{try{const n="".concat(ua.template,"/").concat(e,"/").concat(t);return await Iu(n,{})}finally{n(na(!1))}},Xl=(e,t,n)=>async r=>{r(na(!0));try{const r="".concat(ca.patients,"/").concat(null===e||void 0===e?void 0:e.code,"/").concat(null===n||void 0===n?void 0:n.id,"/transfer-patient?newProgram=").concat(t,"&tenantId=").concat(null===n||void 0===n?void 0:n.tenantId);return await Iu(r,{})}finally{r(na(!1))}},Ql=e=>{switch(e){case"5":return"1";case"6":return"2";case"7":return"3";default:return null}},Jl=async e=>{var t;const n={},r=sa()(null===e||void 0===e?void 0:e.followUpTime,["h:mm A"]).utc().format("HH:mm");null===e||void 0===e||e.medicationList.forEach(e=>{e.timing.forEach(t=>{const r=sa()(t.start_time).format("HH:mm"),i="".concat(r,"_").concat(e.repetition_kind),o=null!==t&&void 0!==t&&t.start_time?sa()(t.start_time).utc().format("HH:mm"):null;n[i]||(n[i]={start_time:o,repetition_kind:e.repetition_kind,stop_after:t.interval,every:Ql(e.frequency),medicines:[]}),n[i].medicines.push(e.id)})});const o=Object.values(n);return{vital:e.vital,name:e.templateName,complaints:null===e||void 0===e?void 0:e.complaintDetails,advices:null===e||void 0===e?void 0:e.advices,diagnosis:null===e||void 0===e?void 0:e.diagnosisDetails,course:null===e||void 0===e?void 0:e.course,tests:null===e||void 0===e||null===(t=e.tests)||void 0===t?void 0:t.map(e=>e.name),follow_up:{days:null===e||void 0===e?void 0:e.followUpDays,date:null===e||void 0===e?void 0:e.followUpDate,send_reminder_flag:!0,follow_up_reminder_date:null!==e&&void 0!==e&&e.followUpReminderDate?null===e||void 0===e?void 0:e.followUpReminderDate:null,reminder_time:r},status:!0,program:null===e||void 0===e?void 0:e.program,auto_generate_flag:!0,medications:await Promise.all(null===e||void 0===e?void 0:e.medicationList.map(async e=>{var t;return(0,i.A)((0,i.A)({},e),{},{medicine:null===e||void 0===e||null===(t=e.medicine)||void 0===t?void 0:t.medicine,image:await As(null===e||void 0===e?void 0:e.image),start_date:sa()(null===e||void 0===e?void 0:e.start_date).format("MM/DD/YYYY")!==sa()().format("MM/DD/YYYY")?sa()(e.start_date).startOf("day").valueOf():sa()(e.start_date).valueOf(),end_date:sa()(e.end_date).endOf("day").valueOf()})})),intervals:o}},ec=()=>async e=>{e(na(!0));try{const e="".concat(la.program,"/default-program");return await Iu(e,{})}finally{e(na(!1))}};function tc(e){let{width:t,height:n}=e;return(0,qt.jsxs)("svg",{className:"MuiSvgIcon-root",width:t||24,height:n||24,viewBox:"0 0 24 24",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg",children:[(0,qt.jsx)("path",{d:"M20.6543 2.66406H3.3457C2.32798 2.66406 1.5 3.45262 1.5 4.42188V15.8281C1.5 16.7974 2.32798 17.5859 3.3457 17.5859H9.30499L8.85381 20.1641H8.0625C7.72273 20.1641 7.44727 20.4264 7.44727 20.75C7.44727 21.0736 7.72273 21.3359 8.0625 21.3359H15.9375C16.2773 21.3359 16.5527 21.0736 16.5527 20.75C16.5527 20.4264 16.2773 20.1641 15.9375 20.1641H15.1462L14.695 17.5859H20.6543C21.672 17.5859 22.5 16.7974 22.5 15.8281V4.42188C22.5 3.45262 21.672 2.66406 20.6543 2.66406ZM13.8987 20.1641H10.1013L10.5524 17.5859H13.4476L13.8987 20.1641ZM21.2695 15.8281C21.2695 16.1512 20.9935 16.4141 20.6543 16.4141C20.2153 16.4141 3.86057 16.4141 3.3457 16.4141C3.00646 16.4141 2.73047 16.1512 2.73047 15.8281V4.42188C2.73047 4.09879 3.00646 3.83594 3.3457 3.83594H11.3848V4.5C11.3848 4.82359 11.6602 5.08594 12 5.08594C12.3398 5.08594 12.6152 4.82359 12.6152 4.5V3.83594H20.6543C20.9935 3.83594 21.2695 4.09879 21.2695 4.42188V15.8281Z",fill:"currentColor"}),(0,qt.jsx)("path",{d:"M10.0312 10.1641C9.69148 10.1641 9.41602 10.4264 9.41602 10.75V12.6641H8.02148V8.875C8.02148 8.55141 7.74602 8.28906 7.40625 8.28906C7.06648 8.28906 6.79102 8.55141 6.79102 8.875V12.6641H5.39648V7C5.39648 6.67641 5.12102 6.41406 4.78125 6.41406C4.44148 6.41406 4.16602 6.67641 4.16602 7V13.25C4.16602 13.5736 4.44148 13.8359 4.78125 13.8359H10.0312C10.371 13.8359 10.6465 13.5736 10.6465 13.25V10.75C10.6465 10.4264 10.371 10.1641 10.0312 10.1641Z",fill:"currentColor"}),(0,qt.jsx)("path",{d:"M16.2656 6.72656C14.298 6.72656 12.6973 8.25109 12.6973 10.125C12.6973 11.0479 13.0858 11.886 13.715 12.499C13.7432 12.5298 13.7419 12.5283 13.7729 12.5541C14.4166 13.1534 15.2965 13.5234 16.2656 13.5234C18.2332 13.5234 19.834 11.9989 19.834 10.125C19.834 8.25109 18.2332 6.72656 16.2656 6.72656ZM18.5208 9.53906H16.8809V7.97723C17.6762 8.1841 18.3036 8.7816 18.5208 9.53906ZM15.6504 7.97723V9.8823L14.2365 11.2288C13.4759 9.96559 14.1826 8.35906 15.6504 7.97723ZM15.1066 12.0575L16.5205 10.7109H18.5208C18.1192 12.1109 16.4312 12.7809 15.1066 12.0575Z",fill:"currentColor"})]})}function nc(){return(0,qt.jsxs)("svg",{className:"MuiSvgIcon-root",width:"24",height:"24",viewBox:"0 0 24 24",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg",children:[(0,qt.jsx)("path",{d:"M9.70828 8.66672H3.45828C2.65414 8.66672 2 8.01257 2 7.20828V3.45828C2 2.65414 2.65414 2 3.45828 2H9.70828C10.5126 2 11.1667 2.65414 11.1667 3.45828V7.20828C11.1667 8.01257 10.5126 8.66672 9.70828 8.66672ZM3.45828 3.25C3.34338 3.25 3.25 3.34338 3.25 3.45828V7.20828C3.25 7.32333 3.34338 7.41672 3.45828 7.41672H9.70828C9.82333 7.41672 9.91672 7.32333 9.91672 7.20828V3.45828C9.91672 3.34338 9.82333 3.25 9.70828 3.25H3.45828Z",fill:"currentColor"}),(0,qt.jsx)("path",{d:"M9.70828 22H3.45828C2.65414 22 2 21.3458 2 20.5417V11.7917C2 10.9874 2.65414 10.3333 3.45828 10.3333H9.70828C10.5126 10.3333 11.1667 10.9874 11.1667 11.7917V20.5417C11.1667 21.3458 10.5126 22 9.70828 22ZM3.45828 11.5833C3.34338 11.5833 3.25 11.6766 3.25 11.7917V20.5417C3.25 20.6566 3.34338 20.75 3.45828 20.75H9.70828C9.82333 20.75 9.91672 20.6566 9.91672 20.5417V11.7917C9.91672 11.6766 9.82333 11.5833 9.70828 11.5833H3.45828Z",fill:"currentColor"}),(0,qt.jsx)("path",{d:"M20.5414 22H14.2914C13.4872 22 12.833 21.3458 12.833 20.5417V16.7917C12.833 15.9874 13.4872 15.3333 14.2914 15.3333H20.5414C21.3456 15.3333 21.9997 15.9874 21.9997 16.7917V20.5417C21.9997 21.3458 21.3456 22 20.5414 22ZM14.2914 16.5833C14.1764 16.5833 14.083 16.6766 14.083 16.7917V20.5417C14.083 20.6566 14.1764 20.75 14.2914 20.75H20.5414C20.6563 20.75 20.7497 20.6566 20.7497 20.5417V16.7917C20.7497 16.6766 20.6563 16.5833 20.5414 16.5833H14.2914Z",fill:"currentColor"}),(0,qt.jsx)("path",{d:"M20.5414 13.6667H14.2914C13.4872 13.6667 12.833 13.0126 12.833 12.2083V3.45828C12.833 2.65414 13.4872 2 14.2914 2H20.5414C21.3456 2 21.9997 2.65414 21.9997 3.45828V12.2083C21.9997 13.0126 21.3456 13.6667 20.5414 13.6667ZM14.2914 3.25C14.1764 3.25 14.083 3.34338 14.083 3.45828V12.2083C14.083 12.3233 14.1764 12.4167 14.2914 12.4167H20.5414C20.6563 12.4167 20.7497 12.3233 20.7497 12.2083V3.45828C20.7497 3.34338 20.6563 3.25 20.5414 3.25H14.2914Z",fill:"currentColor"})]})}function rc(){return(0,qt.jsxs)("svg",{className:"MuiSvgIcon-root",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,qt.jsx)("mask",{id:"mask0_1275_12355",style:{maskType:"luminance"},maskUnits:"userSpaceOnUse",x:"1",y:"1",width:"22",height:"22",children:(0,qt.jsx)("path",{d:"M1 0.999998H23V23H1V0.999998Z",fill:"white"})}),(0,qt.jsxs)("g",{mask:"url(#mask0_1275_12355)",children:[(0,qt.jsx)("path",{d:"M18.8879 4.76679V3.04456C18.8879 2.85434 18.7337 2.70012 18.5435 2.70012H4.07686C3.88664 2.70012 3.73242 2.85434 3.73242 3.04456V20.9556C3.73242 21.1458 3.88664 21.3 4.07686 21.3H18.5435C18.7337 21.3 18.8879 21.1458 18.8879 20.9556V6.14441",stroke:"currentColor",strokeWidth:"0.8",strokeMiterlimit:"10",strokeLinecap:"round",strokeLinejoin:"round"}),(0,qt.jsx)("path",{d:"M5.11133 21.2999V22.3333C5.11133 22.5235 5.26554 22.6777 5.45577 22.6777H19.9224C20.1126 22.6777 20.2668 22.5235 20.2668 22.3333V4.42225C20.2668 4.23202 20.1126 4.07781 19.9224 4.07781H18.8891",stroke:"currentColor",strokeWidth:"0.8",strokeMiterlimit:"10",strokeLinecap:"round",strokeLinejoin:"round"}),(0,qt.jsx)("path",{d:"M7.1776 2.69998V2.01106C7.1776 1.63061 6.86917 1.32218 6.48872 1.32218H6.48868C6.10823 1.32218 5.7998 1.63061 5.7998 2.01106V4.07773C5.7998 4.45817 6.10823 4.7666 6.48868 4.7666H6.48872C6.86917 4.7666 7.1776 4.45817 7.1776 4.07773",stroke:"currentColor",strokeWidth:"0.8",strokeMiterlimit:"10",strokeLinecap:"round",strokeLinejoin:"round"}),(0,qt.jsx)("path",{d:"M13.7213 7.52213H11.9991V5.7999C11.9991 5.60968 11.8449 5.45547 11.6547 5.45547H10.9658C10.7756 5.45547 10.6214 5.60968 10.6214 5.7999V7.52213H8.89912C8.7089 7.52213 8.55469 7.67635 8.55469 7.86657V8.55545C8.55469 8.74571 8.7089 8.89988 8.89912 8.89988H10.6214V10.6221C10.6214 10.8123 10.7756 10.9666 10.9658 10.9666H11.6547C11.8449 10.9666 11.9991 10.8123 11.9991 10.6221V8.89988H13.7213C13.9116 8.89988 14.0658 8.74571 14.0658 8.55545V7.86657C14.0658 7.67635 13.9116 7.52213 13.7213 7.52213Z",stroke:"currentColor",strokeWidth:"0.8",strokeMiterlimit:"10",strokeLinecap:"round",strokeLinejoin:"round"}),(0,qt.jsx)("path",{d:"M9.24316 13.7219H16.132",stroke:"currentColor",strokeWidth:"0.8",strokeMiterlimit:"10",strokeLinecap:"round",strokeLinejoin:"round"}),(0,qt.jsx)("path",{d:"M7.52164 13.7222H6.48828",stroke:"currentColor",strokeWidth:"0.8",strokeMiterlimit:"10",strokeLinecap:"round",strokeLinejoin:"round"}),(0,qt.jsx)("path",{d:"M9.24316 15.7888H16.132",stroke:"currentColor",strokeWidth:"0.8",strokeMiterlimit:"10",strokeLinecap:"round",strokeLinejoin:"round"}),(0,qt.jsx)("path",{d:"M9.24316 17.8555H16.132",stroke:"currentColor",strokeWidth:"0.8",strokeMiterlimit:"10",strokeLinecap:"round",strokeLinejoin:"round"}),(0,qt.jsx)("path",{d:"M7.52164 15.7888H6.48828",stroke:"currentColor",strokeWidth:"0.8",strokeMiterlimit:"10",strokeLinecap:"round",strokeLinejoin:"round"}),(0,qt.jsx)("path",{d:"M7.52164 17.8557H6.48828",stroke:"currentColor",strokeWidth:"0.8",strokeMiterlimit:"10",strokeLinecap:"round",strokeLinejoin:"round"})]})]})}function ic(){return(0,qt.jsxs)("svg",{className:"MuiSvgIcon-root",width:"24",height:"24",viewBox:"0 0 24 24",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg",children:[(0,qt.jsx)("path",{d:"M5.66756 2.00049C4.74759 2.00159 4.00208 2.7471 4.00098 3.66707V20.7379C4.06456 21.4565 4.66955 22.0056 5.39091 21.9995H18.3336C18.8859 21.9995 19.3336 21.5518 19.3336 20.9996V19.9383C19.7317 19.7975 19.9984 19.4219 20.0002 18.9997V3.00044C20.0002 2.44818 19.5525 2.00049 19.0002 2.00049H5.66756ZM18.3336 21.3329H5.39091C5.02828 21.344 4.71595 21.0791 4.66761 20.7196V20.6662C4.66761 20.2981 4.96607 19.9996 5.33424 19.9996H18.6669V20.9996C18.6669 21.1836 18.5177 21.3329 18.3336 21.3329ZM19.3336 3.00044V18.9997C19.3336 19.1837 19.1843 19.333 19.0002 19.333H5.33424C5.10011 19.3326 4.87007 19.3944 4.66761 19.512V3.66707C4.66761 3.11482 5.1153 2.66712 5.66756 2.66712H19.0002C19.1843 2.66712 19.3336 2.81635 19.3336 3.00044Z",fill:"currentColor"}),(0,qt.jsx)("path",{d:"M5.6673 3.66699C5.48322 3.66699 5.33398 3.81622 5.33398 4.00031V5.66689C5.33398 5.85098 5.48322 6.00021 5.6673 6.00021C5.85139 6.00021 6.00062 5.85098 6.00062 5.66689V4.00031C6.00062 3.81622 5.85139 3.66699 5.6673 3.66699Z",fill:"currentColor"}),(0,qt.jsx)("path",{d:"M5.6673 6.66699C5.48322 6.66699 5.33398 6.81622 5.33398 7.00031V18.3331C5.33398 18.5172 5.48322 18.6664 5.6673 18.6664C5.85139 18.6664 6.00062 18.5172 6.00062 18.3331V7.00031C6.00062 6.81622 5.85139 6.66699 5.6673 6.66699Z",fill:"currentColor"}),(0,qt.jsx)("path",{d:"M10.6669 7.66691C11.2192 7.66691 11.6669 7.21922 11.6669 6.66696V4.66706C11.6669 4.48297 11.5177 4.33374 11.3336 4.33374C11.1495 4.33374 11.0003 4.48297 11.0003 4.66706V6.66696C11.0003 6.85105 10.851 7.00028 10.6669 7.00028C10.4829 7.00028 10.3336 6.85105 10.3336 6.66696V4.66706C10.3336 4.48297 10.1844 4.33374 10.0003 4.33374C9.81622 4.33374 9.66699 4.48297 9.66699 4.66706V6.66696C9.66699 7.21922 10.1147 7.66691 10.6669 7.66691Z",fill:"currentColor"}),(0,qt.jsx)("path",{d:"M13.0006 7.66691H13.3339C13.518 7.66691 13.6673 7.51768 13.6673 7.33359C13.6673 7.14951 13.518 7.00028 13.3339 7.00028H13.0006V4.66706C13.0006 4.48297 12.8514 4.33374 12.6673 4.33374C12.4832 4.33374 12.334 4.48297 12.334 4.66706V7.00028C12.334 7.36845 12.6324 7.66691 13.0006 7.66691Z",fill:"currentColor"}),(0,qt.jsx)("path",{d:"M15.0006 7.66691H15.6673C15.8513 7.66691 16.0006 7.51768 16.0006 7.33359C16.0006 7.14951 15.8513 7.00028 15.6673 7.00028H15.0006V6.33364H15.3339C15.518 6.33364 15.6673 6.18441 15.6673 6.00033C15.6673 5.81624 15.518 5.66701 15.3339 5.66701H15.0006V5.00037H15.6673C15.8513 5.00037 16.0006 4.85114 16.0006 4.66706C16.0006 4.48297 15.8513 4.33374 15.6673 4.33374H15.0006C14.6324 4.33374 14.334 4.6322 14.334 5.00037V7.00028C14.334 7.36845 14.6324 7.66691 15.0006 7.66691Z",fill:"currentColor"}),(0,qt.jsx)("path",{d:"M7.66761 7.3336V6.33365C8.03578 6.33365 8.33424 6.63211 8.33424 7.00029V7.3336C8.33424 7.51769 8.48348 7.66692 8.66756 7.66692C8.85165 7.66692 9.00088 7.51769 9.00088 7.3336V7.00029C9.00017 6.66396 8.87146 6.34052 8.6409 6.09566C8.96446 5.82728 9.08458 5.38458 8.94106 4.98945C8.79754 4.59433 8.42131 4.33192 8.00093 4.33375H7.66761C7.29944 4.33375 7.00098 4.63221 7.00098 5.00038V7.3336C7.00098 7.51769 7.15021 7.66692 7.33429 7.66692C7.51838 7.66692 7.66761 7.51769 7.66761 7.3336ZM7.66761 5.00038H8.00093C8.18501 5.00038 8.33424 5.14961 8.33424 5.3337C8.33424 5.51779 8.18501 5.66702 8.00093 5.66702H7.66761V5.00038Z",fill:"currentColor"}),(0,qt.jsx)("path",{d:"M17.3335 9.3335H8.00062C7.63245 9.3335 7.33398 9.63196 7.33398 10.0001V13C7.33398 13.3682 7.63245 13.6666 8.00062 13.6666H17.3335C17.7017 13.6666 18.0001 13.3682 18.0001 13V10.0001C18.0001 9.63196 17.7017 9.3335 17.3335 9.3335ZM8.00062 13V10.0001H17.3335V13H8.00062Z",fill:"currentColor"}),(0,qt.jsx)("path",{d:"M16.0006 15.3333H9.33429C9.15021 15.3333 9.00098 15.4825 9.00098 15.6666C9.00098 15.8507 9.15021 15.9999 9.33429 15.9999H16.0006C16.1847 15.9999 16.334 15.8507 16.334 15.6666C16.334 15.4825 16.1847 15.3333 16.0006 15.3333Z",fill:"currentColor"}),(0,qt.jsx)("path",{d:"M15.0007 16.9998H10.3343C10.1502 16.9998 10.001 17.149 10.001 17.3331C10.001 17.5172 10.1502 17.6664 10.3343 17.6664H15.0007C15.1848 17.6664 15.334 17.5172 15.334 17.3331C15.334 17.149 15.1848 16.9998 15.0007 16.9998Z",fill:"currentColor"}),(0,qt.jsx)("path",{d:"M17.6669 5.00037H18.3336C18.5177 5.00037 18.6669 4.85114 18.6669 4.66706C18.6669 4.48297 18.5177 4.33374 18.3336 4.33374H17.6669C17.1147 4.33374 16.667 4.78143 16.667 5.33369C16.667 5.88595 17.1147 6.33364 17.6669 6.33364C17.851 6.33364 18.0003 6.48287 18.0003 6.66696C18.0003 6.85105 17.851 7.00028 17.6669 7.00028H17.0003C16.8162 7.00028 16.667 7.14951 16.667 7.33359C16.667 7.51768 16.8162 7.66691 17.0003 7.66691H17.6669C18.2192 7.66691 18.6669 7.21922 18.6669 6.66696C18.6669 6.1147 18.2192 5.66701 17.6669 5.66701C17.4829 5.66701 17.3336 5.51778 17.3336 5.33369C17.3336 5.14961 17.4829 5.00037 17.6669 5.00037Z",fill:"currentColor"})]})}function oc(e){let{width:t,height:n}=e;return(0,qt.jsxs)("svg",{className:"MuiSvgIcon-root",width:t||24,height:n||24,viewBox:"0 0 24 24",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg",children:[(0,qt.jsx)("path",{d:"M21.0625 3.25H2.9375C2.68886 3.25 2.4504 3.34877 2.27459 3.52459C2.09877 3.7004 2 3.93886 2 4.1875V17.3125C2 17.5611 2.09877 17.7996 2.27459 17.9754C2.4504 18.1512 2.68886 18.25 2.9375 18.25H11.6875V20.125H6.84375C6.76087 20.125 6.68138 20.1579 6.62278 20.2165C6.56417 20.2751 6.53125 20.3546 6.53125 20.4375C6.53125 20.5204 6.56417 20.5999 6.62278 20.6585C6.68138 20.7171 6.76087 20.75 6.84375 20.75H17.1562C17.2391 20.75 17.3186 20.7171 17.3772 20.6585C17.4358 20.5999 17.4688 20.5204 17.4688 20.4375C17.4688 20.3546 17.4358 20.2751 17.3772 20.2165C17.3186 20.1579 17.2391 20.125 17.1562 20.125H12.3125V18.25H21.0625C21.3111 18.25 21.5496 18.1512 21.7254 17.9754C21.9012 17.7996 22 17.5611 22 17.3125V4.1875C22 3.93886 21.9012 3.7004 21.7254 3.52459C21.5496 3.34877 21.3111 3.25 21.0625 3.25ZM21.375 17.3125C21.375 17.3954 21.3421 17.4749 21.2835 17.5335C21.2249 17.5921 21.1454 17.625 21.0625 17.625H2.9375C2.85462 17.625 2.77513 17.5921 2.71653 17.5335C2.65792 17.4749 2.625 17.3954 2.625 17.3125V4.1875C2.625 4.10462 2.65792 4.02513 2.71653 3.96653C2.77513 3.90792 2.85462 3.875 2.9375 3.875H21.0625C21.1454 3.875 21.2249 3.90792 21.2835 3.96653C21.3421 4.02513 21.375 4.10462 21.375 4.1875V17.3125Z",fill:"currentColor",stroke:"currentColor",strokeWidth:"0.2"}),(0,qt.jsx)("path",{d:"M4.5 9.34375H5.59375V10.4375C5.59809 10.6019 5.66534 10.7583 5.78162 10.8746C5.8979 10.9909 6.05436 11.0582 6.21875 11.0625H7.46875C7.63314 11.0582 7.7896 10.9909 7.90588 10.8746C8.02216 10.7583 8.08941 10.6019 8.09375 10.4375V9.34375H9.1875C9.35189 9.33941 9.50835 9.27216 9.62463 9.15588C9.74091 9.0396 9.80816 8.88314 9.8125 8.71875V7.46875C9.80816 7.30436 9.74091 7.1479 9.62463 7.03162C9.50835 6.91534 9.35189 6.84809 9.1875 6.84375H8.09375V5.75C8.08941 5.58561 8.02216 5.42915 7.90588 5.31287C7.7896 5.19659 7.63314 5.12934 7.46875 5.125H6.21875C6.05436 5.12934 5.8979 5.19659 5.78162 5.31287C5.66534 5.42915 5.59809 5.58561 5.59375 5.75V6.84375H4.5C4.33561 6.84809 4.17915 6.91534 4.06287 7.03162C3.94659 7.1479 3.87934 7.30436 3.875 7.46875V8.71875C3.87934 8.88314 3.94659 9.0396 4.06287 9.15588C4.17915 9.27216 4.33561 9.33941 4.5 9.34375ZM4.5 7.46875H5.90625C5.98913 7.46875 6.06862 7.43583 6.12722 7.37722C6.18583 7.31862 6.21875 7.23913 6.21875 7.15625V5.7625C6.21875 5.7625 6.22813 5.75 6.21875 5.75H7.45625C7.45625 5.75 7.46875 5.75937 7.46875 5.75V7.15625C7.46875 7.23913 7.50167 7.31862 7.56028 7.37722C7.61888 7.43583 7.69837 7.46875 7.78125 7.46875H9.17812H9.1875V8.70625V8.71875H7.78125C7.69837 8.71875 7.61888 8.75167 7.56028 8.81028C7.50167 8.86888 7.46875 8.94837 7.46875 9.03125V10.425V10.4375H6.23125H6.21875V9.03125C6.21875 8.94837 6.18583 8.86888 6.12722 8.81028C6.06862 8.75167 5.98913 8.71875 5.90625 8.71875H4.5125H4.5V7.48125C4.5 7.48125 4.50781 7.46875 4.5 7.46875Z",fill:"currentColor",stroke:"currentColor",strokeWidth:"0.2"}),(0,qt.jsx)("path",{d:"M20.1248 6.375C20.1248 6.04348 19.9931 5.72554 19.7587 5.49112C19.5243 5.2567 19.2063 5.125 18.8748 5.125C18.5433 5.125 18.2253 5.2567 17.9909 5.49112C17.7565 5.72554 17.6248 6.04348 17.6248 6.375C17.6248 6.55296 17.6632 6.72884 17.7373 6.89062L15.0811 9.12344C14.8684 8.96327 14.6097 8.87613 14.3436 8.875C14.1444 8.87506 13.9481 8.9227 13.7711 9.01395C13.5941 9.10521 13.4415 9.23744 13.3259 9.39963C13.2103 9.56182 13.1352 9.74928 13.1067 9.94639C13.0783 10.1435 13.0973 10.3446 13.1623 10.5328L10.6717 12.0547C10.5243 11.846 10.3166 11.6875 10.0764 11.6005C9.83618 11.5135 9.5751 11.5022 9.32828 11.568C9.08146 11.6339 8.86075 11.7738 8.69587 11.9689C8.53098 12.1641 8.42984 12.405 8.40605 12.6594L6.3248 12.9047C6.26452 12.6941 6.14994 12.503 5.99255 12.3506C5.83515 12.1982 5.64047 12.0898 5.428 12.0364C5.21554 11.9829 4.99276 11.9863 4.78199 12.046C4.57122 12.1058 4.37986 12.2199 4.22709 12.377C4.07432 12.534 3.96551 12.7284 3.91155 12.9408C3.85759 13.1531 3.86039 13.3759 3.91966 13.5868C3.97894 13.7977 4.0926 13.9893 4.24927 14.1425C4.40593 14.2956 4.6001 14.4049 4.8123 14.4594V15.75H4.1873C4.10442 15.75 4.02494 15.7829 3.96633 15.8415C3.90773 15.9001 3.8748 15.9796 3.8748 16.0625C3.8748 16.1454 3.90773 16.2249 3.96633 16.2835C4.02494 16.3421 4.10442 16.375 4.1873 16.375H19.8123C19.8952 16.375 19.9747 16.3421 20.0333 16.2835C20.0919 16.2249 20.1248 16.1454 20.1248 16.0625C20.1248 15.9796 20.0919 15.9001 20.0333 15.8415C19.9747 15.7829 19.8952 15.75 19.8123 15.75H19.1873V7.58438C19.4555 7.51514 19.693 7.35879 19.8627 7.1399C20.0324 6.92101 20.1246 6.65196 20.1248 6.375ZM18.8748 5.75C18.9984 5.75 19.1193 5.78666 19.222 5.85533C19.3248 5.92401 19.4049 6.02162 19.4522 6.13582C19.4995 6.25003 19.5119 6.37569 19.4878 6.49693C19.4637 6.61817 19.4042 6.72953 19.3167 6.81694C19.2293 6.90435 19.118 6.96388 18.9967 6.98799C18.8755 7.01211 18.7498 6.99973 18.6356 6.95242C18.5214 6.90512 18.4238 6.82501 18.3551 6.72223C18.2865 6.61945 18.2498 6.49861 18.2498 6.375C18.2498 6.20924 18.3156 6.05027 18.4329 5.93306C18.5501 5.81585 18.709 5.75 18.8748 5.75ZM14.3436 9.5C14.4672 9.5 14.588 9.53666 14.6908 9.60533C14.7936 9.67401 14.8737 9.77162 14.921 9.88582C14.9683 10 14.9807 10.1257 14.9565 10.2469C14.9324 10.3682 14.8729 10.4795 14.7855 10.5669C14.6981 10.6543 14.5867 10.7139 14.4655 10.738C14.3442 10.7621 14.2186 10.7497 14.1044 10.7024C13.9902 10.6551 13.8926 10.575 13.8239 10.4722C13.7552 10.3695 13.7186 10.2486 13.7186 10.125C13.7186 9.95924 13.7844 9.80027 13.9016 9.68306C14.0188 9.56585 14.1778 9.5 14.3436 9.5ZM13.5092 11.0531C13.6581 11.1874 13.8371 11.2838 14.0311 11.3344V15.75H9.96855V13.9906C10.2367 13.9214 10.4743 13.765 10.644 13.5462C10.8137 13.3273 10.9058 13.0582 10.9061 12.7812C10.9084 12.737 10.9084 12.6927 10.9061 12.6484L13.5092 11.0531ZM9.65605 12.1562C9.77966 12.1562 9.9005 12.1929 10.0033 12.2616C10.1061 12.3303 10.1862 12.4279 10.2335 12.5421C10.2808 12.6563 10.2932 12.7819 10.269 12.9032C10.2449 13.0244 10.1854 13.1358 10.098 13.2232C10.0106 13.3106 9.89922 13.3701 9.77798 13.3942C9.65674 13.4184 9.53108 13.406 9.41687 13.3587C9.30267 13.3114 9.20506 13.2313 9.13638 13.1285C9.06771 13.0257 9.03105 12.9049 9.03105 12.7812C9.03105 12.6155 9.0969 12.4565 9.21411 12.3393C9.33132 12.2221 9.49029 12.1562 9.65605 12.1562ZM4.4998 13.25C4.4998 13.1264 4.53646 13.0055 4.60513 12.9028C4.67381 12.8 4.77142 12.7199 4.88562 12.6726C4.99983 12.6253 5.12549 12.6129 5.24673 12.637C5.36797 12.6611 5.47933 12.7207 5.56674 12.8081C5.65415 12.8955 5.71368 13.0068 5.73779 13.1281C5.76191 13.2493 5.74953 13.375 5.70223 13.4892C5.65492 13.6034 5.57481 13.701 5.47203 13.7697C5.36925 13.8383 5.24841 13.875 5.1248 13.875C4.95904 13.875 4.80007 13.8092 4.68286 13.6919C4.56565 13.5747 4.4998 13.4158 4.4998 13.25ZM5.4373 14.4594C5.65853 14.4021 5.85983 14.2854 6.01933 14.1217C6.17884 13.9581 6.29043 13.7539 6.34199 13.5312L8.50918 13.2766C8.58472 13.4513 8.69915 13.6064 8.84375 13.7301C8.98834 13.8539 9.15929 13.943 9.34355 13.9906V15.75H5.4373V14.4594ZM14.6561 15.75V11.3344C14.9242 11.2651 15.1618 11.1088 15.3315 10.8899C15.5012 10.671 15.5933 10.402 15.5936 10.125C15.5936 9.94704 15.5552 9.77116 15.4811 9.60938L18.1373 7.37656C18.2644 7.47225 18.4087 7.54279 18.5623 7.58438V15.75H14.6561Z",fill:"currentColor",stroke:"currentColor",strokeWidth:"0.2"})]})}function ac(){return(0,qt.jsxs)("svg",{className:"MuiSvgIcon-root",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,qt.jsx)("path",{d:"M6.07844 5.90005H14.1148C14.1939 5.90005 14.2698 5.86863 14.3257 5.81272C14.3816 5.7568 14.413 5.68096 14.413 5.60188C14.413 5.5228 14.3816 5.44696 14.3257 5.39104C14.2698 5.33512 14.1939 5.30371 14.1148 5.30371H6.07844C5.99936 5.30371 5.92352 5.33512 5.8676 5.39104C5.81169 5.44696 5.78027 5.5228 5.78027 5.60188C5.78027 5.68096 5.81169 5.7568 5.8676 5.81272C5.92352 5.86863 5.99936 5.90005 6.07844 5.90005Z",fill:"currentColor",stroke:"currentColor",strokeWidth:"0.1"}),(0,qt.jsx)("path",{d:"M6.07844 7.43349H14.1148C14.1939 7.43349 14.2698 7.40208 14.3257 7.34616C14.3816 7.29025 14.413 7.21441 14.413 7.13533C14.413 7.05625 14.3816 6.98041 14.3257 6.92449C14.2698 6.86857 14.1939 6.83716 14.1148 6.83716H6.07844C5.99936 6.83716 5.92352 6.86857 5.8676 6.92449C5.81169 6.98041 5.78027 7.05625 5.78027 7.13533C5.78027 7.21441 5.81169 7.29025 5.8676 7.34616C5.92352 7.40208 5.99936 7.43349 6.07844 7.43349Z",fill:"currentColor",stroke:"currentColor",strokeWidth:"0.1"}),(0,qt.jsx)("path",{d:"M20.9372 10.5272V2.33918C20.9372 2.30002 20.9295 2.26124 20.9146 2.22505C20.8996 2.18887 20.8776 2.15599 20.8499 2.1283C20.8222 2.10061 20.7894 2.07864 20.7532 2.06367C20.717 2.04869 20.6782 2.04099 20.639 2.04102H6.07821C6.03905 2.04099 6.00027 2.04869 5.96408 2.06367C5.9279 2.07864 5.89502 2.10061 5.86733 2.1283C5.83963 2.15599 5.81767 2.18887 5.8027 2.22505C5.78772 2.26124 5.78002 2.30002 5.78005 2.33918V3.78743H4.21935C4.18019 3.78741 4.1414 3.7951 4.10522 3.81008C4.06903 3.82506 4.03615 3.84702 4.00846 3.87471C3.98077 3.9024 3.95881 3.93528 3.94383 3.97147C3.92885 4.00765 3.92116 4.04643 3.92118 4.0856V8.37547C3.40531 8.39681 2.91761 8.61653 2.55984 8.98878C2.20207 9.36104 2.00185 9.85706 2.00098 10.3734V20.8086C2.00134 21.1135 2.12262 21.4058 2.33822 21.6214C2.55383 21.837 2.84615 21.9583 3.15105 21.9586H20.8501C21.1551 21.9583 21.4474 21.837 21.663 21.6214C21.8786 21.4058 21.9999 21.1135 22.0002 20.8086V12.2943C21.9999 11.931 21.9008 11.5747 21.7136 11.2634C21.5263 10.9522 21.258 10.6977 20.9372 10.5272ZM6.37638 2.63735H20.3409V10.3238C20.0366 10.2708 19.9362 10.3013 19.0783 10.2923V4.0856C19.0784 4.04643 19.0707 4.00765 19.0557 3.97147C19.0407 3.93528 19.0188 3.9024 18.9911 3.87471C18.9634 3.84702 18.9305 3.82506 18.8943 3.81008C18.8581 3.7951 18.8193 3.78741 18.7802 3.78743H6.37638V2.63735ZM18.482 4.38377V10.2923H12.4687L10.8228 8.46918C10.7948 8.43822 10.7607 8.41347 10.7225 8.39654C10.6844 8.3796 10.6431 8.37086 10.6013 8.37087H4.51752V4.38377H18.482ZM21.4039 20.8086C21.4037 20.9554 21.3453 21.0961 21.2415 21.1999C21.1377 21.3037 20.997 21.3621 20.8501 21.3623H3.15105C3.00425 21.3621 2.86351 21.3037 2.7597 21.1999C2.65589 21.0961 2.59749 20.9554 2.59731 20.8086V10.3734C2.59776 10.0007 2.746 9.64343 3.00952 9.37992C3.27303 9.11641 3.6303 8.96817 4.00296 8.96772H10.4691L12.115 10.7908C12.143 10.8218 12.1771 10.8466 12.2153 10.8636C12.2535 10.8805 12.2948 10.8893 12.3365 10.8893C20.6864 10.8893 20.1712 10.8504 20.5208 10.9915C20.524 10.9929 20.5274 10.9937 20.5307 10.9951C20.7887 11.1009 21.0095 11.281 21.165 11.5125C21.3205 11.744 21.4037 12.0165 21.4041 12.2954L21.4039 20.8086Z",fill:"currentColor",stroke:"currentColor",strokeWidth:"0.1"}),(0,qt.jsx)("path",{d:"M14.7654 15.0087H13.3211V13.5644C13.3212 13.5252 13.3135 13.4864 13.2985 13.4501C13.2836 13.4139 13.2616 13.381 13.2339 13.3533C13.2062 13.3255 13.1733 13.3036 13.1371 13.2886C13.1009 13.2736 13.0621 13.2658 13.0229 13.2659H10.9783C10.9392 13.2658 10.9004 13.2735 10.8642 13.2885C10.828 13.3035 10.7951 13.3255 10.7674 13.3532C10.7398 13.3808 10.7178 13.4137 10.7028 13.4499C10.6878 13.4861 10.6801 13.5249 10.6802 13.564V15.0084H9.23567C9.15659 15.0084 9.08075 15.0398 9.02483 15.0957C8.96891 15.1516 8.9375 15.2275 8.9375 15.3065V17.3511C8.9375 17.4302 8.96891 17.506 9.02483 17.562C9.08075 17.6179 9.15659 17.6493 9.23567 17.6493H10.6802V19.0936C10.6801 19.1328 10.6878 19.1716 10.7028 19.2077C10.7178 19.2439 10.7398 19.2768 10.7674 19.3045C10.7951 19.3322 10.828 19.3541 10.8642 19.3691C10.9004 19.3841 10.9392 19.3918 10.9783 19.3918H13.0229C13.0621 19.3918 13.1009 19.3841 13.137 19.3691C13.1732 19.3541 13.2061 19.3322 13.2338 19.3045C13.2615 19.2768 13.2835 19.2439 13.2984 19.2077C13.3134 19.1716 13.3211 19.1328 13.3211 19.0936V17.6496H14.7654C14.8046 17.6496 14.8434 17.6419 14.8795 17.627C14.9157 17.612 14.9486 17.59 14.9763 17.5623C15.004 17.5346 15.026 17.5018 15.0409 17.4656C15.0559 17.4294 15.0636 17.3906 15.0636 17.3515V15.3069C15.0636 15.2677 15.0559 15.2289 15.0409 15.1927C15.026 15.1566 15.004 15.1237 14.9763 15.096C14.9486 15.0683 14.9157 15.0463 14.8795 15.0314C14.8434 15.0164 14.8046 15.0087 14.7654 15.0087ZM14.4672 17.0533H13.0229C12.9838 17.0533 12.945 17.061 12.9088 17.0759C12.8726 17.0909 12.8397 17.1129 12.812 17.1406C12.7843 17.1683 12.7624 17.2011 12.7474 17.2373C12.7324 17.2735 12.7247 17.3123 12.7247 17.3515V18.7958H11.2765V17.3515C11.2765 17.3123 11.2688 17.2735 11.2539 17.2373C11.2389 17.2011 11.2169 17.1683 11.1892 17.1406C11.1615 17.1129 11.1286 17.0909 11.0925 17.0759C11.0563 17.061 11.0175 17.0533 10.9783 17.0533H9.53384V15.605H10.9783C11.0175 15.6051 11.0563 15.5974 11.0925 15.5824C11.1286 15.5674 11.1615 15.5455 11.1892 15.5178C11.2169 15.4901 11.2389 15.4572 11.2539 15.421C11.2688 15.3848 11.2765 15.346 11.2765 15.3069V13.8625H12.7247V15.3069C12.7247 15.346 12.7324 15.3848 12.7474 15.421C12.7624 15.4572 12.7843 15.4901 12.812 15.5178C12.8397 15.5455 12.8726 15.5674 12.9088 15.5824C12.945 15.5974 12.9838 15.6051 13.0229 15.605H14.4672V17.0533Z",fill:"currentColor",stroke:"currentColor",strokeWidth:"0.1"})]})}function sc(){return(0,qt.jsxs)("svg",{className:"MuiSvgIcon-root",width:"24",height:"24",viewBox:"0 0 24 24",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg",children:[(0,qt.jsx)("path",{d:"M6.70759 21.8098H17.296C18.2357 21.8098 19.0003 21.0452 19.0003 20.1053V3.89766C19.0003 2.95615 18.2357 2.19019 17.296 2.19019H6.70759C5.76608 2.19019 5 2.95611 5 3.89766V8.00861C5 8.17789 5.13727 8.31517 5.30656 8.31517C5.47584 8.31517 5.61311 8.17789 5.61311 8.00861V3.89766C5.61311 3.29429 6.10407 2.8033 6.70759 2.8033H17.296C17.8978 2.8033 18.3872 3.29425 18.3872 3.89766V20.1053C18.3872 20.707 17.8977 21.1966 17.296 21.1966H6.70759C6.10407 21.1966 5.61311 20.707 5.61311 20.1053V9.76518C5.61311 9.5959 5.47584 9.45863 5.30656 9.45863C5.13727 9.45863 5 9.5959 5 9.76518V20.1053C4.99996 21.0452 5.76608 21.8098 6.70759 21.8098Z",fill:"currentColor",stroke:"currentColor",strokeWidth:"0.2"}),(0,qt.jsx)("path",{d:"M15.1739 7.92022C15.1739 6.17099 13.7507 4.7478 12.0015 4.7478C10.2523 4.7478 8.8291 6.17103 8.8291 7.92022C8.8291 9.64385 10.2235 11.0946 12.0015 11.0946C13.7751 11.0946 15.1739 9.65035 15.1739 7.92022ZM10.466 9.96873C10.7664 9.40982 11.3592 9.04705 12.0022 9.04655C12.0023 9.04655 12.0025 9.04659 12.0027 9.04659C12.0031 9.04659 12.0035 9.04647 12.0039 9.04647C12.6469 9.04659 13.239 9.40951 13.5378 9.96831C13.5053 9.9852 12.9126 10.4815 12.0015 10.4815C11.1714 10.4815 10.7094 10.0929 10.466 9.96873ZM11.159 7.58989C11.159 7.12603 11.5375 6.74865 12.0027 6.74865C12.4664 6.74865 12.8439 7.12599 12.8439 7.58989C12.8439 8.05471 12.4671 8.4327 12.0039 8.4334C12.0038 8.4334 12.0037 8.4334 12.0036 8.4334C12.0031 8.4334 12.0027 8.43352 12.0023 8.43352C11.5372 8.43321 11.159 8.05494 11.159 7.58989ZM12.0015 5.36092C13.4127 5.36092 14.5608 6.50901 14.5608 7.92022C14.5608 8.51056 14.3529 9.07841 13.9857 9.53194C13.7417 9.14861 13.3946 8.84445 12.9874 8.65514C13.2743 8.38887 13.457 8.0116 13.457 7.58985C13.457 6.78797 12.8047 6.1355 12.0027 6.1355C11.1995 6.1355 10.5459 6.78797 10.5459 7.58985C10.5459 8.01199 10.7293 8.38952 11.0172 8.65584C10.6101 8.84526 10.2628 9.14927 10.0183 9.53221C9.65031 9.07752 9.44218 8.50956 9.44218 7.92018C9.44218 6.50901 10.5902 5.36092 12.0015 5.36092Z",fill:"currentColor",stroke:"currentColor",strokeWidth:"0.2"}),(0,qt.jsx)("path",{d:"M7.3584 12.444C7.3584 12.6133 7.49567 12.7506 7.66496 12.7506H16.3371C16.5065 12.7506 16.6437 12.6133 16.6437 12.444C16.6437 12.2747 16.5065 12.1375 16.3371 12.1375H7.66496C7.49563 12.1375 7.3584 12.2747 7.3584 12.444Z",fill:"currentColor",stroke:"currentColor",strokeWidth:"0.2"}),(0,qt.jsx)("path",{d:"M7.66496 14.9188H16.3371C16.5065 14.9188 16.6437 14.7815 16.6437 14.6122C16.6437 14.4429 16.5065 14.3057 16.3371 14.3057H7.66496C7.49567 14.3057 7.3584 14.4429 7.3584 14.6122C7.3584 14.7815 7.49563 14.9188 7.66496 14.9188Z",fill:"currentColor",stroke:"currentColor",strokeWidth:"0.2"}),(0,qt.jsx)("path",{d:"M7.66496 17.087H16.3371C16.5065 17.087 16.6437 16.9497 16.6437 16.7804C16.6437 16.6112 16.5065 16.4739 16.3371 16.4739H7.66496C7.49567 16.4739 7.3584 16.6112 7.3584 16.7804C7.3584 16.9497 7.49563 17.087 7.66496 17.087Z",fill:"currentColor",stroke:"currentColor",strokeWidth:"0.2"}),(0,qt.jsx)("path",{d:"M9.41495 18.6418C9.24552 18.6418 9.1084 18.7791 9.1084 18.9484C9.1084 19.1177 9.24552 19.255 9.41495 19.255H14.5881C14.7575 19.255 14.8946 19.1177 14.8946 18.9484C14.8946 18.7791 14.7575 18.6418 14.5881 18.6418H9.41495Z",fill:"currentColor",stroke:"currentColor",strokeWidth:"0.2"})]})}function lc(){return(0,qt.jsxs)("svg",{className:"MuiSvgIcon-root",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,qt.jsx)("path",{d:"M16.53 6.22549L19.8594 7.11756L17.0157 17.7302L13.9105 19.5229L4.11426 16.8981L7.6141 3.83646L13.4152 5.39088",stroke:"currentColor",strokeWidth:"0.8",strokeMiterlimit:"2.613",strokeLinecap:"round",strokeLinejoin:"round"}),(0,qt.jsx)("path",{d:"M13.9385 19.4158L14.566 17.074L16.9236 17.7057",stroke:"currentColor",strokeWidth:"0.8",strokeMiterlimit:"2.613",strokeLinecap:"round",strokeLinejoin:"round"}),(0,qt.jsx)("mask",{id:"mask0_1281_12307",style:{maskType:"luminance"},maskUnits:"userSpaceOnUse",x:"2",y:"2",width:"20",height:"20",children:(0,qt.jsx)("path",{d:"M2 2H22V22H2V2Z",fill:"white"})}),(0,qt.jsx)("g",{mask:"url(#mask0_1281_12307)",children:(0,qt.jsx)("path",{d:"M19.5991 8.0907V21.6094H6.92188V17.7239",stroke:"currentColor",strokeWidth:"0.8",strokeMiterlimit:"2.613",strokeLinecap:"round",strokeLinejoin:"round"})}),(0,qt.jsx)("path",{d:"M13.2988 7.10986L13.9107 6.49799",stroke:"currentColor",strokeWidth:"0.8",strokeMiterlimit:"2.613",strokeLinecap:"round",strokeLinejoin:"round"}),(0,qt.jsx)("mask",{id:"mask1_1281_12307",style:{maskType:"luminance"},maskUnits:"userSpaceOnUse",x:"2",y:"2",width:"20",height:"20",children:(0,qt.jsx)("path",{d:"M2 2H22V22H2V2Z",fill:"white"})}),(0,qt.jsxs)("g",{mask:"url(#mask1_1281_12307)",children:[(0,qt.jsx)("path",{d:"M16.7508 5.30025C16.7488 6.02072 16.2674 6.67935 15.5381 6.87478C14.6654 7.10857 13.7685 6.59068 13.5347 5.71806C13.3008 4.84541 13.8187 3.94849 14.6913 3.71466C14.8259 3.67857 14.9636 3.66013 15.1011 3.65896",fill:"white"}),(0,qt.jsx)("path",{d:"M16.7508 5.30025C16.7488 6.02072 16.2674 6.67935 15.5381 6.87478C14.6654 7.10857 13.7685 6.59068 13.5347 5.71806C13.3008 4.84541 13.8187 3.94849 14.6913 3.71466C14.8259 3.67857 14.9636 3.66013 15.1011 3.65896",stroke:"currentColor",strokeWidth:"0.8",strokeMiterlimit:"2.613",strokeLinecap:"round",strokeLinejoin:"round"}),(0,qt.jsx)("path",{d:"M16.1905 2.44054C16.9649 2.23304 17.7609 2.69261 17.9684 3.46699C18.1759 4.2414 17.7163 5.03738 16.9419 5.24484C16.1676 5.45238 15.3716 4.99281 15.1641 4.21843C14.9566 3.44398 15.4161 2.64804 16.1905 2.44054Z",fill:"white",stroke:"currentColor",strokeWidth:"0.8",strokeMiterlimit:"2.613",strokeLinecap:"round",strokeLinejoin:"round"}),(0,qt.jsx)("path",{d:"M8.65918 8.99144L16.3765 11.0593L8.65918 8.99144Z",fill:"white"}),(0,qt.jsx)("path",{d:"M8.65918 8.99144L16.3765 11.0593",stroke:"currentColor",strokeWidth:"0.8",strokeMiterlimit:"2.613",strokeLinecap:"round",strokeLinejoin:"round"}),(0,qt.jsx)("path",{d:"M8.25293 10.5075L15.9702 12.5754L8.25293 10.5075Z",fill:"white"}),(0,qt.jsx)("path",{d:"M8.25293 10.5075L15.9702 12.5754",stroke:"currentColor",strokeWidth:"0.8",strokeMiterlimit:"2.613",strokeLinecap:"round",strokeLinejoin:"round"}),(0,qt.jsx)("path",{d:"M7.84668 12.0237L10.007 12.6025L7.84668 12.0237Z",fill:"white"}),(0,qt.jsx)("path",{d:"M7.84668 12.0237L10.007 12.6025",stroke:"currentColor",strokeWidth:"0.8",strokeMiterlimit:"2.613",strokeLinecap:"round",strokeLinejoin:"round"}),(0,qt.jsx)("path",{d:"M11.7051 13.0576H11.7054H11.7051Z",fill:"white"}),(0,qt.jsx)("path",{d:"M11.7051 13.0576H11.7054",stroke:"currentColor",strokeWidth:"0.8",strokeMiterlimit:"2.613",strokeLinecap:"round",strokeLinejoin:"round"})]})]})}function cc(){return(0,qt.jsxs)("svg",{className:"MuiSvgIcon-root",width:"24",height:"24",viewBox:"0 0 24 24",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg",children:[(0,qt.jsx)("path",{d:"M5.66756 2.00049C4.74759 2.00159 4.00208 2.7471 4.00098 3.66707V20.7379C4.06456 21.4565 4.66955 22.0056 5.39091 21.9995H18.3336C18.8859 21.9995 19.3336 21.5518 19.3336 20.9996V19.9383C19.7317 19.7975 19.9984 19.4219 20.0002 18.9997V3.00044C20.0002 2.44818 19.5525 2.00049 19.0002 2.00049H5.66756ZM18.3336 21.3329H5.39091C5.02828 21.344 4.71595 21.0791 4.66761 20.7196V20.6662C4.66761 20.2981 4.96607 19.9996 5.33424 19.9996H18.6669V20.9996C18.6669 21.1836 18.5177 21.3329 18.3336 21.3329ZM19.3336 3.00044V18.9997C19.3336 19.1837 19.1843 19.333 19.0002 19.333H5.33424C5.10011 19.3326 4.87007 19.3944 4.66761 19.512V3.66707C4.66761 3.11482 5.1153 2.66712 5.66756 2.66712H19.0002C19.1843 2.66712 19.3336 2.81635 19.3336 3.00044Z",fill:"currentColor"}),(0,qt.jsx)("path",{d:"M5.6673 3.66699C5.48322 3.66699 5.33398 3.81622 5.33398 4.00031V5.66689C5.33398 5.85098 5.48322 6.00021 5.6673 6.00021C5.85139 6.00021 6.00062 5.85098 6.00062 5.66689V4.00031C6.00062 3.81622 5.85139 3.66699 5.6673 3.66699Z",fill:"currentColor"}),(0,qt.jsx)("path",{d:"M5.6673 6.66699C5.48322 6.66699 5.33398 6.81622 5.33398 7.00031V18.3331C5.33398 18.5172 5.48322 18.6664 5.6673 18.6664C5.85139 18.6664 6.00062 18.5172 6.00062 18.3331V7.00031C6.00062 6.81622 5.85139 6.66699 5.6673 6.66699Z",fill:"currentColor"}),(0,qt.jsx)("path",{d:"M10.6669 7.66691C11.2192 7.66691 11.6669 7.21922 11.6669 6.66696V4.66706C11.6669 4.48297 11.5177 4.33374 11.3336 4.33374C11.1495 4.33374 11.0003 4.48297 11.0003 4.66706V6.66696C11.0003 6.85105 10.851 7.00028 10.6669 7.00028C10.4829 7.00028 10.3336 6.85105 10.3336 6.66696V4.66706C10.3336 4.48297 10.1844 4.33374 10.0003 4.33374C9.81622 4.33374 9.66699 4.48297 9.66699 4.66706V6.66696C9.66699 7.21922 10.1147 7.66691 10.6669 7.66691Z",fill:"currentColor"}),(0,qt.jsx)("path",{d:"M13.0006 7.66691H13.3339C13.518 7.66691 13.6673 7.51768 13.6673 7.33359C13.6673 7.14951 13.518 7.00028 13.3339 7.00028H13.0006V4.66706C13.0006 4.48297 12.8514 4.33374 12.6673 4.33374C12.4832 4.33374 12.334 4.48297 12.334 4.66706V7.00028C12.334 7.36845 12.6324 7.66691 13.0006 7.66691Z",fill:"currentColor"}),(0,qt.jsx)("path",{d:"M15.0006 7.66691H15.6673C15.8513 7.66691 16.0006 7.51768 16.0006 7.33359C16.0006 7.14951 15.8513 7.00028 15.6673 7.00028H15.0006V6.33364H15.3339C15.518 6.33364 15.6673 6.18441 15.6673 6.00033C15.6673 5.81624 15.518 5.66701 15.3339 5.66701H15.0006V5.00037H15.6673C15.8513 5.00037 16.0006 4.85114 16.0006 4.66706C16.0006 4.48297 15.8513 4.33374 15.6673 4.33374H15.0006C14.6324 4.33374 14.334 4.6322 14.334 5.00037V7.00028C14.334 7.36845 14.6324 7.66691 15.0006 7.66691Z",fill:"currentColor"}),(0,qt.jsx)("path",{d:"M7.66761 7.3336V6.33365C8.03578 6.33365 8.33424 6.63211 8.33424 7.00029V7.3336C8.33424 7.51769 8.48348 7.66692 8.66756 7.66692C8.85165 7.66692 9.00088 7.51769 9.00088 7.3336V7.00029C9.00017 6.66396 8.87146 6.34052 8.6409 6.09566C8.96446 5.82728 9.08458 5.38458 8.94106 4.98945C8.79754 4.59433 8.42131 4.33192 8.00093 4.33375H7.66761C7.29944 4.33375 7.00098 4.63221 7.00098 5.00038V7.3336C7.00098 7.51769 7.15021 7.66692 7.33429 7.66692C7.51838 7.66692 7.66761 7.51769 7.66761 7.3336ZM7.66761 5.00038H8.00093C8.18501 5.00038 8.33424 5.14961 8.33424 5.3337C8.33424 5.51779 8.18501 5.66702 8.00093 5.66702H7.66761V5.00038Z",fill:"currentColor"}),(0,qt.jsx)("path",{d:"M17.3335 9.3335H8.00062C7.63245 9.3335 7.33398 9.63196 7.33398 10.0001V13C7.33398 13.3682 7.63245 13.6666 8.00062 13.6666H17.3335C17.7017 13.6666 18.0001 13.3682 18.0001 13V10.0001C18.0001 9.63196 17.7017 9.3335 17.3335 9.3335ZM8.00062 13V10.0001H17.3335V13H8.00062Z",fill:"currentColor"}),(0,qt.jsx)("path",{d:"M16.0006 15.3333H9.33429C9.15021 15.3333 9.00098 15.4825 9.00098 15.6666C9.00098 15.8507 9.15021 15.9999 9.33429 15.9999H16.0006C16.1847 15.9999 16.334 15.8507 16.334 15.6666C16.334 15.4825 16.1847 15.3333 16.0006 15.3333Z",fill:"currentColor"}),(0,qt.jsx)("path",{d:"M15.0007 16.9998H10.3343C10.1502 16.9998 10.001 17.149 10.001 17.3331C10.001 17.5172 10.1502 17.6664 10.3343 17.6664H15.0007C15.1848 17.6664 15.334 17.5172 15.334 17.3331C15.334 17.149 15.1848 16.9998 15.0007 16.9998Z",fill:"currentColor"}),(0,qt.jsx)("path",{d:"M17.6669 5.00037H18.3336C18.5177 5.00037 18.6669 4.85114 18.6669 4.66706C18.6669 4.48297 18.5177 4.33374 18.3336 4.33374H17.6669C17.1147 4.33374 16.667 4.78143 16.667 5.33369C16.667 5.88595 17.1147 6.33364 17.6669 6.33364C17.851 6.33364 18.0003 6.48287 18.0003 6.66696C18.0003 6.85105 17.851 7.00028 17.6669 7.00028H17.0003C16.8162 7.00028 16.667 7.14951 16.667 7.33359C16.667 7.51768 16.8162 7.66691 17.0003 7.66691H17.6669C18.2192 7.66691 18.6669 7.21922 18.6669 6.66696C18.6669 6.1147 18.2192 5.66701 17.6669 5.66701C17.4829 5.66701 17.3336 5.51778 17.3336 5.33369C17.3336 5.14961 17.4829 5.00037 17.6669 5.00037Z",fill:"currentColor"})]})}function dc(){return(0,qt.jsxs)("svg",{className:"MuiSvgIcon-root",width:"19",height:"20",viewBox:"0 0 19 20",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg",children:[(0,qt.jsxs)("g",{clipPath:"url(#clip0_4135_7688)",children:[(0,qt.jsx)("path",{d:"M17.8896 13.6503C17.8966 13.6414 17.9037 13.6329 17.9105 13.624C17.9301 13.5984 17.9492 13.5723 17.9679 13.546C17.9711 13.5416 17.9744 13.5372 17.9776 13.5326C18.2969 13.079 18.4702 12.5318 18.4702 11.9591V1.61179C18.4702 0.722964 17.782 0 16.9361 0H7.96261C7.11672 0 6.42842 0.722964 6.42842 1.61179V5.28582C6.00519 5.25973 5.57541 5.33587 5.18341 5.51089C4.63061 5.75777 4.17949 6.1777 3.87855 6.72549L2.41131 9.39487L0.944078 12.0646C0.801886 12.3234 0.70225 12.5959 0.642846 12.8733C0.622948 12.9656 0.607697 13.0587 0.596804 13.1518C0.591285 13.1983 0.586928 13.245 0.583587 13.2917C0.577051 13.3849 0.574873 13.4781 0.576906 13.5712C0.577923 13.6222 0.580682 13.6728 0.584313 13.7237C0.603921 13.9951 0.659549 14.2624 0.749454 14.5171C0.775888 14.5919 0.805662 14.6653 0.837906 14.7376C0.843861 14.7509 0.849235 14.7645 0.855335 14.7777C1.08729 15.2787 1.45882 15.7148 1.95148 16.0137C1.96557 16.0223 1.97965 16.0302 1.99389 16.0384C2.00623 16.0456 2.01858 16.0531 2.03107 16.0601C2.04095 16.0656 2.05097 16.0708 2.06085 16.0763C2.07813 16.0856 2.09527 16.095 2.1127 16.104C2.11894 16.1072 2.12519 16.1101 2.13143 16.1133C2.15278 16.1242 2.17428 16.135 2.19592 16.1452C2.19752 16.146 2.19912 16.1466 2.20071 16.1474C2.5538 16.314 2.93753 16.4011 3.32489 16.4011C3.72634 16.4011 4.12009 16.3087 4.47956 16.1349C4.48232 16.1335 4.48508 16.1323 4.48799 16.1309C4.4906 16.1297 4.49322 16.1286 4.49583 16.1272C4.5792 17.1136 4.98326 18.0305 5.65501 18.7415C6.41259 19.5434 7.42173 19.9902 8.49682 19.9996H8.50001H8.50016H8.50509C8.51366 19.9998 8.52209 19.9999 8.53051 19.9999C10.3854 19.9999 11.953 18.6835 12.4316 16.8934H13.8448C14.2064 16.8934 14.5623 16.8093 14.8876 16.6543C14.8968 16.6506 14.9059 16.6471 14.9148 16.6428C14.9629 16.6192 15.0096 16.5935 15.056 16.567C15.0562 16.5668 15.0564 16.5667 15.0567 16.5665C15.0926 16.5459 15.1278 16.5244 15.1626 16.5021C15.1646 16.5009 15.1665 16.4995 15.1685 16.4983C15.2013 16.4771 15.2337 16.455 15.2657 16.4323C15.269 16.4298 15.2724 16.4274 15.2757 16.4251C15.3058 16.4033 15.3354 16.381 15.3646 16.3579C15.3694 16.3541 15.3742 16.3503 15.379 16.3465C15.4061 16.3247 15.4327 16.3023 15.459 16.2792C15.4652 16.2739 15.4715 16.2687 15.4776 16.2632C15.5024 16.2412 15.5265 16.2183 15.5506 16.1953C15.5573 16.1887 15.5643 16.1825 15.571 16.1759C15.5996 16.1477 15.6278 16.1188 15.6552 16.0891C15.6562 16.0879 15.6574 16.0868 15.6584 16.0856L17.7608 13.8024C17.7781 13.7836 17.7943 13.7642 17.811 13.745C17.8198 13.7349 17.8288 13.7252 17.8375 13.7151C17.8552 13.6939 17.8723 13.6721 17.8896 13.6503ZM4.52255 7.11596C4.88464 6.45694 5.56321 6.06143 6.26924 6.06143C6.41767 6.06143 6.56756 6.07897 6.71586 6.11529C6.9083 6.16244 7.0932 6.23934 7.26531 6.34371C7.88491 6.71969 8.26966 7.42084 8.26966 8.17356C8.26966 8.54145 8.1767 8.90537 8.00052 9.22581L6.71934 11.5571L3.24123 9.44736L4.52255 7.11596ZM4.43294 15.2712C4.41638 15.2825 4.39982 15.2939 4.38298 15.3048C4.37586 15.3095 4.36845 15.3138 4.36119 15.3184C4.34681 15.3275 4.33229 15.3365 4.31762 15.3454C4.30876 15.3506 4.29975 15.3556 4.29089 15.3608C4.27782 15.3683 4.26475 15.3757 4.25153 15.3829C4.24108 15.3886 4.23047 15.394 4.21987 15.3995C4.2084 15.4056 4.19678 15.4114 4.18516 15.4172C4.17281 15.4233 4.16047 15.4293 4.14797 15.4351C4.13824 15.4397 4.12866 15.4441 4.11893 15.4485C4.1044 15.4551 4.08988 15.4613 4.07521 15.4674C4.06809 15.4705 4.06083 15.4734 4.05371 15.4764C4.03643 15.4833 4.01915 15.4902 4.00172 15.4967C3.99809 15.4981 3.99445 15.4993 3.99082 15.5007C3.56294 15.6573 3.09163 15.6594 2.65837 15.499C2.65779 15.4989 2.65706 15.4986 2.65648 15.4984C2.63586 15.4908 2.61538 15.4827 2.59505 15.4743C2.59098 15.4726 2.58691 15.4709 2.58299 15.4693C2.56585 15.4621 2.54886 15.4546 2.53187 15.447C2.52606 15.4442 2.52025 15.4417 2.51444 15.4389C2.4989 15.4319 2.48365 15.4243 2.46839 15.4168C2.46186 15.4136 2.45532 15.4104 2.44893 15.407C2.43368 15.3992 2.41843 15.3911 2.40347 15.3829C2.39737 15.3797 2.39127 15.3765 2.38517 15.3731C2.3644 15.3615 2.34378 15.3495 2.3233 15.3371C1.36441 14.7553 1.03471 13.4624 1.58808 12.455L2.86941 10.1238L6.28899 12.1981C6.27664 12.2068 6.26459 12.2158 6.25224 12.2246C6.23786 12.2349 6.22334 12.2452 6.20911 12.2556C6.20344 12.2597 6.19792 12.2637 6.1924 12.268C6.18209 12.2756 6.17192 12.2835 6.16176 12.2912C6.16118 12.2916 6.16074 12.2921 6.16016 12.2924C6.14593 12.3032 6.13169 12.3139 6.11775 12.3249C6.11121 12.3299 6.10468 12.3351 6.09814 12.3403C6.08696 12.3491 6.07592 12.3581 6.06474 12.3671C6.05268 12.3769 6.04048 12.3865 6.02843 12.3964C6.02087 12.4027 6.01347 12.409 6.00606 12.4152C5.99429 12.425 5.98282 12.4347 5.97134 12.4447C5.96132 12.4534 5.95116 12.4618 5.94113 12.4704C5.93271 12.4778 5.92443 12.4854 5.91615 12.4927C5.90424 12.5034 5.89233 12.5141 5.88042 12.5248C5.87244 12.5321 5.86416 12.5394 5.85617 12.5467C5.84687 12.5553 5.83772 12.5643 5.82857 12.573C5.81637 12.5844 5.80417 12.5959 5.79212 12.6075C5.78587 12.6134 5.77963 12.6194 5.77338 12.6253C5.76321 12.6352 5.75334 12.6455 5.74331 12.6555C5.73082 12.6679 5.71848 12.6803 5.70628 12.6926C5.6903 12.7091 5.67447 12.7256 5.65878 12.7422C5.64702 12.7547 5.63525 12.7671 5.62349 12.7796C5.62131 12.782 5.61899 12.7845 5.61666 12.7869C5.60301 12.8019 5.58965 12.8171 5.57614 12.8322C5.56554 12.8441 5.55465 12.8559 5.54419 12.8678C5.54317 12.869 5.54201 12.8704 5.54099 12.8716C5.52661 12.8881 5.51267 12.9049 5.49858 12.9215C5.48929 12.9325 5.47985 12.9433 5.4707 12.9543C5.46852 12.9571 5.46634 12.9596 5.46416 12.9624C5.45152 12.9778 5.43918 12.9935 5.42669 13.0091C5.41681 13.0214 5.40693 13.0337 5.3972 13.046C5.38907 13.0565 5.38108 13.0671 5.37295 13.0776C5.36757 13.0846 5.36249 13.0916 5.35712 13.0985C5.34738 13.1116 5.33736 13.1246 5.32763 13.1377C5.32444 13.1421 5.32095 13.1466 5.31776 13.151C5.30773 13.1647 5.298 13.1786 5.28827 13.1925C5.27927 13.205 5.27026 13.2175 5.2614 13.2302C5.25704 13.2366 5.25254 13.2429 5.24818 13.2491C5.23889 13.2627 5.22974 13.2766 5.22059 13.2902C5.21289 13.3016 5.20505 13.313 5.19749 13.3246C5.19212 13.3327 5.18675 13.3408 5.18152 13.3489C5.1728 13.3625 5.16423 13.3761 5.15567 13.3896C5.14913 13.4 5.14259 13.4104 5.1362 13.4206C5.12996 13.4307 5.12371 13.4406 5.11761 13.4507C5.10948 13.464 5.10149 13.4774 5.0935 13.4908C5.08798 13.5001 5.08261 13.5093 5.07723 13.5184C5.07026 13.5303 5.06344 13.5422 5.05661 13.5541C5.04906 13.5673 5.0415 13.5805 5.0341 13.5938C5.02974 13.6017 5.02538 13.6098 5.02088 13.6179C5.01333 13.6316 5.00592 13.6454 4.99851 13.6591C4.99154 13.6722 4.98457 13.6852 4.97774 13.6983C4.97586 13.7018 4.97411 13.7055 4.97222 13.7092C4.97019 13.713 4.96816 13.7169 4.96627 13.7209C4.95857 13.7359 4.95087 13.7508 4.94332 13.7658C4.93272 13.787 4.92241 13.8083 4.91209 13.8297C4.90498 13.8444 4.89815 13.859 4.89132 13.8737C4.88101 13.8958 4.87085 13.9179 4.86097 13.9402C4.85458 13.9544 4.84848 13.9686 4.84223 13.9828C4.84151 13.9844 4.84078 13.9861 4.84005 13.9878C4.83729 13.9943 4.83439 14.0008 4.83148 14.0073C4.82524 14.0223 4.81899 14.0371 4.81289 14.052C4.80766 14.0647 4.80258 14.0774 4.7975 14.09C4.79387 14.099 4.79024 14.108 4.78675 14.117C4.78036 14.1331 4.77411 14.1492 4.76787 14.1654C4.7638 14.1761 4.76003 14.1868 4.75596 14.1974C4.75233 14.2075 4.74855 14.2174 4.74492 14.2275C4.73853 14.2451 4.73228 14.2624 4.72604 14.28C4.72313 14.2887 4.72023 14.2974 4.71718 14.3061C4.71355 14.3171 4.70977 14.3282 4.70614 14.3392C4.6999 14.358 4.6935 14.3769 4.6874 14.3958C4.68537 14.4025 4.68334 14.4094 4.6813 14.4161C4.67767 14.4277 4.67404 14.4396 4.67056 14.4514C4.66257 14.4774 4.65472 14.5035 4.64732 14.5299C4.64427 14.5409 4.64122 14.5521 4.63817 14.5632C4.63076 14.5905 4.62335 14.6177 4.61638 14.6451C4.6142 14.6538 4.61217 14.6627 4.60999 14.6715C4.59648 14.7259 4.58399 14.7806 4.57266 14.8357C4.57092 14.8443 4.56889 14.8527 4.56714 14.8612C4.56192 14.8876 4.55712 14.9143 4.55233 14.9409C4.54971 14.9546 4.5471 14.9682 4.54478 14.9819C4.54434 14.9839 4.54405 14.9859 4.54361 14.988C4.53984 15.0104 4.53635 15.033 4.53287 15.0556C4.53069 15.0698 4.52836 15.0838 4.52633 15.098C4.52575 15.1018 4.52517 15.106 4.52473 15.1098C4.52168 15.1308 4.51907 15.152 4.51631 15.1731C4.51573 15.1783 4.515 15.1835 4.51428 15.1887C4.51326 15.1974 4.51195 15.2059 4.51094 15.2144C4.49002 15.2305 4.46881 15.246 4.44746 15.2611C4.44267 15.2646 4.43773 15.2679 4.43294 15.2712ZM5.22306 15.7438C5.22306 15.6463 5.22698 15.5486 5.23511 15.4514C5.23787 15.4162 5.24107 15.3812 5.24499 15.3463C5.25211 15.2802 5.26111 15.2146 5.27186 15.1496C5.27244 15.1458 5.27288 15.142 5.2736 15.1382C5.27781 15.113 5.28246 15.088 5.28725 15.0629C5.289 15.0536 5.29059 15.0443 5.29234 15.0352C5.2967 15.013 5.30163 14.9911 5.30643 14.9691C5.30904 14.957 5.31136 14.945 5.31412 14.9331C5.31848 14.9135 5.32342 14.8945 5.32807 14.8751C5.3317 14.8607 5.33489 14.8463 5.33867 14.8319C5.34317 14.8142 5.34826 14.7967 5.35319 14.779C5.35741 14.7632 5.36162 14.7474 5.36612 14.7318C5.37091 14.7153 5.376 14.6992 5.38108 14.683C5.38616 14.6662 5.39096 14.6493 5.39633 14.6326C5.40141 14.6172 5.40679 14.6018 5.41202 14.5864C5.41768 14.5693 5.42335 14.5519 5.4293 14.5348C5.43468 14.5199 5.44034 14.5052 5.44571 14.4903C5.45225 14.4729 5.45849 14.4555 5.46503 14.4381C5.47055 14.4239 5.4765 14.4098 5.48217 14.3958C5.48929 14.3781 5.49611 14.3603 5.50352 14.3429C5.50918 14.3293 5.51528 14.3159 5.52109 14.3024C5.52894 14.2844 5.53664 14.2664 5.54462 14.2487C5.55058 14.2359 5.55668 14.2232 5.56263 14.2104C5.5712 14.1923 5.57963 14.1739 5.58834 14.1559C5.59444 14.1434 5.60098 14.1312 5.60722 14.1189C5.61637 14.1007 5.62538 14.0827 5.63467 14.0647C5.64106 14.0526 5.64775 14.0407 5.65428 14.0288C5.66401 14.0108 5.6736 13.9928 5.68362 13.975C5.6903 13.9631 5.69727 13.9515 5.7041 13.9397C5.71427 13.922 5.72443 13.9043 5.73489 13.8868C5.74201 13.8752 5.74927 13.8637 5.75653 13.8521C5.76713 13.8349 5.77774 13.8175 5.78878 13.8003C5.79618 13.7888 5.80374 13.7777 5.81129 13.7664C5.82247 13.7493 5.83351 13.7324 5.84498 13.7154C5.85268 13.7043 5.86067 13.6933 5.86851 13.6822C5.88013 13.6655 5.89175 13.6487 5.90366 13.6324C5.9118 13.6213 5.92007 13.6106 5.92835 13.5996C5.94041 13.5834 5.95232 13.5671 5.96466 13.5511C5.97338 13.5401 5.98224 13.5293 5.99095 13.5183C6.0033 13.5027 6.0155 13.4871 6.02813 13.4717C6.03714 13.4607 6.04644 13.4501 6.05559 13.4392C6.06822 13.4241 6.08086 13.4092 6.09378 13.3944C6.10308 13.3835 6.11281 13.3732 6.12225 13.3625C6.13547 13.3478 6.1484 13.3332 6.16176 13.3188C6.17149 13.3083 6.18151 13.2981 6.19139 13.2877C6.20475 13.2735 6.21811 13.2593 6.23191 13.2454C6.24208 13.2351 6.25253 13.225 6.26285 13.2148C6.27664 13.2012 6.29015 13.1875 6.30409 13.1742C6.31484 13.164 6.32574 13.154 6.33648 13.144C6.35057 13.131 6.36437 13.1179 6.3786 13.1051C6.38979 13.0948 6.40126 13.0851 6.41274 13.0752C6.42682 13.0628 6.44077 13.0503 6.45515 13.0381C6.46677 13.0283 6.47882 13.0187 6.49059 13.0089C6.50496 12.9972 6.5192 12.9851 6.53387 12.9735C6.54592 12.9639 6.55827 12.9546 6.57047 12.9452C6.58514 12.9339 6.59966 12.9224 6.61448 12.9113C6.62697 12.902 6.63975 12.893 6.65239 12.8838C6.66735 12.873 6.68216 12.862 6.69727 12.8513C6.71019 12.8423 6.72341 12.8335 6.73663 12.8246C6.75159 12.8144 6.76655 12.804 6.7818 12.7941C6.7953 12.7852 6.8091 12.7767 6.82275 12.768C6.83771 12.7585 6.85253 12.7488 6.86778 12.7396C6.86952 12.7385 6.87141 12.7375 6.87315 12.7364C6.91556 12.7105 6.9587 12.6861 7.00227 12.6623C7.01346 12.6561 7.02479 12.65 7.03597 12.6441C7.07998 12.6207 7.12428 12.598 7.16916 12.5766C7.16959 12.5765 7.17003 12.5762 7.17046 12.576C7.47373 12.4325 7.79704 12.3375 8.12805 12.2951V19.1929C6.49523 18.9825 5.22306 17.5108 5.22306 15.7438ZM8.87169 19.2005V12.2875C8.87256 12.2875 8.87343 12.2876 8.8743 12.2878C8.92339 12.2931 8.97219 12.2997 9.02056 12.3072C9.02332 12.3076 9.02608 12.3081 9.02884 12.3084C9.07575 12.3159 9.12223 12.3246 9.16856 12.3342C9.17393 12.3353 9.17931 12.3363 9.18483 12.3374C9.22942 12.3469 9.27343 12.3574 9.31729 12.3687C9.32411 12.3703 9.33094 12.372 9.33777 12.3739C9.38061 12.3852 9.42317 12.3975 9.46544 12.4106C9.4727 12.4129 9.4801 12.4152 9.48751 12.4175C9.5292 12.4308 9.57074 12.445 9.61169 12.4599C9.61896 12.4625 9.62622 12.4653 9.63348 12.468C9.67458 12.4833 9.7154 12.4993 9.75577 12.5164C9.76231 12.5191 9.7687 12.5219 9.77524 12.5246C9.81634 12.5422 9.85701 12.5605 9.89724 12.5797C9.90218 12.5821 9.90697 12.5846 9.91191 12.587C9.95359 12.6072 9.99484 12.6281 10.0355 12.65C10.0377 12.6513 10.04 12.6525 10.0423 12.6539C10.0823 12.6754 10.1216 12.698 10.1606 12.7213C10.1645 12.7236 10.1684 12.7257 10.1722 12.7282C10.2107 12.7512 10.2484 12.7753 10.2859 12.8C10.2916 12.8039 10.2974 12.8075 10.303 12.8113C10.3391 12.8354 10.3747 12.8605 10.4098 12.8861C10.4163 12.8908 10.4229 12.8956 10.4294 12.9003C10.4638 12.9258 10.4977 12.952 10.5312 12.9787C10.5378 12.9841 10.5444 12.9894 10.5511 12.9947C10.5842 13.0218 10.6169 13.0494 10.649 13.0774C10.6553 13.0831 10.6616 13.0887 10.6679 13.0942C10.7001 13.1231 10.7318 13.1524 10.763 13.1823C10.7684 13.1875 10.7738 13.1928 10.7792 13.1981C10.8108 13.229 10.8422 13.2606 10.8727 13.2927C10.8766 13.2969 10.8805 13.3013 10.8845 13.3054C10.916 13.339 10.9471 13.3732 10.9774 13.4081C10.9791 13.4102 10.9809 13.4122 10.9826 13.4144C11.0124 13.4488 11.0415 13.4841 11.0699 13.52C11.073 13.5238 11.076 13.5276 11.0791 13.5314C11.1071 13.5669 11.1343 13.6031 11.161 13.6399C11.1651 13.6455 11.1693 13.651 11.1733 13.6567C11.199 13.6927 11.224 13.7292 11.2486 13.7661C11.2529 13.7729 11.2574 13.7795 11.2618 13.7862C11.2858 13.823 11.309 13.8602 11.3315 13.8979C11.3359 13.9051 11.3401 13.9123 11.3444 13.9196C11.3667 13.9574 11.3884 13.9957 11.4094 14.0346C11.4133 14.0418 11.4171 14.049 11.4208 14.0561C11.4419 14.0957 11.4622 14.1356 11.4817 14.1761C11.4847 14.1823 11.4876 14.1886 11.4907 14.1949C11.5106 14.2367 11.5298 14.2788 11.5481 14.3215C11.5501 14.3261 11.552 14.3307 11.5539 14.3352C11.5728 14.3799 11.5911 14.4253 11.6083 14.471C11.6088 14.4721 11.6091 14.4732 11.6095 14.4742C11.6266 14.5199 11.6428 14.5661 11.658 14.6126C11.6593 14.6168 11.6608 14.6207 11.6621 14.6248C11.6767 14.6702 11.6904 14.7159 11.7035 14.762C11.7052 14.7681 11.707 14.7742 11.7087 14.7805C11.721 14.8255 11.7325 14.871 11.7431 14.9167C11.7449 14.9241 11.7466 14.9312 11.7482 14.9387C11.7585 14.984 11.768 15.0297 11.7765 15.0757C11.778 15.0835 11.7794 15.0912 11.7807 15.0989C11.789 15.1452 11.7964 15.1916 11.803 15.2384C11.804 15.2457 11.805 15.2532 11.806 15.2607C11.8123 15.3083 11.8178 15.356 11.8223 15.4041C11.8229 15.4105 11.8233 15.4169 11.8239 15.4233C11.8282 15.4729 11.8317 15.5227 11.834 15.5729C11.8342 15.577 11.8343 15.5811 11.8345 15.5852C11.8368 15.6377 11.8381 15.6907 11.8381 15.7439C11.8381 15.8007 11.8368 15.8575 11.834 15.9141C11.8336 15.926 11.8323 15.9377 11.8317 15.9495C11.8293 15.994 11.8265 16.0386 11.8223 16.083C11.8205 16.1014 11.8181 16.1198 11.816 16.1382C11.8121 16.175 11.8082 16.2119 11.8031 16.2485C11.7995 16.2746 11.7948 16.3003 11.7906 16.3262C11.7861 16.3544 11.7819 16.3827 11.7767 16.4107C11.5011 17.8944 10.3244 19.0434 8.87169 19.2005ZM12.5666 16.1121C12.5669 16.1089 12.5669 16.1057 12.5672 16.1024C12.5716 16.0479 12.5749 15.993 12.5774 15.9379C12.5777 15.9295 12.578 15.9211 12.5783 15.9127C12.5803 15.8567 12.5818 15.8004 12.5818 15.7439C12.5818 15.3463 12.5295 14.9613 12.4319 14.596H13.102C13.3074 14.596 13.4738 14.4211 13.4738 14.2054C13.4738 13.9898 13.3074 13.8148 13.102 13.8148H12.1411C11.4704 12.4349 10.1038 11.4878 8.53051 11.4878C8.52252 11.4878 8.51454 11.4879 8.50655 11.4881L8.49928 11.4882H8.49667C8.45411 11.4885 8.41156 11.4898 8.369 11.4916C8.35985 11.4919 8.3507 11.4927 8.3417 11.4931C8.3096 11.4946 8.27765 11.4965 8.24569 11.4988C8.22739 11.5001 8.20924 11.502 8.19094 11.5035C8.16842 11.5055 8.14591 11.5075 8.12354 11.5099C8.10103 11.5122 8.07852 11.5151 8.05601 11.5178C8.03814 11.5201 8.02013 11.5223 8.00212 11.5247C7.97714 11.5282 7.9523 11.532 7.92732 11.536C7.91207 11.5384 7.89682 11.5407 7.88157 11.5435C7.85514 11.5479 7.82856 11.5528 7.80212 11.5578C7.78861 11.5604 7.77525 11.563 7.76175 11.5658C7.73429 11.5714 7.70684 11.5772 7.67939 11.5835C7.66705 11.5862 7.6547 11.5891 7.64236 11.592C7.61447 11.5986 7.58644 11.6054 7.5587 11.6126C7.55434 11.6137 7.55013 11.6146 7.54592 11.6158L8.64438 9.61643C8.88577 9.17744 9.0133 8.67847 9.0133 8.17356C9.0133 7.14267 8.48607 6.18243 7.63727 5.66729C7.60343 5.64684 7.56901 5.62731 7.53459 5.60824C7.52369 5.60229 7.51265 5.59664 7.50176 5.59084C7.47736 5.57787 7.45296 5.56536 7.42827 5.55315C7.41592 5.54705 7.40372 5.5411 7.39123 5.53515C7.36596 5.52325 7.34054 5.51165 7.31483 5.50051C7.30423 5.49593 7.29363 5.49105 7.28288 5.48647C7.24686 5.47137 7.2107 5.45687 7.1741 5.44329C7.17351 5.44314 7.17279 5.44283 7.17206 5.44253V1.61179C7.17206 1.15372 7.52674 0.781253 7.96261 0.781253H16.9361C17.372 0.781253 17.7265 1.15372 17.7265 1.61179V11.959C17.7265 12.1386 17.7023 12.3147 17.6558 12.4828H15.7278C14.9875 12.4828 14.3852 13.1156 14.3852 13.8935V16.0229C14.2115 16.0811 14.0292 16.1121 13.8448 16.1121H12.5666ZM15.1289 15.5372V13.8935C15.1289 13.5463 15.3976 13.2641 15.7278 13.2641H17.2215L15.2989 15.3524L15.1289 15.5372Z",fill:"currentColor"}),(0,qt.jsx)("path",{d:"M9.48364 4.27442H15.3899C15.5953 4.27442 15.7617 4.09955 15.7617 3.88379C15.7617 3.66803 15.5953 3.49316 15.3899 3.49316H9.48364C9.27826 3.49316 9.11182 3.66803 9.11182 3.88379C9.11182 4.09955 9.27826 4.27442 9.48364 4.27442Z",fill:"currentColor"}),(0,qt.jsx)("path",{d:"M15.4802 6.93359H15.4793C15.2739 6.93359 15.1079 7.10861 15.1079 7.32422C15.1079 7.53998 15.2748 7.71485 15.4802 7.71485C15.6855 7.71485 15.852 7.53998 15.852 7.32422C15.852 7.10861 15.6855 6.93359 15.4802 6.93359Z",fill:"currentColor"}),(0,qt.jsx)("path",{d:"M14.2714 7.32422C14.2714 7.10861 14.105 6.93359 13.8996 6.93359H9.48364C9.27826 6.93359 9.11182 7.10861 9.11182 7.32422C9.11182 7.53998 9.27826 7.71485 9.48364 7.71485H13.8996C14.105 7.71485 14.2714 7.53998 14.2714 7.32422Z",fill:"currentColor"}),(0,qt.jsx)("path",{d:"M15.7617 10.7646C15.7617 10.5489 15.5952 10.374 15.3899 10.374H11.2927C11.0875 10.374 10.9209 10.5489 10.9209 10.7646C10.9209 10.9803 11.0875 11.1553 11.2927 11.1553H15.3899C15.5952 11.1553 15.7617 10.9804 15.7617 10.7646Z",fill:"currentColor"})]}),(0,qt.jsx)("defs",{children:(0,qt.jsx)("clipPath",{id:"clip0_4135_7688",children:(0,qt.jsx)("rect",{width:"19",height:"20",fill:"white"})})})]})}function uc(){return(0,qt.jsxs)("svg",{className:"MuiSvgIcon-root",width:"45",height:"45",viewBox:"0 0 45 45",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg",children:[(0,qt.jsx)("path",{d:"M22.5 9.28125H29.8438V10.75H22.5V9.28125Z",fill:"currentColor"}),(0,qt.jsx)("path",{d:"M22.5 12.2188H29.8438V13.6875H22.5V12.2188Z",fill:"currentColor"}),(0,qt.jsx)("path",{d:"M22.5 15.1562H29.8438V16.625H22.5V15.1562Z",fill:"currentColor"}),(0,qt.jsx)("path",{d:"M22.5 18.0938H29.8438V19.5625H22.5V18.0938Z",fill:"currentColor"}),(0,qt.jsx)("path",{d:"M14.3279 10.6163C14.8658 10.7945 15.4467 10.7945 15.9846 10.6163C16.1149 11.076 16.3911 11.4809 16.7715 11.7699C17.1519 12.0589 17.616 12.2165 18.0938 12.2188H18.8281C19.0229 12.2188 19.2097 12.2961 19.3474 12.4338C19.4851 12.5716 19.5625 12.7584 19.5625 12.9531V15.1562H21.0312V12.9531C21.0312 12.3688 20.7991 11.8084 20.386 11.3953C19.9728 10.9821 19.4124 10.75 18.8281 10.75H18.0938C17.899 10.75 17.7122 10.6726 17.5745 10.5349C17.4367 10.3972 17.3594 10.2104 17.3594 10.0156V9.73509C17.83 9.20495 18.0911 8.52138 18.0938 7.8125V6.34375C18.0938 5.56468 17.7843 4.81751 17.2334 4.26662C16.6825 3.71574 15.9353 3.40625 15.1562 3.40625C14.3772 3.40625 13.63 3.71574 13.0791 4.26662C12.5282 4.81751 12.2188 5.56468 12.2188 6.34375V7.8125C12.2214 8.52138 12.4825 9.20495 12.9531 9.73509V10.0156C12.9531 10.2104 12.8758 10.3972 12.738 10.5349C12.6003 10.6726 12.4135 10.75 12.2188 10.75H11.4844C10.9001 10.75 10.3397 10.9821 9.92653 11.3953C9.51336 11.8084 9.28125 12.3688 9.28125 12.9531V15.1562H10.75V12.9531C10.75 12.7584 10.8274 12.5716 10.9651 12.4338C11.1028 12.2961 11.2896 12.2188 11.4844 12.2188H12.2188C12.6965 12.2165 13.1606 12.0589 13.541 11.7699C13.9214 11.4809 14.1976 11.076 14.3279 10.6163ZM13.6875 6.34375C13.6875 5.95421 13.8422 5.58063 14.1177 5.30519C14.3931 5.02974 14.7667 4.875 15.1562 4.875C15.5458 4.875 15.9194 5.02974 16.1948 5.30519C16.4703 5.58063 16.625 5.95421 16.625 6.34375V7.8125C16.625 8.20204 16.4703 8.57562 16.1948 8.85106C15.9194 9.12651 15.5458 9.28125 15.1562 9.28125C14.7667 9.28125 14.3931 9.12651 14.1177 8.85106C13.8422 8.57562 13.6875 8.20204 13.6875 7.8125V6.34375Z",fill:"currentColor"}),(0,qt.jsx)("path",{d:"M23.2344 7.8125H29.1094C29.3041 7.8125 29.4909 7.73513 29.6287 7.59741C29.7664 7.45968 29.8438 7.27289 29.8438 7.07812V4.14062C29.8438 3.94586 29.7664 3.75907 29.6287 3.62134C29.4909 3.48362 29.3041 3.40625 29.1094 3.40625H23.2344C23.0396 3.40625 22.8528 3.48362 22.7151 3.62134C22.5774 3.75907 22.5 3.94586 22.5 4.14062V7.07812C22.5 7.27289 22.5774 7.45968 22.7151 7.59741C22.8528 7.73513 23.0396 7.8125 23.2344 7.8125ZM23.9688 4.875H28.375V6.34375H23.9688V4.875Z",fill:"currentColor"}),(0,qt.jsx)("path",{d:"M44.5312 19.5625C44.5301 18.3942 44.0655 17.2742 43.2394 16.4481C42.4133 15.622 41.2933 15.1574 40.125 15.1562H35.7188V4.14062C35.7188 3.94586 35.6414 3.75907 35.5037 3.62134C35.3659 3.48362 35.1791 3.40625 34.9844 3.40625H32.7812V1.20312C32.7812 1.00836 32.7039 0.821565 32.5662 0.683843C32.4284 0.546121 32.2416 0.46875 32.0469 0.46875H7.07812C6.88336 0.46875 6.69657 0.546121 6.55884 0.683843C6.42112 0.821565 6.34375 1.00836 6.34375 1.20312V17.3594H4.14062C3.16714 17.3605 2.23386 17.7478 1.54551 18.4361C0.857148 19.1245 0.469916 20.0578 0.46875 21.0312V40.8594C0.469916 41.8329 0.857148 42.7661 1.54551 43.4545C2.23386 44.1429 3.16714 44.5301 4.14062 44.5312H34.9844C35.9289 44.528 36.8359 44.1608 37.5167 43.5061C38.1975 42.8514 38.5999 41.9595 38.6401 41.0158L44.5048 19.7578C44.5224 19.6942 44.5313 19.6285 44.5312 19.5625ZM34.25 4.875V21.0312H32.7812V4.875H34.25ZM7.8125 1.9375H31.3125V21.0312H16.929L13.4723 17.5745C13.3346 17.4368 13.1479 17.3594 12.9531 17.3594H7.8125V1.9375ZM37.1875 40.8594C37.1875 41.4437 36.9554 42.0041 36.5422 42.4172C36.1291 42.8304 35.5687 43.0625 34.9844 43.0625H4.14062C3.55632 43.0625 2.99595 42.8304 2.58278 42.4172C2.16961 42.0041 1.9375 41.4437 1.9375 40.8594V21.0312C1.9375 20.4469 2.16961 19.8866 2.58278 19.4734C2.99595 19.0602 3.55632 18.8281 4.14062 18.8281H12.6491L16.1058 22.2848C16.2435 22.4226 16.4302 22.5 16.625 22.5H34.9844C35.5687 22.5 36.1291 22.7321 36.5422 23.1453C36.9554 23.5584 37.1875 24.1188 37.1875 24.7031V40.8594ZM38.6562 35.436V24.7031C38.6552 23.857 38.3624 23.0371 37.8273 22.3816C37.2923 21.7261 36.5476 21.2751 35.7188 21.1047V16.625H40.125C40.8881 16.6246 41.6213 16.9212 42.1696 17.4519C42.7178 17.9826 43.0381 18.7058 43.0625 19.4685L38.6562 35.436Z",fill:"currentColor"}),(0,qt.jsx)("path",{d:"M26.9062 29.1094H23.2344V25.4375C23.2344 25.2427 23.157 25.0559 23.0193 24.9182C22.8816 24.7805 22.6948 24.7031 22.5 24.7031H16.625C16.4302 24.7031 16.2434 24.7805 16.1057 24.9182C15.968 25.0559 15.8906 25.2427 15.8906 25.4375V29.1094H12.2188C12.024 29.1094 11.8372 29.1867 11.6995 29.3245C11.5617 29.4622 11.4844 29.649 11.4844 29.8438V35.7188C11.4844 35.9135 11.5617 36.1003 11.6995 36.238C11.8372 36.3758 12.024 36.4531 12.2188 36.4531H15.8906V40.125C15.8906 40.3198 15.968 40.5066 16.1057 40.6443C16.2434 40.782 16.4302 40.8594 16.625 40.8594H22.5C22.6948 40.8594 22.8816 40.782 23.0193 40.6443C23.157 40.5066 23.2344 40.3198 23.2344 40.125V36.4531H26.9062C27.101 36.4531 27.2878 36.3758 27.4255 36.238C27.5633 36.1003 27.6406 35.9135 27.6406 35.7188V29.8438C27.6406 29.649 27.5633 29.4622 27.4255 29.3245C27.2878 29.1867 27.101 29.1094 26.9062 29.1094ZM26.1719 34.9844H22.5C22.3052 34.9844 22.1184 35.0617 21.9807 35.1995C21.843 35.3372 21.7656 35.524 21.7656 35.7188V39.3906H17.3594V35.7188C17.3594 35.524 17.282 35.3372 17.1443 35.1995C17.0066 35.0617 16.8198 34.9844 16.625 34.9844H12.9531V30.5781H16.625C16.8198 30.5781 17.0066 30.5008 17.1443 30.363C17.282 30.2253 17.3594 30.0385 17.3594 29.8438V26.1719H21.7656V29.8438C21.7656 30.0385 21.843 30.2253 21.9807 30.363C22.1184 30.5008 22.3052 30.5781 22.5 30.5781H26.1719V34.9844Z",fill:"currentColor"})]})}function pc(){return(0,qt.jsxs)("svg",{className:"MuiSvgIcon-root",width:"47",height:"47",viewBox:"0 0 47 47",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg",children:[(0,qt.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M23.5 3.375C17.9469 3.375 13.4375 7.88444 13.4375 13.4375C13.4375 18.9906 17.9469 23.5 23.5 23.5C29.0531 23.5 33.5625 18.9906 33.5625 13.4375C33.5625 7.88444 29.0531 3.375 23.5 3.375ZM23.5 6.25C27.4675 6.25 30.6875 9.47 30.6875 13.4375C30.6875 17.405 27.4675 20.625 23.5 20.625C19.5325 20.625 16.3125 17.405 16.3125 13.4375C16.3125 9.47 19.5325 6.25 23.5 6.25Z",fill:"currentColor"}),(0,qt.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M6.25 40.75H23.5C24.2935 40.75 24.9375 41.394 24.9375 42.1875C24.9375 42.981 24.2935 43.625 23.5 43.625H4.8125C4.019 43.625 3.375 42.981 3.375 42.1875C3.375 42.1875 3.375 41.0016 3.375 39.3125C3.375 32.1667 9.16669 26.375 16.3125 26.375H23.5C24.2935 26.375 24.9375 27.019 24.9375 27.8125C24.9375 28.606 24.2935 29.25 23.5 29.25H16.3125C10.7551 29.25 6.25 33.7551 6.25 39.3125V40.75Z",fill:"currentColor"}),(0,qt.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M35.7202 26.375C30.5639 26.375 26.3779 30.561 26.3779 35.7173C26.3779 40.8736 30.5639 45.0596 35.7202 45.0596C40.8765 45.0596 45.0625 40.8736 45.0625 35.7173C45.0625 30.561 40.8765 26.375 35.7202 26.375ZM35.7202 29.25C39.2895 29.25 42.1875 32.148 42.1875 35.7173C42.1875 39.2866 39.2895 42.1846 35.7202 42.1846C32.1509 42.1846 29.2529 39.2866 29.2529 35.7173C29.2529 32.148 32.1509 29.25 35.7202 29.25Z",fill:"currentColor"}),(0,qt.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M35.1222 35.8107L38.2832 32.5605C38.8367 31.9913 39.7481 31.9783 40.3159 32.5318C40.8851 33.0852 40.8981 33.9952 40.3446 34.5644L36.1529 38.874C35.8826 39.1529 35.5103 39.3096 35.1222 39.3096C34.7341 39.3096 34.3632 39.1529 34.0915 38.874L31.0957 35.7935C30.5423 35.2242 30.5552 34.3143 31.1245 33.7608C31.6937 33.2074 32.6037 33.2203 33.1571 33.7896L35.1222 35.8107Z",fill:"currentColor"})]})}function hc(){return(0,qt.jsxs)("svg",{className:"MuiSvgIcon-root",width:"47",height:"47",viewBox:"0 0 47 47",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg",children:[(0,qt.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M23.5 3.375C17.9469 3.375 13.4375 7.88444 13.4375 13.4375C13.4375 18.9906 17.9469 23.5 23.5 23.5C29.0531 23.5 33.5625 18.9906 33.5625 13.4375C33.5625 7.88444 29.0531 3.375 23.5 3.375ZM23.5 6.25C27.4675 6.25 30.6875 9.47 30.6875 13.4375C30.6875 17.405 27.4675 20.625 23.5 20.625C19.5325 20.625 16.3125 17.405 16.3125 13.4375C16.3125 9.47 19.5325 6.25 23.5 6.25Z",fill:"currentColor"}),(0,qt.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M6.25 40.75H23.5C24.2935 40.75 24.9375 41.394 24.9375 42.1875C24.9375 42.981 24.2935 43.625 23.5 43.625H4.8125C4.019 43.625 3.375 42.981 3.375 42.1875C3.375 42.1875 3.375 41.0016 3.375 39.3125C3.375 32.1667 9.16669 26.375 16.3125 26.375H23.5C24.2935 26.375 24.9375 27.019 24.9375 27.8125C24.9375 28.606 24.2935 29.25 23.5 29.25H16.3125C10.7551 29.25 6.25 33.7551 6.25 39.3125V40.75Z",fill:"currentColor"}),(0,qt.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M35.7202 26.375C30.5639 26.375 26.3779 30.561 26.3779 35.7173C26.3779 40.8736 30.5639 45.0596 35.7202 45.0596C40.8765 45.0596 45.0625 40.8736 45.0625 35.7173C45.0625 30.561 40.8765 26.375 35.7202 26.375ZM35.7202 29.25C39.2895 29.25 42.1875 32.148 42.1875 35.7173C42.1875 39.2866 39.2895 42.1846 35.7202 42.1846C32.1509 42.1846 29.2529 39.2866 29.2529 35.7173C29.2529 32.148 32.1509 29.25 35.7202 29.25Z",fill:"currentColor"}),(0,qt.jsx)("g",{clipPath:"url(#clip0_3268_26408)",children:(0,qt.jsx)("path",{d:"M32.8438 32.8438L38.5937 38.5937M32.8438 38.5937L38.5937 32.8438",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})}),(0,qt.jsx)("defs",{children:(0,qt.jsx)("clipPath",{id:"clip0_3268_26408",children:(0,qt.jsx)("rect",{width:"8.625",height:"8.625",fill:"white",transform:"translate(31.4062 31.4062)"})})})]})}function mc(){return(0,qt.jsx)("svg",{className:"MuiSvgIcon-root",width:"24",height:"24",viewBox:"0 0 24 24",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg",children:(0,qt.jsx)("path",{d:"M19.1 9.63363C19.6688 9.07656 20 8.31559 20 7.5C20 5.84586 18.6543 4.5 17 4.5C16.4534 4.5 15.9157 4.65023 15.4443 4.93457C15.2868 5.0298 15.236 5.23453 15.3311 5.39227C15.4261 5.55 15.6312 5.60027 15.7887 5.50555C16.1562 5.28387 16.5749 5.16668 17 5.16668C18.2864 5.16668 19.3333 6.2134 19.3333 7.5C19.3333 8.2923 18.9365 9.02262 18.2705 9.45457C17.7112 9.82145 17.0023 9.92723 16.3548 9.74281C16.1797 9.69234 15.9935 9.79457 15.9427 9.97164C15.8922 10.1487 15.9948 10.3331 16.1719 10.3837C16.4414 10.4609 16.72 10.5 17 10.5C17.5241 10.5 18.0308 10.357 18.4806 10.0988C20.1918 10.7188 21.3333 12.3344 21.3333 14.1666V15.8333H18.2938C18.0577 13.6069 16.657 11.6586 14.6139 10.7335C15.2641 10.0716 15.6666 9.16563 15.6666 8.16668C15.6667 6.14484 14.0218 4.5 12 4.5C9.9782 4.5 8.33332 6.14484 8.33332 8.16668C8.33332 9.16594 8.73613 10.0721 9.38664 10.7342C8.69906 11.0466 8.06137 11.4836 7.52051 12.0214C6.48367 13.0612 5.85273 14.3957 5.70297 15.8334H2.66668V14.1667C2.66668 13.0124 3.11754 11.9241 3.93492 11.1032C4.38488 10.6561 4.9327 10.315 5.52254 10.1007C5.97242 10.3578 6.47754 10.5 7 10.5C7.27996 10.5 7.55859 10.4609 7.82812 10.3838C8.00519 10.3332 8.10773 10.1487 8.0573 9.97168C8.00652 9.79461 7.82031 9.69254 7.64519 9.74285C6.99805 9.92758 6.28941 9.82195 5.72789 9.45379C5.06352 9.02262 4.66668 8.29234 4.66668 7.5C4.66668 6.2134 5.71355 5.16668 7 5.16668C7.42512 5.16668 7.84375 5.28387 8.21125 5.50555C8.36945 5.60027 8.57355 5.54949 8.66894 5.39227C8.76398 5.23457 8.7132 5.0298 8.55566 4.93457C8.0843 4.65023 7.54656 4.5 7 4.5C5.3457 4.5 4 5.84586 4 7.5C4 8.31496 4.33066 9.07535 4.89781 9.63191C4.36918 9.87766 3.88094 10.2169 3.46355 10.6315C2.51984 11.5794 2 12.8348 2 14.1667V16.1667C2 16.3508 2.1491 16.5 2.33332 16.5H5.66664V19.1667C5.66664 19.3508 5.81574 19.5 5.99996 19.5H18C18.1842 19.5 18.3333 19.3507 18.3333 19.1667V16.5H21.6666C21.8509 16.5 21.9999 16.3507 21.9999 16.1667V14.1667C22 12.1958 20.8546 10.4425 19.1 9.63363ZM9 8.16668C9 6.51254 10.3457 5.16668 12 5.16668C13.6543 5.16668 15 6.51254 15 8.16668C15 9.82082 13.6543 11.1667 12 11.1667C10.3457 11.1667 9 9.82078 9 8.16668ZM17.6667 18.8333H6.33332V16.5C6.33332 14.9886 6.9225 13.5653 7.99152 12.493C8.55469 11.9329 9.23742 11.4984 9.96941 11.2173C10.5512 11.6058 11.2494 11.8333 12 11.8333C12.7519 11.8333 13.4512 11.6052 14.0336 11.2154C16.2124 12.0526 17.6667 14.1531 17.6667 16.5V18.8333Z",fill:"currentColor",stroke:"currentColor",strokeWidth:"0.3"})})}function fc(){return(0,qt.jsxs)("svg",{className:"MuiSvgIcon-root",width:"17",height:"17",viewBox:"0 0 20 20",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg",children:[(0,qt.jsx)("path",{d:"M2.57873 2.57923C3.69079 1.46717 5.35486 1.042 7.49984 1.042H9.1665C9.51168 1.042 9.7915 1.32182 9.7915 1.667C9.7915 2.01218 9.51168 2.292 9.1665 2.292H7.49984C5.47815 2.292 4.22556 2.70017 3.46261 3.46311C2.69967 4.22605 2.2915 5.47865 2.2915 7.50034V12.5003C2.2915 14.522 2.69967 15.7746 3.46261 16.5376C4.22556 17.3005 5.47815 17.7087 7.49984 17.7087H12.4998C14.5215 17.7087 15.7741 17.3005 16.5371 16.5376C17.3 15.7746 17.7082 14.522 17.7082 12.5003V10.8337C17.7082 10.4885 17.988 10.2087 18.3332 10.2087C18.6783 10.2087 18.9582 10.4885 18.9582 10.8337V12.5003C18.9582 14.6453 18.533 16.3094 17.4209 17.4214C16.3089 18.5335 14.6448 18.9587 12.4998 18.9587H7.49984C5.35486 18.9587 3.69079 18.5335 2.57873 17.4214C1.46667 16.3094 1.0415 14.6453 1.0415 12.5003V7.50034C1.0415 5.35536 1.46667 3.69128 2.57873 2.57923Z",fill:"currentColor"}),(0,qt.jsx)("path",{d:"M15.1638 0.844992C16.0916 0.75392 17.0114 1.16137 17.9251 2.07506C18.8388 2.98875 19.2463 3.9086 19.1552 4.83639C19.0673 5.7314 18.5276 6.47317 17.9251 7.07561L11.3512 13.6495C11.1635 13.8311 10.9182 13.9898 10.6816 14.1088C10.4463 14.227 10.1691 14.3313 9.90489 14.3691L7.39338 14.7278C6.77497 14.8129 6.18329 14.6441 5.76817 14.2307C5.35216 13.8163 5.18199 13.2245 5.27295 12.6025L5.27313 12.6012L5.63083 10.0973L5.63099 10.0962C5.66852 9.82849 5.77229 9.54936 5.89141 9.31237C6.01077 9.07487 6.17149 8.82813 6.3579 8.64173L12.9246 2.07506C13.527 1.47262 14.2688 0.932845 15.1638 0.844992ZM15.2859 2.08901C14.8226 2.13449 14.3393 2.42805 13.8084 2.95894L7.24178 9.52561C7.17818 9.58921 7.0889 9.7133 7.00827 9.87372C6.92755 10.0343 6.88144 10.1797 6.86884 10.27L6.86856 10.2721L6.51022 12.7804L6.50988 12.7828C6.46791 13.0687 6.55196 13.2471 6.65026 13.345C6.74955 13.4439 6.93241 13.5291 7.22148 13.4897L7.22297 13.4895L9.72812 13.1316C9.81389 13.1194 9.95758 13.0736 10.1202 12.9919C10.2792 12.912 10.4075 12.8222 10.4788 12.7541L17.0412 6.19173C17.5721 5.66083 17.8657 5.17761 17.9112 4.71428C17.9534 4.28374 17.7942 3.71192 17.0412 2.95894C16.2883 2.20597 15.7164 2.04675 15.2859 2.08901Z",fill:"currentColor"}),(0,qt.jsx)("path",{d:"M12.2561 2.85687C12.5885 2.7637 12.9335 2.9576 13.0266 3.28996C13.5259 5.07089 14.9199 6.46628 16.7119 6.97401C17.044 7.0681 17.2369 7.41361 17.1428 7.74571C17.0487 8.07782 16.7032 8.27076 16.3711 8.17666C14.1631 7.55106 12.4404 5.82978 11.823 3.62737C11.7299 3.29501 11.9238 2.95004 12.2561 2.85687Z",fill:"currentColor"})]})}function gc(){return(0,qt.jsxs)("svg",{className:"MuiSvgIcon-root",width:"18",height:"18",viewBox:"0 0 20 20",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg",children:[(0,qt.jsx)("path",{d:"M9.99987 7.6414C8.69505 7.6414 7.64154 8.69491 7.64154 9.99973C7.64154 11.3046 8.69505 12.3581 9.99987 12.3581C11.3047 12.3581 12.3582 11.3046 12.3582 9.99973C12.3582 8.69491 11.3047 7.6414 9.99987 7.6414ZM6.39154 9.99973C6.39154 8.00455 8.00469 6.3914 9.99987 6.3914C11.995 6.3914 13.6082 8.00455 13.6082 9.99973C13.6082 11.9949 11.995 13.6081 9.99987 13.6081C8.00469 13.6081 6.39154 11.9949 6.39154 9.99973Z",fill:"currentColor"}),(0,qt.jsx)("path",{d:"M1.88112 7.4972C3.87355 4.36523 6.79322 2.47473 9.99987 2.47473C13.2067 2.47473 16.1264 4.3654 18.1189 7.49761C18.573 8.20956 18.779 9.12153 18.779 9.99556C18.779 10.8696 18.573 11.7816 18.1189 12.4935C16.1264 15.6257 13.2067 17.5164 9.99987 17.5164C6.79308 17.5164 3.87329 15.6257 1.88085 12.4935C1.42671 11.7816 1.2207 10.8696 1.2207 9.99556C1.2207 9.12136 1.42679 8.20921 1.88112 7.4972ZM9.99987 3.72473C7.32333 3.72473 4.75978 5.30073 2.93555 8.16852L2.93503 8.16934C2.63954 8.63227 2.4707 9.29494 2.4707 9.99556C2.4707 10.6962 2.63954 11.3589 2.93503 11.8218L2.93555 11.8226C4.75978 14.6904 7.32333 16.2664 9.99987 16.2664C12.6764 16.2664 15.24 14.6904 17.0642 11.8226L17.0647 11.8218C17.3602 11.3589 17.529 10.6962 17.529 9.99556C17.529 9.29494 17.3602 8.63227 17.0647 8.16934L17.0642 8.16852C15.24 5.30073 12.6764 3.72473 9.99987 3.72473Z",fill:"currentColor"})]})}function vc(){return(0,qt.jsxs)("svg",{className:"MuiSvgIcon-root",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,qt.jsx)("path",{d:"M11.25 9.75001H12.375C12.5823 9.75001 12.75 9.58228 12.75 9.375V7.87499C12.75 7.66771 12.5823 7.49998 12.375 7.49998H11.25V6.37501C11.25 6.16773 11.0823 6 10.875 6H9.37499C9.16771 6 8.99998 6.16773 8.99998 6.37501V7.50001H7.87498C7.6677 7.50001 7.49997 7.66774 7.49997 7.87502V9.37504C7.49997 9.58232 7.6677 9.75005 7.87498 9.75005H8.99998V10.875C8.99998 11.0823 9.16771 11.2501 9.37499 11.2501H10.875C11.0823 11.2501 11.25 11.0823 11.25 10.875V9.75001ZM10.875 9.00002C10.6677 9.00002 10.5 9.16775 10.5 9.37504V10.5H9.75V9.37504C9.75 9.16775 9.58227 9.00002 9.37499 9.00002H8.24999V8.25004H9.37499C9.58227 8.25004 9.75 8.0823 9.75 7.87502V6.75002H10.5V7.87502C10.5 8.0823 10.6677 8.25004 10.875 8.25004H12V9.00002H10.875Z",fill:"currentColor"}),(0,qt.jsx)("path",{d:"M18.6401 6.85987L14.8901 3.10986C14.8198 3.03955 14.7246 3 14.625 3H6.74998C5.9231 3 5.25 3.67271 5.25 4.50001V19.5C5.25 20.3273 5.9231 21 6.75001 21H17.25C18.0769 21 18.75 20.3273 18.75 19.5V7.12499C18.75 7.02539 18.7104 6.93019 18.6401 6.85987ZM15 4.28029L17.4697 6.75001H15.75C15.3362 6.75001 15 6.41346 15 6.00002V4.28029ZM18 19.5C18 19.9134 17.6638 20.25 17.25 20.25H6.75001C6.33619 20.25 6.00002 19.9134 6.00002 19.5V4.50001C6.00002 4.08657 6.33622 3.75002 6.75001 3.75002H14.25V6.00002C14.25 6.82729 14.9231 7.5 15.75 7.5H18V19.5Z",fill:"currentColor"}),(0,qt.jsx)("path",{d:"M8.625 12.75C8.00463 12.75 7.5 13.2546 7.5 13.875C7.5 14.4954 8.00463 15 8.625 15C9.24537 15 9.75 14.4954 9.75 13.875C9.75 13.2547 9.24537 12.75 8.625 12.75ZM8.625 14.25C8.41846 14.25 8.24999 14.0819 8.24999 13.875C8.24999 13.6681 8.41846 13.5 8.625 13.5C8.83154 13.5 9.00001 13.6681 9.00001 13.875C9.00001 14.0819 8.83154 14.25 8.625 14.25Z",fill:"currentColor"}),(0,qt.jsx)("path",{d:"M8.625 16.5C8.00463 16.5 7.5 17.0046 7.5 17.625C7.5 18.2454 8.00463 18.75 8.625 18.75C9.24537 18.75 9.75 18.2454 9.75 17.625C9.75 17.0046 9.24537 16.5 8.625 16.5ZM8.625 18C8.41846 18 8.24999 17.8319 8.24999 17.625C8.24999 17.4181 8.41846 17.25 8.625 17.25C8.83154 17.25 9.00001 17.4181 9.00001 17.625C9.00001 17.8319 8.83154 18 8.625 18Z",fill:"currentColor"}),(0,qt.jsx)("path",{d:"M11.25 13.875C11.25 14.0823 11.4177 14.25 11.625 14.25H16.125C16.3323 14.25 16.5 14.0823 16.5 13.875C16.5 13.6677 16.3323 13.5 16.125 13.5H11.625C11.4177 13.5 11.25 13.6678 11.25 13.875Z",fill:"currentColor"}),(0,qt.jsx)("path",{d:"M16.125 17.25H11.625C11.4177 17.25 11.25 17.4177 11.25 17.625C11.25 17.8323 11.4177 18 11.625 18H16.125C16.3323 18 16.5 17.8323 16.5 17.625C16.5 17.4177 16.3323 17.25 16.125 17.25Z",fill:"currentColor"})]})}function xc(){return(0,qt.jsxs)("svg",{className:"MuiSvgIcon-root",width:"17",height:"17",viewBox:"0 0 20 20",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg",children:[(0,qt.jsx)("path",{d:"M4.13815 4.1947C5.80861 4.026 7.47927 3.94163 9.15005 3.94163C11.9545 3.94163 14.7668 4.08437 17.5617 4.36134C17.9052 4.39538 18.156 4.70143 18.122 5.04493C18.088 5.38842 17.7819 5.63929 17.4384 5.60525C14.6833 5.33222 11.9122 5.19163 9.15005 5.19163C7.52113 5.19163 5.89209 5.27389 4.26286 5.43846L4.26103 5.43864L2.56103 5.60531C2.2175 5.63899 1.91171 5.38781 1.87803 5.04428C1.84435 4.70074 2.09553 4.39495 2.43906 4.36128L4.13815 4.1947Z",fill:"currentColor"}),(0,qt.jsx)("path",{d:"M7.88303 3.15376L7.69975 4.24514C7.64258 4.58555 7.32028 4.81516 6.97987 4.75799C6.63946 4.70083 6.40984 4.37852 6.46701 4.03811L6.65034 2.94645C6.65355 2.92743 6.65684 2.90752 6.66018 2.88735C6.71756 2.54079 6.80174 2.03235 7.14066 1.64804C7.53571 1.20006 8.13846 1.04163 8.90838 1.04163H11.0917C11.871 1.04163 12.4731 1.21279 12.8658 1.66533C13.2052 2.05642 13.2873 2.56667 13.3421 2.90738C13.3448 2.92396 13.3474 2.94014 13.3499 2.95588L13.533 4.03734C13.5905 4.37768 13.3613 4.70027 13.021 4.75786C12.6807 4.81546 12.3581 4.58625 12.3005 4.24591L12.1165 3.15887C12.0468 2.73135 12.0027 2.57789 11.9217 2.48459C11.8769 2.43296 11.7208 2.29163 11.0917 2.29163H8.90838C8.26996 2.29163 8.11855 2.42903 8.07818 2.4748C8.00142 2.56185 7.9581 2.7081 7.88303 3.15376Z",fill:"currentColor"}),(0,qt.jsx)("path",{d:"M15.7486 6.99292C16.0931 7.01516 16.3543 7.31242 16.3321 7.65689L15.7902 16.052L15.7891 16.0678C15.7671 16.3813 15.743 16.7261 15.6784 17.0469C15.6114 17.3796 15.4933 17.7306 15.254 18.0421C14.7531 18.6944 13.9005 18.9583 12.675 18.9583H7.32505C6.09958 18.9583 5.24702 18.6944 4.74605 18.0421C4.50679 17.7306 4.38872 17.3796 4.32172 17.0469C4.25712 16.7261 4.23297 16.3813 4.21102 16.0678L4.20967 16.0486L3.66801 7.65689C3.64578 7.31242 3.90699 7.01516 4.25145 6.99292C4.59591 6.97069 4.89318 7.23191 4.91541 7.57637L5.45685 15.9646L5.45697 15.9663C5.48049 16.3019 5.50039 16.5681 5.54712 16.8001C5.59262 17.0261 5.6558 17.1745 5.73738 17.2807C5.87807 17.4639 6.22552 17.7083 7.32505 17.7083H12.675C13.7746 17.7083 14.122 17.4639 14.2627 17.2807C14.3443 17.1745 14.4075 17.0261 14.453 16.8001C14.4997 16.5681 14.5196 16.3019 14.5431 15.9663L14.5432 15.9646L15.0847 7.57637C15.1069 7.23191 15.4042 6.97069 15.7486 6.99292Z",fill:"currentColor"}),(0,qt.jsx)("path",{d:"M7.98338 13.75C7.98338 13.4048 8.2632 13.125 8.60838 13.125H11.3834C11.7286 13.125 12.0084 13.4048 12.0084 13.75C12.0084 14.0951 11.7286 14.375 11.3834 14.375H8.60838C8.2632 14.375 7.98338 14.0951 7.98338 13.75Z",fill:"currentColor"}),(0,qt.jsx)("path",{d:"M7.29171 10.4166C7.29171 10.0714 7.57153 9.79163 7.91671 9.79163H12.0834C12.4286 9.79163 12.7084 10.0714 12.7084 10.4166C12.7084 10.7618 12.4286 11.0416 12.0834 11.0416H7.91671C7.57153 11.0416 7.29171 10.7618 7.29171 10.4166Z",fill:"currentColor"})]})}function yc(){return(0,qt.jsxs)("svg",{width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,qt.jsxs)("g",{clipPath:"url(#clip0_2325_2631)",children:[(0,qt.jsx)("rect",{x:"1.6",y:"6.6",width:"16.8",height:"6.8",rx:"3.4",fill:"white",stroke:"#303F9F",strokeWidth:"0.8"}),(0,qt.jsx)("path",{d:"M10 6.6H9.6V7V13V13.4H10H15C16.8778 13.4 18.4 11.8778 18.4 10C18.4 8.12223 16.8778 6.6 15 6.6H10Z",fill:"white",stroke:"#303F9F",strokeWidth:"0.8"})]}),(0,qt.jsx)("defs",{children:(0,qt.jsx)("clipPath",{id:"clip0_2325_2631",children:(0,qt.jsx)("rect",{width:"20",height:"20",fill:"white"})})})]})}function bc(){return(0,qt.jsxs)("svg",{width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,qt.jsxs)("g",{clipPath:"url(#clip0_2197_3518)",children:[(0,qt.jsx)("path",{d:"M1.17772 16.0967L1 16.5009L3.56446 14.6981L3.43235 14.5117L1.17772 16.0967Z",fill:"#303F9F"}),(0,qt.jsx)("path",{d:"M14.6797 6.74542L14.6781 6.74313L13.9954 5.78C13.8724 5.6065 13.6314 5.56512 13.4572 5.68762L4.37003 12.0757C4.27826 12.1402 4.21928 12.2413 4.20832 12.3527L4.13749 13.0779C4.12971 13.1577 4.09704 13.2332 4.04408 13.2935L2.97657 14.5116C2.85948 14.6453 2.84929 14.8414 2.95201 14.9864L2.95366 14.9887C3.05639 15.1335 3.24529 15.1898 3.41105 15.1246L4.92094 14.5307C4.99582 14.5012 5.07816 14.4959 5.15632 14.5153L5.86621 14.6918C5.97518 14.7189 6.09063 14.6973 6.18239 14.6328L15.2696 8.24477C15.4438 8.12226 15.4853 7.88227 15.3623 7.70877L14.6796 6.74564L14.6797 6.74542Z",fill:"#303F9F"}),(0,qt.jsx)("path",{d:"M3.205 14.809C3.1845 14.78 3.18658 14.7413 3.20994 14.7146L4.27745 13.4965C4.37338 13.387 4.43159 13.2527 4.44573 13.1082L4.51656 12.3828C4.51875 12.3607 4.53048 12.3406 4.54868 12.3278L13.6358 5.93976C13.6704 5.91541 13.7184 5.92371 13.7427 5.9581L15.1097 7.88677C15.1341 7.92116 15.1258 7.96899 15.0912 7.99323L6.00408 14.3813C5.98588 14.394 5.96297 14.3983 5.94126 14.393L5.23148 14.2165C5.08984 14.1814 4.94326 14.191 4.80753 14.2442L3.29753 14.8381C3.26442 14.8511 3.22715 14.84 3.20665 14.8111L3.205 14.809Z",fill:"#F9F9F9"}),(0,qt.jsx)("path",{d:"M12.2741 9.97367L6.00397 14.3814C5.98577 14.3942 5.96286 14.3986 5.94115 14.3931L5.23127 14.2166C5.08973 14.1815 4.94315 14.1911 4.80742 14.2445L3.29753 14.8384C3.26453 14.8513 3.22715 14.8402 3.20665 14.8114L3.205 14.8091C3.1845 14.7802 3.18658 14.7414 3.20994 14.7148L4.27745 13.4967C4.37338 13.3872 4.43148 13.2529 4.44573 13.1082L4.51656 12.3831C4.51875 12.3609 4.53048 12.3408 4.54868 12.3281L8.92441 9.25195L12.2741 9.97378V9.97367Z",fill:"#E3E5EA"}),(0,qt.jsx)("path",{d:"M14.2466 6.44255L17.2902 4.30587L17.8652 5.11819L14.8215 7.25488L14.2466 6.44255Z",fill:"#E3E5EA",stroke:"#303F9F",strokeWidth:"0.1"}),(0,qt.jsx)("path",{d:"M17.9655 5.10879L17.3328 4.21484L17.0417 4.41917L17.6744 5.31311L17.9655 5.10879Z",fill:"#E3E5EA"}),(0,qt.jsx)("path",{d:"M16.1529 8.77377C16.0036 8.87859 15.8179 8.90272 15.6389 8.85653C15.4599 8.81067 15.287 8.6945 15.1632 8.51947L13.1643 5.69483C12.9165 5.34477 12.9578 4.891 13.2568 4.68125C13.4061 4.57643 13.5917 4.55241 13.7707 4.5986C13.9497 4.64445 14.1224 4.76041 14.2463 4.93544L16.2452 7.76008C16.2887 7.82155 16.3234 7.8863 16.349 7.95236C16.4706 8.26201 16.3994 8.60082 16.153 8.77377H16.1529Z",fill:"#E3E5EA"}),(0,qt.jsx)("path",{d:"M16.3808 8.053C16.3462 8.09777 16.3052 8.13773 16.2573 8.17136C16.108 8.27618 15.9223 8.30031 15.7433 8.25412C15.5643 8.20826 15.3914 8.09209 15.2676 7.91706L13.2687 5.09242C13.2034 5.00026 13.1585 4.9009 13.1327 4.80078C12.952 5.03509 12.9563 5.40185 13.1642 5.69556L15.1632 8.52021C15.287 8.69523 15.4599 8.81141 15.6389 8.85727C15.8178 8.90334 16.0035 8.87932 16.1528 8.7745C16.3729 8.62001 16.4528 8.33328 16.3808 8.053Z",fill:"#F9F9F9"}),(0,qt.jsx)("path",{d:"M18.9584 5.89121L18.6258 6.12476C18.5814 6.15587 18.5201 6.14528 18.4888 6.10117L16.5685 3.38757C16.5372 3.34346 16.5479 3.28253 16.5922 3.25152L16.925 3.01786C16.9694 2.98674 17.0307 2.99734 17.0619 3.04145L18.9822 5.75483C19.0134 5.79905 19.0028 5.86009 18.9585 5.89121H18.9584Z",fill:"#E3E5EA"}),(0,qt.jsx)("path",{d:"M18.982 5.7543L18.9111 5.65406C18.725 5.78465 18.4681 5.74032 18.3369 5.55503L16.6684 3.19727L16.5921 3.25088C16.5478 3.28199 16.5373 3.34281 16.5684 3.38692L18.4888 6.10053C18.52 6.14475 18.5813 6.15523 18.6257 6.12411L18.9583 5.89056C19.0027 5.85944 19.0133 5.79841 18.982 5.75419V5.7543Z",fill:"#303F9F"}),(0,qt.jsx)("path",{d:"M12.087 8.56138L12.8169 9.59123L13.0697 9.41347L12.3398 8.38363C12.2906 8.31407 12.194 8.29748 12.1241 8.34661C12.0543 8.39564 12.0376 8.49183 12.087 8.56138Z",fill:"#303F9F"}),(0,qt.jsx)("path",{d:"M11.8626 9.39146L12.2743 9.97222L12.5271 9.79447L12.1154 9.2137C12.0662 9.14415 11.9696 9.12756 11.8998 9.17669C11.8299 9.22571 11.8133 9.32191 11.8626 9.39146Z",fill:"#303F9F"}),(0,qt.jsx)("path",{d:"M11.3199 9.77427L11.7315 10.355L11.9844 10.1773L11.5727 9.59652C11.5235 9.52696 11.4269 9.51037 11.357 9.5595C11.2872 9.60853 11.2705 9.70472 11.3199 9.77427Z",fill:"#303F9F"}),(0,qt.jsx)("path",{d:"M10.7771 10.1551L11.1888 10.7359L11.4416 10.5581L11.03 9.97738C10.9807 9.90782 10.8842 9.89123 10.8143 9.94036C10.7445 9.98939 10.7278 10.0856 10.7771 10.1551Z",fill:"#303F9F"}),(0,qt.jsx)("path",{d:"M9.91606 10.0868L10.646 11.1166L10.8988 10.9389L10.1689 9.90902C10.1197 9.83946 10.0231 9.82287 9.95323 9.872C9.88339 9.92114 9.86673 10.0172 9.91606 10.0868Z",fill:"#303F9F"}),(0,qt.jsx)("path",{d:"M9.6917 10.9168L10.1034 11.4976L10.3562 11.3199L9.94452 10.7391C9.89529 10.6695 9.7987 10.6529 9.72886 10.7021C9.65903 10.7512 9.64236 10.8473 9.6917 10.9168Z",fill:"#303F9F"}),(0,qt.jsx)("path",{d:"M9.14897 11.2997L9.56065 11.8804L9.81347 11.7027L9.40179 11.1219C9.35256 11.0524 9.25598 11.0358 9.18614 11.0849C9.1163 11.1339 9.09964 11.2301 9.14897 11.2997Z",fill:"#303F9F"}),(0,qt.jsx)("path",{d:"M8.60625 11.6805L9.01793 12.2613L9.27074 12.0835L8.85907 11.5028C8.80984 11.4332 8.71325 11.4166 8.64342 11.4658C8.57358 11.5148 8.55691 11.611 8.60625 11.6805Z",fill:"#303F9F"}),(0,qt.jsx)("path",{d:"M7.74541 11.6141L8.47536 12.644L8.72817 12.4662L7.99823 11.4364C7.949 11.3668 7.85241 11.3502 7.78258 11.3993C7.71274 11.4484 7.69607 11.5446 7.74541 11.6141Z",fill:"#303F9F"}),(0,qt.jsx)("path",{d:"M7.52104 12.4442L7.93272 13.025L8.18554 12.8472L7.77386 12.2664C7.72463 12.1969 7.62805 12.1803 7.55821 12.2294C7.48837 12.2786 7.47171 12.3746 7.52104 12.4442Z",fill:"#303F9F"}),(0,qt.jsx)("path",{d:"M6.97832 12.8251L7.39 13.4058L7.64281 13.2281L7.23114 12.6473C7.18191 12.5777 7.08532 12.5611 7.01549 12.6103C6.94565 12.6593 6.92898 12.7555 6.97832 12.8251Z",fill:"#303F9F"}),(0,qt.jsx)("path",{d:"M6.43559 13.2059L6.84727 13.7867L7.10009 13.6089L6.68841 13.0282C6.63919 12.9586 6.5426 12.942 6.47276 12.9911C6.40292 13.0403 6.38626 13.1364 6.43559 13.2059Z",fill:"#303F9F"}),(0,qt.jsx)("path",{d:"M4.24107 14.8647L3.50071 13.8201C3.47133 13.7787 3.41377 13.7688 3.37222 13.7981L3.34689 13.8159C3.21204 13.9107 3.15942 14.0779 3.20393 14.2272L2.91866 14.5181C2.70564 14.7012 2.89399 15.0292 2.89399 15.0292C2.89399 15.0292 3.14122 15.3158 3.3857 15.1772L3.75638 15.0069C3.88268 15.0987 4.05853 15.1054 4.19338 15.0105L4.21871 14.9927C4.26037 14.9634 4.27023 14.9061 4.24085 14.8647H4.24107Z",fill:"#303F9F"}),(0,qt.jsx)("path",{d:"M8.88239 9.78435C8.76837 9.8645 8.74118 10.0215 8.82165 10.135C8.90212 10.2485 9.05967 10.2756 9.17369 10.1954C9.28771 10.1153 9.3149 9.95829 9.23443 9.84484C9.15396 9.73129 8.99641 9.70421 8.88239 9.78435Z",fill:"#E3E5EA"}),(0,qt.jsx)("path",{d:"M8.21607 11.2724C8.15106 11.3181 8.13549 11.4078 8.18143 11.4725C8.22736 11.5373 8.31737 11.5528 8.38239 11.507C8.4474 11.4613 8.46297 11.3716 8.41703 11.3069C8.37109 11.2421 8.28108 11.2266 8.21607 11.2724Z",fill:"#E3E5EA"}),(0,qt.jsx)("path",{d:"M7.14259 10.9323C7.00083 11.032 6.96695 11.2272 7.06705 11.3685C7.16715 11.5097 7.36317 11.5434 7.50504 11.4437C7.6468 11.344 7.68067 11.1488 7.58058 11.0075C7.48048 10.8663 7.28446 10.8326 7.14259 10.9323Z",fill:"#E3E5EA"}),(0,qt.jsx)("path",{d:"M5.77012 12.9794C5.70029 13.0286 5.68362 13.1246 5.73296 13.1942C5.78229 13.2637 5.87877 13.2803 5.94861 13.2312C6.01845 13.1822 6.03511 13.086 5.98577 13.0164C5.93655 12.9469 5.83996 12.9303 5.77012 12.9794Z",fill:"#E3E5EA"}),(0,qt.jsx)("path",{d:"M6.00104 12.4253C5.91542 12.4855 5.89492 12.6035 5.95543 12.6887C6.01595 12.774 6.13436 12.7944 6.21998 12.7342C6.30561 12.6739 6.32611 12.556 6.26559 12.4707C6.20518 12.3854 6.08667 12.365 6.00104 12.4253Z",fill:"#E3E5EA"})]}),(0,qt.jsx)("defs",{children:(0,qt.jsx)("clipPath",{id:"clip0_2197_3518",children:(0,qt.jsx)("rect",{width:"18",height:"13.5",fill:"white",transform:"translate(1 3)"})})})]})}const jc=()=>(0,qt.jsxs)("svg",{width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,qt.jsx)("path",{d:"M16.5102 16.5104C19.8297 13.191 19.8297 7.80905 16.5102 4.48959C13.1908 1.17014 7.80887 1.17014 4.48941 4.48959C1.16996 7.80905 1.16996 13.191 4.48941 16.5104C7.80887 19.8299 13.1908 19.8299 16.5102 16.5104Z",fill:"#F9F9F9",stroke:"#303F9F"}),(0,qt.jsx)("path",{d:"M12.521 18.0454C16.688 16.9289 19.1609 12.6457 18.0444 8.47862C16.9278 4.31157 12.6446 1.83866 8.47756 2.95522C4.31052 4.07178 1.83761 8.35498 2.95417 12.522C4.07072 16.6891 8.35393 19.162 12.521 18.0454Z",fill:"#E3E5EA",stroke:"#F9F9F9",strokeWidth:"0.8"}),(0,qt.jsx)("path",{d:"M17.8074 10.616L17.8074 10.0422C17.8074 9.67588 17.5293 9.37891 17.1863 9.37891L3.69346 9.37891C3.35046 9.37891 3.0724 9.67588 3.0724 10.0422L3.0724 10.616C3.0724 10.9823 3.35046 11.2793 3.69346 11.2793L17.1863 11.2793C17.5293 11.2793 17.8074 10.9823 17.8074 10.616Z",fill:"url(#paint0_linear_2194_4856)"}),(0,qt.jsx)("defs",{children:(0,qt.jsxs)("linearGradient",{id:"paint0_linear_2194_4856",x1:"10.5767",y1:"9.29981",x2:"10.5767",y2:"11.2059",gradientUnits:"userSpaceOnUse",children:[(0,qt.jsx)("stop",{stopColor:"#A7B3C1"}),(0,qt.jsx)("stop",{offset:"0.21",stopColor:"#C1C9D3"}),(0,qt.jsx)("stop",{offset:"0.5",stopColor:"#DFE3E7"}),(0,qt.jsx)("stop",{offset:"0.75",stopColor:"#F2F3F4"}),(0,qt.jsx)("stop",{offset:"0.93",stopColor:"#F9F9F9"})]})})]}),_c=()=>(0,qt.jsxs)("svg",{width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,qt.jsx)("path",{d:"M19 15.4495V5.5505C19 3.58961 17.4104 2 15.4495 2L5.5505 2C3.58961 2 2 3.58961 2 5.5505V15.4495C2 17.4104 3.58961 19 5.5505 19H15.4495C17.4104 19 19 17.4104 19 15.4495Z",fill:"#303F9F",stroke:"#303F9F"}),(0,qt.jsx)("path",{d:"M14.9893 2.6H6.01069C4.12702 2.6 2.6 4.12702 2.6 6.01069V14.9893C2.6 16.873 4.12702 18.4 6.01069 18.4H14.9893C16.873 18.4 18.4 16.873 18.4 14.9893V6.01069C18.4 4.12702 16.873 2.6 14.9893 2.6Z",fill:"#E3E5EA",stroke:"#F9F9F9",strokeWidth:"0.8"}),(0,qt.jsx)("path",{d:"M18 11.3019L18 10.6981C18 10.3125 17.7169 10 17.3678 10L3.63222 10C3.28306 10 3 10.3125 3 10.6981L3 11.3019C3 11.6875 3.28306 12 3.63222 12L17.3678 12C17.7169 12 18 11.6875 18 11.3019Z",fill:"url(#paint0_linear_2196_4878)"}),(0,qt.jsx)("defs",{children:(0,qt.jsxs)("linearGradient",{id:"paint0_linear_2196_4878",x1:"10.6392",y1:"9.91676",x2:"10.6392",y2:"11.9227",gradientUnits:"userSpaceOnUse",children:[(0,qt.jsx)("stop",{stopColor:"#A7B3C1"}),(0,qt.jsx)("stop",{offset:"0.21",stopColor:"#C1C9D3"}),(0,qt.jsx)("stop",{offset:"0.5",stopColor:"#DFE3E7"}),(0,qt.jsx)("stop",{offset:"0.75",stopColor:"#F2F3F4"}),(0,qt.jsx)("stop",{offset:"0.93",stopColor:"#F9F9F9"})]})})]}),Cc=()=>(0,qt.jsxs)("svg",{width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,qt.jsx)("rect",{x:"1",y:"5",width:"18",height:"9",rx:"4.5",fill:"#303F9F",stroke:"#303F9F"}),(0,qt.jsx)("rect",{x:"1.64639",y:"5.64492",width:"16.707",height:"7.8",rx:"3.9",fill:"#E3E5EA",stroke:"#F9F9F9",strokeWidth:"0.8"}),(0,qt.jsx)("path",{d:"M10.4207 13C10.1863 13 10 12.7912 10 12.5332V6.46682C10 6.20878 10.1863 6 10.4165 6C10.6467 6 10.8372 6.20878 10.8372 6.46682V12.5332C10.8372 12.7912 10.6509 13 10.4207 13Z",fill:"url(#paint0_linear_2196_4891)"}),(0,qt.jsx)("defs",{children:(0,qt.jsxs)("linearGradient",{id:"paint0_linear_2196_4891",x1:"9.96516",y1:"9.43502",x2:"10.8049",y2:"9.43502",gradientUnits:"userSpaceOnUse",children:[(0,qt.jsx)("stop",{stopColor:"#A7B3C1"}),(0,qt.jsx)("stop",{offset:"0.21",stopColor:"#C1C9D3"}),(0,qt.jsx)("stop",{offset:"0.5",stopColor:"#DFE3E7"}),(0,qt.jsx)("stop",{offset:"0.75",stopColor:"#F2F3F4"}),(0,qt.jsx)("stop",{offset:"0.93",stopColor:"#F9F9F9"})]})})]}),wc=()=>(0,qt.jsxs)("svg",{width:"22",height:"20",viewBox:"0 0 22 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,qt.jsx)("path",{d:"M11.148 13.8379C11.0523 13.8718 10.9477 13.8718 10.852 13.8379L1.18401 10.4187C0.789363 10.2791 0.789418 9.72101 1.18409 9.58151L10.852 6.16438C10.9478 6.13055 11.0522 6.13055 11.148 6.16438L20.8159 9.58151C21.2106 9.72101 21.2106 10.2791 20.816 10.4187L11.148 13.8379Z",fill:"#303F9F",stroke:"#303F9F",strokeWidth:"0.3"}),(0,qt.jsxs)("mask",{id:"path-2-outside-1_2197_2585",maskUnits:"userSpaceOnUse",x:"1.80764",y:"0.308683",width:"18.3847",height:"18.3848",fill:"black",children:[(0,qt.jsx)("rect",{fill:"white",x:"1.80764",y:"0.308683",width:"18.3847",height:"18.3848"}),(0,qt.jsx)("path",{d:"M10.9994 12.5727C10.9992 12.5727 10.999 12.5727 10.9987 12.5727L3.71949 9.99702C3.7186 9.9967 3.7186 9.99545 3.71949 9.99513L10.9977 7.42389C10.998 7.42381 10.9982 7.42381 10.9984 7.42389L18.2777 9.99798C18.2786 9.99829 18.2786 9.99955 18.2777 9.99986L10.9994 12.5727Z"})]}),(0,qt.jsx)("path",{d:"M10.9994 12.5727C10.9992 12.5727 10.999 12.5727 10.9987 12.5727L3.71949 9.99702C3.7186 9.9967 3.7186 9.99545 3.71949 9.99513L10.9977 7.42389C10.998 7.42381 10.9982 7.42381 10.9984 7.42389L18.2777 9.99798C18.2786 9.99829 18.2786 9.99955 18.2777 9.99986L10.9994 12.5727Z",fill:"#E3E5EA"}),(0,qt.jsx)("path",{d:"M18.2777 9.99798L18.5444 9.24374L18.5444 9.24374L18.2777 9.99798ZM18.2777 9.99986L18.011 9.2456L18.2777 9.99986ZM10.9977 7.42389L11.2642 8.1782L10.9977 7.42389ZM10.9984 7.42389L10.7317 8.17812L10.9984 7.42389ZM3.71949 9.99702L3.45264 10.7512L3.71949 9.99702ZM3.71949 9.99513L3.98597 10.7494L3.71949 9.99513ZM10.9987 12.5727L11.2656 11.8185L10.9987 12.5727ZM10.9994 12.5727L11.266 13.3269L10.9994 12.5727ZM11.2656 11.8185L3.98634 9.24283L3.45264 10.7512L10.7319 13.3268L11.2656 11.8185ZM3.98597 10.7494L11.2642 8.1782L10.7313 6.66957L3.45301 9.24082L3.98597 10.7494ZM10.7317 8.17812L18.011 10.7522L18.5444 9.24374L11.2651 6.66965L10.7317 8.17812ZM18.011 9.2456L10.7328 11.8184L11.266 13.3269L18.5443 10.7541L18.011 9.2456ZM18.011 10.7522C17.3012 10.5012 17.3004 9.49682 18.011 9.2456L18.5443 10.7541C19.2568 10.5023 19.2559 9.49535 18.5444 9.24374L18.011 10.7522ZM11.2642 8.1782C11.092 8.23906 10.904 8.23906 10.7317 8.17812L11.2651 6.66965C11.0924 6.60857 10.9039 6.60857 10.7313 6.66957L11.2642 8.1782ZM3.98634 9.24283C4.69653 9.49412 4.69622 10.4985 3.98597 10.7494L3.45301 9.24082C2.74098 9.49236 2.74067 10.4993 3.45264 10.7512L3.98634 9.24283ZM10.7319 13.3268C10.9049 13.3881 11.0935 13.3879 11.266 13.3269L10.7328 11.8184C10.9049 11.7576 11.093 11.7574 11.2656 11.8185L10.7319 13.3268Z",fill:"#F9F9F9",mask:"url(#path-2-outside-1_2197_2585)"}),(0,qt.jsx)("path",{d:"M11.0013 12.8066C10.8356 12.8066 10.7039 12.6575 10.7039 12.4732V8.14009C10.7039 7.95577 10.8356 7.80664 10.9984 7.80664C11.1612 7.80664 11.2959 7.95577 11.2959 8.14009V12.4732C11.2959 12.6575 11.1641 12.8066 11.0013 12.8066Z",fill:"url(#paint0_linear_2197_2585)"}),(0,qt.jsx)("defs",{children:(0,qt.jsxs)("linearGradient",{id:"paint0_linear_2197_2585",x1:"10.6792",y1:"10.2602",x2:"11.273",y2:"10.2602",gradientUnits:"userSpaceOnUse",children:[(0,qt.jsx)("stop",{stopColor:"#A7B3C1"}),(0,qt.jsx)("stop",{offset:"0.21",stopColor:"#C1C9D3"}),(0,qt.jsx)("stop",{offset:"0.5",stopColor:"#DFE3E7"}),(0,qt.jsx)("stop",{offset:"0.75",stopColor:"#F2F3F4"}),(0,qt.jsx)("stop",{offset:"0.93",stopColor:"#F9F9F9"})]})})]}),Sc=()=>(0,qt.jsxs)("svg",{width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,qt.jsx)("ellipse",{cx:"10",cy:"10",rx:"9",ry:"5",fill:"#303F9F",stroke:"#303F9F"}),(0,qt.jsx)("path",{d:"M10 14.4C12.2578 14.4 14.3216 13.9433 15.8357 13.1862C17.326 12.4411 18.4 11.3377 18.4 10C18.4 8.6623 17.326 7.55892 15.8357 6.8138C14.3216 6.05672 12.2578 5.6 10 5.6C7.74223 5.6 5.67842 6.05672 4.16426 6.8138C2.67402 7.55892 1.6 8.6623 1.6 10C1.6 11.3377 2.67402 12.4411 4.16426 13.1862C5.67842 13.9433 7.74223 14.4 10 14.4Z",fill:"#E3E5EA",stroke:"#F9F9F9",strokeWidth:"0.8"}),(0,qt.jsx)("path",{d:"M9.5025 14C9.2225 14 9 13.7614 9 13.4665V6.53351C9 6.23861 9.2225 6 9.4975 6C9.7725 6 10 6.23861 10 6.53351V13.4665C10 13.7614 9.7775 14 9.5025 14Z",fill:"url(#paint0_linear_2197_2605)"}),(0,qt.jsx)("defs",{children:(0,qt.jsxs)("linearGradient",{id:"paint0_linear_2197_2605",x1:"8.95838",y1:"9.92573",x2:"9.96137",y2:"9.92573",gradientUnits:"userSpaceOnUse",children:[(0,qt.jsx)("stop",{stopColor:"#A7B3C1"}),(0,qt.jsx)("stop",{offset:"0.21",stopColor:"#C1C9D3"}),(0,qt.jsx)("stop",{offset:"0.5",stopColor:"#DFE3E7"}),(0,qt.jsx)("stop",{offset:"0.75",stopColor:"#F2F3F4"}),(0,qt.jsx)("stop",{offset:"0.93",stopColor:"#F9F9F9"})]})})]}),Ac=()=>(0,qt.jsxs)("svg",{width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,qt.jsx)("rect",{x:"1",y:"6",width:"17",height:"10",rx:"3",fill:"#303F9F",stroke:"#303F9F"}),(0,qt.jsx)("rect",{x:"1.64663",y:"6.64687",width:"15.8",height:"8.8",rx:"2.4",fill:"#E3E5EA",stroke:"#F9F9F9",strokeWidth:"0.8"}),(0,qt.jsx)("path",{d:"M9.50206 15.2559C9.28067 15.2559 9.10474 15.0173 9.10474 14.7223V7.78937C9.10474 7.49447 9.28067 7.25586 9.49811 7.25586C9.71555 7.25586 9.89543 7.49447 9.89543 7.78937V14.7223C9.89543 15.0173 9.7195 15.2559 9.50206 15.2559Z",fill:"url(#paint0_linear_2197_2617)"}),(0,qt.jsx)("defs",{children:(0,qt.jsxs)("linearGradient",{id:"paint0_linear_2197_2617",x1:"9.08299",y1:"11.2559",x2:"9.88753",y2:"11.2559",gradientUnits:"userSpaceOnUse",children:[(0,qt.jsx)("stop",{stopColor:"#A7B3C1"}),(0,qt.jsx)("stop",{offset:"0.21",stopColor:"#C1C9D3"}),(0,qt.jsx)("stop",{offset:"0.5",stopColor:"#DFE3E7"}),(0,qt.jsx)("stop",{offset:"0.75",stopColor:"#F2F3F4"}),(0,qt.jsx)("stop",{offset:"0.93",stopColor:"#F9F9F9"})]})})]}),kc=()=>(0,qt.jsxs)("svg",{width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,qt.jsxs)("g",{clipPath:"url(#clip0_2197_3320)",children:[(0,qt.jsx)("path",{d:"M17.9613 6.53516L17.7789 6.60719C17.6237 6.95833 15.1538 8.1513 14.826 8.23834C14.2936 8.38089 12.2257 9.25725 11.6734 9.3878C11.4481 9.44032 9.71944 10.0376 7.84224 10.6918C7.77289 11.0955 7.34198 13.8671 7.19586 14.4658C7.11331 14.8035 7.02003 15.1666 6.91602 15.5328C7.02333 15.4742 7.13065 15.4097 7.23714 15.3377C7.45672 15.1876 7.67383 15.006 7.88186 14.7915C7.94625 14.7254 8.01064 14.6549 8.07255 14.5799C8.32516 14.2843 8.56125 13.9316 8.76846 13.5129C8.82377 13.4019 8.87825 13.2834 8.9286 13.1603C9.01446 12.9577 9.09371 12.7416 9.1647 12.5105C9.2068 12.377 9.2456 12.2374 9.28192 12.0949C9.30421 12.0063 9.33393 11.9148 9.37108 11.8248C9.47674 11.5697 9.64762 11.3311 9.91509 11.205C9.96297 11.1825 17.4322 7.95923 17.504 7.93071C17.5098 7.92771 17.5874 7.8902 17.6179 7.86619C17.7805 7.74764 17.9134 7.51355 17.9712 7.20743C18.0075 7.01385 18.0166 6.78576 17.9613 6.53666V6.53516Z",fill:"#303F9F"}),(0,qt.jsx)("path",{d:"M8.08327 12.6935C7.919 13.6749 7.63915 14.6217 7.2363 15.3375C7.08111 15.4441 6.92426 15.5356 6.76824 15.6121C6.70467 15.6436 6.64111 15.6737 6.57755 15.7007C6.15901 15.8807 5.75451 15.9678 5.40863 15.9933C5.40863 15.9933 5.01403 15.9963 4.98184 15.9933C4.90424 15.9873 4.82829 15.9783 4.754 15.9678C4.139 15.8837 3.66185 15.6692 3.2912 15.3885C3.26313 15.3675 3.06583 15.1995 3.03199 15.1664C2.94696 15.0824 2.86854 14.9969 2.79672 14.9083C2.78351 14.8933 2.69683 14.7808 2.68528 14.7628C2.65226 14.7163 2.62171 14.6713 2.59199 14.6232C2.57136 14.5917 2.49293 14.4582 2.4756 14.4252C2.06614 13.6734 2.01579 12.908 2.01001 12.7805C2.01001 12.767 2.01001 12.7625 2.01001 12.7625L6.25477 11.1523C6.70055 11.3189 7.1455 11.502 7.60118 11.5455C7.61108 11.5455 7.61934 11.5455 7.62842 11.5485C7.68125 11.553 7.73078 11.556 7.77453 11.562C8.16582 11.6145 8.23434 11.7916 8.08327 12.6935Z",fill:"#303F9F"}),(0,qt.jsx)("path",{d:"M17.8549 6.98526C17.7996 7.0873 17.7344 7.16834 17.6634 7.22536C17.6279 7.25537 17.5924 7.27938 17.5544 7.29739C17.5404 7.30489 9.5404 10.4441 9.5404 10.4441C9.46362 10.4742 9.39015 10.5222 9.32329 10.5882C9.27954 10.6287 9.23744 10.6782 9.19946 10.7323C9.10288 10.8673 9.02198 11.0384 8.96419 11.2365C8.94851 11.286 8.93613 11.337 8.92374 11.388C8.90558 11.4691 8.88247 11.5516 8.85605 11.6341C8.76029 11.9297 8.615 12.2224 8.42596 12.5015C8.38056 12.569 8.33268 12.6365 8.28232 12.701C8.07842 12.9697 7.8349 13.2233 7.56 13.4513C7.49561 13.5054 7.42875 13.5594 7.36106 13.6104C7.04736 13.8475 6.69817 14.0546 6.32422 14.2197C6.27881 14.2392 6.23259 14.2587 6.18553 14.2782C6.04189 14.3352 5.89578 14.3877 5.74636 14.4342C5.24198 14.5873 4.7541 14.6503 4.30668 14.6293C4.24806 14.6278 4.19028 14.6233 4.13249 14.6173C3.72304 14.5768 3.35156 14.4703 3.03787 14.2992C2.99742 14.2782 2.9578 14.2542 2.91982 14.2302C2.83645 14.1776 2.7572 14.1206 2.68373 14.0591C2.63832 14.0216 2.5954 13.9811 2.55412 13.9405C2.25116 13.6389 2.05717 13.2458 2.01094 12.7791C2.01011 12.7731 2.00929 12.7671 2.00929 12.7611C2.00598 12.7176 2.00268 12.674 2.00186 12.629C1.99278 12.3739 2.0291 12.1143 2.10422 11.8562C2.12321 11.7887 2.1455 11.7227 2.16944 11.6566C2.26685 11.391 2.40553 11.1299 2.57641 10.8778C2.61026 10.8283 2.64493 10.7788 2.68125 10.7323C2.84883 10.5072 3.04365 10.2941 3.26158 10.096C3.31772 10.0435 3.3755 9.99247 3.43576 9.94295C3.94675 9.51828 4.56506 9.17314 5.2428 8.96606C5.99236 8.73796 6.70313 8.71245 7.29997 8.85351C7.3594 8.86852 7.41802 8.88502 7.4758 8.90303C7.65741 8.95705 7.82747 9.03058 7.98184 9.11912C8.04045 9.15213 8.09741 9.18814 8.15189 9.22566C8.16345 9.23316 8.17418 9.23916 8.18574 9.24667C8.35249 9.34121 8.52915 9.36071 8.70003 9.29319C8.70003 9.29319 16.9724 6.04889 16.9832 6.04589C17.036 6.02938 17.0888 6.01588 17.14 6.00987C17.2771 5.98736 17.405 5.99787 17.5181 6.03388C17.5544 6.04589 17.5899 6.05939 17.6229 6.0759C17.9276 6.22746 18.0695 6.5846 17.8549 6.98526Z",fill:"#303F9F"}),(0,qt.jsx)("path",{d:"M8.19699 11.7816C8.08555 12.0742 7.91962 12.3608 7.70746 12.6265C7.6505 12.6985 7.59107 12.769 7.52833 12.8365C7.02724 13.3813 6.33547 13.8164 5.55619 13.9995C5.23424 14.0745 4.91972 14.1196 4.61924 14.1346C3.99598 14.1616 3.43959 14.0565 3.02436 13.8089C2.62233 13.5703 2.35404 13.1982 2.29048 12.6925C2.21453 12.0967 2.55547 11.2804 3.21918 10.5916C3.69714 10.0949 4.34104 9.66577 5.11867 9.42868C5.93179 9.17958 6.67475 9.18558 7.24353 9.39866C7.2782 9.41067 7.31204 9.42568 7.34589 9.43918C7.37066 9.44969 7.3946 9.46019 7.41854 9.47219C7.47797 9.50071 7.53411 9.53072 7.58859 9.56523C8.02033 9.83084 8.29688 10.254 8.34723 10.7972C8.37695 11.1199 8.32082 11.4545 8.19616 11.7816H8.19699Z",fill:"#303F9F"}),(0,qt.jsx)("path",{d:"M7.34674 9.43723C7.33931 9.52876 7.33106 9.6188 7.3195 9.71034C7.29556 9.90842 7.26172 10.102 7.21631 10.2896C7.05947 10.9408 6.77549 11.4615 6.47913 11.9267C5.91696 12.8091 5.28958 13.5519 4.62009 14.1326C4.54497 14.1356 4.47067 14.1386 4.3972 14.1356C4.3518 14.1356 4.3064 14.1356 4.26099 14.1341C3.81192 14.1146 3.40824 14.0186 3.08465 13.8415C3.03759 13.816 2.99219 13.789 2.94926 13.7605C2.8469 13.6929 2.75444 13.6149 2.67272 13.5264C2.60585 13.4543 2.54724 13.3778 2.49606 13.2938C2.47707 13.2638 2.45974 13.2322 2.44323 13.1992C2.42011 13.1542 2.39947 13.1062 2.38049 13.0567C2.33756 12.9441 2.30784 12.8226 2.29051 12.6905C2.29051 12.6875 2.29051 12.686 2.29051 12.683C2.26739 12.4955 2.28555 12.2839 2.34334 12.0618C2.36067 11.9943 2.38214 11.9252 2.4069 11.8547C2.49606 11.6026 2.63309 11.3415 2.8114 11.0849C2.84442 11.0369 2.87992 10.9888 2.91624 10.9408C3.00787 10.8223 3.10858 10.7037 3.2192 10.5897C3.69717 10.093 4.34107 9.66382 5.1187 9.42672C5.93182 9.17762 6.67478 9.18363 7.24356 9.39671C7.27823 9.40872 7.31207 9.42372 7.34592 9.43723H7.34674Z",fill:"#F9F9F9"}),(0,qt.jsx)("path",{d:"M17.2407 8.04297C17.1978 8.06098 17.1524 8.08048 17.1045 8.10149C17.1582 7.79087 17.1804 7.45173 17.1903 7.16962C17.1945 7.05407 17.1961 6.94603 17.1912 6.84099L17.3133 6.79297C17.3299 7.16062 17.3084 7.6228 17.2399 8.04297H17.2407Z",fill:"#303F9F"}),(0,qt.jsx)("path",{d:"M17.6558 7.48113C17.65 7.62068 17.6368 7.74823 17.6178 7.86378C17.5865 7.88779 17.5543 7.9058 17.5212 7.9208L17.5039 7.92831C17.5485 7.69571 17.5526 7.43611 17.5576 7.18851C17.5617 7.02495 17.5617 6.85988 17.5576 6.69481L17.6591 6.6543C17.669 6.92891 17.6682 7.20502 17.6558 7.48113Z",fill:"#303F9F"}),(0,qt.jsx)("path",{d:"M16.666 7.6121C16.5446 7.81018 16.368 7.8657 16.2318 8.02327C16.0914 8.18383 15.961 8.39391 15.8553 8.63551C15.7959 8.66102 15.7365 8.68503 15.6746 8.71204C15.7819 8.39842 15.9412 8.13131 16.1005 7.92123C16.2805 7.68263 16.7097 7.56858 16.6676 7.04788L16.7758 7.00586C16.7981 7.22495 16.7626 7.45604 16.666 7.6136V7.6121Z",fill:"#303F9F"}),(0,qt.jsx)("path",{d:"M15.8225 7.38281C15.8175 7.69644 15.6747 7.96805 15.5509 8.15562C15.4139 8.3627 15.2248 8.63581 15.1134 8.95094C15.0638 8.97195 15.0135 8.99446 14.9631 9.01547C15.0399 8.73185 15.158 8.46775 15.2463 8.32969C15.3751 8.12861 15.6599 7.75496 15.711 7.42633L15.8217 7.38281H15.8225Z",fill:"#303F9F"}),(0,qt.jsx)("path",{d:"M14.6674 7.83984C14.6038 7.9779 14.5535 8.12196 14.5362 8.19399C14.4924 8.38156 14.4676 8.58264 14.4387 8.78072C14.4156 8.94429 14.3933 9.10635 14.3719 9.27142L14.2134 9.33894C14.2695 8.9818 14.3405 8.63216 14.3958 8.32604C14.4231 8.17898 14.4561 8.03642 14.4965 7.90737L14.6666 7.83984H14.6674Z",fill:"#303F9F"}),(0,qt.jsx)("path",{d:"M15.2379 7.61328C15.2396 7.6688 15.233 7.73633 15.2173 7.81136C15.105 8.36358 14.8112 8.62469 14.7063 9.12739C14.67 9.14389 14.6329 9.1589 14.5957 9.17391C14.6172 8.98333 14.665 8.80476 14.7385 8.62168C14.8425 8.35908 15.1232 8.00794 15.0662 7.68381L15.2379 7.61478V7.61328Z",fill:"#303F9F"}),(0,qt.jsx)("path",{d:"M14.1227 8.05664C14.0732 8.39428 14.0352 8.74542 13.9832 9.10706C13.9659 9.23011 13.9469 9.35016 13.9263 9.4627L13.8181 9.50772C13.8866 9.14458 13.9304 8.76042 13.9766 8.38827C13.989 8.29223 14.0006 8.1962 14.0146 8.10016L14.1227 8.05664Z",fill:"#303F9F"}),(0,qt.jsx)("path",{d:"M13.2799 9.73943C13.2105 9.76944 13.142 9.79795 13.0735 9.82647C13.2171 9.58637 13.3476 9.31926 13.4664 9.04165C13.5622 8.81806 13.6695 8.46692 13.6249 8.25234L13.7677 8.19531C13.8643 8.64099 13.5911 9.24423 13.2807 9.73943H13.2799Z",fill:"#303F9F"}),(0,qt.jsx)("path",{d:"M12.5865 10.0389C12.4891 10.0809 12.3917 10.123 12.2968 10.1635C12.4033 9.9924 12.5106 9.82133 12.6022 9.62626C12.6501 9.52121 12.7351 9.37566 12.7566 9.2376C12.7946 8.996 12.75 8.94498 12.6526 8.88646C12.5444 8.82194 12.3802 8.88496 12.2654 8.87296C12.2159 8.86845 12.168 8.86095 12.1201 8.85045L12.5717 8.67188C12.6922 8.67488 12.8061 8.70789 12.8647 8.83694C12.9943 9.12206 12.8144 9.59925 12.5874 10.0389H12.5865Z",fill:"#303F9F"}),(0,qt.jsx)("path",{d:"M11.7682 10.3913C11.6997 10.4198 11.6328 10.4498 11.5668 10.4783C11.6395 10.2833 11.7129 10.0897 11.7525 9.86008C11.8797 9.12028 11.3902 9.31086 11.1408 9.23883C11.1392 9.23883 11.1375 9.23883 11.1367 9.23733L11.5544 9.07227C11.6683 9.07977 11.7781 9.12179 11.8475 9.28685C11.9606 9.55846 11.8855 10.0086 11.7691 10.3913H11.7682Z",fill:"#303F9F"}),(0,qt.jsx)("path",{d:"M10.8042 10.808H10.8034C10.7415 10.8366 10.6812 10.8621 10.6243 10.8891C10.654 10.8216 10.6895 10.7435 10.725 10.661C10.829 10.4209 10.8744 10.1118 10.8505 9.80865L10.8306 9.55355C10.7828 9.51303 10.6754 9.426 10.6697 9.42149L10.8381 9.35547C10.9355 9.44701 11.0172 9.58056 11.0387 9.79214C11.0742 10.1553 10.8967 10.5274 10.8034 10.8065L10.8042 10.808Z",fill:"#303F9F"}),(0,qt.jsx)("path",{d:"M10.2692 11.0442C10.2222 11.0652 10.1784 11.0862 10.1388 11.1027C10.1908 10.9272 10.2238 10.7366 10.2271 10.549C10.2428 9.73118 9.75908 9.99379 9.47676 9.90225C9.47428 9.90225 9.47098 9.90075 9.46851 9.89925L9.96959 9.70117C10.1223 9.75369 10.2552 9.88875 10.3122 10.1664C10.37 10.447 10.3452 10.7621 10.2701 11.0442H10.2692Z",fill:"#303F9F"}),(0,qt.jsx)("path",{d:"M9.38589 11.487C9.39166 11.1373 9.34461 10.453 9.19932 10.0059L9.02514 10.0749C9.04743 10.1289 9.06724 10.1844 9.08375 10.246C9.22491 10.6691 9.26371 11.1463 9.24637 11.6355C9.23482 11.9251 9.20675 12.2207 9.16465 12.5119C9.20675 12.3783 9.24555 12.2388 9.28187 12.0962C9.30416 12.0077 9.33388 11.9161 9.37103 11.8261C9.37846 11.7135 9.38341 11.601 9.38506 11.4885L9.38589 11.487ZM8.81298 10.2985C8.79565 10.252 8.78492 10.2099 8.77996 10.1709L8.6355 10.2279C8.68255 10.6421 8.81711 11.0443 8.84765 11.4689C8.89636 12.1457 8.82124 12.8375 8.7684 13.5113C8.82371 13.4002 8.8782 13.2817 8.92855 13.1586C8.98882 12.3213 9.04412 11.5365 8.89471 10.6991C8.87159 10.5686 8.82454 10.4305 8.81298 10.2985Z",fill:"#303F9F"}),(0,qt.jsx)("path",{d:"M8.47455 12.0772C8.39035 12.9085 8.26074 13.7248 8.08739 14.5081C8.08161 14.5321 8.07748 14.5546 8.07253 14.5787C8.00979 14.6537 7.94623 14.7227 7.88184 14.7902C7.8967 14.7242 7.91155 14.6582 7.92724 14.5937C8.09482 13.8884 8.22772 13.1666 8.32018 12.4163C8.3986 11.786 8.51005 10.9817 8.42419 10.3125L8.52491 10.2734C8.60003 10.8572 8.53151 11.5039 8.47455 12.0787V12.0772Z",fill:"#303F9F"}),(0,qt.jsx)("path",{d:"M7.77123 11.7813C7.74481 12.7432 7.58301 13.5805 7.27675 14.3624C7.11825 14.7675 6.95975 15.2237 6.76906 15.6139C6.7055 15.6454 6.64193 15.6754 6.57837 15.7024C6.82272 15.2447 7.01176 14.649 7.19502 14.1388C7.46001 13.4005 7.602 12.6442 7.62511 11.7633C7.63667 11.3762 7.62099 11.007 7.58797 10.6454L7.7283 10.5898C7.76545 10.974 7.78279 11.3687 7.77123 11.7813Z",fill:"#303F9F"}),(0,qt.jsx)("path",{d:"M5.6795 15.8336C5.59035 15.8906 5.49954 15.9446 5.40873 15.9926C5.25354 16.0046 5.1099 16.0031 4.98195 15.9926C4.90435 15.9866 4.8284 15.9776 4.75411 15.9671C4.96956 15.9056 5.1842 15.8171 5.39883 15.7135C5.71087 15.5635 6.48932 15.0352 6.16242 14.2159C5.98907 13.7837 5.66959 13.6757 5.43102 13.4101C5.07275 13.0139 4.86142 12.3642 4.61377 11.7744L4.72686 11.7324C4.83583 11.971 4.94232 12.2156 5.05707 12.4422C5.20483 12.7378 5.35673 13.0319 5.55072 13.2285C5.72243 13.4041 5.91064 13.5046 6.07327 13.7132C6.68662 14.4965 6.22764 15.4824 5.68033 15.8336H5.6795Z",fill:"#303F9F"}),(0,qt.jsx)("path",{d:"M3.90032 15.0882C3.70963 15.1947 3.50325 15.3013 3.29192 15.3883C3.19947 15.3178 3.11279 15.2442 3.03271 15.1662C3.20442 15.1152 3.37695 15.0552 3.55113 14.9876C3.71293 14.9261 3.89042 14.8781 4.03571 14.7355C4.33124 14.4474 4.29161 13.9717 4.17687 13.484C4.05634 12.9693 3.86813 12.5237 3.64854 12.1395L3.79466 12.084C4.05387 12.5567 4.27923 13.1239 4.37169 13.7677C4.47488 14.4819 4.2652 14.8826 3.90032 15.0882Z",fill:"#303F9F"}),(0,qt.jsx)("path",{d:"M2.79755 14.9078C2.75792 14.8613 2.72077 14.8118 2.6861 14.7623C2.87267 14.4937 2.99732 14.15 2.94366 13.6864C2.90899 13.3817 2.78021 13.1461 2.70014 12.8805C2.66464 12.762 2.63575 12.6479 2.60107 12.5384L2.74471 12.4844C2.81571 12.6975 2.87762 12.9301 2.94614 13.1356C3.01796 13.3502 3.07409 13.5348 3.084 13.7914C3.09968 14.2236 2.97751 14.6032 2.79672 14.9093L2.79755 14.9078Z",fill:"#303F9F"}),(0,qt.jsx)("path",{d:"M2.59199 14.6233C2.54989 14.5587 2.51109 14.4912 2.4756 14.4252C2.51852 14.2736 2.54742 14.104 2.5565 13.906C2.57301 13.5293 2.45578 13.1136 2.28078 12.9051C2.1908 12.797 2.09916 12.7625 2.01001 12.782C2.01001 12.7685 2.01001 12.764 2.01001 12.764L2.26262 12.668C2.44093 12.773 2.59199 13.0521 2.66794 13.4888C2.72407 13.8129 2.68858 14.2421 2.59282 14.6248L2.59199 14.6233Z",fill:"#303F9F"}),(0,qt.jsx)("path",{d:"M4.39723 14.1362C4.35183 14.1362 4.30643 14.1362 4.26102 14.1347C4.26598 13.9321 4.22883 13.71 4.176 13.4849C4.00512 12.7556 3.69968 12.1659 3.35874 11.6842C3.18704 11.4411 3.00377 11.264 2.81226 11.0855C2.84528 11.0374 2.88077 10.9894 2.9171 10.9414C3.16145 11.162 3.38764 11.4231 3.59731 11.7517C3.93495 12.2814 4.25524 12.9657 4.37082 13.767C4.3898 13.9006 4.39888 14.0251 4.39723 14.1362Z",fill:"#F9F9F9"}),(0,qt.jsx)("path",{d:"M3.08539 13.8427C3.03834 13.8172 2.99294 13.7902 2.95001 13.7617C2.94836 13.7377 2.94588 13.7122 2.94341 13.6867C2.90873 13.382 2.77996 13.1464 2.69988 12.8808C2.62806 12.6422 2.58266 12.4141 2.46709 12.2296C2.42829 12.168 2.38701 12.1125 2.34326 12.0645C2.3606 11.997 2.38206 11.928 2.40683 11.8574C2.49763 11.9535 2.57936 12.072 2.64622 12.2221C2.7651 12.4907 2.84765 12.8403 2.94588 13.1359C3.0177 13.3505 3.07384 13.5351 3.08374 13.7917C3.08374 13.8097 3.08457 13.8262 3.08457 13.8442L3.08539 13.8427Z",fill:"#F9F9F9"}),(0,qt.jsx)("path",{d:"M2.67274 13.5269C2.60587 13.4549 2.54726 13.3784 2.49608 13.2943C2.47709 13.2643 2.45976 13.2328 2.44325 13.1998C2.42509 13.1488 2.40362 13.1008 2.38051 13.0572C2.33758 12.9447 2.30786 12.8231 2.29053 12.6911C2.29053 12.6881 2.29053 12.6866 2.29053 12.6836C2.45563 12.8021 2.59431 13.0737 2.66696 13.4864C2.66861 13.4999 2.67109 13.5119 2.67274 13.5269Z",fill:"#F9F9F9"}),(0,qt.jsx)("path",{d:"M8.19681 11.7817C7.81708 12.7766 6.79675 13.707 5.55601 13.9996C5.23406 14.0746 4.91954 14.1196 4.61906 14.1346C3.87445 14.1691 3.22395 14.0086 2.79881 13.6469C2.67911 13.5449 2.57675 13.4294 2.49585 13.2943C2.53465 13.0797 2.58831 12.8351 2.59656 12.7736C2.66425 12.2574 2.80376 11.7727 2.99776 11.3765C3.0704 11.228 3.15295 11.0854 3.1901 10.8978C3.20991 10.7988 3.21487 10.6953 3.22065 10.5902C3.2256 10.4912 3.23055 10.3936 3.24624 10.2991C3.35355 9.64334 3.90829 9.48728 3.98919 8.81951C4.01231 8.62743 3.98919 8.42035 4.01809 8.23127C4.07505 7.84862 4.326 7.65504 4.54311 7.69706C4.76022 7.73908 4.95339 7.95216 5.14821 8.13523C5.26543 8.24628 5.38513 8.34682 5.51473 8.39634C5.6237 8.43986 5.73597 8.44286 5.84741 8.44736C6.0282 8.45336 6.18835 8.34832 6.35923 8.2988C6.41701 8.28229 6.47562 8.27029 6.53754 8.27179C6.81656 8.28229 7.2062 8.83001 7.31599 9.2967C7.32672 9.34172 7.39772 9.64484 7.42331 9.74988C7.55126 10.2721 7.59419 10.7448 7.7791 11.0599C7.95824 11.3645 8.16049 11.4801 8.19846 11.7802L8.19681 11.7817Z",fill:"#E3E5EA"}),(0,qt.jsx)("path",{d:"M6.76061 10.2892C6.73585 10.3417 6.69209 10.3462 6.65577 10.3717C6.55423 10.4468 6.54433 10.6583 6.55671 10.8744C6.56166 10.9615 6.57074 11.05 6.57817 11.1295C6.58891 11.2376 6.59221 11.3486 6.58891 11.4567C6.5823 11.7613 6.52699 12.0629 6.43288 12.315C6.38996 12.429 6.33878 12.5356 6.28099 12.6256C6.25127 12.6421 6.2199 12.6541 6.18936 12.6646C5.98051 12.7367 5.7601 12.6992 5.56197 12.5626C5.45548 12.4891 5.34074 12.5266 5.24745 12.6451C5.20618 12.6977 5.15335 12.7322 5.10382 12.7382C4.98494 12.7517 4.86359 12.6766 4.7472 12.7187C4.68116 12.7427 4.62255 12.8027 4.56558 12.8687C4.52761 12.9122 4.49129 12.9603 4.45414 13.0038C4.42855 13.0338 4.40213 13.0608 4.37489 13.0863C4.14375 13.3099 3.87876 13.3969 3.61708 13.466C3.60469 13.469 3.42638 13.514 3.34879 13.5305C3.1647 13.574 2.98061 13.6115 2.79735 13.643C2.67765 13.541 2.57528 13.4254 2.49438 13.2904C2.53318 13.0758 2.58684 12.8312 2.5951 12.7697C2.66279 12.2535 2.8023 11.7688 2.99629 11.3726C3.06894 11.2241 3.15149 11.0815 3.18864 10.8939C3.20845 10.7949 3.2134 10.6914 3.21918 10.5863C3.22413 10.4873 3.22909 10.3897 3.24477 10.2952C3.35209 9.63943 3.90683 9.48337 3.98773 8.8156C4.01084 8.62353 3.98773 8.41644 4.01662 8.22737C4.07358 7.84471 4.32454 7.65114 4.54165 7.69315C4.75875 7.73517 4.95192 7.94826 5.14674 8.13133C5.26396 8.24237 5.38366 8.34291 5.51327 8.39243C5.62224 8.43595 5.7345 8.43895 5.84595 8.44345C6.02673 8.44946 6.18688 8.34441 6.35776 8.29489C6.44362 8.36242 6.52452 8.43145 6.57735 8.559C6.70778 8.87563 6.72181 9.68595 6.77052 10.0761C6.7796 10.1466 6.7862 10.2307 6.76061 10.2862V10.2892Z",fill:"#E3E5EA"}),(0,qt.jsx)("path",{d:"M5.64771 9.89594C5.56681 10.2066 5.31916 10.4046 5.24981 10.7573C5.2267 10.8728 5.22587 11.0004 5.20111 11.1144C5.17634 11.2285 5.1136 11.335 5.04756 11.3065C4.97492 11.2765 4.94933 11.1159 4.90227 11.0109C4.83871 10.8668 4.72974 10.8173 4.62738 10.8143C4.43751 10.8083 4.24847 10.9389 4.10566 11.1655C4.07924 11.206 4.05448 11.251 4.03136 11.299C4.00825 11.347 3.98679 11.3995 3.96615 11.4521C3.95459 11.4821 3.88277 11.6697 3.85883 11.7327C3.69621 12.1589 3.32886 12.8851 3.03993 12.3089C2.81539 11.8617 3.13404 11.9533 3.23145 11.6096C3.24961 11.5451 3.26034 11.4656 3.25786 11.3635C3.25621 11.293 3.25456 11.2195 3.25621 11.1474C3.25869 10.9929 3.2752 10.8458 3.34206 10.7618C3.37756 10.7168 3.42214 10.6988 3.46094 10.6613C3.64585 10.4827 3.63099 9.93796 3.81095 9.74288C3.87947 9.66935 3.96697 9.66185 4.03549 9.58382C4.0941 9.51929 4.13125 9.41125 4.16014 9.29721C4.17418 9.24318 4.18656 9.18616 4.19729 9.13064C4.21132 9.06311 4.33928 8.44036 4.38881 8.19727C4.66866 8.21377 4.94272 8.45387 5.12516 8.84252C5.20606 8.67446 5.36291 8.70747 5.45702 8.85153C5.54865 8.99108 5.5924 9.20567 5.63615 9.40975C5.63698 9.41425 5.63863 9.41875 5.63945 9.42476C5.65596 9.50279 5.67165 9.58532 5.67495 9.67085C5.67743 9.75339 5.66752 9.82692 5.64936 9.89594H5.64771Z",fill:"#E3E5EA"}),(0,qt.jsx)("path",{d:"M6.22578 11.2106C6.19111 11.2662 6.14819 11.3037 6.11682 11.3667C6.04087 11.5168 6.05573 11.7523 6.01363 11.9414C6.00455 11.9819 5.99134 12.024 5.96988 12.045C5.95254 12.063 5.93273 12.0645 5.91292 12.066C5.79487 12.069 5.67187 12.0059 5.59014 11.8514C5.58436 11.8409 5.57859 11.8289 5.57446 11.8169C5.50924 11.6683 5.48778 11.4507 5.53896 11.2887C5.53896 11.2857 5.53896 11.2812 5.53896 11.2782C5.52575 11.1356 5.57528 10.978 5.64463 10.897C5.72965 10.798 5.83532 10.783 5.93603 10.7695C5.89806 10.5894 5.94263 10.3643 6.03427 10.2698C6.12672 10.1737 6.2555 10.2172 6.32237 10.3673C6.34136 10.6644 6.35044 11.0141 6.22661 11.2121L6.22578 11.2106Z",fill:"#E3E5EA"}),(0,qt.jsx)("path",{d:"M5.60161 13.1608C5.44807 13.1413 5.43073 13.5765 5.5851 13.596C5.73864 13.6155 5.75598 13.1803 5.60161 13.1608Z",fill:"#E3E5EA"}),(0,qt.jsx)("path",{d:"M6.38813 12.2999C6.14378 12.2684 6.11653 12.9586 6.36088 12.9902C6.60523 13.0217 6.63248 12.3314 6.38813 12.2999Z",fill:"#E3E5EA"}),(0,qt.jsx)("path",{d:"M7.19559 12.1491C7.0437 12.1296 7.02636 12.5587 7.17908 12.5783C7.33097 12.5978 7.34831 12.1686 7.19559 12.1491Z",fill:"#E3E5EA"}),(0,qt.jsx)("path",{d:"M6.72183 11.0416C6.72183 11.0416 6.72018 11.0341 6.71935 11.0296C6.6822 10.839 6.50224 10.8165 6.45106 10.995C6.45023 10.9995 6.44858 11.0025 6.44776 11.007C6.42052 11.1016 6.40896 11.1961 6.4362 11.2982C6.46097 11.3897 6.51215 11.4512 6.56746 11.4587C6.62359 11.4662 6.6789 11.4182 6.71027 11.3342C6.74577 11.2411 6.74081 11.1436 6.72183 11.0431V11.0416Z",fill:"#E3E5EA"}),(0,qt.jsx)("path",{d:"M7.10315 10.3228C6.97438 10.3063 6.96034 10.6709 7.08912 10.6875C7.2179 10.704 7.23276 10.3393 7.10315 10.3228Z",fill:"#E3E5EA"}),(0,qt.jsx)("path",{d:"M6.43112 9.07867C6.30234 9.06216 6.28748 9.42681 6.41708 9.44331C6.54586 9.45982 6.56072 9.09518 6.43112 9.07867Z",fill:"#E3E5EA"}),(0,qt.jsx)("path",{d:"M5.73783 11.4107C5.71389 11.3222 5.66436 11.2622 5.6107 11.2547C5.55621 11.2472 5.50338 11.2952 5.47201 11.3762C5.43899 11.4633 5.43982 11.5638 5.46128 11.6583C5.46211 11.6628 5.46293 11.6658 5.46376 11.6703C5.50586 11.8549 5.66766 11.8759 5.72297 11.7034C5.72379 11.7004 5.72544 11.6959 5.72627 11.6928C5.75516 11.6043 5.76259 11.5053 5.737 11.4107H5.73783Z",fill:"#E3E5EA"}),(0,qt.jsx)("path",{d:"M4.63818 11.8268C4.54655 11.8148 4.49371 11.9843 4.52674 12.1284L4.52921 12.1404C4.56058 12.277 4.68028 12.292 4.72156 12.1644C4.72238 12.1614 4.72403 12.1569 4.72486 12.1539C4.76861 12.0189 4.72898 11.8373 4.63735 11.8268H4.63818Z",fill:"#E3E5EA"}),(0,qt.jsx)("path",{d:"M4.48221 10.2853C4.42855 10.3469 4.3881 10.4444 4.40461 10.5674C4.41452 10.644 4.44919 10.71 4.49047 10.7385C4.57054 10.8075 4.6729 10.683 4.67951 10.5254C4.68611 10.3529 4.57302 10.1818 4.48304 10.2853H4.48221Z",fill:"#E3E5EA"}),(0,qt.jsx)("path",{d:"M3.91248 12.3894C3.7449 12.3683 3.72674 12.841 3.89432 12.862C4.06189 12.883 4.08005 12.4104 3.91248 12.3894Z",fill:"#E3E5EA"}),(0,qt.jsx)("path",{d:"M3.11427 12.7211C3.0507 12.7136 2.98631 12.8067 2.98466 12.9252C2.98301 13.0453 3.02924 13.1518 3.09693 13.1608C3.1605 13.1683 3.22488 13.0753 3.22654 12.9567C3.22819 12.8367 3.18196 12.7301 3.11427 12.7211Z",fill:"#E3E5EA"}),(0,qt.jsx)("path",{d:"M4.1545 13.3407C3.94317 13.3137 3.91923 13.911 4.13138 13.938C4.34271 13.965 4.36665 13.3677 4.1545 13.3407Z",fill:"#E3E5EA"}),(0,qt.jsx)("path",{d:"M4.06194 11.1451C3.92325 11.1271 3.90839 11.5188 4.04708 11.5368C4.18576 11.5548 4.20062 11.1631 4.06194 11.1451Z",fill:"#E3E5EA"}),(0,qt.jsx)("path",{d:"M4.83963 8.7526C4.68774 8.73309 4.6704 9.16226 4.82312 9.18177C4.97502 9.20128 4.99235 8.77211 4.83963 8.7526Z",fill:"#E3E5EA"}),(0,qt.jsx)("path",{d:"M5.69649 9.49115C5.69649 9.49115 5.69402 9.48515 5.69319 9.48365C5.61394 9.30808 5.43893 9.40862 5.43563 9.63971C5.43398 9.73275 5.45627 9.82579 5.4992 9.87831C5.55203 9.94283 5.63045 9.93983 5.67833 9.8588C5.67998 9.8558 5.68081 9.8543 5.68246 9.8513C5.73942 9.75526 5.74602 9.5992 5.69649 9.48965V9.49115Z",fill:"#E3E5EA"}),(0,qt.jsx)("path",{d:"M3.38501 11.1757C3.3396 11.1187 3.2909 11.1247 3.24137 11.1577C3.23889 11.1577 3.23724 11.1607 3.23476 11.1622C3.14066 11.2253 3.12992 11.5134 3.21825 11.5989C3.22073 11.6004 3.22238 11.6034 3.22486 11.6049C3.27109 11.6499 3.31897 11.6679 3.3685 11.6229C3.4139 11.5824 3.44444 11.4999 3.44775 11.4083C3.45105 11.3168 3.42711 11.2283 3.38583 11.1757H3.38501Z",fill:"#E3E5EA"}),(0,qt.jsx)("path",{d:"M4.27659 8.9245C4.10736 8.90349 4.08837 9.38068 4.25842 9.40319C4.42765 9.4242 4.44664 8.94701 4.27659 8.9245Z",fill:"#E3E5EA"}),(0,qt.jsx)("path",{d:"M5.24572 12.2017C5.11859 12.1852 5.10456 12.5439 5.23169 12.5604C5.35881 12.5769 5.37285 12.2182 5.24572 12.2017Z",fill:"#E3E5EA"}),(0,qt.jsx)("path",{d:"M6.43445 12.3163C6.39152 12.4304 6.34034 12.5369 6.28256 12.6269C6.25284 12.6434 6.22147 12.6554 6.19092 12.666C6.18597 12.4784 6.25449 12.2833 6.3874 12.2998C6.40391 12.3013 6.41959 12.3073 6.43362 12.3163H6.43445Z",fill:"#E3E5EA"}),(0,qt.jsx)("path",{d:"M6.58974 11.4587C6.58232 11.4587 6.57489 11.4587 6.56746 11.4587C6.51215 11.4512 6.46097 11.3897 6.4362 11.2982C6.40896 11.1961 6.42052 11.1016 6.44776 11.0071C6.44941 11.0026 6.44941 10.9995 6.45106 10.995C6.47087 10.923 6.51297 10.8825 6.55755 10.875C6.5625 10.962 6.57158 11.0506 6.57901 11.1301C6.58975 11.2381 6.59305 11.3492 6.58974 11.4572V11.4587Z",fill:"#E3E5EA"}),(0,qt.jsx)("path",{d:"M6.43112 9.07867C6.30234 9.06216 6.28748 9.42681 6.41708 9.44331C6.54586 9.45982 6.56072 9.09518 6.43112 9.07867Z",fill:"#E3E5EA"}),(0,qt.jsx)("path",{d:"M5.73783 11.4107C5.71389 11.3222 5.66436 11.2622 5.6107 11.2547C5.55621 11.2472 5.50338 11.2952 5.47201 11.3762C5.43899 11.4633 5.43982 11.5638 5.46128 11.6583C5.46211 11.6628 5.46293 11.6658 5.46376 11.6703C5.50586 11.8549 5.66766 11.8759 5.72297 11.7034C5.72379 11.7004 5.72544 11.6959 5.72627 11.6928C5.75516 11.6043 5.76259 11.5053 5.737 11.4107H5.73783Z",fill:"#E3E5EA"}),(0,qt.jsx)("path",{d:"M4.63818 11.8268C4.54655 11.8148 4.49371 11.9843 4.52674 12.1284L4.52921 12.1404C4.56058 12.277 4.68028 12.292 4.72156 12.1644C4.72238 12.1614 4.72403 12.1569 4.72486 12.1539C4.76861 12.0189 4.72898 11.8373 4.63735 11.8268H4.63818Z",fill:"#E3E5EA"}),(0,qt.jsx)("path",{d:"M4.48221 10.2853C4.42855 10.3469 4.3881 10.4444 4.40461 10.5674C4.41452 10.644 4.44919 10.71 4.49047 10.7385C4.57054 10.8075 4.6729 10.683 4.67951 10.5254C4.68611 10.3529 4.57302 10.1818 4.48304 10.2853H4.48221Z",fill:"#E3E5EA"}),(0,qt.jsx)("path",{d:"M3.91248 12.3894C3.7449 12.3683 3.72674 12.841 3.89432 12.862C4.06189 12.883 4.08005 12.4104 3.91248 12.3894Z",fill:"#E3E5EA"}),(0,qt.jsx)("path",{d:"M3.11427 12.7211C3.0507 12.7136 2.98631 12.8067 2.98466 12.9252C2.98301 13.0453 3.02924 13.1518 3.09693 13.1608C3.1605 13.1683 3.22488 13.0753 3.22654 12.9567C3.22819 12.8367 3.18196 12.7301 3.11427 12.7211Z",fill:"#E3E5EA"}),(0,qt.jsx)("path",{d:"M4.06194 11.1451C3.92325 11.1271 3.90839 11.5188 4.04708 11.5368C4.18576 11.5548 4.20062 11.1631 4.06194 11.1451Z",fill:"#E3E5EA"}),(0,qt.jsx)("path",{d:"M4.83963 8.7526C4.68774 8.73309 4.6704 9.16226 4.82312 9.18177C4.97502 9.20128 4.99235 8.77211 4.83963 8.7526Z",fill:"#E3E5EA"}),(0,qt.jsx)("path",{d:"M5.69649 9.49115C5.69649 9.49115 5.69402 9.48515 5.69319 9.48365C5.61394 9.30808 5.43893 9.40862 5.43563 9.63971C5.43398 9.73275 5.45627 9.82579 5.4992 9.87831C5.55203 9.94283 5.63045 9.93983 5.67833 9.8588C5.67998 9.8558 5.68081 9.8543 5.68246 9.8513C5.73942 9.75526 5.74602 9.5992 5.69649 9.48965V9.49115Z",fill:"#E3E5EA"}),(0,qt.jsx)("path",{d:"M3.38501 11.1757C3.3396 11.1187 3.2909 11.1247 3.24137 11.1577C3.23889 11.1577 3.23724 11.1607 3.23476 11.1622C3.14066 11.2253 3.12992 11.5134 3.21825 11.5989C3.22073 11.6004 3.22238 11.6034 3.22486 11.6049C3.27109 11.6499 3.31897 11.6679 3.3685 11.6229C3.4139 11.5824 3.44444 11.4999 3.44775 11.4083C3.45105 11.3168 3.42711 11.2283 3.38583 11.1757H3.38501Z",fill:"#E3E5EA"}),(0,qt.jsx)("path",{d:"M4.27659 8.9245C4.10736 8.90349 4.08837 9.38068 4.25842 9.40319C4.42765 9.4242 4.44664 8.94701 4.27659 8.9245Z",fill:"#E3E5EA"}),(0,qt.jsx)("path",{d:"M5.24572 12.2017C5.11859 12.1852 5.10456 12.5439 5.23169 12.5604C5.35881 12.5769 5.37285 12.2182 5.24572 12.2017Z",fill:"#E3E5EA"}),(0,qt.jsx)("path",{d:"M5.72605 11.6928C5.72605 11.6928 5.72357 11.7003 5.72275 11.7033C5.6922 11.7979 5.62946 11.8339 5.5725 11.8174C5.50729 11.6688 5.48583 11.4512 5.53701 11.2892C5.53701 11.2862 5.53701 11.2817 5.53701 11.2787C5.53866 11.2787 5.54031 11.2757 5.54196 11.2742C5.54361 11.2742 5.54444 11.2727 5.54691 11.2712C5.56673 11.2577 5.58819 11.2517 5.60965 11.2547C5.66414 11.2622 5.71284 11.3207 5.73678 11.4107C5.76237 11.5053 5.75494 11.6058 5.72605 11.6928Z",fill:"#E3E5EA"}),(0,qt.jsx)("path",{d:"M4.48221 10.2853C4.42855 10.3469 4.3881 10.4444 4.40461 10.5674C4.41452 10.644 4.44919 10.71 4.49047 10.7385C4.57054 10.8075 4.6729 10.683 4.67951 10.5254C4.68611 10.3529 4.57302 10.1818 4.48304 10.2853H4.48221Z",fill:"#E3E5EA"}),(0,qt.jsx)("path",{d:"M4.10658 11.1676C4.08016 11.2081 4.0554 11.2531 4.03229 11.3011C4.00917 11.3491 3.98771 11.4016 3.96707 11.4542C3.92579 11.3356 3.96129 11.133 4.062 11.145C4.07934 11.1465 4.0942 11.1555 4.10658 11.1676Z",fill:"#E3E5EA"}),(0,qt.jsx)("path",{d:"M4.83963 8.7526C4.68774 8.73309 4.6704 9.16226 4.82312 9.18177C4.97502 9.20128 4.99235 8.77211 4.83963 8.7526Z",fill:"#E3E5EA"}),(0,qt.jsx)("path",{d:"M5.64779 9.89699C5.60156 9.94051 5.5413 9.93301 5.4992 9.87898C5.45545 9.82496 5.43398 9.73343 5.43564 9.64039C5.43811 9.45732 5.54956 9.35528 5.63458 9.4123C5.63541 9.4168 5.63706 9.4213 5.63788 9.4273C5.6544 9.50534 5.67008 9.58787 5.67338 9.6734C5.67586 9.75594 5.66595 9.82946 5.64779 9.89849V9.89699Z",fill:"#E3E5EA"}),(0,qt.jsx)("path",{d:"M3.4469 11.4065C3.4436 11.498 3.41306 11.5805 3.36765 11.6211C3.32143 11.6646 3.2752 11.6496 3.23145 11.6091C3.24961 11.5445 3.26034 11.465 3.25786 11.363C3.25621 11.2924 3.25456 11.2189 3.25621 11.1469C3.30079 11.1229 3.34454 11.1214 3.38582 11.1739C3.42709 11.2249 3.45103 11.3164 3.44773 11.4065H3.4469Z",fill:"#E3E5EA"}),(0,qt.jsx)("path",{d:"M4.25766 9.40113C4.21061 9.39513 4.17759 9.35461 4.15942 9.29759C4.17346 9.24357 4.18584 9.18654 4.19657 9.13102C4.21061 9.06349 4.22464 8.99447 4.23867 8.92694C4.25023 8.92244 4.26344 8.92094 4.27665 8.92244C4.4467 8.94345 4.42689 9.42214 4.25848 9.40113H4.25766Z",fill:"#E3E5EA"}),(0,qt.jsx)("path",{d:"M4.50448 11.065C4.43597 11.056 4.3658 11.158 4.36332 11.2871C4.36167 11.4176 4.41203 11.5332 4.4855 11.5437C4.55401 11.5527 4.62418 11.4507 4.62666 11.3216C4.62831 11.1911 4.57795 11.0755 4.50448 11.065Z",fill:"#E3E5EA"}),(0,qt.jsx)("path",{d:"M5.48181 10.2294C5.41577 10.1814 5.34313 10.2774 5.33818 10.4005C5.33405 10.4995 5.37532 10.5896 5.42733 10.6076C5.44384 10.6196 5.462 10.6241 5.48181 10.6151C5.52474 10.5956 5.56106 10.531 5.56271 10.447C5.56519 10.345 5.533 10.2654 5.48181 10.2294Z",fill:"#E3E5EA"}),(0,qt.jsx)("path",{d:"M6.04829 8.80901C5.9839 8.80151 5.91869 8.89605 5.91703 9.01609C5.91538 9.13764 5.96244 9.24569 6.03095 9.25469C6.09534 9.26219 6.16056 9.16765 6.16221 9.04761C6.16386 8.92606 6.11681 8.81802 6.04829 8.80901Z",fill:"#E3E5EA"}),(0,qt.jsx)("path",{d:"M6.4817 9.87536C6.433 9.86936 6.38924 9.93839 6.38594 10.0269C6.38264 10.1155 6.42061 10.195 6.46932 10.201C6.51802 10.207 6.56178 10.138 6.56508 10.0494C6.56838 9.9609 6.53041 9.88137 6.4817 9.87536Z",fill:"#E3E5EA"}),(0,qt.jsx)("path",{d:"M6.95052 9.18612C6.88448 9.17712 6.81761 9.27466 6.81596 9.39771C6.81431 9.52226 6.86219 9.6333 6.93236 9.64231C6.9984 9.65131 7.06526 9.55377 7.06691 9.43072C7.06856 9.30617 7.02069 9.19513 6.95052 9.18612Z",fill:"#E3E5EA"}),(0,qt.jsx)("path",{d:"M7.09408 11.3853C6.98016 11.3703 6.96778 11.6914 7.0817 11.7064C7.19562 11.7214 7.208 11.4003 7.09408 11.3853Z",fill:"#E3E5EA"}),(0,qt.jsx)("path",{d:"M7.67788 11.5318C7.53177 11.5138 7.51526 11.9265 7.6622 11.9445C7.80831 11.9625 7.82482 11.5498 7.67788 11.5318Z",fill:"#E3E5EA"}),(0,qt.jsx)("path",{d:"M6.16551 13.1512L6.16386 13.1452C6.13661 13.0462 6.07305 12.9892 6.01279 13.0102C5.95583 13.0312 5.90382 13.1287 5.90217 13.2383C5.90052 13.3388 5.92776 13.4319 5.97812 13.4784C6.03838 13.5339 6.11515 13.5024 6.15395 13.3973L6.15643 13.3913C6.18284 13.3208 6.18615 13.2278 6.16551 13.1512Z",fill:"#E3E5EA"}),(0,qt.jsx)("path",{d:"M5.9475 12.2701C5.80551 12.2521 5.789 12.6543 5.93182 12.6723C6.07381 12.6903 6.09032 12.2881 5.9475 12.2701Z",fill:"#E3E5EA"}),(0,qt.jsx)("path",{d:"M5.09817 13.0709C5.02883 13.0619 4.95784 13.1654 4.95536 13.2959C4.95371 13.428 5.00407 13.545 5.07919 13.5556C5.14853 13.5646 5.21952 13.461 5.222 13.3305C5.22365 13.1984 5.1733 13.0814 5.09817 13.0709Z",fill:"#E3E5EA"}),(0,qt.jsx)("path",{d:"M4.57214 12.8836C4.53499 12.7816 4.45492 12.7591 4.40291 12.8401C4.35503 12.9152 4.35338 13.0442 4.39135 13.1327C4.43511 13.2333 4.53499 13.2258 4.57131 13.1132C4.59608 13.0367 4.59856 12.9572 4.57131 12.8821L4.57214 12.8836Z",fill:"#E3E5EA"}),(0,qt.jsx)("path",{d:"M3.48915 13.1783C3.41568 13.1693 3.34056 13.2773 3.3389 13.4154C3.33725 13.5549 3.39091 13.6795 3.46933 13.6885C3.5428 13.6975 3.61793 13.5894 3.61958 13.4514C3.62123 13.3118 3.56757 13.1888 3.48832 13.1783H3.48915Z",fill:"#E3E5EA"}),(0,qt.jsx)("path",{d:"M3.51054 12.397C3.51054 12.397 3.50641 12.3925 3.50476 12.391C3.4412 12.3234 3.35617 12.3835 3.35039 12.5275C3.34461 12.6701 3.42469 12.7526 3.49321 12.7016C3.49568 12.7001 3.49733 12.6986 3.49981 12.6971C3.5642 12.6491 3.5708 12.463 3.51137 12.3985L3.51054 12.397Z",fill:"#E3E5EA"}),(0,qt.jsx)("path",{d:"M4.22558 11.9339C4.16119 11.9264 4.11661 12.0749 4.16284 12.1635L4.1711 12.1785C4.19586 12.2265 4.23383 12.231 4.2619 12.1905C4.2652 12.186 4.26768 12.1815 4.27098 12.177C4.32382 12.1004 4.29079 11.9414 4.22641 11.9339H4.22558Z",fill:"#E3E5EA"}),(0,qt.jsx)("path",{d:"M4.50448 11.065C4.43597 11.056 4.3658 11.158 4.36332 11.2871C4.36167 11.4176 4.41203 11.5332 4.4855 11.5437C4.55401 11.5527 4.62418 11.4507 4.62666 11.3216C4.62831 11.1911 4.57795 11.0755 4.50448 11.065Z",fill:"#E3E5EA"}),(0,qt.jsx)("path",{d:"M5.48206 10.2294C5.41602 10.1814 5.34337 10.2774 5.33842 10.4005C5.33429 10.4995 5.37557 10.5896 5.42757 10.6076C5.44408 10.6196 5.46225 10.6241 5.48206 10.6151C5.52498 10.5956 5.56131 10.531 5.56296 10.447C5.56543 10.345 5.53324 10.2654 5.48206 10.2294Z",fill:"#E3E5EA"}),(0,qt.jsx)("path",{d:"M6.04829 8.80901C5.9839 8.80151 5.91869 8.89605 5.91703 9.01609C5.91538 9.13764 5.96244 9.24569 6.03095 9.25469C6.09534 9.26219 6.16056 9.16765 6.16221 9.04761C6.16386 8.92606 6.11681 8.81802 6.04829 8.80901Z",fill:"#E3E5EA"}),(0,qt.jsx)("path",{d:"M6.4817 9.87536C6.433 9.86936 6.38924 9.93839 6.38594 10.0269C6.38264 10.1155 6.42061 10.195 6.46932 10.201C6.51802 10.207 6.56178 10.138 6.56508 10.0494C6.56838 9.9609 6.53041 9.88137 6.4817 9.87536Z",fill:"#E3E5EA"}),(0,qt.jsx)("path",{d:"M5.9475 12.2701C5.80551 12.2521 5.789 12.6543 5.93182 12.6723C6.07381 12.6903 6.09032 12.2881 5.9475 12.2701Z",fill:"#E3E5EA"}),(0,qt.jsx)("path",{d:"M4.56817 12.8708C4.5302 12.9143 4.49387 12.9623 4.45673 13.0059C4.43114 13.0359 4.40472 13.0629 4.37748 13.0884C4.35601 13.0059 4.36344 12.9038 4.40389 12.8408C4.45342 12.7628 4.52855 12.7793 4.56817 12.8708Z",fill:"#E3E5EA"}),(0,qt.jsx)("path",{d:"M3.62047 13.4514V13.4679C3.60726 13.4709 3.42895 13.5159 3.35135 13.5324C3.34227 13.4964 3.33814 13.4574 3.33897 13.4154C3.34145 13.2773 3.41574 13.1693 3.48921 13.1783C3.56846 13.1888 3.62129 13.3133 3.62047 13.4514Z",fill:"#E3E5EA"}),(0,qt.jsx)("path",{d:"M3.51079 12.397C3.51079 12.397 3.50666 12.3925 3.50501 12.391C3.44144 12.3234 3.35642 12.3835 3.35064 12.5275C3.34486 12.6701 3.42493 12.7526 3.49345 12.7016C3.49593 12.7001 3.49758 12.6986 3.50005 12.6971C3.56444 12.6491 3.57105 12.463 3.51161 12.3985L3.51079 12.397Z",fill:"#E3E5EA"}),(0,qt.jsx)("path",{d:"M4.22558 11.9339C4.16119 11.9264 4.11661 12.0749 4.16284 12.1635L4.1711 12.1785C4.19586 12.2265 4.23383 12.231 4.2619 12.1905C4.2652 12.186 4.26768 12.1815 4.27098 12.177C4.32382 12.1004 4.29079 11.9414 4.22641 11.9339H4.22558Z",fill:"#E3E5EA"})]}),(0,qt.jsx)("defs",{children:(0,qt.jsx)("clipPath",{id:"clip0_2197_3320",children:(0,qt.jsx)("rect",{width:"16",height:"10",fill:"white",transform:"translate(2 6)"})})})]});function Tc(){return(0,qt.jsxs)("svg",{width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,qt.jsxs)("g",{clipPath:"url(#clip0_2197_2564)",children:[(0,qt.jsx)("path",{d:"M18.0001 15.4019C18.0001 15.4019 17.5787 16.9005 17.2682 17.4802C16.9577 18.0599 16.2036 18.7053 16.2036 18.7053L13.6199 18.6069L13.5979 18.6155L12.9812 18.8561L12.6108 19.0006C12.6108 19.0006 10.0271 18.0271 9.84963 17.9287C9.82213 17.9134 9.62009 17.6459 9.29851 17.2049C7.54789 14.8045 2.25366 7.26368 2.25366 7.26368L2.35513 7.10977L2.68613 6.60737L2.66972 6.58298L2.65885 6.56668C2.86101 6.53091 3.12382 6.47305 3.42267 6.38029L3.42588 6.3793L3.43032 6.37788C3.67771 6.30076 3.94995 6.19958 4.23227 6.06723C4.86102 5.77266 5.41835 5.38357 5.88808 4.91027C6.3638 4.43084 6.72896 3.87451 7.03347 3.23712L7.89797 2.74609L13.7973 12.4594L13.9305 12.4813L13.9649 12.487L14.5849 12.589L14.8061 12.6253L14.826 12.6286L14.8619 12.6345L15.0034 13.1315L15.0393 13.258L17.6008 14.1002L18.0001 15.4019Z",fill:"url(#paint0_linear_2197_2564)"}),(0,qt.jsx)("path",{d:"M7.03331 3.23665L7.90912 2.72266C7.90912 2.72266 7.80954 3.11633 7.5434 3.63044L7.02222 3.25853",fill:"#303F9F"}),(0,qt.jsx)("path",{d:"M2.98592 7.09724C2.79741 7.10818 2.26514 7.26132 2.26514 7.26132L2.35507 7.10861L2.68608 6.60621L2.66434 6.57219C2.72311 6.55743 3.25827 6.43404 3.42261 6.37913C3.42372 6.3788 3.42482 6.37847 3.42582 6.37814H3.42593C3.42738 6.37749 3.42882 6.37705 3.43026 6.37672H3.43037C3.58828 6.33439 3.17277 7.08641 2.98592 7.09724Z",fill:"#303F9F"}),(0,qt.jsx)("path",{d:"M17.8799 15.4565C17.8806 15.3486 17.8695 15.2369 17.8431 15.1175C17.7678 14.7768 17.6787 14.4392 17.6009 14.0996C17.6063 14.1231 17.3366 14.352 17.3143 14.3761C17.1106 14.598 16.9382 14.8377 16.7819 15.094C16.4601 15.622 16.2103 16.1927 16.0423 16.786C16.0073 16.9095 15.9757 17.0347 15.9672 17.1626C15.9513 17.4003 16.0284 17.6511 16.076 17.8828C16.1033 18.0157 16.132 18.1484 16.1623 18.2807C16.1827 18.3701 16.1868 18.4651 16.2174 18.552C16.2632 18.6823 16.3188 18.6175 16.4102 18.5489C16.5824 18.4195 16.7271 18.257 16.8506 18.0822C17.238 17.5331 17.4886 16.8879 17.7046 16.2583C17.8018 15.9752 17.8783 15.7278 17.8801 15.4564L17.8799 15.4565Z",fill:"#E3E5EA"}),(0,qt.jsx)("path",{d:"M15.0033 13.1303C14.9924 13.1575 14.9785 13.1809 14.9613 13.1986C14.9119 13.2493 14.839 13.268 14.7712 13.2899C14.1814 13.4809 13.8026 14.0399 13.5213 14.5858C13.2425 15.1268 13.0129 15.6924 12.8364 16.2736C12.7529 16.5489 12.6805 16.8351 12.7119 17.1208C12.7337 17.3193 12.8048 17.5087 12.8752 17.6959C13.0577 18.1802 13.1784 18.3594 13.5979 18.6143L12.9811 18.8549C12.8716 18.3001 12.4763 17.8174 12.4131 17.2532C12.3838 16.9902 12.4287 16.7289 12.5045 16.4735C12.5508 16.3177 12.6084 16.1643 12.6679 16.014C12.786 15.7152 12.9118 15.4195 13.0454 15.1271C13.1532 14.8909 13.266 14.6571 13.3836 14.4256C13.4436 14.3078 13.5049 14.1905 13.5673 14.0739C13.768 13.6993 13.9858 13.326 14.2937 13.0307C14.4098 12.9192 14.6325 12.6593 14.806 12.624C14.8077 12.6237 14.8092 12.6234 14.8108 12.623C14.816 12.6243 14.821 12.6257 14.826 12.6273L14.8618 12.6332L15.0033 13.1303Z",fill:"#303F9F"}),(0,qt.jsx)("path",{d:"M14.8632 12.6444C14.7027 12.8506 14.4552 12.976 14.2732 13.163C14.0905 13.3508 13.9411 13.5671 13.7981 13.785C13.7738 13.8221 13.7496 13.8594 13.7254 13.8966C13.5932 14.1003 13.4608 14.3043 13.3411 14.5155C13.2005 14.7633 13.0774 15.0208 12.9729 15.2854C12.9222 15.4138 12.8894 15.5565 12.8287 15.6797C12.7642 15.8109 12.7145 15.9515 12.6599 16.0875C12.629 16.1642 12.5982 16.241 12.5673 16.3177C12.5463 16.3699 12.5254 16.422 12.5044 16.4742C12.4415 16.6307 12.4669 16.8003 12.4115 16.9534H12.4226L9.29834 17.2044L11.2471 16.8222C11.2471 16.8222 11.2477 16.8223 11.2477 16.8222C11.374 16.6691 11.5004 16.5161 11.6267 16.3631C11.8644 16.0751 12.1022 15.7871 12.3401 15.499C12.4956 15.3106 12.6539 15.1295 12.7915 14.9271C12.934 14.7174 13.0633 14.4994 13.1921 14.2815C13.3284 14.0511 13.4646 13.82 13.5776 13.5774C13.6918 13.3322 13.7677 13.0762 13.8375 12.8162C13.8675 12.7046 13.8956 12.5925 13.9239 12.4805C14.2385 12.5332 14.5532 12.5859 14.8678 12.6386C14.8662 12.6406 14.8648 12.6426 14.8632 12.6445V12.6444Z",fill:"#303F9F"}),(0,qt.jsx)("path",{d:"M7.03386 3.23633C7.03386 3.23633 7.03332 3.23759 7.03296 3.23813L7.03368 3.23633H7.03386Z",fill:"#E3E5EA"}),(0,qt.jsx)("path",{d:"M7.02532 3.22628L5.76938 1.45316L5.7666 1.44922L5.76816 1.45425C5.76938 1.45797 5.7706 1.4618 5.7717 1.46563L5.77359 1.47153C5.77459 1.47471 5.77559 1.47788 5.77658 1.48116C5.95002 2.05926 5.19896 3.03814 4.04603 3.76664C2.79575 4.55662 1.49789 4.76871 1.11133 4.2545L2.64483 6.53604L2.66479 6.56579C3.03716 6.50016 3.61467 6.36015 4.24408 6.06634C4.87516 5.77177 5.43427 5.38247 5.9061 4.90938C6.3836 4.43039 6.74077 3.87942 7.03352 3.23623L7.02532 3.22639V3.22628Z",fill:"#E3E5EA"}),(0,qt.jsx)("path",{d:"M5.76807 1.45508L5.77161 1.46645C5.77039 1.46263 5.76929 1.45891 5.76807 1.45508Z",fill:"#E3E5EA"}),(0,qt.jsx)("path",{d:"M4.0459 3.76595C5.19882 3.03745 5.94977 2.05857 5.77645 1.48047C5.91617 2.06743 5.19882 3.03745 4.0459 3.76595Z",fill:"#E3E5EA"}),(0,qt.jsx)("path",{d:"M5.77648 1.48145C5.77548 1.47828 5.77449 1.47511 5.77349 1.47182C5.77293 1.46986 5.77227 1.46789 5.7716 1.46592L5.76805 1.45454C5.75175 1.40346 5.73257 1.35456 5.70363 1.30993C5.34523 0.75798 4.02187 0.962967 2.74785 1.76793C1.47395 2.57289 0.73176 3.67286 1.09016 4.22493C1.09681 4.23521 1.10391 4.24505 1.11123 4.25479C1.49779 4.769 2.79553 4.55702 4.04593 3.76693C5.19885 3.03843 5.9162 2.06841 5.77648 1.48145Z",fill:"#F9F9F9"})]}),(0,qt.jsxs)("defs",{children:[(0,qt.jsxs)("linearGradient",{id:"paint0_linear_2197_2564",x1:"1.5983",y1:"10.7225",x2:"17.3918",y2:"10.7225",gradientUnits:"userSpaceOnUse",children:[(0,qt.jsx)("stop",{stopColor:"#A7B3C1"}),(0,qt.jsx)("stop",{offset:"0.21",stopColor:"#C1C9D3"}),(0,qt.jsx)("stop",{offset:"0.5",stopColor:"#DFE3E7"}),(0,qt.jsx)("stop",{offset:"0.75",stopColor:"#F2F3F4"}),(0,qt.jsx)("stop",{offset:"0.93",stopColor:"#F9F9F9"})]}),(0,qt.jsx)("clipPath",{id:"clip0_2197_2564",children:(0,qt.jsx)("rect",{width:"17",height:"18",fill:"white",transform:"translate(1 1)"})})]})]})}const Ec=()=>(0,qt.jsxs)("svg",{width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,qt.jsxs)("g",{clipPath:"url(#clip0_2296_2718)",children:[(0,qt.jsx)("path",{d:"M6.21416 5.03881C5.82323 4.68307 5.67399 4.08428 5.85188 3.58546C6.02977 3.08663 6.52407 2.71729 7.05179 2.68931C7.57952 2.66133 8.10911 2.976 8.33718 3.45326C8.30951 3.47251 8.282 3.4918 8.25429 3.5112C9.28792 2.80572 10.7402 2.72819 11.8126 3.36964C12.0442 2.83637 12.7558 2.56336 13.3198 2.69852C13.8839 2.83351 14.3081 3.40784 14.2726 3.98816C14.2427 4.4764 13.9358 4.89795 13.641 5.28824C13.9397 5.68191 14.1188 6.16541 14.1491 6.65925C14.1761 7.09951 14.0743 7.52946 13.8464 7.90673C13.6845 8.17493 13.6896 8.18146 13.913 8.38593C14.0903 8.54825 14.2214 8.74872 14.3258 8.96455C14.5543 9.43687 14.6818 9.95616 14.7083 10.48C14.7305 10.9168 14.5408 11.4032 14.6641 11.8116C14.8328 12.3705 14.8695 12.9815 14.683 13.5414C14.6016 13.7855 14.3386 14.0519 14.2998 14.2845C14.2769 14.4218 14.3788 14.6483 14.4 14.7889C14.4284 14.9774 14.4427 15.1668 14.4194 15.3568C14.3621 15.8221 14.1616 16.2782 13.8174 16.596C13.3883 16.9923 12.7751 17.1409 12.1929 17.1092C11.6109 17.0776 11.0507 16.8832 10.5093 16.6671C10.231 16.8696 9.88943 16.9934 9.54627 16.9731C9.20311 16.9528 8.86855 16.8099 8.61647 16.5759C8.61134 16.5984 8.60642 16.6208 8.60129 16.6434C7.9401 16.8636 7.18436 17.1091 6.50098 16.9749C5.82474 16.8421 5.23339 16.3395 4.99231 15.6927C4.75137 15.0459 4.86898 14.277 5.29244 13.7314C5.27126 13.709 5.25004 13.6867 5.22902 13.6643C4.88748 13.3031 4.84476 12.869 4.85678 12.3712C4.86881 11.8734 5.06609 11.382 5.40148 11.014C5.20025 10.4681 5.05929 9.95518 5.14397 9.37915C5.22886 8.80303 5.54426 8.24183 6.05299 7.95963C6.07107 7.91911 6.03491 8.00015 6.05299 7.95963C5.60694 7.06351 5.69588 5.8964 6.21405 5.03861L6.21416 5.03881Z",fill:"white"}),(0,qt.jsx)("path",{d:"M14.6577 15.3855C14.6808 15.1983 14.6744 14.9971 14.6375 14.7522C14.6274 14.6853 14.6072 14.6163 14.5858 14.5431C14.5672 14.4797 14.5325 14.3614 14.5368 14.3235C14.5499 14.2452 14.63 14.1207 14.7005 14.0111C14.7812 13.8857 14.8646 13.7562 14.9108 13.6169C15.0996 13.051 15.0938 12.4025 14.8942 11.7411C14.8358 11.5482 14.869 11.31 14.9041 11.0578C14.9309 10.8654 14.9586 10.6662 14.9484 10.4668C14.9199 9.90513 14.7794 9.34895 14.5421 8.8588C14.4115 8.58856 14.2588 8.37565 14.0754 8.20752C14.048 8.18244 14.0169 8.15381 13.9932 8.13076C14.0107 8.09885 14.0351 8.0588 14.0521 8.03061C14.3027 7.6158 14.4192 7.13617 14.3892 6.6436C14.36 6.16582 14.2013 5.69234 13.9384 5.29182C14.2011 4.93759 14.4814 4.51012 14.5126 4.00187C14.5552 3.30223 14.056 2.62662 13.376 2.46376C12.7538 2.31469 12.0672 2.57032 11.7227 3.04597C10.7191 2.54859 9.43643 2.58255 8.42341 3.12708C8.11324 2.69095 7.57627 2.41969 7.03961 2.44821C6.41665 2.48125 5.8357 2.9156 5.62593 3.50425C5.43812 4.03116 5.55931 4.65093 5.91762 5.076C5.46767 5.93266 5.40384 7.00847 5.74973 7.86891C5.30677 8.19377 4.99727 8.72949 4.90697 9.34391C4.85216 9.71601 4.88213 10.0608 4.96497 10.4137C4.96562 10.4169 4.96546 10.4201 4.96632 10.4232C4.97095 10.4431 4.97654 10.4616 4.98152 10.4809C5.02145 10.6389 5.07058 10.7987 5.12873 10.964C4.81432 11.3587 4.62948 11.8614 4.61723 12.3652C4.60638 12.8105 4.62652 13.3174 4.98576 13.7512C4.61012 14.3446 4.52248 15.1182 4.76779 15.7767C5.03702 16.4994 5.69931 17.0623 6.45492 17.2108C6.9457 17.3072 7.45911 17.2272 7.93751 17.1C7.9568 17.0997 7.97622 17.098 7.9957 17.0928C8.00855 17.0895 8.02145 17.086 8.03409 17.0822C8.09484 17.0649 8.15458 17.0443 8.21275 17.0213C8.35388 16.9783 8.49072 16.9334 8.62158 16.8899C8.88713 17.0804 9.20348 17.1936 9.53179 17.2129C9.87012 17.233 10.2231 17.1355 10.5387 16.9371C10.6886 16.9957 10.8422 17.0518 10.9984 17.1036C11.0267 17.1202 11.0574 17.1293 11.0889 17.1332C11.4397 17.2445 11.8042 17.3287 12.1795 17.3489C12.5045 17.3666 12.8185 17.3316 13.106 17.2493C13.4432 17.1527 13.7433 16.9908 13.9801 16.7722C14.3489 16.4315 14.5897 15.9389 14.6578 15.3853L14.6577 15.3855ZM13.6548 16.4188C13.3113 16.7359 12.7836 16.9001 12.2064 16.8685C11.8796 16.8507 11.5546 16.7754 11.238 16.6752C10.9075 16.3486 10.5471 15.9804 10.376 15.5435C10.2233 15.1539 10.2435 14.6151 10.5774 14.3397C10.7967 14.1589 11.1245 14.107 11.4134 14.0611L12.7571 13.8483C12.8889 13.8275 12.9778 13.7043 12.9572 13.573C12.9367 13.4417 12.8137 13.3522 12.6827 13.3729L11.339 13.5857C11.0065 13.6385 10.5927 13.704 10.2723 13.9683C9.73751 14.4096 9.71927 15.1858 9.92857 15.7201C10.0373 15.9981 10.1992 16.2426 10.3812 16.4643C10.377 16.467 10.3723 16.4691 10.3683 16.4721C10.1158 16.6558 9.82881 16.7484 9.56081 16.7327C9.34266 16.7196 9.12566 16.6457 8.94168 16.525C9.37961 16.069 9.62406 15.4242 9.54046 14.7873C9.48509 14.3671 9.30109 14.0162 9.02224 13.7997C8.6291 13.4945 8.12692 13.4924 7.68373 13.4907C7.32179 13.4892 6.91541 13.4686 6.67562 13.2415C6.57923 13.1505 6.42727 13.1549 6.33612 13.2516C6.24497 13.3483 6.24918 13.5006 6.34562 13.592C6.71262 13.9393 7.22749 13.9703 7.68113 13.972C8.06577 13.9736 8.46336 13.9752 8.72774 14.1805C8.96836 14.3673 9.04193 14.6809 9.0642 14.8511C9.15712 15.5572 8.69777 16.3051 8.04393 16.5696C7.55423 16.7165 7.01986 16.8312 6.54762 16.7385C5.95191 16.6215 5.42976 16.1778 5.21749 15.6078C5.00512 15.0381 5.10913 14.3593 5.48218 13.8786C5.55509 13.7847 5.54871 13.6515 5.46696 13.5653L5.40354 13.4982C5.13129 13.2105 5.08511 12.869 5.09705 12.3762C5.10601 12.0043 5.23472 11.6339 5.45336 11.3318C5.62382 11.5041 5.82752 11.6454 6.05813 11.7794C6.68476 12.1433 7.29825 12.3099 7.88142 12.2743C8.04904 12.2641 8.2123 12.2357 8.36828 12.191C8.87937 12.0446 9.3106 11.7233 9.54994 11.2929C9.91195 10.6422 9.76716 9.79917 9.22012 9.37394C8.90658 9.13039 8.50903 9.04961 8.18964 8.98468L7.25173 8.79398C7.12169 8.76756 6.99494 8.85175 6.96842 8.98195C6.94191 9.11214 7.02569 9.23919 7.15558 9.26557L8.09349 9.45627C8.3779 9.51414 8.70035 9.57953 8.92537 9.75446C9.27761 10.0284 9.37154 10.6258 9.13056 11.0592C8.90094 11.4722 8.39904 11.7609 7.8529 11.7939C7.37252 11.8234 6.83533 11.6743 6.29944 11.363C5.87619 11.1171 5.59788 10.8771 5.46069 10.4143C5.45722 10.4014 5.45328 10.3884 5.45016 10.3754C5.44674 10.3628 5.44342 10.3499 5.44009 10.3371C5.36406 10.0254 5.33563 9.72666 5.38174 9.41325C5.45913 8.88725 5.73174 8.4391 6.11571 8.20086C6.17332 8.18437 6.22975 8.14454 6.26724 8.06781L6.26739 8.06786L6.27114 8.05925C6.27138 8.05849 6.27198 8.05766 6.27222 8.0569C6.27237 8.05644 6.27247 8.05613 6.27261 8.05567C6.27276 8.05521 6.2729 8.05475 6.27315 8.05449L6.27694 8.04573L6.27679 8.04568C6.3207 7.93654 6.28887 7.84743 6.23807 7.78943C5.8732 6.99674 5.94311 5.95055 6.41928 5.16249C6.47882 5.06405 6.46049 4.93718 6.37541 4.85986C6.05373 4.56713 5.93129 4.07595 6.07763 3.66537C6.22392 3.25495 6.6293 2.95193 7.06382 2.92897C7.44187 2.90885 7.81992 3.10197 8.03529 3.41127C8.00178 3.48555 8.00655 3.57503 8.05591 3.64709C8.13077 3.75611 8.27972 3.78449 8.38893 3.70942C9.35781 3.04822 10.7149 2.99314 11.6889 3.57584C11.7482 3.61137 11.8204 3.61994 11.8855 3.59825C11.9513 3.5769 12.0047 3.52837 12.0324 3.46491C12.206 3.06582 12.7809 2.81682 13.2632 2.93194C13.7158 3.04049 14.061 3.50748 14.0326 3.97306C14.0061 4.40533 13.6974 4.81414 13.4493 5.14246C13.3842 5.22867 13.3842 5.34752 13.4496 5.43344C13.7187 5.78817 13.8818 6.22862 13.9092 6.67356C13.9332 7.06797 13.8403 7.45113 13.6408 7.78167C13.4206 8.14635 13.4391 8.27785 13.7507 8.563C13.8885 8.68913 14.0059 8.8547 14.1094 9.06907C14.3189 9.50209 14.4429 9.99411 14.4683 10.4919C14.4726 10.5789 14.4666 10.6711 14.4565 10.7666C14.4499 10.7598 14.4438 10.7526 14.4361 10.7465C14.3329 10.6631 14.1816 10.6797 14.0984 10.7829C13.5672 11.4423 12.7479 11.8822 11.9065 11.959C11.282 12.0162 10.7463 11.8397 10.4734 11.4872C10.2785 11.2354 10.2157 10.8767 10.3135 10.5735C10.4112 10.27 10.6714 10.0153 10.9764 9.92455C11.141 9.87805 11.327 9.8672 11.522 9.85921C11.6118 9.85546 11.7017 9.85176 11.7909 9.8441C12.2207 9.80748 12.5386 9.66681 12.7354 9.42674C12.8196 9.32396 12.8049 9.1724 12.7023 9.08817C12.5997 9.00394 12.4485 9.0191 12.3642 9.12183C12.2531 9.25758 12.0468 9.33931 11.7506 9.36466C11.6684 9.37165 11.5857 9.37494 11.5029 9.37853C11.2872 9.38739 11.0606 9.39988 10.8404 9.46335C10.3807 9.6002 10.0038 9.96934 9.85662 10.4266C9.70945 10.8838 9.80029 11.4035 10.094 11.7827C10.4677 12.2655 11.1614 12.5107 11.9497 12.4385C12.1768 12.4177 12.4004 12.3753 12.6178 12.3131C13.3094 12.115 13.9355 11.713 14.4062 11.1611C14.3768 11.4003 14.3627 11.6436 14.4344 11.8812C14.5534 12.2755 14.6536 12.8702 14.4553 13.4651C14.4281 13.5467 14.3615 13.6504 14.2969 13.7506C14.1964 13.9069 14.0924 14.0682 14.063 14.2446C14.0392 14.387 14.0847 14.5424 14.1249 14.6794C14.1409 14.734 14.1574 14.7904 14.1626 14.8248C14.1928 15.0253 14.1987 15.185 14.181 15.3275C14.1268 15.7678 13.9399 16.1556 13.6547 16.4191L13.6548 16.4188Z",fill:"#303F9F"}),(0,qt.jsx)("path",{d:"M11.3354 7.19094C11.4447 7.1154 11.4724 6.96565 11.3972 6.85618C11.3221 6.74675 11.1725 6.7195 11.0632 6.79473C10.5644 7.13916 10.1245 7.31524 9.71847 7.33289C9.2373 7.3537 8.78497 7.11607 8.6184 6.7549C8.56273 6.63424 8.42006 6.58236 8.29977 6.63771C8.17928 6.69367 8.12679 6.83672 8.18235 6.95718C8.43217 7.49909 9.05751 7.84314 9.73845 7.81366C9.91053 7.80632 10.0854 7.77706 10.2641 7.72577C10.6039 7.62833 10.9583 7.4511 11.3353 7.19074L11.3354 7.19094Z",fill:"#303F9F"}),(0,qt.jsx)("path",{d:"M11.1345 5.24804C11.2493 5.18133 11.2891 5.03475 11.2228 4.91964C11.2209 4.91448 11.2208 4.89439 11.232 4.87463C11.2505 4.84168 11.2904 4.80994 11.3441 4.78511C11.4733 4.72566 11.6315 4.73014 11.7571 4.79703C11.8826 4.86387 11.9749 4.99262 11.9979 5.13331C12.0193 5.26436 12.1429 5.35321 12.2737 5.33144C12.2829 5.32998 12.292 5.3278 12.3009 5.32538C12.4167 5.29224 12.4919 5.17667 12.4718 5.05481C12.4244 4.76505 12.2417 4.5097 11.983 4.37202C11.7242 4.23433 11.4105 4.22488 11.1442 4.34802C10.9973 4.41553 10.8833 4.51575 10.8142 4.638C10.72 4.80478 10.717 5.00474 10.8063 5.15989C10.8725 5.27495 11.0193 5.31445 11.1347 5.24809L11.1345 5.24804Z",fill:"#303F9F"}),(0,qt.jsx)("path",{d:"M9.04483 5.30767C9.05421 5.30626 9.06316 5.30404 9.07206 5.30146C9.18768 5.26826 9.26289 5.15285 9.24315 5.03093C9.18106 4.64992 8.88895 4.32825 8.5163 4.23004C8.1436 4.13198 7.73093 4.26858 7.48907 4.56949C7.30852 4.79446 7.26898 5.07551 7.38806 5.28552C7.45361 5.40105 7.60044 5.44141 7.71551 5.37546C7.83089 5.30961 7.87113 5.16267 7.80574 5.04719C7.7892 5.01813 7.80873 4.93857 7.86306 4.87089C7.98414 4.72023 8.2073 4.64639 8.39376 4.69561C8.58026 4.74469 8.73809 4.91855 8.76917 5.10924C8.79055 5.24029 8.91392 5.32909 9.04488 5.30752L9.04483 5.30767Z",fill:"#303F9F"}),(0,qt.jsx)("path",{d:"M9.83533 6.52995C10.2343 6.57962 10.9838 5.92628 10.4035 5.70355C10.1172 5.59376 9.03597 5.60575 9.26138 6.10462C9.36394 6.33168 9.58845 6.49919 9.83533 6.52995Z",fill:"#303F9F"}),(0,qt.jsx)("path",{d:"M7.14198 3.22498C6.85846 3.21045 6.57345 3.34064 6.39822 3.56426C6.22274 3.78814 6.16427 4.09645 6.24571 4.3688C6.28347 4.49492 6.4154 4.56685 6.54139 4.5307C6.5425 4.53038 6.54361 4.53006 6.54473 4.52973C6.67175 4.49138 6.74385 4.35709 6.70577 4.22985C6.66896 4.10708 6.69644 3.96216 6.77565 3.86119C6.85471 3.76016 6.98832 3.69892 7.11652 3.70568C7.24924 3.71252 7.36199 3.61038 7.36892 3.47768C7.37585 3.34498 7.27418 3.23184 7.14177 3.22509L7.14198 3.22498Z",fill:"#303F9F"}),(0,qt.jsx)("path",{d:"M12.5784 3.70889C12.6162 3.84193 12.763 3.91573 12.8908 3.86902C12.9996 3.88513 13.0963 3.93526 13.1597 4.01026C13.245 4.11145 13.2833 4.25531 13.2596 4.38588C13.2358 4.51659 13.3223 4.64182 13.4529 4.66554C13.4903 4.67235 13.5272 4.67006 13.5615 4.66018C13.6468 4.63559 13.7152 4.56479 13.7322 4.47143C13.7818 4.19898 13.7051 3.91038 13.5268 3.69897C13.3534 3.49365 13.0889 3.37828 12.801 3.38213C12.7262 3.38301 12.6561 3.41902 12.6116 3.47933C12.5667 3.53938 12.5525 3.61694 12.5731 3.68913L12.5787 3.70899L12.5784 3.70889Z",fill:"#303F9F"})]}),(0,qt.jsx)("defs",{children:(0,qt.jsx)("clipPath",{id:"clip0_2296_2718",children:(0,qt.jsx)("rect",{width:"12.2479",height:"16.1672",fill:"white",transform:"translate(6.6355 0.320312) rotate(17.6122)"})})})]}),Mc=()=>(0,qt.jsxs)("svg",{width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,qt.jsx)("path",{d:"M18.6789 3.77361L18.6789 3.775L18.7495 16.4657C18.7414 16.4695 18.7323 16.4735 18.7221 16.4777C18.6254 16.5179 18.4682 16.5619 18.2464 16.6065C17.8067 16.6948 17.1613 16.776 16.3535 16.8447C14.7404 16.9819 12.5069 17.0672 10.0363 17.0672C7.56574 17.0672 5.33183 16.9818 3.71837 16.8445C2.91032 16.7758 2.26479 16.6946 1.82491 16.6063C1.60297 16.5617 1.44573 16.5177 1.34898 16.4776C1.33832 16.4732 1.32888 16.469 1.32057 16.4651L1.25 3.77361C1.25 3.77345 1.25 3.7733 1.25 3.77315C1.25007 3.76116 1.2529 3.74922 1.26164 3.73385C1.27554 3.71106 1.29948 3.69727 1.32634 3.69727H18.6026C18.63 3.69727 18.6539 3.71154 18.6671 3.73352C18.6761 3.74925 18.6789 3.76138 18.6789 3.77361ZM1.32107 16.5553L1.32106 16.5539L1.32107 16.5553ZM18.9289 3.77361L19 16.5553C19 16.9754 14.987 17.3172 10.0363 17.3172L18.9289 3.77361Z",fill:"#E3E5EA",stroke:"#303F9F",strokeWidth:"0.5"}),(0,qt.jsx)("path",{d:"M18.9289 6.67773V6.8155C18.9289 7.23553 14.916 7.57736 9.96526 7.57736C5.01456 7.57736 1 7.23553 1 6.8155V6.67773C1 7.09737 5.01456 7.43959 9.96526 7.43959C14.916 7.43959 18.9289 7.09737 18.9289 6.67773Z",fill:"#303F9F"}),(0,qt.jsx)("path",{d:"M18.9289 6.56445V6.70222C18.9289 7.12225 14.916 7.46408 9.96526 7.46408C5.01456 7.46408 1 7.12225 1 6.70261V6.56485C1 6.98449 5.01456 7.32671 9.96526 7.32671C14.916 7.32671 18.9289 6.98449 18.9289 6.56485V6.56445Z",fill:"#303F9F"}),(0,qt.jsx)("mask",{id:"path-4-inside-1_2197_3557",fill:"white",children:(0,qt.jsx)("path",{d:"M18.8834 3.60726C18.424 3.94154 14.6076 4.20277 9.96575 4.20277C5.32392 4.20277 1.50548 3.94154 1.04614 3.60726C1.10331 3.51079 1.20773 3.44727 1.32643 3.44727H18.6027C18.7214 3.44727 18.8262 3.51079 18.883 3.60726H18.8834Z"})}),(0,qt.jsx)("path",{d:"M18.8834 3.60726C18.424 3.94154 14.6076 4.20277 9.96575 4.20277C5.32392 4.20277 1.50548 3.94154 1.04614 3.60726C1.10331 3.51079 1.20773 3.44727 1.32643 3.44727H18.6027C18.7214 3.44727 18.8262 3.51079 18.883 3.60726H18.8834Z",fill:"url(#paint0_linear_2197_3557)"}),(0,qt.jsx)("path",{d:"M18.8834 3.60726L19.4718 4.41582L21.9569 2.60726H18.8834V3.60726ZM1.04614 3.60726L0.185851 3.09746L-0.278079 3.88034L0.457722 4.41582L1.04614 3.60726ZM18.883 3.60726L18.0211 4.11444L18.3111 4.60726H18.883V3.60726ZM18.2949 2.79871C18.4109 2.71429 18.4751 2.71916 18.3174 2.75838C18.2055 2.78621 18.037 2.81823 17.806 2.85161C17.3468 2.91794 16.7099 2.97988 15.9259 3.03263C14.3619 3.13785 12.2705 3.20277 9.96575 3.20277V5.20277C12.3028 5.20277 14.4405 5.13708 16.0601 5.02812C16.8678 4.97377 17.5613 4.90772 18.0919 4.83106C18.3558 4.79294 18.5972 4.74971 18.8 4.69927C18.9571 4.66022 19.241 4.5838 19.4718 4.41582L18.2949 2.79871ZM9.96575 3.20277C7.66097 3.20277 5.56907 3.13785 4.00462 3.03263C3.22032 2.97988 2.58315 2.91794 2.12379 2.8516C1.89263 2.81822 1.72412 2.78619 1.61213 2.75836C1.45431 2.71913 1.51851 2.71425 1.63456 2.79871L0.457722 4.41582C0.688609 4.58384 0.972619 4.66025 1.12967 4.69929C1.33256 4.74973 1.57398 4.79295 1.83793 4.83107C2.36876 4.90773 3.06245 4.97378 3.8704 5.02812C5.49047 5.13708 7.62869 5.20277 9.96575 5.20277V3.20277ZM1.90643 4.11706C1.79017 4.31326 1.57376 4.44727 1.32643 4.44727V2.44727C0.841689 2.44727 0.416453 2.70832 0.185851 3.09746L1.90643 4.11706ZM1.32643 4.44727H18.6027V2.44727H1.32643V4.44727ZM18.6027 4.44727C18.3572 4.44727 18.139 4.31473 18.0211 4.11444L19.7448 3.10009C19.5134 2.70684 19.0855 2.44727 18.6027 2.44727V4.44727ZM18.883 4.60726H18.8834V2.60726H18.883V4.60726Z",fill:"#303F9F",mask:"url(#path-4-inside-1_2197_3557)"}),(0,qt.jsx)("path",{d:"M9.9644 3.95203C14.7906 3.95203 18.703 3.73891 18.703 3.47601C18.703 3.21312 14.7906 3 9.9644 3C5.13822 3 1.22583 3.21312 1.22583 3.47601C1.22583 3.73891 5.13822 3.95203 9.9644 3.95203Z",fill:"#D0D1D3"}),(0,qt.jsx)("path",{d:"M9.9644 3.95203C14.7906 3.95203 18.703 3.73891 18.703 3.47601C18.703 3.21312 14.7906 3 9.9644 3C5.13822 3 1.22583 3.21312 1.22583 3.47601C1.22583 3.73891 5.13822 3.95203 9.9644 3.95203Z",fill:"url(#paint1_radial_2197_3557)"}),(0,qt.jsx)("path",{d:"M17.9971 3.4395C18.0909 3.45158 18.1746 3.46378 18.2479 3.47601C18.1746 3.48825 18.0909 3.50045 17.9971 3.51253C17.5604 3.56877 16.9248 3.61982 16.1353 3.66283C14.5575 3.74878 12.3757 3.80203 9.9644 3.80203C7.55313 3.80203 5.37134 3.74878 3.79346 3.66283C3.00398 3.61982 2.36842 3.56877 1.93171 3.51253C1.8379 3.50045 1.75424 3.48824 1.68087 3.47601C1.75424 3.46378 1.8379 3.45158 1.93171 3.4395C2.36842 3.38326 3.00398 3.3322 3.79346 3.2892C5.37134 3.20325 7.55313 3.15 9.9644 3.15C12.3757 3.15 14.5575 3.20325 16.1353 3.2892C16.9248 3.3322 17.5604 3.38326 17.9971 3.4395Z",fill:"#E3E5EA",stroke:"#303F9F",strokeWidth:"0.3"}),(0,qt.jsxs)("defs",{children:[(0,qt.jsxs)("linearGradient",{id:"paint0_linear_2197_3557",x1:"1.04614",y1:"3.82482",x2:"18.8834",y2:"3.82482",gradientUnits:"userSpaceOnUse",children:[(0,qt.jsx)("stop",{stopColor:"#CCCCCC"}),(0,qt.jsx)("stop",{offset:"0.01",stopColor:"#D9D9D9"}),(0,qt.jsx)("stop",{offset:"0.03",stopColor:"#EAEAEA"}),(0,qt.jsx)("stop",{offset:"0.06",stopColor:"#F6F6F6"}),(0,qt.jsx)("stop",{offset:"0.09",stopColor:"#FDFDFD"}),(0,qt.jsx)("stop",{offset:"0.2",stopColor:"white"}),(0,qt.jsx)("stop",{offset:"0.43",stopColor:"white"}),(0,qt.jsx)("stop",{offset:"0.8",stopColor:"white"}),(0,qt.jsx)("stop",{offset:"1",stopColor:"#CCCCCC"})]}),(0,qt.jsxs)("radialGradient",{id:"paint1_radial_2197_3557",cx:"0",cy:"0",r:"1",gradientUnits:"userSpaceOnUse",gradientTransform:"translate(9.9644 12.2342) scale(8.73658 0.436829)",children:[(0,qt.jsx)("stop",{stopColor:"#DEDEDE"}),(0,qt.jsx)("stop",{offset:"0.59",stopColor:"#D5D5D5"}),(0,qt.jsx)("stop",{offset:"1",stopColor:"#CCCCCC"})]})]})]}),Oc=()=>(0,qt.jsxs)("svg",{width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,qt.jsxs)("g",{clipPath:"url(#clip0_2296_2659)",children:[(0,qt.jsx)("path",{d:"M11.1709 5.89258H8.82665C8.82665 5.89258 8.82665 5.89258 8.82227 5.89258V6.26445C8.82227 6.26445 8.82446 6.26445 8.82665 6.26445H11.1709C11.1709 6.26445 11.1709 6.26445 11.1753 6.26445V5.89258C11.1753 5.89258 11.1731 5.89258 11.1709 5.89258Z",fill:"#E3E5EA"}),(0,qt.jsx)("path",{d:"M11.1753 5.65234C11.1753 5.65234 11.1731 5.65234 11.171 5.65234H8.82666C8.82666 5.65234 8.82666 5.65234 8.82227 5.65234C8.75429 5.65234 8.69946 5.70639 8.69946 5.77342C8.69946 5.84044 8.75429 5.89233 8.82227 5.89449C8.82227 5.89449 8.82446 5.89449 8.82666 5.89449H11.171C11.171 5.89449 11.171 5.89449 11.1753 5.89449C11.2433 5.89449 11.2981 5.84044 11.2981 5.77342C11.2981 5.70639 11.2433 5.65451 11.1753 5.65234Z",fill:"url(#paint0_linear_2296_2659)"}),(0,qt.jsx)("path",{d:"M11.1753 6.26758C11.1753 6.26758 11.1731 6.26758 11.171 6.26758H8.82666C8.82666 6.26758 8.82666 6.26758 8.82227 6.26758C8.75429 6.26758 8.69946 6.32163 8.69946 6.38865C8.69946 6.45567 8.75429 6.50756 8.82227 6.50972C8.82227 6.50972 8.82446 6.50972 8.82666 6.50972H11.171C11.171 6.50972 11.171 6.50972 11.1753 6.50972C11.2433 6.50972 11.2981 6.45567 11.2981 6.38865C11.2981 6.32163 11.2433 6.26974 11.1753 6.26758Z",fill:"url(#paint1_linear_2296_2659)"}),(0,qt.jsx)("mask",{id:"path-4-inside-1_2296_2659",fill:"white",children:(0,qt.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M10.3948 1H10.0001H9.60534L9.28955 4.71868H10.0001H10.7106L10.3948 1ZM10.7104 4.71875H8.82446V5.65274H8.82885H11.1731H11.1775V4.71875H10.7126H10.7104ZM11.1731 7.06836H11.6645C12.057 7.06836 12.3772 7.34726 12.3772 7.69102V8.65096H7.6228V7.69102C7.6228 7.34726 7.94298 7.06836 8.33552 7.06836H8.82227V6.50977H8.82665H11.1688H11.1709H11.1731V7.06836ZM12.3684 8.65234H7.63158C7.28289 8.65234 7 8.91179 7 9.23393V10.9609V10.9614V16.0977V16.0979V17.4187C7 17.7408 7.28289 18.0002 7.63158 18.0002H12.3684C12.7171 18.0002 13 17.7408 13 17.4187V16.0979V16.0977V10.9614V10.9609V9.23393C13 8.91179 12.7171 8.65234 12.3684 8.65234Z"})}),(0,qt.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M10.3948 1H10.0001H9.60534L9.28955 4.71868H10.0001H10.7106L10.3948 1ZM10.7104 4.71875H8.82446V5.65274H8.82885H11.1731H11.1775V4.71875H10.7126H10.7104ZM11.1731 7.06836H11.6645C12.057 7.06836 12.3772 7.34726 12.3772 7.69102V8.65096H7.6228V7.69102C7.6228 7.34726 7.94298 7.06836 8.33552 7.06836H8.82227V6.50977H8.82665H11.1688H11.1709H11.1731V7.06836ZM12.3684 8.65234H7.63158C7.28289 8.65234 7 8.91179 7 9.23393V10.9609V10.9614V16.0977V16.0979V17.4187C7 17.7408 7.28289 18.0002 7.63158 18.0002H12.3684C12.7171 18.0002 13 17.7408 13 17.4187V16.0979V16.0977V10.9614V10.9609V9.23393C13 8.91179 12.7171 8.65234 12.3684 8.65234Z",fill:"#F9F9F9"}),(0,qt.jsx)("path",{d:"M10.3948 1L11.1919 0.932308L11.1298 0.2L10.3948 0.2V1ZM9.60534 1V0.2H8.8704L8.80821 0.932308L9.60534 1ZM9.28955 4.71868L8.49242 4.65099L8.41874 5.51868H9.28955V4.71868ZM10.7106 4.71868V5.51868H11.5814L11.5077 4.65099L10.7106 4.71868ZM8.82446 4.71875V3.91875H8.02446V4.71875H8.82446ZM8.82446 5.65274H8.02446V6.45274H8.82446V5.65274ZM11.1775 5.65274V6.45274H11.9775V5.65274H11.1775ZM11.1775 4.71875H11.9775V3.91875H11.1775V4.71875ZM11.1731 7.06836H10.3731V7.86836H11.1731V7.06836ZM12.3772 8.65096V9.45096H13.1772V8.65096H12.3772ZM7.6228 8.65096H6.8228V9.45096H7.6228V8.65096ZM8.82227 7.06836V7.86836H9.62227V7.06836H8.82227ZM8.82227 6.50977V5.70977H8.02227V6.50977H8.82227ZM11.1731 6.50977H11.9731V5.70977H11.1731V6.50977ZM10.0001 1.8H10.3948V0.2H10.0001V1.8ZM9.60534 1.8H10.0001V0.2H9.60534V1.8ZM10.0867 4.78637L10.4025 1.06769L8.80821 0.932308L8.49242 4.65099L10.0867 4.78637ZM10.0001 3.91868H9.28955V5.51868H10.0001V3.91868ZM10.7106 3.91868H10.0001V5.51868H10.7106V3.91868ZM9.59768 1.06769L9.91347 4.78637L11.5077 4.65099L11.1919 0.932308L9.59768 1.06769ZM8.82446 5.51875H10.7104V3.91875H8.82446V5.51875ZM9.62446 5.65274V4.71875H8.02446V5.65274H9.62446ZM8.82885 4.85274H8.82446V6.45274H8.82885V4.85274ZM11.1731 4.85274H8.82885V6.45274H11.1731V4.85274ZM11.1775 4.85274H11.1731V6.45274H11.1775V4.85274ZM10.3775 4.71875V5.65274H11.9775V4.71875H10.3775ZM10.7126 5.51875H11.1775V3.91875H10.7126V5.51875ZM10.7104 5.51875H10.7126V3.91875H10.7104V5.51875ZM11.6645 6.26836H11.1731V7.86836H11.6645V6.26836ZM13.1772 7.69102C13.1772 6.80672 12.3932 6.26836 11.6645 6.26836V7.86836C11.6725 7.86836 11.6625 7.87138 11.642 7.85348C11.6199 7.83424 11.5772 7.77891 11.5772 7.69102H13.1772ZM13.1772 8.65096V7.69102H11.5772V8.65096H13.1772ZM7.6228 9.45096H12.3772V7.85096H7.6228V9.45096ZM6.8228 7.69102V8.65096H8.4228V7.69102H6.8228ZM8.33552 6.26836C7.60679 6.26836 6.8228 6.80672 6.8228 7.69102H8.4228C8.4228 7.77891 8.38008 7.83424 8.35803 7.85348C8.33752 7.87138 8.32747 7.86836 8.33552 7.86836V6.26836ZM8.82227 6.26836H8.33552V7.86836H8.82227V6.26836ZM8.02227 6.50977V7.06836H9.62227V6.50977H8.02227ZM8.82665 5.70977H8.82227V7.30977H8.82665V5.70977ZM11.1688 5.70977H8.82665V7.30977H11.1688V5.70977ZM11.1709 5.70977H11.1688V7.30977H11.1709V5.70977ZM11.1731 5.70977H11.1709V7.30977H11.1731V5.70977ZM11.9731 7.06836V6.50977H10.3731V7.06836H11.9731ZM7.63158 9.45234H12.3684V7.85234H7.63158V9.45234ZM7.8 9.23393C7.8 9.3159 7.76226 9.37835 7.72658 9.41117C7.69222 9.44277 7.65646 9.45234 7.63158 9.45234V7.85234C6.90544 7.85234 6.2 8.40822 6.2 9.23393H7.8ZM7.8 10.9609V9.23393H6.2V10.9609H7.8ZM6.2 10.9609V10.9614H7.8V10.9609H6.2ZM6.2 10.9614V16.0977H7.8V10.9614H6.2ZM6.2 16.0977V16.0979H7.8V16.0977H6.2ZM7.8 17.4187V16.0979H6.2V17.4187H7.8ZM7.63158 17.2002C7.65646 17.2002 7.69222 17.2098 7.72658 17.2414C7.76226 17.2742 7.8 17.3367 7.8 17.4187H6.2C6.2 18.2444 6.90545 18.8002 7.63158 18.8002V17.2002ZM12.3684 17.2002H7.63158V18.8002H12.3684V17.2002ZM12.2 17.4187C12.2 17.3367 12.2377 17.2742 12.2734 17.2414C12.3078 17.2098 12.3435 17.2002 12.3684 17.2002V18.8002C13.0946 18.8002 13.8 18.2444 13.8 17.4187H12.2ZM12.2 16.0979V17.4187H13.8V16.0979H12.2ZM13.8 16.0979V16.0977H12.2V16.0979H13.8ZM13.8 16.0977V10.9614H12.2V16.0977H13.8ZM13.8 10.9614V10.9609H12.2V10.9614H13.8ZM12.2 9.23393V10.9609H13.8V9.23393H12.2ZM12.3684 9.45234C12.3435 9.45234 12.3078 9.44277 12.2734 9.41117C12.2377 9.37835 12.2 9.3159 12.2 9.23393H13.8C13.8 8.40822 13.0946 7.85234 12.3684 7.85234V9.45234Z",fill:"#303F9F",mask:"url(#path-4-inside-1_2296_2659)"}),(0,qt.jsx)("path",{d:"M9.92529 8.45771C9.92529 8.49014 9.95599 8.51393 9.99547 8.51393C10.0349 8.51393 10.0656 8.48798 10.0656 8.45771V7.59723C10.0656 7.5648 10.0349 7.54102 9.99547 7.54102C9.95599 7.54102 9.92529 7.56696 9.92529 7.59723V8.45771Z",fill:"url(#paint2_linear_2296_2659)"}),(0,qt.jsx)("path",{d:"M9.26514 8.45771C9.26514 8.49014 9.29803 8.51393 9.33531 8.51393C9.37479 8.51393 9.40549 8.48798 9.40549 8.45771V7.59723C9.40549 7.5648 9.37479 7.54102 9.33531 7.54102C9.29584 7.54102 9.26514 7.56696 9.26514 7.59723V8.45771Z",fill:"url(#paint3_linear_2296_2659)"}),(0,qt.jsx)("path",{d:"M8.60742 8.45771C8.60742 8.49014 8.63812 8.51393 8.6776 8.51393C8.71707 8.51393 8.74777 8.48798 8.74777 8.45771V7.59723C8.74777 7.5648 8.71488 7.54102 8.6776 7.54102C8.63812 7.54102 8.60742 7.56696 8.60742 7.59723V8.45771Z",fill:"url(#paint4_linear_2296_2659)"}),(0,qt.jsx)("path",{d:"M7.94727 8.45771C7.94727 8.49014 7.97797 8.51393 8.01744 8.51393C8.05691 8.51393 8.08762 8.48798 8.08762 8.45771V7.59723C8.08762 7.5648 8.05691 7.54102 8.01744 7.54102C7.97797 7.54102 7.94727 7.56696 7.94727 7.59723V8.45771Z",fill:"url(#paint5_linear_2296_2659)"}),(0,qt.jsx)("path",{d:"M10.7324 8.45771C10.7324 8.49014 10.7017 8.51393 10.6622 8.51393C10.6227 8.51393 10.592 8.48798 10.592 8.45771V7.59723C10.592 7.5648 10.6227 7.54102 10.6622 7.54102C10.7017 7.54102 10.7324 7.56696 10.7324 7.59723V8.45771Z",fill:"url(#paint6_linear_2296_2659)"}),(0,qt.jsx)("path",{d:"M11.3925 8.45771C11.3925 8.49014 11.3618 8.51393 11.3224 8.51393C11.2829 8.51393 11.2522 8.48798 11.2522 8.45771V7.59723C11.2522 7.5648 11.2829 7.54102 11.3224 7.54102C11.3618 7.54102 11.3925 7.56696 11.3925 7.59723V8.45771Z",fill:"url(#paint7_linear_2296_2659)"}),(0,qt.jsx)("path",{d:"M12.0525 8.45771C12.0525 8.49014 12.0218 8.51393 11.9823 8.51393C11.9428 8.51393 11.9121 8.48798 11.9121 8.45771V7.59723C11.9121 7.5648 11.9428 7.54102 11.9823 7.54102C12.0218 7.54102 12.0525 7.56696 12.0525 7.59723V8.45771Z",fill:"url(#paint8_linear_2296_2659)"}),(0,qt.jsx)("path",{d:"M9.71924 13.5484C9.71924 13.7019 9.84643 13.8273 10.0021 13.8273C10.1578 13.8273 10.285 13.7019 10.285 13.5484C10.285 13.3949 10.1578 13.2695 10.0021 13.2695C9.84643 13.2695 9.71924 13.3949 9.71924 13.5484Z",fill:"#303F9F"}),(0,qt.jsx)("path",{d:"M10.0153 12.8047C8.97144 12.8047 8.47583 13.5527 8.47583 13.5527C8.47583 13.5527 8.94294 14.3008 10.0153 14.3008C10.9912 14.3008 11.5175 13.5527 11.5175 13.5527C11.5175 13.5527 10.8815 12.8047 10.0153 12.8047ZM10.0131 14.2165C9.05916 14.2165 8.5789 13.5506 8.5789 13.5506C8.5789 13.5506 9.08329 12.8847 10.0131 12.8847C10.785 12.8847 11.3969 13.5506 11.3969 13.5506C11.3969 13.5506 10.8815 14.2165 10.0131 14.2165Z",fill:"#303F9F"}),(0,qt.jsx)("path",{d:"M9.99769 14.2261C9.62049 14.2261 9.31348 13.9234 9.31348 13.5515C9.31348 13.1796 9.62049 12.877 9.99769 12.877C10.3749 12.877 10.6819 13.1796 10.6819 13.5515C10.6819 13.9234 10.3749 14.2261 9.99769 14.2261ZM9.99769 12.9786C9.67751 12.9786 9.41655 13.2358 9.41655 13.5493C9.41655 13.8628 9.67751 14.1201 9.99769 14.1201C10.3179 14.1201 10.5766 13.865 10.5766 13.5493C10.5766 13.2337 10.3179 12.9786 9.99769 12.9786Z",fill:"#303F9F"}),(0,qt.jsx)("path",{d:"M11.0637 12.1855C11.0637 12.1855 10.6667 12.7996 10.6667 13.0158C10.6667 13.232 10.8444 13.4071 11.0637 13.4071C11.283 13.4071 11.4606 13.232 11.4606 13.0158C11.4606 12.7996 11.0637 12.1855 11.0637 12.1855Z",fill:"#303F9F"})]}),(0,qt.jsxs)("defs",{children:[(0,qt.jsxs)("linearGradient",{id:"paint0_linear_2296_2659",x1:"8.59131",y1:"5.77117",x2:"11.1978",y2:"5.77117",gradientUnits:"userSpaceOnUse",children:[(0,qt.jsx)("stop",{stopColor:"#A7B3C1"}),(0,qt.jsx)("stop",{offset:"0.21",stopColor:"#C1C9D3"}),(0,qt.jsx)("stop",{offset:"0.5",stopColor:"#DFE3E7"}),(0,qt.jsx)("stop",{offset:"0.75",stopColor:"#F2F3F4"}),(0,qt.jsx)("stop",{offset:"0.93",stopColor:"#F9F9F9"})]}),(0,qt.jsxs)("linearGradient",{id:"paint1_linear_2296_2659",x1:"8.59131",y1:"6.3864",x2:"11.1978",y2:"6.3864",gradientUnits:"userSpaceOnUse",children:[(0,qt.jsx)("stop",{stopColor:"#A7B3C1"}),(0,qt.jsx)("stop",{offset:"0.21",stopColor:"#C1C9D3"}),(0,qt.jsx)("stop",{offset:"0.5",stopColor:"#DFE3E7"}),(0,qt.jsx)("stop",{offset:"0.75",stopColor:"#F2F3F4"}),(0,qt.jsx)("stop",{offset:"0.93",stopColor:"#F9F9F9"})]}),(0,qt.jsxs)("linearGradient",{id:"paint2_linear_2296_2659",x1:"9.91945",y1:"8.01844",x2:"10.0602",y2:"8.01844",gradientUnits:"userSpaceOnUse",children:[(0,qt.jsx)("stop",{stopColor:"#A7B3C1"}),(0,qt.jsx)("stop",{offset:"0.21",stopColor:"#C1C9D3"}),(0,qt.jsx)("stop",{offset:"0.5",stopColor:"#DFE3E7"}),(0,qt.jsx)("stop",{offset:"0.75",stopColor:"#F2F3F4"}),(0,qt.jsx)("stop",{offset:"0.93",stopColor:"#F9F9F9"})]}),(0,qt.jsxs)("linearGradient",{id:"paint3_linear_2296_2659",x1:"9.2593",y1:"8.01844",x2:"9.40007",y2:"8.01844",gradientUnits:"userSpaceOnUse",children:[(0,qt.jsx)("stop",{stopColor:"#A7B3C1"}),(0,qt.jsx)("stop",{offset:"0.21",stopColor:"#C1C9D3"}),(0,qt.jsx)("stop",{offset:"0.5",stopColor:"#DFE3E7"}),(0,qt.jsx)("stop",{offset:"0.75",stopColor:"#F2F3F4"}),(0,qt.jsx)("stop",{offset:"0.93",stopColor:"#F9F9F9"})]}),(0,qt.jsxs)("linearGradient",{id:"paint4_linear_2296_2659",x1:"8.60158",y1:"8.01844",x2:"8.74235",y2:"8.01844",gradientUnits:"userSpaceOnUse",children:[(0,qt.jsx)("stop",{stopColor:"#A7B3C1"}),(0,qt.jsx)("stop",{offset:"0.21",stopColor:"#C1C9D3"}),(0,qt.jsx)("stop",{offset:"0.5",stopColor:"#DFE3E7"}),(0,qt.jsx)("stop",{offset:"0.75",stopColor:"#F2F3F4"}),(0,qt.jsx)("stop",{offset:"0.93",stopColor:"#F9F9F9"})]}),(0,qt.jsxs)("linearGradient",{id:"paint5_linear_2296_2659",x1:"7.94142",y1:"8.01844",x2:"8.08219",y2:"8.01844",gradientUnits:"userSpaceOnUse",children:[(0,qt.jsx)("stop",{stopColor:"#A7B3C1"}),(0,qt.jsx)("stop",{offset:"0.21",stopColor:"#C1C9D3"}),(0,qt.jsx)("stop",{offset:"0.5",stopColor:"#DFE3E7"}),(0,qt.jsx)("stop",{offset:"0.75",stopColor:"#F2F3F4"}),(0,qt.jsx)("stop",{offset:"0.93",stopColor:"#F9F9F9"})]}),(0,qt.jsxs)("linearGradient",{id:"paint6_linear_2296_2659",x1:"10.5862",y1:"8.01844",x2:"10.727",y2:"8.01844",gradientUnits:"userSpaceOnUse",children:[(0,qt.jsx)("stop",{stopColor:"#A7B3C1"}),(0,qt.jsx)("stop",{offset:"0.21",stopColor:"#C1C9D3"}),(0,qt.jsx)("stop",{offset:"0.5",stopColor:"#DFE3E7"}),(0,qt.jsx)("stop",{offset:"0.75",stopColor:"#F2F3F4"}),(0,qt.jsx)("stop",{offset:"0.93",stopColor:"#F9F9F9"})]}),(0,qt.jsxs)("linearGradient",{id:"paint7_linear_2296_2659",x1:"11.2464",y1:"8.01844",x2:"11.3871",y2:"8.01844",gradientUnits:"userSpaceOnUse",children:[(0,qt.jsx)("stop",{stopColor:"#A7B3C1"}),(0,qt.jsx)("stop",{offset:"0.21",stopColor:"#C1C9D3"}),(0,qt.jsx)("stop",{offset:"0.5",stopColor:"#DFE3E7"}),(0,qt.jsx)("stop",{offset:"0.75",stopColor:"#F2F3F4"}),(0,qt.jsx)("stop",{offset:"0.93",stopColor:"#F9F9F9"})]}),(0,qt.jsxs)("linearGradient",{id:"paint8_linear_2296_2659",x1:"11.9063",y1:"8.01844",x2:"12.047",y2:"8.01844",gradientUnits:"userSpaceOnUse",children:[(0,qt.jsx)("stop",{stopColor:"#A7B3C1"}),(0,qt.jsx)("stop",{offset:"0.21",stopColor:"#C1C9D3"}),(0,qt.jsx)("stop",{offset:"0.5",stopColor:"#DFE3E7"}),(0,qt.jsx)("stop",{offset:"0.75",stopColor:"#F2F3F4"}),(0,qt.jsx)("stop",{offset:"0.93",stopColor:"#F9F9F9"})]}),(0,qt.jsx)("clipPath",{id:"clip0_2296_2659",children:(0,qt.jsx)("rect",{width:"6",height:"17",fill:"white",transform:"translate(7 1)"})})]})]}),Rc=()=>(0,qt.jsxs)("svg",{width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,qt.jsxs)("g",{clipPath:"url(#clip0_2293_2593)",children:[(0,qt.jsx)("path",{d:"M18 7L18 14L17.492 14L17.492 7L18 7Z",fill:"#303F9F"}),(0,qt.jsx)("path",{d:"M17.4919 7L17.4919 14L17.2277 14L17.2277 7L17.4919 7Z",fill:"#F9F9F9"}),(0,qt.jsx)("path",{d:"M17.2483 10.4628L17.2483 10.5L17.2483 10.5372L17.2286 14L15.2857 13.4755L13.661 13.4456L4.04943 12.6965C4.04943 12.6965 3.88667 12.412 3.84652 12.2019C3.775 11.831 3.775 9.17063 3.84652 8.7997C3.8874 8.58959 4.04943 8.30513 4.04943 8.30513L13.661 7.55599L15.2857 7.52609L17.2286 7.00162L17.2483 10.4636L17.2483 10.4628Z",fill:"#E3E5EA"}),(0,qt.jsx)("path",{d:"M4.05005 8.30449L4.05005 12.6959L2.54726 12.7031L1.6269 12.7031C1.6269 12.7031 0.902874 12.3282 1.01089 9.95307C1.07585 8.53157 1.6269 8.29721 1.6269 8.29721L2.54726 8.29721L4.05005 8.30449Z",fill:"#303F9F"}),(0,qt.jsx)("path",{d:"M4.0566 8.30395C3.94785 8.30395 3.86026 9.28744 3.86026 10.4996C3.86026 11.7118 3.94785 12.6953 4.0566 12.6953C4.16535 12.6953 4.25293 11.7118 4.25293 10.4996C4.25293 9.28744 4.16535 8.30395 4.0566 8.30395Z",fill:"#E3E5EA"})]}),(0,qt.jsx)("defs",{children:(0,qt.jsx)("clipPath",{id:"clip0_2293_2593",children:(0,qt.jsx)("rect",{width:"7",height:"17",fill:"white",transform:"matrix(1.19249e-08 -1 -1 -1.19249e-08 18 14)"})})})]}),Pc=()=>(0,qt.jsxs)("svg",{width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,qt.jsx)("path",{d:"M7.39006 7.17383H10.4316C10.6471 7.17383 10.8216 7.37154 10.8216 7.61568V16.4664C10.8216 16.7105 10.6471 16.9083 10.4316 16.9083H7.39006C7.17454 16.9083 7 16.7105 7 16.4664V7.61568C7 7.37154 7.17454 7.17383 7.39006 7.17383Z",fill:"#E3E5EA"}),(0,qt.jsx)("path",{d:"M9.22633 7.17417H10.2326C10.2326 7.17417 10.011 7.08305 9.9002 6.94379C9.78941 6.80453 9.80762 6.54492 9.80762 6.54492H9.14893C9.15348 6.7392 9.16714 6.97817 9.21267 7.13119C9.21722 7.14494 9.22178 7.16042 9.22633 7.17589V7.17417Z",fill:"#E3E5EA"}),(0,qt.jsx)("path",{d:"M9.6773 3.98438H9.25537C9.31456 4.05143 9.37375 4.14083 9.39804 4.25258C9.42536 4.37293 9.42536 4.68927 9.41929 4.9867H10.0233V4.37637C10.0233 4.15974 9.86853 3.98438 9.6773 3.98438Z",fill:"#E3E5EA"}),(0,qt.jsx)("path",{d:"M8.23693 3.07127C8.23693 2.87699 8.20657 2.75836 8.029 2.75149C7.94704 2.74805 7.81804 2.74805 7.70117 2.74805V2.89418C7.70117 3.00594 7.78161 3.09706 7.88026 3.09706H8.06391C8.1489 3.09706 8.22023 3.16411 8.23845 3.25523V3.07299L8.23693 3.07127Z",fill:"#E3E5EA"}),(0,qt.jsxs)("mask",{id:"path-5-outside-1_2305_2625",maskUnits:"userSpaceOnUse",x:"6",y:"1",width:"10",height:"17",fill:"black",children:[(0,qt.jsx)("rect",{fill:"white",x:"6",y:"1",width:"10",height:"17"}),(0,qt.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M9.69238 3.98966C9.87995 4.02497 10.0233 4.20991 10.0233 4.4323V4.71129C10.1479 4.78687 10.2328 4.93581 10.2328 5.1072V6.10781C10.2328 6.35563 10.0554 6.55653 9.83663 6.55653H9.80719C9.80523 6.60932 9.80384 6.82197 9.90036 6.94328C10.0112 7.08254 10.2327 7.17366 10.2327 7.17366L9.09445 7.17366L8.72716 7.17366L7.58886 7.17366C7.58886 7.17366 7.81045 7.08254 7.92124 6.94328C8.01902 6.82039 8.01632 6.60377 8.01434 6.55455C7.81313 6.53318 7.65566 6.34133 7.65566 6.10781V5.1072C7.65566 4.92968 7.74666 4.77623 7.8787 4.70346V4.4323C7.8787 4.19747 8.03847 4.00441 8.24143 3.98516V3.29976C8.24143 3.18801 8.16099 3.09689 8.06234 3.09689H7.8787C7.78004 3.09689 7.6996 3.00576 7.6996 2.89401V2.20287C7.6996 2.09112 7.78004 2 7.8787 2H10.5818C10.6782 2 10.7572 2.08702 10.7607 2.19527H11.3575C11.4221 2.19527 11.4766 2.24454 11.4933 2.31175H14.0306L14.062 2.27376C14.1592 2.15513 14.2912 2.0812 14.4339 2.06229L14.7526 2.02103C14.763 2.01977 14.773 2.02107 14.7822 2.02447H14.8998C14.956 2.02447 15 2.07604 15 2.13794V2.91332C15 2.97693 14.9545 3.02679 14.8998 3.02679H14.7865C14.7762 3.03143 14.7646 3.03341 14.7526 3.03195L14.4339 2.99069C14.2927 2.97178 14.1607 2.89785 14.062 2.77922L14.0309 2.74157H11.4922C11.4743 2.80657 11.4207 2.85375 11.3575 2.85375H10.7609V2.89401C10.7609 3.00576 10.6804 3.09689 10.5818 3.09689H9.87147C9.77282 3.09689 9.69238 3.18801 9.69238 3.29976V3.98966ZM9.78507 15.1024C9.78233 15.515 9.78048 15.7977 9.78047 15.8825L9.78199 15.8808C9.78199 15.7964 9.78384 15.5143 9.78658 15.1024H9.78507ZM7 15.1024V16.5721C7 16.8077 7.16847 17.0002 7.37791 17.0002H9.45416L9.45551 16.9983H10.4452C10.6532 16.9983 10.8232 16.8074 10.8232 16.5702V15.1024H10.8277V8.99391H10.8232V7.69023C10.8232 7.45469 10.6547 7.26214 10.4452 7.26214H9.60745C9.68182 7.34294 9.75467 7.47704 9.78199 7.70742C9.79653 7.8315 9.80427 8.31674 9.80761 8.99391H9.80608C9.80274 8.31776 9.79499 7.83334 9.78048 7.70938C9.75316 7.479 9.68031 7.34318 9.60594 7.2641H7.37791C7.16999 7.2641 7 7.45493 7 7.69219V8.99391V15.1024Z"})]}),(0,qt.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M9.69238 3.98966C9.87995 4.02497 10.0233 4.20991 10.0233 4.4323V4.71129C10.1479 4.78687 10.2328 4.93581 10.2328 5.1072V6.10781C10.2328 6.35563 10.0554 6.55653 9.83663 6.55653H9.80719C9.80523 6.60932 9.80384 6.82197 9.90036 6.94328C10.0112 7.08254 10.2327 7.17366 10.2327 7.17366L9.09445 7.17366L8.72716 7.17366L7.58886 7.17366C7.58886 7.17366 7.81045 7.08254 7.92124 6.94328C8.01902 6.82039 8.01632 6.60377 8.01434 6.55455C7.81313 6.53318 7.65566 6.34133 7.65566 6.10781V5.1072C7.65566 4.92968 7.74666 4.77623 7.8787 4.70346V4.4323C7.8787 4.19747 8.03847 4.00441 8.24143 3.98516V3.29976C8.24143 3.18801 8.16099 3.09689 8.06234 3.09689H7.8787C7.78004 3.09689 7.6996 3.00576 7.6996 2.89401V2.20287C7.6996 2.09112 7.78004 2 7.8787 2H10.5818C10.6782 2 10.7572 2.08702 10.7607 2.19527H11.3575C11.4221 2.19527 11.4766 2.24454 11.4933 2.31175H14.0306L14.062 2.27376C14.1592 2.15513 14.2912 2.0812 14.4339 2.06229L14.7526 2.02103C14.763 2.01977 14.773 2.02107 14.7822 2.02447H14.8998C14.956 2.02447 15 2.07604 15 2.13794V2.91332C15 2.97693 14.9545 3.02679 14.8998 3.02679H14.7865C14.7762 3.03143 14.7646 3.03341 14.7526 3.03195L14.4339 2.99069C14.2927 2.97178 14.1607 2.89785 14.062 2.77922L14.0309 2.74157H11.4922C11.4743 2.80657 11.4207 2.85375 11.3575 2.85375H10.7609V2.89401C10.7609 3.00576 10.6804 3.09689 10.5818 3.09689H9.87147C9.77282 3.09689 9.69238 3.18801 9.69238 3.29976V3.98966ZM9.78507 15.1024C9.78233 15.515 9.78048 15.7977 9.78047 15.8825L9.78199 15.8808C9.78199 15.7964 9.78384 15.5143 9.78658 15.1024H9.78507ZM7 15.1024V16.5721C7 16.8077 7.16847 17.0002 7.37791 17.0002H9.45416L9.45551 16.9983H10.4452C10.6532 16.9983 10.8232 16.8074 10.8232 16.5702V15.1024H10.8277V8.99391H10.8232V7.69023C10.8232 7.45469 10.6547 7.26214 10.4452 7.26214H9.60745C9.68182 7.34294 9.75467 7.47704 9.78199 7.70742C9.79653 7.8315 9.80427 8.31674 9.80761 8.99391H9.80608C9.80274 8.31776 9.79499 7.83334 9.78048 7.70938C9.75316 7.479 9.68031 7.34318 9.60594 7.2641H7.37791C7.16999 7.2641 7 7.45493 7 7.69219V8.99391V15.1024Z",fill:"#F9F9F9"}),(0,qt.jsx)("path",{d:"M9.69238 3.98966H8.89238V4.65311L9.54438 4.77585L9.69238 3.98966ZM10.0233 4.71129H9.22325V5.16187L9.60858 5.39543L10.0233 4.71129ZM9.80719 6.55653V5.75653H9.03633L9.00774 6.52686L9.80719 6.55653ZM9.90036 6.94328L9.27432 7.44136L9.27432 7.44136L9.90036 6.94328ZM10.2327 7.17366L10.2327 7.97366L10.537 6.43378L10.2327 7.17366ZM9.09445 7.17366L9.09445 7.97366L9.09445 7.97366L9.09445 7.17366ZM8.72716 7.17366L8.72716 6.37366L8.72716 6.37366L8.72716 7.17366ZM7.58886 7.17366L7.28461 6.43378L7.58886 7.97366L7.58886 7.17366ZM7.92124 6.94328L7.29521 6.44521L7.29521 6.44521L7.92124 6.94328ZM8.01434 6.55455L8.81369 6.52234L8.78587 5.832L8.09883 5.75903L8.01434 6.55455ZM7.8787 4.70346L8.26484 5.4041L8.6787 5.17601V4.70346H7.8787ZM8.24143 3.98516L8.31697 4.78158L9.04143 4.71287V3.98516H8.24143ZM10.7607 2.19527L9.96116 2.22147L9.98652 2.99527H10.7607V2.19527ZM11.4933 2.31175L10.7169 2.50466L10.8678 3.11175H11.4933V2.31175ZM14.0306 2.31175V3.11175H14.407L14.6469 2.82182L14.0306 2.31175ZM14.062 2.27376L14.6784 2.78383L14.681 2.78058L14.062 2.27376ZM14.4339 2.06229L14.3312 1.26891L14.3288 1.26923L14.4339 2.06229ZM14.7526 2.02103L14.6562 1.22683L14.6499 1.22765L14.7526 2.02103ZM14.7822 2.02447L14.5057 2.77517L14.6396 2.82447H14.7822V2.02447ZM14.7865 3.02679V2.22679H14.6156L14.4596 2.29662L14.7865 3.02679ZM14.7526 3.03195L14.6499 3.82535L14.6562 3.82612L14.7526 3.03195ZM14.4339 2.99069L14.3276 3.78361L14.3312 3.78407L14.4339 2.99069ZM14.062 2.77922L13.4457 3.28928L13.4469 3.29074L14.062 2.77922ZM14.0309 2.74157L14.6472 2.2315L14.4072 1.94157H14.0309V2.74157ZM11.4922 2.74157V1.94157H10.8829L10.721 2.529L11.4922 2.74157ZM10.7609 2.85375V2.05375H9.96086V2.85375H10.7609ZM9.78047 15.8825L8.98047 15.8824L8.98039 17.9978L10.3802 16.4119L9.78047 15.8825ZM9.78507 15.1024V14.3024H8.99038L8.98509 15.0971L9.78507 15.1024ZM9.78199 15.8808L10.3818 16.4102L10.582 16.1833V15.8808H9.78199ZM9.78658 15.1024L10.5866 15.1077L10.5919 14.3024H9.78658V15.1024ZM9.45416 17.0002V17.8002H9.87579L10.1141 17.4524L9.45416 17.0002ZM9.45551 16.9983V16.1983H9.03388L8.79556 16.5461L9.45551 16.9983ZM10.8232 15.1024V14.3024H10.0232V15.1024H10.8232ZM10.8277 15.1024V15.9024H11.6277V15.1024H10.8277ZM10.8277 8.99391H11.6277V8.19391H10.8277V8.99391ZM10.8232 8.99391H10.0232V9.79391H10.8232V8.99391ZM9.60745 7.26214V6.46214H7.78393L9.01881 7.80389L9.60745 7.26214ZM9.78199 7.70742L10.5766 7.61435L10.5764 7.61322L9.78199 7.70742ZM9.80761 8.99391V9.79391H10.6116L10.6076 8.98997L9.80761 8.99391ZM9.80608 8.99391L9.00609 8.99786L9.01002 9.79391H9.80608V8.99391ZM9.78048 7.70938L10.575 7.61631L10.5749 7.61518L9.78048 7.70938ZM9.60594 7.2641L10.1887 6.71606L9.9518 6.4641H9.60594V7.2641ZM10.8233 4.4323C10.8233 3.88965 10.4661 3.32125 9.84038 3.20346L9.54438 4.77585C9.29383 4.72868 9.22325 4.53016 9.22325 4.4323H10.8233ZM10.8233 4.71129V4.4323H9.22325V4.71129H10.8233ZM11.0328 5.1072C11.0328 4.67804 10.82 4.25875 10.4379 4.02715L9.60858 5.39543C9.47585 5.31498 9.43276 5.19359 9.43276 5.1072H11.0328ZM11.0328 6.10781V5.1072H9.43276V6.10781H11.0328ZM9.83663 7.35653C10.5881 7.35653 11.0328 6.70081 11.0328 6.10781H9.43276C9.43276 6.04161 9.45644 5.96426 9.51699 5.89566C9.57889 5.82555 9.6903 5.75653 9.83663 5.75653V7.35653ZM9.80719 7.35653H9.83663V5.75653H9.80719V7.35653ZM10.5264 6.44521C10.572 6.5025 10.5916 6.55146 10.5988 6.57171C10.6029 6.58334 10.6051 6.59178 10.6062 6.59625C10.6068 6.59862 10.6071 6.60036 10.6073 6.60142C10.6075 6.60249 10.6076 6.60306 10.6076 6.60311C10.6076 6.60318 10.6076 6.60288 10.6075 6.60222C10.6074 6.60157 10.6073 6.60068 10.6072 6.59958C10.607 6.59728 10.6069 6.5947 10.6068 6.59204C10.6066 6.58638 10.6067 6.58351 10.6066 6.58621L9.00774 6.52686C9.00575 6.58032 9.00408 6.70177 9.02606 6.8453C9.04517 6.97008 9.09688 7.21832 9.27432 7.44136L10.5264 6.44521ZM10.2327 7.17366C10.537 6.43378 10.5371 6.43383 10.5373 6.43388C10.5373 6.4339 10.5374 6.43395 10.5375 6.43399C10.5377 6.43406 10.5378 6.43413 10.538 6.43419C10.5383 6.43433 10.5386 6.43446 10.5389 6.43458C10.5395 6.43483 10.5401 6.43507 10.5406 6.43528C10.5416 6.43571 10.5425 6.43607 10.5432 6.43636C10.5446 6.43694 10.5453 6.43726 10.5454 6.43733C10.5457 6.43744 10.5438 6.43662 10.5404 6.43498C10.5329 6.43144 10.5216 6.42573 10.5097 6.41878C10.469 6.39515 10.4885 6.39762 10.5264 6.44521L9.27432 7.44136C9.42298 7.62821 9.60876 7.74586 9.70654 7.80261C9.76381 7.83585 9.81482 7.86162 9.85239 7.87952C9.87145 7.88859 9.88778 7.89599 9.90058 7.90163C9.907 7.90445 9.9126 7.90687 9.91726 7.90885C9.9196 7.90984 9.92171 7.91073 9.92358 7.91151C9.92452 7.91191 9.9254 7.91227 9.92622 7.91261C9.92663 7.91278 9.92702 7.91294 9.9274 7.9131C9.92759 7.91318 9.92777 7.91325 9.92796 7.91333C9.92805 7.91337 9.92818 7.91342 9.92823 7.91344C9.92836 7.9135 9.92849 7.91355 10.2327 7.17366ZM9.09445 7.97366L10.2327 7.97366L10.2327 6.37366L9.09445 6.37366L9.09445 7.97366ZM8.72716 7.97366L9.09445 7.97366L9.09445 6.37366L8.72716 6.37366L8.72716 7.97366ZM7.58886 7.97366L8.72716 7.97366L8.72716 6.37366L7.58886 6.37366L7.58886 7.97366ZM7.29521 6.44521C7.33307 6.39762 7.35265 6.39515 7.31195 6.41878C7.29997 6.42573 7.28866 6.43144 7.28122 6.43498C7.27778 6.43663 7.27592 6.43744 7.27618 6.43733C7.27632 6.43726 7.27705 6.43695 7.27842 6.43636C7.2791 6.43607 7.27995 6.43571 7.28098 6.43528C7.2815 6.43507 7.28205 6.43483 7.28266 6.43458C7.28296 6.43446 7.28327 6.43433 7.2836 6.4342C7.28376 6.43413 7.28393 6.43406 7.2841 6.43399C7.28418 6.43396 7.28431 6.4339 7.28435 6.43389C7.28448 6.43383 7.28461 6.43378 7.58886 7.17366C7.89312 7.91355 7.89325 7.9135 7.89338 7.91344C7.89343 7.91342 7.89356 7.91337 7.89365 7.91333C7.89383 7.91325 7.89402 7.91318 7.89421 7.9131C7.89459 7.91294 7.89498 7.91278 7.89539 7.91261C7.89621 7.91227 7.89708 7.91191 7.89802 7.91151C7.89989 7.91073 7.902 7.90984 7.90434 7.90885C7.90901 7.90687 7.9146 7.90445 7.92102 7.90163C7.93383 7.89599 7.95015 7.88859 7.96921 7.87952C8.00679 7.86162 8.05779 7.83585 8.11507 7.80261C8.21285 7.74586 8.39863 7.62821 8.54728 7.44136L7.29521 6.44521ZM7.21499 6.58677C7.21485 6.58327 7.21504 6.58581 7.21485 6.59145C7.21464 6.5976 7.21416 6.60193 7.21398 6.60313C7.21362 6.6055 7.21496 6.59405 7.22248 6.57263C7.22949 6.55267 7.24909 6.50318 7.29521 6.44521L8.54728 7.44136C8.72672 7.21582 8.7778 6.96419 8.79643 6.83945C8.81797 6.69522 8.81577 6.57378 8.81369 6.52234L7.21499 6.58677ZM6.85566 6.10781C6.85566 6.6726 7.2488 7.27775 7.92985 7.35008L8.09883 5.75903C8.23304 5.77328 8.32879 5.84236 8.38173 5.90786C8.43452 5.97317 8.45566 6.04515 8.45566 6.10781H6.85566ZM6.85566 5.1072V6.10781H8.45566V5.1072H6.85566ZM7.49256 4.00282C7.08358 4.22822 6.85566 4.66375 6.85566 5.1072H8.45566C8.45566 5.19561 8.40974 5.32424 8.26484 5.4041L7.49256 4.00282ZM7.0787 4.4323V4.70346H8.6787V4.4323H7.0787ZM8.1659 3.18873C7.47754 3.25402 7.0787 3.86447 7.0787 4.4323H8.6787C8.6787 4.49586 8.6571 4.56834 8.60375 4.63371C8.55022 4.6993 8.453 4.76868 8.31697 4.78158L8.1659 3.18873ZM7.44143 3.29976V3.98516H9.04143V3.29976H7.44143ZM8.06234 3.89689C7.62835 3.89689 7.44143 3.53318 7.44143 3.29976H9.04143C9.04143 2.84283 8.69364 2.29689 8.06234 2.29689V3.89689ZM7.8787 3.89689H8.06234V2.29689H7.8787V3.89689ZM6.8996 2.89401C6.8996 3.35094 7.2474 3.89689 7.8787 3.89689V2.29689C8.31269 2.29689 8.4996 2.66059 8.4996 2.89401H6.8996ZM6.8996 2.20287V2.89401H8.4996V2.20287H6.8996ZM7.8787 1.2C7.2474 1.2 6.8996 1.74594 6.8996 2.20287H8.4996C8.4996 2.4363 8.31269 2.8 7.8787 2.8V1.2ZM10.5818 1.2H7.8787V2.8H10.5818V1.2ZM11.5603 2.16908C11.5457 1.72326 11.1979 1.2 10.5818 1.2V2.8C10.1584 2.8 9.96868 2.45078 9.96116 2.22147L11.5603 2.16908ZM11.3575 1.39527H10.7607V2.99527H11.3575V1.39527ZM12.2697 2.11885C12.1822 1.76646 11.8585 1.39527 11.3575 1.39527V2.99527C10.9857 2.99527 10.7711 2.72262 10.7169 2.50466L12.2697 2.11885ZM14.0306 1.51175H11.4933V3.11175H14.0306V1.51175ZM13.4457 1.7637L13.4143 1.80169L14.6469 2.82182L14.6784 2.78382L13.4457 1.7637ZM14.3288 1.26923C13.9767 1.3159 13.6637 1.49746 13.4431 1.76693L14.681 2.78058C14.6546 2.8128 14.6058 2.8465 14.539 2.85535L14.3288 1.26923ZM14.6499 1.22765L14.3312 1.26891L14.5366 2.85567L14.8553 2.81441L14.6499 1.22765ZM15.0587 1.27376C14.9336 1.22768 14.7959 1.2099 14.6562 1.22685L14.849 2.8152C14.7301 2.82963 14.6124 2.81447 14.5057 2.77517L15.0587 1.27376ZM14.8998 1.22447H14.7822V2.82447H14.8998V1.22447ZM15.8 2.13794C15.8 1.73919 15.4959 1.22447 14.8998 1.22447V2.82447C14.416 2.82447 14.2 2.4129 14.2 2.13794H15.8ZM15.8 2.91332V2.13794H14.2V2.91332H15.8ZM14.8998 3.82679C15.4798 3.82679 15.8 3.3304 15.8 2.91332H14.2C14.2 2.62346 14.4292 2.22679 14.8998 2.22679V3.82679ZM14.7865 3.82679H14.8998V2.22679H14.7865V3.82679ZM14.6562 3.82612C14.8187 3.84585 14.9762 3.81838 15.1134 3.75696L14.4596 2.29662C14.5761 2.24448 14.7105 2.22097 14.849 2.23778L14.6562 3.82612ZM14.3312 3.78407L14.6499 3.82533L14.8553 2.23857L14.5366 2.19731L14.3312 3.78407ZM13.4469 3.29074C13.6663 3.55457 13.9762 3.73651 14.3276 3.7836L14.5401 2.19777C14.6093 2.20704 14.655 2.24112 14.6771 2.2677L13.4469 3.29074ZM13.4146 3.25163L13.4457 3.28928L14.6784 2.26916L14.6472 2.2315L13.4146 3.25163ZM11.4922 3.54157H14.0309V1.94157H11.4922V3.54157ZM11.3575 3.65375C11.8472 3.65375 12.1688 3.29754 12.2635 2.95413L10.721 2.529C10.7798 2.31561 10.9942 2.05375 11.3575 2.05375V3.65375ZM10.7609 3.65375H11.3575V2.05375H10.7609V3.65375ZM11.5609 2.89401V2.85375H9.96086V2.89401H11.5609ZM10.5818 3.89689C11.2131 3.89689 11.5609 3.35094 11.5609 2.89401H9.96086C9.96086 2.66059 10.1478 2.29689 10.5818 2.29689V3.89689ZM9.87147 3.89689H10.5818V2.29689H9.87147V3.89689ZM10.4924 3.29976C10.4924 3.53318 10.3055 3.89689 9.87147 3.89689V2.29689C9.24017 2.29689 8.89238 2.84283 8.89238 3.29976H10.4924ZM10.4924 3.98966V3.29976H8.89238V3.98966H10.4924ZM10.5805 15.8825C10.5805 15.8012 10.5823 15.5226 10.5851 15.1077L8.98509 15.0971C8.98236 15.5073 8.98048 15.7941 8.98047 15.8824L10.5805 15.8825ZM9.18222 15.3514L9.18071 15.3531L10.3802 16.4119L10.3818 16.4102L9.18222 15.3514ZM8.9866 15.0971C8.98387 15.5066 8.98199 15.7929 8.98199 15.8808H10.582C10.582 15.7999 10.5838 15.522 10.5866 15.1077L8.9866 15.0971ZM9.78507 15.9024H9.78658V14.3024H9.78507V15.9024ZM6.2 15.1024V16.5721H7.8V15.1024H6.2ZM6.2 16.5721C6.2 17.1507 6.63388 17.8002 7.37791 17.8002V16.2002C7.5296 16.2002 7.64578 16.272 7.71089 16.3459C7.77438 16.418 7.8 16.5002 7.8 16.5721H6.2ZM7.37791 17.8002H9.45416V16.2002H7.37791V17.8002ZM10.1141 17.4524L10.1155 17.4505L8.79556 16.5461L8.79422 16.5481L10.1141 17.4524ZM9.45551 17.7983H10.4452V16.1983H9.45551V17.7983ZM10.4452 17.7983C11.1839 17.7983 11.6232 17.1548 11.6232 16.5702H10.0232C10.0232 16.4982 10.049 16.4154 10.1132 16.3429C10.1783 16.2693 10.2941 16.1983 10.4452 16.1983V17.7983ZM11.6232 16.5702V15.1024H10.0232V16.5702H11.6232ZM10.8232 15.9024H10.8277V14.3024H10.8232V15.9024ZM11.6277 15.1024V8.99391H10.0277V15.1024H11.6277ZM10.8277 8.19391H10.8232V9.79391H10.8277V8.19391ZM11.6232 8.99391V7.69023H10.0232V8.99391H11.6232ZM11.6232 7.69023C11.6232 7.11172 11.1893 6.46214 10.4452 6.46214V8.06214C10.2936 8.06214 10.1774 7.99042 10.1123 7.91647C10.0488 7.84434 10.0232 7.76216 10.0232 7.69023H11.6232ZM10.4452 6.46214H9.60745V8.06214H10.4452V6.46214ZM9.01881 7.80389C9.00655 7.79057 8.99684 7.77771 8.98947 7.76625C8.98214 7.75486 8.97822 7.74656 8.97663 7.74284C8.97344 7.73536 8.98154 7.75086 8.98756 7.80163L10.5764 7.61322C10.5331 7.24756 10.4044 6.94668 10.1961 6.72038L9.01881 7.80389ZM8.98742 7.80049C8.987 7.79683 8.98939 7.82187 8.99225 7.89624C8.99479 7.96242 8.9971 8.0501 8.99914 8.15832C9.00321 8.37432 9.00595 8.66066 9.00761 8.99785L10.6076 8.98997C10.6044 8.34461 10.5978 7.79581 10.5766 7.61435L8.98742 7.80049ZM9.80761 8.19391H9.80608V9.79391H9.80761V8.19391ZM10.6061 8.98996C10.6029 8.3456 10.5963 7.79764 10.575 7.61631L8.98591 7.80245C8.98548 7.79878 8.98787 7.82377 8.99072 7.89801C8.99326 7.96408 8.99557 8.05162 8.99761 8.15965C9.00168 8.37531 9.00442 8.66119 9.00609 8.99786L10.6061 8.98996ZM10.5749 7.61518C10.5321 7.25448 10.4051 6.94616 10.1887 6.71606L9.02314 7.81213C9.00792 7.79595 8.99661 7.78091 8.98853 7.76838C8.98048 7.7559 8.97633 7.74702 8.97478 7.74337C8.97172 7.73618 8.97997 7.75235 8.98604 7.80359L10.5749 7.61518ZM9.60594 6.4641H7.37791V8.0641H9.60594V6.4641ZM7.37791 6.4641C6.63928 6.4641 6.2 7.10756 6.2 7.69219H7.8C7.8 7.76418 7.77412 7.84701 7.71 7.91944C7.64482 7.99307 7.5291 8.0641 7.37791 8.0641V6.4641ZM6.2 7.69219V8.99391H7.8V7.69219H6.2ZM6.2 8.99391V15.1024H7.8V8.99391H6.2Z",fill:"#303F9F",mask:"url(#path-5-outside-1_2305_2625)"})]}),Dc=()=>(0,qt.jsxs)("svg",{width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,qt.jsxs)("g",{clipPath:"url(#clip0_2303_2600)",children:[(0,qt.jsx)("path",{d:"M7.609 18.0008H12.375C12.8829 18.0008 13.2952 17.5852 13.2952 17.0732V16.4512H6.68878V17.0732C6.68878 17.5852 7.10102 18.0008 7.609 18.0008Z",fill:"url(#paint0_linear_2303_2600)"}),(0,qt.jsx)("path",{d:"M11.4867 1H8.40159C7.73404 1 7.18882 1.5496 7.18882 2.22252V2.39142H12.6995V2.22252C12.6995 1.5496 12.1543 1 11.4867 1Z",fill:"#303F9F"}),(0,qt.jsx)("path",{d:"M11.8583 4.9541C11.8552 4.91958 11.8526 4.88581 11.8504 4.85313H8.15049C8.14842 4.88595 8.14586 4.91987 8.1427 4.95453C8.12996 5.09455 8.10669 5.25649 8.06296 5.41197C8.02094 5.56134 7.95041 5.74042 7.82156 5.88391C7.63663 6.08985 7.38135 6.25114 7.1977 6.35348C7.10145 6.40711 7.01519 6.44979 6.95269 6.47922C6.92132 6.494 6.8956 6.50558 6.87722 6.51369L6.86171 6.52044L6.86254 6.52227C6.58787 6.64731 6.39734 6.92376 6.39734 7.24669V16.1823C6.39734 16.624 6.75318 16.9781 7.18351 16.9781H12.8138C13.2462 16.9781 13.6 16.6246 13.6 16.1823V7.24669C13.6 6.92376 13.4095 6.64731 13.1348 6.52227L13.1354 6.51929L13.1246 6.51464C13.106 6.50658 13.0801 6.49506 13.0486 6.48036C12.9856 6.45107 12.8989 6.40855 12.8021 6.35493C12.6178 6.25277 12.3607 6.09068 12.176 5.88122C12.0495 5.73769 11.9798 5.55947 11.938 5.41038C11.8946 5.25526 11.8713 5.09379 11.8583 4.9541Z",fill:"white",stroke:"#303F9F",strokeWidth:"0.8"}),(0,qt.jsx)("path",{d:"M7.94423 3.69922H12.0426C12.2306 3.69922 12.3831 3.85286 12.3831 4.04238V4.4767C12.3831 4.66622 12.2306 4.81986 12.0426 4.81986H7.94423C7.75622 4.81986 7.6038 4.66622 7.6038 4.4767V4.04238C7.6038 3.85286 7.75622 3.69922 7.94423 3.69922Z",fill:"#E3E5EA"}),(0,qt.jsx)("path",{d:"M7.6356 1.70312H12.2819C12.5242 1.70312 12.7207 1.90118 12.7207 2.14548V3.77819C12.7207 4.0225 12.5242 4.22055 12.2819 4.22055H7.6356C7.39324 4.22055 7.19677 4.0225 7.19677 3.77819V2.14548C7.19677 1.90118 7.39324 1.70312 7.6356 1.70312Z",fill:"#303F9F"}),(0,qt.jsx)("path",{d:"M12.3351 3.97097C12.4122 3.97097 12.4761 3.90663 12.4761 3.82888V2.12647C12.4761 2.04872 12.4122 1.98438 12.3351 1.98438C12.258 1.98438 12.1942 2.04872 12.1942 2.12647V3.82888C12.1942 3.90663 12.258 3.97097 12.3351 3.97097Z",fill:"white"}),(0,qt.jsx)("path",{d:"M11.7472 3.97097C11.8244 3.97097 11.8882 3.90663 11.8882 3.82888V2.12647C11.8882 2.04872 11.8244 1.98438 11.7472 1.98438C11.6701 1.98438 11.6063 2.04872 11.6063 2.12647V3.82888C11.6063 3.90663 11.6701 3.97097 11.7472 3.97097Z",fill:"white"}),(0,qt.jsx)("path",{d:"M11.1623 3.97097C11.2394 3.97097 11.3032 3.90663 11.3032 3.82888V2.12647C11.3032 2.04872 11.2394 1.98438 11.1623 1.98438C11.0851 1.98438 11.0213 2.04872 11.0213 2.12647V3.82888C11.0213 3.90663 11.0851 3.97097 11.1623 3.97097Z",fill:"white"}),(0,qt.jsx)("path",{d:"M10.5771 3.97097C10.6542 3.97097 10.718 3.90663 10.718 3.82888V2.12647C10.718 2.04872 10.6542 1.98438 10.5771 1.98438C10.4999 1.98438 10.4361 2.04872 10.4361 2.12647V3.82888C10.4361 3.90663 10.4999 3.97097 10.5771 3.97097Z",fill:"white"}),(0,qt.jsx)("path",{d:"M9.98941 3.97097C10.0665 3.97097 10.1304 3.90663 10.1304 3.82888V2.12647C10.1304 2.04872 10.0665 1.98438 9.98941 1.98438C9.91229 1.98438 9.84846 2.04872 9.84846 2.12647V3.82888C9.84846 3.90663 9.91229 3.97097 9.98941 3.97097Z",fill:"white"}),(0,qt.jsx)("path",{d:"M9.40421 3.97097C9.48134 3.97097 9.54517 3.90663 9.54517 3.82888V2.12647C9.54517 2.04872 9.48134 1.98438 9.40421 1.98438C9.32708 1.98438 9.26325 2.04872 9.26325 2.12647V3.82888C9.26325 3.90663 9.32708 3.97097 9.40421 3.97097Z",fill:"white"}),(0,qt.jsx)("path",{d:"M8.819 3.97097C8.89613 3.97097 8.95996 3.90663 8.95996 3.82888V2.12647C8.95996 2.04872 8.89613 1.98438 8.819 1.98438C8.74188 1.98438 8.67805 2.04872 8.67805 2.12647V3.82888C8.67805 3.90663 8.74188 3.97097 8.819 3.97097Z",fill:"white"}),(0,qt.jsx)("path",{d:"M8.23136 3.97097C8.30848 3.97097 8.37231 3.90663 8.37231 3.82888V2.12647C8.37231 2.04872 8.30848 1.98438 8.23136 1.98438C8.15423 1.98438 8.0904 2.04872 8.0904 2.12647V3.82888C8.0904 3.90663 8.15423 3.97097 8.23136 3.97097Z",fill:"white"}),(0,qt.jsx)("path",{d:"M7.64615 3.97097C7.72328 3.97097 7.78711 3.90663 7.78711 3.82888V2.12647C7.78711 2.04872 7.72328 1.98438 7.64615 1.98438C7.56902 1.98438 7.50519 2.04872 7.50519 2.12647V3.82888C7.50519 3.90663 7.56902 3.97097 7.64615 3.97097Z",fill:"white"})]}),(0,qt.jsxs)("defs",{children:[(0,qt.jsxs)("linearGradient",{id:"paint0_linear_2303_2600",x1:"13.5701",y1:"17.2116",x2:"6.94399",y2:"17.2116",gradientUnits:"userSpaceOnUse",children:[(0,qt.jsx)("stop",{stopColor:"#A7B3C1"}),(0,qt.jsx)("stop",{offset:"0.21",stopColor:"#C1C9D3"}),(0,qt.jsx)("stop",{offset:"0.5",stopColor:"#DFE3E7"}),(0,qt.jsx)("stop",{offset:"0.75",stopColor:"#F2F3F4"}),(0,qt.jsx)("stop",{offset:"0.93",stopColor:"#F9F9F9"})]}),(0,qt.jsx)("clipPath",{id:"clip0_2303_2600",children:(0,qt.jsx)("rect",{width:"8",height:"17",fill:"white",transform:"matrix(-1 0 0 1 14 1)"})})]})]}),Nc=()=>(0,qt.jsxs)("svg",{width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,qt.jsx)("g",{clipPath:"url(#clip0_2296_2765)",children:(0,qt.jsx)("path",{d:"M16.5898 3C16.3633 3 16.1797 3.18364 16.1797 3.41016V14.8328C16.1797 15.5754 15.5751 16.1797 14.8321 16.1797H10.8792C10.1348 16.1797 9.53149 15.5796 9.53149 14.8325V14.7365C9.91849 14.6062 10.2239 14.2967 10.3488 13.9073C11.9722 13.7452 13.2709 12.4646 13.4611 10.8495H14.8325C15.0591 10.8495 15.2427 10.6658 15.2427 10.4393V8.68203C15.2427 8.45552 15.0591 8.27188 14.8325 8.27188H13.4854V7.03151C13.4854 6.57839 13.3009 6.13318 12.9783 5.80913L10.9095 3.74137C10.4314 3.26329 9.7964 3 9.12134 3C8.4547 3 7.80216 3.27021 7.33122 3.74113L5.26116 5.81012C4.93624 6.13655 4.75727 6.5703 4.75727 7.03151V8.27188H3.41016C3.18364 8.27188 3 8.45552 3 8.68203V10.4393C3 10.6658 3.18364 10.8495 3.41016 10.8495H4.78155C4.97176 12.4646 6.27053 13.7452 7.89393 13.9073C8.01884 14.2967 8.32418 14.6062 8.71118 14.7365V14.8325C8.71118 16.0344 9.68281 17 10.8792 17H14.832C16.0275 17 17 16.0278 17 14.8328V3.41016C17 3.18364 16.8164 3 16.5898 3ZM13.4854 9.09219H14.4224V10.0292H13.4854V9.09219ZM4.7573 10.0291H3.82031V9.09219H4.7573V10.0291ZM9.58984 10.9078H8.65286V9.97082H9.58984V10.9078ZM7.83254 9.5607V13.0729C6.55707 12.875 5.57759 11.7694 5.57759 10.4393V7.03151C5.57759 6.7887 5.67168 6.56046 5.84154 6.3898L7.91105 4.32139C8.22952 4.00297 8.67066 3.82031 9.12134 3.82031C9.57727 3.82031 10.0063 3.99827 10.3296 4.32161L12.398 6.38882C12.5677 6.55936 12.6651 6.79362 12.6651 7.03151V10.4393C12.6651 11.7694 11.6857 12.875 10.4102 13.0729V9.5607C10.4102 9.33418 10.2265 9.15054 10 9.15054H8.2427C8.01618 9.15054 7.83254 9.33415 7.83254 9.5607ZM8.65286 11.7281H9.58984V13.5146C9.58984 13.7729 9.37965 13.9831 9.12134 13.9831C8.86302 13.9831 8.65286 13.7729 8.65286 13.5146V11.7281Z",fill:"#303F9F"})}),(0,qt.jsx)("defs",{children:(0,qt.jsx)("clipPath",{id:"clip0_2296_2765",children:(0,qt.jsx)("rect",{width:"14",height:"14",fill:"white",transform:"translate(3 3)"})})})]}),Lc=()=>(0,qt.jsxs)("svg",{width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,qt.jsxs)("g",{clipPath:"url(#clip0_2197_2888)",children:[(0,qt.jsx)("path",{d:"M6 2H13V2.50799H6V2Z",fill:"#303F9F"}),(0,qt.jsx)("path",{d:"M6 2.50781H13V2.77202H6V2.50781Z",fill:"#F9F9F9"}),(0,qt.jsx)("path",{d:"M9.46283 2.75195H9.5H9.53717L13 2.77166L12.4755 4.71456L12.4456 6.33924L11.6965 15.9508C11.6965 15.9508 11.412 16.1136 11.2019 16.1537C10.831 16.2252 8.17063 16.2252 7.7997 16.1537C7.58959 16.1128 7.30513 15.9508 7.30513 15.9508L6.55599 6.33924L6.52609 4.71456L6.00162 2.77166L9.46363 2.75195H9.46283Z",fill:"#E3E5EA"}),(0,qt.jsx)("path",{d:"M7.30424 15.9492H11.6956L11.7029 17.452V18.3724C11.7029 18.3724 11.3279 19.0964 8.95282 18.9884C7.53133 18.9234 7.29697 18.3724 7.29697 18.3724V17.452L7.30424 15.9492Z",fill:"#303F9F"}),(0,qt.jsx)("path",{d:"M7.30444 15.9424C7.30444 16.0512 8.28793 16.1388 9.50012 16.1388C10.7123 16.1388 11.6958 16.0512 11.6958 15.9424C11.6958 15.8337 10.7123 15.7461 9.50012 15.7461C8.28793 15.7461 7.30444 15.8337 7.30444 15.9424Z",fill:"#E3E5EA"})]}),(0,qt.jsx)("defs",{children:(0,qt.jsx)("clipPath",{id:"clip0_2197_2888",children:(0,qt.jsx)("rect",{width:"7",height:"17",fill:"white",transform:"matrix(-1 0 0 1 13 2)"})})})]});function Ic(){return(0,qt.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",children:[(0,qt.jsxs)("g",{clipPath:"url(#clip0_4502_9420)",children:[(0,qt.jsx)("mask",{id:"mask0_4502_9420",maskUnits:"userSpaceOnUse",x:"0",y:"0",width:"20",height:"20",children:(0,qt.jsx)("path",{d:"M20 0H0V20H20V0Z",fill:"white"})}),(0,qt.jsxs)("g",{mask:"url(#mask0_4502_9420)",children:[(0,qt.jsx)("mask",{id:"mask1_4502_9420",maskUnits:"userSpaceOnUse",x:"0",y:"0",width:"20",height:"20",children:(0,qt.jsx)("path",{d:"M0 1.90735e-06H20V20H0V1.90735e-06Z",fill:"white"})}),(0,qt.jsx)("g",{mask:"url(#mask1_4502_9420)",children:(0,qt.jsx)("path",{d:"M17.5 18.7109L18.7563 17.4745C19.3729 16.8629 19.3729 15.8714 18.7563 15.2599L17.5 14.0234M18.8281 16.3672H12.8516M14.5703 8.75L13.314 9.98649C12.6974 10.598 12.6974 11.5895 13.314 12.201L14.5703 13.4375M13.2422 11.0938H19.2187M3.90191 11.7188H6.875M3.90191 8.59375H10.4687M11.9488 5.46875H3.90191M11.6016 19.2188H3.125C1.83059 19.2188 0.78125 18.1694 0.78125 16.875V3.125C0.78125 1.83059 1.83059 0.781252 3.125 0.781252H12.73C14.0245 0.781252 15.0738 1.83059 15.0738 3.125V5.97656",stroke:"#4B5563",strokeMiterlimit:"10",strokeLinecap:"round",strokeLinejoin:"round"})})]})]}),(0,qt.jsx)("defs",{children:(0,qt.jsx)("clipPath",{id:"clip0_4502_9420",children:(0,qt.jsx)("rect",{width:"20",height:"20",fill:"white"})})})]})}function Fc(){return(0,qt.jsxs)("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,qt.jsx)("path",{d:"M23.0748 3.6916L20.8246 1.44159C20.6053 1.22213 20.2493 1.22185 20.0297 1.44132C20.0297 1.44146 20.0296 1.44159 20.0293 1.44159L13.2795 8.19173C13.1739 8.29713 13.1147 8.4401 13.1147 8.58926V10.8394C13.1147 11.15 13.3666 11.4018 13.6771 11.4018H15.9272C16.0764 11.4018 16.2194 11.3426 16.3248 11.2371L23.0748 4.48705C23.2944 4.26758 23.2945 3.91161 23.0752 3.69201C23.075 3.69201 23.075 3.69173 23.0748 3.6916ZM15.6943 10.2769H14.2396V8.82235L20.4271 2.63484L21.8817 4.08939L15.6943 10.2769Z",fill:"#ffffff"}),(0,qt.jsx)("path",{d:"M21.5521 8.02696C21.2416 8.02696 20.9898 8.27877 20.9898 8.58933V16.4643C20.9888 17.3959 20.2338 18.1509 19.3023 18.152H13.6773C13.5555 18.1517 13.437 18.1912 13.3397 18.2644L9.73975 20.9645V18.7145C9.73975 18.4038 9.48794 18.152 9.17725 18.152H3.55225C2.62071 18.1509 1.86571 17.3959 1.86488 16.4645V6.33933C1.86585 5.40793 2.62071 4.65293 3.55225 4.65196H13.6773C13.9879 4.65196 14.2398 4.40016 14.2398 4.08946C14.2398 3.7789 13.9879 3.5271 13.6773 3.5271H3.55225C1.99959 3.52861 0.74126 4.78695 0.739746 6.33933V16.4645C0.74126 18.017 1.99959 19.2753 3.55225 19.277H8.61475V22.0895C8.61475 22.4 8.86655 22.6518 9.17725 22.6518C9.29902 22.6518 9.41736 22.6123 9.51478 22.5394L13.8653 19.2768H19.3023C20.8549 19.2753 22.1131 18.017 22.1148 16.4643V8.58946C22.1148 8.27877 21.8628 8.02696 21.5521 8.02696Z",fill:"#ffffff"}),(0,qt.jsx)("path",{d:"M10.3021 6.9021H4.67738C4.36655 6.9021 4.11475 7.1539 4.11475 7.4646C4.11475 7.77516 4.36655 8.02696 4.67738 8.02696H10.3021C10.6128 8.02696 10.8647 7.77516 10.8647 7.4646C10.8647 7.1539 10.6128 6.9021 10.3021 6.9021Z",fill:"#ffffff"}),(0,qt.jsx)("path",{d:"M4.67738 11.4021H10.3021C10.6128 11.4021 10.8647 11.1502 10.8647 10.8396C10.8647 10.5289 10.6128 10.2771 10.3021 10.2771H4.67738C4.36655 10.2771 4.11475 10.5289 4.11475 10.8396C4.11475 11.1502 4.36655 11.4021 4.67738 11.4021Z",fill:"#ffffff"}),(0,qt.jsx)("path",{d:"M4.67738 14.777H18.1773C18.4879 14.777 18.7396 14.5252 18.7396 14.2145C18.7396 13.9039 18.4878 13.6521 18.1773 13.6521H4.67738C4.36655 13.6521 4.11475 13.9039 4.11475 14.2145C4.11475 14.5252 4.36655 14.777 4.67738 14.777Z",fill:"#ffffff"})]})}function $c(){return(0,qt.jsxs)("svg",{className:"MuiSvgIcon-root",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,qt.jsx)("path",{d:"M6.77171 18.4931L3.7687 21.6943C3.37979 22.1088 2.70825 22.0963 2.3063 21.6943C1.90435 21.2923 1.8915 20.621 2.3063 20.2319L5.51837 17.2188",stroke:"currentColor",strokeMiterlimit:"22.9256",strokeLinecap:"round",strokeLinejoin:"round"}),(0,qt.jsx)("path",{d:"M12.6314 17.8351C14.4172 16.0493 14.4172 13.1538 12.6314 11.368C10.8455 9.58214 7.95009 9.58214 6.16424 11.368C4.37838 13.1538 4.37838 16.0493 6.16424 17.8351C7.95009 19.621 10.8455 19.621 12.6314 17.8351Z",stroke:"currentColor",strokeMiterlimit:"22.9256",strokeLinecap:"round",strokeLinejoin:"round"}),(0,qt.jsx)("path",{d:"M7.77246 10.1234V2H18.3415L22 5.65852V21.1056H7.77246V19.0801",stroke:"currentColor",strokeMiterlimit:"22.9256",strokeLinecap:"round",strokeLinejoin:"round"}),(0,qt.jsx)("path",{d:"M21.797 5.65841H18.3418V2.20312",stroke:"currentColor",strokeMiterlimit:"22.9256",strokeLinecap:"round",strokeLinejoin:"round"}),(0,qt.jsx)("path",{d:"M10.0078 3.8291H16.5119",stroke:"currentColor",strokeMiterlimit:"22.9256",strokeLinecap:"round",strokeLinejoin:"round"}),(0,qt.jsx)("path",{d:"M10.0078 5.6582H13.2598",stroke:"currentColor",strokeMiterlimit:"22.9256",strokeLinecap:"round",strokeLinejoin:"round"}),(0,qt.jsx)("path",{d:"M10.0078 8.19922H20.1704",stroke:"currentColor",strokeMiterlimit:"22.9256",strokeLinecap:"round",strokeLinejoin:"round"}),(0,qt.jsx)("path",{d:"M13.8779 10.0283H20.1707",stroke:"currentColor",strokeMiterlimit:"22.9256",strokeLinecap:"round",strokeLinejoin:"round"}),(0,qt.jsx)("path",{d:"M15.7354 13.6865H20.1709",stroke:"currentColor",strokeMiterlimit:"22.9256",strokeLinecap:"round",strokeLinejoin:"round"}),(0,qt.jsx)("path",{d:"M15.7354 15.5166H17.9531",stroke:"currentColor",strokeMiterlimit:"22.9256",strokeLinecap:"round",strokeLinejoin:"round"}),(0,qt.jsx)("path",{d:"M15.1846 17.3457H20.1712",stroke:"currentColor",strokeMiterlimit:"22.9256",strokeLinecap:"round",strokeLinejoin:"round"}),(0,qt.jsx)("path",{d:"M13.8779 19.1748H15.089",stroke:"currentColor",strokeMiterlimit:"22.9256",strokeLinecap:"round",strokeLinejoin:"round"}),(0,qt.jsx)("path",{d:"M10.7703 13.6865L8.941 15.5158L8.02637 14.6012",stroke:"currentColor",strokeMiterlimit:"22.9256",strokeLinecap:"round",strokeLinejoin:"round"})]})}function Bc(){return(0,qt.jsxs)("svg",{className:"MuiSvgIcon-root",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,qt.jsx)("path",{d:"M2.375 10.6252C2.628 10.6252 2.83334 10.4199 2.83334 10.1669C2.83334 7.4737 3.882 4.94095 5.78684 3.03703C5.96559 2.85828 5.96559 2.5677 5.78684 2.38895C5.60809 2.2102 5.3175 2.2102 5.13875 2.38895C3.06067 4.46611 1.91667 7.22803 1.91667 10.1669C1.91667 10.4199 2.122 10.6252 2.375 10.6252Z",fill:"currentColor",stroke:"currentColor",strokeWidth:"0.2"}),(0,qt.jsx)("path",{d:"M21.6247 10.6252C21.8777 10.6252 22.083 10.4199 22.083 10.1669C22.083 7.22803 20.939 4.46611 18.8609 2.38895C18.6822 2.2102 18.3916 2.2102 18.2128 2.38895C18.0341 2.5677 18.0341 2.85828 18.2128 3.03703C20.1177 4.94095 21.1663 7.4737 21.1663 10.1669C21.1663 10.4199 21.3717 10.6252 21.6247 10.6252Z",fill:"currentColor",stroke:"currentColor",strokeWidth:"0.2"}),(0,qt.jsx)("path",{d:"M10.6247 4.83167C10.8777 4.83167 11.083 4.62633 11.083 4.37333V2.83333C11.083 2.32825 11.4946 1.91667 11.9997 1.91667C12.5048 1.91667 12.9163 2.32825 12.9163 2.83333V4.37333C12.9163 4.62633 13.1217 4.83167 13.3747 4.83167C13.6277 4.83167 13.833 4.62725 13.833 4.37333V2.83333C13.833 1.82225 13.0108 1 11.9997 1C10.9886 1 10.1663 1.82225 10.1663 2.83333V4.37333C10.1663 4.62725 10.3717 4.83167 10.6247 4.83167Z",fill:"currentColor",stroke:"currentColor",strokeWidth:"0.2"}),(0,qt.jsx)("path",{d:"M11.9997 22.9997C13.7688 22.9997 15.208 21.5605 15.208 19.7913C15.208 19.5383 15.0027 19.333 14.7497 19.333C14.4967 19.333 14.2913 19.5383 14.2913 19.7913C14.2913 21.0545 13.2628 22.083 11.9997 22.083C10.7365 22.083 9.70801 21.0545 9.70801 19.7913C9.70801 19.5383 9.50267 19.333 9.24967 19.333C8.99667 19.333 8.79134 19.5383 8.79134 19.7913C8.79134 21.5605 10.2305 22.9997 11.9997 22.9997Z",fill:"currentColor",stroke:"currentColor",strokeWidth:"0.2"}),(0,qt.jsx)("path",{d:"M4.20866 20.25H19.792C20.5501 20.25 21.167 19.6331 21.167 18.875C21.167 18.4726 20.9919 18.0922 20.6857 17.83C19.2411 16.609 18.417 14.8325 18.417 12.9515V10.1667C18.417 6.62833 15.5387 3.75 12.0003 3.75C8.46199 3.75 5.58366 6.62833 5.58366 10.1667V12.9515C5.58366 14.8334 4.75957 16.609 3.32224 17.8236C3.00874 18.0922 2.83366 18.4726 2.83366 18.875C2.83366 19.6331 3.44966 20.25 4.20866 20.25ZM12.0003 4.66667C15.0336 4.66667 17.5003 7.13342 17.5003 10.1667V12.9515C17.5003 15.1038 18.4427 17.1343 20.0862 18.5239C20.1917 18.6138 20.2503 18.7412 20.2503 18.875C20.2503 19.128 20.045 19.3333 19.792 19.3333H4.20866C3.95566 19.3333 3.75032 19.128 3.75032 18.875C3.75032 18.7412 3.80899 18.6138 3.91074 18.5267C5.55707 17.1343 6.50032 15.1029 6.50032 12.9515V10.1667C6.50032 7.13342 8.96707 4.66667 12.0003 4.66667Z",fill:"currentColor",stroke:"currentColor",strokeWidth:"0.2"})]})}function zc(){return(0,qt.jsx)("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:(0,qt.jsx)("path",{d:"M21.25 11.9999H8.895M4.534 11.9999H2.75M4.534 11.9999C4.534 11.4217 4.76368 10.8672 5.17251 10.4584C5.58134 10.0496 6.13583 9.81989 6.714 9.81989C7.29217 9.81989 7.84666 10.0496 8.25549 10.4584C8.66432 10.8672 8.894 11.4217 8.894 11.9999C8.894 12.5781 8.66432 13.1326 8.25549 13.5414C7.84666 13.9502 7.29217 14.1799 6.714 14.1799C6.13583 14.1799 5.58134 13.9502 5.17251 13.5414C4.76368 13.1326 4.534 12.5781 4.534 11.9999ZM21.25 18.6069H15.502M15.502 18.6069C15.502 19.1852 15.2718 19.7403 14.8628 20.1492C14.4539 20.5582 13.8993 20.7879 13.321 20.7879C12.7428 20.7879 12.1883 20.5572 11.7795 20.1484C11.3707 19.7396 11.141 19.1851 11.141 18.6069M15.502 18.6069C15.502 18.0286 15.2718 17.4745 14.8628 17.0655C14.4539 16.6566 13.8993 16.4269 13.321 16.4269C12.7428 16.4269 12.1883 16.6566 11.7795 17.0654C11.3707 17.4742 11.141 18.0287 11.141 18.6069M11.141 18.6069H2.75M21.25 5.39289H18.145M13.784 5.39289H2.75M13.784 5.39289C13.784 4.81472 14.0137 4.26023 14.4225 3.8514C14.8313 3.44257 15.3858 3.21289 15.964 3.21289C16.2503 3.21289 16.5338 3.26928 16.7983 3.37883C17.0627 3.48839 17.3031 3.64897 17.5055 3.8514C17.7079 4.05383 17.8685 4.29415 17.9781 4.55864C18.0876 4.82313 18.144 5.10661 18.144 5.39289C18.144 5.67917 18.0876 5.96265 17.9781 6.22714C17.8685 6.49163 17.7079 6.73195 17.5055 6.93438C17.3031 7.13681 17.0627 7.29739 16.7983 7.40695C16.5338 7.5165 16.2503 7.57289 15.964 7.57289C15.3858 7.57289 14.8313 7.34321 14.4225 6.93438C14.0137 6.52555 13.784 5.97106 13.784 5.39289Z",stroke:"#6B7280",strokeMiterlimit:"10",strokeLinecap:"round"})})}function Hc(){return(0,qt.jsxs)("svg",{className:"MuiSvgIcon-root",width:"24",height:"24",viewBox:"0 0 24 24",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg",children:[(0,qt.jsxs)("g",{clipPath:"url(#clip0_6346_25158)",children:[(0,qt.jsx)("path",{d:"M21.375 3H19.5V2.25C19.5 1.85218 19.342 1.47064 19.0607 1.18934C18.7794 0.908035 18.3978 0.75 18 0.75C17.6022 0.75 17.2206 0.908035 16.9393 1.18934C16.658 1.47064 16.5 1.85218 16.5 2.25V3H13.5V2.25C13.5 1.85218 13.342 1.47064 13.0607 1.18934C12.7794 0.908035 12.3978 0.75 12 0.75C11.6022 0.75 11.2206 0.908035 10.9393 1.18934C10.658 1.47064 10.5 1.85218 10.5 2.25V3H7.5V2.25C7.5 1.85218 7.34196 1.47064 7.06066 1.18934C6.77936 0.908035 6.39782 0.75 6 0.75C5.60218 0.75 5.22064 0.908035 4.93934 1.18934C4.65804 1.47064 4.5 1.85218 4.5 2.25V3H2.625C2.12772 3 1.65081 3.19754 1.29917 3.54917C0.947544 3.90081 0.75 4.37772 0.75 4.875V19.875C0.75 20.3723 0.947544 20.8492 1.29917 21.2008C1.65081 21.5525 2.12772 21.75 2.625 21.75H13.125C13.2245 21.75 13.3198 21.7105 13.3902 21.6402C13.4605 21.5698 13.5 21.4745 13.5 21.375C13.5 21.2755 13.4605 21.1802 13.3902 21.1098C13.3198 21.0395 13.2245 21 13.125 21H2.625C2.32691 20.9991 2.04127 20.8803 1.83049 20.6695C1.6197 20.4587 1.50089 20.1731 1.5 19.875V8.25H22.5V14.625C22.5 14.7245 22.5395 14.8198 22.6098 14.8902C22.6802 14.9605 22.7755 15 22.875 15C22.9745 15 23.0698 14.9605 23.1402 14.8902C23.2105 14.8198 23.25 14.7245 23.25 14.625V4.875C23.25 4.37772 23.0525 3.90081 22.7008 3.54917C22.3492 3.19754 21.8723 3 21.375 3ZM17.25 2.25C17.25 2.05109 17.329 1.86032 17.4697 1.71967C17.6103 1.57902 17.8011 1.5 18 1.5C18.1989 1.5 18.3897 1.57902 18.5303 1.71967C18.671 1.86032 18.75 2.05109 18.75 2.25V4.5C18.75 4.69891 18.671 4.88968 18.5303 5.03033C18.3897 5.17098 18.1989 5.25 18 5.25C17.8011 5.25 17.6103 5.17098 17.4697 5.03033C17.329 4.88968 17.25 4.69891 17.25 4.5V2.25ZM11.25 2.25C11.25 2.05109 11.329 1.86032 11.4697 1.71967C11.6103 1.57902 11.8011 1.5 12 1.5C12.1989 1.5 12.3897 1.57902 12.5303 1.71967C12.671 1.86032 12.75 2.05109 12.75 2.25V4.5C12.75 4.69891 12.671 4.88968 12.5303 5.03033C12.3897 5.17098 12.1989 5.25 12 5.25C11.8011 5.25 11.6103 5.17098 11.4697 5.03033C11.329 4.88968 11.25 4.69891 11.25 4.5V2.25ZM5.25 2.25C5.25 2.05109 5.32902 1.86032 5.46967 1.71967C5.61032 1.57902 5.80109 1.5 6 1.5C6.19891 1.5 6.38968 1.57902 6.53033 1.71967C6.67098 1.86032 6.75 2.05109 6.75 2.25V4.5C6.75 4.69891 6.67098 4.88968 6.53033 5.03033C6.38968 5.17098 6.19891 5.25 6 5.25C5.80109 5.25 5.61032 5.17098 5.46967 5.03033C5.32902 4.88968 5.25 4.69891 5.25 4.5V2.25ZM22.5 7.5H1.5V4.875C1.50089 4.57691 1.6197 4.29127 1.83049 4.08049C2.04127 3.8697 2.32691 3.75089 2.625 3.75H4.5V4.5C4.5 4.89782 4.65804 5.27936 4.93934 5.56066C5.22064 5.84196 5.60218 6 6 6C6.39782 6 6.77936 5.84196 7.06066 5.56066C7.34196 5.27936 7.5 4.89782 7.5 4.5V3.75H10.5V4.5C10.5 4.89782 10.658 5.27936 10.9393 5.56066C11.2206 5.84196 11.6022 6 12 6C12.3978 6 12.7794 5.84196 13.0607 5.56066C13.342 5.27936 13.5 4.89782 13.5 4.5V3.75H16.5V4.5C16.5 4.89782 16.658 5.27936 16.9393 5.56066C17.2206 5.84196 17.6022 6 18 6C18.3978 6 18.7794 5.84196 19.0607 5.56066C19.342 5.27936 19.5 4.89782 19.5 4.5V3.75H21.375C21.6731 3.75089 21.9587 3.8697 22.1695 4.08049C22.3803 4.29127 22.4991 4.57691 22.5 4.875V7.5Z",fill:"currentColor"}),(0,qt.jsx)("path",{d:"M11.25 10.875C11.25 10.6761 11.171 10.4853 11.0303 10.3447C10.8897 10.204 10.6989 10.125 10.5 10.125H9C8.80109 10.125 8.61032 10.204 8.46967 10.3447C8.32902 10.4853 8.25 10.6761 8.25 10.875V12C8.25 12.1989 8.32902 12.3897 8.46967 12.5303C8.61032 12.671 8.80109 12.75 9 12.75H10.5C10.6989 12.75 10.8897 12.671 11.0303 12.5303C11.171 12.3897 11.25 12.1989 11.25 12V10.875ZM9 12V10.875H10.5V12H9Z",fill:"currentColor"}),(0,qt.jsx)("path",{d:"M6.75 10.875C6.75 10.6761 6.67098 10.4853 6.53033 10.3447C6.38968 10.204 6.19891 10.125 6 10.125H4.5C4.30109 10.125 4.11032 10.204 3.96967 10.3447C3.82902 10.4853 3.75 10.6761 3.75 10.875V12C3.75 12.1989 3.82902 12.3897 3.96967 12.5303C4.11032 12.671 4.30109 12.75 4.5 12.75H6C6.19891 12.75 6.38968 12.671 6.53033 12.5303C6.67098 12.3897 6.75 12.1989 6.75 12V10.875ZM4.5 12V10.875H6V12H4.5Z",fill:"currentColor"}),(0,qt.jsx)("path",{d:"M19.5 12.75C19.6989 12.75 19.8897 12.671 20.0303 12.5303C20.171 12.3897 20.25 12.1989 20.25 12V10.875C20.25 10.6761 20.171 10.4853 20.0303 10.3447C19.8897 10.204 19.6989 10.125 19.5 10.125H18C17.8011 10.125 17.6103 10.204 17.4697 10.3447C17.329 10.4853 17.25 10.6761 17.25 10.875V12C17.25 12.1989 17.329 12.3897 17.4697 12.5303C17.6103 12.671 17.8011 12.75 18 12.75H19.5ZM18 10.875H19.5V12H18V10.875Z",fill:"currentColor"}),(0,qt.jsx)("path",{d:"M11.25 14.25C11.25 14.0511 11.171 13.8603 11.0303 13.7197C10.8897 13.579 10.6989 13.5 10.5 13.5H9C8.80109 13.5 8.61032 13.579 8.46967 13.7197C8.32902 13.8603 8.25 14.0511 8.25 14.25V15.375C8.25 15.5739 8.32902 15.7647 8.46967 15.9053C8.61032 16.046 8.80109 16.125 9 16.125H10.5C10.6989 16.125 10.8897 16.046 11.0303 15.9053C11.171 15.7647 11.25 15.5739 11.25 15.375V14.25ZM9 15.375V14.25H10.5V15.375H9Z",fill:"currentColor"}),(0,qt.jsx)("path",{d:"M6.75 14.25C6.75 14.0511 6.67098 13.8603 6.53033 13.7197C6.38968 13.579 6.19891 13.5 6 13.5H4.5C4.30109 13.5 4.11032 13.579 3.96967 13.7197C3.82902 13.8603 3.75 14.0511 3.75 14.25V15.375C3.75 15.5739 3.82902 15.7647 3.96967 15.9053C4.11032 16.046 4.30109 16.125 4.5 16.125H6C6.19891 16.125 6.38968 16.046 6.53033 15.9053C6.67098 15.7647 6.75 15.5739 6.75 15.375V14.25ZM4.5 15.375V14.25H6V15.375H4.5Z",fill:"currentColor"}),(0,qt.jsx)("path",{d:"M10.5 16.875H9C8.80109 16.875 8.61032 16.954 8.46967 17.0947C8.32902 17.2353 8.25 17.4261 8.25 17.625V18.75C8.25 18.9489 8.32902 19.1397 8.46967 19.2803C8.61032 19.421 8.80109 19.5 9 19.5H10.5C10.6989 19.5 10.8897 19.421 11.0303 19.2803C11.171 19.1397 11.25 18.9489 11.25 18.75V17.625C11.25 17.4261 11.171 17.2353 11.0303 17.0947C10.8897 16.954 10.6989 16.875 10.5 16.875ZM9 18.75V17.625H10.5V18.75H9Z",fill:"currentColor"}),(0,qt.jsx)("path",{d:"M13.5 12.75H15C15.1989 12.75 15.3897 12.671 15.5303 12.5303C15.671 12.3897 15.75 12.1989 15.75 12V10.875C15.75 10.6761 15.671 10.4853 15.5303 10.3447C15.3897 10.204 15.1989 10.125 15 10.125H13.5C13.3011 10.125 13.1103 10.204 12.9697 10.3447C12.829 10.4853 12.75 10.6761 12.75 10.875V12C12.75 12.1989 12.829 12.3897 12.9697 12.5303C13.1103 12.671 13.3011 12.75 13.5 12.75ZM13.5 10.875H15V12H13.5V10.875Z",fill:"currentColor"}),(0,qt.jsx)("path",{d:"M12.75 15.375C12.75 15.5739 12.829 15.7647 12.9697 15.9053C13.1103 16.046 13.3011 16.125 13.5 16.125C13.5995 16.125 13.6948 16.0855 13.7652 16.0152C13.8355 15.9448 13.875 15.8495 13.875 15.75C13.875 15.6505 13.8355 15.5552 13.7652 15.4848C13.6948 15.4145 13.5995 15.375 13.5 15.375V14.25H15C15.0995 14.25 15.1948 14.2105 15.2652 14.1402C15.3355 14.0698 15.375 13.9745 15.375 13.875C15.375 13.7755 15.3355 13.6802 15.2652 13.6098C15.1948 13.5395 15.0995 13.5 15 13.5H13.5C13.3011 13.5 13.1103 13.579 12.9697 13.7197C12.829 13.8603 12.75 14.0511 12.75 14.25V15.375Z",fill:"currentColor"}),(0,qt.jsx)("path",{d:"M6 16.875H4.5C4.30109 16.875 4.11032 16.954 3.96967 17.0947C3.82902 17.2353 3.75 17.4261 3.75 17.625V18.75C3.75 18.9489 3.82902 19.1397 3.96967 19.2803C4.11032 19.421 4.30109 19.5 4.5 19.5H6C6.19891 19.5 6.38968 19.421 6.53033 19.2803C6.67098 19.1397 6.75 18.9489 6.75 18.75V17.625C6.75 17.4261 6.67098 17.2353 6.53033 17.0947C6.38968 16.954 6.19891 16.875 6 16.875ZM4.5 18.75V17.625H6V18.75H4.5Z",fill:"currentColor"}),(0,qt.jsx)("path",{d:"M18.375 13.5C17.4108 13.5 16.4683 13.7859 15.6666 14.3216C14.8649 14.8573 14.2401 15.6186 13.8711 16.5094C13.5021 17.4002 13.4056 18.3804 13.5937 19.3261C13.7818 20.2717 14.2461 21.1404 14.9279 21.8221C15.6096 22.5039 16.4783 22.9682 17.4239 23.1563C18.3696 23.3444 19.3498 23.2479 20.2406 22.8789C21.1314 22.5099 21.8927 21.8851 22.4284 21.0834C22.9641 20.2817 23.25 19.3392 23.25 18.375C23.2485 17.0825 22.7344 15.8434 21.8205 14.9295C20.9066 14.0156 19.6675 13.5015 18.375 13.5ZM18.375 22.5C17.5592 22.5 16.7616 22.2581 16.0833 21.8048C15.4049 21.3516 14.8762 20.7073 14.564 19.9536C14.2518 19.1998 14.1701 18.3704 14.3293 17.5703C14.4884 16.7701 14.8813 16.0351 15.4582 15.4582C16.0351 14.8813 16.7701 14.4884 17.5703 14.3293C18.3704 14.1701 19.1998 14.2518 19.9536 14.564C20.7073 14.8762 21.3516 15.4049 21.8048 16.0833C22.2581 16.7616 22.5 17.5592 22.5 18.375C22.4987 19.4686 22.0637 20.5171 21.2904 21.2904C20.5171 22.0637 19.4686 22.4987 18.375 22.5Z",fill:"currentColor"}),(0,qt.jsx)("path",{d:"M20.542 16.803L17.6252 19.7198L16.2996 18.3938C16.2289 18.3255 16.1341 18.2877 16.0358 18.2885C15.9375 18.2894 15.8434 18.3288 15.7739 18.3983C15.7044 18.4679 15.6649 18.5619 15.6641 18.6602C15.6632 18.7586 15.701 18.8533 15.7693 18.924L17.3601 20.5151C17.4304 20.5854 17.5258 20.6249 17.6252 20.6249C17.7246 20.6249 17.82 20.5854 17.8903 20.5151L21.0722 17.3333C21.1405 17.2625 21.1783 17.1678 21.1775 17.0695C21.1766 16.9712 21.1372 16.8771 21.0676 16.8076C20.9981 16.7381 20.9041 16.6986 20.8057 16.6978C20.7074 16.6969 20.6127 16.7347 20.542 16.803Z",fill:"currentColor"})]}),(0,qt.jsx)("defs",{children:(0,qt.jsx)("clipPath",{id:"clip0_6346_25158",children:(0,qt.jsx)("rect",{width:"24",height:"24",fill:"white"})})})]})}function Wc(){return(0,qt.jsxs)("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,qt.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M15.5174 1.43775C16.6841 1.28855 17.8645 1.76567 19.0639 2.89422L19.0653 2.89552C20.2688 4.03361 20.8166 5.1881 20.7344 6.36399C20.655 7.50024 19.9963 8.46195 19.2452 9.2555M19.2452 9.2555L11.0392 17.9412C10.8079 18.1931 10.4964 18.4065 10.2011 18.5643C9.90203 18.7243 9.55607 18.8611 9.23128 18.9189L9.22628 18.9197L6.00743 19.4695C5.22687 19.6041 4.47837 19.409 3.94516 18.9034C3.41271 18.3984 3.17742 17.6621 3.26459 16.8776L3.26484 16.8753L3.63645 13.6213C3.67961 13.2976 3.79982 12.9473 3.94153 12.6435C4.08273 12.3407 4.27538 12.0196 4.50336 11.7769L4.50483 11.7754L12.7148 3.08538C13.4664 2.2915 14.3899 1.58192 15.5174 1.43775M13.8047 4.11605L5.59664 12.8039C5.51467 12.8914 5.40206 13.0607 5.30097 13.2774C5.20171 13.4903 5.14209 13.6872 5.12422 13.8138L4.75541 17.0433L4.7553 17.0443C4.71279 17.4292 4.83242 17.6776 4.97734 17.815C5.12163 17.9518 5.37313 18.0568 5.75257 17.9913L5.75372 17.9911L8.97083 17.4416C9.09611 17.419 9.28912 17.351 9.49388 17.2415C9.70146 17.1306 9.85762 17.0109 9.93578 16.9251L9.94474 16.9153L18.1548 8.22538C18.8235 7.51904 19.195 6.87538 19.2381 6.25939C19.2784 5.68293 19.0414 4.93767 18.0355 3.98613C17.0352 3.04514 16.2808 2.85234 15.7076 2.92563C15.0952 3.00394 14.473 3.41017 13.8047 4.11605Z",fill:"#3F51B5"}),(0,qt.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M11.7745 4.30938C12.1838 4.24561 12.5673 4.52571 12.6311 4.93498C13.0082 7.3556 14.9727 9.20821 17.4152 9.45421C17.8273 9.49572 18.1277 9.86347 18.0862 10.2756C18.0447 10.6877 17.677 10.9882 17.2648 10.9467C14.1473 10.6327 11.6318 8.26527 11.1489 5.16589C11.0852 4.75662 11.3653 4.37314 11.7745 4.30938Z",fill:"#3F51B5"}),(0,qt.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M2.25 22.0004C2.25 21.5862 2.58579 21.2504 3 21.2504H21C21.4142 21.2504 21.75 21.5862 21.75 22.0004C21.75 22.4147 21.4142 22.7504 21 22.7504H3C2.58579 22.7504 2.25 22.4147 2.25 22.0004Z",fill:"#3F51B5"})]})}function Uc(){return(0,qt.jsxs)("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,qt.jsxs)("g",{clipPath:"url(#clip0_6406_28720)",children:[(0,qt.jsx)("path",{d:"M2.97626 21.9999C2.78308 21.9999 2.59424 21.9427 2.43361 21.8354C2.27298 21.7281 2.14779 21.5755 2.07386 21.3971C1.99993 21.2186 1.98059 21.0222 2.01829 20.8328C2.05598 20.6433 2.14902 20.4693 2.28563 20.3327L20.3325 2.28582C20.5157 2.10266 20.7641 1.99976 21.0231 1.99976C21.2822 1.99976 21.5306 2.10266 21.7138 2.28582C21.8969 2.46899 21.9998 2.71741 21.9998 2.97645C21.9998 3.23548 21.8969 3.48391 21.7138 3.66707L3.66688 21.7139C3.57627 21.8047 3.46861 21.8767 3.3501 21.9258C3.23158 21.9749 3.10453 22.0001 2.97626 21.9999Z",fill:"#E43B3B"}),(0,qt.jsx)("path",{d:"M21.0233 21.9999C20.895 22.0001 20.768 21.9749 20.6495 21.9258C20.531 21.8767 20.4233 21.8047 20.3327 21.7139L2.28582 3.66707C2.10266 3.48391 1.99976 3.23548 1.99976 2.97645C1.99976 2.71741 2.10266 2.46899 2.28582 2.28582C2.46899 2.10266 2.71741 1.99976 2.97645 1.99976C3.23548 1.99976 3.48391 2.10266 3.66707 2.28582L21.7139 20.3327C21.8506 20.4693 21.9436 20.6433 21.9813 20.8328C22.019 21.0222 21.9996 21.2186 21.9257 21.3971C21.8518 21.5755 21.7266 21.7281 21.566 21.8354C21.4053 21.9427 21.2165 21.9999 21.0233 21.9999Z",fill:"#E43B3B"})]}),(0,qt.jsx)("defs",{children:(0,qt.jsx)("clipPath",{id:"clip0_6406_28720",children:(0,qt.jsx)("rect",{width:"20",height:"20",fill:"white",transform:"translate(2 2)"})})})]})}function Vc(){return(0,qt.jsxs)("svg",{className:"MuiSvgIcon-root",width:"24",height:"24",viewBox:"0 0 24 24",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg",children:[(0,qt.jsx)("path",{d:"M12.6438 21.0001H11.2832C11.1452 21.0001 11.0274 20.9003 11.0047 20.7641L10.852 19.8465C10.3807 19.7324 9.93318 19.5467 9.51727 19.2926L8.76088 19.833C8.64851 19.9133 8.49462 19.9005 8.39704 19.8029L7.43548 18.8408C7.33786 18.7431 7.32519 18.5892 7.40555 18.4769L7.9469 17.7203C7.69475 17.3068 7.50992 16.8593 7.39564 16.3855L6.48279 16.2328C6.34673 16.21 6.24702 16.0923 6.24702 15.9543V14.5937C6.24702 14.4557 6.34677 14.3379 6.48286 14.3152L7.3956 14.1627C7.51002 13.6873 7.69419 13.2398 7.94492 12.8281L7.40442 12.0719C7.32413 11.9595 7.33687 11.8055 7.4346 11.7079L8.39668 10.7468C8.49441 10.6492 8.64833 10.6365 8.76067 10.717L9.51734 11.2591C9.92922 11.0083 10.3768 10.824 10.8521 10.7096L11.0047 9.80032C11.0275 9.6643 11.1452 9.5647 11.2832 9.5647H12.6437C12.7816 9.5647 12.8994 9.66433 12.9222 9.80036L13.0747 10.7095C13.5534 10.8242 14.0009 11.0073 14.4095 11.2555L15.1662 10.7149C15.2786 10.6346 15.4324 10.6474 15.53 10.745L16.4917 11.7071C16.5893 11.8048 16.602 11.9587 16.5217 12.071L15.9806 12.8276C16.2332 13.2416 16.4182 13.6891 16.5324 14.1624L17.4465 14.3151C17.5826 14.3379 17.6823 14.4556 17.6823 14.5936V15.9542C17.6823 16.0922 17.5826 16.21 17.4465 16.2327L16.5325 16.3855C16.4182 16.86 16.2336 17.3076 15.982 17.7204L16.5225 18.4772C16.6027 18.5895 16.59 18.7433 16.4924 18.8409L15.5303 19.8031C15.4327 19.9006 15.2789 19.9134 15.1665 19.8332L14.4099 19.2929C13.9943 19.5467 13.5467 19.7323 13.075 19.8465L12.9222 20.7641C12.8996 20.9003 12.7818 21.0001 12.6438 21.0001ZM11.5224 20.4354H12.4046L12.5494 19.5655C12.5687 19.4496 12.6578 19.3577 12.773 19.3349C13.3065 19.2292 13.8074 19.0215 14.2618 18.7176C14.3593 18.6523 14.4872 18.6542 14.5829 18.7225L15.3002 19.2348L15.924 18.6109L15.4116 17.8934C15.3433 17.7979 15.3414 17.67 15.4067 17.5723C15.7075 17.1226 15.9141 16.6217 16.0207 16.0836C16.0435 15.9684 16.1353 15.8794 16.2511 15.86L17.1176 15.7152V14.8328L16.2511 14.688C16.1353 14.6686 16.0435 14.5796 16.0207 14.4644C15.9145 13.9284 15.7074 13.4275 15.4052 12.9757C15.3398 12.878 15.3419 12.75 15.4102 12.6544L15.9232 11.9371L15.2998 11.3135L14.5827 11.8258C14.4871 11.8941 14.3592 11.896 14.2615 11.8308C13.8186 11.5345 13.3178 11.3295 12.7729 11.2215C12.6578 11.1987 12.5688 11.107 12.5494 10.9912L12.4049 10.1295H11.5221L11.3774 10.9913C11.358 11.107 11.269 11.1987 11.1539 11.2215C10.6144 11.3285 10.1135 11.5347 9.66519 11.8346C9.56739 11.9 9.43934 11.8979 9.34377 11.8295L8.62641 11.3156L8.00305 11.9383L8.51531 12.6551C8.58364 12.7506 8.58561 12.8785 8.52028 12.9762C8.22057 13.4242 8.01438 13.9251 7.9074 14.4647C7.88457 14.5799 7.7928 14.6689 7.67697 14.6883L6.81177 14.8328V15.7153L7.67704 15.86C7.79284 15.8794 7.88457 15.9684 7.9074 16.0836C8.01385 16.6206 8.22074 17.1214 8.52233 17.5723C8.5877 17.67 8.58568 17.798 8.51728 17.8935L8.00407 18.6109L8.6273 19.2345L9.34433 18.7222C9.43991 18.6538 9.56781 18.6519 9.66547 18.7172C10.1203 19.0214 10.6211 19.2293 11.154 19.3349C11.2693 19.3577 11.3584 19.4496 11.3776 19.5655L11.5224 20.4354Z",fill:"currentColor"}),(0,qt.jsx)("path",{d:"M11.9635 17.7333C10.6074 17.7333 9.50421 16.63 9.50421 15.274C9.50421 13.9179 10.6074 12.8147 11.9635 12.8147C13.3195 12.8147 14.4227 13.9179 14.4227 15.274C14.4228 16.6301 13.3195 17.7333 11.9635 17.7333ZM11.9635 13.3794C10.9188 13.3794 10.0689 14.2293 10.0689 15.274C10.0689 16.3187 10.9188 17.1686 11.9635 17.1686C13.0081 17.1686 13.858 16.3187 13.858 15.274C13.858 14.2293 13.0081 13.3794 11.9635 13.3794Z",fill:"currentColor"}),(0,qt.jsx)("path",{d:"M19.6189 17.7176H15.8471C15.6911 17.7176 15.5647 17.5912 15.5647 17.4353C15.5647 17.2794 15.6911 17.1529 15.8471 17.1529H19.6189C20.0615 17.1529 20.4353 16.7743 20.4353 16.3261V4.35311C20.4353 3.91839 20.0691 3.56471 19.6189 3.56471H4.3806C3.93071 3.56471 3.56471 3.91839 3.56471 4.35311V16.3261C3.56471 16.7743 3.93833 17.1529 4.3806 17.1529H8.08235C8.23828 17.1529 8.36471 17.2794 8.36471 17.4353C8.36471 17.5912 8.23828 17.7176 8.08235 17.7176H4.3806C3.63222 17.7176 3 17.0804 3 16.3261V4.35311C3 3.60699 3.61934 3 4.3806 3H19.6189C20.3804 3 21 3.60699 21 4.35311V16.3261C21 17.0804 20.3676 17.7176 19.6189 17.7176Z",fill:"currentColor"}),(0,qt.jsx)("path",{d:"M20.7176 6.98829H3.28235C3.12642 6.98829 3 6.86187 3 6.70594C3 6.55001 3.12642 6.42358 3.28235 6.42358H20.7176C20.8736 6.42358 21 6.55001 21 6.70594C21 6.86187 20.8736 6.98829 20.7176 6.98829Z",fill:"currentColor"}),(0,qt.jsx)("path",{d:"M9.88236 5.39991H5.11765C4.96172 5.39991 4.8353 5.27349 4.8353 5.11756C4.8353 4.96163 4.96172 4.83521 5.11765 4.83521H9.88236C10.0383 4.83521 10.1647 4.96163 10.1647 5.11756C10.1647 5.27349 10.0383 5.39991 9.88236 5.39991Z",fill:"currentColor"}),(0,qt.jsx)("path",{d:"M14.6471 5.39991H14.1176C13.9617 5.39991 13.8353 5.27349 13.8353 5.11756C13.8353 4.96163 13.9617 4.83521 14.1176 4.83521H14.6471C14.803 4.83521 14.9294 4.96163 14.9294 5.11756C14.9294 5.27349 14.803 5.39991 14.6471 5.39991Z",fill:"currentColor"}),(0,qt.jsx)("path",{d:"M16.7647 5.39991H16.2353C16.0794 5.39991 15.9529 5.27349 15.9529 5.11756C15.9529 4.96163 16.0794 4.83521 16.2353 4.83521H16.7647C16.9206 4.83521 17.0471 4.96163 17.0471 5.11756C17.0471 5.27349 16.9206 5.39991 16.7647 5.39991Z",fill:"currentColor"}),(0,qt.jsx)("path",{d:"M18.8824 5.39991H18.3529C18.197 5.39991 18.0706 5.27349 18.0706 5.11756C18.0706 4.96163 18.197 4.83521 18.3529 4.83521H18.8824C19.0383 4.83521 19.1647 4.96163 19.1647 5.11756C19.1647 5.27349 19.0383 5.39991 18.8824 5.39991Z",fill:"currentColor"})]})}function Gc(){return(0,qt.jsxs)("svg",{className:"MuiSvgIcon-root",width:"24",height:"24",viewBox:"0 0 24 24",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg",children:[(0,qt.jsx)("path",{d:"M19.3984 18.2054H19.4484V18.1554V5.74454C19.4484 5.60602 19.5606 5.49377 19.6992 5.49377C19.8377 5.49377 19.9499 5.60602 19.9499 5.74454V18.4562C19.9499 18.5217 19.9229 18.5872 19.8765 18.6335L16.3878 22.1222C16.3414 22.1685 16.2761 22.1956 16.2105 22.1956H4.30073C4.16222 22.1956 4.04997 22.0834 4.04997 21.9449V2.05516C4.04997 1.91664 4.16222 1.80439 4.30073 1.80439H19.6992C19.8377 1.80439 19.95 1.91664 19.95 2.05516V4.30071C19.95 4.43922 19.8377 4.55147 19.6992 4.55147C19.5607 4.55147 19.4485 4.43922 19.4485 4.30071V2.35588V2.30588H19.3985H4.6015H4.5515V2.35588V21.6441V21.6941H4.6015H15.9096H15.9596V21.6441V18.4561C15.9596 18.3176 16.0719 18.2054 16.2104 18.2054H19.3984ZM16.5112 18.7069H16.4612V18.7569V21.2188V21.3395L16.5466 21.2542L19.0085 18.7922L19.0939 18.7069H18.9732H16.5112Z",fill:"currentColor",stroke:"currentColor",strokeWidth:"0.1"}),(0,qt.jsx)("path",{d:"M17.7945 8.2204H17.8445V8.1704V4.60149V4.55149H17.7945H6.20552H6.15552V4.60149V8.1704V8.2204H6.20552H17.7945ZM5.9048 4.05H18.0952C18.2338 4.05 18.346 4.16221 18.346 4.30072V8.47116C18.346 8.60968 18.2338 8.72193 18.0953 8.72193H5.9048C5.76628 8.72193 5.65403 8.60968 5.65403 8.47116V4.30076C5.65403 4.16225 5.76628 4.05 5.9048 4.05Z",fill:"currentColor",stroke:"currentColor",strokeWidth:"0.1"}),(0,qt.jsx)("path",{d:"M11.0577 17.2028H11.1077V17.1528V10.0551V10.0051H11.0577H6.20552H6.15552V10.0551V17.1528V17.2028H6.20552H11.0577ZM5.9048 9.50361H11.3584C11.4969 9.50361 11.6091 9.61581 11.6092 9.75434C11.6092 9.75434 11.6092 9.75435 11.6092 9.75435V17.4536C11.6092 17.5921 11.4969 17.7044 11.3584 17.7044H5.9048C5.76628 17.7044 5.65403 17.5921 5.65403 17.4536V9.75438C5.65403 9.61586 5.76628 9.50361 5.9048 9.50361Z",fill:"currentColor",stroke:"currentColor",strokeWidth:"0.1"}),(0,qt.jsx)("path",{d:"M17.7945 12.7116H17.8445V12.6616V10.0551V10.0051H17.7945H12.9423H12.8923V10.0551V12.6616V12.7116H12.9423H17.7945ZM12.6416 9.50361H18.0952C18.2338 9.50361 18.346 9.61583 18.346 9.75434V12.9624C18.346 13.1009 18.2337 13.2132 18.0952 13.2132H12.6416C12.5031 13.2132 12.3908 13.1009 12.3908 12.9624V9.75438C12.3908 9.61586 12.5031 9.50361 12.6416 9.50361Z",fill:"currentColor",stroke:"currentColor",strokeWidth:"0.1"}),(0,qt.jsx)("path",{d:"M17.7945 17.2028H17.8445V17.1528V14.5463V14.4963H17.7945H12.9423H12.8923V14.5463V17.1528V17.2028H12.9423H17.7945ZM12.6416 13.9948H18.0952C18.2338 13.9948 18.346 14.107 18.346 14.2456V17.4536C18.346 17.5921 18.2337 17.7044 18.0952 17.7044H12.6416C12.5031 17.7044 12.3908 17.5921 12.3908 17.4536V14.2456C12.3908 14.1071 12.5031 13.9948 12.6416 13.9948Z",fill:"currentColor",stroke:"currentColor",strokeWidth:"0.1"})]})}function qc(){return(0,qt.jsx)("svg",{className:"MuiSvgIcon-root",width:"24",height:"24",viewBox:"0 0 24 24",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg",children:(0,qt.jsx)("svg",{width:"20",height:"20",viewBox:"0 0 20 20",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg",children:(0,qt.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M12.1419 14.0858C12.1419 14.2408 12.0196 14.3668 11.8691 14.3668L8.24094 14.3669C8.09045 14.3669 7.9682 14.2409 7.9682 14.0858C7.9682 13.9308 8.09041 13.8048 8.24094 13.8048L11.8691 13.8048C12.0196 13.8048 12.1419 13.9307 12.1419 14.0858ZM18.8192 14.5089C18.961 14.4566 19.0347 14.2954 18.9839 14.1498C18.9329 14.0035 18.7769 13.9275 18.6351 13.9796L17.6533 14.3423C18.3635 13.0172 18.7355 11.5312 18.7355 9.99979C18.7353 5.02621 14.8269 0.999877 9.99983 1C8.24894 1.00004 6.55963 1.53156 5.11458 2.53771C4.98983 2.62461 4.95697 2.79954 5.04154 2.92808C5.1254 3.05641 5.29523 3.09022 5.41999 3.00337C6.77449 2.06042 8.3581 1.56206 9.99987 1.56202C14.5157 1.56189 18.1899 5.34697 18.19 9.99979C18.19 11.5002 17.8093 12.9536 17.0844 14.2369L16.6611 13.0189C16.6101 12.8728 16.4538 12.7968 16.3123 12.8494C16.1705 12.9015 16.0966 13.0625 16.1476 13.2086L16.7592 14.9675C16.8104 15.1173 16.9666 15.1933 17.112 15.1391L18.8192 14.5089ZM14.9586 17.0719C14.8742 16.9433 14.7049 16.9097 14.5801 16.9966C13.2256 17.9395 11.6415 18.4379 10.0002 18.4379C5.484 18.4381 1.80976 14.6528 1.80964 10.0002C1.80961 8.49979 2.19032 7.04642 2.91547 5.76308L3.33899 6.98085C3.38999 7.12713 3.54602 7.20312 3.6878 7.15057C3.82958 7.09827 3.90334 6.93752 3.85254 6.79144L3.24037 5.03252C3.19056 4.883 3.03096 4.80607 2.88766 4.86091L1.18089 5.49113C1.03911 5.54347 0.96511 5.70418 1.01615 5.85026C1.06671 5.99633 1.22318 6.07253 1.36496 6.01998L2.34631 5.65774C1.63612 6.98277 1.26411 8.46856 1.26415 10.0002C1.26427 14.9733 5.17326 19.0001 10.0002 19C11.7511 19 13.4402 18.4682 14.8852 17.462C15.0103 17.3749 15.0429 17.2005 14.9586 17.0719ZM12.4338 9.94786C12.4339 11.382 11.3011 12.5492 9.90889 12.5492C8.51691 12.5492 7.38407 11.3821 7.38403 9.94799C7.38399 8.51335 8.51675 7.34645 9.90877 7.34641C10.6792 7.34641 11.3697 7.70406 11.8334 8.26653L9.95822 10.366L8.9244 9.2458C8.82077 9.13337 8.64799 9.1291 8.53883 9.23563C8.42991 9.34265 8.42557 9.52041 8.52896 9.63288L9.76356 10.9711C9.87205 11.089 10.0553 11.0872 10.1618 10.9675L12.1468 8.74571C12.3297 9.10529 12.4338 9.51393 12.4338 9.94786ZM13.3464 6.57315C13.4482 6.45879 13.6205 6.45121 13.7315 6.55659C13.8425 6.66147 13.8496 6.83948 13.7474 6.95334L12.5351 8.31059C12.8166 8.78879 12.9793 9.34912 12.9793 9.94786C12.9794 11.6919 11.6019 13.1109 9.90889 13.111C8.21612 13.111 6.83858 11.692 6.83854 9.94799C6.8385 8.20374 8.21596 6.78443 9.90873 6.78439C10.8214 6.78435 11.6419 7.19722 12.2047 7.85059L13.3464 6.57315ZM14.2873 12.3339C14.8959 10.3467 14.8559 7.97745 14.7997 5.85608C13.1142 5.56855 11.3934 4.96428 9.99991 4.12117C8.60554 4.96452 6.88556 5.56867 5.19968 5.85632C5.14367 7.97774 5.1042 10.347 5.71295 12.3344C6.38347 14.5235 7.78655 15.9602 10.0002 16.7246C12.2138 15.96 13.6164 14.5232 14.2873 12.3339ZM15.1062 5.33665C13.3669 5.07011 11.5598 4.44239 10.1417 3.55346C10.0543 3.49878 9.94497 3.49878 9.85808 3.55346C8.44872 4.43911 6.62539 5.07216 4.89312 5.33693C4.76259 5.35681 4.66449 5.47072 4.66083 5.60708C4.60116 7.83145 4.53388 10.3527 5.19291 12.5035C5.92892 14.9061 7.47378 16.4708 9.91585 17.2876C9.97162 17.3061 10.0283 17.3061 10.0843 17.2876C12.5263 16.4708 14.0713 14.9059 14.8072 12.5032C15.4659 10.3525 15.3983 7.83125 15.3385 5.60687C15.3351 5.47039 15.2372 5.35652 15.1062 5.33665Z",fill:"currentColor",stroke:"currentColor",strokeWidth:"0.3"})})})}function Yc(){return(0,qt.jsxs)("svg",{width:"25",height:"26",viewBox:"0 0 25 26",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,qt.jsx)("path",{d:"M17.8569 11.2142C13.9121 11.2142 10.7141 14.4122 10.7141 18.3571C10.7141 22.302 13.9121 25.4999 17.8569 25.4999C21.8018 25.4999 24.9998 22.302 24.9998 18.3571C24.9951 14.4141 21.7999 11.2189 17.8569 11.2142ZM17.8569 20.1428C16.9588 20.1439 16.2002 19.4766 16.0869 18.5857C15.9735 17.6947 16.5408 16.8586 17.4105 16.6348V14.3392C17.4105 14.0927 17.6104 13.8928 17.8569 13.8928C18.1035 13.8928 18.3034 14.0927 18.3034 14.3392V16.6348C19.1731 16.8586 19.7404 17.6947 19.627 18.5857C19.5136 19.4766 18.755 20.1439 17.8569 20.1428ZM23.6605 18.8035C23.4139 18.8035 23.2141 18.6037 23.2141 18.3571C23.2141 15.3985 20.8156 13 17.8569 13C14.8983 13 12.4998 15.3985 12.4998 18.3571C12.4998 18.6037 12.3 18.8035 12.0534 18.8035C11.8068 18.8035 11.607 18.6037 11.607 18.3571C11.607 14.9053 14.4052 12.1071 17.8569 12.1071C21.3087 12.1071 24.1069 14.9054 24.1069 18.3571C24.1069 18.4755 24.0599 18.5891 23.9762 18.6728C23.8925 18.7565 23.7789 18.8035 23.6605 18.8035Z",fill:"#303F9F"}),(0,qt.jsx)("path",{d:"M17.857 19.2501C18.3501 19.2501 18.7498 18.8503 18.7498 18.3572C18.7498 17.8641 18.3501 17.4644 17.857 17.4644C17.3639 17.4644 16.9641 17.8641 16.9641 18.3572C16.9641 18.8503 17.3639 19.2501 17.857 19.2501Z",fill:"#303F9F"}),(0,qt.jsx)("path",{d:"M9.82143 18.3572C9.82637 14.86 12.0889 11.7663 15.4201 10.7018C13.1107 5.48974 8.95804 1.0058 8.47901 0.5C7.61697 1.41786 0 9.69284 0 17.0178C4.08627e-05 20.0246 1.59193 22.8067 4.18413 24.3303C6.77634 25.854 9.98145 25.8913 12.6085 24.4286C10.8399 22.907 9.82233 20.6902 9.82143 18.3572ZM8.48215 24.6071C4.29263 24.6024 0.897549 21.2074 0.89285 17.0178C0.89285 16.7713 1.09271 16.5714 1.33927 16.5714C1.58584 16.5714 1.7857 16.7713 1.7857 17.0178C1.78987 20.7144 4.78551 23.7101 8.48211 23.7143C8.72868 23.7143 8.92854 23.9141 8.92854 24.1607C8.92854 24.4072 8.72868 24.6071 8.48215 24.6071Z",fill:"#303F9F"})]})}function Zc(){return(0,qt.jsxs)("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,qt.jsxs)("g",{clipPath:"url(#clip0_6755_6150)",children:[(0,qt.jsx)("path",{d:"M4.125 23.25H13.125C13.6811 23.2485 14.2283 23.1107 14.7188 22.8488C14.7676 22.8211 14.8097 22.7828 14.8418 22.7367C14.8738 22.6906 14.8952 22.6379 14.9042 22.5825C14.9132 22.5271 14.9096 22.4703 14.8937 22.4164C14.8779 22.3626 14.8501 22.313 14.8125 22.2712C13.8868 21.2818 13.372 19.9774 13.3725 18.6225C13.3725 16.8525 14.76 14.3175 16.2825 12.7313C16.4213 12.5917 16.4995 12.4031 16.5 12.2062V9.5175C16.5132 9.06394 16.436 8.61229 16.2729 8.18888C16.1097 7.76547 15.8639 7.37878 15.5497 7.05137C15.2356 6.72395 14.8594 6.46236 14.4431 6.28185C14.0268 6.10135 13.5787 6.00553 13.125 6H10.5V1.875C10.4991 1.57691 10.3803 1.29127 10.1695 1.08049C9.95873 0.869703 9.67309 0.75089 9.375 0.75H7.875C7.57691 0.75089 7.29127 0.869703 7.08049 1.08049C6.8697 1.29127 6.75089 1.57691 6.75 1.875V6H4.125C3.23069 6.00257 2.37373 6.35898 1.74136 6.99136C1.10898 7.62373 0.752572 8.48069 0.75 9.375V19.875C0.752572 20.7693 1.10898 21.6263 1.74136 22.2586C2.37373 22.891 3.23069 23.2474 4.125 23.25ZM6.75 19.9688C6.75052 20.1007 6.71625 20.2304 6.65064 20.3448C6.58503 20.4592 6.4904 20.5543 6.37629 20.6205C6.26219 20.6867 6.13265 20.7216 6.00075 20.7217C5.86884 20.7219 5.73923 20.6872 5.625 20.6213L4.2975 19.8525C4.18385 19.7866 4.08951 19.6919 4.02393 19.5781C3.95835 19.4642 3.92383 19.3351 3.92383 19.2038C3.92383 19.0724 3.95835 18.9433 4.02393 18.8294C4.08951 18.7156 4.18385 18.6209 4.2975 18.555L5.625 17.79C5.73896 17.7242 5.86822 17.6896 5.99981 17.6895C6.1314 17.6895 6.26068 17.7241 6.37467 17.7898C6.48866 17.8555 6.58335 17.9501 6.64923 18.064C6.71511 18.1779 6.74987 18.3072 6.75 18.4387V19.9688ZM11.625 20.6063C11.511 20.672 11.3818 20.7067 11.2502 20.7067C11.1186 20.7068 10.9893 20.6722 10.8753 20.6064C10.7613 20.5407 10.6666 20.4461 10.6008 20.3322C10.5349 20.2183 10.5001 20.0891 10.5 19.9575V18.4387C10.5001 18.3072 10.5349 18.1779 10.6008 18.064C10.6666 17.9501 10.7613 17.8555 10.8753 17.7898C10.9893 17.7241 11.1186 17.6895 11.2502 17.6895C11.3818 17.6896 11.511 17.7242 11.625 17.79L12.63 18.3713C12.6035 18.9012 12.6489 19.4323 12.765 19.95L11.625 20.6063ZM7.5 3.25125H9.75V6H7.5V3.25125ZM3.75 10.4587C3.7499 10.2672 3.78757 10.0774 3.86084 9.90039C3.93411 9.72337 4.04156 9.56252 4.17704 9.42704C4.31252 9.29156 4.47337 9.18411 4.65039 9.11084C4.82742 9.03757 5.01716 8.9999 5.20875 9H12.0413C12.2328 8.9999 12.4226 9.03757 12.5996 9.11084C12.7766 9.18411 12.9375 9.29156 13.073 9.42704C13.2084 9.56252 13.3159 9.72337 13.3892 9.90039C13.4624 10.0774 13.5001 10.2672 13.5 10.4587V14.2913C13.5001 14.4828 13.4624 14.6726 13.3892 14.8496C13.3159 15.0266 13.2084 15.1875 13.073 15.323C12.9375 15.4584 12.7766 15.5659 12.5996 15.6392C12.4226 15.7124 12.2328 15.7501 12.0413 15.75H5.20875C5.01716 15.7501 4.82742 15.7124 4.65039 15.6392C4.47337 15.5659 4.31252 15.4584 4.17704 15.323C4.04156 15.1875 3.93411 15.0266 3.86084 14.8496C3.78757 14.6726 3.7499 14.4828 3.75 14.2913V10.4587Z",fill:"#AF5F00"}),(0,qt.jsx)("path",{d:"M19.062 12.0503C18.8393 11.9816 18.6 11.9898 18.3825 12.0736C16.8187 12.6544 14.1206 16.3456 14.1206 18.6207C14.1316 19.841 14.6241 21.0076 15.4909 21.8667C16.3577 22.7257 17.5287 23.2077 18.749 23.2077C19.9694 23.2077 21.1404 22.7257 22.0072 21.8667C22.874 21.0076 23.3665 19.841 23.3775 18.6207C23.3775 16.2544 20.6531 12.5228 19.062 12.0503ZM19.5 21.7501C19.4258 21.7501 19.3533 21.7281 19.2916 21.6869C19.23 21.6457 19.1819 21.5871 19.1535 21.5186C19.1251 21.4501 19.1177 21.3747 19.1322 21.3019C19.1467 21.2292 19.1824 21.1624 19.2348 21.1099C19.2873 21.0575 19.3541 21.0217 19.4268 21.0073C19.4996 20.9928 19.575 21.0002 19.6435 21.0286C19.712 21.057 19.7706 21.1051 19.8118 21.1667C19.853 21.2284 19.875 21.3009 19.875 21.3751C19.875 21.4745 19.8355 21.5699 19.7651 21.6402C19.6948 21.7106 19.5994 21.7501 19.5 21.7501ZM21.1275 18.6226C21.1275 18.5231 21.167 18.4277 21.2373 18.3574C21.3076 18.2871 21.403 18.2476 21.5025 18.2476C21.6019 18.2476 21.6973 18.2871 21.7676 18.3574C21.838 18.4277 21.8775 18.5231 21.8775 18.6226C21.8783 19.4219 21.5723 20.1911 21.0225 20.7713C20.9537 20.8436 20.8591 20.8858 20.7593 20.8886C20.6596 20.8914 20.5627 20.8546 20.49 20.7863C20.4181 20.7181 20.3762 20.6241 20.3734 20.525C20.3706 20.426 20.4071 20.3298 20.475 20.2576C20.895 19.817 21.1287 19.2313 21.1275 18.6226Z",fill:"#AF5F00"})]}),(0,qt.jsx)("defs",{children:(0,qt.jsx)("clipPath",{id:"clip0_6755_6150",children:(0,qt.jsx)("rect",{width:"24",height:"24",fill:"white"})})})]})}function Kc(){return(0,qt.jsxs)("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,qt.jsx)("path",{d:"M8.00001 2H5.00001C3.3457 2 2 3.3457 2 5.00001V8.00001C2 9.65432 3.3457 11 5.00001 11H8.00001C9.65432 11 11 9.65432 11 8.00001V5.00001C11 3.3457 9.65432 2 8.00001 2ZM9.00002 8.00001C9.00002 8.55129 8.55177 9.00002 8.00001 9.00002H5.00001C4.44825 9.00002 4 8.55129 4 8.00001V5.00001C4 4.44873 4.44825 4 5.00001 4H8.00001C8.55177 4 9.00002 4.44873 9.00002 5.00001V8.00001Z",fill:"black"}),(0,qt.jsx)("path",{d:"M19 2H16C14.3457 2 13 3.3457 13 5.00001V8.00001C13 9.65432 14.3457 11 16 11H19C20.6543 11 22 9.65432 22 8.00001V5.00001C22 3.3457 20.6543 2 19 2ZM20 8.00001C20 8.55129 19.5518 9.00002 19 9.00002H16C15.4483 9.00002 15 8.55129 15 8.00001V5.00001C15 4.44873 15.4483 4 16 4H19C19.5518 4 20 4.44873 20 5.00001V8.00001Z",fill:"black"}),(0,qt.jsx)("path",{d:"M8.00001 13H5.00001C3.3457 13 2 14.3457 2 16V19C2 20.6543 3.3457 22 5.00001 22H8.00001C9.65432 22 11 20.6543 11 19V16C11 14.3457 9.65432 13 8.00001 13ZM9.00002 19C9.00002 19.5513 8.55177 20 8.00001 20H5.00001C4.44825 20 4 19.5513 4 19V16C4 15.4487 4.44825 15 5.00001 15H8.00001C8.55177 15 9.00002 15.4487 9.00002 16V19Z",fill:"black"}),(0,qt.jsx)("path",{d:"M19 13H16C14.3457 13 13 14.3457 13 16V19C13 20.6543 14.3457 22 16 22H19C20.6543 22 22 20.6543 22 19V16C22 14.3457 20.6543 13 19 13ZM20 19C20 19.5513 19.5518 20 19 20H16C15.4483 20 15 19.5513 15 19V16C15 15.4487 15.4483 15 16 15H19C19.5518 15 20 15.4487 20 16V19Z",fill:"black"})]})}function Xc(){return(0,qt.jsxs)("svg",{width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,qt.jsx)("path",{d:"M11.3566 8.69835H9.2608V6.00369C9.2608 5.4947 8.87157 5.10547 8.36258 5.10547C7.85358 5.10547 7.46436 5.4947 7.46436 6.00369V8.99776C7.46436 9.8361 8.12305 10.4948 8.96139 10.4948H11.3566C11.8656 10.4948 12.2549 10.1056 12.2549 9.59657C12.2549 9.08758 11.8656 8.69835 11.3566 8.69835Z",fill:"black"}),(0,qt.jsx)("path",{d:"M15.5481 3.60894C16.0442 3.60894 16.4463 3.20679 16.4463 2.71072C16.4463 2.21465 16.0442 1.8125 15.5481 1.8125C15.052 1.8125 14.6499 2.21465 14.6499 2.71072C14.6499 3.20679 15.052 3.60894 15.5481 3.60894Z",fill:"black"}),(0,qt.jsx)("path",{d:"M17.7939 7.322C17.7041 6.84295 17.225 6.5136 16.746 6.60342C16.2669 6.69325 15.9376 7.1723 16.0274 7.65135C16.7759 11.5436 14.201 15.3162 10.3087 16.0347C6.41646 16.7833 2.64393 14.2084 1.92535 10.3161C1.17684 6.42378 3.75173 2.65125 7.64402 1.93268C8.60212 1.75303 9.62011 1.78297 10.5782 1.99256C11.0573 2.11232 11.5363 1.81291 11.6561 1.33386C11.7758 0.854813 11.4764 0.375763 10.9974 0.256C6.14699 -0.851805 1.35648 2.1722 0.248676 7.02259C-0.859129 11.873 2.16488 16.6635 7.01527 17.7713C11.8657 18.8791 16.6562 15.8551 17.764 11.0047C18.0334 9.80707 18.0634 8.54957 17.8239 7.35194L17.7939 7.322Z",fill:"black"})]})}function Qc(){return(0,qt.jsxs)("svg",{width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,qt.jsx)("path",{d:"M10.4613 13.7551C10.3429 13.8846 10.1755 13.9583 10 13.9583C9.82453 13.9583 9.65714 13.8846 9.53873 13.7551L6.2054 10.1092C5.97248 9.85448 5.99019 9.45915 6.24494 9.22623C6.49969 8.99332 6.89502 9.01102 7.12794 9.26577L9.375 11.7235V2.5C9.375 2.15482 9.65482 1.875 10 1.875C10.3452 1.875 10.625 2.15482 10.625 2.5V11.7235L12.8721 9.26577C13.105 9.01102 13.5003 8.99332 13.7551 9.22623C14.0098 9.45915 14.0275 9.85448 13.7946 10.1092L10.4613 13.7551Z",fill:"white"}),(0,qt.jsx)("path",{d:"M3.125 12.5C3.125 12.1548 2.84518 11.875 2.5 11.875C2.15482 11.875 1.875 12.1548 1.875 12.5V12.5457C1.87498 13.6854 1.87497 14.604 1.9721 15.3265C2.07295 16.0765 2.2887 16.7081 2.79029 17.2097C3.29189 17.7113 3.92345 17.9271 4.67354 18.0279C5.39602 18.125 6.31462 18.125 7.45428 18.125H12.5457C13.6854 18.125 14.604 18.125 15.3265 18.0279C16.0766 17.9271 16.7081 17.7113 17.2097 17.2097C17.7113 16.7081 17.9271 16.0765 18.0279 15.3265C18.125 14.604 18.125 13.6854 18.125 12.5457V12.5C18.125 12.1548 17.8452 11.875 17.5 11.875C17.1548 11.875 16.875 12.1548 16.875 12.5C16.875 13.6962 16.8737 14.5304 16.789 15.1599C16.7068 15.7714 16.5565 16.0952 16.3258 16.3258C16.0952 16.5565 15.7714 16.7068 15.1599 16.789C14.5304 16.8737 13.6962 16.875 12.5 16.875H7.5C6.30382 16.875 5.46956 16.8737 4.8401 16.789C4.22862 16.7068 3.90481 16.5565 3.67418 16.3258C3.44354 16.0952 3.29317 15.7714 3.21096 15.1599C3.12633 14.5304 3.125 13.6962 3.125 12.5Z",fill:"white"})]})}function Jc(){return(0,qt.jsx)("svg",{width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:(0,qt.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M9.16663 2.2915C5.36967 2.2915 2.29163 5.36955 2.29163 9.1665C2.29163 12.9635 5.36967 16.0415 9.16663 16.0415C12.9636 16.0415 16.0416 12.9635 16.0416 9.1665C16.0416 5.36955 12.9636 2.2915 9.16663 2.2915ZM1.04163 9.1665C1.04163 4.67919 4.67931 1.0415 9.16663 1.0415C13.6539 1.0415 17.2916 4.67919 17.2916 9.1665C17.2916 13.6538 13.6539 17.2915 9.16663 17.2915C4.67931 17.2915 1.04163 13.6538 1.04163 9.1665ZM16.7982 16.4591C16.6053 16.4444 16.4446 16.6052 16.4592 16.798C16.4595 16.7991 16.4627 16.8205 16.4788 16.8809C16.4978 16.9518 16.5259 17.046 16.5689 17.1896C16.6084 17.3212 16.634 17.4066 16.6551 17.4699C16.6767 17.5348 16.6841 17.5472 16.6809 17.5411C16.7687 17.7052 16.9787 17.7582 17.1339 17.6554C17.1281 17.6592 17.1406 17.6518 17.1903 17.605C17.2389 17.5592 17.302 17.4962 17.3992 17.399C17.4964 17.3019 17.5593 17.2388 17.6051 17.1902C17.6439 17.149 17.6556 17.1334 17.6564 17.1325C17.7577 16.9779 17.7052 16.7695 17.5426 16.6815C17.5416 16.6811 17.5239 16.6729 17.47 16.655C17.4067 16.6339 17.3214 16.6083 17.1897 16.5688C17.0462 16.5258 16.952 16.4976 16.881 16.4787C16.8206 16.4626 16.7992 16.4594 16.7982 16.4591ZM15.2136 16.9026C15.1343 15.9388 15.9389 15.1342 16.9027 15.2135C17.0693 15.2272 17.2709 15.2879 17.4884 15.3534C17.5083 15.3594 17.5284 15.3654 17.5485 15.3714C17.5667 15.3769 17.5848 15.3823 17.6028 15.3876C17.8026 15.4472 17.9901 15.5032 18.1313 15.5788C18.9446 16.0143 19.2071 17.0548 18.6977 17.8239C18.6093 17.9575 18.4708 18.0956 18.3231 18.2429C18.3098 18.2562 18.2965 18.2695 18.2831 18.2829C18.2696 18.2964 18.2563 18.3097 18.243 18.323C18.0957 18.4707 17.9576 18.6091 17.824 18.6976C17.0549 19.2069 16.0144 18.9444 15.5789 18.1312C15.5033 17.9899 15.4474 17.8025 15.3878 17.6027C15.3824 17.5847 15.377 17.5666 15.3715 17.5484C15.3655 17.5283 15.3595 17.5082 15.3535 17.4884C15.288 17.2708 15.2273 17.0692 15.2136 16.9026Z",fill:"white"})})}function ed(){return(0,qt.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",height:"24px",viewBox:"0 -960 960 960",width:"24px",fill:"currentColor",children:(0,qt.jsx)("path",{d:"M720-400v-120H600v-80h120v-120h80v120h120v80H800v120h-80Zm-360-80q-66 0-113-47t-47-113q0-66 47-113t113-47q66 0 113 47t47 113q0 66-47 113t-113 47ZM40-160v-112q0-34 17.5-62.5T104-378q62-31 126-46.5T360-440q66 0 130 15.5T616-378q29 15 46.5 43.5T680-272v112H40Zm80-80h480v-32q0-11-5.5-20T580-306q-54-27-109-40.5T360-360q-56 0-111 13.5T140-306q-9 5-14.5 14t-5.5 20v32Zm240-320q33 0 56.5-23.5T440-640q0-33-23.5-56.5T360-720q-33 0-56.5 23.5T280-640q0 33 23.5 56.5T360-560Zm0-80Zm0 400Z"})})}function td(){return(0,qt.jsx)("svg",{className:"MuiSvgIcon-root",width:"24",height:"24",viewBox:"0 0 176 176",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg",children:(0,qt.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M114.278 10.4195C123.9 13.6575 130.17 22.7107 130.17 34.5799C130.17 42.0418 125.928 48.91 121.201 54.3896C116.341 60.0225 110.191 65.0774 104.812 68.9989C104.581 69.167 104.352 69.334 104.126 69.4997C98.9042 73.3149 94.5967 76.4622 88.0031 76.4622C81.4094 76.4622 77.102 73.3148 71.8805 69.4997C71.6537 69.3339 71.4252 69.1669 71.1946 68.9989C65.8149 65.0773 59.6647 60.0224 54.8054 54.3896C50.0784 48.91 45.8364 42.0418 45.8364 34.58C45.8364 22.7107 52.1065 13.6575 61.7282 10.4195C69.9348 7.65777 79.4874 9.48066 88.003 15.6795C96.5187 9.48066 106.071 7.65777 114.278 10.4195ZM110.769 20.845C105.988 19.2358 98.8573 20.2769 91.7251 26.8328C89.6207 28.7671 86.3854 28.7671 84.281 26.8328C77.1487 20.2769 70.0183 19.2358 65.2367 20.845C60.6498 22.3886 56.8364 26.8166 56.8364 34.58C56.8364 38.0088 58.9228 42.3222 63.1345 47.2044C67.2139 51.9332 72.6128 56.4202 77.6743 60.1099C83.8573 64.6171 85.3265 65.4622 88.0031 65.4622C90.6796 65.4622 92.1489 64.6171 98.3318 60.11C103.393 56.4203 108.792 51.9333 112.872 47.2045C117.083 42.3224 119.17 38.0088 119.17 34.5799C119.17 26.8166 115.356 22.3886 110.769 20.845ZM63.6851 105.958C77.3678 103.307 92.0149 103.902 103.867 110.971C105.532 111.964 107.092 113.201 108.454 114.731C111.21 117.827 112.633 121.675 112.701 125.533C114.103 124.628 115.508 123.623 116.936 122.545L130.188 112.534C136.822 107.523 146.463 107.522 153.097 112.531C159.227 117.16 161.671 125.467 157.283 132.502C154.164 137.501 149.467 144.416 144.687 148.844C139.854 153.319 132.978 157.082 127.775 159.593C121.458 162.642 114.635 164.328 108 165.402C94.4388 167.597 80.3282 167.261 66.9196 164.499C60.0673 163.087 52.9464 162.353 45.9092 162.353H29.3364C26.2988 162.353 23.8364 159.891 23.8364 156.853C23.8364 153.816 26.2988 151.353 29.3364 151.353H45.9092C53.698 151.353 61.5626 152.164 69.1393 153.725C81.2542 156.221 94.0171 156.522 106.242 154.543C112.321 153.559 117.997 152.098 122.994 149.686C128.006 147.267 133.64 144.081 137.212 140.773C140.824 137.428 144.866 131.623 147.95 126.679C148.881 125.187 148.752 123.034 146.469 121.31C143.757 119.263 139.529 119.263 136.819 121.311L123.566 131.322C118.276 135.319 111.764 139.594 103.687 140.882C102.872 141.012 102.023 141.131 101.142 141.236C100.722 141.312 100.285 141.362 99.8333 141.379C95.7098 141.789 90.9343 141.884 85.6656 141.387C82.6415 141.101 80.4215 138.418 80.707 135.394C80.9926 132.37 83.6756 130.15 86.6997 130.435C91.3009 130.87 95.429 130.774 98.9313 130.414C99.0024 130.407 99.0732 130.4 99.1437 130.392C99.29 130.307 99.5134 130.152 99.8066 129.896C102.149 127.852 102.359 124.427 100.238 122.045C99.7002 121.441 99.0383 120.899 98.2321 120.419C89.5704 115.252 78.0021 114.389 65.7773 116.757C53.622 119.112 41.5457 124.537 32.518 130.939C30.0402 132.697 26.6072 132.112 24.85 129.635C23.0929 127.157 23.677 123.724 26.1548 121.967C36.4094 114.694 49.9328 108.623 63.6851 105.958Z",fill:"currentColor"})})}function nd(){return(0,qt.jsx)("svg",{className:"MuiSvgIcon-root",width:"24",height:"24",viewBox:"0 0 176 176",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:(0,qt.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M109.997 20.166C104.935 20.166 100.831 24.2701 100.831 29.3327C100.831 34.3953 104.935 38.4993 109.997 38.4993C115.06 38.4993 119.164 34.3953 119.164 29.3327C119.164 24.2701 115.06 20.166 109.997 20.166ZM89.8307 29.3327C89.8307 18.1949 98.8596 9.16602 109.997 9.16602C121.135 9.16602 130.164 18.1949 130.164 29.3327C130.164 40.4704 121.135 49.4994 109.997 49.4994C98.8596 49.4994 89.8307 40.4704 89.8307 29.3327ZM45.5375 44.3426C55.759 37.9542 68.4609 36.9761 79.5399 41.7242C88.205 45.4378 90.3794 56.7288 83.7133 63.395L71.5841 75.5241C69.0214 78.0869 69.2124 82.2969 71.9966 84.6171L79.3037 90.7063C83.6507 94.3288 86.1641 99.695 86.1641 105.354V117.333C86.1641 120.37 83.7016 122.833 80.6641 122.833C77.6265 122.833 75.1641 120.37 75.1641 117.333V105.354C75.1641 102.96 74.1007 100.689 72.2617 99.1567L64.9546 93.0675C57.2012 86.6064 56.6694 74.8825 63.8059 67.746L75.9351 55.6168C77.0985 54.4534 76.719 52.4829 75.2068 51.8348C67.4392 48.5059 58.5338 49.1916 51.3675 53.6706L35.9124 63.33C33.3365 64.9399 29.9433 64.1569 28.3334 61.581C26.7235 59.0052 27.5065 55.6119 30.0824 54.002L45.5375 44.3426ZM166.724 50.254C167.32 53.2326 165.388 56.1302 162.409 56.7259L154.176 58.3725C151.613 58.8851 150.138 59.1884 149.08 59.5265C148.603 59.679 148.361 59.7943 148.247 59.8581C148.194 59.8878 148.171 59.9053 148.165 59.9093L148.158 59.9157L148.152 59.9232C148.148 59.9287 148.132 59.9529 148.105 60.0072C148.047 60.1241 147.943 60.3711 147.814 60.855C147.528 61.9284 147.296 63.4167 146.909 66.0014L138.908 119.34C153.497 116.858 166.831 128.099 166.831 142.917C166.831 156.125 156.123 166.833 142.915 166.833H22.6342C15.1949 166.833 9.16406 160.802 9.16406 153.363C9.16406 146.819 13.8667 141.222 20.3122 140.094L127.485 121.339L136.068 64.1187C136.404 61.8733 136.721 59.7617 137.186 58.0187C137.704 56.0763 138.529 54.0762 140.194 52.3285C141.859 50.5807 143.816 49.6604 145.731 49.0485C147.45 48.4994 149.544 48.0809 151.77 47.6359L160.252 45.9395C163.231 45.3438 166.128 47.2755 166.724 50.254ZM86.1641 73.3327C86.1641 70.2951 88.6265 67.8327 91.6641 67.8327H113.664C116.702 67.8327 119.164 70.2951 119.164 73.3327C119.164 76.3702 116.702 78.8327 113.664 78.8327H91.6641C88.6265 78.8327 86.1641 76.3702 86.1641 73.3327ZM45.0332 101.185L47.4416 98.7769L55.2198 106.555L52.8114 108.964C52.5999 109.175 52.3913 109.384 52.1851 109.591C48.566 113.217 45.7017 116.086 41.973 117.631C38.2444 119.175 34.1898 119.171 29.0668 119.167C28.7748 119.166 28.4795 119.166 28.1805 119.166H21.9974V108.166H28.1805C34.6242 108.166 36.314 108.069 37.7635 107.468C39.2131 106.868 40.4767 105.742 45.0332 101.185ZM155.831 142.917C155.831 134.894 148.592 128.812 140.689 130.195L22.2084 150.929C21.0264 151.136 20.1641 152.163 20.1641 153.363C20.1641 154.727 21.27 155.833 22.6342 155.833H142.915C150.048 155.833 155.831 150.05 155.831 142.917Z",fill:"currentColor"})})}function rd(){return(0,qt.jsx)("svg",{className:"MuiSvgIcon-root",width:"24",height:"24",viewBox:"0 0 176 176",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:(0,qt.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M53.2591 23.9094C54.1361 15.6226 61.1474 9.16602 69.6667 9.16602H106.333C114.853 9.16602 121.864 15.6226 122.741 23.9094C128.337 24.0233 133.175 24.3127 137.307 25.0716C142.865 26.0927 147.596 28.0378 151.445 31.8872C155.86 36.3013 157.758 41.8591 158.646 48.4598C159.5 54.8176 159.5 62.9013 159.5 72.9303V117.735C159.5 127.764 159.5 135.848 158.646 142.206C157.758 148.806 155.86 154.364 151.445 158.778C147.031 163.192 141.474 165.091 134.873 165.978C128.515 166.833 120.431 166.833 110.402 166.833H65.5976C55.5686 166.833 47.4849 166.833 41.1272 165.978C34.5264 165.091 28.9686 163.192 24.5546 158.778C20.1405 154.364 18.242 148.806 17.3545 142.206C16.4997 135.848 16.4999 127.764 16.5 117.735V72.9303C16.4999 62.9013 16.4997 54.8176 17.3545 48.4598C18.242 41.859 20.1405 36.3013 24.5546 31.8872C28.4041 28.0378 33.1346 26.0927 38.6933 25.0716C42.8247 24.3127 47.6632 24.0233 53.2591 23.9094ZM53.2764 34.9124C48.0097 35.0248 43.9513 35.2898 40.6805 35.8906C36.5239 36.6541 34.1181 37.8801 32.3327 39.6654C30.3032 41.695 28.9799 44.5445 28.2564 49.9256C27.5117 55.4648 27.5 62.8063 27.5 73.3327V117.333C27.5 127.859 27.5117 135.201 28.2564 140.74C28.9799 146.121 30.3032 148.97 32.3327 151C34.3623 153.03 37.2119 154.353 42.5929 155.076C48.1321 155.821 55.4736 155.833 66 155.833H110C120.526 155.833 127.868 155.821 133.407 155.076C138.788 154.353 141.638 153.03 143.667 151C145.697 148.97 147.02 146.121 147.744 140.74C148.488 135.201 148.5 127.859 148.5 117.333V73.3327C148.5 62.8063 148.488 55.4648 147.744 49.9256C147.02 44.5445 145.697 41.695 143.667 39.6654C141.882 37.8801 139.476 36.6541 135.319 35.8906C132.049 35.2898 127.99 35.0248 122.724 34.9124C121.776 43.1239 114.799 49.4994 106.333 49.4994H69.6667C61.201 49.4994 54.2245 43.1239 53.2764 34.9124ZM69.6667 20.166C66.6291 20.166 64.1667 22.6285 64.1667 25.666V32.9993C64.1667 36.0369 66.6291 38.4993 69.6667 38.4993H106.333C109.371 38.4993 111.833 36.0369 111.833 32.9993V25.666C111.833 22.6285 109.371 20.166 106.333 20.166H69.6667ZM45.8333 76.9994C45.8333 73.9618 48.2958 71.4994 51.3333 71.4994H55C58.0376 71.4994 60.5 73.9618 60.5 76.9994C60.5 80.0369 58.0376 82.4994 55 82.4994H51.3333C48.2958 82.4994 45.8333 80.0369 45.8333 76.9994ZM71.5 76.9994C71.5 73.9618 73.9624 71.4994 77 71.4994H124.667C127.704 71.4994 130.167 73.9618 130.167 76.9994C130.167 80.0369 127.704 82.4994 124.667 82.4994H77C73.9624 82.4994 71.5 80.0369 71.5 76.9994ZM45.8333 102.666C45.8333 99.6285 48.2958 97.166 51.3333 97.166H55C58.0376 97.166 60.5 99.6285 60.5 102.666C60.5 105.704 58.0376 108.166 55 108.166H51.3333C48.2958 108.166 45.8333 105.704 45.8333 102.666ZM71.5 102.666C71.5 99.6285 73.9624 97.166 77 97.166H124.667C127.704 97.166 130.167 99.6285 130.167 102.666C130.167 105.704 127.704 108.166 124.667 108.166H77C73.9624 108.166 71.5 105.704 71.5 102.666ZM45.8333 128.333C45.8333 125.295 48.2958 122.833 51.3333 122.833H55C58.0376 122.833 60.5 125.295 60.5 128.333C60.5 131.37 58.0376 133.833 55 133.833H51.3333C48.2958 133.833 45.8333 131.37 45.8333 128.333ZM71.5 128.333C71.5 125.295 73.9624 122.833 77 122.833H124.667C127.704 122.833 130.167 125.295 130.167 128.333C130.167 131.37 127.704 133.833 124.667 133.833H77C73.9624 133.833 71.5 131.37 71.5 128.333Z",fill:"currentColor"})})}function id(){return(0,qt.jsxs)("svg",{className:"MuiSvgIcon-root",width:"24",height:"24",viewBox:"0 0 64 64",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,qt.jsx)("ellipse",{cx:"32",cy:"16",rx:"20",ry:"6",stroke:"currentColor",strokeWidth:"3",fill:"none"}),(0,qt.jsx)("path",{d:"M12 16V28C12 31.3 21 34 32 34C43 34 52 31.3 52 28V16",stroke:"currentColor",strokeWidth:"3",fill:"none"}),(0,qt.jsx)("ellipse",{cx:"32",cy:"28",rx:"20",ry:"6",stroke:"currentColor",strokeWidth:"3",fill:"none"}),(0,qt.jsx)("path",{d:"M12 28V40C12 43.3 21 46 32 46C43 46 52 43.3 52 40V28",stroke:"currentColor",strokeWidth:"3",fill:"none"}),(0,qt.jsx)("ellipse",{cx:"32",cy:"40",rx:"20",ry:"6",stroke:"currentColor",strokeWidth:"3",fill:"none"})]})}function od(){return(0,qt.jsxs)("svg",{className:"MuiSvgIcon-root",width:"24",height:"24",viewBox:"0 0 176 176",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,qt.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M40 11C30.6 11 23 18.6 23 28V148C23 157.4 30.6 165 40 165H126C135.4 165 143 157.4 143 148V56L98 11H40Z",fill:"currentColor"}),(0,qt.jsx)("path",{d:"M55 40H110V50H55V40Z",fill:"white"}),(0,qt.jsx)("path",{d:"M55 70H80V95H55V70ZM90 70H115V95H90V70ZM55 105H80V130H55V105ZM90 105H115V130H90V105Z",fill:"white"}),(0,qt.jsx)("path",{d:"M98 11V56H143L98 11Z",fill:"rgba(255,255,255,0.3)"})]})}function ad(){return(0,qt.jsxs)("svg",{className:"MuiSvgIcon-root",width:"24",height:"24",viewBox:"0 0 176 176",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,qt.jsx)("path",{d:"M28 118L88 148L148 118L88 88L28 118Z",fill:"currentColor"}),(0,qt.jsx)("path",{d:"M28 88L88 118L148 88L88 58L28 88Z",fill:"rgba(0,0,0,0.15)"}),(0,qt.jsx)("path",{d:"M28 58L88 88L148 58L88 28L28 58Z",fill:"rgba(255,255,255,0.3)"}),(0,qt.jsx)("path",{d:"M88 28V148",stroke:"white",strokeWidth:"4"})]})}const sd=[{name:"ListUsers",group:"AGM"},{name:"ReadUser",group:"AGM"},{name:"CreateUser",group:"AGM"},{name:"UpdateUser",group:"AGM"},{name:"DeleteUser",group:"AGM"},{name:"ListRoles",group:"AGM"},{name:"ReadRole",group:"AGM"},{name:"CreateRole",group:"AGM"},{name:"UpdateRole",group:"AGM"},{name:"DeleteRole",group:"AGM"},{name:"ListGroups",group:"AGM"},{name:"ReadGroup",group:"AGM"},{name:"CreateGroup",group:"AGM"},{name:"DeleteGroup",group:"AGM"},{name:"ListPolicies",group:"AGM"},{name:"ReadPolicy",group:"AGM"},{name:"CreatePolicy",group:"AGM"},{name:"UpdatePolicy",group:"AGM"},{name:"DeletePolicy",group:"AGM"},{name:"CreateProgram",group:"RPMCORE"},{name:"ListPrograms",group:"RPMCORE"},{name:"ReadProgram",group:"RPMCORE"},{name:"UpdateProgram",group:"RPMCORE"},{name:"ListAllPatients",group:"RPMCORE"},{name:"ListPatients",group:"RPMCORE"},{name:"ReadPatient",group:"RPMCORE"},{name:"CreatePatient",group:"RPMCORE"},{name:"DeletePatients",group:"RPMCORE"},{name:"DismissAlerts",group:"RPMCORE"},{name:"UpdatePatientConfiguration",group:"RPMCORE"},{name:"UpdatePatientProfile",group:"RPMCORE"},{name:"ListCourses",group:"RPMCORE"},{name:"ReadCourse",group:"RPMCORE"},{name:"CreateCourse",group:"RPMCORE"},{name:"UpdateCourse",group:"RPMCORE"},{name:"DeleteCourse",group:"RPMCORE"},{name:"CreateRule",group:"RPMCORE"},{name:"ListRule",group:"RPMCORE"},{name:"ReadRule",group:"RPMCORE"},{name:"DeleteRule",group:"RPMCORE"},{name:"CreatePatientRule",group:"RPMCORE"},{name:"ListPatientRules",group:"RPMCORE"},{name:"ReadPatientRule",group:"RPMCORE"},{name:"DeletePatientRule",group:"RPMCORE"},{name:"ListTemplate",group:"RPMCORE"},{name:"CreateCourse",group:"RPMCORE"},{name:"ListCourses",group:"RPMCORE"},{name:"ReadCourse",group:"RPMCORE"},{name:"UpdateCourse",group:"RPMCORE"},{name:"DeleteCourse",group:"RPMCORE"},{name:"CreateMedicalHistory",group:"RPMCORE"},{name:"ListMedicalHistory",group:"RPMCORE"},{name:"ReadMedicalHistory",group:"RPMCORE"},{name:"UpdateListMedicalHistory",group:"RPMCORE"},{name:"DeleteMedicalHistory",group:"RPMCORE"},{name:"ReadMedicalQuestion",group:"RPMCORE"},{name:"UpdateMedicalQuestion",group:"RPMCORE"},{name:"ListNote",group:"RPMCORE"},{name:"CreateNote",group:"RPMCORE"},{name:"UpdateNote",group:"RPMCORE"},{name:"DeleteNote",group:"RPMCORE"},{name:"ListPractitionerNote",group:"RPMCORE"},{name:"CreatePractitionerNote",group:"RPMCORE"},{name:"UpdatePractitionerNote",group:"RPMCORE"},{name:"DeletePractitionerNote",group:"RPMCORE"},{name:"ListConsultation",group:"RPMCORE"}].reduce((e,t)=>(e["".concat(t.group,"/").concat(t.name)]="".concat(t.group,"/").concat(t.name),e),{}),ld={PROGRAM:{MAIN:"/rpm/program"},DOCTOR:{DASHBOARD:"/rpm/doc/dashboard",PROGRAM:"/rpm/program",PROFILE:"/rpm/profile",CHANGEPASSWORD:"/rpm/change-password",USERS:"/rpm/users",ROLES:"/rpm/roles",LOGS:"/rpm/logs"},PATIENT:{DASHBOARD:"/rpm/patient/dashboard",PERSONALDETAILS:"/rpm/patient/details",MEDICALHISTORY:"/rpm/patient/history",NOTES:"/rpm/patient/notes",RULES:"/rpm/patient/rules",ADDEDITRULE:"/rpm/patient/rules/add"},USERMANUAL:"https://www.yrpal.com/assets/pdf/Web-Portal-Manual.pdf",LICENSE_MANAGER:{PACKAGE_TEMPLATES:"/rpm/license-manager/packages-templates",CREATE_PACKAGE:"/rpm/license-manager/packages-templates/create",EDIT_PACKAGE:"/rpm/license-manager/packages-templates/edit",PROGRAM_PACKAGES:"/rpm/license-manager/program-packages"}},cd="https://api.ecommfy.com/forms/api/by-slug/ecommfyshops/yrpal_web",dd={current_page:1,from:1,last_page:1,per_page:20,to:0,total:0,per_page_options:[10,20,30,50,100]},ud={ERROR:"error",WARNING:"warning",INFO:"info",SUCCESS:"success"},pd="hh:mm a",hd="ddd MMM DD YYYY HH:mm:ss [GMT]ZZ (z)",md="MM/DD/YYYY HH:mm:ss",fd="DD/MM/YYYY ",gd="Daily",vd="Intervals",xd={SYSTEM:"SYSTEM",CUSTOM:"CUSTOM",PREDEFINED:"PREDEFINED"},yd=[{id:"CUSTOM",value:"CUSTOM",label:"Custom"},{id:"PREDEFINED",value:"PREDEFINED",label:"Predefined"}],bd={CLIENT:"rootTypeRole",PROGRAM:"programTypeRole"},jd={MALE:"Male",FEMALE:"Female",OTHER:"Other"},_d=["Orthopedics","Internal Medicine","Obstetrics and Gynecology","Dermatology","Pediatrics","Radiology","General Surgery","Ophthalmology","Fitness Trainer","Dietitian","Other"],Cd={email_notification:{reading_reminder:!1,missed_mandate:!1,non_compliant_user:!1},push_notification:{reading_reminder:!0,missed_mandate:!0,non_compliant_user:!1,course:!0,prescriptions:!0,medical_history:!0,rule:!0,profile:!0,notes:!0},whatsapp_notification:{welcome_message:!0},follow_up_setting:{send_follow_up_reminder_flag:!0,follow_up_day:1,follow_up_time:"10:30"}},wd=[{id:"BGA+",label:"A+",value:"A+"},{id:"BGA-",label:"A-",value:"A-"},{id:"BGB+",label:"B+",value:"B+"},{id:"BGB-",label:"B-",value:"B-"},{id:"BGO+",label:"O+",value:"O+"},{id:"BGO-",label:"O-",value:"O-"},{id:"BGAB+",label:"AB+",value:"AB+"},{id:"BGAB-",label:"AB-",value:"AB-"}],Sd=[{name:"Years",value:"YEAR"},{name:"Months",value:"MONTH"},{name:"Days",value:"DAY"},{name:"Present",value:"PRESENT"},{name:"Custom",value:"CUSTOM"}],Ad=[{name:"Days",value:"DAY"},{name:"Weeks",value:"WEEK"},{name:"Months",value:"MONTH"}],kd=[{name:"Low",value:"LOW"},{name:"Medium",value:"MEDIUM"},{name:"High",value:"HIGH"}],Td=[{name:"Hourly",value:"HOURLY"},{name:"Daily",value:"DAILY"},{name:"Weekly",value:"WEEKLY"}],Ed=["Father","Mother","Sibling","Child_Son/Daughter","GrandParent"],Md={data:{content:[{id:1,disease_name:"Hypertension"},{id:2,disease_name:"Diabetes"},{id:3,disease_name:"Pneumonia"},{id:4,disease_name:"Tuberculosis"},{id:5,disease_name:"Asthma"},{id:6,disease_name:"Alzheimer"},{id:7,disease_name:"Osteoporosis"},{id:8,disease_name:"Cirrhosis"},{id:9,disease_name:"Chronic Kidney Disease (CKD)"},{id:10,disease_name:"Dementia"},{id:11,disease_name:"Migraine"},{id:12,disease_name:"Hypothyroidism"}]}},Od=[{name:"Su",value:"SUN"},{name:"Mo",value:"MON"},{name:"Tu",value:"TUE"},{name:"We",value:"WED"},{name:"Th",value:"THU"},{name:"Fr",value:"FRI"},{name:"Sa",value:"SAT"}],Rd=[{question:"Do you drink alcohol?",answer:"No",remark:""},{question:"Do you smoke?",answer:"No",remark:""},{question:"Do you consume caffeine regularly (i.e. colas, coffee, teas, chocolates)?",answer:"No",remark:""},{question:"Do you have a sedentary lifestyle?",answer:"No",remark:""}],Pd=["e","E","+","-","."],Dd=[{name:"BloodPressure",value:"bp"},{name:"BloodGlucose",value:"glucose"}],Nd=[{name:"BloodPressure",value:"bp"},{name:"BloodGlucose",value:"glucose"},{name:"Others",value:"others"}],Ld=[{key:"1",text:"Once Daily"},{key:"2",text:"Twice Daily"},{key:"3",text:"Three Times Daily"},{key:"4",text:"Four Times Daily"},{key:"5",text:"Every One Hour"},{key:"6",text:"Every Two Hour"},{key:"7",text:"Every Three Hour"},{key:"0",text:"As Needed"}],Id=[{key:"TAB",text:"Tablet"},{key:"CAP",text:"Capsule"},{key:"LQD",text:"Liquid"},{key:"SPR",text:"Spray"},{key:"OIN",text:"Ointment"},{key:"GEL",text:"Gel"},{key:"CRM",text:"Cream"},{key:"PWD",text:"Powder"},{key:"INJ",text:"Injection"},{key:"DRP",text:"Drops"},{key:"INH",text:"Inhalor"},{key:"GMY",text:"Gummy"},{key:"NCAN",text:"Nasal Canulas"}],Fd=[{key:"CIR",text:(0,qt.jsx)(jc,{}),form:"TAB"},{key:"SQR",text:(0,qt.jsx)(_c,{}),form:"TAB"},{key:"SQR1",text:(0,qt.jsx)(Cc,{}),form:"TAB"},{key:"TRI",text:(0,qt.jsx)(wc,{}),form:"TAB"},{key:"OVL",text:(0,qt.jsx)(Sc,{}),form:"TAB"},{key:"OVL1",text:(0,qt.jsx)(Ac,{}),form:"TAB"},{key:"RND",text:(0,qt.jsx)(yc,{}),form:"CAP"},{key:"CHM",text:(0,qt.jsx)(Dc,{}),form:"LQD"},{key:"SPRCN",text:(0,qt.jsx)(Pc,{}),form:"SPR"},{key:"HTUBE",text:(0,qt.jsx)(Lc,{}),form:"OIN"},{key:"VTUBE",text:(0,qt.jsx)(Rc,{}),form:"GEL"},{key:"CRMBOX",text:(0,qt.jsx)(Mc,{}),form:"CRM"},{key:"SPOON",text:(0,qt.jsx)(kc,{}),form:"PWD"},{key:"NIDL",text:(0,qt.jsx)(bc,{}),form:"INJ"},{key:"DRPBT",text:(0,qt.jsx)(Oc,{}),form:"DRP"},{key:"INHLR",text:(0,qt.jsx)(Tc,{}),form:"INH"},{key:"GUM",text:(0,qt.jsx)(Ec,{}),form:"GMY"},{key:"MASK",text:(0,qt.jsx)(Nc,{}),form:"NCAN"}],$d=[{key:"mg",text:"mg",form:["TAB","CAP","CRM","GMY","OIN"]},{key:"mcg",text:"mcg",form:["TAB","CAP","GMY"]},{key:"g",text:"g",form:["PWD"]},{key:"ml",text:"ml",form:["LQD","SPR","GEL","INJ","DRP","INH"]},{key:"CFU",text:"CFU",form:["TAB","CAP","LQD"]},{key:"IU",text:"IU",form:["INJ"]},{key:"%",text:"%",form:["INJ","OIN"]},{key:"mcg/ml",text:"mcg/ml",form:["INJ","LQD"]},{key:"mEq",text:"mEq",form:["TAB","LQD","INH"]},{key:"mg/ml",text:"mg/ml",form:["LQD","INJ"]},{key:"l/min",text:"l/min",form:["NCAN"]}],Bd=[{key:"WHITE",color:"white"},{key:"RED",color:"red"},{key:"LIGHTGREEN",color:"lightgreen"},{key:"BLUE",color:"blue"},{key:"ORANGE",color:"orange"},{key:"PINK",color:"pink"},{key:"SKYBLUE",color:"skyblue"},{key:"YELLOW",color:"yellow"},{key:"GREEN",color:"green"}],zd=[{text:"and",sign:"AND"},{text:"or",sign:"OR"},{text:"eq",sign:"is"},{text:"not",sign:"is not"},{text:"gt",sign:"Greater than"},{text:"gte",sign:"Greater than equal to"},{text:"lt",sign:"Less than"},{text:"lte",sign:"Less than equal to"},{text:"bor",sign:"|"},{text:"band",sign:"&"},{text:"plus",sign:"+"},{text:"minus",sign:"-"},{text:"div",sign:"/"},{text:"mul",sign:"*"},{text:"mod",sign:"%"}],Hd={ERR_DUPLICATE_STORE_NAME_IN_TENANT:"ERR_DUPLICATE_STORE_NAME_IN_TENANT",ERR_DUPLICATE_RECORD:" ERR_DUPLICATE_RECORD",ERR_DUPLICATE_KEY:"ERR_DUPLICATE_KEY ",ERR_MATCHING_PASSWORDS:"ERR_MATCHING_PASSWORDS",ERR_USER_EXISTS:"ERR_USER_EXISTS",ERR_GROUP_NOT_FOUND:"ERR_GROUP_NOT_FOUND",ERR_EMPTY_PATH:"ERR_EMPTY_PATH","AR51_SYS:RESOURCE_ACCESS_DENIED":"RESOURCE_ACCESS_DENIED","AR51_SYS:ERR_INVALID_CREDS":"ERR_INVALID_CREDS",ERR_PASSWORD_TOO_WEAK:"ERR_PASSWORD_TOO_WEAK",ERR_EMPTY_VALUE:"ERR_EMPTY_VALUE",ERR_BAD_ESCALATION:"ERR_BAD_ESCALATION",username:"username",regexp:"regexp",ERR_BAD_PASSWORD:"ERR_BAD_PASSWORD",ERR_BAD_GROUP_UPDATE:"ERR_BAD_GROUP_UPDATE",ERR_ROLE_EXISTS:"ERR_ROLE_EXISTS",OVERLAPPING_TIME_RANGE:"OVERLAPPING_TIME_RANGE",ERR_MAX_VALUE:"ERR_MAX_VALUE",ERR_ACCESS_DENIED:"ERR_ACCESS_DENIED",PROGRAM_NOT_FOUND:"PROGRAM_NOT_FOUND",BAD_TIME_RANGE:"BAD_TIME_RANGE",ERR_NOT_FOUND:"ERR_NOT_FOUND",ERR_SCHEDULE_ALREADY_ASSIGNED:"ERR_SCHEDULE_ALREADY_ASSIGNED",ERR_INCORRECT_MEDICAL_HISTORY_DURATION:"ERR_INCORRECT_MEDICAL_HISTORY_DURATION",ERR_ONLY_ONE_FUTURE_COURSE_CAN_BE_ASSIGNED:"ERR_ONLY_ONE_FUTURE_COURSE_CAN_BE_ASSIGNED",ERR_MEDICINE_START_DATE_CANNOT_BE_AFTER_END_DATE:"ERR_MEDICINE_START_DATE_CANNOT_BE_AFTER_END_DATE",ERR_TEMPLATE_NAME_ALREADY_EXIST:"ERR_TEMPLATE_NAME_ALREADY_EXIST",ERR_MOBILE_NUMBER_ALREADY_EXIST:"ERR_MOBILE_NUMBER_ALREADY_EXIST",ERR_RULE_ALREADY_EXIST:"ERR_RULE_ALREADY_EXIST",WORKOUT_ALREADY_EXISTS:"ERR_WORKOUT_ALREADY_EXISTS",PACKAGE_ALREADY_EXISTS_WITHIN_SPECIFIED_DATE_RANGE:"PACKAGE_ALREADY_EXISTS_WITHIN_SPECIFIED_DATE_RANGE"},Wd={first_name:"First &",last_name:"Last Name",attributes:{mobile:"1234567890",qualifications:"",registration:"XXXX"}},Ud=function(e){const t={};return Object.keys(e).forEach(n=>{const r=(e[n][0]||"").split(":");Object.keys(Hd).every(e=>r[0]!==e||(t[n]="error:rpm_".concat(Hd[e].toLocaleLowerCase()),!1))}),t},Vd=function(e,t){let n=t;return Object.keys(Hd).every(t=>e!==t||(n="error:rpm_".concat(Hd[t].toLocaleLowerCase()),!1)),n},Gd=(e,t)=>{var n;let r=[],i={};const o=null===e||void 0===e?void 0:e.isAdmin,a=(null===e||void 0===e||null===(n=e.permissions)||void 0===n?void 0:n.allowedActions)||{};return Object.keys(a).forEach(e=>{const n=null===e||void 0===e?void 0:e.split("/").filter(e=>e)[1];var i;n===t&&(r=null===(i=a[e])||void 0===i?void 0:i.list)}),i={isAdmin:o,showMenuManageUser:o,showProgramList:o||qd(r,[sd["RPMCORE/ListPrograms"]]),showViewProgramBtn:o||qd(r,[sd["RPMCORE/ReadProgram"]]),showAddProgramBtn:o||qd(r,[sd["RPMCORE/CreateProgram"]]),showEditProgramBtn:o||qd(r,[sd["RPMCORE/UpdateProgram"]]),showPatientList:o||qd(r,[sd["RPMCORE/ListPatients"]]),showViewPatientBtn:o||qd(r,[sd["RPMCORE/ReadPatient"]]),showAddPatientBtn:o||qd(r,[sd["RPMCORE/CreatePatient"]]),showAllPatientListText:o||qd(r,[sd["RPMCORE/ListAllPatients"]]),showDeletePatientBtn:o||qd(r,[sd["RPMCORE/DeletePatients"]]),showDismissAlertPatientBtn:o||qd(r,[sd["RPMCORE/DismissAlerts"]]),showUpdatePatientConfig:o||qd(r,[sd["RPMCORE/UpdatePatientConfiguration"]]),showUpdatePatientProfile:o||qd(r,[sd["RPMCORE/UpdatePatientProfile"]]),showRuleList:o||qd(r,[sd["RPMCORE/ListRule"]]),showViewRuleBtn:o||qd(r,[sd["RPMCORE/ReadRule"]]),showAddRuleBtn:o||qd(r,[sd["RPMCORE/CreateRule"]]),showDeleteRuleBtn:o||qd(r,[sd["RPMCORE/DeleteRule"]]),showTemplateList:o||qd(r,[sd["RPMCORE/ListTemplate"]]),showPatientRuleList:o||qd(r,[sd["RPMCORE/ListPatientRules"]]),showViewPatientRuleBtn:o||qd(r,[sd["RPMCORE/ReadPatientRule"]]),showAddPatientRuleBtn:o||qd(r,[sd["RPMCORE/CreatePatientRule"]]),showDeletePatientRuleBtn:o||qd(r,[sd["RPMCORE/DeletePatientRule"]]),showCourseList:o||qd(r,[sd["RPMCORE/ListCourses"]]),showViewCourseBtn:o||qd(r,[sd["RPMCORE/ReadCourse"]]),showAddCourseBtn:o||qd(r,[sd["RPMCORE/CreateCourse"]]),showDeleteCourseBtn:o||qd(r,[sd["RPMCORE/DeleteCourse"]]),showEditCourseBtn:o||qd(r,[sd["RPMCORE/UpdateCourse"]]),showMedicalHistoryList:o||qd(r,[sd["RPMCORE/ListMedicalHistory"]]),showMedicalHistoryBtn:o||qd(r,[sd["RPMCORE/ReadMedicalHistory"]]),showAddMedicalHistoryBtn:o||qd(r,[sd["RPMCORE/CreateMedicalHistory"]]),showDeleteMedicalHistoryBtn:o||qd(r,[sd["RPMCORE/DeleteMedicalHistory"]]),showEditMedicalHistoryBtn:o||qd(r,[sd["RPMCORE/UpdateListMedicalHistory"]]),showSocialHistoryList:o||qd(r,[sd["RPMCORE/ReadMedicalQuestion"]]),editSocialHistoryList:o||qd(r,[sd["RPMCORE/UpdateMedicalQuestion"]]),showConsultationList:o||qd(r,[sd["RPMCORE/ListConsultation"]]),showPrescriptionNoteList:o||qd(r,[sd["RPMCORE/ListPractitionerNote"]]),showCreatePrescriptionNoteList:o||qd(r,[sd["RPMCORE/CreatePractitionerNote"]]),showEditPrescriptionNote:o||qd(r,[sd["RPMCORE/UpdatePractitionerNote"]]),showDeletePrescriptionList:o||qd(r,[sd["RPMCORE/DeletePractitionerNote"]]),showNoteList:o||qd(r,[sd["RPMCORE/ListNote"]]),showCreateNoteList:o||qd(r,[sd["RPMCORE/CreateNote"]]),showEditNote:o||qd(r,[sd["RPMCORE/UpdateNote"]]),showDeleteList:o||qd(r,[sd["RPMCORE/DeleteNote"]]),showPrescriptionNoteList_showNoteList:o||qd(r,[sd["RPMCORE/ListNote"]])||qd(r,[sd["RPMCORE/ListPractitionerNote"]]),showCreatePrescriptionNoteList_showCreateNoteList:o||qd(r,[sd["RPMCORE/CreateNote"]])||qd(r,[sd["RPMCORE/CreatePractitionerNote"]]),showEditPrescriptionNote_showEditNote:o||qd(r,[sd["RPMCORE/UpdateNote"]])||qd(r,[sd["RPMCORE/UpdatePractitionerNote"]]),showDeletePrescriptionList_showDeleteList:o||qd(r,[sd["RPMCORE/DeleteNote"]])||qd(r,[sd["RPMCORE/DeletePractitionerNote"]])},i},qd=(e,t)=>!cs((e||[]).find(e=>t.includes(e))),Yd=e=>{switch(e){case"report":case"prescription_report":return!1;default:return!0}},Zd=async(e,t,n,r,i,o,a,s)=>{try{await e(((e,t,n,r,i,o,a)=>async s=>{s(na(!0));try{let s;s=o&&a?"".concat(pa.by_course,"/").concat(o,"/").concat(e,"/").concat(t,"/").concat(a,".pdf"):"".concat(pa.by_patient,"/").concat(e,"/").concat(n,".pdf?start_date=").concat(r,"&end_date=").concat(i);const l=await Iu(s,{responseType:"arraybuffer"}),c=new Blob([null===l||void 0===l?void 0:l.data],{type:"application/pdf"}),d=new File([c],"report.pdf",{type:"application/pdf"}),u=window.URL.createObjectURL(d),p=document.createElement("a");return p.setAttribute("href",u),p.setAttribute("target","_blank"),p.style.display="none",document.body.appendChild(p),p.click(),document.body.removeChild(p),null===l||void 0===l?void 0:l.data}finally{s(na(!1))}})(t,n,r,i,o,a,s)),e(Zo({subTitle:"message:rpm_DownloadFileSuccessfully",severity:ud.SUCCESS}))}catch(l){e(Zo({subTitle:l.message,severity:ud.ERROR}))}},Kd=async(e,t,n,r,i,o,a,s)=>{try{await e(((e,t,n,r,i,o,a)=>async s=>{s(na(!0));try{let s;s=o&&a?"".concat(pa.by_course,"/").concat(o,"/").concat(e,"/").concat(t,"/").concat(a,"/detailed_report.pdf?&history_limit=20&note_limit=20"):"".concat(pa.by_patient,"/").concat(e,"/").concat(n,"/detailed_report.pdf?start_date=").concat(r,"&end_date=").concat(i,"&vital=").concat(n,"&history_limit=20");const l=await Iu(s,{responseType:"arraybuffer"}),c=new Blob([null===l||void 0===l?void 0:l.data],{type:"application/pdf"}),d=new File([c],"report.pdf",{type:"application/pdf"}),u=window.URL.createObjectURL(d),p=document.createElement("a");return p.setAttribute("href",u),p.setAttribute("target","_blank"),p.style.display="none",document.body.appendChild(p),p.click(),document.body.removeChild(p),null===l||void 0===l?void 0:l.data}finally{s(na(!1))}})(t,n,r,i,o,a,s)),e(Zo({subTitle:"message:rpm_DownloadFileSuccessfully",severity:ud.SUCCESS}))}catch(l){e(Zo({subTitle:l.message,severity:ud.ERROR}))}},Xd=async(e,t,n)=>{try{await e(((e,t)=>async n=>{n(na(!0));try{const n="".concat(pa.consultation,"/").concat(e,"/").concat(t,"/doctor_report.pdf"),r=await Iu(n,{responseType:"arraybuffer"}),i=new Blob([null===r||void 0===r?void 0:r.data],{type:"application/pdf"}),o=new File([i],"report.pdf",{type:"application/pdf"}),a=window.URL.createObjectURL(o),s=document.createElement("a");return s.setAttribute("href",a),s.setAttribute("target","_blank"),s.style.display="none",document.body.appendChild(s),s.click(),document.body.removeChild(s),null===r||void 0===r?void 0:r.data}finally{n(na(!1))}})(t,n)),e(Zo({subTitle:"message:rpm_DownloadFileSuccessfully",severity:ud.SUCCESS}))}catch(r){e(Zo({subTitle:r.message,severity:ud.ERROR}))}},Qd=e=>{const t=null===e||void 0===e?void 0:e.map(e=>e.values.activity),n=new Set(t);return Array.from(n)},Jd=["ADMIN","PRESCRIPTION","DOCTOR","OTHER","SUMMARY"],eu=[{name:"Hospital",value:"hospital"},{name:"Clinic",value:"clinic"},{name:"Fitness_Center",value:"fitnessCenter"},{name:"Wellness_Center",value:"wellnessCenter"}],tu={TEXT_FIELD:"textfield",NUMBER:"number",DROPDOWN:"dropdown",MULTI_DROPDOWN:"multi_dropdown",SELECT:"select",FILE:"file"},nu=[{goal:"Weight Gain",category:["wellnessCenter"]},{goal:"Weight Loss",category:["wellnessCenter"]},{goal:"Muscle Gain",category:["wellnessCenter"]},{goal:"General Fitness",category:["wellnessCenter"]},{goal:"Disease Management",category:["wellnessCenter"]},{goal:"Improve Stamina",category:["wellnessCenter"]},{goal:"Insomnia",category:["wellnessCenter"]},{goal:"Special Population (Specially Abled)",category:["wellnessCenter","fitnessCenter"]},{goal:"Senior Citizen fitness",category:["wellnessCenter"]},{goal:"Stress Reduction through Physical Activity",category:["wellnessCenter"]}],ru=[{name:"BMI",unit:"-",field_type:tu.NUMBER,range:{min:18,max:25}},{name:"Muscle Mass",unit:"kg",field_type:tu.NUMBER,range:{min:20,max:80}},{name:"Daily Calorie Intake",unit:"kcal/day",field_type:tu.NUMBER,range:{min:2e3,max:4e3}},{name:"Protein Intake",unit:"g/day",field_type:tu.NUMBER,range:{min:50,max:200}},{name:"Waist Circumference",unit:"cm",field_type:tu.NUMBER,range:{min:60,max:100}},{name:"Calorie Deficit",unit:"kcal/day",field_type:tu.NUMBER,range:{min:200,max:1e3}},{name:"Daily Steps",unit:"steps/day",field_type:tu.NUMBER,range:{min:5e3,max:15e3}},{name:"Physical Activity Duration",unit:"min/day",field_type:tu.NUMBER,range:{min:30,max:90}},{name:"Energy Level",unit:"rating",field_type:tu.SELECT,range:{min:1,max:5}},{name:"Pain Level",unit:"rating",field_type:tu.SELECT,range:{min:1,max:10}}],iu=["Weight Gain","Weight Loss","Muscle Gain","General Fitness","Disease Management","Improve Stamina","Insomnia","Special Population (Specially Abled)","Senior Citizen fitness","Stress Reduction through Physical Activity"],ou=[{name:"Gender",unit:"",field_type:tu.SELECT,range:"",key:"gender",options:["Male","Female","Other"],disabled:!0,is_required:!0,traceableBy:["Provider"]},{name:"Height",unit:"cm,feet",field_type:tu.NUMBER,range:"2-250",key:"height",traceableBy:["Provider"]},{name:"Body Weight",unit:"kg,lb",field_type:tu.NUMBER,range:"40-220",key:"weight",traceableBy:["Provider"]},{name:"Body Fat %",unit:"%",field_type:tu.TEXT_FIELD,range:"10-30",key:"bodyfat",traceableBy:["Provider"]},{name:"Sleep Duration",unit:"hrs/day",field_type:tu.SELECT,range:"6-9",key:"sleepTime",traceableBy:["Provider"]},{name:"Workout Frequency",unit:"sessions/week",field_type:tu.SELECT,range:"3-6",key:"workoutFrequency",traceableBy:["Provider"]},{name:"Meal Frequency",unit:"meals/day",field_type:tu.SELECT,range:"",key:"mealsPerDay",traceableBy:["Provider"]},{name:"Allergies & deseases",unit:"",field_type:tu.TEXT_FIELD,range:"",key:"allergiesDeseases",traceableBy:["Provider"]},{name:"Blood Pressure",unit:"",field_type:tu.TEXT_FIELD,range:"",key:"blood_pressure",traceableBy:["Provider"]},{name:"Blood Glucose",unit:"",field_type:tu.TEXT_FIELD,range:"",key:"blood_glucose",traceableBy:["Provider"]},{name:"Body Composition Analysis",unit:"",field_type:tu.TEXT_FIELD,range:"",key:"bodyCompositionAnalysis",traceableBy:["Provider"]},{name:"Body Measurements",unit:"",field_type:tu.TEXT_FIELD,range:"",key:"bodyMeasurements",traceableBy:["Provider"]},{name:"Breath Hold Test",unit:"",field_type:tu.TEXT_FIELD,range:"",key:"breathHoldTest",traceableBy:["Provider"]},{name:"Cardiovascular Endurance",unit:"",field_type:tu.TEXT_FIELD,range:"",key:"cardiovascularEndurance",traceableBy:["Provider"]},{name:"Flexibility Test",unit:"",field_type:tu.TEXT_FIELD,range:"",key:"flexibilityTest",traceableBy:["Provider"]},{name:"Injuries & Deseases",unit:"",field_type:tu.TEXT_FIELD,range:"",key:"injuriesDeseases",traceableBy:["Provider"]},{name:"Strength Test",unit:"",field_type:tu.TEXT_FIELD,range:"",key:"strengthTest",traceableBy:["Provider"]},{name:"Training Level",unit:"",field_type:tu.TEXT_FIELD,range:"",key:"trainingLevel",traceableBy:["Provider"]},{name:"Next Assessment",unit:"",field_type:tu.TEXT_FIELD,range:"",key:"nextSessionDate",disabled:!0,traceableBy:["Provider"],is_required:!0}],au=[{name:"Fitness",value:"fitnessCenter",id:1},{name:"Dietitian",value:"wellnessCenter",id:2},{name:"Skincare",value:"Skincare",id:3}],su=[{name:"Calorie Surplus",value:"calorieSurplus",id:1},{name:"Calorie Deficit",value:"calorieDeficit",id:2},{name:"Maintenance Calories",value:"maintenanceCalories",id:3}],lu=["Duration-Based","Repetition-Based"],cu=e=>oa()(e,"auth.isLoggedIn"),du=e=>oa()(e,"header.headerData"),uu=e=>oa()(e,"loader"),pu=e=>oa()(e,"message"),hu=e=>oa()(e,"header.headerData.breadcrumb"),mu=e=>oa()(e,"header.headerData.course"),fu=e=>oa()(e,"header.headerData.complianceStatus"),gu=e=>oa()(e,"header.headerData.course_glucose"),vu=e=>oa()(e,"dashboard"),xu=e=>oa()(e,"dashboard.vitals.bp.course"),yu=e=>oa()(e,"dashboard.vitals.glucose.course"),bu=e=>oa()(e,"user"),ju=e=>oa()(e,"Programs.programData"),_u="LOGIN",Cu="LOGOUT",wu="USER",Su=()=>(e,t)=>{const n=(r=t(),oa()(r,"app"));var r;const i="".concat(n.redirectBase,"/login"),o="".concat(n.loginURL,"/authgateway/api/authenticate?client_id=").concat(n.defaultTenant,"&redirect_uri=").concat(i);window.location.href=o},Au=()=>async e=>{try{await Iu(ha.logout,{})}catch(t){console.log(t)}finally{$o.clearToken(),(e=>{e({type:Cu})})(e),e(Su())}},ku=()=>async e=>{e(na(!0));try{const t=ma.INTROSPECT,{data:n}=await Iu(t),r=!ta()(((null===n||void 0===n?void 0:n.roles)||[]).find(e=>"root"===e.name&&e.kind===xd.SYSTEM));return e((e=>t=>t({type:wu,data:e}))((0,i.A)((0,i.A)({},n),{},{isAdmin:r}))),(0,i.A)((0,i.A)({},n),{},{isAdmin:r,showMenuManageUser:r,showStaffMenu:r||Tu(n,[sd["AGM/ListUsers"]]),showCreateUserBtn:r||Tu(n,[sd["AGM/CreateUser"]]),showReadUserBtn:r||Tu(n,[sd["AGM/ReadUser"]]),showUpdateUserBtn:r||Tu(n,[sd["AGM/UpdateUser"]]),showDeleteUserBtn:r||Tu(n,[sd["AGM/DeleteUser"]]),showRoleMenu:r||Tu(n,[sd["AGM/ListRoles"]]),showCreateRoleBtn:r||Tu(n,[sd["AGM/CreateRole"]]),showReadRoleBtn:r||Tu(n,[sd["AGM/ReadRole"]]),showUpdateRoleBtn:r||Tu(n,[sd["AGM/UpdateRole"]]),showDeleteRoleBtn:r||Tu(n,[sd["AGM/DeleteRole"]]),showProgramList:r||Tu(n,[sd["RPMCORE/ListPrograms"]]),showViewProgramBtn:r||Tu(n,[sd["RPMCORE/ReadProgram"]]),showAddProgramBtn:r||Tu(n,[sd["RPMCORE/CreateProgram"]]),showEditProgramBtn:r||Tu(n,[sd["RPMCORE/UpdateProgram"]])})}finally{e(na(!1))}},Tu=(e,t)=>{var n;if(e.isAdmin)return!0;const r=(null===e||void 0===e||null===(n=e.permissions)||void 0===n?void 0:n.allowedActions)||{};return Object.keys(r).some(e=>{var n;return!ta()(((null===(n=r[e])||void 0===n?void 0:n.list)||[]).find(e=>t.includes(e)))})},Eu=["headers"],Mu=["headers"],Ou=["headers"],Ru=["headers"];let Pu=null;const Du=()=>{},Nu=()=>{},Lu=e=>{null===Pu&&(Pu=Qo().create()),e.baseURL&&(Pu.defaults.baseURL=e.baseURL),e["X-Cw-Tenant-Id"]&&(Pu.defaults.headers.common["X-Cw-Tenant-Id"]=e["X-Cw-Tenant-Id"]),e.Authorization&&(Pu.defaults.headers.common.Authorization=e.Authorization)};async function Iu(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const{headers:n}=t,r=Ko(t,Eu),o=(0,i.A)({headers:(0,i.A)({"Content-Type":"application/json"},n)},r),a=await Pu.get(e,o);if(a.status>=200&&a.status<300)return{data:a.data,status:a.status};const s=new Error(a.statusText);throw s.response=a,s}async function Fu(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};const{headers:r}=n,o=Ko(n,Mu),a=(0,i.A)({headers:(0,i.A)({"Content-Type":"application/json"},r)},o);try{const n=await Pu.post(e,ss(t),a);if(n.status>=200&&n.status<300)return{data:n.data,status:n.status,headers:n.headers};const r=new Error(n.statusText);throw r.response=n,r}catch(s){throw Du({message:Nu(s),severity:"error"}),s}}async function $u(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};const{headers:r}=n,o=Ko(n,Ou),a=(0,i.A)({headers:(0,i.A)({"Content-Type":"application/json"},r)},o);try{const n=await Pu.put(e,ss(t),a);if(n.status>=200&&n.status<300)return{data:n.data,status:n.status};const r=new Error(n.statusText);throw r.response=n,r}catch(s){throw Du({message:Nu(s),severity:"error"}),s}}async function Bu(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};const{headers:r}=t,o=Ko(t,Ru),a=(0,i.A)({headers:(0,i.A)({"Content-Type":"application/json"},r)},o);(0,Jo.isEmpty)(n)||(a.data=ss(n));try{const t=await Pu.delete(e,a);if(t.status>=200&&t.status<300)return{status:t.status};const n=new Error(t.statusText);throw n.response=t,n}catch(s){throw Du({message:Nu(s),severity:"error"}),s}}const zu=e=>{Pu.interceptors.response.use(e=>e,function(t){const n=t.config;if(t.response&&t.response.status){var r,i;if(401===t.response.status&&n.url===ha.refresh)return e.dispatch(Au()),Promise.reject(t);if(403===t.response.status&&!n._retry&&"AR51_SYS:ERR_INVALID_CREDS"===(null===t||void 0===t||null===(r=t.response)||void 0===r||null===(i=r.data)||void 0===i?void 0:i.code)){n._retry=!0;const{refreshToken:r,accountId:i}=$o.getAccessToken();if(!r||!i)return e.dispatch(Au()),Promise.reject(t);const o="".concat(null===n||void 0===n?void 0:n.baseURL,"/authgateway/api/token?grant_type=refresh_token&client_id=").concat(i,"&refresh_token=").concat(r);return Pu.post(o,{}).then(r=>{let{data:o,status:a}=r;return 200===a?(Hu({accessToken:o.access_token,accountId:i,refreshToken:o.refresh_token,expiresIn:o.expiresIn}),n.headers={"Content-Type":"application/json",Authorization:"Bearer ".concat(o.access_token),"X-CW-Tenant-Id":i},Pu(n)):(e.dispatch(Au()),Promise.reject(t))})}return Promise.reject(t)}return Promise.reject(t)})},Hu=e=>{Lu({Authorization:"Bearer ".concat(e.accessToken),"X-Cw-Tenant-Id":e.accountId});const t=(void 0).mapAuth(e);localStorage.setItem("auth_data",JSON.stringify(t)),(void 0).store.dispatch((e=>t=>t({type:_u,data:e}))(t))};var Wu=n(65173),Uu=n.n(Wu);function Vu(){const e=wt(cu),t=so();return We.useEffect(()=>{e&&t(ld.PROGRAM.MAIN,{replace:!0})},[e]),null}Vu.propTypes={app:Uu().object,isLoggedIn:Uu().bool,baseUrl:Uu().string,consoleUrl:Uu().string,redirectToPath:Uu().string};const Gu=Vu;var qu=n(70245),Yu=n(56776);function Zu(e){var t,n,r="";if("string"==typeof e||"number"==typeof e)r+=e;else if("object"==typeof e)if(Array.isArray(e)){var i=e.length;for(t=0;t<i;t++)e[t]&&(n=Zu(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}const Ku=function(){for(var e,t,n=0,r="",i=arguments.length;n<i;n++)(e=arguments[n])&&(t=Zu(e))&&(r&&(r+=" "),r+=t);return r};var Xu=n(58812),Qu=n(18698);const Ju=["className","component"];function ep(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const{themeId:t,defaultTheme:n,defaultClassName:r="MuiBox-root",generateClassName:i}=e,o=(0,Bt.default)("div",{shouldForwardProp:e=>"theme"!==e&&"sx"!==e&&"as"!==e})(Xu.A),a=We.forwardRef(function(e,a){const s=Gt(n),l=(0,Qu.A)(e),{className:c,component:d="div"}=l,u=(0,nn.A)(l,Ju);return(0,qt.jsx)(o,(0,Ft.A)({as:d,ref:a,className:Ku(c,i?i(r):r),theme:t&&s[t]||s},u))});return a}var tp=n(79386),np=n(37344);const rp=(0,ar.A)("MuiBox",["root"]),ip=(0,np.A)(),op=ep({themeId:Xt.A,defaultTheme:ip,defaultClassName:rp.root,generateClassName:tp.A.generate});function ap(e){return(0,sr.Ay)("MuiToolbar",e)}(0,ar.A)("MuiToolbar",["root","gutters","regular","dense"]);const sp=["className","component","disableGutters","variant"],lp=(0,Vn.Ay)("div",{name:"MuiToolbar",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,!n.disableGutters&&t.gutters,t[n.variant]]}})(e=>{let{theme:t,ownerState:n}=e;return(0,Ft.A)({position:"relative",display:"flex",alignItems:"center"},!n.disableGutters&&{paddingLeft:t.spacing(2),paddingRight:t.spacing(2),[t.breakpoints.up("sm")]:{paddingLeft:t.spacing(3),paddingRight:t.spacing(3)}},"dense"===n.variant&&{minHeight:48})},e=>{let{theme:t,ownerState:n}=e;return"regular"===n.variant&&t.mixins.toolbar}),cp=We.forwardRef(function(e,t){const n=(0,$t.b)({props:e,name:"MuiToolbar"}),{className:r,component:i="div",disableGutters:o=!1,variant:a="regular"}=n,s=(0,nn.A)(n,sp),l=(0,Ft.A)({},n,{component:i,disableGutters:o,variant:a}),c=(e=>{const{classes:t,disableGutters:n,variant:r}=e,i={root:["root",!n&&"gutters",r]};return(0,ir.A)(i,ap,t)})(l);return(0,qt.jsx)(lp,(0,Ft.A)({as:i,className:(0,nr.A)(c.root,r),ref:t,ownerState:l},s))}),dp=cp;var up=n(98082),pp=n(6803),hp=n(67266);const mp=e=>{let t;return t=e<1?5.11916*e**2:4.5*Math.log(e+1)+2,(t/100).toFixed(2)};function fp(e){return(0,sr.Ay)("MuiPaper",e)}(0,ar.A)("MuiPaper",["root","rounded","outlined","elevation","elevation0","elevation1","elevation2","elevation3","elevation4","elevation5","elevation6","elevation7","elevation8","elevation9","elevation10","elevation11","elevation12","elevation13","elevation14","elevation15","elevation16","elevation17","elevation18","elevation19","elevation20","elevation21","elevation22","elevation23","elevation24"]);const gp=["className","component","elevation","square","variant"],vp=(0,Vn.Ay)("div",{name:"MuiPaper",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[n.variant],!n.square&&t.rounded,"elevation"===n.variant&&t["elevation".concat(n.elevation)]]}})(e=>{let{theme:t,ownerState:n}=e;var r;return(0,Ft.A)({backgroundColor:(t.vars||t).palette.background.paper,color:(t.vars||t).palette.text.primary,transition:t.transitions.create("box-shadow")},!n.square&&{borderRadius:t.shape.borderRadius},"outlined"===n.variant&&{border:"1px solid ".concat((t.vars||t).palette.divider)},"elevation"===n.variant&&(0,Ft.A)({boxShadow:(t.vars||t).shadows[n.elevation]},!t.vars&&"dark"===t.palette.mode&&{backgroundImage:"linear-gradient(".concat((0,hp.X4)("#fff",mp(n.elevation)),", ").concat((0,hp.X4)("#fff",mp(n.elevation)),")")},t.vars&&{backgroundImage:null==(r=t.vars.overlays)?void 0:r[n.elevation]}))}),xp=We.forwardRef(function(e,t){const n=(0,$t.b)({props:e,name:"MuiPaper"}),{className:r,component:i="div",elevation:o=1,square:a=!1,variant:s="elevation"}=n,l=(0,nn.A)(n,gp),c=(0,Ft.A)({},n,{component:i,elevation:o,square:a,variant:s}),d=(e=>{const{square:t,elevation:n,variant:r,classes:i}=e,o={root:["root",r,!t&&"rounded","elevation"===r&&"elevation".concat(n)]};return(0,ir.A)(o,fp,i)})(c);return(0,qt.jsx)(vp,(0,Ft.A)({as:i,ownerState:c,className:(0,nr.A)(d.root,r),ref:t},l))}),yp=xp;function bp(e){return(0,sr.Ay)("MuiAppBar",e)}(0,ar.A)("MuiAppBar",["root","positionFixed","positionAbsolute","positionSticky","positionStatic","positionRelative","colorDefault","colorPrimary","colorSecondary","colorInherit","colorTransparent","colorError","colorInfo","colorSuccess","colorWarning"]);const jp=["className","color","enableColorOnDark","position"],_p=(e,t)=>e?"".concat(null==e?void 0:e.replace(")",""),", ").concat(t,")"):t,Cp=(0,Vn.Ay)(yp,{name:"MuiAppBar",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t["position".concat((0,pp.A)(n.position))],t["color".concat((0,pp.A)(n.color))]]}})(e=>{let{theme:t,ownerState:n}=e;const r="light"===t.palette.mode?t.palette.grey[100]:t.palette.grey[900];return(0,Ft.A)({display:"flex",flexDirection:"column",width:"100%",boxSizing:"border-box",flexShrink:0},"fixed"===n.position&&{position:"fixed",zIndex:(t.vars||t).zIndex.appBar,top:0,left:"auto",right:0,"@media print":{position:"absolute"}},"absolute"===n.position&&{position:"absolute",zIndex:(t.vars||t).zIndex.appBar,top:0,left:"auto",right:0},"sticky"===n.position&&{position:"sticky",zIndex:(t.vars||t).zIndex.appBar,top:0,left:"auto",right:0},"static"===n.position&&{position:"static"},"relative"===n.position&&{position:"relative"},!t.vars&&(0,Ft.A)({},"default"===n.color&&{backgroundColor:r,color:t.palette.getContrastText(r)},n.color&&"default"!==n.color&&"inherit"!==n.color&&"transparent"!==n.color&&{backgroundColor:t.palette[n.color].main,color:t.palette[n.color].contrastText},"inherit"===n.color&&{color:"inherit"},"dark"===t.palette.mode&&!n.enableColorOnDark&&{backgroundColor:null,color:null},"transparent"===n.color&&(0,Ft.A)({backgroundColor:"transparent",color:"inherit"},"dark"===t.palette.mode&&{backgroundImage:"none"})),t.vars&&(0,Ft.A)({},"default"===n.color&&{"--AppBar-background":n.enableColorOnDark?t.vars.palette.AppBar.defaultBg:_p(t.vars.palette.AppBar.darkBg,t.vars.palette.AppBar.defaultBg),"--AppBar-color":n.enableColorOnDark?t.vars.palette.text.primary:_p(t.vars.palette.AppBar.darkColor,t.vars.palette.text.primary)},n.color&&!n.color.match(/^(default|inherit|transparent)$/)&&{"--AppBar-background":n.enableColorOnDark?t.vars.palette[n.color].main:_p(t.vars.palette.AppBar.darkBg,t.vars.palette[n.color].main),"--AppBar-color":n.enableColorOnDark?t.vars.palette[n.color].contrastText:_p(t.vars.palette.AppBar.darkColor,t.vars.palette[n.color].contrastText)},!["inherit","transparent"].includes(n.color)&&{backgroundColor:"var(--AppBar-background)"},{color:"inherit"===n.color?"inherit":"var(--AppBar-color)"},"transparent"===n.color&&{backgroundImage:"none",backgroundColor:"transparent",color:"inherit"}))}),wp=We.forwardRef(function(e,t){const n=(0,$t.b)({props:e,name:"MuiAppBar"}),{className:r,color:i="primary",enableColorOnDark:o=!1,position:a="fixed"}=n,s=(0,nn.A)(n,jp),l=(0,Ft.A)({},n,{color:i,position:a,enableColorOnDark:o}),c=(e=>{const{color:t,position:n,classes:r}=e,i={root:["root","color".concat((0,pp.A)(t)),"position".concat((0,pp.A)(n))]};return(0,ir.A)(i,bp,r)})(l);return(0,qt.jsx)(Cp,(0,Ft.A)({square:!0,component:"header",ownerState:l,elevation:4,className:(0,nr.A)(c.root,r,"fixed"===a&&"mui-fixed"),ref:t},s))}),Sp=wp;var Ap=n(13030),kp=n(61475),Tp=n(93319),Ep=n(13574);function Mp(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}function Op(e,t){var n=Object.create(null);return e&&We.Children.map(e,function(e){return e}).forEach(function(e){n[e.key]=function(e){return t&&(0,We.isValidElement)(e)?t(e):e}(e)}),n}function Rp(e,t,n){return null!=n[t]?n[t]:e.props[t]}function Pp(e,t,n){var r=Op(e.children),i=function(e,t){function n(n){return n in t?t[n]:e[n]}e=e||{},t=t||{};var r,i=Object.create(null),o=[];for(var a in e)a in t?o.length&&(i[a]=o,o=[]):o.push(a);var s={};for(var l in t){if(i[l])for(r=0;r<i[l].length;r++){var c=i[l][r];s[i[l][r]]=n(c)}s[l]=n(l)}for(r=0;r<o.length;r++)s[o[r]]=n(o[r]);return s}(t,r);return Object.keys(i).forEach(function(o){var a=i[o];if((0,We.isValidElement)(a)){var s=o in t,l=o in r,c=t[o],d=(0,We.isValidElement)(c)&&!c.props.in;!l||s&&!d?l||!s||d?l&&s&&(0,We.isValidElement)(c)&&(i[o]=(0,We.cloneElement)(a,{onExited:n.bind(null,a),in:c.props.in,exit:Rp(a,"exit",e),enter:Rp(a,"enter",e)})):i[o]=(0,We.cloneElement)(a,{in:!1}):i[o]=(0,We.cloneElement)(a,{onExited:n.bind(null,a),in:!0,exit:Rp(a,"exit",e),enter:Rp(a,"enter",e)})}}),i}var Dp=Object.values||function(e){return Object.keys(e).map(function(t){return e[t]})},Np=function(e){function t(t,n){var r,i=(r=e.call(this,t,n)||this).handleExited.bind(d(r));return r.state={contextValue:{isMounting:!0},handleExited:i,firstRender:!0},r}_n(t,e);var n=t.prototype;return n.componentDidMount=function(){this.mounted=!0,this.setState({contextValue:{isMounting:!1}})},n.componentWillUnmount=function(){this.mounted=!1},t.getDerivedStateFromProps=function(e,t){var n,r,i=t.children,o=t.handleExited;return{children:t.firstRender?(n=e,r=o,Op(n.children,function(e){return(0,We.cloneElement)(e,{onExited:r.bind(null,e),in:!0,appear:Rp(e,"appear",n),enter:Rp(e,"enter",n),exit:Rp(e,"exit",n)})})):Pp(e,i,o),firstRender:!1}},n.handleExited=function(e,t){var n=Op(this.props.children);e.key in n||(e.props.onExited&&e.props.onExited(t),this.mounted&&this.setState(function(t){var n=(0,Ft.A)({},t.children);return delete n[e.key],{children:n}}))},n.render=function(){var e=this.props,t=e.component,n=e.childFactory,r=(0,nn.A)(e,["component","childFactory"]),i=this.state.contextValue,o=Dp(this.state.children).map(n);return delete r.appear,delete r.enter,delete r.exit,null===t?We.createElement(wn.Provider,{value:i},o):We.createElement(wn.Provider,{value:i},We.createElement(t,r,o))},t}(We.Component);Np.propTypes={},Np.defaultProps={component:"div",childFactory:function(e){return e}};const Lp=Np;var Ip=n(83290);const Fp=function(e){const{className:t,classes:n,pulsate:r=!1,rippleX:i,rippleY:o,rippleSize:a,in:s,onExited:l,timeout:c}=e,[d,u]=We.useState(!1),p=(0,nr.A)(t,n.ripple,n.rippleVisible,r&&n.ripplePulsate),h={width:a,height:a,top:-a/2+o,left:-a/2+i},m=(0,nr.A)(n.child,d&&n.childLeaving,r&&n.childPulsate);return s||d||u(!0),We.useEffect(()=>{if(!s&&null!=l){const e=setTimeout(l,c);return()=>{clearTimeout(e)}}},[l,s,c]),(0,qt.jsx)("span",{className:p,style:h,children:(0,qt.jsx)("span",{className:m})})};const $p=(0,ar.A)("MuiTouchRipple",["root","ripple","rippleVisible","ripplePulsate","child","childLeaving","childPulsate"]);var Bp,zp,Hp,Wp;const Up=["center","classes","className"];let Vp,Gp,qp,Yp;const Zp=(0,Ip.i7)(Vp||(Vp=Bp||(Bp=Mp(["\n  0% {\n    transform: scale(0);\n    opacity: 0.1;\n  }\n\n  100% {\n    transform: scale(1);\n    opacity: 0.3;\n  }\n"])))),Kp=(0,Ip.i7)(Gp||(Gp=zp||(zp=Mp(["\n  0% {\n    opacity: 1;\n  }\n\n  100% {\n    opacity: 0;\n  }\n"])))),Xp=(0,Ip.i7)(qp||(qp=Hp||(Hp=Mp(["\n  0% {\n    transform: scale(1);\n  }\n\n  50% {\n    transform: scale(0.92);\n  }\n\n  100% {\n    transform: scale(1);\n  }\n"])))),Qp=(0,Vn.Ay)("span",{name:"MuiTouchRipple",slot:"Root"})({overflow:"hidden",pointerEvents:"none",position:"absolute",zIndex:0,top:0,right:0,bottom:0,left:0,borderRadius:"inherit"}),Jp=(0,Vn.Ay)(Fp,{name:"MuiTouchRipple",slot:"Ripple"})(Yp||(Yp=Wp||(Wp=Mp(["\n  opacity: 0;\n  position: absolute;\n\n  &."," {\n    opacity: 0.3;\n    transform: scale(1);\n    animation-name: ",";\n    animation-duration: ","ms;\n    animation-timing-function: ",";\n  }\n\n  &."," {\n    animation-duration: ","ms;\n  }\n\n  & ."," {\n    opacity: 1;\n    display: block;\n    width: 100%;\n    height: 100%;\n    border-radius: 50%;\n    background-color: currentColor;\n  }\n\n  & ."," {\n    opacity: 0;\n    animation-name: ",";\n    animation-duration: ","ms;\n    animation-timing-function: ",";\n  }\n\n  & ."," {\n    position: absolute;\n    /* @noflip */\n    left: 0px;\n    top: 0;\n    animation-name: ",";\n    animation-duration: 2500ms;\n    animation-timing-function: ",";\n    animation-iteration-count: infinite;\n    animation-delay: 200ms;\n  }\n"]))),$p.rippleVisible,Zp,550,e=>{let{theme:t}=e;return t.transitions.easing.easeInOut},$p.ripplePulsate,e=>{let{theme:t}=e;return t.transitions.duration.shorter},$p.child,$p.childLeaving,Kp,550,e=>{let{theme:t}=e;return t.transitions.easing.easeInOut},$p.childPulsate,Xp,e=>{let{theme:t}=e;return t.transitions.easing.easeInOut}),eh=We.forwardRef(function(e,t){const n=(0,$t.b)({props:e,name:"MuiTouchRipple"}),{center:r=!1,classes:i={},className:o}=n,a=(0,nn.A)(n,Up),[s,l]=We.useState([]),c=We.useRef(0),d=We.useRef(null);We.useEffect(()=>{d.current&&(d.current(),d.current=null)},[s]);const u=We.useRef(!1),p=(0,rr.A)(),h=We.useRef(null),m=We.useRef(null),f=We.useCallback(e=>{const{pulsate:t,rippleX:n,rippleY:r,rippleSize:o,cb:a}=e;l(e=>[...e,(0,qt.jsx)(Jp,{classes:{ripple:(0,nr.A)(i.ripple,$p.ripple),rippleVisible:(0,nr.A)(i.rippleVisible,$p.rippleVisible),ripplePulsate:(0,nr.A)(i.ripplePulsate,$p.ripplePulsate),child:(0,nr.A)(i.child,$p.child),childLeaving:(0,nr.A)(i.childLeaving,$p.childLeaving),childPulsate:(0,nr.A)(i.childPulsate,$p.childPulsate)},timeout:550,pulsate:t,rippleX:n,rippleY:r,rippleSize:o},c.current)]),c.current+=1,d.current=a},[i]),g=We.useCallback(function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:()=>{};const{pulsate:i=!1,center:o=r||t.pulsate,fakeElement:a=!1}=t;if("mousedown"===(null==e?void 0:e.type)&&u.current)return void(u.current=!1);"touchstart"===(null==e?void 0:e.type)&&(u.current=!0);const s=a?null:m.current,l=s?s.getBoundingClientRect():{width:0,height:0,left:0,top:0};let c,d,g;if(o||void 0===e||0===e.clientX&&0===e.clientY||!e.clientX&&!e.touches)c=Math.round(l.width/2),d=Math.round(l.height/2);else{const{clientX:t,clientY:n}=e.touches&&e.touches.length>0?e.touches[0]:e;c=Math.round(t-l.left),d=Math.round(n-l.top)}if(o)g=Math.sqrt((2*l.width**2+l.height**2)/3),g%2===0&&(g+=1);else{const e=2*Math.max(Math.abs((s?s.clientWidth:0)-c),c)+2,t=2*Math.max(Math.abs((s?s.clientHeight:0)-d),d)+2;g=Math.sqrt(e**2+t**2)}null!=e&&e.touches?null===h.current&&(h.current=()=>{f({pulsate:i,rippleX:c,rippleY:d,rippleSize:g,cb:n})},p.start(80,()=>{h.current&&(h.current(),h.current=null)})):f({pulsate:i,rippleX:c,rippleY:d,rippleSize:g,cb:n})},[r,f,p]),v=We.useCallback(()=>{g({},{pulsate:!0})},[g]),x=We.useCallback((e,t)=>{if(p.clear(),"touchend"===(null==e?void 0:e.type)&&h.current)return h.current(),h.current=null,void p.start(0,()=>{x(e,t)});h.current=null,l(e=>e.length>0?e.slice(1):e),d.current=t},[p]);return We.useImperativeHandle(t,()=>({pulsate:v,start:g,stop:x}),[v,g,x]),(0,qt.jsx)(Qp,(0,Ft.A)({className:(0,nr.A)($p.root,i.root,o),ref:m},a,{children:(0,qt.jsx)(Lp,{component:null,exit:!0,children:s})}))}),th=eh;function nh(e){return(0,sr.Ay)("MuiButtonBase",e)}const rh=(0,ar.A)("MuiButtonBase",["root","disabled","focusVisible"]),ih=["action","centerRipple","children","className","component","disabled","disableRipple","disableTouchRipple","focusRipple","focusVisibleClassName","LinkComponent","onBlur","onClick","onContextMenu","onDragLeave","onFocus","onFocusVisible","onKeyDown","onKeyUp","onMouseDown","onMouseLeave","onMouseUp","onTouchEnd","onTouchMove","onTouchStart","tabIndex","TouchRippleProps","touchRippleRef","type"],oh=(0,Vn.Ay)("button",{name:"MuiButtonBase",slot:"Root",overridesResolver:(e,t)=>t.root})({display:"inline-flex",alignItems:"center",justifyContent:"center",position:"relative",boxSizing:"border-box",WebkitTapHighlightColor:"transparent",backgroundColor:"transparent",outline:0,border:0,margin:0,borderRadius:0,padding:0,cursor:"pointer",userSelect:"none",verticalAlign:"middle",MozAppearance:"none",WebkitAppearance:"none",textDecoration:"none",color:"inherit","&::-moz-focus-inner":{borderStyle:"none"},["&.".concat(rh.disabled)]:{pointerEvents:"none",cursor:"default"},"@media print":{colorAdjust:"exact"}}),ah=We.forwardRef(function(e,t){const n=(0,$t.b)({props:e,name:"MuiButtonBase"}),{action:r,centerRipple:i=!1,children:o,className:a,component:s="button",disabled:l=!1,disableRipple:c=!1,disableTouchRipple:d=!1,focusRipple:u=!1,LinkComponent:p="a",onBlur:h,onClick:m,onContextMenu:f,onDragLeave:g,onFocus:v,onFocusVisible:x,onKeyDown:y,onKeyUp:b,onMouseDown:j,onMouseLeave:_,onMouseUp:C,onTouchEnd:w,onTouchMove:S,onTouchStart:A,tabIndex:k=0,TouchRippleProps:T,touchRippleRef:E,type:M}=n,O=(0,nn.A)(n,ih),R=We.useRef(null),P=We.useRef(null),D=(0,Ln.A)(P,E),{isFocusVisibleRef:N,onFocus:L,onBlur:I,ref:F}=(0,Ep.A)(),[$,B]=We.useState(!1);l&&$&&B(!1),We.useImperativeHandle(r,()=>({focusVisible:()=>{B(!0),R.current.focus()}}),[]);const[z,H]=We.useState(!1);We.useEffect(()=>{H(!0)},[]);const W=z&&!c&&!l;function U(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:d;return(0,Tp.A)(r=>{t&&t(r);return!n&&P.current&&P.current[e](r),!0})}We.useEffect(()=>{$&&u&&!c&&z&&P.current.pulsate()},[c,u,$,z]);const V=U("start",j),G=U("stop",f),q=U("stop",g),Y=U("stop",C),Z=U("stop",e=>{$&&e.preventDefault(),_&&_(e)}),K=U("start",A),X=U("stop",w),Q=U("stop",S),J=U("stop",e=>{I(e),!1===N.current&&B(!1),h&&h(e)},!1),ee=(0,Tp.A)(e=>{R.current||(R.current=e.currentTarget),L(e),!0===N.current&&(B(!0),x&&x(e)),v&&v(e)}),te=()=>{const e=R.current;return s&&"button"!==s&&!("A"===e.tagName&&e.href)},ne=We.useRef(!1),re=(0,Tp.A)(e=>{u&&!ne.current&&$&&P.current&&" "===e.key&&(ne.current=!0,P.current.stop(e,()=>{P.current.start(e)})),e.target===e.currentTarget&&te()&&" "===e.key&&e.preventDefault(),y&&y(e),e.target===e.currentTarget&&te()&&"Enter"===e.key&&!l&&(e.preventDefault(),m&&m(e))}),ie=(0,Tp.A)(e=>{u&&" "===e.key&&P.current&&$&&!e.defaultPrevented&&(ne.current=!1,P.current.stop(e,()=>{P.current.pulsate(e)})),b&&b(e),m&&e.target===e.currentTarget&&te()&&" "===e.key&&!e.defaultPrevented&&m(e)});let oe=s;"button"===oe&&(O.href||O.to)&&(oe=p);const ae={};"button"===oe?(ae.type=void 0===M?"button":M,ae.disabled=l):(O.href||O.to||(ae.role="button"),l&&(ae["aria-disabled"]=l));const se=(0,Ln.A)(t,F,R);const le=(0,Ft.A)({},n,{centerRipple:i,component:s,disabled:l,disableRipple:c,disableTouchRipple:d,focusRipple:u,tabIndex:k,focusVisible:$}),ce=(e=>{const{disabled:t,focusVisible:n,focusVisibleClassName:r,classes:i}=e,o={root:["root",t&&"disabled",n&&"focusVisible"]},a=(0,ir.A)(o,nh,i);return n&&r&&(a.root+=" ".concat(r)),a})(le);return(0,qt.jsxs)(oh,(0,Ft.A)({as:oe,className:(0,nr.A)(ce.root,a),ownerState:le,onBlur:J,onClick:m,onContextMenu:G,onFocus:ee,onKeyDown:re,onKeyUp:ie,onMouseDown:V,onMouseLeave:Z,onMouseUp:Y,onDragLeave:q,onTouchEnd:X,onTouchMove:Q,onTouchStart:K,ref:se,tabIndex:l?-1:k,type:M},ae,O,{children:[o,W?(0,qt.jsx)(th,(0,Ft.A)({ref:D,center:i},T)):null]}))}),sh=ah;function lh(e){return(0,sr.Ay)("MuiButton",e)}const ch=(0,ar.A)("MuiButton",["root","text","textInherit","textPrimary","textSecondary","textSuccess","textError","textInfo","textWarning","outlined","outlinedInherit","outlinedPrimary","outlinedSecondary","outlinedSuccess","outlinedError","outlinedInfo","outlinedWarning","contained","containedInherit","containedPrimary","containedSecondary","containedSuccess","containedError","containedInfo","containedWarning","disableElevation","focusVisible","disabled","colorInherit","colorPrimary","colorSecondary","colorSuccess","colorError","colorInfo","colorWarning","textSizeSmall","textSizeMedium","textSizeLarge","outlinedSizeSmall","outlinedSizeMedium","outlinedSizeLarge","containedSizeSmall","containedSizeMedium","containedSizeLarge","sizeMedium","sizeSmall","sizeLarge","fullWidth","startIcon","endIcon","icon","iconSizeSmall","iconSizeMedium","iconSizeLarge"]);const dh=We.createContext({});const uh=We.createContext(void 0),ph=["children","color","component","className","disabled","disableElevation","disableFocusRipple","endIcon","focusVisibleClassName","fullWidth","size","startIcon","type","variant"],hh=e=>(0,Ft.A)({},"small"===e.size&&{"& > *:nth-of-type(1)":{fontSize:18}},"medium"===e.size&&{"& > *:nth-of-type(1)":{fontSize:20}},"large"===e.size&&{"& > *:nth-of-type(1)":{fontSize:22}}),mh=(0,Vn.Ay)(sh,{shouldForwardProp:e=>(0,kp.A)(e)||"classes"===e,name:"MuiButton",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[n.variant],t["".concat(n.variant).concat((0,pp.A)(n.color))],t["size".concat((0,pp.A)(n.size))],t["".concat(n.variant,"Size").concat((0,pp.A)(n.size))],"inherit"===n.color&&t.colorInherit,n.disableElevation&&t.disableElevation,n.fullWidth&&t.fullWidth]}})(e=>{let{theme:t,ownerState:n}=e;var r,i;const o="light"===t.palette.mode?t.palette.grey[300]:t.palette.grey[800],a="light"===t.palette.mode?t.palette.grey.A100:t.palette.grey[700];return(0,Ft.A)({},t.typography.button,{minWidth:64,padding:"6px 16px",borderRadius:(t.vars||t).shape.borderRadius,transition:t.transitions.create(["background-color","box-shadow","border-color","color"],{duration:t.transitions.duration.short}),"&:hover":(0,Ft.A)({textDecoration:"none",backgroundColor:t.vars?"rgba(".concat(t.vars.palette.text.primaryChannel," / ").concat(t.vars.palette.action.hoverOpacity,")"):(0,hp.X4)(t.palette.text.primary,t.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}},"text"===n.variant&&"inherit"!==n.color&&{backgroundColor:t.vars?"rgba(".concat(t.vars.palette[n.color].mainChannel," / ").concat(t.vars.palette.action.hoverOpacity,")"):(0,hp.X4)(t.palette[n.color].main,t.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}},"outlined"===n.variant&&"inherit"!==n.color&&{border:"1px solid ".concat((t.vars||t).palette[n.color].main),backgroundColor:t.vars?"rgba(".concat(t.vars.palette[n.color].mainChannel," / ").concat(t.vars.palette.action.hoverOpacity,")"):(0,hp.X4)(t.palette[n.color].main,t.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}},"contained"===n.variant&&{backgroundColor:t.vars?t.vars.palette.Button.inheritContainedHoverBg:a,boxShadow:(t.vars||t).shadows[4],"@media (hover: none)":{boxShadow:(t.vars||t).shadows[2],backgroundColor:(t.vars||t).palette.grey[300]}},"contained"===n.variant&&"inherit"!==n.color&&{backgroundColor:(t.vars||t).palette[n.color].dark,"@media (hover: none)":{backgroundColor:(t.vars||t).palette[n.color].main}}),"&:active":(0,Ft.A)({},"contained"===n.variant&&{boxShadow:(t.vars||t).shadows[8]}),["&.".concat(ch.focusVisible)]:(0,Ft.A)({},"contained"===n.variant&&{boxShadow:(t.vars||t).shadows[6]}),["&.".concat(ch.disabled)]:(0,Ft.A)({color:(t.vars||t).palette.action.disabled},"outlined"===n.variant&&{border:"1px solid ".concat((t.vars||t).palette.action.disabledBackground)},"contained"===n.variant&&{color:(t.vars||t).palette.action.disabled,boxShadow:(t.vars||t).shadows[0],backgroundColor:(t.vars||t).palette.action.disabledBackground})},"text"===n.variant&&{padding:"6px 8px"},"text"===n.variant&&"inherit"!==n.color&&{color:(t.vars||t).palette[n.color].main},"outlined"===n.variant&&{padding:"5px 15px",border:"1px solid currentColor"},"outlined"===n.variant&&"inherit"!==n.color&&{color:(t.vars||t).palette[n.color].main,border:t.vars?"1px solid rgba(".concat(t.vars.palette[n.color].mainChannel," / 0.5)"):"1px solid ".concat((0,hp.X4)(t.palette[n.color].main,.5))},"contained"===n.variant&&{color:t.vars?t.vars.palette.text.primary:null==(r=(i=t.palette).getContrastText)?void 0:r.call(i,t.palette.grey[300]),backgroundColor:t.vars?t.vars.palette.Button.inheritContainedBg:o,boxShadow:(t.vars||t).shadows[2]},"contained"===n.variant&&"inherit"!==n.color&&{color:(t.vars||t).palette[n.color].contrastText,backgroundColor:(t.vars||t).palette[n.color].main},"inherit"===n.color&&{color:"inherit",borderColor:"currentColor"},"small"===n.size&&"text"===n.variant&&{padding:"4px 5px",fontSize:t.typography.pxToRem(13)},"large"===n.size&&"text"===n.variant&&{padding:"8px 11px",fontSize:t.typography.pxToRem(15)},"small"===n.size&&"outlined"===n.variant&&{padding:"3px 9px",fontSize:t.typography.pxToRem(13)},"large"===n.size&&"outlined"===n.variant&&{padding:"7px 21px",fontSize:t.typography.pxToRem(15)},"small"===n.size&&"contained"===n.variant&&{padding:"4px 10px",fontSize:t.typography.pxToRem(13)},"large"===n.size&&"contained"===n.variant&&{padding:"8px 22px",fontSize:t.typography.pxToRem(15)},n.fullWidth&&{width:"100%"})},e=>{let{ownerState:t}=e;return t.disableElevation&&{boxShadow:"none","&:hover":{boxShadow:"none"},["&.".concat(ch.focusVisible)]:{boxShadow:"none"},"&:active":{boxShadow:"none"},["&.".concat(ch.disabled)]:{boxShadow:"none"}}}),fh=(0,Vn.Ay)("span",{name:"MuiButton",slot:"StartIcon",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.startIcon,t["iconSize".concat((0,pp.A)(n.size))]]}})(e=>{let{ownerState:t}=e;return(0,Ft.A)({display:"inherit",marginRight:8,marginLeft:-4},"small"===t.size&&{marginLeft:-2},hh(t))}),gh=(0,Vn.Ay)("span",{name:"MuiButton",slot:"EndIcon",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.endIcon,t["iconSize".concat((0,pp.A)(n.size))]]}})(e=>{let{ownerState:t}=e;return(0,Ft.A)({display:"inherit",marginRight:-4,marginLeft:8},"small"===t.size&&{marginRight:-2},hh(t))}),vh=We.forwardRef(function(e,t){const n=We.useContext(dh),r=We.useContext(uh),i=(0,Ap.A)(n,e),o=(0,$t.b)({props:i,name:"MuiButton"}),{children:a,color:s="primary",component:l="button",className:c,disabled:d=!1,disableElevation:u=!1,disableFocusRipple:p=!1,endIcon:h,focusVisibleClassName:m,fullWidth:f=!1,size:g="medium",startIcon:v,type:x,variant:y="text"}=o,b=(0,nn.A)(o,ph),j=(0,Ft.A)({},o,{color:s,component:l,disabled:d,disableElevation:u,disableFocusRipple:p,fullWidth:f,size:g,type:x,variant:y}),_=(e=>{const{color:t,disableElevation:n,fullWidth:r,size:i,variant:o,classes:a}=e,s={root:["root",o,"".concat(o).concat((0,pp.A)(t)),"size".concat((0,pp.A)(i)),"".concat(o,"Size").concat((0,pp.A)(i)),"color".concat((0,pp.A)(t)),n&&"disableElevation",r&&"fullWidth"],label:["label"],startIcon:["icon","startIcon","iconSize".concat((0,pp.A)(i))],endIcon:["icon","endIcon","iconSize".concat((0,pp.A)(i))]},l=(0,ir.A)(s,lh,a);return(0,Ft.A)({},a,l)})(j),C=v&&(0,qt.jsx)(fh,{className:_.startIcon,ownerState:j,children:v}),w=h&&(0,qt.jsx)(gh,{className:_.endIcon,ownerState:j,children:h}),S=r||"";return(0,qt.jsxs)(mh,(0,Ft.A)({ownerState:j,className:(0,nr.A)(n.className,_.root,c,S),component:l,disabled:d,focusRipple:!p,focusVisibleClassName:(0,nr.A)(_.focusVisible,m),ref:t,type:x},b,{classes:_,children:[C,a,w]}))}),xh=vh;function yh(e){return(0,sr.Ay)("MuiIconButton",e)}const bh=(0,ar.A)("MuiIconButton",["root","disabled","colorInherit","colorPrimary","colorSecondary","colorError","colorInfo","colorSuccess","colorWarning","edgeStart","edgeEnd","sizeSmall","sizeMedium","sizeLarge"]),jh=["edge","children","className","color","disabled","disableFocusRipple","size"],_h=(0,Vn.Ay)(sh,{name:"MuiIconButton",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,"default"!==n.color&&t["color".concat((0,pp.A)(n.color))],n.edge&&t["edge".concat((0,pp.A)(n.edge))],t["size".concat((0,pp.A)(n.size))]]}})(e=>{let{theme:t,ownerState:n}=e;return(0,Ft.A)({textAlign:"center",flex:"0 0 auto",fontSize:t.typography.pxToRem(24),padding:8,borderRadius:"50%",overflow:"visible",color:(t.vars||t).palette.action.active,transition:t.transitions.create("background-color",{duration:t.transitions.duration.shortest})},!n.disableRipple&&{"&:hover":{backgroundColor:t.vars?"rgba(".concat(t.vars.palette.action.activeChannel," / ").concat(t.vars.palette.action.hoverOpacity,")"):(0,hp.X4)(t.palette.action.active,t.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}}},"start"===n.edge&&{marginLeft:"small"===n.size?-3:-12},"end"===n.edge&&{marginRight:"small"===n.size?-3:-12})},e=>{let{theme:t,ownerState:n}=e;var r;const i=null==(r=(t.vars||t).palette)?void 0:r[n.color];return(0,Ft.A)({},"inherit"===n.color&&{color:"inherit"},"inherit"!==n.color&&"default"!==n.color&&(0,Ft.A)({color:null==i?void 0:i.main},!n.disableRipple&&{"&:hover":(0,Ft.A)({},i&&{backgroundColor:t.vars?"rgba(".concat(i.mainChannel," / ").concat(t.vars.palette.action.hoverOpacity,")"):(0,hp.X4)(i.main,t.palette.action.hoverOpacity)},{"@media (hover: none)":{backgroundColor:"transparent"}})}),"small"===n.size&&{padding:5,fontSize:t.typography.pxToRem(18)},"large"===n.size&&{padding:12,fontSize:t.typography.pxToRem(28)},{["&.".concat(bh.disabled)]:{backgroundColor:"transparent",color:(t.vars||t).palette.action.disabled}})}),Ch=We.forwardRef(function(e,t){const n=(0,$t.b)({props:e,name:"MuiIconButton"}),{edge:r=!1,children:i,className:o,color:a="default",disabled:s=!1,disableFocusRipple:l=!1,size:c="medium"}=n,d=(0,nn.A)(n,jh),u=(0,Ft.A)({},n,{edge:r,color:a,disabled:s,disableFocusRipple:l,size:c}),p=(e=>{const{classes:t,disabled:n,color:r,edge:i,size:o}=e,a={root:["root",n&&"disabled","default"!==r&&"color".concat((0,pp.A)(r)),i&&"edge".concat((0,pp.A)(i)),"size".concat((0,pp.A)(o))]};return(0,ir.A)(a,yh,t)})(u);return(0,qt.jsx)(_h,(0,Ft.A)({className:(0,nr.A)(p.root,o),centerRipple:!0,focusRipple:!l,disabled:s,ref:t},d,{ownerState:u,children:i}))}),wh=Ch;const Sh=function(e){return"string"===typeof e};const Ah=function(e,t,n){return void 0===e||Sh(e)?t:(0,Ft.A)({},t,{ownerState:(0,Ft.A)({},t.ownerState,n)})};function kh(e){var t,n,r="";if("string"==typeof e||"number"==typeof e)r+=e;else if("object"==typeof e)if(Array.isArray(e)){var i=e.length;for(t=0;t<i;t++)e[t]&&(n=kh(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}const Th=function(){for(var e,t,n=0,r="",i=arguments.length;n<i;n++)(e=arguments[n])&&(t=kh(e))&&(r&&(r+=" "),r+=t);return r};const Eh=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];if(void 0===e)return{};const n={};return Object.keys(e).filter(n=>n.match(/^on[A-Z]/)&&"function"===typeof e[n]&&!t.includes(n)).forEach(t=>{n[t]=e[t]}),n};const Mh=function(e){if(void 0===e)return{};const t={};return Object.keys(e).filter(t=>!(t.match(/^on[A-Z]/)&&"function"===typeof e[t])).forEach(n=>{t[n]=e[n]}),t};const Oh=function(e){const{getSlotProps:t,additionalProps:n,externalSlotProps:r,externalForwardedProps:i,className:o}=e;if(!t){const e=Th(null==n?void 0:n.className,o,null==i?void 0:i.className,null==r?void 0:r.className),t=(0,Ft.A)({},null==n?void 0:n.style,null==i?void 0:i.style,null==r?void 0:r.style),a=(0,Ft.A)({},n,i,r);return e.length>0&&(a.className=e),Object.keys(t).length>0&&(a.style=t),{props:a,internalRef:void 0}}const a=Eh((0,Ft.A)({},i,r)),s=Mh(r),l=Mh(i),c=t(a),d=Th(null==c?void 0:c.className,null==n?void 0:n.className,o,null==i?void 0:i.className,null==r?void 0:r.className),u=(0,Ft.A)({},null==c?void 0:c.style,null==n?void 0:n.style,null==i?void 0:i.style,null==r?void 0:r.style),p=(0,Ft.A)({},c,n,l,s);return d.length>0&&(p.className=d),Object.keys(u).length>0&&(p.style=u),{props:p,internalRef:c.ref}};const Rh=function(e,t,n){return"function"===typeof e?e(t,n):e},Ph=["elementType","externalSlotProps","ownerState","skipResolvingSlotProps"];const Dh=function(e){var t;const{elementType:n,externalSlotProps:r,ownerState:i,skipResolvingSlotProps:o=!1}=e,a=(0,nn.A)(e,Ph),s=o?{}:Rh(r,i),{props:l,internalRef:c}=Oh((0,Ft.A)({},a,{externalSlotProps:s})),d=(0,gr.A)(c,null==s?void 0:s.ref,null==(t=e.additionalProps)?void 0:t.ref);return Ah(n,(0,Ft.A)({},l,{ref:d}),i)};var Nh=n(22427);const Lh=We.createContext({});function Ih(e){return(0,sr.Ay)("MuiList",e)}(0,ar.A)("MuiList",["root","padding","dense","subheader"]);const Fh=["children","className","component","dense","disablePadding","subheader"],$h=(0,Vn.Ay)("ul",{name:"MuiList",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,!n.disablePadding&&t.padding,n.dense&&t.dense,n.subheader&&t.subheader]}})(e=>{let{ownerState:t}=e;return(0,Ft.A)({listStyle:"none",margin:0,padding:0,position:"relative"},!t.disablePadding&&{paddingTop:8,paddingBottom:8},t.subheader&&{paddingTop:0})}),Bh=We.forwardRef(function(e,t){const n=(0,$t.b)({props:e,name:"MuiList"}),{children:r,className:i,component:o="ul",dense:a=!1,disablePadding:s=!1,subheader:l}=n,c=(0,nn.A)(n,Fh),d=We.useMemo(()=>({dense:a}),[a]),u=(0,Ft.A)({},n,{component:o,dense:a,disablePadding:s}),p=(e=>{const{classes:t,disablePadding:n,dense:r,subheader:i}=e,o={root:["root",!n&&"padding",r&&"dense",i&&"subheader"]};return(0,ir.A)(o,Ih,t)})(u);return(0,qt.jsx)(Lh.Provider,{value:d,children:(0,qt.jsxs)($h,(0,Ft.A)({as:o,className:(0,nr.A)(p.root,i),ref:t,ownerState:u},c,{children:[l,r]}))})}),zh=Bh;function Hh(e){const t=e.documentElement.clientWidth;return Math.abs(window.innerWidth-t)}const Wh=Hh;var Uh=n(55013);const Vh=["actions","autoFocus","autoFocusItem","children","className","disabledItemsFocusable","disableListWrap","onKeyDown","variant"];function Gh(e,t,n){return e===t?e.firstChild:t&&t.nextElementSibling?t.nextElementSibling:n?null:e.firstChild}function qh(e,t,n){return e===t?n?e.firstChild:e.lastChild:t&&t.previousElementSibling?t.previousElementSibling:n?null:e.lastChild}function Yh(e,t){if(void 0===t)return!0;let n=e.innerText;return void 0===n&&(n=e.textContent),n=n.trim().toLowerCase(),0!==n.length&&(t.repeating?n[0]===t.keys[0]:0===n.indexOf(t.keys.join("")))}function Zh(e,t,n,r,i,o){let a=!1,s=i(e,t,!!t&&n);for(;s;){if(s===e.firstChild){if(a)return!1;a=!0}const t=!r&&(s.disabled||"true"===s.getAttribute("aria-disabled"));if(s.hasAttribute("tabindex")&&Yh(s,o)&&!t)return s.focus(),!0;s=i(e,s,n)}return!1}const Kh=We.forwardRef(function(e,t){const{actions:n,autoFocus:r=!1,autoFocusItem:i=!1,children:o,className:a,disabledItemsFocusable:s=!1,disableListWrap:l=!1,onKeyDown:c,variant:d="selectedMenu"}=e,u=(0,nn.A)(e,Vh),p=We.useRef(null),h=We.useRef({keys:[],repeating:!0,previousKeyMatched:!0,lastTime:null});(0,Uh.A)(()=>{r&&p.current.focus()},[r]),We.useImperativeHandle(n,()=>({adjustStyleForScrollbar:(e,t)=>{let{direction:n}=t;const r=!p.current.style.width;if(e.clientHeight<p.current.clientHeight&&r){const t="".concat(Wh((0,Nh.A)(e)),"px");p.current.style["rtl"===n?"paddingLeft":"paddingRight"]=t,p.current.style.width="calc(100% + ".concat(t,")")}return p.current}}),[]);const m=(0,Ln.A)(p,t);let f=-1;We.Children.forEach(o,(e,t)=>{We.isValidElement(e)?(e.props.disabled||("selectedMenu"===d&&e.props.selected||-1===f)&&(f=t),f===t&&(e.props.disabled||e.props.muiSkipListHighlight||e.type.muiSkipListHighlight)&&(f+=1,f>=o.length&&(f=-1))):f===t&&(f+=1,f>=o.length&&(f=-1))});const g=We.Children.map(o,(e,t)=>{if(t===f){const t={};return i&&(t.autoFocus=!0),void 0===e.props.tabIndex&&"selectedMenu"===d&&(t.tabIndex=0),We.cloneElement(e,t)}return e});return(0,qt.jsx)(zh,(0,Ft.A)({role:"menu",ref:m,className:a,onKeyDown:e=>{const t=p.current,n=e.key,r=(0,Nh.A)(t).activeElement;if("ArrowDown"===n)e.preventDefault(),Zh(t,r,l,s,Gh);else if("ArrowUp"===n)e.preventDefault(),Zh(t,r,l,s,qh);else if("Home"===n)e.preventDefault(),Zh(t,null,l,s,Gh);else if("End"===n)e.preventDefault(),Zh(t,null,l,s,qh);else if(1===n.length){const i=h.current,o=n.toLowerCase(),a=performance.now();i.keys.length>0&&(a-i.lastTime>500?(i.keys=[],i.repeating=!0,i.previousKeyMatched=!0):i.repeating&&o!==i.keys[0]&&(i.repeating=!1)),i.lastTime=a,i.keys.push(o);const l=r&&!i.repeating&&Yh(r,i);i.previousKeyMatched&&(l||Zh(t,r,!1,s,Gh,i))?e.preventDefault():i.previousKeyMatched=!1}c&&c(e)},tabIndex:r?0:-1},u,{children:g}))}),Xh=Kh,Qh=["addEndListener","appear","children","easing","in","onEnter","onEntered","onEntering","onExit","onExited","onExiting","style","timeout","TransitionComponent"];function Jh(e){return"scale(".concat(e,", ").concat(e**2,")")}const em={entering:{opacity:1,transform:Jh(1)},entered:{opacity:1,transform:"none"}},tm="undefined"!==typeof navigator&&/^((?!chrome|android).)*(safari|mobile)/i.test(navigator.userAgent)&&/(os |version\/)15(.|_)4/i.test(navigator.userAgent),nm=We.forwardRef(function(e,t){const{addEndListener:n,appear:r=!0,children:i,easing:o,in:a,onEnter:s,onEntered:l,onEntering:c,onExit:d,onExited:u,onExiting:p,style:h,timeout:m="auto",TransitionComponent:f=Pn}=e,g=(0,nn.A)(e,Qh),v=(0,rr.A)(),x=We.useRef(),y=In(),b=We.useRef(null),j=(0,Ln.A)(b,Dn(i),t),_=e=>t=>{if(e){const n=b.current;void 0===t?e(n):e(n,t)}},C=_(c),w=_((e,t)=>{Fn(e);const{duration:n,delay:r,easing:i}=$n({style:h,timeout:m,easing:o},{mode:"enter"});let a;"auto"===m?(a=y.transitions.getAutoHeightDuration(e.clientHeight),x.current=a):a=n,e.style.transition=[y.transitions.create("opacity",{duration:a,delay:r}),y.transitions.create("transform",{duration:tm?a:.666*a,delay:r,easing:i})].join(","),s&&s(e,t)}),S=_(l),A=_(p),k=_(e=>{const{duration:t,delay:n,easing:r}=$n({style:h,timeout:m,easing:o},{mode:"exit"});let i;"auto"===m?(i=y.transitions.getAutoHeightDuration(e.clientHeight),x.current=i):i=t,e.style.transition=[y.transitions.create("opacity",{duration:i,delay:n}),y.transitions.create("transform",{duration:tm?i:.666*i,delay:tm?n:n||.333*i,easing:r})].join(","),e.style.opacity=0,e.style.transform=Jh(.75),d&&d(e)}),T=_(u);return(0,qt.jsx)(f,(0,Ft.A)({appear:r,in:a,nodeRef:b,onEnter:w,onEntered:S,onEntering:C,onExit:k,onExited:T,onExiting:A,addEndListener:e=>{"auto"===m&&v.start(x.current||0,e),n&&n(b.current,e)},timeout:"auto"===m?null:m},g,{children:(e,t)=>We.cloneElement(i,(0,Ft.A)({style:(0,Ft.A)({opacity:0,transform:Jh(.75),visibility:"exited"!==e||a?void 0:"hidden"},em[e],h,i.props.style),ref:j},t))}))});nm.muiSupportAuto=!0;const rm=nm,im=["input","select","textarea","a[href]","button","[tabindex]","audio[controls]","video[controls]",'[contenteditable]:not([contenteditable="false"])'].join(",");function om(e){const t=[],n=[];return Array.from(e.querySelectorAll(im)).forEach((e,r)=>{const i=function(e){const t=parseInt(e.getAttribute("tabindex")||"",10);return Number.isNaN(t)?"true"===e.contentEditable||("AUDIO"===e.nodeName||"VIDEO"===e.nodeName||"DETAILS"===e.nodeName)&&null===e.getAttribute("tabindex")?0:e.tabIndex:t}(e);-1!==i&&function(e){return!(e.disabled||"INPUT"===e.tagName&&"hidden"===e.type||function(e){if("INPUT"!==e.tagName||"radio"!==e.type)return!1;if(!e.name)return!1;const t=t=>e.ownerDocument.querySelector('input[type="radio"]'.concat(t));let n=t('[name="'.concat(e.name,'"]:checked'));return n||(n=t('[name="'.concat(e.name,'"]'))),n!==e}(e))}(e)&&(0===i?t.push(e):n.push({documentOrder:r,tabIndex:i,node:e}))}),n.sort((e,t)=>e.tabIndex===t.tabIndex?e.documentOrder-t.documentOrder:e.tabIndex-t.tabIndex).map(e=>e.node).concat(t)}function am(){return!0}const sm=function(e){const{children:t,disableAutoFocus:n=!1,disableEnforceFocus:r=!1,disableRestoreFocus:i=!1,getTabbable:o=om,isEnabled:a=am,open:s}=e,l=We.useRef(!1),c=We.useRef(null),d=We.useRef(null),u=We.useRef(null),p=We.useRef(null),h=We.useRef(!1),m=We.useRef(null),f=(0,gr.A)(Dn(t),m),g=We.useRef(null);We.useEffect(()=>{s&&m.current&&(h.current=!n)},[n,s]),We.useEffect(()=>{if(!s||!m.current)return;const e=(0,xr.A)(m.current);return m.current.contains(e.activeElement)||(m.current.hasAttribute("tabIndex")||m.current.setAttribute("tabIndex","-1"),h.current&&m.current.focus()),()=>{i||(u.current&&u.current.focus&&(l.current=!0,u.current.focus()),u.current=null)}},[s]),We.useEffect(()=>{if(!s||!m.current)return;const e=(0,xr.A)(m.current),t=t=>{g.current=t,!r&&a()&&"Tab"===t.key&&e.activeElement===m.current&&t.shiftKey&&(l.current=!0,d.current&&d.current.focus())},n=()=>{const t=m.current;if(null===t)return;if(!e.hasFocus()||!a()||l.current)return void(l.current=!1);if(t.contains(e.activeElement))return;if(r&&e.activeElement!==c.current&&e.activeElement!==d.current)return;if(e.activeElement!==p.current)p.current=null;else if(null!==p.current)return;if(!h.current)return;let n=[];if(e.activeElement!==c.current&&e.activeElement!==d.current||(n=o(m.current)),n.length>0){var i,s;const e=Boolean((null==(i=g.current)?void 0:i.shiftKey)&&"Tab"===(null==(s=g.current)?void 0:s.key)),t=n[0],r=n[n.length-1];"string"!==typeof t&&"string"!==typeof r&&(e?r.focus():t.focus())}else t.focus()};e.addEventListener("focusin",n),e.addEventListener("keydown",t,!0);const i=setInterval(()=>{e.activeElement&&"BODY"===e.activeElement.tagName&&n()},50);return()=>{clearInterval(i),e.removeEventListener("focusin",n),e.removeEventListener("keydown",t,!0)}},[n,r,i,a,s,o]);const v=e=>{null===u.current&&(u.current=e.relatedTarget),h.current=!0};return(0,qt.jsxs)(We.Fragment,{children:[(0,qt.jsx)("div",{tabIndex:s?0:-1,onFocus:v,ref:c,"data-testid":"sentinelStart"}),We.cloneElement(t,{ref:f,onFocus:e=>{null===u.current&&(u.current=e.relatedTarget),h.current=!0,p.current=e.target;const n=t.props.onFocus;n&&n(e)}}),(0,qt.jsx)("div",{tabIndex:s?0:-1,onFocus:v,ref:d,"data-testid":"sentinelEnd"})]})};var lm=n(26564);const cm=We.forwardRef(function(e,t){const{children:n,container:r,disablePortal:i=!1}=e,[o,a]=We.useState(null),s=(0,gr.A)(We.isValidElement(n)?Dn(n):null,t);if((0,hn.A)(()=>{i||a(function(e){return"function"===typeof e?e():e}(r)||document.body)},[r,i]),(0,hn.A)(()=>{if(o&&!i)return(0,lm.A)(t,o),()=>{(0,lm.A)(t,null)}},[t,o,i]),i){if(We.isValidElement(n)){const e={ref:s};return We.cloneElement(n,e)}return(0,qt.jsx)(We.Fragment,{children:n})}return(0,qt.jsx)(We.Fragment,{children:o?ut.createPortal(n,o):o})}),dm=["addEndListener","appear","children","easing","in","onEnter","onEntered","onEntering","onExit","onExited","onExiting","style","timeout","TransitionComponent"],um={entering:{opacity:1},entered:{opacity:1}},pm=We.forwardRef(function(e,t){const n=In(),r={enter:n.transitions.duration.enteringScreen,exit:n.transitions.duration.leavingScreen},{addEndListener:i,appear:o=!0,children:a,easing:s,in:l,onEnter:c,onEntered:d,onEntering:u,onExit:p,onExited:h,onExiting:m,style:f,timeout:g=r,TransitionComponent:v=Pn}=e,x=(0,nn.A)(e,dm),y=We.useRef(null),b=(0,Ln.A)(y,Dn(a),t),j=e=>t=>{if(e){const n=y.current;void 0===t?e(n):e(n,t)}},_=j(u),C=j((e,t)=>{Fn(e);const r=$n({style:f,timeout:g,easing:s},{mode:"enter"});e.style.webkitTransition=n.transitions.create("opacity",r),e.style.transition=n.transitions.create("opacity",r),c&&c(e,t)}),w=j(d),S=j(m),A=j(e=>{const t=$n({style:f,timeout:g,easing:s},{mode:"exit"});e.style.webkitTransition=n.transitions.create("opacity",t),e.style.transition=n.transitions.create("opacity",t),p&&p(e)}),k=j(h);return(0,qt.jsx)(v,(0,Ft.A)({appear:o,in:l,nodeRef:y,onEnter:C,onEntered:w,onEntering:_,onExit:A,onExited:k,onExiting:S,addEndListener:e=>{i&&i(y.current,e)},timeout:g},x,{children:(e,t)=>We.cloneElement(a,(0,Ft.A)({style:(0,Ft.A)({opacity:0,visibility:"exited"!==e||l?void 0:"hidden"},um[e],f,a.props.style),ref:b},t))}))}),hm=pm;function mm(e){return(0,sr.Ay)("MuiBackdrop",e)}(0,ar.A)("MuiBackdrop",["root","invisible"]);const fm=["children","className","component","components","componentsProps","invisible","open","slotProps","slots","TransitionComponent","transitionDuration"],gm=(0,Vn.Ay)("div",{name:"MuiBackdrop",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.invisible&&t.invisible]}})(e=>{let{ownerState:t}=e;return(0,Ft.A)({position:"fixed",display:"flex",alignItems:"center",justifyContent:"center",right:0,bottom:0,top:0,left:0,backgroundColor:"rgba(0, 0, 0, 0.5)",WebkitTapHighlightColor:"transparent"},t.invisible&&{backgroundColor:"transparent"})}),vm=We.forwardRef(function(e,t){var n,r,i;const o=(0,$t.b)({props:e,name:"MuiBackdrop"}),{children:a,className:s,component:l="div",components:c={},componentsProps:d={},invisible:u=!1,open:p,slotProps:h={},slots:m={},TransitionComponent:f=hm,transitionDuration:g}=o,v=(0,nn.A)(o,fm),x=(0,Ft.A)({},o,{component:l,invisible:u}),y=(e=>{const{classes:t,invisible:n}=e,r={root:["root",n&&"invisible"]};return(0,ir.A)(r,mm,t)})(x),b=null!=(n=h.root)?n:d.root;return(0,qt.jsx)(f,(0,Ft.A)({in:p,timeout:g},v,{children:(0,qt.jsx)(gm,(0,Ft.A)({"aria-hidden":!0},b,{as:null!=(r=null!=(i=m.root)?i:c.Root)?r:l,className:(0,nr.A)(y.root,s,null==b?void 0:b.className),ownerState:(0,Ft.A)({},x,null==b?void 0:b.ownerState),classes:y,ref:t,children:a}))}))}),xm=vm;var ym=n(42456),bm=n(63940);function jm(e,t){t?e.setAttribute("aria-hidden","true"):e.removeAttribute("aria-hidden")}function _m(e){return parseInt((0,bm.A)(e).getComputedStyle(e).paddingRight,10)||0}function Cm(e,t,n,r,i){const o=[t,n,...r];[].forEach.call(e.children,e=>{const t=-1===o.indexOf(e),n=!function(e){const t=-1!==["TEMPLATE","SCRIPT","STYLE","LINK","MAP","META","NOSCRIPT","PICTURE","COL","COLGROUP","PARAM","SLOT","SOURCE","TRACK"].indexOf(e.tagName),n="INPUT"===e.tagName&&"hidden"===e.getAttribute("type");return t||n}(e);t&&n&&jm(e,i)})}function wm(e,t){let n=-1;return e.some((e,r)=>!!t(e)&&(n=r,!0)),n}function Sm(e,t){const n=[],r=e.container;if(!t.disableScrollLock){if(function(e){const t=(0,xr.A)(e);return t.body===e?(0,bm.A)(e).innerWidth>t.documentElement.clientWidth:e.scrollHeight>e.clientHeight}(r)){const e=Hh((0,xr.A)(r));n.push({value:r.style.paddingRight,property:"padding-right",el:r}),r.style.paddingRight="".concat(_m(r)+e,"px");const t=(0,xr.A)(r).querySelectorAll(".mui-fixed");[].forEach.call(t,t=>{n.push({value:t.style.paddingRight,property:"padding-right",el:t}),t.style.paddingRight="".concat(_m(t)+e,"px")})}let e;if(r.parentNode instanceof DocumentFragment)e=(0,xr.A)(r).body;else{const t=r.parentElement,n=(0,bm.A)(r);e="HTML"===(null==t?void 0:t.nodeName)&&"scroll"===n.getComputedStyle(t).overflowY?t:r}n.push({value:e.style.overflow,property:"overflow",el:e},{value:e.style.overflowX,property:"overflow-x",el:e},{value:e.style.overflowY,property:"overflow-y",el:e}),e.style.overflow="hidden"}return()=>{n.forEach(e=>{let{value:t,el:n,property:r}=e;t?n.style.setProperty(r,t):n.style.removeProperty(r)})}}const Am=new class{constructor(){this.containers=void 0,this.modals=void 0,this.modals=[],this.containers=[]}add(e,t){let n=this.modals.indexOf(e);if(-1!==n)return n;n=this.modals.length,this.modals.push(e),e.modalRef&&jm(e.modalRef,!1);const r=function(e){const t=[];return[].forEach.call(e.children,e=>{"true"===e.getAttribute("aria-hidden")&&t.push(e)}),t}(t);Cm(t,e.mount,e.modalRef,r,!0);const i=wm(this.containers,e=>e.container===t);return-1!==i?(this.containers[i].modals.push(e),n):(this.containers.push({modals:[e],container:t,restore:null,hiddenSiblings:r}),n)}mount(e,t){const n=wm(this.containers,t=>-1!==t.modals.indexOf(e)),r=this.containers[n];r.restore||(r.restore=Sm(r,t))}remove(e){let t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];const n=this.modals.indexOf(e);if(-1===n)return n;const r=wm(this.containers,t=>-1!==t.modals.indexOf(e)),i=this.containers[r];if(i.modals.splice(i.modals.indexOf(e),1),this.modals.splice(n,1),0===i.modals.length)i.restore&&i.restore(),e.modalRef&&jm(e.modalRef,t),Cm(i.container,e.mount,e.modalRef,i.hiddenSiblings,!1),this.containers.splice(r,1);else{const e=i.modals[i.modals.length-1];e.modalRef&&jm(e.modalRef,!1)}return n}isTopModal(e){return this.modals.length>0&&this.modals[this.modals.length-1]===e}};const km=function(e){const{container:t,disableEscapeKeyDown:n=!1,disableScrollLock:r=!1,manager:i=Am,closeAfterTransition:o=!1,onTransitionEnter:a,onTransitionExited:s,children:l,onClose:c,open:d,rootRef:u}=e,p=We.useRef({}),h=We.useRef(null),m=We.useRef(null),f=(0,gr.A)(m,u),[g,v]=We.useState(!d),x=function(e){return!!e&&e.props.hasOwnProperty("in")}(l);let y=!0;"false"!==e["aria-hidden"]&&!1!==e["aria-hidden"]||(y=!1);const b=()=>(p.current.modalRef=m.current,p.current.mount=h.current,p.current),j=()=>{i.mount(b(),{disableScrollLock:r}),m.current&&(m.current.scrollTop=0)},_=(0,vr.A)(()=>{const e=function(e){return"function"===typeof e?e():e}(t)||(0,xr.A)(h.current).body;i.add(b(),e),m.current&&j()}),C=We.useCallback(()=>i.isTopModal(b()),[i]),w=(0,vr.A)(e=>{h.current=e,e&&(d&&C()?j():m.current&&jm(m.current,y))}),S=We.useCallback(()=>{i.remove(b(),y)},[y,i]);We.useEffect(()=>()=>{S()},[S]),We.useEffect(()=>{d?_():x&&o||S()},[d,S,x,o,_]);const A=e=>t=>{var r;null==(r=e.onKeyDown)||r.call(e,t),"Escape"===t.key&&229!==t.which&&C()&&(n||(t.stopPropagation(),c&&c(t,"escapeKeyDown")))},k=e=>t=>{var n;null==(n=e.onClick)||n.call(e,t),t.target===t.currentTarget&&c&&c(t,"backdropClick")};return{getRootProps:function(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const n=Eh(e);delete n.onTransitionEnter,delete n.onTransitionExited;const r=(0,Ft.A)({},n,t);return(0,Ft.A)({role:"presentation"},r,{onKeyDown:A(r),ref:f})},getBackdropProps:function(){const e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return(0,Ft.A)({"aria-hidden":!0},e,{onClick:k(e),open:d})},getTransitionProps:()=>({onEnter:(0,ym.A)(()=>{v(!1),a&&a()},null==l?void 0:l.props.onEnter),onExited:(0,ym.A)(()=>{v(!0),s&&s(),o&&S()},null==l?void 0:l.props.onExited)}),rootRef:f,portalRef:w,isTopModal:C,exited:g,hasTransition:x}};function Tm(e){return(0,sr.Ay)("MuiModal",e)}(0,ar.A)("MuiModal",["root","hidden","backdrop"]);const Em=["BackdropComponent","BackdropProps","classes","className","closeAfterTransition","children","container","component","components","componentsProps","disableAutoFocus","disableEnforceFocus","disableEscapeKeyDown","disablePortal","disableRestoreFocus","disableScrollLock","hideBackdrop","keepMounted","onBackdropClick","onClose","onTransitionEnter","onTransitionExited","open","slotProps","slots","theme"],Mm=(0,Vn.Ay)("div",{name:"MuiModal",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,!n.open&&n.exited&&t.hidden]}})(e=>{let{theme:t,ownerState:n}=e;return(0,Ft.A)({position:"fixed",zIndex:(t.vars||t).zIndex.modal,right:0,bottom:0,top:0,left:0},!n.open&&n.exited&&{visibility:"hidden"})}),Om=(0,Vn.Ay)(xm,{name:"MuiModal",slot:"Backdrop",overridesResolver:(e,t)=>t.backdrop})({zIndex:-1}),Rm=We.forwardRef(function(e,t){var n,r,i,o,a,s;const l=(0,$t.b)({name:"MuiModal",props:e}),{BackdropComponent:c=Om,BackdropProps:d,className:u,closeAfterTransition:p=!1,children:h,container:m,component:f,components:g={},componentsProps:v={},disableAutoFocus:x=!1,disableEnforceFocus:y=!1,disableEscapeKeyDown:b=!1,disablePortal:j=!1,disableRestoreFocus:_=!1,disableScrollLock:C=!1,hideBackdrop:w=!1,keepMounted:S=!1,onBackdropClick:A,open:k,slotProps:T,slots:E}=l,M=(0,nn.A)(l,Em),O=(0,Ft.A)({},l,{closeAfterTransition:p,disableAutoFocus:x,disableEnforceFocus:y,disableEscapeKeyDown:b,disablePortal:j,disableRestoreFocus:_,disableScrollLock:C,hideBackdrop:w,keepMounted:S}),{getRootProps:R,getBackdropProps:P,getTransitionProps:D,portalRef:N,isTopModal:L,exited:I,hasTransition:F}=km((0,Ft.A)({},O,{rootRef:t})),$=(0,Ft.A)({},O,{exited:I}),B=(e=>{const{open:t,exited:n,classes:r}=e,i={root:["root",!t&&n&&"hidden"],backdrop:["backdrop"]};return(0,ir.A)(i,Tm,r)})($),z={};if(void 0===h.props.tabIndex&&(z.tabIndex="-1"),F){const{onEnter:e,onExited:t}=D();z.onEnter=e,z.onExited=t}const H=null!=(n=null!=(r=null==E?void 0:E.root)?r:g.Root)?n:Mm,W=null!=(i=null!=(o=null==E?void 0:E.backdrop)?o:g.Backdrop)?i:c,U=null!=(a=null==T?void 0:T.root)?a:v.root,V=null!=(s=null==T?void 0:T.backdrop)?s:v.backdrop,G=Dh({elementType:H,externalSlotProps:U,externalForwardedProps:M,getSlotProps:R,additionalProps:{ref:t,as:f},ownerState:$,className:(0,nr.A)(u,null==U?void 0:U.className,null==B?void 0:B.root,!$.open&&$.exited&&(null==B?void 0:B.hidden))}),q=Dh({elementType:W,externalSlotProps:V,additionalProps:d,getSlotProps:e=>P((0,Ft.A)({},e,{onClick:t=>{A&&A(t),null!=e&&e.onClick&&e.onClick(t)}})),className:(0,nr.A)(null==V?void 0:V.className,null==d?void 0:d.className,null==B?void 0:B.backdrop),ownerState:$});return S||k||F&&!I?(0,qt.jsx)(cm,{ref:N,container:m,disablePortal:j,children:(0,qt.jsxs)(H,(0,Ft.A)({},G,{children:[!w&&c?(0,qt.jsx)(W,(0,Ft.A)({},q)):null,(0,qt.jsx)(sm,{disableEnforceFocus:y,disableAutoFocus:x,disableRestoreFocus:_,isEnabled:L,open:k,children:We.cloneElement(h,z)})]}))}):null}),Pm=Rm;function Dm(e){return(0,sr.Ay)("MuiPopover",e)}(0,ar.A)("MuiPopover",["root","paper"]);const Nm=["onEntering"],Lm=["action","anchorEl","anchorOrigin","anchorPosition","anchorReference","children","className","container","elevation","marginThreshold","open","PaperProps","slots","slotProps","transformOrigin","TransitionComponent","transitionDuration","TransitionProps","disableScrollLock"],Im=["slotProps"];function Fm(e,t){let n=0;return"number"===typeof t?n=t:"center"===t?n=e.height/2:"bottom"===t&&(n=e.height),n}function $m(e,t){let n=0;return"number"===typeof t?n=t:"center"===t?n=e.width/2:"right"===t&&(n=e.width),n}function Bm(e){return[e.horizontal,e.vertical].map(e=>"number"===typeof e?"".concat(e,"px"):e).join(" ")}function zm(e){return"function"===typeof e?e():e}const Hm=(0,Vn.Ay)(Pm,{name:"MuiPopover",slot:"Root",overridesResolver:(e,t)=>t.root})({}),Wm=(0,Vn.Ay)(yp,{name:"MuiPopover",slot:"Paper",overridesResolver:(e,t)=>t.paper})({position:"absolute",overflowY:"auto",overflowX:"hidden",minWidth:16,minHeight:16,maxWidth:"calc(100% - 32px)",maxHeight:"calc(100% - 32px)",outline:0}),Um=We.forwardRef(function(e,t){var n,r,i;const o=(0,$t.b)({props:e,name:"MuiPopover"}),{action:a,anchorEl:s,anchorOrigin:l={vertical:"top",horizontal:"left"},anchorPosition:c,anchorReference:d="anchorEl",children:u,className:p,container:h,elevation:m=8,marginThreshold:f=16,open:g,PaperProps:v={},slots:x,slotProps:y,transformOrigin:b={vertical:"top",horizontal:"left"},TransitionComponent:j=rm,transitionDuration:_="auto",TransitionProps:{onEntering:C}={},disableScrollLock:w=!1}=o,S=(0,nn.A)(o.TransitionProps,Nm),A=(0,nn.A)(o,Lm),k=null!=(n=null==y?void 0:y.paper)?n:v,T=We.useRef(),E=(0,Ln.A)(T,k.ref),M=(0,Ft.A)({},o,{anchorOrigin:l,anchorReference:d,elevation:m,marginThreshold:f,externalPaperSlotProps:k,transformOrigin:b,TransitionComponent:j,transitionDuration:_,TransitionProps:S}),O=(e=>{const{classes:t}=e;return(0,ir.A)({root:["root"],paper:["paper"]},Dm,t)})(M),R=We.useCallback(()=>{if("anchorPosition"===d)return c;const e=zm(s),t=(e&&1===e.nodeType?e:(0,Nh.A)(T.current).body).getBoundingClientRect();return{top:t.top+Fm(t,l.vertical),left:t.left+$m(t,l.horizontal)}},[s,l.horizontal,l.vertical,c,d]),P=We.useCallback(e=>({vertical:Fm(e,b.vertical),horizontal:$m(e,b.horizontal)}),[b.horizontal,b.vertical]),D=We.useCallback(e=>{const t={width:e.offsetWidth,height:e.offsetHeight},n=P(t);if("none"===d)return{top:null,left:null,transformOrigin:Bm(n)};const r=R();let i=r.top-n.vertical,o=r.left-n.horizontal;const a=i+t.height,l=o+t.width,c=(0,Bn.A)(zm(s)),u=c.innerHeight-f,p=c.innerWidth-f;if(null!==f&&i<f){const e=i-f;i-=e,n.vertical+=e}else if(null!==f&&a>u){const e=a-u;i-=e,n.vertical+=e}if(null!==f&&o<f){const e=o-f;o-=e,n.horizontal+=e}else if(l>p){const e=l-p;o-=e,n.horizontal+=e}return{top:"".concat(Math.round(i),"px"),left:"".concat(Math.round(o),"px"),transformOrigin:Bm(n)}},[s,d,R,P,f]),[N,L]=We.useState(g),I=We.useCallback(()=>{const e=T.current;if(!e)return;const t=D(e);null!==t.top&&(e.style.top=t.top),null!==t.left&&(e.style.left=t.left),e.style.transformOrigin=t.transformOrigin,L(!0)},[D]);We.useEffect(()=>(w&&window.addEventListener("scroll",I),()=>window.removeEventListener("scroll",I)),[s,w,I]);We.useEffect(()=>{g&&I()}),We.useImperativeHandle(a,()=>g?{updatePosition:()=>{I()}}:null,[g,I]),We.useEffect(()=>{if(!g)return;const e=(0,Nn.A)(()=>{I()}),t=(0,Bn.A)(s);return t.addEventListener("resize",e),()=>{e.clear(),t.removeEventListener("resize",e)}},[s,g,I]);let F=_;"auto"!==_||j.muiSupportAuto||(F=void 0);const $=h||(s?(0,Nh.A)(zm(s)).body:void 0),B=null!=(r=null==x?void 0:x.root)?r:Hm,z=null!=(i=null==x?void 0:x.paper)?i:Wm,H=Dh({elementType:z,externalSlotProps:(0,Ft.A)({},k,{style:N?k.style:(0,Ft.A)({},k.style,{opacity:0})}),additionalProps:{elevation:m,ref:E},ownerState:M,className:(0,nr.A)(O.paper,null==k?void 0:k.className)}),W=Dh({elementType:B,externalSlotProps:(null==y?void 0:y.root)||{},externalForwardedProps:A,additionalProps:{ref:t,slotProps:{backdrop:{invisible:!0}},container:$,open:g},ownerState:M,className:(0,nr.A)(O.root,p)}),{slotProps:U}=W,V=(0,nn.A)(W,Im);return(0,qt.jsx)(B,(0,Ft.A)({},V,!Sh(B)&&{slotProps:U,disableScrollLock:w},{children:(0,qt.jsx)(j,(0,Ft.A)({appear:!0,in:g,onEntering:(e,t)=>{C&&C(e,t),I()},onExited:()=>{L(!1)},timeout:F},S,{children:(0,qt.jsx)(z,(0,Ft.A)({},H,{children:u}))}))}))}),Vm=Um;function Gm(e){return(0,sr.Ay)("MuiMenu",e)}(0,ar.A)("MuiMenu",["root","paper","list"]);const qm=["onEntering"],Ym=["autoFocus","children","className","disableAutoFocusItem","MenuListProps","onClose","open","PaperProps","PopoverClasses","transitionDuration","TransitionProps","variant","slots","slotProps"],Zm={vertical:"top",horizontal:"right"},Km={vertical:"top",horizontal:"left"},Xm=(0,Vn.Ay)(Vm,{shouldForwardProp:e=>(0,kp.A)(e)||"classes"===e,name:"MuiMenu",slot:"Root",overridesResolver:(e,t)=>t.root})({}),Qm=(0,Vn.Ay)(Wm,{name:"MuiMenu",slot:"Paper",overridesResolver:(e,t)=>t.paper})({maxHeight:"calc(100% - 96px)",WebkitOverflowScrolling:"touch"}),Jm=(0,Vn.Ay)(Xh,{name:"MuiMenu",slot:"List",overridesResolver:(e,t)=>t.list})({outline:0}),ef=We.forwardRef(function(e,t){var n,r;const i=(0,$t.b)({props:e,name:"MuiMenu"}),{autoFocus:o=!0,children:a,className:s,disableAutoFocusItem:l=!1,MenuListProps:c={},onClose:d,open:u,PaperProps:p={},PopoverClasses:h,transitionDuration:m="auto",TransitionProps:{onEntering:f}={},variant:g="selectedMenu",slots:v={},slotProps:x={}}=i,y=(0,nn.A)(i.TransitionProps,qm),b=(0,nn.A)(i,Ym),j=dn(),_=(0,Ft.A)({},i,{autoFocus:o,disableAutoFocusItem:l,MenuListProps:c,onEntering:f,PaperProps:p,transitionDuration:m,TransitionProps:y,variant:g}),C=(e=>{const{classes:t}=e;return(0,ir.A)({root:["root"],paper:["paper"],list:["list"]},Gm,t)})(_),w=o&&!l&&u,S=We.useRef(null);let A=-1;We.Children.map(a,(e,t)=>{We.isValidElement(e)&&(e.props.disabled||("selectedMenu"===g&&e.props.selected||-1===A)&&(A=t))});const k=null!=(n=v.paper)?n:Qm,T=null!=(r=x.paper)?r:p,E=Dh({elementType:v.root,externalSlotProps:x.root,ownerState:_,className:[C.root,s]}),M=Dh({elementType:k,externalSlotProps:T,ownerState:_,className:C.paper});return(0,qt.jsx)(Xm,(0,Ft.A)({onClose:d,anchorOrigin:{vertical:"bottom",horizontal:j?"right":"left"},transformOrigin:j?Zm:Km,slots:{paper:k,root:v.root},slotProps:{root:E,paper:M},open:u,ref:t,transitionDuration:m,TransitionProps:(0,Ft.A)({onEntering:(e,t)=>{S.current&&S.current.adjustStyleForScrollbar(e,{direction:j?"rtl":"ltr"}),f&&f(e,t)}},y),ownerState:_},b,{classes:h,children:(0,qt.jsx)(Jm,(0,Ft.A)({onKeyDown:e=>{"Tab"===e.key&&(e.preventDefault(),d&&d(e,"tabKeyDown"))},actions:S,autoFocus:o&&(-1===A||l),autoFocusItem:w,variant:g},c,{className:(0,nr.A)(C.list,c.className),children:a}))}))}),tf=ef;function nf(e){return(0,sr.Ay)("MuiDivider",e)}const rf=(0,ar.A)("MuiDivider",["root","absolute","fullWidth","inset","middle","flexItem","light","vertical","withChildren","withChildrenVertical","textAlignRight","textAlignLeft","wrapper","wrapperVertical"]);function of(e){return(0,sr.Ay)("MuiListItemIcon",e)}const af=(0,ar.A)("MuiListItemIcon",["root","alignItemsFlexStart"]);function sf(e){return(0,sr.Ay)("MuiListItemText",e)}const lf=(0,ar.A)("MuiListItemText",["root","multiline","dense","inset","primary","secondary"]);function cf(e){return(0,sr.Ay)("MuiMenuItem",e)}const df=(0,ar.A)("MuiMenuItem",["root","focusVisible","dense","disabled","divider","gutters","selected"]),uf=["autoFocus","component","dense","divider","disableGutters","focusVisibleClassName","role","tabIndex","className"],pf=(0,Vn.Ay)(sh,{shouldForwardProp:e=>(0,kp.A)(e)||"classes"===e,name:"MuiMenuItem",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.dense&&t.dense,n.divider&&t.divider,!n.disableGutters&&t.gutters]}})(e=>{let{theme:t,ownerState:n}=e;return(0,Ft.A)({},t.typography.body1,{display:"flex",justifyContent:"flex-start",alignItems:"center",position:"relative",textDecoration:"none",minHeight:48,paddingTop:6,paddingBottom:6,boxSizing:"border-box",whiteSpace:"nowrap"},!n.disableGutters&&{paddingLeft:16,paddingRight:16},n.divider&&{borderBottom:"1px solid ".concat((t.vars||t).palette.divider),backgroundClip:"padding-box"},{"&:hover":{textDecoration:"none",backgroundColor:(t.vars||t).palette.action.hover,"@media (hover: none)":{backgroundColor:"transparent"}},["&.".concat(df.selected)]:{backgroundColor:t.vars?"rgba(".concat(t.vars.palette.primary.mainChannel," / ").concat(t.vars.palette.action.selectedOpacity,")"):(0,hp.X4)(t.palette.primary.main,t.palette.action.selectedOpacity),["&.".concat(df.focusVisible)]:{backgroundColor:t.vars?"rgba(".concat(t.vars.palette.primary.mainChannel," / calc(").concat(t.vars.palette.action.selectedOpacity," + ").concat(t.vars.palette.action.focusOpacity,"))"):(0,hp.X4)(t.palette.primary.main,t.palette.action.selectedOpacity+t.palette.action.focusOpacity)}},["&.".concat(df.selected,":hover")]:{backgroundColor:t.vars?"rgba(".concat(t.vars.palette.primary.mainChannel," / calc(").concat(t.vars.palette.action.selectedOpacity," + ").concat(t.vars.palette.action.hoverOpacity,"))"):(0,hp.X4)(t.palette.primary.main,t.palette.action.selectedOpacity+t.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:t.vars?"rgba(".concat(t.vars.palette.primary.mainChannel," / ").concat(t.vars.palette.action.selectedOpacity,")"):(0,hp.X4)(t.palette.primary.main,t.palette.action.selectedOpacity)}},["&.".concat(df.focusVisible)]:{backgroundColor:(t.vars||t).palette.action.focus},["&.".concat(df.disabled)]:{opacity:(t.vars||t).palette.action.disabledOpacity},["& + .".concat(rf.root)]:{marginTop:t.spacing(1),marginBottom:t.spacing(1)},["& + .".concat(rf.inset)]:{marginLeft:52},["& .".concat(lf.root)]:{marginTop:0,marginBottom:0},["& .".concat(lf.inset)]:{paddingLeft:36},["& .".concat(af.root)]:{minWidth:36}},!n.dense&&{[t.breakpoints.up("sm")]:{minHeight:"auto"}},n.dense&&(0,Ft.A)({minHeight:32,paddingTop:4,paddingBottom:4},t.typography.body2,{["& .".concat(af.root," svg")]:{fontSize:"1.25rem"}}))}),hf=We.forwardRef(function(e,t){const n=(0,$t.b)({props:e,name:"MuiMenuItem"}),{autoFocus:r=!1,component:i="li",dense:o=!1,divider:a=!1,disableGutters:s=!1,focusVisibleClassName:l,role:c="menuitem",tabIndex:d,className:u}=n,p=(0,nn.A)(n,uf),h=We.useContext(Lh),m=We.useMemo(()=>({dense:o||h.dense||!1,disableGutters:s}),[h.dense,o,s]),f=We.useRef(null);(0,Uh.A)(()=>{r&&f.current&&f.current.focus()},[r]);const g=(0,Ft.A)({},n,{dense:m.dense,divider:a,disableGutters:s}),v=(e=>{const{disabled:t,dense:n,divider:r,disableGutters:i,selected:o,classes:a}=e,s={root:["root",n&&"dense",t&&"disabled",!i&&"gutters",r&&"divider",o&&"selected"]},l=(0,ir.A)(s,cf,a);return(0,Ft.A)({},a,l)})(n),x=(0,Ln.A)(f,t);let y;return n.disabled||(y=void 0!==d?d:-1),(0,qt.jsx)(Lh.Provider,{value:m,children:(0,qt.jsx)(pf,(0,Ft.A)({ref:x,role:c,tabIndex:y,component:i,focusVisibleClassName:(0,nr.A)(v.focusVisible,l),className:(0,nr.A)(v.root,u)},p,{ownerState:g,classes:v}))})}),mf=hf;const ff=n.p+"static/media/logo_full_white.2ee39096b15f737cb017dbcd9e20d4c4.svg";const gf=function(e){let{handleDrawerToggle:t,navItems:n}=e;const[r,i]=We.useState(null),o=Boolean(r),a=()=>{i(null)},s="primary-search-account-menu-mobile",l=(0,qt.jsx)(tf,{anchorEl:r,anchorOrigin:{vertical:"top",horizontal:"right"},id:s,keepMounted:!0,transformOrigin:{vertical:"top",horizontal:"right"},open:o,onClose:a,onClick:a,children:n.map(e=>(0,qt.jsxs)(mf,{to:e.url,component:Lo,children:[e.icon," \xa0 ",e.name]},e.id))});return(0,qt.jsxs)(Sp,{component:"nav",children:[(0,qt.jsxs)(dp,{sx:{alignItems:"center"},children:[!1,(0,qt.jsx)(op,{component:"div",sx:{flexGrow:1,display:"flex"},children:(0,qt.jsx)("img",{src:ff,height:42})}),(0,qt.jsx)(op,{sx:{display:{xs:"none",md:"none"}},children:(0,qt.jsx)(wh,{size:"large","aria-label":"show more","aria-controls":s,"aria-haspopup":"true",onClick:e=>{i(e.currentTarget)},color:"inherit",children:(0,qt.jsx)(up.A,{})})}),(0,qt.jsx)(op,{sx:{display:{xs:"none",sm:"none"}},children:n.map(e=>(0,qt.jsx)(xh,{to:e.url,component:Lo,sx:{color:"#fff"},children:e.name},e.id))})]}),l]})};function vf(e){return(0,sr.Ay)("MuiTypography",e)}(0,ar.A)("MuiTypography",["root","h1","h2","h3","h4","h5","h6","subtitle1","subtitle2","body1","body2","inherit","button","caption","overline","alignLeft","alignRight","alignCenter","alignJustify","noWrap","gutterBottom","paragraph"]);const xf=["align","className","component","gutterBottom","noWrap","paragraph","variant","variantMapping"],yf=(0,Vn.Ay)("span",{name:"MuiTypography",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.variant&&t[n.variant],"inherit"!==n.align&&t["align".concat((0,pp.A)(n.align))],n.noWrap&&t.noWrap,n.gutterBottom&&t.gutterBottom,n.paragraph&&t.paragraph]}})(e=>{let{theme:t,ownerState:n}=e;return(0,Ft.A)({margin:0},"inherit"===n.variant&&{font:"inherit"},"inherit"!==n.variant&&t.typography[n.variant],"inherit"!==n.align&&{textAlign:n.align},n.noWrap&&{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},n.gutterBottom&&{marginBottom:"0.35em"},n.paragraph&&{marginBottom:16})}),bf={h1:"h1",h2:"h2",h3:"h3",h4:"h4",h5:"h5",h6:"h6",subtitle1:"h6",subtitle2:"h6",body1:"p",body2:"p",inherit:"p"},jf={primary:"primary.main",textPrimary:"text.primary",secondary:"secondary.main",textSecondary:"text.secondary",error:"error.main"},_f=We.forwardRef(function(e,t){const n=(0,$t.b)({props:e,name:"MuiTypography"}),r=(e=>jf[e]||e)(n.color),i=(0,Qu.A)((0,Ft.A)({},n,{color:r})),{align:o="inherit",className:a,component:s,gutterBottom:l=!1,noWrap:c=!1,paragraph:d=!1,variant:u="body1",variantMapping:p=bf}=i,h=(0,nn.A)(i,xf),m=(0,Ft.A)({},i,{align:o,color:r,className:a,component:s,gutterBottom:l,noWrap:c,paragraph:d,variant:u,variantMapping:p}),f=s||(d?"p":p[u]||bf[u])||"span",g=(e=>{const{align:t,gutterBottom:n,noWrap:r,paragraph:i,variant:o,classes:a}=e,s={root:["root",o,"inherit"!==e.align&&"align".concat((0,pp.A)(t)),n&&"gutterBottom",r&&"noWrap",i&&"paragraph"]};return(0,ir.A)(s,vf,a)})(m);return(0,qt.jsx)(yf,(0,Ft.A)({as:f,ref:t,ownerState:m,className:(0,nr.A)(g.root,a)},h))}),Cf=_f;const wf=function(){return(0,qt.jsxs)(op,{children:[(0,qt.jsx)(Cf,{variant:"h4",component:"h1",children:"Privacy Policy"}),(0,qt.jsxs)(op,{mt:4,children:[(0,qt.jsx)(Cf,{variant:"h6",component:"h6",sx:{mb:2.5},children:"Introduction"}),(0,qt.jsxs)(Cf,{children:["Sarvika Technologies is a software solutions company fully committed to protecting your personal information and your right to privacy by adopting the best protective measures. Come up with any questions or concerns about our practices and privacy policy concerning personal information. You can contact us at"," ",(0,qt.jsx)("a",{href:"mailto:rpmsupport@sarvika.com",children:"rpmsupport@sarvika.com"}),".",(0,qt.jsx)("br",{}),(0,qt.jsx)("br",{}),"This document is an electronic record under the provisions of the Information Technology Act, 2000, and relevant Rules framed there under (as applicable or amended from time to time). This document is published in accordance with the provisions of Rule 3 (1) of the Information Technology (Intermediaries guidelines) Rules, 2011 which require publishing the rules and regulations, privacy policy, and User agreement for access or usage of the website."]})]}),(0,qt.jsxs)(op,{mt:4,children:[(0,qt.jsx)(Cf,{variant:"h6",component:"h6",sx:{mb:2.5},children:"Your consent"}),(0,qt.jsxs)(Cf,{children:[(0,qt.jsxs)(op,{component:"span",fontWeight:600,children:["(A.)"," "]})," ","YOU ARE HEREBY PROVIDING YOUR UNCONDITIONAL CONSENT AND AGREEMENT AS REQUIRED UNDER SECTION 43A AND SECTION 72A OF THE INFORMATION TECHNOLOGY ACT, 2000.",(0,qt.jsx)("br",{}),(0,qt.jsx)("br",{}),(0,qt.jsxs)(op,{component:"span",fontWeight:600,children:["(B.)"," "]})," ","When you access our website and use any of our services, we believe and appreciate that you trust us with your personal information that we protect and preserve with utmost professionalism. The reason behind collecting personal information is to simply deliver the best possible solution designed around your requirements that bring you to us. Our strong view on personalization expects us to use the collected information and operate on giving tailored experiences to our users.",(0,qt.jsx)("br",{}),(0,qt.jsx)("br",{}),(0,qt.jsxs)(op,{component:"span",fontWeight:600,children:["(C.)"," "]})," ","In this privacy policy, we have given our best efforts to explain to you the personal information we collect from your side, how we process it, and what rights are associated with it. It will be appreciated if you dedicate valuable time to read the privacy policy carefully and understand the following terms and conditions. In case our privacy policy doesn\u2019t comply with your understanding, you can discontinue accessing our services immediately.",(0,qt.jsx)("br",{}),(0,qt.jsx)("br",{}),(0,qt.jsxs)(op,{component:"span",fontWeight:600,children:["(D.)"," "]})," ","This privacy policy also covers all sorts of information obtained through our services or sales, marketing, and related practices. We also reserve the right to alter/change the policy without providing any prior notification. Although, there will be the least chance of any changes that let us use your personal information posted during information collection unless ordered by any legislative body/ law.",(0,qt.jsx)("br",{}),(0,qt.jsx)("br",{}),(0,qt.jsxs)(op,{component:"span",fontWeight:600,children:["(E.)"," "]})," ","Keeping your personal information safe is important to us. We will share the information with your consent as per the laws to deliver services and fulfill your business obligations. We may share your information when there is a legitimate requirement as per the governing body, law, court order, or legal process. The information can get shared if we find there is a violation of our policies, fraud, and threat situation faced by any individual or as a form of evidence. We may share your data with third-party vendors, service providers, healthcare experts, or hospitals who perform services for us or on our behalf and require access to such information to do that work."]})]}),(0,qt.jsxs)(op,{mt:4,children:[(0,qt.jsx)(Cf,{variant:"h6",component:"h6",sx:{mb:2.5},children:"About the company"}),(0,qt.jsxs)(Cf,{children:["Sarvika Technologies Pvt Ltd is located at Ganesham Trade Centre, 4th and 5th Floor, Gopal Nagar A, Ashok Vihar Ext, Gopalpura Bypass Rd, Jaipur, Rajasthan 302015. Our phone number is +91-141-4911243, and our email address is"," ",(0,qt.jsx)("a",{href:"mailto:rpmsupport@sarvika.com",children:"rpmsupport@sarvika.com"}),". The Remote Patient Monitoring Program covers devices and services used by individuals through their physician/ medical service provider.",(0,qt.jsx)("br",{}),(0,qt.jsx)("br",{}),"We are focused on safeguarding the protection and individual data of our clients, providers, and different partners. We regard your inclinations with respect to the assortment and utilization of your own data and the accompanying strategy sets out how we gather, store, use, and uncover individual data given to RPM."]})]}),(0,qt.jsxs)(op,{mt:4,children:[(0,qt.jsx)(Cf,{variant:"h5",component:"h5",sx:{mb:2.5,fontWeight:600},children:"What does this Privacy Policy Cover?"}),(0,qt.jsxs)(Cf,{variant:"h6",component:"h6",sx:{mb:2.5},children:[" ","Information we collect"]}),(0,qt.jsx)(Cf,{children:"The information we obtain from our users that further divided into the following categories but is not limited to the mentioned categories"}),(0,qt.jsx)("br",{}),(0,qt.jsx)("br",{}),(0,qt.jsxs)(Cf,{variant:"h6",component:"h6",sx:{mb:2.5},children:[" ","Demographic information"]}),(0,qt.jsxs)(op,{component:"ul",children:[(0,qt.jsx)(op,{component:"li",children:"Name "}),(0,qt.jsx)(op,{component:"li",children:"Birth year"}),(0,qt.jsx)(op,{component:"li",children:"Gender"}),(0,qt.jsx)(op,{component:"li",children:"Weight"}),(0,qt.jsx)(op,{component:"li",children:"Height"}),(0,qt.jsx)(op,{component:"li",children:"Contact Number"}),(0,qt.jsx)(op,{component:"li",children:"Email Id "}),(0,qt.jsx)(op,{component:"li",children:"Location "}),(0,qt.jsx)(op,{component:"li",children:"Country"}),(0,qt.jsx)(op,{component:"li",children:"Preferred language"}),(0,qt.jsx)(op,{component:"li",children:"Zip Code"})]}),(0,qt.jsx)("br",{}),(0,qt.jsx)("br",{}),(0,qt.jsxs)(Cf,{variant:"h6",component:"h6",sx:{mb:2.5},children:[" ","Support Data"]}),(0,qt.jsx)(Cf,{children:"IP Address - Only in case of troubleshooting any technical issue"}),(0,qt.jsx)("br",{}),(0,qt.jsx)("br",{}),(0,qt.jsxs)(Cf,{variant:"h6",component:"h6",sx:{mb:2.5},children:[" ","Health-related information"]}),(0,qt.jsxs)(op,{component:"ul",children:[(0,qt.jsx)(op,{component:"li",children:"Family history"}),(0,qt.jsx)(op,{component:"li",children:"Addiction History"}),(0,qt.jsx)(op,{component:"li",children:"Personal Medical History"})]}),(0,qt.jsx)("br",{}),(0,qt.jsxs)(Cf,{variant:"h6",component:"h6",sx:{mb:2.5},children:[" ","How will we access your personal information?"]}),(0,qt.jsxs)(Cf,{children:["We assure you that your provided information will be accessed for legitimate business purposes and won\u2019t be used for any sort of activity beyond the Indian geographical territories unless it","'","s legally bounded. Your information will be accessed by our employees only on a \u201cneed-to-know basis\u201d and will be strictly treated as confidential information. The information will only be disclosed when required by law, and we will take your consent before doing the same. Below are the following purposes for which your data will be processed"]}),(0,qt.jsx)("br",{}),(0,qt.jsxs)(op,{component:"ul",children:[(0,qt.jsx)(op,{component:"li",children:"Fulfilling our purposes as per the terms of use"}),(0,qt.jsx)(op,{component:"li",children:"Establish communication regarding managing your account"}),(0,qt.jsx)(op,{component:"li",children:"Store and Track your data"}),(0,qt.jsx)(op,{component:"li",children:"Request made by Public and Government authorities as per laws. "}),(0,qt.jsx)(op,{component:"li",children:"Judicial Proceedings and Court orders"}),(0,qt.jsx)(op,{component:"li",children:"Handling technical support "}),(0,qt.jsx)(op,{component:"li",children:"Managing and improving our information"}),(0,qt.jsx)(op,{component:"li",children:"Payment Process "}),(0,qt.jsx)(op,{component:"li",children:"Quality Check of Services provided"}),(0,qt.jsx)(op,{component:"li",children:"Security "}),(0,qt.jsx)(op,{component:"li",children:"Monitoring health and overall condition"})]}),(0,qt.jsx)("br",{}),(0,qt.jsx)("br",{}),(0,qt.jsxs)(Cf,{variant:"h6",component:"h6",sx:{mb:2.5},children:[" ","How long do we keep your data with us?"]}),(0,qt.jsx)(Cf,{children:"Your information will be kept with us till our purpose mentioned in the privacy policy gets accomplished. However, the period can be extended if there are any law-related requirements. Your personal information will be deleted or anonymized post-completion of our business objectives from our database. If your information is stored in the backup archives, we will be isolating and prohibiting its access for everyone. We won\u2019t be keeping your information with us for longer than 3 years."}),(0,qt.jsx)("br",{}),(0,qt.jsx)("br",{}),(0,qt.jsxs)(Cf,{variant:"h6",component:"h6",sx:{mb:2.5},children:[" ","What measures do we incorporate to keep your information safe?"]}),(0,qt.jsxs)(Cf,{children:["We have implemented top-notch industry standards, and technical and organizational security measures to secure any sort of personal information. In any case, despite our protections and endeavors to get your data, no electronic transmission over the Web or data stockpiling innovation can guarantee to be 100 percent secure, so we can","'","t commit or assure that programmers, cybercriminals, or other unapproved outsiders can not overcome our security, and inappropriately gather, access, take, or adjust your data. Even though we will give our all to safeguard your data, the transmission of individual data to and from our Administrations is despite the danger. You ought to just access the Administrations inside a secure climate."]}),(0,qt.jsx)("br",{}),(0,qt.jsx)("br",{}),(0,qt.jsxs)(Cf,{variant:"h6",component:"h6",sx:{mb:2.5},children:[" ","Do we collect the information from individuals below 18 years?"]}),(0,qt.jsxs)(Cf,{children:["Our personal information collects the present age of individuals who wish to access our service. In case, you present that you are below 18 years, we need the consent of your parents/guardians to use our services. For further information regarding this, connect with us at ",(0,qt.jsx)("a",{href:"mailto:rpmsupport@sarvika.com",children:"rpmsupport@sarvika.com"})]}),(0,qt.jsx)("br",{}),(0,qt.jsx)("br",{}),(0,qt.jsxs)(Cf,{variant:"h6",component:"h6",sx:{mb:2.5},children:[" ","What privacy rights do you achieve?"]}),(0,qt.jsxs)(Cf,{children:["As a service holder, you have complete rights to alter, review, or discontinue our service at any moment. In case, you are not satisfied with our services or have any other concerns, reach out to us at"," ",(0,qt.jsx)("a",{href:"mailto:rpmsupport@sarvika.com",children:"rpmsupport@sarvika.com"})]}),(0,qt.jsx)("br",{}),(0,qt.jsx)("br",{}),(0,qt.jsxs)(Cf,{variant:"h6",component:"h6",sx:{mb:2.5},children:[" ","How can you protect your personal information?"]}),(0,qt.jsxs)(Cf,{children:["It will be fruitful if we collectively work together in securing your device and personal information. There will be no emails from our end requesting your confidential information such as bank account number, user id, password, or any other crucial information. We strictly advise you to avoid responding to such emails. If you find an email asking for personal information that appears like it","'","s sent by us, notify our team to take further action.",(0,qt.jsx)("br",{}),(0,qt.jsx)("br",{}),"You bear complete responsibility to protect your personal information from disclosure to any third party. If you experience any suspicious activity that can directly/indirectly harm your personal information and raise security concerns, notify us at"," ",(0,qt.jsx)("a",{href:"mailto:rpmsupport@sarvika.com",children:"rpmsupport@sarvika.com"}),".",(0,qt.jsx)("br",{}),(0,qt.jsx)("br",{}),"As per the data protection laws, below are the rights you possess regarding personal data.",(0,qt.jsx)("br",{}),(0,qt.jsxs)(op,{component:"ul",children:[(0,qt.jsx)(op,{component:"li",children:"Access your data"}),(0,qt.jsx)(op,{component:"li",children:"Erase your data as per the laws."}),(0,qt.jsx)(op,{component:"li",children:"Access communication as per the processing of your data"}),(0,qt.jsx)(op,{component:"li",children:"Restrict the processing of your data as per the limit permitted by the law."}),(0,qt.jsxs)(op,{component:"li",children:["To object to the further processing of your data. For example \u2013 For Marketing Purposes."," "]}),(0,qt.jsx)(op,{component:"li",children:"To inquire about transferring your data to a third party. "}),(0,qt.jsxs)(op,{component:"li",children:["To receive your personal information in a structured and readable format."," "]}),(0,qt.jsx)(op,{component:"li",children:"For making a complaint to a supervisory body"}),(0,qt.jsx)(op,{component:"li",children:"Rectifying data if inaccurate"})]})]}),(0,qt.jsxs)(Cf,{children:["If you have any questions or concerns regarding this privacy policy, please reach our team by email at ",(0,qt.jsx)("a",{href:"mailto:rpmsupport@sarvika.com",children:"rpmsupport@sarvika.com"})," or write to us at Ganesham Trade Centre, 4th and 5th Floor, Gopal Nagar A, Ashok Vihar Ext, Gopalpura Bypass Rd, Jaipur, Rajasthan 302015.",(0,qt.jsx)("br",{}),(0,qt.jsx)("br",{}),"Contact Us and reach our team if You have any questions about this Privacy Policy. Contact Us by email at ",(0,qt.jsx)("a",{href:"mailto:rpmsupport@sarvika.com",children:"rpmsupport@sarvika.com"})," or write to us at Ganesham Trade Centre, 4th and 5th Floor, Gopal Nagar A, Ashok Vihar Ext, Gopalpura Bypass Rd, Jaipur, Rajasthan 302015.",(0,qt.jsx)("br",{}),(0,qt.jsx)("br",{}),"Please note that email communications are vulnerable to security. So don\u2019t share any sensitive or confidential information via email.",(0,qt.jsx)("br",{}),(0,qt.jsx)("br",{}),"This Privacy Policy was last updated and reviewed on October 19, 2022."]})]})]})};const Sf=function(){return(0,qt.jsxs)(op,{children:[(0,qt.jsx)(Cf,{variant:"h4",component:"h1",children:"Terms and Conditions"}),(0,qt.jsxs)(op,{mt:4,children:[(0,qt.jsx)(Cf,{variant:"h6",component:"h6",sx:{mb:2.5},children:"Introduction"}),(0,qt.jsxs)(Cf,{children:["This document is an electronic record in terms of the Information Technology Act, 2000 and the rules framed thereunder. This electronic record is generated by a computer system and does not require any physical or digital signatures.",(0,qt.jsx)("br",{}),(0,qt.jsx)("br",{}),"This document is published in accordance with the provisions of Rule 3 (1) of the Information Technology (Intermediaries Guidelines) Rules, 2011, and Rule 3(1) of Information Technology (Intermediary Guideline and Digital Media Ethic Code) Rules, 2021 that require publishing the rules and regulations, privacy policy and Terms of Use for access or usage of the ",(0,qt.jsx)("a",{href:"https://www.rpmfy.com/",children:"https://www.rpmfy.com/"}),(0,qt.jsx)("br",{}),(0,qt.jsx)("br",{}),"This RPM application is owned and operated by Sarvika Technologies Pvt Ltd located at Ganesham Trade Centre, 4th and 5th Floor, Gopal Nagar A, Ashok Vihar Ext, Gopalpura Bypass Rd, Jaipur, Rajasthan 302015. Our phone number is +91-141-4911243, and our email address is ",(0,qt.jsx)("a",{href:"mailto:rpmsupport@sarvika.com",children:"rpmsupport@sarvika.com"}),".",(0,qt.jsx)("br",{}),(0,qt.jsx)("br",{}),"ACCESSING, BROWSING, OR OTHERWISE USING THE PLATFORM (DEFINED HEREINAFTER) INDICATES YOUR ACCEPTANCE OF ALL THE TERMS AND CONDITIONS IN THESE TERMS OF USE. PLEASE READ THESE TERMS OF USE CAREFULLY BEFORE PROCEEDING. YOU DECLARE YOUR WILLINGNESS TO ABIDE AND BE BOUND BY THESE TERMS OF USE THROUGH YOUR USE OF THE PLATFORM. IF YOU DO NOT AGREE WITH THE TERMS OF USE, PLEASE DO NOT USE THE PLATFORM. THESE TERMS OF USE WILL BE EFFECTIVE IMMEDIATELY UPON YOUR ACCEPTANCE OF OUR TERMS AND CONDITIONS, YOUR USE OF OUR PLATFORM BEING INDICATIVE OF SUCH ACCEPTANCE. THESE TERMS OF USE SHALL BE ENFORCEABLE AGAINST YOU IN A THE SAME MANNER AS ANY OTHER WRITTEN AGREEMENT."]})]}),(0,qt.jsxs)(op,{mt:4,children:[(0,qt.jsx)(Cf,{variant:"h6",component:"h6",sx:{mb:2.5},children:"TERMS OF USE"}),(0,qt.jsxs)(Cf,{children:["Please carefully read and review the terms and conditions before using the services. The Terms and Conditions specified here govern the use of the application and its associated services. Clicking on the ",(0,qt.jsx)("strong",{children:"I Agree"})," button signifies the acceptance of the terms and associated agreements. The terms and conditions can be modified/altered from time to time and duly applied to all users. The users need to accept the revised terms and conditions to continue using the service."]})]}),(0,qt.jsxs)(op,{mt:4,children:[(0,qt.jsx)(Cf,{variant:"h6",component:"h6",sx:{mb:2.5},children:"GENERAL USE"}),(0,qt.jsxs)(Cf,{children:["This application is part of a service intended for end users/patients to connect with doctors and hospitals.",(0,qt.jsx)("br",{}),(0,qt.jsx)("br",{}),"We use industry-oriented technologies created by Sarvika Technologies in consultation with seasoned health personnel to assess every user. Our goal is to be the elite standard medical device integrator that integrates smart devices to enable trained medical professionals to monitor patients and their health in real time based on scientific analysis. The collected data is then analyzed using a medical algorithm coordinated with various leading physicians.",(0,qt.jsx)("br",{}),(0,qt.jsx)("br",{}),"For producing better results in our operations, we may require patient information including sensitive personal information for collection, charting and analysis purposes, however, such information will only be collected with the consent of the patients/end users themselves and will not be sold. or share it with others. However, we may share the date with our trusted third partners such as doctors, hospitals, and medical institutions for health inspection purposes only.",(0,qt.jsx)("br",{}),(0,qt.jsx)("br",{}),"The app does not provide any sort of medical advice to its users and hence should not be used as a mechanism for self medicate. We are only providing the service of data collection meant to be used by healthcare personnel."]})]}),(0,qt.jsxs)(op,{mt:4,children:[(0,qt.jsx)(Cf,{variant:"h6",component:"h6",sx:{mb:2.5},children:"WHAT ARE THE USER REQUIREMENTS?"}),(0,qt.jsxs)(Cf,{children:["You have given confirmation that while you are using the application, your device\u2019s current location and Bluetooth will be active, essential for the accuracy of some of the operations performed by the application. Turning your device off or keeping it in airplane mode will interrupt providing correct health conditions. Apart from this, you also allowed media access permission to download and view the health report.",(0,qt.jsx)("br",{}),(0,qt.jsx)("br",{}),"You need to create your personal profile to use the application. The profile created by you will be having certain personal information that we strive to remain confidential. We do not generate or provide any sort of information on behalf of a user.",(0,qt.jsx)("br",{}),(0,qt.jsx)("br",{}),"You, as a user, bear complete responsibility for the accuracy of the information shared or uploaded while creating your profile. The user shall also justify that all the details of medical instruments used by them are accurate and correctly provided to the app."]})]}),(0,qt.jsxs)(op,{mt:4,children:[(0,qt.jsx)(Cf,{variant:"h6",component:"h6",sx:{mb:2.5},children:"APP USE"}),(0,qt.jsx)(Cf,{children:"You confirm that you will be using the application only for health-related purposes and will not circulate or mislead people in any way with the services. You also agree that you will not be participating in any sort of activity that leads to affecting the performance of the application. Lastly, you confirm that there will be no use of the application apart from its meant use."})]}),(0,qt.jsxs)(op,{mt:4,children:[(0,qt.jsx)(Cf,{variant:"h6",component:"h6",sx:{mb:2.5},children:"DISRUPTION"}),(0,qt.jsx)(Cf,{children:"You also agree that you are not expecting to access the service permanently and uninterruptedly. The services are intended to be accessed from any part of India 24*7, and we have given our best efforts regarding the same. However, the possibility of downtime can occur on a temporary or permanent basis for all or some users."})]}),(0,qt.jsxs)(op,{mt:4,children:[(0,qt.jsx)(Cf,{variant:"h6",component:"h6",sx:{mb:2.5},children:"LIABILITY"}),(0,qt.jsx)(Cf,{children:"Our team of IT experts has given their best efforts in creating this application and ensuring it performs at par with user expectations. However, we are not liable in case of app failure or any mishappening."})]}),(0,qt.jsxs)(op,{mt:4,children:[(0,qt.jsx)(Cf,{variant:"h6",component:"h6",sx:{mb:2.5},children:"DISCLAIMER"}),(0,qt.jsxs)(Cf,{children:["We have implemented top-notch industry standards, and technical and organizational security measures to secure any sort of personal information. In any case, despite our protections and endeavors to get your data, no electronic transmission over the Web or data stockpiling innovation can guarantee to be 100 percent secure, so we can","'","t commit or assure that programmers, cybercriminals, or other unapproved outsiders cannot overcome our security, and inappropriately gather, access, take, or adjust your data. We do not provide any warranty in case of a data breach or compatibility of the application. Even though we will give our all to safeguard your data, the transmission of individual data to and from our Administrations is despite the danger. You ought to just access the Administrations inside a secure climate."]})]}),(0,qt.jsxs)(op,{mt:4,children:[(0,qt.jsx)(Cf,{variant:"h6",component:"h6",sx:{mb:2.5},children:"DEFECT REPORTING"}),(0,qt.jsxs)(Cf,{children:["If you have any questions or concerns, please reach our team by email at"," ",(0,qt.jsx)("a",{href:"mailto:rpmsupport@sarvika.com",children:"rpmsupport@sarvika.com"})," or write to us at Ganesham Trade Centre, 4th and 5th Floor, Gopal Nagar A, Ashok Vihar Ext, Gopalpura Bypass Rd, Jaipur, Rajasthan 302015."]})]}),(0,qt.jsxs)(op,{mt:4,children:[(0,qt.jsx)(Cf,{variant:"h6",component:"h6",sx:{mb:2.5},children:"GOVERNING LAW"}),(0,qt.jsx)(Cf,{children:"The Terms and conditions are as per the laws of India."})]})]})};var Af=n(89751);const kf=We.createContext();function Tf(e){return(0,sr.Ay)("MuiGrid",e)}const Ef=["auto",!0,1,2,3,4,5,6,7,8,9,10,11,12],Mf=(0,ar.A)("MuiGrid",["root","container","item","zeroMinWidth",...[0,1,2,3,4,5,6,7,8,9,10].map(e=>"spacing-xs-".concat(e)),...["column-reverse","column","row-reverse","row"].map(e=>"direction-xs-".concat(e)),...["nowrap","wrap-reverse","wrap"].map(e=>"wrap-xs-".concat(e)),...Ef.map(e=>"grid-xs-".concat(e)),...Ef.map(e=>"grid-sm-".concat(e)),...Ef.map(e=>"grid-md-".concat(e)),...Ef.map(e=>"grid-lg-".concat(e)),...Ef.map(e=>"grid-xl-".concat(e))]),Of=Mf,Rf=["className","columns","columnSpacing","component","container","direction","item","rowSpacing","spacing","wrap","zeroMinWidth"];function Pf(e){const t=parseFloat(e);return"".concat(t).concat(String(e).replace(String(t),"")||"px")}function Df(e){let{breakpoints:t,values:n}=e,r="";Object.keys(n).forEach(e=>{""===r&&0!==n[e]&&(r=e)});const i=Object.keys(t).sort((e,n)=>t[e]-t[n]);return i.slice(0,i.indexOf(r))}const Nf=(0,Vn.Ay)("div",{name:"MuiGrid",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e,{container:r,direction:i,item:o,spacing:a,wrap:s,zeroMinWidth:l,breakpoints:c}=n;let d=[];r&&(d=function(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if(!e||e<=0)return[];if("string"===typeof e&&!Number.isNaN(Number(e))||"number"===typeof e)return[n["spacing-xs-".concat(String(e))]];const r=[];return t.forEach(t=>{const i=e[t];Number(i)>0&&r.push(n["spacing-".concat(t,"-").concat(String(i))])}),r}(a,c,t));const u=[];return c.forEach(e=>{const r=n[e];r&&u.push(t["grid-".concat(e,"-").concat(String(r))])}),[t.root,r&&t.container,o&&t.item,l&&t.zeroMinWidth,...d,"row"!==i&&t["direction-xs-".concat(String(i))],"wrap"!==s&&t["wrap-xs-".concat(String(s))],...u]}})(e=>{let{ownerState:t}=e;return(0,Ft.A)({boxSizing:"border-box"},t.container&&{display:"flex",flexWrap:"wrap",width:"100%"},t.item&&{margin:0},t.zeroMinWidth&&{minWidth:0},"wrap"!==t.wrap&&{flexWrap:t.wrap})},function(e){let{theme:t,ownerState:n}=e;const r=(0,Af.kW)({values:n.direction,breakpoints:t.breakpoints.values});return(0,Af.NI)({theme:t},r,e=>{const t={flexDirection:e};return 0===e.indexOf("column")&&(t["& > .".concat(Of.item)]={maxWidth:"none"}),t})},function(e){let{theme:t,ownerState:n}=e;const{container:r,rowSpacing:i}=n;let o={};if(r&&0!==i){const e=(0,Af.kW)({values:i,breakpoints:t.breakpoints.values});let n;"object"===typeof e&&(n=Df({breakpoints:t.breakpoints.values,values:e})),o=(0,Af.NI)({theme:t},e,(e,r)=>{var i;const o=t.spacing(e);return"0px"!==o?{marginTop:"-".concat(Pf(o)),["& > .".concat(Of.item)]:{paddingTop:Pf(o)}}:null!=(i=n)&&i.includes(r)?{}:{marginTop:0,["& > .".concat(Of.item)]:{paddingTop:0}}})}return o},function(e){let{theme:t,ownerState:n}=e;const{container:r,columnSpacing:i}=n;let o={};if(r&&0!==i){const e=(0,Af.kW)({values:i,breakpoints:t.breakpoints.values});let n;"object"===typeof e&&(n=Df({breakpoints:t.breakpoints.values,values:e})),o=(0,Af.NI)({theme:t},e,(e,r)=>{var i;const o=t.spacing(e);return"0px"!==o?{width:"calc(100% + ".concat(Pf(o),")"),marginLeft:"-".concat(Pf(o)),["& > .".concat(Of.item)]:{paddingLeft:Pf(o)}}:null!=(i=n)&&i.includes(r)?{}:{width:"100%",marginLeft:0,["& > .".concat(Of.item)]:{paddingLeft:0}}})}return o},function(e){let t,{theme:n,ownerState:r}=e;return n.breakpoints.keys.reduce((e,i)=>{let o={};if(r[i]&&(t=r[i]),!t)return e;if(!0===t)o={flexBasis:0,flexGrow:1,maxWidth:"100%"};else if("auto"===t)o={flexBasis:"auto",flexGrow:0,flexShrink:0,maxWidth:"none",width:"auto"};else{const a=(0,Af.kW)({values:r.columns,breakpoints:n.breakpoints.values}),s="object"===typeof a?a[i]:a;if(void 0===s||null===s)return e;const l="".concat(Math.round(t/s*1e8)/1e6,"%");let c={};if(r.container&&r.item&&0!==r.columnSpacing){const e=n.spacing(r.columnSpacing);if("0px"!==e){const t="calc(".concat(l," + ").concat(Pf(e),")");c={flexBasis:t,maxWidth:t}}}o=(0,Ft.A)({flexBasis:l,flexGrow:0,maxWidth:l},c)}return 0===n.breakpoints.values[i]?Object.assign(e,o):e[n.breakpoints.up(i)]=o,e},{})});const Lf=e=>{const{classes:t,container:n,direction:r,item:i,spacing:o,wrap:a,zeroMinWidth:s,breakpoints:l}=e;let c=[];n&&(c=function(e,t){if(!e||e<=0)return[];if("string"===typeof e&&!Number.isNaN(Number(e))||"number"===typeof e)return["spacing-xs-".concat(String(e))];const n=[];return t.forEach(t=>{const r=e[t];if(Number(r)>0){const e="spacing-".concat(t,"-").concat(String(r));n.push(e)}}),n}(o,l));const d=[];l.forEach(t=>{const n=e[t];n&&d.push("grid-".concat(t,"-").concat(String(n)))});const u={root:["root",n&&"container",i&&"item",s&&"zeroMinWidth",...c,"row"!==r&&"direction-xs-".concat(String(r)),"wrap"!==a&&"wrap-xs-".concat(String(a)),...d]};return(0,ir.A)(u,Tf,t)},If=We.forwardRef(function(e,t){const n=(0,$t.b)({props:e,name:"MuiGrid"}),{breakpoints:r}=In(),i=(0,Qu.A)(n),{className:o,columns:a,columnSpacing:s,component:l="div",container:c=!1,direction:d="row",item:u=!1,rowSpacing:p,spacing:h=0,wrap:m="wrap",zeroMinWidth:f=!1}=i,g=(0,nn.A)(i,Rf),v=p||h,x=s||h,y=We.useContext(kf),b=c?a||12:y,j={},_=(0,Ft.A)({},g);r.keys.forEach(e=>{null!=g[e]&&(j[e]=g[e],delete _[e])});const C=(0,Ft.A)({},i,{columns:b,container:c,direction:d,item:u,rowSpacing:v,columnSpacing:x,wrap:m,zeroMinWidth:f,spacing:h},j,{breakpoints:r.keys}),w=Lf(C);return(0,qt.jsx)(kf.Provider,{value:b,children:(0,qt.jsx)(Nf,(0,Ft.A)({ownerState:C,className:(0,nr.A)(w.root,o),as:l,ref:t},_))})});const Ff=If;function $f(e){return(0,sr.Ay)("MuiLink",e)}const Bf=(0,ar.A)("MuiLink",["root","underlineNone","underlineHover","underlineAlways","button","focusVisible"]);var zf=n(17162);const Hf={primary:"primary.main",textPrimary:"text.primary",secondary:"secondary.main",textSecondary:"text.secondary",error:"error.main"},Wf=e=>{let{theme:t,ownerState:n}=e;const r=(e=>Hf[e]||e)(n.color),i=(0,zf.Yn)(t,"palette.".concat(r),!1)||n.color,o=(0,zf.Yn)(t,"palette.".concat(r,"Channel"));return"vars"in t&&o?"rgba(".concat(o," / 0.4)"):(0,hp.X4)(i,.4)},Uf=["className","color","component","onBlur","onFocus","TypographyClasses","underline","variant","sx"],Vf=(0,Vn.Ay)(Cf,{name:"MuiLink",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t["underline".concat((0,pp.A)(n.underline))],"button"===n.component&&t.button]}})(e=>{let{theme:t,ownerState:n}=e;return(0,Ft.A)({},"none"===n.underline&&{textDecoration:"none"},"hover"===n.underline&&{textDecoration:"none","&:hover":{textDecoration:"underline"}},"always"===n.underline&&(0,Ft.A)({textDecoration:"underline"},"inherit"!==n.color&&{textDecorationColor:Wf({theme:t,ownerState:n})},{"&:hover":{textDecorationColor:"inherit"}}),"button"===n.component&&{position:"relative",WebkitTapHighlightColor:"transparent",backgroundColor:"transparent",outline:0,border:0,margin:0,borderRadius:0,padding:0,cursor:"pointer",userSelect:"none",verticalAlign:"middle",MozAppearance:"none",WebkitAppearance:"none","&::-moz-focus-inner":{borderStyle:"none"},["&.".concat(Bf.focusVisible)]:{outline:"auto"}})}),Gf=We.forwardRef(function(e,t){const n=(0,$t.b)({props:e,name:"MuiLink"}),{className:r,color:i="primary",component:o="a",onBlur:a,onFocus:s,TypographyClasses:l,underline:c="always",variant:d="inherit",sx:u}=n,p=(0,nn.A)(n,Uf),{isFocusVisibleRef:h,onBlur:m,onFocus:f,ref:g}=(0,Ep.A)(),[v,x]=We.useState(!1),y=(0,Ln.A)(t,g),b=(0,Ft.A)({},n,{color:i,component:o,focusVisible:v,underline:c,variant:d}),j=(e=>{const{classes:t,component:n,focusVisible:r,underline:i}=e,o={root:["root","underline".concat((0,pp.A)(i)),"button"===n&&"button",r&&"focusVisible"]};return(0,ir.A)(o,$f,t)})(b);return(0,qt.jsx)(Vf,(0,Ft.A)({color:i,className:(0,nr.A)(j.root,r),classes:l,component:o,onBlur:e=>{m(e),!1===h.current&&x(!1),a&&a(e)},onFocus:e=>{f(e),!0===h.current&&x(!0),s&&s(e)},ref:y,ownerState:b,variant:d,sx:[...Object.keys(Hf).includes(i)?[]:[{color:i}],...Array.isArray(u)?u:[u]]},p))}),qf=Gf;const Yf=function(){return(0,qt.jsxs)(op,{children:[(0,qt.jsxs)(Ff,{container:!0,spacing:2,children:[(0,qt.jsx)(Ff,{item:!0,xs:12,sm:!0,children:(0,qt.jsx)(Cf,{variant:"h4",component:"h1",children:"User Manual"})}),(0,qt.jsx)(Ff,{item:!0,children:(0,qt.jsx)(xh,{component:qf,color:"success",variant:"contained",href:window.location.origin+"/assets/pdf/omron_hem_7156.pdf",target:"_blank",download:!0,children:"Download user manual"})})]}),(0,qt.jsx)(op,{mt:4,children:(0,qt.jsx)("iframe",{src:window.location.origin+"/assets/pdf/omron_hem_7156.pdf",width:"100%",height:"576",frameBorder:"0"})})]})};const Zf=function(){return(0,qt.jsxs)(ko,{children:[(0,qt.jsx)(So,{path:"privacy-policy",element:(0,qt.jsx)(wf,{})}),(0,qt.jsx)(So,{path:"terms-and-condition",element:(0,qt.jsx)(Sf,{})}),(0,qt.jsx)(So,{path:"user-manual",element:(0,qt.jsx)(Yf,{})})]})},Kf=["absolute","children","className","component","flexItem","light","orientation","role","textAlign","variant"],Xf=(0,Vn.Ay)("div",{name:"MuiDivider",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.absolute&&t.absolute,t[n.variant],n.light&&t.light,"vertical"===n.orientation&&t.vertical,n.flexItem&&t.flexItem,n.children&&t.withChildren,n.children&&"vertical"===n.orientation&&t.withChildrenVertical,"right"===n.textAlign&&"vertical"!==n.orientation&&t.textAlignRight,"left"===n.textAlign&&"vertical"!==n.orientation&&t.textAlignLeft]}})(e=>{let{theme:t,ownerState:n}=e;return(0,Ft.A)({margin:0,flexShrink:0,borderWidth:0,borderStyle:"solid",borderColor:(t.vars||t).palette.divider,borderBottomWidth:"thin"},n.absolute&&{position:"absolute",bottom:0,left:0,width:"100%"},n.light&&{borderColor:t.vars?"rgba(".concat(t.vars.palette.dividerChannel," / 0.08)"):(0,hp.X4)(t.palette.divider,.08)},"inset"===n.variant&&{marginLeft:72},"middle"===n.variant&&"horizontal"===n.orientation&&{marginLeft:t.spacing(2),marginRight:t.spacing(2)},"middle"===n.variant&&"vertical"===n.orientation&&{marginTop:t.spacing(1),marginBottom:t.spacing(1)},"vertical"===n.orientation&&{height:"100%",borderBottomWidth:0,borderRightWidth:"thin"},n.flexItem&&{alignSelf:"stretch",height:"auto"})},e=>{let{ownerState:t}=e;return(0,Ft.A)({},t.children&&{display:"flex",whiteSpace:"nowrap",textAlign:"center",border:0,borderTopStyle:"solid",borderLeftStyle:"solid","&::before, &::after":{content:'""',alignSelf:"center"}})},e=>{let{theme:t,ownerState:n}=e;return(0,Ft.A)({},n.children&&"vertical"!==n.orientation&&{"&::before, &::after":{width:"100%",borderTop:"thin solid ".concat((t.vars||t).palette.divider),borderTopStyle:"inherit"}})},e=>{let{theme:t,ownerState:n}=e;return(0,Ft.A)({},n.children&&"vertical"===n.orientation&&{flexDirection:"column","&::before, &::after":{height:"100%",borderLeft:"thin solid ".concat((t.vars||t).palette.divider),borderLeftStyle:"inherit"}})},e=>{let{ownerState:t}=e;return(0,Ft.A)({},"right"===t.textAlign&&"vertical"!==t.orientation&&{"&::before":{width:"90%"},"&::after":{width:"10%"}},"left"===t.textAlign&&"vertical"!==t.orientation&&{"&::before":{width:"10%"},"&::after":{width:"90%"}})}),Qf=(0,Vn.Ay)("span",{name:"MuiDivider",slot:"Wrapper",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.wrapper,"vertical"===n.orientation&&t.wrapperVertical]}})(e=>{let{theme:t,ownerState:n}=e;return(0,Ft.A)({display:"inline-block",paddingLeft:"calc(".concat(t.spacing(1)," * 1.2)"),paddingRight:"calc(".concat(t.spacing(1)," * 1.2)")},"vertical"===n.orientation&&{paddingTop:"calc(".concat(t.spacing(1)," * 1.2)"),paddingBottom:"calc(".concat(t.spacing(1)," * 1.2)")})}),Jf=We.forwardRef(function(e,t){const n=(0,$t.b)({props:e,name:"MuiDivider"}),{absolute:r=!1,children:i,className:o,component:a=(i?"div":"hr"),flexItem:s=!1,light:l=!1,orientation:c="horizontal",role:d=("hr"!==a?"separator":void 0),textAlign:u="center",variant:p="fullWidth"}=n,h=(0,nn.A)(n,Kf),m=(0,Ft.A)({},n,{absolute:r,component:a,flexItem:s,light:l,orientation:c,role:d,textAlign:u,variant:p}),f=(e=>{const{absolute:t,children:n,classes:r,flexItem:i,light:o,orientation:a,textAlign:s,variant:l}=e,c={root:["root",t&&"absolute",l,o&&"light","vertical"===a&&"vertical",i&&"flexItem",n&&"withChildren",n&&"vertical"===a&&"withChildrenVertical","right"===s&&"vertical"!==a&&"textAlignRight","left"===s&&"vertical"!==a&&"textAlignLeft"],wrapper:["wrapper","vertical"===a&&"wrapperVertical"]};return(0,ir.A)(c,nf,r)})(m);return(0,qt.jsx)(Xf,(0,Ft.A)({as:a,className:(0,nr.A)(f.root,o),role:d,ref:t,ownerState:m},h,{children:i?(0,qt.jsx)(Qf,{className:f.wrapper,ownerState:m,children:i}):null}))});Jf.muiSkipListHighlight=!0;const eg=Jf;function tg(e){return(0,sr.Ay)("MuiDrawer",e)}(0,ar.A)("MuiDrawer",["root","docked","paper","paperAnchorLeft","paperAnchorRight","paperAnchorTop","paperAnchorBottom","paperAnchorDockedLeft","paperAnchorDockedRight","paperAnchorDockedTop","paperAnchorDockedBottom","modal"]);const ng=["BackdropProps"],rg=["anchor","BackdropProps","children","className","elevation","hideBackdrop","ModalProps","onClose","open","PaperProps","SlideProps","TransitionComponent","transitionDuration","variant"],ig=(e,t)=>{const{ownerState:n}=e;return[t.root,("permanent"===n.variant||"persistent"===n.variant)&&t.docked,t.modal]},og=(0,Vn.Ay)(Pm,{name:"MuiDrawer",slot:"Root",overridesResolver:ig})(e=>{let{theme:t}=e;return{zIndex:(t.vars||t).zIndex.drawer}}),ag=(0,Vn.Ay)("div",{shouldForwardProp:kp.A,name:"MuiDrawer",slot:"Docked",skipVariantsResolver:!1,overridesResolver:ig})({flex:"0 0 auto"}),sg=(0,Vn.Ay)(yp,{name:"MuiDrawer",slot:"Paper",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.paper,t["paperAnchor".concat((0,pp.A)(n.anchor))],"temporary"!==n.variant&&t["paperAnchorDocked".concat((0,pp.A)(n.anchor))]]}})(e=>{let{theme:t,ownerState:n}=e;return(0,Ft.A)({overflowY:"auto",display:"flex",flexDirection:"column",height:"100%",flex:"1 0 auto",zIndex:(t.vars||t).zIndex.drawer,WebkitOverflowScrolling:"touch",position:"fixed",top:0,outline:0},"left"===n.anchor&&{left:0},"top"===n.anchor&&{top:0,left:0,right:0,height:"auto",maxHeight:"100%"},"right"===n.anchor&&{right:0},"bottom"===n.anchor&&{top:"auto",left:0,bottom:0,right:0,height:"auto",maxHeight:"100%"},"left"===n.anchor&&"temporary"!==n.variant&&{borderRight:"1px solid ".concat((t.vars||t).palette.divider)},"top"===n.anchor&&"temporary"!==n.variant&&{borderBottom:"1px solid ".concat((t.vars||t).palette.divider)},"right"===n.anchor&&"temporary"!==n.variant&&{borderLeft:"1px solid ".concat((t.vars||t).palette.divider)},"bottom"===n.anchor&&"temporary"!==n.variant&&{borderTop:"1px solid ".concat((t.vars||t).palette.divider)})}),lg={left:"right",right:"left",top:"down",bottom:"up"};const cg=We.forwardRef(function(e,t){const n=(0,$t.b)({props:e,name:"MuiDrawer"}),r=In(),i=dn(),o={enter:r.transitions.duration.enteringScreen,exit:r.transitions.duration.leavingScreen},{anchor:a="left",BackdropProps:s,children:l,className:c,elevation:d=16,hideBackdrop:u=!1,ModalProps:{BackdropProps:p}={},onClose:h,open:m=!1,PaperProps:f={},SlideProps:g,TransitionComponent:v=Un,transitionDuration:x=o,variant:y="temporary"}=n,b=(0,nn.A)(n.ModalProps,ng),j=(0,nn.A)(n,rg),_=We.useRef(!1);We.useEffect(()=>{_.current=!0},[]);const C=function(e,t){let{direction:n}=e;return"rtl"===n&&function(e){return-1!==["left","right"].indexOf(e)}(t)?lg[t]:t}({direction:i?"rtl":"ltr"},a),w=a,S=(0,Ft.A)({},n,{anchor:w,elevation:d,open:m,variant:y},j),A=(e=>{const{classes:t,anchor:n,variant:r}=e,i={root:["root"],docked:[("permanent"===r||"persistent"===r)&&"docked"],modal:["modal"],paper:["paper","paperAnchor".concat((0,pp.A)(n)),"temporary"!==r&&"paperAnchorDocked".concat((0,pp.A)(n))]};return(0,ir.A)(i,tg,t)})(S),k=(0,qt.jsx)(sg,(0,Ft.A)({elevation:"temporary"===y?d:0,square:!0},f,{className:(0,nr.A)(A.paper,f.className),ownerState:S,children:l}));if("permanent"===y)return(0,qt.jsx)(ag,(0,Ft.A)({className:(0,nr.A)(A.root,A.docked,c),ownerState:S,ref:t},j,{children:k}));const T=(0,qt.jsx)(v,(0,Ft.A)({in:m,direction:lg[C],timeout:x,appear:_.current},g,{children:k}));return"persistent"===y?(0,qt.jsx)(ag,(0,Ft.A)({className:(0,nr.A)(A.root,A.docked,c),ownerState:S,ref:t},j,{children:T})):(0,qt.jsx)(og,(0,Ft.A)({BackdropProps:(0,Ft.A)({},s,p,{transitionDuration:x}),className:(0,nr.A)(A.root,A.modal,c),open:m,ownerState:S,onClose:h,hideBackdrop:u,ref:t},j,b,{children:T}))}),dg=cg;var ug=n(27328);function pg(e){return(0,sr.Ay)("MuiListItem",e)}const hg=(0,ar.A)("MuiListItem",["root","container","focusVisible","dense","alignItemsFlexStart","disabled","divider","gutters","padding","button","secondaryAction","selected"]);function mg(e){return(0,sr.Ay)("MuiListItemButton",e)}const fg=(0,ar.A)("MuiListItemButton",["root","focusVisible","dense","alignItemsFlexStart","disabled","divider","gutters","selected"]);function gg(e){return(0,sr.Ay)("MuiListItemSecondaryAction",e)}(0,ar.A)("MuiListItemSecondaryAction",["root","disableGutters"]);const vg=["className"],xg=(0,Vn.Ay)("div",{name:"MuiListItemSecondaryAction",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.disableGutters&&t.disableGutters]}})(e=>{let{ownerState:t}=e;return(0,Ft.A)({position:"absolute",right:16,top:"50%",transform:"translateY(-50%)"},t.disableGutters&&{right:0})}),yg=We.forwardRef(function(e,t){const n=(0,$t.b)({props:e,name:"MuiListItemSecondaryAction"}),{className:r}=n,i=(0,nn.A)(n,vg),o=We.useContext(Lh),a=(0,Ft.A)({},n,{disableGutters:o.disableGutters}),s=(e=>{const{disableGutters:t,classes:n}=e,r={root:["root",t&&"disableGutters"]};return(0,ir.A)(r,gg,n)})(a);return(0,qt.jsx)(xg,(0,Ft.A)({className:(0,nr.A)(s.root,r),ownerState:a,ref:t},i))});yg.muiName="ListItemSecondaryAction";const bg=yg,jg=["className"],_g=["alignItems","autoFocus","button","children","className","component","components","componentsProps","ContainerComponent","ContainerProps","dense","disabled","disableGutters","disablePadding","divider","focusVisibleClassName","secondaryAction","selected","slotProps","slots"],Cg=(0,Vn.Ay)("div",{name:"MuiListItem",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.dense&&t.dense,"flex-start"===n.alignItems&&t.alignItemsFlexStart,n.divider&&t.divider,!n.disableGutters&&t.gutters,!n.disablePadding&&t.padding,n.button&&t.button,n.hasSecondaryAction&&t.secondaryAction]}})(e=>{let{theme:t,ownerState:n}=e;return(0,Ft.A)({display:"flex",justifyContent:"flex-start",alignItems:"center",position:"relative",textDecoration:"none",width:"100%",boxSizing:"border-box",textAlign:"left"},!n.disablePadding&&(0,Ft.A)({paddingTop:8,paddingBottom:8},n.dense&&{paddingTop:4,paddingBottom:4},!n.disableGutters&&{paddingLeft:16,paddingRight:16},!!n.secondaryAction&&{paddingRight:48}),!!n.secondaryAction&&{["& > .".concat(fg.root)]:{paddingRight:48}},{["&.".concat(hg.focusVisible)]:{backgroundColor:(t.vars||t).palette.action.focus},["&.".concat(hg.selected)]:{backgroundColor:t.vars?"rgba(".concat(t.vars.palette.primary.mainChannel," / ").concat(t.vars.palette.action.selectedOpacity,")"):(0,hp.X4)(t.palette.primary.main,t.palette.action.selectedOpacity),["&.".concat(hg.focusVisible)]:{backgroundColor:t.vars?"rgba(".concat(t.vars.palette.primary.mainChannel," / calc(").concat(t.vars.palette.action.selectedOpacity," + ").concat(t.vars.palette.action.focusOpacity,"))"):(0,hp.X4)(t.palette.primary.main,t.palette.action.selectedOpacity+t.palette.action.focusOpacity)}},["&.".concat(hg.disabled)]:{opacity:(t.vars||t).palette.action.disabledOpacity}},"flex-start"===n.alignItems&&{alignItems:"flex-start"},n.divider&&{borderBottom:"1px solid ".concat((t.vars||t).palette.divider),backgroundClip:"padding-box"},n.button&&{transition:t.transitions.create("background-color",{duration:t.transitions.duration.shortest}),"&:hover":{textDecoration:"none",backgroundColor:(t.vars||t).palette.action.hover,"@media (hover: none)":{backgroundColor:"transparent"}},["&.".concat(hg.selected,":hover")]:{backgroundColor:t.vars?"rgba(".concat(t.vars.palette.primary.mainChannel," / calc(").concat(t.vars.palette.action.selectedOpacity," + ").concat(t.vars.palette.action.hoverOpacity,"))"):(0,hp.X4)(t.palette.primary.main,t.palette.action.selectedOpacity+t.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:t.vars?"rgba(".concat(t.vars.palette.primary.mainChannel," / ").concat(t.vars.palette.action.selectedOpacity,")"):(0,hp.X4)(t.palette.primary.main,t.palette.action.selectedOpacity)}}},n.hasSecondaryAction&&{paddingRight:48})}),wg=(0,Vn.Ay)("li",{name:"MuiListItem",slot:"Container",overridesResolver:(e,t)=>t.container})({position:"relative"}),Sg=We.forwardRef(function(e,t){const n=(0,$t.b)({props:e,name:"MuiListItem"}),{alignItems:r="center",autoFocus:i=!1,button:o=!1,children:a,className:s,component:l,components:c={},componentsProps:d={},ContainerComponent:u="li",ContainerProps:{className:p}={},dense:h=!1,disabled:m=!1,disableGutters:f=!1,disablePadding:g=!1,divider:v=!1,focusVisibleClassName:x,secondaryAction:y,selected:b=!1,slotProps:j={},slots:_={}}=n,C=(0,nn.A)(n.ContainerProps,jg),w=(0,nn.A)(n,_g),S=We.useContext(Lh),A=We.useMemo(()=>({dense:h||S.dense||!1,alignItems:r,disableGutters:f}),[r,S.dense,h,f]),k=We.useRef(null);(0,Uh.A)(()=>{i&&k.current&&k.current.focus()},[i]);const T=We.Children.toArray(a),E=T.length&&(0,ug.A)(T[T.length-1],["ListItemSecondaryAction"]),M=(0,Ft.A)({},n,{alignItems:r,autoFocus:i,button:o,dense:A.dense,disabled:m,disableGutters:f,disablePadding:g,divider:v,hasSecondaryAction:E,selected:b}),O=(e=>{const{alignItems:t,button:n,classes:r,dense:i,disabled:o,disableGutters:a,disablePadding:s,divider:l,hasSecondaryAction:c,selected:d}=e,u={root:["root",i&&"dense",!a&&"gutters",!s&&"padding",l&&"divider",o&&"disabled",n&&"button","flex-start"===t&&"alignItemsFlexStart",c&&"secondaryAction",d&&"selected"],container:["container"]};return(0,ir.A)(u,pg,r)})(M),R=(0,Ln.A)(k,t),P=_.root||c.Root||Cg,D=j.root||d.root||{},N=(0,Ft.A)({className:(0,nr.A)(O.root,D.className,s),disabled:m},w);let L=l||"li";return o&&(N.component=l||"div",N.focusVisibleClassName=(0,nr.A)(hg.focusVisible,x),L=sh),E?(L=N.component||l?L:"div","li"===u&&("li"===L?L="div":"li"===N.component&&(N.component="div")),(0,qt.jsx)(Lh.Provider,{value:A,children:(0,qt.jsxs)(wg,(0,Ft.A)({as:u,className:(0,nr.A)(O.container,p),ref:R,ownerState:M},C,{children:[(0,qt.jsx)(P,(0,Ft.A)({},D,!Sh(P)&&{as:L,ownerState:(0,Ft.A)({},M,D.ownerState)},N,{children:T})),T.pop()]}))})):(0,qt.jsx)(Lh.Provider,{value:A,children:(0,qt.jsxs)(P,(0,Ft.A)({},D,{as:L,ref:R},!Sh(P)&&{ownerState:(0,Ft.A)({},M,D.ownerState)},N,{children:[T,y&&(0,qt.jsx)(bg,{children:y})]}))})}),Ag=Sg,kg=["alignItems","autoFocus","component","children","dense","disableGutters","divider","focusVisibleClassName","selected","className"],Tg=(0,Vn.Ay)(sh,{shouldForwardProp:e=>(0,kp.A)(e)||"classes"===e,name:"MuiListItemButton",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.dense&&t.dense,"flex-start"===n.alignItems&&t.alignItemsFlexStart,n.divider&&t.divider,!n.disableGutters&&t.gutters]}})(e=>{let{theme:t,ownerState:n}=e;return(0,Ft.A)({display:"flex",flexGrow:1,justifyContent:"flex-start",alignItems:"center",position:"relative",textDecoration:"none",minWidth:0,boxSizing:"border-box",textAlign:"left",paddingTop:8,paddingBottom:8,transition:t.transitions.create("background-color",{duration:t.transitions.duration.shortest}),"&:hover":{textDecoration:"none",backgroundColor:(t.vars||t).palette.action.hover,"@media (hover: none)":{backgroundColor:"transparent"}},["&.".concat(fg.selected)]:{backgroundColor:t.vars?"rgba(".concat(t.vars.palette.primary.mainChannel," / ").concat(t.vars.palette.action.selectedOpacity,")"):(0,hp.X4)(t.palette.primary.main,t.palette.action.selectedOpacity),["&.".concat(fg.focusVisible)]:{backgroundColor:t.vars?"rgba(".concat(t.vars.palette.primary.mainChannel," / calc(").concat(t.vars.palette.action.selectedOpacity," + ").concat(t.vars.palette.action.focusOpacity,"))"):(0,hp.X4)(t.palette.primary.main,t.palette.action.selectedOpacity+t.palette.action.focusOpacity)}},["&.".concat(fg.selected,":hover")]:{backgroundColor:t.vars?"rgba(".concat(t.vars.palette.primary.mainChannel," / calc(").concat(t.vars.palette.action.selectedOpacity," + ").concat(t.vars.palette.action.hoverOpacity,"))"):(0,hp.X4)(t.palette.primary.main,t.palette.action.selectedOpacity+t.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:t.vars?"rgba(".concat(t.vars.palette.primary.mainChannel," / ").concat(t.vars.palette.action.selectedOpacity,")"):(0,hp.X4)(t.palette.primary.main,t.palette.action.selectedOpacity)}},["&.".concat(fg.focusVisible)]:{backgroundColor:(t.vars||t).palette.action.focus},["&.".concat(fg.disabled)]:{opacity:(t.vars||t).palette.action.disabledOpacity}},n.divider&&{borderBottom:"1px solid ".concat((t.vars||t).palette.divider),backgroundClip:"padding-box"},"flex-start"===n.alignItems&&{alignItems:"flex-start"},!n.disableGutters&&{paddingLeft:16,paddingRight:16},n.dense&&{paddingTop:4,paddingBottom:4})}),Eg=We.forwardRef(function(e,t){const n=(0,$t.b)({props:e,name:"MuiListItemButton"}),{alignItems:r="center",autoFocus:i=!1,component:o="div",children:a,dense:s=!1,disableGutters:l=!1,divider:c=!1,focusVisibleClassName:d,selected:u=!1,className:p}=n,h=(0,nn.A)(n,kg),m=We.useContext(Lh),f=We.useMemo(()=>({dense:s||m.dense||!1,alignItems:r,disableGutters:l}),[r,m.dense,s,l]),g=We.useRef(null);(0,Uh.A)(()=>{i&&g.current&&g.current.focus()},[i]);const v=(0,Ft.A)({},n,{alignItems:r,dense:f.dense,disableGutters:l,divider:c,selected:u}),x=(e=>{const{alignItems:t,classes:n,dense:r,disabled:i,disableGutters:o,divider:a,selected:s}=e,l={root:["root",r&&"dense",!o&&"gutters",a&&"divider",i&&"disabled","flex-start"===t&&"alignItemsFlexStart",s&&"selected"]},c=(0,ir.A)(l,mg,n);return(0,Ft.A)({},n,c)})(v),y=(0,Ln.A)(g,t);return(0,qt.jsx)(Lh.Provider,{value:f,children:(0,qt.jsx)(Tg,(0,Ft.A)({ref:y,href:h.href||h.to,component:(h.href||h.to)&&"div"===o?"button":o,focusVisibleClassName:(0,nr.A)(x.focusVisible,d),ownerState:v,className:(0,nr.A)(x.root,p)},h,{classes:x,children:a}))})}),Mg=Eg,Og=["children","className","disableTypography","inset","primary","primaryTypographyProps","secondary","secondaryTypographyProps"],Rg=(0,Vn.Ay)("div",{name:"MuiListItemText",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[{["& .".concat(lf.primary)]:t.primary},{["& .".concat(lf.secondary)]:t.secondary},t.root,n.inset&&t.inset,n.primary&&n.secondary&&t.multiline,n.dense&&t.dense]}})(e=>{let{ownerState:t}=e;return(0,Ft.A)({flex:"1 1 auto",minWidth:0,marginTop:4,marginBottom:4},t.primary&&t.secondary&&{marginTop:6,marginBottom:6},t.inset&&{paddingLeft:56})}),Pg=We.forwardRef(function(e,t){const n=(0,$t.b)({props:e,name:"MuiListItemText"}),{children:r,className:i,disableTypography:o=!1,inset:a=!1,primary:s,primaryTypographyProps:l,secondary:c,secondaryTypographyProps:d}=n,u=(0,nn.A)(n,Og),{dense:p}=We.useContext(Lh);let h=null!=s?s:r,m=c;const f=(0,Ft.A)({},n,{disableTypography:o,inset:a,primary:!!h,secondary:!!m,dense:p}),g=(e=>{const{classes:t,inset:n,primary:r,secondary:i,dense:o}=e,a={root:["root",n&&"inset",o&&"dense",r&&i&&"multiline"],primary:["primary"],secondary:["secondary"]};return(0,ir.A)(a,sf,t)})(f);return null==h||h.type===Cf||o||(h=(0,qt.jsx)(Cf,(0,Ft.A)({variant:p?"body2":"body1",className:g.primary,component:null!=l&&l.variant?void 0:"span",display:"block"},l,{children:h}))),null==m||m.type===Cf||o||(m=(0,qt.jsx)(Cf,(0,Ft.A)({variant:"body2",className:g.secondary,color:"text.secondary",display:"block"},d,{children:m}))),(0,qt.jsxs)(Rg,(0,Ft.A)({className:(0,nr.A)(g.root,i),ownerState:f,ref:t},u,{children:[h,m]}))}),Dg=Pg;const Ng=n.p+"static/media/logo_full.c89d2e4fb360a725941231da5d66fa99.svg";const Lg=function(e){let{navItems:t,mobileOpen:n,handleDrawerToggle:r,container:i,drawerWidth:o}=e;const a=(0,qt.jsxs)(op,{onClick:r,sx:{textAlign:"center"},children:[(0,qt.jsx)(Cf,{variant:"h6",sx:{my:2},children:(0,qt.jsx)("img",{src:Ng,height:48})}),(0,qt.jsx)(eg,{}),(0,qt.jsx)(zh,{children:t.map(e=>(0,qt.jsx)(Ag,{disablePadding:!0,children:(0,qt.jsx)(Mg,{sx:{textAlign:"center"},children:(0,qt.jsx)(Dg,{primary:e.name})})},e.id))})]});return(0,qt.jsx)(op,{component:"nav",children:(0,qt.jsx)(dg,{container:i,variant:"temporary",open:n,onClose:r,ModalProps:{keepMounted:!0},sx:{display:{xs:"block",sm:"none"},"& .MuiDrawer-paper":{boxSizing:"border-box",width:o}},children:a})})};const Ig=function(e){const{window:t}=e,[n,r]=We.useState(!1),i=()=>{r(!n)},o=void 0!==t?()=>t().document.body:void 0,a=[{id:1,name:"Privacy Policy",url:"/legal/privacy-policy",icon:(0,qt.jsx)(qu.A,{})},{id:2,name:"Term & Condition",url:"/legal/terms-and-condition",icon:(0,qt.jsx)(Yu.A,{})}];return(0,qt.jsxs)(op,{sx:{display:"flex"},children:[(0,qt.jsx)(gf,{handleDrawerToggle:i,navItems:a}),(0,qt.jsx)(op,{component:"nav",children:(0,qt.jsx)(Lg,{mobileOpen:n,handleDrawerToggle:i,container:o,drawerWidth:240,navItems:a})}),(0,qt.jsxs)(op,{component:"main",sx:{p:3,maxWidth:1024,mx:"auto",width:"100%"},children:[(0,qt.jsx)(dp,{}),(0,qt.jsx)(Zf,{})]})]})};function Fg(e,t){return g(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,i,o,a,s=[],l=!0,c=!1;try{if(o=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;l=!1}else for(;!(l=(r=o.call(n)).done)&&(s.push(r.value),s.length!==t);l=!0);}catch(e){c=!0,i=e}finally{try{if(!l&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(c)throw i}}return s}}(e,t)||y(e,t)||b()}function $g(){if(console&&console.warn){for(var e,t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];"string"===typeof n[0]&&(n[0]="react-i18next:: ".concat(n[0])),(e=console).warn.apply(e,n)}}var Bg={};function zg(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];"string"===typeof t[0]&&Bg[t[0]]||("string"===typeof t[0]&&(Bg[t[0]]=new Date),$g.apply(void 0,t))}function Hg(e,t,n){e.loadNamespaces(t,function(){if(e.isInitialized)n();else{e.on("initialized",function t(){setTimeout(function(){e.off("initialized",t)},0),n()})}})}function Wg(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function Ug(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Wg(Object(n),!0).forEach(function(t){(0,f.A)(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Wg(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function Vg(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.i18n,r=(0,We.useContext)(Qe)||{},i=r.i18n,o=r.defaultNS,a=n||i||et();if(a&&!a.reportNamespaces&&(a.reportNamespaces=new Je),!a){zg("You will need to pass in an i18next instance by using initReactI18next");var s=function(e){return Array.isArray(e)?e[e.length-1]:e},l=[s,{},!1];return l.t=s,l.i18n={},l.ready=!1,l}a.options.react&&void 0!==a.options.react.wait&&zg("It seems you are still using the old wait option, you may migrate to the new useSuspense behaviour.");var c=Ug(Ug(Ug({},Xe),a.options.react),t),d=c.useSuspense,u=c.keyPrefix,p=e||o||a.options&&a.options.defaultNS;p="string"===typeof p?[p]:p||["translation"],a.reportNamespaces.addUsedNamespaces&&a.reportNamespaces.addUsedNamespaces(p);var h=(a.isInitialized||a.initializedStoreOnce)&&p.every(function(e){return function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return t.languages&&t.languages.length?void 0!==t.options.ignoreJSONStructure?t.hasLoadedNamespace(e,{precheck:function(t,r){if(n.bindI18n&&n.bindI18n.indexOf("languageChanging")>-1&&t.services.backendConnector.backend&&t.isLanguageChangingTo&&!r(t.isLanguageChangingTo,e))return!1}}):function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=t.languages[0],i=!!t.options&&t.options.fallbackLng,o=t.languages[t.languages.length-1];if("cimode"===r.toLowerCase())return!0;var a=function(e,n){var r=t.services.backendConnector.state["".concat(e,"|").concat(n)];return-1===r||2===r};return!(n.bindI18n&&n.bindI18n.indexOf("languageChanging")>-1&&t.services.backendConnector.backend&&t.isLanguageChangingTo&&!a(t.isLanguageChangingTo,e))&&(!!t.hasResourceBundle(r,e)||!(t.services.backendConnector.backend&&(!t.options.resources||t.options.partialBundledLanguages))||!(!a(r,e)||i&&!a(o,e)))}(e,t,n):(zg("i18n.languages were undefined or empty",t.languages),!0)}(e,a,c)});function m(){return a.getFixedT(null,"fallback"===c.nsMode?p:p[0],u)}var f=Fg((0,We.useState)(m),2),g=f[0],v=f[1],x=p.join(),y=function(e,t){var n=(0,We.useRef)();return(0,We.useEffect)(function(){n.current=t?n.current:e},[e,t]),n.current}(x),b=(0,We.useRef)(!0);(0,We.useEffect)(function(){var e=c.bindI18n,t=c.bindI18nStore;function n(){b.current&&v(m)}return b.current=!0,h||d||Hg(a,p,function(){b.current&&v(m)}),h&&y&&y!==x&&b.current&&v(m),e&&a&&a.on(e,n),t&&a&&a.store.on(t,n),function(){b.current=!1,e&&a&&e.split(" ").forEach(function(e){return a.off(e,n)}),t&&a&&t.split(" ").forEach(function(e){return a.store.off(e,n)})}},[a,x]);var j=(0,We.useRef)(!0);(0,We.useEffect)(function(){b.current&&!j.current&&v(m),j.current=!1},[a,u]);var _=[g,a,h];if(_.t=g,_.i18n=a,_.ready=h,h)return _;if(!h&&!d)return _;throw new Promise(function(e){Hg(a,p,function(){e()})})}const Gg=function(){const{t:e}=Vg(),t=so();return(0,qt.jsxs)(op,{sx:{mt:25,textAlign:"center"},children:[(0,qt.jsx)(Cf,{variant:"h3",component:"h3",sx:{fontWeight:600,fontSize:{xs:"h4.fontSize",md:"h3.fontSize"}},children:"404"}),(0,qt.jsx)(Cf,{variant:"h1",component:"h1",sx:{fontSize:{xs:"h3.fontSize",md:"h2.fontSize"}},children:"Not Found"}),(0,qt.jsx)(xh,{variant:"contained",color:"primary",disableElevation:!0,onClick:()=>t("/"),children:e("rpm_BackToHome")})]})},qg=e=>async t=>{t(na(!0));try{let t=e.kind===xd.CUSTOM||e.kind===xd.PREDEFINED?"".concat(ma.ROLES,"?kind=").concat(e.kind,"&page=").concat(e.current_page||"","&perPage=").concat(e.per_page||"","&sortBy=").concat(e.sort_by||"name","&sortOrder=").concat(e.sort_order||"desc","&q=").concat(e.q||"","&include_children=false"):"".concat(ma.ROLES,"?kind=").concat(e.kind,"&include_children=false");e.programId?t+="&path=".concat(e.programId):t+="&path=/";return await Iu(t,{})}finally{t(na(!1))}},Yg=(e,t)=>async n=>{n(na(!0));try{const n="".concat(ma.POLICY,"/").concat(e,"/set-grants");await $u(n,t)}finally{n(na(!1))}},Zg=e=>async t=>{t(na(!0));try{let t="".concat(ma.USERS,"?page=").concat(e.current_page||"","&perPage=").concat(e.per_page||"","&sortBy=").concat(e.sort_by||"name","&sortOrder=").concat(e.sort_order||"desc","&q=").concat(e.q||"","&include_children=false");e.programId?t+="&path=/RPMCORE/".concat(e.programId,"/"):t+="&path=/";return await Iu(t,{})}catch(n){return n}finally{t(na(!1))}},Kg=(e,t)=>async n=>{n(na(!0));const r="".concat(ma.USERS,"/").concat(e,"/set-roles");try{return await $u(r,t)}catch(i){throw(null===i||void 0===i?void 0:i.response)||i}finally{n(na(!1))}},Xg=e=>async t=>{t(na(!0));const n="".concat(ma.USERS,"/").concat(e);try{const e=await Iu(n);return tv(e.data),e}finally{t(na(!1))}},Qg=e=>async t=>{t(na(!0));const n="".concat(ma.GROUP,"?&sortBy=").concat(e.sort_by||"name","&sortOrder=").concat(e.sort_order||"","&perPage=").concat(e.per_page||"","&path=").concat(e.path||"","&display_text=").concat(e.display_text||"","&include_child=").concat(e.include_child||"");try{return await Iu(n)}finally{t(na(!1))}},Jg=(e,t,n)=>async(r,o)=>{var a;const s=o(),{id:l,email:c,attributes:d,first_name:u,last_name:p}=(null===(a=bu(s))||void 0===a?void 0:a.user_principal)||{},h="".concat(ma.USERS,"/").concat(l),m={first_name:u,last_name:p,email:c,attributes:(0,i.A)((0,i.A)({},d),e)};try{await $u(h,m),r(ku()),$o.clearTourState(),"function"===typeof t&&t()}catch(f){"function"===typeof n&&n(f)}},ev=(e,t)=>async n=>{n(na(!0));let r="".concat(ma.USERS,"/").concat(e,"/groups/join?path=").concat(t);try{return await Fu(r)}finally{n(na(!1))}},tv=function(e){cs(e)||(cs(e.attributes)?e.attributes={}:e.attributes=Object.keys(e.attributes).reduce((t,n)=>(t[n]=e.attributes[n][0],t),{}))};function nv(e){return(0,sr.Ay)("MuiFab",e)}const rv=(0,ar.A)("MuiFab",["root","primary","secondary","extended","circular","focusVisible","disabled","colorInherit","sizeSmall","sizeMedium","sizeLarge","info","error","warning","success"]),iv=["children","className","color","component","disabled","disableFocusRipple","focusVisibleClassName","size","variant"],ov=(0,Vn.Ay)(sh,{name:"MuiFab",slot:"Root",shouldForwardProp:e=>(0,kp.A)(e)||"classes"===e,overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[n.variant],t["size".concat((0,pp.A)(n.size))],"inherit"===n.color&&t.colorInherit,t[(0,pp.A)(n.size)],t[n.color]]}})(e=>{let{theme:t,ownerState:n}=e;var r,i;return(0,Ft.A)({},t.typography.button,{minHeight:36,transition:t.transitions.create(["background-color","box-shadow","border-color"],{duration:t.transitions.duration.short}),borderRadius:"50%",padding:0,minWidth:0,width:56,height:56,zIndex:(t.vars||t).zIndex.fab,boxShadow:(t.vars||t).shadows[6],"&:active":{boxShadow:(t.vars||t).shadows[12]},color:t.vars?t.vars.palette.text.primary:null==(r=(i=t.palette).getContrastText)?void 0:r.call(i,t.palette.grey[300]),backgroundColor:(t.vars||t).palette.grey[300],"&:hover":{backgroundColor:(t.vars||t).palette.grey.A100,"@media (hover: none)":{backgroundColor:(t.vars||t).palette.grey[300]},textDecoration:"none"},["&.".concat(rv.focusVisible)]:{boxShadow:(t.vars||t).shadows[6]}},"small"===n.size&&{width:40,height:40},"medium"===n.size&&{width:48,height:48},"extended"===n.variant&&{borderRadius:24,padding:"0 16px",width:"auto",minHeight:"auto",minWidth:48,height:48},"extended"===n.variant&&"small"===n.size&&{width:"auto",padding:"0 8px",borderRadius:17,minWidth:34,height:34},"extended"===n.variant&&"medium"===n.size&&{width:"auto",padding:"0 16px",borderRadius:20,minWidth:40,height:40},"inherit"===n.color&&{color:"inherit"})},e=>{let{theme:t,ownerState:n}=e;return(0,Ft.A)({},"inherit"!==n.color&&"default"!==n.color&&null!=(t.vars||t).palette[n.color]&&{color:(t.vars||t).palette[n.color].contrastText,backgroundColor:(t.vars||t).palette[n.color].main,"&:hover":{backgroundColor:(t.vars||t).palette[n.color].dark,"@media (hover: none)":{backgroundColor:(t.vars||t).palette[n.color].main}}})},e=>{let{theme:t}=e;return{["&.".concat(rv.disabled)]:{color:(t.vars||t).palette.action.disabled,boxShadow:(t.vars||t).shadows[0],backgroundColor:(t.vars||t).palette.action.disabledBackground}}}),av=We.forwardRef(function(e,t){const n=(0,$t.b)({props:e,name:"MuiFab"}),{children:r,className:i,color:o="default",component:a="button",disabled:s=!1,disableFocusRipple:l=!1,focusVisibleClassName:c,size:d="large",variant:u="circular"}=n,p=(0,nn.A)(n,iv),h=(0,Ft.A)({},n,{color:o,component:a,disabled:s,disableFocusRipple:l,size:d,variant:u}),m=(e=>{const{color:t,variant:n,classes:r,size:i}=e,o={root:["root",n,"size".concat((0,pp.A)(i)),"inherit"===t?"colorInherit":t]},a=(0,ir.A)(o,nv,r);return(0,Ft.A)({},r,a)})(h);return(0,qt.jsx)(ov,(0,Ft.A)({className:(0,nr.A)(m.root,i),component:a,disabled:s,focusRipple:!l,focusVisibleClassName:(0,nr.A)(m.focusVisible,c),ownerState:h,ref:t},p,{classes:m,children:r}))}),sv=av,lv=(0,We.createContext)();const cv=n.p+"static/media/logo_blue_hr.2014dcec22d3379a30014da6ba84b69e.svg";const dv=n.p+"static/media/logo_icon.172254f5e27af4f50019a7580aba5efd.svg";var uv=n(85473),pv=n(21337);const hv=["className"],mv=(0,Vn.Ay)("div",{name:"MuiListItemIcon",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,"flex-start"===n.alignItems&&t.alignItemsFlexStart]}})(e=>{let{theme:t,ownerState:n}=e;return(0,Ft.A)({minWidth:56,color:(t.vars||t).palette.action.active,flexShrink:0,display:"inline-flex"},"flex-start"===n.alignItems&&{marginTop:8})}),fv=We.forwardRef(function(e,t){const n=(0,$t.b)({props:e,name:"MuiListItemIcon"}),{className:r}=n,i=(0,nn.A)(n,hv),o=We.useContext(Lh),a=(0,Ft.A)({},n,{alignItems:o.alignItems}),s=(e=>{const{alignItems:t,classes:n}=e,r={root:["root","flex-start"===t&&"alignItemsFlexStart"]};return(0,ir.A)(r,of,n)})(a);return(0,qt.jsx)(mv,(0,Ft.A)({className:(0,nr.A)(s.root,r),ownerState:a,ref:t},i))}),gv=fv;var vv=n(92374);function xv(e){if(null==e)return window;if("[object Window]"!==e.toString()){var t=e.ownerDocument;return t&&t.defaultView||window}return e}function yv(e){return e instanceof xv(e).Element||e instanceof Element}function bv(e){return e instanceof xv(e).HTMLElement||e instanceof HTMLElement}function jv(e){return"undefined"!==typeof ShadowRoot&&(e instanceof xv(e).ShadowRoot||e instanceof ShadowRoot)}var _v=Math.max,Cv=Math.min,wv=Math.round;function Sv(){var e=navigator.userAgentData;return null!=e&&e.brands&&Array.isArray(e.brands)?e.brands.map(function(e){return e.brand+"/"+e.version}).join(" "):navigator.userAgent}function Av(){return!/^((?!chrome|android).)*safari/i.test(Sv())}function kv(e,t,n){void 0===t&&(t=!1),void 0===n&&(n=!1);var r=e.getBoundingClientRect(),i=1,o=1;t&&bv(e)&&(i=e.offsetWidth>0&&wv(r.width)/e.offsetWidth||1,o=e.offsetHeight>0&&wv(r.height)/e.offsetHeight||1);var a=(yv(e)?xv(e):window).visualViewport,s=!Av()&&n,l=(r.left+(s&&a?a.offsetLeft:0))/i,c=(r.top+(s&&a?a.offsetTop:0))/o,d=r.width/i,u=r.height/o;return{width:d,height:u,top:c,right:l+d,bottom:c+u,left:l,x:l,y:c}}function Tv(e){var t=xv(e);return{scrollLeft:t.pageXOffset,scrollTop:t.pageYOffset}}function Ev(e){return e?(e.nodeName||"").toLowerCase():null}function Mv(e){return((yv(e)?e.ownerDocument:e.document)||window.document).documentElement}function Ov(e){return kv(Mv(e)).left+Tv(e).scrollLeft}function Rv(e){return xv(e).getComputedStyle(e)}function Pv(e){var t=Rv(e),n=t.overflow,r=t.overflowX,i=t.overflowY;return/auto|scroll|overlay|hidden/.test(n+i+r)}function Dv(e,t,n){void 0===n&&(n=!1);var r=bv(t),i=bv(t)&&function(e){var t=e.getBoundingClientRect(),n=wv(t.width)/e.offsetWidth||1,r=wv(t.height)/e.offsetHeight||1;return 1!==n||1!==r}(t),o=Mv(t),a=kv(e,i,n),s={scrollLeft:0,scrollTop:0},l={x:0,y:0};return(r||!r&&!n)&&(("body"!==Ev(t)||Pv(o))&&(s=function(e){return e!==xv(e)&&bv(e)?{scrollLeft:(t=e).scrollLeft,scrollTop:t.scrollTop}:Tv(e);var t}(t)),bv(t)?((l=kv(t,!0)).x+=t.clientLeft,l.y+=t.clientTop):o&&(l.x=Ov(o))),{x:a.left+s.scrollLeft-l.x,y:a.top+s.scrollTop-l.y,width:a.width,height:a.height}}function Nv(e){var t=kv(e),n=e.offsetWidth,r=e.offsetHeight;return Math.abs(t.width-n)<=1&&(n=t.width),Math.abs(t.height-r)<=1&&(r=t.height),{x:e.offsetLeft,y:e.offsetTop,width:n,height:r}}function Lv(e){return"html"===Ev(e)?e:e.assignedSlot||e.parentNode||(jv(e)?e.host:null)||Mv(e)}function Iv(e){return["html","body","#document"].indexOf(Ev(e))>=0?e.ownerDocument.body:bv(e)&&Pv(e)?e:Iv(Lv(e))}function Fv(e,t){var n;void 0===t&&(t=[]);var r=Iv(e),i=r===(null==(n=e.ownerDocument)?void 0:n.body),o=xv(r),a=i?[o].concat(o.visualViewport||[],Pv(r)?r:[]):r,s=t.concat(a);return i?s:s.concat(Fv(Lv(a)))}function $v(e){return["table","td","th"].indexOf(Ev(e))>=0}function Bv(e){return bv(e)&&"fixed"!==Rv(e).position?e.offsetParent:null}function zv(e){for(var t=xv(e),n=Bv(e);n&&$v(n)&&"static"===Rv(n).position;)n=Bv(n);return n&&("html"===Ev(n)||"body"===Ev(n)&&"static"===Rv(n).position)?t:n||function(e){var t=/firefox/i.test(Sv());if(/Trident/i.test(Sv())&&bv(e)&&"fixed"===Rv(e).position)return null;var n=Lv(e);for(jv(n)&&(n=n.host);bv(n)&&["html","body"].indexOf(Ev(n))<0;){var r=Rv(n);if("none"!==r.transform||"none"!==r.perspective||"paint"===r.contain||-1!==["transform","perspective"].indexOf(r.willChange)||t&&"filter"===r.willChange||t&&r.filter&&"none"!==r.filter)return n;n=n.parentNode}return null}(e)||t}var Hv="top",Wv="bottom",Uv="right",Vv="left",Gv="auto",qv=[Hv,Wv,Uv,Vv],Yv="start",Zv="end",Kv="viewport",Xv="popper",Qv=qv.reduce(function(e,t){return e.concat([t+"-"+Yv,t+"-"+Zv])},[]),Jv=[].concat(qv,[Gv]).reduce(function(e,t){return e.concat([t,t+"-"+Yv,t+"-"+Zv])},[]),ex=["beforeRead","read","afterRead","beforeMain","main","afterMain","beforeWrite","write","afterWrite"];function tx(e){var t=new Map,n=new Set,r=[];function i(e){n.add(e.name),[].concat(e.requires||[],e.requiresIfExists||[]).forEach(function(e){if(!n.has(e)){var r=t.get(e);r&&i(r)}}),r.push(e)}return e.forEach(function(e){t.set(e.name,e)}),e.forEach(function(e){n.has(e.name)||i(e)}),r}function nx(e){var t;return function(){return t||(t=new Promise(function(n){Promise.resolve().then(function(){t=void 0,n(e())})})),t}}var rx={placement:"bottom",modifiers:[],strategy:"absolute"};function ix(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return!t.some(function(e){return!(e&&"function"===typeof e.getBoundingClientRect)})}function ox(e){void 0===e&&(e={});var t=e,n=t.defaultModifiers,r=void 0===n?[]:n,i=t.defaultOptions,o=void 0===i?rx:i;return function(e,t,n){void 0===n&&(n=o);var i={placement:"bottom",orderedModifiers:[],options:Object.assign({},rx,o),modifiersData:{},elements:{reference:e,popper:t},attributes:{},styles:{}},a=[],s=!1,l={state:i,setOptions:function(n){var s="function"===typeof n?n(i.options):n;c(),i.options=Object.assign({},o,i.options,s),i.scrollParents={reference:yv(e)?Fv(e):e.contextElement?Fv(e.contextElement):[],popper:Fv(t)};var d=function(e){var t=tx(e);return ex.reduce(function(e,n){return e.concat(t.filter(function(e){return e.phase===n}))},[])}(function(e){var t=e.reduce(function(e,t){var n=e[t.name];return e[t.name]=n?Object.assign({},n,t,{options:Object.assign({},n.options,t.options),data:Object.assign({},n.data,t.data)}):t,e},{});return Object.keys(t).map(function(e){return t[e]})}([].concat(r,i.options.modifiers)));return i.orderedModifiers=d.filter(function(e){return e.enabled}),i.orderedModifiers.forEach(function(e){var t=e.name,n=e.options,r=void 0===n?{}:n,o=e.effect;if("function"===typeof o){var s=o({state:i,name:t,instance:l,options:r}),c=function(){};a.push(s||c)}}),l.update()},forceUpdate:function(){if(!s){var e=i.elements,t=e.reference,n=e.popper;if(ix(t,n)){i.rects={reference:Dv(t,zv(n),"fixed"===i.options.strategy),popper:Nv(n)},i.reset=!1,i.placement=i.options.placement,i.orderedModifiers.forEach(function(e){return i.modifiersData[e.name]=Object.assign({},e.data)});for(var r=0;r<i.orderedModifiers.length;r++)if(!0!==i.reset){var o=i.orderedModifiers[r],a=o.fn,c=o.options,d=void 0===c?{}:c,u=o.name;"function"===typeof a&&(i=a({state:i,options:d,name:u,instance:l})||i)}else i.reset=!1,r=-1}}},update:nx(function(){return new Promise(function(e){l.forceUpdate(),e(i)})}),destroy:function(){c(),s=!0}};if(!ix(e,t))return l;function c(){a.forEach(function(e){return e()}),a=[]}return l.setOptions(n).then(function(e){!s&&n.onFirstUpdate&&n.onFirstUpdate(e)}),l}}var ax={passive:!0};const sx={name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:function(e){var t=e.state,n=e.instance,r=e.options,i=r.scroll,o=void 0===i||i,a=r.resize,s=void 0===a||a,l=xv(t.elements.popper),c=[].concat(t.scrollParents.reference,t.scrollParents.popper);return o&&c.forEach(function(e){e.addEventListener("scroll",n.update,ax)}),s&&l.addEventListener("resize",n.update,ax),function(){o&&c.forEach(function(e){e.removeEventListener("scroll",n.update,ax)}),s&&l.removeEventListener("resize",n.update,ax)}},data:{}};function lx(e){return e.split("-")[0]}function cx(e){return e.split("-")[1]}function dx(e){return["top","bottom"].indexOf(e)>=0?"x":"y"}function ux(e){var t,n=e.reference,r=e.element,i=e.placement,o=i?lx(i):null,a=i?cx(i):null,s=n.x+n.width/2-r.width/2,l=n.y+n.height/2-r.height/2;switch(o){case Hv:t={x:s,y:n.y-r.height};break;case Wv:t={x:s,y:n.y+n.height};break;case Uv:t={x:n.x+n.width,y:l};break;case Vv:t={x:n.x-r.width,y:l};break;default:t={x:n.x,y:n.y}}var c=o?dx(o):null;if(null!=c){var d="y"===c?"height":"width";switch(a){case Yv:t[c]=t[c]-(n[d]/2-r[d]/2);break;case Zv:t[c]=t[c]+(n[d]/2-r[d]/2)}}return t}var px={top:"auto",right:"auto",bottom:"auto",left:"auto"};function hx(e){var t,n=e.popper,r=e.popperRect,i=e.placement,o=e.variation,a=e.offsets,s=e.position,l=e.gpuAcceleration,c=e.adaptive,d=e.roundOffsets,u=e.isFixed,p=a.x,h=void 0===p?0:p,m=a.y,f=void 0===m?0:m,g="function"===typeof d?d({x:h,y:f}):{x:h,y:f};h=g.x,f=g.y;var v=a.hasOwnProperty("x"),x=a.hasOwnProperty("y"),y=Vv,b=Hv,j=window;if(c){var _=zv(n),C="clientHeight",w="clientWidth";if(_===xv(n)&&"static"!==Rv(_=Mv(n)).position&&"absolute"===s&&(C="scrollHeight",w="scrollWidth"),i===Hv||(i===Vv||i===Uv)&&o===Zv)b=Wv,f-=(u&&_===j&&j.visualViewport?j.visualViewport.height:_[C])-r.height,f*=l?1:-1;if(i===Vv||(i===Hv||i===Wv)&&o===Zv)y=Uv,h-=(u&&_===j&&j.visualViewport?j.visualViewport.width:_[w])-r.width,h*=l?1:-1}var S,A=Object.assign({position:s},c&&px),k=!0===d?function(e,t){var n=e.x,r=e.y,i=t.devicePixelRatio||1;return{x:wv(n*i)/i||0,y:wv(r*i)/i||0}}({x:h,y:f},xv(n)):{x:h,y:f};return h=k.x,f=k.y,l?Object.assign({},A,((S={})[b]=x?"0":"",S[y]=v?"0":"",S.transform=(j.devicePixelRatio||1)<=1?"translate("+h+"px, "+f+"px)":"translate3d("+h+"px, "+f+"px, 0)",S)):Object.assign({},A,((t={})[b]=x?f+"px":"",t[y]=v?h+"px":"",t.transform="",t))}const mx={name:"applyStyles",enabled:!0,phase:"write",fn:function(e){var t=e.state;Object.keys(t.elements).forEach(function(e){var n=t.styles[e]||{},r=t.attributes[e]||{},i=t.elements[e];bv(i)&&Ev(i)&&(Object.assign(i.style,n),Object.keys(r).forEach(function(e){var t=r[e];!1===t?i.removeAttribute(e):i.setAttribute(e,!0===t?"":t)}))})},effect:function(e){var t=e.state,n={popper:{position:t.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(t.elements.popper.style,n.popper),t.styles=n,t.elements.arrow&&Object.assign(t.elements.arrow.style,n.arrow),function(){Object.keys(t.elements).forEach(function(e){var r=t.elements[e],i=t.attributes[e]||{},o=Object.keys(t.styles.hasOwnProperty(e)?t.styles[e]:n[e]).reduce(function(e,t){return e[t]="",e},{});bv(r)&&Ev(r)&&(Object.assign(r.style,o),Object.keys(i).forEach(function(e){r.removeAttribute(e)}))})}},requires:["computeStyles"]};const fx={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:function(e){var t=e.state,n=e.options,r=e.name,i=n.offset,o=void 0===i?[0,0]:i,a=Jv.reduce(function(e,n){return e[n]=function(e,t,n){var r=lx(e),i=[Vv,Hv].indexOf(r)>=0?-1:1,o="function"===typeof n?n(Object.assign({},t,{placement:e})):n,a=o[0],s=o[1];return a=a||0,s=(s||0)*i,[Vv,Uv].indexOf(r)>=0?{x:s,y:a}:{x:a,y:s}}(n,t.rects,o),e},{}),s=a[t.placement],l=s.x,c=s.y;null!=t.modifiersData.popperOffsets&&(t.modifiersData.popperOffsets.x+=l,t.modifiersData.popperOffsets.y+=c),t.modifiersData[r]=a}};var gx={left:"right",right:"left",bottom:"top",top:"bottom"};function vx(e){return e.replace(/left|right|bottom|top/g,function(e){return gx[e]})}var xx={start:"end",end:"start"};function yx(e){return e.replace(/start|end/g,function(e){return xx[e]})}function bx(e,t){var n=t.getRootNode&&t.getRootNode();if(e.contains(t))return!0;if(n&&jv(n)){var r=t;do{if(r&&e.isSameNode(r))return!0;r=r.parentNode||r.host}while(r)}return!1}function jx(e){return Object.assign({},e,{left:e.x,top:e.y,right:e.x+e.width,bottom:e.y+e.height})}function _x(e,t,n){return t===Kv?jx(function(e,t){var n=xv(e),r=Mv(e),i=n.visualViewport,o=r.clientWidth,a=r.clientHeight,s=0,l=0;if(i){o=i.width,a=i.height;var c=Av();(c||!c&&"fixed"===t)&&(s=i.offsetLeft,l=i.offsetTop)}return{width:o,height:a,x:s+Ov(e),y:l}}(e,n)):yv(t)?function(e,t){var n=kv(e,!1,"fixed"===t);return n.top=n.top+e.clientTop,n.left=n.left+e.clientLeft,n.bottom=n.top+e.clientHeight,n.right=n.left+e.clientWidth,n.width=e.clientWidth,n.height=e.clientHeight,n.x=n.left,n.y=n.top,n}(t,n):jx(function(e){var t,n=Mv(e),r=Tv(e),i=null==(t=e.ownerDocument)?void 0:t.body,o=_v(n.scrollWidth,n.clientWidth,i?i.scrollWidth:0,i?i.clientWidth:0),a=_v(n.scrollHeight,n.clientHeight,i?i.scrollHeight:0,i?i.clientHeight:0),s=-r.scrollLeft+Ov(e),l=-r.scrollTop;return"rtl"===Rv(i||n).direction&&(s+=_v(n.clientWidth,i?i.clientWidth:0)-o),{width:o,height:a,x:s,y:l}}(Mv(e)))}function Cx(e,t,n,r){var i="clippingParents"===t?function(e){var t=Fv(Lv(e)),n=["absolute","fixed"].indexOf(Rv(e).position)>=0&&bv(e)?zv(e):e;return yv(n)?t.filter(function(e){return yv(e)&&bx(e,n)&&"body"!==Ev(e)}):[]}(e):[].concat(t),o=[].concat(i,[n]),a=o[0],s=o.reduce(function(t,n){var i=_x(e,n,r);return t.top=_v(i.top,t.top),t.right=Cv(i.right,t.right),t.bottom=Cv(i.bottom,t.bottom),t.left=_v(i.left,t.left),t},_x(e,a,r));return s.width=s.right-s.left,s.height=s.bottom-s.top,s.x=s.left,s.y=s.top,s}function wx(e){return Object.assign({},{top:0,right:0,bottom:0,left:0},e)}function Sx(e,t){return t.reduce(function(t,n){return t[n]=e,t},{})}function Ax(e,t){void 0===t&&(t={});var n=t,r=n.placement,i=void 0===r?e.placement:r,o=n.strategy,a=void 0===o?e.strategy:o,s=n.boundary,l=void 0===s?"clippingParents":s,c=n.rootBoundary,d=void 0===c?Kv:c,u=n.elementContext,p=void 0===u?Xv:u,h=n.altBoundary,m=void 0!==h&&h,f=n.padding,g=void 0===f?0:f,v=wx("number"!==typeof g?g:Sx(g,qv)),x=p===Xv?"reference":Xv,y=e.rects.popper,b=e.elements[m?x:p],j=Cx(yv(b)?b:b.contextElement||Mv(e.elements.popper),l,d,a),_=kv(e.elements.reference),C=ux({reference:_,element:y,strategy:"absolute",placement:i}),w=jx(Object.assign({},y,C)),S=p===Xv?w:_,A={top:j.top-S.top+v.top,bottom:S.bottom-j.bottom+v.bottom,left:j.left-S.left+v.left,right:S.right-j.right+v.right},k=e.modifiersData.offset;if(p===Xv&&k){var T=k[i];Object.keys(A).forEach(function(e){var t=[Uv,Wv].indexOf(e)>=0?1:-1,n=[Hv,Wv].indexOf(e)>=0?"y":"x";A[e]+=T[n]*t})}return A}const kx={name:"flip",enabled:!0,phase:"main",fn:function(e){var t=e.state,n=e.options,r=e.name;if(!t.modifiersData[r]._skip){for(var i=n.mainAxis,o=void 0===i||i,a=n.altAxis,s=void 0===a||a,l=n.fallbackPlacements,c=n.padding,d=n.boundary,u=n.rootBoundary,p=n.altBoundary,h=n.flipVariations,m=void 0===h||h,f=n.allowedAutoPlacements,g=t.options.placement,v=lx(g),x=l||(v===g||!m?[vx(g)]:function(e){if(lx(e)===Gv)return[];var t=vx(e);return[yx(e),t,yx(t)]}(g)),y=[g].concat(x).reduce(function(e,n){return e.concat(lx(n)===Gv?function(e,t){void 0===t&&(t={});var n=t,r=n.placement,i=n.boundary,o=n.rootBoundary,a=n.padding,s=n.flipVariations,l=n.allowedAutoPlacements,c=void 0===l?Jv:l,d=cx(r),u=d?s?Qv:Qv.filter(function(e){return cx(e)===d}):qv,p=u.filter(function(e){return c.indexOf(e)>=0});0===p.length&&(p=u);var h=p.reduce(function(t,n){return t[n]=Ax(e,{placement:n,boundary:i,rootBoundary:o,padding:a})[lx(n)],t},{});return Object.keys(h).sort(function(e,t){return h[e]-h[t]})}(t,{placement:n,boundary:d,rootBoundary:u,padding:c,flipVariations:m,allowedAutoPlacements:f}):n)},[]),b=t.rects.reference,j=t.rects.popper,_=new Map,C=!0,w=y[0],S=0;S<y.length;S++){var A=y[S],k=lx(A),T=cx(A)===Yv,E=[Hv,Wv].indexOf(k)>=0,M=E?"width":"height",O=Ax(t,{placement:A,boundary:d,rootBoundary:u,altBoundary:p,padding:c}),R=E?T?Uv:Vv:T?Wv:Hv;b[M]>j[M]&&(R=vx(R));var P=vx(R),D=[];if(o&&D.push(O[k]<=0),s&&D.push(O[R]<=0,O[P]<=0),D.every(function(e){return e})){w=A,C=!1;break}_.set(A,D)}if(C)for(var N=function(e){var t=y.find(function(t){var n=_.get(t);if(n)return n.slice(0,e).every(function(e){return e})});if(t)return w=t,"break"},L=m?3:1;L>0;L--){if("break"===N(L))break}t.placement!==w&&(t.modifiersData[r]._skip=!0,t.placement=w,t.reset=!0)}},requiresIfExists:["offset"],data:{_skip:!1}};function Tx(e,t,n){return _v(e,Cv(t,n))}const Ex={name:"preventOverflow",enabled:!0,phase:"main",fn:function(e){var t=e.state,n=e.options,r=e.name,i=n.mainAxis,o=void 0===i||i,a=n.altAxis,s=void 0!==a&&a,l=n.boundary,c=n.rootBoundary,d=n.altBoundary,u=n.padding,p=n.tether,h=void 0===p||p,m=n.tetherOffset,f=void 0===m?0:m,g=Ax(t,{boundary:l,rootBoundary:c,padding:u,altBoundary:d}),v=lx(t.placement),x=cx(t.placement),y=!x,b=dx(v),j="x"===b?"y":"x",_=t.modifiersData.popperOffsets,C=t.rects.reference,w=t.rects.popper,S="function"===typeof f?f(Object.assign({},t.rects,{placement:t.placement})):f,A="number"===typeof S?{mainAxis:S,altAxis:S}:Object.assign({mainAxis:0,altAxis:0},S),k=t.modifiersData.offset?t.modifiersData.offset[t.placement]:null,T={x:0,y:0};if(_){if(o){var E,M="y"===b?Hv:Vv,O="y"===b?Wv:Uv,R="y"===b?"height":"width",P=_[b],D=P+g[M],N=P-g[O],L=h?-w[R]/2:0,I=x===Yv?C[R]:w[R],F=x===Yv?-w[R]:-C[R],$=t.elements.arrow,B=h&&$?Nv($):{width:0,height:0},z=t.modifiersData["arrow#persistent"]?t.modifiersData["arrow#persistent"].padding:{top:0,right:0,bottom:0,left:0},H=z[M],W=z[O],U=Tx(0,C[R],B[R]),V=y?C[R]/2-L-U-H-A.mainAxis:I-U-H-A.mainAxis,G=y?-C[R]/2+L+U+W+A.mainAxis:F+U+W+A.mainAxis,q=t.elements.arrow&&zv(t.elements.arrow),Y=q?"y"===b?q.clientTop||0:q.clientLeft||0:0,Z=null!=(E=null==k?void 0:k[b])?E:0,K=P+G-Z,X=Tx(h?Cv(D,P+V-Z-Y):D,P,h?_v(N,K):N);_[b]=X,T[b]=X-P}if(s){var Q,J="x"===b?Hv:Vv,ee="x"===b?Wv:Uv,te=_[j],ne="y"===j?"height":"width",re=te+g[J],ie=te-g[ee],oe=-1!==[Hv,Vv].indexOf(v),ae=null!=(Q=null==k?void 0:k[j])?Q:0,se=oe?re:te-C[ne]-w[ne]-ae+A.altAxis,le=oe?te+C[ne]+w[ne]-ae-A.altAxis:ie,ce=h&&oe?function(e,t,n){var r=Tx(e,t,n);return r>n?n:r}(se,te,le):Tx(h?se:re,te,h?le:ie);_[j]=ce,T[j]=ce-te}t.modifiersData[r]=T}},requiresIfExists:["offset"]};const Mx={name:"arrow",enabled:!0,phase:"main",fn:function(e){var t,n=e.state,r=e.name,i=e.options,o=n.elements.arrow,a=n.modifiersData.popperOffsets,s=lx(n.placement),l=dx(s),c=[Vv,Uv].indexOf(s)>=0?"height":"width";if(o&&a){var d=function(e,t){return wx("number"!==typeof(e="function"===typeof e?e(Object.assign({},t.rects,{placement:t.placement})):e)?e:Sx(e,qv))}(i.padding,n),u=Nv(o),p="y"===l?Hv:Vv,h="y"===l?Wv:Uv,m=n.rects.reference[c]+n.rects.reference[l]-a[l]-n.rects.popper[c],f=a[l]-n.rects.reference[l],g=zv(o),v=g?"y"===l?g.clientHeight||0:g.clientWidth||0:0,x=m/2-f/2,y=d[p],b=v-u[c]-d[h],j=v/2-u[c]/2+x,_=Tx(y,j,b),C=l;n.modifiersData[r]=((t={})[C]=_,t.centerOffset=_-j,t)}},effect:function(e){var t=e.state,n=e.options.element,r=void 0===n?"[data-popper-arrow]":n;null!=r&&("string"!==typeof r||(r=t.elements.popper.querySelector(r)))&&bx(t.elements.popper,r)&&(t.elements.arrow=r)},requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};function Ox(e,t,n){return void 0===n&&(n={x:0,y:0}),{top:e.top-t.height-n.y,right:e.right-t.width+n.x,bottom:e.bottom-t.height+n.y,left:e.left-t.width-n.x}}function Rx(e){return[Hv,Uv,Wv,Vv].some(function(t){return e[t]>=0})}var Px=ox({defaultModifiers:[sx,{name:"popperOffsets",enabled:!0,phase:"read",fn:function(e){var t=e.state,n=e.name;t.modifiersData[n]=ux({reference:t.rects.reference,element:t.rects.popper,strategy:"absolute",placement:t.placement})},data:{}},{name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:function(e){var t=e.state,n=e.options,r=n.gpuAcceleration,i=void 0===r||r,o=n.adaptive,a=void 0===o||o,s=n.roundOffsets,l=void 0===s||s,c={placement:lx(t.placement),variation:cx(t.placement),popper:t.elements.popper,popperRect:t.rects.popper,gpuAcceleration:i,isFixed:"fixed"===t.options.strategy};null!=t.modifiersData.popperOffsets&&(t.styles.popper=Object.assign({},t.styles.popper,hx(Object.assign({},c,{offsets:t.modifiersData.popperOffsets,position:t.options.strategy,adaptive:a,roundOffsets:l})))),null!=t.modifiersData.arrow&&(t.styles.arrow=Object.assign({},t.styles.arrow,hx(Object.assign({},c,{offsets:t.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:l})))),t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-placement":t.placement})},data:{}},mx,fx,kx,Ex,Mx,{name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:function(e){var t=e.state,n=e.name,r=t.rects.reference,i=t.rects.popper,o=t.modifiersData.preventOverflow,a=Ax(t,{elementContext:"reference"}),s=Ax(t,{altBoundary:!0}),l=Ox(a,r),c=Ox(s,i,o),d=Rx(l),u=Rx(c);t.modifiersData[n]={referenceClippingOffsets:l,popperEscapeOffsets:c,isReferenceHidden:d,hasPopperEscaped:u},t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-reference-hidden":d,"data-popper-escaped":u})}}]});function Dx(e){return(0,sr.Ay)("MuiPopper",e)}(0,ar.A)("MuiPopper",["root"]);const Nx=["anchorEl","children","direction","disablePortal","modifiers","open","placement","popperOptions","popperRef","slotProps","slots","TransitionProps","ownerState"],Lx=["anchorEl","children","container","direction","disablePortal","keepMounted","modifiers","open","placement","popperOptions","popperRef","style","transition","slotProps","slots"];function Ix(e){return"function"===typeof e?e():e}function Fx(e){return void 0!==e.nodeType}const $x={},Bx=We.forwardRef(function(e,t){var n;const{anchorEl:r,children:i,direction:o,disablePortal:a,modifiers:s,open:l,placement:c,popperOptions:d,popperRef:u,slotProps:p={},slots:h={},TransitionProps:m}=e,f=(0,nn.A)(e,Nx),g=We.useRef(null),v=(0,gr.A)(g,t),x=We.useRef(null),y=(0,gr.A)(x,u),b=We.useRef(y);(0,hn.A)(()=>{b.current=y},[y]),We.useImperativeHandle(u,()=>x.current,[]);const j=function(e,t){if("ltr"===t)return e;switch(e){case"bottom-end":return"bottom-start";case"bottom-start":return"bottom-end";case"top-end":return"top-start";case"top-start":return"top-end";default:return e}}(c,o),[_,C]=We.useState(j),[w,S]=We.useState(Ix(r));We.useEffect(()=>{x.current&&x.current.forceUpdate()}),We.useEffect(()=>{r&&S(Ix(r))},[r]),(0,hn.A)(()=>{if(!w||!l)return;let e=[{name:"preventOverflow",options:{altBoundary:a}},{name:"flip",options:{altBoundary:a}},{name:"onUpdate",enabled:!0,phase:"afterWrite",fn:e=>{let{state:t}=e;(e=>{C(e.placement)})(t)}}];null!=s&&(e=e.concat(s)),d&&null!=d.modifiers&&(e=e.concat(d.modifiers));const t=Px(w,g.current,(0,Ft.A)({placement:j},d,{modifiers:e}));return b.current(t),()=>{t.destroy(),b.current(null)}},[w,a,s,l,d,j]);const A={placement:_};null!==m&&(A.TransitionProps=m);const k=(e=>{const{classes:t}=e;return(0,ir.A)({root:["root"]},Dx,t)})(e),T=null!=(n=h.root)?n:"div",E=Dh({elementType:T,externalSlotProps:p.root,externalForwardedProps:f,additionalProps:{role:"tooltip",ref:v},ownerState:e,className:k.root});return(0,qt.jsx)(T,(0,Ft.A)({},E,{children:"function"===typeof i?i(A):i}))}),zx=We.forwardRef(function(e,t){const{anchorEl:n,children:r,container:i,direction:o="ltr",disablePortal:a=!1,keepMounted:s=!1,modifiers:l,open:c,placement:d="bottom",popperOptions:u=$x,popperRef:p,style:h,transition:m=!1,slotProps:f={},slots:g={}}=e,v=(0,nn.A)(e,Lx),[x,y]=We.useState(!0);if(!s&&!c&&(!m||x))return null;let b;if(i)b=i;else if(n){const e=Ix(n);b=e&&Fx(e)?(0,xr.A)(e).body:(0,xr.A)(null).body}const j=c||!s||m&&!x?void 0:"none",_=m?{in:c,onEnter:()=>{y(!1)},onExited:()=>{y(!0)}}:void 0;return(0,qt.jsx)(cm,{disablePortal:a,container:b,children:(0,qt.jsx)(Bx,(0,Ft.A)({anchorEl:n,direction:o,disablePortal:a,modifiers:l,ref:t,open:m?!x:c,placement:d,popperOptions:u,popperRef:p,slotProps:f,slots:g},v,{style:(0,Ft.A)({position:"fixed",top:0,left:0,display:j},h),TransitionProps:_,children:r}))})}),Hx=zx,Wx=["anchorEl","component","components","componentsProps","container","disablePortal","keepMounted","modifiers","open","placement","popperOptions","popperRef","transition","slots","slotProps"],Ux=(0,Vn.Ay)(Hx,{name:"MuiPopper",slot:"Root",overridesResolver:(e,t)=>t.root})({}),Vx=We.forwardRef(function(e,t){var n;const r=(0,vv.A)(),i=(0,$t.b)({props:e,name:"MuiPopper"}),{anchorEl:o,component:a,components:s,componentsProps:l,container:c,disablePortal:d,keepMounted:u,modifiers:p,open:h,placement:m,popperOptions:f,popperRef:g,transition:v,slots:x,slotProps:y}=i,b=(0,nn.A)(i,Wx),j=null!=(n=null==x?void 0:x.root)?n:null==s?void 0:s.Root,_=(0,Ft.A)({anchorEl:o,container:c,disablePortal:d,keepMounted:u,modifiers:p,open:h,placement:m,popperOptions:f,popperRef:g,transition:v},b);return(0,qt.jsx)(Ux,(0,Ft.A)({as:a,direction:null==r?void 0:r.direction,slots:{root:j},slotProps:null!=y?y:l},_,{ref:t}))}),Gx=Vx;var qx=n(45879),Yx=n(54516);function Zx(e){return(0,sr.Ay)("MuiTooltip",e)}const Kx=(0,ar.A)("MuiTooltip",["popper","popperInteractive","popperArrow","popperClose","tooltip","tooltipArrow","touch","tooltipPlacementLeft","tooltipPlacementRight","tooltipPlacementTop","tooltipPlacementBottom","arrow"]),Xx=["arrow","children","classes","components","componentsProps","describeChild","disableFocusListener","disableHoverListener","disableInteractive","disableTouchListener","enterDelay","enterNextDelay","enterTouchDelay","followCursor","id","leaveDelay","leaveTouchDelay","onClose","onOpen","open","placement","PopperComponent","PopperProps","slotProps","slots","title","TransitionComponent","TransitionProps"];function Qx(e){return Math.round(1e5*e)/1e5}const Jx=(0,Vn.Ay)(Gx,{name:"MuiTooltip",slot:"Popper",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.popper,!n.disableInteractive&&t.popperInteractive,n.arrow&&t.popperArrow,!n.open&&t.popperClose]}})(e=>{let{theme:t,ownerState:n,open:r}=e;return(0,Ft.A)({zIndex:(t.vars||t).zIndex.tooltip,pointerEvents:"none"},!n.disableInteractive&&{pointerEvents:"auto"},!r&&{pointerEvents:"none"},n.arrow&&{['&[data-popper-placement*="bottom"] .'.concat(Kx.arrow)]:{top:0,marginTop:"-0.71em","&::before":{transformOrigin:"0 100%"}},['&[data-popper-placement*="top"] .'.concat(Kx.arrow)]:{bottom:0,marginBottom:"-0.71em","&::before":{transformOrigin:"100% 0"}},['&[data-popper-placement*="right"] .'.concat(Kx.arrow)]:(0,Ft.A)({},n.isRtl?{right:0,marginRight:"-0.71em"}:{left:0,marginLeft:"-0.71em"},{height:"1em",width:"0.71em","&::before":{transformOrigin:"100% 100%"}}),['&[data-popper-placement*="left"] .'.concat(Kx.arrow)]:(0,Ft.A)({},n.isRtl?{left:0,marginLeft:"-0.71em"}:{right:0,marginRight:"-0.71em"},{height:"1em",width:"0.71em","&::before":{transformOrigin:"0 0"}})})}),ey=(0,Vn.Ay)("div",{name:"MuiTooltip",slot:"Tooltip",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.tooltip,n.touch&&t.touch,n.arrow&&t.tooltipArrow,t["tooltipPlacement".concat((0,pp.A)(n.placement.split("-")[0]))]]}})(e=>{let{theme:t,ownerState:n}=e;return(0,Ft.A)({backgroundColor:t.vars?t.vars.palette.Tooltip.bg:(0,hp.X4)(t.palette.grey[700],.92),borderRadius:(t.vars||t).shape.borderRadius,color:(t.vars||t).palette.common.white,fontFamily:t.typography.fontFamily,padding:"4px 8px",fontSize:t.typography.pxToRem(11),maxWidth:300,margin:2,wordWrap:"break-word",fontWeight:t.typography.fontWeightMedium},n.arrow&&{position:"relative",margin:0},n.touch&&{padding:"8px 16px",fontSize:t.typography.pxToRem(14),lineHeight:"".concat(Qx(16/14),"em"),fontWeight:t.typography.fontWeightRegular},{[".".concat(Kx.popper,'[data-popper-placement*="left"] &')]:(0,Ft.A)({transformOrigin:"right center"},n.isRtl?(0,Ft.A)({marginLeft:"14px"},n.touch&&{marginLeft:"24px"}):(0,Ft.A)({marginRight:"14px"},n.touch&&{marginRight:"24px"})),[".".concat(Kx.popper,'[data-popper-placement*="right"] &')]:(0,Ft.A)({transformOrigin:"left center"},n.isRtl?(0,Ft.A)({marginRight:"14px"},n.touch&&{marginRight:"24px"}):(0,Ft.A)({marginLeft:"14px"},n.touch&&{marginLeft:"24px"})),[".".concat(Kx.popper,'[data-popper-placement*="top"] &')]:(0,Ft.A)({transformOrigin:"center bottom",marginBottom:"14px"},n.touch&&{marginBottom:"24px"}),[".".concat(Kx.popper,'[data-popper-placement*="bottom"] &')]:(0,Ft.A)({transformOrigin:"center top",marginTop:"14px"},n.touch&&{marginTop:"24px"})})}),ty=(0,Vn.Ay)("span",{name:"MuiTooltip",slot:"Arrow",overridesResolver:(e,t)=>t.arrow})(e=>{let{theme:t}=e;return{overflow:"hidden",position:"absolute",width:"1em",height:"0.71em",boxSizing:"border-box",color:t.vars?t.vars.palette.Tooltip.bg:(0,hp.X4)(t.palette.grey[700],.9),"&::before":{content:'""',margin:"auto",display:"block",width:"100%",height:"100%",backgroundColor:"currentColor",transform:"rotate(45deg)"}}});let ny=!1;const ry=new rr.E;let iy={x:0,y:0};function oy(e,t){return function(n){for(var r=arguments.length,i=new Array(r>1?r-1:0),o=1;o<r;o++)i[o-1]=arguments[o];t&&t(n,...i),e(n,...i)}}const ay=We.forwardRef(function(e,t){var n,r,i,o,a,s,l,c,d,u,p,h,m,f,g,v,x,y,b;const j=(0,$t.b)({props:e,name:"MuiTooltip"}),{arrow:_=!1,children:C,components:w={},componentsProps:S={},describeChild:A=!1,disableFocusListener:k=!1,disableHoverListener:T=!1,disableInteractive:E=!1,disableTouchListener:M=!1,enterDelay:O=100,enterNextDelay:R=0,enterTouchDelay:P=700,followCursor:D=!1,id:N,leaveDelay:L=0,leaveTouchDelay:I=1500,onClose:F,onOpen:$,open:B,placement:z="bottom",PopperComponent:H,PopperProps:W={},slotProps:U={},slots:V={},title:G,TransitionComponent:q=rm,TransitionProps:Y}=j,Z=(0,nn.A)(j,Xx),K=We.isValidElement(C)?C:(0,qt.jsx)("span",{children:C}),X=In(),Q=dn(),[J,ee]=We.useState(),[te,ne]=We.useState(null),re=We.useRef(!1),ie=E||D,oe=(0,rr.A)(),ae=(0,rr.A)(),se=(0,rr.A)(),le=(0,rr.A)(),[ce,de]=(0,Yx.A)({controlled:B,default:!1,name:"Tooltip",state:"open"});let ue=ce;const pe=(0,qx.A)(N),he=We.useRef(),me=(0,Tp.A)(()=>{void 0!==he.current&&(document.body.style.WebkitUserSelect=he.current,he.current=void 0),le.clear()});We.useEffect(()=>me,[me]);const fe=e=>{ry.clear(),ny=!0,de(!0),$&&!ue&&$(e)},ge=(0,Tp.A)(e=>{ry.start(800+L,()=>{ny=!1}),de(!1),F&&ue&&F(e),oe.start(X.transitions.duration.shortest,()=>{re.current=!1})}),ve=e=>{re.current&&"touchstart"!==e.type||(J&&J.removeAttribute("title"),ae.clear(),se.clear(),O||ny&&R?ae.start(ny?R:O,()=>{fe(e)}):fe(e))},xe=e=>{ae.clear(),se.start(L,()=>{ge(e)})},{isFocusVisibleRef:ye,onBlur:be,onFocus:je,ref:_e}=(0,Ep.A)(),[,Ce]=We.useState(!1),we=e=>{be(e),!1===ye.current&&(Ce(!1),xe(e))},Se=e=>{J||ee(e.currentTarget),je(e),!0===ye.current&&(Ce(!0),ve(e))},Ae=e=>{re.current=!0;const t=K.props;t.onTouchStart&&t.onTouchStart(e)},ke=e=>{Ae(e),se.clear(),oe.clear(),me(),he.current=document.body.style.WebkitUserSelect,document.body.style.WebkitUserSelect="none",le.start(P,()=>{document.body.style.WebkitUserSelect=he.current,ve(e)})},Te=e=>{K.props.onTouchEnd&&K.props.onTouchEnd(e),me(),se.start(I,()=>{ge(e)})};We.useEffect(()=>{if(ue)return document.addEventListener("keydown",e),()=>{document.removeEventListener("keydown",e)};function e(e){"Escape"!==e.key&&"Esc"!==e.key||ge(e)}},[ge,ue]);const Ee=(0,Ln.A)(Dn(K),_e,ee,t);G||0===G||(ue=!1);const Me=We.useRef(),Oe={},Re="string"===typeof G;A?(Oe.title=ue||!Re||T?null:G,Oe["aria-describedby"]=ue?pe:null):(Oe["aria-label"]=Re?G:null,Oe["aria-labelledby"]=ue&&!Re?pe:null);const Pe=(0,Ft.A)({},Oe,Z,K.props,{className:(0,nr.A)(Z.className,K.props.className),onTouchStart:Ae,ref:Ee},D?{onMouseMove:e=>{const t=K.props;t.onMouseMove&&t.onMouseMove(e),iy={x:e.clientX,y:e.clientY},Me.current&&Me.current.update()}}:{});const De={};M||(Pe.onTouchStart=ke,Pe.onTouchEnd=Te),T||(Pe.onMouseOver=oy(ve,Pe.onMouseOver),Pe.onMouseLeave=oy(xe,Pe.onMouseLeave),ie||(De.onMouseOver=ve,De.onMouseLeave=xe)),k||(Pe.onFocus=oy(Se,Pe.onFocus),Pe.onBlur=oy(we,Pe.onBlur),ie||(De.onFocus=Se,De.onBlur=we));const Ne=We.useMemo(()=>{var e;let t=[{name:"arrow",enabled:Boolean(te),options:{element:te,padding:4}}];return null!=(e=W.popperOptions)&&e.modifiers&&(t=t.concat(W.popperOptions.modifiers)),(0,Ft.A)({},W.popperOptions,{modifiers:t})},[te,W]),Le=(0,Ft.A)({},j,{isRtl:Q,arrow:_,disableInteractive:ie,placement:z,PopperComponentProp:H,touch:re.current}),Ie=(e=>{const{classes:t,disableInteractive:n,arrow:r,touch:i,placement:o}=e,a={popper:["popper",!n&&"popperInteractive",r&&"popperArrow"],tooltip:["tooltip",r&&"tooltipArrow",i&&"touch","tooltipPlacement".concat((0,pp.A)(o.split("-")[0]))],arrow:["arrow"]};return(0,ir.A)(a,Zx,t)})(Le),Fe=null!=(n=null!=(r=V.popper)?r:w.Popper)?n:Jx,$e=null!=(i=null!=(o=null!=(a=V.transition)?a:w.Transition)?o:q)?i:rm,Be=null!=(s=null!=(l=V.tooltip)?l:w.Tooltip)?s:ey,ze=null!=(c=null!=(d=V.arrow)?d:w.Arrow)?c:ty,He=Ah(Fe,(0,Ft.A)({},W,null!=(u=U.popper)?u:S.popper,{className:(0,nr.A)(Ie.popper,null==W?void 0:W.className,null==(p=null!=(h=U.popper)?h:S.popper)?void 0:p.className)}),Le),Ue=Ah($e,(0,Ft.A)({},Y,null!=(m=U.transition)?m:S.transition),Le),Ve=Ah(Be,(0,Ft.A)({},null!=(f=U.tooltip)?f:S.tooltip,{className:(0,nr.A)(Ie.tooltip,null==(g=null!=(v=U.tooltip)?v:S.tooltip)?void 0:g.className)}),Le),Ge=Ah(ze,(0,Ft.A)({},null!=(x=U.arrow)?x:S.arrow,{className:(0,nr.A)(Ie.arrow,null==(y=null!=(b=U.arrow)?b:S.arrow)?void 0:y.className)}),Le);return(0,qt.jsxs)(We.Fragment,{children:[We.cloneElement(K,Pe),(0,qt.jsx)(Fe,(0,Ft.A)({as:null!=H?H:Gx,placement:z,anchorEl:D?{getBoundingClientRect:()=>({top:iy.y,left:iy.x,right:iy.x,bottom:iy.y,width:0,height:0})}:J,popperRef:Me,open:!!J&&ue,id:pe,transition:!0},De,He,{popperOptions:Ne,children:e=>{let{TransitionProps:t}=e;return(0,qt.jsx)($e,(0,Ft.A)({timeout:X.transitions.duration.shorter},t,Ue,{children:(0,qt.jsxs)(Be,(0,Ft.A)({},Ve,{children:[G,_?(0,qt.jsx)(ze,(0,Ft.A)({},Ge,{ref:ne})):null]}))}))}}))]})}),sy=ay;let ly={id:""},cy=null;const dy=e=>{let{children:t,title:n,placement:r}=e;return!cy&&n?(0,qt.jsx)(sy,{title:n,placement:r,children:t}):t},uy=e=>{let{list:t,onOpen:n}=e;return(0,qt.jsx)(qt.Fragment,{children:null===t||void 0===t?void 0:t.map(e=>(0,qt.jsx)(py,{item:e,onOpen:n},null===e||void 0===e?void 0:e.id))})},py=e=>{var t,n;let{item:r,onOpen:i}=e;const o=(null===r||void 0===r?void 0:r.data)&&(null===r||void 0===r||null===(t=r.data)||void 0===t?void 0:t.length)>0;const a=(0,qt.jsx)(qt.Fragment,{children:o?(0,qt.jsx)(Ag,{disablePadding:!0,sx:{display:"block"},className:"listSpacing buttonSpaceRemove",children:(0,qt.jsxs)(Mg,{sx:{minHeight:48,justifyContent:cy?"initial":"center",px:2.5},component:"div",onClick:function(){i(null===r||void 0===r?void 0:r.id)},className:null===r||void 0===r?void 0:r.className,children:[(0,qt.jsx)(gv,{sx:{minWidth:0,mr:cy?3:"auto",justifyContent:"center"},children:null===r||void 0===r?void 0:r.icon}),(0,qt.jsx)(Dg,{disableTypography:!0,primary:null===r||void 0===r?void 0:r.name,sx:{opacity:cy?1:0,fontWeight:500}}),o&&!(null!==r&&void 0!==r&&r.open)&&cy&&(0,qt.jsx)(pv.A,{}),o&&(null===r||void 0===r?void 0:r.open)&&cy&&(0,qt.jsx)(uv.A,{})]},null===r||void 0===r?void 0:r.id)},null===r||void 0===r?void 0:r.id):(0,qt.jsx)(dy,{title:null===r||void 0===r?void 0:r.name,placement:"right",children:(0,qt.jsx)(Ag,{"data-bind":null===r||void 0===r?void 0:r.id,disablePadding:!0,sx:{display:"block"},className:"listSpacing",children:(0,qt.jsxs)(Mg,{component:Lo,className:ly.id===(null===r||void 0===r?void 0:r.id)?"Mui-selected ".concat(null===r||void 0===r?void 0:r.className):null===r||void 0===r?void 0:r.className,to:null!==r&&void 0!==r&&r.clickable?"":"".concat(null===r||void 0===r?void 0:r.url).concat((null===r||void 0===r?void 0:r.query)||""),onClick:null!==r&&void 0!==r&&r.clickable?null===r||void 0===r?void 0:r.onClick:()=>{},sx:{minHeight:48,justifyContent:cy?"initial":"center",px:2.5},children:[(0,qt.jsx)(gv,{sx:{minWidth:0,mr:cy?3:"auto",justifyContent:"center"},children:null===r||void 0===r?void 0:r.icon}),(0,qt.jsx)(Dg,{disableTypography:!0,primary:null===r||void 0===r?void 0:r.name,sx:{opacity:cy?1:0,fontWeight:500}})]})},null===r||void 0===r?void 0:r.id)})}),s=o?(0,qt.jsx)(mr,{in:!(null===r||void 0===r||!r.open),timeout:"auto",unmountOnExit:!0,children:null===r||void 0===r||null===(n=r.data)||void 0===n?void 0:n.map(e=>(0,qt.jsx)(py,{item:e,onOpen:i},null===e||void 0===e?void 0:e.id))}):null;return(0,qt.jsxs)(qt.Fragment,{children:[a,s]})};const hy=function(e){let{headerData:t,listItems:n,openDrawer:r}=e;ly.id=t.activeMenuItem,cy=r;const[o,a]=We.useState(n),s=e=>{a(o.map(t=>{var n;return(0,i.A)((0,i.A)({},t),{},{data:null===t||void 0===t||null===(n=t.data)||void 0===n?void 0:n.map(t=>{var n;return(0,i.A)((0,i.A)({},t),{},{data:null===t||void 0===t||null===(n=t.data)||void 0===n?void 0:n.map(e=>(0,i.A)((0,i.A)({},e),{},{list_level:"3"})),list_level:"2",open:t.id===e&&!t.open})}),list_level:"1"})}))};return We.useEffect(()=>{a(n.map(e=>{var t;return(0,i.A)((0,i.A)({},e),{},{data:null===e||void 0===e||null===(t=e.data)||void 0===t?void 0:t.map(e=>{var t,n;return(0,i.A)((0,i.A)({},e),{},{data:null===e||void 0===e||null===(t=e.data)||void 0===t?void 0:t.map(e=>(0,i.A)((0,i.A)({},e),{},{list_level:"3"})),list_level:"2",open:null===e||void 0===e||null===(n=e.data)||void 0===n?void 0:n.find(e=>e.id===ly.id)})}),list_level:"1"})}))},[n]),(0,qt.jsx)(zh,{sx:{p:0},className:"theme_scroll height_scroll",children:null===o||void 0===o?void 0:o.map(e=>(0,qt.jsx)(We.Fragment,{children:(0,qt.jsx)(uy,{list:null===e||void 0===e?void 0:e.data,onOpen:s})},null===e||void 0===e?void 0:e.id))})};function my(e){let{headerData:t,openDrawer:n,handleDrawerClose:r,handleUserTour:i}=e;const{userData:o}=(0,We.useContext)(lv);return(0,qt.jsx)(qt.Fragment,{children:(0,qt.jsxs)(MC,{className:n?"drawer-docked-small":"drawer-docked-slide",variant:"permanent",open:n,children:[(0,qt.jsxs)(TC,{sx:{justifyContent:"space-between"},children:[n?(0,qt.jsxs)(qt.Fragment,{children:[(0,qt.jsx)(op,{sx:{marginLeft:2,lineHeight:1},className:"logo_hidden",children:(0,qt.jsx)("img",{src:cv,height:45})}),(0,qt.jsx)(op,{sx:{marginLeft:1,lineHeight:1},className:"logo_show",children:(0,qt.jsx)("img",{src:dv,height:32})})]}):(0,qt.jsx)(op,{sx:{marginLeft:1,lineHeight:1},children:(0,qt.jsx)("img",{src:dv,height:32})}),!1]}),(0,qt.jsx)(eg,{}),(0,qt.jsx)(hy,{headerData:t,listItems:t.listItems,openDrawer:n}),n&&(0,qt.jsx)(qt.Fragment,{children:(0,qt.jsxs)(op,{py:3,children:[(0,qt.jsx)(sv,{sx:{boxShadow:"none",minHeight:"auto",marginRight:"10px"},size:"small",color:"primary",onClick:()=>{var e;return window.open("".concat(cd,"?email=").concat(null===o||void 0===o||null===(e=o.user_principal)||void 0===e?void 0:e.email),"_blank")},className:"feedbackIcon",children:(0,qt.jsx)(Fc,{fontSize:"small",sx:{width:16,height:16}})}),(0,qt.jsx)(xh,{size:"small",type:"reset",variant:"contained",color:"primary",style:{left:"10px"},onClick:()=>{var e;return window.open("".concat(cd,"?email=").concat(null===o||void 0===o||null===(e=o.user_principal)||void 0===e?void 0:e.email),"_blank")},className:"user-tour-button hiddenfeedback",children:"Feedback"}),(0,qt.jsx)(xh,{variant:"text",size:"small",type:"reset",color:"primary",onClick:i,sx:{bgcolor:"primary.theme.50"},className:"user-tour-button",children:"Start User Tour"})]})})]})})}my.defaultProps={handleDrawerClose:()=>{},handleUserTour:()=>{},openDrawer:!1};const fy=my;var gy=n(39089),vy=n(70569),xy=n(84445),yy=n(1702),by=n(99466),jy=n(89611),_y=n(52177),Cy=n(66734);const wy=(0,Cy.A)((0,qt.jsx)("path",{d:"M12 12c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm0 2c-2.67 0-8 1.34-8 4v2h16v-2c0-2.66-5.33-4-8-4z"}),"Person");function Sy(e){return(0,sr.Ay)("MuiAvatar",e)}(0,ar.A)("MuiAvatar",["root","colorDefault","circular","rounded","square","img","fallback"]);const Ay=["className","elementType","ownerState","externalForwardedProps","getSlotOwnerState","internalForwardedProps"],ky=["component","slots","slotProps"],Ty=["component"];function Ey(e,t){const{className:n,elementType:r,ownerState:i,externalForwardedProps:o,getSlotOwnerState:a,internalForwardedProps:s}=t,l=(0,nn.A)(t,Ay),{component:c,slots:d={[e]:void 0},slotProps:u={[e]:void 0}}=o,p=(0,nn.A)(o,ky),h=d[e]||r,m=Rh(u[e],i),f=Oh((0,Ft.A)({className:n},l,{externalForwardedProps:"root"===e?p:void 0,externalSlotProps:m})),{props:{component:g},internalRef:v}=f,x=(0,nn.A)(f.props,Ty),y=(0,gr.A)(v,null==m?void 0:m.ref,t.ref),b=a?a(x):{},j=(0,Ft.A)({},i,b),_="root"===e?g||c:g,C=Ah(h,(0,Ft.A)({},"root"===e&&!c&&!d[e]&&s,"root"!==e&&!d[e]&&s,x,_&&{as:_},{ref:y}),j);return Object.keys(b).forEach(e=>{delete C[e]}),[h,C]}const My=["alt","children","className","component","slots","slotProps","imgProps","sizes","src","srcSet","variant"],Oy=(0,Vn.Ay)("div",{name:"MuiAvatar",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[n.variant],n.colorDefault&&t.colorDefault]}})(e=>{let{theme:t}=e;return{position:"relative",display:"flex",alignItems:"center",justifyContent:"center",flexShrink:0,width:40,height:40,fontFamily:t.typography.fontFamily,fontSize:t.typography.pxToRem(20),lineHeight:1,borderRadius:"50%",overflow:"hidden",userSelect:"none",variants:[{props:{variant:"rounded"},style:{borderRadius:(t.vars||t).shape.borderRadius}},{props:{variant:"square"},style:{borderRadius:0}},{props:{colorDefault:!0},style:(0,Ft.A)({color:(t.vars||t).palette.background.default},t.vars?{backgroundColor:t.vars.palette.Avatar.defaultBg}:(0,Ft.A)({backgroundColor:t.palette.grey[400]},t.applyStyles("dark",{backgroundColor:t.palette.grey[600]})))}]}}),Ry=(0,Vn.Ay)("img",{name:"MuiAvatar",slot:"Img",overridesResolver:(e,t)=>t.img})({width:"100%",height:"100%",textAlign:"center",objectFit:"cover",color:"transparent",textIndent:1e4}),Py=(0,Vn.Ay)(wy,{name:"MuiAvatar",slot:"Fallback",overridesResolver:(e,t)=>t.fallback})({width:"75%",height:"75%"});const Dy=We.forwardRef(function(e,t){const n=(0,$t.b)({props:e,name:"MuiAvatar"}),{alt:r,children:i,className:o,component:a="div",slots:s={},slotProps:l={},imgProps:c,sizes:d,src:u,srcSet:p,variant:h="circular"}=n,m=(0,nn.A)(n,My);let f=null;const g=function(e){let{crossOrigin:t,referrerPolicy:n,src:r,srcSet:i}=e;const[o,a]=We.useState(!1);return We.useEffect(()=>{if(!r&&!i)return;a(!1);let e=!0;const o=new Image;return o.onload=()=>{e&&a("loaded")},o.onerror=()=>{e&&a("error")},o.crossOrigin=t,o.referrerPolicy=n,o.src=r,i&&(o.srcset=i),()=>{e=!1}},[t,n,r,i]),o}((0,Ft.A)({},c,{src:u,srcSet:p})),v=u||p,x=v&&"error"!==g,y=(0,Ft.A)({},n,{colorDefault:!x,component:a,variant:h}),b=(e=>{const{classes:t,variant:n,colorDefault:r}=e,i={root:["root",n,r&&"colorDefault"],img:["img"],fallback:["fallback"]};return(0,ir.A)(i,Sy,t)})(y),[j,_]=Ey("img",{className:b.img,elementType:Ry,externalForwardedProps:{slots:s,slotProps:{img:(0,Ft.A)({},c,l.img)}},additionalProps:{alt:r,src:u,srcSet:p,sizes:d},ownerState:y});return f=x?(0,qt.jsx)(j,(0,Ft.A)({},_)):i||0===i?i:v&&r?r[0]:(0,qt.jsx)(Py,{ownerState:y,className:b.fallback}),(0,qt.jsx)(Oy,(0,Ft.A)({as:a,ownerState:y,className:(0,nr.A)(b.root,o),ref:t},m,{children:f}))}),Ny=Dy;function Ly(e){return(0,sr.Ay)("MuiLinearProgress",e)}(0,ar.A)("MuiLinearProgress",["root","colorPrimary","colorSecondary","determinate","indeterminate","buffer","query","dashed","dashedColorPrimary","dashedColorSecondary","bar","barColorPrimary","barColorSecondary","bar1Indeterminate","bar1Determinate","bar1Buffer","bar2Indeterminate","bar2Buffer"]);var Iy,Fy,$y,By,zy,Hy;const Wy=["className","color","value","valueBuffer","variant"];let Uy,Vy,Gy,qy,Yy,Zy;const Ky=(0,Ip.i7)(Uy||(Uy=Iy||(Iy=Mp(["\n  0% {\n    left: -35%;\n    right: 100%;\n  }\n\n  60% {\n    left: 100%;\n    right: -90%;\n  }\n\n  100% {\n    left: 100%;\n    right: -90%;\n  }\n"])))),Xy=(0,Ip.i7)(Vy||(Vy=Fy||(Fy=Mp(["\n  0% {\n    left: -200%;\n    right: 100%;\n  }\n\n  60% {\n    left: 107%;\n    right: -8%;\n  }\n\n  100% {\n    left: 107%;\n    right: -8%;\n  }\n"])))),Qy=(0,Ip.i7)(Gy||(Gy=$y||($y=Mp(["\n  0% {\n    opacity: 1;\n    background-position: 0 -23px;\n  }\n\n  60% {\n    opacity: 0;\n    background-position: 0 -23px;\n  }\n\n  100% {\n    opacity: 1;\n    background-position: -200px -23px;\n  }\n"])))),Jy=(e,t)=>"inherit"===t?"currentColor":e.vars?e.vars.palette.LinearProgress["".concat(t,"Bg")]:"light"===e.palette.mode?(0,hp.a)(e.palette[t].main,.62):(0,hp.e$)(e.palette[t].main,.5),eb=(0,Vn.Ay)("span",{name:"MuiLinearProgress",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t["color".concat((0,pp.A)(n.color))],t[n.variant]]}})(e=>{let{ownerState:t,theme:n}=e;return(0,Ft.A)({position:"relative",overflow:"hidden",display:"block",height:4,zIndex:0,"@media print":{colorAdjust:"exact"},backgroundColor:Jy(n,t.color)},"inherit"===t.color&&"buffer"!==t.variant&&{backgroundColor:"none","&::before":{content:'""',position:"absolute",left:0,top:0,right:0,bottom:0,backgroundColor:"currentColor",opacity:.3}},"buffer"===t.variant&&{backgroundColor:"transparent"},"query"===t.variant&&{transform:"rotate(180deg)"})}),tb=(0,Vn.Ay)("span",{name:"MuiLinearProgress",slot:"Dashed",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.dashed,t["dashedColor".concat((0,pp.A)(n.color))]]}})(e=>{let{ownerState:t,theme:n}=e;const r=Jy(n,t.color);return(0,Ft.A)({position:"absolute",marginTop:0,height:"100%",width:"100%"},"inherit"===t.color&&{opacity:.3},{backgroundImage:"radial-gradient(".concat(r," 0%, ").concat(r," 16%, transparent 42%)"),backgroundSize:"10px 10px",backgroundPosition:"0 -23px"})},(0,Ip.AH)(qy||(qy=By||(By=Mp(["\n    animation: "," 3s infinite linear;\n  "]))),Qy)),nb=(0,Vn.Ay)("span",{name:"MuiLinearProgress",slot:"Bar1",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.bar,t["barColor".concat((0,pp.A)(n.color))],("indeterminate"===n.variant||"query"===n.variant)&&t.bar1Indeterminate,"determinate"===n.variant&&t.bar1Determinate,"buffer"===n.variant&&t.bar1Buffer]}})(e=>{let{ownerState:t,theme:n}=e;return(0,Ft.A)({width:"100%",position:"absolute",left:0,bottom:0,top:0,transition:"transform 0.2s linear",transformOrigin:"left",backgroundColor:"inherit"===t.color?"currentColor":(n.vars||n).palette[t.color].main},"determinate"===t.variant&&{transition:"transform .".concat(4,"s linear")},"buffer"===t.variant&&{zIndex:1,transition:"transform .".concat(4,"s linear")})},e=>{let{ownerState:t}=e;return("indeterminate"===t.variant||"query"===t.variant)&&(0,Ip.AH)(Yy||(Yy=zy||(zy=Mp(["\n      width: auto;\n      animation: "," 2.1s cubic-bezier(0.65, 0.815, 0.735, 0.395) infinite;\n    "]))),Ky)}),rb=(0,Vn.Ay)("span",{name:"MuiLinearProgress",slot:"Bar2",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.bar,t["barColor".concat((0,pp.A)(n.color))],("indeterminate"===n.variant||"query"===n.variant)&&t.bar2Indeterminate,"buffer"===n.variant&&t.bar2Buffer]}})(e=>{let{ownerState:t,theme:n}=e;return(0,Ft.A)({width:"100%",position:"absolute",left:0,bottom:0,top:0,transition:"transform 0.2s linear",transformOrigin:"left"},"buffer"!==t.variant&&{backgroundColor:"inherit"===t.color?"currentColor":(n.vars||n).palette[t.color].main},"inherit"===t.color&&{opacity:.3},"buffer"===t.variant&&{backgroundColor:Jy(n,t.color),transition:"transform .".concat(4,"s linear")})},e=>{let{ownerState:t}=e;return("indeterminate"===t.variant||"query"===t.variant)&&(0,Ip.AH)(Zy||(Zy=Hy||(Hy=Mp(["\n      width: auto;\n      animation: "," 2.1s cubic-bezier(0.165, 0.84, 0.44, 1) 1.15s infinite;\n    "]))),Xy)}),ib=We.forwardRef(function(e,t){const n=(0,$t.b)({props:e,name:"MuiLinearProgress"}),{className:r,color:i="primary",value:o,valueBuffer:a,variant:s="indeterminate"}=n,l=(0,nn.A)(n,Wy),c=(0,Ft.A)({},n,{color:i,variant:s}),d=(e=>{const{classes:t,variant:n,color:r}=e,i={root:["root","color".concat((0,pp.A)(r)),n],dashed:["dashed","dashedColor".concat((0,pp.A)(r))],bar1:["bar","barColor".concat((0,pp.A)(r)),("indeterminate"===n||"query"===n)&&"bar1Indeterminate","determinate"===n&&"bar1Determinate","buffer"===n&&"bar1Buffer"],bar2:["bar","buffer"!==n&&"barColor".concat((0,pp.A)(r)),"buffer"===n&&"color".concat((0,pp.A)(r)),("indeterminate"===n||"query"===n)&&"bar2Indeterminate","buffer"===n&&"bar2Buffer"]};return(0,ir.A)(i,Ly,t)})(c),u=dn(),p={},h={bar1:{},bar2:{}};if("determinate"===s||"buffer"===s)if(void 0!==o){p["aria-valuenow"]=Math.round(o),p["aria-valuemin"]=0,p["aria-valuemax"]=100;let e=o-100;u&&(e=-e),h.bar1.transform="translateX(".concat(e,"%)")}else 0;if("buffer"===s)if(void 0!==a){let e=(a||0)-100;u&&(e=-e),h.bar2.transform="translateX(".concat(e,"%)")}else 0;return(0,qt.jsxs)(eb,(0,Ft.A)({className:(0,nr.A)(d.root,r),ownerState:c,role:"progressbar"},p,{ref:t},l,{children:["buffer"===s?(0,qt.jsx)(tb,{className:d.dashed,ownerState:c}):null,(0,qt.jsx)(nb,{className:d.bar1,ownerState:c,style:h.bar1}),"determinate"===s?null:(0,qt.jsx)(rb,{className:d.bar2,ownerState:c,style:h.bar2})]}))}),ob=ib;var ab=n(54536),sb=n(51052);const lb=e=>{const t=We.useRef({});return We.useEffect(()=>{t.current=e}),t.current};function cb(e){return"undefined"!==typeof e.normalize?e.normalize("NFD").replace(/[\u0300-\u036f]/g,""):e}function db(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const{ignoreAccents:t=!0,ignoreCase:n=!0,limit:r,matchFrom:i="any",stringify:o,trim:a=!1}=e;return(e,s)=>{let{inputValue:l,getOptionLabel:c}=s,d=a?l.trim():l;n&&(d=d.toLowerCase()),t&&(d=cb(d));const u=d?e.filter(e=>{let r=(o||c)(e);return n&&(r=r.toLowerCase()),t&&(r=cb(r)),"start"===i?0===r.indexOf(d):r.indexOf(d)>-1}):e;return"number"===typeof r?u.slice(0,r):u}}function ub(e,t){for(let n=0;n<e.length;n+=1)if(t(e[n]))return n;return-1}const pb=db(),hb=e=>{var t;return null!==e.current&&(null==(t=e.current.parentElement)?void 0:t.contains(document.activeElement))},mb=[];const fb=function(e){const{unstable_isActiveElementInListbox:t=hb,unstable_classNamePrefix:n="Mui",autoComplete:r=!1,autoHighlight:i=!1,autoSelect:o=!1,blurOnSelect:a=!1,clearOnBlur:s=!e.freeSolo,clearOnEscape:l=!1,componentName:c="useAutocomplete",defaultValue:d=(e.multiple?mb:null),disableClearable:u=!1,disableCloseOnSelect:p=!1,disabled:h,disabledItemsFocusable:m=!1,disableListWrap:f=!1,filterOptions:g=pb,filterSelectedOptions:v=!1,freeSolo:x=!1,getOptionDisabled:y,getOptionKey:b,getOptionLabel:j=e=>{var t;return null!=(t=e.label)?t:e},groupBy:_,handleHomeEndKeys:C=!e.freeSolo,id:w,includeInputInList:S=!1,inputValue:A,isOptionEqualToValue:k=(e,t)=>e===t,multiple:T=!1,onChange:E,onClose:M,onHighlightChange:O,onInputChange:R,onOpen:P,open:D,openOnFocus:N=!1,options:L,readOnly:I=!1,selectOnFocus:F=!e.freeSolo,value:$}=e,B=(0,mn.A)(w);let z=j;z=e=>{const t=j(e);return"string"!==typeof t?String(t):t};const H=We.useRef(!1),W=We.useRef(!0),U=We.useRef(null),V=We.useRef(null),[G,q]=We.useState(null),[Y,Z]=We.useState(-1),K=i?0:-1,X=We.useRef(K),[Q,J]=(0,sb.A)({controlled:$,default:d,name:c}),[ee,te]=(0,sb.A)({controlled:A,default:"",name:c,state:"inputValue"}),[ne,re]=We.useState(!1),ie=We.useCallback((e,t)=>{if(!(T?Q.length<t.length:null!==t)&&!s)return;let n;if(T)n="";else if(null==t)n="";else{const e=z(t);n="string"===typeof e?e:""}ee!==n&&(te(n),R&&R(e,n,"reset"))},[z,ee,T,R,te,s,Q]),[oe,ae]=(0,sb.A)({controlled:D,default:!1,name:c,state:"open"}),[se,le]=We.useState(!0),ce=!T&&null!=Q&&ee===z(Q),de=oe&&!I,ue=de?g(L.filter(e=>!v||!(T?Q:[Q]).some(t=>null!==t&&k(e,t))),{inputValue:ce&&se?"":ee,getOptionLabel:z}):[],pe=lb({filteredOptions:ue,value:Q,inputValue:ee});We.useEffect(()=>{const e=Q!==pe.value;ne&&!e||x&&!e||ie(null,Q)},[Q,ie,ne,pe.value,x]);const he=oe&&ue.length>0&&!I,me=(0,vr.A)(e=>{-1===e?U.current.focus():G.querySelector('[data-tag-index="'.concat(e,'"]')).focus()});We.useEffect(()=>{T&&Y>Q.length-1&&(Z(-1),me(-1))},[Q,T,Y,me]);const fe=(0,vr.A)(e=>{let{event:t,index:r,reason:i="auto"}=e;if(X.current=r,-1===r?U.current.removeAttribute("aria-activedescendant"):U.current.setAttribute("aria-activedescendant","".concat(B,"-option-").concat(r)),O&&O(t,-1===r?null:ue[r],i),!V.current)return;const o=V.current.querySelector('[role="option"].'.concat(n,"-focused"));o&&(o.classList.remove("".concat(n,"-focused")),o.classList.remove("".concat(n,"-focusVisible")));let a=V.current;if("listbox"!==V.current.getAttribute("role")&&(a=V.current.parentElement.querySelector('[role="listbox"]')),!a)return;if(-1===r)return void(a.scrollTop=0);const s=V.current.querySelector('[data-option-index="'.concat(r,'"]'));if(s&&(s.classList.add("".concat(n,"-focused")),"keyboard"===i&&s.classList.add("".concat(n,"-focusVisible")),a.scrollHeight>a.clientHeight&&"mouse"!==i&&"touch"!==i)){const e=s,t=a.clientHeight+a.scrollTop,n=e.offsetTop+e.offsetHeight;n>t?a.scrollTop=n-a.clientHeight:e.offsetTop-e.offsetHeight*(_?1.3:0)<a.scrollTop&&(a.scrollTop=e.offsetTop-e.offsetHeight*(_?1.3:0))}}),ge=(0,vr.A)(e=>{let{event:t,diff:n,direction:i="next",reason:o="auto"}=e;if(!de)return;const a=function(e,t){if(!V.current||e<0||e>=ue.length)return-1;let n=e;for(;;){const r=V.current.querySelector('[data-option-index="'.concat(n,'"]')),i=!m&&(!r||r.disabled||"true"===r.getAttribute("aria-disabled"));if(r&&r.hasAttribute("tabindex")&&!i)return n;if(n="next"===t?(n+1)%ue.length:(n-1+ue.length)%ue.length,n===e)return-1}}((()=>{const e=ue.length-1;if("reset"===n)return K;if("start"===n)return 0;if("end"===n)return e;const t=X.current+n;return t<0?-1===t&&S?-1:f&&-1!==X.current||Math.abs(n)>1?0:e:t>e?t===e+1&&S?-1:f||Math.abs(n)>1?e:0:t})(),i);if(fe({index:a,reason:o,event:t}),r&&"reset"!==n)if(-1===a)U.current.value=ee;else{const e=z(ue[a]);U.current.value=e;0===e.toLowerCase().indexOf(ee.toLowerCase())&&ee.length>0&&U.current.setSelectionRange(ee.length,e.length)}}),ve=We.useCallback(()=>{if(!de)return;const e=(()=>{if(-1!==X.current&&pe.filteredOptions&&pe.filteredOptions.length!==ue.length&&pe.inputValue===ee&&(T?Q.length===pe.value.length&&pe.value.every((e,t)=>z(Q[t])===z(e)):(e=pe.value,t=Q,(e?z(e):"")===(t?z(t):"")))){const e=pe.filteredOptions[X.current];if(e)return ub(ue,t=>z(t)===z(e))}var e,t;return-1})();if(-1!==e)return void(X.current=e);const t=T?Q[0]:Q;if(0!==ue.length&&null!=t){if(V.current){if(null!=t){const e=ue[X.current];if(T&&e&&-1!==ub(Q,t=>k(e,t)))return;const n=ub(ue,e=>k(e,t));return void(-1===n?ge({diff:"reset"}):fe({index:n}))}X.current>=ue.length-1?fe({index:ue.length-1}):fe({index:X.current})}}else ge({diff:"reset"})},[ue.length,!T&&Q,v,ge,fe,de,ee,T]),xe=(0,vr.A)(e=>{(0,lm.A)(V,e),e&&ve()});We.useEffect(()=>{ve()},[ve]);const ye=e=>{oe||(ae(!0),le(!0),P&&P(e))},be=(e,t)=>{oe&&(ae(!1),M&&M(e,t))},je=(e,t,n,r)=>{if(T){if(Q.length===t.length&&Q.every((e,n)=>e===t[n]))return}else if(Q===t)return;E&&E(e,t,n,r),J(t)},_e=We.useRef(!1),Ce=function(e,t){let n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"options",r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"selectOption",i=t;if(T){i=Array.isArray(Q)?Q.slice():[];const e=ub(i,e=>k(t,e));-1===e?i.push(t):"freeSolo"!==n&&(i.splice(e,1),r="removeOption")}ie(e,i),je(e,i,r,{option:t}),p||e&&(e.ctrlKey||e.metaKey)||be(e,r),(!0===a||"touch"===a&&_e.current||"mouse"===a&&!_e.current)&&U.current.blur()},we=(e,t)=>{if(!T)return;""===ee&&be(e,"toggleInput");let n=Y;-1===Y?""===ee&&"previous"===t&&(n=Q.length-1):(n+="next"===t?1:-1,n<0&&(n=0),n===Q.length&&(n=-1)),n=function(e,t){if(-1===e)return-1;let n=e;for(;;){if("next"===t&&n===Q.length||"previous"===t&&-1===n)return-1;const e=G.querySelector('[data-tag-index="'.concat(n,'"]'));if(e&&e.hasAttribute("tabindex")&&!e.disabled&&"true"!==e.getAttribute("aria-disabled"))return n;n+="next"===t?1:-1}}(n,t),Z(n),me(n)},Se=e=>{H.current=!0,te(""),R&&R(e,"","clear"),je(e,T?[]:null,"clear")},Ae=e=>t=>{if(e.onKeyDown&&e.onKeyDown(t),!t.defaultMuiPrevented&&(-1!==Y&&-1===["ArrowLeft","ArrowRight"].indexOf(t.key)&&(Z(-1),me(-1)),229!==t.which))switch(t.key){case"Home":de&&C&&(t.preventDefault(),ge({diff:"start",direction:"next",reason:"keyboard",event:t}));break;case"End":de&&C&&(t.preventDefault(),ge({diff:"end",direction:"previous",reason:"keyboard",event:t}));break;case"PageUp":t.preventDefault(),ge({diff:-5,direction:"previous",reason:"keyboard",event:t}),ye(t);break;case"PageDown":t.preventDefault(),ge({diff:5,direction:"next",reason:"keyboard",event:t}),ye(t);break;case"ArrowDown":t.preventDefault(),ge({diff:1,direction:"next",reason:"keyboard",event:t}),ye(t);break;case"ArrowUp":t.preventDefault(),ge({diff:-1,direction:"previous",reason:"keyboard",event:t}),ye(t);break;case"ArrowLeft":we(t,"previous");break;case"ArrowRight":we(t,"next");break;case"Enter":if(-1!==X.current&&de){const e=ue[X.current],n=!!y&&y(e);if(t.preventDefault(),n)return;Ce(t,e,"selectOption"),r&&U.current.setSelectionRange(U.current.value.length,U.current.value.length)}else x&&""!==ee&&!1===ce&&(T&&t.preventDefault(),Ce(t,ee,"createOption","freeSolo"));break;case"Escape":de?(t.preventDefault(),t.stopPropagation(),be(t,"escape")):l&&(""!==ee||T&&Q.length>0)&&(t.preventDefault(),t.stopPropagation(),Se(t));break;case"Backspace":if(T&&!I&&""===ee&&Q.length>0){const e=-1===Y?Q.length-1:Y,n=Q.slice();n.splice(e,1),je(t,n,"removeOption",{option:Q[e]})}break;case"Delete":if(T&&!I&&""===ee&&Q.length>0&&-1!==Y){const e=Y,n=Q.slice();n.splice(e,1),je(t,n,"removeOption",{option:Q[e]})}}},ke=e=>{re(!0),N&&!H.current&&ye(e)},Te=e=>{t(V)?U.current.focus():(re(!1),W.current=!0,H.current=!1,o&&-1!==X.current&&de?Ce(e,ue[X.current],"blur"):o&&x&&""!==ee?Ce(e,ee,"blur","freeSolo"):s&&ie(e,Q),be(e,"blur"))},Ee=e=>{const t=e.target.value;ee!==t&&(te(t),le(!1),R&&R(e,t,"input")),""===t?u||T||je(e,null,"clear"):ye(e)},Me=e=>{const t=Number(e.currentTarget.getAttribute("data-option-index"));X.current!==t&&fe({event:e,index:t,reason:"mouse"})},Oe=e=>{fe({event:e,index:Number(e.currentTarget.getAttribute("data-option-index")),reason:"touch"}),_e.current=!0},Re=e=>{const t=Number(e.currentTarget.getAttribute("data-option-index"));Ce(e,ue[t],"selectOption"),_e.current=!1},Pe=e=>t=>{const n=Q.slice();n.splice(e,1),je(t,n,"removeOption",{option:Q[e]})},De=e=>{oe?be(e,"toggleInput"):ye(e)},Ne=e=>{e.currentTarget.contains(e.target)&&e.target.getAttribute("id")!==B&&e.preventDefault()},Le=e=>{e.currentTarget.contains(e.target)&&(U.current.focus(),F&&W.current&&U.current.selectionEnd-U.current.selectionStart===0&&U.current.select(),W.current=!1)},Ie=e=>{h||""!==ee&&oe||De(e)};let Fe=x&&ee.length>0;Fe=Fe||(T?Q.length>0:null!==Q);let $e=ue;if(_){new Map;$e=ue.reduce((e,t,n)=>{const r=_(t);return e.length>0&&e[e.length-1].group===r?e[e.length-1].options.push(t):e.push({key:n,index:n,group:r,options:[t]}),e},[])}return h&&ne&&Te(),{getRootProps:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return(0,Ft.A)({"aria-owns":he?"".concat(B,"-listbox"):null},e,{onKeyDown:Ae(e),onMouseDown:Ne,onClick:Le})},getInputLabelProps:()=>({id:"".concat(B,"-label"),htmlFor:B}),getInputProps:()=>({id:B,value:ee,onBlur:Te,onFocus:ke,onChange:Ee,onMouseDown:Ie,"aria-activedescendant":de?"":null,"aria-autocomplete":r?"both":"list","aria-controls":he?"".concat(B,"-listbox"):void 0,"aria-expanded":he,autoComplete:"off",ref:U,autoCapitalize:"none",spellCheck:"false",role:"combobox",disabled:h}),getClearProps:()=>({tabIndex:-1,type:"button",onClick:Se}),getPopupIndicatorProps:()=>({tabIndex:-1,type:"button",onClick:De}),getTagProps:e=>{let{index:t}=e;return(0,Ft.A)({key:t,"data-tag-index":t,tabIndex:-1},!I&&{onDelete:Pe(t)})},getListboxProps:()=>({role:"listbox",id:"".concat(B,"-listbox"),"aria-labelledby":"".concat(B,"-label"),ref:xe,onMouseDown:e=>{e.preventDefault()}}),getOptionProps:e=>{let{index:t,option:n}=e;var r;const i=(T?Q:[Q]).some(e=>null!=e&&k(n,e)),o=!!y&&y(n);return{key:null!=(r=null==b?void 0:b(n))?r:z(n),tabIndex:-1,role:"option",id:"".concat(B,"-option-").concat(t),onMouseMove:Me,onClick:Re,onTouchStart:Oe,"data-option-index":t,"aria-disabled":o,"aria-selected":i}},id:B,inputValue:ee,value:Q,dirty:Fe,expanded:de&&G,popupOpen:de,focused:ne||-1!==Y,anchorEl:G,setAnchorEl:q,focusedTag:Y,groupedOptions:$e}};function gb(e){return(0,sr.Ay)("MuiListSubheader",e)}(0,ar.A)("MuiListSubheader",["root","colorPrimary","colorInherit","gutters","inset","sticky"]);const vb=["className","color","component","disableGutters","disableSticky","inset"],xb=(0,Vn.Ay)("li",{name:"MuiListSubheader",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,"default"!==n.color&&t["color".concat((0,pp.A)(n.color))],!n.disableGutters&&t.gutters,n.inset&&t.inset,!n.disableSticky&&t.sticky]}})(e=>{let{theme:t,ownerState:n}=e;return(0,Ft.A)({boxSizing:"border-box",lineHeight:"48px",listStyle:"none",color:(t.vars||t).palette.text.secondary,fontFamily:t.typography.fontFamily,fontWeight:t.typography.fontWeightMedium,fontSize:t.typography.pxToRem(14)},"primary"===n.color&&{color:(t.vars||t).palette.primary.main},"inherit"===n.color&&{color:"inherit"},!n.disableGutters&&{paddingLeft:16,paddingRight:16},n.inset&&{paddingLeft:72},!n.disableSticky&&{position:"sticky",top:0,zIndex:1,backgroundColor:(t.vars||t).palette.background.paper})}),yb=We.forwardRef(function(e,t){const n=(0,$t.b)({props:e,name:"MuiListSubheader"}),{className:r,color:i="default",component:o="li",disableGutters:a=!1,disableSticky:s=!1,inset:l=!1}=n,c=(0,nn.A)(n,vb),d=(0,Ft.A)({},n,{color:i,component:o,disableGutters:a,disableSticky:s,inset:l}),u=(e=>{const{classes:t,color:n,disableGutters:r,inset:i,disableSticky:o}=e,a={root:["root","default"!==n&&"color".concat((0,pp.A)(n)),!r&&"gutters",i&&"inset",!o&&"sticky"]};return(0,ir.A)(a,gb,t)})(d);return(0,qt.jsx)(xb,(0,Ft.A)({as:o,className:(0,nr.A)(u.root,r),ref:t,ownerState:d},c))});yb.muiSkipListHighlight=!0;const bb=yb,jb=(0,Cy.A)((0,qt.jsx)("path",{d:"M12 2C6.47 2 2 6.47 2 12s4.47 10 10 10 10-4.47 10-10S17.53 2 12 2zm5 13.59L15.59 17 12 13.41 8.41 17 7 15.59 10.59 12 7 8.41 8.41 7 12 10.59 15.59 7 17 8.41 13.41 12 17 15.59z"}),"Cancel");function _b(e){return(0,sr.Ay)("MuiChip",e)}const Cb=(0,ar.A)("MuiChip",["root","sizeSmall","sizeMedium","colorError","colorInfo","colorPrimary","colorSecondary","colorSuccess","colorWarning","disabled","clickable","clickableColorPrimary","clickableColorSecondary","deletable","deletableColorPrimary","deletableColorSecondary","outlined","filled","outlinedPrimary","outlinedSecondary","filledPrimary","filledSecondary","avatar","avatarSmall","avatarMedium","avatarColorPrimary","avatarColorSecondary","icon","iconSmall","iconMedium","iconColorPrimary","iconColorSecondary","label","labelSmall","labelMedium","deleteIcon","deleteIconSmall","deleteIconMedium","deleteIconColorPrimary","deleteIconColorSecondary","deleteIconOutlinedColorPrimary","deleteIconOutlinedColorSecondary","deleteIconFilledColorPrimary","deleteIconFilledColorSecondary","focusVisible"]),wb=["avatar","className","clickable","color","component","deleteIcon","disabled","icon","label","onClick","onDelete","onKeyDown","onKeyUp","size","variant","tabIndex","skipFocusWhenDisabled"],Sb=(0,Vn.Ay)("div",{name:"MuiChip",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e,{color:r,iconColor:i,clickable:o,onDelete:a,size:s,variant:l}=n;return[{["& .".concat(Cb.avatar)]:t.avatar},{["& .".concat(Cb.avatar)]:t["avatar".concat((0,pp.A)(s))]},{["& .".concat(Cb.avatar)]:t["avatarColor".concat((0,pp.A)(r))]},{["& .".concat(Cb.icon)]:t.icon},{["& .".concat(Cb.icon)]:t["icon".concat((0,pp.A)(s))]},{["& .".concat(Cb.icon)]:t["iconColor".concat((0,pp.A)(i))]},{["& .".concat(Cb.deleteIcon)]:t.deleteIcon},{["& .".concat(Cb.deleteIcon)]:t["deleteIcon".concat((0,pp.A)(s))]},{["& .".concat(Cb.deleteIcon)]:t["deleteIconColor".concat((0,pp.A)(r))]},{["& .".concat(Cb.deleteIcon)]:t["deleteIcon".concat((0,pp.A)(l),"Color").concat((0,pp.A)(r))]},t.root,t["size".concat((0,pp.A)(s))],t["color".concat((0,pp.A)(r))],o&&t.clickable,o&&"default"!==r&&t["clickableColor".concat((0,pp.A)(r),")")],a&&t.deletable,a&&"default"!==r&&t["deletableColor".concat((0,pp.A)(r))],t[l],t["".concat(l).concat((0,pp.A)(r))]]}})(e=>{let{theme:t,ownerState:n}=e;const r="light"===t.palette.mode?t.palette.grey[700]:t.palette.grey[300];return(0,Ft.A)({maxWidth:"100%",fontFamily:t.typography.fontFamily,fontSize:t.typography.pxToRem(13),display:"inline-flex",alignItems:"center",justifyContent:"center",height:32,color:(t.vars||t).palette.text.primary,backgroundColor:(t.vars||t).palette.action.selected,borderRadius:16,whiteSpace:"nowrap",transition:t.transitions.create(["background-color","box-shadow"]),cursor:"unset",outline:0,textDecoration:"none",border:0,padding:0,verticalAlign:"middle",boxSizing:"border-box",["&.".concat(Cb.disabled)]:{opacity:(t.vars||t).palette.action.disabledOpacity,pointerEvents:"none"},["& .".concat(Cb.avatar)]:{marginLeft:5,marginRight:-6,width:24,height:24,color:t.vars?t.vars.palette.Chip.defaultAvatarColor:r,fontSize:t.typography.pxToRem(12)},["& .".concat(Cb.avatarColorPrimary)]:{color:(t.vars||t).palette.primary.contrastText,backgroundColor:(t.vars||t).palette.primary.dark},["& .".concat(Cb.avatarColorSecondary)]:{color:(t.vars||t).palette.secondary.contrastText,backgroundColor:(t.vars||t).palette.secondary.dark},["& .".concat(Cb.avatarSmall)]:{marginLeft:4,marginRight:-4,width:18,height:18,fontSize:t.typography.pxToRem(10)},["& .".concat(Cb.icon)]:(0,Ft.A)({marginLeft:5,marginRight:-6},"small"===n.size&&{fontSize:18,marginLeft:4,marginRight:-4},n.iconColor===n.color&&(0,Ft.A)({color:t.vars?t.vars.palette.Chip.defaultIconColor:r},"default"!==n.color&&{color:"inherit"})),["& .".concat(Cb.deleteIcon)]:(0,Ft.A)({WebkitTapHighlightColor:"transparent",color:t.vars?"rgba(".concat(t.vars.palette.text.primaryChannel," / 0.26)"):(0,hp.X4)(t.palette.text.primary,.26),fontSize:22,cursor:"pointer",margin:"0 5px 0 -6px","&:hover":{color:t.vars?"rgba(".concat(t.vars.palette.text.primaryChannel," / 0.4)"):(0,hp.X4)(t.palette.text.primary,.4)}},"small"===n.size&&{fontSize:16,marginRight:4,marginLeft:-4},"default"!==n.color&&{color:t.vars?"rgba(".concat(t.vars.palette[n.color].contrastTextChannel," / 0.7)"):(0,hp.X4)(t.palette[n.color].contrastText,.7),"&:hover, &:active":{color:(t.vars||t).palette[n.color].contrastText}})},"small"===n.size&&{height:24},"default"!==n.color&&{backgroundColor:(t.vars||t).palette[n.color].main,color:(t.vars||t).palette[n.color].contrastText},n.onDelete&&{["&.".concat(Cb.focusVisible)]:{backgroundColor:t.vars?"rgba(".concat(t.vars.palette.action.selectedChannel," / calc(").concat(t.vars.palette.action.selectedOpacity," + ").concat(t.vars.palette.action.focusOpacity,"))"):(0,hp.X4)(t.palette.action.selected,t.palette.action.selectedOpacity+t.palette.action.focusOpacity)}},n.onDelete&&"default"!==n.color&&{["&.".concat(Cb.focusVisible)]:{backgroundColor:(t.vars||t).palette[n.color].dark}})},e=>{let{theme:t,ownerState:n}=e;return(0,Ft.A)({},n.clickable&&{userSelect:"none",WebkitTapHighlightColor:"transparent",cursor:"pointer","&:hover":{backgroundColor:t.vars?"rgba(".concat(t.vars.palette.action.selectedChannel," / calc(").concat(t.vars.palette.action.selectedOpacity," + ").concat(t.vars.palette.action.hoverOpacity,"))"):(0,hp.X4)(t.palette.action.selected,t.palette.action.selectedOpacity+t.palette.action.hoverOpacity)},["&.".concat(Cb.focusVisible)]:{backgroundColor:t.vars?"rgba(".concat(t.vars.palette.action.selectedChannel," / calc(").concat(t.vars.palette.action.selectedOpacity," + ").concat(t.vars.palette.action.focusOpacity,"))"):(0,hp.X4)(t.palette.action.selected,t.palette.action.selectedOpacity+t.palette.action.focusOpacity)},"&:active":{boxShadow:(t.vars||t).shadows[1]}},n.clickable&&"default"!==n.color&&{["&:hover, &.".concat(Cb.focusVisible)]:{backgroundColor:(t.vars||t).palette[n.color].dark}})},e=>{let{theme:t,ownerState:n}=e;return(0,Ft.A)({},"outlined"===n.variant&&{backgroundColor:"transparent",border:t.vars?"1px solid ".concat(t.vars.palette.Chip.defaultBorder):"1px solid ".concat("light"===t.palette.mode?t.palette.grey[400]:t.palette.grey[700]),["&.".concat(Cb.clickable,":hover")]:{backgroundColor:(t.vars||t).palette.action.hover},["&.".concat(Cb.focusVisible)]:{backgroundColor:(t.vars||t).palette.action.focus},["& .".concat(Cb.avatar)]:{marginLeft:4},["& .".concat(Cb.avatarSmall)]:{marginLeft:2},["& .".concat(Cb.icon)]:{marginLeft:4},["& .".concat(Cb.iconSmall)]:{marginLeft:2},["& .".concat(Cb.deleteIcon)]:{marginRight:5},["& .".concat(Cb.deleteIconSmall)]:{marginRight:3}},"outlined"===n.variant&&"default"!==n.color&&{color:(t.vars||t).palette[n.color].main,border:"1px solid ".concat(t.vars?"rgba(".concat(t.vars.palette[n.color].mainChannel," / 0.7)"):(0,hp.X4)(t.palette[n.color].main,.7)),["&.".concat(Cb.clickable,":hover")]:{backgroundColor:t.vars?"rgba(".concat(t.vars.palette[n.color].mainChannel," / ").concat(t.vars.palette.action.hoverOpacity,")"):(0,hp.X4)(t.palette[n.color].main,t.palette.action.hoverOpacity)},["&.".concat(Cb.focusVisible)]:{backgroundColor:t.vars?"rgba(".concat(t.vars.palette[n.color].mainChannel," / ").concat(t.vars.palette.action.focusOpacity,")"):(0,hp.X4)(t.palette[n.color].main,t.palette.action.focusOpacity)},["& .".concat(Cb.deleteIcon)]:{color:t.vars?"rgba(".concat(t.vars.palette[n.color].mainChannel," / 0.7)"):(0,hp.X4)(t.palette[n.color].main,.7),"&:hover, &:active":{color:(t.vars||t).palette[n.color].main}}})}),Ab=(0,Vn.Ay)("span",{name:"MuiChip",slot:"Label",overridesResolver:(e,t)=>{const{ownerState:n}=e,{size:r}=n;return[t.label,t["label".concat((0,pp.A)(r))]]}})(e=>{let{ownerState:t}=e;return(0,Ft.A)({overflow:"hidden",textOverflow:"ellipsis",paddingLeft:12,paddingRight:12,whiteSpace:"nowrap"},"outlined"===t.variant&&{paddingLeft:11,paddingRight:11},"small"===t.size&&{paddingLeft:8,paddingRight:8},"small"===t.size&&"outlined"===t.variant&&{paddingLeft:7,paddingRight:7})});function kb(e){return"Backspace"===e.key||"Delete"===e.key}const Tb=We.forwardRef(function(e,t){const n=(0,$t.b)({props:e,name:"MuiChip"}),{avatar:r,className:i,clickable:o,color:a="default",component:s,deleteIcon:l,disabled:c=!1,icon:d,label:u,onClick:p,onDelete:h,onKeyDown:m,onKeyUp:f,size:g="medium",variant:v="filled",tabIndex:x,skipFocusWhenDisabled:y=!1}=n,b=(0,nn.A)(n,wb),j=We.useRef(null),_=(0,Ln.A)(j,t),C=e=>{e.stopPropagation(),h&&h(e)},w=!(!1===o||!p)||o,S=w||h?sh:s||"div",A=(0,Ft.A)({},n,{component:S,disabled:c,size:g,color:a,iconColor:We.isValidElement(d)&&d.props.color||a,onDelete:!!h,clickable:w,variant:v}),k=(e=>{const{classes:t,disabled:n,size:r,color:i,iconColor:o,onDelete:a,clickable:s,variant:l}=e,c={root:["root",l,n&&"disabled","size".concat((0,pp.A)(r)),"color".concat((0,pp.A)(i)),s&&"clickable",s&&"clickableColor".concat((0,pp.A)(i)),a&&"deletable",a&&"deletableColor".concat((0,pp.A)(i)),"".concat(l).concat((0,pp.A)(i))],label:["label","label".concat((0,pp.A)(r))],avatar:["avatar","avatar".concat((0,pp.A)(r)),"avatarColor".concat((0,pp.A)(i))],icon:["icon","icon".concat((0,pp.A)(r)),"iconColor".concat((0,pp.A)(o))],deleteIcon:["deleteIcon","deleteIcon".concat((0,pp.A)(r)),"deleteIconColor".concat((0,pp.A)(i)),"deleteIcon".concat((0,pp.A)(l),"Color").concat((0,pp.A)(i))]};return(0,ir.A)(c,_b,t)})(A),T=S===sh?(0,Ft.A)({component:s||"div",focusVisibleClassName:k.focusVisible},h&&{disableRipple:!0}):{};let E=null;h&&(E=l&&We.isValidElement(l)?We.cloneElement(l,{className:(0,nr.A)(l.props.className,k.deleteIcon),onClick:C}):(0,qt.jsx)(jb,{className:(0,nr.A)(k.deleteIcon),onClick:C}));let M=null;r&&We.isValidElement(r)&&(M=We.cloneElement(r,{className:(0,nr.A)(k.avatar,r.props.className)}));let O=null;return d&&We.isValidElement(d)&&(O=We.cloneElement(d,{className:(0,nr.A)(k.icon,d.props.className)})),(0,qt.jsxs)(Sb,(0,Ft.A)({as:S,className:(0,nr.A)(k.root,i),disabled:!(!w||!c)||void 0,onClick:p,onKeyDown:e=>{e.currentTarget===e.target&&kb(e)&&e.preventDefault(),m&&m(e)},onKeyUp:e=>{e.currentTarget===e.target&&(h&&kb(e)?h(e):"Escape"===e.key&&j.current&&j.current.blur()),f&&f(e)},ref:_,tabIndex:y&&c?-1:x,ownerState:A},T,b,{children:[M||O,(0,qt.jsx)(Ab,{className:(0,nr.A)(k.label),ownerState:A,children:u}),E]}))}),Eb=Tb;function Mb(e){return(0,sr.Ay)("MuiInputBase",e)}const Ob=(0,ar.A)("MuiInputBase",["root","formControl","focused","disabled","adornedStart","adornedEnd","error","sizeSmall","multiline","colorSecondary","fullWidth","hiddenLabel","readOnly","input","inputSizeSmall","inputMultiline","inputTypeSearch","inputAdornedStart","inputAdornedEnd","inputHiddenLabel"]);function Rb(e){return(0,sr.Ay)("MuiInput",e)}const Pb=(0,Ft.A)({},Ob,(0,ar.A)("MuiInput",["root","underline","input"]));function Db(e){return(0,sr.Ay)("MuiOutlinedInput",e)}const Nb=(0,Ft.A)({},Ob,(0,ar.A)("MuiOutlinedInput",["root","notchedOutline","input"]));function Lb(e){return(0,sr.Ay)("MuiFilledInput",e)}const Ib=(0,Ft.A)({},Ob,(0,ar.A)("MuiFilledInput",["root","underline","input"])),Fb=(0,Cy.A)((0,qt.jsx)("path",{d:"M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z"}),"Close"),$b=(0,Cy.A)((0,qt.jsx)("path",{d:"M7 10l5 5 5-5z"}),"ArrowDropDown");function Bb(e){return(0,sr.Ay)("MuiAutocomplete",e)}const zb=(0,ar.A)("MuiAutocomplete",["root","expanded","fullWidth","focused","focusVisible","tag","tagSizeSmall","tagSizeMedium","hasPopupIcon","hasClearIcon","inputRoot","input","inputFocused","endAdornment","clearIndicator","popupIndicator","popupIndicatorOpen","popper","popperDisablePortal","paper","listbox","loading","noOptions","option","groupLabel","groupUl"]);var Hb,Wb;const Ub=["autoComplete","autoHighlight","autoSelect","blurOnSelect","ChipProps","className","clearIcon","clearOnBlur","clearOnEscape","clearText","closeText","componentsProps","defaultValue","disableClearable","disableCloseOnSelect","disabled","disabledItemsFocusable","disableListWrap","disablePortal","filterOptions","filterSelectedOptions","forcePopupIcon","freeSolo","fullWidth","getLimitTagsText","getOptionDisabled","getOptionKey","getOptionLabel","isOptionEqualToValue","groupBy","handleHomeEndKeys","id","includeInputInList","inputValue","limitTags","ListboxComponent","ListboxProps","loading","loadingText","multiple","noOptionsText","onChange","onClose","onHighlightChange","onInputChange","onOpen","open","openOnFocus","openText","options","PaperComponent","PopperComponent","popupIcon","readOnly","renderGroup","renderInput","renderOption","renderTags","selectOnFocus","size","slotProps","value"],Vb=["ref"],Gb=["key"],qb=["key"],Yb=(0,Vn.Ay)("div",{name:"MuiAutocomplete",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e,{fullWidth:r,hasClearIcon:i,hasPopupIcon:o,inputFocused:a,size:s}=n;return[{["& .".concat(zb.tag)]:t.tag},{["& .".concat(zb.tag)]:t["tagSize".concat((0,pp.A)(s))]},{["& .".concat(zb.inputRoot)]:t.inputRoot},{["& .".concat(zb.input)]:t.input},{["& .".concat(zb.input)]:a&&t.inputFocused},t.root,r&&t.fullWidth,o&&t.hasPopupIcon,i&&t.hasClearIcon]}})({["&.".concat(zb.focused," .").concat(zb.clearIndicator)]:{visibility:"visible"},"@media (pointer: fine)":{["&:hover .".concat(zb.clearIndicator)]:{visibility:"visible"}},["& .".concat(zb.tag)]:{margin:3,maxWidth:"calc(100% - 6px)"},["& .".concat(zb.inputRoot)]:{[".".concat(zb.hasPopupIcon,"&, .").concat(zb.hasClearIcon,"&")]:{paddingRight:30},[".".concat(zb.hasPopupIcon,".").concat(zb.hasClearIcon,"&")]:{paddingRight:56},["& .".concat(zb.input)]:{width:0,minWidth:30}},["& .".concat(Pb.root)]:{paddingBottom:1,"& .MuiInput-input":{padding:"4px 4px 4px 0px"}},["& .".concat(Pb.root,".").concat(Ob.sizeSmall)]:{["& .".concat(Pb.input)]:{padding:"2px 4px 3px 0"}},["& .".concat(Nb.root)]:{padding:9,[".".concat(zb.hasPopupIcon,"&, .").concat(zb.hasClearIcon,"&")]:{paddingRight:39},[".".concat(zb.hasPopupIcon,".").concat(zb.hasClearIcon,"&")]:{paddingRight:65},["& .".concat(zb.input)]:{padding:"7.5px 4px 7.5px 5px"},["& .".concat(zb.endAdornment)]:{right:9}},["& .".concat(Nb.root,".").concat(Ob.sizeSmall)]:{paddingTop:6,paddingBottom:6,paddingLeft:6,["& .".concat(zb.input)]:{padding:"2.5px 4px 2.5px 8px"}},["& .".concat(Ib.root)]:{paddingTop:19,paddingLeft:8,[".".concat(zb.hasPopupIcon,"&, .").concat(zb.hasClearIcon,"&")]:{paddingRight:39},[".".concat(zb.hasPopupIcon,".").concat(zb.hasClearIcon,"&")]:{paddingRight:65},["& .".concat(Ib.input)]:{padding:"7px 4px"},["& .".concat(zb.endAdornment)]:{right:9}},["& .".concat(Ib.root,".").concat(Ob.sizeSmall)]:{paddingBottom:1,["& .".concat(Ib.input)]:{padding:"2.5px 4px"}},["& .".concat(Ob.hiddenLabel)]:{paddingTop:8},["& .".concat(Ib.root,".").concat(Ob.hiddenLabel)]:{paddingTop:0,paddingBottom:0,["& .".concat(zb.input)]:{paddingTop:16,paddingBottom:17}},["& .".concat(Ib.root,".").concat(Ob.hiddenLabel,".").concat(Ob.sizeSmall)]:{["& .".concat(zb.input)]:{paddingTop:8,paddingBottom:9}},["& .".concat(zb.input)]:{flexGrow:1,textOverflow:"ellipsis",opacity:0},variants:[{props:{fullWidth:!0},style:{width:"100%"}},{props:{size:"small"},style:{["& .".concat(zb.tag)]:{margin:2,maxWidth:"calc(100% - 4px)"}}},{props:{inputFocused:!0},style:{["& .".concat(zb.input)]:{opacity:1}}},{props:{multiple:!0},style:{["& .".concat(zb.inputRoot)]:{flexWrap:"wrap"}}}]}),Zb=(0,Vn.Ay)("div",{name:"MuiAutocomplete",slot:"EndAdornment",overridesResolver:(e,t)=>t.endAdornment})({position:"absolute",right:0,top:"50%",transform:"translate(0, -50%)"}),Kb=(0,Vn.Ay)(wh,{name:"MuiAutocomplete",slot:"ClearIndicator",overridesResolver:(e,t)=>t.clearIndicator})({marginRight:-2,padding:4,visibility:"hidden"}),Xb=(0,Vn.Ay)(wh,{name:"MuiAutocomplete",slot:"PopupIndicator",overridesResolver:(e,t)=>{let{ownerState:n}=e;return(0,Ft.A)({},t.popupIndicator,n.popupOpen&&t.popupIndicatorOpen)}})({padding:2,marginRight:-2,variants:[{props:{popupOpen:!0},style:{transform:"rotate(180deg)"}}]}),Qb=(0,Vn.Ay)(Gx,{name:"MuiAutocomplete",slot:"Popper",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[{["& .".concat(zb.option)]:t.option},t.popper,n.disablePortal&&t.popperDisablePortal]}})(e=>{let{theme:t}=e;return{zIndex:(t.vars||t).zIndex.modal,variants:[{props:{disablePortal:!0},style:{position:"absolute"}}]}}),Jb=(0,Vn.Ay)(yp,{name:"MuiAutocomplete",slot:"Paper",overridesResolver:(e,t)=>t.paper})(e=>{let{theme:t}=e;return(0,Ft.A)({},t.typography.body1,{overflow:"auto"})}),ej=(0,Vn.Ay)("div",{name:"MuiAutocomplete",slot:"Loading",overridesResolver:(e,t)=>t.loading})(e=>{let{theme:t}=e;return{color:(t.vars||t).palette.text.secondary,padding:"14px 16px"}}),tj=(0,Vn.Ay)("div",{name:"MuiAutocomplete",slot:"NoOptions",overridesResolver:(e,t)=>t.noOptions})(e=>{let{theme:t}=e;return{color:(t.vars||t).palette.text.secondary,padding:"14px 16px"}}),nj=(0,Vn.Ay)("div",{name:"MuiAutocomplete",slot:"Listbox",overridesResolver:(e,t)=>t.listbox})(e=>{let{theme:t}=e;return{listStyle:"none",margin:0,padding:"8px 0",maxHeight:"40vh",overflow:"auto",position:"relative",["& .".concat(zb.option)]:{minHeight:48,display:"flex",overflow:"hidden",justifyContent:"flex-start",alignItems:"center",cursor:"pointer",paddingTop:6,boxSizing:"border-box",outline:"0",WebkitTapHighlightColor:"transparent",paddingBottom:6,paddingLeft:16,paddingRight:16,[t.breakpoints.up("sm")]:{minHeight:"auto"},["&.".concat(zb.focused)]:{backgroundColor:(t.vars||t).palette.action.hover,"@media (hover: none)":{backgroundColor:"transparent"}},'&[aria-disabled="true"]':{opacity:(t.vars||t).palette.action.disabledOpacity,pointerEvents:"none"},["&.".concat(zb.focusVisible)]:{backgroundColor:(t.vars||t).palette.action.focus},'&[aria-selected="true"]':{backgroundColor:t.vars?"rgba(".concat(t.vars.palette.primary.mainChannel," / ").concat(t.vars.palette.action.selectedOpacity,")"):(0,hp.X4)(t.palette.primary.main,t.palette.action.selectedOpacity),["&.".concat(zb.focused)]:{backgroundColor:t.vars?"rgba(".concat(t.vars.palette.primary.mainChannel," / calc(").concat(t.vars.palette.action.selectedOpacity," + ").concat(t.vars.palette.action.hoverOpacity,"))"):(0,hp.X4)(t.palette.primary.main,t.palette.action.selectedOpacity+t.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:(t.vars||t).palette.action.selected}},["&.".concat(zb.focusVisible)]:{backgroundColor:t.vars?"rgba(".concat(t.vars.palette.primary.mainChannel," / calc(").concat(t.vars.palette.action.selectedOpacity," + ").concat(t.vars.palette.action.focusOpacity,"))"):(0,hp.X4)(t.palette.primary.main,t.palette.action.selectedOpacity+t.palette.action.focusOpacity)}}}}}),rj=(0,Vn.Ay)(bb,{name:"MuiAutocomplete",slot:"GroupLabel",overridesResolver:(e,t)=>t.groupLabel})(e=>{let{theme:t}=e;return{backgroundColor:(t.vars||t).palette.background.paper,top:-8}}),ij=(0,Vn.Ay)("ul",{name:"MuiAutocomplete",slot:"GroupUl",overridesResolver:(e,t)=>t.groupUl})({padding:0,["& .".concat(zb.option)]:{paddingLeft:24}}),oj=We.forwardRef(function(e,t){var n,r,i,o;const a=(0,$t.b)({props:e,name:"MuiAutocomplete"}),{autoComplete:s=!1,autoHighlight:l=!1,autoSelect:c=!1,blurOnSelect:d=!1,ChipProps:u,className:p,clearIcon:h=Hb||(Hb=(0,qt.jsx)(Fb,{fontSize:"small"})),clearOnBlur:m=!a.freeSolo,clearOnEscape:f=!1,clearText:g="Clear",closeText:v="Close",componentsProps:x={},defaultValue:y=(a.multiple?[]:null),disableClearable:b=!1,disableCloseOnSelect:j=!1,disabled:_=!1,disabledItemsFocusable:C=!1,disableListWrap:w=!1,disablePortal:S=!1,filterSelectedOptions:A=!1,forcePopupIcon:k="auto",freeSolo:T=!1,fullWidth:E=!1,getLimitTagsText:M=e=>"+".concat(e),getOptionLabel:O,groupBy:R,handleHomeEndKeys:P=!a.freeSolo,includeInputInList:D=!1,limitTags:N=-1,ListboxComponent:L="ul",ListboxProps:I,loading:F=!1,loadingText:$="Loading\u2026",multiple:B=!1,noOptionsText:z="No options",openOnFocus:H=!1,openText:W="Open",PaperComponent:U=yp,PopperComponent:V=Gx,popupIcon:G=Wb||(Wb=(0,qt.jsx)($b,{})),readOnly:q=!1,renderGroup:Y,renderInput:Z,renderOption:K,renderTags:X,selectOnFocus:Q=!a.freeSolo,size:J="medium",slotProps:ee={}}=a,te=(0,nn.A)(a,Ub),{getRootProps:ne,getInputProps:re,getInputLabelProps:ie,getPopupIndicatorProps:oe,getClearProps:ae,getTagProps:se,getListboxProps:le,getOptionProps:ce,value:de,dirty:ue,expanded:pe,id:he,popupOpen:me,focused:fe,focusedTag:ge,anchorEl:ve,setAnchorEl:xe,inputValue:ye,groupedOptions:be}=fb((0,Ft.A)({},a,{componentName:"Autocomplete"})),je=!b&&!_&&ue&&!q,_e=(!T||!0===k)&&!1!==k,{onMouseDown:Ce}=re(),{ref:we}=null!=I?I:{},Se=le(),{ref:Ae}=Se,ke=(0,nn.A)(Se,Vb),Te=(0,Ln.A)(Ae,we),Ee=O||(e=>{var t;return null!=(t=e.label)?t:e}),Me=(0,Ft.A)({},a,{disablePortal:S,expanded:pe,focused:fe,fullWidth:E,getOptionLabel:Ee,hasClearIcon:je,hasPopupIcon:_e,inputFocused:-1===ge,popupOpen:me,size:J}),Oe=(e=>{const{classes:t,disablePortal:n,expanded:r,focused:i,fullWidth:o,hasClearIcon:a,hasPopupIcon:s,inputFocused:l,popupOpen:c,size:d}=e,u={root:["root",r&&"expanded",i&&"focused",o&&"fullWidth",a&&"hasClearIcon",s&&"hasPopupIcon"],inputRoot:["inputRoot"],input:["input",l&&"inputFocused"],tag:["tag","tagSize".concat((0,pp.A)(d))],endAdornment:["endAdornment"],clearIndicator:["clearIndicator"],popupIndicator:["popupIndicator",c&&"popupIndicatorOpen"],popper:["popper",n&&"popperDisablePortal"],paper:["paper"],listbox:["listbox"],loading:["loading"],noOptions:["noOptions"],option:["option"],groupLabel:["groupLabel"],groupUl:["groupUl"]};return(0,ir.A)(u,Bb,t)})(Me);let Re;if(B&&de.length>0){const e=e=>(0,Ft.A)({className:Oe.tag,disabled:_},se(e));Re=X?X(de,e,Me):de.map((t,n)=>{const r=e({index:n}),{key:i}=r,o=(0,nn.A)(r,Gb);return(0,qt.jsx)(Eb,(0,Ft.A)({label:Ee(t),size:J},o,u),i)})}if(N>-1&&Array.isArray(Re)){const e=Re.length-N;!fe&&e>0&&(Re=Re.splice(0,N),Re.push((0,qt.jsx)("span",{className:Oe.tag,children:M(e)},Re.length)))}const Pe=Y||(e=>(0,qt.jsxs)("li",{children:[(0,qt.jsx)(rj,{className:Oe.groupLabel,ownerState:Me,component:"div",children:e.group}),(0,qt.jsx)(ij,{className:Oe.groupUl,ownerState:Me,children:e.children})]},e.key)),De=K||((e,t)=>{const{key:n}=e,r=(0,nn.A)(e,qb);return(0,qt.jsx)("li",(0,Ft.A)({},r,{children:Ee(t)}),n)}),Ne=(e,t)=>{const n=ce({option:e,index:t});return De((0,Ft.A)({},n,{className:Oe.option}),e,{selected:n["aria-selected"],index:t,inputValue:ye},Me)},Le=null!=(n=ee.clearIndicator)?n:x.clearIndicator,Ie=null!=(r=ee.paper)?r:x.paper,Fe=null!=(i=ee.popper)?i:x.popper,$e=null!=(o=ee.popupIndicator)?o:x.popupIndicator;return(0,qt.jsxs)(We.Fragment,{children:[(0,qt.jsx)(Yb,(0,Ft.A)({ref:t,className:(0,nr.A)(Oe.root,p),ownerState:Me},ne(te),{children:Z({id:he,disabled:_,fullWidth:!0,size:"small"===J?"small":void 0,InputLabelProps:ie(),InputProps:(0,Ft.A)({ref:xe,className:Oe.inputRoot,startAdornment:Re,onClick:e=>{e.target===e.currentTarget&&Ce(e)}},(je||_e)&&{endAdornment:(0,qt.jsxs)(Zb,{className:Oe.endAdornment,ownerState:Me,children:[je?(0,qt.jsx)(Kb,(0,Ft.A)({},ae(),{"aria-label":g,title:g,ownerState:Me},Le,{className:(0,nr.A)(Oe.clearIndicator,null==Le?void 0:Le.className),children:h})):null,_e?(0,qt.jsx)(Xb,(0,Ft.A)({},oe(),{disabled:_,"aria-label":me?v:W,title:me?v:W,ownerState:Me},$e,{className:(0,nr.A)(Oe.popupIndicator,null==$e?void 0:$e.className),children:G})):null]})}),inputProps:(0,Ft.A)({className:Oe.input,disabled:_,readOnly:q},re())})})),ve?(0,qt.jsx)(Qb,(0,Ft.A)({as:V,disablePortal:S,style:{width:ve?ve.clientWidth:null},ownerState:Me,role:"presentation",anchorEl:ve,open:me},Fe,{className:(0,nr.A)(Oe.popper,null==Fe?void 0:Fe.className),children:(0,qt.jsxs)(Jb,(0,Ft.A)({ownerState:Me,as:U},Ie,{className:(0,nr.A)(Oe.paper,null==Ie?void 0:Ie.className),children:[F&&0===be.length?(0,qt.jsx)(ej,{className:Oe.loading,ownerState:Me,children:$}):null,0!==be.length||T||F?null:(0,qt.jsx)(tj,{className:Oe.noOptions,ownerState:Me,role:"presentation",onMouseDown:e=>{e.preventDefault()},children:z}),be.length>0?(0,qt.jsx)(nj,(0,Ft.A)({as:L,className:Oe.listbox,ownerState:Me},ke,I,{ref:Te,children:be.map((e,t)=>R?Pe({key:e.key,group:e.group,children:e.options.map((t,n)=>Ne(t,e.index+n))}):Ne(e,t))})):null]}))})):null]})}),aj=oj;var sj=n(19172),lj=n(83468);const cj=["onChange","maxRows","minRows","style","value"];function dj(e){return parseInt(e,10)||0}const uj={visibility:"hidden",position:"absolute",overflow:"hidden",height:0,top:0,left:0,transform:"translateZ(0)"};function pj(e){return function(e){for(const t in e)return!1;return!0}(e)||0===e.outerHeightStyle&&!e.overflowing}const hj=We.forwardRef(function(e,t){const{onChange:n,maxRows:r,minRows:i=1,style:o,value:a}=e,s=(0,nn.A)(e,cj),{current:l}=We.useRef(null!=a),c=We.useRef(null),d=(0,gr.A)(t,c),u=We.useRef(null),p=We.useRef(null),h=We.useCallback(()=>{const t=c.current,n=p.current;if(!t||!n)return;const o=(0,bm.A)(t).getComputedStyle(t);if("0px"===o.width)return{outerHeightStyle:0,overflowing:!1};n.style.width=o.width,n.value=t.value||e.placeholder||"x","\n"===n.value.slice(-1)&&(n.value+=" ");const a=o.boxSizing,s=dj(o.paddingBottom)+dj(o.paddingTop),l=dj(o.borderBottomWidth)+dj(o.borderTopWidth),d=n.scrollHeight;n.value="x";const u=n.scrollHeight;let h=d;i&&(h=Math.max(Number(i)*u,h)),r&&(h=Math.min(Number(r)*u,h)),h=Math.max(h,u);return{outerHeightStyle:h+("border-box"===a?s+l:0),overflowing:Math.abs(h-d)<=1}},[r,i,e.placeholder]),m=(0,vr.A)(()=>{const e=c.current,t=h();if(!e||!t||pj(t))return!1;const n=t.outerHeightStyle;return null!=u.current&&u.current!==n}),f=We.useCallback(()=>{const e=c.current,t=h();if(!e||!t||pj(t))return;const n=t.outerHeightStyle;u.current!==n&&(u.current=n,e.style.height="".concat(n,"px")),e.style.overflow=t.overflowing?"hidden":""},[h]),g=We.useRef(-1);(0,hn.A)(()=>{const e=(0,lj.A)(f),t=null==c?void 0:c.current;if(!t)return;const n=(0,bm.A)(t);let r;return n.addEventListener("resize",e),"undefined"!==typeof ResizeObserver&&(r=new ResizeObserver(()=>{m()&&(r.unobserve(t),cancelAnimationFrame(g.current),f(),g.current=requestAnimationFrame(()=>{r.observe(t)}))}),r.observe(t)),()=>{e.clear(),cancelAnimationFrame(g.current),n.removeEventListener("resize",e),r&&r.disconnect()}},[h,f,m]),(0,hn.A)(()=>{f()});return(0,qt.jsxs)(We.Fragment,{children:[(0,qt.jsx)("textarea",(0,Ft.A)({value:a,onChange:e=>{l||f(),n&&n(e)},ref:d,rows:i,style:o},s)),(0,qt.jsx)("textarea",{"aria-hidden":!0,className:e.className,readOnly:!0,ref:p,tabIndex:-1,style:(0,Ft.A)({},uj,o,{paddingTop:0,paddingBottom:0})})]})}),mj=hj;function fj(e){let{props:t,states:n,muiFormControl:r}=e;return n.reduce((e,n)=>(e[n]=t[n],r&&"undefined"===typeof t[n]&&(e[n]=r[n]),e),{})}const gj=We.createContext(void 0);function vj(){return We.useContext(gj)}function xj(e){return null!=e&&!(Array.isArray(e)&&0===e.length)}function yj(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return e&&(xj(e.value)&&""!==e.value||t&&xj(e.defaultValue)&&""!==e.defaultValue)}const bj=["aria-describedby","autoComplete","autoFocus","className","color","components","componentsProps","defaultValue","disabled","disableInjectingGlobalStyles","endAdornment","error","fullWidth","id","inputComponent","inputProps","inputRef","margin","maxRows","minRows","multiline","name","onBlur","onChange","onClick","onFocus","onKeyDown","onKeyUp","placeholder","readOnly","renderSuffix","rows","size","slotProps","slots","startAdornment","type","value"],jj=(e,t)=>{const{ownerState:n}=e;return[t.root,n.formControl&&t.formControl,n.startAdornment&&t.adornedStart,n.endAdornment&&t.adornedEnd,n.error&&t.error,"small"===n.size&&t.sizeSmall,n.multiline&&t.multiline,n.color&&t["color".concat((0,pp.A)(n.color))],n.fullWidth&&t.fullWidth,n.hiddenLabel&&t.hiddenLabel]},_j=(e,t)=>{const{ownerState:n}=e;return[t.input,"small"===n.size&&t.inputSizeSmall,n.multiline&&t.inputMultiline,"search"===n.type&&t.inputTypeSearch,n.startAdornment&&t.inputAdornedStart,n.endAdornment&&t.inputAdornedEnd,n.hiddenLabel&&t.inputHiddenLabel]},Cj=(0,Vn.Ay)("div",{name:"MuiInputBase",slot:"Root",overridesResolver:jj})(e=>{let{theme:t,ownerState:n}=e;return(0,Ft.A)({},t.typography.body1,{color:(t.vars||t).palette.text.primary,lineHeight:"1.4375em",boxSizing:"border-box",position:"relative",cursor:"text",display:"inline-flex",alignItems:"center",["&.".concat(Ob.disabled)]:{color:(t.vars||t).palette.text.disabled,cursor:"default"}},n.multiline&&(0,Ft.A)({padding:"4px 0 5px"},"small"===n.size&&{paddingTop:1}),n.fullWidth&&{width:"100%"})}),wj=(0,Vn.Ay)("input",{name:"MuiInputBase",slot:"Input",overridesResolver:_j})(e=>{let{theme:t,ownerState:n}=e;const r="light"===t.palette.mode,i=(0,Ft.A)({color:"currentColor"},t.vars?{opacity:t.vars.opacity.inputPlaceholder}:{opacity:r?.42:.5},{transition:t.transitions.create("opacity",{duration:t.transitions.duration.shorter})}),o={opacity:"0 !important"},a=t.vars?{opacity:t.vars.opacity.inputPlaceholder}:{opacity:r?.42:.5};return(0,Ft.A)({font:"inherit",letterSpacing:"inherit",color:"currentColor",padding:"4px 0 5px",border:0,boxSizing:"content-box",background:"none",height:"1.4375em",margin:0,WebkitTapHighlightColor:"transparent",display:"block",minWidth:0,width:"100%",animationName:"mui-auto-fill-cancel",animationDuration:"10ms","&::-webkit-input-placeholder":i,"&::-moz-placeholder":i,"&:-ms-input-placeholder":i,"&::-ms-input-placeholder":i,"&:focus":{outline:0},"&:invalid":{boxShadow:"none"},"&::-webkit-search-decoration":{WebkitAppearance:"none"},["label[data-shrink=false] + .".concat(Ob.formControl," &")]:{"&::-webkit-input-placeholder":o,"&::-moz-placeholder":o,"&:-ms-input-placeholder":o,"&::-ms-input-placeholder":o,"&:focus::-webkit-input-placeholder":a,"&:focus::-moz-placeholder":a,"&:focus:-ms-input-placeholder":a,"&:focus::-ms-input-placeholder":a},["&.".concat(Ob.disabled)]:{opacity:1,WebkitTextFillColor:(t.vars||t).palette.text.disabled},"&:-webkit-autofill":{animationDuration:"5000s",animationName:"mui-auto-fill"}},"small"===n.size&&{paddingTop:1},n.multiline&&{height:"auto",resize:"none",padding:0,paddingTop:0},"search"===n.type&&{MozAppearance:"textfield"})}),Sj=(0,qt.jsx)(Qt,{styles:{"@keyframes mui-auto-fill":{from:{display:"block"}},"@keyframes mui-auto-fill-cancel":{from:{display:"block"}}}}),Aj=We.forwardRef(function(e,t){var n;const r=(0,$t.b)({props:e,name:"MuiInputBase"}),{"aria-describedby":i,autoComplete:o,autoFocus:a,className:s,components:l={},componentsProps:c={},defaultValue:d,disabled:u,disableInjectingGlobalStyles:p,endAdornment:h,fullWidth:m=!1,id:f,inputComponent:g="input",inputProps:v={},inputRef:x,maxRows:y,minRows:b,multiline:j=!1,name:_,onBlur:C,onChange:w,onClick:S,onFocus:A,onKeyDown:k,onKeyUp:T,placeholder:E,readOnly:M,renderSuffix:O,rows:R,slotProps:P={},slots:D={},startAdornment:N,type:L="text",value:I}=r,F=(0,nn.A)(r,bj),$=null!=v.value?v.value:I,{current:B}=We.useRef(null!=$),z=We.useRef(),H=We.useCallback(e=>{0},[]),W=(0,Ln.A)(z,x,v.ref,H),[U,V]=We.useState(!1),G=vj();const q=fj({props:r,muiFormControl:G,states:["color","disabled","error","hiddenLabel","size","required","filled"]});q.focused=G?G.focused:U,We.useEffect(()=>{!G&&u&&U&&(V(!1),C&&C())},[G,u,U,C]);const Y=G&&G.onFilled,Z=G&&G.onEmpty,K=We.useCallback(e=>{yj(e)?Y&&Y():Z&&Z()},[Y,Z]);(0,Uh.A)(()=>{B&&K({value:$})},[$,K,B]);We.useEffect(()=>{K(z.current)},[]);let X=g,Q=v;j&&"input"===X&&(Q=R?(0,Ft.A)({type:void 0,minRows:R,maxRows:R},Q):(0,Ft.A)({type:void 0,maxRows:y,minRows:b},Q),X=mj);We.useEffect(()=>{G&&G.setAdornedStart(Boolean(N))},[G,N]);const J=(0,Ft.A)({},r,{color:q.color||"primary",disabled:q.disabled,endAdornment:h,error:q.error,focused:q.focused,formControl:G,fullWidth:m,hiddenLabel:q.hiddenLabel,multiline:j,size:q.size,startAdornment:N,type:L}),ee=(e=>{const{classes:t,color:n,disabled:r,error:i,endAdornment:o,focused:a,formControl:s,fullWidth:l,hiddenLabel:c,multiline:d,readOnly:u,size:p,startAdornment:h,type:m}=e,f={root:["root","color".concat((0,pp.A)(n)),r&&"disabled",i&&"error",l&&"fullWidth",a&&"focused",s&&"formControl",p&&"medium"!==p&&"size".concat((0,pp.A)(p)),d&&"multiline",h&&"adornedStart",o&&"adornedEnd",c&&"hiddenLabel",u&&"readOnly"],input:["input",r&&"disabled","search"===m&&"inputTypeSearch",d&&"inputMultiline","small"===p&&"inputSizeSmall",c&&"inputHiddenLabel",h&&"inputAdornedStart",o&&"inputAdornedEnd",u&&"readOnly"]};return(0,ir.A)(f,Mb,t)})(J),te=D.root||l.Root||Cj,ne=P.root||c.root||{},re=D.input||l.Input||wj;return Q=(0,Ft.A)({},Q,null!=(n=P.input)?n:c.input),(0,qt.jsxs)(We.Fragment,{children:[!p&&Sj,(0,qt.jsxs)(te,(0,Ft.A)({},ne,!Sh(te)&&{ownerState:(0,Ft.A)({},J,ne.ownerState)},{ref:t,onClick:e=>{z.current&&e.currentTarget===e.target&&z.current.focus(),S&&S(e)}},F,{className:(0,nr.A)(ee.root,ne.className,s,M&&"MuiInputBase-readOnly"),children:[N,(0,qt.jsx)(gj.Provider,{value:null,children:(0,qt.jsx)(re,(0,Ft.A)({ownerState:J,"aria-invalid":q.error,"aria-describedby":i,autoComplete:o,autoFocus:a,defaultValue:d,disabled:q.disabled,id:f,onAnimationStart:e=>{K("mui-auto-fill-cancel"===e.animationName?z.current:{value:"x"})},name:_,placeholder:E,readOnly:M,required:q.required,rows:R,value:$,onKeyDown:k,onKeyUp:T,type:L},Q,!Sh(re)&&{as:X,ownerState:(0,Ft.A)({},J,Q.ownerState)},{ref:W,className:(0,nr.A)(ee.input,Q.className,M&&"MuiInputBase-readOnly"),onBlur:e=>{C&&C(e),v.onBlur&&v.onBlur(e),G&&G.onBlur?G.onBlur(e):V(!1)},onChange:function(e){if(!B){const t=e.target||z.current;if(null==t)throw new Error((0,Gn.A)(1));K({value:t.value})}for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];v.onChange&&v.onChange(e,...n),w&&w(e,...n)},onFocus:e=>{q.disabled?e.stopPropagation():(A&&A(e),v.onFocus&&v.onFocus(e),G&&G.onFocus?G.onFocus(e):V(!0))}}))}),h,O?O((0,Ft.A)({},q,{startAdornment:N})):null]}))]})}),kj=Aj,Tj=["disableUnderline","components","componentsProps","fullWidth","inputComponent","multiline","slotProps","slots","type"],Ej=(0,Vn.Ay)(Cj,{shouldForwardProp:e=>(0,kp.A)(e)||"classes"===e,name:"MuiInput",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[...jj(e,t),!n.disableUnderline&&t.underline]}})(e=>{let{theme:t,ownerState:n}=e;let r="light"===t.palette.mode?"rgba(0, 0, 0, 0.42)":"rgba(255, 255, 255, 0.7)";return t.vars&&(r="rgba(".concat(t.vars.palette.common.onBackgroundChannel," / ").concat(t.vars.opacity.inputUnderline,")")),(0,Ft.A)({position:"relative"},n.formControl&&{"label + &":{marginTop:16}},!n.disableUnderline&&{"&::after":{borderBottom:"2px solid ".concat((t.vars||t).palette[n.color].main),left:0,bottom:0,content:'""',position:"absolute",right:0,transform:"scaleX(0)",transition:t.transitions.create("transform",{duration:t.transitions.duration.shorter,easing:t.transitions.easing.easeOut}),pointerEvents:"none"},["&.".concat(Pb.focused,":after")]:{transform:"scaleX(1) translateX(0)"},["&.".concat(Pb.error)]:{"&::before, &::after":{borderBottomColor:(t.vars||t).palette.error.main}},"&::before":{borderBottom:"1px solid ".concat(r),left:0,bottom:0,content:'"\\00a0"',position:"absolute",right:0,transition:t.transitions.create("border-bottom-color",{duration:t.transitions.duration.shorter}),pointerEvents:"none"},["&:hover:not(.".concat(Pb.disabled,", .").concat(Pb.error,"):before")]:{borderBottom:"2px solid ".concat((t.vars||t).palette.text.primary),"@media (hover: none)":{borderBottom:"1px solid ".concat(r)}},["&.".concat(Pb.disabled,":before")]:{borderBottomStyle:"dotted"}})}),Mj=(0,Vn.Ay)(wj,{name:"MuiInput",slot:"Input",overridesResolver:_j})({}),Oj=We.forwardRef(function(e,t){var n,r,i,o;const a=(0,$t.b)({props:e,name:"MuiInput"}),{disableUnderline:s,components:l={},componentsProps:c,fullWidth:d=!1,inputComponent:u="input",multiline:p=!1,slotProps:h,slots:m={},type:f="text"}=a,g=(0,nn.A)(a,Tj),v=(e=>{const{classes:t,disableUnderline:n}=e,r={root:["root",!n&&"underline"],input:["input"]},i=(0,ir.A)(r,Rb,t);return(0,Ft.A)({},t,i)})(a),x={root:{ownerState:{disableUnderline:s}}},y=(null!=h?h:c)?(0,sj.A)(null!=h?h:c,x):x,b=null!=(n=null!=(r=m.root)?r:l.Root)?n:Ej,j=null!=(i=null!=(o=m.input)?o:l.Input)?i:Mj;return(0,qt.jsx)(kj,(0,Ft.A)({slots:{root:b,input:j},slotProps:y,fullWidth:d,inputComponent:u,multiline:p,ref:t,type:f},g,{classes:v}))});Oj.muiName="Input";const Rj=Oj,Pj=["disableUnderline","components","componentsProps","fullWidth","hiddenLabel","inputComponent","multiline","slotProps","slots","type"],Dj=(0,Vn.Ay)(Cj,{shouldForwardProp:e=>(0,kp.A)(e)||"classes"===e,name:"MuiFilledInput",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[...jj(e,t),!n.disableUnderline&&t.underline]}})(e=>{let{theme:t,ownerState:n}=e;var r;const i="light"===t.palette.mode,o=i?"rgba(0, 0, 0, 0.42)":"rgba(255, 255, 255, 0.7)",a=i?"rgba(0, 0, 0, 0.06)":"rgba(255, 255, 255, 0.09)",s=i?"rgba(0, 0, 0, 0.09)":"rgba(255, 255, 255, 0.13)",l=i?"rgba(0, 0, 0, 0.12)":"rgba(255, 255, 255, 0.12)";return(0,Ft.A)({position:"relative",backgroundColor:t.vars?t.vars.palette.FilledInput.bg:a,borderTopLeftRadius:(t.vars||t).shape.borderRadius,borderTopRightRadius:(t.vars||t).shape.borderRadius,transition:t.transitions.create("background-color",{duration:t.transitions.duration.shorter,easing:t.transitions.easing.easeOut}),"&:hover":{backgroundColor:t.vars?t.vars.palette.FilledInput.hoverBg:s,"@media (hover: none)":{backgroundColor:t.vars?t.vars.palette.FilledInput.bg:a}},["&.".concat(Ib.focused)]:{backgroundColor:t.vars?t.vars.palette.FilledInput.bg:a},["&.".concat(Ib.disabled)]:{backgroundColor:t.vars?t.vars.palette.FilledInput.disabledBg:l}},!n.disableUnderline&&{"&::after":{borderBottom:"2px solid ".concat(null==(r=(t.vars||t).palette[n.color||"primary"])?void 0:r.main),left:0,bottom:0,content:'""',position:"absolute",right:0,transform:"scaleX(0)",transition:t.transitions.create("transform",{duration:t.transitions.duration.shorter,easing:t.transitions.easing.easeOut}),pointerEvents:"none"},["&.".concat(Ib.focused,":after")]:{transform:"scaleX(1) translateX(0)"},["&.".concat(Ib.error)]:{"&::before, &::after":{borderBottomColor:(t.vars||t).palette.error.main}},"&::before":{borderBottom:"1px solid ".concat(t.vars?"rgba(".concat(t.vars.palette.common.onBackgroundChannel," / ").concat(t.vars.opacity.inputUnderline,")"):o),left:0,bottom:0,content:'"\\00a0"',position:"absolute",right:0,transition:t.transitions.create("border-bottom-color",{duration:t.transitions.duration.shorter}),pointerEvents:"none"},["&:hover:not(.".concat(Ib.disabled,", .").concat(Ib.error,"):before")]:{borderBottom:"1px solid ".concat((t.vars||t).palette.text.primary)},["&.".concat(Ib.disabled,":before")]:{borderBottomStyle:"dotted"}},n.startAdornment&&{paddingLeft:12},n.endAdornment&&{paddingRight:12},n.multiline&&(0,Ft.A)({padding:"25px 12px 8px"},"small"===n.size&&{paddingTop:21,paddingBottom:4},n.hiddenLabel&&{paddingTop:16,paddingBottom:17},n.hiddenLabel&&"small"===n.size&&{paddingTop:8,paddingBottom:9}))}),Nj=(0,Vn.Ay)(wj,{name:"MuiFilledInput",slot:"Input",overridesResolver:_j})(e=>{let{theme:t,ownerState:n}=e;return(0,Ft.A)({paddingTop:25,paddingRight:12,paddingBottom:8,paddingLeft:12},!t.vars&&{"&:-webkit-autofill":{WebkitBoxShadow:"light"===t.palette.mode?null:"0 0 0 100px #266798 inset",WebkitTextFillColor:"light"===t.palette.mode?null:"#fff",caretColor:"light"===t.palette.mode?null:"#fff",borderTopLeftRadius:"inherit",borderTopRightRadius:"inherit"}},t.vars&&{"&:-webkit-autofill":{borderTopLeftRadius:"inherit",borderTopRightRadius:"inherit"},[t.getColorSchemeSelector("dark")]:{"&:-webkit-autofill":{WebkitBoxShadow:"0 0 0 100px #266798 inset",WebkitTextFillColor:"#fff",caretColor:"#fff"}}},"small"===n.size&&{paddingTop:21,paddingBottom:4},n.hiddenLabel&&{paddingTop:16,paddingBottom:17},n.startAdornment&&{paddingLeft:0},n.endAdornment&&{paddingRight:0},n.hiddenLabel&&"small"===n.size&&{paddingTop:8,paddingBottom:9},n.multiline&&{paddingTop:0,paddingBottom:0,paddingLeft:0,paddingRight:0})}),Lj=We.forwardRef(function(e,t){var n,r,i,o;const a=(0,$t.b)({props:e,name:"MuiFilledInput"}),{components:s={},componentsProps:l,fullWidth:c=!1,inputComponent:d="input",multiline:u=!1,slotProps:p,slots:h={},type:m="text"}=a,f=(0,nn.A)(a,Pj),g=(0,Ft.A)({},a,{fullWidth:c,inputComponent:d,multiline:u,type:m}),v=(e=>{const{classes:t,disableUnderline:n}=e,r={root:["root",!n&&"underline"],input:["input"]},i=(0,ir.A)(r,Lb,t);return(0,Ft.A)({},t,i)})(a),x={root:{ownerState:g},input:{ownerState:g}},y=(null!=p?p:l)?(0,sj.A)(x,null!=p?p:l):x,b=null!=(n=null!=(r=h.root)?r:s.Root)?n:Dj,j=null!=(i=null!=(o=h.input)?o:s.Input)?i:Nj;return(0,qt.jsx)(kj,(0,Ft.A)({slots:{root:b,input:j},componentsProps:y,fullWidth:c,inputComponent:d,multiline:u,ref:t,type:m},f,{classes:v}))});Lj.muiName="Input";const Ij=Lj;var Fj;const $j=["children","classes","className","label","notched"],Bj=(0,Vn.Ay)("fieldset",{name:"MuiNotchedOutlined",shouldForwardProp:kp.A})({textAlign:"left",position:"absolute",bottom:0,right:0,top:-5,left:0,margin:0,padding:"0 8px",pointerEvents:"none",borderRadius:"inherit",borderStyle:"solid",borderWidth:1,overflow:"hidden",minWidth:"0%"}),zj=(0,Vn.Ay)("legend",{name:"MuiNotchedOutlined",shouldForwardProp:kp.A})(e=>{let{ownerState:t,theme:n}=e;return(0,Ft.A)({float:"unset",width:"auto",overflow:"hidden"},!t.withLabel&&{padding:0,lineHeight:"11px",transition:n.transitions.create("width",{duration:150,easing:n.transitions.easing.easeOut})},t.withLabel&&(0,Ft.A)({display:"block",padding:0,height:11,fontSize:"0.75em",visibility:"hidden",maxWidth:.01,transition:n.transitions.create("max-width",{duration:50,easing:n.transitions.easing.easeOut}),whiteSpace:"nowrap","& > span":{paddingLeft:5,paddingRight:5,display:"inline-block",opacity:0,visibility:"visible"}},t.notched&&{maxWidth:"100%",transition:n.transitions.create("max-width",{duration:100,easing:n.transitions.easing.easeOut,delay:50})}))});const Hj=["components","fullWidth","inputComponent","label","multiline","notched","slots","type"],Wj=(0,Vn.Ay)(Cj,{shouldForwardProp:e=>(0,kp.A)(e)||"classes"===e,name:"MuiOutlinedInput",slot:"Root",overridesResolver:jj})(e=>{let{theme:t,ownerState:n}=e;const r="light"===t.palette.mode?"rgba(0, 0, 0, 0.23)":"rgba(255, 255, 255, 0.23)";return(0,Ft.A)({position:"relative",borderRadius:(t.vars||t).shape.borderRadius,["&:hover .".concat(Nb.notchedOutline)]:{borderColor:(t.vars||t).palette.text.primary},"@media (hover: none)":{["&:hover .".concat(Nb.notchedOutline)]:{borderColor:t.vars?"rgba(".concat(t.vars.palette.common.onBackgroundChannel," / 0.23)"):r}},["&.".concat(Nb.focused," .").concat(Nb.notchedOutline)]:{borderColor:(t.vars||t).palette[n.color].main,borderWidth:2},["&.".concat(Nb.error," .").concat(Nb.notchedOutline)]:{borderColor:(t.vars||t).palette.error.main},["&.".concat(Nb.disabled," .").concat(Nb.notchedOutline)]:{borderColor:(t.vars||t).palette.action.disabled}},n.startAdornment&&{paddingLeft:14},n.endAdornment&&{paddingRight:14},n.multiline&&(0,Ft.A)({padding:"16.5px 14px"},"small"===n.size&&{padding:"8.5px 14px"}))}),Uj=(0,Vn.Ay)(function(e){const{className:t,label:n,notched:r}=e,i=(0,nn.A)(e,$j),o=null!=n&&""!==n,a=(0,Ft.A)({},e,{notched:r,withLabel:o});return(0,qt.jsx)(Bj,(0,Ft.A)({"aria-hidden":!0,className:t,ownerState:a},i,{children:(0,qt.jsx)(zj,{ownerState:a,children:o?(0,qt.jsx)("span",{children:n}):Fj||(Fj=(0,qt.jsx)("span",{className:"notranslate",children:"\u200b"}))})}))},{name:"MuiOutlinedInput",slot:"NotchedOutline",overridesResolver:(e,t)=>t.notchedOutline})(e=>{let{theme:t}=e;const n="light"===t.palette.mode?"rgba(0, 0, 0, 0.23)":"rgba(255, 255, 255, 0.23)";return{borderColor:t.vars?"rgba(".concat(t.vars.palette.common.onBackgroundChannel," / 0.23)"):n}}),Vj=(0,Vn.Ay)(wj,{name:"MuiOutlinedInput",slot:"Input",overridesResolver:_j})(e=>{let{theme:t,ownerState:n}=e;return(0,Ft.A)({padding:"16.5px 14px"},!t.vars&&{"&:-webkit-autofill":{WebkitBoxShadow:"light"===t.palette.mode?null:"0 0 0 100px #266798 inset",WebkitTextFillColor:"light"===t.palette.mode?null:"#fff",caretColor:"light"===t.palette.mode?null:"#fff",borderRadius:"inherit"}},t.vars&&{"&:-webkit-autofill":{borderRadius:"inherit"},[t.getColorSchemeSelector("dark")]:{"&:-webkit-autofill":{WebkitBoxShadow:"0 0 0 100px #266798 inset",WebkitTextFillColor:"#fff",caretColor:"#fff"}}},"small"===n.size&&{padding:"8.5px 14px"},n.multiline&&{padding:0},n.startAdornment&&{paddingLeft:0},n.endAdornment&&{paddingRight:0})}),Gj=We.forwardRef(function(e,t){var n,r,i,o,a;const s=(0,$t.b)({props:e,name:"MuiOutlinedInput"}),{components:l={},fullWidth:c=!1,inputComponent:d="input",label:u,multiline:p=!1,notched:h,slots:m={},type:f="text"}=s,g=(0,nn.A)(s,Hj),v=(e=>{const{classes:t}=e,n=(0,ir.A)({root:["root"],notchedOutline:["notchedOutline"],input:["input"]},Db,t);return(0,Ft.A)({},t,n)})(s),x=vj(),y=fj({props:s,muiFormControl:x,states:["color","disabled","error","focused","hiddenLabel","size","required"]}),b=(0,Ft.A)({},s,{color:y.color||"primary",disabled:y.disabled,error:y.error,focused:y.focused,formControl:x,fullWidth:c,hiddenLabel:y.hiddenLabel,multiline:p,size:y.size,type:f}),j=null!=(n=null!=(r=m.root)?r:l.Root)?n:Wj,_=null!=(i=null!=(o=m.input)?o:l.Input)?i:Vj;return(0,qt.jsx)(kj,(0,Ft.A)({slots:{root:j,input:_},renderSuffix:e=>(0,qt.jsx)(Uj,{ownerState:b,className:v.notchedOutline,label:null!=u&&""!==u&&y.required?a||(a=(0,qt.jsxs)(We.Fragment,{children:[u,"\u2009","*"]})):u,notched:"undefined"!==typeof h?h:Boolean(e.startAdornment||e.filled||e.focused)}),fullWidth:c,inputComponent:d,multiline:p,ref:t,type:f},g,{classes:(0,Ft.A)({},v,{notchedOutline:null})}))});Gj.muiName="Input";const qj=Gj;function Yj(e){return(0,sr.Ay)("MuiFormLabel",e)}const Zj=(0,ar.A)("MuiFormLabel",["root","colorSecondary","focused","disabled","error","filled","required","asterisk"]),Kj=["children","className","color","component","disabled","error","filled","focused","required"],Xj=(0,Vn.Ay)("label",{name:"MuiFormLabel",slot:"Root",overridesResolver:(e,t)=>{let{ownerState:n}=e;return(0,Ft.A)({},t.root,"secondary"===n.color&&t.colorSecondary,n.filled&&t.filled)}})(e=>{let{theme:t,ownerState:n}=e;return(0,Ft.A)({color:(t.vars||t).palette.text.secondary},t.typography.body1,{lineHeight:"1.4375em",padding:0,position:"relative",["&.".concat(Zj.focused)]:{color:(t.vars||t).palette[n.color].main},["&.".concat(Zj.disabled)]:{color:(t.vars||t).palette.text.disabled},["&.".concat(Zj.error)]:{color:(t.vars||t).palette.error.main}})}),Qj=(0,Vn.Ay)("span",{name:"MuiFormLabel",slot:"Asterisk",overridesResolver:(e,t)=>t.asterisk})(e=>{let{theme:t}=e;return{["&.".concat(Zj.error)]:{color:(t.vars||t).palette.error.main}}}),Jj=We.forwardRef(function(e,t){const n=(0,$t.b)({props:e,name:"MuiFormLabel"}),{children:r,className:i,component:o="label"}=n,a=(0,nn.A)(n,Kj),s=fj({props:n,muiFormControl:vj(),states:["color","required","focused","disabled","error","filled"]}),l=(0,Ft.A)({},n,{color:s.color||"primary",component:o,disabled:s.disabled,error:s.error,filled:s.filled,focused:s.focused,required:s.required}),c=(e=>{const{classes:t,color:n,focused:r,disabled:i,error:o,filled:a,required:s}=e,l={root:["root","color".concat((0,pp.A)(n)),i&&"disabled",o&&"error",a&&"filled",r&&"focused",s&&"required"],asterisk:["asterisk",o&&"error"]};return(0,ir.A)(l,Yj,t)})(l);return(0,qt.jsxs)(Xj,(0,Ft.A)({as:o,ownerState:l,className:(0,nr.A)(c.root,i),ref:t},a,{children:[r,s.required&&(0,qt.jsxs)(Qj,{ownerState:l,"aria-hidden":!0,className:c.asterisk,children:["\u2009","*"]})]}))}),e_=Jj;function t_(e){return(0,sr.Ay)("MuiInputLabel",e)}(0,ar.A)("MuiInputLabel",["root","focused","disabled","error","required","asterisk","formControl","sizeSmall","shrink","animated","standard","filled","outlined"]);const n_=["disableAnimation","margin","shrink","variant","className"],r_=(0,Vn.Ay)(e_,{shouldForwardProp:e=>(0,kp.A)(e)||"classes"===e,name:"MuiInputLabel",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[{["& .".concat(Zj.asterisk)]:t.asterisk},t.root,n.formControl&&t.formControl,"small"===n.size&&t.sizeSmall,n.shrink&&t.shrink,!n.disableAnimation&&t.animated,n.focused&&t.focused,t[n.variant]]}})(e=>{let{theme:t,ownerState:n}=e;return(0,Ft.A)({display:"block",transformOrigin:"top left",whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis",maxWidth:"100%"},n.formControl&&{position:"absolute",left:0,top:0,transform:"translate(0, 20px) scale(1)"},"small"===n.size&&{transform:"translate(0, 17px) scale(1)"},n.shrink&&{transform:"translate(0, -1.5px) scale(0.75)",transformOrigin:"top left",maxWidth:"133%"},!n.disableAnimation&&{transition:t.transitions.create(["color","transform","max-width"],{duration:t.transitions.duration.shorter,easing:t.transitions.easing.easeOut})},"filled"===n.variant&&(0,Ft.A)({zIndex:1,pointerEvents:"none",transform:"translate(12px, 16px) scale(1)",maxWidth:"calc(100% - 24px)"},"small"===n.size&&{transform:"translate(12px, 13px) scale(1)"},n.shrink&&(0,Ft.A)({userSelect:"none",pointerEvents:"auto",transform:"translate(12px, 7px) scale(0.75)",maxWidth:"calc(133% - 24px)"},"small"===n.size&&{transform:"translate(12px, 4px) scale(0.75)"})),"outlined"===n.variant&&(0,Ft.A)({zIndex:1,pointerEvents:"none",transform:"translate(14px, 16px) scale(1)",maxWidth:"calc(100% - 24px)"},"small"===n.size&&{transform:"translate(14px, 9px) scale(1)"},n.shrink&&{userSelect:"none",pointerEvents:"auto",maxWidth:"calc(133% - 32px)",transform:"translate(14px, -9px) scale(0.75)"}))}),i_=We.forwardRef(function(e,t){const n=(0,$t.b)({name:"MuiInputLabel",props:e}),{disableAnimation:r=!1,shrink:i,className:o}=n,a=(0,nn.A)(n,n_),s=vj();let l=i;"undefined"===typeof l&&s&&(l=s.filled||s.focused||s.adornedStart);const c=fj({props:n,muiFormControl:s,states:["size","variant","required","focused"]}),d=(0,Ft.A)({},n,{disableAnimation:r,formControl:s,shrink:l,size:c.size,variant:c.variant,required:c.required,focused:c.focused}),u=(e=>{const{classes:t,formControl:n,size:r,shrink:i,disableAnimation:o,variant:a,required:s}=e,l={root:["root",n&&"formControl",!o&&"animated",i&&"shrink",r&&"normal"!==r&&"size".concat((0,pp.A)(r)),a],asterisk:[s&&"asterisk"]},c=(0,ir.A)(l,t_,t);return(0,Ft.A)({},t,c)})(d);return(0,qt.jsx)(r_,(0,Ft.A)({"data-shrink":l,ownerState:d,ref:t,className:(0,nr.A)(u.root,o)},a,{classes:u}))}),o_=i_;function a_(e){return(0,sr.Ay)("MuiFormControl",e)}(0,ar.A)("MuiFormControl",["root","marginNone","marginNormal","marginDense","fullWidth","disabled"]);const s_=["children","className","color","component","disabled","error","focused","fullWidth","hiddenLabel","margin","required","size","variant"],l_=(0,Vn.Ay)("div",{name:"MuiFormControl",slot:"Root",overridesResolver:(e,t)=>{let{ownerState:n}=e;return(0,Ft.A)({},t.root,t["margin".concat((0,pp.A)(n.margin))],n.fullWidth&&t.fullWidth)}})(e=>{let{ownerState:t}=e;return(0,Ft.A)({display:"inline-flex",flexDirection:"column",position:"relative",minWidth:0,padding:0,margin:0,border:0,verticalAlign:"top"},"normal"===t.margin&&{marginTop:16,marginBottom:8},"dense"===t.margin&&{marginTop:8,marginBottom:4},t.fullWidth&&{width:"100%"})}),c_=We.forwardRef(function(e,t){const n=(0,$t.b)({props:e,name:"MuiFormControl"}),{children:r,className:i,color:o="primary",component:a="div",disabled:s=!1,error:l=!1,focused:c,fullWidth:d=!1,hiddenLabel:u=!1,margin:p="none",required:h=!1,size:m="medium",variant:f="outlined"}=n,g=(0,nn.A)(n,s_),v=(0,Ft.A)({},n,{color:o,component:a,disabled:s,error:l,fullWidth:d,hiddenLabel:u,margin:p,required:h,size:m,variant:f}),x=(e=>{const{classes:t,margin:n,fullWidth:r}=e,i={root:["root","none"!==n&&"margin".concat((0,pp.A)(n)),r&&"fullWidth"]};return(0,ir.A)(i,a_,t)})(v),[y,b]=We.useState(()=>{let e=!1;return r&&We.Children.forEach(r,t=>{if(!(0,ug.A)(t,["Input","Select"]))return;const n=(0,ug.A)(t,["Select"])?t.props.input:t;n&&n.props.startAdornment&&(e=!0)}),e}),[j,_]=We.useState(()=>{let e=!1;return r&&We.Children.forEach(r,t=>{(0,ug.A)(t,["Input","Select"])&&(yj(t.props,!0)||yj(t.props.inputProps,!0))&&(e=!0)}),e}),[C,w]=We.useState(!1);s&&C&&w(!1);const S=void 0===c||s?C:c;let A;const k=We.useMemo(()=>({adornedStart:y,setAdornedStart:b,color:o,disabled:s,error:l,filled:j,focused:S,fullWidth:d,hiddenLabel:u,size:m,onBlur:()=>{w(!1)},onEmpty:()=>{_(!1)},onFilled:()=>{_(!0)},onFocus:()=>{w(!0)},registerEffect:A,required:h,variant:f}),[y,o,s,l,j,S,d,u,A,h,m,f]);return(0,qt.jsx)(gj.Provider,{value:k,children:(0,qt.jsx)(l_,(0,Ft.A)({as:a,ownerState:v,className:(0,nr.A)(x.root,i),ref:t},g,{children:r}))})}),d_=c_;function u_(e){return(0,sr.Ay)("MuiFormHelperText",e)}const p_=(0,ar.A)("MuiFormHelperText",["root","error","disabled","sizeSmall","sizeMedium","contained","focused","filled","required"]);var h_;const m_=["children","className","component","disabled","error","filled","focused","margin","required","variant"],f_=(0,Vn.Ay)("p",{name:"MuiFormHelperText",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.size&&t["size".concat((0,pp.A)(n.size))],n.contained&&t.contained,n.filled&&t.filled]}})(e=>{let{theme:t,ownerState:n}=e;return(0,Ft.A)({color:(t.vars||t).palette.text.secondary},t.typography.caption,{textAlign:"left",marginTop:3,marginRight:0,marginBottom:0,marginLeft:0,["&.".concat(p_.disabled)]:{color:(t.vars||t).palette.text.disabled},["&.".concat(p_.error)]:{color:(t.vars||t).palette.error.main}},"small"===n.size&&{marginTop:4},n.contained&&{marginLeft:14,marginRight:14})}),g_=We.forwardRef(function(e,t){const n=(0,$t.b)({props:e,name:"MuiFormHelperText"}),{children:r,className:i,component:o="p"}=n,a=(0,nn.A)(n,m_),s=fj({props:n,muiFormControl:vj(),states:["variant","size","disabled","error","filled","focused","required"]}),l=(0,Ft.A)({},n,{component:o,contained:"filled"===s.variant||"outlined"===s.variant,variant:s.variant,size:s.size,disabled:s.disabled,error:s.error,filled:s.filled,focused:s.focused,required:s.required}),c=(e=>{const{classes:t,contained:n,size:r,disabled:i,error:o,filled:a,focused:s,required:l}=e,c={root:["root",i&&"disabled",o&&"error",r&&"size".concat((0,pp.A)(r)),n&&"contained",s&&"focused",a&&"filled",l&&"required"]};return(0,ir.A)(c,u_,t)})(l);return(0,qt.jsx)(f_,(0,Ft.A)({as:o,ownerState:l,className:(0,nr.A)(c.root,i),ref:t},a,{children:" "===r?h_||(h_=(0,qt.jsx)("span",{className:"notranslate",children:"\u200b"})):r}))}),v_=g_;function x_(e){return(0,sr.Ay)("MuiNativeSelect",e)}const y_=(0,ar.A)("MuiNativeSelect",["root","select","multiple","filled","outlined","standard","disabled","icon","iconOpen","iconFilled","iconOutlined","iconStandard","nativeInput","error"]),b_=["className","disabled","error","IconComponent","inputRef","variant"],j_=e=>{let{ownerState:t,theme:n}=e;return(0,Ft.A)({MozAppearance:"none",WebkitAppearance:"none",userSelect:"none",borderRadius:0,cursor:"pointer","&:focus":(0,Ft.A)({},n.vars?{backgroundColor:"rgba(".concat(n.vars.palette.common.onBackgroundChannel," / 0.05)")}:{backgroundColor:"light"===n.palette.mode?"rgba(0, 0, 0, 0.05)":"rgba(255, 255, 255, 0.05)"},{borderRadius:0}),"&::-ms-expand":{display:"none"},["&.".concat(y_.disabled)]:{cursor:"default"},"&[multiple]":{height:"auto"},"&:not([multiple]) option, &:not([multiple]) optgroup":{backgroundColor:(n.vars||n).palette.background.paper},"&&&":{paddingRight:24,minWidth:16}},"filled"===t.variant&&{"&&&":{paddingRight:32}},"outlined"===t.variant&&{borderRadius:(n.vars||n).shape.borderRadius,"&:focus":{borderRadius:(n.vars||n).shape.borderRadius},"&&&":{paddingRight:32}})},__=(0,Vn.Ay)("select",{name:"MuiNativeSelect",slot:"Select",shouldForwardProp:kp.A,overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.select,t[n.variant],n.error&&t.error,{["&.".concat(y_.multiple)]:t.multiple}]}})(j_),C_=e=>{let{ownerState:t,theme:n}=e;return(0,Ft.A)({position:"absolute",right:0,top:"calc(50% - .5em)",pointerEvents:"none",color:(n.vars||n).palette.action.active,["&.".concat(y_.disabled)]:{color:(n.vars||n).palette.action.disabled}},t.open&&{transform:"rotate(180deg)"},"filled"===t.variant&&{right:7},"outlined"===t.variant&&{right:7})},w_=(0,Vn.Ay)("svg",{name:"MuiNativeSelect",slot:"Icon",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.icon,n.variant&&t["icon".concat((0,pp.A)(n.variant))],n.open&&t.iconOpen]}})(C_),S_=We.forwardRef(function(e,t){const{className:n,disabled:r,error:i,IconComponent:o,inputRef:a,variant:s="standard"}=e,l=(0,nn.A)(e,b_),c=(0,Ft.A)({},e,{disabled:r,variant:s,error:i}),d=(e=>{const{classes:t,variant:n,disabled:r,multiple:i,open:o,error:a}=e,s={select:["select",n,r&&"disabled",i&&"multiple",a&&"error"],icon:["icon","icon".concat((0,pp.A)(n)),o&&"iconOpen",r&&"disabled"]};return(0,ir.A)(s,x_,t)})(c);return(0,qt.jsxs)(We.Fragment,{children:[(0,qt.jsx)(__,(0,Ft.A)({ownerState:c,className:(0,nr.A)(d.select,n),disabled:r,ref:a||t},l)),e.multiple?null:(0,qt.jsx)(w_,{as:o,ownerState:c,className:d.icon})]})}),A_=S_;var k_=n(47123);function T_(e){return(0,sr.Ay)("MuiSelect",e)}const E_=(0,ar.A)("MuiSelect",["root","select","multiple","filled","outlined","standard","disabled","focused","icon","iconOpen","iconFilled","iconOutlined","iconStandard","nativeInput","error"]);var M_;const O_=["aria-describedby","aria-label","autoFocus","autoWidth","children","className","defaultOpen","defaultValue","disabled","displayEmpty","error","IconComponent","inputRef","labelId","MenuProps","multiple","name","onBlur","onChange","onClose","onFocus","onOpen","open","readOnly","renderValue","SelectDisplayProps","tabIndex","type","value","variant"],R_=(0,Vn.Ay)("div",{name:"MuiSelect",slot:"Select",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[{["&.".concat(E_.select)]:t.select},{["&.".concat(E_.select)]:t[n.variant]},{["&.".concat(E_.error)]:t.error},{["&.".concat(E_.multiple)]:t.multiple}]}})(j_,{["&.".concat(E_.select)]:{height:"auto",minHeight:"1.4375em",textOverflow:"ellipsis",whiteSpace:"nowrap",overflow:"hidden"}}),P_=(0,Vn.Ay)("svg",{name:"MuiSelect",slot:"Icon",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.icon,n.variant&&t["icon".concat((0,pp.A)(n.variant))],n.open&&t.iconOpen]}})(C_),D_=(0,Vn.Ay)("input",{shouldForwardProp:e=>(0,k_.A)(e)&&"classes"!==e,name:"MuiSelect",slot:"NativeInput",overridesResolver:(e,t)=>t.nativeInput})({bottom:0,left:0,position:"absolute",opacity:0,pointerEvents:"none",width:"100%",boxSizing:"border-box"});function N_(e,t){return"object"===typeof t&&null!==t?e===t:String(e)===String(t)}function L_(e){return null==e||"string"===typeof e&&!e.trim()}const I_=We.forwardRef(function(e,t){var n;const{"aria-describedby":r,"aria-label":i,autoFocus:o,autoWidth:a,children:s,className:l,defaultOpen:c,defaultValue:d,disabled:u,displayEmpty:p,error:h=!1,IconComponent:m,inputRef:f,labelId:g,MenuProps:v={},multiple:x,name:y,onBlur:b,onChange:j,onClose:_,onFocus:C,onOpen:w,open:S,readOnly:A,renderValue:k,SelectDisplayProps:T={},tabIndex:E,value:M,variant:O="standard"}=e,R=(0,nn.A)(e,O_),[P,D]=(0,Yx.A)({controlled:M,default:d,name:"Select"}),[N,L]=(0,Yx.A)({controlled:S,default:c,name:"Select"}),I=We.useRef(null),F=We.useRef(null),[$,B]=We.useState(null),{current:z}=We.useRef(null!=S),[H,W]=We.useState(),U=(0,Ln.A)(t,f),V=We.useCallback(e=>{F.current=e,e&&B(e)},[]),G=null==$?void 0:$.parentNode;We.useImperativeHandle(U,()=>({focus:()=>{F.current.focus()},node:I.current,value:P}),[P]),We.useEffect(()=>{c&&N&&$&&!z&&(W(a?null:G.clientWidth),F.current.focus())},[$,a]),We.useEffect(()=>{o&&F.current.focus()},[o]),We.useEffect(()=>{if(!g)return;const e=(0,Nh.A)(F.current).getElementById(g);if(e){const t=()=>{getSelection().isCollapsed&&F.current.focus()};return e.addEventListener("click",t),()=>{e.removeEventListener("click",t)}}},[g]);const q=(e,t)=>{e?w&&w(t):_&&_(t),z||(W(a?null:G.clientWidth),L(e))},Y=We.Children.toArray(s),Z=e=>t=>{let n;if(t.currentTarget.hasAttribute("tabindex")){if(x){n=Array.isArray(P)?P.slice():[];const t=P.indexOf(e.props.value);-1===t?n.push(e.props.value):n.splice(t,1)}else n=e.props.value;if(e.props.onClick&&e.props.onClick(t),P!==n&&(D(n),j)){const r=t.nativeEvent||t,i=new r.constructor(r.type,r);Object.defineProperty(i,"target",{writable:!0,value:{value:n,name:y}}),j(i,e)}x||q(!1,t)}},K=null!==$&&N;let X,Q;delete R["aria-invalid"];const J=[];let ee=!1,te=!1;(yj({value:P})||p)&&(k?X=k(P):ee=!0);const ne=Y.map(e=>{if(!We.isValidElement(e))return null;let t;if(x){if(!Array.isArray(P))throw new Error((0,Gn.A)(2));t=P.some(t=>N_(t,e.props.value)),t&&ee&&J.push(e.props.children)}else t=N_(P,e.props.value),t&&ee&&(Q=e.props.children);return t&&(te=!0),We.cloneElement(e,{"aria-selected":t?"true":"false",onClick:Z(e),onKeyUp:t=>{" "===t.key&&t.preventDefault(),e.props.onKeyUp&&e.props.onKeyUp(t)},role:"option",selected:t,value:void 0,"data-value":e.props.value})});ee&&(X=x?0===J.length?null:J.reduce((e,t,n)=>(e.push(t),n<J.length-1&&e.push(", "),e),[]):Q);let re,ie=H;!a&&z&&$&&(ie=G.clientWidth),re="undefined"!==typeof E?E:u?null:0;const oe=T.id||(y?"mui-component-select-".concat(y):void 0),ae=(0,Ft.A)({},e,{variant:O,value:P,open:K,error:h}),se=(e=>{const{classes:t,variant:n,disabled:r,multiple:i,open:o,error:a}=e,s={select:["select",n,r&&"disabled",i&&"multiple",a&&"error"],icon:["icon","icon".concat((0,pp.A)(n)),o&&"iconOpen",r&&"disabled"],nativeInput:["nativeInput"]};return(0,ir.A)(s,T_,t)})(ae),le=(0,Ft.A)({},v.PaperProps,null==(n=v.slotProps)?void 0:n.paper),ce=(0,mn.A)();return(0,qt.jsxs)(We.Fragment,{children:[(0,qt.jsx)(R_,(0,Ft.A)({ref:V,tabIndex:re,role:"combobox","aria-controls":ce,"aria-disabled":u?"true":void 0,"aria-expanded":K?"true":"false","aria-haspopup":"listbox","aria-label":i,"aria-labelledby":[g,oe].filter(Boolean).join(" ")||void 0,"aria-describedby":r,onKeyDown:e=>{if(!A){-1!==[" ","ArrowUp","ArrowDown","Enter"].indexOf(e.key)&&(e.preventDefault(),q(!0,e))}},onMouseDown:u||A?null:e=>{0===e.button&&(e.preventDefault(),F.current.focus(),q(!0,e))},onBlur:e=>{!K&&b&&(Object.defineProperty(e,"target",{writable:!0,value:{value:P,name:y}}),b(e))},onFocus:C},T,{ownerState:ae,className:(0,nr.A)(T.className,se.select,l),id:oe,children:L_(X)?M_||(M_=(0,qt.jsx)("span",{className:"notranslate",children:"\u200b"})):X})),(0,qt.jsx)(D_,(0,Ft.A)({"aria-invalid":h,value:Array.isArray(P)?P.join(","):P,name:y,ref:I,"aria-hidden":!0,onChange:e=>{const t=Y.find(t=>t.props.value===e.target.value);void 0!==t&&(D(t.props.value),j&&j(e,t))},tabIndex:-1,disabled:u,className:se.nativeInput,autoFocus:o,ownerState:ae},R)),(0,qt.jsx)(P_,{as:m,className:se.icon,ownerState:ae}),(0,qt.jsx)(tf,(0,Ft.A)({id:"menu-".concat(y||""),anchorEl:G,open:K,onClose:e=>{q(!1,e)},anchorOrigin:{vertical:"bottom",horizontal:"center"},transformOrigin:{vertical:"top",horizontal:"center"}},v,{MenuListProps:(0,Ft.A)({"aria-labelledby":g,role:"listbox","aria-multiselectable":x?"true":void 0,disableListWrap:!0,id:ce},v.MenuListProps),slotProps:(0,Ft.A)({},v.slotProps,{paper:(0,Ft.A)({},le,{style:(0,Ft.A)({minWidth:ie},null!=le?le.style:null)})}),children:ne}))]})}),F_=I_,$_=["autoWidth","children","classes","className","defaultOpen","displayEmpty","IconComponent","id","input","inputProps","label","labelId","MenuProps","multiple","native","onClose","onOpen","open","renderValue","SelectDisplayProps","variant"],B_=["root"],z_={name:"MuiSelect",overridesResolver:(e,t)=>t.root,shouldForwardProp:e=>(0,kp.A)(e)&&"variant"!==e,slot:"Root"},H_=(0,Vn.Ay)(Rj,z_)(""),W_=(0,Vn.Ay)(qj,z_)(""),U_=(0,Vn.Ay)(Ij,z_)(""),V_=We.forwardRef(function(e,t){const n=(0,$t.b)({name:"MuiSelect",props:e}),{autoWidth:r=!1,children:i,classes:o={},className:a,defaultOpen:s=!1,displayEmpty:l=!1,IconComponent:c=$b,id:d,input:u,inputProps:p,label:h,labelId:m,MenuProps:f,multiple:g=!1,native:v=!1,onClose:x,onOpen:y,open:b,renderValue:j,SelectDisplayProps:_,variant:C="outlined"}=n,w=(0,nn.A)(n,$_),S=v?A_:F_,A=fj({props:n,muiFormControl:vj(),states:["variant","error"]}),k=A.variant||C,T=(0,Ft.A)({},n,{variant:k,classes:o}),E=(e=>{const{classes:t}=e;return t})(T),M=(0,nn.A)(E,B_),O=u||{standard:(0,qt.jsx)(H_,{ownerState:T}),outlined:(0,qt.jsx)(W_,{label:h,ownerState:T}),filled:(0,qt.jsx)(U_,{ownerState:T})}[k],R=(0,Ln.A)(t,Dn(O));return(0,qt.jsx)(We.Fragment,{children:We.cloneElement(O,(0,Ft.A)({inputComponent:S,inputProps:(0,Ft.A)({children:i,error:A.error,IconComponent:c,variant:k,type:void 0,multiple:g},v?{id:d}:{autoWidth:r,defaultOpen:s,displayEmpty:l,labelId:m,MenuProps:f,onClose:x,onOpen:y,open:b,renderValue:j,SelectDisplayProps:(0,Ft.A)({id:d},_)},p,{classes:p?(0,sj.A)(M,p.classes):M},u?u.props.inputProps:{})},(g&&v||l)&&"outlined"===k?{notched:!0}:{},{ref:R,className:(0,nr.A)(O.props.className,a,E.root)},!u&&{variant:k},w))})});V_.muiName="Select";const G_=V_;function q_(e){return(0,sr.Ay)("MuiTextField",e)}(0,ar.A)("MuiTextField",["root"]);const Y_=["autoComplete","autoFocus","children","className","color","defaultValue","disabled","error","FormHelperTextProps","fullWidth","helperText","id","InputLabelProps","inputProps","InputProps","inputRef","label","maxRows","minRows","multiline","name","onBlur","onChange","onFocus","placeholder","required","rows","select","SelectProps","type","value","variant"],Z_={standard:Rj,filled:Ij,outlined:qj},K_=(0,Vn.Ay)(d_,{name:"MuiTextField",slot:"Root",overridesResolver:(e,t)=>t.root})({}),X_=We.forwardRef(function(e,t){const n=(0,$t.b)({props:e,name:"MuiTextField"}),{autoComplete:r,autoFocus:i=!1,children:o,className:a,color:s="primary",defaultValue:l,disabled:c=!1,error:d=!1,FormHelperTextProps:u,fullWidth:p=!1,helperText:h,id:m,InputLabelProps:f,inputProps:g,InputProps:v,inputRef:x,label:y,maxRows:b,minRows:j,multiline:_=!1,name:C,onBlur:w,onChange:S,onFocus:A,placeholder:k,required:T=!1,rows:E,select:M=!1,SelectProps:O,type:R,value:P,variant:D="outlined"}=n,N=(0,nn.A)(n,Y_),L=(0,Ft.A)({},n,{autoFocus:i,color:s,disabled:c,error:d,fullWidth:p,multiline:_,required:T,select:M,variant:D}),I=(e=>{const{classes:t}=e;return(0,ir.A)({root:["root"]},q_,t)})(L);const F={};"outlined"===D&&(f&&"undefined"!==typeof f.shrink&&(F.notched=f.shrink),F.label=y),M&&(O&&O.native||(F.id=void 0),F["aria-describedby"]=void 0);const $=(0,mn.A)(m),B=h&&$?"".concat($,"-helper-text"):void 0,z=y&&$?"".concat($,"-label"):void 0,H=Z_[D],W=(0,qt.jsx)(H,(0,Ft.A)({"aria-describedby":B,autoComplete:r,autoFocus:i,defaultValue:l,fullWidth:p,multiline:_,name:C,rows:E,maxRows:b,minRows:j,type:R,value:P,id:$,inputRef:x,onBlur:w,onChange:S,onFocus:A,placeholder:k,inputProps:g},F,v));return(0,qt.jsxs)(K_,(0,Ft.A)({className:(0,nr.A)(I.root,a),disabled:c,error:d,fullWidth:p,ref:t,required:T,color:s,variant:D,ownerState:L},N,{children:[null!=y&&""!==y&&(0,qt.jsx)(o_,(0,Ft.A)({htmlFor:$,id:z},f,{children:y})),M?(0,qt.jsx)(G_,(0,Ft.A)({"aria-describedby":B,id:$,labelId:z,value:P,input:W},O,{children:o})):W,h&&(0,qt.jsx)(v_,(0,Ft.A)({id:B},u,{children:h}))]}))}),Q_=X_;var J_=n(74802);function eC(e){return(0,sr.Ay)("MuiDialog",e)}const tC=(0,ar.A)("MuiDialog",["root","scrollPaper","scrollBody","container","paper","paperScrollPaper","paperScrollBody","paperWidthFalse","paperWidthXs","paperWidthSm","paperWidthMd","paperWidthLg","paperWidthXl","paperFullWidth","paperFullScreen"]);const nC=We.createContext({}),rC=["aria-describedby","aria-labelledby","BackdropComponent","BackdropProps","children","className","disableEscapeKeyDown","fullScreen","fullWidth","maxWidth","onBackdropClick","onClick","onClose","open","PaperComponent","PaperProps","scroll","TransitionComponent","transitionDuration","TransitionProps"],iC=(0,Vn.Ay)(xm,{name:"MuiDialog",slot:"Backdrop",overrides:(e,t)=>t.backdrop})({zIndex:-1}),oC=(0,Vn.Ay)(Pm,{name:"MuiDialog",slot:"Root",overridesResolver:(e,t)=>t.root})({"@media print":{position:"absolute !important"}}),aC=(0,Vn.Ay)("div",{name:"MuiDialog",slot:"Container",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.container,t["scroll".concat((0,pp.A)(n.scroll))]]}})(e=>{let{ownerState:t}=e;return(0,Ft.A)({height:"100%","@media print":{height:"auto"},outline:0},"paper"===t.scroll&&{display:"flex",justifyContent:"center",alignItems:"center"},"body"===t.scroll&&{overflowY:"auto",overflowX:"hidden",textAlign:"center","&::after":{content:'""',display:"inline-block",verticalAlign:"middle",height:"100%",width:"0"}})}),sC=(0,Vn.Ay)(yp,{name:"MuiDialog",slot:"Paper",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.paper,t["scrollPaper".concat((0,pp.A)(n.scroll))],t["paperWidth".concat((0,pp.A)(String(n.maxWidth)))],n.fullWidth&&t.paperFullWidth,n.fullScreen&&t.paperFullScreen]}})(e=>{let{theme:t,ownerState:n}=e;return(0,Ft.A)({margin:32,position:"relative",overflowY:"auto","@media print":{overflowY:"visible",boxShadow:"none"}},"paper"===n.scroll&&{display:"flex",flexDirection:"column",maxHeight:"calc(100% - 64px)"},"body"===n.scroll&&{display:"inline-block",verticalAlign:"middle",textAlign:"left"},!n.maxWidth&&{maxWidth:"calc(100% - 64px)"},"xs"===n.maxWidth&&{maxWidth:"px"===t.breakpoints.unit?Math.max(t.breakpoints.values.xs,444):"max(".concat(t.breakpoints.values.xs).concat(t.breakpoints.unit,", 444px)"),["&.".concat(tC.paperScrollBody)]:{[t.breakpoints.down(Math.max(t.breakpoints.values.xs,444)+64)]:{maxWidth:"calc(100% - 64px)"}}},n.maxWidth&&"xs"!==n.maxWidth&&{maxWidth:"".concat(t.breakpoints.values[n.maxWidth]).concat(t.breakpoints.unit),["&.".concat(tC.paperScrollBody)]:{[t.breakpoints.down(t.breakpoints.values[n.maxWidth]+64)]:{maxWidth:"calc(100% - 64px)"}}},n.fullWidth&&{width:"calc(100% - 64px)"},n.fullScreen&&{margin:0,width:"100%",maxWidth:"100%",height:"100%",maxHeight:"none",borderRadius:0,["&.".concat(tC.paperScrollBody)]:{margin:0,maxWidth:"100%"}})}),lC=We.forwardRef(function(e,t){const n=(0,$t.b)({props:e,name:"MuiDialog"}),r=In(),i={enter:r.transitions.duration.enteringScreen,exit:r.transitions.duration.leavingScreen},{"aria-describedby":o,"aria-labelledby":a,BackdropComponent:s,BackdropProps:l,children:c,className:d,disableEscapeKeyDown:u=!1,fullScreen:p=!1,fullWidth:h=!1,maxWidth:m="sm",onBackdropClick:f,onClick:g,onClose:v,open:x,PaperComponent:y=yp,PaperProps:b={},scroll:j="paper",TransitionComponent:_=hm,transitionDuration:C=i,TransitionProps:w}=n,S=(0,nn.A)(n,rC),A=(0,Ft.A)({},n,{disableEscapeKeyDown:u,fullScreen:p,fullWidth:h,maxWidth:m,scroll:j}),k=(e=>{const{classes:t,scroll:n,maxWidth:r,fullWidth:i,fullScreen:o}=e,a={root:["root"],container:["container","scroll".concat((0,pp.A)(n))],paper:["paper","paperScroll".concat((0,pp.A)(n)),"paperWidth".concat((0,pp.A)(String(r))),i&&"paperFullWidth",o&&"paperFullScreen"]};return(0,ir.A)(a,eC,t)})(A),T=We.useRef(),E=(0,mn.A)(a),M=We.useMemo(()=>({titleId:E}),[E]);return(0,qt.jsx)(oC,(0,Ft.A)({className:(0,nr.A)(k.root,d),closeAfterTransition:!0,components:{Backdrop:iC},componentsProps:{backdrop:(0,Ft.A)({transitionDuration:C,as:s},l)},disableEscapeKeyDown:u,onClose:v,open:x,ref:t,onClick:e=>{g&&g(e),T.current&&(T.current=null,f&&f(e),v&&v(e,"backdropClick"))},ownerState:A},S,{children:(0,qt.jsx)(_,(0,Ft.A)({appear:!0,in:x,timeout:C,role:"presentation"},w,{children:(0,qt.jsx)(aC,{className:(0,nr.A)(k.container),onMouseDown:e=>{T.current=e.target===e.currentTarget},ownerState:A,children:(0,qt.jsx)(sC,(0,Ft.A)({as:y,elevation:24,role:"dialog","aria-describedby":o,"aria-labelledby":E},b,{className:(0,nr.A)(k.paper,b.className),ownerState:A,children:(0,qt.jsx)(nC.Provider,{value:M,children:c})}))})}))}))}),cC=lC;function dC(e){return(0,sr.Ay)("MuiDialogTitle",e)}const uC=(0,ar.A)("MuiDialogTitle",["root"]),pC=["className","id"],hC=(0,Vn.Ay)(Cf,{name:"MuiDialogTitle",slot:"Root",overridesResolver:(e,t)=>t.root})({padding:"16px 24px",flex:"0 0 auto"}),mC=We.forwardRef(function(e,t){const n=(0,$t.b)({props:e,name:"MuiDialogTitle"}),{className:r,id:i}=n,o=(0,nn.A)(n,pC),a=n,s=(e=>{const{classes:t}=e;return(0,ir.A)({root:["root"]},dC,t)})(a),{titleId:l=i}=We.useContext(nC);return(0,qt.jsx)(hC,(0,Ft.A)({component:"h2",className:(0,nr.A)(s.root,r),ownerState:a,ref:t,variant:"h6",id:null!=i?i:l},o))}),fC=mC;function gC(e){return(0,sr.Ay)("MuiDialogContent",e)}(0,ar.A)("MuiDialogContent",["root","dividers"]);const vC=["className","dividers"],xC=(0,Vn.Ay)("div",{name:"MuiDialogContent",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.dividers&&t.dividers]}})(e=>{let{theme:t,ownerState:n}=e;return(0,Ft.A)({flex:"1 1 auto",WebkitOverflowScrolling:"touch",overflowY:"auto",padding:"20px 24px"},n.dividers?{padding:"16px 24px",borderTop:"1px solid ".concat((t.vars||t).palette.divider),borderBottom:"1px solid ".concat((t.vars||t).palette.divider)}:{[".".concat(uC.root," + &")]:{paddingTop:0}})}),yC=We.forwardRef(function(e,t){const n=(0,$t.b)({props:e,name:"MuiDialogContent"}),{className:r,dividers:i=!1}=n,o=(0,nn.A)(n,vC),a=(0,Ft.A)({},n,{dividers:i}),s=(e=>{const{classes:t,dividers:n}=e,r={root:["root",n&&"dividers"]};return(0,ir.A)(r,gC,t)})(a);return(0,qt.jsx)(xC,(0,Ft.A)({className:(0,nr.A)(s.root,r),ownerState:a,ref:t},o))}),bC=yC,jC=e=>{let{open:t,imageUrl:n,onClose:r,programCode:i,downloadImage:o,downloadButton:a=!1,imageWidthHeight:s,programName:l,customWidth:c,customMarginTop:d}=e;const{t:u}=Vg();return(0,qt.jsxs)(cC,{open:t,onClose:r,children:[(0,qt.jsx)(fC,{sx:{m:0,p:2},children:r?(0,qt.jsx)(wh,{"aria-label":"close",onClick:r,sx:{position:"absolute",right:8,top:8,color:e=>e.palette.grey[500]},children:(0,qt.jsx)(J_.A,{})}):null}),(0,qt.jsx)(bC,{children:(0,qt.jsxs)(op,{width:c||"unset",pb:1.5,display:"flex",flexDirection:"column",alignItems:"center",children:[i&&(0,qt.jsx)(op,{whiteSpace:"nowrap",mb:.4,fontSize:{xs:"18px",md:"24px"},fontWeight:600,children:u("rpm_Program_qr")}),(0,qt.jsx)(op,{marginTop:d||"12px",children:(0,qt.jsx)("img",{src:n,width:null===s||void 0===s?void 0:s.width,height:null===s||void 0===s?void 0:s.height})}),i&&(0,qt.jsxs)(op,{whiteSpace:"nowrap",color:"#4B5563",fontSize:"16px",fontWeight:500,marginTop:"-12px",children:["Program Code: ",i]}),l&&(0,qt.jsxs)(op,{textAlign:"center",width:{xs:"unset",md:"360px"},mt:1.5,fontSize:"16px",color:"#4B5563",fontWeight:500,children:[u("rpm_ProgramName")+":-"," ",l]}),a&&(0,qt.jsxs)(xh,{variant:"contained",color:"primary",sx:{marginLeft:"0px",marginTop:"16px",width:"171px"},onClick:o,fullWidths:!0,children:[(0,qt.jsx)(op,{display:"flex",marginRight:"4px",children:(0,qt.jsx)(Qc,{})}),(0,qt.jsx)(Cf,{component:"span",children:u("rpm_Download")})]})]})})]})};jC.defaultProps={open:!1,downloadButton:!1,imageUrl:"",programCode:"",onClose:()=>{},downloadImage:()=>{},imageWidthHeight:{},programName:"",customWidth:"",customMarginTop:{}};const _C=jC;function CC(e){var t,n,r,o,a,s,l,c,d;let{open:u,handleDrawerOpen:p,handleDrawerClose:h,headerData:m}=e;const f=Nt(),{t:g}=Vg(),v=so(),{userData:x}=(0,We.useContext)(lv),y=wt(ju),b=wt(uu),j=wt(e=>e.auth.userName),[_,C]=We.useState(null),[w,S]=We.useState(null),[A,k]=We.useState(null),T=Boolean(_),E=Boolean(A),M=Boolean(w),[O,R]=We.useState(""),[P,D]=We.useState(!1),N=()=>{D(!P)},L=()=>{S(null)},I=e=>{C(e.currentTarget)},F=()=>{k(null)},$=()=>{C(null),F()};We.useEffect(()=>{ta()(null===m||void 0===m?void 0:m.activeProgram)||(()=>{var e;if(null===m||void 0===m||null===(e=m.activeProgram)||void 0===e||!e.qr_code)return;const t="data:image/png;base64,".concat(null===m||void 0===m?void 0:m.activeProgram.qr_code);R(t)})()},[null===m||void 0===m?void 0:m.activeProgram]);const B=(0,qt.jsxs)(tf,{anchorEl:_,id:"account-menu",open:T,onClose:$,onClick:$,PaperProps:{elevation:0,sx:{overflow:"visible",filter:"drop-shadow(0px 2px 8px rgba(0,0,0,0.32))",mt:1.5,"& .MuiAvatar-root":{width:32,height:32,ml:-.5,mr:1},"&:before":{content:'""',display:"block",position:"absolute",top:0,right:14,width:10,height:10,bgcolor:"background.paper",transform:"translateY(-50%) rotate(45deg)",zIndex:0}}},transformOrigin:{horizontal:"right",vertical:"top"},anchorOrigin:{horizontal:"right",vertical:"bottom"},children:[(0,qt.jsxs)(mf,{component:Lo,to:ld.DOCTOR.PROFILE,children:[(0,qt.jsx)(gv,{children:(0,qt.jsx)(_y.A,{fontSize:"small"})}),"My account"]}),(0,qt.jsxs)(mf,{component:Lo,to:ld.DOCTOR.CHANGEPASSWORD,children:[(0,qt.jsx)(gv,{children:(0,qt.jsx)(xy.A,{fontSize:"small"})}),"Change Password"]}),(0,qt.jsxs)(mf,{component:Lo,to:ld.USERMANUAL,target:"_blank",children:[(0,qt.jsx)(gv,{children:(0,qt.jsx)(vy.A,{fontSize:"small"})}),"User Manual"]}),null!==x&&void 0!==x&&x.isAdmin?(0,qt.jsxs)(mf,{component:Lo,to:ld.DOCTOR.LOGS,children:[(0,qt.jsx)(gv,{children:(0,qt.jsx)($c,{fontSize:"small"})}),"Audit Logs"]}):null,(0,qt.jsxs)(mf,{onClick:()=>f(Au()),children:[(0,qt.jsx)(gv,{children:(0,qt.jsx)(yy.A,{fontSize:"small"})}),"Logout"]})]}),z="primary-search-account-menu-mobile",H=(0,qt.jsxs)(tf,{anchorEl:A,anchorOrigin:{vertical:"top",horizontal:"right"},id:z,keepMounted:!0,transformOrigin:{vertical:"top",horizontal:"right"},open:E,onClose:F,children:[(null===m||void 0===m||null===(t=m.heading)||void 0===t?void 0:t.name)&&(0,qt.jsxs)(mf,{onClick:N,children:[(0,qt.jsx)(wh,{size:"large","aria-label":"show 17 new notifications",color:"inherit",children:(0,qt.jsx)(by.A,{fontSize:"small"})}),(0,qt.jsx)("p",{children:g("rpm_ShowProgramQr")})]}),(0,qt.jsxs)(mf,{onClick:I,children:[(0,qt.jsx)(wh,{size:"large","aria-label":"account of current user","aria-controls":"primary-search-account-menu","aria-haspopup":"true",color:"inherit",children:(0,qt.jsx)(gy.A,{})}),(0,qt.jsx)("p",{children:"Profile"})]})]});return(0,qt.jsxs)(qt.Fragment,{children:[(0,qt.jsxs)(EC,{position:"fixed",open:u&&m.sideBar,children:[(0,qt.jsxs)(dp,{children:[(0,qt.jsx)(op,{sx:{marginLeft:1,lineHeight:1},className:"mobile-logo",children:(0,qt.jsx)("img",{src:dv,height:32})}),m.sideBar&&(0,qt.jsx)(wh,{size:"small",color:"inherit",className:"toggle-button",onClick:u?h:p,sx:{bgcolor:"primary.theme.50",position:"absolute",left:-16},children:u?(0,qt.jsx)(jy.A,{}):(0,qt.jsx)(jy.A,{fontSize:"small"})}),(0,qt.jsxs)(op,{sx:{display:"flex",alignItems:"center",justifyContent:"space-between",flex:1},children:[(0,qt.jsxs)(op,{children:[(0,qt.jsxs)(Cf,{variant:"h6",component:"div",sx:{textTransform:"capitalize"},children:[null===x||void 0===x||null===(n=x.user_principal)||void 0===n?void 0:n.first_name,"\xa0",null===x||void 0===x||null===(r=x.user_principal)||void 0===r?void 0:r.last_name]}),(null===m||void 0===m||null===(o=m.heading)||void 0===o?void 0:o.name)&&(0,qt.jsxs)(op,{display:"flex",alignItems:"center",flexWrap:"wrap",pb:{xs:1,sm:0},children:[(0,qt.jsxs)(Cf,{noWrap:!0,variant:"body1",component:"div",fontWeight:"h6.fontWeight",sx:{display:{xs:"block",sm:"block"}},children:[null===m||void 0===m||null===(a=m.activeProgram)||void 0===a?void 0:a.display_name,(0,qt.jsxs)(Cf,{component:"span",fontSize:"16px",children:["\xa0(",null===m||void 0===m||null===(s=m.activeProgram)||void 0===s?void 0:s.city,")"]})]}),(0,qt.jsx)(op,{bgcolor:(e=>"fitnessCenter"===e?"#FED7AA":"wellnessCenter"===e?"#BBF7D0":"hospital"===e?" #BFDBFE":"clinic"===e?"#c4eff1":void 0)(m.activeProgram.facility_type),component:"span",fontSize:"13px",padding:"2px 8px 2px 8px",borderRadius:"16px",marginLeft:{xs:"0px",sm:"8px"},fontWeight:500,alignItems:"center",children:g("".concat(m.activeProgram.facility_type))})]})]}),(0,qt.jsxs)(op,{sx:{display:{xs:"none",md:"flex"},alignItems:"center"},children:[(null===m||void 0===m||null===(l=m.heading)||void 0===l?void 0:l.name)&&(0,qt.jsx)(qt.Fragment,{children:(0,qt.jsx)(sy,{title:g("rpm_Program_qr"),children:(0,qt.jsx)(wh,{size:"large","aria-label":"show 4 new mails",color:"inherit",onClick:N,sx:{backgroundColor:"#E0F2FE",padding:"8px",border:"1px solid rgba(0, 0, 0, 0.12)","&:hover":{backgroundColor:"#3f51b5",color:"#ffff"}},children:(0,qt.jsx)(by.A,{fontSize:"medium"})})})}),(null===y||void 0===y?void 0:y.length)>1&&(0,qt.jsx)(op,{sx:{width:"100%"},mr:1.5,ml:1.5,children:(0,qt.jsx)(aj,{fullWidth:!0,disableClearable:!0,size:"small",margin:"dense",id:"course",name:"course",options:y,sx:{minWidth:"200px"},getOptionLabel:e=>(null===e||void 0===e?void 0:e.display_name)||"",renderOption:(e,t)=>(0,We.createElement)(op,(0,i.A)((0,i.A)({component:"li"},e),{},{key:t.code}),(0,qt.jsx)(op,{children:(0,qt.jsx)(Cf,{variant:"body1",component:"p",children:t.display_name})})),onChange:async(e,t,n)=>{t&&"selectOption"===n&&(v("".concat(ld.DOCTOR.PROGRAM,"/").concat(t.code,"/patients")),window.location.reload())},renderInput:e=>(0,qt.jsx)(Q_,(0,i.A)((0,i.A)({},e),{},{placeholder:g("rpm_SelectProgram")+"...",sx:{minWidth:"200px"},className:"program-tour-step5"}))})}),null!==x&&void 0!==x&&x.showStaffMenu||null!==x&&void 0!==x&&x.showRoleMenu?(0,qt.jsx)(Ff,{item:!0,children:(0,qt.jsxs)(d_,{fullWidth:!0,size:"small",className:"manageUserDropdown",children:[(0,qt.jsx)(xh,{variant:"contained",color:"primary",id:"basic-button","aria-controls":M?"demo-customized-menu":void 0,"aria-haspopup":"true","aria-expanded":M?"true":void 0,disableElevation:!0,onClick:e=>{S(e.currentTarget)},endIcon:(0,qt.jsx)(ab.A,{}),sx:{minWidth:"160px",marginRight:"10px"},className:"program-tour-step6",children:"Manage Users"}),(0,qt.jsxs)(tf,{id:"basic-menu",anchorEl:w,open:M,onClose:L,MenuListProps:{"aria-labelledby":"basic-button"},className:"test",children:[null!==x&&void 0!==x&&x.showStaffMenu?(0,qt.jsx)(mf,{sx:{minWidth:"160px"},onClick:()=>{L(),v(ld.DOCTOR.USERS)},children:g("rpm_Staff")}):null,null!==x&&void 0!==x&&x.showRoleMenu?(0,qt.jsx)(mf,{sx:{minWidth:"160px"},onClick:()=>{L(),v(ld.DOCTOR.ROLES)},children:g("rpm_Roles")}):null]})]})}):null,(0,qt.jsx)(sy,{title:g("rpm_Account_Menu"),children:(0,qt.jsx)(wh,{size:"large",edge:"end","aria-label":"account of current user","aria-controls":"account-menu","aria-haspopup":"true",onClick:I,color:"inherit",sx:{p:0,mx:.5},className:"program-tour-step4",children:(0,qt.jsx)(Ny,{sx:{bgcolor:"secondary.main"},sizes:"small",children:null===j||void 0===j?void 0:j.charAt(0).toLocaleUpperCase()})})})]}),(0,qt.jsx)(op,{sx:{display:{xs:"flex",md:"none"}},children:(0,qt.jsx)(wh,{size:"large","aria-label":"show more","aria-controls":z,"aria-haspopup":"true",onClick:e=>{k(e.currentTarget)},color:"inherit",children:(0,qt.jsx)(up.A,{})})})]})]}),(0,qt.jsx)(eg,{}),b&&(0,qt.jsx)(ob,{})]}),H,B,(0,qt.jsx)(_C,{open:P,imageUrl:O,onClose:N,programCode:null===m||void 0===m||null===(c=m.activeProgram)||void 0===c?void 0:c.program_code,downloadImage:async()=>{try{var e;await f(Us(null===m||void 0===m||null===(e=m.activeProgram)||void 0===e?void 0:e.program_code)),N(),f(Zo({subTitle:"message:rpm_QrDownloadedSuccessfully",severity:ud.SUCCESS}))}catch(t){console.log(t),N(),f(Zo({subTitle:"error:rpm_QrDownloadedFailed",severity:ud.ERROR}))}},downloadButton:!0,imageWidthHeight:{width:"225",height:"225"},programName:null===m||void 0===m||null===(d=m.activeProgram)||void 0===d?void 0:d.display_name,customWidth:"375px",customMarginTop:{xs:"0px",md:"-8px"}})]})}CC.defaultProps={handleDrawerOpen:()=>{},handleDrawerClose:()=>{},authUser:{},open:!1,headerData:{},allPrograms:[],onProgramChange:()=>{},onResetFilter:()=>{},filterByProgram:"",assignProgramList:[],fetchUserPrograms:()=>{},isGroupRootAccess:{}};const wC=CC,SC=280,AC=e=>({width:SC,transition:e.transitions.create("width",{easing:e.transitions.easing.sharp,duration:e.transitions.duration.enteringScreen}),overflowX:"hidden"}),kC=e=>({transition:e.transitions.create("width",{easing:e.transitions.easing.sharp,duration:e.transitions.duration.leavingScreen}),overflowX:"hidden",width:"calc(".concat(e.spacing(7)," + 1px)"),[e.breakpoints.up("sm")]:{width:"calc(".concat(e.spacing(8)," + 1px)")}}),TC=(0,Vn.Ay)("div")(e=>{var t;let{theme:n}=e;return(0,i.A)((0,i.A)({display:"flex",alignItems:"center",justifyContent:"flex-end",padding:n.spacing(0,1)},n.mixins.toolbar),{},{[null===n||void 0===n||null===(t=n.breakpoints)||void 0===t?void 0:t.up("md")]:{minHeight:80}})}),EC=(0,Vn.Ay)(Sp,{shouldForwardProp:e=>"open"!==e})(e=>{let{theme:t,open:n}=e;return(0,i.A)({zIndex:t.zIndex.drawer+1,width:"calc(100% - ".concat(65,"px)"),transition:t.transitions.create(["width","margin"],{easing:t.transitions.easing.sharp,duration:t.transitions.duration.leavingScreen})},n&&{marginLeft:SC,width:"calc(100% - ".concat(SC,"px)"),transition:t.transitions.create(["width","margin"],{easing:t.transitions.easing.sharp,duration:t.transitions.duration.enteringScreen})})}),MC=(0,Vn.Ay)(dg,{shouldForwardProp:e=>"open"!==e})(e=>{let{theme:t,open:n}=e;return(0,i.A)((0,i.A)({width:SC,flexShrink:0,whiteSpace:"nowrap",boxSizing:"border-box"},n&&(0,i.A)((0,i.A)({},AC(t)),{},{"& .MuiDrawer-paper":AC(t)})),!n&&(0,i.A)((0,i.A)({},kC(t)),{},{"& .MuiDrawer-paper":kC(t)}))});function OC(e){let{headerData:t}=e;const[n,r]=We.useState(window.innerWidth>768),i=Nt(),o=()=>{r(!1)};return(0,qt.jsxs)(qt.Fragment,{children:[t.headerBar&&(0,qt.jsx)(wC,{open:n,headerData:t,handleDrawerOpen:()=>{r(!0)},handleDrawerClose:o}),t.sideBar&&(0,qt.jsx)(fy,{headerData:t,openDrawer:n,handleDrawerClose:o,handleUserTour:async()=>{await i(Jg({skip_tour:["false"]})),window.location.reload()}})]})}const RC=e=>{let{open:t,link:n,onClose:r}=e;return(0,qt.jsxs)(cC,{open:t,onClose:r,fullWidth:!0,children:[(0,qt.jsx)(fC,{sx:{m:0,p:2},children:r?(0,qt.jsx)(wh,{"aria-label":"close",onClick:r,sx:{position:"absolute",right:8,top:8,color:e=>e.palette.grey[500]},children:(0,qt.jsx)(J_.A,{})}):null}),(0,qt.jsx)(bC,{children:(0,qt.jsx)(op,{mt:2,children:(0,qt.jsx)("iframe",{title:"External Link",src:n,width:"100%",style:{height:"calc(100vh - 140px)",border:"none"}})})})]})};RC.defaultProps={open:!1,link:"",onClose:()=>{}};const PC=RC,DC=(0,We.createContext)(),NC=e=>t=>t({type:zo,payload:e});const LC=function(){return(0,qt.jsx)("h1",{children:"Access Denied"})};var IC=n(69120);const FC=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"";const r=window.location.pathname.split("/");let i=!1;i="program"!=r[r.length-1];return[{id:"doc_pages",name:"docMenu",data:[{url:"/rpm/program",type:"LINK",name:i?"Home":"Program",id:"programs",icon:(0,qt.jsx)(tc,{}),className:"menuLink",query:n,searchParams:t},null!==e&&void 0!==e&&e.isAdmin?{url:"/rpm/allusers",type:"LINK",name:"All Users",id:"allusers",icon:(0,qt.jsx)(mc,{}),className:"menuLink",query:n,searchParams:t}:{id:"allusers",name:"All Users",className:"d-none"},(null===e||void 0===e?void 0:e.isAdmin)&&{url:"/rpm/wellness",type:"LINK",name:"Wellness Goals",id:"wellnessGoals",icon:(0,qt.jsx)(td,{}),className:"menuLink",query:n,searchParams:t},(null===e||void 0===e?void 0:e.isAdmin)&&{url:"/rpm/exercise",type:"LINK",name:"Exercise",id:"exerciseGoals",icon:(0,qt.jsx)(nd,{}),className:"menuLink",query:n,searchParams:t},(null===e||void 0===e?void 0:e.isAdmin)&&{url:"/rpm/enquiry",type:"LINK",name:"Enquiry List",id:"enquiryList",icon:(0,qt.jsx)(rd,{}),className:"menuLink",query:n,searchParams:t},(null===e||void 0===e?void 0:e.isAdmin)&&{url:"/rpm/license-manager",type:"LINK",name:"License Manager",id:"licenseManager",icon:(0,qt.jsx)(id,{}),className:"menuLink",query:n,searchParams:t,data:[{url:"/rpm/license-manager/packages-templates",type:"LINK",name:"Package Templates",id:"packageTemplates",icon:(0,qt.jsx)(od,{}),className:"menuLink",query:n,searchParams:t},{url:"/rpm/license-manager/program-packages",type:"LINK",name:"Program Packages",id:"programPackages",icon:(0,qt.jsx)(ad,{}),className:"menuLink",query:n,searchParams:t}]}]}]},$C=function(){var e,t,n;let r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},a=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"",s=arguments.length>4&&void 0!==arguments[4]?arguments[4]:{};return[{id:"patient_pages",name:"patientMenu",data:[{id:"patient_header",icon:(0,qt.jsx)(Ny,{src:null===i||void 0===i||null===(e=i.profile)||void 0===e?void 0:e.profileImage,sx:{bgcolor:"primary.theme.200",color:"grey.800",fontWeight:700},children:null===i||void 0===i||null===(t=i.first_name)||void 0===t||null===(n=t.charAt(0))||void 0===n?void 0:n.toLocaleUpperCase()}),className:"patientHeader",name:(0,qt.jsxs)(op,{children:[(0,qt.jsxs)(Cf,{fontWeight:600,noWrap:!0,children:[null===i||void 0===i?void 0:i.first_name,null!==i&&void 0!==i&&i.last_name?" "+(null===i||void 0===i?void 0:i.last_name):null]}),(0,qt.jsx)(Cf,{variant:"body2",noWrap:!0,sx:{display:"none"},children:null===i||void 0===i?void 0:i.id})]}),data:[null!==s&&void 0!==s&&s.is_hospital?{url:"/rpm/program/".concat(o.programId,"/patients/").concat(o.patientId,"/dashboard"),type:"LINK",name:"Medical Chart",id:"dashboard",icon:(0,qt.jsx)(oc,{}),className:"menuLink",query:a,searchParams:o}:{id:"dashboard",name:"Medical Chart",className:"d-none"},{url:"/rpm/program/".concat(o.programId,"/patients/").concat(o.patientId,"/history"),type:"LINK",name:"Medical History",id:"patient_history",icon:(0,qt.jsx)(ac,{}),className:"menuLink",query:a,searchParams:o},{url:"/rpm/program/".concat(o.programId,"/patients/").concat(o.patientId,"/courses"),type:"LINK",name:"Patient Courses",id:"schedule",icon:(0,qt.jsx)(rc,{}),className:"menuLink",query:a,searchParams:o},null!==s&&void 0!==s&&s.is_hospital?{url:"/rpm/program/".concat(o.programId,"/patients/").concat(o.patientId,"/rules"),type:"LINK",name:"Patient Rules",id:"rules",icon:(0,qt.jsx)(cc,{}),className:"menuLink",query:a,searchParams:o}:{id:"rules",name:"Rules",className:"d-none"},null!==r&&void 0!==r&&r.showConsultationList&&null!==s&&void 0!==s&&s.is_hospital?{url:"/rpm/program/".concat(o.programId,"/patients/").concat(o.patientId,"/consultations"),type:"LINK",name:"Consultations",id:"consultations",icon:(0,qt.jsx)(dc,{}),className:"menuLink",query:a,searchParams:o}:{id:"consultations",name:"Consultations",className:"d-none"},null!==s&&void 0!==s&&s.is_hospital?{url:"/rpm/program/".concat(o.programId,"/patients/").concat(o.patientId,"/notes/doctor-note"),type:"LINK",name:"Notes",id:"notes",icon:(0,qt.jsx)(lc,{}),className:"menuLink",query:a,searchParams:o}:{id:"notes",name:"Notes",className:"d-none"},{url:"/rpm/program/".concat(o.programId,"/patients/").concat(o.patientId,"/adherence-report"),type:"LINK",name:"Adherence Report",id:"adherence-report",icon:(0,qt.jsx)(qc,{}),className:"menuLink",query:a,searchParams:o},{url:"/rpm/program/".concat(o.programId,"/patients/").concat(o.patientId,"/details"),type:"LINK",name:"Personal Details",id:"personal_detail",icon:(0,qt.jsx)(sc,{}),className:"menuLink",query:a,searchParams:o},{url:"/rpm/program/".concat(o.programId,"/patients"),type:"LINK",name:"Back",id:"back",icon:(0,qt.jsx)(IC.A,{}),className:"menuLink",query:a,searchParams:o}]}]}]},BC=function(){var e,t;let n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"";return[{id:"program_pages",name:"programMenu",data:[{url:"",id:"program_header",icon:(0,qt.jsx)(Ny,{sx:{bgcolor:"primary.theme.200",color:"grey.800",fontWeight:700},children:null===r||void 0===r||null===(e=r.display_name)||void 0===e||null===(t=e.charAt(0))||void 0===t?void 0:t.toLocaleUpperCase()}),className:"patientHeader",name:(0,qt.jsxs)(op,{children:[(0,qt.jsx)(Cf,{fontWeight:600,noWrap:!0,children:null===r||void 0===r?void 0:r.display_name}),(0,qt.jsx)(Cf,{variant:"body2",noWrap:!0,children:null===r||void 0===r?void 0:r.location})]}),data:[{url:"/rpm/program/".concat(null===r||void 0===r?void 0:r.code,"/dashboard"),type:"LINK",name:"Dashboard",id:"prog_dashboard",icon:(0,qt.jsx)(nc,{}),className:"menuLink",query:o,searchParams:i},{url:"/rpm/program/".concat(null===r||void 0===r?void 0:r.code,"/patients"),type:"LINK",name:"All Patients",id:"all_patients",icon:(0,qt.jsx)(mc,{}),className:"menuLink",query:o,searchParams:i},null!==n&&void 0!==n&&n.isAdmin?{url:"/rpm/program/".concat(null===r||void 0===r?void 0:r.code,"/assignments"),type:"LINK",name:"Assignments",id:"assignments",icon:(0,qt.jsx)(ed,{}),className:"menuLink",query:o,searchParams:i}:{id:"programSettings",name:"Assignments",className:"d-none"},null!==n&&void 0!==n&&n.showCourseList?{url:"/rpm/program/".concat(null===r||void 0===r?void 0:r.code,"/course"),type:"LINK",name:"Courses",id:"schedule_program",icon:(0,qt.jsx)(rc,{}),className:"menuLink",query:o,searchParams:i}:{id:"schedule_program",name:"Course",className:"d-none"},null!==n&&void 0!==n&&n.showRuleList&&null!==r&&void 0!==r&&r.is_hospital?{url:"/rpm/program/".concat(null===r||void 0===r?void 0:r.code,"/rules"),type:"LINK",name:"Rules",id:"rules_program",icon:(0,qt.jsx)(ic,{}),className:"menuLink",query:o,searchParams:i}:{id:"rules_program",name:"Rules",className:"d-none"},null!==n&&void 0!==n&&n.showTemplateList&&null!==r&&void 0!==r&&r.is_hospital?{url:"/rpm/program/".concat(null===r||void 0===r?void 0:r.code,"/templates"),type:"LINK",name:"Rx Templates",id:"prescription_template",icon:(0,qt.jsx)(dc,{}),className:"menuLink",query:o,searchParams:i}:{id:"prescription_template",name:"Rx Template",className:"d-none"},null!==n&&void 0!==n&&n.showTemplateList&&null!==r&&void 0!==r&&r.is_hospital?{url:"/rpm/program/".concat(null===r||void 0===r?void 0:r.code,"/followups"),type:"LINK",name:"Follow-up",id:"followup",icon:(0,qt.jsx)(Hc,{}),className:"menuLink",query:o,searchParams:i}:{id:"followup",name:"Follow Up",className:"d-none"},null!==n&&void 0!==n&&n.isAdmin?{url:"/rpm/program/".concat(null===r||void 0===r?void 0:r.code,"/programsettings"),type:"LINK",name:"Program Settings",id:"programSettings",icon:(0,qt.jsx)(Vc,{}),className:"menuLink",query:o,searchParams:i}:{id:"programSettings",name:"Programe Settings",className:"d-none"},null!==n&&void 0!==n&&n.showDismissAlertPatientBtn?{url:"/rpm/program/".concat(null===r||void 0===r?void 0:r.code,"/notifications"),type:"LINK",name:"Notifications",id:"notifications",icon:(0,qt.jsx)(Bc,{}),className:"menuLink",query:o,searchParams:i}:{id:"notifications",name:"Email",className:"d-none"},null!==n&&void 0!==n&&n.isAdmin&&null!==r&&void 0!==r&&r.is_hospital?{url:"/rpm/program/".concat(null===r||void 0===r?void 0:r.code,"/consultation-templates"),type:"LINK",name:"Templates",id:"templates",icon:(0,qt.jsx)(Gc,{}),className:"menuLink",query:o,searchParams:i}:{id:"templates",name:"Email",className:"d-none"}]}]}]};function zC(e){const{theme:t,name:n,props:r}=e;return t&&t.components&&t.components[n]&&t.components[n].defaultProps?(0,Ap.A)(t.components[n].defaultProps,r):r}function HC(e,t,n,r,i){const[o,a]=We.useState(()=>i&&n?n(e).matches:r?r(e).matches:t);return(0,hn.A)(()=>{let t=!0;if(!n)return;const r=n(e),i=()=>{t&&a(r.matches)};return i(),r.addListener(i),()=>{t=!1,r.removeListener(i)}},[e,n]),o}const WC=Ue.useSyncExternalStore;function UC(e,t,n,r,i){const o=We.useCallback(()=>t,[t]),a=We.useMemo(()=>{if(i&&n)return()=>n(e).matches;if(null!==r){const{matches:t}=r(e);return()=>t}return o},[o,e,r,i,n]),[s,l]=We.useMemo(()=>{if(null===n)return[o,()=>()=>{}];const t=n(e);return[()=>t.matches,e=>(t.addListener(e),()=>{t.removeListener(e)})]},[o,n,e]);return WC(l,s,a)}function VC(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const n=Ut(),r="undefined"!==typeof window&&"undefined"!==typeof window.matchMedia,{defaultMatches:i=!1,matchMedia:o=(r?window.matchMedia:null),ssrMatchMedia:a=null,noSsr:s=!1}=zC({name:"MuiUseMediaQuery",props:t,theme:n});let l="function"===typeof e?e(n):e;l=l.replace(/^@media( ?)/m,"");return(void 0!==WC?UC:HC)(l,i,o,a,s)}const GC=n.p+"static/media/es_no_data_image.bb75ae4ead8088ef0902.png";var qC=n(66360),YC=n(92577);function ZC(e){return(0,sr.Ay)("MuiInputAdornment",e)}const KC=(0,ar.A)("MuiInputAdornment",["root","filled","standard","outlined","positionStart","positionEnd","disablePointerEvents","hiddenLabel","sizeSmall"]);var XC;const QC=["children","className","component","disablePointerEvents","disableTypography","position","variant"],JC=(0,Vn.Ay)("div",{name:"MuiInputAdornment",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t["position".concat((0,pp.A)(n.position))],!0===n.disablePointerEvents&&t.disablePointerEvents,t[n.variant]]}})(e=>{let{theme:t,ownerState:n}=e;return(0,Ft.A)({display:"flex",height:"0.01em",maxHeight:"2em",alignItems:"center",whiteSpace:"nowrap",color:(t.vars||t).palette.action.active},"filled"===n.variant&&{["&.".concat(KC.positionStart,"&:not(.").concat(KC.hiddenLabel,")")]:{marginTop:16}},"start"===n.position&&{marginRight:8},"end"===n.position&&{marginLeft:8},!0===n.disablePointerEvents&&{pointerEvents:"none"})}),ew=We.forwardRef(function(e,t){const n=(0,$t.b)({props:e,name:"MuiInputAdornment"}),{children:r,className:i,component:o="div",disablePointerEvents:a=!1,disableTypography:s=!1,position:l,variant:c}=n,d=(0,nn.A)(n,QC),u=vj()||{};let p=c;c&&u.variant,u&&!p&&(p=u.variant);const h=(0,Ft.A)({},n,{hiddenLabel:u.hiddenLabel,size:u.size,disablePointerEvents:a,position:l,variant:p}),m=(e=>{const{classes:t,disablePointerEvents:n,hiddenLabel:r,position:i,size:o,variant:a}=e,s={root:["root",n&&"disablePointerEvents",i&&"position".concat((0,pp.A)(i)),a,r&&"hiddenLabel",o&&"size".concat((0,pp.A)(o))]};return(0,ir.A)(s,ZC,t)})(h);return(0,qt.jsx)(gj.Provider,{value:null,children:(0,qt.jsx)(JC,(0,Ft.A)({as:o,ownerState:h,className:(0,nr.A)(m.root,i),ref:t},d,{children:"string"!==typeof r||s?(0,qt.jsxs)(We.Fragment,{children:["start"===l?XC||(XC=(0,qt.jsx)("span",{className:"notranslate",children:"\u200b"})):null,r]}):(0,qt.jsx)(Cf,{color:"text.secondary",children:r})}))})}),tw=ew;const nw=We.createContext();function rw(e){return(0,sr.Ay)("MuiTableRow",e)}const iw=(0,ar.A)("MuiTableRow",["root","selected","hover","head","footer"]),ow=["className","component","hover","selected"],aw=(0,Vn.Ay)("tr",{name:"MuiTableRow",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.head&&t.head,n.footer&&t.footer]}})(e=>{let{theme:t}=e;return{color:"inherit",display:"table-row",verticalAlign:"middle",outline:0,["&.".concat(iw.hover,":hover")]:{backgroundColor:(t.vars||t).palette.action.hover},["&.".concat(iw.selected)]:{backgroundColor:t.vars?"rgba(".concat(t.vars.palette.primary.mainChannel," / ").concat(t.vars.palette.action.selectedOpacity,")"):(0,hp.X4)(t.palette.primary.main,t.palette.action.selectedOpacity),"&:hover":{backgroundColor:t.vars?"rgba(".concat(t.vars.palette.primary.mainChannel," / calc(").concat(t.vars.palette.action.selectedOpacity," + ").concat(t.vars.palette.action.hoverOpacity,"))"):(0,hp.X4)(t.palette.primary.main,t.palette.action.selectedOpacity+t.palette.action.hoverOpacity)}}}}),sw="tr",lw=We.forwardRef(function(e,t){const n=(0,$t.b)({props:e,name:"MuiTableRow"}),{className:r,component:i=sw,hover:o=!1,selected:a=!1}=n,s=(0,nn.A)(n,ow),l=We.useContext(nw),c=(0,Ft.A)({},n,{component:i,hover:o,selected:a,head:l&&"head"===l.variant,footer:l&&"footer"===l.variant}),d=(e=>{const{classes:t,selected:n,hover:r,head:i,footer:o}=e,a={root:["root",n&&"selected",r&&"hover",i&&"head",o&&"footer"]};return(0,ir.A)(a,rw,t)})(c);return(0,qt.jsx)(aw,(0,Ft.A)({as:i,ref:t,className:(0,nr.A)(d.root,r),role:i===sw?null:"row",ownerState:c},s))}),cw=lw;const dw=We.createContext();function uw(e){return(0,sr.Ay)("MuiTableCell",e)}const pw=(0,ar.A)("MuiTableCell",["root","head","body","footer","sizeSmall","sizeMedium","paddingCheckbox","paddingNone","alignLeft","alignCenter","alignRight","alignJustify","stickyHeader"]),hw=["align","className","component","padding","scope","size","sortDirection","variant"],mw=(0,Vn.Ay)("td",{name:"MuiTableCell",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[n.variant],t["size".concat((0,pp.A)(n.size))],"normal"!==n.padding&&t["padding".concat((0,pp.A)(n.padding))],"inherit"!==n.align&&t["align".concat((0,pp.A)(n.align))],n.stickyHeader&&t.stickyHeader]}})(e=>{let{theme:t,ownerState:n}=e;return(0,Ft.A)({},t.typography.body2,{display:"table-cell",verticalAlign:"inherit",borderBottom:t.vars?"1px solid ".concat(t.vars.palette.TableCell.border):"1px solid\n    ".concat("light"===t.palette.mode?(0,hp.a)((0,hp.X4)(t.palette.divider,1),.88):(0,hp.e$)((0,hp.X4)(t.palette.divider,1),.68)),textAlign:"left",padding:16},"head"===n.variant&&{color:(t.vars||t).palette.text.primary,lineHeight:t.typography.pxToRem(24),fontWeight:t.typography.fontWeightMedium},"body"===n.variant&&{color:(t.vars||t).palette.text.primary},"footer"===n.variant&&{color:(t.vars||t).palette.text.secondary,lineHeight:t.typography.pxToRem(21),fontSize:t.typography.pxToRem(12)},"small"===n.size&&{padding:"6px 16px",["&.".concat(pw.paddingCheckbox)]:{width:24,padding:"0 12px 0 16px","& > *":{padding:0}}},"checkbox"===n.padding&&{width:48,padding:"0 0 0 4px"},"none"===n.padding&&{padding:0},"left"===n.align&&{textAlign:"left"},"center"===n.align&&{textAlign:"center"},"right"===n.align&&{textAlign:"right",flexDirection:"row-reverse"},"justify"===n.align&&{textAlign:"justify"},n.stickyHeader&&{position:"sticky",top:0,zIndex:2,backgroundColor:(t.vars||t).palette.background.default})}),fw=We.forwardRef(function(e,t){const n=(0,$t.b)({props:e,name:"MuiTableCell"}),{align:r="inherit",className:i,component:o,padding:a,scope:s,size:l,sortDirection:c,variant:d}=n,u=(0,nn.A)(n,hw),p=We.useContext(dw),h=We.useContext(nw),m=h&&"head"===h.variant;let f;f=o||(m?"th":"td");let g=s;"td"===f?g=void 0:!g&&m&&(g="col");const v=d||h&&h.variant,x=(0,Ft.A)({},n,{align:r,component:f,padding:a||(p&&p.padding?p.padding:"normal"),size:l||(p&&p.size?p.size:"medium"),sortDirection:c,stickyHeader:"head"===v&&p&&p.stickyHeader,variant:v}),y=(e=>{const{classes:t,variant:n,align:r,padding:i,size:o,stickyHeader:a}=e,s={root:["root",n,a&&"stickyHeader","inherit"!==r&&"align".concat((0,pp.A)(r)),"normal"!==i&&"padding".concat((0,pp.A)(i)),"size".concat((0,pp.A)(o))]};return(0,ir.A)(s,uw,t)})(x);let b=null;return c&&(b="asc"===c?"ascending":"descending"),(0,qt.jsx)(mw,(0,Ft.A)({as:f,ref:t,className:(0,nr.A)(y.root,i),"aria-sort":b,scope:g,ownerState:x},u))}),gw=fw;function vw(e){return(0,sr.Ay)("PrivateSwitchBase",e)}(0,ar.A)("PrivateSwitchBase",["root","checked","disabled","input","edgeStart","edgeEnd"]);const xw=["autoFocus","checked","checkedIcon","className","defaultChecked","disabled","disableFocusRipple","edge","icon","id","inputProps","inputRef","name","onBlur","onChange","onFocus","readOnly","required","tabIndex","type","value"],yw=(0,Vn.Ay)(sh,{name:"MuiSwitchBase"})(e=>{let{ownerState:t}=e;return(0,Ft.A)({padding:9,borderRadius:"50%"},"start"===t.edge&&{marginLeft:"small"===t.size?-3:-12},"end"===t.edge&&{marginRight:"small"===t.size?-3:-12})}),bw=(0,Vn.Ay)("input",{name:"MuiSwitchBase",shouldForwardProp:kp.A})({cursor:"inherit",position:"absolute",opacity:0,width:"100%",height:"100%",top:0,left:0,margin:0,padding:0,zIndex:1}),jw=We.forwardRef(function(e,t){const{autoFocus:n,checked:r,checkedIcon:i,className:o,defaultChecked:a,disabled:s,disableFocusRipple:l=!1,edge:c=!1,icon:d,id:u,inputProps:p,inputRef:h,name:m,onBlur:f,onChange:g,onFocus:v,readOnly:x,required:y=!1,tabIndex:b,type:j,value:_}=e,C=(0,nn.A)(e,xw),[w,S]=(0,Yx.A)({controlled:r,default:Boolean(a),name:"SwitchBase",state:"checked"}),A=vj();let k=s;A&&"undefined"===typeof k&&(k=A.disabled);const T="checkbox"===j||"radio"===j,E=(0,Ft.A)({},e,{checked:w,disabled:k,disableFocusRipple:l,edge:c}),M=(e=>{const{classes:t,checked:n,disabled:r,edge:i}=e,o={root:["root",n&&"checked",r&&"disabled",i&&"edge".concat((0,pp.A)(i))],input:["input"]};return(0,ir.A)(o,vw,t)})(E);return(0,qt.jsxs)(yw,(0,Ft.A)({component:"span",className:(0,nr.A)(M.root,o),centerRipple:!0,focusRipple:!l,disabled:k,tabIndex:null,role:void 0,onFocus:e=>{v&&v(e),A&&A.onFocus&&A.onFocus(e)},onBlur:e=>{f&&f(e),A&&A.onBlur&&A.onBlur(e)},ownerState:E,ref:t},C,{children:[(0,qt.jsx)(bw,(0,Ft.A)({autoFocus:n,checked:r,defaultChecked:a,className:M.input,disabled:k,id:T?u:void 0,name:m,onChange:e=>{if(e.nativeEvent.defaultPrevented)return;const t=e.target.checked;S(t),g&&g(e,t)},readOnly:x,ref:h,required:y,ownerState:E,tabIndex:b,type:j},"checkbox"===j&&void 0===_?{}:{value:_},p)),w?i:d]}))}),_w=jw,Cw=(0,Cy.A)((0,qt.jsx)("path",{d:"M19 5v14H5V5h14m0-2H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2z"}),"CheckBoxOutlineBlank"),ww=(0,Cy.A)((0,qt.jsx)("path",{d:"M19 3H5c-1.11 0-2 .9-2 2v14c0 1.1.89 2 2 2h14c1.11 0 2-.9 2-2V5c0-1.1-.89-2-2-2zm-9 14l-5-5 1.41-1.41L10 14.17l7.59-7.59L19 8l-9 9z"}),"CheckBox"),Sw=(0,Cy.A)((0,qt.jsx)("path",{d:"M19 3H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm-2 10H7v-2h10v2z"}),"IndeterminateCheckBox");function Aw(e){return(0,sr.Ay)("MuiCheckbox",e)}const kw=(0,ar.A)("MuiCheckbox",["root","checked","disabled","indeterminate","colorPrimary","colorSecondary","sizeSmall","sizeMedium"]),Tw=["checkedIcon","color","icon","indeterminate","indeterminateIcon","inputProps","size","className"],Ew=(0,Vn.Ay)(_w,{shouldForwardProp:e=>(0,kp.A)(e)||"classes"===e,name:"MuiCheckbox",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.indeterminate&&t.indeterminate,t["size".concat((0,pp.A)(n.size))],"default"!==n.color&&t["color".concat((0,pp.A)(n.color))]]}})(e=>{let{theme:t,ownerState:n}=e;return(0,Ft.A)({color:(t.vars||t).palette.text.secondary},!n.disableRipple&&{"&:hover":{backgroundColor:t.vars?"rgba(".concat("default"===n.color?t.vars.palette.action.activeChannel:t.vars.palette[n.color].mainChannel," / ").concat(t.vars.palette.action.hoverOpacity,")"):(0,hp.X4)("default"===n.color?t.palette.action.active:t.palette[n.color].main,t.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}}},"default"!==n.color&&{["&.".concat(kw.checked,", &.").concat(kw.indeterminate)]:{color:(t.vars||t).palette[n.color].main},["&.".concat(kw.disabled)]:{color:(t.vars||t).palette.action.disabled}})}),Mw=(0,qt.jsx)(ww,{}),Ow=(0,qt.jsx)(Cw,{}),Rw=(0,qt.jsx)(Sw,{}),Pw=We.forwardRef(function(e,t){var n,r;const i=(0,$t.b)({props:e,name:"MuiCheckbox"}),{checkedIcon:o=Mw,color:a="primary",icon:s=Ow,indeterminate:l=!1,indeterminateIcon:c=Rw,inputProps:d,size:u="medium",className:p}=i,h=(0,nn.A)(i,Tw),m=l?c:s,f=l?c:o,g=(0,Ft.A)({},i,{color:a,indeterminate:l,size:u}),v=(e=>{const{classes:t,indeterminate:n,color:r,size:i}=e,o={root:["root",n&&"indeterminate","color".concat((0,pp.A)(r)),"size".concat((0,pp.A)(i))]},a=(0,ir.A)(o,Aw,t);return(0,Ft.A)({},t,a)})(g);return(0,qt.jsx)(Ew,(0,Ft.A)({type:"checkbox",inputProps:(0,Ft.A)({"data-indeterminate":l},d),icon:We.cloneElement(m,{fontSize:null!=(n=m.props.fontSize)?n:u}),checkedIcon:We.cloneElement(f,{fontSize:null!=(r=f.props.fontSize)?r:u}),ownerState:g,ref:t,className:(0,nr.A)(v.root,p)},h,{classes:v}))}),Dw=Pw;function Nw(e){return(0,sr.Ay)("MuiTable",e)}(0,ar.A)("MuiTable",["root","stickyHeader"]);const Lw=["className","component","padding","size","stickyHeader"],Iw=(0,Vn.Ay)("table",{name:"MuiTable",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.stickyHeader&&t.stickyHeader]}})(e=>{let{theme:t,ownerState:n}=e;return(0,Ft.A)({display:"table",width:"100%",borderCollapse:"collapse",borderSpacing:0,"& caption":(0,Ft.A)({},t.typography.body2,{padding:t.spacing(2),color:(t.vars||t).palette.text.secondary,textAlign:"left",captionSide:"bottom"})},n.stickyHeader&&{borderCollapse:"separate"})}),Fw="table",$w=We.forwardRef(function(e,t){const n=(0,$t.b)({props:e,name:"MuiTable"}),{className:r,component:i=Fw,padding:o="normal",size:a="medium",stickyHeader:s=!1}=n,l=(0,nn.A)(n,Lw),c=(0,Ft.A)({},n,{component:i,padding:o,size:a,stickyHeader:s}),d=(e=>{const{classes:t,stickyHeader:n}=e,r={root:["root",n&&"stickyHeader"]};return(0,ir.A)(r,Nw,t)})(c),u=We.useMemo(()=>({padding:o,size:a,stickyHeader:s}),[o,a,s]);return(0,qt.jsx)(dw.Provider,{value:u,children:(0,qt.jsx)(Iw,(0,Ft.A)({as:i,role:i===Fw?null:"table",ref:t,className:(0,nr.A)(d.root,r),ownerState:c},l))})}),Bw=$w;function zw(e){return(0,sr.Ay)("MuiTableContainer",e)}(0,ar.A)("MuiTableContainer",["root"]);const Hw=["className","component"],Ww=(0,Vn.Ay)("div",{name:"MuiTableContainer",slot:"Root",overridesResolver:(e,t)=>t.root})({width:"100%",overflowX:"auto"}),Uw=We.forwardRef(function(e,t){const n=(0,$t.b)({props:e,name:"MuiTableContainer"}),{className:r,component:i="div"}=n,o=(0,nn.A)(n,Hw),a=(0,Ft.A)({},n,{component:i}),s=(e=>{const{classes:t}=e;return(0,ir.A)({root:["root"]},zw,t)})(a);return(0,qt.jsx)(Ww,(0,Ft.A)({ref:t,as:i,className:(0,nr.A)(s.root,r),ownerState:a},o))}),Vw=Uw;function Gw(e){return String(e).match(/[\d.\-+]*\s*(.*)/)[1]||""}function qw(e){return parseFloat(e)}function Yw(e){return(0,sr.Ay)("MuiSkeleton",e)}(0,ar.A)("MuiSkeleton",["root","text","rectangular","rounded","circular","pulse","wave","withChildren","fitContent","heightAuto"]);var Zw,Kw,Xw,Qw;const Jw=["animation","className","component","height","style","variant","width"];let eS,tS,nS,rS;const iS=(0,Ip.i7)(eS||(eS=Zw||(Zw=Mp(["\n  0% {\n    opacity: 1;\n  }\n\n  50% {\n    opacity: 0.4;\n  }\n\n  100% {\n    opacity: 1;\n  }\n"])))),oS=(0,Ip.i7)(tS||(tS=Kw||(Kw=Mp(["\n  0% {\n    transform: translateX(-100%);\n  }\n\n  50% {\n    /* +0.5s of delay between each loop */\n    transform: translateX(100%);\n  }\n\n  100% {\n    transform: translateX(100%);\n  }\n"])))),aS=(0,Vn.Ay)("span",{name:"MuiSkeleton",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[n.variant],!1!==n.animation&&t[n.animation],n.hasChildren&&t.withChildren,n.hasChildren&&!n.width&&t.fitContent,n.hasChildren&&!n.height&&t.heightAuto]}})(e=>{let{theme:t,ownerState:n}=e;const r=Gw(t.shape.borderRadius)||"px",i=qw(t.shape.borderRadius);return(0,Ft.A)({display:"block",backgroundColor:t.vars?t.vars.palette.Skeleton.bg:Qn(t.palette.text.primary,"light"===t.palette.mode?.11:.13),height:"1.2em"},"text"===n.variant&&{marginTop:0,marginBottom:0,height:"auto",transformOrigin:"0 55%",transform:"scale(1, 0.60)",borderRadius:"".concat(i).concat(r,"/").concat(Math.round(i/.6*10)/10).concat(r),"&:empty:before":{content:'"\\00a0"'}},"circular"===n.variant&&{borderRadius:"50%"},"rounded"===n.variant&&{borderRadius:(t.vars||t).shape.borderRadius},n.hasChildren&&{"& > *":{visibility:"hidden"}},n.hasChildren&&!n.width&&{maxWidth:"fit-content"},n.hasChildren&&!n.height&&{height:"auto"})},e=>{let{ownerState:t}=e;return"pulse"===t.animation&&(0,Ip.AH)(nS||(nS=Xw||(Xw=Mp(["\n      animation: "," 2s ease-in-out 0.5s infinite;\n    "]))),iS)},e=>{let{ownerState:t,theme:n}=e;return"wave"===t.animation&&(0,Ip.AH)(rS||(rS=Qw||(Qw=Mp(["\n      position: relative;\n      overflow: hidden;\n\n      /* Fix bug in Safari https://bugs.webkit.org/show_bug.cgi?id=68196 */\n      -webkit-mask-image: -webkit-radial-gradient(white, black);\n\n      &::after {\n        animation: "," 2s linear 0.5s infinite;\n        background: linear-gradient(\n          90deg,\n          transparent,\n          ",",\n          transparent\n        );\n        content: '';\n        position: absolute;\n        transform: translateX(-100%); /* Avoid flash during server-side hydration */\n        bottom: 0;\n        left: 0;\n        right: 0;\n        top: 0;\n      }\n    "]))),oS,(n.vars||n).palette.action.hover)}),sS=We.forwardRef(function(e,t){const n=(0,$t.b)({props:e,name:"MuiSkeleton"}),{animation:r="pulse",className:i,component:o="span",height:a,style:s,variant:l="text",width:c}=n,d=(0,nn.A)(n,Jw),u=(0,Ft.A)({},n,{animation:r,component:o,variant:l,hasChildren:Boolean(d.children)}),p=(e=>{const{classes:t,variant:n,animation:r,hasChildren:i,width:o,height:a}=e,s={root:["root",n,r,i&&"withChildren",i&&!o&&"fitContent",i&&!a&&"heightAuto"]};return(0,ir.A)(s,Yw,t)})(u);return(0,qt.jsx)(aS,(0,Ft.A)({as:o,ref:t,className:(0,nr.A)(p.root,i),ownerState:u},d,{style:(0,Ft.A)({width:c,height:a},s)}))}),lS=sS;function cS(e){return(0,sr.Ay)("MuiTableBody",e)}(0,ar.A)("MuiTableBody",["root"]);const dS=["className","component"],uS=(0,Vn.Ay)("tbody",{name:"MuiTableBody",slot:"Root",overridesResolver:(e,t)=>t.root})({display:"table-row-group"}),pS={variant:"body"},hS="tbody",mS=We.forwardRef(function(e,t){const n=(0,$t.b)({props:e,name:"MuiTableBody"}),{className:r,component:i=hS}=n,o=(0,nn.A)(n,dS),a=(0,Ft.A)({},n,{component:i}),s=(e=>{const{classes:t}=e;return(0,ir.A)({root:["root"]},cS,t)})(a);return(0,qt.jsx)(nw.Provider,{value:pS,children:(0,qt.jsx)(uS,(0,Ft.A)({className:(0,nr.A)(s.root,r),as:i,ref:t,role:i===hS?null:"rowgroup",ownerState:a},o))})}),fS=mS;function gS(e){return(0,sr.Ay)("MuiTableHead",e)}(0,ar.A)("MuiTableHead",["root"]);const vS=["className","component"],xS=(0,Vn.Ay)("thead",{name:"MuiTableHead",slot:"Root",overridesResolver:(e,t)=>t.root})({display:"table-header-group"}),yS={variant:"head"},bS="thead",jS=We.forwardRef(function(e,t){const n=(0,$t.b)({props:e,name:"MuiTableHead"}),{className:r,component:i=bS}=n,o=(0,nn.A)(n,vS),a=(0,Ft.A)({},n,{component:i}),s=(e=>{const{classes:t}=e;return(0,ir.A)({root:["root"]},gS,t)})(a);return(0,qt.jsx)(nw.Provider,{value:yS,children:(0,qt.jsx)(xS,(0,Ft.A)({as:i,className:(0,nr.A)(s.root,r),ref:t,role:i===bS?null:"rowgroup",ownerState:a},o))})}),_S=jS;var CS=n(96604),wS=n.n(CS);function SS(e){let{headCells:t,skeletonVrows:n=3}=e,r=wS()(n);return(0,qt.jsx)(qt.Fragment,{children:(0,qt.jsx)(Vw,{component:yp,variant:"outlined",children:(0,qt.jsxs)(Bw,{children:[(0,qt.jsx)(_S,{sx:{bgcolor:"primary.theme.50",height:"4rem"},children:(0,qt.jsx)(cw,{children:null===t||void 0===t?void 0:t.map(e=>(0,qt.jsx)(gw,{children:(0,qt.jsx)(lS,{variant:"text",height:10,width:50})},e.id))})}),(0,qt.jsx)(fS,{children:r.map(e=>(0,qt.jsx)(cw,{sx:{"&:last-child td, &:last-child th":{border:0}},children:null===t||void 0===t?void 0:t.map(e=>(0,qt.jsx)(gw,{component:"th",scope:"row",children:(0,qt.jsx)(lS,{variant:"text",height:10})},e.id))},e))})]})})})}const AS=function(e){const{children:t,data:n,headCells:r,noDataImage:i}=e;return n.length?(0,qt.jsx)(fS,{children:t}):(0,qt.jsx)(fS,{children:(0,qt.jsx)(cw,{children:(0,qt.jsx)(gw,{colSpan:r.length+1,children:(0,qt.jsx)(op,{py:6,children:(0,qt.jsx)("img",{src:i,alt:"No Data Found",style:{display:"block",margin:"auto",maxWidth:"300px",width:"100%",height:"auto"}})})})})})};AS.defaultProps={children:null,data:[],headCells:[],service:"",isCallInitialization:!0,noDataImage:GC};const kS=AS;var TS=n(10763);const ES=(0,Cy.A)((0,qt.jsx)("path",{d:"M20 12l-1.41-1.41L13 16.17V4h-2v12.17l-5.58-5.59L4 12l8 8 8-8z"}),"ArrowDownward");function MS(e){return(0,sr.Ay)("MuiTableSortLabel",e)}const OS=(0,ar.A)("MuiTableSortLabel",["root","active","icon","iconDirectionDesc","iconDirectionAsc"]),RS=["active","children","className","direction","hideSortIcon","IconComponent"],PS=(0,Vn.Ay)(sh,{name:"MuiTableSortLabel",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.active&&t.active]}})(e=>{let{theme:t}=e;return{cursor:"pointer",display:"inline-flex",justifyContent:"flex-start",flexDirection:"inherit",alignItems:"center","&:focus":{color:(t.vars||t).palette.text.secondary},"&:hover":{color:(t.vars||t).palette.text.secondary,["& .".concat(OS.icon)]:{opacity:.5}},["&.".concat(OS.active)]:{color:(t.vars||t).palette.text.primary,["& .".concat(OS.icon)]:{opacity:1,color:(t.vars||t).palette.text.secondary}}}}),DS=(0,Vn.Ay)("span",{name:"MuiTableSortLabel",slot:"Icon",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.icon,t["iconDirection".concat((0,pp.A)(n.direction))]]}})(e=>{let{theme:t,ownerState:n}=e;return(0,Ft.A)({fontSize:18,marginRight:4,marginLeft:4,opacity:0,transition:t.transitions.create(["opacity","transform"],{duration:t.transitions.duration.shorter}),userSelect:"none"},"desc"===n.direction&&{transform:"rotate(0deg)"},"asc"===n.direction&&{transform:"rotate(180deg)"})}),NS=We.forwardRef(function(e,t){const n=(0,$t.b)({props:e,name:"MuiTableSortLabel"}),{active:r=!1,children:i,className:o,direction:a="asc",hideSortIcon:s=!1,IconComponent:l=ES}=n,c=(0,nn.A)(n,RS),d=(0,Ft.A)({},n,{active:r,direction:a,hideSortIcon:s,IconComponent:l}),u=(e=>{const{classes:t,direction:n,active:r}=e,i={root:["root",r&&"active"],icon:["icon","iconDirection".concat((0,pp.A)(n))]};return(0,ir.A)(i,MS,t)})(d);return(0,qt.jsxs)(PS,(0,Ft.A)({className:(0,nr.A)(u.root,o),component:"span",disableRipple:!0,ownerState:d,ref:t},c,{children:[i,s&&!r?null:(0,qt.jsx)(DS,{as:l,className:(0,nr.A)(u.icon),ownerState:d})]}))}),LS=NS;var IS="function"===typeof Symbol&&"symbol"===typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"===typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e};const FS="object"===("undefined"===typeof window?"undefined":IS(window))&&"object"===("undefined"===typeof document?"undefined":IS(document))&&9===document.nodeType;var $S={}.constructor;function BS(e){if(null==e||"object"!==typeof e)return e;if(Array.isArray(e))return e.map(BS);if(e.constructor!==$S)return e;var t={};for(var n in e)t[n]=BS(e[n]);return t}function zS(e,t,n){void 0===e&&(e="unnamed");var r=n.jss,i=BS(t),o=r.plugins.onCreateRule(e,i,n);return o||(e[0],null)}var HS=function(e,t){for(var n="",r=0;r<e.length&&"!important"!==e[r];r++)n&&(n+=t),n+=e[r];return n},WS=function(e){if(!Array.isArray(e))return e;var t="";if(Array.isArray(e[0]))for(var n=0;n<e.length&&"!important"!==e[n];n++)t&&(t+=", "),t+=HS(e[n]," ");else t=HS(e,", ");return"!important"===e[e.length-1]&&(t+=" !important"),t};function US(e){return e&&!1===e.format?{linebreak:"",space:""}:{linebreak:"\n",space:" "}}function VS(e,t){for(var n="",r=0;r<t;r++)n+="  ";return n+e}function GS(e,t,n){void 0===n&&(n={});var r="";if(!t)return r;var i=n.indent,o=void 0===i?0:i,a=t.fallbacks;!1===n.format&&(o=-1/0);var s=US(n),l=s.linebreak,c=s.space;if(e&&o++,a)if(Array.isArray(a))for(var d=0;d<a.length;d++){var u=a[d];for(var p in u){var h=u[p];null!=h&&(r&&(r+=l),r+=VS(p+":"+c+WS(h)+";",o))}}else for(var m in a){var f=a[m];null!=f&&(r&&(r+=l),r+=VS(m+":"+c+WS(f)+";",o))}for(var g in t){var v=t[g];null!=v&&"fallbacks"!==g&&(r&&(r+=l),r+=VS(g+":"+c+WS(v)+";",o))}return(r||n.allowEmpty)&&e?(r&&(r=""+l+r+l),VS(""+e+c+"{"+r,--o)+VS("}",o)):r}var qS=/([[\].#*$><+~=|^:(),"'`\s])/g,YS="undefined"!==typeof CSS&&CSS.escape,ZS=function(e){return YS?YS(e):e.replace(qS,"\\$1")},KS=function(){function e(e,t,n){this.type="style",this.isProcessed=!1;var r=n.sheet,i=n.Renderer;this.key=e,this.options=n,this.style=t,r?this.renderer=r.renderer:i&&(this.renderer=new i)}return e.prototype.prop=function(e,t,n){if(void 0===t)return this.style[e];var r=!!n&&n.force;if(!r&&this.style[e]===t)return this;var i=t;n&&!1===n.process||(i=this.options.jss.plugins.onChangeValue(t,e,this));var o=null==i||!1===i,a=e in this.style;if(o&&!a&&!r)return this;var s=o&&a;if(s?delete this.style[e]:this.style[e]=i,this.renderable&&this.renderer)return s?this.renderer.removeProperty(this.renderable,e):this.renderer.setProperty(this.renderable,e,i),this;var l=this.options.sheet;return l&&l.attached,this},e}(),XS=function(e){function t(t,n,r){var i;i=e.call(this,t,n,r)||this;var o=r.selector,a=r.scoped,s=r.sheet,l=r.generateId;return o?i.selectorText=o:!1!==a&&(i.id=l(d(d(i)),s),i.selectorText="."+ZS(i.id)),i}_n(t,e);var n=t.prototype;return n.applyTo=function(e){var t=this.renderer;if(t){var n=this.toJSON();for(var r in n)t.setProperty(e,r,n[r])}return this},n.toJSON=function(){var e={};for(var t in this.style){var n=this.style[t];"object"!==typeof n?e[t]=n:Array.isArray(n)&&(e[t]=WS(n))}return e},n.toString=function(e){var t=this.options.sheet,n=!!t&&t.options.link?(0,Ft.A)({},e,{allowEmpty:!0}):e;return GS(this.selectorText,this.style,n)},c(t,[{key:"selector",set:function(e){if(e!==this.selectorText){this.selectorText=e;var t=this.renderer,n=this.renderable;if(n&&t)t.setSelector(n,e)||t.replaceRule(n,this)}},get:function(){return this.selectorText}}]),t}(KS),QS={onCreateRule:function(e,t,n){return"@"===e[0]||n.parent&&"keyframes"===n.parent.type?null:new XS(e,t,n)}},JS={indent:1,children:!0},eA=/@([\w-]+)/,tA=function(){function e(e,t,n){this.type="conditional",this.isProcessed=!1,this.key=e;var r=e.match(eA);for(var i in this.at=r?r[1]:"unknown",this.query=n.name||"@"+this.at,this.options=n,this.rules=new SA((0,Ft.A)({},n,{parent:this})),t)this.rules.add(i,t[i]);this.rules.process()}var t=e.prototype;return t.getRule=function(e){return this.rules.get(e)},t.indexOf=function(e){return this.rules.indexOf(e)},t.addRule=function(e,t,n){var r=this.rules.add(e,t,n);return r?(this.options.jss.plugins.onProcessRule(r),r):null},t.replaceRule=function(e,t,n){var r=this.rules.replace(e,t,n);return r&&this.options.jss.plugins.onProcessRule(r),r},t.toString=function(e){void 0===e&&(e=JS);var t=US(e).linebreak;if(null==e.indent&&(e.indent=JS.indent),null==e.children&&(e.children=JS.children),!1===e.children)return this.query+" {}";var n=this.rules.toString(e);return n?this.query+" {"+t+n+t+"}":""},e}(),nA=/@container|@media|@supports\s+/,rA={onCreateRule:function(e,t,n){return nA.test(e)?new tA(e,t,n):null}},iA={indent:1,children:!0},oA=/@keyframes\s+([\w-]+)/,aA=function(){function e(e,t,n){this.type="keyframes",this.at="@keyframes",this.isProcessed=!1;var r=e.match(oA);r&&r[1]?this.name=r[1]:this.name="noname",this.key=this.type+"-"+this.name,this.options=n;var i=n.scoped,o=n.sheet,a=n.generateId;for(var s in this.id=!1===i?this.name:ZS(a(this,o)),this.rules=new SA((0,Ft.A)({},n,{parent:this})),t)this.rules.add(s,t[s],(0,Ft.A)({},n,{parent:this}));this.rules.process()}return e.prototype.toString=function(e){void 0===e&&(e=iA);var t=US(e).linebreak;if(null==e.indent&&(e.indent=iA.indent),null==e.children&&(e.children=iA.children),!1===e.children)return this.at+" "+this.id+" {}";var n=this.rules.toString(e);return n&&(n=""+t+n+t),this.at+" "+this.id+" {"+n+"}"},e}(),sA=/@keyframes\s+/,lA=/\$([\w-]+)/g,cA=function(e,t){return"string"===typeof e?e.replace(lA,function(e,n){return n in t?t[n]:e}):e},dA=function(e,t,n){var r=e[t],i=cA(r,n);i!==r&&(e[t]=i)},uA={onCreateRule:function(e,t,n){return"string"===typeof e&&sA.test(e)?new aA(e,t,n):null},onProcessStyle:function(e,t,n){return"style"===t.type&&n?("animation-name"in e&&dA(e,"animation-name",n.keyframes),"animation"in e&&dA(e,"animation",n.keyframes),e):e},onChangeValue:function(e,t,n){var r=n.options.sheet;if(!r)return e;switch(t){case"animation":case"animation-name":return cA(e,r.keyframes);default:return e}}},pA=function(e){function t(){return e.apply(this,arguments)||this}return _n(t,e),t.prototype.toString=function(e){var t=this.options.sheet,n=!!t&&t.options.link?(0,Ft.A)({},e,{allowEmpty:!0}):e;return GS(this.key,this.style,n)},t}(KS),hA={onCreateRule:function(e,t,n){return n.parent&&"keyframes"===n.parent.type?new pA(e,t,n):null}},mA=function(){function e(e,t,n){this.type="font-face",this.at="@font-face",this.isProcessed=!1,this.key=e,this.style=t,this.options=n}return e.prototype.toString=function(e){var t=US(e).linebreak;if(Array.isArray(this.style)){for(var n="",r=0;r<this.style.length;r++)n+=GS(this.at,this.style[r]),this.style[r+1]&&(n+=t);return n}return GS(this.at,this.style,e)},e}(),fA=/@font-face/,gA={onCreateRule:function(e,t,n){return fA.test(e)?new mA(e,t,n):null}},vA=function(){function e(e,t,n){this.type="viewport",this.at="@viewport",this.isProcessed=!1,this.key=e,this.style=t,this.options=n}return e.prototype.toString=function(e){return GS(this.key,this.style,e)},e}(),xA={onCreateRule:function(e,t,n){return"@viewport"===e||"@-ms-viewport"===e?new vA(e,t,n):null}},yA=function(){function e(e,t,n){this.type="simple",this.isProcessed=!1,this.key=e,this.value=t,this.options=n}return e.prototype.toString=function(e){if(Array.isArray(this.value)){for(var t="",n=0;n<this.value.length;n++)t+=this.key+" "+this.value[n]+";",this.value[n+1]&&(t+="\n");return t}return this.key+" "+this.value+";"},e}(),bA={"@charset":!0,"@import":!0,"@namespace":!0},jA={onCreateRule:function(e,t,n){return e in bA?new yA(e,t,n):null}},_A=[QS,rA,uA,hA,gA,xA,jA],CA={process:!0},wA={force:!0,process:!0},SA=function(){function e(e){this.map={},this.raw={},this.index=[],this.counter=0,this.options=e,this.classes=e.classes,this.keyframes=e.keyframes}var t=e.prototype;return t.add=function(e,t,n){var r=this.options,i=r.parent,o=r.sheet,a=r.jss,s=r.Renderer,l=r.generateId,c=r.scoped,d=(0,Ft.A)({classes:this.classes,parent:i,sheet:o,jss:a,Renderer:s,generateId:l,scoped:c,name:e,keyframes:this.keyframes,selector:void 0},n),u=e;e in this.raw&&(u=e+"-d"+this.counter++),this.raw[u]=t,u in this.classes&&(d.selector="."+ZS(this.classes[u]));var p=zS(u,t,d);if(!p)return null;this.register(p);var h=void 0===d.index?this.index.length:d.index;return this.index.splice(h,0,p),p},t.replace=function(e,t,n){var r=this.get(e),i=this.index.indexOf(r);r&&this.remove(r);var o=n;return-1!==i&&(o=(0,Ft.A)({},n,{index:i})),this.add(e,t,o)},t.get=function(e){return this.map[e]},t.remove=function(e){this.unregister(e),delete this.raw[e.key],this.index.splice(this.index.indexOf(e),1)},t.indexOf=function(e){return this.index.indexOf(e)},t.process=function(){var e=this.options.jss.plugins;this.index.slice(0).forEach(e.onProcessRule,e)},t.register=function(e){this.map[e.key]=e,e instanceof XS?(this.map[e.selector]=e,e.id&&(this.classes[e.key]=e.id)):e instanceof aA&&this.keyframes&&(this.keyframes[e.name]=e.id)},t.unregister=function(e){delete this.map[e.key],e instanceof XS?(delete this.map[e.selector],delete this.classes[e.key]):e instanceof aA&&delete this.keyframes[e.name]},t.update=function(){var e,t,n;if("string"===typeof(arguments.length<=0?void 0:arguments[0])?(e=arguments.length<=0?void 0:arguments[0],t=arguments.length<=1?void 0:arguments[1],n=arguments.length<=2?void 0:arguments[2]):(t=arguments.length<=0?void 0:arguments[0],n=arguments.length<=1?void 0:arguments[1],e=null),e)this.updateOne(this.get(e),t,n);else for(var r=0;r<this.index.length;r++)this.updateOne(this.index[r],t,n)},t.updateOne=function(t,n,r){void 0===r&&(r=CA);var i=this.options,o=i.jss.plugins,a=i.sheet;if(t.rules instanceof e)t.rules.update(n,r);else{var s=t.style;if(o.onUpdate(n,t,a,r),r.process&&s&&s!==t.style){for(var l in o.onProcessStyle(t.style,t,a),t.style){var c=t.style[l];c!==s[l]&&t.prop(l,c,wA)}for(var d in s){var u=t.style[d],p=s[d];null==u&&u!==p&&t.prop(d,null,wA)}}}},t.toString=function(e){for(var t="",n=this.options.sheet,r=!!n&&n.options.link,i=US(e).linebreak,o=0;o<this.index.length;o++){var a=this.index[o].toString(e);(a||r)&&(t&&(t+=i),t+=a)}return t},e}(),AA=function(){function e(e,t){for(var n in this.attached=!1,this.deployed=!1,this.classes={},this.keyframes={},this.options=(0,Ft.A)({},t,{sheet:this,parent:this,classes:this.classes,keyframes:this.keyframes}),t.Renderer&&(this.renderer=new t.Renderer(this)),this.rules=new SA(this.options),e)this.rules.add(n,e[n]);this.rules.process()}var t=e.prototype;return t.attach=function(){return this.attached||(this.renderer&&this.renderer.attach(),this.attached=!0,this.deployed||this.deploy()),this},t.detach=function(){return this.attached?(this.renderer&&this.renderer.detach(),this.attached=!1,this):this},t.addRule=function(e,t,n){var r=this.queue;this.attached&&!r&&(this.queue=[]);var i=this.rules.add(e,t,n);return i?(this.options.jss.plugins.onProcessRule(i),this.attached?this.deployed?(r?r.push(i):(this.insertRule(i),this.queue&&(this.queue.forEach(this.insertRule,this),this.queue=void 0)),i):i:(this.deployed=!1,i)):null},t.replaceRule=function(e,t,n){var r=this.rules.get(e);if(!r)return this.addRule(e,t,n);var i=this.rules.replace(e,t,n);return i&&this.options.jss.plugins.onProcessRule(i),this.attached?this.deployed?(this.renderer&&(i?r.renderable&&this.renderer.replaceRule(r.renderable,i):this.renderer.deleteRule(r)),i):i:(this.deployed=!1,i)},t.insertRule=function(e){this.renderer&&this.renderer.insertRule(e)},t.addRules=function(e,t){var n=[];for(var r in e){var i=this.addRule(r,e[r],t);i&&n.push(i)}return n},t.getRule=function(e){return this.rules.get(e)},t.deleteRule=function(e){var t="object"===typeof e?e:this.rules.get(e);return!(!t||this.attached&&!t.renderable)&&(this.rules.remove(t),!(this.attached&&t.renderable&&this.renderer)||this.renderer.deleteRule(t.renderable))},t.indexOf=function(e){return this.rules.indexOf(e)},t.deploy=function(){return this.renderer&&this.renderer.deploy(),this.deployed=!0,this},t.update=function(){var e;return(e=this.rules).update.apply(e,arguments),this},t.updateOne=function(e,t,n){return this.rules.updateOne(e,t,n),this},t.toString=function(e){return this.rules.toString(e)},e}(),kA=function(){function e(){this.plugins={internal:[],external:[]},this.registry={}}var t=e.prototype;return t.onCreateRule=function(e,t,n){for(var r=0;r<this.registry.onCreateRule.length;r++){var i=this.registry.onCreateRule[r](e,t,n);if(i)return i}return null},t.onProcessRule=function(e){if(!e.isProcessed){for(var t=e.options.sheet,n=0;n<this.registry.onProcessRule.length;n++)this.registry.onProcessRule[n](e,t);e.style&&this.onProcessStyle(e.style,e,t),e.isProcessed=!0}},t.onProcessStyle=function(e,t,n){for(var r=0;r<this.registry.onProcessStyle.length;r++)t.style=this.registry.onProcessStyle[r](t.style,t,n)},t.onProcessSheet=function(e){for(var t=0;t<this.registry.onProcessSheet.length;t++)this.registry.onProcessSheet[t](e)},t.onUpdate=function(e,t,n,r){for(var i=0;i<this.registry.onUpdate.length;i++)this.registry.onUpdate[i](e,t,n,r)},t.onChangeValue=function(e,t,n){for(var r=e,i=0;i<this.registry.onChangeValue.length;i++)r=this.registry.onChangeValue[i](r,t,n);return r},t.use=function(e,t){void 0===t&&(t={queue:"external"});var n=this.plugins[t.queue];-1===n.indexOf(e)&&(n.push(e),this.registry=[].concat(this.plugins.external,this.plugins.internal).reduce(function(e,t){for(var n in t)n in e&&e[n].push(t[n]);return e},{onCreateRule:[],onProcessRule:[],onProcessStyle:[],onProcessSheet:[],onChangeValue:[],onUpdate:[]}))},e}(),TA=function(){function e(){this.registry=[]}var t=e.prototype;return t.add=function(e){var t=this.registry,n=e.options.index;if(-1===t.indexOf(e))if(0===t.length||n>=this.index)t.push(e);else for(var r=0;r<t.length;r++)if(t[r].options.index>n)return void t.splice(r,0,e)},t.reset=function(){this.registry=[]},t.remove=function(e){var t=this.registry.indexOf(e);this.registry.splice(t,1)},t.toString=function(e){for(var t=void 0===e?{}:e,n=t.attached,r=(0,nn.A)(t,["attached"]),i=US(r).linebreak,o="",a=0;a<this.registry.length;a++){var s=this.registry[a];null!=n&&s.attached!==n||(o&&(o+=i),o+=s.toString(r))}return o},c(e,[{key:"index",get:function(){return 0===this.registry.length?0:this.registry[this.registry.length-1].options.index}}]),e}(),EA=new TA,MA="undefined"!==typeof globalThis?globalThis:"undefined"!==typeof window&&window.Math===Math?window:"undefined"!==typeof self&&self.Math===Math?self:Function("return this")(),OA="2f1acc6c3a606b082e5eef5e54414ffb";null==MA[OA]&&(MA[OA]=0);var RA=MA[OA]++,PA=function(e){void 0===e&&(e={});var t=0;return function(n,r){t+=1;var i="",o="";return r&&(r.options.classNamePrefix&&(o=r.options.classNamePrefix),null!=r.options.jss.id&&(i=String(r.options.jss.id))),e.minify?""+(o||"c")+RA+i+t:o+n.key+"-"+RA+(i?"-"+i:"")+"-"+t}},DA=function(e){var t;return function(){return t||(t=e()),t}},NA=function(e,t){try{return e.attributeStyleMap?e.attributeStyleMap.get(t):e.style.getPropertyValue(t)}catch(n){return""}},LA=function(e,t,n){try{var r=n;if(Array.isArray(n)&&(r=WS(n)),e.attributeStyleMap)e.attributeStyleMap.set(t,r);else{var i=r?r.indexOf("!important"):-1,o=i>-1?r.substr(0,i-1):r;e.style.setProperty(t,o,i>-1?"important":"")}}catch(a){return!1}return!0},IA=function(e,t){try{e.attributeStyleMap?e.attributeStyleMap.delete(t):e.style.removeProperty(t)}catch(n){}},FA=function(e,t){return e.selectorText=t,e.selectorText===t},$A=DA(function(){return document.querySelector("head")});function BA(e){var t=EA.registry;if(t.length>0){var n=function(e,t){for(var n=0;n<e.length;n++){var r=e[n];if(r.attached&&r.options.index>t.index&&r.options.insertionPoint===t.insertionPoint)return r}return null}(t,e);if(n&&n.renderer)return{parent:n.renderer.element.parentNode,node:n.renderer.element};if(n=function(e,t){for(var n=e.length-1;n>=0;n--){var r=e[n];if(r.attached&&r.options.insertionPoint===t.insertionPoint)return r}return null}(t,e),n&&n.renderer)return{parent:n.renderer.element.parentNode,node:n.renderer.element.nextSibling}}var r=e.insertionPoint;if(r&&"string"===typeof r){var i=function(e){for(var t=$A(),n=0;n<t.childNodes.length;n++){var r=t.childNodes[n];if(8===r.nodeType&&r.nodeValue.trim()===e)return r}return null}(r);if(i)return{parent:i.parentNode,node:i.nextSibling}}return!1}var zA=DA(function(){var e=document.querySelector('meta[property="csp-nonce"]');return e?e.getAttribute("content"):null}),HA=function(e,t,n){try{"insertRule"in e?e.insertRule(t,n):"appendRule"in e&&e.appendRule(t)}catch(r){return!1}return e.cssRules[n]},WA=function(e,t){var n=e.cssRules.length;return void 0===t||t>n?n:t},UA=function(){function e(e){this.getPropertyValue=NA,this.setProperty=LA,this.removeProperty=IA,this.setSelector=FA,this.hasInsertedRules=!1,this.cssRules=[],e&&EA.add(e),this.sheet=e;var t=this.sheet?this.sheet.options:{},n=t.media,r=t.meta,i=t.element;this.element=i||function(){var e=document.createElement("style");return e.textContent="\n",e}(),this.element.setAttribute("data-jss",""),n&&this.element.setAttribute("media",n),r&&this.element.setAttribute("data-meta",r);var o=zA();o&&this.element.setAttribute("nonce",o)}var t=e.prototype;return t.attach=function(){if(!this.element.parentNode&&this.sheet){!function(e,t){var n=t.insertionPoint,r=BA(t);if(!1!==r&&r.parent)r.parent.insertBefore(e,r.node);else if(n&&"number"===typeof n.nodeType){var i=n,o=i.parentNode;o&&o.insertBefore(e,i.nextSibling)}else $A().appendChild(e)}(this.element,this.sheet.options);var e=Boolean(this.sheet&&this.sheet.deployed);this.hasInsertedRules&&e&&(this.hasInsertedRules=!1,this.deploy())}},t.detach=function(){if(this.sheet){var e=this.element.parentNode;e&&e.removeChild(this.element),this.sheet.options.link&&(this.cssRules=[],this.element.textContent="\n")}},t.deploy=function(){var e=this.sheet;e&&(e.options.link?this.insertRules(e.rules):this.element.textContent="\n"+e.toString()+"\n")},t.insertRules=function(e,t){for(var n=0;n<e.index.length;n++)this.insertRule(e.index[n],n,t)},t.insertRule=function(e,t,n){if(void 0===n&&(n=this.element.sheet),e.rules){var r=e,i=n;if("conditional"===e.type||"keyframes"===e.type){var o=WA(n,t);if(!1===(i=HA(n,r.toString({children:!1}),o)))return!1;this.refCssRule(e,o,i)}return this.insertRules(r.rules,i),i}var a=e.toString();if(!a)return!1;var s=WA(n,t),l=HA(n,a,s);return!1!==l&&(this.hasInsertedRules=!0,this.refCssRule(e,s,l),l)},t.refCssRule=function(e,t,n){e.renderable=n,e.options.parent instanceof AA&&this.cssRules.splice(t,0,n)},t.deleteRule=function(e){var t=this.element.sheet,n=this.indexOf(e);return-1!==n&&(t.deleteRule(n),this.cssRules.splice(n,1),!0)},t.indexOf=function(e){return this.cssRules.indexOf(e)},t.replaceRule=function(e,t){var n=this.indexOf(e);return-1!==n&&(this.element.sheet.deleteRule(n),this.cssRules.splice(n,1),this.insertRule(t,n))},t.getRules=function(){return this.element.sheet.cssRules},e}(),VA=0,GA=function(){function e(e){this.id=VA++,this.version="10.10.0",this.plugins=new kA,this.options={id:{minify:!1},createGenerateId:PA,Renderer:FS?UA:null,plugins:[]},this.generateId=PA({minify:!1});for(var t=0;t<_A.length;t++)this.plugins.use(_A[t],{queue:"internal"});this.setup(e)}var t=e.prototype;return t.setup=function(e){return void 0===e&&(e={}),e.createGenerateId&&(this.options.createGenerateId=e.createGenerateId),e.id&&(this.options.id=(0,Ft.A)({},this.options.id,e.id)),(e.createGenerateId||e.id)&&(this.generateId=this.options.createGenerateId(this.options.id)),null!=e.insertionPoint&&(this.options.insertionPoint=e.insertionPoint),"Renderer"in e&&(this.options.Renderer=e.Renderer),e.plugins&&this.use.apply(this,e.plugins),this},t.createStyleSheet=function(e,t){void 0===t&&(t={});var n=t.index;"number"!==typeof n&&(n=0===EA.index?0:EA.index+1);var r=new AA(e,(0,Ft.A)({},t,{jss:this,generateId:t.generateId||this.generateId,insertionPoint:this.options.insertionPoint,Renderer:this.options.Renderer,index:n}));return this.plugins.onProcessSheet(r),r},t.removeStyleSheet=function(e){return e.detach(),EA.remove(e),this},t.createRule=function(e,t,n){if(void 0===t&&(t={}),void 0===n&&(n={}),"object"===typeof e)return this.createRule(void 0,e,t);var r=(0,Ft.A)({},n,{name:e,jss:this,Renderer:this.options.Renderer});r.generateId||(r.generateId=this.generateId),r.classes||(r.classes={}),r.keyframes||(r.keyframes={});var i=zS(e,t,r);return i&&this.plugins.onProcessRule(i),i},t.use=function(){for(var e=this,t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return n.forEach(function(t){e.plugins.use(t)}),this},e}(),qA=function(e){return new GA(e)},YA="object"===typeof CSS&&null!=CSS&&"number"in CSS;function ZA(e){var t=null;for(var n in e){var r=e[n],i=typeof r;if("function"===i)t||(t={}),t[n]=r;else if("object"===i&&null!==r&&!Array.isArray(r)){var o=ZA(r);o&&(t||(t={}),t[n]=o)}}return t}qA();function KA(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const{baseClasses:t,newClasses:n,Component:r}=e;if(!n)return t;const i=(0,Ft.A)({},t);return Object.keys(n).forEach(e=>{n[e]&&(i[e]="".concat(t[e]," ").concat(n[e]))}),i}const XA={set:(e,t,n,r)=>{let i=e.get(t);i||(i=new Map,e.set(t,i)),i.set(n,r)},get:(e,t,n)=>{const r=e.get(t);return r?r.get(n):void 0},delete:(e,t,n)=>{e.get(t).delete(n)}},QA=XA;function JA(){var e;const t=on();return null!=(e=null==t?void 0:t.$$material)?e:t}const ek=["checked","disabled","error","focused","focusVisible","required","expanded","selected"];var tk=Date.now(),nk="fnValues"+tk,rk="fnStyle"+ ++tk;const ik=function(){return{onCreateRule:function(e,t,n){if("function"!==typeof t)return null;var r=zS(e,{},n);return r[rk]=t,r},onProcessStyle:function(e,t){if(nk in t||rk in t)return e;var n={};for(var r in e){var i=e[r];"function"===typeof i&&(delete e[r],n[r]=i)}return t[nk]=n,e},onUpdate:function(e,t,n,r){var i=t,o=i[rk];o&&(i.style=o(e)||{});var a=i[nk];if(a)for(var s in a)i.prop(s,a[s](e),r)}}};var ok="@global",ak="@global ",sk=function(){function e(e,t,n){for(var r in this.type="global",this.at=ok,this.isProcessed=!1,this.key=e,this.options=n,this.rules=new SA((0,Ft.A)({},n,{parent:this})),t)this.rules.add(r,t[r]);this.rules.process()}var t=e.prototype;return t.getRule=function(e){return this.rules.get(e)},t.addRule=function(e,t,n){var r=this.rules.add(e,t,n);return r&&this.options.jss.plugins.onProcessRule(r),r},t.replaceRule=function(e,t,n){var r=this.rules.replace(e,t,n);return r&&this.options.jss.plugins.onProcessRule(r),r},t.indexOf=function(e){return this.rules.indexOf(e)},t.toString=function(e){return this.rules.toString(e)},e}(),lk=function(){function e(e,t,n){this.type="global",this.at=ok,this.isProcessed=!1,this.key=e,this.options=n;var r=e.substr(8);this.rule=n.jss.createRule(r,t,(0,Ft.A)({},n,{parent:this}))}return e.prototype.toString=function(e){return this.rule?this.rule.toString(e):""},e}(),ck=/\s*,\s*/g;function dk(e,t){for(var n=e.split(ck),r="",i=0;i<n.length;i++)r+=t+" "+n[i].trim(),n[i+1]&&(r+=", ");return r}const uk=function(){return{onCreateRule:function(e,t,n){if(!e)return null;if(e===ok)return new sk(e,t,n);if("@"===e[0]&&e.substr(0,8)===ak)return new lk(e,t,n);var r=n.parent;return r&&("global"===r.type||r.options.parent&&"global"===r.options.parent.type)&&(n.scoped=!1),n.selector||!1!==n.scoped||(n.selector=e),null},onProcessRule:function(e,t){"style"===e.type&&t&&(function(e,t){var n=e.options,r=e.style,i=r?r[ok]:null;if(i){for(var o in i)t.addRule(o,i[o],(0,Ft.A)({},n,{selector:dk(o,e.selector)}));delete r[ok]}}(e,t),function(e,t){var n=e.options,r=e.style;for(var i in r)if("@"===i[0]&&i.substr(0,7)===ok){var o=dk(i.substr(7),e.selector);t.addRule(o,r[i],(0,Ft.A)({},n,{selector:o})),delete r[i]}}(e,t))}}};var pk=/\s*,\s*/g,hk=/&/g,mk=/\$([\w-]+)/g;const fk=function(){function e(e,t){return function(n,r){var i=e.getRule(r)||t&&t.getRule(r);return i?i.selector:r}}function t(e,t){for(var n=t.split(pk),r=e.split(pk),i="",o=0;o<n.length;o++)for(var a=n[o],s=0;s<r.length;s++){var l=r[s];i&&(i+=", "),i+=-1!==l.indexOf("&")?l.replace(hk,a):a+" "+l}return i}function n(e,t,n){if(n)return(0,Ft.A)({},n,{index:n.index+1});var r=e.options.nestingLevel;r=void 0===r?1:r+1;var i=(0,Ft.A)({},e.options,{nestingLevel:r,index:t.indexOf(e)+1});return delete i.name,i}return{onProcessStyle:function(r,i,o){if("style"!==i.type)return r;var a,s,l=i,c=l.options.parent;for(var d in r){var u=-1!==d.indexOf("&"),p="@"===d[0];if(u||p){if(a=n(l,c,a),u){var h=t(d,l.selector);s||(s=e(c,o)),h=h.replace(mk,s);var m=l.key+"-"+d;"replaceRule"in c?c.replaceRule(m,r[d],(0,Ft.A)({},a,{selector:h})):c.addRule(m,r[d],(0,Ft.A)({},a,{selector:h}))}else p&&c.addRule(d,{},a).addRule(l.key,r[d],{selector:l.selector});delete r[d]}}return r}}};var gk=/[A-Z]/g,vk=/^ms-/,xk={};function yk(e){return"-"+e.toLowerCase()}const bk=function(e){if(xk.hasOwnProperty(e))return xk[e];var t=e.replace(gk,yk);return xk[e]=vk.test(t)?"-"+t:t};function jk(e){var t={};for(var n in e){t[0===n.indexOf("--")?n:bk(n)]=e[n]}return e.fallbacks&&(Array.isArray(e.fallbacks)?t.fallbacks=e.fallbacks.map(jk):t.fallbacks=jk(e.fallbacks)),t}const _k=function(){return{onProcessStyle:function(e){if(Array.isArray(e)){for(var t=0;t<e.length;t++)e[t]=jk(e[t]);return e}return jk(e)},onChangeValue:function(e,t,n){if(0===t.indexOf("--"))return e;var r=bk(t);return t===r?e:(n.prop(r,e),null)}}};var Ck=YA&&CSS?CSS.px:"px",wk=YA&&CSS?CSS.ms:"ms",Sk=YA&&CSS?CSS.percent:"%";function Ak(e){var t=/(-[a-z])/g,n=function(e){return e[1].toUpperCase()},r={};for(var i in e)r[i]=e[i],r[i.replace(t,n)]=e[i];return r}var kk=Ak({"animation-delay":wk,"animation-duration":wk,"background-position":Ck,"background-position-x":Ck,"background-position-y":Ck,"background-size":Ck,border:Ck,"border-bottom":Ck,"border-bottom-left-radius":Ck,"border-bottom-right-radius":Ck,"border-bottom-width":Ck,"border-left":Ck,"border-left-width":Ck,"border-radius":Ck,"border-right":Ck,"border-right-width":Ck,"border-top":Ck,"border-top-left-radius":Ck,"border-top-right-radius":Ck,"border-top-width":Ck,"border-width":Ck,"border-block":Ck,"border-block-end":Ck,"border-block-end-width":Ck,"border-block-start":Ck,"border-block-start-width":Ck,"border-block-width":Ck,"border-inline":Ck,"border-inline-end":Ck,"border-inline-end-width":Ck,"border-inline-start":Ck,"border-inline-start-width":Ck,"border-inline-width":Ck,"border-start-start-radius":Ck,"border-start-end-radius":Ck,"border-end-start-radius":Ck,"border-end-end-radius":Ck,margin:Ck,"margin-bottom":Ck,"margin-left":Ck,"margin-right":Ck,"margin-top":Ck,"margin-block":Ck,"margin-block-end":Ck,"margin-block-start":Ck,"margin-inline":Ck,"margin-inline-end":Ck,"margin-inline-start":Ck,padding:Ck,"padding-bottom":Ck,"padding-left":Ck,"padding-right":Ck,"padding-top":Ck,"padding-block":Ck,"padding-block-end":Ck,"padding-block-start":Ck,"padding-inline":Ck,"padding-inline-end":Ck,"padding-inline-start":Ck,"mask-position-x":Ck,"mask-position-y":Ck,"mask-size":Ck,height:Ck,width:Ck,"min-height":Ck,"max-height":Ck,"min-width":Ck,"max-width":Ck,bottom:Ck,left:Ck,top:Ck,right:Ck,inset:Ck,"inset-block":Ck,"inset-block-end":Ck,"inset-block-start":Ck,"inset-inline":Ck,"inset-inline-end":Ck,"inset-inline-start":Ck,"box-shadow":Ck,"text-shadow":Ck,"column-gap":Ck,"column-rule":Ck,"column-rule-width":Ck,"column-width":Ck,"font-size":Ck,"font-size-delta":Ck,"letter-spacing":Ck,"text-decoration-thickness":Ck,"text-indent":Ck,"text-stroke":Ck,"text-stroke-width":Ck,"word-spacing":Ck,motion:Ck,"motion-offset":Ck,outline:Ck,"outline-offset":Ck,"outline-width":Ck,perspective:Ck,"perspective-origin-x":Sk,"perspective-origin-y":Sk,"transform-origin":Sk,"transform-origin-x":Sk,"transform-origin-y":Sk,"transform-origin-z":Sk,"transition-delay":wk,"transition-duration":wk,"vertical-align":Ck,"flex-basis":Ck,"shape-margin":Ck,size:Ck,gap:Ck,grid:Ck,"grid-gap":Ck,"row-gap":Ck,"grid-row-gap":Ck,"grid-column-gap":Ck,"grid-template-rows":Ck,"grid-template-columns":Ck,"grid-auto-rows":Ck,"grid-auto-columns":Ck,"box-shadow-x":Ck,"box-shadow-y":Ck,"box-shadow-blur":Ck,"box-shadow-spread":Ck,"font-line-height":Ck,"text-shadow-x":Ck,"text-shadow-y":Ck,"text-shadow-blur":Ck});function Tk(e,t,n){if(null==t)return t;if(Array.isArray(t))for(var r=0;r<t.length;r++)t[r]=Tk(e,t[r],n);else if("object"===typeof t)if("fallbacks"===e)for(var i in t)t[i]=Tk(i,t[i],n);else for(var o in t)t[o]=Tk(e+"-"+o,t[o],n);else if("number"===typeof t&&!1===isNaN(t)){var a=n[e]||kk[e];return!a||0===t&&a===Ck?t.toString():"function"===typeof a?a(t).toString():""+t+a}return t}const Ek=function(e){void 0===e&&(e={});var t=Ak(e);return{onProcessStyle:function(e,n){if("style"!==n.type)return e;for(var r in e)e[r]=Tk(r,e[r],t);return e},onChangeValue:function(e,n){return Tk(n,e,t)}}};function Mk(e){return function(e){if(Array.isArray(e))return x(e)}(e)||v(e)||y(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.")}()}var Ok="",Rk="",Pk="",Dk="",Nk=FS&&"ontouchstart"in document.documentElement;if(FS){var Lk={Moz:"-moz-",ms:"-ms-",O:"-o-",Webkit:"-webkit-"},Ik=document.createElement("p").style;for(var Fk in Lk)if(Fk+"Transform"in Ik){Ok=Fk,Rk=Lk[Fk];break}"Webkit"===Ok&&"msHyphens"in Ik&&(Ok="ms",Rk=Lk.ms,Dk="edge"),"Webkit"===Ok&&"-apple-trailing-word"in Ik&&(Pk="apple")}var $k=Ok,Bk=Rk,zk=Pk,Hk=Dk,Wk=Nk;var Uk={noPrefill:["appearance"],supportedProperty:function(e){return"appearance"===e&&("ms"===$k?"-webkit-"+e:Bk+e)}},Vk={noPrefill:["color-adjust"],supportedProperty:function(e){return"color-adjust"===e&&("Webkit"===$k?Bk+"print-"+e:e)}},Gk=/[-\s]+(.)?/g;function qk(e,t){return t?t.toUpperCase():""}function Yk(e){return e.replace(Gk,qk)}function Zk(e){return Yk("-"+e)}var Kk,Xk={noPrefill:["mask"],supportedProperty:function(e,t){if(!/^mask/.test(e))return!1;if("Webkit"===$k){var n="mask-image";if(Yk(n)in t)return e;if($k+Zk(n)in t)return Bk+e}return e}},Qk={noPrefill:["text-orientation"],supportedProperty:function(e){return"text-orientation"===e&&("apple"!==zk||Wk?e:Bk+e)}},Jk={noPrefill:["transform"],supportedProperty:function(e,t,n){return"transform"===e&&(n.transform?e:Bk+e)}},eT={noPrefill:["transition"],supportedProperty:function(e,t,n){return"transition"===e&&(n.transition?e:Bk+e)}},tT={noPrefill:["writing-mode"],supportedProperty:function(e){return"writing-mode"===e&&("Webkit"===$k||"ms"===$k&&"edge"!==Hk?Bk+e:e)}},nT={noPrefill:["user-select"],supportedProperty:function(e){return"user-select"===e&&("Moz"===$k||"ms"===$k||"apple"===zk?Bk+e:e)}},rT={supportedProperty:function(e,t){return!!/^break-/.test(e)&&("Webkit"===$k?"WebkitColumn"+Zk(e)in t&&Bk+"column-"+e:"Moz"===$k&&("page"+Zk(e)in t&&"page-"+e))}},iT={supportedProperty:function(e,t){if(!/^(border|margin|padding)-inline/.test(e))return!1;if("Moz"===$k)return e;var n=e.replace("-inline","");return $k+Zk(n)in t&&Bk+n}},oT={supportedProperty:function(e,t){return Yk(e)in t&&e}},aT={supportedProperty:function(e,t){var n=Zk(e);return"-"===e[0]||"-"===e[0]&&"-"===e[1]?e:$k+n in t?Bk+e:"Webkit"!==$k&&"Webkit"+n in t&&"-webkit-"+e}},sT={supportedProperty:function(e){return"scroll-snap"===e.substring(0,11)&&("ms"===$k?""+Bk+e:e)}},lT={supportedProperty:function(e){return"overscroll-behavior"===e&&("ms"===$k?Bk+"scroll-chaining":e)}},cT={"flex-grow":"flex-positive","flex-shrink":"flex-negative","flex-basis":"flex-preferred-size","justify-content":"flex-pack",order:"flex-order","align-items":"flex-align","align-content":"flex-line-pack"},dT={supportedProperty:function(e,t){var n=cT[e];return!!n&&($k+Zk(n)in t&&Bk+n)}},uT={flex:"box-flex","flex-grow":"box-flex","flex-direction":["box-orient","box-direction"],order:"box-ordinal-group","align-items":"box-align","flex-flow":["box-orient","box-direction"],"justify-content":"box-pack"},pT=Object.keys(uT),hT=function(e){return Bk+e},mT={supportedProperty:function(e,t,n){var r=n.multiple;if(pT.indexOf(e)>-1){var i=uT[e];if(!Array.isArray(i))return $k+Zk(i)in t&&Bk+i;if(!r)return!1;for(var o=0;o<i.length;o++)if(!($k+Zk(i[0])in t))return!1;return i.map(hT)}return!1}},fT=[Uk,Vk,Xk,Qk,Jk,eT,tT,nT,rT,iT,oT,aT,sT,lT,dT,mT],gT=fT.filter(function(e){return e.supportedProperty}).map(function(e){return e.supportedProperty}),vT=fT.filter(function(e){return e.noPrefill}).reduce(function(e,t){return e.push.apply(e,Mk(t.noPrefill)),e},[]),xT={};if(FS){Kk=document.createElement("p");var yT=window.getComputedStyle(document.documentElement,"");for(var bT in yT)isNaN(bT)||(xT[yT[bT]]=yT[bT]);vT.forEach(function(e){return delete xT[e]})}function jT(e,t){if(void 0===t&&(t={}),!Kk)return e;if(null!=xT[e])return xT[e];"transition"!==e&&"transform"!==e||(t[e]=e in Kk.style);for(var n=0;n<gT.length&&(xT[e]=gT[n](e,Kk.style,t),!xT[e]);n++);try{Kk.style[e]=""}catch(r){return!1}return xT[e]}var _T,CT={},wT={transition:1,"transition-property":1,"-webkit-transition":1,"-webkit-transition-property":1},ST=/(^\s*[\w-]+)|, (\s*[\w-]+)(?![^()]*\))/g;function AT(e,t,n){if("var"===t)return"var";if("all"===t)return"all";if("all"===n)return", all";var r=t?jT(t):", "+jT(n);return r||(t||n)}function kT(e,t){var n=t;if(!_T||"content"===e)return t;if("string"!==typeof n||!isNaN(parseInt(n,10)))return n;var r=e+n;if(null!=CT[r])return CT[r];try{_T.style[e]=n}catch(i){return CT[r]=!1,!1}if(wT[e])n=n.replace(ST,AT);else if(""===_T.style[e]&&("-ms-flex"===(n=Bk+n)&&(_T.style[e]="-ms-flexbox"),_T.style[e]=n,""===_T.style[e]))return CT[r]=!1,!1;return _T.style[e]="",CT[r]=n,CT[r]}FS&&(_T=document.createElement("p"));const TT=function(){function e(t){for(var n in t){var r=t[n];if("fallbacks"===n&&Array.isArray(r))t[n]=r.map(e);else{var i=!1,o=jT(n);o&&o!==n&&(i=!0);var a=!1,s=kT(o,WS(r));s&&s!==r&&(a=!0),(i||a)&&(i&&delete t[n],t[o||n]=s||r)}}return t}return{onProcessRule:function(e){if("keyframes"===e.type){var t=e;t.at=function(e){return"-"===e[1]||"ms"===$k?e:"@"+Bk+"keyframes"+e.substr(10)}(t.at)}},onProcessStyle:function(t,n){return"style"!==n.type?t:e(t)},onChangeValue:function(e,t){return kT(t,WS(e))||e}}};const ET=function(){var e=function(e,t){return e.length===t.length?e>t?1:-1:e.length-t.length};return{onProcessStyle:function(t,n){if("style"!==n.type)return t;for(var r={},i=Object.keys(t).sort(e),o=0;o<i.length;o++)r[i[o]]=t[i[o]];return r}}};const MT=qA({plugins:[ik(),uk(),fk(),_k(),Ek(),"undefined"===typeof window?null:TT(),ET()]}),OT={disableGeneration:!1,generateClassName:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const{disableGlobal:t=!1,productionPrefix:n="jss",seed:r=""}=e,i=""===r?"":"".concat(r,"-");let o=0;const a=()=>(o+=1,o);return(e,o)=>{const s=o.options.name;if(s&&0===s.indexOf("Mui")&&!o.options.link&&!t){if(-1!==ek.indexOf(e.key))return"Mui-".concat(e.key);const t="".concat(i).concat(s,"-").concat(e.key);return o.options.theme[an]&&""===r?"".concat(t,"-").concat(a()):t}return"".concat(i).concat(n).concat(a())}}(),jss:MT,sheetsCache:null,sheetsManager:new Map,sheetsRegistry:null},RT=We.createContext(OT);let PT=-1e9;var DT=n(67598);const NT=["variant"];function LT(e){return 0===e.length}function IT(e){const t="function"===typeof e;return{create:(n,r)=>{let i;try{i=t?e(n):e}catch(l){throw l}if(!r||!n.components||!n.components[r]||!n.components[r].styleOverrides&&!n.components[r].variants)return i;const o=n.components[r].styleOverrides||{},a=n.components[r].variants||[],s=(0,Ft.A)({},i);return Object.keys(o).forEach(e=>{s[e]=(0,sj.A)(s[e]||{},o[e])}),a.forEach(e=>{const t=function(e){const{variant:t}=e,n=(0,nn.A)(e,NT);let r=t||"";return Object.keys(n).sort().forEach(t=>{r+="color"===t?LT(r)?e[t]:(0,DT.A)(e[t]):"".concat(LT(r)?t:(0,DT.A)(t)).concat((0,DT.A)(e[t].toString()))}),r}(e.props);s[t]=(0,sj.A)(s[t]||{},e.style)}),s},options:{}}}const FT={},$T=["name","classNamePrefix","Component","defaultTheme"];function BT(e,t){let{state:n,theme:r,stylesOptions:i,stylesCreator:o,name:a}=e;if(i.disableGeneration)return;let s=QA.get(i.sheetsManager,o,r);s||(s={refs:0,staticSheet:null,dynamicStyles:null},QA.set(i.sheetsManager,o,r,s));const l=(0,Ft.A)({},o.options,i,{theme:r,flip:"boolean"===typeof i.flip?i.flip:"rtl"===r.direction});l.generateId=l.serverGenerateClassName||l.generateClassName;const c=i.sheetsRegistry;if(0===s.refs){let e;i.sheetsCache&&(e=QA.get(i.sheetsCache,o,r));const t=o.create(r,a);e||(e=i.jss.createStyleSheet(t,(0,Ft.A)({link:!1},l)),e.attach(),i.sheetsCache&&QA.set(i.sheetsCache,o,r,e)),c&&c.add(e),s.staticSheet=e,s.dynamicStyles=ZA(t)}if(s.dynamicStyles){const e=i.jss.createStyleSheet(s.dynamicStyles,(0,Ft.A)({link:!0},l));e.update(t),e.attach(),n.dynamicSheet=e,n.classes=KA({baseClasses:s.staticSheet.classes,newClasses:e.classes}),c&&c.add(e)}else n.classes=s.staticSheet.classes;s.refs+=1}function zT(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const{name:n,classNamePrefix:r,Component:i,defaultTheme:o=FT}=t,a=(0,nn.A)(t,$T),s=IT(e),l=n||r||"makeStyles";s.options={index:(PT+=1,PT),name:n,meta:l,classNamePrefix:l};return function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const t=JA()||o,r=(0,Ft.A)({},We.useContext(RT),a),l=We.useRef(),c=We.useRef();!function(e,t){const n=We.useRef([]);let r;const i=We.useMemo(()=>({}),t);n.current!==i&&(n.current=i,r=e()),We.useEffect(()=>()=>{r&&r()},[i])}(()=>{const i={name:n,state:{},stylesCreator:s,stylesOptions:r,theme:t};return BT(i,e),c.current=!1,l.current=i,()=>{!function(e){let{state:t,theme:n,stylesOptions:r,stylesCreator:i}=e;if(r.disableGeneration)return;const o=QA.get(r.sheetsManager,i,n);o.refs-=1;const a=r.sheetsRegistry;0===o.refs&&(QA.delete(r.sheetsManager,i,n),r.jss.removeStyleSheet(o.staticSheet),a&&a.remove(o.staticSheet)),t.dynamicSheet&&(r.jss.removeStyleSheet(t.dynamicSheet),a&&a.remove(t.dynamicSheet))}(i)}},[t,s]),We.useEffect(()=>{c.current&&function(e,t){let{state:n}=e;n.dynamicSheet&&n.dynamicSheet.update(t)}(l.current,e),c.current=!0});const d=function(e,t,n){let{state:r,stylesOptions:i}=e;if(i.disableGeneration)return t||{};r.cacheClasses||(r.cacheClasses={value:null,lastProp:null,lastJSS:{}});let o=!1;return r.classes!==r.cacheClasses.lastJSS&&(r.cacheClasses.lastJSS=r.classes,o=!0),t!==r.cacheClasses.lastProp&&(r.cacheClasses.lastProp=t,o=!0),o&&(r.cacheClasses.value=KA({baseClasses:r.cacheClasses.lastJSS,newClasses:t,Component:n})),r.cacheClasses.value}(l.current,e.classes,i);return d}}const HT=zT(e=>({thead:{backgroundColor:e.palette.primary.theme[30],color:e.palette.primary.theme[300],"& th":{fontWeight:"600",backgroundColor:e.palette.primary.theme[30],color:e.palette.primary.theme[300],paddingTop:"10px",paddingBottom:"10px"}},visuallyHidden:{border:0,clip:"rect(0 0 0 0)",height:1,margin:-1,overflow:"hidden",padding:0,position:"absolute",top:20,width:1},tableSortTitle:{"& .sortIcon":{position:"absolute",right:"-26px"}},isHelpicon:{"& .sortIcon":{position:"relative",right:"auto"}}}));function WT(e){const t=HT(),{order:n,setOrder:r,orderBy:i,setOrderBy:o,selected:a,setSelected:s,data:l,headCells:c,dataParameter:d,isSelection:u,showEllipsis:p,isHelpicon:h}=e,m=e=>t=>{((e,t)=>{r(i===t&&"desc"===n?"asc":"desc"),o(t)})(0,e)};return(0,qt.jsx)(qt.Fragment,{children:(0,Jo.isEmpty)(l)?null:(0,qt.jsx)(_S,{className:t.thead,children:(0,qt.jsxs)(cw,{children:[u?(0,qt.jsx)(gw,{padding:"checkbox",className:t.th,children:(0,qt.jsx)(Dw,{indeterminate:a.length>0&&a.length<l.length,checked:a.length===l.length&&0!==a.length,onChange:e=>{if(e.target.checked){const e=l.map(e=>e[d]);return void s(e)}s([])},inputProps:{"aria-label":"select all desserts"},color:"primary"})}):null,c.map(e=>{const r=e.sortProperty?e.sortProperty:e.id,o=!!e.isSort&&e.isSort;return(0,qt.jsx)(gw,{align:e.actionsCellStyle,sortDirection:i===r&&n,className:jn(t.th,h&&t.isHelpicon),width:e.width,children:o?(0,qt.jsxs)(qt.Fragment,{children:[(0,qt.jsxs)(LS,{className:t.tableSortTitle,active:i===r,direction:i===r?n:"asc",onClick:m(r),classes:{icon:"sortIcon"},IconComponent:ab.A,children:[(0,qt.jsx)(sy,{title:e.label,children:(0,qt.jsx)("span",{className:jn({"ellipsis-row":p}),children:e.label})}),i===r?(0,qt.jsx)("span",{className:t.visuallyHidden,children:"desc"===n?"sorted descending":"sorted ascending"}):null]}),h&&(0,qt.jsx)(sy,{title:e.helpText,placement:"top",children:(0,qt.jsx)(wh,{edge:"end",size:"small",children:(0,qt.jsx)(TS.A,{fontSize:"small"})})})]}):(0,qt.jsxs)(qt.Fragment,{children:[e.label,h&&(0,qt.jsx)(sy,{title:e.helpText,placement:"top",children:(0,qt.jsx)(wh,{edge:"end",size:"small",children:(0,qt.jsx)(TS.A,{fontSize:"small"})})})]})},e.id)})]})})})}function UT(e){const{data:t,headCells:n,children:r,isHelpicon:o,noDataImage:a,pageDetails:s,fetchList:l,skeletonVrows:c,stickyHeader:d,scrollHeight:u,className:p}=e;return We.useEffect(()=>{if(s&&(0,Jo.isEmpty)(t)&&s.current_page>1)return s.current_page-=1,l()},[t]),null===t?(0,qt.jsx)(SS,{headCells:n,skeletonVrows:c}):(0,qt.jsx)(qt.Fragment,{children:(0,qt.jsx)(Vw,{component:yp,variant:"outlined",className:jn(p&&p),sx:{maxHeight:d&&u},children:(0,qt.jsxs)(Bw,{stickyHeader:d,"aria-label":d&&"sticky table",children:[(0,qt.jsx)(WT,(0,i.A)({},e)),(0,qt.jsx)(kS,{headCells:n,data:t,isHelpicon:o,naDataImage:a,children:r})]})})})}WT.defaultProps={order:"",setOrder:()=>{},orderBy:"",setOrderBy:()=>{},selected:[],setSelected:()=>{},data:[],headCells:[],dataParameter:"",isSelection:!1,showEllipsis:!1,isHelpicon:!1};const VT=["ownerState"],GT=["variants"],qT=["name","slot","skipVariantsResolver","skipSx","overridesResolver"];function YT(e){return"ownerState"!==e&&"theme"!==e&&"sx"!==e&&"as"!==e}function ZT(e,t){return t&&e&&"object"===typeof e&&e.styles&&!e.styles.startsWith("@layer")&&(e.styles="@layer ".concat(t,"{").concat(String(e.styles),"}")),e}const KT=(0,Ht.A)(),XT=e=>e?e.charAt(0).toLowerCase()+e.slice(1):e;function QT(e){let{defaultTheme:t,theme:n,themeId:r}=e;return i=n,0===Object.keys(i).length?t:n[r]||n;var i}function JT(e){return e?(t,n)=>n[e]:null}function eE(e,t,n){let{ownerState:r}=t,i=(0,nn.A)(t,VT);const o="function"===typeof e?e((0,Ft.A)({ownerState:r},i)):e;if(Array.isArray(o))return o.flatMap(e=>eE(e,(0,Ft.A)({ownerState:r},i),n));if(o&&"object"===typeof o&&Array.isArray(o.variants)){const{variants:e=[]}=o;let t=(0,nn.A)(o,GT);return e.forEach(e=>{let o=!0;if("function"===typeof e.props?o=e.props((0,Ft.A)({ownerState:r},i,r)):Object.keys(e.props).forEach(t=>{(null==r?void 0:r[t])!==e.props[t]&&i[t]!==e.props[t]&&(o=!1)}),o){Array.isArray(t)||(t=[t]);const o="function"===typeof e.style?e.style((0,Ft.A)({ownerState:r},i,r)):e.style;t.push(n?ZT((0,Bt.internal_serializeStyles)(o),n):o)}}),t}return n?ZT((0,Bt.internal_serializeStyles)(o),n):o}const tE=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const{themeId:t,defaultTheme:n=KT,rootShouldForwardProp:r=YT,slotShouldForwardProp:i=YT}=e,o=e=>(0,Xu.A)((0,Ft.A)({},e,{theme:QT((0,Ft.A)({},e,{defaultTheme:n,themeId:t}))}));return o.__mui_systemSx=!0,function(e){let a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};(0,Bt.internal_processStyles)(e,e=>e.filter(e=>!(null!=e&&e.__mui_systemSx)));const{name:s,slot:l,skipVariantsResolver:c,skipSx:d,overridesResolver:u=JT(XT(l))}=a,p=(0,nn.A)(a,qT),h=s&&s.startsWith("Mui")||l?"components":"custom",m=void 0!==c?c:l&&"Root"!==l&&"root"!==l||!1,f=d||!1;let g=YT;"Root"===l||"root"===l?g=r:l?g=i:function(e){return"string"===typeof e&&e.charCodeAt(0)>96}(e)&&(g=void 0);const v=(0,Bt.default)(e,(0,Ft.A)({shouldForwardProp:g,label:undefined},p)),x=e=>"function"===typeof e&&e.__emotion_real!==e||(0,sj.Q)(e)?r=>{const i=QT({theme:r.theme,defaultTheme:n,themeId:t});return eE(e,(0,Ft.A)({},r,{theme:i}),i.modularCssLayers?h:void 0)}:e,y=function(r){let i=x(r);for(var a=arguments.length,l=new Array(a>1?a-1:0),c=1;c<a;c++)l[c-1]=arguments[c];const d=l?l.map(x):[];s&&u&&d.push(e=>{const r=QT((0,Ft.A)({},e,{defaultTheme:n,themeId:t}));if(!r.components||!r.components[s]||!r.components[s].styleOverrides)return null;const i=r.components[s].styleOverrides,o={};return Object.entries(i).forEach(t=>{let[n,i]=t;o[n]=eE(i,(0,Ft.A)({},e,{theme:r}),r.modularCssLayers?"theme":void 0)}),u(e,o)}),s&&!m&&d.push(e=>{var r;const i=QT((0,Ft.A)({},e,{defaultTheme:n,themeId:t}));return eE({variants:null==i||null==(r=i.components)||null==(r=r[s])?void 0:r.variants},(0,Ft.A)({},e,{theme:i}),i.modularCssLayers?"theme":void 0)}),f||d.push(o);const p=d.length-l.length;if(Array.isArray(r)&&p>0){const e=new Array(p).fill("");i=[...r,...e],i.raw=[...r.raw,...e]}const h=v(i,...d);return e.muiName&&(h.muiName=e.muiName),h};return v.withConfig&&(y.withConfig=v.withConfig),y}}(),nE=tE;function rE(e){let{props:t,name:n,defaultTheme:r,themeId:i}=e,o=Gt(r);i&&(o=o[i]||o);return zC({theme:o,name:n,props:t})}var iE=n(28604);const oE=["component","direction","spacing","divider","children","className","useFlexGap"],aE=(0,Ht.A)(),sE=nE("div",{name:"MuiStack",slot:"Root",overridesResolver:(e,t)=>t.root});function lE(e){return rE({props:e,name:"MuiStack",defaultTheme:aE})}function cE(e,t){const n=We.Children.toArray(e).filter(Boolean);return n.reduce((e,r,i)=>(e.push(r),i<n.length-1&&e.push(We.cloneElement(t,{key:"separator-".concat(i)})),e),[])}const dE=e=>{let{ownerState:t,theme:n}=e,r=(0,Ft.A)({display:"flex",flexDirection:"column"},(0,Af.NI)({theme:n},(0,Af.kW)({values:t.direction,breakpoints:n.breakpoints.values}),e=>({flexDirection:e})));if(t.spacing){const e=(0,iE.LX)(n),i=Object.keys(n.breakpoints.values).reduce((e,n)=>(("object"===typeof t.spacing&&null!=t.spacing[n]||"object"===typeof t.direction&&null!=t.direction[n])&&(e[n]=!0),e),{}),o=(0,Af.kW)({values:t.direction,base:i}),a=(0,Af.kW)({values:t.spacing,base:i});"object"===typeof o&&Object.keys(o).forEach((e,t,n)=>{if(!o[e]){const r=t>0?o[n[t-1]]:"column";o[e]=r}});const s=(n,r)=>{return t.useFlexGap?{gap:(0,iE._W)(e,n)}:{"& > :not(style):not(style)":{margin:0},"& > :not(style) ~ :not(style)":{["margin".concat((i=r?o[r]:t.direction,{row:"Left","row-reverse":"Right",column:"Top","column-reverse":"Bottom"}[i]))]:(0,iE._W)(e,n)}};var i};r=(0,sj.A)(r,(0,Af.NI)({theme:n},a,s))}return r=(0,Af.iZ)(n.breakpoints,r),r};const uE=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const{createStyledComponent:t=sE,useThemeProps:n=lE,componentName:r="MuiStack"}=e,i=t(dE),o=We.forwardRef(function(e,t){const o=n(e),a=(0,Qu.A)(o),{component:s="div",direction:l="column",spacing:c=0,divider:d,children:u,className:p,useFlexGap:h=!1}=a,m=(0,nn.A)(a,oE),f={direction:l,spacing:c,useFlexGap:h},g=(0,ir.A)({root:["root"]},e=>(0,sr.Ay)(r,e),{});return(0,qt.jsx)(i,(0,Ft.A)({as:s,ownerState:f,ref:t,className:Ku(g.root,p)},m,{children:d?cE(u,d):u}))});return o}({createStyledComponent:(0,Vn.Ay)("div",{name:"MuiStack",slot:"Root",overridesResolver:(e,t)=>t.root}),useThemeProps:e=>(0,$t.b)({props:e,name:"MuiStack"})}),pE=uE;function hE(e){return(0,sr.Ay)("MuiDialogActions",e)}(0,ar.A)("MuiDialogActions",["root","spacing"]);const mE=["className","disableSpacing"],fE=(0,Vn.Ay)("div",{name:"MuiDialogActions",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,!n.disableSpacing&&t.spacing]}})(e=>{let{ownerState:t}=e;return(0,Ft.A)({display:"flex",alignItems:"center",padding:8,justifyContent:"flex-end",flex:"0 0 auto"},!t.disableSpacing&&{"& > :not(style) ~ :not(style)":{marginLeft:8}})}),gE=We.forwardRef(function(e,t){const n=(0,$t.b)({props:e,name:"MuiDialogActions"}),{className:r,disableSpacing:i=!1}=n,o=(0,nn.A)(n,mE),a=(0,Ft.A)({},n,{disableSpacing:i}),s=(e=>{const{classes:t,disableSpacing:n}=e,r={root:["root",!n&&"spacing"]};return(0,ir.A)(r,hE,t)})(a);return(0,qt.jsx)(fE,(0,Ft.A)({className:(0,nr.A)(s.root,r),ownerState:a,ref:t},o))}),vE=gE;function xE(e){return(0,sr.Ay)("MuiFormControlLabel",e)}const yE=(0,ar.A)("MuiFormControlLabel",["root","labelPlacementStart","labelPlacementTop","labelPlacementBottom","disabled","label","error","required","asterisk"]),bE=["checked","className","componentsProps","control","disabled","disableTypography","inputRef","label","labelPlacement","name","onChange","required","slotProps","value"],jE=(0,Vn.Ay)("label",{name:"MuiFormControlLabel",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[{["& .".concat(yE.label)]:t.label},t.root,t["labelPlacement".concat((0,pp.A)(n.labelPlacement))]]}})(e=>{let{theme:t,ownerState:n}=e;return(0,Ft.A)({display:"inline-flex",alignItems:"center",cursor:"pointer",verticalAlign:"middle",WebkitTapHighlightColor:"transparent",marginLeft:-11,marginRight:16,["&.".concat(yE.disabled)]:{cursor:"default"}},"start"===n.labelPlacement&&{flexDirection:"row-reverse",marginLeft:16,marginRight:-11},"top"===n.labelPlacement&&{flexDirection:"column-reverse",marginLeft:16},"bottom"===n.labelPlacement&&{flexDirection:"column",marginLeft:16},{["& .".concat(yE.label)]:{["&.".concat(yE.disabled)]:{color:(t.vars||t).palette.text.disabled}}})}),_E=(0,Vn.Ay)("span",{name:"MuiFormControlLabel",slot:"Asterisk",overridesResolver:(e,t)=>t.asterisk})(e=>{let{theme:t}=e;return{["&.".concat(yE.error)]:{color:(t.vars||t).palette.error.main}}}),CE=We.forwardRef(function(e,t){var n,r;const i=(0,$t.b)({props:e,name:"MuiFormControlLabel"}),{className:o,componentsProps:a={},control:s,disabled:l,disableTypography:c,label:d,labelPlacement:u="end",required:p,slotProps:h={}}=i,m=(0,nn.A)(i,bE),f=vj(),g=null!=(n=null!=l?l:s.props.disabled)?n:null==f?void 0:f.disabled,v=null!=p?p:s.props.required,x={disabled:g,required:v};["checked","name","onChange","value","inputRef"].forEach(e=>{"undefined"===typeof s.props[e]&&"undefined"!==typeof i[e]&&(x[e]=i[e])});const y=fj({props:i,muiFormControl:f,states:["error"]}),b=(0,Ft.A)({},i,{disabled:g,labelPlacement:u,required:v,error:y.error}),j=(e=>{const{classes:t,disabled:n,labelPlacement:r,error:i,required:o}=e,a={root:["root",n&&"disabled","labelPlacement".concat((0,pp.A)(r)),i&&"error",o&&"required"],label:["label",n&&"disabled"],asterisk:["asterisk",i&&"error"]};return(0,ir.A)(a,xE,t)})(b),_=null!=(r=h.typography)?r:a.typography;let C=d;return null==C||C.type===Cf||c||(C=(0,qt.jsx)(Cf,(0,Ft.A)({component:"span"},_,{className:(0,nr.A)(j.label,null==_?void 0:_.className),children:C}))),(0,qt.jsxs)(jE,(0,Ft.A)({className:(0,nr.A)(j.root,o),ownerState:b,ref:t},m,{children:[We.cloneElement(s,x),v?(0,qt.jsxs)(pE,{display:"block",children:[C,(0,qt.jsxs)(_E,{ownerState:b,"aria-hidden":!0,className:j.asterisk,children:["\u2009","*"]})]}):C]}))}),wE=CE,SE=["children","onClose"],AE=e=>{const{children:t,onClose:n}=e,r=Ko(e,SE);return(0,qt.jsxs)(fC,(0,i.A)((0,i.A)({sx:{m:0,p:2}},r),{},{children:[t,n?(0,qt.jsx)(wh,{"aria-label":"close",onClick:n,sx:{position:"absolute",right:8,top:8,color:e=>e.palette.grey[500]},children:(0,qt.jsx)(J_.A,{})}):null]}))};function kE(e){let{open:t,onClose:n,allHeadCells:r,initialHeadcells:i,setHeadcells:o,disabledIndex:a,disableLastItem:s}=e;const{t:l}=Vg(),[c,d]=(0,We.useState)(i||[]),[u,p]=(0,We.useState)(!0);let h=[];0===a.length&&s&&(h=[0,r.length-1]);const m=function(e){const t=e.currentTarget.id;c.includes(t)?(d(c.filter(e=>e!==t)),p(!(c.filter(e=>e!==t).length<r.length))):(d(e=>[...e,t]),p([...c,t].length===r.length))},f=function(){d(i),n()};return(0,We.useEffect)(()=>{i.length<r.length&&p(!1)},[]),(0,qt.jsxs)(cC,{fullWidth:!0,maxWidth:"sm",open:t,onClose:f,children:[(0,qt.jsxs)(AE,{sx:{px:4},onClose:f,children:[(0,qt.jsx)(Cf,{component:"p",variant:"h6",children:l("rpm_TableSetting")}),(0,qt.jsx)(Cf,{component:"p",variant:"subtitle2",children:l("rpm_TableSettingInfo")})]}),(0,qt.jsx)(eg,{}),(0,qt.jsx)(bC,{sx:{p:4},children:(0,qt.jsxs)(op,{display:"flex",flexDirection:"column",children:[(0,qt.jsx)(d_,{component:"div",children:(0,qt.jsx)(wE,{value:"end",control:(0,qt.jsx)(Dw,{color:"primary",checked:u,id:"selectAll",onChange:function(){var e;u?(d([null===(e=r[s?r.length-1:r.length])||void 0===e?void 0:e.id,r[0].id]),p(!1)):(d(r.map(e=>e.id)),p(!0))}}),label:(0,qt.jsx)(op,{component:"span",fontWeight:600,children:l("rpm_SelectAll")}),labelPlacement:"end"})}),(0,qt.jsx)(d_,{component:"div",children:(0,qt.jsx)(Ff,{container:!0,children:r.map((e,t)=>(0,qt.jsx)(Ff,{item:!0,xs:12,md:6,children:(0,qt.jsx)(wE,{value:"end",control:(0,qt.jsx)(Dw,{inputProps:{"aria-label":"Keep Active"},color:"primary",checked:c.includes(e.id),disabled:h.includes(t),onChange:m,id:e.id}),label:e.label,labelPlacement:"end"})},e.id))})})]})}),(0,qt.jsx)(eg,{}),(0,qt.jsx)(vE,{sx:{p:2},children:(0,qt.jsxs)(pE,{direction:"row",spacing:2,children:[(0,qt.jsx)(xh,{variant:"outlined",color:"primary",onClick:f,children:l("rpm_Cancel")}),(0,qt.jsx)(xh,{variant:"contained",onClick:function(){o(c),n()},color:"primary",disableElevation:!0,children:l("rpm_Submit")})]})})]})}kE.defaultProps={open:!1,onClose:()=>{},initialHeadcells:[],allHeadCells:[],setHeadcells:()=>{},disabledIndex:[],disableLastItem:!0};const TE=kE;function EE(e){return(0,sr.Ay)("MuiPagination",e)}(0,ar.A)("MuiPagination",["root","ul","outlined","text"]);const ME=["boundaryCount","componentName","count","defaultPage","disabled","hideNextButton","hidePrevButton","onChange","page","showFirstButton","showLastButton","siblingCount"];function OE(e){return(0,sr.Ay)("MuiPaginationItem",e)}const RE=(0,ar.A)("MuiPaginationItem",["root","page","sizeSmall","sizeLarge","text","textPrimary","textSecondary","outlined","outlinedPrimary","outlinedSecondary","rounded","ellipsis","firstLast","previousNext","focusVisible","disabled","selected","icon","colorPrimary","colorSecondary"]),PE=(0,Cy.A)((0,qt.jsx)("path",{d:"M18.41 16.59L13.82 12l4.59-4.59L17 6l-6 6 6 6zM6 6h2v12H6z"}),"FirstPage"),DE=(0,Cy.A)((0,qt.jsx)("path",{d:"M5.59 7.41L10.18 12l-4.59 4.59L7 18l6-6-6-6zM16 6h2v12h-2z"}),"LastPage"),NE=(0,Cy.A)((0,qt.jsx)("path",{d:"M15.41 7.41L14 6l-6 6 6 6 1.41-1.41L10.83 12z"}),"NavigateBefore"),LE=(0,Cy.A)((0,qt.jsx)("path",{d:"M10 6L8.59 7.41 13.17 12l-4.58 4.59L10 18l6-6z"}),"NavigateNext"),IE=["className","color","component","components","disabled","page","selected","shape","size","slots","type","variant"],FE=(e,t)=>{const{ownerState:n}=e;return[t.root,t[n.variant],t["size".concat((0,pp.A)(n.size))],"text"===n.variant&&t["text".concat((0,pp.A)(n.color))],"outlined"===n.variant&&t["outlined".concat((0,pp.A)(n.color))],"rounded"===n.shape&&t.rounded,"page"===n.type&&t.page,("start-ellipsis"===n.type||"end-ellipsis"===n.type)&&t.ellipsis,("previous"===n.type||"next"===n.type)&&t.previousNext,("first"===n.type||"last"===n.type)&&t.firstLast]},$E=(0,Vn.Ay)("div",{name:"MuiPaginationItem",slot:"Root",overridesResolver:FE})(e=>{let{theme:t,ownerState:n}=e;return(0,Ft.A)({},t.typography.body2,{borderRadius:16,textAlign:"center",boxSizing:"border-box",minWidth:32,padding:"0 6px",margin:"0 3px",color:(t.vars||t).palette.text.primary,height:"auto",["&.".concat(RE.disabled)]:{opacity:(t.vars||t).palette.action.disabledOpacity}},"small"===n.size&&{minWidth:26,borderRadius:13,margin:"0 1px",padding:"0 4px"},"large"===n.size&&{minWidth:40,borderRadius:20,padding:"0 10px",fontSize:t.typography.pxToRem(15)})}),BE=(0,Vn.Ay)(sh,{name:"MuiPaginationItem",slot:"Root",overridesResolver:FE})(e=>{let{theme:t,ownerState:n}=e;return(0,Ft.A)({},t.typography.body2,{borderRadius:16,textAlign:"center",boxSizing:"border-box",minWidth:32,height:32,padding:"0 6px",margin:"0 3px",color:(t.vars||t).palette.text.primary,["&.".concat(RE.focusVisible)]:{backgroundColor:(t.vars||t).palette.action.focus},["&.".concat(RE.disabled)]:{opacity:(t.vars||t).palette.action.disabledOpacity},transition:t.transitions.create(["color","background-color"],{duration:t.transitions.duration.short}),"&:hover":{backgroundColor:(t.vars||t).palette.action.hover,"@media (hover: none)":{backgroundColor:"transparent"}},["&.".concat(RE.selected)]:{backgroundColor:(t.vars||t).palette.action.selected,"&:hover":{backgroundColor:t.vars?"rgba(".concat(t.vars.palette.action.selectedChannel," / calc(").concat(t.vars.palette.action.selectedOpacity," + ").concat(t.vars.palette.action.hoverOpacity,"))"):(0,hp.X4)(t.palette.action.selected,t.palette.action.selectedOpacity+t.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:(t.vars||t).palette.action.selected}},["&.".concat(RE.focusVisible)]:{backgroundColor:t.vars?"rgba(".concat(t.vars.palette.action.selectedChannel," / calc(").concat(t.vars.palette.action.selectedOpacity," + ").concat(t.vars.palette.action.focusOpacity,"))"):(0,hp.X4)(t.palette.action.selected,t.palette.action.selectedOpacity+t.palette.action.focusOpacity)},["&.".concat(RE.disabled)]:{opacity:1,color:(t.vars||t).palette.action.disabled,backgroundColor:(t.vars||t).palette.action.selected}}},"small"===n.size&&{minWidth:26,height:26,borderRadius:13,margin:"0 1px",padding:"0 4px"},"large"===n.size&&{minWidth:40,height:40,borderRadius:20,padding:"0 10px",fontSize:t.typography.pxToRem(15)},"rounded"===n.shape&&{borderRadius:(t.vars||t).shape.borderRadius})},e=>{let{theme:t,ownerState:n}=e;return(0,Ft.A)({},"text"===n.variant&&{["&.".concat(RE.selected)]:(0,Ft.A)({},"standard"!==n.color&&{color:(t.vars||t).palette[n.color].contrastText,backgroundColor:(t.vars||t).palette[n.color].main,"&:hover":{backgroundColor:(t.vars||t).palette[n.color].dark,"@media (hover: none)":{backgroundColor:(t.vars||t).palette[n.color].main}},["&.".concat(RE.focusVisible)]:{backgroundColor:(t.vars||t).palette[n.color].dark}},{["&.".concat(RE.disabled)]:{color:(t.vars||t).palette.action.disabled}})},"outlined"===n.variant&&{border:t.vars?"1px solid rgba(".concat(t.vars.palette.common.onBackgroundChannel," / 0.23)"):"1px solid ".concat("light"===t.palette.mode?"rgba(0, 0, 0, 0.23)":"rgba(255, 255, 255, 0.23)"),["&.".concat(RE.selected)]:(0,Ft.A)({},"standard"!==n.color&&{color:(t.vars||t).palette[n.color].main,border:"1px solid ".concat(t.vars?"rgba(".concat(t.vars.palette[n.color].mainChannel," / 0.5)"):(0,hp.X4)(t.palette[n.color].main,.5)),backgroundColor:t.vars?"rgba(".concat(t.vars.palette[n.color].mainChannel," / ").concat(t.vars.palette.action.activatedOpacity,")"):(0,hp.X4)(t.palette[n.color].main,t.palette.action.activatedOpacity),"&:hover":{backgroundColor:t.vars?"rgba(".concat(t.vars.palette[n.color].mainChannel," / calc(").concat(t.vars.palette.action.activatedOpacity," + ").concat(t.vars.palette.action.focusOpacity,"))"):(0,hp.X4)(t.palette[n.color].main,t.palette.action.activatedOpacity+t.palette.action.focusOpacity),"@media (hover: none)":{backgroundColor:"transparent"}},["&.".concat(RE.focusVisible)]:{backgroundColor:t.vars?"rgba(".concat(t.vars.palette[n.color].mainChannel," / calc(").concat(t.vars.palette.action.activatedOpacity," + ").concat(t.vars.palette.action.focusOpacity,"))"):(0,hp.X4)(t.palette[n.color].main,t.palette.action.activatedOpacity+t.palette.action.focusOpacity)}},{["&.".concat(RE.disabled)]:{borderColor:(t.vars||t).palette.action.disabledBackground,color:(t.vars||t).palette.action.disabled}})})}),zE=(0,Vn.Ay)("div",{name:"MuiPaginationItem",slot:"Icon",overridesResolver:(e,t)=>t.icon})(e=>{let{theme:t,ownerState:n}=e;return(0,Ft.A)({fontSize:t.typography.pxToRem(20),margin:"0 -8px"},"small"===n.size&&{fontSize:t.typography.pxToRem(18)},"large"===n.size&&{fontSize:t.typography.pxToRem(22)})}),HE=We.forwardRef(function(e,t){const n=(0,$t.b)({props:e,name:"MuiPaginationItem"}),{className:r,color:i="standard",component:o,components:a={},disabled:s=!1,page:l,selected:c=!1,shape:d="circular",size:u="medium",slots:p={},type:h="page",variant:m="text"}=n,f=(0,nn.A)(n,IE),g=(0,Ft.A)({},n,{color:i,disabled:s,selected:c,shape:d,size:u,type:h,variant:m}),v=dn(),x=(e=>{const{classes:t,color:n,disabled:r,selected:i,size:o,shape:a,type:s,variant:l}=e,c={root:["root","size".concat((0,pp.A)(o)),l,a,"standard"!==n&&"color".concat((0,pp.A)(n)),"standard"!==n&&"".concat(l).concat((0,pp.A)(n)),r&&"disabled",i&&"selected",{page:"page",first:"firstLast",last:"firstLast","start-ellipsis":"ellipsis","end-ellipsis":"ellipsis",previous:"previousNext",next:"previousNext"}[s]],icon:["icon"]};return(0,ir.A)(c,OE,t)})(g),y=(v?{previous:p.next||a.next||LE,next:p.previous||a.previous||NE,last:p.first||a.first||PE,first:p.last||a.last||DE}:{previous:p.previous||a.previous||NE,next:p.next||a.next||LE,first:p.first||a.first||PE,last:p.last||a.last||DE})[h];return"start-ellipsis"===h||"end-ellipsis"===h?(0,qt.jsx)($E,{ref:t,ownerState:g,className:(0,nr.A)(x.root,r),children:"\u2026"}):(0,qt.jsxs)(BE,(0,Ft.A)({ref:t,ownerState:g,component:o,disabled:s,className:(0,nr.A)(x.root,r)},f,{children:["page"===h&&l,y?(0,qt.jsx)(zE,{as:y,ownerState:g,className:x.icon}):null]}))}),WE=HE,UE=["boundaryCount","className","color","count","defaultPage","disabled","getItemAriaLabel","hideNextButton","hidePrevButton","onChange","page","renderItem","shape","showFirstButton","showLastButton","siblingCount","size","variant"],VE=(0,Vn.Ay)("nav",{name:"MuiPagination",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[n.variant]]}})({}),GE=(0,Vn.Ay)("ul",{name:"MuiPagination",slot:"Ul",overridesResolver:(e,t)=>t.ul})({display:"flex",flexWrap:"wrap",alignItems:"center",padding:0,margin:0,listStyle:"none"});function qE(e,t,n){return"page"===e?"".concat(n?"":"Go to ","page ").concat(t):"Go to ".concat(e," page")}const YE=We.forwardRef(function(e,t){const n=(0,$t.b)({props:e,name:"MuiPagination"}),{boundaryCount:r=1,className:i,color:o="standard",count:a=1,defaultPage:s=1,disabled:l=!1,getItemAriaLabel:c=qE,hideNextButton:d=!1,hidePrevButton:u=!1,renderItem:p=e=>(0,qt.jsx)(WE,(0,Ft.A)({},e)),shape:h="circular",showFirstButton:m=!1,showLastButton:f=!1,siblingCount:g=1,size:v="medium",variant:x="text"}=n,y=(0,nn.A)(n,UE),{items:b}=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const{boundaryCount:t=1,componentName:n="usePagination",count:r=1,defaultPage:i=1,disabled:o=!1,hideNextButton:a=!1,hidePrevButton:s=!1,onChange:l,page:c,showFirstButton:d=!1,showLastButton:u=!1,siblingCount:p=1}=e,h=(0,nn.A)(e,ME),[m,f]=(0,sb.A)({controlled:c,default:i,name:n,state:"page"}),g=(e,t)=>{c||f(t),l&&l(e,t)},v=(e,t)=>{const n=t-e+1;return Array.from({length:n},(t,n)=>e+n)},x=v(1,Math.min(t,r)),y=v(Math.max(r-t+1,t+1),r),b=Math.max(Math.min(m-p,r-t-2*p-1),t+2),j=Math.min(Math.max(m+p,t+2*p+2),y.length>0?y[0]-2:r-1),_=[...d?["first"]:[],...s?[]:["previous"],...x,...b>t+2?["start-ellipsis"]:t+1<r-t?[t+1]:[],...v(b,j),...j<r-t-1?["end-ellipsis"]:r-t>t?[r-t]:[],...y,...a?[]:["next"],...u?["last"]:[]],C=e=>{switch(e){case"first":return 1;case"previous":return m-1;case"next":return m+1;case"last":return r;default:return null}},w=_.map(e=>"number"===typeof e?{onClick:t=>{g(t,e)},type:"page",page:e,selected:e===m,disabled:o,"aria-current":e===m?"true":void 0}:{onClick:t=>{g(t,C(e))},type:e,page:C(e),selected:!1,disabled:o||-1===e.indexOf("ellipsis")&&("next"===e||"last"===e?m>=r:m<=1)});return(0,Ft.A)({items:w},h)}((0,Ft.A)({},n,{componentName:"Pagination"})),j=(0,Ft.A)({},n,{boundaryCount:r,color:o,count:a,defaultPage:s,disabled:l,getItemAriaLabel:c,hideNextButton:d,hidePrevButton:u,renderItem:p,shape:h,showFirstButton:m,showLastButton:f,siblingCount:g,size:v,variant:x}),_=(e=>{const{classes:t,variant:n}=e,r={root:["root",n],ul:["ul"]};return(0,ir.A)(r,EE,t)})(j);return(0,qt.jsx)(VE,(0,Ft.A)({"aria-label":"pagination navigation",className:(0,nr.A)(_.root,i),ownerState:j,ref:t},y,{children:(0,qt.jsx)(GE,{className:_.ul,ownerState:j,children:b.map((e,t)=>(0,qt.jsx)("li",{children:p((0,Ft.A)({},e,{color:o,"aria-label":c(e.type,e.page,e.selected),shape:h,size:v,variant:x}))},t))})}))}),ZE=YE;function KE(e){let{pageDetails:t,fetchListFunction:n}=e;return(0,qt.jsx)(qt.Fragment,{children:t.total>0?(0,qt.jsx)(op,{py:2,children:(0,qt.jsxs)(Ff,{container:!0,spacing:2,alignItems:"center",justifyContent:"center",children:[(0,qt.jsx)(Ff,{item:!0,sm:!0,children:(0,qt.jsx)(ZE,{count:t.last_page,page:t.current_page,shape:"rounded",color:"primary",onChange:function(e,r){!function(e,t,n,r){n.current_page=t,r()}(0,r,t,n)}})}),(0,qt.jsx)(Ff,{item:!0,children:(0,qt.jsxs)(op,{sx:{display:"flex",alignItems:"center"},children:[(0,qt.jsx)(Cf,{component:"p",variant:"body1",sx:{mr:2},children:"Rows Per Page"}),(0,qt.jsx)(d_,{margin:"dense",children:(0,qt.jsx)(G_,{variant:"outlined",size:"small",value:t.per_page,onChange:function(e){!function(e,t,n){t.per_page=parseInt(e.target.value,10),t.current_page=1,n()}(e,t,n)},children:t.per_page_options.map(e=>(0,qt.jsx)(mf,{value:e,children:e},e))})})]})})]})}):null})}function XE(e){return(0,sr.Ay)("MuiAlert",e)}const QE=(0,ar.A)("MuiAlert",["root","action","icon","message","filled","colorSuccess","colorInfo","colorWarning","colorError","filledSuccess","filledInfo","filledWarning","filledError","outlined","outlinedSuccess","outlinedInfo","outlinedWarning","outlinedError","standard","standardSuccess","standardInfo","standardWarning","standardError"]),JE=(0,Cy.A)((0,qt.jsx)("path",{d:"M20,12A8,8 0 0,1 12,20A8,8 0 0,1 4,12A8,8 0 0,1 12,4C12.76,4 13.5,4.11 14.2, 4.31L15.77,2.74C14.61,2.26 13.34,2 12,2A10,10 0 0,0 2,12A10,10 0 0,0 12,22A10,10 0 0, 0 22,12M7.91,10.08L6.5,11.5L11,16L21,6L19.59,4.58L11,13.17L7.91,10.08Z"}),"SuccessOutlined"),eM=(0,Cy.A)((0,qt.jsx)("path",{d:"M12 5.99L19.53 19H4.47L12 5.99M12 2L1 21h22L12 2zm1 14h-2v2h2v-2zm0-6h-2v4h2v-4z"}),"ReportProblemOutlined"),tM=(0,Cy.A)((0,qt.jsx)("path",{d:"M11 15h2v2h-2zm0-8h2v6h-2zm.99-5C6.47 2 2 6.48 2 12s4.47 10 9.99 10C17.52 22 22 17.52 22 12S17.52 2 11.99 2zM12 20c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8z"}),"ErrorOutline"),nM=(0,Cy.A)((0,qt.jsx)("path",{d:"M11,9H13V7H11M12,20C7.59,20 4,16.41 4,12C4,7.59 7.59,4 12,4C16.41,4 20,7.59 20, 12C20,16.41 16.41,20 12,20M12,2A10,10 0 0,0 2,12A10,10 0 0,0 12,22A10,10 0 0,0 22,12A10, 10 0 0,0 12,2M11,17H13V11H11V17Z"}),"InfoOutlined"),rM=["action","children","className","closeText","color","components","componentsProps","icon","iconMapping","onClose","role","severity","slotProps","slots","variant"],iM=(0,Vn.Ay)(yp,{name:"MuiAlert",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[n.variant],t["".concat(n.variant).concat((0,pp.A)(n.color||n.severity))]]}})(e=>{let{theme:t}=e;const n="light"===t.palette.mode?hp.e$:hp.a,r="light"===t.palette.mode?hp.a:hp.e$;return(0,Ft.A)({},t.typography.body2,{backgroundColor:"transparent",display:"flex",padding:"6px 16px",variants:[...Object.entries(t.palette).filter(e=>{let[,t]=e;return t.main&&t.light}).map(e=>{let[i]=e;return{props:{colorSeverity:i,variant:"standard"},style:{color:t.vars?t.vars.palette.Alert["".concat(i,"Color")]:n(t.palette[i].light,.6),backgroundColor:t.vars?t.vars.palette.Alert["".concat(i,"StandardBg")]:r(t.palette[i].light,.9),["& .".concat(QE.icon)]:t.vars?{color:t.vars.palette.Alert["".concat(i,"IconColor")]}:{color:t.palette[i].main}}}}),...Object.entries(t.palette).filter(e=>{let[,t]=e;return t.main&&t.light}).map(e=>{let[r]=e;return{props:{colorSeverity:r,variant:"outlined"},style:{color:t.vars?t.vars.palette.Alert["".concat(r,"Color")]:n(t.palette[r].light,.6),border:"1px solid ".concat((t.vars||t).palette[r].light),["& .".concat(QE.icon)]:t.vars?{color:t.vars.palette.Alert["".concat(r,"IconColor")]}:{color:t.palette[r].main}}}}),...Object.entries(t.palette).filter(e=>{let[,t]=e;return t.main&&t.dark}).map(e=>{let[n]=e;return{props:{colorSeverity:n,variant:"filled"},style:(0,Ft.A)({fontWeight:t.typography.fontWeightMedium},t.vars?{color:t.vars.palette.Alert["".concat(n,"FilledColor")],backgroundColor:t.vars.palette.Alert["".concat(n,"FilledBg")]}:{backgroundColor:"dark"===t.palette.mode?t.palette[n].dark:t.palette[n].main,color:t.palette.getContrastText(t.palette[n].main)})}})]})}),oM=(0,Vn.Ay)("div",{name:"MuiAlert",slot:"Icon",overridesResolver:(e,t)=>t.icon})({marginRight:12,padding:"7px 0",display:"flex",fontSize:22,opacity:.9}),aM=(0,Vn.Ay)("div",{name:"MuiAlert",slot:"Message",overridesResolver:(e,t)=>t.message})({padding:"8px 0",minWidth:0,overflow:"auto"}),sM=(0,Vn.Ay)("div",{name:"MuiAlert",slot:"Action",overridesResolver:(e,t)=>t.action})({display:"flex",alignItems:"flex-start",padding:"4px 0 0 16px",marginLeft:"auto",marginRight:-8}),lM={success:(0,qt.jsx)(JE,{fontSize:"inherit"}),warning:(0,qt.jsx)(eM,{fontSize:"inherit"}),error:(0,qt.jsx)(tM,{fontSize:"inherit"}),info:(0,qt.jsx)(nM,{fontSize:"inherit"})},cM=We.forwardRef(function(e,t){const n=(0,$t.b)({props:e,name:"MuiAlert"}),{action:r,children:i,className:o,closeText:a="Close",color:s,components:l={},componentsProps:c={},icon:d,iconMapping:u=lM,onClose:p,role:h="alert",severity:m="success",slotProps:f={},slots:g={},variant:v="standard"}=n,x=(0,nn.A)(n,rM),y=(0,Ft.A)({},n,{color:s,severity:m,variant:v,colorSeverity:s||m}),b=(e=>{const{variant:t,color:n,severity:r,classes:i}=e,o={root:["root","color".concat((0,pp.A)(n||r)),"".concat(t).concat((0,pp.A)(n||r)),"".concat(t)],icon:["icon"],message:["message"],action:["action"]};return(0,ir.A)(o,XE,i)})(y),j={slots:(0,Ft.A)({closeButton:l.CloseButton,closeIcon:l.CloseIcon},g),slotProps:(0,Ft.A)({},c,f)},[_,C]=Ey("closeButton",{elementType:wh,externalForwardedProps:j,ownerState:y}),[w,S]=Ey("closeIcon",{elementType:Fb,externalForwardedProps:j,ownerState:y});return(0,qt.jsxs)(iM,(0,Ft.A)({role:h,elevation:0,ownerState:y,className:(0,nr.A)(b.root,o),ref:t},x,{children:[!1!==d?(0,qt.jsx)(oM,{ownerState:y,className:b.icon,children:d||u[m]||lM[m]}):null,(0,qt.jsx)(aM,{ownerState:y,className:b.message,children:i}),null!=r?(0,qt.jsx)(sM,{ownerState:y,className:b.action,children:r}):null,null==r&&p?(0,qt.jsx)(sM,{ownerState:y,className:b.action,children:(0,qt.jsx)(_,(0,Ft.A)({size:"small","aria-label":a,title:a,color:"inherit",onClick:p},C,{children:(0,qt.jsx)(w,(0,Ft.A)({fontSize:"small"},S))}))}):null]}))}),dM=cM,uM=e=>{var t;let{open:n,setDetailsTab:r,logDetails:i,order:o,orderBy:a,setOrder:s,setOrderBy:l,dataParameter:c,onCheck:d,isSelection:u,checkState:p,nodata:h,logHeads:m,setDetailedLog:f}=e;return(0,qt.jsx)(qt.Fragment,{children:(0,qt.jsx)(dg,{open:n,onClose:()=>{r(!1),f({})},anchor:"right",className:"DrawerAuditLog",PaperProps:{sx:{width:"40%"}},children:(0,qt.jsx)(op,{sx:{width:"100%"},children:(0,qt.jsx)(Ff,{container:!0,spacing:2.5,children:(0,qt.jsxs)(Ff,{item:!0,xs:12,children:[(0,qt.jsxs)(op,{sx:{mb:2.5},children:[(0,qt.jsxs)(op,{p:2,sx:{backgroundColor:"#E3E5EF"},children:[(0,qt.jsx)(wh,{"aria-label":"close",onClick:()=>{r(!1),f({})},sx:{position:"absolute",right:8,top:12,color:e=>e.palette.grey[500]},children:(0,qt.jsx)(J_.A,{})}),(0,qt.jsx)(Ff,{container:!0,spacing:2,alignItems:"center",children:(0,qt.jsx)(Ff,{item:!0,xs:!0,children:(0,qt.jsxs)(Cf,{variant:"h6",fontWeight:600,children:[_e("rpm_LogDetails")," ",(null===i||void 0===i?void 0:i.description)&&"(".concat(i.description,")")]})})}),(0,qt.jsx)(Ff,{container:!0,spacing:2,mt:.05,children:(0,qt.jsx)(Ff,{item:!0,xs:!0,children:(0,qt.jsxs)(Ff,{container:!0,spacing:2.5,children:[(0,qt.jsx)(Ff,{item:!0,xs:12,md:4,lg:3,children:(0,qt.jsxs)(pE,{flexDirection:"column",gap:{xs:1,lg:2},children:[(0,qt.jsx)(Cf,{variant:"body1",component:"p",fontWeight:"h6.fontWeight",sx:{flex:.4},children:_e("rpm_UserPrincipal")}),(0,qt.jsx)(op,{sx:{flex:.6},children:(0,qt.jsx)(dM,{component:"span",icon:!1,severity:"info",sx:e=>({py:0,px:1,display:"inline-flex",wordBreak:"break-word",fontSize:e.spacing(1.5),fontWeight:600,"& .MuiAlert-message":{p:e.spacing(.5,0)}}),children:null===i||void 0===i?void 0:i.principal})})]})}),(0,qt.jsx)(Ff,{item:!0,xs:12,md:4,lg:3,children:(0,qt.jsxs)(pE,{flexDirection:"column",gap:{xs:1,lg:2},children:[(0,qt.jsx)(Cf,{variant:"body1",component:"p",fontWeight:"h6.fontWeight",sx:{flex:.4},children:_e("rpm_EventCode")}),(0,qt.jsx)(op,{sx:{flex:.6},children:(0,qt.jsx)(Cf,{variant:"body2",component:"p",color:"primary",sx:{wordBreak:"break-word"},children:null===i||void 0===i?void 0:i.event_id})})]})}),(0,qt.jsx)(Ff,{item:!0,xs:12,md:4,lg:3,children:(0,qt.jsxs)(pE,{flexDirection:"column",gap:{xs:1,lg:2},children:[(0,qt.jsx)(Cf,{variant:"body1",component:"p",fontWeight:"h6.fontWeight",sx:{flex:.4},children:_e("rpm_Service")}),(0,qt.jsx)(op,{sx:{flex:.6},children:(0,qt.jsx)(Cf,{variant:"body2",component:"p",color:"primary",sx:{wordBreak:"break-word"},children:null===i||void 0===i?void 0:i.service_code})})]})}),(0,qt.jsx)(Ff,{item:!0,xs:12,md:4,lg:3,children:(0,qt.jsxs)(pE,{flexDirection:"column",gap:{xs:1,lg:2},children:[(0,qt.jsx)(Cf,{variant:"body1",component:"p",fontWeight:"h6.fontWeight",sx:{flex:.4},children:_e("rpm_EventTime")}),(0,qt.jsx)(op,{sx:{flex:.6},children:(0,qt.jsx)(Cf,{variant:"body2",component:"p",color:"primary",sx:{wordBreak:"break-word"},children:sa()(null===i||void 0===i?void 0:i.event_time).format("DD-MM-YYYY hh:mm:ss a")||"NA"})})]})})]})})})]}),!cs(null===i||void 0===i?void 0:i.attributes)&&(0,qt.jsx)(Ff,{container:!0,spacing:2,children:(0,qt.jsx)(Ff,{item:!0,xs:!0,children:(0,qt.jsxs)(op,{p:2,children:[(0,qt.jsx)(op,{sx:{px:.5,mb:2,mt:2},children:(0,qt.jsx)(Cf,{variant:"h6",component:"p",fontWeight:600,children:_e("rpm_Event_Information")})}),(0,qt.jsx)(Ff,{container:!0,spacing:2.5,children:(0,qt.jsx)(qt.Fragment,{children:Object.entries(null===i||void 0===i?void 0:i.attributes).map((e,t)=>{let[n,r]=e;const i=sa()(r,["ddd MMM DD HH:mm:ss [UTC] YYYY"],!0);return i.isValid()&&(r=i.format("DD/MM/YYYY")),(0,qt.jsx)(Ff,{item:!0,xs:12,md:4,lg:3,children:(0,qt.jsxs)(pE,{flexDirection:"column",gap:{xs:1,lg:2},children:[(0,qt.jsx)(Cf,{variant:"body1",component:"p",fontWeight:"h6.fontWeight",sx:{flex:.4,wordBreak:"break-word"},children:n}),(0,qt.jsx)(op,{sx:{flex:.6},children:(0,qt.jsx)(Cf,{variant:"body2",component:"p",sx:{wordBreak:"break-all"},children:r})})]})},t)})})})]})})})]}),(0,qt.jsx)(eg,{sx:{margin:"10px 0"}}),!cs(null===i||void 0===i?void 0:i.logs)&&(0,qt.jsx)(qt.Fragment,{children:(0,qt.jsx)(Ff,{container:!0,spacing:2,children:(0,qt.jsx)(Ff,{item:!0,xs:!0,children:(0,qt.jsxs)(op,{p:2,children:[(0,qt.jsx)(op,{sx:{px:.5,mb:2},children:(0,qt.jsx)(Cf,{variant:"h6",fontWeight:600,children:_e("rpm_Logs")})}),(0,qt.jsx)(op,{children:(0,qt.jsx)(UT,{order:o,orderBy:a,setOrder:s,setOrderBy:l,data:cs(null===i||void 0===i?void 0:i.logs)?[]:null===i||void 0===i?void 0:i.logs,headCells:m,dataParameter:c,selected:p,setSelected:d,isSelection:!1,noDataImage:h,fetchList:()=>{},pageDetails:{},skeletonVrows:6,className:"theme_scroll",children:null===i||void 0===i||null===(t=i.logs)||void 0===t?void 0:t.map((e,t)=>(0,qt.jsxs)(cw,{selected:p.includes(null===e||void 0===e?void 0:e.id),sx:{"&:last-child td, &:last-child th":{border:0}},children:[u&&(0,qt.jsx)(gw,{padding:"checkbox",children:(0,qt.jsx)(Dw,{onChange:d,checked:p.includes(null===e||void 0===e?void 0:e.id.toString()),name:e.id.toString(),color:"primary"})}),(0,qt.jsx)(gw,{children:sa()(null===e||void 0===e?void 0:e.timestamp).format("DD-MM-YYYY hh:mm:ss a")||"NA"}),(0,qt.jsx)(gw,{minWidth:"300px",sx:{whiteSpace:"normal",wordBreak:"break-word"},children:(null===e||void 0===e?void 0:e.message)||"NA"}),(0,qt.jsx)(gw,{children:(null===e||void 0===e?void 0:e.error)||"NA"}),(0,qt.jsx)(gw,{children:cs(null===e||void 0===e?void 0:e.attributes)?(0,qt.jsx)(Cf,{variant:"body2",component:"p",children:"NA"}):e.attributes["exception.message"]?(0,qt.jsx)(Cf,{variant:"body2",component:"p",children:e.attributes["exception.message"]}):Object.entries(e.attributes).map((e,t)=>{let[n,r]=e;return(0,qt.jsxs)(Cf,{variant:"body2",component:"p",children:[n,": ",r]},t)})})]},t))})})]})})})}),!cs(null===i||void 0===i?void 0:i.children)&&(0,qt.jsx)(op,{p:2,children:(0,qt.jsx)(xh,{type:"button",variant:"contained",color:"primary",onClick:()=>window.open("/rpm/logs/".concat(null===i||void 0===i?void 0:i.event_id),"_blank"),children:"View Child Logs"})})]})})})})})};var pM=n(45465);function hM(e){return(0,sr.Ay)("MuiCircularProgress",e)}(0,ar.A)("MuiCircularProgress",["root","determinate","indeterminate","colorPrimary","colorSecondary","svg","circle","circleDeterminate","circleIndeterminate","circleDisableShrink"]);var mM,fM,gM,vM;const xM=["className","color","disableShrink","size","style","thickness","value","variant"];let yM,bM,jM,_M;const CM=44,wM=(0,Ip.i7)(yM||(yM=mM||(mM=Mp(["\n  0% {\n    transform: rotate(0deg);\n  }\n\n  100% {\n    transform: rotate(360deg);\n  }\n"])))),SM=(0,Ip.i7)(bM||(bM=fM||(fM=Mp(["\n  0% {\n    stroke-dasharray: 1px, 200px;\n    stroke-dashoffset: 0;\n  }\n\n  50% {\n    stroke-dasharray: 100px, 200px;\n    stroke-dashoffset: -15px;\n  }\n\n  100% {\n    stroke-dasharray: 100px, 200px;\n    stroke-dashoffset: -125px;\n  }\n"])))),AM=(0,Vn.Ay)("span",{name:"MuiCircularProgress",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[n.variant],t["color".concat((0,pp.A)(n.color))]]}})(e=>{let{ownerState:t,theme:n}=e;return(0,Ft.A)({display:"inline-block"},"determinate"===t.variant&&{transition:n.transitions.create("transform")},"inherit"!==t.color&&{color:(n.vars||n).palette[t.color].main})},e=>{let{ownerState:t}=e;return"indeterminate"===t.variant&&(0,Ip.AH)(jM||(jM=gM||(gM=Mp(["\n      animation: "," 1.4s linear infinite;\n    "]))),wM)}),kM=(0,Vn.Ay)("svg",{name:"MuiCircularProgress",slot:"Svg",overridesResolver:(e,t)=>t.svg})({display:"block"}),TM=(0,Vn.Ay)("circle",{name:"MuiCircularProgress",slot:"Circle",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.circle,t["circle".concat((0,pp.A)(n.variant))],n.disableShrink&&t.circleDisableShrink]}})(e=>{let{ownerState:t,theme:n}=e;return(0,Ft.A)({stroke:"currentColor"},"determinate"===t.variant&&{transition:n.transitions.create("stroke-dashoffset")},"indeterminate"===t.variant&&{strokeDasharray:"80px, 200px",strokeDashoffset:0})},e=>{let{ownerState:t}=e;return"indeterminate"===t.variant&&!t.disableShrink&&(0,Ip.AH)(_M||(_M=vM||(vM=Mp(["\n      animation: "," 1.4s ease-in-out infinite;\n    "]))),SM)}),EM=We.forwardRef(function(e,t){const n=(0,$t.b)({props:e,name:"MuiCircularProgress"}),{className:r,color:i="primary",disableShrink:o=!1,size:a=40,style:s,thickness:l=3.6,value:c=0,variant:d="indeterminate"}=n,u=(0,nn.A)(n,xM),p=(0,Ft.A)({},n,{color:i,disableShrink:o,size:a,thickness:l,value:c,variant:d}),h=(e=>{const{classes:t,variant:n,color:r,disableShrink:i}=e,o={root:["root",n,"color".concat((0,pp.A)(r))],svg:["svg"],circle:["circle","circle".concat((0,pp.A)(n)),i&&"circleDisableShrink"]};return(0,ir.A)(o,hM,t)})(p),m={},f={},g={};if("determinate"===d){const e=2*Math.PI*((CM-l)/2);m.strokeDasharray=e.toFixed(3),g["aria-valuenow"]=Math.round(c),m.strokeDashoffset="".concat(((100-c)/100*e).toFixed(3),"px"),f.transform="rotate(-90deg)"}return(0,qt.jsx)(AM,(0,Ft.A)({className:(0,nr.A)(h.root,r),style:(0,Ft.A)({width:a,height:a},f,s),ownerState:p,ref:t,role:"progressbar"},g,u,{children:(0,qt.jsx)(kM,{className:h.svg,ownerState:p,viewBox:"".concat(22," ").concat(22," ").concat(CM," ").concat(CM),children:(0,qt.jsx)(TM,{className:h.circle,style:m,ownerState:p,cx:CM,cy:CM,r:(CM-l)/2,fill:"none",strokeWidth:l})})}))}),MM=EM;function OM(e){return(0,sr.Ay)("MuiLoadingButton",e)}const RM=(0,ar.A)("MuiLoadingButton",["root","loading","loadingIndicator","loadingIndicatorCenter","loadingIndicatorStart","loadingIndicatorEnd","endIconLoadingEnd","startIconLoadingStart"]),PM=["children","disabled","id","loading","loadingIndicator","loadingPosition","variant"],DM=(0,Vn.Ay)(xh,{shouldForwardProp:e=>(e=>"ownerState"!==e&&"theme"!==e&&"sx"!==e&&"as"!==e&&"classes"!==e)(e)||"classes"===e,name:"MuiLoadingButton",slot:"Root",overridesResolver:(e,t)=>[t.root,t.startIconLoadingStart&&{["& .".concat(RM.startIconLoadingStart)]:t.startIconLoadingStart},t.endIconLoadingEnd&&{["& .".concat(RM.endIconLoadingEnd)]:t.endIconLoadingEnd}]})(e=>{let{ownerState:t,theme:n}=e;return(0,Ft.A)({["& .".concat(RM.startIconLoadingStart,", & .").concat(RM.endIconLoadingEnd)]:{transition:n.transitions.create(["opacity"],{duration:n.transitions.duration.short}),opacity:0}},"center"===t.loadingPosition&&{transition:n.transitions.create(["background-color","box-shadow","border-color"],{duration:n.transitions.duration.short}),["&.".concat(RM.loading)]:{color:"transparent"}},"start"===t.loadingPosition&&t.fullWidth&&{["& .".concat(RM.startIconLoadingStart,", & .").concat(RM.endIconLoadingEnd)]:{transition:n.transitions.create(["opacity"],{duration:n.transitions.duration.short}),opacity:0,marginRight:-8}},"end"===t.loadingPosition&&t.fullWidth&&{["& .".concat(RM.startIconLoadingStart,", & .").concat(RM.endIconLoadingEnd)]:{transition:n.transitions.create(["opacity"],{duration:n.transitions.duration.short}),opacity:0,marginLeft:-8}})}),NM=(0,Vn.Ay)("span",{name:"MuiLoadingButton",slot:"LoadingIndicator",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.loadingIndicator,t["loadingIndicator".concat((0,pp.A)(n.loadingPosition))]]}})(e=>{let{theme:t,ownerState:n}=e;return(0,Ft.A)({position:"absolute",visibility:"visible",display:"flex"},"start"===n.loadingPosition&&("outlined"===n.variant||"contained"===n.variant)&&{left:"small"===n.size?10:14},"start"===n.loadingPosition&&"text"===n.variant&&{left:6},"center"===n.loadingPosition&&{left:"50%",transform:"translate(-50%)",color:(t.vars||t).palette.action.disabled},"end"===n.loadingPosition&&("outlined"===n.variant||"contained"===n.variant)&&{right:"small"===n.size?10:14},"end"===n.loadingPosition&&"text"===n.variant&&{right:6},"start"===n.loadingPosition&&n.fullWidth&&{position:"relative",left:-10},"end"===n.loadingPosition&&n.fullWidth&&{position:"relative",right:-10})}),LM=We.forwardRef(function(e,t){const n=We.useContext(dh),r=(0,Ap.A)(n,e),i=(0,$t.b)({props:r,name:"MuiLoadingButton"}),{children:o,disabled:a=!1,id:s,loading:l=!1,loadingIndicator:c,loadingPosition:d="center",variant:u="text"}=i,p=(0,nn.A)(i,PM),h=(0,qx.A)(s),m=null!=c?c:(0,qt.jsx)(MM,{"aria-labelledby":h,color:"inherit",size:16}),f=(0,Ft.A)({},i,{disabled:a,loading:l,loadingIndicator:m,loadingPosition:d,variant:u}),g=(e=>{const{loading:t,loadingPosition:n,classes:r}=e,i={root:["root",t&&"loading"],startIcon:[t&&"startIconLoading".concat((0,pp.A)(n))],endIcon:[t&&"endIconLoading".concat((0,pp.A)(n))],loadingIndicator:["loadingIndicator",t&&"loadingIndicator".concat((0,pp.A)(n))]},o=(0,ir.A)(i,OM,r);return(0,Ft.A)({},r,o)})(f),v=l?(0,qt.jsx)(NM,{className:g.loadingIndicator,ownerState:f,children:m}):null;return(0,qt.jsxs)(DM,(0,Ft.A)({disabled:a||l,id:h,ref:t},p,{variant:u,classes:g,ownerState:f,children:["end"===f.loadingPosition?o:v,"end"===f.loadingPosition?v:o]}))}),IM=LM;function FM(e){let{props:t,name:n}=e;return rE({props:t,name:n,defaultTheme:Kt.A,themeId:Xt.A})}const $M={previousMonth:"Previous month",nextMonth:"Next month",openPreviousView:"open previous view",openNextView:"open next view",calendarViewSwitchingButtonAriaLabel:e=>"year"===e?"year view is open, switch to calendar view":"calendar view is open, switch to year view",inputModeToggleButtonAriaLabel:(e,t)=>e?"text input view is open, go to ".concat(t," view"):"".concat(t," view is open, go to text input view"),start:"Start",end:"End",cancelButtonLabel:"Cancel",clearButtonLabel:"Clear",okButtonLabel:"OK",todayButtonLabel:"Today",datePickerDefaultToolbarTitle:"Select date",dateTimePickerDefaultToolbarTitle:"Select date & time",timePickerDefaultToolbarTitle:"Select time",dateRangePickerDefaultToolbarTitle:"Select date range",clockLabelText:(e,t,n)=>"Select ".concat(e,". ").concat(null===t?"No time selected":"Selected time is ".concat(n.format(t,"fullTime"))),hoursClockNumberText:e=>"".concat(e," hours"),minutesClockNumberText:e=>"".concat(e," minutes"),secondsClockNumberText:e=>"".concat(e," seconds"),openDatePickerDialogue:(e,t)=>e&&t.isValid(t.date(e))?"Choose date, selected date is ".concat(t.format(t.date(e),"fullDate")):"Choose date",openTimePickerDialogue:(e,t)=>e&&t.isValid(t.date(e))?"Choose time, selected time is ".concat(t.format(t.date(e),"fullTime")):"Choose time",timeTableLabel:"pick time",dateTableLabel:"pick date"},BM=$M;zM=$M,(0,Ft.A)({},zM);var zM;const HM=We.createContext(null);function WM(e){const t=FM({props:e,name:"MuiLocalizationProvider"}),{children:n,dateAdapter:r,dateFormats:i,dateLibInstance:o,locale:a,adapterLocale:s,localeText:l}=t;const c=We.useMemo(()=>new r({locale:null!=s?s:a,formats:i,instance:o}),[r,a,s,i,o]),d=We.useMemo(()=>({minDate:c.date("1900-01-01T00:00:00.000"),maxDate:c.date("2099-12-31T00:00:00.000")}),[c]),u=We.useMemo(()=>({utils:c,defaultDates:d,localeText:(0,Ft.A)({},BM,null!=l?l:{})}),[d,c,l]);return(0,qt.jsx)(HM.Provider,{value:u,children:n})}const UM=()=>{const e=We.useContext(HM);if(null===e)throw new Error("MUI: Can not find utils in context. It looks like you forgot to wrap your component in LocalizationProvider, or pass dateAdapter prop directly.");return e},VM=()=>UM().utils,GM=()=>UM().defaultDates,qM=()=>UM().localeText,YM=()=>{const e=VM();return We.useRef(e.date()).current},ZM=e=>{let{date:t,disableFuture:n,disablePast:r,maxDate:i,minDate:o,isDateDisabled:a,utils:s}=e;const l=s.startOfDay(s.date());r&&s.isBefore(o,l)&&(o=l),n&&s.isAfter(i,l)&&(i=l);let c=t,d=t;for(s.isBefore(t,o)&&(c=s.date(o),d=null),s.isAfter(t,i)&&(d&&(d=s.date(i)),c=null);c||d;){if(c&&s.isAfter(c,i)&&(c=null),d&&s.isBefore(d,o)&&(d=null),c){if(!a(c))return c;c=s.addDays(c,1)}if(d){if(!a(d))return d;d=s.addDays(d,-1)}}return null},KM=(e,t)=>{const n=e.date(t);return e.isValid(n)?n:null},XM=(e,t,n)=>{if(null==t)return n;const r=e.date(t);return e.isValid(r)?r:n},QM=e=>1===e.length&&"year"===e[0],JM=e=>2===e.length&&-1!==e.indexOf("month")&&-1!==e.indexOf("year");function eO(e,t){var n;const r=VM(),i=GM(),o=FM({props:e,name:t}),a=null!=(n=o.views)?n:["year","day"];return(0,Ft.A)({openTo:"day",disableFuture:!1,disablePast:!1},((e,t)=>QM(e)?{inputFormat:t.formats.year}:JM(e)?{disableMaskedInput:!0,inputFormat:t.formats.monthAndYear}:{inputFormat:t.formats.keyboardDate})(a,r),o,{views:a,minDate:XM(r,o.minDate,i.minDate),maxDate:XM(r,o.maxDate,i.maxDate)})}const tO={emptyValue:null,getTodayValue:e=>e.date(),parseInput:KM,areValuesEqual:(e,t,n)=>e.isEqual(t,n)},nO=(0,Cy.A)((0,qt.jsx)("path",{d:"M7 10l5 5 5-5z"}),"ArrowDropDown"),rO=(0,Cy.A)((0,qt.jsx)("path",{d:"M15.41 16.59L10.83 12l4.58-4.59L14 6l-6 6 6 6 1.41-1.41z"}),"ArrowLeft"),iO=(0,Cy.A)((0,qt.jsx)("path",{d:"M8.59 16.59L13.17 12 8.59 7.41 10 6l6 6-6 6-1.41-1.41z"}),"ArrowRight"),oO=(0,Cy.A)((0,qt.jsx)("path",{d:"M17 12h-5v5h5v-5zM16 1v2H8V1H6v2H5c-1.11 0-1.99.9-1.99 2L3 19c0 1.1.89 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2h-1V1h-2zm3 18H5V8h14v11z"}),"Calendar"),aO=(0,Cy.A)((0,qt.jsxs)(We.Fragment,{children:[(0,qt.jsx)("path",{d:"M11.99 2C6.47 2 2 6.48 2 12s4.47 10 9.99 10C17.52 22 22 17.52 22 12S17.52 2 11.99 2zM12 20c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8z"}),(0,qt.jsx)("path",{d:"M12.5 7H11v6l5.25 3.15.75-1.23-4.5-2.67z"})]}),"Clock"),sO=((0,Cy.A)((0,qt.jsx)("path",{d:"M9 11H7v2h2v-2zm4 0h-2v2h2v-2zm4 0h-2v2h2v-2zm2-7h-1V2h-2v2H8V2H6v2H5c-1.11 0-1.99.9-1.99 2L3 20c0 1.1.89 2 2 2h14c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2zm0 16H5V9h14v11z"}),"DateRange"),(0,Cy.A)((0,qt.jsx)("path",{d:"M3 17.25V21h3.75L17.81 9.94l-3.75-3.75L3 17.25zM20.71 7.04c.39-.39.39-1.02 0-1.41l-2.34-2.34a.9959.9959 0 00-1.41 0l-1.83 1.83 3.75 3.75 1.83-1.83z"}),"Pen"));(0,Cy.A)((0,qt.jsxs)(We.Fragment,{children:[(0,qt.jsx)("path",{d:"M11.99 2C6.47 2 2 6.48 2 12s4.47 10 9.99 10C17.52 22 22 17.52 22 12S17.52 2 11.99 2zM12 20c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8z"}),(0,qt.jsx)("path",{d:"M12.5 7H11v6l5.25 3.15.75-1.23-4.5-2.67z"})]}),"Time");function lO(e){return(0,sr.Ay)("MuiPickersToolbar",e)}const cO=(0,ar.A)("MuiPickersToolbar",["root","content","penIconButton","penIconButtonLandscape"]),dO=(0,Vn.Ay)("div",{name:"MuiPickersToolbar",slot:"Root",overridesResolver:(e,t)=>t.root})(e=>{let{theme:t,ownerState:n}=e;return(0,Ft.A)({display:"flex",flexDirection:"column",alignItems:"flex-start",justifyContent:"space-between",padding:t.spacing(2,3)},n.isLandscape&&{height:"auto",maxWidth:160,padding:16,justifyContent:"flex-start",flexWrap:"wrap"})}),uO=(0,Vn.Ay)(Ff,{name:"MuiPickersToolbar",slot:"Content",overridesResolver:(e,t)=>t.content})(e=>{let{ownerState:t}=e;return(0,Ft.A)({flex:1},!t.isLandscape&&{alignItems:"center"})}),pO=(0,Vn.Ay)(wh,{name:"MuiPickersToolbar",slot:"PenIconButton",overridesResolver:(e,t)=>[{["&.".concat(cO.penIconButtonLandscape)]:t.penIconButtonLandscape},t.penIconButton]})({}),hO=e=>"clock"===e?(0,qt.jsx)(aO,{color:"inherit"}):(0,qt.jsx)(oO,{color:"inherit"}),mO=We.forwardRef(function(e,t){const n=FM({props:e,name:"MuiPickersToolbar"}),{children:r,className:i,getMobileKeyboardInputViewButtonText:o,isLandscape:a,isMobileKeyboardViewOpen:s,landscapeDirection:l="column",toggleMobileKeyboardView:c,toolbarTitle:d,viewType:u="calendar"}=n,p=n,h=qM(),m=(e=>{const{classes:t,isLandscape:n}=e,r={root:["root"],content:["content"],penIconButton:["penIconButton",n&&"penIconButtonLandscape"]};return(0,ir.A)(r,lO,t)})(p);return(0,qt.jsxs)(dO,{ref:t,className:jn(m.root,i),ownerState:p,children:[(0,qt.jsx)(Cf,{color:"text.secondary",variant:"overline",children:d}),(0,qt.jsxs)(uO,{container:!0,justifyContent:"space-between",className:m.content,ownerState:p,direction:a?l:"row",alignItems:a?"flex-start":"flex-end",children:[r,(0,qt.jsx)(pO,{onClick:c,className:m.penIconButton,ownerState:p,color:"inherit","aria-label":o?o(s,u):h.inputModeToggleButtonAriaLabel(s,u),children:s?hO(u):(0,qt.jsx)(sO,{color:"inherit"})})]})]})});function fO(e){return(0,sr.Ay)("MuiDatePickerToolbar",e)}(0,ar.A)("MuiDatePickerToolbar",["root","title"]);const gO=["parsedValue","isLandscape","isMobileKeyboardViewOpen","onChange","toggleMobileKeyboardView","toolbarFormat","toolbarPlaceholder","toolbarTitle","views"],vO=(0,Vn.Ay)(mO,{name:"MuiDatePickerToolbar",slot:"Root",overridesResolver:(e,t)=>t.root})({}),xO=(0,Vn.Ay)(Cf,{name:"MuiDatePickerToolbar",slot:"Title",overridesResolver:(e,t)=>t.title})(e=>{let{ownerState:t}=e;return(0,Ft.A)({},t.isLandscape&&{margin:"auto 16px auto auto"})}),yO=We.forwardRef(function(e,t){const n=FM({props:e,name:"MuiDatePickerToolbar"}),{parsedValue:r,isLandscape:i,isMobileKeyboardViewOpen:o,toggleMobileKeyboardView:a,toolbarFormat:s,toolbarPlaceholder:l="\u2013\u2013",toolbarTitle:c,views:d}=n,u=(0,nn.A)(n,gO),p=VM(),h=qM(),m=(e=>{const{classes:t}=e;return(0,ir.A)({root:["root"],title:["title"]},fO,t)})(n),f=null!=c?c:h.datePickerDefaultToolbarTitle,g=We.useMemo(()=>r?s?p.formatByString(r,s):QM(d)?p.format(r,"year"):JM(d)?p.format(r,"month"):/en/.test(p.getCurrentLocaleCode())?p.format(r,"normalDateWithWeekday"):p.format(r,"normalDate"):l,[r,s,l,p,d]),v=n;return(0,qt.jsx)(vO,(0,Ft.A)({ref:t,toolbarTitle:f,isMobileKeyboardViewOpen:o,toggleMobileKeyboardView:a,isLandscape:i,className:m.root},u,{children:(0,qt.jsx)(xO,{variant:"h4",align:i?"left":"center",ownerState:v,className:m.title,children:g})}))}),bO=We.createContext(null),jO=["onAccept","onClear","onCancel","onSetToday","actions"],_O=e=>{const{onAccept:t,onClear:n,onCancel:r,onSetToday:i,actions:o}=e,a=(0,nn.A)(e,jO),s=We.useContext(bO),l=qM(),c="function"===typeof o?o(s):o;if(null==c||0===c.length)return null;const d=null==c?void 0:c.map(e=>{switch(e){case"clear":return(0,qt.jsx)(xh,{onClick:n,children:l.clearButtonLabel},e);case"cancel":return(0,qt.jsx)(xh,{onClick:r,children:l.cancelButtonLabel},e);case"accept":return(0,qt.jsx)(xh,{onClick:t,children:l.okButtonLabel},e);case"today":return(0,qt.jsx)(xh,{onClick:i,children:l.todayButtonLabel},e);default:return null}});return(0,qt.jsx)(vE,(0,Ft.A)({},a,{children:d}))};function CO(e){return(0,sr.Ay)("MuiPickersPopper",e)}(0,ar.A)("MuiPickersPopper",["root","paper"]);function wO(e,t){return Array.isArray(t)?t.every(t=>-1!==e.indexOf(t)):-1!==e.indexOf(t)}const SO=(e,t)=>n=>{"Enter"!==n.key&&" "!==n.key||(e(n),n.preventDefault(),n.stopPropagation()),t&&t(n)},AO=function(){const e=(arguments.length>0&&void 0!==arguments[0]?arguments[0]:document).activeElement;return e?e.shadowRoot?AO(e.shadowRoot):e:null},kO=["onClick","onTouchStart"],TO=(0,Vn.Ay)(Gx,{name:"MuiPickersPopper",slot:"Root",overridesResolver:(e,t)=>t.root})(e=>{let{theme:t}=e;return{zIndex:t.zIndex.modal}}),EO=(0,Vn.Ay)(yp,{name:"MuiPickersPopper",slot:"Paper",overridesResolver:(e,t)=>t.paper})(e=>{let{ownerState:t}=e;return(0,Ft.A)({transformOrigin:"top center",outline:0},"top"===t.placement&&{transformOrigin:"bottom center"})});function MO(e){var t;const n=FM({props:e,name:"MuiPickersPopper"}),{anchorEl:r,children:i,containerRef:o=null,onBlur:a,onClose:s,onClear:l,onAccept:c,onCancel:d,onSetToday:u,open:p,PopperProps:h,role:m,TransitionComponent:f=rm,TrapFocusProps:g,PaperProps:v={},components:x,componentsProps:y}=n;We.useEffect(()=>{function e(e){!p||"Escape"!==e.key&&"Esc"!==e.key||s()}return document.addEventListener("keydown",e),()=>{document.removeEventListener("keydown",e)}},[s,p]);const b=We.useRef(null);We.useEffect(()=>{"tooltip"!==m&&(p?b.current=AO(document):b.current&&b.current instanceof HTMLElement&&setTimeout(()=>{b.current instanceof HTMLElement&&b.current.focus()}))},[p,m]);const[j,_,C]=function(e,t){const n=We.useRef(!1),r=We.useRef(!1),i=We.useRef(null),o=We.useRef(!1);We.useEffect(()=>{if(e)return document.addEventListener("mousedown",t,!0),document.addEventListener("touchstart",t,!0),()=>{document.removeEventListener("mousedown",t,!0),document.removeEventListener("touchstart",t,!0),o.current=!1};function t(){o.current=!0}},[e]);const a=(0,Tp.A)(e=>{if(!o.current)return;const a=r.current;r.current=!1;const s=(0,Nh.A)(i.current);if(!i.current||"clientX"in e&&function(e,t){return t.documentElement.clientWidth<e.clientX||t.documentElement.clientHeight<e.clientY}(e,s))return;if(n.current)return void(n.current=!1);let l;l=e.composedPath?e.composedPath().indexOf(i.current)>-1:!s.documentElement.contains(e.target)||i.current.contains(e.target),l||a||t(e)}),s=()=>{r.current=!0};return We.useEffect(()=>{if(e){const e=(0,Nh.A)(i.current),t=()=>{n.current=!0};return e.addEventListener("touchstart",a),e.addEventListener("touchmove",t),()=>{e.removeEventListener("touchstart",a),e.removeEventListener("touchmove",t)}}},[e,a]),We.useEffect(()=>{if(e){const e=(0,Nh.A)(i.current);return e.addEventListener("click",a),()=>{e.removeEventListener("click",a),r.current=!1}}},[e,a]),[i,s,s]}(p,null!=a?a:s),w=We.useRef(null),S=(0,Ln.A)(w,o),A=(0,Ln.A)(S,j),k=n,T=(e=>{const{classes:t}=e;return(0,ir.A)({root:["root"],paper:["paper"]},CO,t)})(k),{onClick:E,onTouchStart:M}=v,O=(0,nn.A)(v,kO),R=null!=(t=null==x?void 0:x.ActionBar)?t:_O,P=(null==x?void 0:x.PaperContent)||We.Fragment;return(0,qt.jsx)(TO,(0,Ft.A)({transition:!0,role:m,open:p,anchorEl:r,onKeyDown:e=>{"Escape"===e.key&&(e.stopPropagation(),s())},className:T.root},h,{children:e=>{let{TransitionProps:t,placement:n}=e;return(0,qt.jsx)(sm,(0,Ft.A)({open:p,disableAutoFocus:!0,disableRestoreFocus:!0,disableEnforceFocus:"tooltip"===m,isEnabled:()=>!0},g,{children:(0,qt.jsx)(f,(0,Ft.A)({},t,{children:(0,qt.jsx)(EO,(0,Ft.A)({tabIndex:-1,elevation:8,ref:A,onClick:e=>{_(e),E&&E(e)},onTouchStart:e=>{C(e),M&&M(e)},ownerState:(0,Ft.A)({},k,{placement:n}),className:T.paper},O,{children:(0,qt.jsxs)(P,(0,Ft.A)({},null==y?void 0:y.paperContent,{children:[i,(0,qt.jsx)(R,(0,Ft.A)({onAccept:c,onClear:l,onCancel:d,onSetToday:u,actions:[]},null==y?void 0:y.actionBar))]}))}))}))}))}}))}function OO(e){const{children:t,DateInputProps:n,KeyboardDateInputComponent:r,onClear:i,onDismiss:o,onCancel:a,onAccept:s,onSetToday:l,open:c,PopperProps:d,PaperProps:u,TransitionComponent:p,components:h,componentsProps:m}=e,f=We.useRef(null),g=(0,Ln.A)(n.inputRef,f);return(0,qt.jsxs)(bO.Provider,{value:"desktop",children:[(0,qt.jsx)(r,(0,Ft.A)({},n,{inputRef:g})),(0,qt.jsx)(MO,{role:"dialog",open:c,anchorEl:f.current,TransitionComponent:p,PopperProps:d,PaperProps:u,onClose:o,onCancel:a,onClear:i,onAccept:s,onSetToday:l,components:h,componentsProps:m,children:t})]})}function RO(e){let{onChange:t,onViewChange:n,openTo:r,view:i,views:o}=e;var a,s;const[l,c]=(0,Yx.A)({name:"Picker",state:"view",controlled:i,default:r&&wO(o,r)?r:o[0]}),d=null!=(a=o[o.indexOf(l)-1])?a:null,u=null!=(s=o[o.indexOf(l)+1])?s:null,p=We.useCallback(e=>{c(e),n&&n(e)},[c,n]),h=We.useCallback(()=>{u&&p(u)},[u,p]),m=We.useCallback((e,n)=>{const r="finish"===n,i=r&&Boolean(u)?"partial":n;t(e,i),r&&h()},[u,t,h]);return{handleChangeAndOpenNext:m,nextView:u,previousView:d,openNext:h,openView:l,setOpenView:p}}const PO=220,DO=36,NO={x:110,y:110},LO=NO.x-NO.x,IO=0-NO.y,FO=(e,t,n)=>{const r=t-NO.x,i=n-NO.y,o=Math.atan2(LO,IO)-Math.atan2(r,i);let a=o*(180/Math.PI);a=Math.round(a/e)*e,a%=360;const s=r**2+i**2;return{value:Math.floor(a/e)||0,distance:Math.sqrt(s)}};function $O(e){return(0,sr.Ay)("MuiClockPointer",e)}(0,ar.A)("MuiClockPointer",["root","thumb"]);const BO=["className","hasSelected","isInner","type","value"],zO=(0,Vn.Ay)("div",{name:"MuiClockPointer",slot:"Root",overridesResolver:(e,t)=>t.root})(e=>{let{theme:t,ownerState:n}=e;return(0,Ft.A)({width:2,backgroundColor:t.palette.primary.main,position:"absolute",left:"calc(50% - 1px)",bottom:"50%",transformOrigin:"center bottom 0px"},n.shouldAnimate&&{transition:t.transitions.create(["transform","height"])})}),HO=(0,Vn.Ay)("div",{name:"MuiClockPointer",slot:"Thumb",overridesResolver:(e,t)=>t.thumb})(e=>{let{theme:t,ownerState:n}=e;return(0,Ft.A)({width:4,height:4,backgroundColor:t.palette.primary.contrastText,borderRadius:"50%",position:"absolute",top:-21,left:"calc(50% - ".concat(18,"px)"),border:"".concat(16,"px solid ").concat(t.palette.primary.main),boxSizing:"content-box"},n.hasSelected&&{backgroundColor:t.palette.primary.main})});function WO(e){const t=FM({props:e,name:"MuiClockPointer"}),{className:n,isInner:r,type:i,value:o}=t,a=(0,nn.A)(t,BO),s=We.useRef(i);We.useEffect(()=>{s.current=i},[i]);const l=(0,Ft.A)({},t,{shouldAnimate:s.current!==i}),c=(e=>{const{classes:t}=e;return(0,ir.A)({root:["root"],thumb:["thumb"]},$O,t)})(l);return(0,qt.jsx)(zO,(0,Ft.A)({style:(()=>{let e=360/("hours"===i?12:60)*o;return"hours"===i&&o>12&&(e-=360),{height:Math.round((r?.26:.4)*PO),transform:"rotateZ(".concat(e,"deg)")}})(),className:jn(n,c.root),ownerState:l},a,{children:(0,qt.jsx)(HO,{ownerState:l,className:c.thumb})}))}function UO(e){return(0,sr.Ay)("MuiClock",e)}(0,ar.A)("MuiClock",["root","clock","wrapper","squareMask","pin","amButton","pmButton"]);const VO=(0,Vn.Ay)("div",{name:"MuiClock",slot:"Root",overridesResolver:(e,t)=>t.root})(e=>{let{theme:t}=e;return{display:"flex",justifyContent:"center",alignItems:"center",margin:t.spacing(2)}}),GO=(0,Vn.Ay)("div",{name:"MuiClock",slot:"Clock",overridesResolver:(e,t)=>t.clock})({backgroundColor:"rgba(0,0,0,.07)",borderRadius:"50%",height:220,width:220,flexShrink:0,position:"relative",pointerEvents:"none"}),qO=(0,Vn.Ay)("div",{name:"MuiClock",slot:"Wrapper",overridesResolver:(e,t)=>t.wrapper})({"&:focus":{outline:"none"}}),YO=(0,Vn.Ay)("div",{name:"MuiClock",slot:"SquareMask",overridesResolver:(e,t)=>t.squareMask})(e=>{let{ownerState:t}=e;return(0,Ft.A)({width:"100%",height:"100%",position:"absolute",pointerEvents:"auto",outline:0,touchAction:"none",userSelect:"none"},t.disabled?{}:{"@media (pointer: fine)":{cursor:"pointer",borderRadius:"50%"},"&:active":{cursor:"move"}})}),ZO=(0,Vn.Ay)("div",{name:"MuiClock",slot:"Pin",overridesResolver:(e,t)=>t.pin})(e=>{let{theme:t}=e;return{width:6,height:6,borderRadius:"50%",backgroundColor:t.palette.primary.main,position:"absolute",top:"50%",left:"50%",transform:"translate(-50%, -50%)"}}),KO=(0,Vn.Ay)(wh,{name:"MuiClock",slot:"AmButton",overridesResolver:(e,t)=>t.amButton})(e=>{let{theme:t,ownerState:n}=e;return(0,Ft.A)({zIndex:1,position:"absolute",bottom:n.ampmInClock?64:8,left:8},"am"===n.meridiemMode&&{backgroundColor:t.palette.primary.main,color:t.palette.primary.contrastText,"&:hover":{backgroundColor:t.palette.primary.light}})}),XO=(0,Vn.Ay)(wh,{name:"MuiClock",slot:"PmButton",overridesResolver:(e,t)=>t.pmButton})(e=>{let{theme:t,ownerState:n}=e;return(0,Ft.A)({zIndex:1,position:"absolute",bottom:n.ampmInClock?64:8,right:8},"pm"===n.meridiemMode&&{backgroundColor:t.palette.primary.main,color:t.palette.primary.contrastText,"&:hover":{backgroundColor:t.palette.primary.light}})});function QO(e){const t=FM({props:e,name:"MuiClock"}),{ampm:n,ampmInClock:r,autoFocus:i,children:o,date:a,getClockLabelText:s,handleMeridiemChange:l,isTimeDisabled:c,meridiemMode:d,minutesStep:u=1,onChange:p,selectedId:h,type:m,value:f,disabled:g,readOnly:v,className:x}=t,y=t,b=VM(),j=We.useContext(bO),_=We.useRef(!1),C=(e=>{const{classes:t}=e;return(0,ir.A)({root:["root"],clock:["clock"],wrapper:["wrapper"],squareMask:["squareMask"],pin:["pin"],amButton:["amButton"],pmButton:["pmButton"]},UO,t)})(y),w=c(f,m),S=!n&&"hours"===m&&(f<1||f>12),A=(e,t)=>{g||v||c(e,m)||p(e,t)},k=(e,t)=>{let{offsetX:r,offsetY:i}=e;if(void 0===r){const t=e.target.getBoundingClientRect();r=e.changedTouches[0].clientX-t.left,i=e.changedTouches[0].clientY-t.top}const o="seconds"===m||"minutes"===m?function(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1;const r=6*n;let{value:i}=FO(r,e,t);return i=i*n%60,i}(r,i,u):((e,t,n)=>{const{value:r,distance:i}=FO(30,e,t);let o=r||12;return n?o%=12:i<74&&(o+=12,o%=24),o})(r,i,Boolean(n));A(o,t)},T=We.useMemo(()=>"hours"===m||f%5===0,[m,f]),E="minutes"===m?u:1,M=We.useRef(null);(0,hn.A)(()=>{i&&M.current.focus()},[i]);return(0,qt.jsxs)(VO,{className:jn(x,C.root),children:[(0,qt.jsxs)(GO,{className:C.clock,children:[(0,qt.jsx)(YO,{onTouchMove:e=>{_.current=!0,k(e,"shallow")},onTouchEnd:e=>{_.current&&(k(e,"finish"),_.current=!1)},onMouseUp:e=>{_.current&&(_.current=!1),k(e.nativeEvent,"finish")},onMouseMove:e=>{e.buttons>0&&k(e.nativeEvent,"shallow")},ownerState:{disabled:g},className:C.squareMask}),!w&&(0,qt.jsxs)(We.Fragment,{children:[(0,qt.jsx)(ZO,{className:C.pin}),a&&(0,qt.jsx)(WO,{type:m,value:f,isInner:S,hasSelected:T})]}),(0,qt.jsx)(qO,{"aria-activedescendant":h,"aria-label":s(m,a,b),ref:M,role:"listbox",onKeyDown:e=>{if(!_.current)switch(e.key){case"Home":A(0,"partial"),e.preventDefault();break;case"End":A("minutes"===m?59:23,"partial"),e.preventDefault();break;case"ArrowUp":A(f+E,"partial"),e.preventDefault();break;case"ArrowDown":A(f-E,"partial"),e.preventDefault()}},tabIndex:0,className:C.wrapper,children:o})]}),n&&("desktop"===j||r)&&(0,qt.jsxs)(We.Fragment,{children:[(0,qt.jsx)(KO,{onClick:v?void 0:()=>l("am"),disabled:g||null===d,ownerState:y,className:C.amButton,children:(0,qt.jsx)(Cf,{variant:"caption",children:"AM"})}),(0,qt.jsx)(XO,{disabled:g||null===d,onClick:v?void 0:()=>l("pm"),ownerState:y,className:C.pmButton,children:(0,qt.jsx)(Cf,{variant:"caption",children:"PM"})})]})]})}function JO(e){return(0,sr.Ay)("MuiClockNumber",e)}const eR=(0,ar.A)("MuiClockNumber",["root","selected","disabled"]),tR=["className","disabled","index","inner","label","selected"],nR=(0,Vn.Ay)("span",{name:"MuiClockNumber",slot:"Root",overridesResolver:(e,t)=>[t.root,{["&.".concat(eR.disabled)]:t.disabled},{["&.".concat(eR.selected)]:t.selected}]})(e=>{let{theme:t,ownerState:n}=e;return(0,Ft.A)({height:DO,width:DO,position:"absolute",left:"calc((100% - ".concat(DO,"px) / 2)"),display:"inline-flex",justifyContent:"center",alignItems:"center",borderRadius:"50%",color:t.palette.text.primary,fontFamily:t.typography.fontFamily,"&:focused":{backgroundColor:t.palette.background.paper},["&.".concat(eR.selected)]:{color:t.palette.primary.contrastText},["&.".concat(eR.disabled)]:{pointerEvents:"none",color:t.palette.text.disabled}},n.inner&&(0,Ft.A)({},t.typography.body2,{color:t.palette.text.secondary}))});function rR(e){const t=FM({props:e,name:"MuiClockNumber"}),{className:n,disabled:r,index:i,inner:o,label:a,selected:s}=t,l=(0,nn.A)(t,tR),c=t,d=(e=>{const{classes:t,selected:n,disabled:r}=e,i={root:["root",n&&"selected",r&&"disabled"]};return(0,ir.A)(i,JO,t)})(c),u=i%12/12*Math.PI*2-Math.PI/2,p=91*(o?.65:1),h=Math.round(Math.cos(u)*p),m=Math.round(Math.sin(u)*p);return(0,qt.jsx)(nR,(0,Ft.A)({className:jn(n,d.root),"aria-disabled":!!r||void 0,"aria-selected":!!s||void 0,role:"option",style:{transform:"translate(".concat(h,"px, ").concat(m+92,"px")},ownerState:c},l,{children:a}))}const iR=e=>{let{ampm:t,date:n,getClockNumberText:r,isDisabled:i,selectedId:o,utils:a}=e;const s=n?a.getHours(n):null,l=[],c=t?12:23,d=e=>null!==s&&(t?12===e?12===s||0===s:s===e||s-12===e:s===e);for(let u=t?1:0;u<=c;u+=1){let e=u.toString();0===u&&(e="00");const n=!t&&(0===u||u>12);e=a.formatNumber(e);const s=d(u);l.push((0,qt.jsx)(rR,{id:s?o:void 0,index:u,inner:n,selected:s,disabled:i(u),label:e,"aria-label":r(e)},u))}return l},oR=e=>{let{utils:t,value:n,isDisabled:r,getClockNumberText:i,selectedId:o}=e;const a=t.formatNumber;return[[5,a("05")],[10,a("10")],[15,a("15")],[20,a("20")],[25,a("25")],[30,a("30")],[35,a("35")],[40,a("40")],[45,a("45")],[50,a("50")],[55,a("55")],[0,a("00")]].map((e,t)=>{let[a,s]=e;const l=a===n;return(0,qt.jsx)(rR,{label:s,id:l?o:void 0,index:t+1,inner:!1,disabled:r(a),selected:l,"aria-label":i(s)},a)})};function aR(e){return(0,sr.Ay)("MuiPickersArrowSwitcher",e)}(0,ar.A)("MuiPickersArrowSwitcher",["root","spacer","button"]);const sR=["children","className","components","componentsProps","isLeftDisabled","isLeftHidden","isRightDisabled","isRightHidden","leftArrowButtonText","onLeftClick","onRightClick","rightArrowButtonText"],lR=(0,Vn.Ay)("div",{name:"MuiPickersArrowSwitcher",slot:"Root",overridesResolver:(e,t)=>t.root})({display:"flex"}),cR=(0,Vn.Ay)("div",{name:"MuiPickersArrowSwitcher",slot:"Spacer",overridesResolver:(e,t)=>t.spacer})(e=>{let{theme:t}=e;return{width:t.spacing(3)}}),dR=(0,Vn.Ay)(wh,{name:"MuiPickersArrowSwitcher",slot:"Button",overridesResolver:(e,t)=>t.button})(e=>{let{ownerState:t}=e;return(0,Ft.A)({},t.hidden&&{visibility:"hidden"})}),uR=We.forwardRef(function(e,t){const n=FM({props:e,name:"MuiPickersArrowSwitcher"}),{children:r,className:i,components:o,componentsProps:a,isLeftDisabled:s,isLeftHidden:l,isRightDisabled:c,isRightHidden:d,leftArrowButtonText:u,onLeftClick:p,onRightClick:h,rightArrowButtonText:m}=n,f=(0,nn.A)(n,sR),g="rtl"===In().direction,v=(null==a?void 0:a.leftArrowButton)||{},x=(null==o?void 0:o.LeftArrowIcon)||rO,y=(null==a?void 0:a.rightArrowButton)||{},b=(null==o?void 0:o.RightArrowIcon)||iO,j=n,_=(e=>{const{classes:t}=e;return(0,ir.A)({root:["root"],spacer:["spacer"],button:["button"]},aR,t)})(j);return(0,qt.jsxs)(lR,(0,Ft.A)({ref:t,className:jn(_.root,i),ownerState:j},f,{children:[(0,qt.jsx)(dR,(0,Ft.A)({as:null==o?void 0:o.LeftArrowButton,size:"small","aria-label":u,title:u,disabled:s,edge:"end",onClick:p},v,{className:jn(_.button,v.className),ownerState:(0,Ft.A)({},j,v,{hidden:l}),children:g?(0,qt.jsx)(b,{}):(0,qt.jsx)(x,{})})),r?(0,qt.jsx)(Cf,{variant:"subtitle1",component:"span",children:r}):(0,qt.jsx)(cR,{className:_.spacer,ownerState:j}),(0,qt.jsx)(dR,(0,Ft.A)({as:null==o?void 0:o.RightArrowButton,size:"small","aria-label":m,title:m,edge:"start",disabled:c,onClick:h},y,{className:jn(_.button,y.className),ownerState:(0,Ft.A)({},j,y,{hidden:d}),children:g?(0,qt.jsx)(x,{}):(0,qt.jsx)(b,{})}))]}))}),pR=(e,t,n)=>{if(n){if((e>=12?"pm":"am")!==t)return"am"===t?e-12:e+12}return e},hR=(e,t)=>3600*t.getHours(e)+60*t.getMinutes(e)+t.getSeconds(e),mR=function(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=arguments.length>1?arguments[1]:void 0;return(n,r)=>e?t.isAfter(n,r):hR(n,t)>hR(r,t)};function fR(e,t,n){const r=VM(),i=((e,t)=>e?t.getHours(e)>=12?"pm":"am":null)(e,r),o=We.useCallback(i=>{const o=null==e?null:((e,t,n,r)=>{const i=pR(r.getHours(e),t,n);return r.setHours(e,i)})(e,i,Boolean(t),r);n(o,"partial")},[t,e,n,r]);return{meridiemMode:i,handleMeridiemChange:o}}function gR(e){return(0,sr.Ay)("MuiClockPicker",e)}(0,ar.A)("MuiClockPicker",["root","arrowSwitcher"]);const vR=(0,Vn.Ay)("div")({overflowX:"hidden",width:320,maxHeight:358,display:"flex",flexDirection:"column",margin:"0 auto"}),xR=(0,Vn.Ay)(vR,{name:"MuiClockPicker",slot:"Root",overridesResolver:(e,t)=>t.root})({display:"flex",flexDirection:"column"}),yR=(0,Vn.Ay)(uR,{name:"MuiClockPicker",slot:"ArrowSwitcher",overridesResolver:(e,t)=>t.arrowSwitcher})({position:"absolute",right:12,top:15}),bR=()=>{},jR=We.forwardRef(function(e,t){const n=FM({props:e,name:"MuiClockPicker"}),{ampm:r=!1,ampmInClock:i=!1,autoFocus:o,components:a,componentsProps:s,date:l,disableIgnoringDatePartForTimeValidation:c,getClockLabelText:d,getHoursClockNumberText:u,getMinutesClockNumberText:p,getSecondsClockNumberText:h,leftArrowButtonText:m,maxTime:f,minTime:g,minutesStep:v=1,rightArrowButtonText:x,shouldDisableTime:y,showViewSwitcher:b,onChange:j,view:_,views:C=["hours","minutes"],openTo:w,onViewChange:S,className:A,disabled:k,readOnly:T}=n;bR({leftArrowButtonText:m,rightArrowButtonText:x,getClockLabelText:d,getHoursClockNumberText:u,getMinutesClockNumberText:p,getSecondsClockNumberText:h});const E=qM(),M=null!=m?m:E.openPreviousView,O=null!=x?x:E.openNextView,R=null!=d?d:E.clockLabelText,P=null!=u?u:E.hoursClockNumberText,D=null!=p?p:E.minutesClockNumberText,N=null!=h?h:E.secondsClockNumberText,{openView:L,setOpenView:I,nextView:F,previousView:$,handleChangeAndOpenNext:B}=RO({view:_,views:C,openTo:w,onViewChange:S,onChange:j}),z=YM(),H=VM(),W=We.useMemo(()=>l||H.setSeconds(H.setMinutes(H.setHours(z,0),0),0),[l,z,H]),{meridiemMode:U,handleMeridiemChange:V}=fR(W,r,B),G=We.useCallback((e,t)=>{const n=mR(c,H),i=e=>{let{start:t,end:r}=e;return(!g||!n(g,r))&&(!f||!n(t,f))},o=function(e){return e%(arguments.length>1&&void 0!==arguments[1]?arguments[1]:1)===0&&(!y||!y(e,t))};switch(t){case"hours":{const t=pR(e,U,r),n=H.setHours(W,t);return!i({start:H.setSeconds(H.setMinutes(n,0),0),end:H.setSeconds(H.setMinutes(n,59),59)})||!o(t)}case"minutes":{const t=H.setMinutes(W,e);return!i({start:H.setSeconds(t,0),end:H.setSeconds(t,59)})||!o(e,v)}case"seconds":{const t=H.setSeconds(W,e);return!i({start:t,end:t})||!o(e)}default:throw new Error("not supported")}},[r,W,c,f,U,g,v,y,H]),q=(0,qx.A)(),Y=We.useMemo(()=>{switch(L){case"hours":{const e=(e,t)=>{const n=pR(e,U,r);B(H.setHours(W,n),t)};return{onChange:e,value:H.getHours(W),children:iR({date:l,utils:H,ampm:r,onChange:e,getClockNumberText:P,isDisabled:e=>k||G(e,"hours"),selectedId:q})}}case"minutes":{const e=H.getMinutes(W),t=(e,t)=>{B(H.setMinutes(W,e),t)};return{value:e,onChange:t,children:oR({utils:H,value:e,onChange:t,getClockNumberText:D,isDisabled:e=>k||G(e,"minutes"),selectedId:q})}}case"seconds":{const e=H.getSeconds(W),t=(e,t)=>{B(H.setSeconds(W,e),t)};return{value:e,onChange:t,children:oR({utils:H,value:e,onChange:t,getClockNumberText:N,isDisabled:e=>k||G(e,"seconds"),selectedId:q})}}default:throw new Error("You must provide the type for ClockView")}},[L,H,l,r,P,D,N,U,B,W,G,q,k]),Z=n,K=(e=>{const{classes:t}=e;return(0,ir.A)({root:["root"],arrowSwitcher:["arrowSwitcher"]},gR,t)})(Z);return(0,qt.jsxs)(xR,{ref:t,className:jn(K.root,A),ownerState:Z,children:[b&&(0,qt.jsx)(yR,{className:K.arrowSwitcher,leftArrowButtonText:M,rightArrowButtonText:O,components:a,componentsProps:s,onLeftClick:()=>I($),onRightClick:()=>I(F),isLeftDisabled:!$,isRightDisabled:!F,ownerState:Z}),(0,qt.jsx)(QO,(0,Ft.A)({autoFocus:o,date:l,ampmInClock:i,type:L,ampm:r,getClockLabelText:R,minutesStep:v,isTimeDisabled:G,meridiemMode:U,handleMeridiemChange:V,selectedId:q,disabled:k,readOnly:T},Y))]})});function _R(e){return(0,sr.Ay)("PrivatePickersMonth",e)}const CR=(0,ar.A)("PrivatePickersMonth",["root","selected"]),wR=["disabled","onSelect","selected","value","tabIndex","hasFocus","onFocus","onBlur"],SR=(0,Vn.Ay)(Cf,{name:"PrivatePickersMonth",slot:"Root",overridesResolver:(e,t)=>[t.root,{["&.".concat(CR.selected)]:t.selected}]})(e=>{let{theme:t}=e;return(0,Ft.A)({flex:"1 0 33.33%",display:"flex",alignItems:"center",justifyContent:"center",color:"unset",backgroundColor:"transparent",border:0,outline:0},t.typography.subtitle1,{margin:"8px 0",height:36,borderRadius:18,cursor:"pointer","&:focus, &:hover":{backgroundColor:Qn(t.palette.action.active,t.palette.action.hoverOpacity)},"&:disabled":{pointerEvents:"none",color:t.palette.text.secondary},["&.".concat(CR.selected)]:{color:t.palette.primary.contrastText,backgroundColor:t.palette.primary.main,"&:focus, &:hover":{backgroundColor:t.palette.primary.dark}}})}),AR=()=>{},kR=e=>{const{disabled:t,onSelect:n,selected:r,value:i,tabIndex:o,hasFocus:a,onFocus:s=AR,onBlur:l=AR}=e,c=(0,nn.A)(e,wR),d=(e=>{const{classes:t,selected:n}=e,r={root:["root",n&&"selected"]};return(0,ir.A)(r,_R,t)})(e),u=()=>{n(i)},p=We.useRef(null);return(0,Uh.A)(()=>{var e;a&&(null==(e=p.current)||e.focus())},[a]),(0,qt.jsx)(SR,(0,Ft.A)({ref:p,component:"button",type:"button",className:d.root,tabIndex:o,onClick:u,onKeyDown:SO(u),color:r?"primary":void 0,variant:r?"h5":"subtitle1",disabled:t,onFocus:e=>s(e,i),onBlur:e=>l(e,i)},c))};function TR(e){return(0,sr.Ay)("MuiMonthPicker",e)}(0,ar.A)("MuiMonthPicker",["root"]);const ER=["className","date","disabled","disableFuture","disablePast","maxDate","minDate","onChange","shouldDisableMonth","readOnly","disableHighlightToday","autoFocus","onMonthFocus","hasFocus","onFocusedViewChange"];const MR=(0,Vn.Ay)("div",{name:"MuiMonthPicker",slot:"Root",overridesResolver:(e,t)=>t.root})({width:310,display:"flex",flexWrap:"wrap",alignContent:"stretch",margin:"0 4px"}),OR=We.forwardRef(function(e,t){const n=VM(),r=YM(),i=function(e,t){const n=VM(),r=GM(),i=FM({props:e,name:t});return(0,Ft.A)({disableFuture:!1,disablePast:!1},i,{minDate:XM(n,i.minDate,r.minDate),maxDate:XM(n,i.maxDate,r.maxDate)})}(e,"MuiMonthPicker"),{className:o,date:a,disabled:s,disableFuture:l,disablePast:c,maxDate:d,minDate:u,onChange:p,shouldDisableMonth:h,readOnly:m,disableHighlightToday:f,autoFocus:g=!1,onMonthFocus:v,hasFocus:x,onFocusedViewChange:y}=i,b=(0,nn.A)(i,ER),j=i,_=(e=>{const{classes:t}=e;return(0,ir.A)({root:["root"]},TR,t)})(j),C=Gt(),w=We.useMemo(()=>null!=a?a:n.startOfMonth(r),[r,n,a]),S=We.useMemo(()=>null!=a?n.getMonth(a):f?null:n.getMonth(r),[r,a,n,f]),[A,k]=We.useState(()=>S||n.getMonth(r)),T=We.useCallback(e=>{const t=n.startOfMonth(c&&n.isAfter(r,u)?r:u),i=n.startOfMonth(l&&n.isBefore(r,d)?r:d);return!!n.isBefore(e,t)||(!!n.isAfter(e,i)||!!h&&h(e))},[l,c,d,u,r,h,n]),E=e=>{if(m)return;const t=n.setMonth(w,e);p(t,"finish")},[M,O]=(0,Yx.A)({name:"MonthPicker",state:"hasFocus",controlled:x,default:g}),R=We.useCallback(e=>{O(e),y&&y(e)},[O,y]),P=We.useCallback(e=>{T(n.setMonth(w,e))||(k(e),R(!0),v&&v(e))},[T,n,w,R,v]);We.useEffect(()=>{k(e=>null!==S&&e!==S?S:e)},[S]);const D=(0,Tp.A)(e=>{const t=12;switch(e.key){case"ArrowUp":P((t+A-3)%t),e.preventDefault();break;case"ArrowDown":P((t+A+3)%t),e.preventDefault();break;case"ArrowLeft":P((t+A+("ltr"===C.direction?-1:1))%t),e.preventDefault();break;case"ArrowRight":P((t+A+("ltr"===C.direction?1:-1))%t),e.preventDefault()}}),N=We.useCallback((e,t)=>{P(t)},[P]),L=We.useCallback(()=>{R(!1)},[R]),I=n.getMonth(r);return(0,qt.jsx)(MR,(0,Ft.A)({ref:t,className:jn(_.root,o),ownerState:j,onKeyDown:D},b,{children:n.getMonthArray(w).map(e=>{const t=n.getMonth(e),r=n.format(e,"monthShort"),i=s||T(e);return(0,qt.jsx)(kR,{value:t,selected:t===S,tabIndex:t!==A||i?-1:0,hasFocus:M&&t===A,onSelect:E,onFocus:N,onBlur:L,disabled:i,"aria-current":I===t?"date":void 0,children:r},r)})}))});function RR(e,t,n){const{value:r,onError:i}=e,o=UM(),a=We.useRef(null),s=t({adapter:o,value:r,props:e});return We.useEffect(()=>{i&&!n(s,a.current)&&i(s,r),a.current=s},[n,i,a,s,r]),s}const PR=e=>{let{props:t,value:n,adapter:r}=e;const i=r.utils.date(),o=r.utils.date(n),a=XM(r.utils,t.minDate,r.defaultDates.minDate),s=XM(r.utils,t.maxDate,r.defaultDates.maxDate);if(null===o)return null;switch(!0){case!r.utils.isValid(n):return"invalidDate";case Boolean(t.shouldDisableDate&&t.shouldDisableDate(o)):return"shouldDisableDate";case Boolean(t.disableFuture&&r.utils.isAfterDay(o,i)):return"disableFuture";case Boolean(t.disablePast&&r.utils.isBeforeDay(o,i)):return"disablePast";case Boolean(a&&r.utils.isBeforeDay(o,a)):return"minDate";case Boolean(s&&r.utils.isAfterDay(o,s)):return"maxDate";default:return null}},DR=e=>{let{shouldDisableDate:t,minDate:n,maxDate:r,disableFuture:i,disablePast:o}=e;const a=UM();return We.useCallback(e=>null!==PR({adapter:a,value:e,props:{shouldDisableDate:t,minDate:n,maxDate:r,disableFuture:i,disablePast:o}}),[a,t,n,r,i,o])},NR=(e,t)=>e===t,LR=e=>RR(e,PR,NR),IR=e=>{let{date:t,defaultCalendarMonth:n,disableFuture:r,disablePast:i,disableSwitchToMonthOnDayFocus:o=!1,maxDate:a,minDate:s,onMonthChange:l,reduceAnimations:c,shouldDisableDate:d}=e;var u;const p=YM(),h=VM(),m=We.useRef(((e,t,n)=>(r,i)=>{switch(i.type){case"changeMonth":return(0,Ft.A)({},r,{slideDirection:i.direction,currentMonth:i.newMonth,isMonthSwitchingAnimating:!e});case"finishMonthSwitchingAnimation":return(0,Ft.A)({},r,{isMonthSwitchingAnimating:!1});case"changeFocusedDay":{if(null!=r.focusedDay&&null!=i.focusedDay&&n.isSameDay(i.focusedDay,r.focusedDay))return r;const o=null!=i.focusedDay&&!t&&!n.isSameMonth(r.currentMonth,i.focusedDay);return(0,Ft.A)({},r,{focusedDay:i.focusedDay,isMonthSwitchingAnimating:o&&!e&&!i.withoutMonthSwitchingAnimation,currentMonth:o?n.startOfMonth(i.focusedDay):r.currentMonth,slideDirection:null!=i.focusedDay&&n.isAfterDay(i.focusedDay,r.currentMonth)?"left":"right"})}default:throw new Error("missing support")}})(Boolean(c),o,h)).current,[f,g]=We.useReducer(m,{isMonthSwitchingAnimating:!1,focusedDay:t||p,currentMonth:h.startOfMonth(null!=(u=null!=t?t:n)?u:p),slideDirection:"left"}),v=We.useCallback(e=>{g((0,Ft.A)({type:"changeMonth"},e)),l&&l(e.newMonth)},[l]),x=We.useCallback(e=>{const t=null!=e?e:p;h.isSameMonth(t,f.currentMonth)||v({newMonth:h.startOfMonth(t),direction:h.isAfterDay(t,f.currentMonth)?"left":"right"})},[f.currentMonth,v,p,h]),y=DR({shouldDisableDate:d,minDate:s,maxDate:a,disableFuture:r,disablePast:i}),b=We.useCallback(()=>{g({type:"finishMonthSwitchingAnimation"})},[]),j=We.useCallback((e,t)=>{y(e)||g({type:"changeFocusedDay",focusedDay:e,withoutMonthSwitchingAnimation:t})},[y]);return{calendarState:f,changeMonth:x,changeFocusedDay:j,isDateDisabled:y,onMonthSwitchingAnimationEnd:b,handleChangeMonth:v}},FR=e=>(0,sr.Ay)("MuiPickersFadeTransitionGroup",e),$R=((0,ar.A)("MuiPickersFadeTransitionGroup",["root"]),(0,Vn.Ay)(Lp,{name:"MuiPickersFadeTransitionGroup",slot:"Root",overridesResolver:(e,t)=>t.root})({display:"block",position:"relative"}));function BR(e){const t=FM({props:e,name:"MuiPickersFadeTransitionGroup"}),{children:n,className:r,reduceAnimations:i,transKey:o}=t,a=(e=>{const{classes:t}=e;return(0,ir.A)({root:["root"]},FR,t)})(t);return i?n:(0,qt.jsx)($R,{className:jn(a.root,r),children:(0,qt.jsx)(hm,{appear:!1,mountOnEnter:!0,unmountOnExit:!0,timeout:{appear:500,enter:250,exit:0},children:n},o)})}function zR(e){return(0,sr.Ay)("MuiPickersDay",e)}const HR=(0,ar.A)("MuiPickersDay",["root","dayWithMargin","dayOutsideMonth","hiddenDaySpacingFiller","today","selected","disabled"]),WR=["autoFocus","className","day","disabled","disableHighlightToday","disableMargin","hidden","isAnimating","onClick","onDaySelect","onFocus","onBlur","onKeyDown","onMouseDown","outsideCurrentMonth","selected","showDaysOutsideCurrentMonth","children","today"],UR=e=>{let{theme:t,ownerState:n}=e;return(0,Ft.A)({},t.typography.caption,{width:36,height:36,borderRadius:"50%",padding:0,backgroundColor:t.palette.background.paper,color:t.palette.text.primary,"&:hover":{backgroundColor:Qn(t.palette.action.active,t.palette.action.hoverOpacity)},"&:focus":{backgroundColor:Qn(t.palette.action.active,t.palette.action.hoverOpacity),["&.".concat(HR.selected)]:{willChange:"background-color",backgroundColor:t.palette.primary.dark}},["&.".concat(HR.selected)]:{color:t.palette.primary.contrastText,backgroundColor:t.palette.primary.main,fontWeight:t.typography.fontWeightMedium,transition:t.transitions.create("background-color",{duration:t.transitions.duration.short}),"&:hover":{willChange:"background-color",backgroundColor:t.palette.primary.dark}},["&.".concat(HR.disabled)]:{color:t.palette.text.disabled}},!n.disableMargin&&{margin:"0 ".concat(2,"px")},n.outsideCurrentMonth&&n.showDaysOutsideCurrentMonth&&{color:t.palette.text.secondary},!n.disableHighlightToday&&n.today&&{["&:not(.".concat(HR.selected,")")]:{border:"1px solid ".concat(t.palette.text.secondary)}})},VR=(e,t)=>{const{ownerState:n}=e;return[t.root,!n.disableMargin&&t.dayWithMargin,!n.disableHighlightToday&&n.today&&t.today,!n.outsideCurrentMonth&&n.showDaysOutsideCurrentMonth&&t.dayOutsideMonth,n.outsideCurrentMonth&&!n.showDaysOutsideCurrentMonth&&t.hiddenDaySpacingFiller]},GR=(0,Vn.Ay)(sh,{name:"MuiPickersDay",slot:"Root",overridesResolver:VR})(UR),qR=(0,Vn.Ay)("div",{name:"MuiPickersDay",slot:"Root",overridesResolver:VR})(e=>{let{theme:t,ownerState:n}=e;return(0,Ft.A)({},UR({theme:t,ownerState:n}),{opacity:0,pointerEvents:"none"})}),YR=()=>{},ZR=We.forwardRef(function(e,t){const n=FM({props:e,name:"MuiPickersDay"}),{autoFocus:r=!1,className:i,day:o,disabled:a=!1,disableHighlightToday:s=!1,disableMargin:l=!1,isAnimating:c,onClick:d,onDaySelect:u,onFocus:p=YR,onBlur:h=YR,onKeyDown:m=YR,onMouseDown:f,outsideCurrentMonth:g,selected:v=!1,showDaysOutsideCurrentMonth:x=!1,children:y,today:b=!1}=n,j=(0,nn.A)(n,WR),_=(0,Ft.A)({},n,{autoFocus:r,disabled:a,disableHighlightToday:s,disableMargin:l,selected:v,showDaysOutsideCurrentMonth:x,today:b}),C=(e=>{const{selected:t,disableMargin:n,disableHighlightToday:r,today:i,disabled:o,outsideCurrentMonth:a,showDaysOutsideCurrentMonth:s,classes:l}=e,c={root:["root",t&&"selected",o&&"disabled",!n&&"dayWithMargin",!r&&i&&"today",a&&s&&"dayOutsideMonth",a&&!s&&"hiddenDaySpacingFiller"],hiddenDaySpacingFiller:["hiddenDaySpacingFiller"]};return(0,ir.A)(c,zR,l)})(_),w=VM(),S=We.useRef(null),A=(0,Ln.A)(S,t);(0,hn.A)(()=>{!r||a||c||g||S.current.focus()},[r,a,c,g]);return g&&!x?(0,qt.jsx)(qR,{className:jn(C.root,C.hiddenDaySpacingFiller,i),ownerState:_,role:j.role}):(0,qt.jsx)(GR,(0,Ft.A)({className:jn(C.root,i),ownerState:_,ref:A,centerRipple:!0,disabled:a,tabIndex:v?0:-1,onKeyDown:e=>m(e,o),onFocus:e=>p(e,o),onBlur:e=>h(e,o),onClick:e=>{a||u(o,"finish"),g&&e.currentTarget.focus(),d&&d(e)},onMouseDown:e=>{f&&f(e),g&&e.preventDefault()}},j,{children:y||w.format(o,"dayOfMonth")}))}),KR=(e,t)=>e.autoFocus===t.autoFocus&&e.isAnimating===t.isAnimating&&e.today===t.today&&e.disabled===t.disabled&&e.selected===t.selected&&e.disableMargin===t.disableMargin&&e.showDaysOutsideCurrentMonth===t.showDaysOutsideCurrentMonth&&e.disableHighlightToday===t.disableHighlightToday&&e.className===t.className&&e.sx===t.sx&&e.outsideCurrentMonth===t.outsideCurrentMonth&&e.onFocus===t.onFocus&&e.onBlur===t.onBlur&&e.onDaySelect===t.onDaySelect,XR=We.memo(ZR,KR);function QR(e,t){return e.replace(new RegExp("(^|\\s)"+t+"(?:\\s|$)","g"),"$1").replace(/\s+/g," ").replace(/^\s*|\s*$/g,"")}var JR=function(e,t){return e&&t&&t.split(" ").forEach(function(t){return r=t,void((n=e).classList?n.classList.remove(r):"string"===typeof n.className?n.className=QR(n.className,r):n.setAttribute("class",QR(n.className&&n.className.baseVal||"",r)));var n,r})},eP=function(e){function t(){for(var t,n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return(t=e.call.apply(e,[this].concat(r))||this).appliedClasses={appear:{},enter:{},exit:{}},t.onEnter=function(e,n){var r=t.resolveArguments(e,n),i=r[0],o=r[1];t.removeClasses(i,"exit"),t.addClass(i,o?"appear":"enter","base"),t.props.onEnter&&t.props.onEnter(e,n)},t.onEntering=function(e,n){var r=t.resolveArguments(e,n),i=r[0],o=r[1]?"appear":"enter";t.addClass(i,o,"active"),t.props.onEntering&&t.props.onEntering(e,n)},t.onEntered=function(e,n){var r=t.resolveArguments(e,n),i=r[0],o=r[1]?"appear":"enter";t.removeClasses(i,o),t.addClass(i,o,"done"),t.props.onEntered&&t.props.onEntered(e,n)},t.onExit=function(e){var n=t.resolveArguments(e)[0];t.removeClasses(n,"appear"),t.removeClasses(n,"enter"),t.addClass(n,"exit","base"),t.props.onExit&&t.props.onExit(e)},t.onExiting=function(e){var n=t.resolveArguments(e)[0];t.addClass(n,"exit","active"),t.props.onExiting&&t.props.onExiting(e)},t.onExited=function(e){var n=t.resolveArguments(e)[0];t.removeClasses(n,"exit"),t.addClass(n,"exit","done"),t.props.onExited&&t.props.onExited(e)},t.resolveArguments=function(e,n){return t.props.nodeRef?[t.props.nodeRef.current,e]:[e,n]},t.getClassNames=function(e){var n=t.props.classNames,r="string"===typeof n,i=r?""+(r&&n?n+"-":"")+e:n[e];return{baseClassName:i,activeClassName:r?i+"-active":n[e+"Active"],doneClassName:r?i+"-done":n[e+"Done"]}},t}_n(t,e);var n=t.prototype;return n.addClass=function(e,t,n){var r=this.getClassNames(t)[n+"ClassName"],i=this.getClassNames("enter").doneClassName;"appear"===t&&"done"===n&&i&&(r+=" "+i),"active"===n&&e&&Sn(e),r&&(this.appliedClasses[t][n]=r,function(e,t){e&&t&&t.split(" ").forEach(function(t){return r=t,void((n=e).classList?n.classList.add(r):function(e,t){return e.classList?!!t&&e.classList.contains(t):-1!==(" "+(e.className.baseVal||e.className)+" ").indexOf(" "+t+" ")}(n,r)||("string"===typeof n.className?n.className=n.className+" "+r:n.setAttribute("class",(n.className&&n.className.baseVal||"")+" "+r)));var n,r})}(e,r))},n.removeClasses=function(e,t){var n=this.appliedClasses[t],r=n.base,i=n.active,o=n.done;this.appliedClasses[t]={},r&&JR(e,r),i&&JR(e,i),o&&JR(e,o)},n.render=function(){var e=this.props,t=(e.classNames,(0,nn.A)(e,["classNames"]));return We.createElement(Pn,(0,Ft.A)({},t,{onEnter:this.onEnter,onEntered:this.onEntered,onEntering:this.onEntering,onExit:this.onExit,onExiting:this.onExiting,onExited:this.onExited}))},t}(We.Component);eP.defaultProps={classNames:""},eP.propTypes={};const tP=eP,nP=e=>(0,sr.Ay)("PrivatePickersSlideTransition",e),rP=(0,ar.A)("PrivatePickersSlideTransition",["root","slideEnter-left","slideEnter-right","slideEnterActive","slideExit","slideExitActiveLeft-left","slideExitActiveLeft-right"]),iP=["children","className","reduceAnimations","slideDirection","transKey"],oP=(0,Vn.Ay)(Lp,{name:"PrivatePickersSlideTransition",slot:"Root",overridesResolver:(e,t)=>[t.root,{[".".concat(rP["slideEnter-left"])]:t["slideEnter-left"]},{[".".concat(rP["slideEnter-right"])]:t["slideEnter-right"]},{[".".concat(rP.slideEnterActive)]:t.slideEnterActive},{[".".concat(rP.slideExit)]:t.slideExit},{[".".concat(rP["slideExitActiveLeft-left"])]:t["slideExitActiveLeft-left"]},{[".".concat(rP["slideExitActiveLeft-right"])]:t["slideExitActiveLeft-right"]}]})(e=>{let{theme:t}=e;const n=t.transitions.create("transform",{duration:350,easing:"cubic-bezier(0.35, 0.8, 0.4, 1)"});return{display:"block",position:"relative",overflowX:"hidden","& > *":{position:"absolute",top:0,right:0,left:0},["& .".concat(rP["slideEnter-left"])]:{willChange:"transform",transform:"translate(100%)",zIndex:1},["& .".concat(rP["slideEnter-right"])]:{willChange:"transform",transform:"translate(-100%)",zIndex:1},["& .".concat(rP.slideEnterActive)]:{transform:"translate(0%)",transition:n},["& .".concat(rP.slideExit)]:{transform:"translate(0%)"},["& .".concat(rP["slideExitActiveLeft-left"])]:{willChange:"transform",transform:"translate(-100%)",transition:n,zIndex:0},["& .".concat(rP["slideExitActiveLeft-right"])]:{willChange:"transform",transform:"translate(100%)",transition:n,zIndex:0}}}),aP=e=>(0,sr.Ay)("MuiDayPicker",e),sP=((0,ar.A)("MuiDayPicker",["header","weekDayLabel","loadingContainer","slideTransition","monthContainer","weekContainer"]),e=>e.charAt(0).toUpperCase()),lP=(0,Vn.Ay)("div",{name:"MuiDayPicker",slot:"Header",overridesResolver:(e,t)=>t.header})({display:"flex",justifyContent:"center",alignItems:"center"}),cP=(0,Vn.Ay)(Cf,{name:"MuiDayPicker",slot:"WeekDayLabel",overridesResolver:(e,t)=>t.weekDayLabel})(e=>{let{theme:t}=e;return{width:36,height:40,margin:"0 2px",textAlign:"center",display:"flex",justifyContent:"center",alignItems:"center",color:t.palette.text.secondary}}),dP=(0,Vn.Ay)("div",{name:"MuiDayPicker",slot:"LoadingContainer",overridesResolver:(e,t)=>t.loadingContainer})({display:"flex",justifyContent:"center",alignItems:"center",minHeight:240}),uP=(0,Vn.Ay)(e=>{const{children:t,className:n,reduceAnimations:r,slideDirection:i,transKey:o}=e,a=(0,nn.A)(e,iP),s=(e=>{const{classes:t}=e;return(0,ir.A)({root:["root"]},nP,t)})(e);if(r)return(0,qt.jsx)("div",{className:jn(s.root,n),children:t});const l={exit:rP.slideExit,enterActive:rP.slideEnterActive,enter:rP["slideEnter-".concat(i)],exitActive:rP["slideExitActiveLeft-".concat(i)]};return(0,qt.jsx)(oP,{className:jn(s.root,n),childFactory:e=>We.cloneElement(e,{classNames:l}),role:"presentation",children:(0,qt.jsx)(tP,(0,Ft.A)({mountOnEnter:!0,unmountOnExit:!0,timeout:350,classNames:l},a,{children:t}),o)})},{name:"MuiDayPicker",slot:"SlideTransition",overridesResolver:(e,t)=>t.slideTransition})({minHeight:240}),pP=(0,Vn.Ay)("div",{name:"MuiDayPicker",slot:"MonthContainer",overridesResolver:(e,t)=>t.monthContainer})({overflow:"hidden"}),hP=(0,Vn.Ay)("div",{name:"MuiDayPicker",slot:"WeekContainer",overridesResolver:(e,t)=>t.weekContainer})({margin:"".concat(2,"px 0"),display:"flex",justifyContent:"center"});function mP(e){const t=YM(),n=VM(),r=FM({props:e,name:"MuiDayPicker"}),i=(e=>{const{classes:t}=e;return(0,ir.A)({header:["header"],weekDayLabel:["weekDayLabel"],loadingContainer:["loadingContainer"],slideTransition:["slideTransition"],monthContainer:["monthContainer"],weekContainer:["weekContainer"]},aP,t)})(r),{onFocusedDayChange:o,className:a,currentMonth:s,selectedDays:l,disabled:c,disableHighlightToday:d,focusedDay:u,isMonthSwitchingAnimating:p,loading:h,onSelectedDaysChange:m,onMonthSwitchingAnimationEnd:f,readOnly:g,reduceAnimations:v,renderDay:x,renderLoading:y=()=>(0,qt.jsx)("span",{children:"..."}),showDaysOutsideCurrentMonth:b,slideDirection:j,TransitionProps:_,disablePast:C,disableFuture:w,minDate:S,maxDate:A,shouldDisableDate:k,dayOfWeekFormatter:T=sP,hasFocus:E,onFocusedViewChange:M,gridLabelId:O}=r,R=DR({shouldDisableDate:k,minDate:S,maxDate:A,disablePast:C,disableFuture:w}),[P,D]=We.useState(()=>u||t),N=We.useCallback(e=>{M&&M(e)},[M]),L=We.useCallback(function(e){g||m(e,arguments.length>1&&void 0!==arguments[1]?arguments[1]:"finish")},[m,g]),I=We.useCallback(e=>{R(e)||(o(e),D(e),N(!0))},[R,o,N]),F=In();function $(e,t){switch(e.key){case"ArrowUp":I(n.addDays(t,-7)),e.preventDefault();break;case"ArrowDown":I(n.addDays(t,7)),e.preventDefault();break;case"ArrowLeft":{const r=n.addDays(t,"ltr"===F.direction?-1:1),i="ltr"===F.direction?n.getPreviousMonth(t):n.getNextMonth(t),o=ZM({utils:n,date:r,minDate:"ltr"===F.direction?n.startOfMonth(i):r,maxDate:"ltr"===F.direction?r:n.endOfMonth(i),isDateDisabled:R});I(o||r),e.preventDefault();break}case"ArrowRight":{const r=n.addDays(t,"ltr"===F.direction?1:-1),i="ltr"===F.direction?n.getNextMonth(t):n.getPreviousMonth(t),o=ZM({utils:n,date:r,minDate:"ltr"===F.direction?r:n.startOfMonth(i),maxDate:"ltr"===F.direction?n.endOfMonth(i):r,isDateDisabled:R});I(o||r),e.preventDefault();break}case"Home":I(n.startOfWeek(t)),e.preventDefault();break;case"End":I(n.endOfWeek(t)),e.preventDefault();break;case"PageUp":I(n.getNextMonth(t)),e.preventDefault();break;case"PageDown":I(n.getPreviousMonth(t)),e.preventDefault()}}function B(e,t){I(t)}function z(e,t){E&&n.isSameDay(P,t)&&N(!1)}const H=n.getMonth(s),W=l.filter(e=>!!e).map(e=>n.startOfDay(e)),U=H,V=We.useMemo(()=>We.createRef(),[U]),G=n.startOfWeek(t),q=We.useMemo(()=>{const e=n.startOfMonth(s),t=n.endOfMonth(s);return R(P)||n.isAfterDay(P,t)||n.isBeforeDay(P,e)?ZM({utils:n,date:P,minDate:e,maxDate:t,disablePast:C,disableFuture:w,isDateDisabled:R}):P},[s,w,C,P,R,n]);return(0,qt.jsxs)("div",{role:"grid","aria-labelledby":O,children:[(0,qt.jsx)(lP,{role:"row",className:i.header,children:n.getWeekdays().map((e,t)=>{var r;return(0,qt.jsx)(cP,{variant:"caption",role:"columnheader","aria-label":n.format(n.addDays(G,t),"weekday"),className:i.weekDayLabel,children:null!=(r=null==T?void 0:T(e))?r:e},e+t.toString())})}),h?(0,qt.jsx)(dP,{className:i.loadingContainer,children:y()}):(0,qt.jsx)(uP,(0,Ft.A)({transKey:U,onExited:f,reduceAnimations:v,slideDirection:j,className:jn(a,i.slideTransition)},_,{nodeRef:V,children:(0,qt.jsx)(pP,{ref:V,role:"rowgroup",className:i.monthContainer,children:n.getWeekArray(s).map(e=>(0,qt.jsx)(hP,{role:"row",className:i.weekContainer,children:e.map(e=>{const r=null!==q&&n.isSameDay(e,q),i=W.some(t=>n.isSameDay(t,e)),o=n.isSameDay(e,t),a={key:null==e?void 0:e.toString(),day:e,isAnimating:p,disabled:c||R(e),autoFocus:E&&r,today:o,outsideCurrentMonth:n.getMonth(e)!==H,selected:i,disableHighlightToday:d,showDaysOutsideCurrentMonth:b,onKeyDown:$,onFocus:B,onBlur:z,onDaySelect:L,tabIndex:r?0:-1,role:"gridcell","aria-selected":i};return o&&(a["aria-current"]="date"),x?x(e,W,a):(0,We.createElement)(XR,(0,Ft.A)({},a,{key:a.key}))})},"week-".concat(e[0])))})}))]})}const fP=e=>(0,sr.Ay)("MuiPickersCalendarHeader",e),gP=((0,ar.A)("MuiPickersCalendarHeader",["root","labelContainer","label","switchViewButton","switchViewIcon"]),(0,Vn.Ay)("div",{name:"MuiPickersCalendarHeader",slot:"Root",overridesResolver:(e,t)=>t.root})({display:"flex",alignItems:"center",marginTop:16,marginBottom:8,paddingLeft:24,paddingRight:12,maxHeight:30,minHeight:30})),vP=(0,Vn.Ay)("div",{name:"MuiPickersCalendarHeader",slot:"LabelContainer",overridesResolver:(e,t)=>t.labelContainer})(e=>{let{theme:t}=e;return(0,Ft.A)({display:"flex",maxHeight:30,overflow:"hidden",alignItems:"center",cursor:"pointer",marginRight:"auto"},t.typography.body1,{fontWeight:t.typography.fontWeightMedium})}),xP=(0,Vn.Ay)("div",{name:"MuiPickersCalendarHeader",slot:"Label",overridesResolver:(e,t)=>t.label})({marginRight:6}),yP=(0,Vn.Ay)(wh,{name:"MuiPickersCalendarHeader",slot:"SwitchViewButton",overridesResolver:(e,t)=>t.switchViewButton})({marginRight:"auto"}),bP=(0,Vn.Ay)(nO,{name:"MuiPickersCalendarHeader",slot:"SwitchViewIcon",overridesResolver:(e,t)=>t.switchViewIcon})(e=>{let{theme:t,ownerState:n}=e;return(0,Ft.A)({willChange:"transform",transition:t.transitions.create("transform"),transform:"rotate(0deg)"},"year"===n.openView&&{transform:"rotate(180deg)"})}),jP=()=>{};function _P(e){const t=FM({props:e,name:"MuiPickersCalendarHeader"}),{components:n={},componentsProps:r={},currentMonth:i,disabled:o,disableFuture:a,disablePast:s,getViewSwitchingButtonText:l,leftArrowButtonText:c,maxDate:d,minDate:u,onMonthChange:p,onViewChange:h,openView:m,reduceAnimations:f,rightArrowButtonText:g,views:v,labelId:x}=t;jP({leftArrowButtonText:c,rightArrowButtonText:g,getViewSwitchingButtonText:l});const y=qM(),b=null!=c?c:y.previousMonth,j=null!=g?g:y.nextMonth,_=null!=l?l:y.calendarViewSwitchingButtonAriaLabel,C=VM(),w=(e=>{const{classes:t}=e;return(0,ir.A)({root:["root"],labelContainer:["labelContainer"],label:["label"],switchViewButton:["switchViewButton"],switchViewIcon:["switchViewIcon"]},fP,t)})(t),S=r.switchViewButton||{},A=function(e,t){let{disableFuture:n,maxDate:r}=t;const i=VM();return We.useMemo(()=>{const t=i.date(),o=i.startOfMonth(n&&i.isBefore(t,r)?t:r);return!i.isAfter(o,e)},[n,r,e,i])}(i,{disableFuture:a,maxDate:d}),k=function(e,t){let{disablePast:n,minDate:r}=t;const i=VM();return We.useMemo(()=>{const t=i.date(),o=i.startOfMonth(n&&i.isAfter(t,r)?t:r);return!i.isBefore(o,e)},[n,r,e,i])}(i,{disablePast:s,minDate:u});if(1===v.length&&"year"===v[0])return null;const T=t;return(0,qt.jsxs)(gP,{ownerState:T,className:w.root,children:[(0,qt.jsxs)(vP,{role:"presentation",onClick:()=>{if(1!==v.length&&h&&!o)if(2===v.length)h(v.find(e=>e!==m)||v[0]);else{const e=0!==v.indexOf(m)?0:1;h(v[e])}},ownerState:T,"aria-live":"polite",className:w.labelContainer,children:[(0,qt.jsx)(BR,{reduceAnimations:f,transKey:C.format(i,"monthAndYear"),children:(0,qt.jsx)(xP,{id:x,ownerState:T,className:w.label,children:C.format(i,"monthAndYear")})}),v.length>1&&!o&&(0,qt.jsx)(yP,(0,Ft.A)({size:"small",as:n.SwitchViewButton,"aria-label":_(m),className:w.switchViewButton},S,{children:(0,qt.jsx)(bP,{as:n.SwitchViewIcon,ownerState:T,className:w.switchViewIcon})}))]}),(0,qt.jsx)(hm,{in:"day"===m,children:(0,qt.jsx)(uR,{leftArrowButtonText:b,rightArrowButtonText:j,components:n,componentsProps:r,onLeftClick:()=>p(C.getPreviousMonth(i),"right"),onRightClick:()=>p(C.getNextMonth(i),"left"),isLeftDisabled:k,isRightDisabled:A})})]})}function CP(e){return(0,sr.Ay)("PrivatePickersYear",e)}const wP=(0,ar.A)("PrivatePickersYear",["root","modeDesktop","modeMobile","yearButton","selected","disabled"]),SP=["autoFocus","className","children","disabled","onClick","onKeyDown","value","tabIndex","onFocus","onBlur"],AP=(0,Vn.Ay)("div",{name:"PrivatePickersYear",slot:"Root",overridesResolver:(e,t)=>[t.root,{["&.".concat(wP.modeDesktop)]:t.modeDesktop},{["&.".concat(wP.modeMobile)]:t.modeMobile}]})(e=>{let{ownerState:t}=e;return(0,Ft.A)({flexBasis:"33.3%",display:"flex",alignItems:"center",justifyContent:"center"},"desktop"===(null==t?void 0:t.wrapperVariant)&&{flexBasis:"25%"})}),kP=(0,Vn.Ay)("button",{name:"PrivatePickersYear",slot:"Button",overridesResolver:(e,t)=>[t.button,{["&.".concat(wP.disabled)]:t.disabled},{["&.".concat(wP.selected)]:t.selected}]})(e=>{let{theme:t}=e;return(0,Ft.A)({color:"unset",backgroundColor:"transparent",border:0,outline:0},t.typography.subtitle1,{margin:"8px 0",height:36,width:72,borderRadius:18,cursor:"pointer","&:focus, &:hover":{backgroundColor:Qn(t.palette.action.active,t.palette.action.hoverOpacity)},["&.".concat(wP.disabled)]:{color:t.palette.text.secondary},["&.".concat(wP.selected)]:{color:t.palette.primary.contrastText,backgroundColor:t.palette.primary.main,"&:focus, &:hover":{backgroundColor:t.palette.primary.dark}}})}),TP=()=>{},EP=We.forwardRef(function(e,t){const{autoFocus:n,className:r,children:i,disabled:o,onClick:a,onKeyDown:s,value:l,tabIndex:c,onFocus:d=TP,onBlur:u=TP}=e,p=(0,nn.A)(e,SP),h=We.useRef(null),m=(0,Ln.A)(h,t),f=We.useContext(bO),g=(0,Ft.A)({},e,{wrapperVariant:f}),v=(e=>{const{wrapperVariant:t,disabled:n,selected:r,classes:i}=e,o={root:["root",t&&"mode".concat((0,pp.A)(t))],yearButton:["yearButton",n&&"disabled",r&&"selected"]};return(0,ir.A)(o,CP,i)})(g);return We.useEffect(()=>{n&&h.current.focus()},[n]),(0,qt.jsx)(AP,{className:jn(v.root,r),ownerState:g,children:(0,qt.jsx)(kP,(0,Ft.A)({ref:m,disabled:o,type:"button",tabIndex:o?-1:c,onClick:e=>a(e,l),onKeyDown:e=>s(e,l),onFocus:e=>d(e,l),onBlur:e=>u(e,l),className:v.yearButton,ownerState:g},p,{children:i}))})});function MP(e){return(0,sr.Ay)("MuiYearPicker",e)}(0,ar.A)("MuiYearPicker",["root"]);const OP=(0,Vn.Ay)("div",{name:"MuiYearPicker",slot:"Root",overridesResolver:(e,t)=>t.root})({display:"flex",flexDirection:"row",flexWrap:"wrap",overflowY:"auto",height:"100%",padding:"0 4px",maxHeight:"304px"}),RP=We.forwardRef(function(e,t){const n=YM(),r=In(),i=VM(),o=function(e,t){const n=VM(),r=GM(),i=FM({props:e,name:t});return(0,Ft.A)({disablePast:!1,disableFuture:!1},i,{minDate:XM(n,i.minDate,r.minDate),maxDate:XM(n,i.maxDate,r.maxDate)})}(e,"MuiYearPicker"),{autoFocus:a,className:s,date:l,disabled:c,disableFuture:d,disablePast:u,maxDate:p,minDate:h,onChange:m,readOnly:f,shouldDisableYear:g,disableHighlightToday:v,onYearFocus:x,hasFocus:y,onFocusedViewChange:b}=o,j=o,_=(e=>{const{classes:t}=e;return(0,ir.A)({root:["root"]},MP,t)})(j),C=We.useMemo(()=>null!=l?l:i.startOfYear(n),[n,i,l]),w=We.useMemo(()=>null!=l?i.getYear(l):v?null:i.getYear(n),[n,l,i,v]),S=We.useContext(bO),A=We.useRef(null),[k,T]=We.useState(()=>w||i.getYear(n)),[E,M]=(0,sb.A)({name:"YearPicker",state:"hasFocus",controlled:y,default:a}),O=We.useCallback(e=>{M(e),b&&b(e)},[M,b]),R=We.useCallback(e=>!(!u||!i.isBeforeYear(e,n))||(!(!d||!i.isAfterYear(e,n))||(!(!h||!i.isBeforeYear(e,h))||(!(!p||!i.isAfterYear(e,p))||!(!g||!g(e))))),[d,u,p,h,n,g,i]),P=function(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"finish";if(f)return;const r=i.setYear(C,t);m(r,n)},D=We.useCallback(e=>{R(i.setYear(C,e))||(T(e),O(!0),null==x||x(e))},[R,i,C,O,x]);We.useEffect(()=>{T(e=>null!==w&&e!==w?w:e)},[w]);const N="desktop"===S?4:3,L=We.useCallback((e,t)=>{switch(e.key){case"ArrowUp":D(t-N),e.preventDefault();break;case"ArrowDown":D(t+N),e.preventDefault();break;case"ArrowLeft":D(t+("ltr"===r.direction?-1:1)),e.preventDefault();break;case"ArrowRight":D(t+("ltr"===r.direction?1:-1)),e.preventDefault()}},[D,r.direction,N]),I=We.useCallback((e,t)=>{D(t)},[D]),F=We.useCallback((e,t)=>{k===t&&O(!1)},[k,O]),$=i.getYear(n),B=We.useRef(null),z=(0,Ln.A)(t,B);return We.useEffect(()=>{if(a||null===B.current)return;const e=B.current.querySelector('[tabindex="0"]');if(!e)return;const t=e.offsetHeight,n=e.offsetTop,r=B.current.clientHeight,i=B.current.scrollTop,o=n+t;t>r||n<i||(B.current.scrollTop=o-r/2-t/2)},[a]),(0,qt.jsx)(OP,{ref:z,className:jn(_.root,s),ownerState:j,children:i.getYearRange(h,p).map(e=>{const t=i.getYear(e),n=t===w;return(0,qt.jsx)(EP,{selected:n,value:t,onClick:P,onKeyDown:L,autoFocus:E&&t===k,ref:n?A:void 0,disabled:c||R(e),tabIndex:t===k?0:-1,onFocus:I,onBlur:F,"aria-current":$===t?"date":void 0,children:i.format(e,"year")},i.format(e,"year"))})})}),PP="undefined"!==typeof navigator&&/(android)/i.test(navigator.userAgent),DP=e=>(0,sr.Ay)("MuiCalendarPicker",e),NP=((0,ar.A)("MuiCalendarPicker",["root","viewTransitionContainer"]),["autoFocus","onViewChange","date","disableFuture","disablePast","defaultCalendarMonth","onChange","onYearChange","onMonthChange","reduceAnimations","shouldDisableDate","shouldDisableMonth","shouldDisableYear","view","views","openTo","className","disabled","readOnly","minDate","maxDate","disableHighlightToday","focusedView","onFocusedViewChange","classes"]);const LP=(0,Vn.Ay)(vR,{name:"MuiCalendarPicker",slot:"Root",overridesResolver:(e,t)=>t.root})({display:"flex",flexDirection:"column"}),IP=(0,Vn.Ay)(BR,{name:"MuiCalendarPicker",slot:"ViewTransitionContainer",overridesResolver:(e,t)=>t.viewTransitionContainer})({}),FP=We.forwardRef(function(e,t){const n=VM(),r=(0,qx.A)(),i=function(e,t){const n=VM(),r=GM(),i=FM({props:e,name:t});return(0,Ft.A)({loading:!1,disablePast:!1,disableFuture:!1,openTo:"day",views:["year","day"],reduceAnimations:PP,renderLoading:()=>(0,qt.jsx)("span",{children:"..."})},i,{minDate:XM(n,i.minDate,r.minDate),maxDate:XM(n,i.maxDate,r.maxDate)})}(e,"MuiCalendarPicker"),{autoFocus:o,onViewChange:a,date:s,disableFuture:l,disablePast:c,defaultCalendarMonth:d,onChange:u,onYearChange:p,onMonthChange:h,reduceAnimations:m,shouldDisableDate:f,shouldDisableMonth:g,shouldDisableYear:v,view:x,views:y,openTo:b,className:j,disabled:_,readOnly:C,minDate:w,maxDate:S,disableHighlightToday:A,focusedView:k,onFocusedViewChange:T}=i,E=(0,nn.A)(i,NP),{openView:M,setOpenView:O,openNext:R}=RO({view:x,views:y,openTo:b,onChange:u,onViewChange:a}),{calendarState:P,changeFocusedDay:D,changeMonth:N,handleChangeMonth:L,isDateDisabled:I,onMonthSwitchingAnimationEnd:F}=IR({date:s,defaultCalendarMonth:d,reduceAnimations:m,onMonthChange:h,minDate:w,maxDate:S,shouldDisableDate:f,disablePast:c,disableFuture:l}),$=We.useCallback((e,t)=>{const r=n.startOfMonth(e),i=n.endOfMonth(e),o=I(e)?ZM({utils:n,date:e,minDate:n.isBefore(w,r)?r:w,maxDate:n.isAfter(S,i)?i:S,disablePast:c,disableFuture:l,isDateDisabled:I}):e;o?(u(o,t),null==h||h(r)):(R(),N(r)),D(o,!0)},[D,l,c,I,S,w,u,h,N,R,n]),B=We.useCallback((e,t)=>{const r=n.startOfYear(e),i=n.endOfYear(e),o=I(e)?ZM({utils:n,date:e,minDate:n.isBefore(w,r)?r:w,maxDate:n.isAfter(S,i)?i:S,disablePast:c,disableFuture:l,isDateDisabled:I}):e;o?(u(o,t),null==p||p(o)):(R(),N(r)),D(o,!0)},[D,l,c,I,S,w,u,p,R,n,N]),z=We.useCallback((e,t)=>u(s&&e?n.mergeDateAndTime(e,s):e,t),[n,s,u]);We.useEffect(()=>{s&&N(s)},[s]);const H=i,W=(e=>{const{classes:t}=e;return(0,ir.A)({root:["root"],viewTransitionContainer:["viewTransitionContainer"]},DP,t)})(H),U={disablePast:c,disableFuture:l,maxDate:S,minDate:w},V=_&&s||w,G=_&&s||S,q={disableHighlightToday:A,readOnly:C,disabled:_},Y="".concat(r,"-grid-label"),[Z,K]=(0,Yx.A)({name:"DayPicker",state:"focusedView",controlled:k,default:o?M:null}),X=null!==Z,Q=(0,Tp.A)(e=>t=>{T?T(e)(t):K(t?e:t=>t===e?null:t)}),J=We.useRef(M);return We.useEffect(()=>{J.current!==M&&(J.current=M,Q(M)(!0))},[M,Q]),(0,qt.jsxs)(LP,{ref:t,className:jn(W.root,j),ownerState:H,children:[(0,qt.jsx)(_P,(0,Ft.A)({},E,{views:y,openView:M,currentMonth:P.currentMonth,onViewChange:O,onMonthChange:(e,t)=>L({newMonth:e,direction:t}),minDate:V,maxDate:G,disabled:_,disablePast:c,disableFuture:l,reduceAnimations:m,labelId:Y})),(0,qt.jsx)(IP,{reduceAnimations:m,className:W.viewTransitionContainer,transKey:M,ownerState:H,children:(0,qt.jsxs)("div",{children:["year"===M&&(0,qt.jsx)(RP,(0,Ft.A)({},E,U,q,{autoFocus:o,date:s,onChange:B,shouldDisableYear:v,hasFocus:X,onFocusedViewChange:Q("year")})),"month"===M&&(0,qt.jsx)(OR,(0,Ft.A)({},U,q,{autoFocus:o,hasFocus:X,className:j,date:s,onChange:$,shouldDisableMonth:g,onFocusedViewChange:Q("month")})),"day"===M&&(0,qt.jsx)(mP,(0,Ft.A)({},E,P,U,q,{autoFocus:o,onMonthSwitchingAnimationEnd:F,onFocusedDayChange:D,reduceAnimations:m,selectedDays:[s],onSelectedDaysChange:z,shouldDisableDate:f,hasFocus:X,onFocusedViewChange:Q("day"),gridLabelId:Y}))]})})]})}),$P=e=>{const[,t]=(0,We.useReducer)(e=>e+1,0),n=(0,We.useRef)(null),{replace:r,append:i}=e,o=r?r(e.format(e.value)):e.format(e.value),a=(0,We.useRef)(!1);return(0,We.useLayoutEffect)(()=>{if(null==n.current)return;let[a,s,l,c,d]=n.current;n.current=null;const u=c&&d,p=a.slice(s.selectionStart).search(e.accept||/\d/g),h=-1!==p?p:0,m=t=>(t.match(e.accept||/\d/g)||[]).join(""),f=m(a.substr(0,s.selectionStart)),g=e=>{let t=0,n=0;for(let r=0;r!==f.length;++r){let i=e.indexOf(f[r],t)+1,o=m(e).indexOf(f[r],n)+1;o-n>1&&(i=t,o=n),n=Math.max(o,n),t=Math.max(t,i)}return t};if(!0===e.mask&&l&&!d){let e=g(a);const t=m(a.substr(e))[0];e=a.indexOf(t,e),a="".concat(a.substr(0,e)).concat(a.substr(e+1))}let v=e.format(a);null==i||s.selectionStart!==a.length||d||(l?v=i(v):""===m(v.slice(-1))&&(v=v.slice(0,-1)));const x=r?r(v):v;return o===x?t():e.onChange(x),()=>{let t=g(v);if(null!=e.mask&&(l||c&&!u))for(;v[t]&&""===m(v[t]);)t+=1;s.selectionStart=s.selectionEnd=t+(u?1+h:0)}}),(0,We.useEffect)(()=>{const e=e=>{"Delete"===e.code&&(a.current=!0)},t=e=>{"Delete"===e.code&&(a.current=!1)};return document.addEventListener("keydown",e),document.addEventListener("keyup",t),()=>{document.removeEventListener("keydown",e),document.removeEventListener("keyup",t)}},[]),{value:null!=n.current?n.current[0]:o,onChange:r=>{const i=r.target.value;n.current=[i,r.target,i.length>o.length,a.current,o===e.format(i)],t()}}},BP=(e,t,n)=>{const r=e.date(t);return null===t?"":e.isValid(r)?e.formatByString(r,n):""},zP="_",HP="2019-11-21T22:30:00.000",WP="2019-01-01T09:00:00.000";function UP(e,t,n,r){if(!e)return!1;const i=r.formatByString(r.date(WP),t).replace(n,zP),o=r.formatByString(r.date(HP),t).replace(n,"_"),a=o===i&&e===o;return!a&&r.lib,a}const VP=e=>{let{acceptRegex:t=/[\d]/gi,disabled:n,disableMaskedInput:r,ignoreInvalidInputs:i,inputFormat:o,inputProps:a,label:s,mask:l,onChange:c,rawValue:d,readOnly:u,rifmFormatter:p,TextFieldProps:h,validationError:m}=e;const f=VM(),g=f.getFormatHelperText(o),{shouldUseMaskedInput:v,maskToUse:x}=We.useMemo(()=>{if(r)return{shouldUseMaskedInput:!1,maskToUse:""};const e=function(e,t,n,r){if(e)return e;const i=r.formatByString(r.date(WP),t).replace(n,zP);return i===r.formatByString(r.date(HP),t).replace(n,"_")?i:""}(l,o,t,f);return{shouldUseMaskedInput:UP(e,o,t,f),maskToUse:e}},[t,r,o,l,f]),y=We.useMemo(()=>v&&x?((e,t)=>n=>{let r=0;return n.split("").map((i,o)=>{if(t.lastIndex=0,r>e.length-1)return"";const a=e[r],s=e[r+1],l=t.test(i)?i:"",c=a===zP?l:a+l;return r+=c.length,o===n.length-1&&s&&s!==zP?c?c+s:"":c}).join("")})(x,t):e=>e,[t,x,v]),b=null===d?null:f.date(d),[j,_]=We.useState(b),[C,w]=We.useState(BP(f,d,o)),S=We.useRef(),A=We.useRef(f.locale),k=We.useRef(o);We.useEffect(()=>{const e=d!==S.current,t=f.locale!==A.current,n=o!==k.current;if(S.current=d,A.current=f.locale,k.current=o,!e&&!t&&!n)return;const r=null===d?null:f.date(d),i=null===d||f.isValid(r);let a=null===j&&null===r;if(null!==j&&null!==r){const e=f.isEqual(j,r);if(e)a=!0;else{const t=Math.abs(f.getDiff(j,r));a=0===t?e:t<1e3}}if(!t&&!n&&(!i||a))return;const s=BP(f,d,o);_(r),w(s)},[f,d,o,j]);const T=e=>{const t=""===e||e===l?"":e;w(t);const n=null===t?null:f.parse(t,o);i&&!f.isValid(n)||(_(n),c(n,t||void 0))},E=$P({value:C,onChange:T,format:p||y}),M=v?E:{value:C,onChange:e=>{T(e.currentTarget.value)}};return(0,Ft.A)({label:s,disabled:n,error:m,inputProps:(0,Ft.A)({},M,{disabled:n,placeholder:g,readOnly:u,type:v?"tel":"text"},a)},h)},GP=["className","components","disableOpenPicker","getOpenDialogAriaText","InputAdornmentProps","InputProps","inputRef","openPicker","OpenPickerButtonProps","renderInput"],qP=We.forwardRef(function(e,t){const{className:n,components:r={},disableOpenPicker:i,getOpenDialogAriaText:o,InputAdornmentProps:a,InputProps:s,inputRef:l,openPicker:c,OpenPickerButtonProps:d,renderInput:u}=e,p=(0,nn.A)(e,GP),h=qM(),m=null!=o?o:h.openDatePickerDialogue,f=VM(),g=VP(p),v=(null==a?void 0:a.position)||"end",x=r.OpenPickerIcon||oO;return u((0,Ft.A)({ref:t,inputRef:l,className:n},g,{InputProps:(0,Ft.A)({},s,{["".concat(v,"Adornment")]:i?void 0:(0,qt.jsx)(tw,(0,Ft.A)({position:v},a,{children:(0,qt.jsx)(wh,(0,Ft.A)({edge:v,disabled:p.disabled||p.readOnly,"aria-label":m(p.rawValue,f)},d,{onClick:c,children:(0,qt.jsx)(x,{})}))}))})}))});function YP(){return"undefined"===typeof window?"portrait":window.screen&&window.screen.orientation&&window.screen.orientation.angle?90===Math.abs(window.screen.orientation.angle)?"landscape":"portrait":window.orientation&&90===Math.abs(Number(window.orientation))?"landscape":"portrait"}function ZP(e){return(0,sr.Ay)("MuiCalendarOrClockPicker",e)}(0,ar.A)("MuiCalendarOrClockPicker",["root","mobileKeyboardInputView"]);const KP=["autoFocus","className","parsedValue","DateInputProps","isMobileKeyboardViewOpen","onDateChange","onViewChange","openTo","orientation","showToolbar","toggleMobileKeyboardView","ToolbarComponent","toolbarFormat","toolbarPlaceholder","toolbarTitle","views","dateRangeIcon","timeIcon","hideTabs","classes"],XP=(0,Vn.Ay)("div",{name:"MuiCalendarOrClockPicker",slot:"MobileKeyboardInputView",overridesResolver:(e,t)=>t.mobileKeyboardInputView})({padding:"16px 24px"}),QP=(0,Vn.Ay)("div",{name:"MuiCalendarOrClockPicker",slot:"Root",overridesResolver:(e,t)=>t.root})(e=>{let{ownerState:t}=e;return(0,Ft.A)({display:"flex",flexDirection:"column"},t.isLandscape&&{flexDirection:"row"})}),JP={fullWidth:!0},eD=e=>"year"===e||"month"===e||"day"===e,tD=e=>"hours"===e||"minutes"===e||"seconds"===e;function nD(e){var t,n;const r=FM({props:e,name:"MuiCalendarOrClockPicker"}),{autoFocus:i,parsedValue:o,DateInputProps:a,isMobileKeyboardViewOpen:s,onDateChange:l,onViewChange:c,openTo:d,orientation:u,showToolbar:p,toggleMobileKeyboardView:h,ToolbarComponent:m=()=>null,toolbarFormat:f,toolbarPlaceholder:g,toolbarTitle:v,views:x,dateRangeIcon:y,timeIcon:b,hideTabs:j}=r,_=(0,nn.A)(r,KP),C=null==(t=_.components)?void 0:t.Tabs,w=((e,t)=>{const[n,r]=We.useState(YP);return(0,hn.A)(()=>{const e=()=>{r(YP())};return window.addEventListener("orientationchange",e),()=>{window.removeEventListener("orientationchange",e)}},[]),!wO(e,["hours","minutes","seconds"])&&"landscape"===(t||n)})(x,u),S=We.useContext(bO),A=(e=>{const{classes:t}=e;return(0,ir.A)({root:["root"],mobileKeyboardInputView:["mobileKeyboardInputView"]},ZP,t)})(r),k=null!=p?p:"desktop"!==S,T=!j&&"undefined"!==typeof window&&window.innerHeight>667,E=We.useCallback((e,t)=>{l(e,S,t)},[l,S]),M=We.useCallback(e=>{s&&h(),c&&c(e)},[s,c,h]);const{openView:O,setOpenView:R,handleChangeAndOpenNext:P}=RO({view:void 0,views:x,openTo:d,onChange:E,onViewChange:M}),{focusedView:D,setFocusedView:N}=(e=>{let{autoFocus:t,openView:n}=e;const[r,i]=We.useState(t?n:null);return{focusedView:r,setFocusedView:We.useCallback(e=>t=>{i(t?e:t=>e===t?null:t)},[])}})({autoFocus:i,openView:O});return(0,qt.jsxs)(QP,{ownerState:{isLandscape:w},className:A.root,children:[k&&(0,qt.jsx)(m,(0,Ft.A)({},_,{views:x,isLandscape:w,parsedValue:o,onChange:E,setOpenView:R,openView:O,toolbarTitle:v,toolbarFormat:f,toolbarPlaceholder:g,isMobileKeyboardViewOpen:s,toggleMobileKeyboardView:h})),T&&!!C&&(0,qt.jsx)(C,(0,Ft.A)({dateRangeIcon:y,timeIcon:b,view:O,onChange:R},null==(n=_.componentsProps)?void 0:n.tabs)),(0,qt.jsx)(vR,{children:s?(0,qt.jsx)(XP,{className:A.mobileKeyboardInputView,children:(0,qt.jsx)(qP,(0,Ft.A)({},a,{ignoreInvalidInputs:!0,disableOpenPicker:!0,TextFieldProps:JP}))}):(0,qt.jsxs)(We.Fragment,{children:[eD(O)&&(0,qt.jsx)(FP,(0,Ft.A)({autoFocus:i,date:o,onViewChange:R,onChange:P,view:O,views:x.filter(eD),focusedView:D,onFocusedViewChange:N},_)),tD(O)&&(0,qt.jsx)(jR,(0,Ft.A)({},_,{autoFocus:i,date:o,view:O,views:x.filter(tD),onChange:P,onViewChange:R,showViewSwitcher:"desktop"===S}))]})})]})}const rD=(e,t)=>{const{onAccept:n,onChange:r,value:i,closeOnSelect:o}=e,a=VM(),{isOpen:s,setIsOpen:l}=(e=>{let{open:t,onOpen:n,onClose:r}=e;const i=We.useRef("boolean"===typeof t).current,[o,a]=We.useState(!1);return We.useEffect(()=>{if(i){if("boolean"!==typeof t)throw new Error("You must not mix controlling and uncontrolled mode for `open` prop");a(t)}},[i,t]),{isOpen:o,setIsOpen:We.useCallback(e=>{i||a(e),e&&n&&n(),!e&&r&&r()},[i,n,r])}})(e),c=We.useMemo(()=>t.parseInput(a,i),[t,a,i]),[d,u]=We.useState(c),[p,h]=We.useState(()=>({committed:c,draft:c,resetFallback:c})),m=We.useCallback(e=>{h(t=>{switch(e.action){case"setAll":case"acceptAndClose":return{draft:e.value,committed:e.value,resetFallback:e.value};case"setCommitted":return(0,Ft.A)({},t,{draft:e.value,committed:e.value});case"setDraft":return(0,Ft.A)({},t,{draft:e.value});default:return t}}),(e.forceOnChangeCall||!e.skipOnChangeCall&&!t.areValuesEqual(a,p.committed,e.value))&&r(e.value),"acceptAndClose"===e.action&&(l(!1),n&&!t.areValuesEqual(a,p.resetFallback,e.value)&&n(e.value))},[n,r,l,p,a,t]);We.useEffect(()=>{a.isValid(c)&&u(c)},[a,c]),We.useEffect(()=>{s&&m({action:"setAll",value:c,skipOnChangeCall:!0})},[s]),t.areValuesEqual(a,p.committed,c)||m({action:"setCommitted",value:c,skipOnChangeCall:!0});const f=We.useMemo(()=>({open:s,onClear:()=>{m({value:t.emptyValue,action:"acceptAndClose",forceOnChangeCall:!t.areValuesEqual(a,i,t.emptyValue)})},onAccept:()=>{m({value:p.draft,action:"acceptAndClose",forceOnChangeCall:!t.areValuesEqual(a,i,c)})},onDismiss:()=>{m({value:p.committed,action:"acceptAndClose"})},onCancel:()=>{m({value:p.resetFallback,action:"acceptAndClose"})},onSetToday:()=>{m({value:t.getTodayValue(a),action:"acceptAndClose"})}}),[m,s,a,p,t,i,c]),[g,v]=We.useState(!1),x=We.useMemo(()=>({parsedValue:p.draft,isMobileKeyboardViewOpen:g,toggleMobileKeyboardView:()=>v(!g),onDateChange:function(e,t){switch(arguments.length>2&&void 0!==arguments[2]?arguments[2]:"partial"){case"shallow":return m({action:"setDraft",value:e,skipOnChangeCall:!0});case"partial":return m({action:"setDraft",value:e});case"finish":return m((null!=o?o:"desktop"===t)?{value:e,action:"acceptAndClose"}:{value:e,action:"setCommitted"});default:throw new Error("MUI: Invalid selectionState passed to `onDateChange`")}}}),[m,g,p.draft,o]),y=We.useCallback((e,n)=>{const i=t.valueReducer?t.valueReducer(a,d,e):e;r(i,n)},[r,t,d,a]),b={pickerProps:x,inputProps:We.useMemo(()=>({onChange:y,open:s,rawValue:i,openPicker:()=>l(!0)}),[y,s,i,l]),wrapperProps:f};return We.useDebugValue(b,()=>({MuiPickerState:{dateState:p,other:b}})),b},iD=["onChange","PopperProps","PaperProps","ToolbarComponent","TransitionComponent","value","components","componentsProps"],oD=We.forwardRef(function(e,t){const n=eO(e,"MuiDesktopDatePicker"),r=null!==LR(n),{pickerProps:i,inputProps:o,wrapperProps:a}=rD(n,tO),{PopperProps:s,PaperProps:l,ToolbarComponent:c=yO,TransitionComponent:d,components:u,componentsProps:p}=n,h=(0,nn.A)(n,iD),m=(0,Ft.A)({},o,h,{components:u,componentsProps:p,ref:t,validationError:r});return(0,qt.jsx)(OO,(0,Ft.A)({},a,{DateInputProps:m,KeyboardDateInputComponent:qP,PopperProps:s,PaperProps:l,TransitionComponent:d,components:u,componentsProps:p,children:(0,qt.jsx)(nD,(0,Ft.A)({},i,{autoFocus:!0,toolbarTitle:n.label||n.toolbarTitle,ToolbarComponent:c,DateInputProps:m,components:u,componentsProps:p},h))}))}),aD=(0,Vn.Ay)(cC)({["& .".concat(tC.container)]:{outline:0},["& .".concat(tC.paper)]:{outline:0,minWidth:320}}),sD=(0,Vn.Ay)(bC)({"&:first-of-type":{padding:0}}),lD=e=>{var t;const{children:n,DialogProps:r={},onAccept:i,onClear:o,onDismiss:a,onCancel:s,onSetToday:l,open:c,components:d,componentsProps:u}=e,p=null!=(t=null==d?void 0:d.ActionBar)?t:_O;return(0,qt.jsxs)(aD,(0,Ft.A)({open:c,onClose:a},r,{children:[(0,qt.jsx)(sD,{children:n}),(0,qt.jsx)(p,(0,Ft.A)({onAccept:i,onClear:o,onCancel:s,onSetToday:l,actions:["cancel","accept"]},null==u?void 0:u.actionBar))]}))},cD=["children","DateInputProps","DialogProps","onAccept","onClear","onDismiss","onCancel","onSetToday","open","PureDateInputComponent","components","componentsProps"];function dD(e){const{children:t,DateInputProps:n,DialogProps:r,onAccept:i,onClear:o,onDismiss:a,onCancel:s,onSetToday:l,open:c,PureDateInputComponent:d,components:u,componentsProps:p}=e,h=(0,nn.A)(e,cD);return(0,qt.jsxs)(bO.Provider,{value:"mobile",children:[(0,qt.jsx)(d,(0,Ft.A)({components:u},h,n)),(0,qt.jsx)(lD,{DialogProps:r,onAccept:i,onClear:o,onDismiss:a,onCancel:s,onSetToday:l,open:c,components:u,componentsProps:p,children:t})]})}const uD=We.forwardRef(function(e,t){const{disabled:n,getOpenDialogAriaText:r,inputFormat:i,InputProps:o,inputRef:a,label:s,openPicker:l,rawValue:c,renderInput:d,TextFieldProps:u={},validationError:p,className:h}=e,m=qM(),f=null!=r?r:m.openDatePickerDialogue,g=VM(),v=We.useMemo(()=>(0,Ft.A)({},o,{readOnly:!0}),[o]),x=BP(g,c,i),y=(0,Tp.A)(e=>{e.stopPropagation(),l()});return d((0,Ft.A)({label:s,disabled:n,ref:t,inputRef:a,error:p,InputProps:v,className:h},!e.readOnly&&!e.disabled&&{onClick:y},{inputProps:(0,Ft.A)({disabled:n,readOnly:!0,"aria-readonly":!0,"aria-label":f(c,g),value:x},!e.readOnly&&{onClick:y},{onKeyDown:SO(l)})},u))}),pD=["ToolbarComponent","value","onChange","components","componentsProps"],hD=We.forwardRef(function(e,t){const n=eO(e,"MuiMobileDatePicker"),r=null!==LR(n),{pickerProps:i,inputProps:o,wrapperProps:a}=rD(n,tO),{ToolbarComponent:s=yO,components:l,componentsProps:c}=n,d=(0,nn.A)(n,pD),u=(0,Ft.A)({},o,d,{components:l,componentsProps:c,ref:t,validationError:r});return(0,qt.jsx)(dD,(0,Ft.A)({},d,a,{DateInputProps:u,PureDateInputComponent:uD,components:l,componentsProps:c,children:(0,qt.jsx)(nD,(0,Ft.A)({},i,{autoFocus:!0,toolbarTitle:n.label||n.toolbarTitle,ToolbarComponent:s,DateInputProps:u,components:l,componentsProps:c},d))}))}),mD=["desktopModeMediaQuery","DialogProps","PopperProps","TransitionComponent"],fD=We.forwardRef(function(e,t){const n=FM({props:e,name:"MuiDatePicker"}),{desktopModeMediaQuery:r="@media (pointer: fine)",DialogProps:i,PopperProps:o,TransitionComponent:a}=n,s=(0,nn.A)(n,mD);return VC(r,{defaultMatches:!0})?(0,qt.jsx)(oD,(0,Ft.A)({ref:t,PopperProps:o,TransitionComponent:a},s)):(0,qt.jsx)(hD,(0,Ft.A)({ref:t,DialogProps:i},s))});function gD(e){if(null===e||!0===e||!1===e)return NaN;var t=Number(e);return isNaN(t)?t:t<0?Math.ceil(t):Math.floor(t)}function vD(e,t){if(t.length<e)throw new TypeError(e+" argument"+(e>1?"s":"")+" required, but only "+t.length+" present")}function xD(e){vD(1,arguments);var t=Object.prototype.toString.call(e);return e instanceof Date||"object"===(0,o.A)(e)&&"[object Date]"===t?new Date(e.getTime()):"number"===typeof e||"[object Number]"===t?new Date(e):("string"!==typeof e&&"[object String]"!==t||"undefined"===typeof console||(console.warn("Starting with v2.0.0-beta.1 date-fns doesn't accept strings as date arguments. Please use `parseISO` to parse strings. See: https://github.com/date-fns/date-fns/blob/master/docs/upgradeGuide.md#string-arguments"),console.warn((new Error).stack)),new Date(NaN))}function yD(e,t){vD(2,arguments);var n=xD(e),r=gD(t);return isNaN(r)?new Date(NaN):r?(n.setDate(n.getDate()+r),n):n}function bD(e,t){vD(2,arguments);var n=xD(e).getTime(),r=gD(t);return new Date(n+r)}function jD(e,t){vD(2,arguments);var n=xD(e),r=gD(t);if(isNaN(r))return new Date(NaN);if(!r)return n;var i=n.getDate(),o=new Date(n.getTime());return o.setMonth(n.getMonth()+r+1,0),i>=o.getDate()?o:(n.setFullYear(o.getFullYear(),o.getMonth(),i),n)}function _D(e,t){return vD(2,arguments),jD(e,12*gD(t))}function CD(e,t){vD(2,arguments);var n=xD(e),r=xD(t),i=n.getTime()-r.getTime();return i<0?-1:i>0?1:i}function wD(e,t){vD(2,arguments);var n=xD(e),r=xD(t),i=CD(n,r),o=Math.abs(function(e,t){vD(2,arguments);var n=xD(e),r=xD(t);return n.getFullYear()-r.getFullYear()}(n,r));n.setFullYear(1584),r.setFullYear(1584);var a=CD(n,r)===-i,s=i*(o-Number(a));return 0===s?0:s}function SD(e){vD(1,arguments);var t=xD(e);return t.setHours(23,59,59,999),t}function AD(e){vD(1,arguments);var t=xD(e),n=t.getMonth();return t.setFullYear(t.getFullYear(),n+1,0),t.setHours(23,59,59,999),t}function kD(e,t){vD(2,arguments);var n,r=xD(e),i=xD(t),o=CD(r,i),a=Math.abs(function(e,t){vD(2,arguments);var n=xD(e),r=xD(t);return 12*(n.getFullYear()-r.getFullYear())+(n.getMonth()-r.getMonth())}(r,i));if(a<1)n=0;else{1===r.getMonth()&&r.getDate()>27&&r.setDate(30),r.setMonth(r.getMonth()-o*a);var s=CD(r,i)===-o;(function(e){vD(1,arguments);var t=xD(e);return SD(t).getTime()===AD(t).getTime()})(xD(e))&&1===a&&1===CD(e,i)&&(s=!1),n=o*(a-Number(s))}return 0===n?0:n}var TD={ceil:Math.ceil,round:Math.round,floor:Math.floor,trunc:function(e){return e<0?Math.ceil(e):Math.floor(e)}};function ED(e){return e?TD[e]:TD.trunc}function MD(e){var t=new Date(Date.UTC(e.getFullYear(),e.getMonth(),e.getDate(),e.getHours(),e.getMinutes(),e.getSeconds(),e.getMilliseconds()));return t.setUTCFullYear(e.getFullYear()),e.getTime()-t.getTime()}function OD(e){vD(1,arguments);var t=xD(e);return t.setHours(0,0,0,0),t}function RD(e,t){var n=e.getFullYear()-t.getFullYear()||e.getMonth()-t.getMonth()||e.getDate()-t.getDate()||e.getHours()-t.getHours()||e.getMinutes()-t.getMinutes()||e.getSeconds()-t.getSeconds()||e.getMilliseconds()-t.getMilliseconds();return n<0?-1:n>0?1:n}function PD(e,t){vD(2,arguments);var n=xD(e),r=xD(t),i=RD(n,r),o=Math.abs(function(e,t){vD(2,arguments);var n=OD(e),r=OD(t),i=n.getTime()-MD(n),o=r.getTime()-MD(r);return Math.round((i-o)/864e5)}(n,r));n.setDate(n.getDate()-i*o);var a=i*(o-Number(RD(n,r)===-i));return 0===a?0:a}Math.pow(10,8);var DD=6e4,ND=36e5;function LD(e,t){return vD(2,arguments),xD(e).getTime()-xD(t).getTime()}var ID={};function FD(){return ID}function $D(e,t){var n,r,i,o,a,s,l,c;vD(1,arguments);var d=FD(),u=gD(null!==(n=null!==(r=null!==(i=null!==(o=null===t||void 0===t?void 0:t.weekStartsOn)&&void 0!==o?o:null===t||void 0===t||null===(a=t.locale)||void 0===a||null===(s=a.options)||void 0===s?void 0:s.weekStartsOn)&&void 0!==i?i:d.weekStartsOn)&&void 0!==r?r:null===(l=d.locale)||void 0===l||null===(c=l.options)||void 0===c?void 0:c.weekStartsOn)&&void 0!==n?n:0);if(!(u>=0&&u<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");var p=xD(e),h=p.getDay(),m=6+(h<u?-7:0)-(h-u);return p.setDate(p.getDate()+m),p.setHours(23,59,59,999),p}function BD(e){vD(1,arguments);var t=xD(e),n=t.getFullYear();return t.setFullYear(n+1,0,0),t.setHours(23,59,59,999),t}function zD(e){if(vD(1,arguments),!function(e){return vD(1,arguments),e instanceof Date||"object"===(0,o.A)(e)&&"[object Date]"===Object.prototype.toString.call(e)}(e)&&"number"!==typeof e)return!1;var t=xD(e);return!isNaN(Number(t))}function HD(e,t){return vD(2,arguments),bD(e,-gD(t))}function WD(e){vD(1,arguments);var t=xD(e),n=t.getUTCDay(),r=(n<1?7:0)+n-1;return t.setUTCDate(t.getUTCDate()-r),t.setUTCHours(0,0,0,0),t}function UD(e){vD(1,arguments);var t=xD(e),n=t.getUTCFullYear(),r=new Date(0);r.setUTCFullYear(n+1,0,4),r.setUTCHours(0,0,0,0);var i=WD(r),o=new Date(0);o.setUTCFullYear(n,0,4),o.setUTCHours(0,0,0,0);var a=WD(o);return t.getTime()>=i.getTime()?n+1:t.getTime()>=a.getTime()?n:n-1}function VD(e){vD(1,arguments);var t=xD(e),n=WD(t).getTime()-function(e){vD(1,arguments);var t=UD(e),n=new Date(0);return n.setUTCFullYear(t,0,4),n.setUTCHours(0,0,0,0),WD(n)}(t).getTime();return Math.round(n/6048e5)+1}function GD(e,t){var n,r,i,o,a,s,l,c;vD(1,arguments);var d=FD(),u=gD(null!==(n=null!==(r=null!==(i=null!==(o=null===t||void 0===t?void 0:t.weekStartsOn)&&void 0!==o?o:null===t||void 0===t||null===(a=t.locale)||void 0===a||null===(s=a.options)||void 0===s?void 0:s.weekStartsOn)&&void 0!==i?i:d.weekStartsOn)&&void 0!==r?r:null===(l=d.locale)||void 0===l||null===(c=l.options)||void 0===c?void 0:c.weekStartsOn)&&void 0!==n?n:0);if(!(u>=0&&u<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");var p=xD(e),h=p.getUTCDay(),m=(h<u?7:0)+h-u;return p.setUTCDate(p.getUTCDate()-m),p.setUTCHours(0,0,0,0),p}function qD(e,t){var n,r,i,o,a,s,l,c;vD(1,arguments);var d=xD(e),u=d.getUTCFullYear(),p=FD(),h=gD(null!==(n=null!==(r=null!==(i=null!==(o=null===t||void 0===t?void 0:t.firstWeekContainsDate)&&void 0!==o?o:null===t||void 0===t||null===(a=t.locale)||void 0===a||null===(s=a.options)||void 0===s?void 0:s.firstWeekContainsDate)&&void 0!==i?i:p.firstWeekContainsDate)&&void 0!==r?r:null===(l=p.locale)||void 0===l||null===(c=l.options)||void 0===c?void 0:c.firstWeekContainsDate)&&void 0!==n?n:1);if(!(h>=1&&h<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var m=new Date(0);m.setUTCFullYear(u+1,0,h),m.setUTCHours(0,0,0,0);var f=GD(m,t),g=new Date(0);g.setUTCFullYear(u,0,h),g.setUTCHours(0,0,0,0);var v=GD(g,t);return d.getTime()>=f.getTime()?u+1:d.getTime()>=v.getTime()?u:u-1}function YD(e,t){vD(1,arguments);var n=xD(e),r=GD(n,t).getTime()-function(e,t){var n,r,i,o,a,s,l,c;vD(1,arguments);var d=FD(),u=gD(null!==(n=null!==(r=null!==(i=null!==(o=null===t||void 0===t?void 0:t.firstWeekContainsDate)&&void 0!==o?o:null===t||void 0===t||null===(a=t.locale)||void 0===a||null===(s=a.options)||void 0===s?void 0:s.firstWeekContainsDate)&&void 0!==i?i:d.firstWeekContainsDate)&&void 0!==r?r:null===(l=d.locale)||void 0===l||null===(c=l.options)||void 0===c?void 0:c.firstWeekContainsDate)&&void 0!==n?n:1),p=qD(e,t),h=new Date(0);return h.setUTCFullYear(p,0,u),h.setUTCHours(0,0,0,0),GD(h,t)}(n,t).getTime();return Math.round(r/6048e5)+1}function ZD(e,t){for(var n=e<0?"-":"",r=Math.abs(e).toString();r.length<t;)r="0"+r;return n+r}var KD={y:function(e,t){var n=e.getUTCFullYear(),r=n>0?n:1-n;return ZD("yy"===t?r%100:r,t.length)},M:function(e,t){var n=e.getUTCMonth();return"M"===t?String(n+1):ZD(n+1,2)},d:function(e,t){return ZD(e.getUTCDate(),t.length)},a:function(e,t){var n=e.getUTCHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return n.toUpperCase();case"aaa":return n;case"aaaaa":return n[0];default:return"am"===n?"a.m.":"p.m."}},h:function(e,t){return ZD(e.getUTCHours()%12||12,t.length)},H:function(e,t){return ZD(e.getUTCHours(),t.length)},m:function(e,t){return ZD(e.getUTCMinutes(),t.length)},s:function(e,t){return ZD(e.getUTCSeconds(),t.length)},S:function(e,t){var n=t.length,r=e.getUTCMilliseconds();return ZD(Math.floor(r*Math.pow(10,n-3)),t.length)}};const XD=KD;var QD="midnight",JD="noon",eN="morning",tN="afternoon",nN="evening",rN="night",iN={G:function(e,t,n){var r=e.getUTCFullYear()>0?1:0;switch(t){case"G":case"GG":case"GGG":return n.era(r,{width:"abbreviated"});case"GGGGG":return n.era(r,{width:"narrow"});default:return n.era(r,{width:"wide"})}},y:function(e,t,n){if("yo"===t){var r=e.getUTCFullYear(),i=r>0?r:1-r;return n.ordinalNumber(i,{unit:"year"})}return XD.y(e,t)},Y:function(e,t,n,r){var i=qD(e,r),o=i>0?i:1-i;return"YY"===t?ZD(o%100,2):"Yo"===t?n.ordinalNumber(o,{unit:"year"}):ZD(o,t.length)},R:function(e,t){return ZD(UD(e),t.length)},u:function(e,t){return ZD(e.getUTCFullYear(),t.length)},Q:function(e,t,n){var r=Math.ceil((e.getUTCMonth()+1)/3);switch(t){case"Q":return String(r);case"QQ":return ZD(r,2);case"Qo":return n.ordinalNumber(r,{unit:"quarter"});case"QQQ":return n.quarter(r,{width:"abbreviated",context:"formatting"});case"QQQQQ":return n.quarter(r,{width:"narrow",context:"formatting"});default:return n.quarter(r,{width:"wide",context:"formatting"})}},q:function(e,t,n){var r=Math.ceil((e.getUTCMonth()+1)/3);switch(t){case"q":return String(r);case"qq":return ZD(r,2);case"qo":return n.ordinalNumber(r,{unit:"quarter"});case"qqq":return n.quarter(r,{width:"abbreviated",context:"standalone"});case"qqqqq":return n.quarter(r,{width:"narrow",context:"standalone"});default:return n.quarter(r,{width:"wide",context:"standalone"})}},M:function(e,t,n){var r=e.getUTCMonth();switch(t){case"M":case"MM":return XD.M(e,t);case"Mo":return n.ordinalNumber(r+1,{unit:"month"});case"MMM":return n.month(r,{width:"abbreviated",context:"formatting"});case"MMMMM":return n.month(r,{width:"narrow",context:"formatting"});default:return n.month(r,{width:"wide",context:"formatting"})}},L:function(e,t,n){var r=e.getUTCMonth();switch(t){case"L":return String(r+1);case"LL":return ZD(r+1,2);case"Lo":return n.ordinalNumber(r+1,{unit:"month"});case"LLL":return n.month(r,{width:"abbreviated",context:"standalone"});case"LLLLL":return n.month(r,{width:"narrow",context:"standalone"});default:return n.month(r,{width:"wide",context:"standalone"})}},w:function(e,t,n,r){var i=YD(e,r);return"wo"===t?n.ordinalNumber(i,{unit:"week"}):ZD(i,t.length)},I:function(e,t,n){var r=VD(e);return"Io"===t?n.ordinalNumber(r,{unit:"week"}):ZD(r,t.length)},d:function(e,t,n){return"do"===t?n.ordinalNumber(e.getUTCDate(),{unit:"date"}):XD.d(e,t)},D:function(e,t,n){var r=function(e){vD(1,arguments);var t=xD(e),n=t.getTime();t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0);var r=n-t.getTime();return Math.floor(r/864e5)+1}(e);return"Do"===t?n.ordinalNumber(r,{unit:"dayOfYear"}):ZD(r,t.length)},E:function(e,t,n){var r=e.getUTCDay();switch(t){case"E":case"EE":case"EEE":return n.day(r,{width:"abbreviated",context:"formatting"});case"EEEEE":return n.day(r,{width:"narrow",context:"formatting"});case"EEEEEE":return n.day(r,{width:"short",context:"formatting"});default:return n.day(r,{width:"wide",context:"formatting"})}},e:function(e,t,n,r){var i=e.getUTCDay(),o=(i-r.weekStartsOn+8)%7||7;switch(t){case"e":return String(o);case"ee":return ZD(o,2);case"eo":return n.ordinalNumber(o,{unit:"day"});case"eee":return n.day(i,{width:"abbreviated",context:"formatting"});case"eeeee":return n.day(i,{width:"narrow",context:"formatting"});case"eeeeee":return n.day(i,{width:"short",context:"formatting"});default:return n.day(i,{width:"wide",context:"formatting"})}},c:function(e,t,n,r){var i=e.getUTCDay(),o=(i-r.weekStartsOn+8)%7||7;switch(t){case"c":return String(o);case"cc":return ZD(o,t.length);case"co":return n.ordinalNumber(o,{unit:"day"});case"ccc":return n.day(i,{width:"abbreviated",context:"standalone"});case"ccccc":return n.day(i,{width:"narrow",context:"standalone"});case"cccccc":return n.day(i,{width:"short",context:"standalone"});default:return n.day(i,{width:"wide",context:"standalone"})}},i:function(e,t,n){var r=e.getUTCDay(),i=0===r?7:r;switch(t){case"i":return String(i);case"ii":return ZD(i,t.length);case"io":return n.ordinalNumber(i,{unit:"day"});case"iii":return n.day(r,{width:"abbreviated",context:"formatting"});case"iiiii":return n.day(r,{width:"narrow",context:"formatting"});case"iiiiii":return n.day(r,{width:"short",context:"formatting"});default:return n.day(r,{width:"wide",context:"formatting"})}},a:function(e,t,n){var r=e.getUTCHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return n.dayPeriod(r,{width:"abbreviated",context:"formatting"});case"aaa":return n.dayPeriod(r,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return n.dayPeriod(r,{width:"narrow",context:"formatting"});default:return n.dayPeriod(r,{width:"wide",context:"formatting"})}},b:function(e,t,n){var r,i=e.getUTCHours();switch(r=12===i?JD:0===i?QD:i/12>=1?"pm":"am",t){case"b":case"bb":return n.dayPeriod(r,{width:"abbreviated",context:"formatting"});case"bbb":return n.dayPeriod(r,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return n.dayPeriod(r,{width:"narrow",context:"formatting"});default:return n.dayPeriod(r,{width:"wide",context:"formatting"})}},B:function(e,t,n){var r,i=e.getUTCHours();switch(r=i>=17?nN:i>=12?tN:i>=4?eN:rN,t){case"B":case"BB":case"BBB":return n.dayPeriod(r,{width:"abbreviated",context:"formatting"});case"BBBBB":return n.dayPeriod(r,{width:"narrow",context:"formatting"});default:return n.dayPeriod(r,{width:"wide",context:"formatting"})}},h:function(e,t,n){if("ho"===t){var r=e.getUTCHours()%12;return 0===r&&(r=12),n.ordinalNumber(r,{unit:"hour"})}return XD.h(e,t)},H:function(e,t,n){return"Ho"===t?n.ordinalNumber(e.getUTCHours(),{unit:"hour"}):XD.H(e,t)},K:function(e,t,n){var r=e.getUTCHours()%12;return"Ko"===t?n.ordinalNumber(r,{unit:"hour"}):ZD(r,t.length)},k:function(e,t,n){var r=e.getUTCHours();return 0===r&&(r=24),"ko"===t?n.ordinalNumber(r,{unit:"hour"}):ZD(r,t.length)},m:function(e,t,n){return"mo"===t?n.ordinalNumber(e.getUTCMinutes(),{unit:"minute"}):XD.m(e,t)},s:function(e,t,n){return"so"===t?n.ordinalNumber(e.getUTCSeconds(),{unit:"second"}):XD.s(e,t)},S:function(e,t){return XD.S(e,t)},X:function(e,t,n,r){var i=(r._originalDate||e).getTimezoneOffset();if(0===i)return"Z";switch(t){case"X":return aN(i);case"XXXX":case"XX":return sN(i);default:return sN(i,":")}},x:function(e,t,n,r){var i=(r._originalDate||e).getTimezoneOffset();switch(t){case"x":return aN(i);case"xxxx":case"xx":return sN(i);default:return sN(i,":")}},O:function(e,t,n,r){var i=(r._originalDate||e).getTimezoneOffset();switch(t){case"O":case"OO":case"OOO":return"GMT"+oN(i,":");default:return"GMT"+sN(i,":")}},z:function(e,t,n,r){var i=(r._originalDate||e).getTimezoneOffset();switch(t){case"z":case"zz":case"zzz":return"GMT"+oN(i,":");default:return"GMT"+sN(i,":")}},t:function(e,t,n,r){var i=r._originalDate||e;return ZD(Math.floor(i.getTime()/1e3),t.length)},T:function(e,t,n,r){return ZD((r._originalDate||e).getTime(),t.length)}};function oN(e,t){var n=e>0?"-":"+",r=Math.abs(e),i=Math.floor(r/60),o=r%60;if(0===o)return n+String(i);var a=t||"";return n+String(i)+a+ZD(o,2)}function aN(e,t){return e%60===0?(e>0?"-":"+")+ZD(Math.abs(e)/60,2):sN(e,t)}function sN(e,t){var n=t||"",r=e>0?"-":"+",i=Math.abs(e);return r+ZD(Math.floor(i/60),2)+n+ZD(i%60,2)}const lN=iN;var cN=function(e,t){switch(e){case"P":return t.date({width:"short"});case"PP":return t.date({width:"medium"});case"PPP":return t.date({width:"long"});default:return t.date({width:"full"})}},dN=function(e,t){switch(e){case"p":return t.time({width:"short"});case"pp":return t.time({width:"medium"});case"ppp":return t.time({width:"long"});default:return t.time({width:"full"})}},uN={p:dN,P:function(e,t){var n,r=e.match(/(P+)(p+)?/)||[],i=r[1],o=r[2];if(!o)return cN(e,t);switch(i){case"P":n=t.dateTime({width:"short"});break;case"PP":n=t.dateTime({width:"medium"});break;case"PPP":n=t.dateTime({width:"long"});break;default:n=t.dateTime({width:"full"})}return n.replace("{{date}}",cN(i,t)).replace("{{time}}",dN(o,t))}};const pN=uN;var hN=["D","DD"],mN=["YY","YYYY"];function fN(e){return-1!==hN.indexOf(e)}function gN(e){return-1!==mN.indexOf(e)}function vN(e,t,n){if("YYYY"===e)throw new RangeError("Use `yyyy` instead of `YYYY` (in `".concat(t,"`) for formatting years to the input `").concat(n,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"));if("YY"===e)throw new RangeError("Use `yy` instead of `YY` (in `".concat(t,"`) for formatting years to the input `").concat(n,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"));if("D"===e)throw new RangeError("Use `d` instead of `D` (in `".concat(t,"`) for formatting days of the month to the input `").concat(n,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"));if("DD"===e)throw new RangeError("Use `dd` instead of `DD` (in `".concat(t,"`) for formatting days of the month to the input `").concat(n,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"))}var xN={lessThanXSeconds:{one:"less than a second",other:"less than {{count}} seconds"},xSeconds:{one:"1 second",other:"{{count}} seconds"},halfAMinute:"half a minute",lessThanXMinutes:{one:"less than a minute",other:"less than {{count}} minutes"},xMinutes:{one:"1 minute",other:"{{count}} minutes"},aboutXHours:{one:"about 1 hour",other:"about {{count}} hours"},xHours:{one:"1 hour",other:"{{count}} hours"},xDays:{one:"1 day",other:"{{count}} days"},aboutXWeeks:{one:"about 1 week",other:"about {{count}} weeks"},xWeeks:{one:"1 week",other:"{{count}} weeks"},aboutXMonths:{one:"about 1 month",other:"about {{count}} months"},xMonths:{one:"1 month",other:"{{count}} months"},aboutXYears:{one:"about 1 year",other:"about {{count}} years"},xYears:{one:"1 year",other:"{{count}} years"},overXYears:{one:"over 1 year",other:"over {{count}} years"},almostXYears:{one:"almost 1 year",other:"almost {{count}} years"}};const yN=function(e,t,n){var r,i=xN[e];return r="string"===typeof i?i:1===t?i.one:i.other.replace("{{count}}",t.toString()),null!==n&&void 0!==n&&n.addSuffix?n.comparison&&n.comparison>0?"in "+r:r+" ago":r};function bN(e){return function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=t.width?String(t.width):e.defaultWidth;return e.formats[n]||e.formats[e.defaultWidth]}}const jN={date:bN({formats:{full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},defaultWidth:"full"}),time:bN({formats:{full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},defaultWidth:"full"}),dateTime:bN({formats:{full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},defaultWidth:"full"})};var _N={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"};const CN=function(e,t,n,r){return _N[e]};function wN(e){return function(t,n){var r;if("formatting"===(null!==n&&void 0!==n&&n.context?String(n.context):"standalone")&&e.formattingValues){var i=e.defaultFormattingWidth||e.defaultWidth,o=null!==n&&void 0!==n&&n.width?String(n.width):i;r=e.formattingValues[o]||e.formattingValues[i]}else{var a=e.defaultWidth,s=null!==n&&void 0!==n&&n.width?String(n.width):e.defaultWidth;r=e.values[s]||e.values[a]}return r[e.argumentCallback?e.argumentCallback(t):t]}}const SN={ordinalNumber:function(e,t){var n=Number(e),r=n%100;if(r>20||r<10)switch(r%10){case 1:return n+"st";case 2:return n+"nd";case 3:return n+"rd"}return n+"th"},era:wN({values:{narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},defaultWidth:"wide"}),quarter:wN({values:{narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},defaultWidth:"wide",argumentCallback:function(e){return e-1}}),month:wN({values:{narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],wide:["January","February","March","April","May","June","July","August","September","October","November","December"]},defaultWidth:"wide"}),day:wN({values:{narrow:["S","M","T","W","T","F","S"],short:["Su","Mo","Tu","We","Th","Fr","Sa"],abbreviated:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],wide:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},defaultWidth:"wide"}),dayPeriod:wN({values:{narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"}},defaultWidth:"wide",formattingValues:{narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"}},defaultFormattingWidth:"wide"})};function AN(e){return function(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=n.width,i=r&&e.matchPatterns[r]||e.matchPatterns[e.defaultMatchWidth],o=t.match(i);if(!o)return null;var a,s=o[0],l=r&&e.parsePatterns[r]||e.parsePatterns[e.defaultParseWidth],c=Array.isArray(l)?function(e,t){for(var n=0;n<e.length;n++)if(t(e[n]))return n;return}(l,function(e){return e.test(s)}):function(e,t){for(var n in e)if(e.hasOwnProperty(n)&&t(e[n]))return n;return}(l,function(e){return e.test(s)});return a=e.valueCallback?e.valueCallback(c):c,{value:a=n.valueCallback?n.valueCallback(a):a,rest:t.slice(s.length)}}}var kN,TN={ordinalNumber:(kN={matchPattern:/^(\d+)(th|st|nd|rd)?/i,parsePattern:/\d+/i,valueCallback:function(e){return parseInt(e,10)}},function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=e.match(kN.matchPattern);if(!n)return null;var r=n[0],i=e.match(kN.parsePattern);if(!i)return null;var o=kN.valueCallback?kN.valueCallback(i[0]):i[0];return{value:o=t.valueCallback?t.valueCallback(o):o,rest:e.slice(r.length)}}),era:AN({matchPatterns:{narrow:/^(b|a)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(before christ|before common era|anno domini|common era)/i},defaultMatchWidth:"wide",parsePatterns:{any:[/^b/i,/^(a|c)/i]},defaultParseWidth:"any"}),quarter:AN({matchPatterns:{narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},defaultMatchWidth:"wide",parsePatterns:{any:[/1/i,/2/i,/3/i,/4/i]},defaultParseWidth:"any",valueCallback:function(e){return e+1}}),month:AN({matchPatterns:{narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,wide:/^(january|february|march|april|may|june|july|august|september|october|november|december)/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^may/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},defaultParseWidth:"any"}),day:AN({matchPatterns:{narrow:/^[smtwf]/i,short:/^(su|mo|tu|we|th|fr|sa)/i,abbreviated:/^(sun|mon|tue|wed|thu|fri|sat)/i,wide:/^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},defaultParseWidth:"any"}),dayPeriod:AN({matchPatterns:{narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i},defaultMatchWidth:"any",parsePatterns:{any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}},defaultParseWidth:"any"})};const EN={code:"en-US",formatDistance:yN,formatLong:jN,formatRelative:CN,localize:SN,match:TN,options:{weekStartsOn:0,firstWeekContainsDate:1}},MN=EN;var ON=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,RN=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,PN=/^'([^]*?)'?$/,DN=/''/g,NN=/[a-zA-Z]/;function LN(e,t,n){var r,i,o,a,s,l,c,d,u,p,h,m,f,g,v,x,y,b;vD(2,arguments);var j=String(t),_=FD(),C=null!==(r=null!==(i=null===n||void 0===n?void 0:n.locale)&&void 0!==i?i:_.locale)&&void 0!==r?r:MN,w=gD(null!==(o=null!==(a=null!==(s=null!==(l=null===n||void 0===n?void 0:n.firstWeekContainsDate)&&void 0!==l?l:null===n||void 0===n||null===(c=n.locale)||void 0===c||null===(d=c.options)||void 0===d?void 0:d.firstWeekContainsDate)&&void 0!==s?s:_.firstWeekContainsDate)&&void 0!==a?a:null===(u=_.locale)||void 0===u||null===(p=u.options)||void 0===p?void 0:p.firstWeekContainsDate)&&void 0!==o?o:1);if(!(w>=1&&w<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var S=gD(null!==(h=null!==(m=null!==(f=null!==(g=null===n||void 0===n?void 0:n.weekStartsOn)&&void 0!==g?g:null===n||void 0===n||null===(v=n.locale)||void 0===v||null===(x=v.options)||void 0===x?void 0:x.weekStartsOn)&&void 0!==f?f:_.weekStartsOn)&&void 0!==m?m:null===(y=_.locale)||void 0===y||null===(b=y.options)||void 0===b?void 0:b.weekStartsOn)&&void 0!==h?h:0);if(!(S>=0&&S<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");if(!C.localize)throw new RangeError("locale must contain localize property");if(!C.formatLong)throw new RangeError("locale must contain formatLong property");var A=xD(e);if(!zD(A))throw new RangeError("Invalid time value");var k=HD(A,MD(A)),T={firstWeekContainsDate:w,weekStartsOn:S,locale:C,_originalDate:A};return j.match(RN).map(function(e){var t=e[0];return"p"===t||"P"===t?(0,pN[t])(e,C.formatLong):e}).join("").match(ON).map(function(r){if("''"===r)return"'";var i=r[0];if("'"===i)return function(e){var t=e.match(PN);if(!t)return e;return t[1].replace(DN,"'")}(r);var o=lN[i];if(o)return null!==n&&void 0!==n&&n.useAdditionalWeekYearTokens||!gN(r)||vN(r,t,String(e)),null!==n&&void 0!==n&&n.useAdditionalDayOfYearTokens||!fN(r)||vN(r,t,String(e)),o(k,r,C.localize,T);if(i.match(NN))throw new RangeError("Format string contains an unescaped latin alphabet character `"+i+"`");return r}).join("")}function IN(e){return vD(1,arguments),xD(e).getDay()}function FN(e){vD(1,arguments);var t=xD(e),n=t.getFullYear(),r=t.getMonth(),i=new Date(0);return i.setFullYear(n,r+1,0),i.setHours(0,0,0,0),i.getDate()}function $N(e,t){vD(2,arguments);var n=xD(e),r=xD(t);return n.getTime()>r.getTime()}function BN(e,t){vD(2,arguments);var n=xD(e),r=xD(t);return n.getTime()<r.getTime()}function zN(e){vD(1,arguments);var t=xD(e);return t.setMinutes(0,0,0),t}function HN(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=y(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,i=function(){};return{s:i,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,a=!0,s=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return a=e.done,e},e:function(e){s=!0,o=e},f:function(){try{a||null==n.return||n.return()}finally{if(s)throw o}}}}function WN(e,t){if(null==e)throw new TypeError("assign requires that input parameter not be null or undefined");for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e}function UN(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(UN=function(){return!!e})()}function VN(e){var t=UN();return function(){var n,r=m(e);if(t){var i=m(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return h(this,n)}}var GN=function(){function e(){a(this,e),(0,f.A)(this,"priority",void 0),(0,f.A)(this,"subPriority",0)}return c(e,[{key:"validate",value:function(e,t){return!0}}]),e}(),qN=function(e){p(n,e);var t=VN(n);function n(e,r,i,o,s){var l;return a(this,n),(l=t.call(this)).value=e,l.validateValue=r,l.setValue=i,l.priority=o,s&&(l.subPriority=s),l}return c(n,[{key:"validate",value:function(e,t){return this.validateValue(e,this.value,t)}},{key:"set",value:function(e,t,n){return this.setValue(e,t,this.value,n)}}]),n}(GN),YN=function(e){p(n,e);var t=VN(n);function n(){var e;a(this,n);for(var r=arguments.length,i=new Array(r),o=0;o<r;o++)i[o]=arguments[o];return e=t.call.apply(t,[this].concat(i)),(0,f.A)(d(e),"priority",10),(0,f.A)(d(e),"subPriority",-1),e}return c(n,[{key:"set",value:function(e,t){if(t.timestampIsSet)return e;var n=new Date(0);return n.setFullYear(e.getUTCFullYear(),e.getUTCMonth(),e.getUTCDate()),n.setHours(e.getUTCHours(),e.getUTCMinutes(),e.getUTCSeconds(),e.getUTCMilliseconds()),n}}]),n}(GN),ZN=function(){function e(){a(this,e),(0,f.A)(this,"incompatibleTokens",void 0),(0,f.A)(this,"priority",void 0),(0,f.A)(this,"subPriority",void 0)}return c(e,[{key:"run",value:function(e,t,n,r){var i=this.parse(e,t,n,r);return i?{setter:new qN(i.value,this.validate,this.set,this.priority,this.subPriority),rest:i.rest}:null}},{key:"validate",value:function(e,t,n){return!0}}]),e}(),KN=function(e){p(n,e);var t=VN(n);function n(){var e;a(this,n);for(var r=arguments.length,i=new Array(r),o=0;o<r;o++)i[o]=arguments[o];return e=t.call.apply(t,[this].concat(i)),(0,f.A)(d(e),"priority",140),(0,f.A)(d(e),"incompatibleTokens",["R","u","t","T"]),e}return c(n,[{key:"parse",value:function(e,t,n){switch(t){case"G":case"GG":case"GGG":return n.era(e,{width:"abbreviated"})||n.era(e,{width:"narrow"});case"GGGGG":return n.era(e,{width:"narrow"});default:return n.era(e,{width:"wide"})||n.era(e,{width:"abbreviated"})||n.era(e,{width:"narrow"})}}},{key:"set",value:function(e,t,n){return t.era=n,e.setUTCFullYear(n,0,1),e.setUTCHours(0,0,0,0),e}}]),n}(ZN),XN=/^(1[0-2]|0?\d)/,QN=/^(3[0-1]|[0-2]?\d)/,JN=/^(36[0-6]|3[0-5]\d|[0-2]?\d?\d)/,eL=/^(5[0-3]|[0-4]?\d)/,tL=/^(2[0-3]|[0-1]?\d)/,nL=/^(2[0-4]|[0-1]?\d)/,rL=/^(1[0-1]|0?\d)/,iL=/^(1[0-2]|0?\d)/,oL=/^[0-5]?\d/,aL=/^[0-5]?\d/,sL=/^\d/,lL=/^\d{1,2}/,cL=/^\d{1,3}/,dL=/^\d{1,4}/,uL=/^-?\d+/,pL=/^-?\d/,hL=/^-?\d{1,2}/,mL=/^-?\d{1,3}/,fL=/^-?\d{1,4}/,gL=/^([+-])(\d{2})(\d{2})?|Z/,vL=/^([+-])(\d{2})(\d{2})|Z/,xL=/^([+-])(\d{2})(\d{2})((\d{2}))?|Z/,yL=/^([+-])(\d{2}):(\d{2})|Z/,bL=/^([+-])(\d{2}):(\d{2})(:(\d{2}))?|Z/;function jL(e,t){return e?{value:t(e.value),rest:e.rest}:e}function _L(e,t){var n=t.match(e);return n?{value:parseInt(n[0],10),rest:t.slice(n[0].length)}:null}function CL(e,t){var n=t.match(e);if(!n)return null;if("Z"===n[0])return{value:0,rest:t.slice(1)};var r="+"===n[1]?1:-1,i=n[2]?parseInt(n[2],10):0,o=n[3]?parseInt(n[3],10):0,a=n[5]?parseInt(n[5],10):0;return{value:r*(i*ND+o*DD+1e3*a),rest:t.slice(n[0].length)}}function wL(e){return _L(uL,e)}function SL(e,t){switch(e){case 1:return _L(sL,t);case 2:return _L(lL,t);case 3:return _L(cL,t);case 4:return _L(dL,t);default:return _L(new RegExp("^\\d{1,"+e+"}"),t)}}function AL(e,t){switch(e){case 1:return _L(pL,t);case 2:return _L(hL,t);case 3:return _L(mL,t);case 4:return _L(fL,t);default:return _L(new RegExp("^-?\\d{1,"+e+"}"),t)}}function kL(e){switch(e){case"morning":return 4;case"evening":return 17;case"pm":case"noon":case"afternoon":return 12;default:return 0}}function TL(e,t){var n,r=t>0,i=r?t:1-t;if(i<=50)n=e||100;else{var o=i+50;n=e+100*Math.floor(o/100)-(e>=o%100?100:0)}return r?n:1-n}function EL(e){return e%400===0||e%4===0&&e%100!==0}var ML=function(e){p(n,e);var t=VN(n);function n(){var e;a(this,n);for(var r=arguments.length,i=new Array(r),o=0;o<r;o++)i[o]=arguments[o];return e=t.call.apply(t,[this].concat(i)),(0,f.A)(d(e),"priority",130),(0,f.A)(d(e),"incompatibleTokens",["Y","R","u","w","I","i","e","c","t","T"]),e}return c(n,[{key:"parse",value:function(e,t,n){var r=function(e){return{year:e,isTwoDigitYear:"yy"===t}};switch(t){case"y":return jL(SL(4,e),r);case"yo":return jL(n.ordinalNumber(e,{unit:"year"}),r);default:return jL(SL(t.length,e),r)}}},{key:"validate",value:function(e,t){return t.isTwoDigitYear||t.year>0}},{key:"set",value:function(e,t,n){var r=e.getUTCFullYear();if(n.isTwoDigitYear){var i=TL(n.year,r);return e.setUTCFullYear(i,0,1),e.setUTCHours(0,0,0,0),e}var o="era"in t&&1!==t.era?1-n.year:n.year;return e.setUTCFullYear(o,0,1),e.setUTCHours(0,0,0,0),e}}]),n}(ZN),OL=function(e){p(n,e);var t=VN(n);function n(){var e;a(this,n);for(var r=arguments.length,i=new Array(r),o=0;o<r;o++)i[o]=arguments[o];return e=t.call.apply(t,[this].concat(i)),(0,f.A)(d(e),"priority",130),(0,f.A)(d(e),"incompatibleTokens",["y","R","u","Q","q","M","L","I","d","D","i","t","T"]),e}return c(n,[{key:"parse",value:function(e,t,n){var r=function(e){return{year:e,isTwoDigitYear:"YY"===t}};switch(t){case"Y":return jL(SL(4,e),r);case"Yo":return jL(n.ordinalNumber(e,{unit:"year"}),r);default:return jL(SL(t.length,e),r)}}},{key:"validate",value:function(e,t){return t.isTwoDigitYear||t.year>0}},{key:"set",value:function(e,t,n,r){var i=qD(e,r);if(n.isTwoDigitYear){var o=TL(n.year,i);return e.setUTCFullYear(o,0,r.firstWeekContainsDate),e.setUTCHours(0,0,0,0),GD(e,r)}var a="era"in t&&1!==t.era?1-n.year:n.year;return e.setUTCFullYear(a,0,r.firstWeekContainsDate),e.setUTCHours(0,0,0,0),GD(e,r)}}]),n}(ZN),RL=function(e){p(n,e);var t=VN(n);function n(){var e;a(this,n);for(var r=arguments.length,i=new Array(r),o=0;o<r;o++)i[o]=arguments[o];return e=t.call.apply(t,[this].concat(i)),(0,f.A)(d(e),"priority",130),(0,f.A)(d(e),"incompatibleTokens",["G","y","Y","u","Q","q","M","L","w","d","D","e","c","t","T"]),e}return c(n,[{key:"parse",value:function(e,t){return AL("R"===t?4:t.length,e)}},{key:"set",value:function(e,t,n){var r=new Date(0);return r.setUTCFullYear(n,0,4),r.setUTCHours(0,0,0,0),WD(r)}}]),n}(ZN),PL=function(e){p(n,e);var t=VN(n);function n(){var e;a(this,n);for(var r=arguments.length,i=new Array(r),o=0;o<r;o++)i[o]=arguments[o];return e=t.call.apply(t,[this].concat(i)),(0,f.A)(d(e),"priority",130),(0,f.A)(d(e),"incompatibleTokens",["G","y","Y","R","w","I","i","e","c","t","T"]),e}return c(n,[{key:"parse",value:function(e,t){return AL("u"===t?4:t.length,e)}},{key:"set",value:function(e,t,n){return e.setUTCFullYear(n,0,1),e.setUTCHours(0,0,0,0),e}}]),n}(ZN),DL=function(e){p(n,e);var t=VN(n);function n(){var e;a(this,n);for(var r=arguments.length,i=new Array(r),o=0;o<r;o++)i[o]=arguments[o];return e=t.call.apply(t,[this].concat(i)),(0,f.A)(d(e),"priority",120),(0,f.A)(d(e),"incompatibleTokens",["Y","R","q","M","L","w","I","d","D","i","e","c","t","T"]),e}return c(n,[{key:"parse",value:function(e,t,n){switch(t){case"Q":case"QQ":return SL(t.length,e);case"Qo":return n.ordinalNumber(e,{unit:"quarter"});case"QQQ":return n.quarter(e,{width:"abbreviated",context:"formatting"})||n.quarter(e,{width:"narrow",context:"formatting"});case"QQQQQ":return n.quarter(e,{width:"narrow",context:"formatting"});default:return n.quarter(e,{width:"wide",context:"formatting"})||n.quarter(e,{width:"abbreviated",context:"formatting"})||n.quarter(e,{width:"narrow",context:"formatting"})}}},{key:"validate",value:function(e,t){return t>=1&&t<=4}},{key:"set",value:function(e,t,n){return e.setUTCMonth(3*(n-1),1),e.setUTCHours(0,0,0,0),e}}]),n}(ZN),NL=function(e){p(n,e);var t=VN(n);function n(){var e;a(this,n);for(var r=arguments.length,i=new Array(r),o=0;o<r;o++)i[o]=arguments[o];return e=t.call.apply(t,[this].concat(i)),(0,f.A)(d(e),"priority",120),(0,f.A)(d(e),"incompatibleTokens",["Y","R","Q","M","L","w","I","d","D","i","e","c","t","T"]),e}return c(n,[{key:"parse",value:function(e,t,n){switch(t){case"q":case"qq":return SL(t.length,e);case"qo":return n.ordinalNumber(e,{unit:"quarter"});case"qqq":return n.quarter(e,{width:"abbreviated",context:"standalone"})||n.quarter(e,{width:"narrow",context:"standalone"});case"qqqqq":return n.quarter(e,{width:"narrow",context:"standalone"});default:return n.quarter(e,{width:"wide",context:"standalone"})||n.quarter(e,{width:"abbreviated",context:"standalone"})||n.quarter(e,{width:"narrow",context:"standalone"})}}},{key:"validate",value:function(e,t){return t>=1&&t<=4}},{key:"set",value:function(e,t,n){return e.setUTCMonth(3*(n-1),1),e.setUTCHours(0,0,0,0),e}}]),n}(ZN),LL=function(e){p(n,e);var t=VN(n);function n(){var e;a(this,n);for(var r=arguments.length,i=new Array(r),o=0;o<r;o++)i[o]=arguments[o];return e=t.call.apply(t,[this].concat(i)),(0,f.A)(d(e),"incompatibleTokens",["Y","R","q","Q","L","w","I","D","i","e","c","t","T"]),(0,f.A)(d(e),"priority",110),e}return c(n,[{key:"parse",value:function(e,t,n){var r=function(e){return e-1};switch(t){case"M":return jL(_L(XN,e),r);case"MM":return jL(SL(2,e),r);case"Mo":return jL(n.ordinalNumber(e,{unit:"month"}),r);case"MMM":return n.month(e,{width:"abbreviated",context:"formatting"})||n.month(e,{width:"narrow",context:"formatting"});case"MMMMM":return n.month(e,{width:"narrow",context:"formatting"});default:return n.month(e,{width:"wide",context:"formatting"})||n.month(e,{width:"abbreviated",context:"formatting"})||n.month(e,{width:"narrow",context:"formatting"})}}},{key:"validate",value:function(e,t){return t>=0&&t<=11}},{key:"set",value:function(e,t,n){return e.setUTCMonth(n,1),e.setUTCHours(0,0,0,0),e}}]),n}(ZN),IL=function(e){p(n,e);var t=VN(n);function n(){var e;a(this,n);for(var r=arguments.length,i=new Array(r),o=0;o<r;o++)i[o]=arguments[o];return e=t.call.apply(t,[this].concat(i)),(0,f.A)(d(e),"priority",110),(0,f.A)(d(e),"incompatibleTokens",["Y","R","q","Q","M","w","I","D","i","e","c","t","T"]),e}return c(n,[{key:"parse",value:function(e,t,n){var r=function(e){return e-1};switch(t){case"L":return jL(_L(XN,e),r);case"LL":return jL(SL(2,e),r);case"Lo":return jL(n.ordinalNumber(e,{unit:"month"}),r);case"LLL":return n.month(e,{width:"abbreviated",context:"standalone"})||n.month(e,{width:"narrow",context:"standalone"});case"LLLLL":return n.month(e,{width:"narrow",context:"standalone"});default:return n.month(e,{width:"wide",context:"standalone"})||n.month(e,{width:"abbreviated",context:"standalone"})||n.month(e,{width:"narrow",context:"standalone"})}}},{key:"validate",value:function(e,t){return t>=0&&t<=11}},{key:"set",value:function(e,t,n){return e.setUTCMonth(n,1),e.setUTCHours(0,0,0,0),e}}]),n}(ZN);var FL=function(e){p(n,e);var t=VN(n);function n(){var e;a(this,n);for(var r=arguments.length,i=new Array(r),o=0;o<r;o++)i[o]=arguments[o];return e=t.call.apply(t,[this].concat(i)),(0,f.A)(d(e),"priority",100),(0,f.A)(d(e),"incompatibleTokens",["y","R","u","q","Q","M","L","I","d","D","i","t","T"]),e}return c(n,[{key:"parse",value:function(e,t,n){switch(t){case"w":return _L(eL,e);case"wo":return n.ordinalNumber(e,{unit:"week"});default:return SL(t.length,e)}}},{key:"validate",value:function(e,t){return t>=1&&t<=53}},{key:"set",value:function(e,t,n,r){return GD(function(e,t,n){vD(2,arguments);var r=xD(e),i=gD(t),o=YD(r,n)-i;return r.setUTCDate(r.getUTCDate()-7*o),r}(e,n,r),r)}}]),n}(ZN);var $L=function(e){p(n,e);var t=VN(n);function n(){var e;a(this,n);for(var r=arguments.length,i=new Array(r),o=0;o<r;o++)i[o]=arguments[o];return e=t.call.apply(t,[this].concat(i)),(0,f.A)(d(e),"priority",100),(0,f.A)(d(e),"incompatibleTokens",["y","Y","u","q","Q","M","L","w","d","D","e","c","t","T"]),e}return c(n,[{key:"parse",value:function(e,t,n){switch(t){case"I":return _L(eL,e);case"Io":return n.ordinalNumber(e,{unit:"week"});default:return SL(t.length,e)}}},{key:"validate",value:function(e,t){return t>=1&&t<=53}},{key:"set",value:function(e,t,n){return WD(function(e,t){vD(2,arguments);var n=xD(e),r=gD(t),i=VD(n)-r;return n.setUTCDate(n.getUTCDate()-7*i),n}(e,n))}}]),n}(ZN),BL=[31,28,31,30,31,30,31,31,30,31,30,31],zL=[31,29,31,30,31,30,31,31,30,31,30,31],HL=function(e){p(n,e);var t=VN(n);function n(){var e;a(this,n);for(var r=arguments.length,i=new Array(r),o=0;o<r;o++)i[o]=arguments[o];return e=t.call.apply(t,[this].concat(i)),(0,f.A)(d(e),"priority",90),(0,f.A)(d(e),"subPriority",1),(0,f.A)(d(e),"incompatibleTokens",["Y","R","q","Q","w","I","D","i","e","c","t","T"]),e}return c(n,[{key:"parse",value:function(e,t,n){switch(t){case"d":return _L(QN,e);case"do":return n.ordinalNumber(e,{unit:"date"});default:return SL(t.length,e)}}},{key:"validate",value:function(e,t){var n=EL(e.getUTCFullYear()),r=e.getUTCMonth();return n?t>=1&&t<=zL[r]:t>=1&&t<=BL[r]}},{key:"set",value:function(e,t,n){return e.setUTCDate(n),e.setUTCHours(0,0,0,0),e}}]),n}(ZN),WL=function(e){p(n,e);var t=VN(n);function n(){var e;a(this,n);for(var r=arguments.length,i=new Array(r),o=0;o<r;o++)i[o]=arguments[o];return e=t.call.apply(t,[this].concat(i)),(0,f.A)(d(e),"priority",90),(0,f.A)(d(e),"subpriority",1),(0,f.A)(d(e),"incompatibleTokens",["Y","R","q","Q","M","L","w","I","d","E","i","e","c","t","T"]),e}return c(n,[{key:"parse",value:function(e,t,n){switch(t){case"D":case"DD":return _L(JN,e);case"Do":return n.ordinalNumber(e,{unit:"date"});default:return SL(t.length,e)}}},{key:"validate",value:function(e,t){return EL(e.getUTCFullYear())?t>=1&&t<=366:t>=1&&t<=365}},{key:"set",value:function(e,t,n){return e.setUTCMonth(0,n),e.setUTCHours(0,0,0,0),e}}]),n}(ZN);function UL(e,t,n){var r,i,o,a,s,l,c,d;vD(2,arguments);var u=FD(),p=gD(null!==(r=null!==(i=null!==(o=null!==(a=null===n||void 0===n?void 0:n.weekStartsOn)&&void 0!==a?a:null===n||void 0===n||null===(s=n.locale)||void 0===s||null===(l=s.options)||void 0===l?void 0:l.weekStartsOn)&&void 0!==o?o:u.weekStartsOn)&&void 0!==i?i:null===(c=u.locale)||void 0===c||null===(d=c.options)||void 0===d?void 0:d.weekStartsOn)&&void 0!==r?r:0);if(!(p>=0&&p<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");var h=xD(e),m=gD(t),f=((m%7+7)%7<p?7:0)+m-h.getUTCDay();return h.setUTCDate(h.getUTCDate()+f),h}var VL=function(e){p(n,e);var t=VN(n);function n(){var e;a(this,n);for(var r=arguments.length,i=new Array(r),o=0;o<r;o++)i[o]=arguments[o];return e=t.call.apply(t,[this].concat(i)),(0,f.A)(d(e),"priority",90),(0,f.A)(d(e),"incompatibleTokens",["D","i","e","c","t","T"]),e}return c(n,[{key:"parse",value:function(e,t,n){switch(t){case"E":case"EE":case"EEE":return n.day(e,{width:"abbreviated",context:"formatting"})||n.day(e,{width:"short",context:"formatting"})||n.day(e,{width:"narrow",context:"formatting"});case"EEEEE":return n.day(e,{width:"narrow",context:"formatting"});case"EEEEEE":return n.day(e,{width:"short",context:"formatting"})||n.day(e,{width:"narrow",context:"formatting"});default:return n.day(e,{width:"wide",context:"formatting"})||n.day(e,{width:"abbreviated",context:"formatting"})||n.day(e,{width:"short",context:"formatting"})||n.day(e,{width:"narrow",context:"formatting"})}}},{key:"validate",value:function(e,t){return t>=0&&t<=6}},{key:"set",value:function(e,t,n,r){return(e=UL(e,n,r)).setUTCHours(0,0,0,0),e}}]),n}(ZN),GL=function(e){p(n,e);var t=VN(n);function n(){var e;a(this,n);for(var r=arguments.length,i=new Array(r),o=0;o<r;o++)i[o]=arguments[o];return e=t.call.apply(t,[this].concat(i)),(0,f.A)(d(e),"priority",90),(0,f.A)(d(e),"incompatibleTokens",["y","R","u","q","Q","M","L","I","d","D","E","i","c","t","T"]),e}return c(n,[{key:"parse",value:function(e,t,n,r){var i=function(e){var t=7*Math.floor((e-1)/7);return(e+r.weekStartsOn+6)%7+t};switch(t){case"e":case"ee":return jL(SL(t.length,e),i);case"eo":return jL(n.ordinalNumber(e,{unit:"day"}),i);case"eee":return n.day(e,{width:"abbreviated",context:"formatting"})||n.day(e,{width:"short",context:"formatting"})||n.day(e,{width:"narrow",context:"formatting"});case"eeeee":return n.day(e,{width:"narrow",context:"formatting"});case"eeeeee":return n.day(e,{width:"short",context:"formatting"})||n.day(e,{width:"narrow",context:"formatting"});default:return n.day(e,{width:"wide",context:"formatting"})||n.day(e,{width:"abbreviated",context:"formatting"})||n.day(e,{width:"short",context:"formatting"})||n.day(e,{width:"narrow",context:"formatting"})}}},{key:"validate",value:function(e,t){return t>=0&&t<=6}},{key:"set",value:function(e,t,n,r){return(e=UL(e,n,r)).setUTCHours(0,0,0,0),e}}]),n}(ZN),qL=function(e){p(n,e);var t=VN(n);function n(){var e;a(this,n);for(var r=arguments.length,i=new Array(r),o=0;o<r;o++)i[o]=arguments[o];return e=t.call.apply(t,[this].concat(i)),(0,f.A)(d(e),"priority",90),(0,f.A)(d(e),"incompatibleTokens",["y","R","u","q","Q","M","L","I","d","D","E","i","e","t","T"]),e}return c(n,[{key:"parse",value:function(e,t,n,r){var i=function(e){var t=7*Math.floor((e-1)/7);return(e+r.weekStartsOn+6)%7+t};switch(t){case"c":case"cc":return jL(SL(t.length,e),i);case"co":return jL(n.ordinalNumber(e,{unit:"day"}),i);case"ccc":return n.day(e,{width:"abbreviated",context:"standalone"})||n.day(e,{width:"short",context:"standalone"})||n.day(e,{width:"narrow",context:"standalone"});case"ccccc":return n.day(e,{width:"narrow",context:"standalone"});case"cccccc":return n.day(e,{width:"short",context:"standalone"})||n.day(e,{width:"narrow",context:"standalone"});default:return n.day(e,{width:"wide",context:"standalone"})||n.day(e,{width:"abbreviated",context:"standalone"})||n.day(e,{width:"short",context:"standalone"})||n.day(e,{width:"narrow",context:"standalone"})}}},{key:"validate",value:function(e,t){return t>=0&&t<=6}},{key:"set",value:function(e,t,n,r){return(e=UL(e,n,r)).setUTCHours(0,0,0,0),e}}]),n}(ZN);var YL=function(e){p(n,e);var t=VN(n);function n(){var e;a(this,n);for(var r=arguments.length,i=new Array(r),o=0;o<r;o++)i[o]=arguments[o];return e=t.call.apply(t,[this].concat(i)),(0,f.A)(d(e),"priority",90),(0,f.A)(d(e),"incompatibleTokens",["y","Y","u","q","Q","M","L","w","d","D","E","e","c","t","T"]),e}return c(n,[{key:"parse",value:function(e,t,n){var r=function(e){return 0===e?7:e};switch(t){case"i":case"ii":return SL(t.length,e);case"io":return n.ordinalNumber(e,{unit:"day"});case"iii":return jL(n.day(e,{width:"abbreviated",context:"formatting"})||n.day(e,{width:"short",context:"formatting"})||n.day(e,{width:"narrow",context:"formatting"}),r);case"iiiii":return jL(n.day(e,{width:"narrow",context:"formatting"}),r);case"iiiiii":return jL(n.day(e,{width:"short",context:"formatting"})||n.day(e,{width:"narrow",context:"formatting"}),r);default:return jL(n.day(e,{width:"wide",context:"formatting"})||n.day(e,{width:"abbreviated",context:"formatting"})||n.day(e,{width:"short",context:"formatting"})||n.day(e,{width:"narrow",context:"formatting"}),r)}}},{key:"validate",value:function(e,t){return t>=1&&t<=7}},{key:"set",value:function(e,t,n){return e=function(e,t){vD(2,arguments);var n=gD(t);n%7===0&&(n-=7);var r=xD(e),i=((n%7+7)%7<1?7:0)+n-r.getUTCDay();return r.setUTCDate(r.getUTCDate()+i),r}(e,n),e.setUTCHours(0,0,0,0),e}}]),n}(ZN),ZL=function(e){p(n,e);var t=VN(n);function n(){var e;a(this,n);for(var r=arguments.length,i=new Array(r),o=0;o<r;o++)i[o]=arguments[o];return e=t.call.apply(t,[this].concat(i)),(0,f.A)(d(e),"priority",80),(0,f.A)(d(e),"incompatibleTokens",["b","B","H","k","t","T"]),e}return c(n,[{key:"parse",value:function(e,t,n){switch(t){case"a":case"aa":case"aaa":return n.dayPeriod(e,{width:"abbreviated",context:"formatting"})||n.dayPeriod(e,{width:"narrow",context:"formatting"});case"aaaaa":return n.dayPeriod(e,{width:"narrow",context:"formatting"});default:return n.dayPeriod(e,{width:"wide",context:"formatting"})||n.dayPeriod(e,{width:"abbreviated",context:"formatting"})||n.dayPeriod(e,{width:"narrow",context:"formatting"})}}},{key:"set",value:function(e,t,n){return e.setUTCHours(kL(n),0,0,0),e}}]),n}(ZN),KL=function(e){p(n,e);var t=VN(n);function n(){var e;a(this,n);for(var r=arguments.length,i=new Array(r),o=0;o<r;o++)i[o]=arguments[o];return e=t.call.apply(t,[this].concat(i)),(0,f.A)(d(e),"priority",80),(0,f.A)(d(e),"incompatibleTokens",["a","B","H","k","t","T"]),e}return c(n,[{key:"parse",value:function(e,t,n){switch(t){case"b":case"bb":case"bbb":return n.dayPeriod(e,{width:"abbreviated",context:"formatting"})||n.dayPeriod(e,{width:"narrow",context:"formatting"});case"bbbbb":return n.dayPeriod(e,{width:"narrow",context:"formatting"});default:return n.dayPeriod(e,{width:"wide",context:"formatting"})||n.dayPeriod(e,{width:"abbreviated",context:"formatting"})||n.dayPeriod(e,{width:"narrow",context:"formatting"})}}},{key:"set",value:function(e,t,n){return e.setUTCHours(kL(n),0,0,0),e}}]),n}(ZN),XL=function(e){p(n,e);var t=VN(n);function n(){var e;a(this,n);for(var r=arguments.length,i=new Array(r),o=0;o<r;o++)i[o]=arguments[o];return e=t.call.apply(t,[this].concat(i)),(0,f.A)(d(e),"priority",80),(0,f.A)(d(e),"incompatibleTokens",["a","b","t","T"]),e}return c(n,[{key:"parse",value:function(e,t,n){switch(t){case"B":case"BB":case"BBB":return n.dayPeriod(e,{width:"abbreviated",context:"formatting"})||n.dayPeriod(e,{width:"narrow",context:"formatting"});case"BBBBB":return n.dayPeriod(e,{width:"narrow",context:"formatting"});default:return n.dayPeriod(e,{width:"wide",context:"formatting"})||n.dayPeriod(e,{width:"abbreviated",context:"formatting"})||n.dayPeriod(e,{width:"narrow",context:"formatting"})}}},{key:"set",value:function(e,t,n){return e.setUTCHours(kL(n),0,0,0),e}}]),n}(ZN),QL=function(e){p(n,e);var t=VN(n);function n(){var e;a(this,n);for(var r=arguments.length,i=new Array(r),o=0;o<r;o++)i[o]=arguments[o];return e=t.call.apply(t,[this].concat(i)),(0,f.A)(d(e),"priority",70),(0,f.A)(d(e),"incompatibleTokens",["H","K","k","t","T"]),e}return c(n,[{key:"parse",value:function(e,t,n){switch(t){case"h":return _L(iL,e);case"ho":return n.ordinalNumber(e,{unit:"hour"});default:return SL(t.length,e)}}},{key:"validate",value:function(e,t){return t>=1&&t<=12}},{key:"set",value:function(e,t,n){var r=e.getUTCHours()>=12;return r&&n<12?e.setUTCHours(n+12,0,0,0):r||12!==n?e.setUTCHours(n,0,0,0):e.setUTCHours(0,0,0,0),e}}]),n}(ZN),JL=function(e){p(n,e);var t=VN(n);function n(){var e;a(this,n);for(var r=arguments.length,i=new Array(r),o=0;o<r;o++)i[o]=arguments[o];return e=t.call.apply(t,[this].concat(i)),(0,f.A)(d(e),"priority",70),(0,f.A)(d(e),"incompatibleTokens",["a","b","h","K","k","t","T"]),e}return c(n,[{key:"parse",value:function(e,t,n){switch(t){case"H":return _L(tL,e);case"Ho":return n.ordinalNumber(e,{unit:"hour"});default:return SL(t.length,e)}}},{key:"validate",value:function(e,t){return t>=0&&t<=23}},{key:"set",value:function(e,t,n){return e.setUTCHours(n,0,0,0),e}}]),n}(ZN),eI=function(e){p(n,e);var t=VN(n);function n(){var e;a(this,n);for(var r=arguments.length,i=new Array(r),o=0;o<r;o++)i[o]=arguments[o];return e=t.call.apply(t,[this].concat(i)),(0,f.A)(d(e),"priority",70),(0,f.A)(d(e),"incompatibleTokens",["h","H","k","t","T"]),e}return c(n,[{key:"parse",value:function(e,t,n){switch(t){case"K":return _L(rL,e);case"Ko":return n.ordinalNumber(e,{unit:"hour"});default:return SL(t.length,e)}}},{key:"validate",value:function(e,t){return t>=0&&t<=11}},{key:"set",value:function(e,t,n){return e.getUTCHours()>=12&&n<12?e.setUTCHours(n+12,0,0,0):e.setUTCHours(n,0,0,0),e}}]),n}(ZN),tI=function(e){p(n,e);var t=VN(n);function n(){var e;a(this,n);for(var r=arguments.length,i=new Array(r),o=0;o<r;o++)i[o]=arguments[o];return e=t.call.apply(t,[this].concat(i)),(0,f.A)(d(e),"priority",70),(0,f.A)(d(e),"incompatibleTokens",["a","b","h","H","K","t","T"]),e}return c(n,[{key:"parse",value:function(e,t,n){switch(t){case"k":return _L(nL,e);case"ko":return n.ordinalNumber(e,{unit:"hour"});default:return SL(t.length,e)}}},{key:"validate",value:function(e,t){return t>=1&&t<=24}},{key:"set",value:function(e,t,n){var r=n<=24?n%24:n;return e.setUTCHours(r,0,0,0),e}}]),n}(ZN),nI=function(e){p(n,e);var t=VN(n);function n(){var e;a(this,n);for(var r=arguments.length,i=new Array(r),o=0;o<r;o++)i[o]=arguments[o];return e=t.call.apply(t,[this].concat(i)),(0,f.A)(d(e),"priority",60),(0,f.A)(d(e),"incompatibleTokens",["t","T"]),e}return c(n,[{key:"parse",value:function(e,t,n){switch(t){case"m":return _L(oL,e);case"mo":return n.ordinalNumber(e,{unit:"minute"});default:return SL(t.length,e)}}},{key:"validate",value:function(e,t){return t>=0&&t<=59}},{key:"set",value:function(e,t,n){return e.setUTCMinutes(n,0,0),e}}]),n}(ZN),rI=function(e){p(n,e);var t=VN(n);function n(){var e;a(this,n);for(var r=arguments.length,i=new Array(r),o=0;o<r;o++)i[o]=arguments[o];return e=t.call.apply(t,[this].concat(i)),(0,f.A)(d(e),"priority",50),(0,f.A)(d(e),"incompatibleTokens",["t","T"]),e}return c(n,[{key:"parse",value:function(e,t,n){switch(t){case"s":return _L(aL,e);case"so":return n.ordinalNumber(e,{unit:"second"});default:return SL(t.length,e)}}},{key:"validate",value:function(e,t){return t>=0&&t<=59}},{key:"set",value:function(e,t,n){return e.setUTCSeconds(n,0),e}}]),n}(ZN),iI=function(e){p(n,e);var t=VN(n);function n(){var e;a(this,n);for(var r=arguments.length,i=new Array(r),o=0;o<r;o++)i[o]=arguments[o];return e=t.call.apply(t,[this].concat(i)),(0,f.A)(d(e),"priority",30),(0,f.A)(d(e),"incompatibleTokens",["t","T"]),e}return c(n,[{key:"parse",value:function(e,t){return jL(SL(t.length,e),function(e){return Math.floor(e*Math.pow(10,3-t.length))})}},{key:"set",value:function(e,t,n){return e.setUTCMilliseconds(n),e}}]),n}(ZN),oI=function(e){p(n,e);var t=VN(n);function n(){var e;a(this,n);for(var r=arguments.length,i=new Array(r),o=0;o<r;o++)i[o]=arguments[o];return e=t.call.apply(t,[this].concat(i)),(0,f.A)(d(e),"priority",10),(0,f.A)(d(e),"incompatibleTokens",["t","T","x"]),e}return c(n,[{key:"parse",value:function(e,t){switch(t){case"X":return CL(gL,e);case"XX":return CL(vL,e);case"XXXX":return CL(xL,e);case"XXXXX":return CL(bL,e);default:return CL(yL,e)}}},{key:"set",value:function(e,t,n){return t.timestampIsSet?e:new Date(e.getTime()-n)}}]),n}(ZN),aI=function(e){p(n,e);var t=VN(n);function n(){var e;a(this,n);for(var r=arguments.length,i=new Array(r),o=0;o<r;o++)i[o]=arguments[o];return e=t.call.apply(t,[this].concat(i)),(0,f.A)(d(e),"priority",10),(0,f.A)(d(e),"incompatibleTokens",["t","T","X"]),e}return c(n,[{key:"parse",value:function(e,t){switch(t){case"x":return CL(gL,e);case"xx":return CL(vL,e);case"xxxx":return CL(xL,e);case"xxxxx":return CL(bL,e);default:return CL(yL,e)}}},{key:"set",value:function(e,t,n){return t.timestampIsSet?e:new Date(e.getTime()-n)}}]),n}(ZN),sI=function(e){p(n,e);var t=VN(n);function n(){var e;a(this,n);for(var r=arguments.length,i=new Array(r),o=0;o<r;o++)i[o]=arguments[o];return e=t.call.apply(t,[this].concat(i)),(0,f.A)(d(e),"priority",40),(0,f.A)(d(e),"incompatibleTokens","*"),e}return c(n,[{key:"parse",value:function(e){return wL(e)}},{key:"set",value:function(e,t,n){return[new Date(1e3*n),{timestampIsSet:!0}]}}]),n}(ZN),lI=function(e){p(n,e);var t=VN(n);function n(){var e;a(this,n);for(var r=arguments.length,i=new Array(r),o=0;o<r;o++)i[o]=arguments[o];return e=t.call.apply(t,[this].concat(i)),(0,f.A)(d(e),"priority",20),(0,f.A)(d(e),"incompatibleTokens","*"),e}return c(n,[{key:"parse",value:function(e){return wL(e)}},{key:"set",value:function(e,t,n){return[new Date(n),{timestampIsSet:!0}]}}]),n}(ZN),cI={G:new KN,y:new ML,Y:new OL,R:new RL,u:new PL,Q:new DL,q:new NL,M:new LL,L:new IL,w:new FL,I:new $L,d:new HL,D:new WL,E:new VL,e:new GL,c:new qL,i:new YL,a:new ZL,b:new KL,B:new XL,h:new QL,H:new JL,K:new eI,k:new tI,m:new nI,s:new rI,S:new iI,X:new oI,x:new aI,t:new sI,T:new lI},dI=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,uI=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,pI=/^'([^]*?)'?$/,hI=/''/g,mI=/\S/,fI=/[a-zA-Z]/;function gI(e,t,n,r){var i,a,s,l,c,d,u,p,h,m,f,g,v,x,y,b,j,_;vD(3,arguments);var C=String(e),w=String(t),S=FD(),A=null!==(i=null!==(a=null===r||void 0===r?void 0:r.locale)&&void 0!==a?a:S.locale)&&void 0!==i?i:MN;if(!A.match)throw new RangeError("locale must contain match property");var k=gD(null!==(s=null!==(l=null!==(c=null!==(d=null===r||void 0===r?void 0:r.firstWeekContainsDate)&&void 0!==d?d:null===r||void 0===r||null===(u=r.locale)||void 0===u||null===(p=u.options)||void 0===p?void 0:p.firstWeekContainsDate)&&void 0!==c?c:S.firstWeekContainsDate)&&void 0!==l?l:null===(h=S.locale)||void 0===h||null===(m=h.options)||void 0===m?void 0:m.firstWeekContainsDate)&&void 0!==s?s:1);if(!(k>=1&&k<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var T=gD(null!==(f=null!==(g=null!==(v=null!==(x=null===r||void 0===r?void 0:r.weekStartsOn)&&void 0!==x?x:null===r||void 0===r||null===(y=r.locale)||void 0===y||null===(b=y.options)||void 0===b?void 0:b.weekStartsOn)&&void 0!==v?v:S.weekStartsOn)&&void 0!==g?g:null===(j=S.locale)||void 0===j||null===(_=j.options)||void 0===_?void 0:_.weekStartsOn)&&void 0!==f?f:0);if(!(T>=0&&T<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");if(""===w)return""===C?xD(n):new Date(NaN);var E,M={firstWeekContainsDate:k,weekStartsOn:T,locale:A},O=[new YN],R=w.match(uI).map(function(e){var t=e[0];return t in pN?(0,pN[t])(e,A.formatLong):e}).join("").match(dI),P=[],D=HN(R);try{var N=function(){var t=E.value;null!==r&&void 0!==r&&r.useAdditionalWeekYearTokens||!gN(t)||vN(t,w,e),null!==r&&void 0!==r&&r.useAdditionalDayOfYearTokens||!fN(t)||vN(t,w,e);var n=t[0],i=cI[n];if(i){var o=i.incompatibleTokens;if(Array.isArray(o)){var a=P.find(function(e){return o.includes(e.token)||e.token===n});if(a)throw new RangeError("The format string mustn't contain `".concat(a.fullToken,"` and `").concat(t,"` at the same time"))}else if("*"===i.incompatibleTokens&&P.length>0)throw new RangeError("The format string mustn't contain `".concat(t,"` and any other token at the same time"));P.push({token:n,fullToken:t});var s=i.run(C,t,A.match,M);if(!s)return{v:new Date(NaN)};O.push(s.setter),C=s.rest}else{if(n.match(fI))throw new RangeError("Format string contains an unescaped latin alphabet character `"+n+"`");if("''"===t?t="'":"'"===n&&(t=t.match(pI)[1].replace(hI,"'")),0!==C.indexOf(t))return{v:new Date(NaN)};C=C.slice(t.length)}};for(D.s();!(E=D.n()).done;){var L=N();if("object"===(0,o.A)(L))return L.v}}catch(V){D.e(V)}finally{D.f()}if(C.length>0&&mI.test(C))return new Date(NaN);var I=O.map(function(e){return e.priority}).sort(function(e,t){return t-e}).filter(function(e,t,n){return n.indexOf(e)===t}).map(function(e){return O.filter(function(t){return t.priority===e}).sort(function(e,t){return t.subPriority-e.subPriority})}).map(function(e){return e[0]}),F=xD(n);if(isNaN(F.getTime()))return new Date(NaN);var $,B=HD(F,MD(F)),z={},H=HN(I);try{for(H.s();!($=H.n()).done;){var W=$.value;if(!W.validate(B,M))return new Date(NaN);var U=W.set(B,z,M);Array.isArray(U)?(B=U[0],WN(z,U[1])):B=U}}catch(V){H.e(V)}finally{H.f()}return B}function vI(e){vD(1,arguments);var t=xD(e);return t.setDate(1),t.setHours(0,0,0,0),t}function xI(e,t){var n,r,i,o,a,s,l,c;vD(1,arguments);var d=FD(),u=gD(null!==(n=null!==(r=null!==(i=null!==(o=null===t||void 0===t?void 0:t.weekStartsOn)&&void 0!==o?o:null===t||void 0===t||null===(a=t.locale)||void 0===a||null===(s=a.options)||void 0===s?void 0:s.weekStartsOn)&&void 0!==i?i:d.weekStartsOn)&&void 0!==r?r:null===(l=d.locale)||void 0===l||null===(c=l.options)||void 0===c?void 0:c.weekStartsOn)&&void 0!==n?n:0);if(!(u>=0&&u<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");var p=xD(e),h=p.getDay(),m=(h<u?7:0)+h-u;return p.setDate(p.getDate()-m),p.setHours(0,0,0,0),p}function yI(e){vD(1,arguments);var t=xD(e),n=new Date(0);return n.setFullYear(t.getFullYear(),0,1),n.setHours(0,0,0,0),n}function bI(e,t){var n;vD(1,arguments);var r=gD(null!==(n=null===t||void 0===t?void 0:t.additionalDigits)&&void 0!==n?n:2);if(2!==r&&1!==r&&0!==r)throw new RangeError("additionalDigits must be 0, 1 or 2");if("string"!==typeof e&&"[object String]"!==Object.prototype.toString.call(e))return new Date(NaN);var i,o=function(e){var t,n={},r=e.split(jI.dateTimeDelimiter);if(r.length>2)return n;/:/.test(r[0])?t=r[0]:(n.date=r[0],t=r[1],jI.timeZoneDelimiter.test(n.date)&&(n.date=e.split(jI.timeZoneDelimiter)[0],t=e.substr(n.date.length,e.length)));if(t){var i=jI.timezone.exec(t);i?(n.time=t.replace(i[1],""),n.timezone=i[1]):n.time=t}return n}(e);if(o.date){var a=function(e,t){var n=new RegExp("^(?:(\\d{4}|[+-]\\d{"+(4+t)+"})|(\\d{2}|[+-]\\d{"+(2+t)+"})$)"),r=e.match(n);if(!r)return{year:NaN,restDateString:""};var i=r[1]?parseInt(r[1]):null,o=r[2]?parseInt(r[2]):null;return{year:null===o?i:100*o,restDateString:e.slice((r[1]||r[2]).length)}}(o.date,r);i=function(e,t){if(null===t)return new Date(NaN);var n=e.match(_I);if(!n)return new Date(NaN);var r=!!n[4],i=SI(n[1]),o=SI(n[2])-1,a=SI(n[3]),s=SI(n[4]),l=SI(n[5])-1;if(r)return function(e,t,n){return t>=1&&t<=53&&n>=0&&n<=6}(0,s,l)?function(e,t,n){var r=new Date(0);r.setUTCFullYear(e,0,4);var i=r.getUTCDay()||7,o=7*(t-1)+n+1-i;return r.setUTCDate(r.getUTCDate()+o),r}(t,s,l):new Date(NaN);var c=new Date(0);return function(e,t,n){return t>=0&&t<=11&&n>=1&&n<=(kI[t]||(TI(e)?29:28))}(t,o,a)&&function(e,t){return t>=1&&t<=(TI(e)?366:365)}(t,i)?(c.setUTCFullYear(t,o,Math.max(i,a)),c):new Date(NaN)}(a.restDateString,a.year)}if(!i||isNaN(i.getTime()))return new Date(NaN);var s,l=i.getTime(),c=0;if(o.time&&(c=function(e){var t=e.match(CI);if(!t)return NaN;var n=AI(t[1]),r=AI(t[2]),i=AI(t[3]);if(!function(e,t,n){if(24===e)return 0===t&&0===n;return n>=0&&n<60&&t>=0&&t<60&&e>=0&&e<25}(n,r,i))return NaN;return n*ND+r*DD+1e3*i}(o.time),isNaN(c)))return new Date(NaN);if(!o.timezone){var d=new Date(l+c),u=new Date(0);return u.setFullYear(d.getUTCFullYear(),d.getUTCMonth(),d.getUTCDate()),u.setHours(d.getUTCHours(),d.getUTCMinutes(),d.getUTCSeconds(),d.getUTCMilliseconds()),u}return s=function(e){if("Z"===e)return 0;var t=e.match(wI);if(!t)return 0;var n="+"===t[1]?-1:1,r=parseInt(t[2]),i=t[3]&&parseInt(t[3])||0;if(!function(e,t){return t>=0&&t<=59}(0,i))return NaN;return n*(r*ND+i*DD)}(o.timezone),isNaN(s)?new Date(NaN):new Date(l+c+s)}var jI={dateTimeDelimiter:/[T ]/,timeZoneDelimiter:/[Z ]/i,timezone:/([Z+-].*)$/},_I=/^-?(?:(\d{3})|(\d{2})(?:-?(\d{2}))?|W(\d{2})(?:-?(\d{1}))?|)$/,CI=/^(\d{2}(?:[.,]\d*)?)(?::?(\d{2}(?:[.,]\d*)?))?(?::?(\d{2}(?:[.,]\d*)?))?$/,wI=/^([+-])(\d{2})(?::?(\d{2}))?$/;function SI(e){return e?parseInt(e):1}function AI(e){return e&&parseFloat(e.replace(",","."))||0}var kI=[31,null,31,30,31,30,31,31,30,31,30,31];function TI(e){return e%400===0||e%4===0&&e%100!==0}var EI=n(66723),MI=n.n(EI);const OI={dayOfMonth:"d",fullDate:"PP",fullDateWithWeekday:"PPPP",fullDateTime:"PP p",fullDateTime12h:"PP hh:mm aaa",fullDateTime24h:"PP HH:mm",fullTime:"p",fullTime12h:"hh:mm aaa",fullTime24h:"HH:mm",hours12h:"hh",hours24h:"HH",keyboardDate:"P",keyboardDateTime:"P p",keyboardDateTime12h:"P hh:mm aaa",keyboardDateTime24h:"P HH:mm",minutes:"mm",month:"LLLL",monthAndDate:"MMMM d",monthAndYear:"LLLL yyyy",monthShort:"MMM",weekday:"EEEE",weekdayShort:"EEE",normalDate:"d MMMM",normalDateWithWeekday:"EEE, MMM d",seconds:"ss",shortDate:"MMM d",year:"yyyy"};class RI{constructor(){let{locale:e,formats:t}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.lib="date-fns",this.is12HourCycleInCurrentLocale=()=>{var e;return!this.locale||/a/.test(null===(e=this.locale.formatLong)||void 0===e?void 0:e.time())},this.getFormatHelperText=e=>{var t,n;const r=this.locale||EN;return null!==(n=null===(t=e.match(/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g))||void 0===t?void 0:t.map(e=>{const t=e[0];if("p"===t||"P"===t){return(0,MI()[t])(e,r.formatLong,{})}return e}).join("").replace(/(aaa|aa|a)/g,"(a|p)m").toLocaleLowerCase())&&void 0!==n?n:e},this.parseISO=e=>bI(e),this.toISO=e=>function(e,t){var n,r;vD(1,arguments);var i=xD(e);if(isNaN(i.getTime()))throw new RangeError("Invalid time value");var o=String(null!==(n=null===t||void 0===t?void 0:t.format)&&void 0!==n?n:"extended"),a=String(null!==(r=null===t||void 0===t?void 0:t.representation)&&void 0!==r?r:"complete");if("extended"!==o&&"basic"!==o)throw new RangeError("format must be 'extended' or 'basic'");if("date"!==a&&"time"!==a&&"complete"!==a)throw new RangeError("representation must be 'date', 'time', or 'complete'");var s="",l="",c="extended"===o?"-":"",d="extended"===o?":":"";if("time"!==a){var u=ZD(i.getDate(),2),p=ZD(i.getMonth()+1,2),h=ZD(i.getFullYear(),4);s="".concat(h).concat(c).concat(p).concat(c).concat(u)}if("date"!==a){var m=i.getTimezoneOffset();if(0!==m){var f=Math.abs(m),g=ZD(Math.floor(f/60),2),v=ZD(f%60,2);l="".concat(m<0?"+":"-").concat(g,":").concat(v)}else l="Z";var x=""===s?"":"T",y=[ZD(i.getHours(),2),ZD(i.getMinutes(),2),ZD(i.getSeconds(),2)].join(d);s="".concat(s).concat(x).concat(y).concat(l)}return s}(e,{format:"extended"}),this.getCurrentLocaleCode=()=>{var e;return(null===(e=this.locale)||void 0===e?void 0:e.code)||"en-US"},this.addSeconds=(e,t)=>function(e,t){return vD(2,arguments),bD(e,1e3*gD(t))}(e,t),this.addMinutes=(e,t)=>function(e,t){return vD(2,arguments),bD(e,6e4*gD(t))}(e,t),this.addHours=(e,t)=>function(e,t){return vD(2,arguments),bD(e,36e5*gD(t))}(e,t),this.addDays=(e,t)=>yD(e,t),this.addWeeks=(e,t)=>function(e,t){return vD(2,arguments),yD(e,7*gD(t))}(e,t),this.addMonths=(e,t)=>jD(e,t),this.addYears=(e,t)=>_D(e,t),this.isValid=e=>zD(this.date(e)),this.getDiff=(e,t,n)=>{var r;const i=null!==(r=this.date(t))&&void 0!==r?r:e;if(!this.isValid(i))return 0;switch(n){case"years":return wD(e,i);case"quarters":return function(e,t,n){vD(2,arguments);var r=kD(e,t)/3;return ED(null===n||void 0===n?void 0:n.roundingMethod)(r)}(e,i);case"months":return kD(e,i);case"weeks":return function(e,t,n){vD(2,arguments);var r=PD(e,t)/7;return ED(null===n||void 0===n?void 0:n.roundingMethod)(r)}(e,i);case"days":return PD(e,i);case"hours":return function(e,t,n){vD(2,arguments);var r=LD(e,t)/ND;return ED(null===n||void 0===n?void 0:n.roundingMethod)(r)}(e,i);case"minutes":return function(e,t,n){vD(2,arguments);var r=LD(e,t)/DD;return ED(null===n||void 0===n?void 0:n.roundingMethod)(r)}(e,i);case"seconds":return function(e,t,n){vD(2,arguments);var r=LD(e,t)/1e3;return ED(null===n||void 0===n?void 0:n.roundingMethod)(r)}(e,i);default:return LD(e,i)}},this.isAfter=(e,t)=>$N(e,t),this.isBefore=(e,t)=>BN(e,t),this.startOfDay=e=>OD(e),this.endOfDay=e=>SD(e),this.getHours=e=>function(e){return vD(1,arguments),xD(e).getHours()}(e),this.setHours=(e,t)=>function(e,t){vD(2,arguments);var n=xD(e),r=gD(t);return n.setHours(r),n}(e,t),this.setMinutes=(e,t)=>function(e,t){vD(2,arguments);var n=xD(e),r=gD(t);return n.setMinutes(r),n}(e,t),this.getSeconds=e=>function(e){return vD(1,arguments),xD(e).getSeconds()}(e),this.setSeconds=(e,t)=>function(e,t){vD(2,arguments);var n=xD(e),r=gD(t);return n.setSeconds(r),n}(e,t),this.isSameDay=(e,t)=>function(e,t){vD(2,arguments);var n=OD(e),r=OD(t);return n.getTime()===r.getTime()}(e,t),this.isSameMonth=(e,t)=>function(e,t){vD(2,arguments);var n=xD(e),r=xD(t);return n.getFullYear()===r.getFullYear()&&n.getMonth()===r.getMonth()}(e,t),this.isSameYear=(e,t)=>function(e,t){vD(2,arguments);var n=xD(e),r=xD(t);return n.getFullYear()===r.getFullYear()}(e,t),this.isSameHour=(e,t)=>function(e,t){vD(2,arguments);var n=zN(e),r=zN(t);return n.getTime()===r.getTime()}(e,t),this.startOfYear=e=>yI(e),this.endOfYear=e=>BD(e),this.startOfMonth=e=>vI(e),this.endOfMonth=e=>AD(e),this.startOfWeek=e=>xI(e,{locale:this.locale}),this.endOfWeek=e=>$D(e,{locale:this.locale}),this.getYear=e=>function(e){return vD(1,arguments),xD(e).getFullYear()}(e),this.setYear=(e,t)=>function(e,t){vD(2,arguments);var n=xD(e),r=gD(t);return isNaN(n.getTime())?new Date(NaN):(n.setFullYear(r),n)}(e,t),this.date=e=>"undefined"===typeof e?new Date:null===e?null:new Date(e),this.toJsDate=e=>e,this.parse=(e,t)=>""===e?null:gI(e,t,new Date,{locale:this.locale}),this.format=(e,t)=>this.formatByString(e,this.formats[t]),this.formatByString=(e,t)=>LN(e,t,{locale:this.locale}),this.isEqual=(e,t)=>null===e&&null===t||function(e,t){vD(2,arguments);var n=xD(e),r=xD(t);return n.getTime()===r.getTime()}(e,t),this.isNull=e=>null===e,this.isAfterDay=(e,t)=>$N(e,SD(t)),this.isBeforeDay=(e,t)=>BN(e,OD(t)),this.isBeforeYear=(e,t)=>BN(e,yI(t)),this.isAfterYear=(e,t)=>$N(e,BD(t)),this.isWithinRange=(e,t)=>{let[n,r]=t;return function(e,t){vD(2,arguments);var n=xD(e).getTime(),r=xD(t.start).getTime(),i=xD(t.end).getTime();if(!(r<=i))throw new RangeError("Invalid interval");return n>=r&&n<=i}(e,{start:n,end:r})},this.formatNumber=e=>e,this.getMinutes=e=>function(e){return vD(1,arguments),xD(e).getMinutes()}(e),this.getDate=e=>function(e){return vD(1,arguments),xD(e).getDate()}(e),this.setDate=(e,t)=>function(e,t){vD(2,arguments);var n=xD(e),r=gD(t);return n.setDate(r),n}(e,t),this.getMonth=e=>function(e){return vD(1,arguments),xD(e).getMonth()}(e),this.getDaysInMonth=e=>FN(e),this.setMonth=(e,t)=>function(e,t){vD(2,arguments);var n=xD(e),r=gD(t),i=n.getFullYear(),o=n.getDate(),a=new Date(0);a.setFullYear(i,r,15),a.setHours(0,0,0,0);var s=FN(a);return n.setMonth(r,Math.min(o,s)),n}(e,t),this.getMeridiemText=e=>"am"===e?"AM":"PM",this.getNextMonth=e=>jD(e,1),this.getPreviousMonth=e=>jD(e,-1),this.getMonthArray=e=>{const t=[yI(e)];for(;t.length<12;){const e=t[t.length-1];t.push(this.getNextMonth(e))}return t},this.mergeDateAndTime=(e,t)=>this.setSeconds(this.setMinutes(this.setHours(e,this.getHours(t)),this.getMinutes(t)),this.getSeconds(t)),this.getWeekdays=()=>{const e=new Date;return function(e,t){var n;vD(1,arguments);var r=e||{},i=xD(r.start),o=xD(r.end).getTime();if(!(i.getTime()<=o))throw new RangeError("Invalid interval");var a=[],s=i;s.setHours(0,0,0,0);var l=Number(null!==(n=null===t||void 0===t?void 0:t.step)&&void 0!==n?n:1);if(l<1||isNaN(l))throw new RangeError("`options.step` must be a number greater than 1");for(;s.getTime()<=o;)a.push(xD(s)),s.setDate(s.getDate()+l),s.setHours(0,0,0,0);return a}({start:xI(e,{locale:this.locale}),end:$D(e,{locale:this.locale})}).map(e=>this.formatByString(e,"EEEEEE"))},this.getWeekArray=e=>{const t=xI(vI(e),{locale:this.locale}),n=$D(AD(e),{locale:this.locale});let r=0,i=t;const o=[];let a=null;for(;BN(i,n);){const e=Math.floor(r/7);o[e]=o[e]||[];const t=IN(i);a!==t&&(a=t,o[e].push(i),r+=1),i=yD(i,1)}return o},this.getYearRange=(e,t)=>{const n=yI(e),r=BD(t),i=[];let o=n;for(;BN(o,r);)i.push(o),o=_D(o,1);return i},this.locale=e,this.formats=Object.assign({},OI,t)}isBeforeMonth(e,t){return BN(e,vI(t))}isAfterMonth(e,t){return $N(e,vI(t))}}const PI={y:"year",yy:"year",yyy:"year",yyyy:"year",MMMM:"month",MM:"month",DD:"day",d:"day",dd:"day",H:"hour",HH:"hour",h:"hour",hh:"hour",mm:"minute",ss:"second",a:"am-pm",aa:"am-pm",aaa:"am-pm"};class DI extends RI{constructor(){super(...arguments),this.formatTokenMap=PI,this.expandFormat=e=>e.match(/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g).map(e=>{const t=e[0];if("p"===t||"P"===t){return(0,MI()[t])(e,(this.locale||EN).formatLong,{})}return e}).join(""),this.getFormatHelperText=e=>this.expandFormat(e).replace(/(aaa|aa|a)/g,"(a|p)m").toLocaleLowerCase()}}var NI=function(e){return function(e){return!!e&&"object"===typeof e}(e)&&!function(e){var t=Object.prototype.toString.call(e);return"[object RegExp]"===t||"[object Date]"===t||function(e){return e.$$typeof===LI}(e)}(e)};var LI="function"===typeof Symbol&&Symbol.for?Symbol.for("react.element"):60103;function II(e,t){return!1!==t.clone&&t.isMergeableObject(e)?$I((n=e,Array.isArray(n)?[]:{}),e,t):e;var n}function FI(e,t,n){return e.concat(t).map(function(e){return II(e,n)})}function $I(e,t,n){(n=n||{}).arrayMerge=n.arrayMerge||FI,n.isMergeableObject=n.isMergeableObject||NI;var r=Array.isArray(t);return r===Array.isArray(e)?r?n.arrayMerge(e,t,n):function(e,t,n){var r={};return n.isMergeableObject(e)&&Object.keys(e).forEach(function(t){r[t]=II(e[t],n)}),Object.keys(t).forEach(function(i){n.isMergeableObject(t[i])&&e[i]?r[i]=$I(e[i],t[i],n):r[i]=II(t[i],n)}),r}(e,t,n):II(t,n)}$I.all=function(e,t){if(!Array.isArray(e))throw new Error("first argument should be an array");return e.reduce(function(e,n){return $I(e,n,t)},{})};const BI=$I;const zI="object"==typeof global&&global&&global.Object===Object&&global;var HI="object"==typeof self&&self&&self.Object===Object&&self;const WI=zI||HI||Function("return this")();const UI=WI.Symbol;var VI=Object.prototype,GI=VI.hasOwnProperty,qI=VI.toString,YI=UI?UI.toStringTag:void 0;const ZI=function(e){var t=GI.call(e,YI),n=e[YI];try{e[YI]=void 0;var r=!0}catch(Ca){}var i=qI.call(e);return r&&(t?e[YI]=n:delete e[YI]),i};var KI=Object.prototype.toString;const XI=function(e){return KI.call(e)};var QI=UI?UI.toStringTag:void 0;const JI=function(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":QI&&QI in Object(e)?ZI(e):XI(e)};const eF=function(e,t){return function(n){return e(t(n))}};const tF=eF(Object.getPrototypeOf,Object);const nF=function(e){return null!=e&&"object"==typeof e};var rF=Function.prototype,iF=Object.prototype,oF=rF.toString,aF=iF.hasOwnProperty,sF=oF.call(Object);const lF=function(e){if(!nF(e)||"[object Object]"!=JI(e))return!1;var t=tF(e);if(null===t)return!0;var n=aF.call(t,"constructor")&&t.constructor;return"function"==typeof n&&n instanceof n&&oF.call(n)==sF};const cF=function(){this.__data__=[],this.size=0};const dF=function(e,t){return e===t||e!==e&&t!==t};const uF=function(e,t){for(var n=e.length;n--;)if(dF(e[n][0],t))return n;return-1};var pF=Array.prototype.splice;const hF=function(e){var t=this.__data__,n=uF(t,e);return!(n<0)&&(n==t.length-1?t.pop():pF.call(t,n,1),--this.size,!0)};const mF=function(e){var t=this.__data__,n=uF(t,e);return n<0?void 0:t[n][1]};const fF=function(e){return uF(this.__data__,e)>-1};const gF=function(e,t){var n=this.__data__,r=uF(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this};function vF(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}vF.prototype.clear=cF,vF.prototype.delete=hF,vF.prototype.get=mF,vF.prototype.has=fF,vF.prototype.set=gF;const xF=vF;const yF=function(){this.__data__=new xF,this.size=0};const bF=function(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n};const jF=function(e){return this.__data__.get(e)};const _F=function(e){return this.__data__.has(e)};const CF=function(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)};const wF=function(e){if(!CF(e))return!1;var t=JI(e);return"[object Function]"==t||"[object GeneratorFunction]"==t||"[object AsyncFunction]"==t||"[object Proxy]"==t};const SF=WI["__core-js_shared__"];var AF=function(){var e=/[^.]+$/.exec(SF&&SF.keys&&SF.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}();const kF=function(e){return!!AF&&AF in e};var TF=Function.prototype.toString;const EF=function(e){if(null!=e){try{return TF.call(e)}catch(Ca){}try{return e+""}catch(Ca){}}return""};var MF=/^\[object .+?Constructor\]$/,OF=Function.prototype,RF=Object.prototype,PF=OF.toString,DF=RF.hasOwnProperty,NF=RegExp("^"+PF.call(DF).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");const LF=function(e){return!(!CF(e)||kF(e))&&(wF(e)?NF:MF).test(EF(e))};const IF=function(e,t){return null==e?void 0:e[t]};const FF=function(e,t){var n=IF(e,t);return LF(n)?n:void 0};const $F=FF(WI,"Map");const BF=FF(Object,"create");const zF=function(){this.__data__=BF?BF(null):{},this.size=0};const HF=function(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t};var WF=Object.prototype.hasOwnProperty;const UF=function(e){var t=this.__data__;if(BF){var n=t[e];return"__lodash_hash_undefined__"===n?void 0:n}return WF.call(t,e)?t[e]:void 0};var VF=Object.prototype.hasOwnProperty;const GF=function(e){var t=this.__data__;return BF?void 0!==t[e]:VF.call(t,e)};const qF=function(e,t){var n=this.__data__;return this.size+=this.has(e)?0:1,n[e]=BF&&void 0===t?"__lodash_hash_undefined__":t,this};function YF(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}YF.prototype.clear=zF,YF.prototype.delete=HF,YF.prototype.get=UF,YF.prototype.has=GF,YF.prototype.set=qF;const ZF=YF;const KF=function(){this.size=0,this.__data__={hash:new ZF,map:new($F||xF),string:new ZF}};const XF=function(e){var t=typeof e;return"string"==t||"number"==t||"symbol"==t||"boolean"==t?"__proto__"!==e:null===e};const QF=function(e,t){var n=e.__data__;return XF(t)?n["string"==typeof t?"string":"hash"]:n.map};const JF=function(e){var t=QF(this,e).delete(e);return this.size-=t?1:0,t};const e$=function(e){return QF(this,e).get(e)};const t$=function(e){return QF(this,e).has(e)};const n$=function(e,t){var n=QF(this,e),r=n.size;return n.set(e,t),this.size+=n.size==r?0:1,this};function r$(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}r$.prototype.clear=KF,r$.prototype.delete=JF,r$.prototype.get=e$,r$.prototype.has=t$,r$.prototype.set=n$;const i$=r$;const o$=function(e,t){var n=this.__data__;if(n instanceof xF){var r=n.__data__;if(!$F||r.length<199)return r.push([e,t]),this.size=++n.size,this;n=this.__data__=new i$(r)}return n.set(e,t),this.size=n.size,this};function a$(e){var t=this.__data__=new xF(e);this.size=t.size}a$.prototype.clear=yF,a$.prototype.delete=bF,a$.prototype.get=jF,a$.prototype.has=_F,a$.prototype.set=o$;const s$=a$;const l$=function(e,t){for(var n=-1,r=null==e?0:e.length;++n<r&&!1!==t(e[n],n,e););return e};const c$=function(){try{var e=FF(Object,"defineProperty");return e({},"",{}),e}catch(Ca){}}();const d$=function(e,t,n){"__proto__"==t&&c$?c$(e,t,{configurable:!0,enumerable:!0,value:n,writable:!0}):e[t]=n};var u$=Object.prototype.hasOwnProperty;const p$=function(e,t,n){var r=e[t];u$.call(e,t)&&dF(r,n)&&(void 0!==n||t in e)||d$(e,t,n)};const h$=function(e,t,n,r){var i=!n;n||(n={});for(var o=-1,a=t.length;++o<a;){var s=t[o],l=r?r(n[s],e[s],s,n,e):void 0;void 0===l&&(l=e[s]),i?d$(n,s,l):p$(n,s,l)}return n};const m$=function(e,t){for(var n=-1,r=Array(e);++n<e;)r[n]=t(n);return r};const f$=function(e){return nF(e)&&"[object Arguments]"==JI(e)};var g$=Object.prototype,v$=g$.hasOwnProperty,x$=g$.propertyIsEnumerable,y$=f$(function(){return arguments}())?f$:function(e){return nF(e)&&v$.call(e,"callee")&&!x$.call(e,"callee")};const b$=y$;const j$=Array.isArray;const _$=function(){return!1};var C$="object"==typeof exports&&exports&&!exports.nodeType&&exports,w$=C$&&"object"==typeof module&&module&&!module.nodeType&&module,S$=w$&&w$.exports===C$?WI.Buffer:void 0;const A$=(S$?S$.isBuffer:void 0)||_$;var k$=/^(?:0|[1-9]\d*)$/;const T$=function(e,t){var n=typeof e;return!!(t=null==t?9007199254740991:t)&&("number"==n||"symbol"!=n&&k$.test(e))&&e>-1&&e%1==0&&e<t};const E$=function(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=9007199254740991};var M$={};M$["[object Float32Array]"]=M$["[object Float64Array]"]=M$["[object Int8Array]"]=M$["[object Int16Array]"]=M$["[object Int32Array]"]=M$["[object Uint8Array]"]=M$["[object Uint8ClampedArray]"]=M$["[object Uint16Array]"]=M$["[object Uint32Array]"]=!0,M$["[object Arguments]"]=M$["[object Array]"]=M$["[object ArrayBuffer]"]=M$["[object Boolean]"]=M$["[object DataView]"]=M$["[object Date]"]=M$["[object Error]"]=M$["[object Function]"]=M$["[object Map]"]=M$["[object Number]"]=M$["[object Object]"]=M$["[object RegExp]"]=M$["[object Set]"]=M$["[object String]"]=M$["[object WeakMap]"]=!1;const O$=function(e){return nF(e)&&E$(e.length)&&!!M$[JI(e)]};const R$=function(e){return function(t){return e(t)}};var P$="object"==typeof exports&&exports&&!exports.nodeType&&exports,D$=P$&&"object"==typeof module&&module&&!module.nodeType&&module,N$=D$&&D$.exports===P$&&zI.process;const L$=function(){try{var e=D$&&D$.require&&D$.require("util").types;return e||N$&&N$.binding&&N$.binding("util")}catch(Ca){}}();var I$=L$&&L$.isTypedArray;const F$=I$?R$(I$):O$;var $$=Object.prototype.hasOwnProperty;const B$=function(e,t){var n=j$(e),r=!n&&b$(e),i=!n&&!r&&A$(e),o=!n&&!r&&!i&&F$(e),a=n||r||i||o,s=a?m$(e.length,String):[],l=s.length;for(var c in e)!t&&!$$.call(e,c)||a&&("length"==c||i&&("offset"==c||"parent"==c)||o&&("buffer"==c||"byteLength"==c||"byteOffset"==c)||T$(c,l))||s.push(c);return s};var z$=Object.prototype;const H$=function(e){var t=e&&e.constructor;return e===("function"==typeof t&&t.prototype||z$)};const W$=eF(Object.keys,Object);var U$=Object.prototype.hasOwnProperty;const V$=function(e){if(!H$(e))return W$(e);var t=[];for(var n in Object(e))U$.call(e,n)&&"constructor"!=n&&t.push(n);return t};const G$=function(e){return null!=e&&E$(e.length)&&!wF(e)};const q$=function(e){return G$(e)?B$(e):V$(e)};const Y$=function(e,t){return e&&h$(t,q$(t),e)};const Z$=function(e){var t=[];if(null!=e)for(var n in Object(e))t.push(n);return t};var K$=Object.prototype.hasOwnProperty;const X$=function(e){if(!CF(e))return Z$(e);var t=H$(e),n=[];for(var r in e)("constructor"!=r||!t&&K$.call(e,r))&&n.push(r);return n};const Q$=function(e){return G$(e)?B$(e,!0):X$(e)};const J$=function(e,t){return e&&h$(t,Q$(t),e)};var eB="object"==typeof exports&&exports&&!exports.nodeType&&exports,tB=eB&&"object"==typeof module&&module&&!module.nodeType&&module,nB=tB&&tB.exports===eB?WI.Buffer:void 0,rB=nB?nB.allocUnsafe:void 0;const iB=function(e,t){if(t)return e.slice();var n=e.length,r=rB?rB(n):new e.constructor(n);return e.copy(r),r};const oB=function(e,t){var n=-1,r=e.length;for(t||(t=Array(r));++n<r;)t[n]=e[n];return t};const aB=function(e,t){for(var n=-1,r=null==e?0:e.length,i=0,o=[];++n<r;){var a=e[n];t(a,n,e)&&(o[i++]=a)}return o};const sB=function(){return[]};var lB=Object.prototype.propertyIsEnumerable,cB=Object.getOwnPropertySymbols,dB=cB?function(e){return null==e?[]:(e=Object(e),aB(cB(e),function(t){return lB.call(e,t)}))}:sB;const uB=dB;const pB=function(e,t){return h$(e,uB(e),t)};const hB=function(e,t){for(var n=-1,r=t.length,i=e.length;++n<r;)e[i+n]=t[n];return e};var mB=Object.getOwnPropertySymbols?function(e){for(var t=[];e;)hB(t,uB(e)),e=tF(e);return t}:sB;const fB=mB;const gB=function(e,t){return h$(e,fB(e),t)};const vB=function(e,t,n){var r=t(e);return j$(e)?r:hB(r,n(e))};const xB=function(e){return vB(e,q$,uB)};const yB=function(e){return vB(e,Q$,fB)};const bB=FF(WI,"DataView");const jB=FF(WI,"Promise");const _B=FF(WI,"Set");const CB=FF(WI,"WeakMap");var wB="[object Map]",SB="[object Promise]",AB="[object Set]",kB="[object WeakMap]",TB="[object DataView]",EB=EF(bB),MB=EF($F),OB=EF(jB),RB=EF(_B),PB=EF(CB),DB=JI;(bB&&DB(new bB(new ArrayBuffer(1)))!=TB||$F&&DB(new $F)!=wB||jB&&DB(jB.resolve())!=SB||_B&&DB(new _B)!=AB||CB&&DB(new CB)!=kB)&&(DB=function(e){var t=JI(e),n="[object Object]"==t?e.constructor:void 0,r=n?EF(n):"";if(r)switch(r){case EB:return TB;case MB:return wB;case OB:return SB;case RB:return AB;case PB:return kB}return t});const NB=DB;var LB=Object.prototype.hasOwnProperty;const IB=function(e){var t=e.length,n=new e.constructor(t);return t&&"string"==typeof e[0]&&LB.call(e,"index")&&(n.index=e.index,n.input=e.input),n};const FB=WI.Uint8Array;const $B=function(e){var t=new e.constructor(e.byteLength);return new FB(t).set(new FB(e)),t};const BB=function(e,t){var n=t?$B(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.byteLength)};var zB=/\w*$/;const HB=function(e){var t=new e.constructor(e.source,zB.exec(e));return t.lastIndex=e.lastIndex,t};var WB=UI?UI.prototype:void 0,UB=WB?WB.valueOf:void 0;const VB=function(e){return UB?Object(UB.call(e)):{}};const GB=function(e,t){var n=t?$B(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.length)};const qB=function(e,t,n){var r=e.constructor;switch(t){case"[object ArrayBuffer]":return $B(e);case"[object Boolean]":case"[object Date]":return new r(+e);case"[object DataView]":return BB(e,n);case"[object Float32Array]":case"[object Float64Array]":case"[object Int8Array]":case"[object Int16Array]":case"[object Int32Array]":case"[object Uint8Array]":case"[object Uint8ClampedArray]":case"[object Uint16Array]":case"[object Uint32Array]":return GB(e,n);case"[object Map]":case"[object Set]":return new r;case"[object Number]":case"[object String]":return new r(e);case"[object RegExp]":return HB(e);case"[object Symbol]":return VB(e)}};var YB=Object.create,ZB=function(){function e(){}return function(t){if(!CF(t))return{};if(YB)return YB(t);e.prototype=t;var n=new e;return e.prototype=void 0,n}}();const KB=ZB;const XB=function(e){return"function"!=typeof e.constructor||H$(e)?{}:KB(tF(e))};const QB=function(e){return nF(e)&&"[object Map]"==NB(e)};var JB=L$&&L$.isMap;const ez=JB?R$(JB):QB;const tz=function(e){return nF(e)&&"[object Set]"==NB(e)};var nz=L$&&L$.isSet;const rz=nz?R$(nz):tz;var iz="[object Arguments]",oz="[object Function]",az="[object Object]",sz={};sz[iz]=sz["[object Array]"]=sz["[object ArrayBuffer]"]=sz["[object DataView]"]=sz["[object Boolean]"]=sz["[object Date]"]=sz["[object Float32Array]"]=sz["[object Float64Array]"]=sz["[object Int8Array]"]=sz["[object Int16Array]"]=sz["[object Int32Array]"]=sz["[object Map]"]=sz["[object Number]"]=sz[az]=sz["[object RegExp]"]=sz["[object Set]"]=sz["[object String]"]=sz["[object Symbol]"]=sz["[object Uint8Array]"]=sz["[object Uint8ClampedArray]"]=sz["[object Uint16Array]"]=sz["[object Uint32Array]"]=!0,sz["[object Error]"]=sz[oz]=sz["[object WeakMap]"]=!1;const lz=function e(t,n,r,i,o,a){var s,l=1&n,c=2&n,d=4&n;if(r&&(s=o?r(t,i,o,a):r(t)),void 0!==s)return s;if(!CF(t))return t;var u=j$(t);if(u){if(s=IB(t),!l)return oB(t,s)}else{var p=NB(t),h=p==oz||"[object GeneratorFunction]"==p;if(A$(t))return iB(t,l);if(p==az||p==iz||h&&!o){if(s=c||h?{}:XB(t),!l)return c?gB(t,J$(s,t)):pB(t,Y$(s,t))}else{if(!sz[p])return o?t:{};s=qB(t,p,l)}}a||(a=new s$);var m=a.get(t);if(m)return m;a.set(t,s),rz(t)?t.forEach(function(i){s.add(e(i,n,r,i,t,a))}):ez(t)&&t.forEach(function(i,o){s.set(o,e(i,n,r,o,t,a))});var f=u?void 0:(d?c?yB:xB:c?Q$:q$)(t);return l$(f||t,function(i,o){f&&(i=t[o=i]),p$(s,o,e(i,n,r,o,t,a))}),s};const cz=function(e){return lz(e,5)};var dz=n(66366),uz=n.n(dz);const pz=function(e,t){};const hz=function(e){return lz(e,4)};const mz=function(e,t){for(var n=-1,r=null==e?0:e.length,i=Array(r);++n<r;)i[n]=t(e[n],n,e);return i};const fz=function(e){return"symbol"==typeof e||nF(e)&&"[object Symbol]"==JI(e)};function gz(e,t){if("function"!=typeof e||null!=t&&"function"!=typeof t)throw new TypeError("Expected a function");var n=function(){var r=arguments,i=t?t.apply(this,r):r[0],o=n.cache;if(o.has(i))return o.get(i);var a=e.apply(this,r);return n.cache=o.set(i,a)||o,a};return n.cache=new(gz.Cache||i$),n}gz.Cache=i$;const vz=gz;const xz=function(e){var t=vz(e,function(e){return 500===n.size&&n.clear(),e}),n=t.cache;return t};var yz=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,bz=/\\(\\)?/g,jz=xz(function(e){var t=[];return 46===e.charCodeAt(0)&&t.push(""),e.replace(yz,function(e,n,r,i){t.push(r?i.replace(bz,"$1"):n||e)}),t});const _z=jz;const Cz=function(e){if("string"==typeof e||fz(e))return e;var t=e+"";return"0"==t&&1/e==-1/0?"-0":t};var wz=UI?UI.prototype:void 0,Sz=wz?wz.toString:void 0;const Az=function e(t){if("string"==typeof t)return t;if(j$(t))return mz(t,e)+"";if(fz(t))return Sz?Sz.call(t):"";var n=t+"";return"0"==n&&1/t==-1/0?"-0":n};const kz=function(e){return null==e?"":Az(e)};const Tz=function(e){return j$(e)?mz(e,Cz):fz(e)?[e]:oB(_z(kz(e)))};function Ez(){return Ez=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Ez.apply(this,arguments)}function Mz(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,e.__proto__=t}function Oz(e,t){if(null==e)return{};var n,r,i={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(i[n]=e[n]);return i}function Rz(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}var Pz=(0,We.createContext)(void 0);Pz.displayName="FormikContext";var Dz=Pz.Provider,Nz=Pz.Consumer;function Lz(){var e=(0,We.useContext)(Pz);return e||pz(!1),e}var Iz=function(e){return Array.isArray(e)&&0===e.length},Fz=function(e){return"function"===typeof e},$z=function(e){return null!==e&&"object"===typeof e},Bz=function(e){return String(Math.floor(Number(e)))===e},zz=function(e){return"[object String]"===Object.prototype.toString.call(e)},Hz=function(e){return 0===We.Children.count(e)},Wz=function(e){return $z(e)&&Fz(e.then)};function Uz(e,t,n,r){void 0===r&&(r=0);for(var i=Tz(t);e&&r<i.length;)e=e[i[r++]];return r===i.length||e?void 0===e?n:e:n}function Vz(e,t,n){for(var r=hz(e),i=r,o=0,a=Tz(t);o<a.length-1;o++){var s=a[o],l=Uz(e,a.slice(0,o+1));if(l&&($z(l)||Array.isArray(l)))i=i[s]=hz(l);else{var c=a[o+1];i=i[s]=Bz(c)&&Number(c)>=0?[]:{}}}return(0===o?e:i)[a[o]]===n?e:(void 0===n?delete i[a[o]]:i[a[o]]=n,0===o&&void 0===n&&delete r[a[o]],r)}function Gz(e,t,n,r){void 0===n&&(n=new WeakMap),void 0===r&&(r={});for(var i=0,o=Object.keys(e);i<o.length;i++){var a=o[i],s=e[a];$z(s)?n.get(s)||(n.set(s,!0),r[a]=Array.isArray(s)?[]:{},Gz(s,t,n,r[a])):r[a]=t}return r}var qz={},Yz={};function Zz(e){var t=e.validateOnChange,n=void 0===t||t,r=e.validateOnBlur,i=void 0===r||r,o=e.validateOnMount,a=void 0!==o&&o,s=e.isInitialValid,l=e.enableReinitialize,c=void 0!==l&&l,d=e.onSubmit,u=Oz(e,["validateOnChange","validateOnBlur","validateOnMount","isInitialValid","enableReinitialize","onSubmit"]),p=Ez({validateOnChange:n,validateOnBlur:i,validateOnMount:a,onSubmit:d},u),h=(0,We.useRef)(p.initialValues),m=(0,We.useRef)(p.initialErrors||qz),f=(0,We.useRef)(p.initialTouched||Yz),g=(0,We.useRef)(p.initialStatus),v=(0,We.useRef)(!1),x=(0,We.useRef)({});(0,We.useEffect)(function(){return v.current=!0,function(){v.current=!1}},[]);var y=(0,We.useState)(0)[1],b=(0,We.useRef)({values:cz(p.initialValues),errors:cz(p.initialErrors)||qz,touched:cz(p.initialTouched)||Yz,status:cz(p.initialStatus),isSubmitting:!1,isValidating:!1,submitCount:0}),j=b.current,_=(0,We.useCallback)(function(e){var t=b.current;b.current=function(e,t){switch(t.type){case"SET_VALUES":return Ez({},e,{values:t.payload});case"SET_TOUCHED":return Ez({},e,{touched:t.payload});case"SET_ERRORS":return uz()(e.errors,t.payload)?e:Ez({},e,{errors:t.payload});case"SET_STATUS":return Ez({},e,{status:t.payload});case"SET_ISSUBMITTING":return Ez({},e,{isSubmitting:t.payload});case"SET_ISVALIDATING":return Ez({},e,{isValidating:t.payload});case"SET_FIELD_VALUE":return Ez({},e,{values:Vz(e.values,t.payload.field,t.payload.value)});case"SET_FIELD_TOUCHED":return Ez({},e,{touched:Vz(e.touched,t.payload.field,t.payload.value)});case"SET_FIELD_ERROR":return Ez({},e,{errors:Vz(e.errors,t.payload.field,t.payload.value)});case"RESET_FORM":return Ez({},e,t.payload);case"SET_FORMIK_STATE":return t.payload(e);case"SUBMIT_ATTEMPT":return Ez({},e,{touched:Gz(e.values,!0),isSubmitting:!0,submitCount:e.submitCount+1});case"SUBMIT_FAILURE":case"SUBMIT_SUCCESS":return Ez({},e,{isSubmitting:!1});default:return e}}(t,e),t!==b.current&&y(function(e){return e+1})},[]),C=(0,We.useCallback)(function(e,t){return new Promise(function(n,r){var i=p.validate(e,t);null==i?n(qz):Wz(i)?i.then(function(e){n(e||qz)},function(e){r(e)}):n(i)})},[p.validate]),w=(0,We.useCallback)(function(e,t){var n=p.validationSchema,r=Fz(n)?n(t):n,i=t&&r.validateAt?r.validateAt(t,e):function(e,t,n,r){void 0===n&&(n=!1);var i=Xz(e);return t[n?"validateSync":"validate"](i,{abortEarly:!1,context:r||i})}(e,r);return new Promise(function(e,t){i.then(function(){e(qz)},function(n){"ValidationError"===n.name?e(function(e){var t={};if(e.inner){if(0===e.inner.length)return Vz(t,e.path,e.message);var n=e.inner,r=Array.isArray(n),i=0;for(n=r?n:n[Symbol.iterator]();;){var o;if(r){if(i>=n.length)break;o=n[i++]}else{if((i=n.next()).done)break;o=i.value}var a=o;Uz(t,a.path)||(t=Vz(t,a.path,a.message))}}return t}(n)):t(n)})})},[p.validationSchema]),S=(0,We.useCallback)(function(e,t){return new Promise(function(n){return n(x.current[e].validate(t))})},[]),A=(0,We.useCallback)(function(e){var t=Object.keys(x.current).filter(function(e){return Fz(x.current[e].validate)}),n=t.length>0?t.map(function(t){return S(t,Uz(e,t))}):[Promise.resolve("DO_NOT_DELETE_YOU_WILL_BE_FIRED")];return Promise.all(n).then(function(e){return e.reduce(function(e,n,r){return"DO_NOT_DELETE_YOU_WILL_BE_FIRED"===n||n&&(e=Vz(e,t[r],n)),e},{})})},[S]),k=(0,We.useCallback)(function(e){return Promise.all([A(e),p.validationSchema?w(e):{},p.validate?C(e):{}]).then(function(e){var t=e[0],n=e[1],r=e[2];return BI.all([t,n,r],{arrayMerge:Qz})})},[p.validate,p.validationSchema,A,C,w]),T=eH(function(e){return void 0===e&&(e=j.values),_({type:"SET_ISVALIDATING",payload:!0}),k(e).then(function(e){return v.current&&(_({type:"SET_ISVALIDATING",payload:!1}),_({type:"SET_ERRORS",payload:e})),e})});(0,We.useEffect)(function(){a&&!0===v.current&&uz()(h.current,p.initialValues)&&T(h.current)},[a,T]);var E=(0,We.useCallback)(function(e){var t=e&&e.values?e.values:h.current,n=e&&e.errors?e.errors:m.current?m.current:p.initialErrors||{},r=e&&e.touched?e.touched:f.current?f.current:p.initialTouched||{},i=e&&e.status?e.status:g.current?g.current:p.initialStatus;h.current=t,m.current=n,f.current=r,g.current=i;var o=function(){_({type:"RESET_FORM",payload:{isSubmitting:!!e&&!!e.isSubmitting,errors:n,touched:r,status:i,values:t,isValidating:!!e&&!!e.isValidating,submitCount:e&&e.submitCount&&"number"===typeof e.submitCount?e.submitCount:0}})};if(p.onReset){var a=p.onReset(j.values,Y);Wz(a)?a.then(o):o()}else o()},[p.initialErrors,p.initialStatus,p.initialTouched,p.onReset]);(0,We.useEffect)(function(){!0!==v.current||uz()(h.current,p.initialValues)||c&&(h.current=p.initialValues,E(),a&&T(h.current))},[c,p.initialValues,E,a,T]),(0,We.useEffect)(function(){c&&!0===v.current&&!uz()(m.current,p.initialErrors)&&(m.current=p.initialErrors||qz,_({type:"SET_ERRORS",payload:p.initialErrors||qz}))},[c,p.initialErrors]),(0,We.useEffect)(function(){c&&!0===v.current&&!uz()(f.current,p.initialTouched)&&(f.current=p.initialTouched||Yz,_({type:"SET_TOUCHED",payload:p.initialTouched||Yz}))},[c,p.initialTouched]),(0,We.useEffect)(function(){c&&!0===v.current&&!uz()(g.current,p.initialStatus)&&(g.current=p.initialStatus,_({type:"SET_STATUS",payload:p.initialStatus}))},[c,p.initialStatus,p.initialTouched]);var M=eH(function(e){if(x.current[e]&&Fz(x.current[e].validate)){var t=Uz(j.values,e),n=x.current[e].validate(t);return Wz(n)?(_({type:"SET_ISVALIDATING",payload:!0}),n.then(function(e){return e}).then(function(t){_({type:"SET_FIELD_ERROR",payload:{field:e,value:t}}),_({type:"SET_ISVALIDATING",payload:!1})})):(_({type:"SET_FIELD_ERROR",payload:{field:e,value:n}}),Promise.resolve(n))}return p.validationSchema?(_({type:"SET_ISVALIDATING",payload:!0}),w(j.values,e).then(function(e){return e}).then(function(t){_({type:"SET_FIELD_ERROR",payload:{field:e,value:Uz(t,e)}}),_({type:"SET_ISVALIDATING",payload:!1})})):Promise.resolve()}),O=(0,We.useCallback)(function(e,t){var n=t.validate;x.current[e]={validate:n}},[]),R=(0,We.useCallback)(function(e){delete x.current[e]},[]),P=eH(function(e,t){return _({type:"SET_TOUCHED",payload:e}),(void 0===t?i:t)?T(j.values):Promise.resolve()}),D=(0,We.useCallback)(function(e){_({type:"SET_ERRORS",payload:e})},[]),N=eH(function(e,t){var r=Fz(e)?e(j.values):e;return _({type:"SET_VALUES",payload:r}),(void 0===t?n:t)?T(r):Promise.resolve()}),L=(0,We.useCallback)(function(e,t){_({type:"SET_FIELD_ERROR",payload:{field:e,value:t}})},[]),I=eH(function(e,t,r){return _({type:"SET_FIELD_VALUE",payload:{field:e,value:t}}),(void 0===r?n:r)?T(Vz(j.values,e,t)):Promise.resolve()}),F=(0,We.useCallback)(function(e,t){var n,r=t,i=e;if(!zz(e)){e.persist&&e.persist();var o=e.target?e.target:e.currentTarget,a=o.type,s=o.name,l=o.id,c=o.value,d=o.checked,u=(o.outerHTML,o.options),p=o.multiple;r=t||(s||l),i=/number|range/.test(a)?(n=parseFloat(c),isNaN(n)?"":n):/checkbox/.test(a)?function(e,t,n){if("boolean"===typeof e)return Boolean(t);var r=[],i=!1,o=-1;if(Array.isArray(e))r=e,i=(o=e.indexOf(n))>=0;else if(!n||"true"==n||"false"==n)return Boolean(t);if(t&&n&&!i)return r.concat(n);if(!i)return r;return r.slice(0,o).concat(r.slice(o+1))}(Uz(j.values,r),d,c):u&&p?function(e){return Array.from(e).filter(function(e){return e.selected}).map(function(e){return e.value})}(u):c}r&&I(r,i)},[I,j.values]),$=eH(function(e){if(zz(e))return function(t){return F(t,e)};F(e)}),B=eH(function(e,t,n){return void 0===t&&(t=!0),_({type:"SET_FIELD_TOUCHED",payload:{field:e,value:t}}),(void 0===n?i:n)?T(j.values):Promise.resolve()}),z=(0,We.useCallback)(function(e,t){e.persist&&e.persist();var n=e.target,r=n.name,i=n.id,o=(n.outerHTML,t||(r||i));B(o,!0)},[B]),H=eH(function(e){if(zz(e))return function(t){return z(t,e)};z(e)}),W=(0,We.useCallback)(function(e){Fz(e)?_({type:"SET_FORMIK_STATE",payload:e}):_({type:"SET_FORMIK_STATE",payload:function(){return e}})},[]),U=(0,We.useCallback)(function(e){_({type:"SET_STATUS",payload:e})},[]),V=(0,We.useCallback)(function(e){_({type:"SET_ISSUBMITTING",payload:e})},[]),G=eH(function(){return _({type:"SUBMIT_ATTEMPT"}),T().then(function(e){var t=e instanceof Error;if(!t&&0===Object.keys(e).length){var n;try{if(void 0===(n=Z()))return}catch(r){throw r}return Promise.resolve(n).then(function(e){return v.current&&_({type:"SUBMIT_SUCCESS"}),e}).catch(function(e){if(v.current)throw _({type:"SUBMIT_FAILURE"}),e})}if(v.current&&(_({type:"SUBMIT_FAILURE"}),t))throw e})}),q=eH(function(e){e&&e.preventDefault&&Fz(e.preventDefault)&&e.preventDefault(),e&&e.stopPropagation&&Fz(e.stopPropagation)&&e.stopPropagation(),G().catch(function(e){console.warn("Warning: An unhandled error was caught from submitForm()",e)})}),Y={resetForm:E,validateForm:T,validateField:M,setErrors:D,setFieldError:L,setFieldTouched:B,setFieldValue:I,setStatus:U,setSubmitting:V,setTouched:P,setValues:N,setFormikState:W,submitForm:G},Z=eH(function(){return d(j.values,Y)}),K=eH(function(e){e&&e.preventDefault&&Fz(e.preventDefault)&&e.preventDefault(),e&&e.stopPropagation&&Fz(e.stopPropagation)&&e.stopPropagation(),E()}),X=(0,We.useCallback)(function(e){return{value:Uz(j.values,e),error:Uz(j.errors,e),touched:!!Uz(j.touched,e),initialValue:Uz(h.current,e),initialTouched:!!Uz(f.current,e),initialError:Uz(m.current,e)}},[j.errors,j.touched,j.values]),Q=(0,We.useCallback)(function(e){return{setValue:function(t,n){return I(e,t,n)},setTouched:function(t,n){return B(e,t,n)},setError:function(t){return L(e,t)}}},[I,B,L]),J=(0,We.useCallback)(function(e){var t=$z(e),n=t?e.name:e,r=Uz(j.values,n),i={name:n,value:r,onChange:$,onBlur:H};if(t){var o=e.type,a=e.value,s=e.as,l=e.multiple;"checkbox"===o?void 0===a?i.checked=!!r:(i.checked=!(!Array.isArray(r)||!~r.indexOf(a)),i.value=a):"radio"===o?(i.checked=r===a,i.value=a):"select"===s&&l&&(i.value=i.value||[],i.multiple=!0)}return i},[H,$,j.values]),ee=(0,We.useMemo)(function(){return!uz()(h.current,j.values)},[h.current,j.values]),te=(0,We.useMemo)(function(){return"undefined"!==typeof s?ee?j.errors&&0===Object.keys(j.errors).length:!1!==s&&Fz(s)?s(p):s:j.errors&&0===Object.keys(j.errors).length},[s,ee,j.errors,p]);return Ez({},j,{initialValues:h.current,initialErrors:m.current,initialTouched:f.current,initialStatus:g.current,handleBlur:H,handleChange:$,handleReset:K,handleSubmit:q,resetForm:E,setErrors:D,setFormikState:W,setFieldTouched:B,setFieldValue:I,setFieldError:L,setStatus:U,setSubmitting:V,setTouched:P,setValues:N,submitForm:G,validateForm:T,validateField:M,isValid:te,dirty:ee,unregisterField:R,registerField:O,getFieldProps:J,getFieldMeta:X,getFieldHelpers:Q,validateOnBlur:i,validateOnChange:n,validateOnMount:a})}function Kz(e){var t=Zz(e),n=e.component,r=e.children,i=e.render,o=e.innerRef;return(0,We.useImperativeHandle)(o,function(){return t}),(0,We.createElement)(Dz,{value:t},n?(0,We.createElement)(n,t):i?i(t):r?Fz(r)?r(t):Hz(r)?null:We.Children.only(r):null)}function Xz(e){var t=Array.isArray(e)?[]:{};for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){var r=String(n);!0===Array.isArray(e[r])?t[r]=e[r].map(function(e){return!0===Array.isArray(e)||lF(e)?Xz(e):""!==e?e:void 0}):lF(e[r])?t[r]=Xz(e[r]):t[r]=""!==e[r]?e[r]:void 0}return t}function Qz(e,t,n){var r=e.slice();return t.forEach(function(t,i){if("undefined"===typeof r[i]){var o=!1!==n.clone&&n.isMergeableObject(t);r[i]=o?BI(Array.isArray(t)?[]:{},t,n):t}else n.isMergeableObject(t)?r[i]=BI(e[i],t,n):-1===e.indexOf(t)&&r.push(t)}),r}var Jz="undefined"!==typeof window&&"undefined"!==typeof window.document&&"undefined"!==typeof window.document.createElement?We.useLayoutEffect:We.useEffect;function eH(e){var t=(0,We.useRef)(e);return Jz(function(){t.current=e}),(0,We.useCallback)(function(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return t.current.apply(void 0,n)},[])}function tH(e){var t=e.validate,n=e.name,r=e.render,i=e.children,o=e.as,a=e.component,s=e.className,l=Oz(e,["validate","name","render","children","as","component","className"]),c=Oz(Lz(),["validate","validationSchema"]);var d=c.registerField,u=c.unregisterField;(0,We.useEffect)(function(){return d(n,{validate:t}),function(){u(n)}},[d,u,n,t]);var p=c.getFieldProps(Ez({name:n},l)),h=c.getFieldMeta(n),m={field:p,form:c};if(r)return r(Ez({},m,{meta:h}));if(Fz(i))return i(Ez({},m,{meta:h}));if(a){if("string"===typeof a){var f=l.innerRef,g=Oz(l,["innerRef"]);return(0,We.createElement)(a,Ez({ref:f},p,g,{className:s}),i)}return(0,We.createElement)(a,Ez({field:p,form:c},l,{className:s}),i)}var v=o||"input";if("string"===typeof v){var x=l.innerRef,y=Oz(l,["innerRef"]);return(0,We.createElement)(v,Ez({ref:x},p,y,{className:s}),i)}return(0,We.createElement)(v,Ez({},p,l,{className:s}),i)}var nH=(0,We.forwardRef)(function(e,t){var n=e.action,r=Oz(e,["action"]),i=null!=n?n:"#",o=Lz(),a=o.handleReset,s=o.handleSubmit;return(0,We.createElement)("form",Ez({onSubmit:s,ref:t,onReset:a,action:i},r))});function rH(e){var t=function(t){return(0,We.createElement)(Nz,null,function(n){return n||pz(!1),(0,We.createElement)(e,Ez({},t,{formik:n}))})},n=e.displayName||e.name||e.constructor&&e.constructor.name||"Component";return t.WrappedComponent=e,t.displayName="FormikConnect("+n+")",At()(t,e)}nH.displayName="Form";var iH=function(e,t,n){var r=oH(e);return r.splice(t,0,n),r},oH=function(e){if(e){if(Array.isArray(e))return[].concat(e);var t=Object.keys(e).map(function(e){return parseInt(e)}).reduce(function(e,t){return t>e?t:e},0);return Array.from(Ez({},e,{length:t+1}))}return[]},aH=function(e,t){var n="function"===typeof e?e:t;return function(e){if(Array.isArray(e)||$z(e)){var t=oH(e);return n(t)}return e}},sH=function(e){function t(t){var n;return(n=e.call(this,t)||this).updateArrayField=function(e,t,r){var i=n.props,o=i.name;(0,i.formik.setFormikState)(function(n){var i=aH(r,e),a=aH(t,e),s=Vz(n.values,o,e(Uz(n.values,o))),l=r?i(Uz(n.errors,o)):void 0,c=t?a(Uz(n.touched,o)):void 0;return Iz(l)&&(l=void 0),Iz(c)&&(c=void 0),Ez({},n,{values:s,errors:r?Vz(n.errors,o,l):n.errors,touched:t?Vz(n.touched,o,c):n.touched})})},n.push=function(e){return n.updateArrayField(function(t){return[].concat(oH(t),[cz(e)])},!1,!1)},n.handlePush=function(e){return function(){return n.push(e)}},n.swap=function(e,t){return n.updateArrayField(function(n){return function(e,t,n){var r=oH(e),i=r[t];return r[t]=r[n],r[n]=i,r}(n,e,t)},!0,!0)},n.handleSwap=function(e,t){return function(){return n.swap(e,t)}},n.move=function(e,t){return n.updateArrayField(function(n){return function(e,t,n){var r=oH(e),i=r[t];return r.splice(t,1),r.splice(n,0,i),r}(n,e,t)},!0,!0)},n.handleMove=function(e,t){return function(){return n.move(e,t)}},n.insert=function(e,t){return n.updateArrayField(function(n){return iH(n,e,t)},function(t){return iH(t,e,null)},function(t){return iH(t,e,null)})},n.handleInsert=function(e,t){return function(){return n.insert(e,t)}},n.replace=function(e,t){return n.updateArrayField(function(n){return function(e,t,n){var r=oH(e);return r[t]=n,r}(n,e,t)},!1,!1)},n.handleReplace=function(e,t){return function(){return n.replace(e,t)}},n.unshift=function(e){var t=-1;return n.updateArrayField(function(n){var r=n?[e].concat(n):[e];return t=r.length,r},function(e){return e?[null].concat(e):[null]},function(e){return e?[null].concat(e):[null]}),t},n.handleUnshift=function(e){return function(){return n.unshift(e)}},n.handleRemove=function(e){return function(){return n.remove(e)}},n.handlePop=function(){return function(){return n.pop()}},n.remove=n.remove.bind(Rz(n)),n.pop=n.pop.bind(Rz(n)),n}Mz(t,e);var n=t.prototype;return n.componentDidUpdate=function(e){this.props.validateOnChange&&this.props.formik.validateOnChange&&!uz()(Uz(e.formik.values,e.name),Uz(this.props.formik.values,this.props.name))&&this.props.formik.validateForm(this.props.formik.values)},n.remove=function(e){var t;return this.updateArrayField(function(n){var r=n?oH(n):[];return t||(t=r[e]),Fz(r.splice)&&r.splice(e,1),Fz(r.every)&&r.every(function(e){return void 0===e})?[]:r},!0,!0),t},n.pop=function(){var e;return this.updateArrayField(function(t){var n=t.slice();return e||(e=n&&n.pop&&n.pop()),n},!0,!0),e},n.render=function(){var e={push:this.push,pop:this.pop,swap:this.swap,move:this.move,insert:this.insert,replace:this.replace,unshift:this.unshift,remove:this.remove,handlePush:this.handlePush,handlePop:this.handlePop,handleSwap:this.handleSwap,handleMove:this.handleMove,handleInsert:this.handleInsert,handleReplace:this.handleReplace,handleUnshift:this.handleUnshift,handleRemove:this.handleRemove},t=this.props,n=t.component,r=t.render,i=t.children,o=t.name,a=Ez({},e,{form:Oz(t.formik,["validate","validationSchema"]),name:o});return n?(0,We.createElement)(n,a):r?r(a):i?"function"===typeof i?i(a):Hz(i)?null:We.Children.only(i):null},t}(We.Component);sH.defaultProps={validateOnChange:!0};var lH=rH(sH),cH=function(e){function t(){return e.apply(this,arguments)||this}Mz(t,e);var n=t.prototype;return n.shouldComponentUpdate=function(e){return Uz(this.props.formik.errors,this.props.name)!==Uz(e.formik.errors,this.props.name)||Uz(this.props.formik.touched,this.props.name)!==Uz(e.formik.touched,this.props.name)||Object.keys(this.props).length!==Object.keys(e).length},n.render=function(){var e=this.props,t=e.component,n=e.formik,r=e.render,i=e.children,o=e.name,a=Oz(e,["component","formik","render","children","name"]),s=Uz(n.touched,o),l=Uz(n.errors,o);return s&&l?r?Fz(r)?r(l):null:i?Fz(i)?i(l):null:t?(0,We.createElement)(t,a,l):l:null},t}(We.Component),dH=rH(cH);const uH=e=>{let{popoverFilter:t,handleOpenFilter:n,handleCloseFilter:r,filterState:o,setFilterState:a,pageDetails:s,fetchListFunction:l,allPrograms:c}=e;const d=wt(uu),u=null===c||void 0===c?void 0:c.find(e=>(null===e||void 0===e?void 0:e.code)===(null===o||void 0===o?void 0:o.program)),p=Boolean(t);return(0,qt.jsxs)("div",{children:[(0,qt.jsx)(op,{children:(0,qt.jsx)(xh,{"aria-describedby":"simple-popover",onClick:e=>n(e),sx:{"&:hover":{backgroundColor:"transparent"}},children:(0,qt.jsx)(wh,{sx:{"&:hover":{backgroundColor:"transparent"}},children:(0,qt.jsx)(zc,{})})})}),(0,qt.jsx)(Vm,{id:"simple-popover",open:p,anchorEl:t,onClose:()=>r(),className:"filterPopover",PaperProps:{style:{width:"600px"}},anchorOrigin:{vertical:"bottom",horizontal:"right"},transformOrigin:{vertical:"top",horizontal:"center"},children:(0,qt.jsx)(Kz,{initialValues:{event_id:"",start_date:null,end_date:null,username:"",service_code:"",program:null,description:""},enableReinitialize:!0,children:()=>(0,qt.jsx)(nH,{children:(0,qt.jsxs)(op,{sx:{p:2},children:[(0,qt.jsxs)(op,{display:"flex",alignItems:"center",justifyContent:"space-between",sx:{mb:"10px"},children:[(0,qt.jsx)(op,{sx:{flex:"0 0 160px"},children:(0,qt.jsx)(o_,{htmlFor:"display_name",required:!0,sx:{fontWeight:"500"},children:_e("rpm_UserName")})}),(0,qt.jsx)(op,{sx:{flex:"1"},children:(0,qt.jsx)(tH,{as:qj,fullWidth:!0,size:"small",variant:"outlined",name:"username",value:o.username,placeholder:_e("message:rpm_Username"),onChange:e=>{a(t=>(0,i.A)((0,i.A)({},t),{},{username:e.target.value}))},endAdornment:(0,qt.jsx)(tw,{position:"end",sx:{position:"absolute",right:"8px"},children:(0,qt.jsx)(sy,{title:_e("message:rpm_SearchByUsername"),placement:"top",children:(0,qt.jsx)(wh,{size:"small",disableRipple:!0,sx:{p:0},children:(0,qt.jsx)(pM.A,{fontSize:"small"})})})}),sx:{bgcolor:"white"}})})]}),(0,qt.jsxs)(op,{display:"flex",alignItems:"center",justifyContent:"space-between",sx:{mb:"10px"},children:[(0,qt.jsx)(op,{sx:{flex:"0 0 160px"},children:(0,qt.jsx)(o_,{htmlFor:"display_name",required:!0,sx:{fontWeight:"500"},children:_e("rpm_EventCode")})}),(0,qt.jsx)(op,{sx:{flex:"1"},children:(0,qt.jsx)(tH,{as:qj,fullWidth:!0,size:"small",variant:"outlined",name:"event_id",value:o.event_id,placeholder:_e("message:rpm_EventCode"),onChange:e=>{a(t=>(0,i.A)((0,i.A)({},t),{},{event_id:e.target.value}))},endAdornment:(0,qt.jsx)(tw,{position:"end",sx:{position:"absolute",right:"8px"},children:(0,qt.jsx)(sy,{title:_e("message:rpm_SearchByEventCode"),placement:"top",children:(0,qt.jsx)(wh,{size:"small",disableRipple:!0,sx:{p:0},children:(0,qt.jsx)(pM.A,{fontSize:"small"})})})}),sx:{bgcolor:"white"}})})]}),(0,qt.jsxs)(op,{display:"flex",alignItems:"center",justifyContent:"space-between",sx:{mb:"10px"},children:[(0,qt.jsx)(op,{sx:{flex:"0 0 160px"},children:(0,qt.jsx)(o_,{htmlFor:"display_name",required:!0,sx:{fontWeight:"500"},children:_e("rpm_Service")})}),(0,qt.jsx)(op,{sx:{flex:"1"},children:(0,qt.jsx)(tH,{as:qj,fullWidth:!0,size:"small",variant:"outlined",name:"service_code",value:o.service_code,placeholder:_e("message:rpm_ServiceCode"),onChange:e=>{a(t=>(0,i.A)((0,i.A)({},t),{},{service_code:e.target.value}))},endAdornment:(0,qt.jsx)(tw,{position:"end",sx:{position:"absolute",right:"8px"},children:(0,qt.jsx)(sy,{title:_e("message:rpm_SearchByService"),placement:"top",children:(0,qt.jsx)(wh,{size:"small",disableRipple:!0,sx:{p:0},children:(0,qt.jsx)(pM.A,{fontSize:"small"})})})}),sx:{bgcolor:"white"}})})]}),(0,qt.jsxs)(op,{display:"flex",alignItems:"center",justifyContent:"space-between",sx:{mb:"10px"},children:[(0,qt.jsx)(op,{sx:{flex:"0 0 160px"},children:(0,qt.jsx)(o_,{htmlFor:"display_name",required:!0,sx:{fontWeight:"500"},children:_e("rpm_Duration")})}),(0,qt.jsxs)(op,{sx:{flex:"1"},display:"flex",className:"durationField",children:[(0,qt.jsxs)(WM,{dateAdapter:DI,children:[(0,qt.jsx)(tH,{as:fD,size:"small",name:"start_date",value:o.start_date,renderInput:e=>(0,qt.jsx)(Q_,(0,i.A)({},e)),maxDate:new Date,onChange:e=>{a(t=>(0,i.A)((0,i.A)({},t),{},{start_date:e}))},className:"newForm-from"}),(0,qt.jsx)(op,{})]}),(0,qt.jsx)(WM,{dateAdapter:DI,children:(0,qt.jsx)(tH,{as:fD,size:"small",name:"end_date",value:o.end_date,renderInput:e=>(0,qt.jsx)(Q_,(0,i.A)({},e)),minDate:o.start_date?new Date(o.start_date):void 0,maxDate:new Date,onChange:e=>{a(t=>(0,i.A)((0,i.A)({},t),{},{end_date:e}))}})})]})]}),(0,qt.jsxs)(op,{display:"flex",alignItems:"center",justifyContent:"space-between",sx:{mb:"10px"},children:[(0,qt.jsx)(op,{sx:{flex:"0 0 160px"},children:(0,qt.jsx)(o_,{htmlFor:"display_name",required:!0,sx:{fontWeight:"500"},children:_e("rpm_Program")})}),(0,qt.jsx)(op,{sx:{flex:"1"},children:(0,qt.jsx)(aj,{fullWidth:!0,size:"small",margin:"dense",id:"program",name:"program",options:cs(c)?[]:c,isOptionEqualToValue:(e,t)=>(null===e||void 0===e?void 0:e.id)===(null===t||void 0===t?void 0:t.id),getOptionLabel:e=>null===e||void 0===e?void 0:e.display_name,renderOption:(e,t)=>(0,We.createElement)(op,(0,i.A)((0,i.A)({component:"li"},e),{},{key:t.code}),(0,qt.jsx)(op,{children:(0,qt.jsx)(Cf,{variant:"body1",component:"p",children:t.display_name})})),onChange:async(e,t,n)=>{a(e=>(0,i.A)((0,i.A)({},e),{},{program:null===t||void 0===t?void 0:t.code})),"clear"===n&&a(e=>(0,i.A)((0,i.A)({},e),{},{program:"/"}))},value:u||null,renderInput:e=>(0,qt.jsx)(Q_,(0,i.A)((0,i.A)({},e),{},{placeholder:_e("rpm_SelectProgram")+"..."}))})})]}),(0,qt.jsxs)(op,{display:"flex",alignItems:"start",justifyContent:"space-between",sx:{mb:"10px"},children:[(0,qt.jsx)(op,{sx:{flex:"0 0 160px"},children:(0,qt.jsx)(o_,{htmlFor:"display_name",required:!0,sx:{fontWeight:"500"},children:_e("rpm_Description")})}),(0,qt.jsx)(op,{sx:{flex:"1"},children:(0,qt.jsx)(tH,{as:qj,fullWidth:!0,size:"small",variant:"outlined",name:"service_code",value:o.description,placeholder:_e("message:rpm_Description"),onChange:e=>{a(t=>(0,i.A)((0,i.A)({},t),{},{description:e.target.value}))},endAdornment:(0,qt.jsx)(tw,{position:"end",sx:{position:"absolute",right:"8px"},children:(0,qt.jsx)(sy,{title:_e("message:rpm_SearchByDescription"),placement:"top",children:(0,qt.jsx)(wh,{size:"small",disableRipple:!0,sx:{p:0},children:(0,qt.jsx)(pM.A,{fontSize:"small"})})})}),sx:{bgcolor:"white"}})})]}),(0,qt.jsx)(op,{py:.5,display:"flex",alignItems:"center",justifyContent:"end",children:(0,qt.jsxs)(Ff,{container:!0,spacing:2,children:[(0,qt.jsx)(Ff,{item:!0,xs:!0}),(0,qt.jsx)(Ff,{item:!0,children:(0,qt.jsx)(xh,{color:"primary",variant:"outlined",onClick:()=>{s.current_page=1,a({event_id:"",start_date:null,end_date:null,username:"",service_code:"",program:null,description:""}),l({event_id:"",start_date:null,end_date:null,username:"",service_code:"",program:null,description:""}),r()},children:_e("rpm_Reset")})}),(0,qt.jsx)(Ff,{item:!0,children:(0,qt.jsx)(IM,{loading:d,color:"primary",disableElevation:!0,variant:"contained",type:"submit",onClick:()=>{s.current_page=1,l(o),r()},children:_e("rpm_ApplyFilters")})})]})})]})})})})]})},pH=e=>{let{order:t,orderBy:n,setOrder:r,setOrderBy:o,dataParameter:a,onCheck:s,isSelection:l,checkState:c,nodata:d,programHead:u,logHeads:p,initialHeadcells:h,setHeadcells:m,handleSettingModalToggle:f,settingModal:g,logs:v,getAuditLogs:x,pageDetails:y,filterState:b,setFilterState:j,popoverFilter:_,handleOpenFilter:C,handleCloseFilter:w,setDetailsTab:S,detailsTab:A,allPrograms:k}=e;const T=Object.values(b).every(e=>""===e||null===e),[E,M]=We.useState({}),O=Nt(),R=e=>{S(!0),(async e=>{const{data:t}=await O(Js(e));M(t)})(null===e||void 0===e?void 0:e.event_id)},P=We.useRef(null),D=()=>{const e=P.current.value;e&&window.find(e)};return(0,qt.jsxs)(op,{sx:{width:"100%"},children:[(0,qt.jsx)(op,{sx:{mb:2.5},children:(0,qt.jsx)(Ff,{container:!0,spacing:2,alignItems:"center",children:(0,qt.jsx)(Ff,{item:!0,xs:!0,children:(0,qt.jsx)(Cf,{variant:"h5",gutterBottom:!0,component:"h5",children:_e("rpm_AuditLogs")})})})}),(0,qt.jsx)(op,{bgcolor:"#fff",sx:{borderTopLeftRadius:"8px",borderTopRightRadius:"8px"},children:(0,qt.jsxs)(Ff,{container:!0,spacing:1,children:[(0,qt.jsxs)(Ff,{item:!0,xl:4,sm:9,xs:9,position:"relative",children:[(0,qt.jsx)(op,{pl:1,mb:2,position:"relative",children:(0,qt.jsx)(Ff,{container:!0,spacing:2,alignItems:"center",children:(0,qt.jsx)(Ff,{item:!0,xs:!0,children:(0,qt.jsx)(d_,{fullWidth:!0,children:(0,qt.jsx)(qj,{id:"Search",variant:"outlined",size:"small",inputRef:P,autoComplete:"search",onKeyDown:e=>(e=>{"Enter"===e.key&&D()})(e),placeholder:_e("rpm_SearchHere"),startAdornment:(0,qt.jsx)(tw,{position:"start",children:(0,qt.jsx)(wh,{onClick:()=>D(),children:(0,qt.jsx)(qC.A,{})})})})})})})}),(0,qt.jsx)(op,{position:"absolute",top:"3px",right:0,children:(0,qt.jsx)(uH,{popoverFilter:_,handleOpenFilter:C,handleCloseFilter:w,fetchListFunction:x,filterState:b,setFilterState:j,pageDetails:y,allPrograms:k})})]}),(0,qt.jsx)(Ff,{item:!0,xl:8,sm:3,xs:3,sx:{ml:"auto"},display:"flex",alignItems:"start",justifyContent:"end",children:(0,qt.jsx)(sy,{title:_e("rpm_TableCellSetting"),children:(0,qt.jsx)(sv,{sx:{boxShadow:"none",width:32,height:32,minHeight:"auto",marginRight:"10px",marginTop:"5px"},size:"small",color:"primary",onClick:f,children:(0,qt.jsx)(YC.A,{fontSize:"small",sx:{width:16,height:16}})})})}),(0,qt.jsxs)(Ff,{container:!0,spacing:1,m:1,className:"filterResults",children:[Object.entries(b).map((e,t)=>{let[n,r]=e;const o=sa()(r,["ddd MMM DD HH:mm:ss [UTC] YYYY"],!0);if(o.isValid()&&(r=o.format("DD/MM/YYYY")),"program"===n&&null!==r){const e=null===k||void 0===k?void 0:k.find(e=>(null===e||void 0===e?void 0:e.code)===r);r=null===e||void 0===e?void 0:e.display_name}if(!ps(r))return(0,qt.jsx)(Ff,{item:!0,lg:2,xs:2,children:(0,qt.jsxs)(op,{children:[(0,qt.jsx)(o_,{htmlFor:"triggerdBy",sx:{fontWeight:"500",marginBottom:"5px"},children:_e("rpm_".concat(n))}),(0,qt.jsx)(Q_,{value:r,disabled:!0,InputProps:{endAdornment:(0,qt.jsx)(tw,{position:"end",children:(0,qt.jsx)(wh,{edge:"end",onClick:()=>(e=>{const t=(0,i.A)({},b);t[e]="",j(t),x(t)})(n),children:(0,qt.jsx)(J_.A,{})})})}})]})},t)}),!T&&(0,qt.jsx)(op,{display:"flex",alignItems:"center",sx:{marginTop:"auto",marginBottom:"6px"},children:(0,qt.jsx)(xh,{color:"primary",sx:{fontWeight:"600"},onClick:()=>{y.current_page=1,j({event_id:"",start_date:null,end_date:null,username:"",service_code:"",program:null,description:""}),x({event_id:"",start_date:null,end_date:null,username:"",service_code:"",program:null,description:""})},children:_e("rpm_ClearFilters")})})]}),(0,qt.jsxs)(Ff,{item:!0,xs:12,children:[(0,qt.jsx)(op,{p:1,children:(0,qt.jsx)(UT,{order:t,orderBy:n,setOrder:r,setOrderBy:o,data:v,headCells:null===u||void 0===u?void 0:u.filter(e=>h.includes(e.id)),dataParameter:a,selected:c,setSelected:s,isSelection:l,noDataImage:d,fetchList:x,pageDetails:y,skeletonVrows:6,className:"theme_scroll",children:null===v||void 0===v?void 0:v.map(e=>(0,qt.jsxs)(cw,{sx:{"&:last-child td, &:last-child th":{border:0},bgcolor:"".concat((null===e||void 0===e?void 0:e.event_id)===(null===E||void 0===E?void 0:E.event_id)?"grey.100":"")},className:"program-tour-step0",children:[l&&(0,qt.jsx)(gw,{padding:"checkbox",children:(0,qt.jsx)(Dw,{onChange:s,checked:c.includes(e.event_id),name:e.event_id,color:"primary"})}),h.includes("eventCode")&&(0,qt.jsx)(gw,{children:(0,qt.jsx)(Lo,{className:"linkClr",onClick:()=>R(e),children:null===e||void 0===e?void 0:e.event_id})}),h.includes("serviceCode")&&(0,qt.jsx)(gw,{children:e.service_code||"NA"}),h.includes("triggeredBy")&&(0,qt.jsxs)(gw,{children:[e.principal||"NA"," "]}),h.includes("patientName")&&(0,qt.jsx)(gw,{children:!cs(null===e||void 0===e?void 0:e.attributes)&&null!==e&&void 0!==e&&e.attributes["Patient Name"]?null===e||void 0===e?void 0:e.attributes["Patient Name"]:"NA"}),h.includes("programName")&&(0,qt.jsx)(gw,{children:e.program_name||"NA"}),h.includes("timeLog")&&(0,qt.jsx)(gw,{children:sa()(null===e||void 0===e?void 0:e.event_time).format("DD-MM-YYYY hh:mm:ss a")||"NA"}),h.includes("descriptions")&&(0,qt.jsx)(gw,{children:e.description||"NA"}),h.includes("action")&&(0,qt.jsx)(gw,{children:(0,qt.jsx)(xh,{onClick:()=>R(e),children:(0,qt.jsx)(gc,{})})})]},e.event_id))})}),(0,qt.jsx)(KE,{pageDetails:y,fetchListFunction:x})]})]})}),(0,qt.jsx)(uM,{order:t,orderBy:n,setOrder:r,setOrderBy:o,dataParameter:a,checkState:c,onCheck:s,isSelection:!1,nodata:d,logHeads:p,open:A,setDetailsTab:S,logDetails:E,setDetailedLog:M}),(0,qt.jsx)(TE,{open:g,allHeadCells:u,initialHeadcells:h,setHeadcells:m,onClose:f})]})},hH=["content"],mH=()=>{const e=Nt(),t=wt(ju),{t:n}=Vg(),r=wt(cu),[o,a]=(0,We.useState)("desc"),[s,l]=(0,We.useState)("event_time"),[c,d]=(0,We.useState)([]),[u,p]=(0,We.useState)([]),[h,m]=We.useState(!1),[f,g]=We.useState(!1),[v,x]=(0,We.useState)((0,i.A)({},dd)),y=VC(JA().breakpoints.down("sm")),[b,j]=We.useState(null),[_,C]=We.useState({event_id:"",start_date:null,end_date:null,username:"",service_code:"",program:null,description:""}),[w,S]=We.useState(!1),A=y?["eventCode","serviceCode","action"]:["eventCode","serviceCode","triggeredBy","patientName","programName","timeLog","descriptions","action"],[k,T]=We.useState(cs($o.getLogsCell())?A:$o.getLogsCell()),E=function(e){T(e),$o.setLogsCell(e)},M=[{id:"eventCode",label:n("rpm_EventCode"),isSort:!1,sortProperty:"eventCode"},{id:"serviceCode",label:n("rpm_Service"),isSort:!1,sortProperty:"serviceCode"},{id:"triggeredBy",label:n("rpm_TriggeredBy"),isSort:!1,sortProperty:"triggeredBy"},{id:"patientName",label:n("rpm_Patient"),isSort:!1,sortProperty:"patientName"},{id:"programName",label:n("rpm_Program"),isSort:!1,sortProperty:"programName"},{id:"timeLog",label:n("rpm_TimeLog"),isSort:!1,sortProperty:"timeLog"},{id:"descriptions",label:n("rpm_Descriptions"),isSort:!1,sortProperty:"descriptions"},{id:"action",label:n("rpm_Actions"),isSort:!1,sortProperty:"action"}],O=[{id:"timestamp",label:n("rpm_Time"),isSort:!1,sortProperty:"timestamp"},{id:"message",label:n("rpm_Message"),isSort:!1,sortProperty:"message"},{id:"error",label:n("rpm_Error"),isSort:!1,sortProperty:"error"},{id:"attributes",label:n("rpm_Attributes"),isSort:!1,sortProperty:"attributes"}],R=async function(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:_;const n=(0,i.A)({sort_by:s,sort_order:o},v);let r=[];try{const o=await e(((e,t)=>async n=>{n(na(!0));try{var r;const o="".concat(fa.logs,"/events?&principal=").concat(null===t||void 0===t?void 0:t.username,"&startDate=").concat(null!==t&&void 0!==t&&t.start_date?sa()(t.start_date).startOf("day").valueOf():"","&endDate=").concat(null!==t&&void 0!==t&&t.end_date?sa()(t.end_date).endOf("day").valueOf():"","&eventId=").concat(null===t||void 0===t?void 0:t.event_id,"&service=").concat(null===t||void 0===t?void 0:t.service_code,"&page=").concat(e.current_page||"","&q=").concat(null!==t&&void 0!==t&&t.description?null===t||void 0===t?void 0:t.description:"","&source=").concat(null!==t&&void 0!==t&&t.program?"/RPMCORE/".concat(null===t||void 0===t?void 0:t.program,"/"):"/","&perPage=").concat(e.per_page||"","&sortBy=").concat(e.sort_by||"","&sortOrder=").concat(e.sort_order||""),a=await Iu(o,{}),{data:s}=a;let l=[];null===s||void 0===s||null===(r=s.content)||void 0===r||r.forEach(e=>{const t=null===e||void 0===e?void 0:e.source.split("/");l.push({program_code:t.length>=3?t[2]:null})});const c=await n(Qs(l));return(0,i.A)((0,i.A)({},a),{},{allProgramName:c})}catch(o){return o}finally{n(na(!1))}})(n,t)),{data:a,allProgramName:s}=o||{},l=a||{},{content:c}=l,d=Ko(l,hH);null===c||void 0===c||c.forEach((e,t)=>{var n;r.push((0,i.A)((0,i.A)({},e),{},{program_name:cs(null===s||void 0===s?void 0:s.data[t])?null:null===s||void 0===s||null===(n=s.data[t])||void 0===n?void 0:n.display_name}))}),p(r),x(e=>(0,i.A)((0,i.A)({},e),{},{last_page:null===d||void 0===d?void 0:d.last_page,current_page:null===d||void 0===d?void 0:d.current_page,from:null===d||void 0===d?void 0:d.from,per_page:null===d||void 0===d?void 0:d.per_page,to:null===d||void 0===d?void 0:d.to,total:null===d||void 0===d?void 0:d.total}))}catch(a){console.log(a)}};return We.useEffect(()=>{E(A)},[y]),We.useEffect(()=>{e(NC({activeMenuItem:"logs",heading:{}}))},[]),We.useEffect(()=>{r&&R()},[r]),(0,qt.jsx)(pH,{order:o,orderBy:s,setOrder:a,setOrderBy:l,dataParameter:"event_id",checkState:c,onCheck:e=>{if(Array.isArray(e))return d(e.map(e=>e));const t=e.target.name;c.includes(t)?d(c.filter(e=>e!==t)):d(e=>[...e,t])},isSelection:!1,nodata:GC,programHead:M,logHeads:O,initialHeadcells:k,setHeadcells:E,handleSettingModalToggle:()=>{m(!h)},settingModal:h,logs:u,getAuditLogs:R,pageDetails:v,viewButton:e=>(0,qt.jsx)(op,{children:(0,qt.jsx)(sy,{title:n("rpm_view"),children:(0,qt.jsx)(wh,{"data-id":null===e||void 0===e?void 0:e.event_id,color:"primary",sx:{bgcolor:"primary.theme.50"},onClick:()=>window.open("/rpm/logs/".concat(null===e||void 0===e?void 0:e.event_id),"_blank"),children:(0,qt.jsx)(gc,{fontSize:"small",sx:{width:16,height:16}})})})}),filterState:_,setFilterState:C,showFilterColor:w,setShowFilterColor:S,popoverFilter:b,handleOpenFilter:e=>{j(e.currentTarget)},handleCloseFilter:()=>{j(null)},detailsTab:f,setDetailsTab:g,allPrograms:t})};function fH(e){return(0,sr.Ay)("MuiCard",e)}(0,ar.A)("MuiCard",["root"]);const gH=["className","raised"],vH=(0,Vn.Ay)(yp,{name:"MuiCard",slot:"Root",overridesResolver:(e,t)=>t.root})(()=>({overflow:"hidden"})),xH=We.forwardRef(function(e,t){const n=(0,$t.b)({props:e,name:"MuiCard"}),{className:r,raised:i=!1}=n,o=(0,nn.A)(n,gH),a=(0,Ft.A)({},n,{raised:i}),s=(e=>{const{classes:t}=e;return(0,ir.A)({root:["root"]},fH,t)})(a);return(0,qt.jsx)(vH,(0,Ft.A)({className:(0,nr.A)(s.root,r),elevation:i?8:void 0,ref:t,ownerState:a},o))}),yH=xH;function bH(e){return(0,sr.Ay)("MuiCardContent",e)}(0,ar.A)("MuiCardContent",["root"]);const jH=["className","component"],_H=(0,Vn.Ay)("div",{name:"MuiCardContent",slot:"Root",overridesResolver:(e,t)=>t.root})(()=>({padding:16,"&:last-child":{paddingBottom:24}})),CH=We.forwardRef(function(e,t){const n=(0,$t.b)({props:e,name:"MuiCardContent"}),{className:r,component:i="div"}=n,o=(0,nn.A)(n,jH),a=(0,Ft.A)({},n,{component:i}),s=(e=>{const{classes:t}=e;return(0,ir.A)({root:["root"]},bH,t)})(a);return(0,qt.jsx)(_H,(0,Ft.A)({as:i,className:(0,nr.A)(s.root,r),ownerState:a,ref:t},o))}),wH=CH,SH=(0,Cy.A)((0,qt.jsx)("path",{d:"M6 10c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2zm12 0c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2zm-6 0c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2z"}),"MoreHoriz"),AH=["slots","slotProps"],kH=(0,Vn.Ay)(sh,{name:"MuiBreadcrumbCollapsed"})(e=>{let{theme:t}=e;return(0,Ft.A)({display:"flex",marginLeft:"calc(".concat(t.spacing(1)," * 0.5)"),marginRight:"calc(".concat(t.spacing(1)," * 0.5)")},"light"===t.palette.mode?{backgroundColor:t.palette.grey[100],color:t.palette.grey[700]}:{backgroundColor:t.palette.grey[700],color:t.palette.grey[100]},{borderRadius:2,"&:hover, &:focus":(0,Ft.A)({},"light"===t.palette.mode?{backgroundColor:t.palette.grey[200]}:{backgroundColor:t.palette.grey[600]}),"&:active":(0,Ft.A)({boxShadow:t.shadows[0]},"light"===t.palette.mode?{backgroundColor:(0,hp.tL)(t.palette.grey[200],.12)}:{backgroundColor:(0,hp.tL)(t.palette.grey[600],.12)})})}),TH=(0,Vn.Ay)(SH)({width:24,height:16});const EH=function(e){const{slots:t={},slotProps:n={}}=e,r=(0,nn.A)(e,AH),i=e;return(0,qt.jsx)("li",{children:(0,qt.jsx)(kH,(0,Ft.A)({focusRipple:!0},r,{ownerState:i,children:(0,qt.jsx)(TH,(0,Ft.A)({as:t.CollapsedIcon,ownerState:i},n.collapsedIcon))}))})};function MH(e){return(0,sr.Ay)("MuiBreadcrumbs",e)}const OH=(0,ar.A)("MuiBreadcrumbs",["root","ol","li","separator"]),RH=["children","className","component","slots","slotProps","expandText","itemsAfterCollapse","itemsBeforeCollapse","maxItems","separator"],PH=(0,Vn.Ay)(Cf,{name:"MuiBreadcrumbs",slot:"Root",overridesResolver:(e,t)=>[{["& .".concat(OH.li)]:t.li},t.root]})({}),DH=(0,Vn.Ay)("ol",{name:"MuiBreadcrumbs",slot:"Ol",overridesResolver:(e,t)=>t.ol})({display:"flex",flexWrap:"wrap",alignItems:"center",padding:0,margin:0,listStyle:"none"}),NH=(0,Vn.Ay)("li",{name:"MuiBreadcrumbs",slot:"Separator",overridesResolver:(e,t)=>t.separator})({display:"flex",userSelect:"none",marginLeft:8,marginRight:8});function LH(e,t,n,r){return e.reduce((i,o,a)=>(a<e.length-1?i=i.concat(o,(0,qt.jsx)(NH,{"aria-hidden":!0,className:t,ownerState:r,children:n},"separator-".concat(a))):i.push(o),i),[])}const IH=We.forwardRef(function(e,t){const n=(0,$t.b)({props:e,name:"MuiBreadcrumbs"}),{children:r,className:i,component:o="nav",slots:a={},slotProps:s={},expandText:l="Show path",itemsAfterCollapse:c=1,itemsBeforeCollapse:d=1,maxItems:u=8,separator:p="/"}=n,h=(0,nn.A)(n,RH),[m,f]=We.useState(!1),g=(0,Ft.A)({},n,{component:o,expanded:m,expandText:l,itemsAfterCollapse:c,itemsBeforeCollapse:d,maxItems:u,separator:p}),v=(e=>{const{classes:t}=e;return(0,ir.A)({root:["root"],li:["li"],ol:["ol"],separator:["separator"]},MH,t)})(g),x=Dh({elementType:a.CollapsedIcon,externalSlotProps:s.collapsedIcon,ownerState:g}),y=We.useRef(null),b=We.Children.toArray(r).filter(e=>We.isValidElement(e)).map((e,t)=>(0,qt.jsx)("li",{className:v.li,children:e},"child-".concat(t)));return(0,qt.jsx)(PH,(0,Ft.A)({ref:t,component:o,color:"text.secondary",className:(0,nr.A)(v.root,i),ownerState:g},h,{children:(0,qt.jsx)(DH,{className:v.ol,ref:y,ownerState:g,children:LH(m||u&&b.length<=u?b:(e=>d+c>=e.length?e:[...e.slice(0,d),(0,qt.jsx)(EH,{"aria-label":l,slots:{CollapsedIcon:a.CollapsedIcon},slotProps:{collapsedIcon:x},onClick:()=>{f(!0);const e=y.current.querySelector("a[href],button,[tabindex]");e&&e.focus()}},"ellipsis"),...e.slice(e.length-c,e.length)])(b),v.separator,p,g)})}))}),FH=IH;function $H(e){let{labels:t}=e;const n=so();return(0,qt.jsx)(qt.Fragment,{children:(0,qt.jsxs)(op,{display:"flex",alignItems:"center",children:[(0,qt.jsx)(wh,{size:"small",className:"back-button",onClick:()=>n(-1),sx:{bgcolor:"primary.theme.50",color:"primary.theme.500",marginRight:"16px",border:"1.5px solid #3f51b5",borderRadius:"4px",padding:"3px"},children:(0,qt.jsx)(IC.A,{sx:{fontSize:"18px"}})}),(null===t||void 0===t?void 0:t.length)>0?(0,qt.jsx)(FH,{"aria-label":"breadcrumb",className:"breadCrumbsMobile",children:null===t||void 0===t?void 0:t.map((e,n)=>(0,qt.jsxs)(qf,{component:n===t.length-1?"p":Lo,underline:n===t.length-1?"none":"hover",color:n===t.length-1?"primary":"inherit",to:n===t.length-1?"#":e.url,sx:{display:"flex",alignItems:"center"},children:[(null===e||void 0===e?void 0:e.icon)&&(0,qt.jsx)(qt.Fragment,{children:(0,qt.jsx)(op,{component:"span",pr:1,display:"inline-flex",children:null===e||void 0===e?void 0:e.icon})}),e.name]},n))}):(0,qt.jsx)(lS,{width:"40%"})]})})}$H.defaultProps={labels:[]};const BH=$H,zH=e=>{var t,n;let{order:r,orderBy:i,setOrder:o,setOrderBy:a,dataParameter:s,onCheck:l,isSelection:c,checkState:d,nodata:u,logHeads:p,logDetails:h,fetchLogById:m,programHead:f,viewButton:g,setDetailsTab:v,detailsTab:x,detailedLog:y,setDetailedLog:b,viewDetails:j}=e;const _=[{name:_e("rpm_AuditLogs"),url:ld.DOCTOR.LOGS},{name:_e("rpm_LogDetails"),url:""}];return(0,qt.jsxs)(op,{sx:{width:"100%"},children:[(0,qt.jsx)(op,{mb:2.5,children:(0,qt.jsx)(BH,{labels:_})}),(0,qt.jsx)(Ff,{container:!0,spacing:2.5,children:(0,qt.jsxs)(Ff,{item:!0,xs:12,children:[(0,qt.jsxs)(op,{sx:{mb:2.5},children:[(0,qt.jsx)(Ff,{container:!0,spacing:2,alignItems:"center",children:(0,qt.jsx)(Ff,{item:!0,xs:!0,children:(0,qt.jsxs)(Cf,{variant:"h5",component:"h5",children:[_e("rpm_LogDetails")," ",(null===h||void 0===h?void 0:h.description)&&"(".concat(h.description,")")]})})}),(0,qt.jsx)(Ff,{container:!0,spacing:2,mt:.05,children:(0,qt.jsx)(Ff,{item:!0,xs:!0,children:(0,qt.jsx)(yH,{variant:"outlined",children:(0,qt.jsx)(wH,{sx:{p:2.5},children:(0,qt.jsxs)(Ff,{container:!0,spacing:2.5,children:[(0,qt.jsx)(Ff,{item:!0,xs:12,md:4,lg:3,children:(0,qt.jsxs)(pE,{flexDirection:"column",gap:{xs:1,lg:2},children:[(0,qt.jsx)(Cf,{variant:"body1",component:"p",fontWeight:"h6.fontWeight",sx:{flex:.4},children:_e("rpm_UserPrincipal")}),(0,qt.jsx)(op,{sx:{flex:.6},children:(0,qt.jsx)(dM,{component:"span",icon:!1,severity:"info",sx:e=>({py:0,px:1,display:"inline-flex",wordBreak:"break-word",fontSize:e.spacing(1.5),fontWeight:600,"& .MuiAlert-message":{p:e.spacing(.5,0)}}),children:null===h||void 0===h?void 0:h.principal})})]})}),(0,qt.jsx)(Ff,{item:!0,xs:12,md:4,lg:3,children:(0,qt.jsxs)(pE,{flexDirection:"column",gap:{xs:1,lg:2},children:[(0,qt.jsx)(Cf,{variant:"body1",component:"p",fontWeight:"h6.fontWeight",sx:{flex:.4},children:_e("rpm_EventCode")}),(0,qt.jsx)(op,{sx:{flex:.6},children:(0,qt.jsx)(Cf,{variant:"body2",component:"p",color:"primary",sx:{wordBreak:"break-word"},children:null===h||void 0===h?void 0:h.event_id})})]})}),(0,qt.jsx)(Ff,{item:!0,xs:12,md:4,lg:3,children:(0,qt.jsxs)(pE,{flexDirection:"column",gap:{xs:1,lg:2},children:[(0,qt.jsx)(Cf,{variant:"body1",component:"p",fontWeight:"h6.fontWeight",sx:{flex:.4},children:_e("rpm_Service")}),(0,qt.jsx)(op,{sx:{flex:.6},children:(0,qt.jsx)(Cf,{variant:"body2",component:"p",color:"primary",sx:{wordBreak:"break-word"},children:null===h||void 0===h?void 0:h.service_code})})]})}),(0,qt.jsx)(Ff,{item:!0,xs:12,md:4,lg:3,children:(0,qt.jsxs)(pE,{flexDirection:"column",gap:{xs:1,lg:2},children:[(0,qt.jsx)(Cf,{variant:"body1",component:"p",fontWeight:"h6.fontWeight",sx:{flex:.4},children:_e("rpm_EventTime")}),(0,qt.jsx)(op,{sx:{flex:.6},children:(0,qt.jsx)(Cf,{variant:"body2",component:"p",color:"primary",sx:{wordBreak:"break-word"},children:sa()(null===h||void 0===h?void 0:h.event_time).format("DD-MM-YYYY hh:mm:ss a")||"NA"})})]})})]})})})})}),!cs(null===h||void 0===h?void 0:h.attributes)&&(0,qt.jsx)(Ff,{container:!0,spacing:2,mt:.05,children:(0,qt.jsxs)(Ff,{item:!0,xs:!0,children:[(0,qt.jsx)(op,{sx:{px:.5,mb:2},children:(0,qt.jsx)(Cf,{variant:"body1",component:"p",fontWeight:"h6.fontWeight",children:_e("rpm_Event_Information")})}),(0,qt.jsx)(yH,{variant:"outlined",children:(0,qt.jsx)(wH,{sx:{p:2.5},children:(0,qt.jsx)(Ff,{container:!0,spacing:2.5,children:(0,qt.jsx)(qt.Fragment,{children:Object.entries(null===h||void 0===h?void 0:h.attributes).map((e,t)=>{let[n,r]=e;const i=sa()(r,["ddd MMM DD HH:mm:ss [UTC] YYYY"],!0);return i.isValid()&&(r=i.format("DD/MM/YYYY")),(0,qt.jsx)(Ff,{item:!0,xs:12,md:4,lg:3,children:(0,qt.jsxs)(pE,{flexDirection:"column",gap:{xs:1,lg:2},children:[(0,qt.jsx)(Cf,{variant:"body1",component:"p",fontWeight:"h6.fontWeight",sx:{flex:.4,wordBreak:"break-word"},children:n}),(0,qt.jsx)(op,{sx:{flex:.6},children:(0,qt.jsx)(Cf,{variant:"body2",component:"p",sx:{wordBreak:"break-all"},children:r})})]})},t)})})})})})]})})]}),!cs(null===h||void 0===h?void 0:h.logs)&&(0,qt.jsxs)(op,{sx:{mb:2.5},children:[(0,qt.jsx)(op,{sx:{px:.5,mb:2},children:(0,qt.jsx)(Cf,{variant:"body1",component:"p",fontWeight:"h6.fontWeight",children:_e("rpm_Logs")})}),(0,qt.jsx)(op,{children:(0,qt.jsx)(UT,{order:r,orderBy:i,setOrder:o,setOrderBy:a,data:cs(null===h||void 0===h?void 0:h.logs)?[]:null===h||void 0===h?void 0:h.logs,headCells:p,dataParameter:s,selected:d,setSelected:l,isSelection:c,noDataImage:u,fetchList:m,pageDetails:{},skeletonVrows:6,className:"theme_scroll",children:null===h||void 0===h||null===(t=h.logs)||void 0===t?void 0:t.map((e,t)=>(0,qt.jsxs)(cw,{selected:d.includes(null===e||void 0===e?void 0:e.id),sx:{"&:last-child td, &:last-child th":{border:0}},children:[c&&(0,qt.jsx)(gw,{padding:"checkbox",children:(0,qt.jsx)(Dw,{onChange:l,checked:d.includes(null===e||void 0===e?void 0:e.id.toString()),name:e.id.toString(),color:"primary"})}),(0,qt.jsx)(gw,{children:sa()(null===e||void 0===e?void 0:e.timestamp).format("DD-MM-YYYY hh:mm:ss a")||"NA"}),(0,qt.jsx)(gw,{minWidth:"300px",sx:{whiteSpace:"normal",wordBreak:"break-word"},children:(null===e||void 0===e?void 0:e.message)||"NA"}),(0,qt.jsx)(gw,{children:(null===e||void 0===e?void 0:e.error)||"NA"}),(0,qt.jsx)(gw,{children:cs(null===e||void 0===e?void 0:e.attributes)?(0,qt.jsx)(Cf,{variant:"body2",component:"p",children:"NA"}):e.attributes["exception.message"]?(0,qt.jsx)(Cf,{variant:"body2",component:"p",children:e.attributes["exception.message"]}):Object.entries(e.attributes).map((e,t)=>{let[n,r]=e;return(0,qt.jsxs)(Cf,{variant:"body2",component:"p",children:[n,": ",r]},t)})})]},t))})})]}),!cs(null===h||void 0===h?void 0:h.children)&&(0,qt.jsxs)(op,{children:[(0,qt.jsx)(op,{sx:{px:.5,mb:2},children:(0,qt.jsx)(Cf,{variant:"body1",component:"p",fontWeight:"h6.fontWeight",children:_e("rpm_ChildrenLogs")})}),(0,qt.jsx)(op,{children:(0,qt.jsx)(UT,{order:r,orderBy:i,setOrder:o,setOrderBy:a,data:cs(null===h||void 0===h?void 0:h.children)?[]:null===h||void 0===h?void 0:h.children,headCells:f,dataParameter:s,selected:d,setSelected:l,isSelection:c,noDataImage:u,fetchList:m,pageDetails:{},skeletonVrows:6,className:"theme_scroll",children:null===h||void 0===h||null===(n=h.children)||void 0===n?void 0:n.map(e=>(0,qt.jsxs)(cw,{sx:{"&:last-child td, &:last-child th":{border:0},bgcolor:"".concat((null===e||void 0===e?void 0:e.event_id)===(null===y||void 0===y?void 0:y.event_id)?"grey.100":"")},className:"program-tour-step0",children:[c&&(0,qt.jsx)(gw,{padding:"checkbox",children:(0,qt.jsx)(Dw,{onChange:l,checked:d.includes(e.event_id),name:e.event_id,color:"primary"})}),(0,qt.jsx)(gw,{children:(0,qt.jsx)(Lo,{className:"linkClr",onClick:()=>j(e),children:null===e||void 0===e?void 0:e.event_id})}),(0,qt.jsx)(gw,{children:e.service_code||"NA"}),(0,qt.jsx)(gw,{children:e.principal||"NA"}),(0,qt.jsx)(gw,{children:sa()(null===e||void 0===e?void 0:e.event_time).format("DD-MM-YYYY hh:mm:ss a")||"NA"}),(0,qt.jsx)(gw,{children:e.description||"NA"}),(0,qt.jsx)(gw,{children:g(e)})]},e.event_id))})})]}),(0,qt.jsx)(uM,{order:r,orderBy:i,setOrder:o,setOrderBy:a,dataParameter:s,checkState:d,onCheck:l,isSelection:!1,nodata:u,logHeads:p,open:x,setDetailsTab:v,logDetails:y,setDetailedLog:b})]})})]})},HH=()=>{const e=Nt(),t=wt(cu),n=lo(),[r,i]=(0,We.useState)("desc"),[o,a]=(0,We.useState)("event_time"),[s,l]=(0,We.useState)([]),[c,d]=We.useState({}),[u,p]=We.useState(!1),[h,m]=We.useState({}),f=async t=>{const r=t||(null===n||void 0===n?void 0:n.eventId),{data:i}=await e(Js(r));d(i)},g=[{id:"eventCode",label:_e("rpm_EventCode"),isSort:!1,sortProperty:"eventCode"},{id:"serviceCode",label:_e("rpm_Service"),isSort:!1,sortProperty:"serviceCode"},{id:"triggeredBy",label:_e("rpm_TriggeredBy"),isSort:!1,sortProperty:"triggeredBy"},{id:"timeLog",label:_e("rpm_TimeLog"),isSort:!1,sortProperty:"timeLog"},{id:"descriptions",label:_e("rpm_Descriptions"),isSort:!1,sortProperty:"descriptions"},{id:"action",label:_e("rpm_Actions"),isSort:!1,sortProperty:"action"}],v=e=>{p(!0);const t=null===c||void 0===c?void 0:c.children.find(t=>(null===t||void 0===t?void 0:t.event_id)===(null===e||void 0===e?void 0:e.event_id));m(t)},x=[{id:"timestamp",label:_e("rpm_Time"),isSort:!1,sortProperty:"timestamp"},{id:"message",label:_e("rpm_Message"),isSort:!1,sortProperty:"message"},{id:"error",label:_e("rpm_Error"),isSort:!1,sortProperty:"error"},{id:"attributes",label:_e("rpm_Attributes"),isSort:!1,sortProperty:"attributes"}];return We.useEffect(()=>{e(NC({activeMenuItem:"logs",heading:{}}))},[]),We.useEffect(()=>{t&&null!==n&&void 0!==n&&n.eventId&&f()},[t,null===n||void 0===n?void 0:n.eventId]),(0,qt.jsx)(zH,{order:r,orderBy:o,setOrder:i,setOrderBy:a,dataParameter:"event_id",checkState:s,onCheck:e=>{if(Array.isArray(e))return l(e.map(e=>e));const t=e.target.name;s.includes(t)?l(s.filter(e=>e!==t)):l(e=>[...e,t])},isSelection:!1,nodata:GC,logHeads:x,logDetails:c,fetchLogById:f,viewButton:e=>(0,qt.jsx)(op,{children:(0,qt.jsx)(sy,{title:_e("rpm_view"),children:(0,qt.jsx)(wh,{"data-id":null===e||void 0===e?void 0:e.event_id,color:"primary",sx:{bgcolor:"primary.theme.50"},onClick:()=>v(e),children:(0,qt.jsx)(gc,{fontSize:"small",sx:{width:16,height:16}})})})}),programHead:g,detailsTab:u,setDetailsTab:p,detailedLog:h,setDetailedLog:m,viewDetails:v})};function WH(e){return(0,sr.Ay)("MuiCardActions",e)}(0,ar.A)("MuiCardActions",["root","spacing"]);const UH=["disableSpacing","className"],VH=(0,Vn.Ay)("div",{name:"MuiCardActions",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,!n.disableSpacing&&t.spacing]}})(e=>{let{ownerState:t}=e;return(0,Ft.A)({display:"flex",alignItems:"center",padding:8},!t.disableSpacing&&{"& > :not(style) ~ :not(style)":{marginLeft:8}})}),GH=We.forwardRef(function(e,t){const n=(0,$t.b)({props:e,name:"MuiCardActions"}),{disableSpacing:r=!1,className:i}=n,o=(0,nn.A)(n,UH),a=(0,Ft.A)({},n,{disableSpacing:r}),s=(e=>{const{classes:t,disableSpacing:n}=e,r={root:["root",!n&&"spacing"]};return(0,ir.A)(r,WH,t)})(a);return(0,qt.jsx)(VH,(0,Ft.A)({className:(0,nr.A)(s.root,i),ownerState:a,ref:t},o))}),qH=GH;function YH(e){return(0,sr.Ay)("MuiCardHeader",e)}const ZH=(0,ar.A)("MuiCardHeader",["root","avatar","action","content","title","subheader"]),KH=["action","avatar","className","component","disableTypography","subheader","subheaderTypographyProps","title","titleTypographyProps"],XH=(0,Vn.Ay)("div",{name:"MuiCardHeader",slot:"Root",overridesResolver:(e,t)=>(0,Ft.A)({["& .".concat(ZH.title)]:t.title,["& .".concat(ZH.subheader)]:t.subheader},t.root)})({display:"flex",alignItems:"center",padding:16}),QH=(0,Vn.Ay)("div",{name:"MuiCardHeader",slot:"Avatar",overridesResolver:(e,t)=>t.avatar})({display:"flex",flex:"0 0 auto",marginRight:16}),JH=(0,Vn.Ay)("div",{name:"MuiCardHeader",slot:"Action",overridesResolver:(e,t)=>t.action})({flex:"0 0 auto",alignSelf:"flex-start",marginTop:-4,marginRight:-8,marginBottom:-4}),eW=(0,Vn.Ay)("div",{name:"MuiCardHeader",slot:"Content",overridesResolver:(e,t)=>t.content})({flex:"1 1 auto"}),tW=We.forwardRef(function(e,t){const n=(0,$t.b)({props:e,name:"MuiCardHeader"}),{action:r,avatar:i,className:o,component:a="div",disableTypography:s=!1,subheader:l,subheaderTypographyProps:c,title:d,titleTypographyProps:u}=n,p=(0,nn.A)(n,KH),h=(0,Ft.A)({},n,{component:a,disableTypography:s}),m=(e=>{const{classes:t}=e;return(0,ir.A)({root:["root"],avatar:["avatar"],action:["action"],content:["content"],title:["title"],subheader:["subheader"]},YH,t)})(h);let f=d;null==f||f.type===Cf||s||(f=(0,qt.jsx)(Cf,(0,Ft.A)({variant:i?"body2":"h5",className:m.title,component:"span",display:"block"},u,{children:f})));let g=l;return null==g||g.type===Cf||s||(g=(0,qt.jsx)(Cf,(0,Ft.A)({variant:i?"body2":"body1",className:m.subheader,color:"text.secondary",component:"span",display:"block"},c,{children:g}))),(0,qt.jsxs)(XH,(0,Ft.A)({className:(0,nr.A)(m.root,o),as:a,ref:t,ownerState:h},p,{children:[i&&(0,qt.jsx)(QH,{className:m.avatar,ownerState:h,children:i}),(0,qt.jsxs)(eW,{className:m.content,ownerState:h,children:[f,g]}),r&&(0,qt.jsx)(JH,{className:m.action,ownerState:h,children:r})]}))}),nW=tW;var rW,iW;try{rW=Map}catch(LTe){}try{iW=Set}catch(LTe){}function oW(e,t,n){if(!e||"object"!==typeof e||"function"===typeof e)return e;if(e.nodeType&&"cloneNode"in e)return e.cloneNode(!0);if(e instanceof Date)return new Date(e.getTime());if(e instanceof RegExp)return new RegExp(e);if(Array.isArray(e))return e.map(aW);if(rW&&e instanceof rW)return new Map(Array.from(e.entries()));if(iW&&e instanceof iW)return new Set(Array.from(e.values()));if(e instanceof Object){t.push(e);var r=Object.create(e);for(var i in n.push(r),e){var o=t.findIndex(function(t){return t===e[i]});r[i]=o>-1?n[o]:oW(e[i],t,n)}return r}return e}function aW(e){return oW(e,[],[])}const sW=Object.prototype.toString,lW=Error.prototype.toString,cW=RegExp.prototype.toString,dW="undefined"!==typeof Symbol?Symbol.prototype.toString:()=>"",uW=/^Symbol\((.*)\)(.*)$/;function pW(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(null==e||!0===e||!1===e)return""+e;const n=typeof e;if("number"===n)return function(e){return e!=+e?"NaN":0===e&&1/e<0?"-0":""+e}(e);if("string"===n)return t?'"'.concat(e,'"'):e;if("function"===n)return"[Function "+(e.name||"anonymous")+"]";if("symbol"===n)return dW.call(e).replace(uW,"Symbol($1)");const r=sW.call(e).slice(8,-1);return"Date"===r?isNaN(e.getTime())?""+e:e.toISOString(e):"Error"===r||e instanceof Error?"["+lW.call(e)+"]":"RegExp"===r?cW.call(e):null}function hW(e,t){let n=pW(e,t);return null!==n?n:JSON.stringify(e,function(e,n){let r=pW(this[e],t);return null!==r?r:n},2)}let mW={default:"${path} is invalid",required:"${path} is a required field",oneOf:"${path} must be one of the following values: ${values}",notOneOf:"${path} must not be one of the following values: ${values}",notType:e=>{let{path:t,type:n,value:r,originalValue:i}=e,o=null!=i&&i!==r,a="".concat(t," must be a `").concat(n,"` type, ")+"but the final value was: `".concat(hW(r,!0),"`")+(o?" (cast from the value `".concat(hW(i,!0),"`)."):".");return null===r&&(a+='\n If "null" is intended as an empty value be sure to mark the schema as `.nullable()`'),a},defined:"${path} must be defined"},fW={length:"${path} must be exactly ${length} characters",min:"${path} must be at least ${min} characters",max:"${path} must be at most ${max} characters",matches:'${path} must match the following: "${regex}"',email:"${path} must be a valid email",url:"${path} must be a valid URL",uuid:"${path} must be a valid UUID",trim:"${path} must be a trimmed string",lowercase:"${path} must be a lowercase string",uppercase:"${path} must be a upper case string"},gW={min:"${path} must be greater than or equal to ${min}",max:"${path} must be less than or equal to ${max}",lessThan:"${path} must be less than ${less}",moreThan:"${path} must be greater than ${more}",positive:"${path} must be a positive number",negative:"${path} must be a negative number",integer:"${path} must be an integer"},vW={min:"${path} field must be later than ${min}",max:"${path} field must be at earlier than ${max}"},xW={isValue:"${path} field must be ${value}"},yW={noUnknown:"${path} field has unspecified keys: ${unknown}"},bW={min:"${path} field must have at least ${min} items",max:"${path} field must have less than or equal to ${max} items",length:"${path} must have ${length} items"};Object.assign(Object.create(null),{mixed:mW,string:fW,number:gW,date:vW,object:yW,array:bW,boolean:xW});const jW=e=>e&&e.__isYupSchema__;const _W=class{constructor(e,t){if(this.fn=void 0,this.refs=e,this.refs=e,"function"===typeof t)return void(this.fn=t);if(!Ma()(t,"is"))throw new TypeError("`is:` is required for `when()` conditions");if(!t.then&&!t.otherwise)throw new TypeError("either `then:` or `otherwise:` is required for `when()` conditions");let{is:n,then:r,otherwise:i}=t,o="function"===typeof n?n:function(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return t.every(e=>e===n)};this.fn=function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];let a=t.pop(),s=t.pop(),l=o(...t)?r:i;if(l)return"function"===typeof l?l(s):s.concat(l.resolve(a))}}resolve(e,t){let n=this.refs.map(e=>e.getValue(null==t?void 0:t.value,null==t?void 0:t.parent,null==t?void 0:t.context)),r=this.fn.apply(e,n.concat(e,t));if(void 0===r||r===e)return e;if(!jW(r))throw new TypeError("conditions must return a schema object");return r.resolve(t)}};function CW(e){return null==e?[]:[].concat(e)}function wW(){return wW=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},wW.apply(this,arguments)}let SW=/\$\{\s*(\w+)\s*\}/g;class AW extends Error{static formatError(e,t){const n=t.label||t.path||"this";return n!==t.path&&(t=wW({},t,{path:n})),"string"===typeof e?e.replace(SW,(e,n)=>hW(t[n])):"function"===typeof e?e(t):e}static isError(e){return e&&"ValidationError"===e.name}constructor(e,t,n,r){super(),this.value=void 0,this.path=void 0,this.type=void 0,this.errors=void 0,this.params=void 0,this.inner=void 0,this.name="ValidationError",this.value=t,this.path=n,this.type=r,this.errors=[],this.inner=[],CW(e).forEach(e=>{AW.isError(e)?(this.errors.push(...e.errors),this.inner=this.inner.concat(e.inner.length?e.inner:e)):this.errors.push(e)}),this.message=this.errors.length>1?"".concat(this.errors.length," errors occurred"):this.errors[0],Error.captureStackTrace&&Error.captureStackTrace(this,AW)}}function kW(e,t){let{endEarly:n,tests:r,args:i,value:o,errors:a,sort:s,path:l}=e,c=(e=>{let t=!1;return function(){t||(t=!0,e(...arguments))}})(t),d=r.length;const u=[];if(a=a||[],!d)return a.length?c(new AW(a,o,l)):c(null,o);for(let p=0;p<r.length;p++){(0,r[p])(i,function(e){if(e){if(!AW.isError(e))return c(e,o);if(n)return e.value=o,c(e,o);u.push(e)}if(--d<=0){if(u.length&&(s&&u.sort(s),a.length&&u.push(...a),a=u),a.length)return void c(new AW(a,o,l),o);c(null,o)}})}}var TW=n(91733),EW=n.n(TW),MW=n(54575);const OW="$",RW=".";function PW(e,t){return new DW(e,t)}class DW{constructor(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(this.key=void 0,this.isContext=void 0,this.isValue=void 0,this.isSibling=void 0,this.path=void 0,this.getter=void 0,this.map=void 0,"string"!==typeof e)throw new TypeError("ref must be a string, got: "+e);if(this.key=e.trim(),""===e)throw new TypeError("ref must be a non-empty string");this.isContext=this.key[0]===OW,this.isValue=this.key[0]===RW,this.isSibling=!this.isContext&&!this.isValue;let n=this.isContext?OW:this.isValue?RW:"";this.path=this.key.slice(n.length),this.getter=this.path&&(0,MW.getter)(this.path,!0),this.map=t.map}getValue(e,t,n){let r=this.isContext?n:this.isValue?e:t;return this.getter&&(r=this.getter(r||{})),this.map&&(r=this.map(r)),r}cast(e,t){return this.getValue(e,null==t?void 0:t.parent,null==t?void 0:t.context)}resolve(){return this}describe(){return{type:"ref",key:this.key}}toString(){return"Ref(".concat(this.key,")")}static isRef(e){return e&&e.__isYupRef}}function NW(){return NW=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},NW.apply(this,arguments)}function LW(e){function t(t,n){let{value:r,path:i="",label:o,options:a,originalValue:s,sync:l}=t,c=function(e,t){if(null==e)return{};var n,r,i={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(i[n]=e[n]);return i}(t,["value","path","label","options","originalValue","sync"]);const{name:d,test:u,params:p,message:h}=e;let{parent:m,context:f}=a;function g(e){return DW.isRef(e)?e.getValue(r,m,f):e}function v(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const t=EW()(NW({value:r,originalValue:s,label:o,path:e.path||i},p,e.params),g),n=new AW(AW.formatError(e.message||h,t),r,t.path,e.type||d);return n.params=t,n}let x,y=NW({path:i,parent:m,type:d,createError:v,resolve:g,options:a,originalValue:s},c);if(l){try{var b;if(x=u.call(y,r,y),"function"===typeof(null==(b=x)?void 0:b.then))throw new Error('Validation test of type: "'.concat(y.type,'" returned a Promise during a synchronous validate. ')+"This test will finish after the validate call has returned")}catch(j){return void n(j)}AW.isError(x)?n(x):x?n(null,x):n(v())}else try{Promise.resolve(u.call(y,r,y)).then(e=>{AW.isError(e)?n(e):e?n(null,e):n(v())}).catch(n)}catch(j){n(j)}}return t.OPTIONS=e,t}DW.prototype.__isYupRef=!0;function IW(e,t,n){let r,i,o,a=arguments.length>3&&void 0!==arguments[3]?arguments[3]:n;return t?((0,MW.forEach)(t,(s,l,c)=>{let d=l?(e=>e.substr(0,e.length-1).substr(1))(s):s;if((e=e.resolve({context:a,parent:r,value:n})).innerType){let i=c?parseInt(d,10):0;if(n&&i>=n.length)throw new Error("Yup.reach cannot resolve an array item at index: ".concat(s,", in the path: ").concat(t,". ")+"because there is no value at that index. ");r=n,n=n&&n[i],e=e.innerType}if(!c){if(!e.fields||!e.fields[d])throw new Error("The schema does not contain the path: ".concat(t,". ")+"(failed at: ".concat(o,' which is a type: "').concat(e._type,'")'));r=n,n=n&&n[d],e=e.fields[d]}i=d,o=l?"["+s+"]":"."+s}),{schema:e,parent:r,parentPath:i}):{parent:r,parentPath:t,schema:e}}class FW{constructor(){this.list=void 0,this.refs=void 0,this.list=new Set,this.refs=new Map}get size(){return this.list.size+this.refs.size}describe(){const e=[];for(const t of this.list)e.push(t);for(const[,t]of this.refs)e.push(t.describe());return e}toArray(){return Array.from(this.list).concat(Array.from(this.refs.values()))}resolveAll(e){return this.toArray().reduce((t,n)=>t.concat(DW.isRef(n)?e(n):n),[])}add(e){DW.isRef(e)?this.refs.set(e.key,e):this.list.add(e)}delete(e){DW.isRef(e)?this.refs.delete(e.key):this.list.delete(e)}clone(){const e=new FW;return e.list=new Set(this.list),e.refs=new Map(this.refs),e}merge(e,t){const n=this.clone();return e.list.forEach(e=>n.add(e)),e.refs.forEach(e=>n.add(e)),t.list.forEach(e=>n.delete(e)),t.refs.forEach(e=>n.delete(e)),n}}function $W(){return $W=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},$W.apply(this,arguments)}class BW{constructor(e){this.deps=[],this.tests=void 0,this.transforms=void 0,this.conditions=[],this._mutate=void 0,this._typeError=void 0,this._whitelist=new FW,this._blacklist=new FW,this.exclusiveTests=Object.create(null),this.spec=void 0,this.tests=[],this.transforms=[],this.withMutation(()=>{this.typeError(mW.notType)}),this.type=(null==e?void 0:e.type)||"mixed",this.spec=$W({strip:!1,strict:!1,abortEarly:!0,recursive:!0,nullable:!1,presence:"optional"},null==e?void 0:e.spec)}get _type(){return this.type}_typeCheck(e){return!0}clone(e){if(this._mutate)return e&&Object.assign(this.spec,e),this;const t=Object.create(Object.getPrototypeOf(this));return t.type=this.type,t._typeError=this._typeError,t._whitelistError=this._whitelistError,t._blacklistError=this._blacklistError,t._whitelist=this._whitelist.clone(),t._blacklist=this._blacklist.clone(),t.exclusiveTests=$W({},this.exclusiveTests),t.deps=[...this.deps],t.conditions=[...this.conditions],t.tests=[...this.tests],t.transforms=[...this.transforms],t.spec=aW($W({},this.spec,e)),t}label(e){let t=this.clone();return t.spec.label=e,t}meta(){if(0===arguments.length)return this.spec.meta;let e=this.clone();return e.spec.meta=Object.assign(e.spec.meta||{},arguments.length<=0?void 0:arguments[0]),e}withMutation(e){let t=this._mutate;this._mutate=!0;let n=e(this);return this._mutate=t,n}concat(e){if(!e||e===this)return this;if(e.type!==this.type&&"mixed"!==this.type)throw new TypeError("You cannot `concat()` schema's of different types: ".concat(this.type," and ").concat(e.type));let t=this,n=e.clone();const r=$W({},t.spec,n.spec);return n.spec=r,n._typeError||(n._typeError=t._typeError),n._whitelistError||(n._whitelistError=t._whitelistError),n._blacklistError||(n._blacklistError=t._blacklistError),n._whitelist=t._whitelist.merge(e._whitelist,e._blacklist),n._blacklist=t._blacklist.merge(e._blacklist,e._whitelist),n.tests=t.tests,n.exclusiveTests=t.exclusiveTests,n.withMutation(t=>{e.tests.forEach(e=>{t.test(e.OPTIONS)})}),n.transforms=[...t.transforms,...n.transforms],n}isType(e){return!(!this.spec.nullable||null!==e)||this._typeCheck(e)}resolve(e){let t=this;if(t.conditions.length){let n=t.conditions;t=t.clone(),t.conditions=[],t=n.reduce((t,n)=>n.resolve(t,e),t),t=t.resolve(e)}return t}cast(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=this.resolve($W({value:e},t)),r=n._cast(e,t);if(void 0!==e&&!1!==t.assert&&!0!==n.isType(r)){let i=hW(e),o=hW(r);throw new TypeError("The value of ".concat(t.path||"field"," could not be cast to a value ")+'that satisfies the schema type: "'.concat(n._type,'". \n\n')+"attempted value: ".concat(i," \n")+(o!==i?"result of cast: ".concat(o):""))}return r}_cast(e,t){let n=void 0===e?e:this.transforms.reduce((t,n)=>n.call(this,t,e,this),e);return void 0===n&&(n=this.getDefault()),n}_validate(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2?arguments[2]:void 0,{sync:r,path:i,from:o=[],originalValue:a=e,strict:s=this.spec.strict,abortEarly:l=this.spec.abortEarly}=t,c=e;s||(c=this._cast(c,$W({assert:!1},t)));let d={value:c,path:i,options:t,originalValue:a,schema:this,label:this.spec.label,sync:r,from:o},u=[];this._typeError&&u.push(this._typeError);let p=[];this._whitelistError&&p.push(this._whitelistError),this._blacklistError&&p.push(this._blacklistError),kW({args:d,value:c,path:i,sync:r,tests:u,endEarly:l},e=>{e?n(e,c):kW({tests:this.tests.concat(p),args:d,path:i,sync:r,value:c,endEarly:l},n)})}validate(e,t,n){let r=this.resolve($W({},t,{value:e}));return"function"===typeof n?r._validate(e,t,n):new Promise((n,i)=>r._validate(e,t,(e,t)=>{e?i(e):n(t)}))}validateSync(e,t){let n;return this.resolve($W({},t,{value:e}))._validate(e,$W({},t,{sync:!0}),(e,t)=>{if(e)throw e;n=t}),n}isValid(e,t){return this.validate(e,t).then(()=>!0,e=>{if(AW.isError(e))return!1;throw e})}isValidSync(e,t){try{return this.validateSync(e,t),!0}catch(n){if(AW.isError(n))return!1;throw n}}_getDefault(){let e=this.spec.default;return null==e?e:"function"===typeof e?e.call(this):aW(e)}getDefault(e){return this.resolve(e||{})._getDefault()}default(e){if(0===arguments.length)return this._getDefault();return this.clone({default:e})}strict(){let e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0],t=this.clone();return t.spec.strict=e,t}_isPresent(e){return null!=e}defined(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:mW.defined;return this.test({message:e,name:"defined",exclusive:!0,test:e=>void 0!==e})}required(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:mW.required;return this.clone({presence:"required"}).withMutation(t=>t.test({message:e,name:"required",exclusive:!0,test(e){return this.schema._isPresent(e)}}))}notRequired(){let e=this.clone({presence:"optional"});return e.tests=e.tests.filter(e=>"required"!==e.OPTIONS.name),e}nullable(){let e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];return this.clone({nullable:!1!==e})}transform(e){let t=this.clone();return t.transforms.push(e),t}test(){let e;if(e=1===arguments.length?"function"===typeof(arguments.length<=0?void 0:arguments[0])?{test:arguments.length<=0?void 0:arguments[0]}:arguments.length<=0?void 0:arguments[0]:2===arguments.length?{name:arguments.length<=0?void 0:arguments[0],test:arguments.length<=1?void 0:arguments[1]}:{name:arguments.length<=0?void 0:arguments[0],message:arguments.length<=1?void 0:arguments[1],test:arguments.length<=2?void 0:arguments[2]},void 0===e.message&&(e.message=mW.default),"function"!==typeof e.test)throw new TypeError("`test` is a required parameters");let t=this.clone(),n=LW(e),r=e.exclusive||e.name&&!0===t.exclusiveTests[e.name];if(e.exclusive&&!e.name)throw new TypeError("Exclusive tests must provide a unique `name` identifying the test");return e.name&&(t.exclusiveTests[e.name]=!!e.exclusive),t.tests=t.tests.filter(t=>{if(t.OPTIONS.name===e.name){if(r)return!1;if(t.OPTIONS.test===n.OPTIONS.test)return!1}return!0}),t.tests.push(n),t}when(e,t){Array.isArray(e)||"string"===typeof e||(t=e,e=".");let n=this.clone(),r=CW(e).map(e=>new DW(e));return r.forEach(e=>{e.isSibling&&n.deps.push(e.key)}),n.conditions.push(new _W(r,t)),n}typeError(e){let t=this.clone();return t._typeError=LW({message:e,name:"typeError",test(e){return!(void 0!==e&&!this.schema.isType(e))||this.createError({params:{type:this.schema._type}})}}),t}oneOf(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:mW.oneOf,n=this.clone();return e.forEach(e=>{n._whitelist.add(e),n._blacklist.delete(e)}),n._whitelistError=LW({message:t,name:"oneOf",test(e){if(void 0===e)return!0;let t=this.schema._whitelist,n=t.resolveAll(this.resolve);return!!n.includes(e)||this.createError({params:{values:t.toArray().join(", "),resolved:n}})}}),n}notOneOf(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:mW.notOneOf,n=this.clone();return e.forEach(e=>{n._blacklist.add(e),n._whitelist.delete(e)}),n._blacklistError=LW({message:t,name:"notOneOf",test(e){let t=this.schema._blacklist,n=t.resolveAll(this.resolve);return!n.includes(e)||this.createError({params:{values:t.toArray().join(", "),resolved:n}})}}),n}strip(){let e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0],t=this.clone();return t.spec.strip=e,t}describe(){const e=this.clone(),{label:t,meta:n}=e.spec,r={meta:n,label:t,type:e.type,oneOf:e._whitelist.describe(),notOneOf:e._blacklist.describe(),tests:e.tests.map(e=>({name:e.OPTIONS.name,params:e.OPTIONS.params})).filter((e,t,n)=>n.findIndex(t=>t.name===e.name)===t)};return r}}BW.prototype.__isYupSchema__=!0;for(const n of["validate","validateSync"])BW.prototype["".concat(n,"At")]=function(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};const{parent:i,parentPath:o,schema:a}=IW(this,e,t,r.context);return a[n](i&&i[o],$W({},r,{parent:i,path:e}))};for(const n of["equals","is"])BW.prototype[n]=BW.prototype.oneOf;for(const n of["not","nope"])BW.prototype[n]=BW.prototype.notOneOf;BW.prototype.optional=BW.prototype.notRequired;const zW=BW;function HW(){return new zW}HW.prototype=zW.prototype;const WW=e=>null==e;class UW extends BW{constructor(){super({type:"boolean"}),this.withMutation(()=>{this.transform(function(e){if(!this.isType(e)){if(/^(true|1)$/i.test(String(e)))return!0;if(/^(false|0)$/i.test(String(e)))return!1}return e})})}_typeCheck(e){return e instanceof Boolean&&(e=e.valueOf()),"boolean"===typeof e}isTrue(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:xW.isValue;return this.test({message:e,name:"is-value",exclusive:!0,params:{value:"true"},test:e=>WW(e)||!0===e})}isFalse(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:xW.isValue;return this.test({message:e,name:"is-value",exclusive:!0,params:{value:"false"},test:e=>WW(e)||!1===e})}}UW.prototype;let VW=/^((([a-z]|\d|[!#\$%&'\*\+\-\/=\?\^_`{\|}~]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])+(\.([a-z]|\d|[!#\$%&'\*\+\-\/=\?\^_`{\|}~]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])+)*)|((\x22)((((\x20|\x09)*(\x0d\x0a))?(\x20|\x09)+)?(([\x01-\x08\x0b\x0c\x0e-\x1f\x7f]|\x21|[\x23-\x5b]|[\x5d-\x7e]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(\\([\x01-\x09\x0b\x0c\x0d-\x7f]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]))))*(((\x20|\x09)*(\x0d\x0a))?(\x20|\x09)+)?(\x22)))@((([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.)+(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))$/i,GW=/^((https?|ftp):)?\/\/(((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:)*@)?(((\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5]))|((([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.)+(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.?)(:\d*)?)(\/((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)+(\/(([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)*)*)?)?(\?((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|[\uE000-\uF8FF]|\/|\?)*)?(\#((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|\/|\?)*)?$/i,qW=/^(?:[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,YW=e=>WW(e)||e===e.trim(),ZW={}.toString();function KW(){return new XW}class XW extends BW{constructor(){super({type:"string"}),this.withMutation(()=>{this.transform(function(e){if(this.isType(e))return e;if(Array.isArray(e))return e;const t=null!=e&&e.toString?e.toString():e;return t===ZW?e:t})})}_typeCheck(e){return e instanceof String&&(e=e.valueOf()),"string"===typeof e}_isPresent(e){return super._isPresent(e)&&!!e.length}length(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:fW.length;return this.test({message:t,name:"length",exclusive:!0,params:{length:e},test(t){return WW(t)||t.length===this.resolve(e)}})}min(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:fW.min;return this.test({message:t,name:"min",exclusive:!0,params:{min:e},test(t){return WW(t)||t.length>=this.resolve(e)}})}max(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:fW.max;return this.test({name:"max",exclusive:!0,message:t,params:{max:e},test(t){return WW(t)||t.length<=this.resolve(e)}})}matches(e,t){let n,r,i=!1;return t&&("object"===typeof t?({excludeEmptyString:i=!1,message:n,name:r}=t):n=t),this.test({name:r||"matches",message:n||fW.matches,params:{regex:e},test:t=>WW(t)||""===t&&i||-1!==t.search(e)})}email(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:fW.email;return this.matches(VW,{name:"email",message:e,excludeEmptyString:!0})}url(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:fW.url;return this.matches(GW,{name:"url",message:e,excludeEmptyString:!0})}uuid(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:fW.uuid;return this.matches(qW,{name:"uuid",message:e,excludeEmptyString:!1})}ensure(){return this.default("").transform(e=>null===e?"":e)}trim(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:fW.trim;return this.transform(e=>null!=e?e.trim():e).test({message:e,name:"trim",test:YW})}lowercase(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:fW.lowercase;return this.transform(e=>WW(e)?e:e.toLowerCase()).test({message:e,name:"string_case",exclusive:!0,test:e=>WW(e)||e===e.toLowerCase()})}uppercase(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:fW.uppercase;return this.transform(e=>WW(e)?e:e.toUpperCase()).test({message:e,name:"string_case",exclusive:!0,test:e=>WW(e)||e===e.toUpperCase()})}}KW.prototype=XW.prototype;function QW(){return new JW}class JW extends BW{constructor(){super({type:"number"}),this.withMutation(()=>{this.transform(function(e){let t=e;if("string"===typeof t){if(t=t.replace(/\s/g,""),""===t)return NaN;t=+t}return this.isType(t)?t:parseFloat(t)})})}_typeCheck(e){return e instanceof Number&&(e=e.valueOf()),"number"===typeof e&&!(e=>e!=+e)(e)}min(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:gW.min;return this.test({message:t,name:"min",exclusive:!0,params:{min:e},test(t){return WW(t)||t>=this.resolve(e)}})}max(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:gW.max;return this.test({message:t,name:"max",exclusive:!0,params:{max:e},test(t){return WW(t)||t<=this.resolve(e)}})}lessThan(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:gW.lessThan;return this.test({message:t,name:"max",exclusive:!0,params:{less:e},test(t){return WW(t)||t<this.resolve(e)}})}moreThan(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:gW.moreThan;return this.test({message:t,name:"min",exclusive:!0,params:{more:e},test(t){return WW(t)||t>this.resolve(e)}})}positive(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:gW.positive;return this.moreThan(0,e)}negative(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:gW.negative;return this.lessThan(0,e)}integer(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:gW.integer;return this.test({name:"integer",message:e,test:e=>WW(e)||Number.isInteger(e)})}truncate(){return this.transform(e=>WW(e)?e:0|e)}round(e){var t;let n=["ceil","floor","round","trunc"];if("trunc"===(e=(null==(t=e)?void 0:t.toLowerCase())||"round"))return this.truncate();if(-1===n.indexOf(e.toLowerCase()))throw new TypeError("Only valid options for round() are: "+n.join(", "));return this.transform(t=>WW(t)?t:Math[e](t))}}QW.prototype=JW.prototype;var eU=/^(\d{4}|[+\-]\d{6})(?:-?(\d{2})(?:-?(\d{2}))?)?(?:[ T]?(\d{2}):?(\d{2})(?::?(\d{2})(?:[,\.](\d{1,}))?)?(?:(Z)|([+\-])(\d{2})(?::?(\d{2}))?)?)?$/;let tU=new Date("");function nU(){return new rU}class rU extends BW{constructor(){super({type:"date"}),this.withMutation(()=>{this.transform(function(e){return this.isType(e)?e:(e=function(e){var t,n,r=[1,4,5,6,7,10,11],i=0;if(n=eU.exec(e)){for(var o,a=0;o=r[a];++a)n[o]=+n[o]||0;n[2]=(+n[2]||1)-1,n[3]=+n[3]||1,n[7]=n[7]?String(n[7]).substr(0,3):0,void 0!==n[8]&&""!==n[8]||void 0!==n[9]&&""!==n[9]?("Z"!==n[8]&&void 0!==n[9]&&(i=60*n[10]+n[11],"+"===n[9]&&(i=0-i)),t=Date.UTC(n[1],n[2],n[3],n[4],n[5]+i,n[6],n[7])):t=+new Date(n[1],n[2],n[3],n[4],n[5],n[6],n[7])}else t=Date.parse?Date.parse(e):NaN;return t}(e),isNaN(e)?tU:new Date(e))})})}_typeCheck(e){return t=e,"[object Date]"===Object.prototype.toString.call(t)&&!isNaN(e.getTime());var t}prepareParam(e,t){let n;if(DW.isRef(e))n=e;else{let r=this.cast(e);if(!this._typeCheck(r))throw new TypeError("`".concat(t,"` must be a Date or a value that can be `cast()` to a Date"));n=r}return n}min(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:vW.min,n=this.prepareParam(e,"min");return this.test({message:t,name:"min",exclusive:!0,params:{min:e},test(e){return WW(e)||e>=this.resolve(n)}})}max(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:vW.max,n=this.prepareParam(e,"max");return this.test({message:t,name:"max",exclusive:!0,params:{max:e},test(e){return WW(e)||e<=this.resolve(n)}})}}rU.INVALID_DATE=tU,nU.prototype=rU.prototype,nU.INVALID_DATE=tU;var iU=n(19185),oU=n.n(iU),aU=n(41979),sU=n.n(aU),lU=n(3295),cU=n.n(lU),dU=n(8704),uU=n.n(dU);function pU(e,t){let n=1/0;return e.some((e,r)=>{var i;if(-1!==(null==(i=t.path)?void 0:i.indexOf(e)))return n=r,!0}),n}function hU(e){return(t,n)=>pU(e,t)-pU(e,n)}function mU(){return mU=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},mU.apply(this,arguments)}let fU=e=>"[object Object]"===Object.prototype.toString.call(e);const gU=hU([]);class vU extends BW{constructor(e){super({type:"object"}),this.fields=Object.create(null),this._sortErrors=gU,this._nodes=[],this._excludedEdges=[],this.withMutation(()=>{this.transform(function(e){if("string"===typeof e)try{e=JSON.parse(e)}catch(t){e=null}return this.isType(e)?e:null}),e&&this.shape(e)})}_typeCheck(e){return fU(e)||"function"===typeof e}_cast(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};var n;let r=super._cast(e,t);if(void 0===r)return this.getDefault();if(!this._typeCheck(r))return r;let i=this.fields,o=null!=(n=t.stripUnknown)?n:this.spec.noUnknown,a=this._nodes.concat(Object.keys(r).filter(e=>-1===this._nodes.indexOf(e))),s={},l=mU({},t,{parent:s,__validating:t.__validating||!1}),c=!1;for(const d of a){let e=i[d],n=Ma()(r,d);if(e){let n,i=r[d];l.path=(t.path?"".concat(t.path,"."):"")+d,e=e.resolve({value:i,context:t.context,parent:s});let o="spec"in e?e.spec:void 0,a=null==o?void 0:o.strict;if(null==o?void 0:o.strip){c=c||d in r;continue}n=t.__validating&&a?r[d]:e.cast(r[d],l),void 0!==n&&(s[d]=n)}else n&&!o&&(s[d]=r[d]);s[d]!==r[d]&&(c=!0)}return c?s:r}_validate(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2?arguments[2]:void 0,r=[],{sync:i,from:o=[],originalValue:a=e,abortEarly:s=this.spec.abortEarly,recursive:l=this.spec.recursive}=t;o=[{schema:this,value:a},...o],t.__validating=!0,t.originalValue=a,t.from=o,super._validate(e,t,(e,c)=>{if(e){if(!AW.isError(e)||s)return void n(e,c);r.push(e)}if(!l||!fU(c))return void n(r[0]||null,c);a=a||c;let d=this._nodes.map(e=>(n,r)=>{let i=-1===e.indexOf(".")?(t.path?"".concat(t.path,"."):"")+e:"".concat(t.path||"",'["').concat(e,'"]'),s=this.fields[e];s&&"validate"in s?s.validate(c[e],mU({},t,{path:i,from:o,strict:!0,parent:c,originalValue:a[e]}),r):r(null)});kW({sync:i,tests:d,value:c,errors:r,endEarly:s,sort:this._sortErrors,path:t.path},n)})}clone(e){const t=super.clone(e);return t.fields=mU({},this.fields),t._nodes=this._nodes,t._excludedEdges=this._excludedEdges,t._sortErrors=this._sortErrors,t}concat(e){let t=super.concat(e),n=t.fields;for(let[r,i]of Object.entries(this.fields)){const e=n[r];void 0===e?n[r]=i:e instanceof BW&&i instanceof BW&&(n[r]=i.concat(e))}return t.withMutation(()=>t.shape(n,this._excludedEdges))}getDefaultFromShape(){let e={};return this._nodes.forEach(t=>{const n=this.fields[t];e[t]="default"in n?n.getDefault():void 0}),e}_getDefault(){return"default"in this.spec?super._getDefault():this._nodes.length?this.getDefaultFromShape():void 0}shape(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],n=this.clone(),r=Object.assign(n.fields,e);return n.fields=r,n._sortErrors=hU(Object.keys(r)),t.length&&(Array.isArray(t[0])||(t=[t]),n._excludedEdges=[...n._excludedEdges,...t]),n._nodes=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],n=[],r=new Set,i=new Set(t.map(e=>{let[t,n]=e;return"".concat(t,"-").concat(n)}));function o(e,t){let o=(0,MW.split)(e)[0];r.add(o),i.has("".concat(t,"-").concat(o))||n.push([t,o])}for(const a in e)if(Ma()(e,a)){let t=e[a];r.add(a),DW.isRef(t)&&t.isSibling?o(t.path,a):jW(t)&&"deps"in t&&t.deps.forEach(e=>o(e,a))}return uU().array(Array.from(r),n).reverse()}(r,n._excludedEdges),n}pick(e){const t={};for(const n of e)this.fields[n]&&(t[n]=this.fields[n]);return this.clone().withMutation(e=>(e.fields={},e.shape(t)))}omit(e){const t=this.clone(),n=t.fields;t.fields={};for(const r of e)delete n[r];return t.withMutation(()=>t.shape(n))}from(e,t,n){let r=(0,MW.getter)(e,!0);return this.transform(i=>{if(null==i)return i;let o=i;return Ma()(i,e)&&(o=mU({},i),n||delete o[e],o[t]=r(i)),o})}noUnknown(){let e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0],t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:yW.noUnknown;"string"===typeof e&&(t=e,e=!0);let n=this.test({name:"noUnknown",exclusive:!0,message:t,test(t){if(null==t)return!0;const n=function(e,t){let n=Object.keys(e.fields);return Object.keys(t).filter(e=>-1===n.indexOf(e))}(this.schema,t);return!e||0===n.length||this.createError({params:{unknown:n.join(", ")}})}});return n.spec.noUnknown=e,n}unknown(){let e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0],t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:yW.noUnknown;return this.noUnknown(!e,t)}transformKeys(e){return this.transform(t=>t&&cU()(t,(t,n)=>e(n)))}camelCase(){return this.transformKeys(sU())}snakeCase(){return this.transformKeys(oU())}constantCase(){return this.transformKeys(e=>oU()(e).toUpperCase())}describe(){let e=super.describe();return e.fields=EW()(this.fields,e=>e.describe()),e}}function xU(e){return new vU(e)}function yU(){return yU=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},yU.apply(this,arguments)}function bU(e){return new jU(e)}xU.prototype=vU.prototype;class jU extends BW{constructor(e){super({type:"array"}),this.innerType=void 0,this.innerType=e,this.withMutation(()=>{this.transform(function(e){if("string"===typeof e)try{e=JSON.parse(e)}catch(t){e=null}return this.isType(e)?e:null})})}_typeCheck(e){return Array.isArray(e)}get _subType(){return this.innerType}_cast(e,t){const n=super._cast(e,t);if(!this._typeCheck(n)||!this.innerType)return n;let r=!1;const i=n.map((e,n)=>{const i=this.innerType.cast(e,yU({},t,{path:"".concat(t.path||"","[").concat(n,"]")}));return i!==e&&(r=!0),i});return r?i:n}_validate(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2?arguments[2]:void 0;var r,i;let o=[],a=t.sync,s=t.path,l=this.innerType,c=null!=(r=t.abortEarly)?r:this.spec.abortEarly,d=null!=(i=t.recursive)?i:this.spec.recursive,u=null!=t.originalValue?t.originalValue:e;super._validate(e,t,(e,r)=>{if(e){if(!AW.isError(e)||c)return void n(e,r);o.push(e)}if(!d||!l||!this._typeCheck(r))return void n(o[0]||null,r);u=u||r;let i=new Array(r.length);for(let n=0;n<r.length;n++){let e=r[n],o="".concat(t.path||"","[").concat(n,"]"),a=yU({},t,{path:o,strict:!0,parent:r,index:n,originalValue:u[n]});i[n]=(t,n)=>l.validate(e,a,n)}kW({sync:a,path:s,value:r,errors:o,endEarly:c,tests:i},n)})}clone(e){const t=super.clone(e);return t.innerType=this.innerType,t}concat(e){let t=super.concat(e);return t.innerType=this.innerType,e.innerType&&(t.innerType=t.innerType?t.innerType.concat(e.innerType):e.innerType),t}of(e){let t=this.clone();if(!jW(e))throw new TypeError("`array.of()` sub-schema must be a valid yup schema not: "+hW(e));return t.innerType=e,t}length(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:bW.length;return this.test({message:t,name:"length",exclusive:!0,params:{length:e},test(t){return WW(t)||t.length===this.resolve(e)}})}min(e,t){return t=t||bW.min,this.test({message:t,name:"min",exclusive:!0,params:{min:e},test(t){return WW(t)||t.length>=this.resolve(e)}})}max(e,t){return t=t||bW.max,this.test({message:t,name:"max",exclusive:!0,params:{max:e},test(t){return WW(t)||t.length<=this.resolve(e)}})}ensure(){return this.default(()=>[]).transform((e,t)=>this._typeCheck(e)?e:null==t?[]:[].concat(t))}compact(e){let t=e?(t,n,r)=>!e(t,n,r):e=>!!e;return this.transform(e=>null!=e?e.filter(t):e)}describe(){let e=super.describe();return this.innerType&&(e.innerType=this.innerType.describe()),e}nullable(){let e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];return super.nullable(e)}defined(){return super.defined()}required(e){return super.required(e)}}bU.prototype=jU.prototype;const _U=/^\S*$/,CU=/^[a-zA-Z0-9_ .-]+$/,wU=/^\+?[0-9\s\-().]{4,15}$/,SU=/^\d{3,10}$/,AU=/^[a-zA-Z\d._]+$/,kU=/^\d+$/,TU=e=>{if(!e)return"";let t=e.replace(/<[^>]*>/g,"");return t=t.replace(/&amp;|&lt;|&gt;/g,"1"),t},EU=e=>{if(!e)return null;const t=new Date(e);return Number.isNaN(t.getTime())?null:(t.setHours(0,0,0,0),t)},MU=()=>{const e=new Date;return e.setHours(0,0,0,0),e},OU={editAGMUser:xU({first_name:KW().trim("error:rpm_errorSpace").min(2,Ce.t("error:rpm_minLength",{length:2})).max(26,Ce.t("error:rpm_maxLength",{length:26})).required("error:rpm_required"),last_name:KW().trim("error:errorSpace").min(2,Ce.t("error:rpm_minLength",{length:2})).max(26,Ce.t("error:rpm_maxLength",{length:26})).required("error:rpm_required"),dob:KW().required("error:rpm_required"),gender:KW().required("error:rpm_required"),mobile:HW().test("mobile","error:rpm_validPhone",e=>!e||wU.test(e)).required("error:rpm_required")}),updatePassword:xU({currentPassword:KW().required("error:rpm_required"),password:KW().min(8,Ce.t("error:rpm_minLength",{length:8})).max(20,Ce.t("error:rpm_maxLength",{length:20})).test("password","error:rpm_PasswordTestLowerCaseErr",e=>!e||e.toUpperCase()!==e).test("password","error:rpm_PasswordTestUpperCaseErr",e=>!e||e.toLowerCase()!==e).test("password","error:rpm_PasswordTestDigitErr",e=>!e||/\d/.test(e)).test("password","error:rpm_PasswordTestSpecialErr",e=>!e||!/^[A-Za-z0-9 ]+$/.test(e)).required("error:rpm_required"),confirmPassword:KW().oneOf([PW("password"),null],"error:rpm_PasswordConfirmNotMatchErr").required("error:rpm_required")}),resetPassword:xU({new_password:KW().min(8,Ce.t("error:rpm_minLength",{length:8})).max(20,Ce.t("error:rpm_maxLength",{length:20})).test("new_password","error:rpm_PasswordTestLowerCaseErr",e=>!e||e.toUpperCase()!==e).test("new_password","error:rpm_PasswordTestUpperCaseErr",e=>!e||e.toLowerCase()!==e).test("new_password","error:rpm_PasswordTestDigitErr",e=>!e||/\d/.test(e)).test("new_password","error:rpm_PasswordTestSpecialErr",e=>!e||!/^[A-Za-z0-9 ]+$/.test(e)).required("error:rpm_required"),confirmPassword:KW().oneOf([PW("new_password"),null],"error:rpm_PasswordConfirmNotMatchErr").required("error:rpm_required")}),createCustomRole:xU({role_level:KW(),program:KW().when("role_level",{is:bd.CLIENT,then:KW(),otherwise:KW().required("error:rpm_required")}),name:KW().trim("error:rpm_errorSpace").max(50,Ce.t("error:rpm_maxLength",{length:50})).required("error:rpm_required"),description:KW().max(150,Ce.t("error:rpm_maxLength",{length:150}))}),createNewUserSchema:xU({email:KW().required("error:rpm_required").email("error:rpm_validEmail").trim(),first_name:KW().max(32,()=>Ce.t("error:rpm_maxLength",{length:32})),username:KW().required("error:rpm_required").max(30,()=>Ce.t("error:rpm_maxLength",{length:30})).min(8,()=>Ce.t("error:rpm_minLength",{length:8})).test("username","error:rpm_UsernameValidation",e=>!e||AU.test(e)).trim(),last_name:KW().max(32,()=>Ce.t("error:rpm_maxLength",{length:32})),mobile:HW().test("mobile","error:rpm_ValidPhone",e=>!e||wU.test(e)).required("error:rpm_required")}),editRoleSchema:xU({name:KW().trim("error:rpm_errorSpace").max(50,Ce.t("error:rpm_maxLength",{length:50})).required("error:rpm_required"),description:KW().max(150,Ce.t("error:rpm_maxLength",{length:150}))})},RU={addNewProgram:xU({image:HW().test("fileType","The system accepts only .png or .jpg format.",e=>{if(!e)return!0;return["image/jpeg","image/png"].includes(e.type)}).test("fileSize","File size should less than 1 mb.",e=>!e||e.size<=1048576),display_name:KW().required("error:rpm_required").min(2,Ce.t("error:rpm_minLength",{length:2})).max(64,Ce.t("error:rpm_maxLength",{length:64})).test("last_name","error:rpm_specialCharacter",e=>!e||CU.test(e)),country:KW().required("error:rpm_required").min(2,Ce.t("error:rpm_minLength",{length:2})).max(64,Ce.t("error:rpm_maxLength",{length:64})).test("last_name","error:rpm_specialCharacter",e=>!e||CU.test(e)),state:KW().required("error:rpm_required").min(2,Ce.t("error:rpm_minLength",{length:2})).max(64,Ce.t("error:rpm_maxLength",{length:64})).test("last_name","error:rpm_specialCharacter",e=>!e||CU.test(e)),city:KW().required("error:rpm_required").min(2,Ce.t("error:rpm_minLength",{length:2})).max(64,Ce.t("error:rpm_maxLength",{length:64})).test("last_name","error:rpm_specialCharacter",e=>!e||CU.test(e)),facility_type:KW().required("error:rpm_required")}),addNewPatient:xU({first_name:KW().required("error:rpm_required").min(2,Ce.t("error:rpm_minLength",{length:2})).max(64,Ce.t("error:rpm_maxLength",{length:64})).test("first_name","error:rpm_specialCharacter",e=>!e||CU.test(e)).trim(),last_name:KW().required("error:rpm_required").min(2,Ce.t("error:rpm_minLength",{length:2})).max(64,Ce.t("error:rpm_maxLength",{length:64})).test("last_name","error:rpm_noWhiteSpaceAllowed",e=>!e||_U.test(e)).test("last_name","error:rpm_specialCharacter",e=>!e||CU.test(e)),mobile:HW().test("mobile","error:rpm_ValidPhone",e=>!e||wU.test(e)).required("error:rpm_required"),country_code:QW().required("error:rpm_required"),age:QW().required("error:rpm_required").nullable().min(18,Ce.t("error:rpm_AgeError",{length:18})).max(99,Ce.t("error:rpm_AgeError",{length:99})),birth_date:KW().required("error:rpm_required").nullable(),country:KW().required("error:rpm_required").min(2,Ce.t("error:rpm_minLength",{length:2})).max(64,Ce.t("error:rpm_maxLength",{length:64})).test("last_name","error:rpm_specialCharacter",e=>!e||CU.test(e)),state:KW().required("error:rpm_required").min(2,Ce.t("error:rpm_minLength",{length:2})).max(64,Ce.t("error:rpm_maxLength",{length:64})).test("last_name","error:rpm_specialCharacter",e=>!e||CU.test(e)),city:KW().required("error:rpm_required").min(2,Ce.t("error:rpm_minLength",{length:2})).max(64,Ce.t("error:rpm_maxLength",{length:64})).test("last_name","error:rpm_specialCharacter",e=>!e||CU.test(e)),email:KW().email("error:rpm_emailValid").max(65,Ce.t("error:rpm_maxLength",{length:65}))}),addRule:xU({data_type:KW().required("error:rpm_required"),processing_mode:KW().required("error:rpm_required"),data_batch_size:QW().when("processing_mode",{is:e=>"BATCH"===e,then:QW().moreThan(1,Ce.t("error:rpm_batchSize",{length:21})).lessThan(21,Ce.t("error:rpm_batchSize",{length:21})).required("error:rpm_required")}),short_description:KW().required("error:rpm_required").min(2,Ce.t("error:rpm_minLength",{length:2})).max(300,Ce.t("error:rpm_maxLength",{length:300})),rule:bU().of(xU({name:KW().required("error:rpm_required"),desc:KW().required("error:rpm_required"),when:xU({cond:bU(xU({value:QW().required("error:rpm_required").min(60,Ce.t("error:rpm_minLength",{length:60})).max(200,Ce.t("error:rpm_maxLength",{length:200}))}))})}))}),addLevel:xU({role_level:KW().required("error:rpm_required"),program:KW().when("role_level",{is:bd.CLIENT,then:KW(),otherwise:KW().required("error:rpm_required")})}),addUserInfo:xU({username:KW().required("error:rpm_required"),first_name:KW().required("error:rpm_required"),last_name:KW().required("error:rpm_required"),email:KW().required("error:rpm_required")}),assignLevel:xU({role_level:KW().required("error:rpm_required"),program:KW().when("role_level",{is:bd.CLIENT,then:KW(),otherwise:KW().required("error:rpm_required")}),role_type:KW().when("role_level",{is:bd.PROGRAM,then:KW().required("error:rpm_required"),otherwise:KW()}),role:KW().when("role_level",{is:bd.PROGRAM,then:KW().required("error:rpm_required"),otherwise:KW()})}),userProfileUpdate:xU({first_name:KW().min(2,Ce.t("error:rpm_minLength",{length:2})).max(26,Ce.t("error:rpm_maxLength",{length:26})).required("error:rpm_required").test("last_name","error:rpm_noWhiteSpaceAllowed",e=>!e||_U.test(e)).test("first_name","error:rpm_specialCharacter",e=>!e||CU.test(e)),last_name:KW().trim("error:errorSpace").min(2,Ce.t("error:rpm_minLength",{length:2})).max(26,Ce.t("error:rpm_maxLength",{length:26})).required("error:rpm_required").test("last_name","error:rpm_noWhiteSpaceAllowed",e=>!e||_U.test(e)).test("first_name","error:rpm_specialCharacter",e=>!e||CU.test(e)),mobile:HW().test("mobile","error:rpm_ValidPhone",e=>!e||wU.test(e)),professional_bio:KW().max(250,Ce.t("error:rpm_maxLength",{length:250})),qualification:KW().max(250,Ce.t("error:rpm_maxLength",{length:250})),adr_zipcode:KW().trim("error:rpm_errorSpace").max(10,Ce.t("error:rpm_maxLength",{length:10})).min(3,Ce.t("error:rpm_minLength",{length:3})).test("mobile","error:rpm_ValidZipCode",e=>!e||SU.test(e))}),personalDetail:xU({first_name:KW().min(2,Ce.t("error:rpm_minLength",{length:2})).max(26,Ce.t("error:rpm_maxLength",{length:26})).required("error:rpm_required").test("first_name","error:rpm_specialCharacter",e=>!e||CU.test(e)),last_name:KW().trim("error:errorSpace").min(2,Ce.t("error:rpm_minLength",{length:2})).max(26,Ce.t("error:rpm_maxLength",{length:26})).required("error:rpm_required").test("last_name","error:rpm_noWhiteSpaceAllowed",e=>!e||_U.test(e)).test("first_name","error:rpm_specialCharacter",e=>!e||CU.test(e)),mobile:HW().test("mobile","error:rpm_ValidPhone",e=>!e||wU.test(e)).required("error:rpm_required"),country_code:QW().required("error:rpm_required"),age:QW().required("error:rpm_required").nullable().min(18,Ce.t("error:rpm_AgeError",{length:18})).max(99,Ce.t("error:rpm_AgeError",{length:99})),adr_address1:KW().max(100,Ce.t("error:rpm_maxLength",{length:100})),adr_address2:KW().max(100,Ce.t("error:rpm_maxLength",{length:100})),adr_zipcode:KW().trim("error:rpm_errorSpace").max(10,Ce.t("error:rpm_maxLength",{length:10})).min(3,Ce.t("error:rpm_minLength",{length:3})).test("mobile","error:rpm_ValidZipCode",e=>!e||SU.test(e))}),resolveAlert:xU({description:KW().required("error:rpm_required").min(5,Ce.t("error:rpm_minLength",{length:5})).max(500,Ce.t("error:rpm_maxLength",{length:500}))}),addNewSchedule:xU({name:KW().required("error:rpm_required").min(2,Ce.t("error:rpm_minLength",{length:2})).max(64,Ce.t("error:rpm_maxLength",{length:64})),vital_name:KW().required("error:rpm_required"),duration:QW().moreThan(0,Ce.t("error:rpm_durationLength",{length:1})).lessThan(101,Ce.t("error:rpm_durationLength",{length:100})).required("error:rpm_required"),max_strikes:KW().when("enable",{is:e=>!!e,then:KW().required("error:rpm_required")}),notification_title:KW().when("enable",{is:e=>!!e,then:KW().required("error:rpm_required").max(128,Ce.t("error:rpm_maxLength",{length:128}))}),notification_text:KW().when("enable",{is:e=>!!e,then:KW().required("error:rpm_required").max(512,Ce.t("error:rpm_maxLength",{length:512}))}),mandate:bU().when("vital_name",{is:e=>"glucose"===e,then:bU().of(xU({start_time:KW().required("error:rpm_required").nullable(),end_time:KW().required("error:rpm_required").nullable(),activity_name:KW().required("error:rpm_required").min(2,Ce.t("error:rpm_minLength",{length:2})).max(30,Ce.t("error:rpm_maxLength",{length:30})).nullable(),activity_type:KW().required("error:rpm_required").nullable()})),otherwise:bU().of(xU({start_time:KW().required("error:rpm_required").nullable(),end_time:KW().required("error:rpm_required").nullable()}))}),reading_reminder_title:KW().when("reading_reminder_enabled",{is:e=>!!e,then:KW().required("error:rpm_required").max(128,Ce.t("error:rpm_maxLength",{length:128}))}),reading_reminder_time:KW().when("reading_reminder_enabled",{is:e=>!!e,then:KW().required("error:rpm_required")}),reading_reminder_repetition:KW().when("reading_reminder_enabled",{is:e=>!!e,then:KW().required("error:rpm_required")}),reading_reminder_msg:KW().when("reading_reminder_enabled",{is:e=>!!e,then:KW().required("error:rpm_required").max(512,Ce.t("error:rpm_maxLength",{length:512}))}),pre_reminder:KW().when("pre_reminder_enabled",{is:e=>!!e,then:KW().required("error:rpm_required")}),missed_reminder_title:KW().when("missed_reminder_enabled",{is:e=>!!e,then:KW().required("error:rpm_required").max(128,Ce.t("error:rpm_maxLength",{length:128}))}),missed_reminder_msg:KW().when("missed_reminder_enabled",{is:e=>!!e,then:KW().required("error:rpm_required").max(512,Ce.t("error:rpm_maxLength",{length:512}))})}),addNewMandate:xU({start_time:KW().required("error:rpm_required").nullable(),end_time:KW().required("error:rpm_required").nullable(),reading_reminder_title:KW().when("reading_reminder_enabled",{is:e=>!!e,then:KW().required("error:rpm_required").max(128,Ce.t("error:rpm_maxLength",{length:128}))}),reading_reminder_time:KW().when("reading_reminder_enabled",{is:e=>!!e,then:KW().required("error:rpm_required")}),reading_reminder_repetition:KW().when("reading_reminder_enabled",{is:e=>!!e,then:KW().required("error:rpm_required")}),reading_reminder_msg:KW().when("reading_reminder_enabled",{is:e=>!!e,then:KW().required("error:rpm_required").max(512,Ce.t("error:rpm_maxLength",{length:512}))}),missed_reminder_title:KW().when("missed_reminder_enabled",{is:e=>!!e,then:KW().required("error:rpm_required").max(128,Ce.t("error:rpm_maxLength",{length:128}))}),missed_reminder_msg:KW().when("missed_reminder_enabled",{is:e=>!!e,then:KW().required("error:rpm_required").max(512,Ce.t("error:rpm_maxLength",{length:512}))})}),addNewDisease:xU({relationship:KW().required("error:rpm_required"),disease_name:KW().required("error:rpm_required"),remark:KW().max(500,Ce.t("error:rpm_maxLength",{length:500})),start_date:KW().nullable().when("duration_unit",{is:e=>"CUSTOM"===e||"PRESENT"===e,then:KW().required("error:rpm_required").nullable().test("start_date",Ce.t("error:rpm_dateErr"),(e,t)=>{let n=new Date(e),r=new Date;return!(n.getFullYear()<1900||n.getFullYear()>r.getFullYear())||t.createError({message:Ce.t("error:rpm_invalidYear",{length:n.getFullYear()}),path:"start_date"})})}),end_date:KW().nullable().when("duration_unit",{is:e=>"CUSTOM"===e,then:KW().required("error:rpm_required").nullable().test("end_date",Ce.t("error:rpm_dateErr"),(e,t)=>{let n=new Date(t.parent.start_date),r=new Date(e),i=new Date;return n.getFullYear()<1900||n.getFullYear()>i.getFullYear()?t.createError({message:Ce.t("error:rpm_invalidYear",{length:n.getFullYear()}),path:"start_date"}):n.getFullYear()>r.getFullYear()?t.createError({message:Ce.t("error:rpm_minYear",{length:n.getFullYear()}),path:"end_date"}):n.getFullYear()!==r.getFullYear()||t.createError({message:Ce.t("error:rpm_equalYear",{length:n.getFullYear()}),path:"end_date"})})}),duration_unit:KW().required(Ce.t("error:rpm_required",{field:Ce.t("rpm_Duration")})),duration:QW().nullable().transform((e,t)=>""===t?null:e).when("duration_unit",(e,t)=>["PRESENT","CUSTOM"].includes(e)?t.notRequired():t.required(Ce.t("error:rpm_required",{field:Ce.t("rpm_Duration")})).positive("Duration must be a positive number"))}),editNewDisease:xU({disease_name:KW().required("error:rpm_required").min(2,Ce.t("error:rpm_minLength",{length:2})).max(50,Ce.t("error:rpm_maxLength",{length:50})),remark:KW().max(500,Ce.t("error:rpm_maxLength",{length:500})),duration:KW().test("duration",Ce.t("error:rpm_durationErr"),(e,t)=>{switch(t.parent.duration_unit){case"YEAR":return e<=t.parent.relationship!=="SELF"||"YEAR"===t.parent.duration_unit?kU.test(e):t.createError({message:Ce.t("error:rpm_durationErrYear",{length:"SELF"!==t.parent.relationship?100:60}),path:"duration"});case"MONTH":return e<=t.parent.relationship!=="SELF"||"MONTH"===t.parent.duration_unit?kU.test(e):t.createError({message:Ce.t("error:rpm_durationErrMonth",{length:"SELF"!==t.parent.relationship?1200:720}),path:"duration"});case"DAY":return e<=t.parent.relationship!=="SELF"||"DAY"===t.parent.duration_unit?kU.test(e):t.createError({message:Ce.t("error:rpm_durationErrDay",{length:"SELF"!==t.parent.relationship?36500:21900}),path:"duration"});default:return!0}})}),addPrescriptionNote:xU({vital:KW().required("error:rpm_required"),medicationList:bU(xU({medicine:xU().nullable().required("error:rpm_required").shape({medicine:KW().required("error:rpm_required")}),frequency:KW().required("error:rpm_required"),dose:QW().integer("error:decimalValue").typeError("error:validWholeNumber").min(1,Ce.t("error:rpm_minLengthNumber",{length:1})).max(999,Ce.t("error:rpm_maxLengthNumber",{length:999})).nullable(),days:QW().required("error:rpm_required").typeError("error:validWholeNumber").min(1,Ce.t("error:rpm_minLengthNumber",{length:1})).max(999,Ce.t("error:rpm_maxLengthNumber",{length:999})).nullable(),comments:KW().max(100,Ce.t("error:rpm_maxLength",{length:100})),start_date:KW().required("error:rpm_required"),end_date:KW().required("error:rpm_required"),image:HW().test("fileType","The system accepts only .png or .jpg format.",e=>{if(!e)return!0;return["image/jpeg","image/png"].includes(e.type)}).test("fileSize","File size should less than 1 mb.",e=>!e||e.size<=1048576),timing:bU().of(xU().shape({start_time:KW().nullable(),interval:KW().nullable()})).test("timing","error:rpm_sameTimingError",e=>e.every((t,n)=>!!ps(t.start_time)||e.findLastIndex(e=>e.start_time===t.start_time)===n)).test("timing","error:rpm_timingError",e=>e.every(e=>null===(null===e||void 0===e?void 0:e.start_time))||e.every(e=>null!==(null===e||void 0===e?void 0:e.start_time))).test("interval","error:rpm_bothFields",(e,t)=>t.parent.repetition_kind!==vd||!!(ps(e[0].start_time)&&ps(e[0].interval)||!ps(e[0].start_time)&&!ps(e[0].interval)))}))}),noteSchema:xU({vital:KW().required("error:rpm_required"),description:KW().required("error:rpm_required").test("description",Ce.t("error:rpm_minLength",{length:5}),e=>TU(e).length>=5).test("description",Ce.t("error:rpm_maxLength",{length:500}),e=>TU(e).length<=500)}),summaryNoteSchema:xU({vital:KW().required("error:rpm_required"),description:KW().required("error:rpm_required").test("description",Ce.t("error:rpm_minLength",{length:5}),e=>TU(e).length>=5).test("description",Ce.t("error:rpm_maxLength",{length:4e3}),e=>TU(e).length<=4e3)}),addGoal:xU({goal_name:KW().required("error:rpm_required"),category:HW().required("error:rpm_required"),priority:KW()}),addExercise:xU({name:KW().required("error:rpm_required"),category:KW().required("error:rpm_required"),primary_muscle:HW().required("error:rpm_required"),movement_pattern:KW().required("error:rpm_required"),instructions:HW().required("error:rpm_required"),equipment:HW().required("error:rpm_required"),level:HW().required("error:rpm_required"),exercise_type:HW().required("error:rpm_required")}),addPackage:xU({program_urn:KW().required("error:rpm_required"),package_name:KW().required("error:rpm_required"),start_date:KW().required("error:rpm_required").test("start_date",Ce.t("error:rpm_dateErr"),e=>{if(!e)return!0;const t=new Date;t.setHours(0,0,0,0);const n=new Date(e);return n.setHours(0,0,0,0),n>=t}),end_date:KW().required("error:rpm_required").test("end_date",Ce.t("error:rpm_dateErr"),(e,t)=>{var n;if(!e)return!0;const r=new Date;r.setHours(0,0,0,0);const i=new Date(e);if(i.setHours(0,0,0,0),i<r)return!1;if(null!==t&&void 0!==t&&null!==(n=t.parent)&&void 0!==n&&n.start_date){const e=new Date(t.parent.start_date);return e.setHours(0,0,0,0),i>=e}return!0}),is_active:KW().required("error:rpm_required")}),editPackage:xU({program_urn:KW().required("error:rpm_required"),package_name:KW().required("error:rpm_required"),start_date:KW().required("error:rpm_required").test("start_date",Ce.t("error:rpm_dateErr"),(e,t)=>{var n;if(!e)return!0;const r=EU(e);if(!r)return!1;return r>=(EU(null===t||void 0===t||null===(n=t.parent)||void 0===n?void 0:n.original_start_date)||MU())}),end_date:KW().required("error:rpm_required").test("end_date",Ce.t("error:rpm_dateErr"),(e,t)=>{var n,r;if(!e)return!0;const i=EU(e);if(!i)return!1;const o=EU(null===t||void 0===t||null===(n=t.parent)||void 0===n?void 0:n.start_date);return!(i<(EU(null===t||void 0===t||null===(r=t.parent)||void 0===r?void 0:r.original_start_date)||o||MU()))&&!(o&&i<o)}),is_active:KW().required("error:rpm_required")})},PU={role_level:null===bd||void 0===bd?void 0:bd.PROGRAM,program:"",name:"",description:""};const DU=function(e){let{allPrograms:t,addNewRole:n}=e;const{t:r}=Vg(),o=so(),a=[{name:r("rpm_Roles"),url:ld.DOCTOR.ROLES},{name:r("rpm_AddRole"),url:""}];return(0,qt.jsxs)(op,{sx:{width:"100%"},children:[(0,qt.jsx)(op,{mb:2.5,children:(0,qt.jsx)(BH,{labels:a})}),(0,qt.jsx)(Ff,{container:!0,spacing:2,children:(0,qt.jsx)(Ff,{item:!0,xs:12,children:(0,qt.jsx)(Kz,{initialValues:PU,validationSchema:OU.createCustomRole,onSubmit:n,enableReinitialize:!0,children:e=>{let{values:n,setFieldValue:a}=e;return(0,qt.jsx)(qt.Fragment,{children:(0,qt.jsx)(nH,{children:(0,qt.jsxs)(yH,{variant:"outlined",children:[(0,qt.jsx)(nW,{title:(0,qt.jsx)(Ff,{container:!0,spacing:2,alignItems:"center",children:(0,qt.jsx)(Ff,{item:!0,xs:!0,children:(0,qt.jsx)(Cf,{variant:"h6",component:"h6",children:r("rpm_AddNewCustomRole")})})}),sx:{py:1.5,bgcolor:"primary.theme.50"}}),(0,qt.jsx)(wH,{sx:{py:4,":last-child":{pb:4}},children:(0,qt.jsx)(Ff,{container:!0,spacing:4,children:(0,qt.jsxs)(Ff,{item:!0,xs:12,md:7,lg:6,children:[(0,qt.jsx)(op,{mb:3,children:(0,qt.jsxs)(pE,{flexDirection:"column",gap:{xs:1,lg:2},children:[(0,qt.jsx)(Cf,{variant:"body1",component:"p",fontWeight:"h6.fontWeight",children:r("rpm_RoleLevelText")}),(0,qt.jsx)(op,{children:(0,qt.jsx)(tH,{as:G_,fullWidth:!0,size:"small",id:"role_level",name:"role_level",variant:"outlined",endAdornment:(0,qt.jsx)(tw,{position:"end",sx:{position:"absolute",right:"28px"},children:(0,qt.jsx)(sy,{title:r("message:rpm_RoleLevelTextHelp"),placement:"top",children:(0,qt.jsx)(wh,{size:"small",disableRipple:!0,sx:{p:0},children:(0,qt.jsx)(pM.A,{fontSize:"small"})})})}),children:(0,qt.jsx)(mf,{value:bd.PROGRAM,children:r("rpm_".concat(bd.PROGRAM))})})})]})}),n.role_level===bd.PROGRAM&&(0,qt.jsx)(qt.Fragment,{children:(0,qt.jsx)(op,{mb:3,children:(0,qt.jsxs)(pE,{flexDirection:"column",gap:{xs:1,lg:2},children:[(0,qt.jsxs)(Cf,{variant:"body1",component:"p",fontWeight:"h6.fontWeight",children:[r("rpm_SelectProgram"),(0,qt.jsx)(op,{component:"span",children:"*"}),(0,qt.jsx)(sy,{title:r("message:rpm_ProgramHelp"),placement:"top",children:(0,qt.jsx)(wh,{size:"small",children:(0,qt.jsx)(pM.A,{fontSize:"small"})})})]}),(0,qt.jsxs)(op,{children:[(0,qt.jsx)(tH,{component:aj,fullWidth:!0,size:"small",id:"program",name:"program",variant:"outlined",options:t||[],isOptionEqualToValue:(e,t)=>e.display_name===t.display_name,getOptionLabel:e=>e.display_name,renderOption:(e,t)=>(0,We.createElement)(op,(0,i.A)((0,i.A)({component:"li"},e),{},{key:t.code}),t.display_name),onChange:(e,t)=>{a("program",null!==t&&void 0!==t&&t.code?"RPMCORE/".concat(null===t||void 0===t?void 0:t.code):"")},renderInput:e=>(0,qt.jsx)(Q_,(0,i.A)({},e))}),(0,qt.jsx)(dH,{name:"program",children:e=>(0,qt.jsx)(v_,{error:!0,children:r(e,{field:r("rpm_SelectProgram")})})})]})]})})}),(n.role_level===bd.CLIENT||n.role_level===bd.PROGRAM)&&(0,qt.jsxs)(qt.Fragment,{children:[(0,qt.jsx)(op,{mb:3,children:(0,qt.jsxs)(pE,{flexDirection:"column",gap:{xs:1,lg:2},children:[(0,qt.jsxs)(Cf,{variant:"body1",component:"p",fontWeight:"h6.fontWeight",children:[r("rpm_RoleName"),(0,qt.jsx)(op,{component:"span",children:"*"})]}),(0,qt.jsxs)(op,{children:[(0,qt.jsx)(tH,{as:qj,fullWidth:!0,size:"small",id:"name",name:"name",variant:"outlined",endAdornment:(0,qt.jsx)(tw,{position:"end",children:(0,qt.jsx)(sy,{title:r("message:rpm_RoleNameHelp"),placement:"top",children:(0,qt.jsx)(wh,{size:"small",disableRipple:!0,sx:{p:0},children:(0,qt.jsx)(pM.A,{fontSize:"small"})})})})}),(0,qt.jsx)(dH,{name:"name",children:e=>(0,qt.jsx)(v_,{error:!0,children:r(e,{field:r("rpm_RoleName")})})})]})]})}),(0,qt.jsx)(op,{children:(0,qt.jsxs)(pE,{flexDirection:"column",gap:{xs:1,lg:2},children:[(0,qt.jsx)(Cf,{variant:"body1",component:"p",fontWeight:"h6.fontWeight",children:r("rpm_Description")}),(0,qt.jsxs)(op,{children:[(0,qt.jsx)(tH,{as:qj,fullWidth:!0,size:"small",id:"description",name:"description",variant:"outlined",multiline:!0,rows:4,endAdornment:(0,qt.jsx)(tw,{position:"end",children:(0,qt.jsx)(sy,{title:r("message:rpm_RoleDescriptionHelp"),placement:"top",children:(0,qt.jsx)(wh,{size:"small",disableRipple:!0,sx:{p:0},children:(0,qt.jsx)(pM.A,{fontSize:"small"})})})})}),(0,qt.jsx)(dH,{name:"description",children:e=>(0,qt.jsx)(v_,{error:!0,children:r(e,{field:r("rpm_Description")})})}),(0,qt.jsx)(qH,{sx:{mt:4,p:0},children:(0,qt.jsxs)(Ff,{container:!0,spacing:2,children:[(0,qt.jsx)(Ff,{item:!0,children:(0,qt.jsx)(xh,{variant:"outlined",color:"primary",disableElevation:!0,onClick:()=>o(-1),children:"Cancel"})}),(0,qt.jsx)(Ff,{item:!0,children:(0,qt.jsx)(xh,{variant:"contained",color:"primary",disableElevation:!0,type:"submit",disabled:!n.name||n.name===bd.PROGRAM&&!n.program,children:"Save"})})]})})]})]})})]})]})})})]})})})}},"addRole_formik")})})]})};const NU=function(){const e=Nt(),t=so(),n=wt(ju);return(0,qt.jsx)(DU,{addNewRole:async(n,r)=>{let{setErrors:o}=r;const a=(0,i.A)({},n);try{await e((e=>async t=>{t(na(!0));const n={name:e.name,description:e.description,path:e.program?"/".concat(e.program,"/"):"/"};try{const e="".concat(ma.ROLES);return await Fu(e,n)}finally{t(na(!1))}})(a)),e(Zo({subTitle:"message:rpm_RoleCreatedSuccessfully",severity:ud.SUCCESS})),t(-1)}catch(s){const t=us(s,"response.data.field_errors",{}),n=us(s,"response.data.code","");cs(t)?cs(n)?e(Zo({subTitle:"error:rpm_AddNewRoleFailed",severity:ud.ERROR})):e(Zo({subTitle:Vd(n,"error:rpm_AddNewRoleFailed"),severity:ud.ERROR})):o(Ud(t))}},allPrograms:n})};function LU(e){return(0,sr.Ay)("MuiTab",e)}const IU=(0,ar.A)("MuiTab",["root","labelIcon","textColorInherit","textColorPrimary","textColorSecondary","selected","disabled","fullWidth","wrapped","iconWrapper"]),FU=["className","disabled","disableFocusRipple","fullWidth","icon","iconPosition","indicator","label","onChange","onClick","onFocus","selected","selectionFollowsFocus","textColor","value","wrapped"],$U=(0,Vn.Ay)(sh,{name:"MuiTab",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.label&&n.icon&&t.labelIcon,t["textColor".concat((0,pp.A)(n.textColor))],n.fullWidth&&t.fullWidth,n.wrapped&&t.wrapped,{["& .".concat(IU.iconWrapper)]:t.iconWrapper}]}})(e=>{let{theme:t,ownerState:n}=e;return(0,Ft.A)({},t.typography.button,{maxWidth:360,minWidth:90,position:"relative",minHeight:48,flexShrink:0,padding:"12px 16px",overflow:"hidden",whiteSpace:"normal",textAlign:"center"},n.label&&{flexDirection:"top"===n.iconPosition||"bottom"===n.iconPosition?"column":"row"},{lineHeight:1.25},n.icon&&n.label&&{minHeight:72,paddingTop:9,paddingBottom:9,["& > .".concat(IU.iconWrapper)]:(0,Ft.A)({},"top"===n.iconPosition&&{marginBottom:6},"bottom"===n.iconPosition&&{marginTop:6},"start"===n.iconPosition&&{marginRight:t.spacing(1)},"end"===n.iconPosition&&{marginLeft:t.spacing(1)})},"inherit"===n.textColor&&{color:"inherit",opacity:.6,["&.".concat(IU.selected)]:{opacity:1},["&.".concat(IU.disabled)]:{opacity:(t.vars||t).palette.action.disabledOpacity}},"primary"===n.textColor&&{color:(t.vars||t).palette.text.secondary,["&.".concat(IU.selected)]:{color:(t.vars||t).palette.primary.main},["&.".concat(IU.disabled)]:{color:(t.vars||t).palette.text.disabled}},"secondary"===n.textColor&&{color:(t.vars||t).palette.text.secondary,["&.".concat(IU.selected)]:{color:(t.vars||t).palette.secondary.main},["&.".concat(IU.disabled)]:{color:(t.vars||t).palette.text.disabled}},n.fullWidth&&{flexShrink:1,flexGrow:1,flexBasis:0,maxWidth:"none"},n.wrapped&&{fontSize:t.typography.pxToRem(12)})}),BU=We.forwardRef(function(e,t){const n=(0,$t.b)({props:e,name:"MuiTab"}),{className:r,disabled:i=!1,disableFocusRipple:o=!1,fullWidth:a,icon:s,iconPosition:l="top",indicator:c,label:d,onChange:u,onClick:p,onFocus:h,selected:m,selectionFollowsFocus:f,textColor:g="inherit",value:v,wrapped:x=!1}=n,y=(0,nn.A)(n,FU),b=(0,Ft.A)({},n,{disabled:i,disableFocusRipple:o,selected:m,icon:!!s,iconPosition:l,label:!!d,fullWidth:a,textColor:g,wrapped:x}),j=(e=>{const{classes:t,textColor:n,fullWidth:r,wrapped:i,icon:o,label:a,selected:s,disabled:l}=e,c={root:["root",o&&a&&"labelIcon","textColor".concat((0,pp.A)(n)),r&&"fullWidth",i&&"wrapped",s&&"selected",l&&"disabled"],iconWrapper:["iconWrapper"]};return(0,ir.A)(c,LU,t)})(b),_=s&&d&&We.isValidElement(s)?We.cloneElement(s,{className:(0,nr.A)(j.iconWrapper,s.props.className)}):s;return(0,qt.jsxs)($U,(0,Ft.A)({focusRipple:!o,className:(0,nr.A)(j.root,r),ref:t,role:"tab","aria-selected":m,disabled:i,onClick:e=>{!m&&u&&u(e,v),p&&p(e)},onFocus:e=>{f&&!m&&u&&u(e,v),h&&h(e)},ownerState:b,tabIndex:m?0:-1},y,{children:["top"===l||"start"===l?(0,qt.jsxs)(We.Fragment,{children:[_,d]}):(0,qt.jsxs)(We.Fragment,{children:[d,_]}),c]}))}),zU=BU;let HU;function WU(){if(HU)return HU;const e=document.createElement("div"),t=document.createElement("div");return t.style.width="10px",t.style.height="1px",e.appendChild(t),e.dir="rtl",e.style.fontSize="14px",e.style.width="4px",e.style.height="1px",e.style.position="absolute",e.style.top="-1000px",e.style.overflow="scroll",document.body.appendChild(e),HU="reverse",e.scrollLeft>0?HU="default":(e.scrollLeft=1,0===e.scrollLeft&&(HU="negative")),document.body.removeChild(e),HU}function UU(e,t){const n=e.scrollLeft;if("rtl"!==t)return n;switch(WU()){case"negative":return e.scrollWidth-e.clientWidth+n;case"reverse":return e.scrollWidth-e.clientWidth-n;default:return n}}function VU(e){return(1+Math.sin(Math.PI*e-Math.PI/2))/2}const GU=["onChange"],qU={width:99,height:99,position:"absolute",top:-9999,overflow:"scroll"};const YU=(0,Cy.A)((0,qt.jsx)("path",{d:"M15.41 16.09l-4.58-4.59 4.58-4.59L14 5.5l-6 6 6 6z"}),"KeyboardArrowLeft"),ZU=(0,Cy.A)((0,qt.jsx)("path",{d:"M8.59 16.34l4.58-4.59-4.58-4.59L10 5.75l6 6-6 6z"}),"KeyboardArrowRight");function KU(e){return(0,sr.Ay)("MuiTabScrollButton",e)}const XU=(0,ar.A)("MuiTabScrollButton",["root","vertical","horizontal","disabled"]),QU=["className","slots","slotProps","direction","orientation","disabled"],JU=(0,Vn.Ay)(sh,{name:"MuiTabScrollButton",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.orientation&&t[n.orientation]]}})(e=>{let{ownerState:t}=e;return(0,Ft.A)({width:40,flexShrink:0,opacity:.8,["&.".concat(XU.disabled)]:{opacity:0}},"vertical"===t.orientation&&{width:"100%",height:40,"& svg":{transform:"rotate(".concat(t.isRtl?-90:90,"deg)")}})}),eV=We.forwardRef(function(e,t){var n,r;const i=(0,$t.b)({props:e,name:"MuiTabScrollButton"}),{className:o,slots:a={},slotProps:s={},direction:l}=i,c=(0,nn.A)(i,QU),d=dn(),u=(0,Ft.A)({isRtl:d},i),p=(e=>{const{classes:t,orientation:n,disabled:r}=e,i={root:["root",n,r&&"disabled"]};return(0,ir.A)(i,KU,t)})(u),h=null!=(n=a.StartScrollButtonIcon)?n:YU,m=null!=(r=a.EndScrollButtonIcon)?r:ZU,f=Dh({elementType:h,externalSlotProps:s.startScrollButtonIcon,additionalProps:{fontSize:"small"},ownerState:u}),g=Dh({elementType:m,externalSlotProps:s.endScrollButtonIcon,additionalProps:{fontSize:"small"},ownerState:u});return(0,qt.jsx)(JU,(0,Ft.A)({component:"div",className:(0,nr.A)(p.root,o),ref:t,role:null,ownerState:u,tabIndex:null},c,{children:"left"===l?(0,qt.jsx)(h,(0,Ft.A)({},f)):(0,qt.jsx)(m,(0,Ft.A)({},g))}))}),tV=eV;function nV(e){return(0,sr.Ay)("MuiTabs",e)}const rV=(0,ar.A)("MuiTabs",["root","vertical","flexContainer","flexContainerVertical","centered","scroller","fixed","scrollableX","scrollableY","hideScrollbar","scrollButtons","scrollButtonsHideMobile","indicator"]),iV=["aria-label","aria-labelledby","action","centered","children","className","component","allowScrollButtonsMobile","indicatorColor","onChange","orientation","ScrollButtonComponent","scrollButtons","selectionFollowsFocus","slots","slotProps","TabIndicatorProps","TabScrollButtonProps","textColor","value","variant","visibleScrollbar"],oV=(e,t)=>e===t?e.firstChild:t&&t.nextElementSibling?t.nextElementSibling:e.firstChild,aV=(e,t)=>e===t?e.lastChild:t&&t.previousElementSibling?t.previousElementSibling:e.lastChild,sV=(e,t,n)=>{let r=!1,i=n(e,t);for(;i;){if(i===e.firstChild){if(r)return;r=!0}const t=i.disabled||"true"===i.getAttribute("aria-disabled");if(i.hasAttribute("tabindex")&&!t)return void i.focus();i=n(e,i)}},lV=(0,Vn.Ay)("div",{name:"MuiTabs",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[{["& .".concat(rV.scrollButtons)]:t.scrollButtons},{["& .".concat(rV.scrollButtons)]:n.scrollButtonsHideMobile&&t.scrollButtonsHideMobile},t.root,n.vertical&&t.vertical]}})(e=>{let{ownerState:t,theme:n}=e;return(0,Ft.A)({overflow:"hidden",minHeight:48,WebkitOverflowScrolling:"touch",display:"flex"},t.vertical&&{flexDirection:"column"},t.scrollButtonsHideMobile&&{["& .".concat(rV.scrollButtons)]:{[n.breakpoints.down("sm")]:{display:"none"}}})}),cV=(0,Vn.Ay)("div",{name:"MuiTabs",slot:"Scroller",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.scroller,n.fixed&&t.fixed,n.hideScrollbar&&t.hideScrollbar,n.scrollableX&&t.scrollableX,n.scrollableY&&t.scrollableY]}})(e=>{let{ownerState:t}=e;return(0,Ft.A)({position:"relative",display:"inline-block",flex:"1 1 auto",whiteSpace:"nowrap"},t.fixed&&{overflowX:"hidden",width:"100%"},t.hideScrollbar&&{scrollbarWidth:"none","&::-webkit-scrollbar":{display:"none"}},t.scrollableX&&{overflowX:"auto",overflowY:"hidden"},t.scrollableY&&{overflowY:"auto",overflowX:"hidden"})}),dV=(0,Vn.Ay)("div",{name:"MuiTabs",slot:"FlexContainer",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.flexContainer,n.vertical&&t.flexContainerVertical,n.centered&&t.centered]}})(e=>{let{ownerState:t}=e;return(0,Ft.A)({display:"flex"},t.vertical&&{flexDirection:"column"},t.centered&&{justifyContent:"center"})}),uV=(0,Vn.Ay)("span",{name:"MuiTabs",slot:"Indicator",overridesResolver:(e,t)=>t.indicator})(e=>{let{ownerState:t,theme:n}=e;return(0,Ft.A)({position:"absolute",height:2,bottom:0,width:"100%",transition:n.transitions.create()},"primary"===t.indicatorColor&&{backgroundColor:(n.vars||n).palette.primary.main},"secondary"===t.indicatorColor&&{backgroundColor:(n.vars||n).palette.secondary.main},t.vertical&&{height:"100%",width:2,right:0})}),pV=(0,Vn.Ay)(function(e){const{onChange:t}=e,n=(0,nn.A)(e,GU),r=We.useRef(),i=We.useRef(null),o=()=>{r.current=i.current.offsetHeight-i.current.clientHeight};return(0,Uh.A)(()=>{const e=(0,Nn.A)(()=>{const e=r.current;o(),e!==r.current&&t(r.current)}),n=(0,Bn.A)(i.current);return n.addEventListener("resize",e),()=>{e.clear(),n.removeEventListener("resize",e)}},[t]),We.useEffect(()=>{o(),t(r.current)},[t]),(0,qt.jsx)("div",(0,Ft.A)({style:qU},n,{ref:i}))})({overflowX:"auto",overflowY:"hidden",scrollbarWidth:"none","&::-webkit-scrollbar":{display:"none"}}),hV={};const mV=We.forwardRef(function(e,t){const n=(0,$t.b)({props:e,name:"MuiTabs"}),r=In(),i=dn(),{"aria-label":o,"aria-labelledby":a,action:s,centered:l=!1,children:c,className:d,component:u="div",allowScrollButtonsMobile:p=!1,indicatorColor:h="primary",onChange:m,orientation:f="horizontal",ScrollButtonComponent:g=tV,scrollButtons:v="auto",selectionFollowsFocus:x,slots:y={},slotProps:b={},TabIndicatorProps:j={},TabScrollButtonProps:_={},textColor:C="primary",value:w,variant:S="standard",visibleScrollbar:A=!1}=n,k=(0,nn.A)(n,iV),T="scrollable"===S,E="vertical"===f,M=E?"scrollTop":"scrollLeft",O=E?"top":"left",R=E?"bottom":"right",P=E?"clientHeight":"clientWidth",D=E?"height":"width",N=(0,Ft.A)({},n,{component:u,allowScrollButtonsMobile:p,indicatorColor:h,orientation:f,vertical:E,scrollButtons:v,textColor:C,variant:S,visibleScrollbar:A,fixed:!T,hideScrollbar:T&&!A,scrollableX:T&&!E,scrollableY:T&&E,centered:l&&!T,scrollButtonsHideMobile:!p}),L=(e=>{const{vertical:t,fixed:n,hideScrollbar:r,scrollableX:i,scrollableY:o,centered:a,scrollButtonsHideMobile:s,classes:l}=e,c={root:["root",t&&"vertical"],scroller:["scroller",n&&"fixed",r&&"hideScrollbar",i&&"scrollableX",o&&"scrollableY"],flexContainer:["flexContainer",t&&"flexContainerVertical",a&&"centered"],indicator:["indicator"],scrollButtons:["scrollButtons",s&&"scrollButtonsHideMobile"],scrollableX:[i&&"scrollableX"],hideScrollbar:[r&&"hideScrollbar"]};return(0,ir.A)(c,nV,l)})(N),I=Dh({elementType:y.StartScrollButtonIcon,externalSlotProps:b.startScrollButtonIcon,ownerState:N}),F=Dh({elementType:y.EndScrollButtonIcon,externalSlotProps:b.endScrollButtonIcon,ownerState:N});const[$,B]=We.useState(!1),[z,H]=We.useState(hV),[W,U]=We.useState(!1),[V,G]=We.useState(!1),[q,Y]=We.useState(!1),[Z,K]=We.useState({overflow:"hidden",scrollbarWidth:0}),X=new Map,Q=We.useRef(null),J=We.useRef(null),ee=()=>{const e=Q.current;let t,n;if(e){const n=e.getBoundingClientRect();t={clientWidth:e.clientWidth,scrollLeft:e.scrollLeft,scrollTop:e.scrollTop,scrollLeftNormalized:UU(e,i?"rtl":"ltr"),scrollWidth:e.scrollWidth,top:n.top,bottom:n.bottom,left:n.left,right:n.right}}if(e&&!1!==w){const e=J.current.children;if(e.length>0){const t=e[X.get(w)];0,n=t?t.getBoundingClientRect():null}}return{tabsMeta:t,tabMeta:n}},te=(0,Tp.A)(()=>{const{tabsMeta:e,tabMeta:t}=ee();let n,r=0;if(E)n="top",t&&e&&(r=t.top-e.top+e.scrollTop);else if(n=i?"right":"left",t&&e){const o=i?e.scrollLeftNormalized+e.clientWidth-e.scrollWidth:e.scrollLeft;r=(i?-1:1)*(t[n]-e[n]+o)}const o={[n]:r,[D]:t?t[D]:0};if(isNaN(z[n])||isNaN(z[D]))H(o);else{const e=Math.abs(z[n]-o[n]),t=Math.abs(z[D]-o[D]);(e>=1||t>=1)&&H(o)}}),ne=function(e){let{animation:t=!0}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};t?function(e,t,n){let r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:()=>{};const{ease:o=VU,duration:a=300}=r;let s=null;const l=t[e];let c=!1;const d=()=>{c=!0},u=r=>{if(c)return void i(new Error("Animation cancelled"));null===s&&(s=r);const d=Math.min(1,(r-s)/a);t[e]=o(d)*(n-l)+l,d>=1?requestAnimationFrame(()=>{i(null)}):requestAnimationFrame(u)};l===n?i(new Error("Element already at target position")):requestAnimationFrame(u)}(M,Q.current,e,{duration:r.transitions.duration.standard}):Q.current[M]=e},re=e=>{let t=Q.current[M];E?t+=e:(t+=e*(i?-1:1),t*=i&&"reverse"===WU()?-1:1),ne(t)},ie=()=>{const e=Q.current[P];let t=0;const n=Array.from(J.current.children);for(let r=0;r<n.length;r+=1){const i=n[r];if(t+i[P]>e){0===r&&(t=e);break}t+=i[P]}return t},oe=()=>{re(-1*ie())},ae=()=>{re(ie())},se=We.useCallback(e=>{K({overflow:null,scrollbarWidth:e})},[]),le=(0,Tp.A)(e=>{const{tabsMeta:t,tabMeta:n}=ee();if(n&&t)if(n[O]<t[O]){const r=t[M]+(n[O]-t[O]);ne(r,{animation:e})}else if(n[R]>t[R]){const r=t[M]+(n[R]-t[R]);ne(r,{animation:e})}}),ce=(0,Tp.A)(()=>{T&&!1!==v&&Y(!q)});We.useEffect(()=>{const e=(0,Nn.A)(()=>{Q.current&&te()});let t;const n=n=>{n.forEach(e=>{e.removedNodes.forEach(e=>{var n;null==(n=t)||n.unobserve(e)}),e.addedNodes.forEach(e=>{var n;null==(n=t)||n.observe(e)})}),e(),ce()},r=(0,Bn.A)(Q.current);let i;return r.addEventListener("resize",e),"undefined"!==typeof ResizeObserver&&(t=new ResizeObserver(e),Array.from(J.current.children).forEach(e=>{t.observe(e)})),"undefined"!==typeof MutationObserver&&(i=new MutationObserver(n),i.observe(J.current,{childList:!0})),()=>{var n,o;e.clear(),r.removeEventListener("resize",e),null==(n=i)||n.disconnect(),null==(o=t)||o.disconnect()}},[te,ce]),We.useEffect(()=>{const e=Array.from(J.current.children),t=e.length;if("undefined"!==typeof IntersectionObserver&&t>0&&T&&!1!==v){const n=e[0],r=e[t-1],i={root:Q.current,threshold:.99},o=new IntersectionObserver(e=>{U(!e[0].isIntersecting)},i);o.observe(n);const a=new IntersectionObserver(e=>{G(!e[0].isIntersecting)},i);return a.observe(r),()=>{o.disconnect(),a.disconnect()}}},[T,v,q,null==c?void 0:c.length]),We.useEffect(()=>{B(!0)},[]),We.useEffect(()=>{te()}),We.useEffect(()=>{le(hV!==z)},[le,z]),We.useImperativeHandle(s,()=>({updateIndicator:te,updateScrollButtons:ce}),[te,ce]);const de=(0,qt.jsx)(uV,(0,Ft.A)({},j,{className:(0,nr.A)(L.indicator,j.className),ownerState:N,style:(0,Ft.A)({},z,j.style)}));let ue=0;const pe=We.Children.map(c,e=>{if(!We.isValidElement(e))return null;const t=void 0===e.props.value?ue:e.props.value;X.set(t,ue);const n=t===w;return ue+=1,We.cloneElement(e,(0,Ft.A)({fullWidth:"fullWidth"===S,indicator:n&&!$&&de,selected:n,selectionFollowsFocus:x,onChange:m,textColor:C,value:t},1!==ue||!1!==w||e.props.tabIndex?{}:{tabIndex:0}))}),he=(()=>{const e={};e.scrollbarSizeListener=T?(0,qt.jsx)(pV,{onChange:se,className:(0,nr.A)(L.scrollableX,L.hideScrollbar)}):null;const t=T&&("auto"===v&&(W||V)||!0===v);return e.scrollButtonStart=t?(0,qt.jsx)(g,(0,Ft.A)({slots:{StartScrollButtonIcon:y.StartScrollButtonIcon},slotProps:{startScrollButtonIcon:I},orientation:f,direction:i?"right":"left",onClick:oe,disabled:!W},_,{className:(0,nr.A)(L.scrollButtons,_.className)})):null,e.scrollButtonEnd=t?(0,qt.jsx)(g,(0,Ft.A)({slots:{EndScrollButtonIcon:y.EndScrollButtonIcon},slotProps:{endScrollButtonIcon:F},orientation:f,direction:i?"left":"right",onClick:ae,disabled:!V},_,{className:(0,nr.A)(L.scrollButtons,_.className)})):null,e})();return(0,qt.jsxs)(lV,(0,Ft.A)({className:(0,nr.A)(L.root,d),ownerState:N,ref:t,as:u},k,{children:[he.scrollButtonStart,he.scrollbarSizeListener,(0,qt.jsxs)(cV,{className:L.scroller,ownerState:N,style:{overflow:Z.overflow,[E?"margin".concat(i?"Left":"Right"):"marginBottom"]:A?void 0:-Z.scrollbarWidth},ref:Q,children:[(0,qt.jsx)(dV,{"aria-label":o,"aria-labelledby":a,"aria-orientation":"vertical"===f?"vertical":null,className:L.flexContainer,ownerState:N,onKeyDown:e=>{const t=J.current,n=(0,Nh.A)(t).activeElement;if("tab"!==n.getAttribute("role"))return;let r="horizontal"===f?"ArrowLeft":"ArrowUp",o="horizontal"===f?"ArrowRight":"ArrowDown";switch("horizontal"===f&&i&&(r="ArrowRight",o="ArrowLeft"),e.key){case r:e.preventDefault(),sV(t,n,aV);break;case o:e.preventDefault(),sV(t,n,oV);break;case"Home":e.preventDefault(),sV(t,null,oV);break;case"End":e.preventDefault(),sV(t,null,aV)}},ref:J,role:"tablist",children:pe}),$&&de]}),he.scrollButtonEnd]}))}),fV=mV;var gV=n(51937);const vV=We.createContext({});function xV(e){return(0,sr.Ay)("MuiAccordion",e)}const yV=(0,ar.A)("MuiAccordion",["root","rounded","expanded","disabled","gutters","region"]),bV=["children","className","defaultExpanded","disabled","disableGutters","expanded","onChange","square","slots","slotProps","TransitionComponent","TransitionProps"],jV=(0,Vn.Ay)(yp,{name:"MuiAccordion",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[{["& .".concat(yV.region)]:t.region},t.root,!n.square&&t.rounded,!n.disableGutters&&t.gutters]}})(e=>{let{theme:t}=e;const n={duration:t.transitions.duration.shortest};return{position:"relative",transition:t.transitions.create(["margin"],n),overflowAnchor:"none","&::before":{position:"absolute",left:0,top:-1,right:0,height:1,content:'""',opacity:1,backgroundColor:(t.vars||t).palette.divider,transition:t.transitions.create(["opacity","background-color"],n)},"&:first-of-type":{"&::before":{display:"none"}},["&.".concat(yV.expanded)]:{"&::before":{opacity:0},"&:first-of-type":{marginTop:0},"&:last-of-type":{marginBottom:0},"& + &":{"&::before":{display:"none"}}},["&.".concat(yV.disabled)]:{backgroundColor:(t.vars||t).palette.action.disabledBackground}}},e=>{let{theme:t}=e;return{variants:[{props:e=>!e.square,style:{borderRadius:0,"&:first-of-type":{borderTopLeftRadius:(t.vars||t).shape.borderRadius,borderTopRightRadius:(t.vars||t).shape.borderRadius},"&:last-of-type":{borderBottomLeftRadius:(t.vars||t).shape.borderRadius,borderBottomRightRadius:(t.vars||t).shape.borderRadius,"@supports (-ms-ime-align: auto)":{borderBottomLeftRadius:0,borderBottomRightRadius:0}}}},{props:e=>!e.disableGutters,style:{["&.".concat(yV.expanded)]:{margin:"16px 0"}}}]}}),_V=We.forwardRef(function(e,t){const n=(0,$t.b)({props:e,name:"MuiAccordion"}),{children:r,className:i,defaultExpanded:o=!1,disabled:a=!1,disableGutters:s=!1,expanded:l,onChange:c,square:d=!1,slots:u={},slotProps:p={},TransitionComponent:h,TransitionProps:m}=n,f=(0,nn.A)(n,bV),[g,v]=(0,Yx.A)({controlled:l,default:o,name:"Accordion",state:"expanded"}),x=We.useCallback(e=>{v(!g),c&&c(e,!g)},[g,c,v]),[y,...b]=We.Children.toArray(r),j=We.useMemo(()=>({expanded:g,disabled:a,disableGutters:s,toggle:x}),[g,a,s,x]),_=(0,Ft.A)({},n,{square:d,disabled:a,disableGutters:s,expanded:g}),C=(e=>{const{classes:t,square:n,expanded:r,disabled:i,disableGutters:o}=e,a={root:["root",!n&&"rounded",r&&"expanded",i&&"disabled",!o&&"gutters"],region:["region"]};return(0,ir.A)(a,xV,t)})(_),w=(0,Ft.A)({transition:h},u),S=(0,Ft.A)({transition:m},p),[A,k]=Ey("transition",{elementType:mr,externalForwardedProps:{slots:w,slotProps:S},ownerState:_});return(0,qt.jsxs)(jV,(0,Ft.A)({className:(0,nr.A)(C.root,i),ref:t,ownerState:_,square:d},f,{children:[(0,qt.jsx)(vV.Provider,{value:j,children:y}),(0,qt.jsx)(A,(0,Ft.A)({in:g,timeout:"auto"},k,{children:(0,qt.jsx)("div",{"aria-labelledby":y.props.id,id:y.props["aria-controls"],role:"region",className:C.region,children:b})}))]}))}),CV=_V;function wV(e){return(0,sr.Ay)("MuiAccordionDetails",e)}(0,ar.A)("MuiAccordionDetails",["root"]);const SV=["className"],AV=(0,Vn.Ay)("div",{name:"MuiAccordionDetails",slot:"Root",overridesResolver:(e,t)=>t.root})(e=>{let{theme:t}=e;return{padding:t.spacing(1,2,2)}}),kV=We.forwardRef(function(e,t){const n=(0,$t.b)({props:e,name:"MuiAccordionDetails"}),{className:r}=n,i=(0,nn.A)(n,SV),o=n,a=(e=>{const{classes:t}=e;return(0,ir.A)({root:["root"]},wV,t)})(o);return(0,qt.jsx)(AV,(0,Ft.A)({className:(0,nr.A)(a.root,r),ref:t,ownerState:o},i))}),TV=kV;function EV(e){return(0,sr.Ay)("MuiAccordionSummary",e)}const MV=(0,ar.A)("MuiAccordionSummary",["root","expanded","focusVisible","disabled","gutters","contentGutters","content","expandIconWrapper"]),OV=["children","className","expandIcon","focusVisibleClassName","onClick"],RV=(0,Vn.Ay)(sh,{name:"MuiAccordionSummary",slot:"Root",overridesResolver:(e,t)=>t.root})(e=>{let{theme:t}=e;const n={duration:t.transitions.duration.shortest};return{display:"flex",minHeight:48,padding:t.spacing(0,2),transition:t.transitions.create(["min-height","background-color"],n),["&.".concat(MV.focusVisible)]:{backgroundColor:(t.vars||t).palette.action.focus},["&.".concat(MV.disabled)]:{opacity:(t.vars||t).palette.action.disabledOpacity},["&:hover:not(.".concat(MV.disabled,")")]:{cursor:"pointer"},variants:[{props:e=>!e.disableGutters,style:{["&.".concat(MV.expanded)]:{minHeight:64}}}]}}),PV=(0,Vn.Ay)("div",{name:"MuiAccordionSummary",slot:"Content",overridesResolver:(e,t)=>t.content})(e=>{let{theme:t}=e;return{display:"flex",flexGrow:1,margin:"12px 0",variants:[{props:e=>!e.disableGutters,style:{transition:t.transitions.create(["margin"],{duration:t.transitions.duration.shortest}),["&.".concat(MV.expanded)]:{margin:"20px 0"}}}]}}),DV=(0,Vn.Ay)("div",{name:"MuiAccordionSummary",slot:"ExpandIconWrapper",overridesResolver:(e,t)=>t.expandIconWrapper})(e=>{let{theme:t}=e;return{display:"flex",color:(t.vars||t).palette.action.active,transform:"rotate(0deg)",transition:t.transitions.create("transform",{duration:t.transitions.duration.shortest}),["&.".concat(MV.expanded)]:{transform:"rotate(180deg)"}}}),NV=We.forwardRef(function(e,t){const n=(0,$t.b)({props:e,name:"MuiAccordionSummary"}),{children:r,className:i,expandIcon:o,focusVisibleClassName:a,onClick:s}=n,l=(0,nn.A)(n,OV),{disabled:c=!1,disableGutters:d,expanded:u,toggle:p}=We.useContext(vV),h=(0,Ft.A)({},n,{expanded:u,disabled:c,disableGutters:d}),m=(e=>{const{classes:t,expanded:n,disabled:r,disableGutters:i}=e,o={root:["root",n&&"expanded",r&&"disabled",!i&&"gutters"],focusVisible:["focusVisible"],content:["content",n&&"expanded",!i&&"contentGutters"],expandIconWrapper:["expandIconWrapper",n&&"expanded"]};return(0,ir.A)(o,EV,t)})(h);return(0,qt.jsxs)(RV,(0,Ft.A)({focusRipple:!1,disableRipple:!0,disabled:c,component:"div","aria-expanded":u,className:(0,nr.A)(m.root,i),focusVisibleClassName:(0,nr.A)(m.focusVisible,a),onClick:e=>{p&&p(e),s&&s(e)},ref:t,ownerState:h},l,{children:[(0,qt.jsx)(PV,{className:m.content,ownerState:h,children:r}),o&&(0,qt.jsx)(DV,{className:m.expandIconWrapper,ownerState:h,children:o})]}))}),LV=NV,IV=(0,Vn.Ay)(e=>(0,qt.jsx)(CV,(0,i.A)({disableGutters:!0,elevation:0,square:!0},e)))(e=>{let{theme:t}=e;return{border:"1px solid ".concat(t.palette.divider),borderRadius:t.shape.borderRadius,"&:not(:last-child)":{marginBottom:t.spacing(2)},"&:before":{display:"none"}}}),FV=(0,Vn.Ay)(e=>(0,qt.jsx)(LV,(0,i.A)({expandIcon:(0,qt.jsx)(gV.A,{sx:{fontSize:"0.9rem"}})},e)))(e=>{let{theme:t}=e;return{backgroundColor:"dark"===t.palette.mode?"rgba(255, 255, 255, .05)":"rgba(0, 0, 0, .03)",flexDirection:"row-reverse","& .MuiAccordionSummary-expandIconWrapper.Mui-expanded":{transform:"rotate(90deg)"},"& .MuiAccordionSummary-content":{marginLeft:t.spacing(1)}}}),$V=(0,Vn.Ay)(TV)(e=>{let{theme:t}=e;return{padding:t.spacing(2),borderTop:"1px solid rgba(0, 0, 0, .125)"}}),BV=["children","value","index"];function zV(e){const{children:t,value:n,index:r}=e,o=Ko(e,BV);return(0,qt.jsx)("div",(0,i.A)((0,i.A)({role:"tabpanel",hidden:n!==r,id:"simple-tabpanel-".concat(r),"aria-labelledby":"simple-tab-".concat(r)},o),{},{children:n===r&&t}))}function HV(e){return{id:"simple-tab-".concat(e),"aria-controls":"simple-tabpanel-".concat(e)}}const WV=function(e){let{role:t,actions:n,checkState:r,onCheckPermissions:o,updatePoliciesOnRole:a,handleSelectAllClick:s}=e;const{t:l}=Vg(),c=so(),[d,u]=We.useState(0),[p,h]=We.useState([]),m=e=>{var t,n;return(null===e||void 0===e||null===(t=e.tag)||void 0===t||null===(n=t.actions)||void 0===n?void 0:n.map(t=>"".concat(e.group,"/").concat(t.name))).every(e=>r.includes(e))},f=[{name:l("rpm_Roles"),url:ld.DOCTOR.ROLES},{name:l("rpm_EditRole"),url:""}];return(0,qt.jsxs)(op,{sx:{width:"100%"},children:[(0,qt.jsx)(op,{mb:2.5,children:(0,qt.jsx)(BH,{labels:f})}),(0,qt.jsx)(op,{mb:2.5,children:(0,qt.jsxs)(Ff,{container:!0,spacing:2,children:[(0,qt.jsx)(Ff,{item:!0,xs:!0,children:(0,qt.jsxs)(Cf,{variant:"h6",component:"h6",children:[l("rpm_EditRole"),(0,qt.jsxs)(op,{component:"span",fontSize:"body1.fontSize",children:[" ",cs(t)?(0,qt.jsx)(lS,{variant:"text",width:120,sx:{display:"inline-block"}}):"(".concat(null===t||void 0===t?void 0:t.name,")")]})]})}),(0,qt.jsx)(Ff,{item:!0,children:(0,qt.jsx)(xh,{variant:"outlined",color:"primary",disableElevation:!0,onClick:()=>c(-1),children:l("rpm_Cancel")})}),(0,qt.jsx)(Ff,{item:!0,children:(0,qt.jsx)(xh,{variant:"contained",color:"primary",disableElevation:!0,onClick:a,children:l("rpm_Save")})})]})}),(0,qt.jsx)(Ff,{container:!0,spacing:2,children:(0,qt.jsx)(Ff,{item:!0,xs:12,children:(0,qt.jsx)(yH,{variant:"outlined",children:(0,qt.jsx)(wH,{sx:{p:0,":last-child":{pb:0}},children:(0,qt.jsx)(Ff,{container:!0,children:(0,qt.jsxs)(Ff,{item:!0,xs:12,children:[(0,qt.jsx)(op,{sx:{borderBottom:1,borderColor:"divider"},children:(0,qt.jsxs)(fV,{value:d,onChange:(e,t)=>{u(t)},variant:"scrollable",scrollButtons:"auto",children:[(0,qt.jsx)(zU,(0,i.A)({label:l("rpm_Permissions")},HV(0))),(0,qt.jsx)(zU,(0,i.A)({label:l("rpm_Details")},HV(1)))]})}),(0,qt.jsx)(zV,{value:d,index:0,children:(0,qt.jsx)(op,{px:2,py:4,children:cs(n)?(0,qt.jsx)(yp,{variant:"outlined",sx:{px:2.5,py:6,display:"flex",height:"320px"},children:(0,qt.jsx)(op,{alignSelf:"center",sx:{mx:"auto"},children:(0,qt.jsx)(MM,{color:"primary"})})}):null===n||void 0===n?void 0:n.map(e=>{var t;return(0,qt.jsxs)(op,{sx:{":not(:first-of-type)":{mt:3}},className:"permission-list",children:[(0,qt.jsx)(Cf,{component:"h6",variant:"h6",fontSize:"body1.fontSize",color:"primary",children:e.group}),(0,qt.jsx)(op,{my:2,children:(0,qt.jsx)(eg,{})}),null===e||void 0===e||null===(t=e.tags)||void 0===t?void 0:t.map(t=>{return(0,qt.jsxs)(IV,{expanded:p.includes(t.tag),onChange:(n=t.tag,()=>{if(p.includes(n)){const e=p.filter(e=>e!==n);h(e)}else h([n])}),children:[(0,qt.jsx)(FV,{"aria-controls":"panel1d-content",id:"panel1d-header",children:(0,qt.jsx)(Cf,{fontWeight:"h6.fontWeight",children:l("rpm_ActionTag_".concat(t.tag))})}),(0,qt.jsxs)($V,{children:[(0,qt.jsx)(Ff,{item:!0,xs:12,mb:2,children:(0,qt.jsx)(wE,{labelPlacement:"end",value:"end",control:(0,qt.jsx)(Dw,{name:"".concat(t.tag),checked:m({group:e.group,tag:t}),onChange:n=>s(n,{group:e.group,tag:t})}),label:(0,qt.jsx)(op,{component:"span",fontWeight:"h6.fontWeight",children:l("rpm_SelectAll")})})}),null===t||void 0===t?void 0:t.actions.map(t=>(0,qt.jsxs)(Ff,{container:!0,spacing:2,mb:2,alignItems:"center",children:[(0,qt.jsx)(Ff,{item:!0,xs:12,md:4,lg:4,children:(0,qt.jsx)(wE,{labelPlacement:"end",value:"end",control:(0,qt.jsx)(Dw,{name:"".concat(e.group,"/").concat(t.name),checked:r.includes("".concat(e.group,"/").concat(t.name)),onChange:o}),label:(0,qt.jsx)(op,{component:"span",fontWeight:"h6.fontWeight",children:l("rpm_Action".concat(t.name))})})}),(0,qt.jsx)(Ff,{item:!0,xs:12,md:8,lg:6,children:(0,qt.jsx)(Cf,{variant:"body1",component:"p",children:l("message:rpm_ActionDescription".concat(t.name))})})]},t.name))]})]},t.tag);var n})]},e.group)})})}),(0,qt.jsx)(zV,{value:d,index:1,children:(0,qt.jsxs)(op,{px:2,py:4,children:[(0,qt.jsxs)(Ff,{container:!0,spacing:2,sx:{mb:2.5},children:[(0,qt.jsx)(Ff,{item:!0,xs:12,md:4,children:(0,qt.jsx)(Cf,{variant:"body1",component:"p",fontWeight:"h6.fontWeight",children:l("rpm_RoleName")})}),(0,qt.jsx)(Ff,{item:!0,xs:12,md:8,children:(0,qt.jsx)(Cf,{variant:"body1",component:"p",children:null===t||void 0===t?void 0:t.name})})]}),(0,qt.jsxs)(Ff,{container:!0,spacing:2,children:[(0,qt.jsx)(Ff,{item:!0,xs:12,md:4,children:(0,qt.jsx)(Cf,{variant:"body1",component:"p",fontWeight:"h6.fontWeight",children:l("rpm_RoleDescription")})}),(0,qt.jsx)(Ff,{item:!0,xs:12,md:6,children:(0,qt.jsx)(Cf,{variant:"body1",component:"p",children:null===t||void 0===t?void 0:t.description})})]})]})})]})})})})})})]})};const UV=function(){const{roleId:e}=lo(),{t:t}=Vg(),n=Nt(),{enqueueSnackbar:r}=hi(),o=wt(cu),[a,s]=We.useState(null),[l,c]=We.useState(null),[d,u]=We.useState(null),[p,h]=We.useState(null),[m,f]=We.useState([]),g=async()=>{try{const{data:t}=await n((e=>async t=>{t(na(!0));try{const t="".concat(ma.ROLES,"/").concat(e);return await Iu(t)}finally{t(na(!1))}})(e));s(t)}catch(t){r(t.message,{variant:"error"})}},v=async()=>{try{const e=await n(async e=>{e(na(!0));try{let e=["AGM","RPMCORE"];const t=await Promise.all(e.sort().map(e=>Iu("".concat(ma.ACTIONS,"/").concat(e))));return e=e.map((e,n)=>{const r=[];return t[n].data.forEach(e=>{const t=r.find(t=>{var n;return t.tag===(null===e||void 0===e||null===(n=e.metadata)||void 0===n?void 0:n.vgroup)});var n;t?t.actions.push({name:e.name,isSelected:!1}):r.push({tag:(null===e||void 0===e||null===(n=e.metadata)||void 0===n?void 0:n.vgroup)||e.name,actions:[{name:e.name,isSelected:!1}]})}),{group:e,tags:r}}),e}finally{e(na(!1))}});if(!cs(p)){const t=null!==p&&void 0!==p&&p.grants?null===p||void 0===p?void 0:p.grants:[];e.forEach(e=>{e.tags.forEach(n=>{n.actions.forEach(n=>{n.isSelected=t.includes("".concat(e.group,"/").concat(n.name))})})})}c(e)}catch(e){r(e.message,{variant:"error"})}},x=async()=>{try{const{data:t}=await n((e=>async t=>{t(na(!0));try{const t="".concat(ma.ROLES,"/").concat(e,"/policies");return await Iu(t)}finally{t(na(!1))}})(e)),{content:r}=t||{};u(r)}catch(t){r(t.message,{variant:"error"})}},y=async()=>{try{var e;const{data:r}=await n((t=null===(e=d[0])||void 0===e?void 0:e.id,async e=>{e(na(!0));try{const e="".concat(ma.POLICY,"/").concat(t);return await Iu(e)}finally{e(na(!1))}}));h(r)}catch(i){r(i.message,{variant:"error"})}var t},b=()=>{const e=[];null===l||void 0===l||l.forEach(t=>{t.tags.forEach(n=>{n.actions.forEach(n=>{n.isSelected&&e.push("".concat(t.group,"/").concat(n.name))})})}),f(e)};return We.useEffect(()=>{cs(l)||b()},[l]),We.useEffect(()=>{cs(p)||v()},[p]),We.useEffect(()=>{cs(d)||y()},[d]),We.useEffect(()=>{o&&e&&(g(),x(),v())},[o,e]),(0,qt.jsx)(WV,{role:a,actions:l,checkState:m,onCheckPermissions:e=>{if(Array.isArray(e))return f(e.map(e=>e.toString()));const t=e.target.name;m.includes(t)?f(m.filter(e=>e!==t)):f(e=>e.includes(t)?[...e]:[...e,t])},updatePoliciesOnRole:async()=>{const o={grants:[...m]};try{if(cs(p)){const l=(0,i.A)({},a);try{const{data:a}=await n((e=>async t=>{t(na(!0));try{const t={id:"POL".concat(sa()().valueOf()),path:e.group.path,grants:[],options:{flexible:!1},description:e.description},n="".concat(ma.POLICY);return await Fu(n,t)}finally{t(na(!1))}})(l));if(null!==a&&void 0!==a&&a.id)try{h((0,i.A)((0,i.A)({},a),{},{grants:[...m]}));const l=await n(((e,t)=>async n=>{n(na(!0));try{const n="".concat(ma.ROLES,"/").concat(e,"/add-policy?policyId=").concat(t);return await $u(n,{})}finally{n(na(!1))}})(e,null===a||void 0===a?void 0:a.id));if(null!==l&&void 0!==l&&l.data)try{await n(Yg(null===a||void 0===a?void 0:a.id,o)),r(t("message:rpm_UpdateRoleSuccess"),{variant:"success"})}catch(s){r(t("error:rpm_PolicyUpdateFailed"),{variant:"error"})}}catch(s){r(t("error:rpm_PolicyAttachFailed"),{variant:"error"})}}catch(s){r(t("error:rpm_PolicyCreateFailed"),{variant:"error"})}}else await n(Yg(null===p||void 0===p?void 0:p.id,o)),r(t("message:rpm_UpdateRoleSuccess"),{variant:"success"});f([...m])}catch(s){b(),r(s.message,{variant:"error"})}},handleSelectAllClick:(e,t)=>{var n,r;const i=null===t||void 0===t||null===(n=t.tag)||void 0===n||null===(r=n.actions)||void 0===r?void 0:r.map(e=>"".concat(t.group,"/").concat(e.name));e.target.checked?f([...m,...i]):f(m.filter(e=>!i.includes(e)))}})},VV=["children","onClose"],GV=e=>{const{children:t,onClose:n}=e,r=Ko(e,VV);return(0,qt.jsxs)(fC,(0,i.A)((0,i.A)({sx:{m:0,p:2}},r),{},{children:[t,n?(0,qt.jsx)(wh,{"aria-label":"close",onClick:n,sx:{position:"absolute",right:8,top:8,color:e=>e.palette.grey[500]},children:(0,qt.jsx)(J_.A,{})}):null]}))};function qV(e){let{dataName:t,actionFunction:n,openModal:r,onCloseModal:i,options:o,children:a}=e;return(0,qt.jsx)(We.Fragment,{children:(0,qt.jsxs)(cC,{fullWidth:!0,maxWidth:"sm",open:r,onClose:i,children:[(0,qt.jsxs)(GV,{sx:{px:4},onClose:i,children:[o.primaryText,t&&(0,qt.jsx)(Cf,{component:"p",variant:"subtitle2",children:"(".concat(t,")")})]}),(0,qt.jsx)(eg,{}),(0,qt.jsx)(bC,{sx:{p:4},children:a?a({dataName:t,actionFunction:n,openModal:r,onCloseModal:i,options:o}):(0,qt.jsxs)(qt.Fragment,{children:[(0,qt.jsxs)(qt.Fragment,{children:[(0,qt.jsx)(Cf,{component:"p",variant:"h6",children:o.secondaryText}),o.descText&&(0,qt.jsx)(Cf,{component:"p",variant:"body1",children:o.descText})]}),(0,qt.jsx)(op,{mt:2.5,children:(0,qt.jsxs)(Ff,{container:!0,spacing:2,direction:o.btnSwap?"row-reverse":"row",children:[(0,qt.jsx)(Ff,{item:!0,xs:o.btnSwap,children:(0,qt.jsx)(xh,{color:o.btn.secondaryColor,variant:"outlined",onClick:i,children:o.btn.secondaryText})}),(0,qt.jsx)(Ff,{item:!0,children:(0,qt.jsx)(xh,{color:o.btn.primaryColor,disableElevation:!0,variant:"contained",onClick:n,children:o.btn.primaryText})})]})})]})})]})})}function YV(e){return t=>typeof t===e}var ZV=YV("function"),KV=e=>"RegExp"===Object.prototype.toString.call(e).slice(8,-1),XV=e=>!QV(e)&&!(e=>null===e)(e)&&(ZV(e)||"object"===typeof e),QV=YV("undefined");function JV(e,t){if(e===t)return!0;if(e&&XV(e)&&t&&XV(t)){if(e.constructor!==t.constructor)return!1;if(Array.isArray(e)&&Array.isArray(t))return function(e,t){const{length:n}=e;if(n!==t.length)return!1;for(let r=n;0!==r--;)if(!JV(e[r],t[r]))return!1;return!0}(e,t);if(e instanceof Map&&t instanceof Map)return function(e,t){if(e.size!==t.size)return!1;for(const n of e.entries())if(!t.has(n[0]))return!1;for(const n of e.entries())if(!JV(n[1],t.get(n[0])))return!1;return!0}(e,t);if(e instanceof Set&&t instanceof Set)return function(e,t){if(e.size!==t.size)return!1;for(const n of e.entries())if(!t.has(n[0]))return!1;return!0}(e,t);if(ArrayBuffer.isView(e)&&ArrayBuffer.isView(t))return function(e,t){if(e.byteLength!==t.byteLength)return!1;const n=new DataView(e.buffer),r=new DataView(t.buffer);let i=e.byteLength;for(;i--;)if(n.getUint8(i)!==r.getUint8(i))return!1;return!0}(e,t);if(KV(e)&&KV(t))return e.source===t.source&&e.flags===t.flags;if(e.valueOf!==Object.prototype.valueOf)return e.valueOf()===t.valueOf();if(e.toString!==Object.prototype.toString)return e.toString()===t.toString();const n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(let e=n.length;0!==e--;)if(!Object.prototype.hasOwnProperty.call(t,n[e]))return!1;for(let i=n.length;0!==i--;){const r=n[i];if(("_owner"!==r||!e.$$typeof)&&!JV(e[r],t[r]))return!1}return!0}return!(!Number.isNaN(e)||!Number.isNaN(t))||e===t}var eG=["Array","ArrayBuffer","AsyncFunction","AsyncGenerator","AsyncGeneratorFunction","Date","Error","Function","Generator","GeneratorFunction","HTMLElement","Map","Object","Promise","RegExp","Set","WeakMap","WeakSet"],tG=["bigint","boolean","null","number","string","symbol","undefined"];function nG(e){const t=Object.prototype.toString.call(e).slice(8,-1);return/HTML\w+Element/.test(t)?"HTMLElement":(n=t,eG.includes(n)?t:void 0);var n}function rG(e){return t=>nG(t)===e}function iG(e){return t=>typeof t===e}var oG=["innerHTML","ownerDocument","style","attributes","nodeValue"];function aG(e){if(null===e)return"null";switch(typeof e){case"bigint":return"bigint";case"boolean":return"boolean";case"number":return"number";case"string":return"string";case"symbol":return"symbol";case"undefined":return"undefined"}if(aG.array(e))return"Array";if(aG.plainFunction(e))return"Function";const t=nG(e);return t||"Object"}aG.array=Array.isArray,aG.arrayOf=(e,t)=>!(!aG.array(e)&&!aG.function(t))&&e.every(e=>t(e)),aG.asyncGeneratorFunction=e=>"AsyncGeneratorFunction"===nG(e),aG.asyncFunction=rG("AsyncFunction"),aG.bigint=iG("bigint"),aG.boolean=e=>!0===e||!1===e,aG.date=rG("Date"),aG.defined=e=>!aG.undefined(e),aG.domElement=e=>aG.object(e)&&!aG.plainObject(e)&&1===e.nodeType&&aG.string(e.nodeName)&&oG.every(t=>t in e),aG.empty=e=>aG.string(e)&&0===e.length||aG.array(e)&&0===e.length||aG.object(e)&&!aG.map(e)&&!aG.set(e)&&0===Object.keys(e).length||aG.set(e)&&0===e.size||aG.map(e)&&0===e.size,aG.error=rG("Error"),aG.function=iG("function"),aG.generator=e=>aG.iterable(e)&&aG.function(e.next)&&aG.function(e.throw),aG.generatorFunction=rG("GeneratorFunction"),aG.instanceOf=(e,t)=>!(!e||!t)&&Object.getPrototypeOf(e)===t.prototype,aG.iterable=e=>!aG.nullOrUndefined(e)&&aG.function(e[Symbol.iterator]),aG.map=rG("Map"),aG.nan=e=>Number.isNaN(e),aG.null=e=>null===e,aG.nullOrUndefined=e=>aG.null(e)||aG.undefined(e),aG.number=e=>iG("number")(e)&&!aG.nan(e),aG.numericString=e=>aG.string(e)&&e.length>0&&!Number.isNaN(Number(e)),aG.object=e=>!aG.nullOrUndefined(e)&&(aG.function(e)||"object"===typeof e),aG.oneOf=(e,t)=>!!aG.array(e)&&e.indexOf(t)>-1,aG.plainFunction=rG("Function"),aG.plainObject=e=>{if("Object"!==nG(e))return!1;const t=Object.getPrototypeOf(e);return null===t||t===Object.getPrototypeOf({})},aG.primitive=e=>{return aG.null(e)||(t=typeof e,tG.includes(t));var t},aG.promise=rG("Promise"),aG.propertyOf=(e,t,n)=>{if(!aG.object(e)||!t)return!1;const r=e[t];return aG.function(n)?n(r):aG.defined(r)},aG.regexp=rG("RegExp"),aG.set=rG("Set"),aG.string=iG("string"),aG.symbol=iG("symbol"),aG.undefined=iG("undefined"),aG.weakMap=rG("WeakMap"),aG.weakSet=rG("WeakSet");var sG=aG;function lG(e,t,n){const{actual:r,key:i,previous:o,type:a}=n,s=gG(e,i),l=gG(t,i);let c=[s,l].every(sG.number)&&("increased"===a?s<l:s>l);return sG.undefined(r)||(c=c&&l===r),sG.undefined(o)||(c=c&&s===o),c}function cG(e,t,n){const{key:r,type:i,value:o}=n,a=gG(e,r),s=gG(t,r),l="added"===i?a:s,c="added"===i?s:a;return sG.nullOrUndefined(o)?[a,s].every(sG.array)?!c.every(mG(l)):[a,s].every(sG.plainObject)?function(e,t){return t.some(t=>!e.includes(t))}(Object.keys(l),Object.keys(c)):![a,s].every(e=>sG.primitive(e)&&sG.defined(e))&&("added"===i?!sG.defined(a)&&sG.defined(s):sG.defined(a)&&!sG.defined(s)):sG.defined(l)?!(!sG.array(l)&&!sG.plainObject(l))&&function(e,t,n){return!!fG(e,t)&&([e,t].every(sG.array)?!e.some(pG(n))&&t.some(pG(n)):[e,t].every(sG.plainObject)?!Object.entries(e).some(uG(n))&&Object.entries(t).some(uG(n)):t===n)}(l,c,o):JV(c,o)}function dG(e,t){let{key:n}=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=gG(e,n),i=gG(t,n);if(!fG(r,i))throw new TypeError("Inputs have different types");if(!function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return t.every(e=>sG.string(e)||sG.array(e)||sG.plainObject(e))}(r,i))throw new TypeError("Inputs don't have length");return[r,i].every(sG.plainObject)&&(r=Object.keys(r),i=Object.keys(i)),[r,i]}function uG(e){return t=>{let[n,r]=t;return sG.array(e)?JV(e,r)||e.some(e=>JV(e,r)||sG.array(r)&&mG(r)(e)):sG.plainObject(e)&&e[n]?!!e[n]&&JV(e[n],r):JV(e,r)}}function pG(e){return t=>sG.array(e)?e.some(e=>JV(e,t)||sG.array(t)&&mG(t)(e)):JV(e,t)}function hG(e,t){return sG.array(e)?e.some(e=>JV(e,t)):JV(e,t)}function mG(e){return t=>e.some(e=>JV(e,t))}function fG(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return t.every(sG.array)||t.every(sG.number)||t.every(sG.plainObject)||t.every(sG.string)}function gG(e,t){if(sG.plainObject(e)||sG.array(e)){if(sG.string(t)){return t.split(".").reduce((e,t)=>e&&e[t],e)}return sG.number(t)?e[t]:e}return e}function vG(e,t){if([e,t].some(sG.nullOrUndefined))throw new Error("Missing required parameters");if(![e,t].every(e=>sG.plainObject(e)||sG.array(e)))throw new Error("Expected plain objects or array");return{added:(n,r)=>{try{return cG(e,t,{key:n,type:"added",value:r})}catch(i){return!1}},changed:(n,r,i)=>{try{const o=gG(e,n),a=gG(t,n),s=sG.defined(r),l=sG.defined(i);if(s||l){const e=l?hG(i,o):!hG(r,o),t=hG(r,a);return e&&t}return[o,a].every(sG.array)||[o,a].every(sG.plainObject)?!JV(o,a):o!==a}catch(o){return!1}},changedFrom:(n,r,i)=>{if(!sG.defined(n))return!1;try{const o=gG(e,n),a=gG(t,n),s=sG.defined(i);return hG(r,o)&&(s?hG(i,a):!s)}catch(o){return!1}},decreased:(n,r,i)=>{if(!sG.defined(n))return!1;try{return lG(e,t,{key:n,actual:r,previous:i,type:"decreased"})}catch(o){return!1}},emptied:n=>{try{const[r,i]=dG(e,t,{key:n});return!!r.length&&!i.length}catch(r){return!1}},filled:n=>{try{const[r,i]=dG(e,t,{key:n});return!r.length&&!!i.length}catch(r){return!1}},increased:(n,r,i)=>{if(!sG.defined(n))return!1;try{return lG(e,t,{key:n,actual:r,previous:i,type:"increased"})}catch(o){return!1}},removed:(n,r)=>{try{return cG(e,t,{key:n,type:"removed",value:r})}catch(i){return!1}}}}var xG=n(13865),yG=n(89496),bG=n(2861),jG=n(95419),_G="undefined"!==typeof window&&"undefined"!==typeof document&&"undefined"!==typeof navigator,CG=function(){for(var e=["Edge","Trident","Firefox"],t=0;t<e.length;t+=1)if(_G&&navigator.userAgent.indexOf(e[t])>=0)return 1;return 0}();var wG=_G&&window.Promise?function(e){var t=!1;return function(){t||(t=!0,window.Promise.resolve().then(function(){t=!1,e()}))}}:function(e){var t=!1;return function(){t||(t=!0,setTimeout(function(){t=!1,e()},CG))}};function SG(e){return e&&"[object Function]"==={}.toString.call(e)}function AG(e,t){if(1!==e.nodeType)return[];var n=e.ownerDocument.defaultView.getComputedStyle(e,null);return t?n[t]:n}function kG(e){return"HTML"===e.nodeName?e:e.parentNode||e.host}function TG(e){if(!e)return document.body;switch(e.nodeName){case"HTML":case"BODY":return e.ownerDocument.body;case"#document":return e.body}var t=AG(e),n=t.overflow,r=t.overflowX,i=t.overflowY;return/(auto|scroll|overlay)/.test(n+i+r)?e:TG(kG(e))}function EG(e){return e&&e.referenceNode?e.referenceNode:e}var MG=_G&&!(!window.MSInputMethodContext||!document.documentMode),OG=_G&&/MSIE 10/.test(navigator.userAgent);function RG(e){return 11===e?MG:10===e?OG:MG||OG}function PG(e){if(!e)return document.documentElement;for(var t=RG(10)?document.body:null,n=e.offsetParent||null;n===t&&e.nextElementSibling;)n=(e=e.nextElementSibling).offsetParent;var r=n&&n.nodeName;return r&&"BODY"!==r&&"HTML"!==r?-1!==["TH","TD","TABLE"].indexOf(n.nodeName)&&"static"===AG(n,"position")?PG(n):n:e?e.ownerDocument.documentElement:document.documentElement}function DG(e){return null!==e.parentNode?DG(e.parentNode):e}function NG(e,t){if(!e||!e.nodeType||!t||!t.nodeType)return document.documentElement;var n=e.compareDocumentPosition(t)&Node.DOCUMENT_POSITION_FOLLOWING,r=n?e:t,i=n?t:e,o=document.createRange();o.setStart(r,0),o.setEnd(i,0);var a=o.commonAncestorContainer;if(e!==a&&t!==a||r.contains(i))return function(e){var t=e.nodeName;return"BODY"!==t&&("HTML"===t||PG(e.firstElementChild)===e)}(a)?a:PG(a);var s=DG(e);return s.host?NG(s.host,t):NG(e,DG(t).host)}function LG(e){var t="top"===(arguments.length>1&&void 0!==arguments[1]?arguments[1]:"top")?"scrollTop":"scrollLeft",n=e.nodeName;if("BODY"===n||"HTML"===n){var r=e.ownerDocument.documentElement;return(e.ownerDocument.scrollingElement||r)[t]}return e[t]}function IG(e,t){var n="x"===t?"Left":"Top",r="Left"===n?"Right":"Bottom";return parseFloat(e["border"+n+"Width"])+parseFloat(e["border"+r+"Width"])}function FG(e,t,n,r){return Math.max(t["offset"+e],t["scroll"+e],n["client"+e],n["offset"+e],n["scroll"+e],RG(10)?parseInt(n["offset"+e])+parseInt(r["margin"+("Height"===e?"Top":"Left")])+parseInt(r["margin"+("Height"===e?"Bottom":"Right")]):0)}function $G(e){var t=e.body,n=e.documentElement,r=RG(10)&&getComputedStyle(n);return{height:FG("Height",t,n,r),width:FG("Width",t,n,r)}}var BG=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),zG=function(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e},HG=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e};function WG(e){return HG({},e,{right:e.left+e.width,bottom:e.top+e.height})}function UG(e){var t={};try{if(RG(10)){t=e.getBoundingClientRect();var n=LG(e,"top"),r=LG(e,"left");t.top+=n,t.left+=r,t.bottom+=n,t.right+=r}else t=e.getBoundingClientRect()}catch(Ca){}var i={left:t.left,top:t.top,width:t.right-t.left,height:t.bottom-t.top},o="HTML"===e.nodeName?$G(e.ownerDocument):{},a=o.width||e.clientWidth||i.width,s=o.height||e.clientHeight||i.height,l=e.offsetWidth-a,c=e.offsetHeight-s;if(l||c){var d=AG(e);l-=IG(d,"x"),c-=IG(d,"y"),i.width-=l,i.height-=c}return WG(i)}function VG(e,t){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],r=RG(10),i="HTML"===t.nodeName,o=UG(e),a=UG(t),s=TG(e),l=AG(t),c=parseFloat(l.borderTopWidth),d=parseFloat(l.borderLeftWidth);n&&i&&(a.top=Math.max(a.top,0),a.left=Math.max(a.left,0));var u=WG({top:o.top-a.top-c,left:o.left-a.left-d,width:o.width,height:o.height});if(u.marginTop=0,u.marginLeft=0,!r&&i){var p=parseFloat(l.marginTop),h=parseFloat(l.marginLeft);u.top-=c-p,u.bottom-=c-p,u.left-=d-h,u.right-=d-h,u.marginTop=p,u.marginLeft=h}return(r&&!n?t.contains(s):t===s&&"BODY"!==s.nodeName)&&(u=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],r=LG(t,"top"),i=LG(t,"left"),o=n?-1:1;return e.top+=r*o,e.bottom+=r*o,e.left+=i*o,e.right+=i*o,e}(u,t)),u}function GG(e){var t=e.nodeName;if("BODY"===t||"HTML"===t)return!1;if("fixed"===AG(e,"position"))return!0;var n=kG(e);return!!n&&GG(n)}function qG(e){if(!e||!e.parentElement||RG())return document.documentElement;for(var t=e.parentElement;t&&"none"===AG(t,"transform");)t=t.parentElement;return t||document.documentElement}function YG(e,t,n,r){var i=arguments.length>4&&void 0!==arguments[4]&&arguments[4],o={top:0,left:0},a=i?qG(e):NG(e,EG(t));if("viewport"===r)o=function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=e.ownerDocument.documentElement,r=VG(e,n),i=Math.max(n.clientWidth,window.innerWidth||0),o=Math.max(n.clientHeight,window.innerHeight||0),a=t?0:LG(n),s=t?0:LG(n,"left");return WG({top:a-r.top+r.marginTop,left:s-r.left+r.marginLeft,width:i,height:o})}(a,i);else{var s=void 0;"scrollParent"===r?"BODY"===(s=TG(kG(t))).nodeName&&(s=e.ownerDocument.documentElement):s="window"===r?e.ownerDocument.documentElement:r;var l=VG(s,a,i);if("HTML"!==s.nodeName||GG(a))o=l;else{var c=$G(e.ownerDocument),d=c.height,u=c.width;o.top+=l.top-l.marginTop,o.bottom=d+l.top,o.left+=l.left-l.marginLeft,o.right=u+l.left}}var p="number"===typeof(n=n||0);return o.left+=p?n:n.left||0,o.top+=p?n:n.top||0,o.right-=p?n:n.right||0,o.bottom-=p?n:n.bottom||0,o}function ZG(e,t,n,r,i){var o=arguments.length>5&&void 0!==arguments[5]?arguments[5]:0;if(-1===e.indexOf("auto"))return e;var a=YG(n,r,o,i),s={top:{width:a.width,height:t.top-a.top},right:{width:a.right-t.right,height:a.height},bottom:{width:a.width,height:a.bottom-t.bottom},left:{width:t.left-a.left,height:a.height}},l=Object.keys(s).map(function(e){return HG({key:e},s[e],{area:(t=s[e],t.width*t.height)});var t}).sort(function(e,t){return t.area-e.area}),c=l.filter(function(e){var t=e.width,r=e.height;return t>=n.clientWidth&&r>=n.clientHeight}),d=c.length>0?c[0].key:l[0].key,u=e.split("-")[1];return d+(u?"-"+u:"")}function KG(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null;return VG(n,r?qG(t):NG(t,EG(n)),r)}function XG(e){var t=e.ownerDocument.defaultView.getComputedStyle(e),n=parseFloat(t.marginTop||0)+parseFloat(t.marginBottom||0),r=parseFloat(t.marginLeft||0)+parseFloat(t.marginRight||0);return{width:e.offsetWidth+r,height:e.offsetHeight+n}}function QG(e){var t={left:"right",right:"left",bottom:"top",top:"bottom"};return e.replace(/left|right|bottom|top/g,function(e){return t[e]})}function JG(e,t,n){n=n.split("-")[0];var r=XG(e),i={width:r.width,height:r.height},o=-1!==["right","left"].indexOf(n),a=o?"top":"left",s=o?"left":"top",l=o?"height":"width",c=o?"width":"height";return i[a]=t[a]+t[l]/2-r[l]/2,i[s]=n===s?t[s]-r[c]:t[QG(s)],i}function eq(e,t){return Array.prototype.find?e.find(t):e.filter(t)[0]}function tq(e,t,n){var r=void 0===n?e:e.slice(0,function(e,t,n){if(Array.prototype.findIndex)return e.findIndex(function(e){return e[t]===n});var r=eq(e,function(e){return e[t]===n});return e.indexOf(r)}(e,"name",n));return r.forEach(function(e){e.function&&console.warn("`modifier.function` is deprecated, use `modifier.fn`!");var n=e.function||e.fn;e.enabled&&SG(n)&&(t.offsets.popper=WG(t.offsets.popper),t.offsets.reference=WG(t.offsets.reference),t=n(t,e))}),t}function nq(){if(!this.state.isDestroyed){var e={instance:this,styles:{},arrowStyles:{},attributes:{},flipped:!1,offsets:{}};e.offsets.reference=KG(this.state,this.popper,this.reference,this.options.positionFixed),e.placement=ZG(this.options.placement,e.offsets.reference,this.popper,this.reference,this.options.modifiers.flip.boundariesElement,this.options.modifiers.flip.padding),e.originalPlacement=e.placement,e.positionFixed=this.options.positionFixed,e.offsets.popper=JG(this.popper,e.offsets.reference,e.placement),e.offsets.popper.position=this.options.positionFixed?"fixed":"absolute",e=tq(this.modifiers,e),this.state.isCreated?this.options.onUpdate(e):(this.state.isCreated=!0,this.options.onCreate(e))}}function rq(e,t){return e.some(function(e){var n=e.name;return e.enabled&&n===t})}function iq(e){for(var t=[!1,"ms","Webkit","Moz","O"],n=e.charAt(0).toUpperCase()+e.slice(1),r=0;r<t.length;r++){var i=t[r],o=i?""+i+n:e;if("undefined"!==typeof document.body.style[o])return o}return null}function oq(){return this.state.isDestroyed=!0,rq(this.modifiers,"applyStyle")&&(this.popper.removeAttribute("x-placement"),this.popper.style.position="",this.popper.style.top="",this.popper.style.left="",this.popper.style.right="",this.popper.style.bottom="",this.popper.style.willChange="",this.popper.style[iq("transform")]=""),this.disableEventListeners(),this.options.removeOnDestroy&&this.popper.parentNode.removeChild(this.popper),this}function aq(e){var t=e.ownerDocument;return t?t.defaultView:window}function sq(e,t,n,r){var i="BODY"===e.nodeName,o=i?e.ownerDocument.defaultView:e;o.addEventListener(t,n,{passive:!0}),i||sq(TG(o.parentNode),t,n,r),r.push(o)}function lq(e,t,n,r){n.updateBound=r,aq(e).addEventListener("resize",n.updateBound,{passive:!0});var i=TG(e);return sq(i,"scroll",n.updateBound,n.scrollParents),n.scrollElement=i,n.eventsEnabled=!0,n}function cq(){this.state.eventsEnabled||(this.state=lq(this.reference,this.options,this.state,this.scheduleUpdate))}function dq(){this.state.eventsEnabled&&(cancelAnimationFrame(this.scheduleUpdate),this.state=function(e,t){return aq(e).removeEventListener("resize",t.updateBound),t.scrollParents.forEach(function(e){e.removeEventListener("scroll",t.updateBound)}),t.updateBound=null,t.scrollParents=[],t.scrollElement=null,t.eventsEnabled=!1,t}(this.reference,this.state))}function uq(e){return""!==e&&!isNaN(parseFloat(e))&&isFinite(e)}function pq(e,t){Object.keys(t).forEach(function(n){var r="";-1!==["width","height","top","right","bottom","left"].indexOf(n)&&uq(t[n])&&(r="px"),e.style[n]=t[n]+r})}var hq=_G&&/Firefox/i.test(navigator.userAgent);function mq(e,t,n){var r=eq(e,function(e){return e.name===t}),i=!!r&&e.some(function(e){return e.name===n&&e.enabled&&e.order<r.order});if(!i){var o="`"+t+"`",a="`"+n+"`";console.warn(a+" modifier is required by "+o+" modifier in order to work, be sure to include it before "+o+"!")}return i}var fq=["auto-start","auto","auto-end","top-start","top","top-end","right-start","right","right-end","bottom-end","bottom","bottom-start","left-end","left","left-start"],gq=fq.slice(3);function vq(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=gq.indexOf(e),r=gq.slice(n+1).concat(gq.slice(0,n));return t?r.reverse():r}var xq="flip",yq="clockwise",bq="counterclockwise";function jq(e,t,n,r){var i=[0,0],o=-1!==["right","left"].indexOf(r),a=e.split(/(\+|\-)/).map(function(e){return e.trim()}),s=a.indexOf(eq(a,function(e){return-1!==e.search(/,|\s/)}));a[s]&&-1===a[s].indexOf(",")&&console.warn("Offsets separated by white space(s) are deprecated, use a comma (,) instead.");var l=/\s*,\s*|\s+/,c=-1!==s?[a.slice(0,s).concat([a[s].split(l)[0]]),[a[s].split(l)[1]].concat(a.slice(s+1))]:[a];return c=c.map(function(e,r){var i=(1===r?!o:o)?"height":"width",a=!1;return e.reduce(function(e,t){return""===e[e.length-1]&&-1!==["+","-"].indexOf(t)?(e[e.length-1]=t,a=!0,e):a?(e[e.length-1]+=t,a=!1,e):e.concat(t)},[]).map(function(e){return function(e,t,n,r){var i=e.match(/((?:\-|\+)?\d*\.?\d*)(.*)/),o=+i[1],a=i[2];if(!o)return e;if(0===a.indexOf("%")){return WG("%p"===a?n:r)[t]/100*o}if("vh"===a||"vw"===a)return("vh"===a?Math.max(document.documentElement.clientHeight,window.innerHeight||0):Math.max(document.documentElement.clientWidth,window.innerWidth||0))/100*o;return o}(e,i,t,n)})}),c.forEach(function(e,t){e.forEach(function(n,r){uq(n)&&(i[t]+=n*("-"===e[r-1]?-1:1))})}),i}var _q={shift:{order:100,enabled:!0,fn:function(e){var t=e.placement,n=t.split("-")[0],r=t.split("-")[1];if(r){var i=e.offsets,o=i.reference,a=i.popper,s=-1!==["bottom","top"].indexOf(n),l=s?"left":"top",c=s?"width":"height",d={start:zG({},l,o[l]),end:zG({},l,o[l]+o[c]-a[c])};e.offsets.popper=HG({},a,d[r])}return e}},offset:{order:200,enabled:!0,fn:function(e,t){var n=t.offset,r=e.placement,i=e.offsets,o=i.popper,a=i.reference,s=r.split("-")[0],l=void 0;return l=uq(+n)?[+n,0]:jq(n,o,a,s),"left"===s?(o.top+=l[0],o.left-=l[1]):"right"===s?(o.top+=l[0],o.left+=l[1]):"top"===s?(o.left+=l[0],o.top-=l[1]):"bottom"===s&&(o.left+=l[0],o.top+=l[1]),e.popper=o,e},offset:0},preventOverflow:{order:300,enabled:!0,fn:function(e,t){var n=t.boundariesElement||PG(e.instance.popper);e.instance.reference===n&&(n=PG(n));var r=iq("transform"),i=e.instance.popper.style,o=i.top,a=i.left,s=i[r];i.top="",i.left="",i[r]="";var l=YG(e.instance.popper,e.instance.reference,t.padding,n,e.positionFixed);i.top=o,i.left=a,i[r]=s,t.boundaries=l;var c=t.priority,d=e.offsets.popper,u={primary:function(e){var n=d[e];return d[e]<l[e]&&!t.escapeWithReference&&(n=Math.max(d[e],l[e])),zG({},e,n)},secondary:function(e){var n="right"===e?"left":"top",r=d[n];return d[e]>l[e]&&!t.escapeWithReference&&(r=Math.min(d[n],l[e]-("right"===e?d.width:d.height))),zG({},n,r)}};return c.forEach(function(e){var t=-1!==["left","top"].indexOf(e)?"primary":"secondary";d=HG({},d,u[t](e))}),e.offsets.popper=d,e},priority:["left","right","top","bottom"],padding:5,boundariesElement:"scrollParent"},keepTogether:{order:400,enabled:!0,fn:function(e){var t=e.offsets,n=t.popper,r=t.reference,i=e.placement.split("-")[0],o=Math.floor,a=-1!==["top","bottom"].indexOf(i),s=a?"right":"bottom",l=a?"left":"top",c=a?"width":"height";return n[s]<o(r[l])&&(e.offsets.popper[l]=o(r[l])-n[c]),n[l]>o(r[s])&&(e.offsets.popper[l]=o(r[s])),e}},arrow:{order:500,enabled:!0,fn:function(e,t){var n;if(!mq(e.instance.modifiers,"arrow","keepTogether"))return e;var r=t.element;if("string"===typeof r){if(!(r=e.instance.popper.querySelector(r)))return e}else if(!e.instance.popper.contains(r))return console.warn("WARNING: `arrow.element` must be child of its popper element!"),e;var i=e.placement.split("-")[0],o=e.offsets,a=o.popper,s=o.reference,l=-1!==["left","right"].indexOf(i),c=l?"height":"width",d=l?"Top":"Left",u=d.toLowerCase(),p=l?"left":"top",h=l?"bottom":"right",m=XG(r)[c];s[h]-m<a[u]&&(e.offsets.popper[u]-=a[u]-(s[h]-m)),s[u]+m>a[h]&&(e.offsets.popper[u]+=s[u]+m-a[h]),e.offsets.popper=WG(e.offsets.popper);var f=s[u]+s[c]/2-m/2,g=AG(e.instance.popper),v=parseFloat(g["margin"+d]),x=parseFloat(g["border"+d+"Width"]),y=f-e.offsets.popper[u]-v-x;return y=Math.max(Math.min(a[c]-m,y),0),e.arrowElement=r,e.offsets.arrow=(zG(n={},u,Math.round(y)),zG(n,p,""),n),e},element:"[x-arrow]"},flip:{order:600,enabled:!0,fn:function(e,t){if(rq(e.instance.modifiers,"inner"))return e;if(e.flipped&&e.placement===e.originalPlacement)return e;var n=YG(e.instance.popper,e.instance.reference,t.padding,t.boundariesElement,e.positionFixed),r=e.placement.split("-")[0],i=QG(r),o=e.placement.split("-")[1]||"",a=[];switch(t.behavior){case xq:a=[r,i];break;case yq:a=vq(r);break;case bq:a=vq(r,!0);break;default:a=t.behavior}return a.forEach(function(s,l){if(r!==s||a.length===l+1)return e;r=e.placement.split("-")[0],i=QG(r);var c=e.offsets.popper,d=e.offsets.reference,u=Math.floor,p="left"===r&&u(c.right)>u(d.left)||"right"===r&&u(c.left)<u(d.right)||"top"===r&&u(c.bottom)>u(d.top)||"bottom"===r&&u(c.top)<u(d.bottom),h=u(c.left)<u(n.left),m=u(c.right)>u(n.right),f=u(c.top)<u(n.top),g=u(c.bottom)>u(n.bottom),v="left"===r&&h||"right"===r&&m||"top"===r&&f||"bottom"===r&&g,x=-1!==["top","bottom"].indexOf(r),y=!!t.flipVariations&&(x&&"start"===o&&h||x&&"end"===o&&m||!x&&"start"===o&&f||!x&&"end"===o&&g),b=!!t.flipVariationsByContent&&(x&&"start"===o&&m||x&&"end"===o&&h||!x&&"start"===o&&g||!x&&"end"===o&&f),j=y||b;(p||v||j)&&(e.flipped=!0,(p||v)&&(r=a[l+1]),j&&(o=function(e){return"end"===e?"start":"start"===e?"end":e}(o)),e.placement=r+(o?"-"+o:""),e.offsets.popper=HG({},e.offsets.popper,JG(e.instance.popper,e.offsets.reference,e.placement)),e=tq(e.instance.modifiers,e,"flip"))}),e},behavior:"flip",padding:5,boundariesElement:"viewport",flipVariations:!1,flipVariationsByContent:!1},inner:{order:700,enabled:!1,fn:function(e){var t=e.placement,n=t.split("-")[0],r=e.offsets,i=r.popper,o=r.reference,a=-1!==["left","right"].indexOf(n),s=-1===["top","left"].indexOf(n);return i[a?"left":"top"]=o[n]-(s?i[a?"width":"height"]:0),e.placement=QG(t),e.offsets.popper=WG(i),e}},hide:{order:800,enabled:!0,fn:function(e){if(!mq(e.instance.modifiers,"hide","preventOverflow"))return e;var t=e.offsets.reference,n=eq(e.instance.modifiers,function(e){return"preventOverflow"===e.name}).boundaries;if(t.bottom<n.top||t.left>n.right||t.top>n.bottom||t.right<n.left){if(!0===e.hide)return e;e.hide=!0,e.attributes["x-out-of-boundaries"]=""}else{if(!1===e.hide)return e;e.hide=!1,e.attributes["x-out-of-boundaries"]=!1}return e}},computeStyle:{order:850,enabled:!0,fn:function(e,t){var n=t.x,r=t.y,i=e.offsets.popper,o=eq(e.instance.modifiers,function(e){return"applyStyle"===e.name}).gpuAcceleration;void 0!==o&&console.warn("WARNING: `gpuAcceleration` option moved to `computeStyle` modifier and will not be supported in future versions of Popper.js!");var a=void 0!==o?o:t.gpuAcceleration,s=PG(e.instance.popper),l=UG(s),c={position:i.position},d=function(e,t){var n=e.offsets,r=n.popper,i=n.reference,o=Math.round,a=Math.floor,s=function(e){return e},l=o(i.width),c=o(r.width),d=-1!==["left","right"].indexOf(e.placement),u=-1!==e.placement.indexOf("-"),p=t?d||u||l%2===c%2?o:a:s,h=t?o:s;return{left:p(l%2===1&&c%2===1&&!u&&t?r.left-1:r.left),top:h(r.top),bottom:h(r.bottom),right:p(r.right)}}(e,window.devicePixelRatio<2||!hq),u="bottom"===n?"top":"bottom",p="right"===r?"left":"right",h=iq("transform"),m=void 0,f=void 0;if(f="bottom"===u?"HTML"===s.nodeName?-s.clientHeight+d.bottom:-l.height+d.bottom:d.top,m="right"===p?"HTML"===s.nodeName?-s.clientWidth+d.right:-l.width+d.right:d.left,a&&h)c[h]="translate3d("+m+"px, "+f+"px, 0)",c[u]=0,c[p]=0,c.willChange="transform";else{var g="bottom"===u?-1:1,v="right"===p?-1:1;c[u]=f*g,c[p]=m*v,c.willChange=u+", "+p}var x={"x-placement":e.placement};return e.attributes=HG({},x,e.attributes),e.styles=HG({},c,e.styles),e.arrowStyles=HG({},e.offsets.arrow,e.arrowStyles),e},gpuAcceleration:!0,x:"bottom",y:"right"},applyStyle:{order:900,enabled:!0,fn:function(e){var t,n;return pq(e.instance.popper,e.styles),t=e.instance.popper,n=e.attributes,Object.keys(n).forEach(function(e){!1!==n[e]?t.setAttribute(e,n[e]):t.removeAttribute(e)}),e.arrowElement&&Object.keys(e.arrowStyles).length&&pq(e.arrowElement,e.arrowStyles),e},onLoad:function(e,t,n,r,i){var o=KG(i,t,e,n.positionFixed),a=ZG(n.placement,o,t,e,n.modifiers.flip.boundariesElement,n.modifiers.flip.padding);return t.setAttribute("x-placement",a),pq(t,{position:n.positionFixed?"fixed":"absolute"}),n},gpuAcceleration:void 0}},Cq={placement:"bottom",positionFixed:!1,eventsEnabled:!0,removeOnDestroy:!1,onCreate:function(){},onUpdate:function(){},modifiers:_q},wq=function(){function e(t,n){var r=this,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.scheduleUpdate=function(){return requestAnimationFrame(r.update)},this.update=wG(this.update.bind(this)),this.options=HG({},e.Defaults,i),this.state={isDestroyed:!1,isCreated:!1,scrollParents:[]},this.reference=t&&t.jquery?t[0]:t,this.popper=n&&n.jquery?n[0]:n,this.options.modifiers={},Object.keys(HG({},e.Defaults.modifiers,i.modifiers)).forEach(function(t){r.options.modifiers[t]=HG({},e.Defaults.modifiers[t]||{},i.modifiers?i.modifiers[t]:{})}),this.modifiers=Object.keys(this.options.modifiers).map(function(e){return HG({name:e},r.options.modifiers[e])}).sort(function(e,t){return e.order-t.order}),this.modifiers.forEach(function(e){e.enabled&&SG(e.onLoad)&&e.onLoad(r.reference,r.popper,r.options,e,r.state)}),this.update();var o=this.options.eventsEnabled;o&&this.enableEventListeners(),this.state.eventsEnabled=o}return BG(e,[{key:"update",value:function(){return nq.call(this)}},{key:"destroy",value:function(){return oq.call(this)}},{key:"enableEventListeners",value:function(){return cq.call(this)}},{key:"disableEventListeners",value:function(){return dq.call(this)}}]),e}();wq.Utils=("undefined"!==typeof window?window:n.g).PopperUtils,wq.placements=fq,wq.Defaults=Cq;const Sq=wq;var Aq=n(52718),kq=n.n(Aq),Tq=["innerHTML","ownerDocument","style","attributes","nodeValue"],Eq=["Array","ArrayBuffer","AsyncFunction","AsyncGenerator","AsyncGeneratorFunction","Date","Error","Function","Generator","GeneratorFunction","HTMLElement","Map","Object","Promise","RegExp","Set","WeakMap","WeakSet"],Mq=["bigint","boolean","null","number","string","symbol","undefined"];function Oq(e){var t,n=Object.prototype.toString.call(e).slice(8,-1);return/HTML\w+Element/.test(n)?"HTMLElement":(t=n,Eq.includes(t)?n:void 0)}function Rq(e){return function(t){return Oq(t)===e}}function Pq(e){return function(t){return typeof t===e}}function Dq(e){if(null===e)return"null";switch(typeof e){case"bigint":return"bigint";case"boolean":return"boolean";case"number":return"number";case"string":return"string";case"symbol":return"symbol";case"undefined":return"undefined"}if(Dq.array(e))return"Array";if(Dq.plainFunction(e))return"Function";var t=Oq(e);return t||"Object"}Dq.array=Array.isArray,Dq.arrayOf=function(e,t){return!(!Dq.array(e)&&!Dq.function(t))&&e.every(function(e){return t(e)})},Dq.asyncGeneratorFunction=function(e){return"AsyncGeneratorFunction"===Oq(e)},Dq.asyncFunction=Rq("AsyncFunction"),Dq.bigint=Pq("bigint"),Dq.boolean=function(e){return!0===e||!1===e},Dq.date=Rq("Date"),Dq.defined=function(e){return!Dq.undefined(e)},Dq.domElement=function(e){return Dq.object(e)&&!Dq.plainObject(e)&&1===e.nodeType&&Dq.string(e.nodeName)&&Tq.every(function(t){return t in e})},Dq.empty=function(e){return Dq.string(e)&&0===e.length||Dq.array(e)&&0===e.length||Dq.object(e)&&!Dq.map(e)&&!Dq.set(e)&&0===Object.keys(e).length||Dq.set(e)&&0===e.size||Dq.map(e)&&0===e.size},Dq.error=Rq("Error"),Dq.function=Pq("function"),Dq.generator=function(e){return Dq.iterable(e)&&Dq.function(e.next)&&Dq.function(e.throw)},Dq.generatorFunction=Rq("GeneratorFunction"),Dq.instanceOf=function(e,t){return!(!e||!t)&&Object.getPrototypeOf(e)===t.prototype},Dq.iterable=function(e){return!Dq.nullOrUndefined(e)&&Dq.function(e[Symbol.iterator])},Dq.map=Rq("Map"),Dq.nan=function(e){return Number.isNaN(e)},Dq.null=function(e){return null===e},Dq.nullOrUndefined=function(e){return Dq.null(e)||Dq.undefined(e)},Dq.number=function(e){return Pq("number")(e)&&!Dq.nan(e)},Dq.numericString=function(e){return Dq.string(e)&&e.length>0&&!Number.isNaN(Number(e))},Dq.object=function(e){return!Dq.nullOrUndefined(e)&&(Dq.function(e)||"object"===typeof e)},Dq.oneOf=function(e,t){return!!Dq.array(e)&&e.indexOf(t)>-1},Dq.plainFunction=Rq("Function"),Dq.plainObject=function(e){if("Object"!==Oq(e))return!1;var t=Object.getPrototypeOf(e);return null===t||t===Object.getPrototypeOf({})},Dq.primitive=function(e){return Dq.null(e)||(t=typeof e,Mq.includes(t));var t},Dq.promise=Rq("Promise"),Dq.propertyOf=function(e,t,n){if(!Dq.object(e)||!t)return!1;var r=e[t];return Dq.function(n)?n(r):Dq.defined(r)},Dq.regexp=Rq("RegExp"),Dq.set=Rq("Set"),Dq.string=Pq("string"),Dq.symbol=Pq("symbol"),Dq.undefined=Pq("undefined"),Dq.weakMap=Rq("WeakMap"),Dq.weakSet=Rq("WeakSet");const Nq=Dq;function Lq(e){return function(t){return typeof t===e}}var Iq=Lq("function"),Fq=function(e){return"RegExp"===Object.prototype.toString.call(e).slice(8,-1)},$q=function(e){return!Bq(e)&&!function(e){return null===e}(e)&&(Iq(e)||"object"===typeof e)},Bq=Lq("undefined"),zq=function(e){var t="function"===typeof Symbol&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&"number"===typeof e.length)return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")};function Hq(e,t){if(e===t)return!0;if(e&&$q(e)&&t&&$q(t)){if(e.constructor!==t.constructor)return!1;if(Array.isArray(e)&&Array.isArray(t))return function(e,t){var n=e.length;if(n!==t.length)return!1;for(var r=n;0!==r--;)if(!Hq(e[r],t[r]))return!1;return!0}(e,t);if(e instanceof Map&&t instanceof Map)return function(e,t){var n,r,i,o;if(e.size!==t.size)return!1;try{for(var a=zq(e.entries()),s=a.next();!s.done;s=a.next()){var l=s.value;if(!t.has(l[0]))return!1}}catch(u){n={error:u}}finally{try{s&&!s.done&&(r=a.return)&&r.call(a)}finally{if(n)throw n.error}}try{for(var c=zq(e.entries()),d=c.next();!d.done;d=c.next())if(!Hq((l=d.value)[1],t.get(l[0])))return!1}catch(p){i={error:p}}finally{try{d&&!d.done&&(o=c.return)&&o.call(c)}finally{if(i)throw i.error}}return!0}(e,t);if(e instanceof Set&&t instanceof Set)return function(e,t){var n,r;if(e.size!==t.size)return!1;try{for(var i=zq(e.entries()),o=i.next();!o.done;o=i.next()){var a=o.value;if(!t.has(a[0]))return!1}}catch(s){n={error:s}}finally{try{o&&!o.done&&(r=i.return)&&r.call(i)}finally{if(n)throw n.error}}return!0}(e,t);if(ArrayBuffer.isView(e)&&ArrayBuffer.isView(t))return function(e,t){if(e.byteLength!==t.byteLength)return!1;for(var n=new DataView(e.buffer),r=new DataView(t.buffer),i=e.byteLength;i--;)if(n.getUint8(i)!==r.getUint8(i))return!1;return!0}(e,t);if(Fq(e)&&Fq(t))return e.source===t.source&&e.flags===t.flags;if(e.valueOf!==Object.prototype.valueOf)return e.valueOf()===t.valueOf();if(e.toString!==Object.prototype.toString)return e.toString()===t.toString();var n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(var i=n.length;0!==i--;)if(!Object.prototype.hasOwnProperty.call(t,n[i]))return!1;for(i=n.length;0!==i--;){var o=n[i];if(("_owner"!==o||!e.$$typeof)&&!Hq(e[o],t[o]))return!1}return!0}return!(!Number.isNaN(e)||!Number.isNaN(t))||e===t}function Wq(e,t,n){var r=n.actual,i=n.key,o=n.previous,a=n.type,s=Xq(e,i),l=Xq(t,i),c=[s,l].every(Nq.number)&&("increased"===a?s<l:s>l);return Nq.undefined(r)||(c=c&&l===r),Nq.undefined(o)||(c=c&&s===o),c}function Uq(e,t,n){var r=n.key,i=n.type,o=n.value,a=Xq(e,r),s=Xq(t,r),l="added"===i?a:s,c="added"===i?s:a;return Nq.nullOrUndefined(o)?[a,s].every(Nq.array)?!c.every(Zq(l)):[a,s].every(Nq.plainObject)?function(e,t){return t.some(function(t){return!e.includes(t)})}(Object.keys(l),Object.keys(c)):![a,s].every(function(e){return Nq.primitive(e)&&Nq.defined(e)})&&("added"===i?!Nq.defined(a)&&Nq.defined(s):Nq.defined(a)&&!Nq.defined(s)):Nq.defined(l)?!(!Nq.array(l)&&!Nq.plainObject(l))&&function(e,t,n){return!!Kq(e,t)&&([e,t].every(Nq.array)?!e.some(qq(n))&&t.some(qq(n)):[e,t].every(Nq.plainObject)?!Object.entries(e).some(Gq(n))&&Object.entries(t).some(Gq(n)):t===n)}(l,c,o):Hq(c,o)}function Vq(e,t,n){var r=(void 0===n?{}:n).key,i=Xq(e,r),o=Xq(t,r);if(!Kq(i,o))throw new TypeError("Inputs have different types");if(!function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return e.every(function(e){return Nq.string(e)||Nq.array(e)||Nq.plainObject(e)})}(i,o))throw new TypeError("Inputs don't have length");return[i,o].every(Nq.plainObject)&&(i=Object.keys(i),o=Object.keys(o)),[i,o]}function Gq(e){return function(t){var n=t[0],r=t[1];return Nq.array(e)?Hq(e,r)||e.some(function(e){return Hq(e,r)||Nq.array(r)&&Zq(r)(e)}):Nq.plainObject(e)&&e[n]?!!e[n]&&Hq(e[n],r):Hq(e,r)}}function qq(e){return function(t){return Nq.array(e)?e.some(function(e){return Hq(e,t)||Nq.array(t)&&Zq(t)(e)}):Hq(e,t)}}function Yq(e,t){return Nq.array(e)?e.some(function(e){return Hq(e,t)}):Hq(e,t)}function Zq(e){return function(t){return e.some(function(e){return Hq(e,t)})}}function Kq(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return e.every(Nq.array)||e.every(Nq.number)||e.every(Nq.plainObject)||e.every(Nq.string)}function Xq(e,t){return Nq.plainObject(e)||Nq.array(e)?Nq.string(t)?t.split(".").reduce(function(e,t){return e&&e[t]},e):Nq.number(t)?e[t]:e:e}function Qq(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function Jq(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Qq(Object(n),!0).forEach(function(t){rY(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Qq(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function eY(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function tY(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,dY(r.key),r)}}function nY(e,t,n){return t&&tY(e.prototype,t),n&&tY(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function rY(e,t,n){return(t=dY(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function iY(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&aY(e,t)}function oY(e){return oY=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},oY(e)}function aY(e,t){return aY=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},aY(e,t)}function sY(e,t){if(null==e)return{};var n,r,i=function(e,t){if(null==e)return{};var n,r,i={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(i[n]=e[n]);return i}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function lY(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function cY(e){var t=function(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(Ca){return!1}}();return function(){var n,r=oY(e);if(t){var i=oY(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return function(e,t){if(t&&("object"===typeof t||"function"===typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return lY(e)}(this,n)}}function dY(e){var t=function(e,t){if("object"!==typeof e||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!==typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"===typeof t?t:String(t)}var uY={flip:{padding:20},preventOverflow:{padding:10}};function pY(e,t,n){return function(e,t){if("function"!==typeof e)throw new TypeError("The typeValidator argument must be a function with the signature function(props, propName, componentName).");if(Boolean(t)&&"string"!==typeof t)throw new TypeError("The error message is optional, but must be a string if provided.")}(e,n),function(r,i,o){for(var a=arguments.length,s=new Array(a>3?a-3:0),l=3;l<a;l++)s[l-3]=arguments[l];return function(e,t,n,r){return"boolean"===typeof e?e:"function"===typeof e?e(t,n,r):!0===Boolean(e)&&Boolean(e)}(t,r,i,o)?function(e,t){return Object.hasOwnProperty.call(e,t)}(r,i)?e.apply(void 0,[r,i,o].concat(s)):function(e,t,n,r){return r?new Error(r):new Error("Required ".concat(e[t]," `").concat(t,"` was not specified in `").concat(n,"`."))}(r,i,o,n):e.apply(void 0,[r,i,o].concat(s))}}var hY={INIT:"init",IDLE:"idle",OPENING:"opening",OPEN:"open",CLOSING:"closing",ERROR:"error"},mY=void 0!==ut.createPortal;function fY(){return!("undefined"===typeof window||!window.document||!window.document.createElement)}function gY(){return"ontouchstart"in window&&/Mobi/.test(navigator.userAgent)}function vY(e){var t=e.title,n=e.data,r=e.warn,i=void 0!==r&&r,o=e.debug,a=void 0!==o&&o,s=i?console.warn||console.error:console.log;a&&t&&n&&(console.groupCollapsed("%creact-floater: ".concat(t),"color: #9b00ff; font-weight: bold; font-size: 12px;"),Array.isArray(n)?n.forEach(function(e){Nq.plainObject(e)&&e.key?s.apply(console,[e.key,e.value]):s.apply(console,[e])}):s.apply(console,[n]),console.groupEnd())}function xY(){}var yY=function(e){iY(n,e);var t=cY(n);function n(){return eY(this,n),t.apply(this,arguments)}return nY(n,[{key:"componentDidMount",value:function(){fY()&&(this.node||this.appendNode(),mY||this.renderPortal())}},{key:"componentDidUpdate",value:function(){fY()&&(mY||this.renderPortal())}},{key:"componentWillUnmount",value:function(){fY()&&this.node&&(mY||ut.unmountComponentAtNode(this.node),this.node&&this.node.parentNode===document.body&&(document.body.removeChild(this.node),this.node=void 0))}},{key:"appendNode",value:function(){var e=this.props,t=e.id,n=e.zIndex;this.node||(this.node=document.createElement("div"),t&&(this.node.id=t),n&&(this.node.style.zIndex=n),document.body.appendChild(this.node))}},{key:"renderPortal",value:function(){if(!fY())return null;var e=this.props,t=e.children,n=e.setRef;return this.node||this.appendNode(),mY?ut.createPortal(t,this.node):(n(ut.unstable_renderSubtreeIntoContainer(this,t.length>1?We.createElement("div",null,t):t[0],this.node)),null)}},{key:"renderReact16",value:function(){var e=this.props,t=e.hasChildren,n=e.placement,r=e.target;return t||r||"center"===n?this.renderPortal():null}},{key:"render",value:function(){return mY?this.renderReact16():null}}]),n}(We.Component);rY(yY,"propTypes",{children:Uu().oneOfType([Uu().element,Uu().array]),hasChildren:Uu().bool,id:Uu().oneOfType([Uu().string,Uu().number]),placement:Uu().string,setRef:Uu().func.isRequired,target:Uu().oneOfType([Uu().object,Uu().string]),zIndex:Uu().number});var bY=function(e){iY(n,e);var t=cY(n);function n(){return eY(this,n),t.apply(this,arguments)}return nY(n,[{key:"parentStyle",get:function(){var e=this.props,t=e.placement,n=e.styles.arrow.length,r={pointerEvents:"none",position:"absolute",width:"100%"};return t.startsWith("top")?(r.bottom=0,r.left=0,r.right=0,r.height=n):t.startsWith("bottom")?(r.left=0,r.right=0,r.top=0,r.height=n):t.startsWith("left")?(r.right=0,r.top=0,r.bottom=0):t.startsWith("right")&&(r.left=0,r.top=0),r}},{key:"render",value:function(){var e,t=this.props,n=t.placement,r=t.setArrowRef,i=t.styles.arrow,o=i.color,a=i.display,s=i.length,l=i.margin,c=i.position,d=i.spread,u={display:a,position:c},p=d,h=s;return n.startsWith("top")?(e="0,0 ".concat(p/2,",").concat(h," ").concat(p,",0"),u.bottom=0,u.marginLeft=l,u.marginRight=l):n.startsWith("bottom")?(e="".concat(p,",").concat(h," ").concat(p/2,",0 0,").concat(h),u.top=0,u.marginLeft=l,u.marginRight=l):n.startsWith("left")?(h=d,e="0,0 ".concat(p=s,",").concat(h/2," 0,").concat(h),u.right=0,u.marginTop=l,u.marginBottom=l):n.startsWith("right")&&(h=d,e="".concat(p=s,",").concat(h," ").concat(p,",0 0,").concat(h/2),u.left=0,u.marginTop=l,u.marginBottom=l),We.createElement("div",{className:"__floater__arrow",style:this.parentStyle},We.createElement("span",{ref:r,style:u},We.createElement("svg",{width:p,height:h,version:"1.1",xmlns:"http://www.w3.org/2000/svg"},We.createElement("polygon",{points:e,fill:o}))))}}]),n}(We.Component);rY(bY,"propTypes",{placement:Uu().string.isRequired,setArrowRef:Uu().func.isRequired,styles:Uu().object.isRequired});var jY=["color","height","width"];function _Y(e){var t=e.handleClick,n=e.styles,r=n.color,i=n.height,o=n.width,a=sY(n,jY);return We.createElement("button",{"aria-label":"close",onClick:t,style:a,type:"button"},We.createElement("svg",{width:"".concat(o,"px"),height:"".concat(i,"px"),viewBox:"0 0 18 18",version:"1.1",xmlns:"http://www.w3.org/2000/svg",preserveAspectRatio:"xMidYMid"},We.createElement("g",null,We.createElement("path",{d:"M8.13911129,9.00268191 L0.171521827,17.0258467 C-0.0498027049,17.248715 -0.0498027049,17.6098394 0.171521827,17.8327545 C0.28204354,17.9443526 0.427188206,17.9998706 0.572051765,17.9998706 C0.71714958,17.9998706 0.862013139,17.9443526 0.972581703,17.8327545 L9.0000937,9.74924618 L17.0276057,17.8327545 C17.1384085,17.9443526 17.2832721,17.9998706 17.4281356,17.9998706 C17.5729992,17.9998706 17.718097,17.9443526 17.8286656,17.8327545 C18.0499901,17.6098862 18.0499901,17.2487618 17.8286656,17.0258467 L9.86135722,9.00268191 L17.8340066,0.973848225 C18.0553311,0.750979934 18.0553311,0.389855532 17.8340066,0.16694039 C17.6126821,-0.0556467968 17.254037,-0.0556467968 17.0329467,0.16694039 L9.00042166,8.25611765 L0.967006424,0.167268345 C0.745681892,-0.0553188426 0.387317931,-0.0553188426 0.165993399,0.167268345 C-0.0553311331,0.390136635 -0.0553311331,0.751261038 0.165993399,0.974176179 L8.13920499,9.00268191 L8.13911129,9.00268191 Z",fill:r}))))}function CY(e){var t=e.content,n=e.footer,r=e.handleClick,i=e.open,o=e.positionWrapper,a=e.showCloseButton,s=e.title,l=e.styles,c={content:We.isValidElement(t)?t:We.createElement("div",{className:"__floater__content",style:l.content},t)};return s&&(c.title=We.isValidElement(s)?s:We.createElement("div",{className:"__floater__title",style:l.title},s)),n&&(c.footer=We.isValidElement(n)?n:We.createElement("div",{className:"__floater__footer",style:l.footer},n)),!a&&!o||Nq.boolean(i)||(c.close=We.createElement(_Y,{styles:l.close,handleClick:r})),We.createElement("div",{className:"__floater__container",style:l.container},c.close,c.title,c.content,c.footer)}_Y.propTypes={handleClick:Uu().func.isRequired,styles:Uu().object.isRequired},CY.propTypes={content:Uu().node.isRequired,footer:Uu().node,handleClick:Uu().func.isRequired,open:Uu().bool,positionWrapper:Uu().bool.isRequired,showCloseButton:Uu().bool.isRequired,styles:Uu().object.isRequired,title:Uu().node};var wY=function(e){iY(n,e);var t=cY(n);function n(){return eY(this,n),t.apply(this,arguments)}return nY(n,[{key:"style",get:function(){var e=this.props,t=e.disableAnimation,n=e.component,r=e.placement,i=e.hideArrow,o=e.status,a=e.styles,s=a.arrow.length,l=a.floater,c=a.floaterCentered,d=a.floaterClosing,u=a.floaterOpening,p=a.floaterWithAnimation,h=a.floaterWithComponent,m={};return i||(r.startsWith("top")?m.padding="0 0 ".concat(s,"px"):r.startsWith("bottom")?m.padding="".concat(s,"px 0 0"):r.startsWith("left")?m.padding="0 ".concat(s,"px 0 0"):r.startsWith("right")&&(m.padding="0 0 0 ".concat(s,"px"))),-1!==[hY.OPENING,hY.OPEN].indexOf(o)&&(m=Jq(Jq({},m),u)),o===hY.CLOSING&&(m=Jq(Jq({},m),d)),o!==hY.OPEN||t||(m=Jq(Jq({},m),p)),"center"===r&&(m=Jq(Jq({},m),c)),n&&(m=Jq(Jq({},m),h)),Jq(Jq({},l),m)}},{key:"render",value:function(){var e=this.props,t=e.component,n=e.handleClick,r=e.hideArrow,i=e.setFloaterRef,o=e.status,a={},s=["__floater"];return a.content=t?We.isValidElement(t)?We.cloneElement(t,{closeFn:n}):t({closeFn:n}):We.createElement(CY,this.props),o===hY.OPEN&&s.push("__floater__open"),r||(a.arrow=We.createElement(bY,this.props)),We.createElement("div",{ref:i,className:s.join(" "),style:this.style},We.createElement("div",{className:"__floater__body"},a.content,a.arrow))}}]),n}(We.Component);rY(wY,"propTypes",{component:Uu().oneOfType([Uu().func,Uu().element]),content:Uu().node,disableAnimation:Uu().bool.isRequired,footer:Uu().node,handleClick:Uu().func.isRequired,hideArrow:Uu().bool.isRequired,open:Uu().bool,placement:Uu().string.isRequired,positionWrapper:Uu().bool.isRequired,setArrowRef:Uu().func.isRequired,setFloaterRef:Uu().func.isRequired,showCloseButton:Uu().bool,status:Uu().string.isRequired,styles:Uu().object.isRequired,title:Uu().node});var SY=function(e){iY(n,e);var t=cY(n);function n(){return eY(this,n),t.apply(this,arguments)}return nY(n,[{key:"render",value:function(){var e,t=this.props,n=t.children,r=t.handleClick,i=t.handleMouseEnter,o=t.handleMouseLeave,a=t.setChildRef,s=t.setWrapperRef,l=t.style,c=t.styles;if(n)if(1===We.Children.count(n))if(We.isValidElement(n)){var d=Nq.function(n.type)?"innerRef":"ref";e=We.cloneElement(We.Children.only(n),rY({},d,a))}else e=We.createElement("span",null,n);else e=n;return e?We.createElement("span",{ref:s,style:Jq(Jq({},c),l),onClick:r,onMouseEnter:i,onMouseLeave:o},e):null}}]),n}(We.Component);rY(SY,"propTypes",{children:Uu().node,handleClick:Uu().func.isRequired,handleMouseEnter:Uu().func.isRequired,handleMouseLeave:Uu().func.isRequired,setChildRef:Uu().func.isRequired,setWrapperRef:Uu().func.isRequired,style:Uu().object,styles:Uu().object.isRequired});var AY={zIndex:100};var kY=["arrow","flip","offset"],TY=["position","top","right","bottom","left"],EY=function(e){iY(n,e);var t=cY(n);function n(e){var r;return eY(this,n),rY(lY(r=t.call(this,e)),"setArrowRef",function(e){r.arrowRef=e}),rY(lY(r),"setChildRef",function(e){r.childRef=e}),rY(lY(r),"setFloaterRef",function(e){r.floaterRef=e}),rY(lY(r),"setWrapperRef",function(e){r.wrapperRef=e}),rY(lY(r),"handleTransitionEnd",function(){var e=r.state.status,t=r.props.callback;r.wrapperPopper&&r.wrapperPopper.instance.update(),r.setState({status:e===hY.OPENING?hY.OPEN:hY.IDLE},function(){var e=r.state.status;t(e===hY.OPEN?"open":"close",r.props)})}),rY(lY(r),"handleClick",function(){var e=r.props,t=e.event,n=e.open;if(!Nq.boolean(n)){var i=r.state,o=i.positionWrapper,a=i.status;("click"===r.event||"hover"===r.event&&o)&&(vY({title:"click",data:[{event:t,status:a===hY.OPEN?"closing":"opening"}],debug:r.debug}),r.toggle())}}),rY(lY(r),"handleMouseEnter",function(){var e=r.props,t=e.event,n=e.open;if(!Nq.boolean(n)&&!gY()){var i=r.state.status;"hover"===r.event&&i===hY.IDLE&&(vY({title:"mouseEnter",data:[{key:"originalEvent",value:t}],debug:r.debug}),clearTimeout(r.eventDelayTimeout),r.toggle())}}),rY(lY(r),"handleMouseLeave",function(){var e=r.props,t=e.event,n=e.eventDelay,i=e.open;if(!Nq.boolean(i)&&!gY()){var o=r.state,a=o.status,s=o.positionWrapper;"hover"===r.event&&(vY({title:"mouseLeave",data:[{key:"originalEvent",value:t}],debug:r.debug}),n?-1===[hY.OPENING,hY.OPEN].indexOf(a)||s||r.eventDelayTimeout||(r.eventDelayTimeout=setTimeout(function(){delete r.eventDelayTimeout,r.toggle()},1e3*n)):r.toggle(hY.IDLE))}}),r.state={currentPlacement:e.placement,needsUpdate:!1,positionWrapper:e.wrapperOptions.position&&!!e.target,status:hY.INIT,statusWrapper:hY.INIT},r._isMounted=!1,r.hasMounted=!1,fY()&&window.addEventListener("load",function(){r.popper&&r.popper.instance.update(),r.wrapperPopper&&r.wrapperPopper.instance.update()}),r}return nY(n,[{key:"componentDidMount",value:function(){if(fY()){var e=this.state.positionWrapper,t=this.props,n=t.children,r=t.open,i=t.target;this._isMounted=!0,vY({title:"init",data:{hasChildren:!!n,hasTarget:!!i,isControlled:Nq.boolean(r),positionWrapper:e,target:this.target,floater:this.floaterRef},debug:this.debug}),this.hasMounted||(this.initPopper(),this.hasMounted=!0),!n&&i&&Nq.boolean(r)}}},{key:"componentDidUpdate",value:function(e,t){if(fY()){var n,r=this.props,i=r.autoOpen,o=r.open,a=r.target,s=r.wrapperOptions,l=function(e,t){if([e,t].some(Nq.nullOrUndefined))throw new Error("Missing required parameters");if(![e,t].every(function(e){return Nq.plainObject(e)||Nq.array(e)}))throw new Error("Expected plain objects or array");var n=function(n,r,i){try{var o=Xq(e,n),a=Xq(t,n),s=Nq.defined(r),l=Nq.defined(i);if(s||l){var c=l?Yq(i,o):!Yq(r,o),d=Yq(r,a);return c&&d}return[o,a].every(Nq.array)||[o,a].every(Nq.plainObject)?!Hq(o,a):o!==a}catch(u){return!1}};return{added:function(n,r){try{return Uq(e,t,{key:n,type:"added",value:r})}catch(i){return!1}},changed:n,changedFrom:function(n,r,i){if(!Nq.defined(n))return!1;try{var o=Xq(e,n),a=Xq(t,n),s=Nq.defined(i);return Yq(r,o)&&(s?Yq(i,a):!s)}catch(l){return!1}},changedTo:function(e,t){return!!Nq.defined(e)&&n(e,t)},decreased:function(n,r,i){if(!Nq.defined(n))return!1;try{return Wq(e,t,{key:n,actual:r,previous:i,type:"decreased"})}catch(o){return!1}},emptied:function(n){try{var r=Vq(e,t,{key:n}),i=r[0],o=r[1];return!!i.length&&!o.length}catch(a){return!1}},filled:function(n){try{var r=Vq(e,t,{key:n}),i=r[0],o=r[1];return!i.length&&!!o.length}catch(a){return!1}},increased:function(n,r,i){if(!Nq.defined(n))return!1;try{return Wq(e,t,{key:n,actual:r,previous:i,type:"increased"})}catch(o){return!1}},removed:function(n,r){try{return Uq(e,t,{key:n,type:"removed",value:r})}catch(i){return!1}}}}(t,this.state),c=l.changedFrom,d=l.changed;if(e.open!==o)Nq.boolean(o)&&(n=o?hY.OPENING:hY.CLOSING),this.toggle(n);e.wrapperOptions.position===s.position&&e.target===a||this.changeWrapperPosition(this.props),(d("status",hY.IDLE)&&o||c("status",hY.INIT,hY.IDLE)&&i)&&this.toggle(hY.OPEN),this.popper&&d("status",hY.OPENING)&&this.popper.instance.update(),this.floaterRef&&(d("status",hY.OPENING)||d("status",hY.CLOSING))&&function(e,t,n){var r;r=function(i){n(i),function(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]&&arguments[3];e.removeEventListener(t,n,r)}(e,t,r)},function(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]&&arguments[3];e.addEventListener(t,n,r)}(e,t,r,arguments.length>3&&void 0!==arguments[3]&&arguments[3])}(this.floaterRef,"transitionend",this.handleTransitionEnd),d("needsUpdate",!0)&&this.rebuildPopper()}}},{key:"componentWillUnmount",value:function(){fY()&&(this._isMounted=!1,this.popper&&this.popper.instance.destroy(),this.wrapperPopper&&this.wrapperPopper.instance.destroy())}},{key:"initPopper",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.target,n=this.state.positionWrapper,r=this.props,i=r.disableFlip,o=r.getPopper,a=r.hideArrow,s=r.offset,l=r.placement,c=r.wrapperOptions,d="top"===l||"bottom"===l?"flip":["right","bottom-end","top-end","left","top-start","bottom-start"];if("center"===l)this.setState({status:hY.IDLE});else if(t&&this.floaterRef){var u=this.options,p=u.arrow,h=u.flip,m=u.offset,f=sY(u,kY);new Sq(t,this.floaterRef,{placement:l,modifiers:Jq({arrow:Jq({enabled:!a,element:this.arrowRef},p),flip:Jq({enabled:!i,behavior:d},h),offset:Jq({offset:"0, ".concat(s,"px")},m)},f),onCreate:function(t){var n;e.popper=t,null!==(n=e.floaterRef)&&void 0!==n&&n.isConnected?(o(t,"floater"),e._isMounted&&e.setState({currentPlacement:t.placement,status:hY.IDLE}),l!==t.placement&&setTimeout(function(){t.instance.update()},1)):e.setState({needsUpdate:!0})},onUpdate:function(t){e.popper=t;var n=e.state.currentPlacement;e._isMounted&&t.placement!==n&&e.setState({currentPlacement:t.placement})}})}if(n){var g=Nq.undefined(c.offset)?0:c.offset;new Sq(this.target,this.wrapperRef,{placement:c.placement||l,modifiers:{arrow:{enabled:!1},offset:{offset:"0, ".concat(g,"px")},flip:{enabled:!1}},onCreate:function(t){e.wrapperPopper=t,e._isMounted&&e.setState({statusWrapper:hY.IDLE}),o(t,"wrapper"),l!==t.placement&&setTimeout(function(){t.instance.update()},1)}})}}},{key:"rebuildPopper",value:function(){var e=this;this.floaterRefInterval=setInterval(function(){var t;null!==(t=e.floaterRef)&&void 0!==t&&t.isConnected&&(clearInterval(e.floaterRefInterval),e.setState({needsUpdate:!1}),e.initPopper())},50)}},{key:"changeWrapperPosition",value:function(e){var t=e.target,n=e.wrapperOptions;this.setState({positionWrapper:n.position&&!!t})}},{key:"toggle",value:function(e){var t=this.state.status===hY.OPEN?hY.CLOSING:hY.OPENING;Nq.undefined(e)||(t=e),this.setState({status:t})}},{key:"debug",get:function(){return this.props.debug||fY()&&"ReactFloaterDebug"in window&&!!window.ReactFloaterDebug}},{key:"event",get:function(){var e=this.props,t=e.disableHoverToClick,n=e.event;return"hover"===n&&gY()&&!t?"click":n}},{key:"options",get:function(){var e=this.props.options;return kq()(uY,e||{})}},{key:"styles",get:function(){var e,t=this,n=this.state,r=n.status,i=n.positionWrapper,o=n.statusWrapper,a=this.props.styles,s=kq()(function(e){var t=kq()(AY,e.options||{});return{wrapper:{cursor:"help",display:"inline-flex",flexDirection:"column",zIndex:t.zIndex},wrapperPosition:{left:-1e3,position:"absolute",top:-1e3,visibility:"hidden"},floater:{display:"inline-block",filter:"drop-shadow(0 0 3px rgba(0, 0, 0, 0.3))",maxWidth:300,opacity:0,position:"relative",transition:"opacity 0.3s",visibility:"hidden",zIndex:t.zIndex},floaterOpening:{opacity:1,visibility:"visible"},floaterWithAnimation:{opacity:1,transition:"opacity 0.3s, transform 0.2s",visibility:"visible"},floaterWithComponent:{maxWidth:"100%"},floaterClosing:{opacity:0,visibility:"visible"},floaterCentered:{left:"50%",position:"fixed",top:"50%",transform:"translate(-50%, -50%)"},container:{backgroundColor:"#fff",color:"#666",minHeight:60,minWidth:200,padding:20,position:"relative",zIndex:10},title:{borderBottom:"1px solid #555",color:"#555",fontSize:18,marginBottom:5,paddingBottom:6,paddingRight:18},content:{fontSize:15},close:{backgroundColor:"transparent",border:0,borderRadius:0,color:"#555",fontSize:0,height:15,outline:"none",padding:10,position:"absolute",right:0,top:0,width:15,WebkitAppearance:"none"},footer:{borderTop:"1px solid #ccc",fontSize:13,marginTop:10,paddingTop:5},arrow:{color:"#fff",display:"inline-flex",length:16,margin:8,position:"absolute",spread:32},options:t}}(a),a);i&&(e=-1===[hY.IDLE].indexOf(r)||-1===[hY.IDLE].indexOf(o)?s.wrapperPosition:this.wrapperPopper.styles,s.wrapper=Jq(Jq({},s.wrapper),e));if(this.target){var l=window.getComputedStyle(this.target);this.wrapperStyles?s.wrapper=Jq(Jq({},s.wrapper),this.wrapperStyles):-1===["relative","static"].indexOf(l.position)&&(this.wrapperStyles={},i||(TY.forEach(function(e){t.wrapperStyles[e]=l[e]}),s.wrapper=Jq(Jq({},s.wrapper),this.wrapperStyles),this.target.style.position="relative",this.target.style.top="auto",this.target.style.right="auto",this.target.style.bottom="auto",this.target.style.left="auto"))}return s}},{key:"target",get:function(){if(!fY())return null;var e=this.props.target;return e?Nq.domElement(e)?e:document.querySelector(e):this.childRef||this.wrapperRef}},{key:"render",value:function(){var e=this.state,t=e.currentPlacement,n=e.positionWrapper,r=e.status,i=this.props,o=i.children,a=i.component,s=i.content,l=i.disableAnimation,c=i.footer,d=i.hideArrow,u=i.id,p=i.open,h=i.showCloseButton,m=i.style,f=i.target,g=i.title,v=We.createElement(SY,{handleClick:this.handleClick,handleMouseEnter:this.handleMouseEnter,handleMouseLeave:this.handleMouseLeave,setChildRef:this.setChildRef,setWrapperRef:this.setWrapperRef,style:m,styles:this.styles.wrapper},o),x={};return n?x.wrapperInPortal=v:x.wrapperAsChildren=v,We.createElement("span",null,We.createElement(yY,{hasChildren:!!o,id:u,placement:t,setRef:this.setFloaterRef,target:f,zIndex:this.styles.options.zIndex},We.createElement(wY,{component:a,content:s,disableAnimation:l,footer:c,handleClick:this.handleClick,hideArrow:d||"center"===t,open:p,placement:t,positionWrapper:n,setArrowRef:this.setArrowRef,setFloaterRef:this.setFloaterRef,showCloseButton:h,status:r,styles:this.styles,title:g}),x.wrapperInPortal),x.wrapperAsChildren)}}]),n}(We.Component);rY(EY,"propTypes",{autoOpen:Uu().bool,callback:Uu().func,children:Uu().node,component:pY(Uu().oneOfType([Uu().func,Uu().element]),function(e){return!e.content}),content:pY(Uu().node,function(e){return!e.component}),debug:Uu().bool,disableAnimation:Uu().bool,disableFlip:Uu().bool,disableHoverToClick:Uu().bool,event:Uu().oneOf(["hover","click"]),eventDelay:Uu().number,footer:Uu().node,getPopper:Uu().func,hideArrow:Uu().bool,id:Uu().oneOfType([Uu().string,Uu().number]),offset:Uu().number,open:Uu().bool,options:Uu().object,placement:Uu().oneOf(["top","top-start","top-end","bottom","bottom-start","bottom-end","left","left-start","left-end","right","right-start","right-end","auto","center"]),showCloseButton:Uu().bool,style:Uu().object,styles:Uu().object,target:Uu().oneOfType([Uu().object,Uu().string]),title:Uu().node,wrapperOptions:Uu().shape({offset:Uu().number,placement:Uu().oneOf(["top","top-start","top-end","bottom","bottom-start","bottom-end","left","left-start","left-end","right","right-start","right-end","auto"]),position:Uu().bool})}),rY(EY,"defaultProps",{autoOpen:!1,callback:xY,debug:!1,disableAnimation:!1,disableFlip:!1,disableHoverToClick:!1,event:"click",eventDelay:.4,getPopper:xY,hideArrow:!1,offset:15,placement:"bottom",showCloseButton:!1,styles:{},target:null,wrapperOptions:{position:!1}});const MY=["mixBlendMode","zIndex"],OY=["styles"],RY=["color","height","width"],PY=["beaconComponent","tooltipComponent"];var DY=Object.defineProperty,NY=(e,t,n)=>((e,t,n)=>t in e?DY(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n)(e,"symbol"!==typeof t?t+"":t,n),LY="init",IY="start",FY="stop",$Y="reset",BY="prev",zY="next",HY="go",WY="close",UY="skip",VY="update",GY={TOUR_START:"tour:start",STEP_BEFORE:"step:before",BEACON:"beacon",TOOLTIP:"tooltip",STEP_AFTER:"step:after",TOUR_END:"tour:end",TOUR_STATUS:"tour:status",TARGET_NOT_FOUND:"error:target_not_found",ERROR:"error"},qY={INIT:"init",READY:"ready",BEACON:"beacon",TOOLTIP:"tooltip",COMPLETE:"complete",ERROR:"error"},YY={IDLE:"idle",READY:"ready",WAITING:"waiting",RUNNING:"running",PAUSED:"paused",SKIPPED:"skipped",FINISHED:"finished",ERROR:"error"};function ZY(){var e;return!("undefined"===typeof window||!(null==(e=window.document)?void 0:e.createElement))}function KY(e){return e?e.getBoundingClientRect():null}function XY(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];const{body:t,documentElement:n}=document;if(!t||!n)return 0;if(e){const e=[t.scrollHeight,t.offsetHeight,n.clientHeight,n.scrollHeight,n.offsetHeight].sort((e,t)=>e-t),r=Math.floor(e.length/2);return e.length%2===0?(e[r-1]+e[r])/2:e[r]}return Math.max(t.scrollHeight,t.offsetHeight,n.clientHeight,n.scrollHeight,n.offsetHeight)}function QY(e){if("string"===typeof e)try{return document.querySelector(e)}catch(t){return null}return e}function JY(e,t,n){if(!e)return rZ();const r=yG(e);if(r){if(r.isSameNode(rZ()))return n?document:rZ();if(!(r.scrollHeight>r.offsetHeight)&&!t)return r.style.overflow="initial",rZ()}return r}function eZ(e,t){if(!e)return!1;const n=JY(e,t);return!!n&&!n.isSameNode(rZ())}function tZ(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"fixed";if(!e||!(e instanceof HTMLElement))return!1;const{nodeName:n}=e,r=function(e){return e&&1===e.nodeType?getComputedStyle(e):null}(e);return"BODY"!==n&&"HTML"!==n&&(!(!r||r.position!==t)||!!e.parentNode&&tZ(e.parentNode,t))}function nZ(e,t,n){var r;if(!e)return 0;const{offsetTop:i=0,scrollTop:o=0}=null!=(r=yG(e))?r:{};let a=e.getBoundingClientRect().top+o;i&&(eZ(e,n)||function(e){return e.offsetParent!==document.body}(e))&&(a-=i);const s=Math.floor(a-t);return s<0?0:s}function rZ(){var e;return null!=(e=document.scrollingElement)?e:document.documentElement}var iZ=void 0!==ut.createPortal;function oZ(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:navigator.userAgent,t=e;return"undefined"===typeof window?t="node":document.documentMode?t="ie":/Edge/.test(e)?t="edge":Boolean(window.opera)||e.includes(" OPR/")?t="opera":"undefined"!==typeof window.InstallTrigger?t="firefox":window.chrome?t="chrome":/(Version\/([\d._]+).*Safari|CriOS|FxiOS| Mobile\/)/.test(e)&&(t="safari"),t}function aZ(e){return Object.prototype.toString.call(e).slice(8,-1).toLowerCase()}function sZ(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const{defaultValue:n,step:r,steps:i}=t;let o=bG(e);if(o)(o.includes("{step}")||o.includes("{steps}"))&&r&&i&&(o=o.replace("{step}",r.toString()).replace("{steps}",i.toString()));else if((0,We.isValidElement)(e)&&!Object.values(e.props).length&&"function"===aZ(e.type)){o=sZ(e.type({}),t)}else o=bG(n);return o}function lZ(e){const t=e.replace(/^#?([\da-f])([\da-f])([\da-f])$/i,(e,t,n,r)=>t+t+n+n+r+r),n=/^#?([\da-f]{2})([\da-f]{2})([\da-f]{2})$/i.exec(t);return n?[parseInt(n[1],16),parseInt(n[2],16),parseInt(n[3],16)]:[]}function cZ(e){return e.disableBeacon||"center"===e.placement}function dZ(){return!["chrome","safari","firefox","opera"].includes(oZ())}function uZ(e){let{data:t,debug:n=!1,title:r,warn:i=!1}=e;const o=i?console.warn||console.error:console.log;n&&(r&&t?(console.groupCollapsed("%creact-joyride: ".concat(r),"color: #ff0044; font-weight: bold; font-size: 12px;"),Array.isArray(t)?t.forEach(e=>{sG.plainObject(e)&&e.key?o.apply(console,[e.key,e.value]):o.apply(console,[e])}):o.apply(console,[t]),console.groupEnd()):console.error("Missing title or data props"))}function pZ(e){if(!sG.plainObject(e))throw new TypeError("Expected an object");const t={};for(var n=arguments.length,r=new Array(n>1?n-1:0),i=1;i<n;i++)r[i-1]=arguments[i];for(const o in e)({}).hasOwnProperty.call(e,o)&&(r.includes(o)||(t[o]=e[o]));return t}function hZ(e,t,n){const r=e=>e.replace("{step}",String(t)).replace("{steps}",String(n));if("string"===aZ(e))return r(e);if(!(0,We.isValidElement)(e))return e;const{children:i}=e.props;if("string"===aZ(i)&&i.includes("{step}"))return(0,We.cloneElement)(e,{children:r(i)});if(Array.isArray(i))return(0,We.cloneElement)(e,{children:i.map(e=>"string"===typeof e?r(e):hZ(e,t,n))});if("function"===aZ(e.type)&&!Object.values(e.props).length){return hZ(e.type({}),t,n)}return e}var mZ={options:{preventOverflow:{boundariesElement:"scrollParent"}},wrapperOptions:{offset:-18,position:!0}},fZ={back:"Back",close:"Close",last:"Last",next:"Next",nextLabelWithProgress:"Next (Step {step} of {steps})",open:"Open the dialog",skip:"Skip"},gZ={event:"click",placement:"bottom",offset:10,disableBeacon:!1,disableCloseOnEsc:!1,disableOverlay:!1,disableOverlayClose:!1,disableScrollParentFix:!1,disableScrolling:!1,hideBackButton:!1,hideCloseButton:!1,hideFooter:!1,isFixed:!1,locale:fZ,showProgress:!1,showSkipButton:!1,spotlightClicks:!1,spotlightPadding:10},vZ={continuous:!1,debug:!1,disableCloseOnEsc:!1,disableOverlay:!1,disableOverlayClose:!1,disableScrolling:!1,disableScrollParentFix:!1,getHelpers:void 0,hideBackButton:!1,run:!0,scrollOffset:20,scrollDuration:300,scrollToFirstStep:!1,showSkipButton:!1,showProgress:!1,spotlightClicks:!1,spotlightPadding:10,steps:[]},xZ={arrowColor:"#fff",backgroundColor:"#fff",beaconSize:36,overlayColor:"rgba(0, 0, 0, 0.5)",primaryColor:"#f04",spotlightShadow:"0 0 15px rgba(0, 0, 0, 0.5)",textColor:"#333",width:380,zIndex:100},yZ={backgroundColor:"transparent",border:0,borderRadius:0,color:"#555",cursor:"pointer",fontSize:16,lineHeight:1,padding:8,WebkitAppearance:"none"},bZ={borderRadius:4,position:"absolute"};function jZ(e){return function(e){if(!sG.plainObject(e))throw new TypeError("Expected an object");for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];if(!n.length)return e;const i={};for(const o in e)({}).hasOwnProperty.call(e,o)&&n.includes(o)&&(i[o]=e[o]);return i}(e,"beaconComponent","disableCloseOnEsc","disableOverlay","disableOverlayClose","disableScrolling","disableScrollParentFix","floaterProps","hideBackButton","hideCloseButton","locale","showProgress","showSkipButton","spotlightClicks","spotlightPadding","styles","tooltipComponent")}function _Z(e,t){var n,r,o,a,s,l;const c=null!=t?t:{},d=jG.all([gZ,jZ(e),c],{isMergeableObject:sG.plainObject}),u=function(e,t){var n,r,o,a,s;const{floaterProps:l,styles:c}=e,d=jG(null!=(n=t.floaterProps)?n:{},null!=l?l:{}),u=jG(null!=c?c:{},null!=(r=t.styles)?r:{}),p=jG(xZ,u.options||{}),h="center"===t.placement||t.disableBeacon;let{width:m}=p;window.innerWidth>480&&(m=380),"width"in p&&(m="number"===typeof p.width&&window.innerWidth<p.width?window.innerWidth-30:p.width);const f={bottom:0,left:0,overflow:"hidden",position:"absolute",right:0,top:0,zIndex:p.zIndex},g={beacon:(0,i.A)((0,i.A)({},yZ),{},{display:h?"none":"inline-block",height:p.beaconSize,position:"relative",width:p.beaconSize,zIndex:p.zIndex}),beaconInner:{animation:"joyride-beacon-inner 1.2s infinite ease-in-out",backgroundColor:p.primaryColor,borderRadius:"50%",display:"block",height:"50%",left:"50%",opacity:.7,position:"absolute",top:"50%",transform:"translate(-50%, -50%)",width:"50%"},beaconOuter:{animation:"joyride-beacon-outer 1.2s infinite ease-in-out",backgroundColor:"rgba(".concat(lZ(p.primaryColor).join(","),", 0.2)"),border:"2px solid ".concat(p.primaryColor),borderRadius:"50%",boxSizing:"border-box",display:"block",height:"100%",left:0,opacity:.9,position:"absolute",top:0,transformOrigin:"center",width:"100%"},tooltip:{backgroundColor:p.backgroundColor,borderRadius:5,boxSizing:"border-box",color:p.textColor,fontSize:16,maxWidth:"100%",padding:15,position:"relative",width:m},tooltipContainer:{lineHeight:1.4,textAlign:"center"},tooltipTitle:{fontSize:18,margin:0},tooltipContent:{padding:"20px 10px"},tooltipFooter:{alignItems:"center",display:"flex",justifyContent:"flex-end",marginTop:15},tooltipFooterSpacer:{flex:1},buttonNext:(0,i.A)((0,i.A)({},yZ),{},{backgroundColor:p.primaryColor,borderRadius:4,color:"#fff"}),buttonBack:(0,i.A)((0,i.A)({},yZ),{},{color:p.primaryColor,marginLeft:"auto",marginRight:5}),buttonClose:(0,i.A)((0,i.A)({},yZ),{},{color:p.textColor,height:14,padding:15,position:"absolute",right:0,top:0,width:14}),buttonSkip:(0,i.A)((0,i.A)({},yZ),{},{color:p.textColor,fontSize:14}),overlay:(0,i.A)((0,i.A)({},f),{},{backgroundColor:p.overlayColor,mixBlendMode:"hard-light"}),overlayLegacy:(0,i.A)({},f),overlayLegacyCenter:(0,i.A)((0,i.A)({},f),{},{backgroundColor:p.overlayColor}),spotlight:(0,i.A)((0,i.A)({},bZ),{},{backgroundColor:"gray"}),spotlightLegacy:(0,i.A)((0,i.A)({},bZ),{},{boxShadow:"0 0 0 9999px ".concat(p.overlayColor,", ").concat(p.spotlightShadow)}),floaterStyles:{arrow:{color:null!=(s=null==(a=null==(o=null==d?void 0:d.styles)?void 0:o.arrow)?void 0:a.color)?s:p.arrowColor},options:{zIndex:p.zIndex+100}},options:p};return jG(g,u)}(e,d),p=eZ(QY(d.target),d.disableScrollParentFix),h=jG.all([mZ,null!=(n=e.floaterProps)?n:{},null!=(r=d.floaterProps)?r:{}]);return h.offset=d.offset,h.styles=jG(null!=(o=h.styles)?o:{},u.floaterStyles),h.offset+=null!=(s=null!=(a=e.spotlightPadding)?a:d.spotlightPadding)?s:0,d.placementBeacon&&h.wrapperOptions&&(h.wrapperOptions.placement=d.placementBeacon),p&&h.options.preventOverflow&&(h.options.preventOverflow.boundariesElement="window"),(0,i.A)((0,i.A)({},d),{},{locale:jG.all([fZ,null!=(l=e.locale)?l:{},d.locale||{}]),floaterProps:h,styles:pZ(u,"floaterStyles")})}function CZ(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return sG.plainObject(e)?!!e.target||(uZ({title:"validateStep",data:"target is missing from the step",warn:!0,debug:t}),!1):(uZ({title:"validateStep",data:"step must be an object",warn:!0,debug:t}),!1)}function wZ(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return sG.array(e)?e.every(e=>CZ(e,t)):(uZ({title:"validateSteps",data:"steps must be an array",warn:!0,debug:t}),!1)}var SZ,AZ={action:"init",controlled:!1,index:0,lifecycle:qY.INIT,origin:null,size:0,status:YY.IDLE},kZ=(SZ=pZ(AZ,"controlled","size"),Object.keys(SZ)),TZ=class{constructor(e){var t=this;NY(this,"beaconPopper"),NY(this,"tooltipPopper"),NY(this,"data",new Map),NY(this,"listener"),NY(this,"store",new Map),NY(this,"addListener",e=>{this.listener=e}),NY(this,"setSteps",e=>{const{size:t,status:n}=this.getState(),r={size:e.length,status:n};this.data.set("steps",e),n===YY.WAITING&&!t&&e.length&&(r.status=YY.RUNNING),this.setState(r)}),NY(this,"getPopper",e=>"beacon"===e?this.beaconPopper:this.tooltipPopper),NY(this,"setPopper",(e,t)=>{"beacon"===e?this.beaconPopper=t:this.tooltipPopper=t}),NY(this,"cleanupPoppers",()=>{this.beaconPopper=null,this.tooltipPopper=null}),NY(this,"close",function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;const{index:n,status:r}=t.getState();r===YY.RUNNING&&t.setState((0,i.A)({},t.getNextState({action:WY,index:n+1,origin:e})))}),NY(this,"go",e=>{const{controlled:t,status:n}=this.getState();if(t||n!==YY.RUNNING)return;const r=this.getSteps()[e];this.setState((0,i.A)((0,i.A)({},this.getNextState({action:HY,index:e})),{},{status:r?n:YY.FINISHED}))}),NY(this,"info",()=>this.getState()),NY(this,"next",()=>{const{index:e,status:t}=this.getState();t===YY.RUNNING&&this.setState(this.getNextState({action:zY,index:e+1}))}),NY(this,"open",()=>{const{status:e}=this.getState();e===YY.RUNNING&&this.setState((0,i.A)({},this.getNextState({action:VY,lifecycle:qY.TOOLTIP})))}),NY(this,"prev",()=>{const{index:e,status:t}=this.getState();t===YY.RUNNING&&this.setState((0,i.A)({},this.getNextState({action:BY,index:e-1})))}),NY(this,"reset",function(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];const{controlled:n}=t.getState();n||t.setState((0,i.A)((0,i.A)({},t.getNextState({action:$Y,index:0})),{},{status:e?YY.RUNNING:YY.READY}))}),NY(this,"skip",()=>{const{status:e}=this.getState();e===YY.RUNNING&&this.setState({action:UY,lifecycle:qY.INIT,status:YY.SKIPPED})}),NY(this,"start",e=>{const{index:t,size:n}=this.getState();this.setState((0,i.A)((0,i.A)({},this.getNextState({action:IY,index:sG.number(e)?e:t},!0)),{},{status:n?YY.RUNNING:YY.WAITING}))}),NY(this,"stop",function(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];const{index:n,status:r}=t.getState();[YY.FINISHED,YY.SKIPPED].includes(r)||t.setState((0,i.A)((0,i.A)({},t.getNextState({action:FY,index:n+(e?1:0)})),{},{status:YY.PAUSED}))}),NY(this,"update",e=>{var t,n;if(!function(e,t){return!(!sG.plainObject(e)||!sG.array(t))&&Object.keys(e).every(e=>t.includes(e))}(e,kZ))throw new Error("State is not valid. Valid keys: ".concat(kZ.join(", ")));this.setState((0,i.A)({},this.getNextState((0,i.A)((0,i.A)((0,i.A)({},this.getState()),e),{},{action:null!=(t=e.action)?t:VY,origin:null!=(n=e.origin)?n:null}),!0)))});const{continuous:n=!1,stepIndex:r,steps:o=[]}=null!=e?e:{};this.setState({action:LY,controlled:sG.number(r),continuous:n,index:sG.number(r)?r:0,lifecycle:qY.INIT,origin:null,status:o.length?YY.READY:YY.IDLE},!0),this.beaconPopper=null,this.tooltipPopper=null,this.listener=null,this.setSteps(o)}getState(){return this.store.size?{action:this.store.get("action")||"",controlled:this.store.get("controlled")||!1,index:parseInt(this.store.get("index"),10),lifecycle:this.store.get("lifecycle")||"",origin:this.store.get("origin")||null,size:this.store.get("size")||0,status:this.store.get("status")||""}:(0,i.A)({},AZ)}getNextState(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];var n,r,i,o,a;const{action:s,controlled:l,index:c,size:d,status:u}=this.getState(),p=sG.number(e.index)?e.index:c,h=l&&!t?c:Math.min(Math.max(p,0),d);return{action:null!=(n=e.action)?n:s,controlled:l,index:h,lifecycle:null!=(r=e.lifecycle)?r:qY.INIT,origin:null!=(i=e.origin)?i:null,size:null!=(o=e.size)?o:d,status:h===d?YY.FINISHED:null!=(a=e.status)?a:u}}getSteps(){const e=this.data.get("steps");return Array.isArray(e)?e:[]}hasUpdatedState(e){return JSON.stringify(e)!==JSON.stringify(this.getState())}setState(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];const n=this.getState(),{action:r,index:o,lifecycle:a,origin:s=null,size:l,status:c}=(0,i.A)((0,i.A)({},n),e);this.store.set("action",r),this.store.set("index",o),this.store.set("lifecycle",a),this.store.set("origin",s),this.store.set("size",l),this.store.set("status",c),t&&(this.store.set("controlled",e.controlled),this.store.set("continuous",e.continuous)),this.listener&&this.hasUpdatedState(n)&&this.listener(this.getState())}getHelpers(){return{close:this.close,go:this.go,info:this.info,next:this.next,open:this.open,prev:this.prev,reset:this.reset,skip:this.skip}}};var EZ=function(e){let{styles:t}=e;return We.createElement("div",{key:"JoyrideSpotlight",className:"react-joyride__spotlight","data-test-id":"spotlight",style:t})},MZ=class extends We.Component{constructor(){super(...arguments),NY(this,"isActive",!1),NY(this,"resizeTimeout"),NY(this,"scrollTimeout"),NY(this,"scrollParent"),NY(this,"state",{isScrolling:!1,mouseOverSpotlight:!1,showSpotlight:!0}),NY(this,"hideSpotlight",()=>{const{continuous:e,disableOverlay:t,lifecycle:n}=this.props,r=[qY.INIT,qY.BEACON,qY.COMPLETE,qY.ERROR];return t||(e?r.includes(n):n!==qY.TOOLTIP)}),NY(this,"handleMouseMove",e=>{const{mouseOverSpotlight:t}=this.state,{height:n,left:r,position:i,top:o,width:a}=this.spotlightStyles,s="fixed"===i?e.clientY:e.pageY,l="fixed"===i?e.clientX:e.pageX,c=l>=r&&l<=r+a&&(s>=o&&s<=o+n);c!==t&&this.updateState({mouseOverSpotlight:c})}),NY(this,"handleScroll",()=>{const{target:e}=this.props,t=QY(e);if(this.scrollParent!==document){const{isScrolling:e}=this.state;e||this.updateState({isScrolling:!0,showSpotlight:!1}),clearTimeout(this.scrollTimeout),this.scrollTimeout=window.setTimeout(()=>{this.updateState({isScrolling:!1,showSpotlight:!0})},50)}else tZ(t,"sticky")&&this.updateState({})}),NY(this,"handleResize",()=>{clearTimeout(this.resizeTimeout),this.resizeTimeout=window.setTimeout(()=>{this.isActive&&this.forceUpdate()},100)})}componentDidMount(){const{debug:e,disableScrolling:t,disableScrollParentFix:n=!1,target:r}=this.props,i=QY(r);this.scrollParent=JY(null!=i?i:document.body,n,!0),this.isActive=!0,window.addEventListener("resize",this.handleResize)}componentDidUpdate(e){var t;const{disableScrollParentFix:n,lifecycle:r,spotlightClicks:i,target:o}=this.props,{changed:a}=vG(e,this.props);if(a("target")||a("disableScrollParentFix")){const e=QY(o);this.scrollParent=JY(null!=e?e:document.body,n,!0)}a("lifecycle",qY.TOOLTIP)&&(null==(t=this.scrollParent)||t.addEventListener("scroll",this.handleScroll,{passive:!0}),setTimeout(()=>{const{isScrolling:e}=this.state;e||this.updateState({showSpotlight:!0})},100)),(a("spotlightClicks")||a("disableOverlay")||a("lifecycle"))&&(i&&r===qY.TOOLTIP?window.addEventListener("mousemove",this.handleMouseMove,!1):r!==qY.TOOLTIP&&window.removeEventListener("mousemove",this.handleMouseMove))}componentWillUnmount(){var e;this.isActive=!1,window.removeEventListener("mousemove",this.handleMouseMove),window.removeEventListener("resize",this.handleResize),clearTimeout(this.resizeTimeout),clearTimeout(this.scrollTimeout),null==(e=this.scrollParent)||e.removeEventListener("scroll",this.handleScroll)}get overlayStyles(){const{mouseOverSpotlight:e}=this.state,{disableOverlayClose:t,placement:n,styles:r}=this.props;let o=r.overlay;return dZ()&&(o="center"===n?r.overlayLegacyCenter:r.overlayLegacy),(0,i.A)({cursor:t?"default":"pointer",height:XY(),pointerEvents:e?"none":"auto"},o)}get spotlightStyles(){var e,t,n;const{showSpotlight:r}=this.state,{disableScrollParentFix:o=!1,spotlightClicks:a,spotlightPadding:s=0,styles:l,target:c}=this.props,d=QY(c),u=KY(d),p=tZ(d),h=function(e,t,n){var r,i,o;const a=KY(e),s=JY(e,n),l=eZ(e,n),c=tZ(e);let d=0,u=null!=(r=null==a?void 0:a.top)?r:0;l&&c?u=(null!=(i=null==e?void 0:e.offsetTop)?i:0)-(null!=(o=null==s?void 0:s.scrollTop)?o:0):s instanceof HTMLElement&&(d=s.scrollTop,l||tZ(e)||(u+=d),s.isSameNode(rZ())||(u+=rZ().scrollTop));return Math.floor(u-t)}(d,s,o);return(0,i.A)((0,i.A)({},dZ()?l.spotlightLegacy:l.spotlight),{},{height:Math.round((null!=(e=null==u?void 0:u.height)?e:0)+2*s),left:Math.round((null!=(t=null==u?void 0:u.left)?t:0)-s),opacity:r?1:0,pointerEvents:a?"none":"auto",position:p?"fixed":"absolute",top:h,transition:"opacity 0.2s",width:Math.round((null!=(n=null==u?void 0:u.width)?n:0)+2*s)})}updateState(e){this.isActive&&this.setState(t=>(0,i.A)((0,i.A)({},t),e))}render(){const{showSpotlight:e}=this.state,{onClickOverlay:t,placement:n}=this.props,{hideSpotlight:r,overlayStyles:o,spotlightStyles:a}=this;if(r())return null;let s="center"!==n&&e&&We.createElement(EZ,{styles:a});if("safari"===oZ()){const{mixBlendMode:e,zIndex:t}=o,n=Ko(o,MY);s=We.createElement("div",{style:(0,i.A)({},n)},s),delete o.backgroundColor}return We.createElement("div",{className:"react-joyride__overlay","data-test-id":"overlay",onClick:t,role:"presentation",style:o},s)}},OZ=class extends We.Component{constructor(){super(...arguments),NY(this,"node",null)}componentDidMount(){const{id:e}=this.props;ZY()&&(this.node=document.createElement("div"),this.node.id=e,document.body.appendChild(this.node),iZ||this.renderReact15())}componentDidUpdate(){ZY()&&(iZ||this.renderReact15())}componentWillUnmount(){ZY()&&this.node&&(iZ||ut.unmountComponentAtNode(this.node),this.node.parentNode===document.body&&(document.body.removeChild(this.node),this.node=null))}renderReact15(){if(!ZY())return;const{children:e}=this.props;this.node&&ut.unstable_renderSubtreeIntoContainer(this,e,this.node)}renderReact16(){if(!ZY()||!iZ)return null;const{children:e}=this.props;return this.node?ut.createPortal(e,this.node):null}render(){return iZ?this.renderReact16():null}},RZ=class{constructor(e,t){if(NY(this,"element"),NY(this,"options"),NY(this,"canBeTabbed",e=>{const{tabIndex:t}=e;return!(null===t||t<0)&&this.canHaveFocus(e)}),NY(this,"canHaveFocus",e=>{const t=e.nodeName.toLowerCase();return(/input|select|textarea|button|object/.test(t)&&!e.getAttribute("disabled")||"a"===t&&!!e.getAttribute("href"))&&this.isVisible(e)}),NY(this,"findValidTabElements",()=>[].slice.call(this.element.querySelectorAll("*"),0).filter(this.canBeTabbed)),NY(this,"handleKeyDown",e=>{const{code:t="Tab"}=this.options;e.code===t&&this.interceptTab(e)}),NY(this,"interceptTab",e=>{e.preventDefault();const t=this.findValidTabElements(),{shiftKey:n}=e;if(!t.length)return;let r=document.activeElement?t.indexOf(document.activeElement):0;-1===r||!n&&r+1===t.length?r=0:n&&0===r?r=t.length-1:r+=n?-1:1,t[r].focus()}),NY(this,"isHidden",e=>{const t=e.offsetWidth<=0&&e.offsetHeight<=0,n=window.getComputedStyle(e);return!(!t||e.innerHTML)||(t&&"visible"!==n.getPropertyValue("overflow")||"none"===n.getPropertyValue("display"))}),NY(this,"isVisible",e=>{let t=e;for(;t;)if(t instanceof HTMLElement){if(t===document.body)break;if(this.isHidden(t))return!1;t=t.parentNode}return!0}),NY(this,"removeScope",()=>{window.removeEventListener("keydown",this.handleKeyDown)}),NY(this,"checkFocus",e=>{document.activeElement!==e&&(e.focus(),window.requestAnimationFrame(()=>this.checkFocus(e)))}),NY(this,"setFocus",()=>{const{selector:e}=this.options;if(!e)return;const t=this.element.querySelector(e);t&&window.requestAnimationFrame(()=>this.checkFocus(t))}),!(e instanceof HTMLElement))throw new TypeError("Invalid parameter: element must be an HTMLElement");this.element=e,this.options=t,window.addEventListener("keydown",this.handleKeyDown,!1),this.setFocus()}},PZ=class extends We.Component{constructor(e){if(super(e),NY(this,"beacon",null),NY(this,"setBeaconRef",e=>{this.beacon=e}),e.beaconComponent)return;const t=document.head||document.getElementsByTagName("head")[0],n=document.createElement("style");n.id="joyride-beacon-animation",e.nonce&&n.setAttribute("nonce",e.nonce);n.appendChild(document.createTextNode("\n        @keyframes joyride-beacon-inner {\n          20% {\n            opacity: 0.9;\n          }\n        \n          90% {\n            opacity: 0.7;\n          }\n        }\n        \n        @keyframes joyride-beacon-outer {\n          0% {\n            transform: scale(1);\n          }\n        \n          45% {\n            opacity: 0.7;\n            transform: scale(0.75);\n          }\n        \n          100% {\n            opacity: 0.9;\n            transform: scale(1);\n          }\n        }\n      ")),t.appendChild(n)}componentDidMount(){const{shouldFocus:e}=this.props;setTimeout(()=>{sG.domElement(this.beacon)&&e&&this.beacon.focus()},0)}componentWillUnmount(){const e=document.getElementById("joyride-beacon-animation");(null==e?void 0:e.parentNode)&&e.parentNode.removeChild(e)}render(){const{beaconComponent:e,continuous:t,index:n,isLastStep:r,locale:o,onClickOrHover:a,size:s,step:l,styles:c}=this.props,d=sZ(o.open),u={"aria-label":d,onClick:a,onMouseEnter:a,ref:this.setBeaconRef,title:d};let p;if(e){const o=e;p=We.createElement(o,(0,i.A)({continuous:t,index:n,isLastStep:r,size:s,step:l},u))}else p=We.createElement("button",(0,i.A)({key:"JoyrideBeacon",className:"react-joyride__beacon","data-test-id":"button-beacon",style:c.beacon,type:"button"},u),We.createElement("span",{style:c.beaconInner}),We.createElement("span",{style:c.beaconOuter}));return p}};var DZ=function(e){let{styles:t}=e,n=Ko(e,OY);const{color:r,height:o,width:a}=t,s=Ko(t,RY);return We.createElement("button",(0,i.A)({style:s,type:"button"},n),We.createElement("svg",{height:"number"===typeof o?"".concat(o,"px"):o,preserveAspectRatio:"xMidYMid",version:"1.1",viewBox:"0 0 18 18",width:"number"===typeof a?"".concat(a,"px"):a,xmlns:"http://www.w3.org/2000/svg"},We.createElement("g",null,We.createElement("path",{d:"M8.13911129,9.00268191 L0.171521827,17.0258467 C-0.0498027049,17.248715 -0.0498027049,17.6098394 0.171521827,17.8327545 C0.28204354,17.9443526 0.427188206,17.9998706 0.572051765,17.9998706 C0.71714958,17.9998706 0.862013139,17.9443526 0.972581703,17.8327545 L9.0000937,9.74924618 L17.0276057,17.8327545 C17.1384085,17.9443526 17.2832721,17.9998706 17.4281356,17.9998706 C17.5729992,17.9998706 17.718097,17.9443526 17.8286656,17.8327545 C18.0499901,17.6098862 18.0499901,17.2487618 17.8286656,17.0258467 L9.86135722,9.00268191 L17.8340066,0.973848225 C18.0553311,0.750979934 18.0553311,0.389855532 17.8340066,0.16694039 C17.6126821,-0.0556467968 17.254037,-0.0556467968 17.0329467,0.16694039 L9.00042166,8.25611765 L0.967006424,0.167268345 C0.745681892,-0.0553188426 0.387317931,-0.0553188426 0.165993399,0.167268345 C-0.0553311331,0.390136635 -0.0553311331,0.751261038 0.165993399,0.974176179 L8.13920499,9.00268191 L8.13911129,9.00268191 Z",fill:r}))))};var NZ=function(e){const{backProps:t,closeProps:n,index:r,isLastStep:o,primaryProps:a,skipProps:s,step:l,tooltipProps:c}=e,{content:d,hideBackButton:u,hideCloseButton:p,hideFooter:h,showSkipButton:m,styles:f,title:g}=l,v={};return v.primary=We.createElement("button",(0,i.A)({"data-test-id":"button-primary",style:f.buttonNext,type:"button"},a)),m&&!o&&(v.skip=We.createElement("button",(0,i.A)({"aria-live":"off","data-test-id":"button-skip",style:f.buttonSkip,type:"button"},s))),!u&&r>0&&(v.back=We.createElement("button",(0,i.A)({"data-test-id":"button-back",style:f.buttonBack,type:"button"},t))),v.close=!p&&We.createElement(DZ,(0,i.A)({"data-test-id":"button-close",styles:f.buttonClose},n)),We.createElement("div",(0,i.A)({key:"JoyrideTooltip","aria-label":sZ(null!=g?g:d),className:"react-joyride__tooltip",style:f.tooltip},c),We.createElement("div",{style:f.tooltipContainer},g&&We.createElement("h1",{"aria-label":sZ(g),style:f.tooltipTitle},g),We.createElement("div",{style:f.tooltipContent},d)),!h&&We.createElement("div",{style:f.tooltipFooter},We.createElement("div",{style:f.tooltipFooterSpacer},v.skip),v.back,v.primary),v.close)},LZ=class extends We.Component{constructor(){super(...arguments),NY(this,"handleClickBack",e=>{e.preventDefault();const{helpers:t}=this.props;t.prev()}),NY(this,"handleClickClose",e=>{e.preventDefault();const{helpers:t}=this.props;t.close("button_close")}),NY(this,"handleClickPrimary",e=>{e.preventDefault();const{continuous:t,helpers:n}=this.props;t?n.next():n.close("button_primary")}),NY(this,"handleClickSkip",e=>{e.preventDefault();const{helpers:t}=this.props;t.skip()}),NY(this,"getElementsProps",()=>{const{continuous:e,index:t,isLastStep:n,setTooltipRef:r,size:i,step:o}=this.props,{back:a,close:s,last:l,next:c,nextLabelWithProgress:d,skip:u}=o.locale,p=sZ(a),h=sZ(s),m=sZ(l),f=sZ(c),g=sZ(u);let v=s,x=h;if(e){if(v=c,x=f,o.showProgress&&!n){const e=sZ(d,{step:t+1,steps:i});v=hZ(d,t+1,i),x=e}n&&(v=l,x=m)}return{backProps:{"aria-label":p,children:a,"data-action":"back",onClick:this.handleClickBack,role:"button",title:p},closeProps:{"aria-label":h,children:s,"data-action":"close",onClick:this.handleClickClose,role:"button",title:h},primaryProps:{"aria-label":x,children:v,"data-action":"primary",onClick:this.handleClickPrimary,role:"button",title:x},skipProps:{"aria-label":g,children:u,"data-action":"skip",onClick:this.handleClickSkip,role:"button",title:g},tooltipProps:{"aria-modal":!0,ref:r,role:"alertdialog"}}})}render(){const{continuous:e,index:t,isLastStep:n,setTooltipRef:r,size:o,step:a}=this.props,{beaconComponent:s,tooltipComponent:l}=a,c=Ko(a,PY);let d;if(l){const a=(0,i.A)((0,i.A)({},this.getElementsProps()),{},{continuous:e,index:t,isLastStep:n,size:o,step:c,setTooltipRef:r}),s=l;d=We.createElement(s,(0,i.A)({},a))}else d=We.createElement(NZ,(0,i.A)((0,i.A)({},this.getElementsProps()),{},{continuous:e,index:t,isLastStep:n,size:o,step:a}));return d}},IZ=class extends We.Component{constructor(){super(...arguments),NY(this,"scope",null),NY(this,"tooltip",null),NY(this,"handleClickHoverBeacon",e=>{const{step:t,store:n}=this.props;"mouseenter"===e.type&&"hover"!==t.event||n.update({lifecycle:qY.TOOLTIP})}),NY(this,"setTooltipRef",e=>{this.tooltip=e}),NY(this,"setPopper",(e,t)=>{var n;const{action:r,lifecycle:i,step:o,store:a}=this.props;"wrapper"===t?a.setPopper("beacon",e):a.setPopper("tooltip",e),a.getPopper("beacon")&&(a.getPopper("tooltip")||"center"===o.placement)&&i===qY.INIT&&a.update({action:r,lifecycle:qY.READY}),(null==(n=o.floaterProps)?void 0:n.getPopper)&&o.floaterProps.getPopper(e,t)}),NY(this,"renderTooltip",e=>{const{continuous:t,helpers:n,index:r,size:o,step:a}=this.props;return We.createElement(LZ,(0,i.A)({continuous:t,helpers:n,index:r,isLastStep:r+1===o,setTooltipRef:this.setTooltipRef,size:o,step:a},e))})}componentDidMount(){const{debug:e,index:t}=this.props;uZ({title:"step:".concat(t),data:[{key:"props",value:this.props}],debug:e})}componentDidUpdate(e){var t;const{action:n,callback:r,continuous:o,controlled:a,debug:s,helpers:l,index:c,lifecycle:d,shouldScroll:u,status:p,step:h,store:m}=this.props,{changed:f,changedFrom:g}=vG(e,this.props),v=l.info(),x=o&&n!==WY&&(c>0||n===BY),y=f("action")||f("index")||f("lifecycle")||f("status"),b=g("lifecycle",[qY.TOOLTIP,qY.INIT],qY.INIT),j=f("action",[zY,BY,UY,WY]),_=a&&c===e.index;if(j&&(b||_)&&r((0,i.A)((0,i.A)({},v),{},{index:e.index,lifecycle:qY.COMPLETE,step:e.step,type:GY.STEP_AFTER})),"center"===h.placement&&p===YY.RUNNING&&f("index")&&n!==IY&&d===qY.INIT&&m.update({lifecycle:qY.READY}),y){const e=QY(h.target),t=!!e,o=t&&function(e){var t;if(!e)return!1;let n=e;for(;n&&n!==document.body;){if(n instanceof HTMLElement){const{display:e,visibility:t}=getComputedStyle(n);if("none"===e||"hidden"===t)return!1}n=null!=(t=n.parentElement)?t:null}return!0}(e);o?(g("status",YY.READY,YY.RUNNING)||g("lifecycle",qY.INIT,qY.READY))&&r((0,i.A)((0,i.A)({},v),{},{step:h,type:GY.STEP_BEFORE})):(console.warn(t?"Target not visible":"Target not mounted",h),r((0,i.A)((0,i.A)({},v),{},{type:GY.TARGET_NOT_FOUND,step:h})),a||m.update({index:c+(n===BY?-1:1)}))}g("lifecycle",qY.INIT,qY.READY)&&m.update({lifecycle:cZ(h)||x?qY.TOOLTIP:qY.BEACON}),f("index")&&uZ({title:"step:".concat(d),data:[{key:"props",value:this.props}],debug:s}),f("lifecycle",qY.BEACON)&&r((0,i.A)((0,i.A)({},v),{},{step:h,type:GY.BEACON})),f("lifecycle",qY.TOOLTIP)&&(r((0,i.A)((0,i.A)({},v),{},{step:h,type:GY.TOOLTIP})),u&&this.tooltip&&(this.scope=new RZ(this.tooltip,{selector:"[data-action=primary]"}),this.scope.setFocus())),g("lifecycle",[qY.TOOLTIP,qY.INIT],qY.INIT)&&(null==(t=this.scope)||t.removeScope(),m.cleanupPoppers())}componentWillUnmount(){var e;null==(e=this.scope)||e.removeScope()}get open(){const{lifecycle:e,step:t}=this.props;return cZ(t)||e===qY.TOOLTIP}render(){const{continuous:e,debug:t,index:n,nonce:r,shouldScroll:o,size:a,step:s}=this.props,l=QY(s.target);return CZ(s)&&sG.domElement(l)?We.createElement("div",{key:"JoyrideStep-".concat(n),className:"react-joyride__step"},We.createElement(EY,(0,i.A)((0,i.A)({},s.floaterProps),{},{component:this.renderTooltip,debug:t,getPopper:this.setPopper,id:"react-joyride-step-".concat(n),open:this.open,placement:s.placement,target:s.target}),We.createElement(PZ,{beaconComponent:s.beaconComponent,continuous:e,index:n,isLastStep:n+1===a,locale:s.locale,nonce:r,onClickOrHover:this.handleClickHoverBeacon,shouldFocus:o,size:a,step:s,styles:s.styles}))):null}},FZ=class extends We.Component{constructor(e){super(e),NY(this,"helpers"),NY(this,"store"),NY(this,"callback",e=>{const{callback:t}=this.props;sG.function(t)&&t(e)}),NY(this,"handleKeyboard",e=>{const{index:t,lifecycle:n}=this.state,{steps:r}=this.props,i=r[t];n===qY.TOOLTIP&&"Escape"===e.code&&i&&!i.disableCloseOnEsc&&this.store.close("keyboard")}),NY(this,"handleClickOverlay",()=>{const{index:e}=this.state,{steps:t}=this.props;_Z(this.props,t[e]).disableOverlayClose||this.helpers.close("overlay")}),NY(this,"syncState",e=>{this.setState(e)});const{debug:t,getHelpers:n,run:r=!0,stepIndex:o}=e;var a;this.store=(a=(0,i.A)((0,i.A)({},e),{},{controlled:r&&sG.number(o)}),new TZ(a)),this.helpers=this.store.getHelpers();const{addListener:s}=this.store;uZ({title:"init",data:[{key:"props",value:this.props},{key:"state",value:this.state}],debug:t}),s(this.syncState),n&&n(this.helpers),this.state=this.store.getState()}componentDidMount(){if(!ZY())return;const{debug:e,disableCloseOnEsc:t,run:n,steps:r}=this.props,{start:i}=this.store;wZ(r,e)&&n&&i(),t||document.body.addEventListener("keydown",this.handleKeyboard,{passive:!0})}componentDidUpdate(e,t){if(!ZY())return;const{action:n,controlled:r,index:o,status:a}=this.state,{debug:s,run:l,stepIndex:c,steps:d}=this.props,{stepIndex:u,steps:p}=e,{reset:h,setSteps:m,start:f,stop:g,update:v}=this.store,{changed:x}=vG(e,this.props),{changed:y,changedFrom:b}=vG(t,this.state),j=_Z(this.props,d[o]),_=!JV(p,d),C=sG.number(c)&&x("stepIndex"),w=QY(j.target);if(_&&(wZ(d,s)?m(d):console.warn("Steps are not valid",d)),x("run")&&(l?f(c):g()),C){let e=sG.number(u)&&u<c?zY:BY;n===FY&&(e=IY),[YY.FINISHED,YY.SKIPPED].includes(a)||v({action:n===WY?WY:e,index:c,lifecycle:qY.INIT})}r||a!==YY.RUNNING||0!==o||w||(this.store.update({index:o+1}),this.callback((0,i.A)((0,i.A)({},this.state),{},{type:GY.TARGET_NOT_FOUND,step:j})));const S=(0,i.A)((0,i.A)({},this.state),{},{index:o,step:j});if(y("action",[zY,BY,UY,WY])&&y("status",YY.PAUSED)){const e=_Z(this.props,d[t.index]);this.callback((0,i.A)((0,i.A)({},S),{},{index:t.index,lifecycle:qY.COMPLETE,step:e,type:GY.STEP_AFTER}))}if(y("status",[YY.FINISHED,YY.SKIPPED])){const e=_Z(this.props,d[t.index]);r||this.callback((0,i.A)((0,i.A)({},S),{},{index:t.index,lifecycle:qY.COMPLETE,step:e,type:GY.STEP_AFTER})),this.callback((0,i.A)((0,i.A)({},S),{},{type:GY.TOUR_END,step:e,index:t.index})),h()}else b("status",[YY.IDLE,YY.READY],YY.RUNNING)?this.callback((0,i.A)((0,i.A)({},S),{},{type:GY.TOUR_START})):(y("status")||y("action",$Y))&&this.callback((0,i.A)((0,i.A)({},S),{},{type:GY.TOUR_STATUS}));this.scrollToStep(t)}componentWillUnmount(){const{disableCloseOnEsc:e}=this.props;e||document.body.removeEventListener("keydown",this.handleKeyboard)}scrollToStep(e){const{index:t,lifecycle:n,status:r}=this.state,{debug:i,disableScrollParentFix:o=!1,scrollDuration:a,scrollOffset:s=20,scrollToFirstStep:l=!1,steps:c}=this.props,d=_Z(this.props,c[t]),u=QY(d.target),p=function(e){const{isFirstStep:t,lifecycle:n,previousLifecycle:r,scrollToFirstStep:i,step:o,target:a}=e;return!o.disableScrolling&&(!t||i||n===qY.TOOLTIP)&&"center"!==o.placement&&(!o.isFixed||!tZ(a))&&r!==n&&[qY.BEACON,qY.TOOLTIP].includes(n)}({isFirstStep:0===t,lifecycle:n,previousLifecycle:e.lifecycle,scrollToFirstStep:l,step:d,target:u});if(r===YY.RUNNING&&p){const e=eZ(u,o),l=JY(u,o);let c=Math.floor(nZ(u,s,o))||0;uZ({title:"scrollToStep",data:[{key:"index",value:t},{key:"lifecycle",value:n},{key:"status",value:r}],debug:i});const p=this.store.getPopper("beacon"),h=this.store.getPopper("tooltip");if(n===qY.BEACON&&p){const{offsets:t,placement:n}=p;["bottom"].includes(n)||e||(c=Math.floor(t.popper.top-s))}else if(n===qY.TOOLTIP&&h){const{flipped:t,offsets:n,placement:r}=h;!["top","right","left"].includes(r)||t||e?c-=d.spotlightPadding:c=Math.floor(n.popper.top-s)}c=c>=0?c:0,r===YY.RUNNING&&function(e,t){const{duration:n,element:r}=t;return new Promise((t,i)=>{const{scrollTop:o}=r,a=e>o?e-o:o-e;xG.top(r,e,{duration:a<100?50:n},e=>e&&"Element already at target scroll position"!==e.message?i(e):t())})}(c,{element:l,duration:a}).then(()=>{setTimeout(()=>{var e;null==(e=this.store.getPopper("tooltip"))||e.instance.update()},10)})}}render(){if(!ZY())return null;const{index:e,lifecycle:t,status:n}=this.state,{continuous:r=!1,debug:o=!1,nonce:a,scrollToFirstStep:s=!1,steps:l}=this.props,c={};if(n===YY.RUNNING&&l[e]){const n=_Z(this.props,l[e]);c.step=We.createElement(IZ,(0,i.A)((0,i.A)({},this.state),{},{callback:this.callback,continuous:r,debug:o,helpers:this.helpers,nonce:a,shouldScroll:!n.disableScrolling&&(0!==e||s),step:n,store:this.store})),c.overlay=We.createElement(OZ,{id:"react-joyride-portal"},We.createElement(MZ,(0,i.A)((0,i.A)({},n),{},{continuous:r,debug:o,lifecycle:t,onClickOverlay:this.handleClickOverlay})))}return We.createElement("div",{className:"react-joyride"},c.step,c.overlay)}};NY(FZ,"defaultProps",vZ);var $Z=FZ;function BZ(e){let{setRenderer:t,isTour:n,path:r}=e;const o=oo(),a=Nt(),s=$o.getTourState(),{t:l}=Vg(),[c,d]=We.useState({stepIndex:0,steps:[],run:!0,showTour:!1});We.useEffect(()=>{const e=u();d((0,i.A)((0,i.A)((0,i.A)({},c),{},{stepIndex:0,run:!0},e),{},{showTour:n?null===e||void 0===e?void 0:e.showTour:n}))},[o,n]);const u=()=>{const e={};return cs(r)||"programsTour"!==r?o.pathname.includes(ld.DOCTOR.PROFILE)?(e.steps=[{target:".profile-tour-step0",title:l("tourProfileTourTitleStep0"),content:l("tourProfileTourContentStep0"),disableBeacon:!0,placement:"top"}],e.scrollOffset=180,e.disableScrollParentFix=!0,e.disableScrolling=!0,e.showTour=!1!==(null===s||void 0===s?void 0:s.profile)):cs(r)||"programDashboardTour"!==r?cs(r)||"allPatientsTour"!==r?cs(r)||"programCoursesTour"!==r?cs(r)||"programRulesTour"!==r?cs(r)||"prescriptionTemplateTour"!==r?cs(r)||"patientDashboardTour"!==r?cs(r)||"medicalHistoryTour"!==r?cs(r)||"patientCoursesTour"!==r?cs(r)||"patientRulesTour"!==r?cs(r)||"prescriptionTour"!==r?cs(r)||"notesTour"!==r?cs(r)||"personalDetailsTour"!==r?cs(r)||"fmedicalHistoryTour"!==r?cs(r)||"staffTour"!==r?cs(r)||"rolesTour"!==r?cs(r)||"programSettingsTour"!==r?cs(r)||"followUpTour"!==r?cs(r)||"adherenceReportTour"!==r||(e.steps=[{target:".adherenceReport-tour-step0",title:l("tourAdherenceReportTitleStep0"),content:l("tourAdherenceReportContentStep0"),disableBeacon:!0,placement:"top"}],e.disableScrollParentFix=!0,e.disableScrolling=!0,e.showTour=!1!==(null===s||void 0===s?void 0:s.adherenceReportTour)):(e.steps=[{target:".followUp-tour-step0",title:l("tourFollowupTitleStep0"),content:l("tourFollowupContentStep0"),disableBeacon:!0,placement:"top"},{target:".followUp-tour-step1",title:l("tourFollowupTitleStep1"),content:l("tourFollowupContentStep1"),disableBeacon:!0,placement:"top"}],e.disableScrollParentFix=!0,e.disableScrolling=!0,e.showTour=!1!==(null===s||void 0===s?void 0:s.followUpTour)):(e.steps=[{target:".programSettings-tour-step0",title:l("tourProgramSettingsTitleStep0"),content:l("tourProgramSettingsContentStep0"),disableBeacon:!0,placement:"top"},{target:".programSettings-tour-step1",title:l("tourProgramSettingsTitleStep1"),content:l("tourProgramSettingsContentStep1"),disableBeacon:!0,placement:"top"},{target:".programSettings-tour-step2",title:l("tourProgramSettingsTitleStep2"),content:l("tourProgramSettingsContentStep2"),disableBeacon:!0,placement:"top"},{target:".programSettings-tour-step3",title:l("tourProgramSettingsTitleStep3"),content:l("tourProgramSettingsContentStep3"),disableBeacon:!0,placement:"top"}],e.disableScrollParentFix=!0,e.disableScrolling=!0,e.showTour=!1!==(null===s||void 0===s?void 0:s.programSettingsTour)):(e.steps=[{target:".roles-tour-step0",title:l("tourRolesTitleStep0"),content:l("tourRolesContentStep0"),disableBeacon:!0,placement:"top"},{target:".roles-tour-step1",title:l("tourRolesTitleStep1"),content:l("tourRolesContentStep1"),disableBeacon:!0,placement:"top"},{target:".roles-tour-step2",title:l("tourRolesTitleStep2"),content:l("tourRolesContentStep2"),disableBeacon:!0,placement:"top"}],e.disableScrollParentFix=!0,e.disableScrolling=!0,e.showTour=!1!==(null===s||void 0===s?void 0:s.rolesTour)):(e.steps=[{target:".staff-tour-step0",title:l("tourStaffTitleStep0"),content:l("tourStaffContentStep0"),disableBeacon:!0,placement:"top"},{target:".staff-tour-step1",title:l("tourStaffTitleStep1"),content:l("tourStaffContentStep1"),disableBeacon:!0,placement:"top"},{target:".staff-tour-step2",title:l("tourStaffTitleStep2"),content:l("tourStaffContentStep2"),disableBeacon:!0,placement:"top"}],e.disableScrollParentFix=!0,e.disableScrolling=!0,e.showTour=!1!==(null===s||void 0===s?void 0:s.staffTour)):(e.steps=[{target:".fmedicalHistory-tour-step0",title:l("tourMedicalHistoryTitleStep0"),content:l("tourMedicalHistoryContentStep0"),disableBeacon:!0,placement:"top"}],e.disableScrollParentFix=!0,e.disableScrolling=!0,e.showTour=!1!==(null===s||void 0===s?void 0:s.fmedicalHistory)):(e.steps=[{target:".pd-tour-step0",title:l("tourPersonalTitleStep0"),content:l("tourPersonalContentStep0"),disableBeacon:!0,placement:"top"}],e.disableScrollParentFix=!0,e.disableScrolling=!0,e.showTour=!1!==(null===s||void 0===s?void 0:s.personalDetailsTour)):(e.steps=[{target:".notes-tour-step0",title:l("tourNotesTitleStep0"),content:l("tourNotesContentStep0"),disableBeacon:!0,placement:"top"},{target:".notes-tour-step1",title:l("tourNotesTitleStep1"),content:l("tourNotesContentStep1"),disableBeacon:!0,placement:"top"},{target:".notes-tour-step2",title:l("tourNotesTitleStep2"),content:l("tourNotesContentStep2"),disableBeacon:!0,placement:"top"},{target:".notes-tour-step3",title:l("tourNotesTitleStep3"),content:l("tourNotesContentStep3"),disableBeacon:!0,placement:"top"}],e.disableScrollParentFix=!0,e.disableScrolling=!0,e.showTour=!1!==(null===s||void 0===s?void 0:s.notesTour)):(e.steps=[{target:".prescription-tour-step0",title:l("tourPrescriptionTitleStep0"),content:l("tourPrescriptionContentStep0"),disableBeacon:!0,placement:"top"},{target:".prescription-tour-step1",title:l("tourPrescriptionTitleStep1"),content:l("tourPrescriptionContentStep1"),disableBeacon:!0,placement:"top"},{target:".prescription-tour-step2",title:l("tourPrescriptionTitleStep2"),content:l("tourPrescriptionContentStep2"),disableBeacon:!0,placement:"top"}],e.disableScrollParentFix=!0,e.disableScrolling=!0,e.showTour=!1!==(null===s||void 0===s?void 0:s.prescriptionTour)):(e.steps=[{target:".patientrules-tour-step0",title:l("tourPatientRulesTitleStep0"),content:l("tourPatientRulesContentStep0"),disableBeacon:!0,placement:"top"},{target:".patientrules-tour-step1",title:l("tourPatientRulesTitleStep1"),content:l("tourPatientRulesContentStep1"),disableBeacon:!0,placement:"top"}],e.disableScrollParentFix=!0,e.disableScrolling=!0,e.showTour=!1!==(null===s||void 0===s?void 0:s.patientRules)):(e.steps=[{target:".patientCourses-tour-step0",title:l("tourPatientCoursesTitleStep0"),content:l("tourPatientCoursesContentStep0"),disableBeacon:!0,placement:"top"},{target:".patientCourses-tour-step1",title:l("tourPatientCoursesTitleStep1"),content:l("tourPatientCoursesContentStep1"),disableBeacon:!0,placement:"top"}],e.disableScrollParentFix=!0,e.disableScrolling=!0,e.showTour=!1!==(null===s||void 0===s?void 0:s.patientCourses)):(e.steps=[{target:".medicalHistory-tour-step0",title:l("tourMedicalHistoryTitleStep0"),content:l("tourMedicalHistoryContentStep0"),disableBeacon:!0,placement:"top"},{target:".medicalHistory-tour-step1",title:l("tourMedicalHistoryTitleStep1"),content:l("tourMedicalHistoryContentStep1"),disableBeacon:!0,placement:"top"},{target:".medicalHistory-tour-step3",title:l("tourMedicalHistoryTitleStep3"),content:l("tourMedicalHistoryContentStep3"),disableBeacon:!0,placement:"top"},{target:".medicalHistory-tour-step2",title:l("tourMedicalHistoryTitleStep2"),content:l("tourMedicalHistoryContentStep2"),disableBeacon:!0,placement:"top"}],e.disableScrollParentFix=!0,e.disableScrolling=!0,e.showTour=!1!==(null===s||void 0===s?void 0:s.medicalHistory)):(e.steps=[{target:".patientDashboard-tour-step0",title:l("tourPatientDashboardTitleStep0"),content:l("tourPatientDashboardContentStep0"),disableBeacon:!0,placement:"top"},{target:".patientDashboard-tour-step1",title:l("tourPatientDashboardTitleStep1"),content:l("tourPatientDashboardContentStep1"),disableBeacon:!0,placement:"top"},{target:".patientDashboard-tour-step2",title:l("tourPatientDashboardTitleStep2"),content:l("tourPatientDashboardContentStep2"),disableBeacon:!0,placement:"top"},{target:".patientDashboard-tour-step3",title:l("tourPatientDashboardTitleStep3"),content:l("tourPatientDashboardContentStep3"),disableBeacon:!0,placement:"top"},{target:".patientDashboard-tour-step4",title:l("tourPatientDashboardTitleStep4"),content:l("tourPatientDashboardContentStep4"),disableBeacon:!0,placement:"top"},{target:".patientDashboard-tour-step5",title:l("tourPatientDashboardTitleStep5"),content:l("tourPatientDashboardContentStep5"),disableBeacon:!0,placement:"top"},{target:".patientDashboard-tour-step6",title:l("tourPatientDashboardTitleStep6"),content:l("tourPatientDashboardContentStep6"),disableBeacon:!0,placement:"top"}],e.disableScrollParentFix=!0,e.disableScrolling=!0,e.showTour=!1!==(null===s||void 0===s?void 0:s.patientDashboard)):(e.steps=[{target:".template-tour-step0",title:l("tourTemplateTitleStep0"),content:l("tourTemplateContentStep0"),disableBeacon:!0,placement:"top"},{target:".template-tour-step1",title:l("tourTemplateTitleStep1"),content:l("tourTemplateContentStep1"),disableBeacon:!0,placement:"top"}],e.disableScrollParentFix=!0,e.disableScrolling=!0,e.showTour=!1!==(null===s||void 0===s?void 0:s.prescriptionTemplate)):(e.steps=[{target:".programrules-tour-step0",title:l("tourProgramRulesTitleStep0"),content:l("tourProgramRulesContentStep0"),disableBeacon:!0,placement:"top"}],e.disableScrollParentFix=!0,e.disableScrolling=!0,e.showTour=!1!==(null===s||void 0===s?void 0:s.programRules)):(e.steps=[{target:".schedule-tour-step0",title:l("tourScheduleTitleStep0"),content:l("tourScheduleContentStep0"),disableBeacon:!0,placement:"top"},{target:".schedule-tour-step2",title:l("tourScheduleTitleStep2"),content:l("tourScheduleContentStep2"),disableBeacon:!0,placement:"top"}],e.disableScrollParentFix=!0,e.disableScrolling=!0,e.showTour=!1!==(null===s||void 0===s?void 0:s.programCourses)):(e.steps=[{target:".patients-tour-step0",title:l("tourPatientsTitleStep0"),content:l("tourPatientsContentStep0"),disableBeacon:!0,placement:"top"},{target:".patients-tour-step1",title:l("tourPatientsTitleStep1"),content:l("tourPatientsContentStep1"),disableBeacon:!0,placement:"top"},{target:".patients-tour-step2",title:l("tourPatientsTitleStep2"),content:l("tourPatientsContentStep2"),disableBeacon:!0,placement:"top"},{target:".patients-tour-step3",title:l("tourPatientsTitleStep3"),content:l("tourPatientsContentStep3"),disableBeacon:!0,placement:"top"}],e.disableScrollParentFix=!0,e.disableScrolling=!0,e.showTour=!1!==(null===s||void 0===s?void 0:s.allPatients)):(e.steps=[{target:".dashboard-tour-step0",title:l("tourDashboardTitleStep0"),content:l("tourDashboardContentStep0"),disableBeacon:!0,placement:"top"},{target:".dashboard-tour-step1",title:l("tourDashboardTitleStep1"),content:l("tourDashboardContentStep1"),disableBeacon:!0,placement:"top"},{target:".dashboard-tour-step2",title:l("tourDashboardTitleStep2"),content:l("tourDashboardContentStep2"),disableBeacon:!0,placement:"top"},{target:".dashboard-tour-step3",title:l("tourDashboardTitleStep3"),content:l("tourDashboardContentStep3"),disableBeacon:!0,placement:"top"}],e.disableScrollParentFix=!0,e.disableScrolling=!0,e.showTour=!1!==(null===s||void 0===s?void 0:s.programDashboard)):(e.steps=[{target:".program-tour-step0",title:l("tourProgramTitleStep0"),content:l("tourProgramContentStep0"),disableBeacon:!0,placement:"top"},{target:".program-tour-step1",title:l("tourProgramTitleStep1"),content:l("tourProgramContentStep1"),disableBeacon:!0,placement:"top"},{target:".program-tour-step3",title:l("tourProgramTitleStep3"),content:l("tourProgramContentStep3"),disableBeacon:!0,placement:"top"},{target:".program-tour-step2",title:l("tourProgramTitleStep2"),content:l("tourProgramContentStep2"),disableBeacon:!0,placement:"top"},{target:".program-tour-step4",title:l("tourProgramTitleStep4"),content:l("tourProgramContentStep4"),disableBeacon:!0,placement:"top"},{target:".program-tour-step5",title:l("tourProgramTitleStep5"),content:l("tourProgramContentStep5"),disableBeacon:!0,placement:"top"},{target:".program-tour-step6",title:l("tourProgramTitleStep6"),content:l("tourProgramContentStep6"),disableBeacon:!0,placement:"top"}],e.disableScrollParentFix=!0,e.disableScrolling=!0,e.showTour=!1!==(null===s||void 0===s?void 0:s.allPrograms)),e},p=()=>{cs(r)||"programsTour"!==r?o.pathname.includes(ld.DOCTOR.PROFILE)?$o.setTourState({profile:!1}):cs(r)||"programDashboardTour"!==r?cs(r)||"allPatientsTour"!==r?cs(r)||"programCoursesTour"!==r?cs(r)||"programRulesTour"!==r?cs(r)||"prescriptionTemplateTour"!==r?cs(r)||"patientDashboardTour"!==r?cs(r)||"medicalHistoryTour"!==r?cs(r)||"patientCoursesTour"!==r?cs(r)||"patientRulesTour"!==r?cs(r)||"prescriptionTour"!==r?cs(r)||"notesTour"!==r?cs(r)||"personalDetailsTour"!==r?cs(r)||"fmedicalHistoryTour"!==r?cs(r)||"staffTour"!==r?cs(r)||"rolesTour"!==r?cs(r)||"programSettingsTour"!==r?cs(r)||"followUpTour"!==r?cs(r)||"adherenceReportTour"!==r||$o.setTourState({adherenceReportTour:!1}):$o.setTourState({followUpTour:!1}):$o.setTourState({programSettingsTour:!1}):$o.setTourState({rolesTour:!1}):$o.setTourState({staffTour:!1}):$o.setTourState({fmedicalHistory:!1}):$o.setTourState({personalDetailsTour:!1}):$o.setTourState({notesTour:!1}):$o.setTourState({prescriptionTour:!1}):$o.setTourState({patientRules:!1}):$o.setTourState({patientCourses:!1}):$o.setTourState({medicalHistory:!1}):$o.setTourState({patientDashboard:!1}):$o.setTourState({prescriptionTemplate:!1}):$o.setTourState({programRules:!1}):$o.setTourState({programCourses:!1}):$o.setTourState({allPatients:!1}):$o.setTourState({programDashboard:!1}):($o.setTourState({allPrograms:!1}),t(Math.random()))};return c.showTour?(0,qt.jsx)($Z,(0,i.A)((0,i.A)({},c),{},{callback:e=>{const{action:t,index:n,status:r,type:o}=e;[GY.STEP_AFTER,GY.TARGET_NOT_FOUND].includes(o)?(document.body.classList.add("joyride-open"),d((0,i.A)((0,i.A)({},c),{},{stepIndex:n+(t===BY?-1:1)}))):[YY.FINISHED].includes(r)?(document.body.classList.remove("joyride-open"),d((0,i.A)((0,i.A)({},c),{},{run:!1})),p()):[YY.SKIPPED].includes(r)?(document.body.classList.remove("joyride-open"),d((0,i.A)((0,i.A)({},c),{},{run:!1})),a(Jg({skip_tour:["true"]})),p()):"close"!==t&&"tour:end"!==o||(document.body.classList.remove("joyride-open"),d((0,i.A)((0,i.A)({},c),{},{run:!1})))},continuous:!0,showSkipButton:!0,spotlightClicks:!0,disableOverlayClose:!0,offset:5,locale:{last:"End"},styles:{beaconInner:{backgroundColor:"var(--color-secondary-error-dark)"},beaconOuter:{borderColor:"var(--color-secondary-error-dark)"},tooltipContainer:{textAlign:"justify"},options:{width:"500px",arrowColor:"#ffffff",backgroundColor:"#fff",overlayColor:"rgba(0,0,0,0.6)",primaryColor:"blue",textColor:"#000",zIndex:1203,beaconSize:"28px"}}})):null}BZ.defaultProps={setRenderer:()=>{},isTour:!0,path:""};const zZ=BZ;var HZ=n(47030);function WZ(e){let{fetchListFunction:t,searchText:n,setSearchText:r,pageDetails:i,searchInField:o,placeHolder:a}=e;const{t:s}=Vg(),l=function(){i.current_page=1,t(n)},c=()=>{r(""),i.current_page=1,t("")};return(0,qt.jsxs)(Ff,{container:!0,spacing:2,alignItems:"center",children:[(0,qt.jsx)(Ff,{item:!0,xs:!0,children:(0,qt.jsx)(d_,{fullWidth:!0,children:(0,qt.jsx)(qj,{label:"",id:"Search",variant:"outlined",size:"small",onChange:function(e){r(e.target.value)},autoComplete:"search",value:n,onKeyDown:function(e){(e=>13===e.keyCode)(e)&&(e.preventDefault(),l())},placeholder:a||s("rpm_Search"),endAdornment:o&&(0,qt.jsxs)(tw,{position:"end",children:[n&&(0,qt.jsx)(sy,{title:s("rpm_Reset"),placement:"top",children:(0,qt.jsx)(wh,{size:"small",onClick:c,children:(0,qt.jsx)(J_.A,{})})}),(0,qt.jsx)(sy,{title:s("rpm_Search"),placement:"top",children:(0,qt.jsx)(wh,{size:"small",onClick:l,children:(0,qt.jsx)(qC.A,{})})})]})})})}),!o&&(0,qt.jsxs)(qt.Fragment,{children:[(0,qt.jsx)(Ff,{item:!0,children:(0,qt.jsx)(xh,{color:"primary",onClick:l,variant:"contained",disableElevation:!0,children:s("rpm_Search")})}),(0,qt.jsx)(Ff,{item:!0,children:(0,qt.jsx)(xh,{onClick:c,disabled:!n,color:"primary",variant:"outlined",children:(0,qt.jsx)(J_.A,{})})})]})]})}function UZ(e){let{userData:t,roleCustomList:n,roleSystemList:r,rolePredefinedList:o,order:a,orderBy:s,setOrder:l,setOrderBy:c,searchText:d,setSearchText:u,dataParameter:p,roleHead:h,checkState:m,onCheck:f,isSelection:g,nodata:v,fetchRoleCustomList:x,fetchRolePredefinedList:y,pageDetails:b,editButton:j,viewButton:_,deleteButton:C,onProgramChange:w,onResetFilter:S,multipleDelete:A,setHeadcells:k,settingModal:T,initialHeadcells:E,handleSettingModalToggle:M,allPrograms:O}=e;const{t:R}=Vg(),P=so(),[D,N]=We.useState(0),L=[{name:R("rpm_Roles"),url:""}];return(0,qt.jsx)(qt.Fragment,{children:(0,qt.jsxs)(op,{sx:{width:"100%"},children:[(0,qt.jsxs)(op,{mb:2.5,display:"flex",children:[(0,qt.jsx)(BH,{labels:L}),(0,qt.jsx)(op,{sx:{display:{xs:"block",sm:"none"}},children:(0,qt.jsx)(Cf,{variant:"h6",component:"h6",children:R("rpm_Roles")})})]}),(0,qt.jsx)(op,{mb:2.5,children:(0,qt.jsxs)(Ff,{container:!0,spacing:2,alignItems:"center",children:[(0,qt.jsx)(Ff,{item:!0,xs:!0,children:(0,qt.jsx)(op,{sx:{display:{xs:"none",sm:"block"}},children:(0,qt.jsx)(Cf,{variant:"h5",component:"h5",children:R("rpm_Roles")})})}),(null===t||void 0===t?void 0:t.showCreateRoleBtn)&&(0,qt.jsx)(Ff,{item:!0,children:(0,qt.jsx)(xh,{variant:"contained",color:"primary",disableElevation:!0,onClick:()=>P("add"),className:(null===t||void 0===t?void 0:t.showCreateRoleBtn)&&"roles-tour-step2",children:R("rpm_CreateRole")})})]})}),(0,qt.jsx)(Ff,{container:!0,spacing:2,children:(0,qt.jsx)(Ff,{item:!0,xs:12,children:(0,qt.jsx)(yH,{variant:"outlined",children:(0,qt.jsxs)(wH,{sx:{p:0,":last-child":{pb:0}},children:[(0,qt.jsx)(op,{sx:{borderBottom:1,borderColor:"divider"},children:(0,qt.jsxs)(fV,{value:D,onChange:(e,t)=>{N(t)},variant:"scrollable",scrollButtons:"auto",children:[(0,qt.jsx)(zU,(0,i.A)({label:R("rpm_CustomRole")},HV(0))),(0,qt.jsx)(zU,(0,i.A)((0,i.A)({label:R("rpm_SystemRole")},HV(1)),{},{disabled:!(null!==t&&void 0!==t&&t.isAdmin)})),(0,qt.jsx)(zU,(0,i.A)({label:R("rpm_PredefinedRole")},HV(2)))]})}),(0,qt.jsx)(zV,{value:D,index:0,children:(0,qt.jsx)(op,{px:2,py:4,children:(0,qt.jsxs)(Ff,{container:!0,spacing:2.5,children:[(0,qt.jsx)(Ff,{item:!0,xs:12,children:(0,qt.jsxs)(Ff,{container:!0,spacing:2,justifyContent:"space-between",children:[(0,qt.jsx)(Ff,{item:!0,xs:12,md:5,lg:4,className:"roles-tour-step1",children:(0,qt.jsx)(WZ,{fetchListFunction:x,searchText:d,setSearchText:u,pageDetails:b,searchInField:!0,placeHolder:"Search by role name and description"})}),(0,qt.jsxs)(Ff,{item:!0,xs:12,md:7,lg:8,container:!0,spacing:2,justifyContent:"flex-end",children:[(0,qt.jsx)(Ff,{item:!0,xs:12,md:6,lg:4,className:"roles-tour-step0",children:(0,qt.jsx)(aj,{fullWidth:!0,size:"small",margin:"dense",id:"course",name:"course",options:cs(O)?[]:O,isOptionEqualToValue:(e,t)=>e.id===t.id,getOptionLabel:e=>null===e||void 0===e?void 0:e.display_name,renderOption:(e,t)=>(0,We.createElement)(op,(0,i.A)((0,i.A)({component:"li"},e),{},{key:t.code}),(0,qt.jsx)(op,{children:(0,qt.jsx)(Cf,{variant:"body1",component:"p",children:t.display_name})})),onChange:async(e,t,n)=>{w(null===t||void 0===t?void 0:t.code,null===xd||void 0===xd?void 0:xd.CUSTOM),"clear"===n&&S()},renderInput:e=>(0,qt.jsx)(Q_,(0,i.A)((0,i.A)({},e),{},{placeholder:R("rpm_SelectProgram")+"..."}))})}),m.length>0&&(0,qt.jsx)(Ff,{item:!0,children:(0,qt.jsx)(sy,{title:R("rpm_Delete"),children:(0,qt.jsx)(wh,{color:"error",sx:{bgcolor:"red.50"},onClick:()=>A(m,{}),children:(0,qt.jsx)(xc,{fontSize:"small",sx:{width:16,height:16}})})})}),(0,qt.jsx)(Ff,{item:!0,children:(0,qt.jsx)(sy,{title:R("rpm_TableCellSetting"),children:(0,qt.jsx)(sv,{sx:{boxShadow:"none",width:32,height:32,minHeight:"auto"},size:"small",color:"primary",onClick:M,children:(0,qt.jsx)(YC.A,{fontSize:"small",sx:{width:16,height:16}})})})})]})]})}),(0,qt.jsxs)(Ff,{item:!0,xs:12,children:[(0,qt.jsx)(op,{children:(0,qt.jsx)(UT,{order:a,orderBy:s,setOrder:l,setOrderBy:c,data:n,headCells:null===h||void 0===h?void 0:h.filter(e=>E.includes(e.id)),dataParameter:p,selected:m,setSelected:f,isSelection:g,noDataImage:v,fetchList:x,pageDetails:b,skeletonVrows:6,className:"theme_scroll",children:null===n||void 0===n?void 0:n.map(e=>(0,qt.jsxs)(cw,{sx:{"&:last-child td, &:last-child th":{border:0}},children:[g&&(0,qt.jsx)(gw,{padding:"checkbox",children:(0,qt.jsx)(Dw,{onChange:f,checked:m.includes(e.id.toString()),name:e.id.toString(),color:"primary"})}),E.includes("role_name")&&(0,qt.jsx)(gw,{children:(0,qt.jsx)(Lo,{className:"linkClr",to:"edit/".concat(e.id),children:e.name})}),E.includes("description")&&(0,qt.jsx)(gw,{sx:{maxWidth:"250px",whiteSpace:"normal"},children:e.description}),E.includes("access_layer")&&(0,qt.jsx)(gw,{sx:{maxWidth:"250px",whiteSpace:"normal"},children:e.group.path}),E.includes("action")&&(0,qt.jsxs)(gw,{children:[(null===t||void 0===t?void 0:t.showUpdateRoleBtn)&&j(e),(null===t||void 0===t?void 0:t.showReadRoleBtn)&&_(e),(null===t||void 0===t?void 0:t.showDeleteRoleBtn)&&C(e)]})]},e.id))})}),(0,qt.jsx)(KE,{pageDetails:b,fetchListFunction:x}),(0,qt.jsx)(TE,{open:T,allHeadCells:h,initialHeadcells:E,setHeadcells:k,onClose:M})]})]})})}),(0,qt.jsx)(zV,{value:D,index:1,children:(0,qt.jsx)(op,{px:2,py:4,children:(0,qt.jsx)(Ff,{container:!0,spacing:2.5,children:(0,qt.jsx)(Ff,{item:!0,xs:12,md:8,children:null===r||void 0===r?void 0:r.map(e=>(0,qt.jsxs)(op,{sx:{bgcolor:"primary.theme.50",p:2.5,borderRadius:1},children:[(0,qt.jsxs)(pE,{direction:"row",spacing:2,justifyContent:"space-between",children:[(0,qt.jsx)(Cf,{variant:"body1",component:"h6",fontWeight:"h6.fontWeight",children:R("rpm_SystemRole")}),(0,qt.jsx)(HZ.A,{})]}),(0,qt.jsxs)(pE,{direction:"row",spacing:2,sx:{mt:1.5},children:[(0,qt.jsx)(Cf,{variant:"body2",fontWeight:"h6.fontWeight",children:R("rpm_RoleName")}),(0,qt.jsx)(Cf,{variant:"body2",children:e.name})]}),(0,qt.jsxs)(pE,{direction:"row",spacing:2,sx:{mt:1.5},children:[(0,qt.jsx)(Cf,{variant:"body2",fontWeight:"h6.fontWeight",children:R("rpm_Description")}),(0,qt.jsx)(Cf,{variant:"body2",children:e.description})]})]},e.id))})})})}),(0,qt.jsx)(zV,{value:D,index:2,children:(0,qt.jsx)(op,{px:2,py:4,children:(0,qt.jsxs)(Ff,{container:!0,spacing:2.5,children:[(0,qt.jsx)(Ff,{item:!0,xs:12,children:(0,qt.jsxs)(Ff,{container:!0,spacing:2,justifyContent:"space-between",children:[(0,qt.jsx)(Ff,{item:!0,xs:12,md:5,lg:4,className:"roles-tour-step1",children:(0,qt.jsx)(WZ,{fetchListFunction:y,searchText:d,setSearchText:u,pageDetails:b,searchInField:!0,placeHolder:"Search by role name and description"})}),(0,qt.jsxs)(Ff,{item:!0,xs:12,md:7,lg:8,container:!0,spacing:2,justifyContent:"flex-end",children:[(0,qt.jsx)(Ff,{item:!0,xs:12,md:6,lg:4,className:"roles-tour-step0",children:(0,qt.jsx)(aj,{fullWidth:!0,size:"small",margin:"dense",id:"course",name:"course",options:cs(O)?[]:O,isOptionEqualToValue:(e,t)=>e.id===t.id,getOptionLabel:e=>null===e||void 0===e?void 0:e.display_name,renderOption:(e,t)=>(0,We.createElement)(op,(0,i.A)((0,i.A)({component:"li"},e),{},{key:t.code}),(0,qt.jsx)(op,{children:(0,qt.jsx)(Cf,{variant:"body1",component:"p",children:t.display_name})})),onChange:async(e,t,n)=>{w(null===t||void 0===t?void 0:t.code,null===xd||void 0===xd?void 0:xd.PREDEFINED),"clear"===n&&S()},renderInput:e=>(0,qt.jsx)(Q_,(0,i.A)((0,i.A)({},e),{},{placeholder:R("rpm_SelectProgram")+"..."}))})}),m.length>0&&(0,qt.jsx)(Ff,{item:!0,children:(0,qt.jsx)(sy,{title:R("rpm_Delete"),children:(0,qt.jsx)(wh,{color:"error",sx:{bgcolor:"red.50"},onClick:()=>A(m,{}),children:(0,qt.jsx)(xc,{fontSize:"small",sx:{width:16,height:16}})})})}),(0,qt.jsx)(Ff,{item:!0,children:(0,qt.jsx)(sy,{title:R("rpm_TableCellSetting"),children:(0,qt.jsx)(sv,{sx:{boxShadow:"none",width:32,height:32,minHeight:"auto"},size:"small",color:"primary",onClick:M,children:(0,qt.jsx)(YC.A,{fontSize:"small",sx:{width:16,height:16}})})})})]})]})}),(0,qt.jsxs)(Ff,{item:!0,xs:12,children:[(0,qt.jsx)(op,{children:(0,qt.jsx)(UT,{order:a,orderBy:s,setOrder:l,setOrderBy:c,data:o,headCells:null===h||void 0===h?void 0:h.filter(e=>E.includes(e.id)),dataParameter:p,selected:m,setSelected:f,isSelection:g,noDataImage:v,fetchList:y,pageDetails:b,skeletonVrows:6,className:"theme_scroll",children:null===o||void 0===o?void 0:o.map(e=>(0,qt.jsxs)(cw,{sx:{"&:last-child td, &:last-child th":{border:0}},children:[g&&(0,qt.jsx)(gw,{padding:"checkbox",children:(0,qt.jsx)(Dw,{onChange:f,checked:m.includes(e.id.toString()),name:e.id.toString(),color:"primary"})}),E.includes("role_name")&&(0,qt.jsx)(gw,{children:(0,qt.jsx)(Lo,{className:"linkClr",to:"edit/".concat(e.id),children:e.name})}),E.includes("description")&&(0,qt.jsx)(gw,{sx:{maxWidth:"250px",whiteSpace:"normal"},children:e.description}),E.includes("access_layer")&&(0,qt.jsx)(gw,{sx:{maxWidth:"250px",whiteSpace:"normal"},children:e.group.path}),E.includes("action")&&(0,qt.jsx)(gw,{children:(null===t||void 0===t?void 0:t.showReadRoleBtn)&&_(e)})]},e.id))})}),(0,qt.jsx)(KE,{pageDetails:b,fetchListFunction:y}),(0,qt.jsx)(TE,{open:T,allHeadCells:h,initialHeadcells:E,setHeadcells:k,onClose:M})]})]})})})]})})})})]})})}UZ.defaultProps={userData:{},roleHead:[],pageDetails:{},order:"",orderBy:"",setOrder:()=>{},setOrderBy:()=>{},searchText:"",setSearchText:()=>{},dataParameter:"",checkState:"",onCheck:()=>{},isSelection:"",nodata:"",roleSystemList:[],roleCustomList:[],rolePredefinedList:[],fetchRoleCustomList:()=>{},fetchRolePredefinedList:()=>{},editButton:()=>{},viewButton:()=>{},deleteButton:()=>{},filterByProgram:0,onProgramChange:()=>{},programList:[],onApplyFilter:()=>{},onResetFilter:()=>{},multipleDelete:()=>{},initialHeadcells:[],setHeadcells:()=>{},settingModal:!1,handleSettingModalToggle:()=>{},allPrograms:[]};const VZ=UZ,GZ=["children","onClose"],qZ=e=>{const{children:t,onClose:n}=e,r=Ko(e,GZ);return(0,qt.jsxs)(fC,(0,i.A)((0,i.A)({sx:{m:0,p:2}},r),{},{children:[t,n?(0,qt.jsx)(wh,{"aria-label":"close",onClick:n,sx:{position:"absolute",right:8,top:8,color:e=>e.palette.grey[500]},children:(0,qt.jsx)(J_.A,{})}):null]}))};function YZ(e){var t,n,r,i;let{openModal:o,onCloseModal:a,editRole:s}=e;const{t:l}=Vg(),c=wt(uu),d={name:null!==o&&void 0!==o&&null!==(t=o.data)&&void 0!==t&&t.name?null===o||void 0===o||null===(n=o.data)||void 0===n?void 0:n.name:"",description:null!==o&&void 0!==o&&null!==(r=o.data)&&void 0!==r&&r.description?null===o||void 0===o||null===(i=o.data)||void 0===i?void 0:i.description:""};return(0,qt.jsx)(We.Fragment,{children:(0,qt.jsx)(cC,{fullWidth:!0,maxWidth:"sm",open:o.open,onClose:a,children:(0,qt.jsx)(Kz,{initialValues:d,validationSchema:OU.editRoleSchema,onSubmit:s,enableReinitialize:!0,children:()=>(0,qt.jsx)(qt.Fragment,{children:(0,qt.jsxs)(nH,{children:[(0,qt.jsx)(qZ,{sx:{px:4},onClose:a,children:l("rpm_EditRole")}),(0,qt.jsx)(bC,{sx:{p:4},dividers:!0,children:(0,qt.jsxs)(Ff,{container:!0,spacing:2,direction:"column",children:[(0,qt.jsx)(Ff,{item:!0,xs:12,md:6,children:(0,qt.jsxs)(op,{mb:.5,children:[(0,qt.jsx)(o_,{htmlFor:"name",required:!0,sx:{mb:.75},children:l("rpm_RoleName")}),(0,qt.jsx)(tH,{fullWidth:!0,as:qj,id:"name",name:"name",color:"primary",size:"small",endAdornment:(0,qt.jsx)(tw,{position:"end",children:(0,qt.jsx)(sy,{title:l("message:rpm_RoleNameHelp"),placement:"top",children:(0,qt.jsx)(wh,{size:"small",children:(0,qt.jsx)(pM.A,{fontSize:"small"})})})})}),(0,qt.jsx)(dH,{name:"name",children:e=>(0,qt.jsx)(v_,{error:!0,children:l(e,{field:l("rpm_RoleName")})})})]})}),(0,qt.jsx)(Ff,{item:!0,xs:12,md:6,children:(0,qt.jsxs)(op,{mb:.5,children:[(0,qt.jsx)(o_,{htmlFor:"location",sx:{mb:.75},children:l("rpm_Description")}),(0,qt.jsx)(tH,{fullWidth:!0,as:qj,id:"description",name:"description",color:"primary",size:"small",rows:3,multiline:!0,endAdornment:(0,qt.jsx)(tw,{position:"end",children:(0,qt.jsx)(sy,{title:l("message:rpm_RoleDescriptionHelp"),placement:"top",children:(0,qt.jsx)(wh,{size:"small",children:(0,qt.jsx)(pM.A,{fontSize:"small"})})})})}),(0,qt.jsx)(dH,{name:"description",children:e=>(0,qt.jsx)(v_,{error:!0,children:l(e,{field:l("rpm_Description")})})})]})})]})}),(0,qt.jsx)(vE,{sx:{py:3,px:4},children:(0,qt.jsxs)(Ff,{container:!0,spacing:2,children:[(0,qt.jsx)(Ff,{item:!0,xs:!0}),(0,qt.jsx)(Ff,{item:!0,children:(0,qt.jsx)(xh,{color:"primary",variant:"outlined",onClick:a,children:l("rpm_Cancel")})}),(0,qt.jsx)(Ff,{item:!0,children:(0,qt.jsx)(IM,{loading:c,color:"primary",disableElevation:!0,variant:"contained",type:"submit",children:l("rpm_Submit")})})]})})]})})},"editrole_formik")})})}const ZZ=["content"],KZ=["content"];const XZ=function(){const e=Nt(),t=so(),{t:n}=Vg(),r=wt(bu),o=!("true"===us(r,"user_principal.attributes.skip_tour[0]","")),{userData:a}=(0,We.useContext)(lv),{programList:s}=(0,We.useContext)(DC),l=wt(ju),c=wt(cu),d=We.useRef([]),[u,p]=(0,We.useState)("desc"),[h,m]=(0,We.useState)("updated_at"),[f,g]=We.useState(""),[v,x]=We.useState(null),[y,b]=We.useState(null),[j,_]=We.useState(null),[C,w]=(0,We.useState)([]),[S,A]=(0,We.useState)(null),[k,T]=(0,We.useState)(null),[E,M]=We.useState(""),[O,R]=(0,We.useState)((0,i.A)({},dd)),[P,D]=We.useState({open:!1,data:{}}),[N,L]=We.useState({open:!1,data:{}}),[I,F]=We.useState(!1),[$,B]=We.useState(cs($o.getRolesHeadcells())?["role_name","description","access_layer","action"]:$o.getRolesHeadcells()),z=(e,t)=>{if(N.open)d.current=[],L((0,i.A)((0,i.A)({},N),{},{open:!N.open}));else{const n=Array.isArray(e)?[...e]:[t.id];d.current=n,L((0,i.A)((0,i.A)({},N),{},{open:!N.open,data:t}))}},H=e=>{D((0,i.A)((0,i.A)({},P),{},{open:!P.open,data:e}))},W=async function(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:f,n=arguments.length>1?arguments[1]:void 0;const r=cs(n)?(0,i.A)((0,i.A)({q:t},O),{},{sort_by:h,sort_order:u,programId:"/".concat(S,"/"),kind:xd.CUSTOM}):{filterParams:n,sort_by:h,sort_order:u,programId:(null===n||void 0===n?void 0:n.programId)&&"/".concat(null===n||void 0===n?void 0:n.programId,"/"),kind:xd.CUSTOM};try{const{data:t}=await e(qg(r)),n=t||{},{content:o}=n,a=Ko(n,ZZ);x(o),R(e=>(0,i.A)((0,i.A)({},e),{},{last_page:a.last_page,current_page:a.current_page,from:a.from,per_page:a.per_page,to:a.to,total:a.total}))}catch(o){const t=us(o,"response.data.code","");cs(t)?e(Zo({subTitle:"error:rpm_FetchRolesFailed",severity:ud.ERROR})):e(Zo({subTitle:Vd(t,"error:rpm_FetchRolesFailed"),severity:ud.ERROR}))}},U=async function(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:f,n=arguments.length>1?arguments[1]:void 0;const r=cs(n)?(0,i.A)((0,i.A)({q:t},O),{},{sort_by:h,sort_order:u,programId:"/".concat(k,"/"),kind:xd.PREDEFINED}):{filterParams:n,sort_by:h,sort_order:u,programId:(null===n||void 0===n?void 0:n.programId)&&"/".concat(null===n||void 0===n?void 0:n.programId,"/"),kind:xd.PREDEFINED};try{const{data:t}=await e(qg(r)),n=t||{},{content:o}=n,a=Ko(n,KZ);b(o),R(e=>(0,i.A)((0,i.A)({},e),{},{last_page:a.last_page,current_page:a.current_page,from:a.from,per_page:a.per_page,to:a.to,total:a.total}))}catch(o){const t=us(o,"response.data.code","");cs(t)?e(Zo({subTitle:"error:rpm_FetchRolesFailed",severity:ud.ERROR})):e(Zo({subTitle:Vd(t,"error:rpm_FetchRolesFailed"),severity:ud.ERROR}))}},V=()=>{if(null!==S){const e=(0,i.A)((0,i.A)({programId:S},O),{},{current_page:1,per_page:999});W("",e)}if(null!==k){const e=(0,i.A)((0,i.A)({programId:k},O),{},{current_page:1,per_page:999});U("",e)}};We.useEffect(()=>{V()},[S,k]),We.useEffect(()=>{if(c&&!cs(s)&&!cs(a))if(null!==a&&void 0!==a&&a.isAdmin)W();else if(null!==a&&void 0!==a&&a.showRoleMenu){var e,t;const n=(0,i.A)((0,i.A)({programId:"RPMCORE/".concat(null===(e=s[0])||void 0===e?void 0:e.code)},O),{},{current_page:1,per_page:999});W("",n),A("RPMCORE/".concat(null===(t=s[0])||void 0===t?void 0:t.code))}else W(),A(null)},[c,u,h,s,a]),We.useEffect(()=>{if(c&&!cs(s)&&!cs(a))if(null!==a&&void 0!==a&&a.isAdmin)U();else if(null!==a&&void 0!==a&&a.showRoleMenu){var e,t;const n=(0,i.A)((0,i.A)({programId:"RPMCORE/".concat(null===(e=s[0])||void 0===e?void 0:e.code)},O),{},{current_page:1,per_page:999});U("",n),T("RPMCORE/".concat(null===(t=s[0])||void 0===t?void 0:t.code))}else U(),T(null)},[c,u,h,s,a]),We.useEffect(()=>{c&&(async()=>{try{const{data:t}=await e(qg({kind:xd.SYSTEM})),{content:n}=t||{};_(n)}catch(t){console.log(t)}})()},[c]),We.useEffect(()=>{e(NC({activeMenuItem:"roles",heading:{}}))},[]);const G=[{id:"role_name",label:n("rpm_RoleName"),isSort:!0,sortProperty:"name"},{id:"description",label:n("rpm_Description"),isSort:!0,sortProperty:"description"},{id:"access_layer",label:n("rpm_AccessLevel"),isSort:!0,sortProperty:"access_layer"},{id:"action",label:n("rpm_Actions"),isSort:!1,sortProperty:"action"}];return(0,qt.jsxs)(qt.Fragment,{children:[(0,qt.jsx)(VZ,{userData:a,order:u,orderBy:h,setOrder:p,setOrderBy:m,searchText:f,setSearchText:g,dataParameter:"id",checkState:C,onCheck:e=>{if(Array.isArray(e))return w(e.map(e=>e.toString()));const t=e.target.name;C.includes(t)?w(C.filter(e=>e!==t)):w(e=>[...e,t])},isSelection:!1,nodata:GC,roleHead:G,roleSystemList:j,roleCustomList:v,rolePredefinedList:y,fetchRoleCustomList:W,fetchRolePredefinedList:U,pageDetails:O,editButton:e=>(0,qt.jsx)(sy,{title:n("rpm_Edit"),children:(0,qt.jsx)(wh,{"data-id":e.id,color:"primary",onClick:()=>H(e),children:(0,qt.jsx)(fc,{fontSize:"small",sx:{width:16,height:16}})})}),viewButton:e=>(0,qt.jsx)(sy,{title:n("rpm_view"),children:(0,qt.jsx)(wh,{"data-id":e.id,color:"primary",onClick:()=>t("edit/".concat(e.id)),children:(0,qt.jsx)(gc,{fontSize:"small",sx:{width:16,height:16}})})}),deleteButton:e=>(0,qt.jsx)(sy,{title:n("rpm_Delete"),children:(0,qt.jsx)(wh,{"data-id":e.id,color:"error",onClick:t=>z(t,e),children:(0,qt.jsx)(xc,{fontSize:"small",sx:{width:16,height:16}})})}),filterByProgram:S,onProgramChange:(e,t)=>{t===(null===xd||void 0===xd?void 0:xd.PREDEFINED)&&T("RPMCORE/".concat(e)),t===(null===xd||void 0===xd?void 0:xd.CUSTOM)&&A("RPMCORE/".concat(e))},programList:s,onApplyFilter:V,onResetFilter:()=>{A(null),T(null),W(),U()},multipleDelete:z,setHeadcells:function(e){B(e),$o.setRolesHeadcells(e)},settingModal:I,initialHeadcells:$,handleSettingModalToggle:()=>{F(!I)},allPrograms:l}),(0,qt.jsx)(YZ,{openModal:P,onCloseModal:H,editRole:async(t,n)=>{let{setErrors:r}=n;const o=(0,i.A)((0,i.A)({},t),{},{name:t.name,description:t.description});try{await e(((e,t)=>async n=>{n(na(!0));const r=(0,i.A)((0,i.A)({},t),{},{name:t.name,description:t.description});try{const t="".concat(ma.ROLES,"/").concat(e);return await $u(t,r)}finally{n(na(!1))}})(P.data.id,o)),e(Zo({subTitle:"message:rpm_RoleUpdatedSuccessfully",severity:ud.SUCCESS})),W(),D({open:!1,data:{}})}catch(a){const t=us(a,"response.data.field_errors",{}),n=us(a,"response.data.code","");cs(t)?cs(n)?e(Zo({subTitle:a.message,severity:ud.ERROR})):e(Zo({subTitle:Vd(n,"error:rpm_UpdateRoleFailed"),severity:ud.ERROR})):r(Ud(t))}}}),(0,qt.jsx)(qV,{openModal:N.open,onCloseModal:z,actionFunction:async()=>{try{await e(function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];return async t=>{if(!cs(e)){t(na(!0));try{await Promise.all(e.map(e=>Bu("".concat(ma.ROLES,"/").concat(e))))}finally{t(na(!1))}}}}(d.current)),w([]),W(),A(null),T(null),L((0,i.A)((0,i.A)({},N),{},{open:!N.open})),e(Zo({subTitle:"message:rpm_DeleteRoleSuccess",severity:ud.SUCCESS}))}catch(t){const n=us(t,"response.data.code","");cs(n)?e(Zo({subTitle:"error:rpm_RoleDeleteFailed",severity:ud.ERROR})):e(Zo({subTitle:Vd(n,"error:rpm_RoleDeleteFailed"),severity:ud.ERROR}))}},dataName:N.data.name,options:{primaryText:n("message:rpm_DeleteTitle"),secondaryText:n("message:rpm_DeleteBodyText"),descText:n("message:rpm_DeleteSubText"),btn:{primaryText:n("rpm_Delete"),secondaryText:n("rpm_Cancel"),primaryColor:"error",secondaryColor:"primary"},btnSwap:!0}}),!cs(s)&&(0,qt.jsxs)(qt.Fragment,{children:[(0,qt.jsx)(zZ,{isTour:o,path:"rolesTour",setRenderer:M}),(0,qt.jsx)("input",{type:"hidden",id:"rerenderer",value:E})," "]})]})};var QZ=n(630),JZ=n(67500),eK=n(98348),tK=n(57566);const nK=We.createContext({});const rK=nK,iK=We.createContext({});const oK=iK;function aK(e){return(0,sr.Ay)("MuiStep",e)}(0,ar.A)("MuiStep",["root","horizontal","vertical","alternativeLabel","completed"]);const sK=["active","children","className","component","completed","disabled","expanded","index","last"],lK=(0,Vn.Ay)("div",{name:"MuiStep",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[n.orientation],n.alternativeLabel&&t.alternativeLabel,n.completed&&t.completed]}})(e=>{let{ownerState:t}=e;return(0,Ft.A)({},"horizontal"===t.orientation&&{paddingLeft:8,paddingRight:8},t.alternativeLabel&&{flex:1,position:"relative"})}),cK=We.forwardRef(function(e,t){const n=(0,$t.b)({props:e,name:"MuiStep"}),{active:r,children:i,className:o,component:a="div",completed:s,disabled:l,expanded:c=!1,index:d,last:u}=n,p=(0,nn.A)(n,sK),{activeStep:h,connector:m,alternativeLabel:f,orientation:g,nonLinear:v}=We.useContext(rK);let[x=!1,y=!1,b=!1]=[r,s,l];h===d?x=void 0===r||r:!v&&h>d?y=void 0===s||s:!v&&h<d&&(b=void 0===l||l);const j=We.useMemo(()=>({index:d,last:u,expanded:c,icon:d+1,active:x,completed:y,disabled:b}),[d,u,c,x,y,b]),_=(0,Ft.A)({},n,{active:x,orientation:g,alternativeLabel:f,completed:y,disabled:b,expanded:c,component:a}),C=(e=>{const{classes:t,orientation:n,alternativeLabel:r,completed:i}=e,o={root:["root",n,r&&"alternativeLabel",i&&"completed"]};return(0,ir.A)(o,aK,t)})(_),w=(0,qt.jsxs)(lK,(0,Ft.A)({as:a,className:(0,nr.A)(C.root,o),ref:t,ownerState:_},p,{children:[m&&f&&0!==d?m:null,i]}));return(0,qt.jsx)(oK.Provider,{value:j,children:m&&!f&&0!==d?(0,qt.jsxs)(We.Fragment,{children:[m,w]}):w})}),dK=cK;function uK(e){return(0,sr.Ay)("MuiStepConnector",e)}const pK=(0,ar.A)("MuiStepConnector",["root","horizontal","vertical","alternativeLabel","active","completed","disabled","line","lineHorizontal","lineVertical"]),hK=["className"],mK=(0,Vn.Ay)("div",{name:"MuiStepConnector",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[n.orientation],n.alternativeLabel&&t.alternativeLabel,n.completed&&t.completed]}})(e=>{let{ownerState:t}=e;return(0,Ft.A)({flex:"1 1 auto"},"vertical"===t.orientation&&{marginLeft:12},t.alternativeLabel&&{position:"absolute",top:12,left:"calc(-50% + 20px)",right:"calc(50% + 20px)"})}),fK=(0,Vn.Ay)("span",{name:"MuiStepConnector",slot:"Line",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.line,t["line".concat((0,pp.A)(n.orientation))]]}})(e=>{let{ownerState:t,theme:n}=e;const r="light"===n.palette.mode?n.palette.grey[400]:n.palette.grey[600];return(0,Ft.A)({display:"block",borderColor:n.vars?n.vars.palette.StepConnector.border:r},"horizontal"===t.orientation&&{borderTopStyle:"solid",borderTopWidth:1},"vertical"===t.orientation&&{borderLeftStyle:"solid",borderLeftWidth:1,minHeight:24})}),gK=We.forwardRef(function(e,t){const n=(0,$t.b)({props:e,name:"MuiStepConnector"}),{className:r}=n,i=(0,nn.A)(n,hK),{alternativeLabel:o,orientation:a="horizontal"}=We.useContext(rK),{active:s,disabled:l,completed:c}=We.useContext(oK),d=(0,Ft.A)({},n,{alternativeLabel:o,orientation:a,active:s,completed:c,disabled:l}),u=(e=>{const{classes:t,orientation:n,alternativeLabel:r,active:i,completed:o,disabled:a}=e,s={root:["root",n,r&&"alternativeLabel",i&&"active",o&&"completed",a&&"disabled"],line:["line","line".concat((0,pp.A)(n))]};return(0,ir.A)(s,uK,t)})(d);return(0,qt.jsx)(mK,(0,Ft.A)({className:(0,nr.A)(u.root,r),ref:t,ownerState:d},i,{children:(0,qt.jsx)(fK,{className:u.line,ownerState:d})}))}),vK=gK,xK=(0,Cy.A)((0,qt.jsx)("path",{d:"M12 0a12 12 0 1 0 0 24 12 12 0 0 0 0-24zm-2 17l-5-5 1.4-1.4 3.6 3.6 7.6-7.6L19 8l-9 9z"}),"CheckCircle"),yK=(0,Cy.A)((0,qt.jsx)("path",{d:"M1 21h22L12 2 1 21zm12-3h-2v-2h2v2zm0-4h-2v-4h2v4z"}),"Warning");function bK(e){return(0,sr.Ay)("MuiStepIcon",e)}const jK=(0,ar.A)("MuiStepIcon",["root","active","completed","error","text"]);var _K;const CK=["active","className","completed","error","icon"],wK=(0,Vn.Ay)(fr.A,{name:"MuiStepIcon",slot:"Root",overridesResolver:(e,t)=>t.root})(e=>{let{theme:t}=e;return{display:"block",transition:t.transitions.create("color",{duration:t.transitions.duration.shortest}),color:(t.vars||t).palette.text.disabled,["&.".concat(jK.completed)]:{color:(t.vars||t).palette.primary.main},["&.".concat(jK.active)]:{color:(t.vars||t).palette.primary.main},["&.".concat(jK.error)]:{color:(t.vars||t).palette.error.main}}}),SK=(0,Vn.Ay)("text",{name:"MuiStepIcon",slot:"Text",overridesResolver:(e,t)=>t.text})(e=>{let{theme:t}=e;return{fill:(t.vars||t).palette.primary.contrastText,fontSize:t.typography.caption.fontSize,fontFamily:t.typography.fontFamily}}),AK=We.forwardRef(function(e,t){const n=(0,$t.b)({props:e,name:"MuiStepIcon"}),{active:r=!1,className:i,completed:o=!1,error:a=!1,icon:s}=n,l=(0,nn.A)(n,CK),c=(0,Ft.A)({},n,{active:r,completed:o,error:a}),d=(e=>{const{classes:t,active:n,completed:r,error:i}=e,o={root:["root",n&&"active",r&&"completed",i&&"error"],text:["text"]};return(0,ir.A)(o,bK,t)})(c);if("number"===typeof s||"string"===typeof s){const e=(0,nr.A)(i,d.root);return a?(0,qt.jsx)(wK,(0,Ft.A)({as:yK,className:e,ref:t,ownerState:c},l)):o?(0,qt.jsx)(wK,(0,Ft.A)({as:xK,className:e,ref:t,ownerState:c},l)):(0,qt.jsxs)(wK,(0,Ft.A)({className:e,ref:t,ownerState:c},l,{children:[_K||(_K=(0,qt.jsx)("circle",{cx:"12",cy:"12",r:"12"})),(0,qt.jsx)(SK,{className:d.text,x:"12",y:"12",textAnchor:"middle",dominantBaseline:"central",ownerState:c,children:s})]}))}return s}),kK=AK;function TK(e){return(0,sr.Ay)("MuiStepLabel",e)}const EK=(0,ar.A)("MuiStepLabel",["root","horizontal","vertical","label","active","completed","error","disabled","iconContainer","alternativeLabel","labelContainer"]),MK=["children","className","componentsProps","error","icon","optional","slotProps","StepIconComponent","StepIconProps"],OK=(0,Vn.Ay)("span",{name:"MuiStepLabel",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[n.orientation]]}})(e=>{let{ownerState:t}=e;return(0,Ft.A)({display:"flex",alignItems:"center",["&.".concat(EK.alternativeLabel)]:{flexDirection:"column"},["&.".concat(EK.disabled)]:{cursor:"default"}},"vertical"===t.orientation&&{textAlign:"left",padding:"8px 0"})}),RK=(0,Vn.Ay)("span",{name:"MuiStepLabel",slot:"Label",overridesResolver:(e,t)=>t.label})(e=>{let{theme:t}=e;return(0,Ft.A)({},t.typography.body2,{display:"block",transition:t.transitions.create("color",{duration:t.transitions.duration.shortest}),["&.".concat(EK.active)]:{color:(t.vars||t).palette.text.primary,fontWeight:500},["&.".concat(EK.completed)]:{color:(t.vars||t).palette.text.primary,fontWeight:500},["&.".concat(EK.alternativeLabel)]:{marginTop:16},["&.".concat(EK.error)]:{color:(t.vars||t).palette.error.main}})}),PK=(0,Vn.Ay)("span",{name:"MuiStepLabel",slot:"IconContainer",overridesResolver:(e,t)=>t.iconContainer})(()=>({flexShrink:0,display:"flex",paddingRight:8,["&.".concat(EK.alternativeLabel)]:{paddingRight:0}})),DK=(0,Vn.Ay)("span",{name:"MuiStepLabel",slot:"LabelContainer",overridesResolver:(e,t)=>t.labelContainer})(e=>{let{theme:t}=e;return{width:"100%",color:(t.vars||t).palette.text.secondary,["&.".concat(EK.alternativeLabel)]:{textAlign:"center"}}}),NK=We.forwardRef(function(e,t){var n;const r=(0,$t.b)({props:e,name:"MuiStepLabel"}),{children:i,className:o,componentsProps:a={},error:s=!1,icon:l,optional:c,slotProps:d={},StepIconComponent:u,StepIconProps:p}=r,h=(0,nn.A)(r,MK),{alternativeLabel:m,orientation:f}=We.useContext(rK),{active:g,disabled:v,completed:x,icon:y}=We.useContext(oK),b=l||y;let j=u;b&&!j&&(j=kK);const _=(0,Ft.A)({},r,{active:g,alternativeLabel:m,completed:x,disabled:v,error:s,orientation:f}),C=(e=>{const{classes:t,orientation:n,active:r,completed:i,error:o,disabled:a,alternativeLabel:s}=e,l={root:["root",n,o&&"error",a&&"disabled",s&&"alternativeLabel"],label:["label",r&&"active",i&&"completed",o&&"error",a&&"disabled",s&&"alternativeLabel"],iconContainer:["iconContainer",r&&"active",i&&"completed",o&&"error",a&&"disabled",s&&"alternativeLabel"],labelContainer:["labelContainer",s&&"alternativeLabel"]};return(0,ir.A)(l,TK,t)})(_),w=null!=(n=d.label)?n:a.label;return(0,qt.jsxs)(OK,(0,Ft.A)({className:(0,nr.A)(C.root,o),ref:t,ownerState:_},h,{children:[b||j?(0,qt.jsx)(PK,{className:C.iconContainer,ownerState:_,children:(0,qt.jsx)(j,(0,Ft.A)({completed:x,active:g,error:s,icon:b},p))}):null,(0,qt.jsxs)(DK,{className:C.labelContainer,ownerState:_,children:[i?(0,qt.jsx)(RK,(0,Ft.A)({ownerState:_},w,{className:(0,nr.A)(C.label,null==w?void 0:w.className),children:i})):null,c]})]}))});NK.muiName="StepLabel";const LK=NK;function IK(e){return(0,sr.Ay)("MuiStepper",e)}(0,ar.A)("MuiStepper",["root","horizontal","vertical","nonLinear","alternativeLabel"]);const FK=["activeStep","alternativeLabel","children","className","component","connector","nonLinear","orientation"],$K=(0,Vn.Ay)("div",{name:"MuiStepper",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[n.orientation],n.alternativeLabel&&t.alternativeLabel,n.nonLinear&&t.nonLinear]}})(e=>{let{ownerState:t}=e;return(0,Ft.A)({display:"flex"},"horizontal"===t.orientation&&{flexDirection:"row",alignItems:"center"},"vertical"===t.orientation&&{flexDirection:"column"},t.alternativeLabel&&{alignItems:"flex-start"})}),BK=(0,qt.jsx)(vK,{}),zK=We.forwardRef(function(e,t){const n=(0,$t.b)({props:e,name:"MuiStepper"}),{activeStep:r=0,alternativeLabel:i=!1,children:o,className:a,component:s="div",connector:l=BK,nonLinear:c=!1,orientation:d="horizontal"}=n,u=(0,nn.A)(n,FK),p=(0,Ft.A)({},n,{nonLinear:c,alternativeLabel:i,orientation:d,component:s}),h=(e=>{const{orientation:t,nonLinear:n,alternativeLabel:r,classes:i}=e,o={root:["root",t,n&&"nonLinear",r&&"alternativeLabel"]};return(0,ir.A)(o,IK,i)})(p),m=We.Children.toArray(o).filter(Boolean),f=m.map((e,t)=>We.cloneElement(e,(0,Ft.A)({index:t,last:t+1===m.length},e.props))),g=We.useMemo(()=>({activeStep:r,alternativeLabel:i,connector:l,nonLinear:c,orientation:d}),[r,i,l,c,d]);return(0,qt.jsx)(rK.Provider,{value:g,children:(0,qt.jsx)($K,(0,Ft.A)({as:s,ownerState:p,className:(0,nr.A)(h.root,a),ref:t},u,{children:f}))})}),HK=zK,WK=(0,Vn.Ay)(vK)(e=>{let{theme:t}=e;return{["&.".concat(pK.alternativeLabel)]:{top:22},["&.".concat(pK.active)]:{["& .".concat(pK.line)]:{backgroundImage:"linear-gradient( 95deg,".concat(t.palette.primary.main," 0%,").concat(t.palette.primary.theme[300]," 50%,").concat(t.palette.primary.theme[800]," 100%)")}},["&.".concat(pK.completed)]:{["& .".concat(pK.line)]:{backgroundImage:"linear-gradient( 95deg,".concat(t.palette.primary.main," 0%,").concat(t.palette.primary.theme[300]," 50%,").concat(t.palette.primary.theme[800]," 100%)")}},["& .".concat(pK.line)]:{height:3,border:0,backgroundColor:"dark"===t.palette.mode?t.palette.grey[800]:"#eaeaf0",borderRadius:1}}}),UK=(0,Vn.Ay)("div")(e=>{let{theme:t,ownerState:n}=e;return(0,i.A)((0,i.A)({backgroundColor:"dark"===t.palette.mode?t.palette.grey[700]:"#ccc",zIndex:1,color:"#fff",width:50,height:50,display:"flex",borderRadius:"50%",justifyContent:"center",alignItems:"center"},n.active&&{backgroundImage:"linear-gradient( 136deg, ".concat(t.palette.primary.main," 0%, ").concat(t.palette.primary.theme[300]," 50%, ").concat(t.palette.primary.theme[800]," 100%)"),boxShadow:"0 4px 10px 0 rgba(0,0,0,.25)"}),n.completed&&{backgroundImage:"linear-gradient( 136deg, ".concat(t.palette.primary.main," 0%, ").concat(t.palette.primary.theme[300]," 50%, ").concat(t.palette.primary.theme[800]," 100%)")})});function VK(e){let{activeStep:t,stepsAndIcon:n}=e;return(0,qt.jsx)(pE,{sx:{width:"100%"},spacing:4,children:(0,qt.jsx)(HK,{alternativeLabel:!0,activeStep:t,connector:(0,qt.jsx)(WK,{}),children:n.map(e=>(0,qt.jsx)(dK,{children:(0,qt.jsx)(LK,{StepIconComponent:e=>function(e){var t,n;const{active:r,completed:i,className:o,stepsAndIcon:a}=e;return(0,qt.jsx)(UK,{ownerState:{completed:i,active:r},className:o,children:i?null===(n=a[e.icon-1])||void 0===n?void 0:n.doneIcon:null===(t=a[e.icon-1])||void 0===t?void 0:t.icon})}((0,i.A)((0,i.A)({},e),{},{stepsAndIcon:n})),children:e.name})},e.name))})})}const GK={system_role:"None",custom_role:"None",predefined_role:"None"};const qK=function(e){let{levelPayload:t,rolePayload:n,toggleRolePayload:r,handleBackStep:i,roleSystemList:o,roleCustomList:a,rolePredefinedList:s}=e;const{t:l}=Vg(),c=()=>{if(null===t||void 0===t||!t.program)return(0,qt.jsx)(op,{mb:3,children:(0,qt.jsxs)(pE,{flexDirection:"column",gap:{xs:1,lg:2},children:[(0,qt.jsx)(Cf,{variant:"body1",component:"p",fontWeight:"h6.fontWeight",children:l("rpm_SystemRole")}),(0,qt.jsxs)(op,{children:[(0,qt.jsxs)(tH,{as:G_,fullWidth:!0,size:"small",id:"system_role",name:"system_role",variant:"outlined",endAdornment:(0,qt.jsx)(tw,{position:"end",sx:{position:"absolute",right:"28px"},children:(0,qt.jsx)(sy,{title:l("message:rpm_SystemRoleHelp"),placement:"top",children:(0,qt.jsx)(wh,{size:"small",disableRipple:!0,sx:{p:0},children:(0,qt.jsx)(pM.A,{fontSize:"small"})})})}),children:[(0,qt.jsx)(mf,{value:"None",disabled:!0,sx:{display:"none"},children:"None"}),null===o||void 0===o?void 0:o.map(e=>(0,qt.jsx)(mf,{value:e.id,children:e.name},e.id))]}),(0,qt.jsx)(dH,{name:"system_role",children:e=>(0,qt.jsx)(v_,{error:!0,children:l(e,{field:l("rpm_SystemRole")})})})]})]})});switch(null===t||void 0===t?void 0:t.role_type){case"CUSTOM":return(0,qt.jsx)(op,{mb:3,children:(0,qt.jsxs)(pE,{flexDirection:"column",gap:{xs:1,lg:2},children:[(0,qt.jsx)(Cf,{variant:"body1",component:"p",fontWeight:"h6.fontWeight",children:l("rpm_CustomRole")}),(0,qt.jsxs)(op,{children:[(0,qt.jsxs)(tH,{as:G_,fullWidth:!0,size:"small",id:"custom_role",name:"custom_role",variant:"outlined",endAdornment:(0,qt.jsx)(tw,{position:"end",sx:{position:"absolute",right:"28px"},children:(0,qt.jsx)(sy,{title:l("message:rpm_CustomRoleHelp"),placement:"top",children:(0,qt.jsx)(wh,{size:"small",disableRipple:!0,sx:{p:0},children:(0,qt.jsx)(pM.A,{fontSize:"small"})})})}),children:[(0,qt.jsx)(mf,{value:"None",disabled:!0,sx:{display:"none"},children:"None"}),null===a||void 0===a?void 0:a.map(e=>(0,qt.jsx)(mf,{value:e.id,children:e.name},e.id))]}),(0,qt.jsx)(dH,{name:"custom_role",children:e=>(0,qt.jsx)(v_,{error:!0,children:l(e,{field:l("rpm_CustomRole")})})})]})]})});case"PREDEFINED":return(0,qt.jsx)(op,{mb:3,children:(0,qt.jsxs)(pE,{flexDirection:"column",gap:{xs:1,lg:2},children:[(0,qt.jsx)(Cf,{variant:"body1",component:"p",fontWeight:"h6.fontWeight",children:l("rpm_PredefinedRole")}),(0,qt.jsxs)(op,{children:[(0,qt.jsxs)(tH,{as:G_,fullWidth:!0,size:"small",id:"predefined_role",name:"predefined_role",variant:"outlined",endAdornment:(0,qt.jsx)(tw,{position:"end",sx:{position:"absolute",right:"28px"},children:(0,qt.jsx)(sy,{title:l("message:rpm_CustomRoleHelp"),placement:"top",children:(0,qt.jsx)(wh,{size:"small",disableRipple:!0,sx:{p:0},children:(0,qt.jsx)(pM.A,{fontSize:"small"})})})}),children:[(0,qt.jsx)(mf,{value:"None",disabled:!0,sx:{display:"none"},children:"None"}),null===s||void 0===s?void 0:s.map(e=>(0,qt.jsx)(mf,{value:e.id,children:e.name},e.id))]}),(0,qt.jsx)(dH,{name:"predefined_role",children:e=>(0,qt.jsx)(v_,{error:!0,children:l(e,{field:l("rpm_PredefinedRole")})})})]})]})});default:return null}};return(0,qt.jsx)(Kz,{initialValues:hs(GK,n),onSubmit:function(e,t){let{setErrors:n}=t;r(e,{setErrors:n})},enableReinitialize:!0,children:e=>{let{values:t}=e;return(0,qt.jsx)(nH,{children:(0,qt.jsx)(op,{sx:{mt:4},children:(0,qt.jsx)(Ff,{container:!0,justifyContent:"center",children:(0,qt.jsxs)(Ff,{item:!0,xs:12,md:7,lg:6,children:[c(),(0,qt.jsx)(op,{children:(0,qt.jsxs)(Ff,{container:!0,spacing:2,children:[(0,qt.jsx)(Ff,{item:!0,children:(0,qt.jsx)(xh,{color:"primary",variant:"outlined",onClick:i,children:l("rpm_Back")})}),(0,qt.jsx)(Ff,{item:!0,children:(0,qt.jsx)(xh,{type:"submit",color:"primary",variant:"contained",disableElevation:!0,disabled:"None"===t.system_role&&"None"===t.custom_role&&"None"===t.predefined_role,children:l("rpm_Next")})})]})})]})})})})}},"assignRole_formik")},YK=["form","options","field","label","nameKey","valueKey","optionId","onKeyssDown","InputProps","onClear","onValueChange","dependent","browserAutocomplete"],ZK=e=>{const{form:t,options:n,field:r,label:o,nameKey:a,valueKey:s,optionId:l,onKeyssDown:c,InputProps:d,onClear:u,onValueChange:p,dependent:h,browserAutocomplete:m}=e,f=Ko(e,YK),{name:g}=r,v=(0,We.useRef)(null),[x,y]=(0,We.useState)({}),b=()=>{y({}),u(),t.setFieldValue(g,"")};return(0,We.useEffect)(()=>{ta()(t.values[g])&&!h||y(n.find(e=>e[l]===t.values[g])||{})},[t.values[g],n]),(0,We.useEffect)(()=>{var e;const t=null===v||void 0===v||null===(e=v.current)||void 0===e?void 0:e.getElementsByClassName("MuiAutocomplete-clearIndicator")[0];if(t)return t.addEventListener("click",b),()=>{var e;const t=null===v||void 0===v||null===(e=v.current)||void 0===e?void 0:e.getElementsByClassName("MuiAutocomplete-clearIndicator")[0];t&&t.removeEventListener("click",b)}},[]),(0,qt.jsx)(aj,(0,i.A)((0,i.A)((0,i.A)({ref:v},e),r),{},{getOptionLabel:e=>e[a]||"",value:x,onInputChange:(e,n,r)=>{c(event,n,r,t)},onChange:(e,n,r)=>{if(!n)return t.setFieldValue(g,""),void("function"===typeof p&&p(null,null,r));t.setFieldValue(g,n[s]),"function"===typeof p&&p(null,n[s],r)},renderOption:(e,t)=>(0,We.createElement)(op,(0,i.A)((0,i.A)({component:"li"},e),{},{key:t[s]}),(0,qt.jsx)(op,{children:(0,qt.jsx)(Cf,{variant:"body1",component:"p",children:t[a]})})),renderInput:e=>{if(!m){e.inputProps.autoComplete="new-password"}return(0,qt.jsx)(Q_,(0,i.A)((0,i.A)({variant:f.variant,label:o},e),d))}}))};ZK.defaultProps={form:{},label:"",options:[],field:{},nameKey:"name",optionId:"id",valueKey:"",onKeyssDown:()=>{},onClear:()=>{},onValueChange:()=>{},dependent:!1,browserAutocomplete:!1,inputProps:{}};const KK=ZK,XK={from:1,to:250,perPage:"500",currentPage:1,lastPage:1,total:250,content:[{_id:"61540730b365960011d889f4",isoCode:"AF",name:"Afghanistan",flag:"\ud83c\udde6\ud83c\uddeb",currency:"AFN",countryIsoCode2:"AF",phoneCode:"+93",isoCode3:"AFG",fips:"AF",created:"2021-09-29T06:26:56.221Z",modified:"2021-09-29T06:26:58.374Z"},{_id:"61540730b365960011d889f5",isoCode:"AX",name:"Aland Islands",flag:"\ud83c\udde6\ud83c\uddfd",currency:"EUR",countryIsoCode2:"AX",phoneCode:"+358-18",isoCode3:"ALA",fips:"AX",created:"2021-09-29T06:26:56.228Z",modified:"2021-09-29T06:26:58.671Z"},{_id:"61540730b365960011d889f6",isoCode:"AL",name:"Albania",flag:"\ud83c\udde6\ud83c\uddf1",currency:"ALL",countryIsoCode2:"AL",phoneCode:"+355",isoCode3:"ALB",fips:"AL",created:"2021-09-29T06:26:56.229Z",modified:"2021-09-29T06:26:58.671Z"},{_id:"61540730b365960011d889f7",isoCode:"DZ",name:"Algeria",flag:"\ud83c\udde9\ud83c\uddff",currency:"DZD",countryIsoCode2:"DZ",phoneCode:"+213",isoCode3:"DZA",fips:"AG",created:"2021-09-29T06:26:56.229Z",modified:"2021-09-29T06:26:58.671Z"},{_id:"61540730b365960011d889f8",isoCode:"AS",name:"American Samoa",flag:"\ud83c\udde6\ud83c\uddf8",currency:"USD",countryIsoCode2:"AS",phoneCode:"+1-684",isoCode3:"ASM",fips:"AQ",created:"2021-09-29T06:26:56.230Z",modified:"2021-09-29T06:26:58.672Z"},{_id:"61540730b365960011d889f9",isoCode:"AD",name:"Andorra",flag:"\ud83c\udde6\ud83c\udde9",currency:"EUR",countryIsoCode2:"AD",phoneCode:"+376",isoCode3:"AND",fips:"AN",created:"2021-09-29T06:26:56.231Z",modified:"2021-09-29T06:26:58.672Z"},{_id:"61540730b365960011d889fa",isoCode:"AO",name:"Angola",flag:"\ud83c\udde6\ud83c\uddf4",currency:"AOA",countryIsoCode2:"AO",phoneCode:"+244",isoCode3:"AGO",fips:"AO",created:"2021-09-29T06:26:56.231Z",modified:"2021-09-29T06:26:58.672Z"},{_id:"61540730b365960011d889fb",isoCode:"AI",name:"Anguilla",flag:"\ud83c\udde6\ud83c\uddee",currency:"XCD",countryIsoCode2:"AI",phoneCode:"+1-264",isoCode3:"AIA",fips:"AV",created:"2021-09-29T06:26:56.232Z",modified:"2021-09-29T06:26:58.672Z"},{_id:"61540730b365960011d889fc",isoCode:"AQ",name:"Antarctica",flag:"\ud83c\udde6\ud83c\uddf6",currency:"AAD",countryIsoCode2:"AQ",phoneCode:"+672",isoCode3:"ATA",fips:"AY",created:"2021-09-29T06:26:56.232Z",modified:"2021-09-29T06:26:58.673Z"},{_id:"61540730b365960011d889fd",isoCode:"AG",name:"Antigua And Barbuda",flag:"\ud83c\udde6\ud83c\uddec",currency:"XCD",countryIsoCode2:"AG",phoneCode:"+1-268",isoCode3:"ATG",fips:"AC",created:"2021-09-29T06:26:56.233Z",modified:"2021-09-29T06:26:58.673Z"},{_id:"61540730b365960011d889fe",isoCode:"AR",name:"Argentina",flag:"\ud83c\udde6\ud83c\uddf7",currency:"ARS",countryIsoCode2:"AR",phoneCode:"+54",isoCode3:"ARG",fips:"AR",created:"2021-09-29T06:26:56.233Z",modified:"2021-09-29T06:26:58.673Z"},{_id:"61540730b365960011d889ff",isoCode:"AM",name:"Armenia",flag:"\ud83c\udde6\ud83c\uddf2",currency:"AMD",countryIsoCode2:"AM",phoneCode:"+374",isoCode3:"ARM",fips:"AM",created:"2021-09-29T06:26:56.234Z",modified:"2021-09-29T06:26:58.676Z"},{_id:"61540730b365960011d88a00",isoCode:"AW",name:"Aruba",flag:"\ud83c\udde6\ud83c\uddfc",currency:"AWG",countryIsoCode2:"AW",phoneCode:"+297",isoCode3:"ABW",fips:"AA",created:"2021-09-29T06:26:56.234Z",modified:"2021-09-29T06:26:58.677Z"},{_id:"61540730b365960011d88a01",isoCode:"AU",name:"Australia",flag:"\ud83c\udde6\ud83c\uddfa",currency:"AUD",countryIsoCode2:"AU",phoneCode:"+61",isoCode3:"AUS",fips:"AS",created:"2021-09-29T06:26:56.234Z",modified:"2021-09-29T06:26:58.677Z"},{_id:"61540730b365960011d88a02",isoCode:"AT",name:"Austria",flag:"\ud83c\udde6\ud83c\uddf9",currency:"EUR",countryIsoCode2:"AT",phoneCode:"+43",isoCode3:"AUT",fips:"AU",created:"2021-09-29T06:26:56.235Z",modified:"2021-09-29T06:26:58.677Z"},{_id:"61540730b365960011d88a03",isoCode:"AZ",name:"Azerbaijan",flag:"\ud83c\udde6\ud83c\uddff",currency:"AZN",countryIsoCode2:"AZ",phoneCode:"+994",isoCode3:"AZE",fips:"AJ",created:"2021-09-29T06:26:56.235Z",modified:"2021-09-29T06:26:58.677Z"},{_id:"61540730b365960011d88a04",isoCode:"BS",name:"Bahamas The",flag:"\ud83c\udde7\ud83c\uddf8",currency:"BSD",countryIsoCode2:"BS",phoneCode:"+1-242",isoCode3:"BHS",fips:"BF",created:"2021-09-29T06:26:56.235Z",modified:"2021-09-29T06:26:58.678Z"},{_id:"61540730b365960011d88a05",isoCode:"BH",name:"Bahrain",flag:"\ud83c\udde7\ud83c\udded",currency:"BHD",countryIsoCode2:"BH",phoneCode:"+973",isoCode3:"BHR",fips:"BA",created:"2021-09-29T06:26:56.236Z",modified:"2021-09-29T06:26:58.678Z"},{_id:"61540730b365960011d88a06",isoCode:"BD",name:"Bangladesh",flag:"\ud83c\udde7\ud83c\udde9",currency:"BDT",countryIsoCode2:"BD",phoneCode:"+880",isoCode3:"BGD",fips:"BG",created:"2021-09-29T06:26:56.236Z",modified:"2021-09-29T06:26:58.678Z"},{_id:"61540730b365960011d88a07",isoCode:"BB",name:"Barbados",flag:"\ud83c\udde7\ud83c\udde7",currency:"BBD",countryIsoCode2:"BB",phoneCode:"+1-246",isoCode3:"BRB",fips:"BB",created:"2021-09-29T06:26:56.237Z",modified:"2021-09-29T06:26:58.678Z"},{_id:"61540730b365960011d88a08",isoCode:"BY",name:"Belarus",flag:"\ud83c\udde7\ud83c\uddfe",currency:"BYN",countryIsoCode2:"BY",phoneCode:"+375",isoCode3:"BLR",fips:"BO",created:"2021-09-29T06:26:56.237Z",modified:"2021-09-29T06:26:58.678Z"},{_id:"61540730b365960011d88a09",isoCode:"BE",name:"Belgium",flag:"\ud83c\udde7\ud83c\uddea",currency:"EUR",countryIsoCode2:"BE",phoneCode:"+32",isoCode3:"BEL",fips:"BE",created:"2021-09-29T06:26:56.237Z",modified:"2021-09-29T06:26:58.681Z"},{_id:"61540730b365960011d88a0a",isoCode:"BZ",name:"Belize",flag:"\ud83c\udde7\ud83c\uddff",currency:"BZD",countryIsoCode2:"BZ",phoneCode:"+501",isoCode3:"BLZ",fips:"BH",created:"2021-09-29T06:26:56.238Z",modified:"2021-09-29T06:26:58.682Z"},{_id:"61540730b365960011d88a0b",isoCode:"BJ",name:"Benin",flag:"\ud83c\udde7\ud83c\uddef",currency:"XOF",countryIsoCode2:"BJ",phoneCode:"+229",isoCode3:"BEN",fips:"BN",created:"2021-09-29T06:26:56.238Z",modified:"2021-09-29T06:26:58.682Z"},{_id:"61540730b365960011d88a0c",isoCode:"BM",name:"Bermuda",flag:"\ud83c\udde7\ud83c\uddf2",currency:"BMD",countryIsoCode2:"BM",phoneCode:"+1-441",isoCode3:"BMU",fips:"BD",created:"2021-09-29T06:26:56.239Z",modified:"2021-09-29T06:26:58.682Z"},{_id:"61540730b365960011d88a0d",isoCode:"BT",name:"Bhutan",flag:"\ud83c\udde7\ud83c\uddf9",currency:"BTN",countryIsoCode2:"BT",phoneCode:"+975",isoCode3:"BTN",fips:"BT",created:"2021-09-29T06:26:56.239Z",modified:"2021-09-29T06:26:58.682Z"},{_id:"61540730b365960011d88a0e",isoCode:"BO",name:"Bolivia",flag:"\ud83c\udde7\ud83c\uddf4",currency:"BOB",countryIsoCode2:"BO",phoneCode:"+591",isoCode3:"BOL",fips:"BL",created:"2021-09-29T06:26:56.239Z",modified:"2021-09-29T06:26:58.683Z"},{_id:"61540730b365960011d88a8e",isoCode:"BQ",name:"Bonaire, Sint Eustatius and Saba",flag:"\ud83c\udde7\ud83c\uddf6",currency:"USD",countryIsoCode2:"BQ",phoneCode:"+599",isoCode3:"BES",fips:"BQ",created:"2021-09-29T06:26:56.304Z",modified:"2021-09-29T06:26:58.750Z"},{_id:"61540730b365960011d88a0f",isoCode:"BA",name:"Bosnia and Herzegovina",flag:"\ud83c\udde7\ud83c\udde6",currency:"BAM",countryIsoCode2:"BA",phoneCode:"+387",isoCode3:"BIH",fips:"BK",created:"2021-09-29T06:26:56.240Z",modified:"2021-09-29T06:26:58.683Z"},{_id:"61540730b365960011d88a10",isoCode:"BW",name:"Botswana",flag:"\ud83c\udde7\ud83c\uddfc",currency:"BWP",countryIsoCode2:"BW",phoneCode:"+267",isoCode3:"BWA",fips:"BC",created:"2021-09-29T06:26:56.240Z",modified:"2021-09-29T06:26:58.683Z"},{_id:"61540730b365960011d88a11",isoCode:"BV",name:"Bouvet Island",flag:"\ud83c\udde7\ud83c\uddfb",currency:"NOK",countryIsoCode2:"BV",phoneCode:"+0055",isoCode3:"BVT",fips:"BV",created:"2021-09-29T06:26:56.240Z",modified:"2021-09-29T06:26:58.683Z"},{_id:"61540730b365960011d88a12",isoCode:"BR",name:"Brazil",flag:"\ud83c\udde7\ud83c\uddf7",currency:"BRL",countryIsoCode2:"BR",phoneCode:"+55",isoCode3:"BRA",fips:"BR",created:"2021-09-29T06:26:56.241Z",modified:"2021-09-29T06:26:58.683Z"},{_id:"61540730b365960011d88a13",isoCode:"IO",name:"British Indian Ocean Territory",flag:"\ud83c\uddee\ud83c\uddf4",currency:"USD",countryIsoCode2:"IO",phoneCode:"+246",isoCode3:"IOT",fips:"IO",created:"2021-09-29T06:26:56.241Z",modified:"2021-09-29T06:26:58.687Z"},{_id:"61540730b365960011d88a14",isoCode:"BN",name:"Brunei",flag:"\ud83c\udde7\ud83c\uddf3",currency:"BND",countryIsoCode2:"BN",phoneCode:"+673",isoCode3:"BRN",fips:"BX",created:"2021-09-29T06:26:56.242Z",modified:"2021-09-29T06:26:58.687Z"},{_id:"61540730b365960011d88a15",isoCode:"BG",name:"Bulgaria",flag:"\ud83c\udde7\ud83c\uddec",currency:"BGN",countryIsoCode2:"BG",phoneCode:"+359",isoCode3:"BGR",fips:"BU",created:"2021-09-29T06:26:56.242Z",modified:"2021-09-29T06:26:58.687Z"},{_id:"61540730b365960011d88a16",isoCode:"BF",name:"Burkina Faso",flag:"\ud83c\udde7\ud83c\uddeb",currency:"XOF",countryIsoCode2:"BF",phoneCode:"+226",isoCode3:"BFA",fips:"UV",created:"2021-09-29T06:26:56.242Z",modified:"2021-09-29T06:26:58.687Z"},{_id:"61540730b365960011d88a17",isoCode:"BI",name:"Burundi",flag:"\ud83c\udde7\ud83c\uddee",currency:"BIF",countryIsoCode2:"BI",phoneCode:"+257",isoCode3:"BDI",fips:"BY",created:"2021-09-29T06:26:56.243Z",modified:"2021-09-29T06:26:58.688Z"},{_id:"61540730b365960011d88a18",isoCode:"KH",name:"Cambodia",flag:"\ud83c\uddf0\ud83c\udded",currency:"KHR",countryIsoCode2:"KH",phoneCode:"+855",isoCode3:"KHM",fips:"CB",created:"2021-09-29T06:26:56.243Z",modified:"2021-09-29T06:26:58.688Z"},{_id:"61540730b365960011d88a19",isoCode:"CM",name:"Cameroon",flag:"\ud83c\udde8\ud83c\uddf2",currency:"XAF",countryIsoCode2:"CM",phoneCode:"+237",isoCode3:"CMR",fips:"CM",created:"2021-09-29T06:26:56.243Z",modified:"2021-09-29T06:26:58.688Z"},{_id:"61540730b365960011d88a1a",isoCode:"CA",name:"Canada",flag:"\ud83c\udde8\ud83c\udde6",currency:"CAD",countryIsoCode2:"CA",phoneCode:"+1",isoCode3:"CAN",fips:"CA",created:"2021-09-29T06:26:56.244Z",modified:"2021-09-29T06:26:58.688Z"},{_id:"61540730b365960011d88a1b",isoCode:"CV",name:"Cape Verde",flag:"\ud83c\udde8\ud83c\uddfb",currency:"CVE",countryIsoCode2:"CV",phoneCode:"+238",isoCode3:"CPV",fips:"CV",created:"2021-09-29T06:26:56.244Z",modified:"2021-09-29T06:26:58.688Z"},{_id:"61540730b365960011d88a1c",isoCode:"KY",name:"Cayman Islands",flag:"\ud83c\uddf0\ud83c\uddfe",currency:"KYD",countryIsoCode2:"KY",phoneCode:"+1-345",isoCode3:"CYM",fips:"CJ",created:"2021-09-29T06:26:56.245Z",modified:"2021-09-29T06:26:58.689Z"},{_id:"61540730b365960011d88a1d",isoCode:"CF",name:"Central African Republic",flag:"\ud83c\udde8\ud83c\uddeb",currency:"XAF",countryIsoCode2:"CF",phoneCode:"+236",isoCode3:"CAF",fips:"CT",created:"2021-09-29T06:26:56.245Z",modified:"2021-09-29T06:26:58.691Z"},{_id:"61540730b365960011d88a1e",isoCode:"TD",name:"Chad",flag:"\ud83c\uddf9\ud83c\udde9",currency:"XAF",countryIsoCode2:"TD",phoneCode:"+235",isoCode3:"TCD",fips:"CD",created:"2021-09-29T06:26:56.245Z",modified:"2021-09-29T06:26:58.692Z"},{_id:"61540730b365960011d88a1f",isoCode:"CL",name:"Chile",flag:"\ud83c\udde8\ud83c\uddf1",currency:"CLP",countryIsoCode2:"CL",phoneCode:"+56",isoCode3:"CHL",fips:"CI",created:"2021-09-29T06:26:56.246Z",modified:"2021-09-29T06:26:58.692Z"},{_id:"61540730b365960011d88a20",isoCode:"CN",name:"China",flag:"\ud83c\udde8\ud83c\uddf3",currency:"CNY",countryIsoCode2:"CN",phoneCode:"+86",isoCode3:"CHN",fips:"CH",created:"2021-09-29T06:26:56.246Z",modified:"2021-09-29T06:26:58.692Z"},{_id:"61540730b365960011d88a21",isoCode:"CX",name:"Christmas Island",flag:"\ud83c\udde8\ud83c\uddfd",currency:"AUD",countryIsoCode2:"CX",phoneCode:"+61",isoCode3:"CXR",fips:"KT",created:"2021-09-29T06:26:56.246Z",modified:"2021-09-29T06:26:58.692Z"},{_id:"61540730b365960011d88a22",isoCode:"CC",name:"Cocos (Keeling) Islands",flag:"\ud83c\udde8\ud83c\udde8",currency:"AUD",countryIsoCode2:"CC",phoneCode:"+61",isoCode3:"CCK",fips:"CK",created:"2021-09-29T06:26:56.247Z",modified:"2021-09-29T06:26:58.693Z"},{_id:"61540730b365960011d88a23",isoCode:"CO",name:"Colombia",flag:"\ud83c\udde8\ud83c\uddf4",currency:"COP",countryIsoCode2:"CO",phoneCode:"+57",isoCode3:"COL",fips:"CO",created:"2021-09-29T06:26:56.247Z",modified:"2021-09-29T06:26:58.693Z"},{_id:"61540730b365960011d88a24",isoCode:"KM",name:"Comoros",flag:"\ud83c\uddf0\ud83c\uddf2",currency:"KMF",countryIsoCode2:"KM",phoneCode:"+269",isoCode3:"COM",fips:"CN",created:"2021-09-29T06:26:56.248Z",modified:"2021-09-29T06:26:58.693Z"},{_id:"61540730b365960011d88a25",isoCode:"CG",name:"Congo",flag:"\ud83c\udde8\ud83c\uddec",currency:"XAF",countryIsoCode2:"CG",phoneCode:"+242",isoCode3:"COG",fips:"CF",created:"2021-09-29T06:26:56.248Z",modified:"2021-09-29T06:26:58.693Z"},{_id:"61540730b365960011d88a26",isoCode:"CD",name:"Congo The Democratic Republic Of The",flag:"\ud83c\udde8\ud83c\udde9",currency:"CDF",countryIsoCode2:"CD",phoneCode:"+243",isoCode3:"COD",fips:"CG",created:"2021-09-29T06:26:56.248Z",modified:"2021-09-29T06:26:58.693Z"},{_id:"61540730b365960011d88a27",isoCode:"CK",name:"Cook Islands",flag:"\ud83c\udde8\ud83c\uddf0",currency:"NZD",countryIsoCode2:"CK",phoneCode:"+682",isoCode3:"COK",fips:"CW",created:"2021-09-29T06:26:56.249Z",modified:"2021-09-29T06:26:58.697Z"},{_id:"61540730b365960011d88a28",isoCode:"CR",name:"Costa Rica",flag:"\ud83c\udde8\ud83c\uddf7",currency:"CRC",countryIsoCode2:"CR",phoneCode:"+506",isoCode3:"CRI",fips:"CS",created:"2021-09-29T06:26:56.249Z",modified:"2021-09-29T06:26:58.697Z"},{_id:"61540730b365960011d88a29",isoCode:"CI",name:"Cote D'Ivoire (Ivory Coast)",flag:"\ud83c\udde8\ud83c\uddee",currency:"XOF",countryIsoCode2:"CI",phoneCode:"+225",isoCode3:"CIV",fips:"IV",created:"2021-09-29T06:26:56.249Z",modified:"2021-09-29T06:26:58.697Z"},{_id:"61540730b365960011d88a2a",isoCode:"HR",name:"Croatia (Hrvatska)",flag:"\ud83c\udded\ud83c\uddf7",currency:"HRK",countryIsoCode2:"HR",phoneCode:"+385",isoCode3:"HRV",fips:"HR",created:"2021-09-29T06:26:56.250Z",modified:"2021-09-29T06:26:58.697Z"},{_id:"61540730b365960011d88a2b",isoCode:"CU",name:"Cuba",flag:"\ud83c\udde8\ud83c\uddfa",currency:"CUP",countryIsoCode2:"CU",phoneCode:"+53",isoCode3:"CUB",fips:"CU",created:"2021-09-29T06:26:56.250Z",modified:"2021-09-29T06:26:58.697Z"},{_id:"61540730b365960011d88aec",isoCode:"CW",name:"Cura\xe7ao",flag:"\ud83c\udde8\ud83c\uddfc",currency:"ANG",countryIsoCode2:"CW",phoneCode:"+599",isoCode3:"CUW",fips:"UC",created:"2021-09-29T06:26:56.341Z",modified:"2021-09-29T06:26:58.795Z"},{_id:"61540730b365960011d88a2c",isoCode:"CY",name:"Cyprus",flag:"\ud83c\udde8\ud83c\uddfe",currency:"EUR",countryIsoCode2:"CY",phoneCode:"+357",isoCode3:"CYP",fips:"CY",created:"2021-09-29T06:26:56.250Z",modified:"2021-09-29T06:26:58.698Z"},{_id:"61540730b365960011d88a2d",isoCode:"CZ",name:"Czech Republic",flag:"\ud83c\udde8\ud83c\uddff",currency:"CZK",countryIsoCode2:"CZ",phoneCode:"+420",isoCode3:"CZE",fips:"EZ",created:"2021-09-29T06:26:56.251Z",modified:"2021-09-29T06:26:58.698Z"},{_id:"61540730b365960011d88a2e",isoCode:"DK",name:"Denmark",flag:"\ud83c\udde9\ud83c\uddf0",currency:"DKK",countryIsoCode2:"DK",phoneCode:"+45",isoCode3:"DNK",fips:"DA",created:"2021-09-29T06:26:56.251Z",modified:"2021-09-29T06:26:58.698Z"},{_id:"61540730b365960011d88a2f",isoCode:"DJ",name:"Djibouti",flag:"\ud83c\udde9\ud83c\uddef",currency:"DJF",countryIsoCode2:"DJ",phoneCode:"+253",isoCode3:"DJI",fips:"DJ",created:"2021-09-29T06:26:56.263Z",modified:"2021-09-29T06:26:58.698Z"},{_id:"61540730b365960011d88a30",isoCode:"DM",name:"Dominica",flag:"\ud83c\udde9\ud83c\uddf2",currency:"XCD",countryIsoCode2:"DM",phoneCode:"+1-767",isoCode3:"DMA",fips:"DO",created:"2021-09-29T06:26:56.263Z",modified:"2021-09-29T06:26:58.698Z"},{_id:"61540730b365960011d88a31",isoCode:"DO",name:"Dominican Republic",flag:"\ud83c\udde9\ud83c\uddf4",currency:"DOP",countryIsoCode2:"DO",phoneCode:"+1-809 and 1-829",isoCode3:"DOM",fips:"DR",created:"2021-09-29T06:26:56.264Z",modified:"2021-09-29T06:26:58.701Z"},{_id:"61540730b365960011d88a32",isoCode:"TL",name:"East Timor",flag:"\ud83c\uddf9\ud83c\uddf1",currency:"USD",countryIsoCode2:"TL",phoneCode:"+670",isoCode3:"TLS",fips:"TT",created:"2021-09-29T06:26:56.264Z",modified:"2021-09-29T06:26:58.702Z"},{_id:"61540730b365960011d88a33",isoCode:"EC",name:"Ecuador",flag:"\ud83c\uddea\ud83c\udde8",currency:"USD",countryIsoCode2:"EC",phoneCode:"+593",isoCode3:"ECU",fips:"EC",created:"2021-09-29T06:26:56.265Z",modified:"2021-09-29T06:26:58.702Z"},{_id:"61540730b365960011d88a34",isoCode:"EG",name:"Egypt",flag:"\ud83c\uddea\ud83c\uddec",currency:"EGP",countryIsoCode2:"EG",phoneCode:"+20",isoCode3:"EGY",fips:"EG",created:"2021-09-29T06:26:56.265Z",modified:"2021-09-29T06:26:58.702Z"},{_id:"61540730b365960011d88a35",isoCode:"SV",name:"El Salvador",flag:"\ud83c\uddf8\ud83c\uddfb",currency:"USD",countryIsoCode2:"SV",phoneCode:"+503",isoCode3:"SLV",fips:"ES",created:"2021-09-29T06:26:56.265Z",modified:"2021-09-29T06:26:58.703Z"},{_id:"61540730b365960011d88a36",isoCode:"GQ",name:"Equatorial Guinea",flag:"\ud83c\uddec\ud83c\uddf6",currency:"XAF",countryIsoCode2:"GQ",phoneCode:"+240",isoCode3:"GNQ",fips:"EK",created:"2021-09-29T06:26:56.266Z",modified:"2021-09-29T06:26:58.703Z"},{_id:"61540730b365960011d88a37",isoCode:"ER",name:"Eritrea",flag:"\ud83c\uddea\ud83c\uddf7",currency:"ERN",countryIsoCode2:"ER",phoneCode:"+291",isoCode3:"ERI",fips:"ER",created:"2021-09-29T06:26:56.266Z",modified:"2021-09-29T06:26:58.703Z"},{_id:"61540730b365960011d88a38",isoCode:"EE",name:"Estonia",flag:"\ud83c\uddea\ud83c\uddea",currency:"EUR",countryIsoCode2:"EE",phoneCode:"+372",isoCode3:"EST",fips:"EN",created:"2021-09-29T06:26:56.266Z",modified:"2021-09-29T06:26:58.704Z"},{_id:"61540730b365960011d88a39",isoCode:"ET",name:"Ethiopia",flag:"\ud83c\uddea\ud83c\uddf9",currency:"ETB",countryIsoCode2:"ET",phoneCode:"+251",isoCode3:"ETH",fips:"ET",created:"2021-09-29T06:26:56.267Z",modified:"2021-09-29T06:26:58.704Z"},{_id:"61540730b365960011d88a3a",isoCode:"FK",name:"Falkland Islands",flag:"\ud83c\uddeb\ud83c\uddf0",currency:"FKP",countryIsoCode2:"FK",phoneCode:"+500",isoCode3:"FLK",fips:"FA",created:"2021-09-29T06:26:56.267Z",modified:"2021-09-29T06:26:58.704Z"},{_id:"61540730b365960011d88a3b",isoCode:"FO",name:"Faroe Islands",flag:"\ud83c\uddeb\ud83c\uddf4",currency:"DKK",countryIsoCode2:"FO",phoneCode:"+298",isoCode3:"FRO",fips:"FO",created:"2021-09-29T06:26:56.267Z",modified:"2021-09-29T06:26:58.708Z"},{_id:"61540730b365960011d88a3c",isoCode:"FJ",name:"Fiji Islands",flag:"\ud83c\uddeb\ud83c\uddef",currency:"FJD",countryIsoCode2:"FJ",phoneCode:"+679",isoCode3:"FJI",fips:"FJ",created:"2021-09-29T06:26:56.268Z",modified:"2021-09-29T06:26:58.708Z"},{_id:"61540730b365960011d88a3d",isoCode:"FI",name:"Finland",flag:"\ud83c\uddeb\ud83c\uddee",currency:"EUR",countryIsoCode2:"FI",phoneCode:"+358",isoCode3:"FIN",fips:"FI",created:"2021-09-29T06:26:56.268Z",modified:"2021-09-29T06:26:58.708Z"},{_id:"61540730b365960011d88a3e",isoCode:"FR",name:"France",flag:"\ud83c\uddeb\ud83c\uddf7",currency:"EUR",countryIsoCode2:"FR",phoneCode:"+33",isoCode3:"FRA",fips:"FR",created:"2021-09-29T06:26:56.270Z",modified:"2021-09-29T06:26:58.708Z"},{_id:"61540730b365960011d88a3f",isoCode:"GF",name:"French Guiana",flag:"\ud83c\uddec\ud83c\uddeb",currency:"EUR",countryIsoCode2:"GF",phoneCode:"+594",isoCode3:"GUF",fips:"FG",created:"2021-09-29T06:26:56.271Z",modified:"2021-09-29T06:26:58.708Z"},{_id:"61540730b365960011d88a40",isoCode:"PF",name:"French Polynesia",flag:"\ud83c\uddf5\ud83c\uddeb",currency:"XPF",countryIsoCode2:"PF",phoneCode:"+689",isoCode3:"PYF",fips:"FP",created:"2021-09-29T06:26:56.271Z",modified:"2021-09-29T06:26:58.709Z"},{_id:"61540730b365960011d88a41",isoCode:"TF",name:"French Southern Territories",flag:"\ud83c\uddf9\ud83c\uddeb",currency:"EUR",countryIsoCode2:"TF",phoneCode:"+262",isoCode3:"ATF",fips:"FS",created:"2021-09-29T06:26:56.272Z",modified:"2021-09-29T06:26:58.709Z"},{_id:"61540730b365960011d88a42",isoCode:"GA",name:"Gabon",flag:"\ud83c\uddec\ud83c\udde6",currency:"XAF",countryIsoCode2:"GA",phoneCode:"+241",isoCode3:"GAB",fips:"GB",created:"2021-09-29T06:26:56.272Z",modified:"2021-09-29T06:26:58.709Z"},{_id:"61540730b365960011d88a43",isoCode:"GM",name:"Gambia The",flag:"\ud83c\uddec\ud83c\uddf2",currency:"GMD",countryIsoCode2:"GM",phoneCode:"+220",isoCode3:"GMB",fips:"GA",created:"2021-09-29T06:26:56.273Z",modified:"2021-09-29T06:26:58.709Z"},{_id:"61540730b365960011d88a44",isoCode:"GE",name:"Georgia",flag:"\ud83c\uddec\ud83c\uddea",currency:"GEL",countryIsoCode2:"GE",phoneCode:"+995",isoCode3:"GEO",fips:"GG",created:"2021-09-29T06:26:56.273Z",modified:"2021-09-29T06:26:58.709Z"},{_id:"61540730b365960011d88a45",isoCode:"DE",name:"Germany",flag:"\ud83c\udde9\ud83c\uddea",currency:"EUR",countryIsoCode2:"DE",phoneCode:"+49",isoCode3:"DEU",fips:"GM",created:"2021-09-29T06:26:56.273Z",modified:"2021-09-29T06:26:58.712Z"},{_id:"61540730b365960011d88a46",isoCode:"GH",name:"Ghana",flag:"\ud83c\uddec\ud83c\udded",currency:"GHS",countryIsoCode2:"GH",phoneCode:"+233",isoCode3:"GHA",fips:"GH",created:"2021-09-29T06:26:56.274Z",modified:"2021-09-29T06:26:58.713Z"},{_id:"61540730b365960011d88a47",isoCode:"GI",name:"Gibraltar",flag:"\ud83c\uddec\ud83c\uddee",currency:"GIP",countryIsoCode2:"GI",phoneCode:"+350",isoCode3:"GIB",fips:"GI",created:"2021-09-29T06:26:56.274Z",modified:"2021-09-29T06:26:58.713Z"},{_id:"61540730b365960011d88a48",isoCode:"GR",name:"Greece",flag:"\ud83c\uddec\ud83c\uddf7",currency:"EUR",countryIsoCode2:"GR",phoneCode:"+30",isoCode3:"GRC",fips:"GR",created:"2021-09-29T06:26:56.274Z",modified:"2021-09-29T06:26:58.713Z"},{_id:"61540730b365960011d88a49",isoCode:"GL",name:"Greenland",flag:"\ud83c\uddec\ud83c\uddf1",currency:"DKK",countryIsoCode2:"GL",phoneCode:"+299",isoCode3:"GRL",fips:"GL",created:"2021-09-29T06:26:56.275Z",modified:"2021-09-29T06:26:58.713Z"},{_id:"61540730b365960011d88a4a",isoCode:"GD",name:"Grenada",flag:"\ud83c\uddec\ud83c\udde9",currency:"XCD",countryIsoCode2:"GD",phoneCode:"+1-473",isoCode3:"GRD",fips:"GJ",created:"2021-09-29T06:26:56.275Z",modified:"2021-09-29T06:26:58.714Z"},{_id:"61540730b365960011d88a4b",isoCode:"GP",name:"Guadeloupe",flag:"\ud83c\uddec\ud83c\uddf5",currency:"EUR",countryIsoCode2:"GP",phoneCode:"+590",isoCode3:"GLP",fips:"GP",created:"2021-09-29T06:26:56.276Z",modified:"2021-09-29T06:26:58.714Z"},{_id:"61540730b365960011d88a4c",isoCode:"GU",name:"Guam",flag:"\ud83c\uddec\ud83c\uddfa",currency:"USD",countryIsoCode2:"GU",phoneCode:"+1-671",isoCode3:"GUM",fips:"GQ",created:"2021-09-29T06:26:56.276Z",modified:"2021-09-29T06:26:58.714Z"},{_id:"61540730b365960011d88a4d",isoCode:"GT",name:"Guatemala",flag:"\ud83c\uddec\ud83c\uddf9",currency:"GTQ",countryIsoCode2:"GT",phoneCode:"+502",isoCode3:"GTM",fips:"GT",created:"2021-09-29T06:26:56.277Z",modified:"2021-09-29T06:26:58.714Z"},{_id:"61540730b365960011d88a4e",isoCode:"GG",name:"Guernsey and Alderney",flag:"\ud83c\uddec\ud83c\uddec",currency:"GBP",countryIsoCode2:"GG",phoneCode:"+44-1481",isoCode3:"GGY",fips:"GK",created:"2021-09-29T06:26:56.277Z",modified:"2021-09-29T06:26:58.714Z"},{_id:"61540730b365960011d88a4f",isoCode:"GN",name:"Guinea",flag:"\ud83c\uddec\ud83c\uddf3",currency:"GNF",countryIsoCode2:"GN",phoneCode:"+224",isoCode3:"GIN",fips:"GV",created:"2021-09-29T06:26:56.277Z",modified:"2021-09-29T06:26:58.718Z"},{_id:"61540730b365960011d88a50",isoCode:"GW",name:"Guinea-Bissau",flag:"\ud83c\uddec\ud83c\uddfc",currency:"XOF",countryIsoCode2:"GW",phoneCode:"+245",isoCode3:"GNB",fips:"PU",created:"2021-09-29T06:26:56.278Z",modified:"2021-09-29T06:26:58.718Z"},{_id:"61540730b365960011d88a51",isoCode:"GY",name:"Guyana",flag:"\ud83c\uddec\ud83c\uddfe",currency:"GYD",countryIsoCode2:"GY",phoneCode:"+592",isoCode3:"GUY",fips:"GY",created:"2021-09-29T06:26:56.278Z",modified:"2021-09-29T06:26:58.718Z"},{_id:"61540730b365960011d88a52",isoCode:"HT",name:"Haiti",flag:"\ud83c\udded\ud83c\uddf9",currency:"HTG",countryIsoCode2:"HT",phoneCode:"+509",isoCode3:"HTI",fips:"HA",created:"2021-09-29T06:26:56.279Z",modified:"2021-09-29T06:26:58.718Z"},{_id:"61540730b365960011d88a53",isoCode:"HM",name:"Heard Island and McDonald Islands",flag:"\ud83c\udded\ud83c\uddf2",currency:"AUD",countryIsoCode2:"HM",phoneCode:"+672",isoCode3:"HMD",fips:"HM",created:"2021-09-29T06:26:56.279Z",modified:"2021-09-29T06:26:58.718Z"},{_id:"61540730b365960011d88a54",isoCode:"HN",name:"Honduras",flag:"\ud83c\udded\ud83c\uddf3",currency:"HNL",countryIsoCode2:"HN",phoneCode:"+504",isoCode3:"HND",fips:"HO",created:"2021-09-29T06:26:56.279Z",modified:"2021-09-29T06:26:58.719Z"},{_id:"61540730b365960011d88a55",isoCode:"HK",name:"Hong Kong S.A.R.",flag:"\ud83c\udded\ud83c\uddf0",currency:"HKD",countryIsoCode2:"HK",phoneCode:"+852",isoCode3:"HKG",fips:"HK",created:"2021-09-29T06:26:56.280Z",modified:"2021-09-29T06:26:58.719Z"},{_id:"61540730b365960011d88a56",isoCode:"HU",name:"Hungary",flag:"\ud83c\udded\ud83c\uddfa",currency:"HUF",countryIsoCode2:"HU",phoneCode:"+36",isoCode3:"HUN",fips:"HU",created:"2021-09-29T06:26:56.280Z",modified:"2021-09-29T06:26:58.719Z"},{_id:"61540730b365960011d88a57",isoCode:"IS",name:"Iceland",flag:"\ud83c\uddee\ud83c\uddf8",currency:"ISK",countryIsoCode2:"IS",phoneCode:"+354",isoCode3:"ISL",fips:"IC",created:"2021-09-29T06:26:56.280Z",modified:"2021-09-29T06:26:58.719Z"},{_id:"61540730b365960011d88a58",isoCode:"IN",name:"India",flag:"\ud83c\uddee\ud83c\uddf3",currency:"INR",countryIsoCode2:"IN",phoneCode:"+91",isoCode3:"IND",fips:"IN",created:"2021-09-29T06:26:56.281Z",modified:"2021-09-29T06:26:58.719Z"},{_id:"61540730b365960011d88a59",isoCode:"ID",name:"Indonesia",flag:"\ud83c\uddee\ud83c\udde9",currency:"IDR",countryIsoCode2:"ID",phoneCode:"+62",isoCode3:"IDN",fips:"ID",created:"2021-09-29T06:26:56.281Z",modified:"2021-09-29T06:26:58.722Z"},{_id:"61540730b365960011d88a5a",isoCode:"IR",name:"Iran",flag:"\ud83c\uddee\ud83c\uddf7",currency:"IRR",countryIsoCode2:"IR",phoneCode:"+98",isoCode3:"IRN",fips:"IR",created:"2021-09-29T06:26:56.282Z",modified:"2021-09-29T06:26:58.723Z"},{_id:"61540730b365960011d88a5b",isoCode:"IQ",name:"Iraq",flag:"\ud83c\uddee\ud83c\uddf6",currency:"IQD",countryIsoCode2:"IQ",phoneCode:"+964",isoCode3:"IRQ",fips:"IZ",created:"2021-09-29T06:26:56.282Z",modified:"2021-09-29T06:26:58.723Z"},{_id:"61540730b365960011d88a5c",isoCode:"IE",name:"Ireland",flag:"\ud83c\uddee\ud83c\uddea",currency:"EUR",countryIsoCode2:"IE",phoneCode:"+353",isoCode3:"IRL",fips:"EI",created:"2021-09-29T06:26:56.282Z",modified:"2021-09-29T06:26:58.723Z"},{_id:"61540730b365960011d88a5d",isoCode:"IL",name:"Israel",flag:"\ud83c\uddee\ud83c\uddf1",currency:"ILS",countryIsoCode2:"IL",phoneCode:"+972",isoCode3:"ISR",fips:"IS",created:"2021-09-29T06:26:56.283Z",modified:"2021-09-29T06:26:58.723Z"},{_id:"61540730b365960011d88a5e",isoCode:"IT",name:"Italy",flag:"\ud83c\uddee\ud83c\uddf9",currency:"EUR",countryIsoCode2:"IT",phoneCode:"+39",isoCode3:"ITA",fips:"IT",created:"2021-09-29T06:26:56.283Z",modified:"2021-09-29T06:26:58.723Z"},{_id:"61540730b365960011d88a5f",isoCode:"JM",name:"Jamaica",flag:"\ud83c\uddef\ud83c\uddf2",currency:"JMD",countryIsoCode2:"JM",phoneCode:"+1-876",isoCode3:"JAM",fips:"JM",created:"2021-09-29T06:26:56.283Z",modified:"2021-09-29T06:26:58.723Z"},{_id:"61540730b365960011d88a60",isoCode:"JP",name:"Japan",flag:"\ud83c\uddef\ud83c\uddf5",currency:"JPY",countryIsoCode2:"JP",phoneCode:"+81",isoCode3:"JPN",fips:"JA",created:"2021-09-29T06:26:56.284Z",modified:"2021-09-29T06:26:58.724Z"},{_id:"61540730b365960011d88a61",isoCode:"JE",name:"Jersey",flag:"\ud83c\uddef\ud83c\uddea",currency:"GBP",countryIsoCode2:"JE",phoneCode:"+44-1534",isoCode3:"JEY",fips:"JE",created:"2021-09-29T06:26:56.284Z",modified:"2021-09-29T06:26:58.724Z"},{_id:"61540730b365960011d88a62",isoCode:"JO",name:"Jordan",flag:"\ud83c\uddef\ud83c\uddf4",currency:"JOD",countryIsoCode2:"JO",phoneCode:"+962",isoCode3:"JOR",fips:"JO",created:"2021-09-29T06:26:56.285Z",modified:"2021-09-29T06:26:58.724Z"},{_id:"61540730b365960011d88a63",isoCode:"KZ",name:"Kazakhstan",flag:"\ud83c\uddf0\ud83c\uddff",currency:"KZT",countryIsoCode2:"KZ",phoneCode:"+7",isoCode3:"KAZ",fips:"KZ",created:"2021-09-29T06:26:56.285Z",modified:"2021-09-29T06:26:58.728Z"},{_id:"61540730b365960011d88a64",isoCode:"KE",name:"Kenya",flag:"\ud83c\uddf0\ud83c\uddea",currency:"KES",countryIsoCode2:"KE",phoneCode:"+254",isoCode3:"KEN",fips:"KE",created:"2021-09-29T06:26:56.285Z",modified:"2021-09-29T06:26:58.728Z"},{_id:"61540730b365960011d88a65",isoCode:"KI",name:"Kiribati",flag:"\ud83c\uddf0\ud83c\uddee",currency:"AUD",countryIsoCode2:"KI",phoneCode:"+686",isoCode3:"KIR",fips:"KR",created:"2021-09-29T06:26:56.286Z",modified:"2021-09-29T06:26:58.728Z"},{_id:"61540730b365960011d88a66",isoCode:"KP",name:"Korea North",flag:"\ud83c\uddf0\ud83c\uddf5",currency:"KPW",countryIsoCode2:"KP",phoneCode:"+850",isoCode3:"PRK",fips:"KN",created:"2021-09-29T06:26:56.286Z",modified:"2021-09-29T06:26:58.728Z"},{_id:"61540730b365960011d88a67",isoCode:"KR",name:"Korea South",flag:"\ud83c\uddf0\ud83c\uddf7",currency:"KRW",countryIsoCode2:"KR",phoneCode:"+82",isoCode3:"KOR",fips:"KS",created:"2021-09-29T06:26:56.286Z",modified:"2021-09-29T06:26:58.728Z"},{_id:"61540730b365960011d88aeb",isoCode:"XK",name:"Kosovo",flag:"\ud83c\uddfd\ud83c\uddf0",currency:"EUR",countryIsoCode2:"XK",phoneCode:"+383",isoCode3:"UNK",fips:"XK",created:"2021-09-29T06:26:56.341Z",modified:"2021-09-29T06:26:58.795Z"},{_id:"61540730b365960011d88a68",isoCode:"KW",name:"Kuwait",flag:"\ud83c\uddf0\ud83c\uddfc",currency:"KWD",countryIsoCode2:"KW",phoneCode:"+965",isoCode3:"KWT",fips:"KU",created:"2021-09-29T06:26:56.287Z",modified:"2021-09-29T06:26:58.729Z"},{_id:"61540730b365960011d88a69",isoCode:"KG",name:"Kyrgyzstan",flag:"\ud83c\uddf0\ud83c\uddec",currency:"KGS",countryIsoCode2:"KG",phoneCode:"+996",isoCode3:"KGZ",fips:"KG",created:"2021-09-29T06:26:56.287Z",modified:"2021-09-29T06:26:58.729Z"},{_id:"61540730b365960011d88a6a",isoCode:"LA",name:"Laos",flag:"\ud83c\uddf1\ud83c\udde6",currency:"LAK",countryIsoCode2:"LA",phoneCode:"+856",isoCode3:"LAO",fips:"LA",created:"2021-09-29T06:26:56.288Z",modified:"2021-09-29T06:26:58.729Z"},{_id:"61540730b365960011d88a6b",isoCode:"LV",name:"Latvia",flag:"\ud83c\uddf1\ud83c\uddfb",currency:"EUR",countryIsoCode2:"LV",phoneCode:"+371",isoCode3:"LVA",fips:"LG",created:"2021-09-29T06:26:56.288Z",modified:"2021-09-29T06:26:58.729Z"},{_id:"61540730b365960011d88a6c",isoCode:"LB",name:"Lebanon",flag:"\ud83c\uddf1\ud83c\udde7",currency:"LBP",countryIsoCode2:"LB",phoneCode:"+961",isoCode3:"LBN",fips:"LE",created:"2021-09-29T06:26:56.288Z",modified:"2021-09-29T06:26:58.729Z"},{_id:"61540730b365960011d88a6d",isoCode:"LS",name:"Lesotho",flag:"\ud83c\uddf1\ud83c\uddf8",currency:"LSL",countryIsoCode2:"LS",phoneCode:"+266",isoCode3:"LSO",fips:"LT",created:"2021-09-29T06:26:56.289Z",modified:"2021-09-29T06:26:58.732Z"},{_id:"61540730b365960011d88a6e",isoCode:"LR",name:"Liberia",flag:"\ud83c\uddf1\ud83c\uddf7",currency:"LRD",countryIsoCode2:"LR",phoneCode:"+231",isoCode3:"LBR",fips:"LI",created:"2021-09-29T06:26:56.289Z",modified:"2021-09-29T06:26:58.733Z"},{_id:"61540730b365960011d88a6f",isoCode:"LY",name:"Libya",flag:"\ud83c\uddf1\ud83c\uddfe",currency:"LYD",countryIsoCode2:"LY",phoneCode:"+218",isoCode3:"LBY",fips:"LY",created:"2021-09-29T06:26:56.289Z",modified:"2021-09-29T06:26:58.733Z"},{_id:"61540730b365960011d88a70",isoCode:"LI",name:"Liechtenstein",flag:"\ud83c\uddf1\ud83c\uddee",currency:"CHF",countryIsoCode2:"LI",phoneCode:"+423",isoCode3:"LIE",fips:"LS",created:"2021-09-29T06:26:56.290Z",modified:"2021-09-29T06:26:58.733Z"},{_id:"61540730b365960011d88a71",isoCode:"LT",name:"Lithuania",flag:"\ud83c\uddf1\ud83c\uddf9",currency:"EUR",countryIsoCode2:"LT",phoneCode:"+370",isoCode3:"LTU",fips:"LH",created:"2021-09-29T06:26:56.290Z",modified:"2021-09-29T06:26:58.733Z"},{_id:"61540730b365960011d88a72",isoCode:"LU",name:"Luxembourg",flag:"\ud83c\uddf1\ud83c\uddfa",currency:"EUR",countryIsoCode2:"LU",phoneCode:"+352",isoCode3:"LUX",fips:"LU",created:"2021-09-29T06:26:56.290Z",modified:"2021-09-29T06:26:58.734Z"},{_id:"61540730b365960011d88a73",isoCode:"MO",name:"Macau S.A.R.",flag:"\ud83c\uddf2\ud83c\uddf4",currency:"MOP",countryIsoCode2:"MO",phoneCode:"+853",isoCode3:"MAC",fips:"MC",created:"2021-09-29T06:26:56.294Z",modified:"2021-09-29T06:26:58.734Z"},{_id:"61540730b365960011d88a74",isoCode:"MK",name:"Macedonia",flag:"\ud83c\uddf2\ud83c\uddf0",currency:"MKD",countryIsoCode2:"MK",phoneCode:"+389",isoCode3:"MKD",fips:"MK",created:"2021-09-29T06:26:56.294Z",modified:"2021-09-29T06:26:58.734Z"},{_id:"61540730b365960011d88a75",isoCode:"MG",name:"Madagascar",flag:"\ud83c\uddf2\ud83c\uddec",currency:"MGA",countryIsoCode2:"MG",phoneCode:"+261",isoCode3:"MDG",fips:"MA",created:"2021-09-29T06:26:56.295Z",modified:"2021-09-29T06:26:58.734Z"},{_id:"61540730b365960011d88a76",isoCode:"MW",name:"Malawi",flag:"\ud83c\uddf2\ud83c\uddfc",currency:"MWK",countryIsoCode2:"MW",phoneCode:"+265",isoCode3:"MWI",fips:"MI",created:"2021-09-29T06:26:56.295Z",modified:"2021-09-29T06:26:58.734Z"},{_id:"61540730b365960011d88a77",isoCode:"MY",name:"Malaysia",flag:"\ud83c\uddf2\ud83c\uddfe",currency:"MYR",countryIsoCode2:"MY",phoneCode:"+60",isoCode3:"MYS",fips:"MY",created:"2021-09-29T06:26:56.295Z",modified:"2021-09-29T06:26:58.738Z"},{_id:"61540730b365960011d88a78",isoCode:"MV",name:"Maldives",flag:"\ud83c\uddf2\ud83c\uddfb",currency:"MVR",countryIsoCode2:"MV",phoneCode:"+960",isoCode3:"MDV",fips:"MV",created:"2021-09-29T06:26:56.296Z",modified:"2021-09-29T06:26:58.738Z"},{_id:"61540730b365960011d88a79",isoCode:"ML",name:"Mali",flag:"\ud83c\uddf2\ud83c\uddf1",currency:"XOF",countryIsoCode2:"ML",phoneCode:"+223",isoCode3:"MLI",fips:"ML",created:"2021-09-29T06:26:56.296Z",modified:"2021-09-29T06:26:58.738Z"},{_id:"61540730b365960011d88a7a",isoCode:"MT",name:"Malta",flag:"\ud83c\uddf2\ud83c\uddf9",currency:"EUR",countryIsoCode2:"MT",phoneCode:"+356",isoCode3:"MLT",fips:"MT",created:"2021-09-29T06:26:56.296Z",modified:"2021-09-29T06:26:58.739Z"},{_id:"61540730b365960011d88a7b",isoCode:"IM",name:"Man (Isle of)",flag:"\ud83c\uddee\ud83c\uddf2",currency:"GBP",countryIsoCode2:"IM",phoneCode:"+44-1624",isoCode3:"IMN",fips:"IM",created:"2021-09-29T06:26:56.297Z",modified:"2021-09-29T06:26:58.739Z"},{_id:"61540730b365960011d88a7c",isoCode:"MH",name:"Marshall Islands",flag:"\ud83c\uddf2\ud83c\udded",currency:"USD",countryIsoCode2:"MH",phoneCode:"+692",isoCode3:"MHL",fips:"RM",created:"2021-09-29T06:26:56.297Z",modified:"2021-09-29T06:26:58.739Z"},{_id:"61540730b365960011d88a7d",isoCode:"MQ",name:"Martinique",flag:"\ud83c\uddf2\ud83c\uddf6",currency:"EUR",countryIsoCode2:"MQ",phoneCode:"+596",isoCode3:"MTQ",fips:"MB",created:"2021-09-29T06:26:56.297Z",modified:"2021-09-29T06:26:58.739Z"},{_id:"61540730b365960011d88a7e",isoCode:"MR",name:"Mauritania",flag:"\ud83c\uddf2\ud83c\uddf7",currency:"MRO",countryIsoCode2:"MR",phoneCode:"+222",isoCode3:"MRT",fips:"MR",created:"2021-09-29T06:26:56.298Z",modified:"2021-09-29T06:26:58.739Z"},{_id:"61540730b365960011d88a7f",isoCode:"MU",name:"Mauritius",flag:"\ud83c\uddf2\ud83c\uddfa",currency:"MUR",countryIsoCode2:"MU",phoneCode:"+230",isoCode3:"MUS",fips:"MP",created:"2021-09-29T06:26:56.298Z",modified:"2021-09-29T06:26:58.740Z"},{_id:"61540730b365960011d88a80",isoCode:"YT",name:"Mayotte",flag:"\ud83c\uddfe\ud83c\uddf9",currency:"EUR",countryIsoCode2:"YT",phoneCode:"+262",isoCode3:"MYT",fips:"MF",created:"2021-09-29T06:26:56.298Z",modified:"2021-09-29T06:26:58.740Z"},{_id:"61540730b365960011d88a81",isoCode:"MX",name:"Mexico",flag:"\ud83c\uddf2\ud83c\uddfd",currency:"MXN",countryIsoCode2:"MX",phoneCode:"+52",isoCode3:"MEX",fips:"MX",created:"2021-09-29T06:26:56.299Z",modified:"2021-09-29T06:26:58.743Z"},{_id:"61540730b365960011d88a82",isoCode:"FM",name:"Micronesia",flag:"\ud83c\uddeb\ud83c\uddf2",currency:"USD",countryIsoCode2:"FM",phoneCode:"+691",isoCode3:"FSM",fips:"",created:"2021-09-29T06:26:56.299Z",modified:"2021-09-29T06:26:58.743Z"},{_id:"61540730b365960011d88a83",isoCode:"MD",name:"Moldova",flag:"\ud83c\uddf2\ud83c\udde9",currency:"MDL",countryIsoCode2:"MD",phoneCode:"+373",isoCode3:"MDA",fips:"MD",created:"2021-09-29T06:26:56.299Z",modified:"2021-09-29T06:26:58.743Z"},{_id:"61540730b365960011d88a84",isoCode:"MC",name:"Monaco",flag:"\ud83c\uddf2\ud83c\udde8",currency:"EUR",countryIsoCode2:"MC",phoneCode:"+377",isoCode3:"MCO",fips:"MN",created:"2021-09-29T06:26:56.300Z",modified:"2021-09-29T06:26:58.744Z"},{_id:"61540730b365960011d88a85",isoCode:"MN",name:"Mongolia",flag:"\ud83c\uddf2\ud83c\uddf3",currency:"MNT",countryIsoCode2:"MN",phoneCode:"+976",isoCode3:"MNG",fips:"MG",created:"2021-09-29T06:26:56.300Z",modified:"2021-09-29T06:26:58.744Z"},{_id:"61540730b365960011d88a86",isoCode:"ME",name:"Montenegro",flag:"\ud83c\uddf2\ud83c\uddea",currency:"EUR",countryIsoCode2:"ME",phoneCode:"+382",isoCode3:"MNE",fips:"MJ",created:"2021-09-29T06:26:56.301Z",modified:"2021-09-29T06:26:58.744Z"},{_id:"61540730b365960011d88a87",isoCode:"MS",name:"Montserrat",flag:"\ud83c\uddf2\ud83c\uddf8",currency:"XCD",countryIsoCode2:"MS",phoneCode:"+1-664",isoCode3:"MSR",fips:"MH",created:"2021-09-29T06:26:56.301Z",modified:"2021-09-29T06:26:58.744Z"},{_id:"61540730b365960011d88a88",isoCode:"MA",name:"Morocco",flag:"\ud83c\uddf2\ud83c\udde6",currency:"MAD",countryIsoCode2:"MA",phoneCode:"+212",isoCode3:"MAR",fips:"MO",created:"2021-09-29T06:26:56.301Z",modified:"2021-09-29T06:26:58.744Z"},{_id:"61540730b365960011d88a89",isoCode:"MZ",name:"Mozambique",flag:"\ud83c\uddf2\ud83c\uddff",currency:"MZN",countryIsoCode2:"MZ",phoneCode:"+258",isoCode3:"MOZ",fips:"MZ",created:"2021-09-29T06:26:56.302Z",modified:"2021-09-29T06:26:58.745Z"},{_id:"61540730b365960011d88a8a",isoCode:"MM",name:"Myanmar",flag:"\ud83c\uddf2\ud83c\uddf2",currency:"MMK",countryIsoCode2:"MM",phoneCode:"+95",isoCode3:"MMR",fips:"BM",created:"2021-09-29T06:26:56.302Z",modified:"2021-09-29T06:26:58.745Z"},{_id:"61540730b365960011d88a8b",isoCode:"NA",name:"Namibia",flag:"\ud83c\uddf3\ud83c\udde6",currency:"NAD",countryIsoCode2:"NA",phoneCode:"+264",isoCode3:"NAM",fips:"WA",created:"2021-09-29T06:26:56.302Z",modified:"2021-09-29T06:26:58.750Z"},{_id:"61540730b365960011d88a8c",isoCode:"NR",name:"Nauru",flag:"\ud83c\uddf3\ud83c\uddf7",currency:"AUD",countryIsoCode2:"NR",phoneCode:"+674",isoCode3:"NRU",fips:"NR",created:"2021-09-29T06:26:56.303Z",modified:"2021-09-29T06:26:58.750Z"},{_id:"61540730b365960011d88a8d",isoCode:"NP",name:"Nepal",flag:"\ud83c\uddf3\ud83c\uddf5",currency:"NPR",countryIsoCode2:"NP",phoneCode:"+977",isoCode3:"NPL",fips:"NP",created:"2021-09-29T06:26:56.303Z",modified:"2021-09-29T06:26:58.750Z"},{_id:"61540730b365960011d88a8f",isoCode:"NL",name:"Netherlands The",flag:"\ud83c\uddf3\ud83c\uddf1",currency:"EUR",countryIsoCode2:"NL",phoneCode:"+31",isoCode3:"NLD",fips:"NL",created:"2021-09-29T06:26:56.304Z",modified:"2021-09-29T06:26:58.750Z"},{_id:"61540730b365960011d88a90",isoCode:"NC",name:"New Caledonia",flag:"\ud83c\uddf3\ud83c\udde8",currency:"XPF",countryIsoCode2:"NC",phoneCode:"+687",isoCode3:"NCL",fips:"NC",created:"2021-09-29T06:26:56.304Z",modified:"2021-09-29T06:26:58.751Z"},{_id:"61540730b365960011d88a91",isoCode:"NZ",name:"New Zealand",flag:"\ud83c\uddf3\ud83c\uddff",currency:"NZD",countryIsoCode2:"NZ",phoneCode:"+64",isoCode3:"NZL",fips:"NZ",created:"2021-09-29T06:26:56.305Z",modified:"2021-09-29T06:26:58.751Z"},{_id:"61540730b365960011d88a92",isoCode:"NI",name:"Nicaragua",flag:"\ud83c\uddf3\ud83c\uddee",currency:"NIO",countryIsoCode2:"NI",phoneCode:"+505",isoCode3:"NIC",fips:"NU",created:"2021-09-29T06:26:56.305Z",modified:"2021-09-29T06:26:58.751Z"},{_id:"61540730b365960011d88a93",isoCode:"NE",name:"Niger",flag:"\ud83c\uddf3\ud83c\uddea",currency:"XOF",countryIsoCode2:"NE",phoneCode:"+227",isoCode3:"NER",fips:"NG",created:"2021-09-29T06:26:56.305Z",modified:"2021-09-29T06:26:58.751Z"},{_id:"61540730b365960011d88a94",isoCode:"NG",name:"Nigeria",flag:"\ud83c\uddf3\ud83c\uddec",currency:"NGN",countryIsoCode2:"NG",phoneCode:"+234",isoCode3:"NGA",fips:"NI",created:"2021-09-29T06:26:56.306Z",modified:"2021-09-29T06:26:58.751Z"},{_id:"61540730b365960011d88a95",isoCode:"NU",name:"Niue",flag:"\ud83c\uddf3\ud83c\uddfa",currency:"NZD",countryIsoCode2:"NU",phoneCode:"+683",isoCode3:"NIU",fips:"NE",created:"2021-09-29T06:26:56.306Z",modified:"2021-09-29T06:26:58.755Z"},{_id:"61540730b365960011d88a96",isoCode:"NF",name:"Norfolk Island",flag:"\ud83c\uddf3\ud83c\uddeb",currency:"AUD",countryIsoCode2:"NF",phoneCode:"+672",isoCode3:"NFK",fips:"NF",created:"2021-09-29T06:26:56.306Z",modified:"2021-09-29T06:26:58.755Z"},{_id:"61540730b365960011d88a97",isoCode:"MP",name:"Northern Mariana Islands",flag:"\ud83c\uddf2\ud83c\uddf5",currency:"USD",countryIsoCode2:"MP",phoneCode:"+1-670",isoCode3:"MNP",fips:"CQ",created:"2021-09-29T06:26:56.307Z",modified:"2021-09-29T06:26:58.755Z"},{_id:"61540730b365960011d88a98",isoCode:"NO",name:"Norway",flag:"\ud83c\uddf3\ud83c\uddf4",currency:"NOK",countryIsoCode2:"NO",phoneCode:"+47",isoCode3:"NOR",fips:"NO",created:"2021-09-29T06:26:56.307Z",modified:"2021-09-29T06:26:58.755Z"},{_id:"61540730b365960011d88a99",isoCode:"OM",name:"Oman",flag:"\ud83c\uddf4\ud83c\uddf2",currency:"OMR",countryIsoCode2:"OM",phoneCode:"+968",isoCode3:"OMN",fips:"MU",created:"2021-09-29T06:26:56.308Z",modified:"2021-09-29T06:26:58.756Z"},{_id:"61540730b365960011d88a9a",isoCode:"PK",name:"Pakistan",flag:"\ud83c\uddf5\ud83c\uddf0",currency:"PKR",countryIsoCode2:"PK",phoneCode:"+92",isoCode3:"PAK",fips:"PK",created:"2021-09-29T06:26:56.308Z",modified:"2021-09-29T06:26:58.756Z"},{_id:"61540730b365960011d88a9b",isoCode:"PW",name:"Palau",flag:"\ud83c\uddf5\ud83c\uddfc",currency:"USD",countryIsoCode2:"PW",phoneCode:"+680",isoCode3:"PLW",fips:"PS",created:"2021-09-29T06:26:56.309Z",modified:"2021-09-29T06:26:58.756Z"},{_id:"61540730b365960011d88a9c",isoCode:"PS",name:"Palestinian Territory Occupied",flag:"\ud83c\uddf5\ud83c\uddf8",currency:"ILS",countryIsoCode2:"PS",phoneCode:"+970",isoCode3:"PSE",fips:"WE",created:"2021-09-29T06:26:56.309Z",modified:"2021-09-29T06:26:58.756Z"},{_id:"61540730b365960011d88a9d",isoCode:"PA",name:"Panama",flag:"\ud83c\uddf5\ud83c\udde6",currency:"PAB",countryIsoCode2:"PA",phoneCode:"+507",isoCode3:"PAN",fips:"PM",created:"2021-09-29T06:26:56.310Z",modified:"2021-09-29T06:26:58.757Z"},{_id:"61540730b365960011d88a9e",isoCode:"PG",name:"Papua new Guinea",flag:"\ud83c\uddf5\ud83c\uddec",currency:"PGK",countryIsoCode2:"PG",phoneCode:"+675",isoCode3:"PNG",fips:"PP",created:"2021-09-29T06:26:56.310Z",modified:"2021-09-29T06:26:58.757Z"},{_id:"61540730b365960011d88a9f",isoCode:"PY",name:"Paraguay",flag:"\ud83c\uddf5\ud83c\uddfe",currency:"PYG",countryIsoCode2:"PY",phoneCode:"+595",isoCode3:"PRY",fips:"PA",created:"2021-09-29T06:26:56.310Z",modified:"2021-09-29T06:26:58.760Z"},{_id:"61540730b365960011d88aa0",isoCode:"PE",name:"Peru",flag:"\ud83c\uddf5\ud83c\uddea",currency:"PEN",countryIsoCode2:"PE",phoneCode:"+51",isoCode3:"PER",fips:"PE",created:"2021-09-29T06:26:56.310Z",modified:"2021-09-29T06:26:58.761Z"},{_id:"61540730b365960011d88aa1",isoCode:"PH",name:"Philippines",flag:"\ud83c\uddf5\ud83c\udded",currency:"PHP",countryIsoCode2:"PH",phoneCode:"+63",isoCode3:"PHL",fips:"RP",created:"2021-09-29T06:26:56.311Z",modified:"2021-09-29T06:26:58.761Z"},{_id:"61540730b365960011d88aa2",isoCode:"PN",name:"Pitcairn Island",flag:"\ud83c\uddf5\ud83c\uddf3",currency:"NZD",countryIsoCode2:"PN",phoneCode:"+870",isoCode3:"PCN",fips:"PC",created:"2021-09-29T06:26:56.311Z",modified:"2021-09-29T06:26:58.761Z"},{_id:"61540730b365960011d88aa3",isoCode:"PL",name:"Poland",flag:"\ud83c\uddf5\ud83c\uddf1",currency:"PLN",countryIsoCode2:"PL",phoneCode:"+48",isoCode3:"POL",fips:"PL",created:"2021-09-29T06:26:56.311Z",modified:"2021-09-29T06:26:58.761Z"},{_id:"61540730b365960011d88aa4",isoCode:"PT",name:"Portugal",flag:"\ud83c\uddf5\ud83c\uddf9",currency:"EUR",countryIsoCode2:"PT",phoneCode:"+351",isoCode3:"PRT",fips:"PO",created:"2021-09-29T06:26:56.312Z",modified:"2021-09-29T06:26:58.761Z"},{_id:"61540730b365960011d88aa5",isoCode:"PR",name:"Puerto Rico",flag:"\ud83c\uddf5\ud83c\uddf7",currency:"USD",countryIsoCode2:"PR",phoneCode:"+1-787 and 1-939",isoCode3:"PRI",fips:"RQ",created:"2021-09-29T06:26:56.312Z",modified:"2021-09-29T06:26:58.761Z"},{_id:"61540730b365960011d88aa6",isoCode:"QA",name:"Qatar",flag:"\ud83c\uddf6\ud83c\udde6",currency:"QAR",countryIsoCode2:"QA",phoneCode:"+974",isoCode3:"QAT",fips:"QA",created:"2021-09-29T06:26:56.312Z",modified:"2021-09-29T06:26:58.762Z"},{_id:"61540730b365960011d88aa7",isoCode:"RE",name:"Reunion",flag:"\ud83c\uddf7\ud83c\uddea",currency:"EUR",countryIsoCode2:"RE",phoneCode:"+262",isoCode3:"REU",fips:"RE",created:"2021-09-29T06:26:56.312Z",modified:"2021-09-29T06:26:58.762Z"},{_id:"61540730b365960011d88aa8",isoCode:"RO",name:"Romania",flag:"\ud83c\uddf7\ud83c\uddf4",currency:"RON",countryIsoCode2:"RO",phoneCode:"+40",isoCode3:"ROU",fips:"RO",created:"2021-09-29T06:26:56.313Z",modified:"2021-09-29T06:26:58.762Z"},{_id:"61540730b365960011d88aa9",isoCode:"RU",name:"Russia",flag:"\ud83c\uddf7\ud83c\uddfa",currency:"RUB",countryIsoCode2:"RU",phoneCode:"+7",isoCode3:"RUS",fips:"RS",created:"2021-09-29T06:26:56.313Z",modified:"2021-09-29T06:26:58.766Z"},{_id:"61540730b365960011d88aaa",isoCode:"RW",name:"Rwanda",flag:"\ud83c\uddf7\ud83c\uddfc",currency:"RWF",countryIsoCode2:"RW",phoneCode:"+250",isoCode3:"RWA",fips:"RW",created:"2021-09-29T06:26:56.313Z",modified:"2021-09-29T06:26:58.766Z"},{_id:"61540730b365960011d88aab",isoCode:"SH",name:"Saint Helena",flag:"\ud83c\uddf8\ud83c\udded",currency:"SHP",countryIsoCode2:"SH",phoneCode:"+290",isoCode3:"SHN",fips:"SH",created:"2021-09-29T06:26:56.314Z",modified:"2021-09-29T06:26:58.767Z"},{_id:"61540730b365960011d88aac",isoCode:"KN",name:"Saint Kitts And Nevis",flag:"\ud83c\uddf0\ud83c\uddf3",currency:"XCD",countryIsoCode2:"KN",phoneCode:"+1-869",isoCode3:"KNA",fips:"SC",created:"2021-09-29T06:26:56.314Z",modified:"2021-09-29T06:26:58.767Z"},{_id:"61540730b365960011d88aad",isoCode:"LC",name:"Saint Lucia",flag:"\ud83c\uddf1\ud83c\udde8",currency:"XCD",countryIsoCode2:"LC",phoneCode:"+1-758",isoCode3:"LCA",fips:"ST",created:"2021-09-29T06:26:56.314Z",modified:"2021-09-29T06:26:58.767Z"},{_id:"61540730b365960011d88aae",isoCode:"PM",name:"Saint Pierre and Miquelon",flag:"\ud83c\uddf5\ud83c\uddf2",currency:"EUR",countryIsoCode2:"PM",phoneCode:"+508",isoCode3:"SPM",fips:"SB",created:"2021-09-29T06:26:56.314Z",modified:"2021-09-29T06:26:58.767Z"},{_id:"61540730b365960011d88aaf",isoCode:"VC",name:"Saint Vincent And The Grenadines",flag:"\ud83c\uddfb\ud83c\udde8",currency:"XCD",countryIsoCode2:"VC",phoneCode:"+1-784",isoCode3:"VCT",fips:"VC",created:"2021-09-29T06:26:56.315Z",modified:"2021-09-29T06:26:58.767Z"},{_id:"61540730b365960011d88ab0",isoCode:"BL",name:"Saint-Barthelemy",flag:"\ud83c\udde7\ud83c\uddf1",currency:"EUR",countryIsoCode2:"BL",phoneCode:"+590",isoCode3:"BLM",fips:"TB",created:"2021-09-29T06:26:56.315Z",modified:"2021-09-29T06:26:58.768Z"},{_id:"61540730b365960011d88ab1",isoCode:"MF",name:"Saint-Martin (French part)",flag:"\ud83c\uddf2\ud83c\uddeb",currency:"EUR",countryIsoCode2:"MF",phoneCode:"+590",isoCode3:"MAF",fips:"RN",created:"2021-09-29T06:26:56.315Z",modified:"2021-09-29T06:26:58.768Z"},{_id:"61540730b365960011d88ab2",isoCode:"WS",name:"Samoa",flag:"\ud83c\uddfc\ud83c\uddf8",currency:"WST",countryIsoCode2:"WS",phoneCode:"+685",isoCode3:"WSM",fips:"WS",created:"2021-09-29T06:26:56.316Z",modified:"2021-09-29T06:26:58.768Z"},{_id:"61540730b365960011d88ab3",isoCode:"SM",name:"San Marino",flag:"\ud83c\uddf8\ud83c\uddf2",currency:"EUR",countryIsoCode2:"SM",phoneCode:"+378",isoCode3:"SMR",fips:"SM",created:"2021-09-29T06:26:56.316Z",modified:"2021-09-29T06:26:58.771Z"},{_id:"61540730b365960011d88ab4",isoCode:"ST",name:"Sao Tome and Principe",flag:"\ud83c\uddf8\ud83c\uddf9",currency:"STD",countryIsoCode2:"ST",phoneCode:"+239",isoCode3:"STP",fips:"TP",created:"2021-09-29T06:26:56.316Z",modified:"2021-09-29T06:26:58.771Z"},{_id:"61540730b365960011d88ab5",isoCode:"SA",name:"Saudi Arabia",flag:"\ud83c\uddf8\ud83c\udde6",currency:"SAR",countryIsoCode2:"SA",phoneCode:"+966",isoCode3:"SAU",fips:"SA",created:"2021-09-29T06:26:56.317Z",modified:"2021-09-29T06:26:58.772Z"},{_id:"61540730b365960011d88ab6",isoCode:"SN",name:"Senegal",flag:"\ud83c\uddf8\ud83c\uddf3",currency:"XOF",countryIsoCode2:"SN",phoneCode:"+221",isoCode3:"SEN",fips:"SG",created:"2021-09-29T06:26:56.317Z",modified:"2021-09-29T06:26:58.772Z"},{_id:"61540730b365960011d88ab7",isoCode:"RS",name:"Serbia",flag:"\ud83c\uddf7\ud83c\uddf8",currency:"RSD",countryIsoCode2:"RS",phoneCode:"+381",isoCode3:"SRB",fips:"RI",created:"2021-09-29T06:26:56.317Z",modified:"2021-09-29T06:26:58.772Z"},{_id:"61540730b365960011d88ab8",isoCode:"SC",name:"Seychelles",flag:"\ud83c\uddf8\ud83c\udde8",currency:"SCR",countryIsoCode2:"SC",phoneCode:"+248",isoCode3:"SYC",fips:"SE",created:"2021-09-29T06:26:56.317Z",modified:"2021-09-29T06:26:58.773Z"},{_id:"61540730b365960011d88ab9",isoCode:"SL",name:"Sierra Leone",flag:"\ud83c\uddf8\ud83c\uddf1",currency:"SLL",countryIsoCode2:"SL",phoneCode:"+232",isoCode3:"SLE",fips:"SL",created:"2021-09-29T06:26:56.318Z",modified:"2021-09-29T06:26:58.773Z"},{_id:"61540730b365960011d88aba",isoCode:"SG",name:"Singapore",flag:"\ud83c\uddf8\ud83c\uddec",currency:"SGD",countryIsoCode2:"SG",phoneCode:"+65",isoCode3:"SGP",fips:"SN",created:"2021-09-29T06:26:56.318Z",modified:"2021-09-29T06:26:58.773Z"},{_id:"61540730b365960011d88aed",isoCode:"SX",name:"Sint Maarten (Dutch part)",flag:"\ud83c\uddf8\ud83c\uddfd",currency:"ANG",countryIsoCode2:"SX",phoneCode:"+1721",isoCode3:"SXM",fips:"NN",created:"2021-09-29T06:26:56.342Z",modified:"2021-09-29T06:26:58.795Z"},{_id:"61540730b365960011d88abb",isoCode:"SK",name:"Slovakia",flag:"\ud83c\uddf8\ud83c\uddf0",currency:"EUR",countryIsoCode2:"SK",phoneCode:"+421",isoCode3:"SVK",fips:"LO",created:"2021-09-29T06:26:56.318Z",modified:"2021-09-29T06:26:58.774Z"},{_id:"61540730b365960011d88abc",isoCode:"SI",name:"Slovenia",flag:"\ud83c\uddf8\ud83c\uddee",currency:"EUR",countryIsoCode2:"SI",phoneCode:"+386",isoCode3:"SVN",fips:"SI",created:"2021-09-29T06:26:56.320Z",modified:"2021-09-29T06:26:58.774Z"},{_id:"61540730b365960011d88abd",isoCode:"SB",name:"Solomon Islands",flag:"\ud83c\uddf8\ud83c\udde7",currency:"SBD",countryIsoCode2:"SB",phoneCode:"+677",isoCode3:"SLB",fips:"BP",created:"2021-09-29T06:26:56.320Z",modified:"2021-09-29T06:26:58.776Z"},{_id:"61540730b365960011d88abe",isoCode:"SO",name:"Somalia",flag:"\ud83c\uddf8\ud83c\uddf4",currency:"SOS",countryIsoCode2:"SO",phoneCode:"+252",isoCode3:"SOM",fips:"SO",created:"2021-09-29T06:26:56.320Z",modified:"2021-09-29T06:26:58.777Z"},{_id:"61540730b365960011d88abf",isoCode:"ZA",name:"South Africa",flag:"\ud83c\uddff\ud83c\udde6",currency:"ZAR",countryIsoCode2:"ZA",phoneCode:"+27",isoCode3:"ZAF",fips:"SF",created:"2021-09-29T06:26:56.321Z",modified:"2021-09-29T06:26:58.777Z"},{_id:"61540730b365960011d88ac0",isoCode:"GS",name:"South Georgia",flag:"\ud83c\uddec\ud83c\uddf8",currency:"GBP",countryIsoCode2:"GS",phoneCode:"+500",isoCode3:"SGS",fips:"SX",created:"2021-09-29T06:26:56.321Z",modified:"2021-09-29T06:26:58.777Z"},{_id:"61540730b365960011d88ac1",isoCode:"SS",name:"South Sudan",flag:"\ud83c\uddf8\ud83c\uddf8",currency:"SSP",countryIsoCode2:"SS",phoneCode:"+211",isoCode3:"SSD",fips:"OD",created:"2021-09-29T06:26:56.321Z",modified:"2021-09-29T06:26:58.777Z"},{_id:"61540730b365960011d88ac2",isoCode:"ES",name:"Spain",flag:"\ud83c\uddea\ud83c\uddf8",currency:"EUR",countryIsoCode2:"ES",phoneCode:"+34",isoCode3:"ESP",fips:"SP",created:"2021-09-29T06:26:56.321Z",modified:"2021-09-29T06:26:58.777Z"},{_id:"61540730b365960011d88ac3",isoCode:"LK",name:"Sri Lanka",flag:"\ud83c\uddf1\ud83c\uddf0",currency:"LKR",countryIsoCode2:"LK",phoneCode:"+94",isoCode3:"LKA",fips:"CE",created:"2021-09-29T06:26:56.321Z",modified:"2021-09-29T06:26:58.778Z"},{_id:"61540730b365960011d88ac4",isoCode:"SD",name:"Sudan",flag:"\ud83c\uddf8\ud83c\udde9",currency:"SDG",countryIsoCode2:"SD",phoneCode:"+249",isoCode3:"SDN",fips:"SU",created:"2021-09-29T06:26:56.322Z",modified:"2021-09-29T06:26:58.778Z"},{_id:"61540730b365960011d88ac5",isoCode:"SR",name:"Suriname",flag:"\ud83c\uddf8\ud83c\uddf7",currency:"SRD",countryIsoCode2:"SR",phoneCode:"+597",isoCode3:"SUR",fips:"NS",created:"2021-09-29T06:26:56.322Z",modified:"2021-09-29T06:26:58.778Z"},{_id:"61540730b365960011d88ac6",isoCode:"SJ",name:"Svalbard And Jan Mayen Islands",flag:"\ud83c\uddf8\ud83c\uddef",currency:"NOK",countryIsoCode2:"SJ",phoneCode:"+47",isoCode3:"SJM",fips:"SV",created:"2021-09-29T06:26:56.322Z",modified:"2021-09-29T06:26:58.778Z"},{_id:"61540730b365960011d88ac7",isoCode:"SZ",name:"Swaziland",flag:"\ud83c\uddf8\ud83c\uddff",currency:"SZL",countryIsoCode2:"SZ",phoneCode:"+268",isoCode3:"SWZ",fips:"WZ",created:"2021-09-29T06:26:56.323Z",modified:"2021-09-29T06:26:58.781Z"},{_id:"61540730b365960011d88ac8",isoCode:"SE",name:"Sweden",flag:"\ud83c\uddf8\ud83c\uddea",currency:"SEK",countryIsoCode2:"SE",phoneCode:"+46",isoCode3:"SWE",fips:"SW",created:"2021-09-29T06:26:56.323Z",modified:"2021-09-29T06:26:58.781Z"},{_id:"61540730b365960011d88ac9",isoCode:"CH",name:"Switzerland",flag:"\ud83c\udde8\ud83c\udded",currency:"CHF",countryIsoCode2:"CH",phoneCode:"+41",isoCode3:"CHE",fips:"SZ",created:"2021-09-29T06:26:56.323Z",modified:"2021-09-29T06:26:58.781Z"},{_id:"61540730b365960011d88aca",isoCode:"SY",name:"Syria",flag:"\ud83c\uddf8\ud83c\uddfe",currency:"SYP",countryIsoCode2:"SY",phoneCode:"+963",isoCode3:"SYR",fips:"SY",created:"2021-09-29T06:26:56.323Z",modified:"2021-09-29T06:26:58.781Z"},{_id:"61540730b365960011d88acb",isoCode:"TW",name:"Taiwan",flag:"\ud83c\uddf9\ud83c\uddfc",currency:"TWD",countryIsoCode2:"TW",phoneCode:"+886",isoCode3:"TWN",fips:"TW",created:"2021-09-29T06:26:56.323Z",modified:"2021-09-29T06:26:58.782Z"},{_id:"61540730b365960011d88acc",isoCode:"TJ",name:"Tajikistan",flag:"\ud83c\uddf9\ud83c\uddef",currency:"TJS",countryIsoCode2:"TJ",phoneCode:"+992",isoCode3:"TJK",fips:"TI",created:"2021-09-29T06:26:56.324Z",modified:"2021-09-29T06:26:58.782Z"},{_id:"61540730b365960011d88acd",isoCode:"TZ",name:"Tanzania",flag:"\ud83c\uddf9\ud83c\uddff",currency:"TZS",countryIsoCode2:"TZ",phoneCode:"+255",isoCode3:"TZA",fips:"TZ",created:"2021-09-29T06:26:56.324Z",modified:"2021-09-29T06:26:58.782Z"},{_id:"61540730b365960011d88ace",isoCode:"TH",name:"Thailand",flag:"\ud83c\uddf9\ud83c\udded",currency:"THB",countryIsoCode2:"TH",phoneCode:"+66",isoCode3:"THA",fips:"TH",created:"2021-09-29T06:26:56.325Z",modified:"2021-09-29T06:26:58.782Z"},{_id:"61540730b365960011d88acf",isoCode:"TG",name:"Togo",flag:"\ud83c\uddf9\ud83c\uddec",currency:"XOF",countryIsoCode2:"TG",phoneCode:"+228",isoCode3:"TGO",fips:"TO",created:"2021-09-29T06:26:56.326Z",modified:"2021-09-29T06:26:58.782Z"},{_id:"61540730b365960011d88ad0",isoCode:"TK",name:"Tokelau",flag:"\ud83c\uddf9\ud83c\uddf0",currency:"NZD",countryIsoCode2:"TK",phoneCode:"+690",isoCode3:"TKL",fips:"TL",created:"2021-09-29T06:26:56.326Z",modified:"2021-09-29T06:26:58.783Z"},{_id:"61540730b365960011d88ad1",isoCode:"TO",name:"Tonga",flag:"\ud83c\uddf9\ud83c\uddf4",currency:"TOP",countryIsoCode2:"TO",phoneCode:"+676",isoCode3:"TON",fips:"TN",created:"2021-09-29T06:26:56.327Z",modified:"2021-09-29T06:26:58.785Z"},{_id:"61540730b365960011d88ad2",isoCode:"TT",name:"Trinidad And Tobago",flag:"\ud83c\uddf9\ud83c\uddf9",currency:"TTD",countryIsoCode2:"TT",phoneCode:"+1-868",isoCode3:"TTO",fips:"TD",created:"2021-09-29T06:26:56.328Z",modified:"2021-09-29T06:26:58.786Z"},{_id:"61540730b365960011d88ad3",isoCode:"TN",name:"Tunisia",flag:"\ud83c\uddf9\ud83c\uddf3",currency:"TND",countryIsoCode2:"TN",phoneCode:"+216",isoCode3:"TUN",fips:"TS",created:"2021-09-29T06:26:56.328Z",modified:"2021-09-29T06:26:58.786Z"},{_id:"61540730b365960011d88ad4",isoCode:"TR",name:"Turkey",flag:"\ud83c\uddf9\ud83c\uddf7",currency:"TRY",countryIsoCode2:"TR",phoneCode:"+90",isoCode3:"TUR",fips:"TU",created:"2021-09-29T06:26:56.328Z",modified:"2021-09-29T06:26:58.786Z"},{_id:"61540730b365960011d88ad5",isoCode:"TM",name:"Turkmenistan",flag:"\ud83c\uddf9\ud83c\uddf2",currency:"TMT",countryIsoCode2:"TM",phoneCode:"+993",isoCode3:"TKM",fips:"TX",created:"2021-09-29T06:26:56.334Z",modified:"2021-09-29T06:26:58.786Z"},{_id:"61540730b365960011d88ad6",isoCode:"TC",name:"Turks And Caicos Islands",flag:"\ud83c\uddf9\ud83c\udde8",currency:"USD",countryIsoCode2:"TC",phoneCode:"+1-649",isoCode3:"TCA",fips:"TK",created:"2021-09-29T06:26:56.334Z",modified:"2021-09-29T06:26:58.786Z"},{_id:"61540730b365960011d88ad7",isoCode:"TV",name:"Tuvalu",flag:"\ud83c\uddf9\ud83c\uddfb",currency:"AUD",countryIsoCode2:"TV",phoneCode:"+688",isoCode3:"TUV",fips:"TV",created:"2021-09-29T06:26:56.334Z",modified:"2021-09-29T06:26:58.787Z"},{_id:"61540730b365960011d88ad8",isoCode:"UG",name:"Uganda",flag:"\ud83c\uddfa\ud83c\uddec",currency:"UGX",countryIsoCode2:"UG",phoneCode:"+256",isoCode3:"UGA",fips:"UG",created:"2021-09-29T06:26:56.334Z",modified:"2021-09-29T06:26:58.787Z"},{_id:"61540730b365960011d88ad9",isoCode:"UA",name:"Ukraine",flag:"\ud83c\uddfa\ud83c\udde6",currency:"UAH",countryIsoCode2:"UA",phoneCode:"+380",isoCode3:"UKR",fips:"UP",created:"2021-09-29T06:26:56.335Z",modified:"2021-09-29T06:26:58.787Z"},{_id:"61540730b365960011d88ada",isoCode:"AE",name:"United Arab Emirates",flag:"\ud83c\udde6\ud83c\uddea",currency:"AED",countryIsoCode2:"AE",phoneCode:"+971",isoCode3:"ARE",fips:"TC",created:"2021-09-29T06:26:56.335Z",modified:"2021-09-29T06:26:58.787Z"},{_id:"61540730b365960011d88adb",isoCode:"GB",name:"United Kingdom",flag:"\ud83c\uddec\ud83c\udde7",currency:"GBP",countryIsoCode2:"GB",phoneCode:"+44",isoCode3:"GBR",fips:"UK",created:"2021-09-29T06:26:56.335Z",modified:"2021-09-29T06:26:58.790Z"},{_id:"61540730b365960011d88adc",isoCode:"US",name:"United States",flag:"\ud83c\uddfa\ud83c\uddf8",currency:"USD",countryIsoCode2:"US",phoneCode:"+1",isoCode3:"USA",fips:"US",created:"2021-09-29T06:26:56.336Z",modified:"2021-09-29T06:26:58.790Z"},{_id:"61540730b365960011d88add",isoCode:"UM",name:"United States Minor Outlying Islands",flag:"\ud83c\uddfa\ud83c\uddf2",currency:"USD",countryIsoCode2:"UM",phoneCode:"+1",isoCode3:"UMI",fips:"",created:"2021-09-29T06:26:56.336Z",modified:"2021-09-29T06:26:58.790Z"},{_id:"61540730b365960011d88ade",isoCode:"UY",name:"Uruguay",flag:"\ud83c\uddfa\ud83c\uddfe",currency:"UYU",countryIsoCode2:"UY",phoneCode:"+598",isoCode3:"URY",fips:"UY",created:"2021-09-29T06:26:56.336Z",modified:"2021-09-29T06:26:58.790Z"},{_id:"61540730b365960011d88adf",isoCode:"UZ",name:"Uzbekistan",flag:"\ud83c\uddfa\ud83c\uddff",currency:"UZS",countryIsoCode2:"UZ",phoneCode:"+998",isoCode3:"UZB",fips:"UZ",created:"2021-09-29T06:26:56.336Z",modified:"2021-09-29T06:26:58.790Z"},{_id:"61540730b365960011d88ae0",isoCode:"VU",name:"Vanuatu",flag:"\ud83c\uddfb\ud83c\uddfa",currency:"VUV",countryIsoCode2:"VU",phoneCode:"+678",isoCode3:"VUT",fips:"NH",created:"2021-09-29T06:26:56.337Z",modified:"2021-09-29T06:26:58.791Z"},{_id:"61540730b365960011d88ae1",isoCode:"VA",name:"Vatican City State (Holy See)",flag:"\ud83c\uddfb\ud83c\udde6",currency:"EUR",countryIsoCode2:"VA",phoneCode:"+379",isoCode3:"VAT",fips:"VT",created:"2021-09-29T06:26:56.337Z",modified:"2021-09-29T06:26:58.791Z"},{_id:"61540730b365960011d88ae2",isoCode:"VE",name:"Venezuela",flag:"\ud83c\uddfb\ud83c\uddea",currency:"VEF",countryIsoCode2:"VE",phoneCode:"+58",isoCode3:"VEN",fips:"VE",created:"2021-09-29T06:26:56.337Z",modified:"2021-09-29T06:26:58.791Z"},{_id:"61540730b365960011d88ae3",isoCode:"VN",name:"Vietnam",flag:"\ud83c\uddfb\ud83c\uddf3",currency:"VND",countryIsoCode2:"VN",phoneCode:"+84",isoCode3:"VNM",fips:"VN",created:"2021-09-29T06:26:56.339Z",modified:"2021-09-29T06:26:58.791Z"},{_id:"61540730b365960011d88ae4",isoCode:"VG",name:"Virgin Islands (British)",flag:"\ud83c\uddfb\ud83c\uddec",currency:"USD",countryIsoCode2:"VG",phoneCode:"+1-284",isoCode3:"VGB",fips:"VI",created:"2021-09-29T06:26:56.339Z",modified:"2021-09-29T06:26:58.791Z"},{_id:"61540730b365960011d88ae5",isoCode:"VI",name:"Virgin Islands (US)",flag:"\ud83c\uddfb\ud83c\uddee",currency:"USD",countryIsoCode2:"VI",phoneCode:"+1-340",isoCode3:"VIR",fips:"VQ",created:"2021-09-29T06:26:56.339Z",modified:"2021-09-29T06:26:58.794Z"},{_id:"61540730b365960011d88ae6",isoCode:"WF",name:"Wallis And Futuna Islands",flag:"\ud83c\uddfc\ud83c\uddeb",currency:"XPF",countryIsoCode2:"WF",phoneCode:"+681",isoCode3:"WLF",fips:"WF",created:"2021-09-29T06:26:56.339Z",modified:"2021-09-29T06:26:58.794Z"},{_id:"61540730b365960011d88ae7",isoCode:"EH",name:"Western Sahara",flag:"\ud83c\uddea\ud83c\udded",currency:"MAD",countryIsoCode2:"EH",phoneCode:"+212",isoCode3:"ESH",fips:"WI",created:"2021-09-29T06:26:56.340Z",modified:"2021-09-29T06:26:58.794Z"},{_id:"61540730b365960011d88ae8",isoCode:"YE",name:"Yemen",flag:"\ud83c\uddfe\ud83c\uddea",currency:"YER",countryIsoCode2:"YE",phoneCode:"+967",isoCode3:"YEM",fips:"YM",created:"2021-09-29T06:26:56.340Z",modified:"2021-09-29T06:26:58.794Z"},{_id:"61540730b365960011d88ae9",isoCode:"ZM",name:"Zambia",flag:"\ud83c\uddff\ud83c\uddf2",currency:"ZMW",countryIsoCode2:"ZM",phoneCode:"+260",isoCode3:"ZMB",fips:"ZA",created:"2021-09-29T06:26:56.340Z",modified:"2021-09-29T06:26:58.795Z"},{_id:"61540730b365960011d88aea",isoCode:"ZW",name:"Zimbabwe",flag:"\ud83c\uddff\ud83c\uddfc",currency:"ZWL",countryIsoCode2:"ZW",phoneCode:"+263",isoCode3:"ZWE",fips:"ZI",created:"2021-09-29T06:26:56.341Z",modified:"2021-09-29T06:26:58.795Z"}]},QK={username:"",first_name:"",last_name:"",email:"",registration:"",mobile:"",mobile_code:"+91"};const JK=function(e){let{userPayload:t,toggleUserPayload:n,handleBackStep:r}=e;const{t:i}=Vg();return(0,qt.jsx)(Kz,{initialValues:hs(QK,t),validationSchema:OU.createNewUserSchema,onSubmit:function(e,t){let{setErrors:r}=t;n(e,{setErrors:r})},enableReinitialize:!0,children:()=>(0,qt.jsx)(nH,{children:(0,qt.jsx)(op,{sx:{mt:4},children:(0,qt.jsx)(Ff,{container:!0,justifyContent:"center",children:(0,qt.jsxs)(Ff,{item:!0,xs:12,md:7,lg:6,children:[(0,qt.jsx)(op,{mb:3,children:(0,qt.jsxs)(pE,{flexDirection:"column",gap:{xs:1,lg:2},children:[(0,qt.jsxs)(Cf,{variant:"body1",component:"p",fontWeight:"h6.fontWeight",children:[i("rpm_UserName"),(0,qt.jsx)(op,{component:"span",children:"*"})]}),(0,qt.jsxs)(op,{children:[(0,qt.jsx)(tH,{as:qj,fullWidth:!0,size:"small",id:"username",name:"username",variant:"outlined",endAdornment:(0,qt.jsx)(tw,{position:"end",children:(0,qt.jsx)(sy,{title:i("message:rpm_AddUser_UserNameHelp"),placement:"top",children:(0,qt.jsx)(wh,{size:"small",children:(0,qt.jsx)(pM.A,{fontSize:"small"})})})})}),(0,qt.jsx)(dH,{name:"username",children:e=>(0,qt.jsx)(v_,{error:!0,children:i(e,{field:i("rpm_UserName")})})})]})]})}),(0,qt.jsx)(op,{mb:3,children:(0,qt.jsxs)(pE,{flexDirection:"column",gap:{xs:1,lg:2},children:[(0,qt.jsx)(Cf,{variant:"body1",component:"p",fontWeight:"h6.fontWeight",children:i("rpm_FirstName")}),(0,qt.jsxs)(op,{children:[(0,qt.jsx)(tH,{as:qj,fullWidth:!0,size:"small",id:"first_name",name:"first_name",variant:"outlined",endAdornment:(0,qt.jsx)(tw,{position:"end",children:(0,qt.jsx)(sy,{title:i("message:rpm_AddUser_FirstNameHelp"),placement:"top",children:(0,qt.jsx)(wh,{size:"small",children:(0,qt.jsx)(pM.A,{fontSize:"small"})})})})}),(0,qt.jsx)(dH,{name:"first_name",children:e=>(0,qt.jsx)(v_,{error:!0,children:i(e,{field:i("rpm_FirstName")})})})]})]})}),(0,qt.jsx)(op,{mb:3,children:(0,qt.jsxs)(pE,{flexDirection:"column",gap:{xs:1,lg:2},children:[(0,qt.jsx)(Cf,{variant:"body1",component:"p",fontWeight:"h6.fontWeight",children:i("rpm_LastName")}),(0,qt.jsxs)(op,{children:[(0,qt.jsx)(tH,{as:qj,fullWidth:!0,size:"small",id:"last_name",name:"last_name",variant:"outlined",endAdornment:(0,qt.jsx)(tw,{position:"end",children:(0,qt.jsx)(sy,{title:i("message:rpm_AddUser_LastNameHelp"),placement:"top",children:(0,qt.jsx)(wh,{size:"small",children:(0,qt.jsx)(pM.A,{fontSize:"small"})})})})}),(0,qt.jsx)(dH,{name:"last_name",children:e=>(0,qt.jsx)(v_,{error:!0,children:i(e,{field:i("rpm_LastName")})})})]})]})}),(0,qt.jsx)(op,{mb:3,children:(0,qt.jsxs)(pE,{flexDirection:"column",gap:{xs:1,lg:2},children:[(0,qt.jsxs)(Cf,{variant:"body1",component:"p",fontWeight:"h6.fontWeight",children:[i("rpm_EmailAddress"),(0,qt.jsx)(op,{component:"span",children:"*"})]}),(0,qt.jsxs)(op,{children:[(0,qt.jsx)(tH,{as:qj,fullWidth:!0,size:"small",id:"email",name:"email",variant:"outlined",endAdornment:(0,qt.jsx)(tw,{position:"end",children:(0,qt.jsx)(sy,{title:i("message:rpm_AddUser_EmailHelp"),placement:"top",children:(0,qt.jsx)(wh,{size:"small",children:(0,qt.jsx)(pM.A,{fontSize:"small"})})})})}),(0,qt.jsx)(dH,{name:"email",children:e=>(0,qt.jsx)(v_,{error:!0,children:i(e,{field:i("rpm_Email")})})})]})]})}),(0,qt.jsx)(op,{mb:3,children:(0,qt.jsxs)(pE,{flexDirection:"column",gap:{xs:1,lg:2},children:[(0,qt.jsx)(Cf,{variant:"body1",component:"p",fontWeight:"h6.fontWeight",children:i("rpm_Registration")}),(0,qt.jsx)(op,{children:(0,qt.jsx)(tH,{as:qj,fullWidth:!0,size:"small",id:"registration",name:"registration",variant:"outlined",endAdornment:(0,qt.jsx)(tw,{position:"end",children:(0,qt.jsx)(sy,{title:i("message:rpm_AddUser_RegistrationHelp"),placement:"top",children:(0,qt.jsx)(wh,{size:"small",children:(0,qt.jsx)(pM.A,{fontSize:"small"})})})})})})]})}),(0,qt.jsx)(op,{mb:3,children:(0,qt.jsxs)(Ff,{container:!0,spacing:2,alignItems:"flex-start",children:[(0,qt.jsx)(Ff,{item:!0,xs:12,md:4,children:(0,qt.jsxs)(pE,{gap:1,children:[(0,qt.jsx)(Cf,{variant:"body1",fontWeight:"h6.fontWeight",children:i("rpm_CountryCode")}),(0,qt.jsx)(tH,{component:KK,size:"small",optionId:"phoneCode",name:"mobile_code",options:(null===XK||void 0===XK?void 0:XK.content)||[],browserAutocomplete:!1,valueKey:"phoneCode",nameKey:"phoneCode",fullWidth:!0}),(0,qt.jsx)(dH,{name:"mobile_code",children:e=>(0,qt.jsx)(v_,{error:!0,children:i(e,{field:i("rpm_CountryCode")})})})]})}),(0,qt.jsx)(Ff,{item:!0,xs:12,md:8,children:(0,qt.jsxs)(pE,{gap:1,children:[(0,qt.jsxs)(Cf,{variant:"body1",fontWeight:"h6.fontWeight",children:[i("rpm_Mobile"),(0,qt.jsx)(op,{component:"span",children:"*"})]}),(0,qt.jsx)(tH,{as:qj,fullWidth:!0,size:"small",name:"mobile",endAdornment:(0,qt.jsx)(tw,{position:"end",children:(0,qt.jsx)(sy,{title:i("message:rpm_AddUser_MobileHelp"),children:(0,qt.jsx)(wh,{size:"small",children:(0,qt.jsx)(pM.A,{fontSize:"small"})})})})}),(0,qt.jsx)(dH,{name:"mobile",children:e=>(0,qt.jsx)(v_,{error:!0,children:i(e,{field:i("rpm_Mobile")})})})]})})]})}),(0,qt.jsx)(op,{children:(0,qt.jsxs)(Ff,{container:!0,spacing:2,children:[(0,qt.jsx)(Ff,{item:!0,children:(0,qt.jsx)(xh,{color:"primary",variant:"outlined",onClick:r,children:i("rpm_Back")})}),(0,qt.jsx)(Ff,{item:!0,children:(0,qt.jsx)(xh,{type:"submit",color:"primary",variant:"contained",disableElevation:!0,children:i("rpm_Next")})})]})})]})})})})},"level_formik")};var eX=n(72023);const tX=function(e){let{handleResetStep:t}=e;const{t:n}=Vg(),r=so();return(0,qt.jsx)(op,{sx:{mt:4,textAlign:"center"},children:(0,qt.jsx)(Ff,{container:!0,justifyContent:"center",children:(0,qt.jsxs)(Ff,{item:!0,xs:12,md:7,lg:6,children:[(0,qt.jsx)(op,{mb:2,children:(0,qt.jsx)(Ny,{sx:{bgcolor:"lightGreen.100",width:160,height:160,mx:"auto"},children:(0,qt.jsx)(eX.A,{sx:{fontSize:72},color:"success"})})}),(0,qt.jsx)(Cf,{component:"h3",variant:"h6",color:"success.main",children:"User added successfully."}),(0,qt.jsx)(xh,{color:"primary",variant:"outlined",sx:{mt:2.5,mr:2.5},onClick:()=>r(ld.DOCTOR.USERS),children:n("rpm_Back")}),(0,qt.jsx)(xh,{color:"primary",variant:"contained",disableElevation:!0,sx:{mt:2.5},onClick:t,children:n("rpm_CreateAnotherUser")})]})})})},nX={role_level:"",program:"",role_type:""};const rX=function(e){let{levelPayload:t,toggleLevelPayload:n,allPrograms:r}=e;const{userData:o}=(0,We.useContext)(lv),{t:a}=Vg(),s=so();return(0,qt.jsx)(Kz,{initialValues:hs(nX,t),validationSchema:RU.addLevel,onSubmit:function(e,t){let{setErrors:r}=t;n((0,i.A)((0,i.A)({},e),{},{program:(null===e||void 0===e?void 0:e.role_level)===bd.CLIENT?"":null===e||void 0===e?void 0:e.program}),{setErrors:r})},enableReinitialize:!0,children:e=>{let{values:t}=e;return(0,qt.jsx)(nH,{children:(0,qt.jsx)(op,{sx:{mt:4},children:(0,qt.jsx)(Ff,{container:!0,justifyContent:"center",children:(0,qt.jsxs)(Ff,{item:!0,xs:12,md:7,lg:6,children:[(0,qt.jsx)(op,{mb:3,children:(0,qt.jsxs)(pE,{flexDirection:"column",gap:{xs:1,lg:2},children:[(0,qt.jsx)(Cf,{variant:"body1",component:"p",fontWeight:"h6.fontWeight",children:a("rpm_RoleUserText")}),(0,qt.jsxs)(op,{children:[(0,qt.jsx)(tH,{as:G_,fullWidth:!0,size:"small",id:"role_level",name:"role_level",variant:"outlined",endAdornment:(0,qt.jsx)(tw,{position:"end",sx:{position:"absolute",right:"28px"},children:(0,qt.jsx)(sy,{title:a("message:rpm_UserLevelTextHelp"),placement:"top",children:(0,qt.jsx)(wh,{size:"small",disableRipple:!0,sx:{p:0},children:(0,qt.jsx)(pM.A,{fontSize:"small"})})})}),children:o.isAdmin?Object.values(bd).map(e=>(0,qt.jsx)(mf,{value:e,children:a("rpm_".concat(e))},e)):(0,qt.jsx)(mf,{value:bd.PROGRAM,children:a("rpm_".concat(bd.PROGRAM))})}),(0,qt.jsx)(dH,{name:"role_level",children:e=>(0,qt.jsx)(v_,{error:!0,children:a(e,{field:a("rpm_UserLevel")})})})]})]})}),t.role_level===bd.PROGRAM&&(0,qt.jsxs)(qt.Fragment,{children:[(0,qt.jsx)(op,{mb:3,children:(0,qt.jsxs)(pE,{flexDirection:"column",gap:{xs:1,lg:2},children:[(0,qt.jsx)(Cf,{variant:"body1",component:"p",fontWeight:"h6.fontWeight",children:a("rpm_SelectProgram")}),(0,qt.jsxs)(op,{className:"autocomplete",sx:{position:"relative"},children:[(0,qt.jsx)(tH,{component:KK,fullWidth:!0,size:"small",id:"program",optionId:"code",name:"program",options:r,browserAutocomplete:!1,valueKey:"code",nameKey:"display_name"}),(0,qt.jsx)(sy,{title:a("message:rpm_UserLevelProgramHelp"),placement:"top",children:(0,qt.jsx)(wh,{size:"small",sx:{position:"absolute",right:"0.875rem",top:"0.25rem"},children:(0,qt.jsx)(pM.A,{fontSize:"small"})})}),(0,qt.jsx)(dH,{name:"program",children:e=>(0,qt.jsx)(v_,{error:!0,children:a(e,{field:a("rpm_SelectProgram")})})})]})]})}),(0,qt.jsx)(op,{mb:3,children:(0,qt.jsxs)(pE,{flexDirection:"column",gap:{xs:1,lg:2},children:[(0,qt.jsx)(Cf,{variant:"body1",component:"p",fontWeight:"h6.fontWeight",children:a("rpm_SelectRoleType")}),(0,qt.jsxs)(op,{children:[(0,qt.jsx)(tH,{as:G_,fullWidth:!0,size:"small",id:"role_type",name:"role_type",variant:"outlined",endAdornment:(0,qt.jsx)(tw,{position:"end",sx:{position:"absolute",right:"28px"},children:(0,qt.jsx)(sy,{title:a("message:rpm_UserLevelTextHelp"),placement:"top",children:(0,qt.jsx)(wh,{size:"small",disableRipple:!0,sx:{p:0},children:(0,qt.jsx)(pM.A,{fontSize:"small"})})})}),children:null===yd||void 0===yd?void 0:yd.map(e=>(0,qt.jsx)(mf,{value:null===e||void 0===e?void 0:e.value,children:null===e||void 0===e?void 0:e.label},null===e||void 0===e?void 0:e.id))}),(0,qt.jsx)(dH,{name:"ROLE_TYPES",children:e=>(0,qt.jsx)(v_,{error:!0,children:a(e,{field:a("rpm_RoleType")})})})]})]})})]}),(0,qt.jsx)(op,{children:(0,qt.jsxs)(Ff,{container:!0,spacing:2,children:[(0,qt.jsx)(Ff,{item:!0,children:(0,qt.jsx)(xh,{color:"primary",variant:"outlined",onClick:()=>s(ld.DOCTOR.USERS),children:a("rpm_Cancel")})}),(0,qt.jsx)(Ff,{item:!0,children:(0,qt.jsx)(xh,{type:"submit",color:"primary",variant:"contained",disableElevation:!0,children:a("rpm_Next")})})]})})]})})})})}},"level_formik")};const iX=function(e){let{activeStep:t,handleResetStep:n,handleNextStep:r,handleBackStep:o,levelPayload:a,userPayload:s,rolePayload:l,toggleLevelPayload:c,toggleUserPayload:d,toggleRolePayload:u,programList:p,roleSystemList:h,roleCustomList:m,rolePredefinedList:f,allPrograms:g}=e;const{t:v}=Vg(),x=[{name:"Select Level",icon:(0,qt.jsx)(tK.A,{}),doneIcon:(0,qt.jsx)(JZ.A,{})},{name:"General Information",icon:(0,qt.jsx)(eK.A,{}),doneIcon:(0,qt.jsx)(JZ.A,{})},{name:"Assign Role",icon:(0,qt.jsx)(QZ.A,{}),doneIcon:(0,qt.jsx)(JZ.A,{})}],y=[{name:v("rpm_Staff"),url:ld.DOCTOR.USERS},{name:v("rpm_CreateUser"),url:""}];return(0,qt.jsxs)(op,{sx:{width:"100%"},children:[(0,qt.jsx)(op,{mb:2.5,children:(0,qt.jsx)(BH,{labels:y})}),(0,qt.jsx)(Ff,{container:!0,spacing:2,children:(0,qt.jsx)(Ff,{item:!0,xs:12,children:(0,qt.jsxs)(yH,{variant:"outlined",children:[(0,qt.jsx)(nW,{title:(0,qt.jsx)(Ff,{container:!0,spacing:2,alignItems:"center",children:(0,qt.jsx)(Ff,{item:!0,xs:!0,children:(0,qt.jsx)(Cf,{variant:"h6",component:"h6",children:v("rpm_CreateUser")})})}),sx:{py:1.5,bgcolor:"primary.theme.50"}}),(0,qt.jsxs)(wH,{sx:{py:4,":last-child":{pb:4}},children:[(0,qt.jsx)(VK,{activeStep:t,stepsAndIcon:x}),t===x.length?(0,qt.jsx)(tX,{handleResetStep:n}):(0,qt.jsx)(We.Fragment,{children:((e,t)=>{switch(e){case 0:default:return(0,qt.jsx)(rX,(0,i.A)({},t));case 1:return(0,qt.jsx)(JK,(0,i.A)({},t));case 2:return(0,qt.jsx)(qK,(0,i.A)({},t))}})(t,{activeStep:t,handleNextStep:r,handleBackStep:o,levelPayload:a,userPayload:s,rolePayload:l,toggleLevelPayload:c,toggleUserPayload:d,toggleRolePayload:u,roleSystemList:h,roleCustomList:m,rolePredefinedList:f,programList:p,allPrograms:g})})]})]})})})]})},oX=["first_name","username","last_name","email"];const aX=function(){const e=Nt(),{t:t}=Vg(),{enqueueSnackbar:n}=hi(),{programList:r}=(0,We.useContext)(DC),o=wt(ju),[a,s]=We.useState(0),[l,c]=We.useState({}),[d,u]=We.useState({}),[p,h]=We.useState({}),[m,f]=We.useState({}),[g,v]=We.useState(null),[x,y]=We.useState(null),[b,j]=We.useState(null),_=()=>{s(e=>e+1)},C=async(r,i)=>{let{setErrors:o}=i;const{first_name:a,username:s,last_name:l,email:d}=r,u=Ko(r,oX),p={email:d,first_name:a,last_name:l,path:r.program?"".concat(r.program):"/",username:s,phone_number:(null===r||void 0===r?void 0:r.mobile_code)+(null===r||void 0===r?void 0:r.mobile),attributes:Object.keys(u).reduce((e,t)=>(e[t]=Array.isArray(u[t])?u[t]:[u[t]],e),{})};try{const{data:r}=await e((e=>async t=>{t(na(!0));try{const t="".concat(ma.USERS);return await Fu(t,e)}finally{t(na(!1))}})(p));n(t("message:rpm_UserCreatedSuccessfully"),{variant:"success"}),r&&await e((h=null===r||void 0===r?void 0:r.id,async e=>{e(na(!0));try{const e="".concat(ca.utility,"/welcome-messages/to-doctor?id=").concat(h);return await Iu(e)}finally{e(na(!1))}})),c(r),_()}catch(m){const e=us(m,"response.data.field_errors",{}),r=us(m,"response.data.code","");cs(e)?cs(r)?n(t("error:rpm_UserCreateFailed"),{variant:"error"}):n(t(Vd(r)),{variant:"error"}):o(Ud(e))}var h};return We.useEffect(()=>{cs(l)||(async()=>{const{custom_role:t,system_role:r,predefined_role:i}=m;let o={role_ids:[]};"None"!==t&&o.role_ids.push(t),"None"!==r&&o.role_ids.push(r),"None"!==i&&o.role_ids.push(i);try{await e(Kg(l.id,o))}catch(a){n(a.message,{variant:"error"})}})()},[l]),We.useEffect(()=>{2!==a||cs(d)||((null===d||void 0===d?void 0:d.role_type)===(null===xd||void 0===xd?void 0:xd.PREDEFINED)?(async()=>{try{const{data:t}=await e(qg({q:"",per_page:1e3,kind:xd.PREDEFINED,programId:null!==d&&void 0!==d&&d.program?null===d||void 0===d?void 0:d.program:"/"})),{content:n}=t||{};y(n)}catch(t){console.log(t)}})():(async()=>{try{const{data:t}=await e(qg({q:"",per_page:1e3,kind:xd.CUSTOM,programId:null!==d&&void 0!==d&&d.program?null===d||void 0===d?void 0:d.program:"/"})),{content:n}=t||{};v(n)}catch(t){console.log(t)}})(),(async()=>{try{const{data:t}=await e(qg({kind:xd.SYSTEM})),{content:n}=t||{};j(n)}catch(t){console.log(t)}})())},[a,d]),We.useEffect(()=>{e(NC({activeMenuItem:"users"}))},[]),(0,qt.jsx)(iX,{activeStep:a,levelPayload:d,userPayload:p,rolePayload:m,handleNextStep:_,handleBackStep:()=>{s(e=>e-1)},handleResetStep:()=>{s(0),u({}),h({}),f({})},toggleLevelPayload:function(e){if(!cs(e)){const t=(0,i.A)((0,i.A)({},e),{},{program:"programTypeRole"===(null===e||void 0===e?void 0:e.role_level)?"/RPMCORE/".concat(e.program,"/"):e.program});u(t),_()}},toggleUserPayload:function(e){cs(e)||(h(e),_())},toggleRolePayload:function(e,t){let{setErrors:n}=t;if(!cs(e)){f(e);const t=(0,i.A)((0,i.A)((0,i.A)({},d),p),e);C(t,{setErrors:n})}},roleSystemList:b,roleCustomList:g,rolePredefinedList:x,programList:r,allPrograms:o})};var sX=n(36285);function lX(e){var t;let{userData:n,order:r,orderBy:o,setOrder:a,setOrderBy:s,dataParameter:l,checkState:c,onCheck:d,isSelection:u,nodata:p,assignCustomRoleHead:h,assignSystemRoleHead:m,pageDetails:f,toggleRoles:g,role:v,handleChangeRole:x,onProgramChange:y,roleCustomList:b,rolePredefinedList:j,fetchRoleCustomList:_,fetchRolePredefinedList:C,roleSystemList:w,fetchRoleSystemList:S,assignProgramList:A,allPrograms:k,onResetFilter:T,setRolesHeadcells:E,rolesSettingModal:M,rolesInitialHeadcells:O,handleRolesSettingModalToggle:R,isGroupRootAccess:P,clickedProgram:D,setClickedProgram:N}=e;const{t:L}=Vg(),I=cs(P)?A:k;return We.useEffect(()=>{cs(D)||y(null===D||void 0===D?void 0:D.code)},[D]),(0,qt.jsxs)(qt.Fragment,{children:[(0,qt.jsxs)(Ff,{container:!0,item:!0,xs:12,justifyContent:"space-between",children:[(0,qt.jsx)(Ff,{item:!0,xs:!0,container:!0,spacing:2.5,children:(v===xd.CUSTOM||v===xd.PREDEFINED)&&(0,qt.jsx)(qt.Fragment,{children:(0,qt.jsx)(Ff,{item:!0,xs:12,md:6,lg:4,children:(0,qt.jsx)(aj,{fullWidth:!0,size:"small",margin:"dense",id:"course",name:"course",value:D,options:I,isOptionEqualToValue:(e,t)=>e.id===t.id,getOptionLabel:e=>(null===e||void 0===e?void 0:e.display_name)||"",renderOption:(e,t)=>(0,We.createElement)(op,(0,i.A)((0,i.A)({component:"li"},e),{},{key:null===t||void 0===t?void 0:t.code}),(0,qt.jsx)(op,{children:(0,qt.jsx)(Cf,{variant:"body1",component:"p",children:null===t||void 0===t?void 0:t.display_name})})),onChange:async(e,t,n)=>{y(null===t||void 0===t?void 0:t.code),"clear"===n&&(N(null),T())},renderInput:e=>(0,qt.jsx)(Q_,(0,i.A)((0,i.A)({},e),{},{placeholder:L("rpm_SelectProgram")+"..."}))})})})}),(0,qt.jsx)(Ff,{item:!0,md:4,lg:3,children:(0,qt.jsxs)(op,{mb:3,display:"flex",gap:2,children:[(0,qt.jsxs)(G_,{as:G_,fullWidth:!0,size:"small",id:"role",name:"role",variant:"outlined",value:v,onChange:x,disabled:!(null!==n&&void 0!==n&&n.isAdmin),endAdornment:(0,qt.jsx)(tw,{position:"end",sx:{position:"absolute",right:"28px"},children:(0,qt.jsx)(sy,{title:L("message:rpm_RoleHelp"),placement:"top",children:(0,qt.jsx)(wh,{size:"small",disableRipple:!0,sx:{p:0},children:(0,qt.jsx)(pM.A,{fontSize:"small"})})})}),children:[(0,qt.jsx)(mf,{value:"CUSTOM",children:"Custom Role"}),(0,qt.jsx)(mf,{value:"SYSTEM",children:"System Role"}),(0,qt.jsx)(mf,{value:"PREDEFINED",children:"Predefined Role"})]}),v===xd.CUSTOM&&(0,qt.jsx)(sy,{title:L("rpm_TableCellSetting"),children:(0,qt.jsx)(sv,{sx:{boxShadow:"none",width:32,height:32,minHeight:"auto"},size:"small",color:"primary",onClick:R,children:(0,qt.jsx)(YC.A,{fontSize:"small",sx:{width:16,height:16}})})})]})})]}),(0,qt.jsx)(Ff,{container:!0,spacing:2.5,children:v===xd.CUSTOM||v===xd.PREDEFINED?(0,qt.jsxs)(Ff,{item:!0,xs:12,children:[(0,qt.jsx)(op,{children:(0,qt.jsx)(UT,{order:r,orderBy:o,setOrder:a,setOrderBy:s,dataParameter:l,selected:c,setSelected:d,isSelection:u,noDataImage:p,pageDetails:f,data:v===xd.CUSTOM?b:j||[],headCells:null===h||void 0===h?void 0:h.filter(e=>O.includes(e.id)),fetchList:v===xd.CUSTOM?_:C,skeletonVrows:6,className:"theme_scroll",children:null===(t=v===xd.CUSTOM?b:j||[])||void 0===t?void 0:t.map(e=>(0,qt.jsxs)(cw,{sx:{"&:last-child td, &:last-child th":{border:0}},children:[u&&(0,qt.jsx)(gw,{padding:"checkbox",children:(0,qt.jsx)(Dw,{onChange:d,checked:c.includes(e.id.toString()),name:e.id.toString(),color:"primary"})}),O.includes("role_name")&&(0,qt.jsx)(gw,{children:e.name}),O.includes("description")&&(0,qt.jsx)(gw,{sx:{maxWidth:"250px",whiteSpace:"normal"},children:e.description||"NA"}),O.includes("access_layer")&&(0,qt.jsx)(gw,{sx:{maxWidth:"250px",whiteSpace:"normal"},children:e.group.path}),O.includes("action")&&(0,qt.jsx)(gw,{width:"250",children:g(e)})]},e.id))})}),(0,qt.jsx)(TE,{open:M,allHeadCells:h,initialHeadcells:O,setHeadcells:E,onClose:R})]}):(0,qt.jsx)(Ff,{item:!0,xs:12,children:(0,qt.jsx)(op,{children:(0,qt.jsx)(UT,{order:r,orderBy:o,setOrder:a,setOrderBy:s,dataParameter:l,selected:c,setSelected:d,isSelection:u,noDataImage:p,pageDetails:f,data:w,headCells:m,fetchList:S,skeletonVrows:6,className:"theme_scroll",children:null===w||void 0===w?void 0:w.map(e=>(0,qt.jsxs)(cw,{sx:{"&:last-child td, &:last-child th":{border:0}},children:[u&&(0,qt.jsx)(gw,{padding:"checkbox",children:(0,qt.jsx)(Dw,{onChange:d,checked:c.includes(e.id.toString()),name:e.id.toString(),color:"primary"})}),(0,qt.jsx)(gw,{children:e.name}),(0,qt.jsx)(gw,{sx:{maxWidth:"250px",whiteSpace:"normal"},children:e.description}),(0,qt.jsx)(gw,{width:"250",children:g(e)})]},e.id))})})})})]})}lX.defaultProps={userData:{},rootAccess:!1,pageDetails:{},order:"",orderBy:"",setOrder:()=>{},setOrderBy:()=>{},dataParameter:"",checkState:"",onCheck:()=>{},isSelection:"",nodata:"",assignCustomRoleHead:[],assignCustomRoleList:[],assignSystemRoleHead:[],toggleRoles:()=>{},role:"",assignUserRoles:[],handleChangeRole:()=>{},roleCustomList:[],rolePredefinedList:[],fetchRoleCustomList:()=>{},fetchRolePredefinedList:()=>{},roleSystemList:[],fetchRoleSystemList:()=>{},assignProgramList:()=>{},onApplyFilter:()=>{},onResetFilter:()=>{},setRolesHeadcells:()=>{},rolesSettingModal:!1,rolesInitialHeadcells:[],allPrograms:[],handleRolesSettingModalToggle:()=>{},isGroupRootAccess:{},clickedProgram:{},setClickedProgram:()=>{}};const cX=lX;var dX=n(59131);const uX=function(e){let{user:t,revokeAccess:n}=e;return(0,qt.jsx)(Ff,{container:!0,spacing:2,justifyContent:"center",children:(0,qt.jsx)(Ff,{item:!0,md:6,children:(0,qt.jsxs)(op,{sx:{px:2,py:{xs:4,md:6},bgcolor:"secondary.theme.50",textAlign:"center",borderRadius:1},children:[(0,qt.jsx)(op,{mb:2,children:(0,qt.jsx)(Ny,{sx:{bgcolor:"lightGreen.700",width:140,height:140,mx:"auto"},children:(0,qt.jsx)(dX.A,{sx:{fontSize:64}})})}),(0,qt.jsx)(dM,{severity:"warning",icon:!1,sx:e=>({mb:2,py:0,px:1,display:"inline-flex",fontSize:e.spacing(1.75),"& .MuiAlert-message":{p:e.spacing(1)}}),children:(0,qt.jsx)("strong",{children:"Current Access Level : Client"})}),(0,qt.jsx)(Cf,{variant:"h6",component:"h6",children:"You have access to all the programs"}),(0,qt.jsx)(Cf,{variant:"body2",component:"p",children:null===t||void 0===t?void 0:t.email}),!1]})})})},pX={version:4,country_calling_codes:{1:["US","AG","AI","AS","BB","BM","BS","CA","DM","DO","GD","GU","JM","KN","KY","LC","MP","MS","PR","SX","TC","TT","VC","VG","VI"],7:["RU","KZ"],20:["EG"],27:["ZA"],30:["GR"],31:["NL"],32:["BE"],33:["FR"],34:["ES"],36:["HU"],39:["IT","VA"],40:["RO"],41:["CH"],43:["AT"],44:["GB","GG","IM","JE"],45:["DK"],46:["SE"],47:["NO","SJ"],48:["PL"],49:["DE"],51:["PE"],52:["MX"],53:["CU"],54:["AR"],55:["BR"],56:["CL"],57:["CO"],58:["VE"],60:["MY"],61:["AU","CC","CX"],62:["ID"],63:["PH"],64:["NZ"],65:["SG"],66:["TH"],81:["JP"],82:["KR"],84:["VN"],86:["CN"],90:["TR"],91:["IN"],92:["PK"],93:["AF"],94:["LK"],95:["MM"],98:["IR"],211:["SS"],212:["MA","EH"],213:["DZ"],216:["TN"],218:["LY"],220:["GM"],221:["SN"],222:["MR"],223:["ML"],224:["GN"],225:["CI"],226:["BF"],227:["NE"],228:["TG"],229:["BJ"],230:["MU"],231:["LR"],232:["SL"],233:["GH"],234:["NG"],235:["TD"],236:["CF"],237:["CM"],238:["CV"],239:["ST"],240:["GQ"],241:["GA"],242:["CG"],243:["CD"],244:["AO"],245:["GW"],246:["IO"],247:["AC"],248:["SC"],249:["SD"],250:["RW"],251:["ET"],252:["SO"],253:["DJ"],254:["KE"],255:["TZ"],256:["UG"],257:["BI"],258:["MZ"],260:["ZM"],261:["MG"],262:["RE","YT"],263:["ZW"],264:["NA"],265:["MW"],266:["LS"],267:["BW"],268:["SZ"],269:["KM"],290:["SH","TA"],291:["ER"],297:["AW"],298:["FO"],299:["GL"],350:["GI"],351:["PT"],352:["LU"],353:["IE"],354:["IS"],355:["AL"],356:["MT"],357:["CY"],358:["FI","AX"],359:["BG"],370:["LT"],371:["LV"],372:["EE"],373:["MD"],374:["AM"],375:["BY"],376:["AD"],377:["MC"],378:["SM"],380:["UA"],381:["RS"],382:["ME"],383:["XK"],385:["HR"],386:["SI"],387:["BA"],389:["MK"],420:["CZ"],421:["SK"],423:["LI"],500:["FK"],501:["BZ"],502:["GT"],503:["SV"],504:["HN"],505:["NI"],506:["CR"],507:["PA"],508:["PM"],509:["HT"],590:["GP","BL","MF"],591:["BO"],592:["GY"],593:["EC"],594:["GF"],595:["PY"],596:["MQ"],597:["SR"],598:["UY"],599:["CW","BQ"],670:["TL"],672:["NF"],673:["BN"],674:["NR"],675:["PG"],676:["TO"],677:["SB"],678:["VU"],679:["FJ"],680:["PW"],681:["WF"],682:["CK"],683:["NU"],685:["WS"],686:["KI"],687:["NC"],688:["TV"],689:["PF"],690:["TK"],691:["FM"],692:["MH"],850:["KP"],852:["HK"],853:["MO"],855:["KH"],856:["LA"],880:["BD"],886:["TW"],960:["MV"],961:["LB"],962:["JO"],963:["SY"],964:["IQ"],965:["KW"],966:["SA"],967:["YE"],968:["OM"],970:["PS"],971:["AE"],972:["IL"],973:["BH"],974:["QA"],975:["BT"],976:["MN"],977:["NP"],992:["TJ"],993:["TM"],994:["AZ"],995:["GE"],996:["KG"],998:["UZ"]},countries:{AC:["247","00","(?:[01589]\\d|[46])\\d{4}",[5,6]],AD:["376","00","(?:1|6\\d)\\d{7}|[135-9]\\d{5}",[6,8,9],[["(\\d{3})(\\d{3})","$1 $2",["[135-9]"]],["(\\d{4})(\\d{4})","$1 $2",["1"]],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["6"]]]],AE:["971","00","(?:[4-7]\\d|9[0-689])\\d{7}|800\\d{2,9}|[2-4679]\\d{7}",[5,6,7,8,9,10,11,12],[["(\\d{3})(\\d{2,9})","$1 $2",["60|8"]],["(\\d)(\\d{3})(\\d{4})","$1 $2 $3",["[236]|[479][2-8]"],"0$1"],["(\\d{3})(\\d)(\\d{5})","$1 $2 $3",["[479]"]],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["5"],"0$1"]],"0"],AF:["93","00","[2-7]\\d{8}",[9],[["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["[2-7]"],"0$1"]],"0"],AG:["1","011","(?:268|[58]\\d\\d|900)\\d{7}",[10],0,"1",0,"([457]\\d{6})$|1","268$1",0,"268"],AI:["1","011","(?:264|[58]\\d\\d|900)\\d{7}",[10],0,"1",0,"([2457]\\d{6})$|1","264$1",0,"264"],AL:["355","00","(?:700\\d\\d|900)\\d{3}|8\\d{5,7}|(?:[2-5]|6\\d)\\d{7}",[6,7,8,9],[["(\\d{3})(\\d{3,4})","$1 $2",["80|9"],"0$1"],["(\\d)(\\d{3})(\\d{4})","$1 $2 $3",["4[2-6]"],"0$1"],["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["[2358][2-5]|4"],"0$1"],["(\\d{3})(\\d{5})","$1 $2",["[23578]"],"0$1"],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["6"],"0$1"]],"0"],AM:["374","00","(?:[1-489]\\d|55|60|77)\\d{6}",[8],[["(\\d{3})(\\d{2})(\\d{3})","$1 $2 $3",["[89]0"],"0 $1"],["(\\d{3})(\\d{5})","$1 $2",["2|3[12]"],"(0$1)"],["(\\d{2})(\\d{6})","$1 $2",["1|47"],"(0$1)"],["(\\d{2})(\\d{6})","$1 $2",["[3-9]"],"0$1"]],"0"],AO:["244","00","[29]\\d{8}",[9],[["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[29]"]]]],AR:["54","00","(?:11|[89]\\d\\d)\\d{8}|[2368]\\d{9}",[10,11],[["(\\d{4})(\\d{2})(\\d{4})","$1 $2-$3",["2(?:2[024-9]|3[0-59]|47|6[245]|9[02-8])|3(?:3[28]|4[03-9]|5[2-46-8]|7[1-578]|8[2-9])","2(?:[23]02|6(?:[25]|4[6-8])|9(?:[02356]|4[02568]|72|8[23]))|3(?:3[28]|4(?:[04679]|3[5-8]|5[4-68]|8[2379])|5(?:[2467]|3[237]|8[2-5])|7[1-578]|8(?:[2469]|3[2578]|5[4-8]|7[36-8]|8[5-8]))|2(?:2[24-9]|3[1-59]|47)","2(?:[23]02|6(?:[25]|4(?:64|[78]))|9(?:[02356]|4(?:[0268]|5[2-6])|72|8[23]))|3(?:3[28]|4(?:[04679]|3[78]|5(?:4[46]|8)|8[2379])|5(?:[2467]|3[237]|8[23])|7[1-578]|8(?:[2469]|3[278]|5[56][46]|86[3-6]))|2(?:2[24-9]|3[1-59]|47)|38(?:[58][78]|7[378])|3(?:4[35][56]|58[45]|8(?:[38]5|54|76))[4-6]","2(?:[23]02|6(?:[25]|4(?:64|[78]))|9(?:[02356]|4(?:[0268]|5[2-6])|72|8[23]))|3(?:3[28]|4(?:[04679]|3(?:5(?:4[0-25689]|[56])|[78])|58|8[2379])|5(?:[2467]|3[237]|8(?:[23]|4(?:[45]|60)|5(?:4[0-39]|5|64)))|7[1-578]|8(?:[2469]|3[278]|54(?:4|5[13-7]|6[89])|86[3-6]))|2(?:2[24-9]|3[1-59]|47)|38(?:[58][78]|7[378])|3(?:454|85[56])[46]|3(?:4(?:36|5[56])|8(?:[38]5|76))[4-6]"],"0$1",1],["(\\d{2})(\\d{4})(\\d{4})","$1 $2-$3",["1"],"0$1",1],["(\\d{3})(\\d{3})(\\d{4})","$1-$2-$3",["[68]"],"0$1"],["(\\d{3})(\\d{3})(\\d{4})","$1 $2-$3",["[23]"],"0$1",1],["(\\d)(\\d{4})(\\d{2})(\\d{4})","$2 15-$3-$4",["9(?:2[2-469]|3[3-578])","9(?:2(?:2[024-9]|3[0-59]|47|6[245]|9[02-8])|3(?:3[28]|4[03-9]|5[2-46-8]|7[1-578]|8[2-9]))","9(?:2(?:[23]02|6(?:[25]|4[6-8])|9(?:[02356]|4[02568]|72|8[23]))|3(?:3[28]|4(?:[04679]|3[5-8]|5[4-68]|8[2379])|5(?:[2467]|3[237]|8[2-5])|7[1-578]|8(?:[2469]|3[2578]|5[4-8]|7[36-8]|8[5-8])))|92(?:2[24-9]|3[1-59]|47)","9(?:2(?:[23]02|6(?:[25]|4(?:64|[78]))|9(?:[02356]|4(?:[0268]|5[2-6])|72|8[23]))|3(?:3[28]|4(?:[04679]|3[78]|5(?:4[46]|8)|8[2379])|5(?:[2467]|3[237]|8[23])|7[1-578]|8(?:[2469]|3[278]|5(?:[56][46]|[78])|7[378]|8(?:6[3-6]|[78]))))|92(?:2[24-9]|3[1-59]|47)|93(?:4[35][56]|58[45]|8(?:[38]5|54|76))[4-6]","9(?:2(?:[23]02|6(?:[25]|4(?:64|[78]))|9(?:[02356]|4(?:[0268]|5[2-6])|72|8[23]))|3(?:3[28]|4(?:[04679]|3(?:5(?:4[0-25689]|[56])|[78])|5(?:4[46]|8)|8[2379])|5(?:[2467]|3[237]|8(?:[23]|4(?:[45]|60)|5(?:4[0-39]|5|64)))|7[1-578]|8(?:[2469]|3[278]|5(?:4(?:4|5[13-7]|6[89])|[56][46]|[78])|7[378]|8(?:6[3-6]|[78]))))|92(?:2[24-9]|3[1-59]|47)|93(?:4(?:36|5[56])|8(?:[38]5|76))[4-6]"],"0$1",0,"$1 $2 $3-$4"],["(\\d)(\\d{2})(\\d{4})(\\d{4})","$2 15-$3-$4",["91"],"0$1",0,"$1 $2 $3-$4"],["(\\d{3})(\\d{3})(\\d{5})","$1-$2-$3",["8"],"0$1"],["(\\d)(\\d{3})(\\d{3})(\\d{4})","$2 15-$3-$4",["9"],"0$1",0,"$1 $2 $3-$4"]],"0",0,"0?(?:(11|2(?:2(?:02?|[13]|2[13-79]|4[1-6]|5[2457]|6[124-8]|7[1-4]|8[13-6]|9[1267])|3(?:02?|1[467]|2[03-6]|3[13-8]|[49][2-6]|5[2-8]|[67])|4(?:7[3-578]|9)|6(?:[0136]|2[24-6]|4[6-8]?|5[15-8])|80|9(?:0[1-3]|[19]|2\\d|3[1-6]|4[02568]?|5[2-4]|6[2-46]|72?|8[23]?))|3(?:3(?:2[79]|6|8[2578])|4(?:0[0-24-9]|[12]|3[5-8]?|4[24-7]|5[4-68]?|6[02-9]|7[126]|8[2379]?|9[1-36-8])|5(?:1|2[1245]|3[237]?|4[1-46-9]|6[2-4]|7[1-6]|8[2-5]?)|6[24]|7(?:[069]|1[1568]|2[15]|3[145]|4[13]|5[14-8]|7[2-57]|8[126])|8(?:[01]|2[15-7]|3[2578]?|4[13-6]|5[4-8]?|6[1-357-9]|7[36-8]?|8[5-8]?|9[124])))15)?","9$1"],AS:["1","011","(?:[58]\\d\\d|684|900)\\d{7}",[10],0,"1",0,"([267]\\d{6})$|1","684$1",0,"684"],AT:["43","00","1\\d{3,12}|2\\d{6,12}|43(?:(?:0\\d|5[02-9])\\d{3,9}|2\\d{4,5}|[3467]\\d{4}|8\\d{4,6}|9\\d{4,7})|5\\d{4,12}|8\\d{7,12}|9\\d{8,12}|(?:[367]\\d|4[0-24-9])\\d{4,11}",[4,5,6,7,8,9,10,11,12,13],[["(\\d)(\\d{3,12})","$1 $2",["1(?:11|[2-9])"],"0$1"],["(\\d{3})(\\d{2})","$1 $2",["517"],"0$1"],["(\\d{2})(\\d{3,5})","$1 $2",["5[079]"],"0$1"],["(\\d{3})(\\d{3,10})","$1 $2",["(?:31|4)6|51|6(?:48|5[0-3579]|[6-9])|7(?:20|32|8)|[89]","(?:31|4)6|51|6(?:485|5[0-3579]|[6-9])|7(?:20|32|8)|[89]"],"0$1"],["(\\d{4})(\\d{3,9})","$1 $2",["[2-467]|5[2-6]"],"0$1"],["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["5"],"0$1"],["(\\d{2})(\\d{4})(\\d{4,7})","$1 $2 $3",["5"],"0$1"]],"0"],AU:["61","001[14-689]|14(?:1[14]|34|4[17]|[56]6|7[47]|88)0011","1(?:[0-79]\\d{7}(?:\\d(?:\\d{2})?)?|8[0-24-9]\\d{7})|[2-478]\\d{8}|1\\d{4,7}",[5,6,7,8,9,10,12],[["(\\d{2})(\\d{3,4})","$1 $2",["16"],"0$1"],["(\\d{2})(\\d{3})(\\d{2,4})","$1 $2 $3",["16"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["14|4"],"0$1"],["(\\d)(\\d{4})(\\d{4})","$1 $2 $3",["[2378]"],"(0$1)"],["(\\d{4})(\\d{3})(\\d{3})","$1 $2 $3",["1(?:30|[89])"]]],"0",0,"(183[12])|0",0,0,0,[["(?:(?:2(?:(?:[0-26-9]\\d|3[0-8]|5[0135-9])\\d|4(?:[02-9]\\d|10))|3(?:(?:[0-3589]\\d|6[1-9]|7[0-35-9])\\d|4(?:[0-578]\\d|90))|7(?:[013-57-9]\\d|2[0-8])\\d)\\d\\d|8(?:51(?:0(?:0[03-9]|[12479]\\d|3[2-9]|5[0-8]|6[1-9]|8[0-7])|1(?:[0235689]\\d|1[0-69]|4[0-589]|7[0-47-9])|2(?:0[0-79]|[18][13579]|2[14-9]|3[0-46-9]|[4-6]\\d|7[89]|9[0-4])|[34]\\d\\d)|(?:6[0-8]|[78]\\d)\\d{3}|9(?:[02-9]\\d{3}|1(?:(?:[0-58]\\d|6[0135-9])\\d|7(?:0[0-24-9]|[1-9]\\d)|9(?:[0-46-9]\\d|5[0-79])))))\\d{3}",[9]],["4(?:79[01]|83[0-389]|94[0-478])\\d{5}|4(?:[0-36]\\d|4[047-9]|[58][0-24-9]|7[02-8]|9[0-37-9])\\d{6}",[9]],["180(?:0\\d{3}|2)\\d{3}",[7,10]],["190[0-26]\\d{6}",[10]],0,0,0,["163\\d{2,6}",[5,6,7,8,9]],["14(?:5(?:1[0458]|[23][458])|71\\d)\\d{4}",[9]],["13(?:00\\d{6}(?:\\d{2})?|45[0-4]\\d{3})|13\\d{4}",[6,8,10,12]]],"0011"],AW:["297","00","(?:[25-79]\\d\\d|800)\\d{4}",[7],[["(\\d{3})(\\d{4})","$1 $2",["[25-9]"]]]],AX:["358","00|99(?:[01469]|5(?:[14]1|3[23]|5[59]|77|88|9[09]))","2\\d{4,9}|35\\d{4,5}|(?:60\\d\\d|800)\\d{4,6}|7\\d{5,11}|(?:[14]\\d|3[0-46-9]|50)\\d{4,8}",[5,6,7,8,9,10,11,12],0,"0",0,0,0,0,"18",0,"00"],AZ:["994","00","365\\d{6}|(?:[124579]\\d|60|88)\\d{7}",[9],[["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["90"],"0$1"],["(\\d{2})(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3 $4",["1[28]|2|365|46","1[28]|2|365[45]|46","1[28]|2|365(?:4|5[02])|46"],"(0$1)"],["(\\d{2})(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[13-9]"],"0$1"]],"0"],BA:["387","00","6\\d{8}|(?:[35689]\\d|49|70)\\d{6}",[8,9],[["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["6[1-3]|[7-9]"],"0$1"],["(\\d{2})(\\d{3})(\\d{3})","$1 $2-$3",["[3-5]|6[56]"],"0$1"],["(\\d{2})(\\d{2})(\\d{2})(\\d{3})","$1 $2 $3 $4",["6"],"0$1"]],"0"],BB:["1","011","(?:246|[58]\\d\\d|900)\\d{7}",[10],0,"1",0,"([2-9]\\d{6})$|1","246$1",0,"246"],BD:["880","00","[1-469]\\d{9}|8[0-79]\\d{7,8}|[2-79]\\d{8}|[2-9]\\d{7}|[3-9]\\d{6}|[57-9]\\d{5}",[6,7,8,9,10],[["(\\d{2})(\\d{4,6})","$1-$2",["31[5-8]|[459]1"],"0$1"],["(\\d{3})(\\d{3,7})","$1-$2",["3(?:[67]|8[013-9])|4(?:6[168]|7|[89][18])|5(?:6[128]|9)|6(?:[15]|28|4[14])|7[2-589]|8(?:0[014-9]|[12])|9[358]|(?:3[2-5]|4[235]|5[2-578]|6[0389]|76|8[3-7]|9[24])1|(?:44|66)[01346-9]"],"0$1"],["(\\d{4})(\\d{3,6})","$1-$2",["[13-9]|2[23]"],"0$1"],["(\\d)(\\d{7,8})","$1-$2",["2"],"0$1"]],"0"],BE:["32","00","4\\d{8}|[1-9]\\d{7}",[8,9],[["(\\d{3})(\\d{2})(\\d{3})","$1 $2 $3",["(?:80|9)0"],"0$1"],["(\\d)(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[239]|4[23]"],"0$1"],["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[15-8]"],"0$1"],["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["4"],"0$1"]],"0"],BF:["226","00","(?:[025-7]\\d|44)\\d{6}",[8],[["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[024-7]"]]]],BG:["359","00","00800\\d{7}|[2-7]\\d{6,7}|[89]\\d{6,8}|2\\d{5}",[6,7,8,9,12],[["(\\d)(\\d)(\\d{2})(\\d{2})","$1 $2 $3 $4",["2"],"0$1"],["(\\d{3})(\\d{4})","$1 $2",["43[1-6]|70[1-9]"],"0$1"],["(\\d)(\\d{3})(\\d{3,4})","$1 $2 $3",["2"],"0$1"],["(\\d{2})(\\d{3})(\\d{2,3})","$1 $2 $3",["[356]|4[124-7]|7[1-9]|8[1-6]|9[1-7]"],"0$1"],["(\\d{3})(\\d{2})(\\d{3})","$1 $2 $3",["(?:70|8)0"],"0$1"],["(\\d{3})(\\d{3})(\\d{2})","$1 $2 $3",["43[1-7]|7"],"0$1"],["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["[48]|9[08]"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["9"],"0$1"]],"0"],BH:["973","00","[136-9]\\d{7}",[8],[["(\\d{4})(\\d{4})","$1 $2",["[13679]|8[02-4679]"]]]],BI:["257","00","(?:[267]\\d|31)\\d{6}",[8],[["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[2367]"]]]],BJ:["229","00","(?:01\\d|[24-689])\\d{7}",[8,10],[["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[24-689]"]],["(\\d{2})(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4 $5",["0"]]]],BL:["590","00","(?:590\\d|7090)\\d{5}|(?:69|80|9\\d)\\d{7}",[9],0,"0",0,0,0,0,0,[["590(?:2[7-9]|3[3-7]|5[12]|87)\\d{4}"],["(?:69(?:0\\d\\d|1(?:2[2-9]|3[0-5])|4(?:0[89]|1[2-6]|9\\d)|6(?:1[016-9]|5[0-4]|[67]\\d))|7090[0-4])\\d{4}"],["80[0-5]\\d{6}"],0,0,0,0,0,["9(?:(?:39[5-7]|76[018])\\d|475[0-6])\\d{4}"]]],BM:["1","011","(?:441|[58]\\d\\d|900)\\d{7}",[10],0,"1",0,"([2-9]\\d{6})$|1","441$1",0,"441"],BN:["673","00","[2-578]\\d{6}",[7],[["(\\d{3})(\\d{4})","$1 $2",["[2-578]"]]]],BO:["591","00(?:1\\d)?","8001\\d{5}|(?:[2-467]\\d|50)\\d{6}",[8,9],[["(\\d)(\\d{7})","$1 $2",["[235]|4[46]"]],["(\\d{8})","$1",["[67]"]],["(\\d{3})(\\d{2})(\\d{4})","$1 $2 $3",["8"]]],"0",0,"0(1\\d)?"],BQ:["599","00","(?:[34]1|7\\d)\\d{5}",[7],0,0,0,0,0,0,"[347]"],BR:["55","00(?:1[245]|2[1-35]|31|4[13]|[56]5|99)","[1-467]\\d{9,10}|55[0-46-9]\\d{8}|[34]\\d{7}|55\\d{7,8}|(?:5[0-46-9]|[89]\\d)\\d{7,9}",[8,9,10,11],[["(\\d{4})(\\d{4})","$1-$2",["300|4(?:0[02]|37|86)","300|4(?:0(?:0|20)|370|864)"]],["(\\d{3})(\\d{2,3})(\\d{4})","$1 $2 $3",["(?:[358]|90)0"],"0$1"],["(\\d{2})(\\d{4})(\\d{4})","$1 $2-$3",["(?:[14689][1-9]|2[12478]|3[1-578]|5[13-5]|7[13-579])[2-57]"],"($1)"],["(\\d{2})(\\d{5})(\\d{4})","$1 $2-$3",["[16][1-9]|[2-57-9]"],"($1)"]],"0",0,"(?:0|90)(?:(1[245]|2[1-35]|31|4[13]|[56]5|99)(\\d{10,11}))?","$2"],BS:["1","011","(?:242|[58]\\d\\d|900)\\d{7}",[10],0,"1",0,"([3-8]\\d{6})$|1","242$1",0,"242"],BT:["975","00","[178]\\d{7}|[2-8]\\d{6}",[7,8],[["(\\d)(\\d{3})(\\d{3})","$1 $2 $3",["[2-6]|7[246]|8[2-4]"]],["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["1[67]|[78]"]]]],BW:["267","00","(?:0800|(?:[37]|800)\\d)\\d{6}|(?:[2-6]\\d|90)\\d{5}",[7,8,10],[["(\\d{2})(\\d{5})","$1 $2",["90"]],["(\\d{3})(\\d{4})","$1 $2",["[24-6]|3[15-9]"]],["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["[37]"]],["(\\d{4})(\\d{3})(\\d{3})","$1 $2 $3",["0"]],["(\\d{3})(\\d{4})(\\d{3})","$1 $2 $3",["8"]]]],BY:["375","810","(?:[12]\\d|33|44|902)\\d{7}|8(?:0[0-79]\\d{5,7}|[1-7]\\d{9})|8(?:1[0-489]|[5-79]\\d)\\d{7}|8[1-79]\\d{6,7}|8[0-79]\\d{5}|8\\d{5}",[6,7,8,9,10,11],[["(\\d{3})(\\d{3})","$1 $2",["800"],"8 $1"],["(\\d{3})(\\d{2})(\\d{2,4})","$1 $2 $3",["800"],"8 $1"],["(\\d{4})(\\d{2})(\\d{3})","$1 $2-$3",["1(?:5[169]|6[3-5]|7[179])|2(?:1[35]|2[34]|3[3-5])","1(?:5[169]|6(?:3[1-3]|4|5[125])|7(?:1[3-9]|7[0-24-6]|9[2-7]))|2(?:1[35]|2[34]|3[3-5])"],"8 0$1"],["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2-$3-$4",["1(?:[56]|7[467])|2[1-3]"],"8 0$1"],["(\\d{2})(\\d{3})(\\d{2})(\\d{2})","$1 $2-$3-$4",["[1-4]"],"8 0$1"],["(\\d{3})(\\d{3,4})(\\d{4})","$1 $2 $3",["[89]"],"8 $1"]],"8",0,"0|80?",0,0,0,0,"8~10"],BZ:["501","00","(?:0800\\d|[2-8])\\d{6}",[7,11],[["(\\d{3})(\\d{4})","$1-$2",["[2-8]"]],["(\\d)(\\d{3})(\\d{4})(\\d{3})","$1-$2-$3-$4",["0"]]]],CA:["1","011","[2-9]\\d{9}|3\\d{6}",[7,10],0,"1",0,0,0,0,0,[["(?:2(?:04|[23]6|[48]9|5[07]|63)|3(?:06|43|54|6[578]|82)|4(?:03|1[68]|[26]8|3[178]|50|74)|5(?:06|1[49]|48|79|8[147])|6(?:04|[18]3|39|47|72)|7(?:0[59]|42|53|78|8[02])|8(?:[06]7|19|25|7[39])|9(?:0[25]|42))[2-9]\\d{6}",[10]],["",[10]],["8(?:00|33|44|55|66|77|88)[2-9]\\d{6}",[10]],["900[2-9]\\d{6}",[10]],["52(?:3(?:[2-46-9][02-9]\\d|5(?:[02-46-9]\\d|5[0-46-9]))|4(?:[2-478][02-9]\\d|5(?:[034]\\d|2[024-9]|5[0-46-9])|6(?:0[1-9]|[2-9]\\d)|9(?:[05-9]\\d|2[0-5]|49)))\\d{4}|52[34][2-9]1[02-9]\\d{4}|(?:5(?:2[125-9]|33|44|66|77|88)|6(?:22|33))[2-9]\\d{6}",[10]],0,["310\\d{4}",[7]],0,["600[2-9]\\d{6}",[10]]]],CC:["61","001[14-689]|14(?:1[14]|34|4[17]|[56]6|7[47]|88)0011","1(?:[0-79]\\d{8}(?:\\d{2})?|8[0-24-9]\\d{7})|[148]\\d{8}|1\\d{5,7}",[6,7,8,9,10,12],0,"0",0,"([59]\\d{7})$|0","8$1",0,0,[["8(?:51(?:0(?:02|31|60|89)|1(?:18|76)|223)|91(?:0(?:1[0-2]|29)|1(?:[28]2|50|79)|2(?:10|64)|3(?:[06]8|22)|4[29]8|62\\d|70[23]|959))\\d{3}",[9]],["4(?:79[01]|83[0-389]|94[0-478])\\d{5}|4(?:[0-36]\\d|4[047-9]|[58][0-24-9]|7[02-8]|9[0-37-9])\\d{6}",[9]],["180(?:0\\d{3}|2)\\d{3}",[7,10]],["190[0-26]\\d{6}",[10]],0,0,0,0,["14(?:5(?:1[0458]|[23][458])|71\\d)\\d{4}",[9]],["13(?:00\\d{6}(?:\\d{2})?|45[0-4]\\d{3})|13\\d{4}",[6,8,10,12]]],"0011"],CD:["243","00","(?:(?:[189]|5\\d)\\d|2)\\d{7}|[1-68]\\d{6}",[7,8,9,10],[["(\\d{2})(\\d{2})(\\d{3})","$1 $2 $3",["88"],"0$1"],["(\\d{2})(\\d{5})","$1 $2",["[1-6]"],"0$1"],["(\\d{2})(\\d{2})(\\d{4})","$1 $2 $3",["2"],"0$1"],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["1"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[89]"],"0$1"],["(\\d{2})(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3 $4",["5"],"0$1"]],"0"],CF:["236","00","(?:[27]\\d{3}|8776)\\d{4}",[8],[["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[278]"]]]],CG:["242","00","222\\d{6}|(?:0\\d|80)\\d{7}",[9],[["(\\d)(\\d{4})(\\d{4})","$1 $2 $3",["8"]],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["[02]"]]]],CH:["41","00","8\\d{11}|[2-9]\\d{8}",[9,12],[["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["8[047]|90"],"0$1"],["(\\d{2})(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[2-79]|81"],"0$1"],["(\\d{3})(\\d{2})(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3 $4 $5",["8"],"0$1"]],"0"],CI:["225","00","[02]\\d{9}",[10],[["(\\d{2})(\\d{2})(\\d)(\\d{5})","$1 $2 $3 $4",["2"]],["(\\d{2})(\\d{2})(\\d{2})(\\d{4})","$1 $2 $3 $4",["0"]]]],CK:["682","00","[2-578]\\d{4}",[5],[["(\\d{2})(\\d{3})","$1 $2",["[2-578]"]]]],CL:["56","(?:0|1(?:1[0-69]|2[02-5]|5[13-58]|69|7[0167]|8[018]))0","12300\\d{6}|6\\d{9,10}|[2-9]\\d{8}",[9,10,11],[["(\\d{5})(\\d{4})","$1 $2",["219","2196"],"($1)"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["60|809"]],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["44"]],["(\\d)(\\d{4})(\\d{4})","$1 $2 $3",["2[1-36]"],"($1)"],["(\\d)(\\d{4})(\\d{4})","$1 $2 $3",["9(?:10|[2-9])"]],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["3[2-5]|[47]|5[1-3578]|6[13-57]|8(?:0[1-8]|[1-9])"],"($1)"],["(\\d{3})(\\d{3})(\\d{3,4})","$1 $2 $3",["60|8"]],["(\\d{4})(\\d{3})(\\d{4})","$1 $2 $3",["1"]],["(\\d{3})(\\d{3})(\\d{2})(\\d{3})","$1 $2 $3 $4",["60"]]]],CM:["237","00","[26]\\d{8}|88\\d{6,7}",[8,9],[["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["88"]],["(\\d)(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4 $5",["[26]|88"]]]],CN:["86","00|1(?:[12]\\d|79)\\d\\d00","(?:(?:1[03-689]|2\\d)\\d\\d|6)\\d{8}|1\\d{10}|[126]\\d{6}(?:\\d(?:\\d{2})?)?|86\\d{5,6}|(?:[3-579]\\d|8[0-57-9])\\d{5,9}",[7,8,9,10,11,12],[["(\\d{2})(\\d{5,6})","$1 $2",["(?:10|2[0-57-9])[19]|3(?:[157]|35|49|9[1-68])|4(?:1[124-9]|2[179]|6[47-9]|7|8[23])|5(?:[1357]|2[37]|4[36]|6[1-46]|80)|6(?:3[1-5]|6[0238]|9[12])|7(?:01|[1579]|2[248]|3[014-9]|4[3-6]|6[023689])|8(?:07|1[236-8]|2[5-7]|[37]|8[36-8]|9[1-8])|9(?:0[1-3689]|1[1-79]|3|4[13]|5[1-5]|7[0-79]|9[0-35-9])|(?:4[35]|59|85)[1-9]","(?:10|2[0-57-9])(?:1[02]|9[56])|8078|(?:3(?:[157]\\d|35|49|9[1-68])|4(?:1[124-9]|2[179]|[35][1-9]|6[47-9]|7\\d|8[23])|5(?:[1357]\\d|2[37]|4[36]|6[1-46]|80|9[1-9])|6(?:3[1-5]|6[0238]|9[12])|7(?:01|[1579]\\d|2[248]|3[014-9]|4[3-6]|6[023689])|8(?:1[236-8]|2[5-7]|[37]\\d|5[1-9]|8[36-8]|9[1-8])|9(?:0[1-3689]|1[1-79]|3\\d|4[13]|5[1-5]|7[0-79]|9[0-35-9]))1","10(?:1(?:0|23)|9[56])|2[0-57-9](?:1(?:00|23)|9[56])|80781|(?:3(?:[157]\\d|35|49|9[1-68])|4(?:1[124-9]|2[179]|[35][1-9]|6[47-9]|7\\d|8[23])|5(?:[1357]\\d|2[37]|4[36]|6[1-46]|80|9[1-9])|6(?:3[1-5]|6[0238]|9[12])|7(?:01|[1579]\\d|2[248]|3[014-9]|4[3-6]|6[023689])|8(?:1[236-8]|2[5-7]|[37]\\d|5[1-9]|8[36-8]|9[1-8])|9(?:0[1-3689]|1[1-79]|3\\d|4[13]|5[1-5]|7[0-79]|9[0-35-9]))12","10(?:1(?:0|23)|9[56])|2[0-57-9](?:1(?:00|23)|9[56])|807812|(?:3(?:[157]\\d|35|49|9[1-68])|4(?:1[124-9]|2[179]|[35][1-9]|6[47-9]|7\\d|8[23])|5(?:[1357]\\d|2[37]|4[36]|6[1-46]|80|9[1-9])|6(?:3[1-5]|6[0238]|9[12])|7(?:01|[1579]\\d|2[248]|3[014-9]|4[3-6]|6[023689])|8(?:1[236-8]|2[5-7]|[37]\\d|5[1-9]|8[36-8]|9[1-8])|9(?:0[1-3689]|1[1-79]|3\\d|4[13]|5[1-5]|7[0-79]|9[0-35-9]))123","10(?:1(?:0|23)|9[56])|2[0-57-9](?:1(?:00|23)|9[56])|(?:3(?:[157]\\d|35|49|9[1-68])|4(?:1[124-9]|2[179]|[35][1-9]|6[47-9]|7\\d|8[23])|5(?:[1357]\\d|2[37]|4[36]|6[1-46]|80|9[1-9])|6(?:3[1-5]|6[0238]|9[12])|7(?:01|[1579]\\d|2[248]|3[014-9]|4[3-6]|6[023689])|8(?:078|1[236-8]|2[5-7]|[37]\\d|5[1-9]|8[36-8]|9[1-8])|9(?:0[1-3689]|1[1-79]|3\\d|4[13]|5[1-5]|7[0-79]|9[0-35-9]))123"],"0$1"],["(\\d{3})(\\d{5,6})","$1 $2",["3(?:[157]|35|49|9[1-68])|4(?:[17]|2[179]|6[47-9]|8[23])|5(?:[1357]|2[37]|4[36]|6[1-46]|80)|6(?:3[1-5]|6[0238]|9[12])|7(?:01|[1579]|2[248]|3[014-9]|4[3-6]|6[023689])|8(?:1[236-8]|2[5-7]|[37]|8[36-8]|9[1-8])|9(?:0[1-3689]|1[1-79]|[379]|4[13]|5[1-5])|(?:4[35]|59|85)[1-9]","(?:3(?:[157]\\d|35|49|9[1-68])|4(?:[17]\\d|2[179]|[35][1-9]|6[47-9]|8[23])|5(?:[1357]\\d|2[37]|4[36]|6[1-46]|80|9[1-9])|6(?:3[1-5]|6[0238]|9[12])|7(?:01|[1579]\\d|2[248]|3[014-9]|4[3-6]|6[023689])|8(?:1[236-8]|2[5-7]|[37]\\d|5[1-9]|8[36-8]|9[1-8])|9(?:0[1-3689]|1[1-79]|[379]\\d|4[13]|5[1-5]))[19]","85[23](?:10|95)|(?:3(?:[157]\\d|35|49|9[1-68])|4(?:[17]\\d|2[179]|[35][1-9]|6[47-9]|8[23])|5(?:[1357]\\d|2[37]|4[36]|6[1-46]|80|9[1-9])|6(?:3[1-5]|6[0238]|9[12])|7(?:01|[1579]\\d|2[248]|3[014-9]|4[3-6]|6[023689])|8(?:1[236-8]|2[5-7]|[37]\\d|5[14-9]|8[36-8]|9[1-8])|9(?:0[1-3689]|1[1-79]|[379]\\d|4[13]|5[1-5]))(?:10|9[56])","85[23](?:100|95)|(?:3(?:[157]\\d|35|49|9[1-68])|4(?:[17]\\d|2[179]|[35][1-9]|6[47-9]|8[23])|5(?:[1357]\\d|2[37]|4[36]|6[1-46]|80|9[1-9])|6(?:3[1-5]|6[0238]|9[12])|7(?:01|[1579]\\d|2[248]|3[014-9]|4[3-6]|6[023689])|8(?:1[236-8]|2[5-7]|[37]\\d|5[14-9]|8[36-8]|9[1-8])|9(?:0[1-3689]|1[1-79]|[379]\\d|4[13]|5[1-5]))(?:100|9[56])"],"0$1"],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["(?:4|80)0"]],["(\\d{2})(\\d{4})(\\d{4})","$1 $2 $3",["10|2(?:[02-57-9]|1[1-9])","10|2(?:[02-57-9]|1[1-9])","10[0-79]|2(?:[02-57-9]|1[1-79])|(?:10|21)8(?:0[1-9]|[1-9])"],"0$1",1],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["3(?:[3-59]|7[02-68])|4(?:[26-8]|3[3-9]|5[2-9])|5(?:3[03-9]|[468]|7[028]|9[2-46-9])|6|7(?:[0-247]|3[04-9]|5[0-4689]|6[2368])|8(?:[1-358]|9[1-7])|9(?:[013479]|5[1-5])|(?:[34]1|55|79|87)[02-9]"],"0$1",1],["(\\d{3})(\\d{7,8})","$1 $2",["9"]],["(\\d{4})(\\d{3})(\\d{4})","$1 $2 $3",["80"],"0$1",1],["(\\d{3})(\\d{4})(\\d{4})","$1 $2 $3",["[3-578]"],"0$1",1],["(\\d{3})(\\d{4})(\\d{4})","$1 $2 $3",["1[3-9]"]],["(\\d{2})(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3 $4",["[12]"],"0$1",1]],"0",0,"(1(?:[12]\\d|79)\\d\\d)|0",0,0,0,0,"00"],CO:["57","00(?:4(?:[14]4|56)|[579])","(?:46|60\\d\\d)\\d{6}|(?:1\\d|[39])\\d{9}",[8,10,11],[["(\\d{4})(\\d{4})","$1 $2",["46"]],["(\\d{3})(\\d{7})","$1 $2",["6|90"],"($1)"],["(\\d{3})(\\d{7})","$1 $2",["3[0-357]|9[14]"]],["(\\d)(\\d{3})(\\d{7})","$1-$2-$3",["1"],"0$1",0,"$1 $2 $3"]],"0",0,"0([3579]|4(?:[14]4|56))?"],CR:["506","00","(?:8\\d|90)\\d{8}|(?:[24-8]\\d{3}|3005)\\d{4}",[8,10],[["(\\d{4})(\\d{4})","$1 $2",["[2-7]|8[3-9]"]],["(\\d{3})(\\d{3})(\\d{4})","$1-$2-$3",["[89]"]]],0,0,"(19(?:0[0-2468]|1[09]|20|66|77|99))"],CU:["53","119","(?:[2-7]|8\\d\\d)\\d{7}|[2-47]\\d{6}|[34]\\d{5}",[6,7,8,10],[["(\\d{2})(\\d{4,6})","$1 $2",["2[1-4]|[34]"],"(0$1)"],["(\\d)(\\d{6,7})","$1 $2",["7"],"(0$1)"],["(\\d)(\\d{7})","$1 $2",["[56]"],"0$1"],["(\\d{3})(\\d{7})","$1 $2",["8"],"0$1"]],"0"],CV:["238","0","(?:[2-59]\\d\\d|800)\\d{4}",[7],[["(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3",["[2-589]"]]]],CW:["599","00","(?:[34]1|60|(?:7|9\\d)\\d)\\d{5}",[7,8],[["(\\d{3})(\\d{4})","$1 $2",["[3467]"]],["(\\d)(\\d{3})(\\d{4})","$1 $2 $3",["9[4-8]"]]],0,0,0,0,0,"[69]"],CX:["61","001[14-689]|14(?:1[14]|34|4[17]|[56]6|7[47]|88)0011","1(?:[0-79]\\d{8}(?:\\d{2})?|8[0-24-9]\\d{7})|[148]\\d{8}|1\\d{5,7}",[6,7,8,9,10,12],0,"0",0,"([59]\\d{7})$|0","8$1",0,0,[["8(?:51(?:0(?:01|30|59|88)|1(?:17|46|75)|2(?:22|35))|91(?:00[6-9]|1(?:[28]1|49|78)|2(?:09|63)|3(?:12|26|75)|4(?:56|97)|64\\d|7(?:0[01]|1[0-2])|958))\\d{3}",[9]],["4(?:79[01]|83[0-389]|94[0-478])\\d{5}|4(?:[0-36]\\d|4[047-9]|[58][0-24-9]|7[02-8]|9[0-37-9])\\d{6}",[9]],["180(?:0\\d{3}|2)\\d{3}",[7,10]],["190[0-26]\\d{6}",[10]],0,0,0,0,["14(?:5(?:1[0458]|[23][458])|71\\d)\\d{4}",[9]],["13(?:00\\d{6}(?:\\d{2})?|45[0-4]\\d{3})|13\\d{4}",[6,8,10,12]]],"0011"],CY:["357","00","(?:[279]\\d|[58]0)\\d{6}",[8],[["(\\d{2})(\\d{6})","$1 $2",["[257-9]"]]]],CZ:["420","00","(?:[2-578]\\d|60)\\d{7}|9\\d{8,11}",[9,10,11,12],[["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[2-8]|9[015-7]"]],["(\\d{2})(\\d{3})(\\d{3})(\\d{2})","$1 $2 $3 $4",["96"]],["(\\d{2})(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3 $4",["9"]],["(\\d{3})(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3 $4",["9"]]]],DE:["49","00","[2579]\\d{5,14}|49(?:[34]0|69|8\\d)\\d\\d?|49(?:37|49|60|7[089]|9\\d)\\d{1,3}|49(?:2[024-9]|3[2-689]|7[1-7])\\d{1,8}|(?:1|[368]\\d|4[0-8])\\d{3,13}|49(?:[015]\\d|2[13]|31|[46][1-8])\\d{1,9}",[4,5,6,7,8,9,10,11,12,13,14,15],[["(\\d{2})(\\d{3,13})","$1 $2",["3[02]|40|[68]9"],"0$1"],["(\\d{3})(\\d{3,12})","$1 $2",["2(?:0[1-389]|1[124]|2[18]|3[14])|3(?:[35-9][15]|4[015])|906|(?:2[4-9]|4[2-9]|[579][1-9]|[68][1-8])1","2(?:0[1-389]|12[0-8])|3(?:[35-9][15]|4[015])|906|2(?:[13][14]|2[18])|(?:2[4-9]|4[2-9]|[579][1-9]|[68][1-8])1"],"0$1"],["(\\d{4})(\\d{2,11})","$1 $2",["[24-6]|3(?:[3569][02-46-9]|4[2-4679]|7[2-467]|8[2-46-8])|70[2-8]|8(?:0[2-9]|[1-8])|90[7-9]|[79][1-9]","[24-6]|3(?:3(?:0[1-467]|2[127-9]|3[124578]|7[1257-9]|8[1256]|9[145])|4(?:2[135]|4[13578]|9[1346])|5(?:0[14]|2[1-3589]|6[1-4]|7[13468]|8[13568])|6(?:2[1-489]|3[124-6]|6[13]|7[12579]|8[1-356]|9[135])|7(?:2[1-7]|4[145]|6[1-5]|7[1-4])|8(?:21|3[1468]|6|7[1467]|8[136])|9(?:0[12479]|2[1358]|4[134679]|6[1-9]|7[136]|8[147]|9[1468]))|70[2-8]|8(?:0[2-9]|[1-8])|90[7-9]|[79][1-9]|3[68]4[1347]|3(?:47|60)[1356]|3(?:3[46]|46|5[49])[1246]|3[4579]3[1357]"],"0$1"],["(\\d{3})(\\d{4})","$1 $2",["138"],"0$1"],["(\\d{5})(\\d{2,10})","$1 $2",["3"],"0$1"],["(\\d{3})(\\d{5,11})","$1 $2",["181"],"0$1"],["(\\d{3})(\\d)(\\d{4,10})","$1 $2 $3",["1(?:3|80)|9"],"0$1"],["(\\d{3})(\\d{7,8})","$1 $2",["1[67]"],"0$1"],["(\\d{3})(\\d{7,12})","$1 $2",["8"],"0$1"],["(\\d{5})(\\d{6})","$1 $2",["185","1850","18500"],"0$1"],["(\\d{3})(\\d{4})(\\d{4})","$1 $2 $3",["7"],"0$1"],["(\\d{4})(\\d{7})","$1 $2",["18[68]"],"0$1"],["(\\d{4})(\\d{7})","$1 $2",["15[1279]"],"0$1"],["(\\d{5})(\\d{6})","$1 $2",["15[03568]","15(?:[0568]|3[13])"],"0$1"],["(\\d{3})(\\d{8})","$1 $2",["18"],"0$1"],["(\\d{3})(\\d{2})(\\d{7,8})","$1 $2 $3",["1(?:6[023]|7)"],"0$1"],["(\\d{4})(\\d{2})(\\d{7})","$1 $2 $3",["15[279]"],"0$1"],["(\\d{3})(\\d{2})(\\d{8})","$1 $2 $3",["15"],"0$1"]],"0"],DJ:["253","00","(?:2\\d|77)\\d{6}",[8],[["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[27]"]]]],DK:["45","00","[2-9]\\d{7}",[8],[["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[2-9]"]]]],DM:["1","011","(?:[58]\\d\\d|767|900)\\d{7}",[10],0,"1",0,"([2-7]\\d{6})$|1","767$1",0,"767"],DO:["1","011","(?:[58]\\d\\d|900)\\d{7}",[10],0,"1",0,0,0,0,"8001|8[024]9"],DZ:["213","00","(?:[1-4]|[5-79]\\d|80)\\d{7}",[8,9],[["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[1-4]"],"0$1"],["(\\d{2})(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3 $4",["9"],"0$1"],["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[5-8]"],"0$1"]],"0"],EC:["593","00","1\\d{9,10}|(?:[2-7]|9\\d)\\d{7}",[8,9,10,11],[["(\\d)(\\d{3})(\\d{4})","$1 $2-$3",["[2-7]"],"(0$1)",0,"$1-$2-$3"],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["9"],"0$1"],["(\\d{4})(\\d{3})(\\d{3,4})","$1 $2 $3",["1"]]],"0"],EE:["372","00","8\\d{9}|[4578]\\d{7}|(?:[3-8]\\d|90)\\d{5}",[7,8,10],[["(\\d{3})(\\d{4})","$1 $2",["[369]|4[3-8]|5(?:[0-2]|5[0-478]|6[45])|7[1-9]|88","[369]|4[3-8]|5(?:[02]|1(?:[0-8]|95)|5[0-478]|6(?:4[0-4]|5[1-589]))|7[1-9]|88"]],["(\\d{4})(\\d{3,4})","$1 $2",["[45]|8(?:00|[1-49])","[45]|8(?:00[1-9]|[1-49])"]],["(\\d{2})(\\d{2})(\\d{4})","$1 $2 $3",["7"]],["(\\d{4})(\\d{3})(\\d{3})","$1 $2 $3",["8"]]]],EG:["20","00","[189]\\d{8,9}|[24-6]\\d{8}|[135]\\d{7}",[8,9,10],[["(\\d)(\\d{7,8})","$1 $2",["[23]"],"0$1"],["(\\d{2})(\\d{6,7})","$1 $2",["1[35]|[4-6]|8[2468]|9[235-7]"],"0$1"],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["[89]"],"0$1"],["(\\d{2})(\\d{8})","$1 $2",["1"],"0$1"]],"0"],EH:["212","00","[5-8]\\d{8}",[9],0,"0",0,0,0,0,"528[89]"],ER:["291","00","[178]\\d{6}",[7],[["(\\d)(\\d{3})(\\d{3})","$1 $2 $3",["[178]"],"0$1"]],"0"],ES:["34","00","[5-9]\\d{8}",[9],[["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[89]00"]],["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[5-9]"]]]],ET:["251","00","(?:11|[2-579]\\d)\\d{7}",[9],[["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["[1-579]"],"0$1"]],"0"],FI:["358","00|99(?:[01469]|5(?:[14]1|3[23]|5[59]|77|88|9[09]))","[1-35689]\\d{4}|7\\d{10,11}|(?:[124-7]\\d|3[0-46-9])\\d{8}|[1-9]\\d{5,8}",[5,6,7,8,9,10,11,12],[["(\\d{5})","$1",["20[2-59]"],"0$1"],["(\\d{3})(\\d{3,7})","$1 $2",["(?:[1-3]0|[68])0|70[07-9]"],"0$1"],["(\\d{2})(\\d{4,8})","$1 $2",["[14]|2[09]|50|7[135]"],"0$1"],["(\\d{2})(\\d{6,10})","$1 $2",["7"],"0$1"],["(\\d)(\\d{4,9})","$1 $2",["(?:19|[2568])[1-8]|3(?:0[1-9]|[1-9])|9"],"0$1"]],"0",0,0,0,0,"1[03-79]|[2-9]",0,"00"],FJ:["679","0(?:0|52)","45\\d{5}|(?:0800\\d|[235-9])\\d{6}",[7,11],[["(\\d{3})(\\d{4})","$1 $2",["[235-9]|45"]],["(\\d{4})(\\d{3})(\\d{4})","$1 $2 $3",["0"]]],0,0,0,0,0,0,0,"00"],FK:["500","00","[2-7]\\d{4}",[5]],FM:["691","00","(?:[39]\\d\\d|820)\\d{4}",[7],[["(\\d{3})(\\d{4})","$1 $2",["[389]"]]]],FO:["298","00","[2-9]\\d{5}",[6],[["(\\d{6})","$1",["[2-9]"]]],0,0,"(10(?:01|[12]0|88))"],FR:["33","00","[1-9]\\d{8}",[9],[["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["8"],"0 $1"],["(\\d)(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4 $5",["[1-79]"],"0$1"]],"0"],GA:["241","00","(?:[067]\\d|11)\\d{6}|[2-7]\\d{6}",[7,8],[["(\\d)(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[2-7]"],"0$1"],["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["0"]],["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["11|[67]"],"0$1"]],0,0,"0(11\\d{6}|60\\d{6}|61\\d{6}|6[256]\\d{6}|7[467]\\d{6})","$1"],GB:["44","00","[1-357-9]\\d{9}|[18]\\d{8}|8\\d{6}",[7,9,10],[["(\\d{3})(\\d{4})","$1 $2",["800","8001","80011","800111","8001111"],"0$1"],["(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3",["845","8454","84546","845464"],"0$1"],["(\\d{3})(\\d{6})","$1 $2",["800"],"0$1"],["(\\d{5})(\\d{4,5})","$1 $2",["1(?:38|5[23]|69|76|94)","1(?:(?:38|69)7|5(?:24|39)|768|946)","1(?:3873|5(?:242|39[4-6])|(?:697|768)[347]|9467)"],"0$1"],["(\\d{4})(\\d{5,6})","$1 $2",["1(?:[2-69][02-9]|[78])"],"0$1"],["(\\d{2})(\\d{4})(\\d{4})","$1 $2 $3",["[25]|7(?:0|6[02-9])","[25]|7(?:0|6(?:[03-9]|2[356]))"],"0$1"],["(\\d{4})(\\d{6})","$1 $2",["7"],"0$1"],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["[1389]"],"0$1"]],"0",0,"0|180020",0,0,0,[["(?:1(?:1(?:3(?:[0-58]\\d\\d|73[0-35])|4(?:(?:[0-5]\\d|70)\\d|69[7-9])|(?:(?:5[0-26-9]|[78][0-49])\\d|6(?:[0-4]\\d|50))\\d)|(?:2(?:(?:0[024-9]|2[3-9]|3[3-79]|4[1-689]|[58][02-9]|6[0-47-9]|7[013-9]|9\\d)\\d|1(?:[0-7]\\d|8[0-3]))|(?:3(?:0\\d|1[0-8]|[25][02-9]|3[02-579]|[468][0-46-9]|7[1-35-79]|9[2-578])|4(?:0[03-9]|[137]\\d|[28][02-57-9]|4[02-69]|5[0-8]|[69][0-79])|5(?:0[1-35-9]|[16]\\d|2[024-9]|3[015689]|4[02-9]|5[03-9]|7[0-35-9]|8[0-468]|9[0-57-9])|6(?:0[034689]|1\\d|2[0-35689]|[38][013-9]|4[1-467]|5[0-69]|6[13-9]|7[0-8]|9[0-24578])|7(?:0[0246-9]|2\\d|3[0236-8]|4[03-9]|5[0-46-9]|6[013-9]|7[0-35-9]|8[024-9]|9[02-9])|8(?:0[35-9]|2[1-57-9]|3[02-578]|4[0-578]|5[124-9]|6[2-69]|7\\d|8[02-9]|9[02569])|9(?:0[02-589]|[18]\\d|2[02-689]|3[1-57-9]|4[2-9]|5[0-579]|6[2-47-9]|7[0-24578]|9[2-57]))\\d)\\d)|2(?:0[013478]|3[0189]|4[017]|8[0-46-9]|9[0-2])\\d{3})\\d{4}|1(?:2(?:0(?:46[1-4]|87[2-9])|545[1-79]|76(?:2\\d|3[1-8]|6[1-6])|9(?:7(?:2[0-4]|3[2-5])|8(?:2[2-8]|7[0-47-9]|8[3-5])))|3(?:6(?:38[2-5]|47[23])|8(?:47[04-9]|64[0157-9]))|4(?:044[1-7]|20(?:2[23]|8\\d)|6(?:0(?:30|5[2-57]|6[1-8]|7[2-8])|140)|8(?:052|87[1-3]))|5(?:2(?:4(?:3[2-79]|6\\d)|76\\d)|6(?:26[06-9]|686))|6(?:06(?:4\\d|7[4-79])|295[5-7]|35[34]\\d|47(?:24|61)|59(?:5[08]|6[67]|74)|9(?:55[0-4]|77[23]))|7(?:26(?:6[13-9]|7[0-7])|(?:442|688)\\d|50(?:2[0-3]|[3-68]2|76))|8(?:27[56]\\d|37(?:5[2-5]|8[239])|843[2-58])|9(?:0(?:0(?:6[1-8]|85)|52\\d)|3583|4(?:66[1-8]|9(?:2[01]|81))|63(?:23|3[1-4])|9561))\\d{3}",[9,10]],["7(?:457[0-57-9]|700[01]|911[028])\\d{5}|7(?:[1-3]\\d\\d|4(?:[0-46-9]\\d|5[0-689])|5(?:0[0-8]|[13-9]\\d|2[0-35-9])|7(?:0[1-9]|[1-7]\\d|8[02-9]|9[0-689])|8(?:[014-9]\\d|[23][0-8])|9(?:[024-9]\\d|1[02-9]|3[0-689]))\\d{6}",[10]],["80[08]\\d{7}|800\\d{6}|8001111"],["(?:8(?:4[2-5]|7[0-3])|9(?:[01]\\d|8[2-49]))\\d{7}|845464\\d",[7,10]],["70\\d{8}",[10]],0,["(?:3[0347]|55)\\d{8}",[10]],["76(?:464|652)\\d{5}|76(?:0[0-28]|2[356]|34|4[01347]|5[49]|6[0-369]|77|8[14]|9[139])\\d{6}",[10]],["56\\d{8}",[10]]],0," x"],GD:["1","011","(?:473|[58]\\d\\d|900)\\d{7}",[10],0,"1",0,"([2-9]\\d{6})$|1","473$1",0,"473"],GE:["995","00","(?:[3-57]\\d\\d|800)\\d{6}",[9],[["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["70"],"0$1"],["(\\d{2})(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3 $4",["32"],"0$1"],["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[57]"]],["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[348]"],"0$1"]],"0"],GF:["594","00","(?:[56]94\\d|7093)\\d{5}|(?:80|9\\d)\\d{7}",[9],[["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[5-7]|9[47]"],"0$1"],["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[89]"],"0$1"]],"0"],GG:["44","00","(?:1481|[357-9]\\d{3})\\d{6}|8\\d{6}(?:\\d{2})?",[7,9,10],0,"0",0,"([25-9]\\d{5})$|0|180020","1481$1",0,0,[["1481[25-9]\\d{5}",[10]],["7(?:(?:781|839)\\d|911[17])\\d{5}",[10]],["80[08]\\d{7}|800\\d{6}|8001111"],["(?:8(?:4[2-5]|7[0-3])|9(?:[01]\\d|8[0-3]))\\d{7}|845464\\d",[7,10]],["70\\d{8}",[10]],0,["(?:3[0347]|55)\\d{8}",[10]],["76(?:464|652)\\d{5}|76(?:0[0-28]|2[356]|34|4[01347]|5[49]|6[0-369]|77|8[14]|9[139])\\d{6}",[10]],["56\\d{8}",[10]]]],GH:["233","00","(?:[235]\\d{3}|800)\\d{5}",[8,9],[["(\\d{3})(\\d{5})","$1 $2",["8"],"0$1"],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["[235]"],"0$1"]],"0"],GI:["350","00","(?:[25]\\d|60)\\d{6}",[8],[["(\\d{3})(\\d{5})","$1 $2",["2"]]]],GL:["299","00","(?:19|[2-689]\\d|70)\\d{4}",[6],[["(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3",["19|[2-9]"]]]],GM:["220","00","[2-9]\\d{6}",[7],[["(\\d{3})(\\d{4})","$1 $2",["[2-9]"]]]],GN:["224","00","722\\d{6}|(?:3|6\\d)\\d{7}",[8,9],[["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["3"]],["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[67]"]]]],GP:["590","00","(?:590\\d|7090)\\d{5}|(?:69|80|9\\d)\\d{7}",[9],[["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[5-79]"],"0$1"],["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["8"],"0$1"]],"0",0,0,0,0,0,[["590(?:0[1-68]|[14][0-24-9]|2[0-68]|3[1-9]|5[3-579]|[68][0-689]|7[08]|9\\d)\\d{4}"],["(?:69(?:0\\d\\d|1(?:2[2-9]|3[0-5])|4(?:0[89]|1[2-6]|9\\d)|6(?:1[016-9]|5[0-4]|[67]\\d))|7090[0-4])\\d{4}"],["80[0-5]\\d{6}"],0,0,0,0,0,["9(?:(?:39[5-7]|76[018])\\d|475[0-6])\\d{4}"]]],GQ:["240","00","222\\d{6}|(?:3\\d|55|[89]0)\\d{7}",[9],[["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[235]"]],["(\\d{3})(\\d{6})","$1 $2",["[89]"]]]],GR:["30","00","5005000\\d{3}|8\\d{9,11}|(?:[269]\\d|70)\\d{8}",[10,11,12],[["(\\d{2})(\\d{4})(\\d{4})","$1 $2 $3",["21|7"]],["(\\d{4})(\\d{6})","$1 $2",["2(?:2|3[2-57-9]|4[2-469]|5[2-59]|6[2-9]|7[2-69]|8[2-49])|5"]],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["[2689]"]],["(\\d{3})(\\d{3,4})(\\d{5})","$1 $2 $3",["8"]]]],GT:["502","00","80\\d{6}|(?:1\\d{3}|[2-7])\\d{7}",[8,11],[["(\\d{4})(\\d{4})","$1 $2",["[2-8]"]],["(\\d{4})(\\d{3})(\\d{4})","$1 $2 $3",["1"]]]],GU:["1","011","(?:[58]\\d\\d|671|900)\\d{7}",[10],0,"1",0,"([2-9]\\d{6})$|1","671$1",0,"671"],GW:["245","00","[49]\\d{8}|4\\d{6}",[7,9],[["(\\d{3})(\\d{4})","$1 $2",["40"]],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[49]"]]]],GY:["592","001","(?:[2-8]\\d{3}|9008)\\d{3}",[7],[["(\\d{3})(\\d{4})","$1 $2",["[2-9]"]]]],HK:["852","00(?:30|5[09]|[126-9]?)","8[0-46-9]\\d{6,7}|9\\d{4,7}|(?:[2-7]|9\\d{3})\\d{7}",[5,6,7,8,9,11],[["(\\d{3})(\\d{2,5})","$1 $2",["900","9003"]],["(\\d{4})(\\d{4})","$1 $2",["[2-7]|8[1-4]|9(?:0[1-9]|[1-8])"]],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["8"]],["(\\d{3})(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3 $4",["9"]]],0,0,0,0,0,0,0,"00"],HN:["504","00","8\\d{10}|[237-9]\\d{7}",[8,11],[["(\\d{4})(\\d{4})","$1-$2",["[237-9]"]]]],HR:["385","00","[2-69]\\d{8}|80\\d{5,7}|[1-79]\\d{7}|6\\d{6}",[7,8,9],[["(\\d{2})(\\d{2})(\\d{3})","$1 $2 $3",["6[01]"],"0$1"],["(\\d{3})(\\d{2})(\\d{2,3})","$1 $2 $3",["8"],"0$1"],["(\\d)(\\d{4})(\\d{3})","$1 $2 $3",["1"],"0$1"],["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["6|7[245]"],"0$1"],["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["9"],"0$1"],["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["[2-57]"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["8"],"0$1"]],"0"],HT:["509","00","[2-589]\\d{7}",[8],[["(\\d{2})(\\d{2})(\\d{4})","$1 $2 $3",["[2-589]"]]]],HU:["36","00","[235-7]\\d{8}|[1-9]\\d{7}",[8,9],[["(\\d)(\\d{3})(\\d{4})","$1 $2 $3",["1"],"(06 $1)"],["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["[27][2-9]|3[2-7]|4[24-9]|5[2-79]|6|8[2-57-9]|9[2-69]"],"(06 $1)"],["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["[2-9]"],"06 $1"]],"06"],ID:["62","00[89]","00[1-9]\\d{9,14}|(?:[1-36]|8\\d{5})\\d{6}|00\\d{9}|[1-9]\\d{8,10}|[2-9]\\d{7}",[7,8,9,10,11,12,13,14,15,16,17],[["(\\d)(\\d{3})(\\d{3})","$1 $2 $3",["15"]],["(\\d{2})(\\d{5,9})","$1 $2",["2[124]|[36]1"],"(0$1)"],["(\\d{3})(\\d{5,7})","$1 $2",["800"],"0$1"],["(\\d{3})(\\d{5,8})","$1 $2",["[2-79]"],"(0$1)"],["(\\d{3})(\\d{3,4})(\\d{3})","$1-$2-$3",["8[1-35-9]"],"0$1"],["(\\d{3})(\\d{6,8})","$1 $2",["1"],"0$1"],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["804"],"0$1"],["(\\d{3})(\\d)(\\d{3})(\\d{3})","$1 $2 $3 $4",["80"],"0$1"],["(\\d{3})(\\d{4})(\\d{4,5})","$1-$2-$3",["8"],"0$1"]],"0"],IE:["353","00","(?:1\\d|[2569])\\d{6,8}|4\\d{6,9}|7\\d{8}|8\\d{8,9}",[7,8,9,10],[["(\\d{2})(\\d{5})","$1 $2",["2[24-9]|47|58|6[237-9]|9[35-9]"],"(0$1)"],["(\\d{3})(\\d{5})","$1 $2",["[45]0"],"(0$1)"],["(\\d)(\\d{3,4})(\\d{4})","$1 $2 $3",["1"],"(0$1)"],["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["[2569]|4[1-69]|7[14]"],"(0$1)"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["70"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["81"],"(0$1)"],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["[78]"],"0$1"],["(\\d{4})(\\d{3})(\\d{3})","$1 $2 $3",["1"]],["(\\d{2})(\\d{4})(\\d{4})","$1 $2 $3",["4"],"(0$1)"],["(\\d{2})(\\d)(\\d{3})(\\d{4})","$1 $2 $3 $4",["8"],"0$1"]],"0"],IL:["972","0(?:0|1[2-9])","1\\d{6}(?:\\d{3,5})?|[57]\\d{8}|[1-489]\\d{7}",[7,8,9,10,11,12],[["(\\d{4})(\\d{3})","$1-$2",["125"]],["(\\d{4})(\\d{2})(\\d{2})","$1-$2-$3",["121"]],["(\\d)(\\d{3})(\\d{4})","$1-$2-$3",["[2-489]"],"0$1"],["(\\d{2})(\\d{3})(\\d{4})","$1-$2-$3",["[57]"],"0$1"],["(\\d{4})(\\d{3})(\\d{3})","$1-$2-$3",["12"]],["(\\d{4})(\\d{6})","$1-$2",["159"]],["(\\d)(\\d{3})(\\d{3})(\\d{3})","$1-$2-$3-$4",["1[7-9]"]],["(\\d{3})(\\d{1,2})(\\d{3})(\\d{4})","$1-$2 $3-$4",["15"]]],"0"],IM:["44","00","1624\\d{6}|(?:[3578]\\d|90)\\d{8}",[10],0,"0",0,"([25-8]\\d{5})$|0|180020","1624$1",0,"74576|(?:16|7[56])24"],IN:["91","00","(?:000800|[2-9]\\d\\d)\\d{7}|1\\d{7,12}",[8,9,10,11,12,13],[["(\\d{8})","$1",["5(?:0|2[23]|3[03]|[67]1|88)","5(?:0|2(?:21|3)|3(?:0|3[23])|616|717|888)","5(?:0|2(?:21|3)|3(?:0|3[23])|616|717|8888)"],0,1],["(\\d{4})(\\d{4,5})","$1 $2",["180","1800"],0,1],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["140"],0,1],["(\\d{2})(\\d{4})(\\d{4})","$1 $2 $3",["11|2[02]|33|4[04]|79[1-7]|80[2-46]","11|2[02]|33|4[04]|79(?:[1-6]|7[19])|80(?:[2-4]|6[0-589])","11|2[02]|33|4[04]|79(?:[124-6]|3(?:[02-9]|1[0-24-9])|7(?:1|9[1-6]))|80(?:[2-4]|6[0-589])"],"0$1",1],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["1(?:2[0-249]|3[0-25]|4[145]|[68]|7[1257])|2(?:1[257]|3[013]|4[01]|5[0137]|6[0158]|78|8[1568])|3(?:26|4[1-3]|5[34]|6[01489]|7[02-46]|8[159])|4(?:1[36]|2[1-47]|5[12]|6[0-26-9]|7[0-24-9]|8[013-57]|9[014-7])|5(?:1[025]|22|[36][25]|4[28]|5[12]|[78]1)|6(?:12|[2-4]1|5[17]|6[13]|80)|7(?:12|3[134]|4[47]|61|88)|8(?:16|2[014]|3[126]|6[136]|7[078]|8[34]|91)|(?:43|59|75)[15]|(?:1[59]|29|67|72)[14]","1(?:2[0-24]|3[0-25]|4[145]|[59][14]|6[1-9]|7[1257]|8[1-57-9])|2(?:1[257]|3[013]|4[01]|5[0137]|6[058]|78|8[1568]|9[14])|3(?:26|4[1-3]|5[34]|6[01489]|7[02-46]|8[159])|4(?:1[36]|2[1-47]|3[15]|5[12]|6[0-26-9]|7[0-24-9]|8[013-57]|9[014-7])|5(?:1[025]|22|[36][25]|4[28]|[578]1|9[15])|674|7(?:(?:2[14]|3[34]|5[15])[2-6]|61[346]|88[0-8])|8(?:70[2-6]|84[235-7]|91[3-7])|(?:1(?:29|60|8[06])|261|552|6(?:12|[2-47]1|5[17]|6[13]|80)|7(?:12|31|4[47])|8(?:16|2[014]|3[126]|6[136]|7[78]|83))[2-7]","1(?:2[0-24]|3[0-25]|4[145]|[59][14]|6[1-9]|7[1257]|8[1-57-9])|2(?:1[257]|3[013]|4[01]|5[0137]|6[058]|78|8[1568]|9[14])|3(?:26|4[1-3]|5[34]|6[01489]|7[02-46]|8[159])|4(?:1[36]|2[1-47]|3[15]|5[12]|6[0-26-9]|7[0-24-9]|8[013-57]|9[014-7])|5(?:1[025]|22|[36][25]|4[28]|[578]1|9[15])|6(?:12(?:[2-6]|7[0-8])|74[2-7])|7(?:(?:2[14]|5[15])[2-6]|3171|61[346]|88(?:[2-7]|82))|8(?:70[2-6]|84(?:[2356]|7[19])|91(?:[3-6]|7[19]))|73[134][2-6]|(?:74[47]|8(?:16|2[014]|3[126]|6[136]|7[78]|83))(?:[2-6]|7[19])|(?:1(?:29|60|8[06])|261|552|6(?:[2-4]1|5[17]|6[13]|7(?:1|4[0189])|80)|7(?:12|88[01]))[2-7]"],"0$1",1],["(\\d{4})(\\d{3})(\\d{3})","$1 $2 $3",["1(?:[2-479]|5[0235-9])|[2-5]|6(?:1[1358]|2[2457-9]|3[2-5]|4[235-7]|5[2-689]|6[24578]|7[235689]|8[1-6])|7(?:1[013-9]|28|3[129]|4[1-35689]|5[29]|6[02-5]|70)|807","1(?:[2-479]|5[0235-9])|[2-5]|6(?:1[1358]|2(?:[2457]|84|95)|3(?:[2-4]|55)|4[235-7]|5[2-689]|6[24578]|7[235689]|8[1-6])|7(?:1(?:[013-8]|9[6-9])|28[6-8]|3(?:17|2[0-49]|9[2-57])|4(?:1[2-4]|[29][0-7]|3[0-8]|[56]|8[0-24-7])|5(?:2[1-3]|9[0-6])|6(?:0[5689]|2[5-9]|3[02-8]|4|5[0-367])|70[13-7])|807[19]","1(?:[2-479]|5(?:[0236-9]|5[013-9]))|[2-5]|6(?:2(?:84|95)|355|83)|73179|807(?:1|9[1-3])|(?:1552|6(?:1[1358]|2[2457]|3[2-4]|4[235-7]|5[2-689]|6[24578]|7[235689]|8[124-6])\\d|7(?:1(?:[013-8]\\d|9[6-9])|28[6-8]|3(?:2[0-49]|9[2-57])|4(?:1[2-4]|[29][0-7]|3[0-8]|[56]\\d|8[0-24-7])|5(?:2[1-3]|9[0-6])|6(?:0[5689]|2[5-9]|3[02-8]|4\\d|5[0-367])|70[13-7]))[2-7]"],"0$1",1],["(\\d{5})(\\d{5})","$1 $2",["[6-9]"],"0$1",1],["(\\d{4})(\\d{2,4})(\\d{4})","$1 $2 $3",["1(?:6|8[06])","1(?:6|8[06]0)"],0,1],["(\\d{4})(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3 $4",["18"],0,1]],"0"],IO:["246","00","3\\d{6}",[7],[["(\\d{3})(\\d{4})","$1 $2",["3"]]]],IQ:["964","00","(?:1|7\\d\\d)\\d{7}|[2-6]\\d{7,8}",[8,9,10],[["(\\d)(\\d{3})(\\d{4})","$1 $2 $3",["1"],"0$1"],["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["[2-6]"],"0$1"],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["7"],"0$1"]],"0"],IR:["98","00","[1-9]\\d{9}|(?:[1-8]\\d\\d|9)\\d{3,4}",[4,5,6,7,10],[["(\\d{4,5})","$1",["96"],"0$1"],["(\\d{2})(\\d{4,5})","$1 $2",["(?:1[137]|2[13-68]|3[1458]|4[145]|5[1468]|6[16]|7[1467]|8[13467])[12689]"],"0$1"],["(\\d{3})(\\d{3})(\\d{3,4})","$1 $2 $3",["9"],"0$1"],["(\\d{2})(\\d{4})(\\d{4})","$1 $2 $3",["[1-8]"],"0$1"]],"0"],IS:["354","00|1(?:0(?:01|[12]0)|100)","(?:38\\d|[4-9])\\d{6}",[7,9],[["(\\d{3})(\\d{4})","$1 $2",["[4-9]"]],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["3"]]],0,0,0,0,0,0,0,"00"],IT:["39","00","0\\d{5,11}|1\\d{8,10}|3(?:[0-8]\\d{7,10}|9\\d{7,8})|(?:43|55|70)\\d{8}|8\\d{5}(?:\\d{2,4})?",[6,7,8,9,10,11,12],[["(\\d{2})(\\d{4,6})","$1 $2",["0[26]"]],["(\\d{3})(\\d{3,6})","$1 $2",["0[13-57-9][0159]|8(?:03|4[17]|9[2-5])","0[13-57-9][0159]|8(?:03|4[17]|9(?:2|3[04]|[45][0-4]))"]],["(\\d{4})(\\d{2,6})","$1 $2",["0(?:[13-579][2-46-8]|8[236-8])"]],["(\\d{4})(\\d{4})","$1 $2",["894"]],["(\\d{2})(\\d{3,4})(\\d{4})","$1 $2 $3",["0[26]|5"]],["(\\d{3})(\\d{3})(\\d{3,4})","$1 $2 $3",["1(?:44|[679])|[378]|43"]],["(\\d{3})(\\d{3,4})(\\d{4})","$1 $2 $3",["0[13-57-9][0159]|14"]],["(\\d{2})(\\d{4})(\\d{5})","$1 $2 $3",["0[26]"]],["(\\d{4})(\\d{3})(\\d{4})","$1 $2 $3",["0"]],["(\\d{3})(\\d{4})(\\d{4,5})","$1 $2 $3",["[03]"]]],0,0,0,0,0,0,[["0(?:669[0-79]\\d{1,6}|831\\d{2,8})|0(?:1(?:[0159]\\d|[27][1-5]|31|4[1-4]|6[1356]|8[2-57])|2\\d\\d|3(?:[0159]\\d|2[1-4]|3[12]|[48][1-6]|6[2-59]|7[1-7])|4(?:[0159]\\d|[23][1-9]|4[245]|6[1-5]|7[1-4]|81)|5(?:[0159]\\d|2[1-5]|3[2-6]|4[1-79]|6[4-6]|7[1-578]|8[3-8])|6(?:[0-57-9]\\d|6[0-8])|7(?:[0159]\\d|2[12]|3[1-7]|4[2-46]|6[13569]|7[13-6]|8[1-59])|8(?:[0159]\\d|2[3-578]|3[2356]|[6-8][1-5])|9(?:[0159]\\d|[238][1-5]|4[12]|6[1-8]|7[1-6]))\\d{2,7}"],["3[2-9]\\d{7,8}|(?:31|43)\\d{8}",[9,10]],["80(?:0\\d{3}|3)\\d{3}",[6,9]],["(?:0878\\d{3}|89(?:2\\d|3[04]|4(?:[0-4]|[5-9]\\d\\d)|5[0-4]))\\d\\d|(?:1(?:44|6[346])|89(?:38|5[5-9]|9))\\d{6}",[6,8,9,10]],["1(?:78\\d|99)\\d{6}",[9,10]],["3[2-8]\\d{9,10}",[11,12]],0,0,["55\\d{8}",[10]],["84(?:[08]\\d{3}|[17])\\d{3}",[6,9]]]],JE:["44","00","1534\\d{6}|(?:[3578]\\d|90)\\d{8}",[10],0,"0",0,"([0-24-8]\\d{5})$|0|180020","1534$1",0,0,[["1534[0-24-8]\\d{5}"],["7(?:(?:(?:50|82)9|937)\\d|7(?:00[378]|97\\d))\\d{5}"],["80(?:07(?:35|81)|8901)\\d{4}"],["(?:8(?:4(?:4(?:4(?:05|42|69)|703)|5(?:041|800))|7(?:0002|1206))|90(?:066[59]|1810|71(?:07|55)))\\d{4}"],["701511\\d{4}"],0,["(?:3(?:0(?:07(?:35|81)|8901)|3\\d{4}|4(?:4(?:4(?:05|42|69)|703)|5(?:041|800))|7(?:0002|1206))|55\\d{4})\\d{4}"],["76(?:464|652)\\d{5}|76(?:0[0-28]|2[356]|34|4[01347]|5[49]|6[0-369]|77|8[14]|9[139])\\d{6}"],["56\\d{8}"]]],JM:["1","011","(?:[58]\\d\\d|658|900)\\d{7}",[10],0,"1",0,0,0,0,"658|876"],JO:["962","00","(?:(?:[2689]|7\\d)\\d|32|53)\\d{6}",[8,9],[["(\\d)(\\d{3})(\\d{4})","$1 $2 $3",["[2356]|87"],"(0$1)"],["(\\d{3})(\\d{5,6})","$1 $2",["[89]"],"0$1"],["(\\d{2})(\\d{7})","$1 $2",["70"],"0$1"],["(\\d)(\\d{4})(\\d{4})","$1 $2 $3",["7"],"0$1"]],"0"],JP:["81","010","00[1-9]\\d{6,14}|[25-9]\\d{9}|(?:00|[1-9]\\d\\d)\\d{6}",[8,9,10,11,12,13,14,15,16,17],[["(\\d{3})(\\d{3})(\\d{3})","$1-$2-$3",["(?:12|57|99)0"],"0$1"],["(\\d{4})(\\d)(\\d{4})","$1-$2-$3",["1(?:26|3[79]|4[56]|5[4-68]|6[3-5])|499|5(?:76|97)|746|8(?:3[89]|47|51)|9(?:80|9[16])","1(?:267|3(?:7[247]|9[278])|466|5(?:47|58|64)|6(?:3[245]|48|5[4-68]))|499[2468]|5(?:76|97)9|7468|8(?:3(?:8[7-9]|96)|477|51[2-9])|9(?:802|9(?:1[23]|69))|1(?:45|58)[67]","1(?:267|3(?:7[247]|9[278])|466|5(?:47|58|64)|6(?:3[245]|48|5[4-68]))|499[2468]|5(?:769|979[2-69])|7468|8(?:3(?:8[7-9]|96[2457-9])|477|51[2-9])|9(?:802|9(?:1[23]|69))|1(?:45|58)[67]"],"0$1"],["(\\d{2})(\\d{3})(\\d{4})","$1-$2-$3",["60"],"0$1"],["(\\d)(\\d{4})(\\d{4})","$1-$2-$3",["3|4(?:2[09]|7[01])|6[1-9]","3|4(?:2(?:0|9[02-69])|7(?:0[019]|1))|6[1-9]"],"0$1"],["(\\d{2})(\\d{3})(\\d{4})","$1-$2-$3",["1(?:1|5[45]|77|88|9[69])|2(?:2[1-37]|3[0-269]|4[59]|5|6[24]|7[1-358]|8[1369]|9[0-38])|4(?:[28][1-9]|3[0-57]|[45]|6[248]|7[2-579]|9[29])|5(?:2|3[0459]|4[0-369]|5[29]|8[02389]|9[0-389])|7(?:2[02-46-9]|34|[58]|6[0249]|7[57]|9[2-6])|8(?:2[124589]|3[26-9]|49|51|6|7[0-468]|8[68]|9[019])|9(?:[23][1-9]|4[15]|5[138]|6[1-3]|7[156]|8[189]|9[1-489])","1(?:1|5(?:4[018]|5[017])|77|88|9[69])|2(?:2(?:[127]|3[014-9])|3[0-269]|4[59]|5(?:[1-3]|5[0-69]|9[19])|62|7(?:[1-35]|8[0189])|8(?:[16]|3[0134]|9[0-5])|9(?:[028]|17))|4(?:2(?:[13-79]|8[014-6])|3[0-57]|[45]|6[248]|7[2-47]|8[1-9]|9[29])|5(?:2|3(?:[045]|9[0-8])|4[0-369]|5[29]|8[02389]|9[0-3])|7(?:2[02-46-9]|34|[58]|6[0249]|7[57]|9(?:[23]|4[0-59]|5[01569]|6[0167]))|8(?:2(?:[1258]|4[0-39]|9[0-2469])|3(?:[29]|60)|49|51|6(?:[0-24]|36|5[0-3589]|7[23]|9[01459])|7[0-468]|8[68])|9(?:[23][1-9]|4[15]|5[138]|6[1-3]|7[156]|8[189]|9(?:[1289]|3[34]|4[0178]))|(?:264|837)[016-9]|2(?:57|93)[015-9]|(?:25[0468]|422|838)[01]|(?:47[59]|59[89]|8(?:6[68]|9))[019]","1(?:1|5(?:4[018]|5[017])|77|88|9[69])|2(?:2[127]|3[0-269]|4[59]|5(?:[1-3]|5[0-69]|9(?:17|99))|6(?:2|4[016-9])|7(?:[1-35]|8[0189])|8(?:[16]|3[0134]|9[0-5])|9(?:[028]|17))|4(?:2(?:[13-79]|8[014-6])|3[0-57]|[45]|6[248]|7[2-47]|9[29])|5(?:2|3(?:[045]|9(?:[0-58]|6[4-9]|7[0-35689]))|4[0-369]|5[29]|8[02389]|9[0-3])|7(?:2[02-46-9]|34|[58]|6[0249]|7[57]|9(?:[23]|4[0-59]|5[01569]|6[0167]))|8(?:2(?:[1258]|4[0-39]|9[0169])|3(?:[29]|60|7(?:[017-9]|6[6-8]))|49|51|6(?:[0-24]|36[2-57-9]|5(?:[0-389]|5[23])|6(?:[01]|9[178])|7(?:2[2-468]|3[78])|9[0145])|7[0-468]|8[68])|9(?:4[15]|5[138]|7[156]|8[189]|9(?:[1289]|3(?:31|4[357])|4[0178]))|(?:8294|96)[1-3]|2(?:57|93)[015-9]|(?:223|8699)[014-9]|(?:25[0468]|422|838)[01]|(?:48|8292|9[23])[1-9]|(?:47[59]|59[89]|8(?:68|9))[019]"],"0$1"],["(\\d{3})(\\d{2})(\\d{4})","$1-$2-$3",["[14]|[289][2-9]|5[3-9]|7[2-4679]"],"0$1"],["(\\d{3})(\\d{3})(\\d{4})","$1-$2-$3",["800"],"0$1"],["(\\d{2})(\\d{4})(\\d{4})","$1-$2-$3",["[25-9]"],"0$1"]],"0",0,"(000[2569]\\d{4,6})$|(?:(?:003768)0?)|0","$1"],KE:["254","000","(?:[17]\\d\\d|900)\\d{6}|(?:2|80)0\\d{6,7}|[4-6]\\d{6,8}",[7,8,9,10],[["(\\d{2})(\\d{5,7})","$1 $2",["[24-6]"],"0$1"],["(\\d{3})(\\d{6})","$1 $2",["[17]"],"0$1"],["(\\d{3})(\\d{3})(\\d{3,4})","$1 $2 $3",["[89]"],"0$1"]],"0"],KG:["996","00","8\\d{9}|[235-9]\\d{8}",[9,10],[["(\\d{4})(\\d{5})","$1 $2",["3(?:1[346]|[24-79])"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[235-79]|88"],"0$1"],["(\\d{3})(\\d{3})(\\d)(\\d{2,3})","$1 $2 $3 $4",["8"],"0$1"]],"0"],KH:["855","00[14-9]","1\\d{9}|[1-9]\\d{7,8}",[8,9,10],[["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["[1-9]"],"0$1"],["(\\d{4})(\\d{3})(\\d{3})","$1 $2 $3",["1"]]],"0"],KI:["686","00","(?:[37]\\d|6[0-79])\\d{6}|(?:[2-48]\\d|50)\\d{3}",[5,8],0,"0"],KM:["269","00","[3478]\\d{6}",[7],[["(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3",["[3478]"]]]],KN:["1","011","(?:[58]\\d\\d|900)\\d{7}",[10],0,"1",0,"([2-7]\\d{6})$|1","869$1",0,"869"],KP:["850","00|99","85\\d{6}|(?:19\\d|[2-7])\\d{7}",[8,10],[["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["8"],"0$1"],["(\\d)(\\d{3})(\\d{4})","$1 $2 $3",["[2-7]"],"0$1"],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["1"],"0$1"]],"0"],KR:["82","00(?:[125689]|3(?:[46]5|91)|7(?:00|27|3|55|6[126]))","00[1-9]\\d{8,11}|(?:[12]|5\\d{3})\\d{7}|[13-6]\\d{9}|(?:[1-6]\\d|80)\\d{7}|[3-6]\\d{4,5}|(?:00|7)0\\d{8}",[5,6,8,9,10,11,12,13,14],[["(\\d{2})(\\d{3,4})","$1-$2",["(?:3[1-3]|[46][1-4]|5[1-5])1"],"0$1"],["(\\d{4})(\\d{4})","$1-$2",["1"]],["(\\d)(\\d{3,4})(\\d{4})","$1-$2-$3",["2"],"0$1"],["(\\d{2})(\\d{3})(\\d{4})","$1-$2-$3",["[36]0|8"],"0$1"],["(\\d{2})(\\d{3,4})(\\d{4})","$1-$2-$3",["[1346]|5[1-5]"],"0$1"],["(\\d{2})(\\d{4})(\\d{4})","$1-$2-$3",["[57]"],"0$1"],["(\\d{2})(\\d{5})(\\d{4})","$1-$2-$3",["5"],"0$1"]],"0",0,"0(8(?:[1-46-8]|5\\d\\d))?"],KW:["965","00","18\\d{5}|(?:[2569]\\d|41)\\d{6}",[7,8],[["(\\d{4})(\\d{3,4})","$1 $2",["[169]|2(?:[235]|4[1-35-9])|52"]],["(\\d{3})(\\d{5})","$1 $2",["[245]"]]]],KY:["1","011","(?:345|[58]\\d\\d|900)\\d{7}",[10],0,"1",0,"([2-9]\\d{6})$|1","345$1",0,"345"],KZ:["7","810","(?:33622|8\\d{8})\\d{5}|[78]\\d{9}",[10,14],0,"8",0,0,0,0,"33622|7",0,"8~10"],LA:["856","00","[23]\\d{9}|3\\d{8}|(?:[235-8]\\d|41)\\d{6}",[8,9,10],[["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["2[13]|3[14]|[4-8]"],"0$1"],["(\\d{2})(\\d{2})(\\d{2})(\\d{3})","$1 $2 $3 $4",["3"],"0$1"],["(\\d{2})(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3 $4",["[23]"],"0$1"]],"0"],LB:["961","00","[27-9]\\d{7}|[13-9]\\d{6}",[7,8],[["(\\d)(\\d{3})(\\d{3})","$1 $2 $3",["[13-69]|7(?:[2-57]|62|8[0-6]|9[04-9])|8[02-9]"],"0$1"],["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["[27-9]"]]],"0"],LC:["1","011","(?:[58]\\d\\d|758|900)\\d{7}",[10],0,"1",0,"([2-8]\\d{6})$|1","758$1",0,"758"],LI:["423","00","[68]\\d{8}|(?:[2378]\\d|90)\\d{5}",[7,9],[["(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3",["[2379]|8(?:0[09]|7)","[2379]|8(?:0(?:02|9)|7)"]],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["8"]],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["69"]],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["6"]]],"0",0,"(1001)|0"],LK:["94","00","[1-9]\\d{8}",[9],[["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["7"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[1-689]"],"0$1"]],"0"],LR:["231","00","(?:[2457]\\d|33|88)\\d{7}|(?:2\\d|[4-6])\\d{6}",[7,8,9],[["(\\d)(\\d{3})(\\d{3})","$1 $2 $3",["4[67]|[56]"],"0$1"],["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["2"],"0$1"],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["[2-578]"],"0$1"]],"0"],LS:["266","00","(?:[256]\\d\\d|800)\\d{5}",[8],[["(\\d{4})(\\d{4})","$1 $2",["[2568]"]]]],LT:["370","00","(?:[3469]\\d|52|[78]0)\\d{6}",[8],[["(\\d)(\\d{3})(\\d{4})","$1 $2 $3",["52[0-7]"],"(0-$1)",1],["(\\d{3})(\\d{2})(\\d{3})","$1 $2 $3",["[7-9]"],"0 $1",1],["(\\d{2})(\\d{6})","$1 $2",["37|4(?:[15]|6[1-8])"],"(0-$1)",1],["(\\d{3})(\\d{5})","$1 $2",["[3-6]"],"(0-$1)",1]],"0",0,"[08]"],LU:["352","00","35[013-9]\\d{4,8}|6\\d{8}|35\\d{2,4}|(?:[2457-9]\\d|3[0-46-9])\\d{2,9}",[4,5,6,7,8,9,10,11],[["(\\d{2})(\\d{3})","$1 $2",["2(?:0[2-689]|[2-9])|[3-57]|8(?:0[2-9]|[13-9])|9(?:0[89]|[2-579])"]],["(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3",["2(?:0[2-689]|[2-9])|[3-57]|8(?:0[2-9]|[13-9])|9(?:0[89]|[2-579])"]],["(\\d{2})(\\d{2})(\\d{3})","$1 $2 $3",["20[2-689]"]],["(\\d{2})(\\d{2})(\\d{2})(\\d{1,2})","$1 $2 $3 $4",["2(?:[0367]|4[3-8])"]],["(\\d{3})(\\d{2})(\\d{3})","$1 $2 $3",["80[01]|90[015]"]],["(\\d{2})(\\d{2})(\\d{2})(\\d{3})","$1 $2 $3 $4",["20"]],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["6"]],["(\\d{2})(\\d{2})(\\d{2})(\\d{2})(\\d{1,2})","$1 $2 $3 $4 $5",["2(?:[0367]|4[3-8])"]],["(\\d{2})(\\d{2})(\\d{2})(\\d{1,5})","$1 $2 $3 $4",["[3-57]|8[13-9]|9(?:0[89]|[2-579])|(?:2|80)[2-9]"]]],0,0,"(15(?:0[06]|1[12]|[35]5|4[04]|6[26]|77|88|99)\\d)"],LV:["371","00","(?:[268]\\d|78|90)\\d{6}",[8],[["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["[2679]|8[01]"]]]],LY:["218","00","[2-9]\\d{8}",[9],[["(\\d{2})(\\d{7})","$1-$2",["[2-9]"],"0$1"]],"0"],MA:["212","00","[5-8]\\d{8}",[9],[["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["5[45]"],"0$1"],["(\\d{4})(\\d{5})","$1-$2",["5(?:2[2-46-9]|3[3-9]|9)|8(?:0[89]|92)"],"0$1"],["(\\d{2})(\\d{7})","$1-$2",["8"],"0$1"],["(\\d{3})(\\d{6})","$1-$2",["[5-7]"],"0$1"]],"0",0,0,0,0,0,[["5(?:2(?:[0-25-79]\\d|3[1-578]|4[02-46-8]|8[0235-7])|3(?:[0-47]\\d|5[02-9]|6[02-8]|8[014-9]|9[3-9])|(?:4[067]|5[03])\\d)\\d{5}"],["(?:6(?:[0-79]\\d|8[0-247-9])|7(?:[0167]\\d|2[0-8]|5[0-5]|8[0-7]))\\d{6}"],["80[0-7]\\d{6}"],["89\\d{7}"],0,0,0,0,["(?:592(?:4[0-2]|93)|80[89]\\d\\d)\\d{4}"]]],MC:["377","00","(?:[3489]|6\\d)\\d{7}",[8,9],[["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["4"],"0$1"],["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[389]"]],["(\\d)(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4 $5",["6"],"0$1"]],"0"],MD:["373","00","(?:[235-7]\\d|[89]0)\\d{6}",[8],[["(\\d{3})(\\d{5})","$1 $2",["[89]"],"0$1"],["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["22|3"],"0$1"],["(\\d{3})(\\d{2})(\\d{3})","$1 $2 $3",["[25-7]"],"0$1"]],"0"],ME:["382","00","(?:20|[3-79]\\d)\\d{6}|80\\d{6,7}",[8,9],[["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["[2-9]"],"0$1"]],"0"],MF:["590","00","(?:590\\d|7090)\\d{5}|(?:69|80|9\\d)\\d{7}",[9],0,"0",0,0,0,0,0,[["590(?:0[079]|[14]3|[27][79]|3[03-7]|5[0-268]|87)\\d{4}"],["(?:69(?:0\\d\\d|1(?:2[2-9]|3[0-5])|4(?:0[89]|1[2-6]|9\\d)|6(?:1[016-9]|5[0-4]|[67]\\d))|7090[0-4])\\d{4}"],["80[0-5]\\d{6}"],0,0,0,0,0,["9(?:(?:39[5-7]|76[018])\\d|475[0-6])\\d{4}"]]],MG:["261","00","[23]\\d{8}",[9],[["(\\d{2})(\\d{2})(\\d{3})(\\d{2})","$1 $2 $3 $4",["[23]"],"0$1"]],"0",0,"([24-9]\\d{6})$|0","20$1"],MH:["692","011","329\\d{4}|(?:[256]\\d|45)\\d{5}",[7],[["(\\d{3})(\\d{4})","$1-$2",["[2-6]"]]],"1"],MK:["389","00","[2-578]\\d{7}",[8],[["(\\d)(\\d{3})(\\d{4})","$1 $2 $3",["2|34[47]|4(?:[37]7|5[47]|64)"],"0$1"],["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["[347]"],"0$1"],["(\\d{3})(\\d)(\\d{2})(\\d{2})","$1 $2 $3 $4",["[58]"],"0$1"]],"0"],ML:["223","00","[24-9]\\d{7}",[8],[["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[24-9]"]]]],MM:["95","00","1\\d{5,7}|95\\d{6}|(?:[4-7]|9[0-46-9])\\d{6,8}|(?:2|8\\d)\\d{5,8}",[6,7,8,9,10],[["(\\d)(\\d{2})(\\d{3})","$1 $2 $3",["16|2"],"0$1"],["(\\d{2})(\\d{2})(\\d{3})","$1 $2 $3",["4(?:[2-46]|5[3-5])|5|6(?:[1-689]|7[235-7])|7(?:[0-4]|5[2-7])|8[1-5]|(?:60|86)[23]"],"0$1"],["(\\d)(\\d{3})(\\d{3,4})","$1 $2 $3",["[12]|452|678|86","[12]|452|6788|86"],"0$1"],["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["[4-7]|8[1-35]"],"0$1"],["(\\d)(\\d{3})(\\d{4,6})","$1 $2 $3",["9(?:2[0-4]|[35-9]|4[137-9])"],"0$1"],["(\\d)(\\d{4})(\\d{4})","$1 $2 $3",["2"],"0$1"],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["8"],"0$1"],["(\\d)(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3 $4",["92"],"0$1"],["(\\d)(\\d{5})(\\d{4})","$1 $2 $3",["9"],"0$1"]],"0"],MN:["976","001","[12]\\d{7,9}|[5-9]\\d{7}",[8,9,10],[["(\\d{2})(\\d{2})(\\d{4})","$1 $2 $3",["[12]1"],"0$1"],["(\\d{4})(\\d{4})","$1 $2",["[5-9]"]],["(\\d{3})(\\d{5,6})","$1 $2",["[12]2[1-3]"],"0$1"],["(\\d{4})(\\d{5,6})","$1 $2",["[12](?:27|3[2-8]|4[2-68]|5[1-4689])","[12](?:27|3[2-8]|4[2-68]|5[1-4689])[0-3]"],"0$1"],["(\\d{5})(\\d{4,5})","$1 $2",["[12]"],"0$1"]],"0"],MO:["853","00","0800\\d{3}|(?:28|[68]\\d)\\d{6}",[7,8],[["(\\d{4})(\\d{3})","$1 $2",["0"]],["(\\d{4})(\\d{4})","$1 $2",["[268]"]]]],MP:["1","011","[58]\\d{9}|(?:67|90)0\\d{7}",[10],0,"1",0,"([2-9]\\d{6})$|1","670$1",0,"670"],MQ:["596","00","(?:596\\d|7091)\\d{5}|(?:69|[89]\\d)\\d{7}",[9],[["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[5-79]|8(?:0[6-9]|[36])"],"0$1"],["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["8"],"0$1"]],"0"],MR:["222","00","(?:[2-4]\\d\\d|800)\\d{5}",[8],[["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[2-48]"]]]],MS:["1","011","(?:[58]\\d\\d|664|900)\\d{7}",[10],0,"1",0,"([34]\\d{6})$|1","664$1",0,"664"],MT:["356","00","3550\\d{4}|(?:[2579]\\d\\d|800)\\d{5}",[8],[["(\\d{4})(\\d{4})","$1 $2",["[2357-9]"]]]],MU:["230","0(?:0|[24-7]0|3[03])","(?:[57]|8\\d\\d)\\d{7}|[2-468]\\d{6}",[7,8,10],[["(\\d{3})(\\d{4})","$1 $2",["[2-46]|8[013]"]],["(\\d{4})(\\d{4})","$1 $2",["[57]"]],["(\\d{5})(\\d{5})","$1 $2",["8"]]],0,0,0,0,0,0,0,"020"],MV:["960","0(?:0|19)","(?:800|9[0-57-9]\\d)\\d{7}|[34679]\\d{6}",[7,10],[["(\\d{3})(\\d{4})","$1-$2",["[34679]"]],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["[89]"]]],0,0,0,0,0,0,0,"00"],MW:["265","00","(?:[1289]\\d|31|77)\\d{7}|1\\d{6}",[7,9],[["(\\d)(\\d{3})(\\d{3})","$1 $2 $3",["1[2-9]"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["2"],"0$1"],["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[137-9]"],"0$1"]],"0"],MX:["52","0[09]","[2-9]\\d{9}",[10],[["(\\d{2})(\\d{4})(\\d{4})","$1 $2 $3",["33|5[56]|81"]],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["[2-9]"]]],0,0,0,0,0,0,0,"00"],MY:["60","00","1\\d{8,9}|(?:3\\d|[4-9])\\d{7}",[8,9,10],[["(\\d)(\\d{3})(\\d{4})","$1-$2 $3",["[4-79]"],"0$1"],["(\\d{2})(\\d{3})(\\d{3,4})","$1-$2 $3",["1(?:[02469]|[378][1-9]|53)|8","1(?:[02469]|[37][1-9]|53|8(?:[1-46-9]|5[7-9]))|8"],"0$1"],["(\\d)(\\d{4})(\\d{4})","$1-$2 $3",["3"],"0$1"],["(\\d)(\\d{3})(\\d{2})(\\d{4})","$1-$2-$3-$4",["1(?:[367]|80)"]],["(\\d{3})(\\d{3})(\\d{4})","$1-$2 $3",["15"],"0$1"],["(\\d{2})(\\d{4})(\\d{4})","$1-$2 $3",["1"],"0$1"]],"0"],MZ:["258","00","(?:2|8\\d)\\d{7}",[8,9],[["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["2|8[2-79]"]],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["8"]]]],NA:["264","00","[68]\\d{7,8}",[8,9],[["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["88"],"0$1"],["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["6"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["87"],"0$1"],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["8"],"0$1"]],"0"],NC:["687","00","(?:050|[2-57-9]\\d\\d)\\d{3}",[6],[["(\\d{2})(\\d{2})(\\d{2})","$1.$2.$3",["[02-57-9]"]]]],NE:["227","00","[027-9]\\d{7}",[8],[["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["08"]],["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[089]|2[013]|7[0467]"]]]],NF:["672","00","[13]\\d{5}",[6],[["(\\d{2})(\\d{4})","$1 $2",["1[0-3]"]],["(\\d)(\\d{5})","$1 $2",["[13]"]]],0,0,"([0-258]\\d{4})$","3$1"],NG:["234","009","(?:20|9\\d)\\d{8}|[78]\\d{9,13}",[10,11,12,13,14],[["(\\d{3})(\\d{3})(\\d{3,4})","$1 $2 $3",["[7-9]"],"0$1"],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["20[129]"],"0$1"],["(\\d{4})(\\d{2})(\\d{4})","$1 $2 $3",["2"],"0$1"],["(\\d{3})(\\d{4})(\\d{4,5})","$1 $2 $3",["[78]"],"0$1"],["(\\d{3})(\\d{5})(\\d{5,6})","$1 $2 $3",["[78]"],"0$1"]],"0"],NI:["505","00","(?:1800|[25-8]\\d{3})\\d{4}",[8],[["(\\d{4})(\\d{4})","$1 $2",["[125-8]"]]]],NL:["31","00","(?:[124-7]\\d\\d|3(?:[02-9]\\d|1[0-8]))\\d{6}|8\\d{6,9}|9\\d{6,10}|1\\d{4,5}",[5,6,7,8,9,10,11],[["(\\d{3})(\\d{4,7})","$1 $2",["[89]0"],"0$1"],["(\\d{2})(\\d{7})","$1 $2",["66"],"0$1"],["(\\d)(\\d{8})","$1 $2",["6"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["1[16-8]|2[259]|3[124]|4[17-9]|5[124679]"],"0$1"],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["[1-578]|91"],"0$1"],["(\\d{3})(\\d{3})(\\d{5})","$1 $2 $3",["9"],"0$1"]],"0"],NO:["47","00","(?:0|[2-9]\\d{3})\\d{4}",[5,8],[["(\\d{3})(\\d{2})(\\d{3})","$1 $2 $3",["8"]],["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[2-79]"]]],0,0,0,0,0,"[02-689]|7[0-8]"],NP:["977","00","(?:1\\d|9)\\d{9}|[1-9]\\d{7}",[8,10,11],[["(\\d)(\\d{7})","$1-$2",["1[2-6]"],"0$1"],["(\\d{2})(\\d{6})","$1-$2",["1[01]|[2-8]|9(?:[1-59]|[67][2-6])"],"0$1"],["(\\d{3})(\\d{7})","$1-$2",["9"]]],"0"],NR:["674","00","(?:222|444|(?:55|8\\d)\\d|666|777|999)\\d{4}",[7],[["(\\d{3})(\\d{4})","$1 $2",["[24-9]"]]]],NU:["683","00","(?:[4-7]|888\\d)\\d{3}",[4,7],[["(\\d{3})(\\d{4})","$1 $2",["8"]]]],NZ:["64","0(?:0|161)","[1289]\\d{9}|50\\d{5}(?:\\d{2,3})?|[27-9]\\d{7,8}|(?:[34]\\d|6[0-35-9])\\d{6}|8\\d{4,6}",[5,6,7,8,9,10],[["(\\d{2})(\\d{3,8})","$1 $2",["8[1-79]"],"0$1"],["(\\d{3})(\\d{2})(\\d{2,3})","$1 $2 $3",["50[036-8]|8|90","50(?:[0367]|88)|8|90"],"0$1"],["(\\d)(\\d{3})(\\d{4})","$1 $2 $3",["24|[346]|7[2-57-9]|9[2-9]"],"0$1"],["(\\d{3})(\\d{3})(\\d{3,4})","$1 $2 $3",["2(?:10|74)|[589]"],"0$1"],["(\\d{2})(\\d{3,4})(\\d{4})","$1 $2 $3",["1|2[028]"],"0$1"],["(\\d{2})(\\d{3})(\\d{3,5})","$1 $2 $3",["2(?:[169]|7[0-35-9])|7"],"0$1"]],"0",0,0,0,0,0,0,"00"],OM:["968","00","(?:1505|[279]\\d{3}|500)\\d{4}|800\\d{5,6}",[7,8,9],[["(\\d{3})(\\d{4,6})","$1 $2",["[58]"]],["(\\d{2})(\\d{6})","$1 $2",["2"]],["(\\d{4})(\\d{4})","$1 $2",["[179]"]]]],PA:["507","00","(?:00800|8\\d{3})\\d{6}|[68]\\d{7}|[1-57-9]\\d{6}",[7,8,10,11],[["(\\d{3})(\\d{4})","$1-$2",["[1-57-9]"]],["(\\d{4})(\\d{4})","$1-$2",["[68]"]],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["8"]]]],PE:["51","00|19(?:1[124]|77|90)00","(?:[14-8]|9\\d)\\d{7}",[8,9],[["(\\d{3})(\\d{5})","$1 $2",["80"],"(0$1)"],["(\\d)(\\d{7})","$1 $2",["1"],"(0$1)"],["(\\d{2})(\\d{6})","$1 $2",["[4-8]"],"(0$1)"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["9"]]],"0",0,0,0,0,0,0,"00"," Anexo "],PF:["689","00","4\\d{5}(?:\\d{2})?|8\\d{7,8}",[6,8,9],[["(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3",["44"]],["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["4|8[7-9]"]],["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["8"]]]],PG:["675","00|140[1-3]","(?:180|[78]\\d{3})\\d{4}|(?:[2-589]\\d|64)\\d{5}",[7,8],[["(\\d{3})(\\d{4})","$1 $2",["18|[2-69]|85"]],["(\\d{4})(\\d{4})","$1 $2",["[78]"]]],0,0,0,0,0,0,0,"00"],PH:["63","00","(?:[2-7]|9\\d)\\d{8}|2\\d{5}|(?:1800|8)\\d{7,9}",[6,8,9,10,11,12,13],[["(\\d)(\\d{5})","$1 $2",["2"],"(0$1)"],["(\\d{4})(\\d{4,6})","$1 $2",["3(?:23|39|46)|4(?:2[3-6]|[35]9|4[26]|76)|544|88[245]|(?:52|64|86)2","3(?:230|397|461)|4(?:2(?:35|[46]4|51)|396|4(?:22|63)|59[347]|76[15])|5(?:221|446)|642[23]|8(?:622|8(?:[24]2|5[13]))"],"(0$1)"],["(\\d{5})(\\d{4})","$1 $2",["346|4(?:27|9[35])|883","3469|4(?:279|9(?:30|56))|8834"],"(0$1)"],["(\\d)(\\d{4})(\\d{4})","$1 $2 $3",["2"],"(0$1)"],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["[3-7]|8[2-8]"],"(0$1)"],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["[89]"],"0$1"],["(\\d{4})(\\d{3})(\\d{4})","$1 $2 $3",["1"]],["(\\d{4})(\\d{1,2})(\\d{3})(\\d{4})","$1 $2 $3 $4",["1"]]],"0"],PK:["92","00","122\\d{6}|[24-8]\\d{10,11}|9(?:[013-9]\\d{8,10}|2(?:[01]\\d\\d|2(?:[06-8]\\d|1[01]))\\d{7})|(?:[2-8]\\d{3}|92(?:[0-7]\\d|8[1-9]))\\d{6}|[24-9]\\d{8}|[89]\\d{7}",[8,9,10,11,12],[["(\\d{3})(\\d{3})(\\d{2,7})","$1 $2 $3",["[89]0"],"0$1"],["(\\d{4})(\\d{5})","$1 $2",["1"]],["(\\d{3})(\\d{6,7})","$1 $2",["2(?:3[2358]|4[2-4]|9[2-8])|45[3479]|54[2-467]|60[468]|72[236]|8(?:2[2-689]|3[23578]|4[3478]|5[2356])|9(?:2[2-8]|3[27-9]|4[2-6]|6[3569]|9[25-8])","9(?:2[3-8]|98)|(?:2(?:3[2358]|4[2-4]|9[2-8])|45[3479]|54[2-467]|60[468]|72[236]|8(?:2[2-689]|3[23578]|4[3478]|5[2356])|9(?:22|3[27-9]|4[2-6]|6[3569]|9[25-7]))[2-9]"],"(0$1)"],["(\\d{2})(\\d{7,8})","$1 $2",["(?:2[125]|4[0-246-9]|5[1-35-7]|6[1-8]|7[14]|8[16]|91)[2-9]"],"(0$1)"],["(\\d{5})(\\d{5})","$1 $2",["58"],"(0$1)"],["(\\d{3})(\\d{7})","$1 $2",["3"],"0$1"],["(\\d{2})(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3 $4",["2[125]|4[0-246-9]|5[1-35-7]|6[1-8]|7[14]|8[16]|91"],"(0$1)"],["(\\d{3})(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3 $4",["[24-9]"],"(0$1)"]],"0"],PL:["48","00","(?:6|8\\d\\d)\\d{7}|[1-9]\\d{6}(?:\\d{2})?|[26]\\d{5}",[6,7,8,9,10],[["(\\d{5})","$1",["19"]],["(\\d{3})(\\d{3})","$1 $2",["11|20|64"]],["(\\d{2})(\\d{2})(\\d{3})","$1 $2 $3",["(?:1[2-8]|2[2-69]|3[2-4]|4[1-468]|5[24-689]|6[1-3578]|7[14-7]|8[1-79]|9[145])1","(?:1[2-8]|2[2-69]|3[2-4]|4[1-468]|5[24-689]|6[1-3578]|7[14-7]|8[1-79]|9[145])19"]],["(\\d{3})(\\d{2})(\\d{2,3})","$1 $2 $3",["64"]],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["21|39|45|5[0137]|6[0469]|7[02389]|8(?:0[14]|8)"]],["(\\d{2})(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3 $4",["1[2-8]|[2-7]|8[1-79]|9[145]"]],["(\\d{3})(\\d{3})(\\d{3,4})","$1 $2 $3",["8"]]]],PM:["508","00","[45]\\d{5}|(?:708|8\\d\\d)\\d{6}",[6,9],[["(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3",["[45]"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["7"]],["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["8"],"0$1"]],"0"],PR:["1","011","(?:[589]\\d\\d|787)\\d{7}",[10],0,"1",0,0,0,0,"787|939"],PS:["970","00","[2489]2\\d{6}|(?:1\\d|5)\\d{8}",[8,9,10],[["(\\d)(\\d{3})(\\d{4})","$1 $2 $3",["[2489]"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["5"],"0$1"],["(\\d{4})(\\d{3})(\\d{3})","$1 $2 $3",["1"]]],"0"],PT:["351","00","1693\\d{5}|(?:[26-9]\\d|30)\\d{7}",[9],[["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["2[12]"]],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["16|[236-9]"]]]],PW:["680","01[12]","(?:[24-8]\\d\\d|345|900)\\d{4}",[7],[["(\\d{3})(\\d{4})","$1 $2",["[2-9]"]]]],PY:["595","00","59\\d{4,6}|9\\d{5,10}|(?:[2-46-8]\\d|5[0-8])\\d{4,7}",[6,7,8,9,10,11],[["(\\d{3})(\\d{3,6})","$1 $2",["[2-9]0"],"0$1"],["(\\d{2})(\\d{5})","$1 $2",["[26]1|3[289]|4[1246-8]|7[1-3]|8[1-36]"],"(0$1)"],["(\\d{3})(\\d{4,5})","$1 $2",["2[279]|3[13-5]|4[359]|5|6(?:[34]|7[1-46-8])|7[46-8]|85"],"(0$1)"],["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["2[14-68]|3[26-9]|4[1246-8]|6(?:1|75)|7[1-35]|8[1-36]"],"(0$1)"],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["87"]],["(\\d{3})(\\d{6})","$1 $2",["9(?:[5-79]|8[1-7])"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[2-8]"],"0$1"],["(\\d{4})(\\d{3})(\\d{4})","$1 $2 $3",["9"]]],"0"],QA:["974","00","800\\d{4}|(?:2|800)\\d{6}|(?:0080|[3-7])\\d{7}",[7,8,9,11],[["(\\d{3})(\\d{4})","$1 $2",["2[136]|8"]],["(\\d{4})(\\d{4})","$1 $2",["[3-7]"]]]],RE:["262","00","709\\d{6}|(?:26|[689]\\d)\\d{7}",[9],[["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[26-9]"],"0$1"]],"0",0,0,0,0,0,[["26(?:2\\d\\d|3(?:0\\d|1[0-6]))\\d{4}"],["(?:69(?:2\\d\\d|3(?:[06][0-6]|1[0-3]|2[0-2]|3[0-39]|4\\d|5[0-5]|7[0-37]|8[0-8]|9[0-479]))|7092[0-3])\\d{4}"],["80\\d{7}"],["89[1-37-9]\\d{6}"],0,0,0,0,["9(?:399[0-3]|479[0-6]|76(?:2[278]|3[0-37]))\\d{4}"],["8(?:1[019]|2[0156]|84|90)\\d{6}"]]],RO:["40","00","(?:[236-8]\\d|90)\\d{7}|[23]\\d{5}",[6,9],[["(\\d{3})(\\d{3})","$1 $2",["2[3-6]","2[3-6]\\d9"],"0$1"],["(\\d{2})(\\d{4})","$1 $2",["219|31"],"0$1"],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["[23]1"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[236-9]"],"0$1"]],"0",0,0,0,0,0,0,0," int "],RS:["381","00","38[02-9]\\d{6,9}|6\\d{7,9}|90\\d{4,8}|38\\d{5,6}|(?:7\\d\\d|800)\\d{3,9}|(?:[12]\\d|3[0-79])\\d{5,10}",[6,7,8,9,10,11,12],[["(\\d{3})(\\d{3,9})","$1 $2",["(?:2[389]|39)0|[7-9]"],"0$1"],["(\\d{2})(\\d{5,10})","$1 $2",["[1-36]"],"0$1"]],"0"],RU:["7","810","8\\d{13}|[347-9]\\d{9}",[10,14],[["(\\d{4})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["7(?:1[0-8]|2[1-9])","7(?:1(?:[0-356]2|4[29]|7|8[27])|2(?:1[23]|[2-9]2))","7(?:1(?:[0-356]2|4[29]|7|8[27])|2(?:13[03-69]|62[013-9]))|72[1-57-9]2"],"8 ($1)",1],["(\\d{5})(\\d)(\\d{2})(\\d{2})","$1 $2 $3 $4",["7(?:1[0-68]|2[1-9])","7(?:1(?:[06][3-6]|[18]|2[35]|[3-5][3-5])|2(?:[13][3-5]|[24-689]|7[457]))","7(?:1(?:0(?:[356]|4[023])|[18]|2(?:3[013-9]|5)|3[45]|43[013-79]|5(?:3[1-8]|4[1-7]|5)|6(?:3[0-35-9]|[4-6]))|2(?:1(?:3[178]|[45])|[24-689]|3[35]|7[457]))|7(?:14|23)4[0-8]|71(?:33|45)[1-79]"],"8 ($1)",1],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["7"],"8 ($1)",1],["(\\d{3})(\\d{3})(\\d{2})(\\d{2})","$1 $2-$3-$4",["[349]|8(?:[02-7]|1[1-8])"],"8 ($1)",1],["(\\d{4})(\\d{4})(\\d{3})(\\d{3})","$1 $2 $3 $4",["8"],"8 ($1)"]],"8",0,0,0,0,0,[["336(?:[013-9]\\d|2[013-9])\\d{5}|(?:3(?:0[12]|4[1-35-79]|5[1-3]|65|8[1-58]|9[0145])|4(?:01|1[1356]|2[13467]|7[1-5]|8[1-7]|9[1-689])|8(?:1[1-8]|2[01]|3[13-6]|4[0-8]|5[15-7]|6[0-35-79]|7[1-37-9]))\\d{7}",[10]],["9\\d{9}",[10]],["8(?:0[04]|108\\d{3})\\d{7}"],["80[39]\\d{7}",[10]],["808\\d{7}",[10]]],"8~10"],RW:["250","00","(?:06|[27]\\d\\d|[89]00)\\d{6}",[8,9],[["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["0"]],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["2"]],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[7-9]"],"0$1"]],"0"],SA:["966","00","(?:[15]\\d|800|92)\\d{7}",[9,10],[["(\\d{4})(\\d{5})","$1 $2",["9"]],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["1"],"0$1"],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["5"],"0$1"],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["8"]]],"0"],SB:["677","0[01]","[6-9]\\d{6}|[1-6]\\d{4}",[5,7],[["(\\d{2})(\\d{5})","$1 $2",["6[89]|7|8[4-9]|9(?:[1-8]|9[0-8])"]]]],SC:["248","010|0[0-2]","(?:[2489]\\d|64)\\d{5}",[7],[["(\\d)(\\d{3})(\\d{3})","$1 $2 $3",["[246]|9[57]"]]],0,0,0,0,0,0,0,"00"],SD:["249","00","[19]\\d{8}",[9],[["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["[19]"],"0$1"]],"0"],SE:["46","00","(?:[26]\\d\\d|9)\\d{9}|[1-9]\\d{8}|[1-689]\\d{7}|[1-4689]\\d{6}|2\\d{5}",[6,7,8,9,10,12],[["(\\d{2})(\\d{2,3})(\\d{2})","$1-$2 $3",["20"],"0$1",0,"$1 $2 $3"],["(\\d{3})(\\d{4})","$1-$2",["9(?:00|39|44|9)"],"0$1",0,"$1 $2"],["(\\d{2})(\\d{3})(\\d{2})","$1-$2 $3",["[12][136]|3[356]|4[0246]|6[03]|90[1-9]"],"0$1",0,"$1 $2 $3"],["(\\d)(\\d{2,3})(\\d{2})(\\d{2})","$1-$2 $3 $4",["8"],"0$1",0,"$1 $2 $3 $4"],["(\\d{3})(\\d{2,3})(\\d{2})","$1-$2 $3",["1[2457]|2(?:[247-9]|5[0138])|3[0247-9]|4[1357-9]|5[0-35-9]|6(?:[125689]|4[02-57]|7[0-2])|9(?:[125-8]|3[02-5]|4[0-3])"],"0$1",0,"$1 $2 $3"],["(\\d{3})(\\d{2,3})(\\d{3})","$1-$2 $3",["9(?:00|39|44)"],"0$1",0,"$1 $2 $3"],["(\\d{2})(\\d{2,3})(\\d{2})(\\d{2})","$1-$2 $3 $4",["1[13689]|2[0136]|3[1356]|4[0246]|54|6[03]|90[1-9]"],"0$1",0,"$1 $2 $3 $4"],["(\\d{2})(\\d{3})(\\d{2})(\\d{2})","$1-$2 $3 $4",["10|7"],"0$1",0,"$1 $2 $3 $4"],["(\\d)(\\d{3})(\\d{3})(\\d{2})","$1-$2 $3 $4",["8"],"0$1",0,"$1 $2 $3 $4"],["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1-$2 $3 $4",["[13-5]|2(?:[247-9]|5[0138])|6(?:[124-689]|7[0-2])|9(?:[125-8]|3[02-5]|4[0-3])"],"0$1",0,"$1 $2 $3 $4"],["(\\d{3})(\\d{2})(\\d{2})(\\d{3})","$1-$2 $3 $4",["9"],"0$1",0,"$1 $2 $3 $4"],["(\\d{3})(\\d{2})(\\d{3})(\\d{2})(\\d{2})","$1-$2 $3 $4 $5",["[26]"],"0$1",0,"$1 $2 $3 $4 $5"]],"0"],SG:["65","0[0-3]\\d","(?:(?:1\\d|8)\\d\\d|7000)\\d{7}|[3689]\\d{7}",[8,10,11],[["(\\d{4})(\\d{4})","$1 $2",["[369]|8(?:0[1-9]|[1-9])"]],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["8"]],["(\\d{4})(\\d{4})(\\d{3})","$1 $2 $3",["7"]],["(\\d{4})(\\d{3})(\\d{4})","$1 $2 $3",["1"]]]],SH:["290","00","(?:[256]\\d|8)\\d{3}",[4,5],0,0,0,0,0,0,"[256]"],SI:["386","00|10(?:22|66|88|99)","[1-7]\\d{7}|8\\d{4,7}|90\\d{4,6}",[5,6,7,8],[["(\\d{2})(\\d{3,6})","$1 $2",["8[09]|9"],"0$1"],["(\\d{3})(\\d{5})","$1 $2",["59|8"],"0$1"],["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["[37][01]|4[0139]|51|6"],"0$1"],["(\\d)(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[1-57]"],"(0$1)"]],"0",0,0,0,0,0,0,"00"],SJ:["47","00","0\\d{4}|(?:[489]\\d|79)\\d{6}",[5,8],0,0,0,0,0,0,"79"],SK:["421","00","[2-689]\\d{8}|[2-59]\\d{6}|[2-5]\\d{5}",[6,7,9],[["(\\d)(\\d{2})(\\d{3,4})","$1 $2 $3",["21"],"0$1"],["(\\d{2})(\\d{2})(\\d{2,3})","$1 $2 $3",["[3-5][1-8]1","[3-5][1-8]1[67]"],"0$1"],["(\\d)(\\d{3})(\\d{3})(\\d{2})","$1/$2 $3 $4",["2"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[689]"],"0$1"],["(\\d{2})(\\d{3})(\\d{2})(\\d{2})","$1/$2 $3 $4",["[3-5]"],"0$1"]],"0"],SL:["232","00","(?:[237-9]\\d|66)\\d{6}",[8],[["(\\d{2})(\\d{6})","$1 $2",["[236-9]"],"(0$1)"]],"0"],SM:["378","00","(?:0549|[5-7]\\d)\\d{6}",[8,10],[["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[5-7]"]],["(\\d{4})(\\d{6})","$1 $2",["0"]]],0,0,"([89]\\d{5})$","0549$1"],SN:["221","00","(?:[378]\\d|93)\\d{7}",[9],[["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["8"]],["(\\d{2})(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[379]"]]]],SO:["252","00","[346-9]\\d{8}|[12679]\\d{7}|[1-5]\\d{6}|[1348]\\d{5}",[6,7,8,9],[["(\\d{2})(\\d{4})","$1 $2",["8[125]"]],["(\\d{6})","$1",["[134]"]],["(\\d)(\\d{6})","$1 $2",["[15]|2[0-79]|3[0-46-8]|4[0-7]"]],["(\\d)(\\d{7})","$1 $2",["(?:2|90)4|[67]"]],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[348]|64|79|90"]],["(\\d{2})(\\d{5,7})","$1 $2",["1|28|6[0-35-9]|7[67]|9[2-9]"]]],"0"],SR:["597","00","(?:[2-5]|[6-8]\\d|90)\\d{5}",[6,7],[["(\\d{2})(\\d{2})(\\d{2})","$1-$2-$3",["56"]],["(\\d{3})(\\d{3})","$1-$2",["[2-5]"]],["(\\d{3})(\\d{4})","$1-$2",["[6-9]"]]]],SS:["211","00","[19]\\d{8}",[9],[["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[19]"],"0$1"]],"0"],ST:["239","00","(?:22|9\\d)\\d{5}",[7],[["(\\d{3})(\\d{4})","$1 $2",["[29]"]]]],SV:["503","00","[267]\\d{7}|(?:80\\d|900)\\d{4}(?:\\d{4})?",[7,8,11],[["(\\d{3})(\\d{4})","$1 $2",["[89]"]],["(\\d{4})(\\d{4})","$1 $2",["[267]"]],["(\\d{3})(\\d{4})(\\d{4})","$1 $2 $3",["[89]"]]]],SX:["1","011","7215\\d{6}|(?:[58]\\d\\d|900)\\d{7}",[10],0,"1",0,"(5\\d{6})$|1","721$1",0,"721"],SY:["963","00","[1-359]\\d{8}|[1-5]\\d{7}",[8,9],[["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["[1-4]|5[1-3]"],"0$1",1],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[59]"],"0$1",1]],"0"],SZ:["268","00","0800\\d{4}|(?:[237]\\d|900)\\d{6}",[8,9],[["(\\d{4})(\\d{4})","$1 $2",["[0237]"]],["(\\d{5})(\\d{4})","$1 $2",["9"]]]],TA:["290","00","8\\d{3}",[4],0,0,0,0,0,0,"8"],TC:["1","011","(?:[58]\\d\\d|649|900)\\d{7}",[10],0,"1",0,"([2-479]\\d{6})$|1","649$1",0,"649"],TD:["235","00|16","(?:22|30|[689]\\d|77)\\d{6}",[8],[["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[236-9]"]]],0,0,0,0,0,0,0,"00"],TG:["228","00","[279]\\d{7}",[8],[["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[279]"]]]],TH:["66","00[1-9]","(?:001800|[2-57]|[689]\\d)\\d{7}|1\\d{7,9}",[8,9,10,13],[["(\\d)(\\d{3})(\\d{4})","$1 $2 $3",["2"],"0$1"],["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["[13-9]"],"0$1"],["(\\d{4})(\\d{3})(\\d{3})","$1 $2 $3",["1"]]],"0"],TJ:["992","810","[0-57-9]\\d{8}",[9],[["(\\d{6})(\\d)(\\d{2})","$1 $2 $3",["331","3317"]],["(\\d{3})(\\d{2})(\\d{4})","$1 $2 $3",["44[02-479]|[34]7"]],["(\\d{4})(\\d)(\\d{4})","$1 $2 $3",["3(?:[1245]|3[12])"]],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["[0-57-9]"]]],0,0,0,0,0,0,0,"8~10"],TK:["690","00","[2-47]\\d{3,6}",[4,5,6,7]],TL:["670","00","7\\d{7}|(?:[2-47]\\d|[89]0)\\d{5}",[7,8],[["(\\d{3})(\\d{4})","$1 $2",["[2-489]|70"]],["(\\d{4})(\\d{4})","$1 $2",["7"]]]],TM:["993","810","(?:[1-6]\\d|71)\\d{6}",[8],[["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2-$3-$4",["12"],"(8 $1)"],["(\\d{3})(\\d)(\\d{2})(\\d{2})","$1 $2-$3-$4",["[1-5]"],"(8 $1)"],["(\\d{2})(\\d{6})","$1 $2",["[67]"],"8 $1"]],"8",0,0,0,0,0,0,"8~10"],TN:["216","00","[2-57-9]\\d{7}",[8],[["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["[2-57-9]"]]]],TO:["676","00","(?:0800|(?:[5-8]\\d\\d|999)\\d)\\d{3}|[2-8]\\d{4}",[5,7],[["(\\d{2})(\\d{3})","$1-$2",["[2-4]|50|6[09]|7[0-24-69]|8[05]"]],["(\\d{4})(\\d{3})","$1 $2",["0"]],["(\\d{3})(\\d{4})","$1 $2",["[5-9]"]]]],TR:["90","00","4\\d{6}|8\\d{11,12}|(?:[2-58]\\d\\d|900)\\d{7}",[7,10,12,13],[["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["512|8[01589]|90"],"0$1",1],["(\\d{3})(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3 $4",["5(?:[0-59]|61)","5(?:[0-59]|61[06])","5(?:[0-59]|61[06]1)"],"0$1",1],["(\\d{3})(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[24][1-8]|3[1-9]"],"(0$1)",1],["(\\d{3})(\\d{3})(\\d{6,7})","$1 $2 $3",["80"],"0$1",1]],"0"],TT:["1","011","(?:[58]\\d\\d|900)\\d{7}",[10],0,"1",0,"([2-46-8]\\d{6})$|1","868$1",0,"868"],TV:["688","00","(?:2|7\\d\\d|90)\\d{4}",[5,6,7],[["(\\d{2})(\\d{3})","$1 $2",["2"]],["(\\d{2})(\\d{4})","$1 $2",["90"]],["(\\d{2})(\\d{5})","$1 $2",["7"]]]],TW:["886","0(?:0[25-79]|19)","[2-689]\\d{8}|7\\d{9,10}|[2-8]\\d{7}|2\\d{6}",[7,8,9,10,11],[["(\\d{2})(\\d)(\\d{4})","$1 $2 $3",["202"],"0$1"],["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["[258]0"],"0$1"],["(\\d)(\\d{3,4})(\\d{4})","$1 $2 $3",["[23568]|4(?:0[02-48]|[1-47-9])|7[1-9]","[23568]|4(?:0[2-48]|[1-47-9])|(?:400|7)[1-9]"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[49]"],"0$1"],["(\\d{2})(\\d{4})(\\d{4,5})","$1 $2 $3",["7"],"0$1"]],"0",0,0,0,0,0,0,0,"#"],TZ:["255","00[056]","(?:[25-8]\\d|41|90)\\d{7}",[9],[["(\\d{3})(\\d{2})(\\d{4})","$1 $2 $3",["[89]"],"0$1"],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["[24]"],"0$1"],["(\\d{2})(\\d{7})","$1 $2",["5"]],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[67]"],"0$1"]],"0"],UA:["380","00","[89]\\d{9}|[3-9]\\d{8}",[9,10],[["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["6[12][29]|(?:3[1-8]|4[136-8]|5[12457]|6[49])2|(?:56|65)[24]","6[12][29]|(?:35|4[1378]|5[12457]|6[49])2|(?:56|65)[24]|(?:3[1-46-8]|46)2[013-9]"],"0$1"],["(\\d{4})(\\d{5})","$1 $2",["3[1-8]|4(?:[1367]|[45][6-9]|8[4-6])|5(?:[1-5]|6[0135689]|7[4-6])|6(?:[12][3-7]|[459])","3[1-8]|4(?:[1367]|[45][6-9]|8[4-6])|5(?:[1-5]|6(?:[015689]|3[02389])|7[4-6])|6(?:[12][3-7]|[459])"],"0$1"],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["[3-7]|89|9[1-9]"],"0$1"],["(\\d{3})(\\d{3})(\\d{3,4})","$1 $2 $3",["[89]"],"0$1"]],"0",0,0,0,0,0,0,"0~0"],UG:["256","00[057]","800\\d{6}|(?:[29]0|[347]\\d)\\d{7}",[9],[["(\\d{4})(\\d{5})","$1 $2",["202","2024"],"0$1"],["(\\d{3})(\\d{6})","$1 $2",["[27-9]|4(?:6[45]|[7-9])"],"0$1"],["(\\d{2})(\\d{7})","$1 $2",["[34]"],"0$1"]],"0"],US:["1","011","[2-9]\\d{9}|3\\d{6}",[10],[["(\\d{3})(\\d{4})","$1-$2",["310"],0,1],["(\\d{3})(\\d{3})(\\d{4})","($1) $2-$3",["[2-9]"],0,1,"$1-$2-$3"]],"1",0,0,0,0,0,[["3052(?:0[0-8]|[1-9]\\d)\\d{4}|(?:2742|305[3-9])\\d{6}|(?:472|983)[2-47-9]\\d{6}|(?:2(?:0[1-35-9]|1[02-9]|2[03-57-9]|3[1459]|4[08]|5[1-46]|6[0279]|7[0269]|8[13])|3(?:0[1-47-9]|1[02-9]|2[0135-79]|3[0-24679]|4[167]|5[0-2]|6[01349]|8[056])|4(?:0[124-9]|1[02-579]|2[3-5]|3[0245]|4[023578]|58|6[349]|7[0589]|8[04])|5(?:0[1-57-9]|1[0235-8]|20|3[0149]|4[01]|5[179]|6[1-47]|7[0-5]|8[0256])|6(?:0[1-35-9]|1[024-9]|2[03689]|3[016]|4[0156]|5[01679]|6[0-279]|78|8[0-269])|7(?:0[1-46-8]|1[2-9]|2[04-8]|3[0-247]|4[0378]|5[47]|6[02359]|7[0-59]|8[156])|8(?:0[1-68]|1[02-8]|2[0168]|3[0-2589]|4[03578]|5[046-9]|6[02-5]|7[028])|9(?:0[1346-9]|1[02-9]|2[0589]|3[0146-8]|4[01357-9]|5[12469]|7[0-3589]|8[04-69]))[2-9]\\d{6}"],[""],["8(?:00|33|44|55|66|77|88)[2-9]\\d{6}"],["900[2-9]\\d{6}"],["52(?:3(?:[2-46-9][02-9]\\d|5(?:[02-46-9]\\d|5[0-46-9]))|4(?:[2-478][02-9]\\d|5(?:[034]\\d|2[024-9]|5[0-46-9])|6(?:0[1-9]|[2-9]\\d)|9(?:[05-9]\\d|2[0-5]|49)))\\d{4}|52[34][2-9]1[02-9]\\d{4}|5(?:00|2[125-9]|33|44|66|77|88)[2-9]\\d{6}"],0,0,0,["305209\\d{4}"]]],UY:["598","0(?:0|1[3-9]\\d)","0004\\d{2,9}|[1249]\\d{7}|2\\d{3,4}|(?:[49]\\d|80)\\d{5}",[4,5,6,7,8,9,10,11,12,13],[["(\\d{4,5})","$1",["21"]],["(\\d{3})(\\d{3,4})","$1 $2",["0"]],["(\\d{3})(\\d{4})","$1 $2",["[49]0|8"],"0$1"],["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["9"],"0$1"],["(\\d{4})(\\d{4})","$1 $2",["[124]"]],["(\\d{3})(\\d{3})(\\d{2,4})","$1 $2 $3",["0"]],["(\\d{3})(\\d{3})(\\d{3})(\\d{2,4})","$1 $2 $3 $4",["0"]]],"0",0,0,0,0,0,0,"00"," int. "],UZ:["998","00","(?:20|33|[5-9]\\d)\\d{7}",[9],[["(\\d{2})(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[235-9]"]]]],VA:["39","00","0\\d{5,10}|3[0-8]\\d{7,10}|55\\d{8}|8\\d{5}(?:\\d{2,4})?|(?:1\\d|39)\\d{7,8}",[6,7,8,9,10,11,12],0,0,0,0,0,0,"06698"],VC:["1","011","(?:[58]\\d\\d|784|900)\\d{7}",[10],0,"1",0,"([2-7]\\d{6})$|1","784$1",0,"784"],VE:["58","00","[68]00\\d{7}|(?:[24]\\d|[59]0)\\d{8}",[10],[["(\\d{3})(\\d{7})","$1-$2",["[24-689]"],"0$1"]],"0"],VG:["1","011","(?:284|[58]\\d\\d|900)\\d{7}",[10],0,"1",0,"([2-578]\\d{6})$|1","284$1",0,"284"],VI:["1","011","[58]\\d{9}|(?:34|90)0\\d{7}",[10],0,"1",0,"([2-9]\\d{6})$|1","340$1",0,"340"],VN:["84","00","[12]\\d{9}|[135-9]\\d{8}|[16]\\d{7}|[16-8]\\d{6}",[7,8,9,10],[["(\\d{2})(\\d{5})","$1 $2",["80"],"0$1",1],["(\\d{4})(\\d{4,6})","$1 $2",["1"],0,1],["(\\d{2})(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3 $4",["6"],"0$1",1],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[357-9]"],"0$1",1],["(\\d{2})(\\d{4})(\\d{4})","$1 $2 $3",["2[48]"],"0$1",1],["(\\d{3})(\\d{4})(\\d{3})","$1 $2 $3",["2"],"0$1",1]],"0"],VU:["678","00","[57-9]\\d{6}|(?:[238]\\d|48)\\d{3}",[5,7],[["(\\d{3})(\\d{4})","$1 $2",["[57-9]"]]]],WF:["681","00","(?:40|72|8\\d{4})\\d{4}|[89]\\d{5}",[6,9],[["(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3",["[47-9]"]],["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["8"]]]],WS:["685","0","(?:[2-6]|8\\d{5})\\d{4}|[78]\\d{6}|[68]\\d{5}",[5,6,7,10],[["(\\d{5})","$1",["[2-5]|6[1-9]"]],["(\\d{3})(\\d{3,7})","$1 $2",["[68]"]],["(\\d{2})(\\d{5})","$1 $2",["7"]]]],XK:["383","00","2\\d{7,8}|3\\d{7,11}|(?:4\\d\\d|[89]00)\\d{5}",[8,9,10,11,12],[["(\\d{3})(\\d{5})","$1 $2",["[89]"],"0$1"],["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["[2-4]"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["2|39"],"0$1"],["(\\d{2})(\\d{7,10})","$1 $2",["3"],"0$1"]],"0"],YE:["967","00","(?:1|7\\d)\\d{7}|[1-7]\\d{6}",[7,8,9],[["(\\d)(\\d{3})(\\d{3,4})","$1 $2 $3",["[1-6]|7(?:[24-6]|8[0-7])"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["7"],"0$1"]],"0"],YT:["262","00","7093\\d{5}|(?:80|9\\d)\\d{7}|(?:26|63)9\\d{6}",[9],0,"0",0,0,0,0,0,[["269(?:0[0-467]|15|5[0-4]|6\\d|[78]0)\\d{4}"],["(?:639(?:0[0-79]|1[019]|[267]\\d|3[09]|40|5[05-9]|9[04-79])|7093[5-7])\\d{4}"],["80\\d{7}"],0,0,0,0,0,["9(?:(?:39|47)8[01]|769\\d)\\d{4}"]]],ZA:["27","00","[1-79]\\d{8}|8\\d{4,9}",[5,6,7,8,9,10],[["(\\d{2})(\\d{3,4})","$1 $2",["8[1-4]"],"0$1"],["(\\d{2})(\\d{3})(\\d{2,3})","$1 $2 $3",["8[1-4]"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["860"],"0$1"],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["[1-9]"],"0$1"],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["8"],"0$1"]],"0"],ZM:["260","00","800\\d{6}|(?:21|[579]\\d|63)\\d{7}",[9],[["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[28]"],"0$1"],["(\\d{2})(\\d{7})","$1 $2",["[579]"],"0$1"]],"0"],ZW:["263","00","2(?:[0-57-9]\\d{6,8}|6[0-24-9]\\d{6,7})|[38]\\d{9}|[35-8]\\d{8}|[3-6]\\d{7}|[1-689]\\d{6}|[1-3569]\\d{5}|[1356]\\d{4}",[5,6,7,8,9,10],[["(\\d{3})(\\d{3,5})","$1 $2",["2(?:0[45]|2[278]|[49]8)|3(?:[09]8|17)|6(?:[29]8|37|75)|[23][78]|(?:33|5[15]|6[68])[78]"],"0$1"],["(\\d)(\\d{3})(\\d{2,4})","$1 $2 $3",["[49]"],"0$1"],["(\\d{3})(\\d{4})","$1 $2",["80"],"0$1"],["(\\d{2})(\\d{7})","$1 $2",["24|8[13-59]|(?:2[05-79]|39|5[45]|6[15-8])2","2(?:02[014]|4|[56]20|[79]2)|392|5(?:42|525)|6(?:[16-8]21|52[013])|8[13-59]"],"(0$1)"],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["7"],"0$1"],["(\\d{3})(\\d{3})(\\d{3,4})","$1 $2 $3",["2(?:1[39]|2[0157]|[378]|[56][14])|3(?:12|29)","2(?:1[39]|2[0157]|[378]|[56][14])|3(?:123|29)"],"0$1"],["(\\d{4})(\\d{6})","$1 $2",["8"],"0$1"],["(\\d{2})(\\d{3,5})","$1 $2",["1|2(?:0[0-36-9]|12|29|[56])|3(?:1[0-689]|[24-6])|5(?:[0236-9]|1[2-4])|6(?:[013-59]|7[0-46-9])|(?:33|55|6[68])[0-69]|(?:29|3[09]|62)[0-79]"],"0$1"],["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["29[013-9]|39|54"],"0$1"],["(\\d{4})(\\d{3,5})","$1 $2",["(?:25|54)8","258|5483"],"0$1"]],"0"]},nonGeographic:{800:["800",0,"(?:00|[1-9]\\d)\\d{6}",[8],[["(\\d{4})(\\d{4})","$1 $2",["\\d"]]],0,0,0,0,0,0,[0,0,["(?:00|[1-9]\\d)\\d{6}"]]],808:["808",0,"[1-9]\\d{7}",[8],[["(\\d{4})(\\d{4})","$1 $2",["[1-9]"]]],0,0,0,0,0,0,[0,0,0,0,0,0,0,0,0,["[1-9]\\d{7}"]]],870:["870",0,"7\\d{11}|[235-7]\\d{8}",[9,12],[["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[235-7]"]]],0,0,0,0,0,0,[0,["(?:[356]|774[45])\\d{8}|7[6-8]\\d{7}"],0,0,0,0,0,0,["2\\d{8}",[9]]]],878:["878",0,"10\\d{10}",[12],[["(\\d{2})(\\d{5})(\\d{5})","$1 $2 $3",["1"]]],0,0,0,0,0,0,[0,0,0,0,0,0,0,0,["10\\d{10}"]]],881:["881",0,"6\\d{9}|[0-36-9]\\d{8}",[9,10],[["(\\d)(\\d{3})(\\d{5})","$1 $2 $3",["[0-37-9]"]],["(\\d)(\\d{3})(\\d{5,6})","$1 $2 $3",["6"]]],0,0,0,0,0,0,[0,["6\\d{9}|[0-36-9]\\d{8}"]]],882:["882",0,"[13]\\d{6}(?:\\d{2,5})?|[19]\\d{7}|(?:[25]\\d\\d|4)\\d{7}(?:\\d{2})?",[7,8,9,10,11,12],[["(\\d{2})(\\d{5})","$1 $2",["16|342"]],["(\\d{2})(\\d{6})","$1 $2",["49"]],["(\\d{2})(\\d{2})(\\d{4})","$1 $2 $3",["1[36]|9"]],["(\\d{2})(\\d{4})(\\d{3})","$1 $2 $3",["3[23]"]],["(\\d{2})(\\d{3,4})(\\d{4})","$1 $2 $3",["16"]],["(\\d{2})(\\d{4})(\\d{4})","$1 $2 $3",["10|23|3(?:[15]|4[57])|4|51"]],["(\\d{3})(\\d{4})(\\d{4})","$1 $2 $3",["34"]],["(\\d{2})(\\d{4,5})(\\d{5})","$1 $2 $3",["[1-35]"]]],0,0,0,0,0,0,[0,["342\\d{4}|(?:337|49)\\d{6}|(?:3(?:2|47|7\\d{3})|50\\d{3})\\d{7}",[7,8,9,10,12]],0,0,0,["348[57]\\d{7}",[11]],0,0,["1(?:3(?:0[0347]|[13][0139]|2[035]|4[013568]|6[0459]|7[06]|8[15-8]|9[0689])\\d{4}|6\\d{5,10})|(?:345\\d|9[89])\\d{6}|(?:10|2(?:3|85\\d)|3(?:[15]|[69]\\d\\d)|4[15-8]|51)\\d{8}"]]],883:["883",0,"(?:[1-4]\\d|51)\\d{6,10}",[8,9,10,11,12],[["(\\d{3})(\\d{3})(\\d{2,8})","$1 $2 $3",["[14]|2[24-689]|3[02-689]|51[24-9]"]],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["510"]],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["21"]],["(\\d{4})(\\d{4})(\\d{4})","$1 $2 $3",["51[13]"]],["(\\d{3})(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3 $4",["[235]"]]],0,0,0,0,0,0,[0,0,0,0,0,0,0,0,["(?:2(?:00\\d\\d|10)|(?:370[1-9]|51\\d0)\\d)\\d{7}|51(?:00\\d{5}|[24-9]0\\d{4,7})|(?:1[0-79]|2[24-689]|3[02-689]|4[0-4])0\\d{5,9}"]]],888:["888",0,"\\d{11}",[11],[["(\\d{3})(\\d{3})(\\d{5})","$1 $2 $3"]],0,0,0,0,0,0,[0,0,0,0,0,0,["\\d{11}"]]],979:["979",0,"[1359]\\d{8}",[9],[["(\\d)(\\d{4})(\\d{4})","$1 $2 $3",["[1359]"]]],0,0,0,0,0,0,[0,0,0,["[1359]\\d{8}"]]]}};var hX={}.constructor;function mX(e){return void 0!==e&&null!==e&&e.constructor===hX}function fX(e){return fX="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},fX(e)}function gX(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function vX(e,t,n){return(t=function(e){var t=function(e,t){if("object"!=fX(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=fX(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==fX(t)?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function xX(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,i,o,a,s=[],l=!0,c=!1;try{if(o=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;l=!1}else for(;!(l=(r=o.call(n)).done)&&(s.push(r.value),s.length!==t);l=!0);}catch(e){c=!0,i=e}finally{try{if(!l&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(c)throw i}}return s}}(e,t)||function(e,t){if(e){if("string"==typeof e)return yX(e,t);var n={}.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)?yX(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function yX(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function bX(e){var t,n,r,i=xX(Array.prototype.slice.call(e),4),o=i[0],a=i[1],s=i[2],l=i[3];if("string"!==typeof o)throw new TypeError("A text for parsing must be a string.");if(t=o,a&&"string"!==typeof a){if(!mX(a))throw new Error("Invalid second argument: ".concat(a));s?(n=a,r=s):r=a}else l?(n=s,r=l):(n=void 0,r=s),a&&(n=function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?gX(Object(n),!0).forEach(function(t){vX(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):gX(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}({defaultCountry:a},n));return{text:t,options:n,metadata:r}}var jX="0-9\uff10-\uff19\u0660-\u0669\u06f0-\u06f9",_X="".concat("-\u2010-\u2015\u2212\u30fc\uff0d").concat("\uff0f/").concat("\uff0e.").concat(" \xa0\xad\u200b\u2060\u3000").concat("()\uff08\uff09\uff3b\uff3d\\[\\]").concat("~\u2053\u223c\uff5e");function CX(e){return CX="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},CX(e)}function wX(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,SX(r.key),r)}}function SX(e){var t=function(e,t){if("object"!=CX(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=CX(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==CX(t)?t:t+""}function AX(e,t,n){return t=MX(t),function(e,t){if(t&&("object"==CX(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,TX()?Reflect.construct(t,n||[],MX(e).constructor):t.apply(e,n))}function kX(e){var t="function"==typeof Map?new Map:void 0;return kX=function(e){if(null===e||!function(e){try{return-1!==Function.toString.call(e).indexOf("[native code]")}catch(Sa){return"function"==typeof e}}(e))return e;if("function"!=typeof e)throw new TypeError("Super expression must either be null or a function");if(void 0!==t){if(t.has(e))return t.get(e);t.set(e,n)}function n(){return function(e,t,n){if(TX())return Reflect.construct.apply(null,arguments);var r=[null];r.push.apply(r,t);var i=new(e.bind.apply(e,r));return n&&EX(i,n.prototype),i}(e,arguments,MX(this).constructor)}return n.prototype=Object.create(e.prototype,{constructor:{value:n,enumerable:!1,writable:!0,configurable:!0}}),EX(n,e)},kX(e)}function TX(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(TX=function(){return!!e})()}function EX(e,t){return EX=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},EX(e,t)}function MX(e){return MX=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},MX(e)}var OX=function(e){function t(e){var n;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),n=AX(this,t,[e]),Object.setPrototypeOf(n,t.prototype),n.name=n.constructor.name,n}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&EX(e,t)}(t,e),function(e,t,n){return t&&wX(e.prototype,t),n&&wX(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}(t)}(kX(Error));function RX(e,t){e=e.split("-"),t=t.split("-");for(var n=e[0].split("."),r=t[0].split("."),i=0;i<3;i++){var o=Number(n[i]),a=Number(r[i]);if(o>a)return 1;if(a>o)return-1;if(!isNaN(o)&&isNaN(a))return 1;if(isNaN(o)&&!isNaN(a))return-1}return e[1]&&t[1]?e[1]>t[1]?1:e[1]<t[1]?-1:0:!e[1]&&t[1]?1:e[1]&&!t[1]?-1:0}function PX(e){return PX="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},PX(e)}function DX(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function NX(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,IX(r.key),r)}}function LX(e,t,n){return t&&NX(e.prototype,t),n&&NX(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function IX(e){var t=function(e,t){if("object"!=PX(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=PX(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==PX(t)?t:t+""}var FX=" ext. ",$X=/^\d+$/,BX=function(){return LX(function e(t){DX(this,e),GX(t),this.metadata=t,ZX.call(this,t)},[{key:"getCountries",value:function(){return Object.keys(this.metadata.countries).filter(function(e){return"001"!==e})}},{key:"getCountryMetadata",value:function(e){return this.metadata.countries[e]}},{key:"nonGeographic",value:function(){if(!(this.v1||this.v2||this.v3))return this.metadata.nonGeographic||this.metadata.nonGeographical}},{key:"hasCountry",value:function(e){return void 0!==this.getCountryMetadata(e)}},{key:"hasCallingCode",value:function(e){if(this.getCountryCodesForCallingCode(e))return!0;if(this.nonGeographic()){if(this.nonGeographic()[e])return!0}else{var t=this.countryCallingCodes()[e];if(t&&1===t.length&&"001"===t[0])return!0}}},{key:"isNonGeographicCallingCode",value:function(e){return this.nonGeographic()?!!this.nonGeographic()[e]:!this.getCountryCodesForCallingCode(e)}},{key:"country",value:function(e){return this.selectNumberingPlan(e)}},{key:"selectNumberingPlan",value:function(e,t){if(e&&$X.test(e)&&(t=e,e=null),e&&"001"!==e){if(!this.hasCountry(e))throw new Error("Unknown country: ".concat(e));this.numberingPlan=new zX(this.getCountryMetadata(e),this)}else if(t){if(!this.hasCallingCode(t))throw new Error("Unknown calling code: ".concat(t));this.numberingPlan=new zX(this.getNumberingPlanMetadata(t),this)}else this.numberingPlan=void 0;return this}},{key:"getCountryCodesForCallingCode",value:function(e){var t=this.countryCallingCodes()[e];if(t){if(1===t.length&&3===t[0].length)return;return t}}},{key:"getCountryCodeForCallingCode",value:function(e){var t=this.getCountryCodesForCallingCode(e);if(t)return t[0]}},{key:"getNumberingPlanMetadata",value:function(e){var t=this.getCountryCodeForCallingCode(e);if(t)return this.getCountryMetadata(t);if(this.nonGeographic()){var n=this.nonGeographic()[e];if(n)return n}else{var r=this.countryCallingCodes()[e];if(r&&1===r.length&&"001"===r[0])return this.metadata.countries["001"]}}},{key:"countryCallingCode",value:function(){return this.numberingPlan.callingCode()}},{key:"IDDPrefix",value:function(){return this.numberingPlan.IDDPrefix()}},{key:"defaultIDDPrefix",value:function(){return this.numberingPlan.defaultIDDPrefix()}},{key:"nationalNumberPattern",value:function(){return this.numberingPlan.nationalNumberPattern()}},{key:"possibleLengths",value:function(){return this.numberingPlan.possibleLengths()}},{key:"formats",value:function(){return this.numberingPlan.formats()}},{key:"nationalPrefixForParsing",value:function(){return this.numberingPlan.nationalPrefixForParsing()}},{key:"nationalPrefixTransformRule",value:function(){return this.numberingPlan.nationalPrefixTransformRule()}},{key:"leadingDigits",value:function(){return this.numberingPlan.leadingDigits()}},{key:"hasTypes",value:function(){return this.numberingPlan.hasTypes()}},{key:"type",value:function(e){return this.numberingPlan.type(e)}},{key:"ext",value:function(){return this.numberingPlan.ext()}},{key:"countryCallingCodes",value:function(){return this.v1?this.metadata.country_phone_code_to_countries:this.metadata.country_calling_codes}},{key:"chooseCountryByCountryCallingCode",value:function(e){return this.selectNumberingPlan(e)}},{key:"hasSelectedNumberingPlan",value:function(){return void 0!==this.numberingPlan}}])}(),zX=function(){return LX(function e(t,n){DX(this,e),this.globalMetadataObject=n,this.metadata=t,ZX.call(this,n.metadata)},[{key:"callingCode",value:function(){return this.metadata[0]}},{key:"getDefaultCountryMetadataForRegion",value:function(){return this.globalMetadataObject.getNumberingPlanMetadata(this.callingCode())}},{key:"IDDPrefix",value:function(){if(!this.v1&&!this.v2)return this.metadata[1]}},{key:"defaultIDDPrefix",value:function(){if(!this.v1&&!this.v2)return this.metadata[12]}},{key:"nationalNumberPattern",value:function(){return this.v1||this.v2?this.metadata[1]:this.metadata[2]}},{key:"possibleLengths",value:function(){if(!this.v1)return this.metadata[this.v2?2:3]}},{key:"_getFormats",value:function(e){return e[this.v1?2:this.v2?3:4]}},{key:"formats",value:function(){var e=this,t=this._getFormats(this.metadata)||this._getFormats(this.getDefaultCountryMetadataForRegion())||[];return t.map(function(t){return new HX(t,e)})}},{key:"nationalPrefix",value:function(){return this.metadata[this.v1?3:this.v2?4:5]}},{key:"_getNationalPrefixFormattingRule",value:function(e){return e[this.v1?4:this.v2?5:6]}},{key:"nationalPrefixFormattingRule",value:function(){return this._getNationalPrefixFormattingRule(this.metadata)||this._getNationalPrefixFormattingRule(this.getDefaultCountryMetadataForRegion())}},{key:"_nationalPrefixForParsing",value:function(){return this.metadata[this.v1?5:this.v2?6:7]}},{key:"nationalPrefixForParsing",value:function(){return this._nationalPrefixForParsing()||this.nationalPrefix()}},{key:"nationalPrefixTransformRule",value:function(){return this.metadata[this.v1?6:this.v2?7:8]}},{key:"_getNationalPrefixIsOptionalWhenFormatting",value:function(){return!!this.metadata[this.v1?7:this.v2?8:9]}},{key:"nationalPrefixIsOptionalWhenFormattingInNationalFormat",value:function(){return this._getNationalPrefixIsOptionalWhenFormatting(this.metadata)||this._getNationalPrefixIsOptionalWhenFormatting(this.getDefaultCountryMetadataForRegion())}},{key:"leadingDigits",value:function(){return this.metadata[this.v1?8:this.v2?9:10]}},{key:"types",value:function(){return this.metadata[this.v1?9:this.v2?10:11]}},{key:"hasTypes",value:function(){return(!this.types()||0!==this.types().length)&&!!this.types()}},{key:"type",value:function(e){if(this.hasTypes()&&VX(this.types(),e))return new UX(VX(this.types(),e),this)}},{key:"ext",value:function(){return this.v1||this.v2?FX:this.metadata[13]||FX}}])}(),HX=function(){return LX(function e(t,n){DX(this,e),this._format=t,this.metadata=n},[{key:"pattern",value:function(){return this._format[0]}},{key:"format",value:function(){return this._format[1]}},{key:"leadingDigitsPatterns",value:function(){return this._format[2]||[]}},{key:"nationalPrefixFormattingRule",value:function(){return this._format[3]||this.metadata.nationalPrefixFormattingRule()}},{key:"nationalPrefixIsOptionalWhenFormattingInNationalFormat",value:function(){return!!this._format[4]||this.metadata.nationalPrefixIsOptionalWhenFormattingInNationalFormat()}},{key:"nationalPrefixIsMandatoryWhenFormattingInNationalFormat",value:function(){return this.usesNationalPrefix()&&!this.nationalPrefixIsOptionalWhenFormattingInNationalFormat()}},{key:"usesNationalPrefix",value:function(){return!(!this.nationalPrefixFormattingRule()||WX.test(this.nationalPrefixFormattingRule()))}},{key:"internationalFormat",value:function(){return this._format[5]||this.format()}}])}(),WX=/^\(?\$1\)?$/,UX=function(){return LX(function e(t,n){DX(this,e),this.type=t,this.metadata=n},[{key:"pattern",value:function(){return this.metadata.v1?this.type:this.type[0]}},{key:"possibleLengths",value:function(){if(!this.metadata.v1)return this.type[1]||this.metadata.possibleLengths()}}])}();function VX(e,t){switch(t){case"FIXED_LINE":return e[0];case"MOBILE":return e[1];case"TOLL_FREE":return e[2];case"PREMIUM_RATE":return e[3];case"PERSONAL_NUMBER":return e[4];case"VOICEMAIL":return e[5];case"UAN":return e[6];case"PAGER":return e[7];case"VOIP":return e[8];case"SHARED_COST":return e[9]}}function GX(e){if(!e)throw new Error("[libphonenumber-js] `metadata` argument not passed. Check your arguments.");if(!mX(e)||!mX(e.countries))throw new Error("[libphonenumber-js] `metadata` argument was passed but it's not a valid metadata. Must be an object having `.countries` child object property. Got ".concat(mX(e)?"an object of shape: { "+Object.keys(e).join(", ")+" }":"a "+qX(e)+": "+e,"."))}var qX=function(e){return PX(e)};function YX(e,t){if((t=new BX(t)).hasCountry(e))return t.selectNumberingPlan(e).countryCallingCode();throw new Error("Unknown country: ".concat(e))}function ZX(e){var t=e.version;"number"===typeof t?(this.v1=1===t,this.v2=2===t,this.v3=3===t,this.v4=4===t):t?-1===RX(t,"1.2.0")?this.v2=!0:-1===RX(t,"1.7.35")?this.v3=!0:this.v4=!0:this.v1=!0}var KX=function(e){return"([".concat(jX,"]{1,").concat(e,"})")};function XX(e){var t="[ \xa0\\t,]*",n="[:\\.\uff0e]?[ \xa0\\t,-]*",r="#?",i="[ \xa0\\t]*";return";ext="+KX("20")+"|"+(t+"(?:e?xt(?:ensi(?:o\u0301?|\xf3))?n?|\uff45?\uff58\uff54\uff4e?|\u0434\u043e\u0431|anexo)"+n+KX("20")+r)+"|"+(t+"(?:[x\uff58#\uff03~\uff5e]|int|\uff49\uff4e\uff54)"+n+KX("9")+r)+"|"+("[- ]+"+KX("6")+"#")+"|"+(i+"(?:,{2}|;)"+n+KX("15")+r)+"|"+(i+"(?:,)+"+n+KX("9")+r)}var QX="["+jX+"]{2}",JX="[+\uff0b]{0,1}(?:["+_X+"]*["+jX+"]){3,}["+_X+jX+"]*",eQ=new RegExp("^[+\uff0b]{0,1}(?:["+_X+"]*["+jX+"]){1,2}$","i"),tQ=JX+"(?:"+XX()+")?",nQ=new RegExp("^"+QX+"$|^"+tQ+"$","i");var rQ=new RegExp("(?:"+XX()+")$","i");var iQ={0:"0",1:"1",2:"2",3:"3",4:"4",5:"5",6:"6",7:"7",8:"8",9:"9","\uff10":"0","\uff11":"1","\uff12":"2","\uff13":"3","\uff14":"4","\uff15":"5","\uff16":"6","\uff17":"7","\uff18":"8","\uff19":"9","\u0660":"0","\u0661":"1","\u0662":"2","\u0663":"3","\u0664":"4","\u0665":"5","\u0666":"6","\u0667":"7","\u0668":"8","\u0669":"9","\u06f0":"0","\u06f1":"1","\u06f2":"2","\u06f3":"3","\u06f4":"4","\u06f5":"5","\u06f6":"6","\u06f7":"7","\u06f8":"8","\u06f9":"9"};function oQ(e){return iQ[e]}function aQ(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(n)return(n=n.call(e)).next.bind(n);if(Array.isArray(e)||(n=function(e,t){if(e){if("string"==typeof e)return sQ(e,t);var n={}.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)?sQ(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0;return function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function sQ(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function lQ(e){for(var t,n="",r=aQ(e.split(""));!(t=r()).done;){n+=cQ(t.value,n)||""}return n}function cQ(e,t,n){return"+"===e?t?void("function"===typeof n&&n("end")):"+":oQ(e)}function dQ(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(n)return(n=n.call(e)).next.bind(n);if(Array.isArray(e)||(n=function(e,t){if(e){if("string"==typeof e)return uQ(e,t);var n={}.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)?uQ(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0;return function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function uQ(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function pQ(e,t,n){return hQ(e,t,void 0,n)}function hQ(e,t,n,r){t&&(r=new BX(r.metadata)).selectNumberingPlan(t);var i=r.type(n),o=i&&i.possibleLengths()||r.possibleLengths();if(!o)return"IS_POSSIBLE";if("FIXED_LINE_OR_MOBILE"===n){if(!r.type("FIXED_LINE"))return hQ(e,t,"MOBILE",r);var a=r.type("MOBILE");a&&(o=function(e,t){for(var n,r=e.slice(),i=dQ(t);!(n=i()).done;){var o=n.value;e.indexOf(o)<0&&r.push(o)}return r.sort(function(e,t){return e-t})}(o,a.possibleLengths()))}else if(n&&!i)return"INVALID_LENGTH";var s=e.length,l=o[0];return l===s?"IS_POSSIBLE":l>s?"TOO_SHORT":o[o.length-1]<s?"TOO_LONG":o.indexOf(s,1)>=0?"IS_POSSIBLE":"INVALID_LENGTH"}function mQ(e,t,n){return"IS_POSSIBLE"===pQ(e,t,n)}function fQ(e,t){return e=e||"",new RegExp("^(?:"+t+")$").test(e)}function gQ(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(n)return(n=n.call(e)).next.bind(n);if(Array.isArray(e)||(n=function(e,t){if(e){if("string"==typeof e)return vQ(e,t);var n={}.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)?vQ(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0;return function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function vQ(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}var xQ=["MOBILE","PREMIUM_RATE","TOLL_FREE","SHARED_COST","VOIP","PERSONAL_NUMBER","PAGER","UAN","VOICEMAIL"];function yQ(e,t,n){if(t=t||{},e.country||e.countryCallingCode){(n=new BX(n)).selectNumberingPlan(e.country,e.countryCallingCode);var r=t.v2?e.nationalNumber:e.phone;if(fQ(r,n.nationalNumberPattern())){if(bQ(r,"FIXED_LINE",n))return n.type("MOBILE")&&""===n.type("MOBILE").pattern()?"FIXED_LINE_OR_MOBILE":n.type("MOBILE")?bQ(r,"MOBILE",n)?"FIXED_LINE_OR_MOBILE":"FIXED_LINE":"FIXED_LINE_OR_MOBILE";for(var i,o=gQ(xQ);!(i=o()).done;){var a=i.value;if(bQ(r,a,n))return a}}}}function bQ(e,t,n){return!(!(t=n.type(t))||!t.pattern())&&(!(t.possibleLengths()&&t.possibleLengths().indexOf(e.length)<0)&&fQ(e,t.pattern()))}function jQ(e,t,n){var r=new BX(n).getCountryCodesForCallingCode(e);return r?r.filter(function(e){return function(e,t,n){var r=new BX(n);if(r.selectNumberingPlan(t),r.numberingPlan.possibleLengths().indexOf(e.length)>=0)return!0;return!1}(t,e,n)}):[]}var _Q=new RegExp("(["+jX+"])");function CQ(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(n)return(n=n.call(e)).next.bind(n);if(Array.isArray(e)||(n=function(e,t){if(e){if("string"==typeof e)return wQ(e,t);var n={}.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)?wQ(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0;return function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function wQ(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function SQ(e,t){var n=t.nationalNumber,r=t.metadata;var i=r.getCountryCodesForCallingCode(e);if(i)return 1===i.length?i[0]:function(e,t){var n=t.countries,r=t.metadata;r=new BX(r);for(var i,o=CQ(n);!(i=o()).done;){var a=i.value;if(r.selectNumberingPlan(a),r.leadingDigits()){if(e&&0===e.search(r.leadingDigits()))return a}else if(yQ({phone:e,country:a},void 0,r.metadata))return a}}(n,{countries:i,metadata:r.metadata})}function AQ(e,t,n){var r=function(e,t){if(e&&t.numberingPlan.nationalPrefixForParsing()){var n=new RegExp("^(?:"+t.numberingPlan.nationalPrefixForParsing()+")"),r=n.exec(e);if(r){var i,o,a,s=r.length-1,l=s>0&&r[s];if(t.nationalPrefixTransformRule()&&l)i=e.replace(n,t.nationalPrefixTransformRule()),s>1&&(o=r[1]);else{var c=r[0];i=e.slice(c.length),l&&(o=r[1])}if(l){var d=e.indexOf(r[1]);e.slice(0,d)===t.numberingPlan.nationalPrefix()&&(a=t.numberingPlan.nationalPrefix())}else a=r[0];return{nationalNumber:i,nationalPrefix:a,carrierCode:o}}}return{nationalNumber:e}}(e,n),i=r.carrierCode,o=r.nationalNumber;if(o!==e){if(!function(e,t,n){if(fQ(e,n.nationalNumberPattern())&&!fQ(t,n.nationalNumberPattern()))return!1;return!0}(e,o,n))return{nationalNumber:e};if(n.numberingPlan.possibleLengths()&&(t||(t=SQ(n.numberingPlan.callingCode(),{nationalNumber:o,metadata:n})),!function(e,t,n){switch(pQ(e,t,n)){case"TOO_SHORT":case"INVALID_LENGTH":return!1;default:return!0}}(o,t,n)))return{nationalNumber:e}}return{nationalNumber:o,carrierCode:i}}function kQ(e,t,n,r,i){if(!e)return{};var o;if("+"!==e[0]){var a=function(e,t,n,r){if(t){var i=new BX(r);i.selectNumberingPlan(t,n);var o=new RegExp(i.IDDPrefix());if(0===e.search(o)){var a=(e=e.slice(e.match(o)[0].length)).match(_Q);if(!(a&&null!=a[1]&&a[1].length>0&&"0"===a[1]))return e}}}(e,t||n,r,i);if(!a||a===e){if(t||n||r){var s=function(e,t,n,r,i){var o=t||n?YX(t||n,i):r;if(0===e.indexOf(o)){(i=new BX(i)).selectNumberingPlan(t||n,o);var a=e.slice(o.length),s=AQ(a,t,i).nationalNumber,l=AQ(e,t,i).nationalNumber;if(!fQ(l,i.nationalNumberPattern())&&fQ(s,i.nationalNumberPattern())||"TOO_LONG"===pQ(l,t,i))return{countryCallingCode:o,number:a}}return{number:e}}(e,t,n,r,i),l=s.countryCallingCode,c=s.number;if(l)return{countryCallingCodeSource:"FROM_NUMBER_WITHOUT_PLUS_SIGN",countryCallingCode:l,number:c}}return{number:e}}o=!0,e="+"+a}if("0"===e[1])return{};i=new BX(i);for(var d=2;d-1<=3&&d<=e.length;){var u=e.slice(1,d);if(i.hasCallingCode(u))return i.selectNumberingPlan(u),{countryCallingCodeSource:o?"FROM_NUMBER_WITH_IDD":"FROM_NUMBER_WITH_PLUS_SIGN",countryCallingCode:u,number:e.slice(d)};d++}return{}}var TQ=/(\$\d)/;function EQ(e,t,n){var r=n.useInternationalFormat,i=n.withNationalPrefix,o=(n.carrierCode,n.metadata,e.replace(new RegExp(t.pattern()),r?t.internationalFormat():i&&t.nationalPrefixFormattingRule()?t.format().replace(TQ,t.nationalPrefixFormattingRule()):t.format()));return r?function(e){return e.replace(new RegExp("[".concat(_X,"]+"),"g")," ").trim()}(o):o}var MQ=/^[\d]+(?:[~\u2053\u223C\uFF5E][\d]+)?$/;var OQ={formatExtension:function(e,t,n){return"".concat(e).concat(n.ext()).concat(t)}};function RQ(e,t,n,r){if(n=n?function(){for(var e=1,t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];for(;e<n.length;){if(n[e])for(var i in n[e])n[0][i]=n[e][i];e++}return n[0]}({},OQ,n):OQ,r=new BX(r),e.country&&"001"!==e.country){if(!r.hasCountry(e.country))throw new Error("Unknown country: ".concat(e.country));r.selectNumberingPlan(e.country)}else{if(!e.countryCallingCode)return e.phone||"";r.selectNumberingPlan(e.countryCallingCode)}var i,o=r.countryCallingCode(),a=n.v2?e.nationalNumber:e.phone;switch(t){case"NATIONAL":return a?DQ(i=PQ(a,e.carrierCode,"NATIONAL",r,n),e.ext,r,n.formatExtension):"";case"INTERNATIONAL":return a?(i=PQ(a,null,"INTERNATIONAL",r,n),DQ(i="+".concat(o," ").concat(i),e.ext,r,n.formatExtension)):"+".concat(o);case"E.164":return"+".concat(o).concat(a);case"RFC3966":return function(e){var t=e.number,n=e.ext;if(!t)return"";if("+"!==t[0])throw new Error('"formatRFC3966()" expects "number" to be in E.164 format.');return"tel:".concat(t).concat(n?";ext="+n:"")}({number:"+".concat(o).concat(a),ext:e.ext});case"IDD":if(!n.fromCountry)return;var s=function(e,t,n,r,i){var o=YX(r,i.metadata);if(o===n){var a=PQ(e,t,"NATIONAL",i);return"1"===n?n+" "+a:a}var s=function(e,t,n){var r=new BX(n);return r.selectNumberingPlan(e,t),r.defaultIDDPrefix()?r.defaultIDDPrefix():MQ.test(r.IDDPrefix())?r.IDDPrefix():void 0}(r,void 0,i.metadata);if(s)return"".concat(s," ").concat(n," ").concat(PQ(e,null,"INTERNATIONAL",i))}(a,e.carrierCode,o,n.fromCountry,r);return DQ(s,e.ext,r,n.formatExtension);default:throw new Error('Unknown "format" argument passed to "formatNumber()": "'.concat(t,'"'))}}function PQ(e,t,n,r,i){var o,a,s=(o=r.formats(),a=e,function(e,t){for(var n=0;n<e.length;){if(t(e[n]))return e[n];n++}}(o,function(e){if(e.leadingDigitsPatterns().length>0){var t=e.leadingDigitsPatterns()[e.leadingDigitsPatterns().length-1];if(0!==a.search(t))return!1}return fQ(a,e.pattern())}));return s?EQ(e,s,{useInternationalFormat:"INTERNATIONAL"===n,withNationalPrefix:!s.nationalPrefixIsOptionalWhenFormattingInNationalFormat()||!i||!1!==i.nationalPrefix,carrierCode:t,metadata:r}):e}function DQ(e,t,n,r){return t?r(e,t,n):e}function NQ(e){return NQ="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},NQ(e)}function LQ(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function IQ(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?LQ(Object(n),!0).forEach(function(t){FQ(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):LQ(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function FQ(e,t,n){return(t=BQ(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function $Q(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,BQ(r.key),r)}}function BQ(e){var t=function(e,t){if("object"!=NQ(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=NQ(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==NQ(t)?t:t+""}var zQ=function(){return function(e,t,n){return t&&$Q(e.prototype,t),n&&$Q(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}(function e(t,n,r){if(function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),!t)throw new TypeError("First argument is required");if("string"!==typeof t)throw new TypeError("First argument must be a string");if("+"===t[0]&&!n)throw new TypeError("`metadata` argument not passed");if(mX(n)&&mX(n.countries)){r=n;var i=t;if(!WQ.test(i))throw new Error('Invalid `number` argument passed: must consist of a "+" followed by digits');var o=kQ(i,void 0,void 0,void 0,r);if(t=o.countryCallingCode,!(n=o.number))throw new Error("Invalid `number` argument passed: too short")}if(!n)throw new TypeError("`nationalNumber` argument is required");if("string"!==typeof n)throw new TypeError("`nationalNumber` argument must be a string");GX(r);var a=function(e,t){var n,r,i=new BX(t);HQ(e)?(n=e,i.selectNumberingPlan(n),r=i.countryCallingCode()):r=e;return{country:n,countryCallingCode:r}}(t,r),s=a.country,l=a.countryCallingCode;this.country=s,this.countryCallingCode=l,this.nationalNumber=n,this.number="+"+this.countryCallingCode+this.nationalNumber,this.getMetadata=function(){return r}},[{key:"setExt",value:function(e){this.ext=e}},{key:"getPossibleCountries",value:function(){return this.country?[this.country]:jQ(this.countryCallingCode,this.nationalNumber,this.getMetadata())}},{key:"isPossible",value:function(){return function(e,t,n){if(void 0===t&&(t={}),n=new BX(n),t.v2){if(!e.countryCallingCode)throw new Error("Invalid phone number object passed");n.selectNumberingPlan(e.countryCallingCode)}else{if(!e.phone)return!1;if(e.country){if(!n.hasCountry(e.country))throw new Error("Unknown country: ".concat(e.country));n.selectNumberingPlan(e.country)}else{if(!e.countryCallingCode)throw new Error("Invalid phone number object passed");n.selectNumberingPlan(e.countryCallingCode)}}if(n.possibleLengths())return mQ(e.phone||e.nationalNumber,e.country,n);if(e.countryCallingCode&&n.isNonGeographicCallingCode(e.countryCallingCode))return!0;throw new Error('Missing "possibleLengths" in metadata. Perhaps the metadata has been generated before v1.0.18.')}(this,{v2:!0},this.getMetadata())}},{key:"isValid",value:function(){return function(e,t,n){return t=t||{},(n=new BX(n)).selectNumberingPlan(e.country,e.countryCallingCode),n.hasTypes()?void 0!==yQ(e,t,n.metadata):fQ(t.v2?e.nationalNumber:e.phone,n.nationalNumberPattern())}(this,{v2:!0},this.getMetadata())}},{key:"isNonGeographic",value:function(){return new BX(this.getMetadata()).isNonGeographicCallingCode(this.countryCallingCode)}},{key:"isEqual",value:function(e){return this.number===e.number&&this.ext===e.ext}},{key:"getType",value:function(){return yQ(this,{v2:!0},this.getMetadata())}},{key:"format",value:function(e,t){return RQ(this,e,t?IQ(IQ({},t),{},{v2:!0}):{v2:!0},this.getMetadata())}},{key:"formatNational",value:function(e){return this.format("NATIONAL",e)}},{key:"formatInternational",value:function(e){return this.format("INTERNATIONAL",e)}},{key:"getURI",value:function(e){return this.format("RFC3966",e)}}])}(),HQ=function(e){return/^[A-Z]{2}$/.test(e)};var WQ=/^\+\d+$/,UQ="(["+jX+"]|[\\-\\.\\(\\)]?)",VQ=new RegExp("^\\+"+UQ+"*["+jX+"]"+UQ+"*$","g"),GQ=new RegExp("^("+("["+jX+"]+((\\-)*["+jX+"])*")+"\\.)*"+("[a-zA-Z]+((\\-)*["+jX+"])*")+"\\.?$","g"),qQ="tel:",YQ=";phone-context=";function ZQ(e,t){var n,r=t.extractFormattedPhoneNumber,i=function(e){var t=e.indexOf(YQ);if(t<0)return null;var n=t+15;if(n>=e.length)return"";var r=e.indexOf(";",n);return r>=0?e.substring(n,r):e.substring(n)}(e);if(!function(e){return null===e||0!==e.length&&(VQ.test(e)||GQ.test(e))}(i))throw new OX("NOT_A_NUMBER");if(null===i)n=r(e)||"";else{n="","+"===i.charAt(0)&&(n+=i);var o,a=e.indexOf(qQ);o=a>=0?a+4:0;var s=e.indexOf(YQ);n+=e.substring(o,s)}var l=n.indexOf(";isub=");if(l>0&&(n=n.substring(0,l)),""!==n)return n}var KQ=new RegExp("[+\uff0b"+jX+"]"),XQ=new RegExp("[^"+jX+"#]+$");function QQ(e,t,n){if(t=t||{},n=new BX(n),t.defaultCountry&&!n.hasCountry(t.defaultCountry)){if(t.v2)throw new OX("INVALID_COUNTRY");throw new Error("Unknown country: ".concat(t.defaultCountry))}var r=function(e,t,n){var r=ZQ(e,{extractFormattedPhoneNumber:function(e){return function(e,t,n){if(!e)return;if(e.length>250){if(n)throw new OX("TOO_LONG");return}if(!1===t)return e;var r=e.search(KQ);if(r<0)return;return e.slice(r).replace(XQ,"")}(e,n,t)}});if(!r)return{};if(!function(e){return e.length>=2&&nQ.test(e)}(r))return function(e){return eQ.test(e)}(r)?{error:"TOO_SHORT"}:{};var i=function(e){var t=e.search(rQ);if(t<0)return{};for(var n=e.slice(0,t),r=e.match(rQ),i=1;i<r.length;){if(r[i])return{number:n,ext:r[i]};i++}}(r);if(i.ext)return i;return{number:r}}(e,t.v2,t.extract),i=r.number,o=r.ext,a=r.error;if(!i){if(t.v2){if("TOO_SHORT"===a)throw new OX("TOO_SHORT");throw new OX("NOT_A_NUMBER")}return{}}var s=function(e,t,n,r){var i,o=kQ(lQ(e),void 0,t,n,r.metadata),a=o.countryCallingCodeSource,s=o.countryCallingCode,l=o.number;if(s)r.selectNumberingPlan(s);else{if(!l||!t&&!n)return{};r.selectNumberingPlan(t,n),t&&(i=t),s=n||YX(t,r.metadata)}if(!l)return{countryCallingCodeSource:a,countryCallingCode:s};var c=AQ(lQ(l),i,r),d=c.nationalNumber,u=c.carrierCode,p=SQ(s,{nationalNumber:d,metadata:r});p&&(i=p,"001"===p||r.selectNumberingPlan(i));return{country:i,countryCallingCode:s,countryCallingCodeSource:a,nationalNumber:d,carrierCode:u}}(i,t.defaultCountry,t.defaultCallingCode,n),l=s.country,c=s.nationalNumber,d=s.countryCallingCode,u=s.countryCallingCodeSource,p=s.carrierCode;if(!n.hasSelectedNumberingPlan()){if(t.v2)throw new OX("INVALID_COUNTRY");return{}}if(!c||c.length<2){if(t.v2)throw new OX("TOO_SHORT");return{}}if(c.length>17){if(t.v2)throw new OX("TOO_LONG");return{}}if(t.v2){var h=new zQ(d,c,n.metadata);return l&&(h.country=l),p&&(h.carrierCode=p),o&&(h.ext=o),h.__countryCallingCodeSource=u,h}var m=!!(t.extended?n.hasSelectedNumberingPlan():l)&&fQ(c,n.nationalNumberPattern());return t.extended?{country:l,countryCallingCode:d,carrierCode:p,valid:m,possible:!!m||!(!0!==t.extended||!n.possibleLengths()||!mQ(c,l,n)),phone:c,ext:o}:m?function(e,t,n){var r={country:e,phone:t};n&&(r.ext=n);return r}(l,c,o):{}}function JQ(e){return JQ="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},JQ(e)}function eJ(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function tJ(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?eJ(Object(n),!0).forEach(function(t){nJ(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):eJ(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function nJ(e,t,n){return(t=function(e){var t=function(e,t){if("object"!=JQ(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=JQ(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==JQ(t)?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function rJ(e){return rJ="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},rJ(e)}function iJ(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function oJ(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?iJ(Object(n),!0).forEach(function(t){aJ(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):iJ(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function aJ(e,t,n){return(t=function(e){var t=function(e,t){if("object"!=rJ(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=rJ(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==rJ(t)?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function sJ(e,t,n){t&&t.defaultCountry&&!function(e,t){return t.countries.hasOwnProperty(e)}(t.defaultCountry,n)&&(t=oJ(oJ({},t),{},{defaultCountry:void 0}));try{return function(e,t,n){return QQ(e,tJ(tJ({},t),{},{v2:!0}),n)}(e,t,n)}catch(r){if(!(r instanceof OX))throw r}}function lJ(){var e=bX(arguments);return sJ(e.text,e.options,e.metadata)}function cJ(){return function(e,t){var n=Array.prototype.slice.call(t);return n.push(pX),e.apply(this,n)}(lJ,arguments)}const dJ=function(e){var t,n,r,i,o,a,s,l,c,d,u,p,h,m,f,g,v,x,y,b,j,_,C,w,S,A,k,T,E,M;let{user:O,userData:R}=e;const{t:P}=Vg(),D=so();return(0,qt.jsxs)(Ff,{container:!0,spacing:2,alignItems:"flex-start",children:[(0,qt.jsx)(Ff,{item:!0,xs:12,md:12,lg:4,children:(0,qt.jsxs)(op,{sx:{px:2,py:{xs:4},bgcolor:"primary.theme.50",textAlign:"center",borderRadius:1},children:[(0,qt.jsx)(op,{mb:1,children:(0,qt.jsx)(Ny,{sx:{bgcolor:"secondary.main",width:140,height:140,fontSize:64,mx:"auto"},children:null===O||void 0===O||null===(t=O.first_name)||void 0===t||null===(n=t.charAt(0))||void 0===n?void 0:n.toLocaleUpperCase()})}),ta()(O)?(0,qt.jsx)(lS,{width:150,sx:{mx:"auto"}}):(0,qt.jsx)(Cf,{variant:"h6",component:"h6",children:(null===O||void 0===O?void 0:O.first_name)+" "+(null===O||void 0===O?void 0:O.last_name)}),ta()(O)?(0,qt.jsx)(lS,{width:150,sx:{mx:"auto"}}):(0,qt.jsx)(Cf,{variant:"body2",component:"p",children:null===O||void 0===O?void 0:O.email}),(0,qt.jsxs)(pE,{sx:{mt:3},flexDirection:"row",gap:1,alignItems:"center",justifyContent:"center",children:[ta()(O)?(0,qt.jsx)(lS,{width:60,height:48}):null!==O&&void 0!==O&&O.active?(0,qt.jsx)(dM,{severity:"success",icon:!1,sx:e=>({py:0,px:1,display:"inline-flex",fontSize:e.spacing(1.75),"& .MuiAlert-message":{p:e.spacing(1)}}),children:(0,qt.jsx)("strong",{children:"Active"})}):(0,qt.jsx)(dM,{severity:"error",icon:!1,sx:e=>({py:0,px:1,display:"inline-flex",fontSize:e.spacing(1.75),"& .MuiAlert-message":{p:e.spacing(1)}}),children:(0,qt.jsx)("strong",{children:"Inactive"})}),(null===R||void 0===R?void 0:R.showUpdateUserBtn)&&(0,qt.jsx)(xh,{color:"primary",variant:"contained",disableElevation:!0,onClick:()=>D("".concat(ld.DOCTOR.PROFILE,"/edit/").concat(null===O||void 0===O?void 0:O.id)),children:P("rpm_EditProfile")})]})]})}),(0,qt.jsxs)(Ff,{item:!0,xs:12,lg:8,container:!0,spacing:4,children:[(0,qt.jsx)(Ff,{item:!0,xs:12,children:(0,qt.jsx)(op,{sx:{p:1.5,bgcolor:"primary.theme.100",borderRadius:1},children:(0,qt.jsx)(Cf,{variant:"body1",component:"p",fontWeight:"h6.fontWeight",children:P("rpm_GeneralInformation")})})}),(0,qt.jsx)(Ff,{item:!0,xs:12,md:4,children:(0,qt.jsxs)(pE,{flexDirection:"column",gap:{xs:1,lg:2},children:[(0,qt.jsx)(Cf,{variant:"body1",component:"p",fontWeight:"h6.fontWeight",sx:{flex:.4},children:"First Name"}),(0,qt.jsx)(op,{sx:{flex:.6},children:ta()(O)?(0,qt.jsx)(lS,{}):(0,qt.jsx)(Cf,{variant:"body2",component:"p",color:"primary",children:(null===O||void 0===O?void 0:O.first_name)||"NA"})})]})}),(0,qt.jsx)(Ff,{item:!0,xs:12,md:4,children:(0,qt.jsxs)(pE,{flexDirection:"column",gap:{xs:1,lg:2},children:[(0,qt.jsx)(Cf,{variant:"body1",component:"p",fontWeight:"h6.fontWeight",sx:{flex:.4},children:"Last Name"}),(0,qt.jsx)(op,{sx:{flex:.6},children:ta()(O)?(0,qt.jsx)(lS,{}):(0,qt.jsx)(Cf,{variant:"body2",component:"p",color:"primary",children:(null===O||void 0===O?void 0:O.last_name)||"NA"})})]})}),(0,qt.jsx)(Ff,{item:!0,xs:12,md:4,children:(0,qt.jsxs)(pE,{flexDirection:"column",gap:{xs:1,lg:2},children:[(0,qt.jsx)(Cf,{variant:"body1",component:"p",fontWeight:"h6.fontWeight",sx:{flex:.4},children:"Email"}),(0,qt.jsx)(op,{sx:{flex:.6},children:ta()(O)?(0,qt.jsx)(lS,{}):(0,qt.jsx)(Cf,{variant:"body2",component:"p",color:"primary",children:(null===O||void 0===O?void 0:O.email)||"NA"})})]})}),(0,qt.jsx)(Ff,{item:!0,xs:12,md:4,children:(0,qt.jsxs)(pE,{flexDirection:"column",gap:{xs:1,lg:2},children:[(0,qt.jsx)(Cf,{variant:"body1",component:"p",fontWeight:"h6.fontWeight",sx:{flex:.4},children:"Mobile"}),(0,qt.jsx)(op,{sx:{flex:.6},children:ta()(O)?(0,qt.jsx)(lS,{}):(0,qt.jsx)(Cf,{variant:"body2",component:"p",color:"primary",children:null!==O&&void 0!==O&&O.phone_number?"+".concat(null===(r=cJ(null===O||void 0===O?void 0:O.phone_number))||void 0===r?void 0:r.countryCallingCode,"-").concat(null===(i=cJ(null===O||void 0===O?void 0:O.phone_number))||void 0===i?void 0:i.nationalNumber):null})})]})}),(0,qt.jsx)(Ff,{item:!0,xs:12,md:4,children:(0,qt.jsxs)(pE,{flexDirection:"column",gap:{xs:1,lg:2},children:[(0,qt.jsx)(Cf,{variant:"body1",component:"p",fontWeight:"h6.fontWeight",sx:{flex:.4},children:"DOB"}),(0,qt.jsx)(op,{sx:{flex:.6},children:ta()(O)?(0,qt.jsx)(lS,{}):(0,qt.jsx)(Cf,{variant:"body2",component:"p",color:"primary",children:null!==O&&void 0!==O&&null!==(o=O.attributes)&&void 0!==o&&o.dob?sa()(null===O||void 0===O||null===(a=O.attributes)||void 0===a?void 0:a.dob).format("DD/MM/YYYY"):"NA"})})]})}),(0,qt.jsx)(Ff,{item:!0,xs:12,md:4,children:(0,qt.jsxs)(pE,{flexDirection:"column",gap:{xs:1,lg:2},children:[(0,qt.jsx)(Cf,{variant:"body1",component:"p",fontWeight:"h6.fontWeight",sx:{flex:.4},children:"Gender"}),(0,qt.jsx)(op,{sx:{flex:.6},children:ta()(O)?(0,qt.jsx)(lS,{}):(0,qt.jsx)(Cf,{variant:"body2",component:"p",color:"primary",children:(null===O||void 0===O||null===(s=O.attributes)||void 0===s?void 0:s.gender)||"NA"})})]})}),(0,qt.jsx)(Ff,{item:!0,xs:12,md:4,children:(0,qt.jsxs)(pE,{flexDirection:"column",gap:{xs:1,lg:2},children:[(0,qt.jsx)(Cf,{variant:"body1",component:"p",fontWeight:"h6.fontWeight",sx:{flex:.4},children:"Created Date"}),(0,qt.jsx)(op,{sx:{flex:.6},children:ta()(O)?(0,qt.jsx)(lS,{}):(0,qt.jsx)(Cf,{variant:"body2",component:"p",color:"primary",children:sa()(null===O||void 0===O?void 0:O.created_at).format("DD MMM YYYY hh:mm A")})})]})}),(0,qt.jsx)(Ff,{item:!0,xs:12,children:(0,qt.jsx)(op,{sx:{p:1.5,bgcolor:"primary.theme.100",borderRadius:1},children:(0,qt.jsx)(Cf,{variant:"body1",component:"p",fontWeight:"h6.fontWeight",children:P("rpm_ProfessionalDetail")})})}),(0,qt.jsx)(Ff,{item:!0,xs:12,md:4,children:(0,qt.jsxs)(pE,{flexDirection:"column",gap:{xs:1,lg:2},children:[(0,qt.jsx)(Cf,{variant:"body1",component:"p",fontWeight:"h6.fontWeight",sx:{flex:.4},children:P("rpm_Speciality")}),(0,qt.jsx)(op,{sx:{flex:.6},children:ta()(O)?(0,qt.jsx)(lS,{}):(0,qt.jsx)(Cf,{variant:"body2",component:"p",color:"primary",children:null!==O&&void 0!==O&&null!==(l=O.attributes)&&void 0!==l&&l.speciality?null===O||void 0===O||null===(c=O.attributes)||void 0===c?void 0:c.speciality:"NA"})})]})}),(0,qt.jsx)(Ff,{item:!0,xs:12,md:4,children:(0,qt.jsxs)(pE,{flexDirection:"column",gap:{xs:1,lg:2},children:[(0,qt.jsx)(Cf,{variant:"body1",component:"p",fontWeight:"h6.fontWeight",sx:{flex:.4},children:P("rpm_Experience")}),(0,qt.jsx)(op,{sx:{flex:.6},children:ta()(O)?(0,qt.jsx)(lS,{}):(0,qt.jsx)(Cf,{variant:"body2",component:"p",color:"primary",children:null!==O&&void 0!==O&&null!==(d=O.attributes)&&void 0!==d&&d.experience?null===O||void 0===O||null===(u=O.attributes)||void 0===u?void 0:u.experience:"NA"})})]})}),(0,qt.jsx)(Ff,{item:!0,xs:12,md:4,children:(0,qt.jsxs)(pE,{flexDirection:"column",gap:{xs:1,lg:2},children:[(0,qt.jsx)(Cf,{variant:"body1",component:"p",fontWeight:"h6.fontWeight",sx:{flex:.4},children:P("rpm_ConsultingLanguage")}),(0,qt.jsx)(op,{sx:{flex:.6},children:ta()(O)?(0,qt.jsx)(lS,{}):(0,qt.jsx)(Cf,{variant:"body2",component:"p",color:"primary",children:null!==O&&void 0!==O&&null!==(p=O.attributes)&&void 0!==p&&p.consulting_language?null===O||void 0===O||null===(h=O.attributes)||void 0===h?void 0:h.consulting_language:"NA"})})]})}),(0,qt.jsx)(Ff,{item:!0,xs:12,md:4,children:(0,qt.jsxs)(pE,{flexDirection:"column",gap:{xs:1,lg:2},children:[(0,qt.jsx)(Cf,{variant:"body1",component:"p",fontWeight:"h6.fontWeight",sx:{flex:.4},children:P("rpm_ProfessionalBio")}),(0,qt.jsx)(op,{sx:{flex:.6},children:ta()(O)?(0,qt.jsx)(lS,{}):(0,qt.jsx)(Cf,{variant:"body2",component:"p",color:"primary",sx:{whiteSpace:"normal",wordWrap:"break-word"},children:null!==O&&void 0!==O&&null!==(m=O.attributes)&&void 0!==m&&m.professional_bio?null===O||void 0===O||null===(f=O.attributes)||void 0===f?void 0:f.professional_bio:"NA"})})]})}),(0,qt.jsx)(Ff,{item:!0,xs:12,md:4,children:(0,qt.jsxs)(pE,{flexDirection:"column",gap:{xs:1,lg:2},children:[(0,qt.jsx)(Cf,{variant:"body1",component:"p",fontWeight:"h6.fontWeight",sx:{flex:.4},children:P("rpm_HighestQualifications")}),(0,qt.jsx)(op,{sx:{flex:.6},children:ta()(O)?(0,qt.jsx)(lS,{}):(0,qt.jsx)(Cf,{variant:"body2",component:"p",color:"primary",sx:{whiteSpace:"normal",wordWrap:"break-word"},children:null!==O&&void 0!==O&&null!==(g=O.attributes)&&void 0!==g&&g.qualification?null===O||void 0===O||null===(v=O.attributes)||void 0===v?void 0:v.qualification:"NA"})})]})}),(0,qt.jsx)(Ff,{item:!0,xs:12,md:4,children:(0,qt.jsxs)(pE,{flexDirection:"column",gap:{xs:1,lg:2},children:[(0,qt.jsx)(Cf,{variant:"body1",component:"p",fontWeight:"h6.fontWeight",sx:{flex:.4},children:"Registration Number"}),(0,qt.jsx)(op,{sx:{flex:.6},children:ta()(O)?(0,qt.jsx)(lS,{}):(0,qt.jsx)(Cf,{variant:"body2",component:"p",color:"primary",children:(null===O||void 0===O||null===(x=O.attributes)||void 0===x?void 0:x.registration)||"NA"})})]})}),(0,qt.jsx)(Ff,{item:!0,xs:12,children:(0,qt.jsx)(op,{sx:{p:1.5,bgcolor:"primary.theme.100",borderRadius:1},children:(0,qt.jsx)(Cf,{variant:"body1",component:"p",fontWeight:"h6.fontWeight",children:P("rpm_AddressInformation")})})}),(0,qt.jsx)(Ff,{item:!0,xs:12,md:4,lg:3,children:(0,qt.jsxs)(pE,{flexDirection:"column",gap:{xs:1,lg:2},children:[(0,qt.jsx)(Cf,{variant:"body1",component:"p",fontWeight:"h6.fontWeight",sx:{flex:.4},children:P("rpm_Address1")}),(0,qt.jsx)(op,{sx:{flex:.6},children:ta()(O)?(0,qt.jsx)(lS,{}):(0,qt.jsx)(Cf,{variant:"body2",component:"p",color:"primary",children:null!==O&&void 0!==O&&null!==(y=O.attributes)&&void 0!==y&&y.adr_address1?null===O||void 0===O||null===(b=O.attributes)||void 0===b?void 0:b.adr_address1:"NA"})})]})}),(0,qt.jsx)(Ff,{item:!0,xs:12,md:4,lg:3,children:(0,qt.jsxs)(pE,{flexDirection:"column",gap:{xs:1,lg:2},children:[(0,qt.jsx)(Cf,{variant:"body1",component:"p",fontWeight:"h6.fontWeight",sx:{flex:.4},children:P("rpm_Address2")}),(0,qt.jsx)(op,{sx:{flex:.6},children:ta()(O)?(0,qt.jsx)(lS,{}):(0,qt.jsx)(Cf,{variant:"body2",component:"p",color:"primary",children:null!==O&&void 0!==O&&null!==(j=O.attributes)&&void 0!==j&&j.adr_address2?null===O||void 0===O||null===(_=O.attributes)||void 0===_?void 0:_.adr_address2:"NA"})})]})}),(0,qt.jsx)(Ff,{item:!0,xs:12,md:4,lg:3,children:(0,qt.jsxs)(pE,{flexDirection:"column",gap:{xs:1,lg:2},children:[(0,qt.jsx)(Cf,{variant:"body1",component:"p",fontWeight:"h6.fontWeight",sx:{flex:.4},children:P("rpm_Country")}),(0,qt.jsx)(op,{sx:{flex:.6},children:ta()(O)?(0,qt.jsx)(lS,{}):(0,qt.jsx)(Cf,{variant:"body2",component:"p",color:"primary",children:null!==O&&void 0!==O&&null!==(C=O.attributes)&&void 0!==C&&C.adr_country_name?null===O||void 0===O||null===(w=O.attributes)||void 0===w?void 0:w.adr_country_name:"NA"})})]})}),(0,qt.jsx)(Ff,{item:!0,xs:12,md:4,lg:3,children:(0,qt.jsxs)(pE,{flexDirection:"column",gap:{xs:1,lg:2},children:[(0,qt.jsx)(Cf,{variant:"body1",component:"p",fontWeight:"h6.fontWeight",sx:{flex:.4},children:P("rpm_State")}),(0,qt.jsx)(op,{sx:{flex:.6},children:ta()(O)?(0,qt.jsx)(lS,{}):(0,qt.jsx)(Cf,{variant:"body2",component:"p",color:"primary",children:null!==O&&void 0!==O&&null!==(S=O.attributes)&&void 0!==S&&S.adr_state_name?null===O||void 0===O||null===(A=O.attributes)||void 0===A?void 0:A.adr_state_name:"NA"})})]})}),(0,qt.jsx)(Ff,{item:!0,xs:12,md:4,lg:3,children:(0,qt.jsxs)(pE,{flexDirection:"column",gap:{xs:1,lg:2},children:[(0,qt.jsx)(Cf,{variant:"body1",component:"p",fontWeight:"h6.fontWeight",sx:{flex:.4},children:P("rpm_City")}),(0,qt.jsx)(op,{sx:{flex:.6},children:ta()(O)?(0,qt.jsx)(lS,{}):(0,qt.jsx)(Cf,{variant:"body2",component:"p",color:"primary",children:null!==O&&void 0!==O&&null!==(k=O.attributes)&&void 0!==k&&k.adr_city?null===O||void 0===O||null===(T=O.attributes)||void 0===T?void 0:T.adr_city:"NA"})})]})}),(0,qt.jsx)(Ff,{item:!0,xs:12,md:4,lg:3,children:(0,qt.jsxs)(pE,{flexDirection:"column",gap:{xs:1,lg:2},children:[(0,qt.jsx)(Cf,{variant:"body1",component:"p",fontWeight:"h6.fontWeight",sx:{flex:.4},children:P("rpm_Pin")}),(0,qt.jsx)(op,{sx:{flex:.6},children:ta()(O)?(0,qt.jsx)(lS,{}):(0,qt.jsx)(Cf,{variant:"body2",component:"p",color:"primary",children:null!==O&&void 0!==O&&null!==(E=O.attributes)&&void 0!==E&&E.adr_zipcode?null===O||void 0===O||null===(M=O.attributes)||void 0===M?void 0:M.adr_zipcode:"NA"})})]})})]})]})};var uJ=n(72819);const pJ={new_password:"",confirmPassword:""};const hJ=function(e){let{setUserPassword:t}=e;const{t:n}=Vg(),r=so(),[i,o]=We.useState(!0),a=()=>{o(!i)},s=[{id:1,info:n("rpm_passwordInstruction1")},{id:2,info:n("rpm_passwordInstruction2")},{id:3,info:n("rpm_passwordInstruction3")},{id:4,info:n("rpm_passwordInstruction4")},{id:5,info:n("rpm_passwordInstruction5")},{id:6,info:n("rpm_passwordInstruction6")}];return(0,qt.jsx)(Kz,{initialValues:pJ,validationSchema:OU.resetPassword,onSubmit:t,enableReinitialize:!0,children:()=>(0,qt.jsx)(qt.Fragment,{children:(0,qt.jsx)(nH,{children:(0,qt.jsxs)(Ff,{container:!0,spacing:4,children:[(0,qt.jsxs)(Ff,{item:!0,xs:12,md:7,lg:6,children:[(0,qt.jsx)(op,{mb:3,children:(0,qt.jsxs)(pE,{flexDirection:"column",gap:{xs:1,lg:2},children:[(0,qt.jsxs)(Cf,{variant:"body1",component:"p",fontWeight:"h6.fontWeight",children:[n("rpm_NewPassword"),(0,qt.jsx)(op,{component:"span",children:"*"})]}),(0,qt.jsxs)(op,{children:[(0,qt.jsx)(tH,{as:qj,fullWidth:!0,size:"small",id:"new_password",name:"new_password",variant:"outlined",type:i?"password":"text",endAdornment:(0,qt.jsxs)(tw,{position:"end",children:[(0,qt.jsx)(wh,{size:"small",onClick:a,children:i?(0,qt.jsx)(uJ.A,{fontSize:"small"}):(0,qt.jsx)(gc,{fontSize:"small"})}),(0,qt.jsx)(sy,{title:n("message:rpm_NewPasswordHelp"),placement:"top",children:(0,qt.jsx)(wh,{size:"small",disableRipple:!0,sx:{p:0},children:(0,qt.jsx)(pM.A,{fontSize:"small"})})})]})}),(0,qt.jsx)(dH,{name:"new_password",children:e=>(0,qt.jsx)(v_,{error:!0,children:n(e,{field:n("rpm_NewPassword")})})})]})]})}),(0,qt.jsx)(op,{children:(0,qt.jsxs)(pE,{flexDirection:"column",gap:{xs:1,lg:2},children:[(0,qt.jsx)(Cf,{variant:"body1",component:"p",fontWeight:"h6.fontWeight",children:n("rpm_ConfirmPassword")}),(0,qt.jsxs)(op,{children:[(0,qt.jsx)(tH,{as:qj,fullWidth:!0,size:"small",id:"confirmPassword",name:"confirmPassword",variant:"outlined",type:"password",endAdornment:(0,qt.jsx)(tw,{position:"end",children:(0,qt.jsx)(sy,{title:n("message:rpm_ConfirmPasswordHelp"),placement:"top",children:(0,qt.jsx)(wh,{size:"small",children:(0,qt.jsx)(pM.A,{fontSize:"small"})})})})}),(0,qt.jsx)(dH,{name:"confirmPassword",children:e=>(0,qt.jsx)(v_,{error:!0,children:n(e,{field:n("rpm_ConfirmPassword")})})}),(0,qt.jsx)(qH,{sx:{mt:4,p:0},children:(0,qt.jsxs)(Ff,{container:!0,spacing:2,children:[(0,qt.jsx)(Ff,{item:!0,children:(0,qt.jsx)(xh,{variant:"outlined",color:"primary",disableElevation:!0,onClick:()=>r(-1),children:"Cancel"})}),(0,qt.jsx)(Ff,{item:!0,children:(0,qt.jsx)(xh,{variant:"contained",color:"primary",disableElevation:!0,type:"submit",children:"Save"})})]})})]})]})})]}),(0,qt.jsx)(Ff,{item:!0,xs:!0,container:!0,justifyContent:"center",children:(0,qt.jsx)(Ff,{item:!0,children:(0,qt.jsxs)(op,{mt:4,children:[(0,qt.jsx)(Cf,{variant:"subtitle2",component:"h6",gutterBottom:!0,children:n("rpm_passwordStandards")+":"}),(0,qt.jsx)(op,{component:"ul",sx:{p:0,pl:3,m:0},children:s.map(e=>(0,qt.jsx)(op,{component:"li",children:(0,qt.jsx)(Cf,{sx:{display:"inline"},component:"p",variant:"body2",color:"text.primary",children:e.info})},e.id))})]})})})]})})})},"password_formik")},mJ=["children","onClose"],fJ=e=>{const{children:t,onClose:n}=e,r=Ko(e,mJ);return(0,qt.jsxs)(fC,(0,i.A)((0,i.A)({sx:{m:0,p:2}},r),{},{children:[t,n?(0,qt.jsx)(wh,{"aria-label":"close",onClick:n,sx:{position:"absolute",right:8,top:8,color:e=>e.palette.grey[500]},children:(0,qt.jsx)(J_.A,{})}):null]}))};function gJ(e){let{allPrograms:t,openModal:n,onCloseModal:r,attachProgram:i,fetchRoleCustomList:o,customRoles:a,fetchRolePredefinedList:s,rolePredefinedList:l}=e;const{t:c}=Vg();return(0,qt.jsx)(We.Fragment,{children:(0,qt.jsx)(cC,{fullWidth:!0,maxWidth:"sm",open:n,onClose:r,children:(0,qt.jsx)(Kz,{initialValues:{role_level:"",program:"",role_type:"",role:""},validationSchema:RU.assignLevel,onSubmit:i,enableReinitialize:!0,children:e=>{let{values:n,setFieldValue:i}=e;return(0,qt.jsx)(qt.Fragment,{children:(0,qt.jsxs)(nH,{children:[(0,qt.jsx)(fJ,{sx:{px:4},onClose:r,children:c("rpm_AssignLevel")}),(0,qt.jsx)(bC,{sx:{p:4},dividers:!0,children:(0,qt.jsx)(Ff,{container:!0,spacing:2,children:(0,qt.jsxs)(Ff,{item:!0,xs:!0,children:[(0,qt.jsx)(op,{mb:3,children:(0,qt.jsxs)(pE,{flexDirection:"column",gap:{xs:1,lg:2},children:[(0,qt.jsx)(Cf,{variant:"body1",component:"p",fontWeight:"h6.fontWeight",children:c("rpm_SelectLevel")}),(0,qt.jsxs)(op,{children:[(0,qt.jsx)(tH,{as:G_,fullWidth:!0,size:"small",id:"role_level",name:"role_level",variant:"outlined",endAdornment:(0,qt.jsx)(tw,{position:"end",sx:{position:"absolute",right:"28px"},children:(0,qt.jsx)(sy,{title:c("message:rpm_RoleLevelTextHelp"),placement:"top",children:(0,qt.jsx)(wh,{size:"small",disableRipple:!0,sx:{p:0},children:(0,qt.jsx)(pM.A,{fontSize:"small"})})})}),children:Object.values(bd).map(e=>(0,qt.jsx)(mf,{value:e,children:c("rpm_".concat(e))},e))}),(0,qt.jsx)(dH,{name:"role_level",children:e=>(0,qt.jsx)(v_,{error:!0,children:c(e,{field:c("rpm_RoleLevel")})})})]})]})}),n.role_level===bd.PROGRAM&&(0,qt.jsx)(op,{mb:3,children:(0,qt.jsxs)(pE,{flexDirection:"column",gap:{xs:1,lg:2},children:[(0,qt.jsx)(Cf,{variant:"body1",component:"p",fontWeight:"h6.fontWeight",children:c("rpm_SelectProgram")}),(0,qt.jsxs)(op,{children:[(0,qt.jsx)(tH,{component:KK,fullWidth:!0,size:"small",id:"program",optionId:"code",name:"program",options:t,browserAutocomplete:!1,onValueChange:()=>{i("role",""),i("role_type","")},valueKey:"code",nameKey:"display_name"}),(0,qt.jsx)(dH,{name:"program",children:e=>(0,qt.jsx)(v_,{error:!0,children:c(e,{field:c("rpm_SelectProgram")})})})]})]})}),!cs(n.program)&&(null===n||void 0===n?void 0:n.role_level)===(null===bd||void 0===bd?void 0:bd.PROGRAM)&&(0,qt.jsx)(op,{mb:3,children:(0,qt.jsxs)(pE,{flexDirection:"column",gap:{xs:1,lg:2},children:[(0,qt.jsx)(Cf,{variant:"body1",component:"p",fontWeight:"h6.fontWeight",children:c("rpm_SelectRoleType")}),(0,qt.jsxs)(op,{children:[(0,qt.jsx)(tH,{as:G_,fullWidth:!0,size:"small",id:"role_type",name:"role_type",variant:"outlined",value:null===n||void 0===n?void 0:n.role_type,onChange:e=>{e.target.value===xd.PREDEFINED?s("","/RPMCORE/".concat(null===n||void 0===n?void 0:n.program,"/")):o("","/RPMCORE/".concat(null===n||void 0===n?void 0:n.program,"/")),i("role_type",e.target.value)},endAdornment:(0,qt.jsx)(tw,{position:"end",sx:{position:"absolute",right:"28px"},children:(0,qt.jsx)(sy,{title:c("message:rpm_RoleLevelTextHelp"),placement:"top",children:(0,qt.jsx)(wh,{size:"small",disableRipple:!0,sx:{p:0},children:(0,qt.jsx)(pM.A,{fontSize:"small"})})})}),children:null===yd||void 0===yd?void 0:yd.map(e=>(0,qt.jsx)(mf,{value:null===e||void 0===e?void 0:e.value,children:null===e||void 0===e?void 0:e.label},null===e||void 0===e?void 0:e.id))}),(0,qt.jsx)(dH,{name:"role_type",children:e=>(0,qt.jsx)(v_,{error:!0,children:c(e,{field:c("rpm_RoleType")})})})]})]})}),!cs(n.program)&&(null===n||void 0===n?void 0:n.role_level)===(null===bd||void 0===bd?void 0:bd.PROGRAM)&&(0,qt.jsx)(op,{mb:3,children:(0,qt.jsxs)(pE,{flexDirection:"column",gap:{xs:1,lg:2},children:[(0,qt.jsx)(Cf,{variant:"body1",component:"p",fontWeight:"h6.fontWeight",children:c("rpm_SelectRole")}),(0,qt.jsxs)(op,{children:[(0,qt.jsx)(tH,{component:KK,fullWidth:!0,size:"small",id:"role",optionId:"id",name:"role",options:(null===n||void 0===n?void 0:n.role_type)===xd.PREDEFINED?l:a,browserAutocomplete:!1,valueKey:"id",nameKey:"name"}),(0,qt.jsx)(dH,{name:"role",children:e=>(0,qt.jsx)(v_,{error:!0,children:c(e,{field:c("rpm_SelectRole")})})})]})]})})]})})}),(0,qt.jsx)(vE,{sx:{py:3,px:4},children:(0,qt.jsxs)(Ff,{container:!0,spacing:2,children:[(0,qt.jsx)(Ff,{item:!0,xs:!0}),(0,qt.jsx)(Ff,{item:!0,children:(0,qt.jsx)(xh,{color:"primary",variant:"outlined",onClick:r,children:c("rpm_Cancel")})}),(0,qt.jsx)(Ff,{item:!0,children:(0,qt.jsx)(xh,{color:"primary",disableElevation:!0,variant:"contained",type:"submit",children:c("rpm_Submit")})})]})})]})})}},"assignLevel_formik")})})}const vJ=(0,Cy.A)((0,qt.jsx)("path",{d:"M6 19c0 1.1.9 2 2 2h8c1.1 0 2-.9 2-2V7H6zM19 4h-3.5l-1-1h-5l-1 1H5v2h14z"}),"Delete");function xJ(e){let{userData:t,assignProgramList:n,order:r,orderBy:o,setOrder:a,setOrderBy:s,dataParameter:l,assignProgramHead:c,checkState:d,onCheck:u,isSelection:p,nodata:h,fetchAssignProgramList:m,pageDetails:f,deleteButton:g,progPageDetails:v,attachProgram:x,groupsProgram:y,revokeAccess:b,isGroupRootAccess:j,assignLevelModalOpen:_,handleAssignLevelModalToggle:C,setHeadcells:w,settingModal:S,initialHeadcells:A,handleSettingModalToggle:k,allPrograms:T,fetchRoleCustomList:E,customRoles:M,goToRoles:O,fetchRolePredefinedList:R,rolePredefinedList:P}=e;const{t:D}=Vg(),N=null===v||void 0===v?void 0:v.per_page,L=Math.ceil((null===n||void 0===n?void 0:n.length)/parseInt(N)),I=(0,i.A)((0,i.A)({},v),{},{last_page:parseInt(L)});return(0,qt.jsxs)(qt.Fragment,{children:[(0,qt.jsxs)(Ff,{container:!0,spacing:2.5,children:[(0,qt.jsxs)(Ff,{container:!0,item:!0,xs:12,justifyContent:"space-between",children:[(0,qt.jsx)(Ff,{item:!0,children:(0,qt.jsxs)(dM,{severity:"warning",icon:!1,sx:e=>({mb:2,py:0,px:1,display:"inline-flex",fontSize:e.spacing(1.75),"& .MuiAlert-message":{p:e.spacing(1)}}),children:[(0,qt.jsxs)("strong",{children:["Current Access Level : ",cs(j)?"Program":"Client"]}),!cs(j)&&(0,qt.jsxs)(Cf,{variant:"body2",children:["You are showing all the programs and related roles on ROLES tab,",(0,qt.jsx)("br",{})," for the access all programs first assign root role on"," ",(0,qt.jsx)("strong",{children:"ROLES"})," tab."]})]})}),(0,qt.jsx)(Ff,{item:!0,children:(0,qt.jsxs)(op,{display:"flex",gap:2,children:[(null===t||void 0===t?void 0:t.isAdmin)&&(0,qt.jsx)(Ff,{item:!0,children:cs(j)?(0,qt.jsx)(xh,{color:"primary",variant:"contained",disableElevation:!0,startIcon:(0,qt.jsx)(tK.A,{}),onClick:C,children:D("rpm_Assign")}):b(j)}),(0,qt.jsx)(sy,{title:D("rpm_TableCellSetting"),children:(0,qt.jsx)(sv,{sx:{boxShadow:"none",width:32,height:32,minHeight:"auto"},size:"small",color:"primary",onClick:k,children:(0,qt.jsx)(YC.A,{fontSize:"small",sx:{width:16,height:16}})})})]})})]}),(0,qt.jsxs)(Ff,{item:!0,xs:12,children:[(0,qt.jsx)(op,{children:(0,qt.jsx)(UT,{order:r,orderBy:o,setOrder:a,setOrderBy:s,data:n,headCells:null===c||void 0===c?void 0:c.filter(e=>A.includes(e.id)),dataParameter:l,selected:d,setSelected:u,isSelection:p,noDataImage:h,fetchList:m,pageDetails:f,skeletonVrows:6,className:"theme_scroll",children:null===n||void 0===n?void 0:n.map(e=>(0,qt.jsxs)(cw,{className:e.code?"":"d-none",sx:{"&:last-child td, &:last-child th":{border:0}},children:[p&&(0,qt.jsx)(gw,{padding:"checkbox",children:(0,qt.jsx)(Dw,{onChange:u,checked:d.includes(e.id.toString()),name:e.id.toString(),color:"primary"})}),A.includes("name")&&(0,qt.jsx)(gw,{children:e.display_name}),A.includes("location")&&(0,qt.jsx)(gw,{children:e.city}),A.includes("updated_at")&&(0,qt.jsx)(gw,{children:sa()(e.updated_at).format("DD MMM YYYY")}),A.includes("updated_by")&&(0,qt.jsx)(gw,{children:e.updated_by}),A.includes("action")&&(0,qt.jsx)(gw,{children:(0,qt.jsxs)(op,{display:"flex",alignItems:"center",gap:"16px",children:[(0,qt.jsx)(xh,{sx:{padding:"4px 12px",minWidth:"unset"},color:"primary",variant:"outlined",onClick:()=>O(e),startIcon:(0,qt.jsx)(tK.A,{}),children:D("rpm_Assign_Role")}),null!==t&&void 0!==t&&t.isAdmin?g(e):(0,qt.jsx)(wh,{color:"error",disabled:!0,children:(0,qt.jsx)(vJ,{fontSize:"small",sx:{width:20,height:20}})})]})})]},e.id))})}),(0,qt.jsx)(KE,{pageDetails:cs(j)?I:v,fetchListFunction:m}),(0,qt.jsx)(TE,{open:S,allHeadCells:c,initialHeadcells:A,setHeadcells:w,onClose:k})]})]}),(0,qt.jsx)(gJ,{groupsProgram:y,openModal:_,onCloseModal:C,attachProgram:x,allPrograms:T,fetchRoleCustomList:E,customRoles:M,fetchRolePredefinedList:R,rolePredefinedList:P})]})}xJ.defaultProps={userData:{},assignProgramHead:[],pageDetails:{},order:"",orderBy:"",setOrder:()=>{},setOrderBy:()=>{},dataParameter:"",checkState:"",onCheck:()=>{},isSelection:"",nodata:"",assignProgramList:[],fetchAssignProgramList:()=>{},viewButton:()=>{},deleteButton:()=>{},progPageDetails:{},attachProgram:()=>{},groupsProgram:[],isGroupRootAccess:{},assignLevelModalOpen:!1,revokeAccess:{},handleAssignLevelModalToggle:()=>{},initialHeadcells:[],allPrograms:[],setHeadcells:()=>{},settingModal:!1,handleSettingModalToggle:()=>{},fetchRoleCustomList:()=>{},fetchRolePredefinedList:()=>{},customRoles:[],rolePredefinedList:[],goToRoles:()=>{}};const yJ=xJ;function bJ(e){let{rootAccess:t,user:n,userData:r,order:o,orderBy:a,setOrder:s,setOrderBy:l,dataParameter:c,checkState:d,onCheck:u,isSelection:p,nodata:h,assignProgramHead:m,assignProgramList:f,fetchAssignProgramList:g,assignCustomRoleHead:v,rolePredefinedList:x,fetchRolePredefinedList:y,roleCustomList:b,fetchRoleCustomList:j,assignSystemRoleHead:_,fetchAssignRoleList:C,roleSystemList:w,fetchRoleSystemList:S,pageDetails:A,deleteButton:k,revokeAccess:T,toggleRoles:E,role:M,assignUserRoles:O,handleChangeRole:R,filterByProgram:P,onProgramChange:D,progPageDetails:N,onApplyFilter:L,onResetFilter:I,attachProgram:F,isGroupRootAccess:$,groupsProgram:B,assignLevelModalOpen:z,handleAssignLevelModalToggle:H,setUserPassword:W,setHeadcells:U,settingModal:V,initialHeadcells:G,handleSettingModalToggle:q,allPrograms:Y,setRolesHeadcells:Z,rolesSettingModal:K,rolesInitialHeadcells:X,handleRolesSettingModalToggle:Q,customRoles:J}=e;const{t:ee}=Vg(),te=so(),[ne,re]=We.useState(0),[ie,oe]=We.useState(null),ae=[{name:ee("rpm_Staff"),url:ld.DOCTOR.USERS},{name:ee("rpm_UserDetail"),url:""}];return(0,qt.jsx)(qt.Fragment,{children:(0,qt.jsxs)(op,{sx:{width:"100%"},children:[(0,qt.jsx)(op,{mb:2.5,children:(0,qt.jsx)(BH,{labels:ae})}),(0,qt.jsx)(Ff,{container:!0,spacing:2,children:(0,qt.jsx)(Ff,{item:!0,xs:12,children:(0,qt.jsxs)(yH,{variant:"outlined",children:[(0,qt.jsx)(nW,{title:(0,qt.jsxs)(Ff,{container:!0,spacing:2,alignItems:"center",children:[(0,qt.jsx)(Ff,{item:!0,xs:!0,children:(0,qt.jsxs)(Cf,{variant:"h6",component:"h6",children:[ee("rpm_EditUser")," ",(0,qt.jsxs)(op,{component:"span",fontSize:"body1.fontSize",children:[" ","(",null===n||void 0===n?void 0:n.first_name,")"]})]})}),(0,qt.jsx)(Ff,{item:!0,children:(0,qt.jsx)(xh,{variant:"outlined",color:"primary",onClick:()=>te(-1),children:ee("rpm_Back")})})]}),sx:{py:1.5,bgcolor:"primary.theme.50"}}),(0,qt.jsxs)(wH,{sx:{p:0,":last-child":{pb:0}},children:[(0,qt.jsx)(op,{sx:{borderBottom:1,borderColor:"divider"},children:(0,qt.jsxs)(fV,{value:ne,onChange:(e,t)=>{re(t)},variant:"scrollable",scrollButtons:"auto",children:[(0,qt.jsx)(zU,(0,i.A)({label:ee("rpm_MyInformation")},HV(0))),(0,qt.jsx)(zU,(0,i.A)({label:ee("rpm_Programs")},HV(1))),(0,qt.jsx)(zU,(0,i.A)({label:ee("rpm_Roles")},HV(2))),(0,qt.jsx)(zU,(0,i.A)({label:ee("rpm_PasswordReset")},HV(3)))]})}),(0,qt.jsx)(zV,{value:ne,index:0,children:(0,qt.jsx)(op,{px:2,py:4,children:(0,qt.jsx)(dJ,{user:n,userData:r})})}),(0,qt.jsx)(zV,{value:ne,index:1,children:(0,qt.jsx)(op,{px:2,py:4,children:t?(0,qt.jsx)(uX,{user:n,revokeAccess:T,isGroupRootAccess:$}):(0,qt.jsx)(yJ,{userData:r,rootAccess:t,assignProgramList:f,order:o,orderBy:a,setOrder:s,setOrderBy:l,dataParameter:c,assignProgramHead:m,checkState:d,onCheck:u,isSelection:p,nodata:h,fetchAssignProgramList:g,pageDetails:A,deleteButton:k,revokeAccess:T,progPageDetails:N,attachProgram:F,groupsProgram:B,isGroupRootAccess:$,assignLevelModalOpen:z,handleAssignLevelModalToggle:H,setHeadcells:U,settingModal:V,initialHeadcells:G,handleSettingModalToggle:q,allPrograms:Y,fetchRoleCustomList:j,customRoles:J,goToRoles:e=>{oe(e),re(2)},fetchRolePredefinedList:y,rolePredefinedList:x})})}),(0,qt.jsx)(zV,{value:ne,index:2,children:(0,qt.jsx)(op,{px:2,py:4,children:(0,qt.jsx)(cX,{userData:r,rootAccess:t,order:o,orderBy:a,setOrder:s,setOrderBy:l,dataParameter:c,checkState:d,onCheck:u,isSelection:p,nodata:h,pageDetails:A,roleCustomList:b,rolePredefinedList:x,assignCustomRoleHead:v,fetchRoleCustomList:j,fetchRolePredefinedList:y,assignSystemRoleHead:_,fetchAssignRoleList:C,roleSystemList:w,fetchRoleSystemList:S,deleteButton:k,revokeAccess:T,toggleRoles:E,role:M,assignUserRoles:O,handleChangeRole:R,filterByProgram:P,onProgramChange:D,assignProgramList:f,onApplyFilter:L,onResetFilter:I,setRolesHeadcells:Z,rolesSettingModal:K,rolesInitialHeadcells:X,handleRolesSettingModalToggle:Q,allPrograms:Y,isGroupRootAccess:$,clickedProgram:ie,setClickedProgram:oe})})}),(0,qt.jsx)(zV,{value:ne,index:3,children:(0,qt.jsx)(op,{px:2,py:4,children:(0,qt.jsx)(hJ,{setUserPassword:W})})})]})]})})})]})})}bJ.defaultProps={userData:{},rootAccess:!1,pageDetails:{},order:"",orderBy:"",setOrder:()=>{},setOrderBy:()=>{},dataParameter:"",checkState:"",onCheck:()=>{},isSelection:"",nodata:"",assignProgramHead:[],assignProgramList:[],fetchAssignProgramList:()=>{},assignCustomRoleHead:[],roleCustomList:[],rolePredefinedList:[],fetchRoleCustomList:()=>{},fetchRolePredefinedList:()=>{},assignSystemRoleHead:[],fetchAssignRoleList:()=>{},viewButton:()=>{},deleteButton:()=>{},revokeAccess:()=>{},toggleRoles:()=>{},role:"",assignUserRoles:[],handleChangeRole:()=>{},filterByProgram:"",onProgramChange:()=>{},user:{},progPageDetails:{},roleSystemList:[],fetchRoleSystemList:()=>{},onApplyFilter:()=>{},onResetFilter:()=>{},attachProgram:()=>{},isGroupRootAccess:{},groupsProgram:[],assignLevelModalOpen:!1,handleAssignLevelModalToggle:()=>{},setUserPassword:()=>{},initialHeadcells:[],allPrograms:[],setHeadcells:()=>{},settingModal:!1,handleSettingModalToggle:()=>{},setRolesHeadcells:()=>{},rolesSettingModal:!1,rolesInitialHeadcells:[],handleRolesSettingModalToggle:()=>{},customRoles:[]};const jJ=bJ,_J=["content"],CJ=["content"];const wJ=function(e){var t;let{fetchProgramList:n,pageDetails:r}=e;const o=Nt(),a=wt(cu),{t:s}=Vg(),{enqueueSnackbar:l}=hi(),{userId:c}=lo(),{programList:d}=(0,We.useContext)(DC),u=wt(ju),{userData:p}=(0,We.useContext)(lv),[h,m]=(0,We.useState)("desc"),[f,g]=(0,We.useState)("updated_at"),[v,x]=We.useState(""),[y,b]=We.useState(null),[j,_]=We.useState(null),[C,w]=We.useState(null),[S,A]=We.useState(null),[k,T]=We.useState(null),[E,M]=We.useState([]),[O,R]=We.useState(null),[P,D]=We.useState([]),[N,L]=(0,We.useState)({custom_roles:[],system_roles:[],predefined_roles:[]}),[I,F]=We.useState(null),[$,B]=We.useState("CUSTOM"),[z,H]=We.useState({}),[W,U]=(0,We.useState)(null),[V,G]=(0,We.useState)([]),[q,Y]=We.useState(!1),[Z,K]=(0,We.useState)((0,i.A)({},dd)),[X,Q]=We.useState({open:!1,data:{}}),J=e=>{Q((0,i.A)((0,i.A)({},X),{},{open:!X.open,data:e}))},ee=()=>{Y(!q)},te=async function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:v,t=arguments.length>1?arguments[1]:void 0;try{const{data:n}=await o(qg((0,i.A)((0,i.A)({q:e},Z),{},{per_page:999,sort_by:f,sort_order:h,programId:t,kind:xd.CUSTOM}))),r=n||{},{content:a}=r,s=Ko(r,_J);if(M(a),null!==a&&void 0!==a&&a.length){let e=ue(a);T(e)}else T([]);K(e=>(0,i.A)((0,i.A)({},e),{},{last_page:s.last_page,current_page:s.current_page,from:s.from,per_page:s.per_page,to:s.to,total:null===s||void 0===s?void 0:s.total}))}catch(n){const e=us(n,"response.data.code","");cs(e)?o(Zo({subTitle:"error:rpm_ERR_NOT_FOUND",severity:ud.ERROR})):o(Zo({subTitle:Vd(e,"error:rpm_NotFound"),severity:ud.ERROR}))}},ne=async()=>{try{const{data:e}=await o(qg({kind:xd.SYSTEM})),{content:t}=e||{};R(t)}catch(e){console.log(e)}},re=async function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:v,t=arguments.length>1?arguments[1]:void 0;try{const{data:n}=await o(qg((0,i.A)((0,i.A)({q:e},Z),{},{per_page:999,sort_by:f,sort_order:h,programId:t,kind:xd.PREDEFINED}))),r=n||{},{content:a}=r,s=Ko(r,CJ);D(a),K(e=>(0,i.A)((0,i.A)({},e),{},{last_page:s.last_page,current_page:s.current_page,from:s.from,per_page:s.per_page,to:s.to,total:null===s||void 0===s?void 0:s.total}))}catch(n){const e=us(n,"response.data.code","");cs(e)?o(Zo({subTitle:"error:rpm_ERR_NOT_FOUND",severity:ud.ERROR})):o(Zo({subTitle:Vd(e,"error:rpm_NotFound"),severity:ud.ERROR}))}},ie=async()=>{try{const{data:e}=await o((e=>async t=>{t(na(!0));const n="".concat(ma.USERS,"/").concat(e,"/roles");try{return await Iu(n)}finally{t(na(!1))}})(c)),t=e.filter(e=>e.kind===xd.CUSTOM);F(t),L({custom_roles:e.filter(e=>e.kind===xd.CUSTOM).map(e=>e.id),system_roles:e.filter(e=>e.kind===xd.SYSTEM).map(e=>e.id),predefined_roles:e.filter(e=>"PRE_DEFINED"===e.kind).map(e=>e.id)})}catch(e){console.log(e)}},oe=async()=>{try{var e;let t=[];const{data:n}=await o((e=>async t=>{t(na(!0));let n="".concat(ma.USERS,"/").concat(e,"/groups");try{return await Iu(n)}finally{t(na(!1))}})(c)),r=null===n||void 0===n?void 0:n.find(e=>"/"===e.path);if(cs(r))t=n;else{const{data:e}=await o(Qg({sort_by:f,sort_order:h,include_child:!0,per_page:999}));t=e.content}const a=[],s=[];let l={};null===(e=t)||void 0===e||e.forEach(e=>{if("/"===e.path){var n;l=null===(n=t)||void 0===n?void 0:n.find(e=>"/"===e.path),w(l),s.push((0,i.A)({},l))}else{var r,o;const t=null===e||void 0===e||null===(r=e.path)||void 0===r?void 0:r.substr(1,(null===e||void 0===e||null===(o=e.path)||void 0===o?void 0:o.length)-2).split("/");t[1]&&(null===a||void 0===a||a.push({code:t[1],path:e.path}))}}),null!==a&&void 0!==a&&a.length&&null!==u&&void 0!==u&&u.length?(null===a||void 0===a||a.forEach(e=>{let t=cs(l)?u:d;const n=null===t||void 0===t?void 0:t.find(t=>(null===t||void 0===t?void 0:t.code)===e.code);n?s.push((0,i.A)((0,i.A)({},n),{},{path:e.path})):s.push((0,i.A)((0,i.A)({},u),{},{path:e.path}))}),A(s)):A([])}catch(t){console.log(t)}},ae=async e=>{try{await o(((e,t)=>async n=>{n(na(!0));let r="".concat(ma.USERS,"/").concat(e,"/groups/leave?path=").concat(t);try{return await Fu(r)}finally{n(na(!1))}})(c,e)),oe(),J({}),l(s("message:rpm_ProgramRemoveSuccess"),{variant:"success"}),w(null)}catch(t){const e=us(t,"response.data.code","");cs(e)?l(s("error:rpm_ProgramRemoveFailed"),{variant:"error"}):l(s(Vd(e)),{variant:"error"})}},se=async e=>{const t={role_ids:[...N.system_roles,...N.custom_roles,...N.predefined_roles,null===e||void 0===e?void 0:e.id]};try{"PRE_DEFINED"==e.kind&&await o(ev(c,e.group.path)),await o(Kg(c,t)),ie(),l(s("message:rpm_AttachRoleSuccess"),{variant:"success"})}catch(n){l(n.message,{variant:"error"})}},le=async e=>{const t=[...N.system_roles,...N.custom_roles,...N.predefined_roles].filter(t=>t!==e.id).map(e=>e),n={role_ids:t};try{"PRE_DEFINED"==e.kind&&await o(ev(c,e.group.path)),await o(Kg(c,n)),ie(),l(s("message:rpm_RemoveRoleSuccess"),{variant:"success"})}catch(i){var r;if("ERR_BAD_ESCALATION"===(null===i||void 0===i||null===(r=i.data)||void 0===r?void 0:r.code)||"ERR_BAD_ESCALATION"===(null===i||void 0===i?void 0:i.code))return void l(s("message:assign_unassignRootUser"),{variant:"error"});l((null===i||void 0===i?void 0:i.message)||"Something went wrong",{variant:"error"})}},ce=()=>{null!==W&&(te("",W),re("",W))},de=e=>{const t=[],n=[];return null===e||void 0===e||e.forEach(e=>{if("/"!==e.path){var n,r;const i=null===e||void 0===e||null===(n=e.path)||void 0===n?void 0:n.substr(1,(null===e||void 0===e||null===(r=e.path)||void 0===r?void 0:r.length)-2).split("/");i[1]&&(null===t||void 0===t||t.push({code:i[1],path:e.path}))}}),null!==t&&void 0!==t&&t.length&&(null===t||void 0===t||t.forEach(e=>{const t=null===d||void 0===d?void 0:d.find(t=>(null===t||void 0===t?void 0:t.code)===e.code);t&&n.push((0,i.A)((0,i.A)({},t),{},{path:e.path}))})),n},ue=e=>{let t=[];null===S||void 0===S||S.forEach(n=>{const r=null===e||void 0===e?void 0:e.filter(e=>{var t;if(e.group.path===n.path&&(null===(t=N.custom_roles)||void 0===t||!t.includes(e.id)))return!0});t.push(...r)});const n=null===e||void 0===e?void 0:e.filter(e=>{var t;return null===(t=N.custom_roles)||void 0===t?void 0:t.includes(e.id)});return n.concat(t)};We.useEffect(()=>{cs(null===N||void 0===N?void 0:N.system_roles)?cs(null===N||void 0===N?void 0:N.predefined_roles)?B("CUSTOM"):B("PREDEFINED"):B("SYSTEM")},[S]),We.useEffect(()=>{(()=>{const e=(null===p||void 0===p?void 0:p.isAdmin)&&(!cs(null===N||void 0===N?void 0:N.system_roles)||!cs(null===I||void 0===I?void 0:I.find(e=>"/"===e.group.path)));b(e)})()},[N]),We.useEffect(()=>{a&&!cs(d)&&(async()=>{try{const{data:e}=await o(Qg({sort_order:"asc",per_page:999,include_child:!0})),{content:t}=e||{},n=de(t);_(n)}catch(e){console.log(e)}})()},[a,d]),We.useEffect(()=>{if(a&&!cs(S))if(null!==p&&void 0!==p&&p.isAdmin)te(),re();else if(null!==p&&void 0!==p&&p.showStaffMenu){var e,t,n;te("","/RPMCORE/".concat(null===(e=S[0])||void 0===e?void 0:e.code,"/")),re("","/RPMCORE/".concat(null===(t=S[0])||void 0===t?void 0:t.code,"/")),U("/RPMCORE/".concat(null===(n=S[0])||void 0===n?void 0:n.code,"/"))}else te(),re(),U(null)},[a,S,y]),We.useEffect(()=>{a&&c&&!cs(d)&&((async()=>{try{const{data:e}=await o(Xg(c));H(e)}catch(e){l(e.message,{variant:"error"})}})(),ie(),ne())},[a,c,d]),We.useEffect(()=>{a&&c&&!cs(d)&&!cs(u)&&oe()},[a,c,d,f,h,u]),We.useEffect(()=>{o(NC({activeMenuItem:"users"}))},[]);const[pe,he]=We.useState(!1),[me,fe]=We.useState(cs($o.getAssignedProgramsHeadcells())?["name","location","updated_at","updated_by","action"]:$o.getAssignedProgramsHeadcells()),[ge,ve]=We.useState(!1),[xe,ye]=We.useState(cs($o.getAssignedRolesHeadcells())?["role_name","description","access_layer","action"]:$o.getAssignedRolesHeadcells()),be=[{id:"name",label:s("rpm_Name"),isSort:!1,sortProperty:"name"},{id:"location",label:s("rpm_Location"),isSort:!1,sortProperty:"location"},{id:"updated_at",label:s("rpm_DateModified"),isSort:!1,sortProperty:"updated_at"},{id:"updated_by",label:s("rpm_ModifiedBy"),isSort:!1,sortProperty:"updated_by"},{id:"action",label:s("rpm_Actions"),isSort:!1,sortProperty:"action"}],je=[{id:"role_name",label:s("rpm_RoleName"),isSort:!0,sortProperty:"name"},{id:"description",label:s("rpm_Description"),isSort:!1,sortProperty:"description"},{id:"access_layer",label:s("rpm_AccessLevel"),isSort:!1,sortProperty:"access_layer"},{id:"action",label:s("rpm_Actions"),isSort:!1,sortProperty:"action"}],_e=[{id:"role_name",label:s("rpm_RoleName"),isSort:!0,sortProperty:"name"},{id:"description",label:s("rpm_Description"),isSort:!0,sortProperty:"description"},{id:"action",label:s("rpm_Actions"),isSort:!1,sortProperty:"action"}];return We.useEffect(()=>{ce()},[W]),(0,qt.jsxs)(qt.Fragment,{children:[(0,qt.jsx)(jJ,{rootAccess:y,userData:p,user:z,role:$,nodata:GC,onCheck:e=>{if(Array.isArray(e))return G(e.map(e=>e.toString()));const t=e.target.name;V.includes(t)?G(V.filter(e=>e!==t)):G(e=>[...e,t])},isSelection:!1,order:h,orderBy:f,setOrder:m,setOrderBy:g,searchText:v,checkState:V,setSearchText:x,dataParameter:"id",deleteButton:e=>(0,qt.jsx)(sy,{title:s("rpm_RemoveProgram"),children:(0,qt.jsx)(op,{component:"span",children:(0,qt.jsx)(wh,{"data-id":e.id,color:"error",onClick:()=>J(e),disabled:!cs(C),children:(0,qt.jsx)(vJ,{fontSize:"small",sx:{width:20,height:20}})})})}),revokeAccess:e=>(0,qt.jsx)(xh,{color:"error",variant:"contained",disableElevation:!0,startIcon:(0,qt.jsx)(sX.A,{}),onClick:()=>J(e),children:s("rpm_UnassignClient")}),toggleRoles:e=>{var t,n,r,i,o,a,l,c,d,u,p,h;return $===xd.SYSTEM?(0,qt.jsx)(xh,{"data-id":e.id,color:null!==(t=N.system_roles)&&void 0!==t&&t.includes(e.id)?"error":"primary",variant:"contained",disableElevation:!0,startIcon:null!==(n=N.system_roles)&&void 0!==n&&n.includes(e.id)?(0,qt.jsx)(sX.A,{}):(0,qt.jsx)(tK.A,{}),onClick:null!==(r=N.system_roles)&&void 0!==r&&r.includes(e.id)?()=>le(e):()=>se(e),children:null!==(i=N.system_roles)&&void 0!==i&&i.includes(e.id)?s("rpm_UnassignRole"):s("rpm_AssignRole")}):$===xd.CUSTOM?(0,qt.jsx)(xh,{"data-id":e.id,color:null!==(o=N.custom_roles)&&void 0!==o&&o.includes(e.id)?"error":"primary",variant:"contained",disableElevation:!0,startIcon:null!==(a=N.custom_roles)&&void 0!==a&&a.includes(e.id)?(0,qt.jsx)(sX.A,{}):(0,qt.jsx)(tK.A,{}),onClick:null!==(l=N.custom_roles)&&void 0!==l&&l.includes(e.id)?()=>le(e):()=>se(e),children:null!==(c=N.custom_roles)&&void 0!==c&&c.includes(e.id)?s("rpm_UnassignRole"):s("rpm_AssignRole")}):$===xd.PREDEFINED?(0,qt.jsx)(xh,{"data-id":e.id,color:null!==(d=N.predefined_roles)&&void 0!==d&&d.includes(e.id)?"error":"primary",variant:"contained",disableElevation:!0,startIcon:null!==(u=N.predefined_roles)&&void 0!==u&&u.includes(e.id)?(0,qt.jsx)(sX.A,{}):(0,qt.jsx)(tK.A,{}),onClick:null!==(p=N.predefined_roles)&&void 0!==p&&p.includes(e.id)?()=>le(e):()=>se(e),children:null!==(h=N.predefined_roles)&&void 0!==h&&h.includes(e.id)?s("rpm_UnassignRole"):s("rpm_AssignRole")}):void 0},pageDetails:Z,filterByProgram:W,onProgramChange:e=>{U("/RPMCORE/".concat(e))},handleChangeRole:e=>{B(e.target.value)},progPageDetails:r,assignProgramHead:be,assignProgramList:y?d:S,fetchAssignProgramList:n,assignCustomRoleHead:je,assignUserRoles:I,fetchAssignRoleList:ie,assignSystemRoleHead:_e,roleCustomList:k,rolePredefinedList:P,fetchRoleCustomList:te,fetchRolePredefinedList:re,roleSystemList:O,fetchRoleSystemList:ne,onApplyFilter:ce,onResetFilter:()=>{U(null),te(),re()},attachProgram:async(e,t)=>{let{setErrors:n}=t;try{const t=e.program?"/RPMCORE/".concat(e.program,"/"):"/",n=[...N.system_roles,...N.custom_roles,...N.predefined_roles,null===e||void 0===e?void 0:e.role];await o(ev(c,t)),(null===e||void 0===e?void 0:e.role_level)===bd.PROGRAM&&n.length>0&&await o(Kg(null===z||void 0===z?void 0:z.id,{role_ids:n})),oe(),ee(),l(s("message:rpm_ProgramAttachSuccess"),{variant:"success"})}catch(r){const e=us(r,"response.data.field_errors",{}),t=us(r,"response.data.code","");cs(e)?cs(t)?l(s("error:rpm_ProgramAttachFailed"),{variant:"error"}):l(s(Vd(t)),{variant:"error"}):n(Ud(e))}},isGroupRootAccess:C,groupsProgram:j,assignLevelModalOpen:q,handleAssignLevelModalToggle:ee,setUserPassword:async(e,t)=>{let{resetForm:n,setErrors:r}=t;const a=(0,i.A)({},e);try{await o(((e,t)=>async n=>{n(na(!0));const r="".concat(ma.USERS,"/").concat(e,"/set-password"),i={new_password:t.new_password};try{return await $u(r,i)}finally{n(na(!1))}})(c,a)),o(Zo({subTitle:"message:rpm_UpdatePasswordSuccessfully",severity:ud.SUCCESS})),n()}catch(s){const e=us(s,"response.data.field_errors",{}),t=us(s,"response.data.code","");cs(e)?cs(t)?o(Zo({subTitle:"error:rpm_PasswordResetFailed",severity:ud.ERROR})):o(Zo({subTitle:Vd(t,"error:rpm_PasswordResetFailed"),severity:ud.ERROR})):r(Ud(e))}},setHeadcells:function(e){fe(e),$o.setAssignedProgramsHeadcells(e)},settingModal:pe,initialHeadcells:me,handleSettingModalToggle:()=>{he(!pe)},allPrograms:u,setRolesHeadcells:function(e){ye(e),$o.setAssignedRolesHeadcells(e)},rolesSettingModal:ge,rolesInitialHeadcells:xe,handleRolesSettingModalToggle:()=>{ve(!ge)},customRoles:E}),(0,qt.jsx)(qV,{openModal:X.open,onCloseModal:J,actionFunction:()=>{var e;return ae(null===X||void 0===X||null===(e=X.data)||void 0===e?void 0:e.path)},dataName:null===X||void 0===X||null===(t=X.data)||void 0===t?void 0:t.display_name,options:{primaryText:s("rpm_Confirm"),secondaryText:s("message:rpm_UnassignBodyText"),descText:"",btn:{primaryText:s("rpm_Confirm"),secondaryText:s("rpm_Cancel"),primaryColor:"error",secondaryColor:"primary"},btnSwap:!0}})]})};function SJ(e){let{userList:t,order:n,orderBy:r,setOrder:o,setOrderBy:a,searchText:s,setSearchText:l,dataParameter:c,userHead:d,checkState:u,onCheck:p,isSelection:h,nodata:m,fetchUserList:f,pageDetails:g,viewButton:v,deleteButton:x,onProgramChange:y,onResetFilter:b,userData:j,setHeadcells:_,settingModal:C,initialHeadcells:w,handleSettingModalToggle:S,allPrograms:A}=e;const{t:k}=Vg(),T=so(),E=[{name:k("rpm_Staff"),url:""}];return(0,qt.jsx)(qt.Fragment,{children:(0,qt.jsxs)(op,{sx:{width:"100%"},children:[(0,qt.jsxs)(op,{mb:2.5,display:"flex",children:[(0,qt.jsx)(BH,{labels:E}),(0,qt.jsx)(op,{sx:{display:{xs:"block",sm:"none"}},children:(0,qt.jsx)(Cf,{variant:"h5",component:"h5",children:k("rpm_Staff")})})]}),(0,qt.jsx)(op,{mb:2.5,children:(0,qt.jsxs)(Ff,{container:!0,spacing:2,alignItems:"center",children:[(0,qt.jsx)(Ff,{item:!0,xs:!0,children:(0,qt.jsx)(op,{sx:{display:{xs:"none",sm:"block"}},children:(0,qt.jsx)(Cf,{variant:"h5",component:"h5",children:k("rpm_Staff")})})}),(null===j||void 0===j?void 0:j.showCreateUserBtn)&&(0,qt.jsx)(Ff,{item:!0,children:(0,qt.jsx)(xh,{variant:"contained",color:"primary",disableElevation:!0,onClick:()=>T("add"),className:(null===j||void 0===j?void 0:j.showCreateUserBtn)&&"staff-tour-step2",children:k("rpm_CreateUser")})})]})}),(0,qt.jsxs)(Ff,{container:!0,spacing:2.5,children:[(0,qt.jsx)(Ff,{item:!0,xs:12,children:(0,qt.jsxs)(Ff,{container:!0,spacing:2,justifyContent:"space-between",children:[(0,qt.jsx)(Ff,{item:!0,xs:12,md:5,lg:4,className:"staff-tour-step1",children:(0,qt.jsx)(WZ,{fetchListFunction:f,searchText:s,setSearchText:l,pageDetails:g,searchInField:!0,placeHolder:"Search by username and email"})}),(0,qt.jsxs)(Ff,{item:!0,xs:12,md:7,lg:8,container:!0,spacing:2,justifyContent:"flex-end",children:[(0,qt.jsx)(Ff,{item:!0,xs:12,md:6,lg:4,className:"staff-tour-step0",children:(0,qt.jsx)(aj,{fullWidth:!0,size:"small",margin:"dense",id:"course",name:"course",options:cs(A)?[]:A,isOptionEqualToValue:(e,t)=>e.id===t.id,getOptionLabel:e=>null===e||void 0===e?void 0:e.display_name,renderOption:(e,t)=>(0,We.createElement)(op,(0,i.A)((0,i.A)({component:"li"},e),{},{key:t.code}),(0,qt.jsx)(op,{children:(0,qt.jsx)(Cf,{variant:"body1",component:"p",children:t.display_name})})),onChange:async(e,t,n)=>{y(null===t||void 0===t?void 0:t.code),"clear"===n&&b()},renderInput:e=>(0,qt.jsx)(Q_,(0,i.A)((0,i.A)({},e),{},{placeholder:k("rpm_SelectProgram")+"..."}))})}),(0,qt.jsx)(Ff,{item:!0,children:(0,qt.jsx)(sy,{title:k("rpm_TableCellSetting"),children:(0,qt.jsx)(sv,{sx:{boxShadow:"none",width:32,height:32,minHeight:"auto"},size:"small",color:"primary",onClick:S,children:(0,qt.jsx)(YC.A,{fontSize:"small",sx:{width:16,height:16}})})})})]})]})}),(0,qt.jsxs)(Ff,{item:!0,xs:12,children:[(0,qt.jsx)(op,{children:(0,qt.jsx)(UT,{order:n,orderBy:r,setOrder:o,setOrderBy:a,data:t,headCells:null===d||void 0===d?void 0:d.filter(e=>w.includes(e.id)),dataParameter:c,selected:u,setSelected:p,isSelection:h,noDataImage:m,fetchList:f,pageDetails:g,skeletonVrows:6,className:"theme_scroll",children:null===t||void 0===t?void 0:t.map(e=>{return(0,qt.jsxs)(cw,{sx:{"&:last-child td, &:last-child th":{border:0}},children:[h&&(0,qt.jsx)(gw,{padding:"checkbox",children:(0,qt.jsx)(Dw,{onChange:p,checked:u.includes(e.id.toString()),name:e.id.toString(),color:"primary"})}),w.includes("username")&&(0,qt.jsx)(gw,{children:(0,qt.jsx)(Lo,{className:"linkClr",to:"edit/".concat(e.id),children:e.username})}),w.includes("full_name")&&(0,qt.jsx)(gw,{width:"25%",children:e.first_name+" "+e.last_name}),w.includes("email")&&(0,qt.jsx)(gw,{children:e.email}),w.includes("status")&&(0,qt.jsx)(gw,{children:(t=e.active,t?(0,qt.jsx)(dM,{severity:"success",icon:!1,sx:e=>({py:0,px:1,display:"inline-flex",fontSize:e.spacing(1.5),"& .MuiAlert-message":{p:e.spacing(.5,0)}}),children:(0,qt.jsx)("strong",{children:"Active"})}):(0,qt.jsx)(dM,{severity:"error",icon:!1,sx:e=>({py:0,px:1,display:"inline-flex",fontSize:e.spacing(1.5),"& .MuiAlert-message":{p:e.spacing(.5,0)}}),children:(0,qt.jsx)("strong",{children:"Inactive"})}))}),w.includes("created_at")&&(0,qt.jsx)(gw,{children:sa()(e.created_at).format("DD MMM YYYY hh:mm A")}),w.includes("action")&&(0,qt.jsxs)(gw,{children:[(null===j||void 0===j?void 0:j.showReadUserBtn)&&v(e),(null===j||void 0===j?void 0:j.showDeleteUserBtn)&&x(e)]})]},e.id);var t})})}),(0,qt.jsx)(KE,{pageDetails:g,fetchListFunction:f}),(0,qt.jsx)(TE,{open:C,allHeadCells:d,initialHeadcells:w,setHeadcells:_,onClose:S})]})]})]})})}SJ.defaultProps={userHead:[],pageDetails:{},order:"",orderBy:"",setOrder:()=>{},setOrderBy:()=>{},searchText:"",setSearchText:()=>{},dataParameter:"",checkState:"",onCheck:()=>{},isSelection:"",nodata:"",userList:[],fetchUserList:()=>{},viewButton:()=>{},deleteButton:()=>{},filterByProgram:0,onProgramChange:()=>{},programList:[],onApplyFilter:()=>{},onResetFilter:()=>{},userData:{},initialHeadcells:[],setHeadcells:()=>{},settingModal:!1,handleSettingModalToggle:()=>{},allPrograms:[]};const AJ=SJ,kJ=["content"];const TJ=function(){const e=Nt(),t=so(),{t:n}=Vg(),{userData:r}=(0,We.useContext)(lv),o=wt(bu),a=!("true"===us(o,"user_principal.attributes.skip_tour[0]","")),{programList:s}=(0,We.useContext)(DC),l=wt(ju),c=wt(cu),d=We.useRef([]),[u,p]=(0,We.useState)("desc"),[h,m]=(0,We.useState)("updated_at"),[f,g]=We.useState(""),[v,x]=We.useState(null),[y,b]=(0,We.useState)([]),[j,_]=(0,We.useState)(null),[C,w]=(0,We.useState)((0,i.A)({},dd)),[S,A]=We.useState({open:!1,data:{}}),[k,T]=We.useState(""),[E,M]=We.useState(!1),[O,R]=We.useState(cs($o.getUsersHeadCells())?["username","full_name","email","status","created_at","action"]:$o.getUsersHeadCells()),P=e=>{if(S.open)d.current=[],A((0,i.A)((0,i.A)({},S),{},{open:!S.open}));else{const t=Array.isArray(event)?[...event]:[e.id];d.current=t,A((0,i.A)((0,i.A)({},S),{},{open:!S.open,data:e}))}},D=async function(){var t;let n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:f,o={},a=(0,i.A)((0,i.A)({q:n},C),{},{sort_by:h,sort_order:u}),l=null!==j?j:null===(t=s[0])||void 0===t?void 0:t.code;const c=null!==j?j:null;null!==r&&void 0!==r&&r.isAdmin&&null===j?o=(0,i.A)((0,i.A)({},a),{},{programId:c}):null!==r&&void 0!==r&&r.showStaffMenu?(o=(0,i.A)((0,i.A)({},a),{},{programId:l}),_(l)):o=(0,i.A)((0,i.A)({},a),{},{programId:c});try{const{data:t}=await e(Zg(o)),n=t||{},{content:r}=n,a=Ko(n,kJ);x(r),w(e=>(0,i.A)((0,i.A)({},e),{},{last_page:a.last_page,current_page:a.current_page,from:a.from,per_page:a.per_page,to:a.to,total:a.total}))}catch(d){const t=us(d,"response.data.code","");cs(t)?e(Zo({subTitle:"error:rpm_FetchUsersFailed",severity:ud.ERROR})):e(Zo({subTitle:Vd(t,"error:rpm_FetchUsersFailed"),severity:ud.ERROR}))}},N=()=>{null!==j&&D()};We.useEffect(()=>{N()},[j]),We.useEffect(()=>{!c||cs(l)||cs(r)||null===j&&D()},[c,u,h,l,r,j]),We.useEffect(()=>{e(NC({activeMenuItem:"users",heading:{}}))},[]);const L=[{id:"username",label:n("rpm_UserName"),isSort:!0,sortProperty:"username"},{id:"full_name",label:n("rpm_FullName"),isSort:!1,sortProperty:"full_name"},{id:"email",label:n("rpm_Email"),isSort:!0,sortProperty:"email"},{id:"status",label:n("rpm_Status"),isSort:!1,sortProperty:"status"},{id:"created_at",label:n("rpm_CreatedAt"),isSort:!0,sortProperty:"created_at"},{id:"action",label:n("rpm_Actions"),isSort:!1,sortProperty:"action"}];return(0,qt.jsxs)(qt.Fragment,{children:[(0,qt.jsx)(AJ,{order:u,orderBy:h,setOrder:p,setOrderBy:m,searchText:f,setSearchText:g,dataParameter:"id",checkState:y,onCheck:e=>{if(Array.isArray(e))return b(e.map(e=>e.toString()));const t=e.target.name;y.includes(t)?b(y.filter(e=>e!==t)):b(e=>[...e,t])},isSelection:!1,nodata:GC,userHead:L,userList:v,fetchUserList:D,pageDetails:C,editButton:e=>(0,qt.jsx)(sy,{title:n("rpm_Edit"),children:(0,qt.jsx)(wh,{"data-id":e.id,color:"primary",onClick:()=>console.log(e),children:(0,qt.jsx)(fc,{fontSize:"small",sx:{width:16,height:16}})})}),viewButton:e=>(0,qt.jsx)(sy,{title:n("rpm_view"),children:(0,qt.jsx)(wh,{"data-id":e.id,color:"primary",onClick:()=>t("edit/".concat(e.id)),children:(0,qt.jsx)(gc,{fontSize:"small",sx:{width:16,height:16}})})}),deleteButton:e=>(0,qt.jsx)(sy,{title:n("rpm_Delete"),children:(0,qt.jsx)(wh,{"data-id":e.id,color:"error",onClick:()=>P(e),children:(0,qt.jsx)(xc,{fontSize:"small",sx:{width:16,height:16}})})}),filterByProgram:j,onProgramChange:e=>{_(e)},programList:s,onApplyFilter:N,onResetFilter:()=>{_(null)},userData:r,setHeadcells:function(e){R(e),$o.setUsersHeadCells(e)},settingModal:E,initialHeadcells:O,handleSettingModalToggle:()=>{M(!E)},allPrograms:l}),(0,qt.jsx)(qV,{openModal:S.open,onCloseModal:P,actionFunction:async()=>{try{if(await e(function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];return async t=>{if(!cs(e)){t(na(!0));try{await Promise.all(e.map(e=>Bu("".concat(ma.USERS,"/").concat(e))))}finally{t(na(!1))}}}}(d.current)),b([]),null!==r&&void 0!==r&&r.isAdmin)D();else if(null!==r&&void 0!==r&&r.showStaffMenu){var t,n;D("",null===(t=s[0])||void 0===t?void 0:t.code),_(null===(n=s[0])||void 0===n?void 0:n.code)}else D(),_(null);A((0,i.A)((0,i.A)({},S),{},{open:!S.open})),e(Zo({subTitle:"message:rpm_DeleteUserSuccess",severity:ud.SUCCESS}))}catch(o){const t=us(o,"response.data.code","");cs(t)?e(Zo({subTitle:"error:rpm_RoleDeleteFailed",severity:ud.ERROR})):e(Zo({subTitle:Vd(t,"error:rpm_UserDeleteFailed"),severity:ud.ERROR}))}},dataName:S.data.username,options:{primaryText:n("message:rpm_DeleteTitle"),secondaryText:n("message:rpm_DeleteBodyText"),descText:n("message:rpm_DeleteSubText"),btn:{primaryText:n("rpm_Delete"),secondaryText:n("rpm_Cancel"),primaryColor:"error",secondaryColor:"primary"},btnSwap:!0}}),!cs(r)&&(0,qt.jsxs)(qt.Fragment,{children:[(0,qt.jsx)(zZ,{isTour:a,path:"staffTour",setRenderer:T}),(0,qt.jsx)("input",{type:"hidden",id:"rerenderer",value:k})]})]})};const EJ=function(e){let{showPassword:t,passwordFields:n,updateUserPassword:r,handleShowHidePassword:i}=e;const{t:o}=Vg(),a=so(),s=[{id:1,info:o("rpm_passwordInstruction1")},{id:2,info:o("rpm_passwordInstruction2")},{id:3,info:o("rpm_passwordInstruction3")},{id:4,info:o("rpm_passwordInstruction4")},{id:5,info:o("rpm_passwordInstruction5")},{id:6,info:o("rpm_passwordInstruction6")}],l=[{name:o("rpm_RPM"),url:ld.DOCTOR.PROGRAM},{name:o("rpm_ChangePassword"),url:""}];return(0,qt.jsxs)(op,{sx:{width:"100%"},children:[(0,qt.jsx)(op,{mb:2.5,children:(0,qt.jsx)(BH,{labels:l})}),(0,qt.jsx)(Ff,{container:!0,spacing:2,children:(0,qt.jsx)(Ff,{item:!0,xs:12,children:(0,qt.jsx)(Kz,{initialValues:n,validationSchema:OU.updatePassword,onSubmit:r,enableReinitialize:!0,children:()=>(0,qt.jsx)(qt.Fragment,{children:(0,qt.jsx)(nH,{children:(0,qt.jsxs)(yH,{variant:"outlined",children:[(0,qt.jsx)(nW,{sx:{py:1.5,bgcolor:"primary.theme.50"},title:(0,qt.jsx)(qt.Fragment,{children:(0,qt.jsx)(Ff,{container:!0,spacing:2,alignItems:"center",children:(0,qt.jsx)(Ff,{item:!0,xs:!0,children:(0,qt.jsx)(Cf,{variant:"h6",component:"h6",children:o("rpm_ChangePassword")})})})})}),(0,qt.jsx)(wH,{sx:{py:4,":last-child":{pb:4}},children:(0,qt.jsxs)(Ff,{container:!0,spacing:4,children:[(0,qt.jsxs)(Ff,{item:!0,xs:12,md:7,lg:6,children:[(0,qt.jsx)(op,{mb:3,children:(0,qt.jsxs)(pE,{flexDirection:"column",gap:{xs:1,lg:2},children:[(0,qt.jsxs)(Cf,{variant:"body1",component:"p",fontWeight:"h6.fontWeight",children:[o("rpm_CurrentPassword"),(0,qt.jsx)(op,{component:"span",children:"*"})]}),(0,qt.jsxs)(op,{children:[(0,qt.jsx)(tH,{as:qj,fullWidth:!0,size:"small",id:"currentPassword",name:"currentPassword",variant:"outlined",type:"password",endAdornment:(0,qt.jsx)(tw,{position:"end",children:(0,qt.jsx)(sy,{title:o("message:rpm_CurrentPasswordHelp"),placement:"top",children:(0,qt.jsx)(wh,{size:"small",disableRipple:!0,sx:{p:0},children:(0,qt.jsx)(pM.A,{fontSize:"small"})})})})}),(0,qt.jsx)(dH,{name:"currentPassword",children:e=>(0,qt.jsx)(v_,{error:!0,children:o(e,{field:o("rpm_CurrentPassword")})})})]})]})}),(0,qt.jsx)(op,{mb:3,children:(0,qt.jsxs)(pE,{flexDirection:"column",gap:{xs:1,lg:2},children:[(0,qt.jsxs)(Cf,{variant:"body1",component:"p",fontWeight:"h6.fontWeight",children:[o("rpm_NewPassword"),(0,qt.jsx)(op,{component:"span",children:"*"})]}),(0,qt.jsxs)(op,{children:[(0,qt.jsx)(tH,{as:qj,fullWidth:!0,size:"small",id:"password",name:"password",variant:"outlined",type:t?"password":"text",endAdornment:(0,qt.jsxs)(tw,{position:"end",children:[(0,qt.jsx)(wh,{size:"small",onClick:i,children:t?(0,qt.jsx)(uJ.A,{fontSize:"small"}):(0,qt.jsx)(gc,{fontSize:"small"})}),(0,qt.jsx)(sy,{title:o("message:rpm_NewPasswordHelp"),placement:"top",children:(0,qt.jsx)(wh,{size:"small",disableRipple:!0,sx:{p:0},children:(0,qt.jsx)(pM.A,{fontSize:"small"})})})]})}),(0,qt.jsx)(dH,{name:"password",children:e=>(0,qt.jsx)(v_,{error:!0,children:o(e,{field:o("rpm_NewPassword")})})})]})]})}),(0,qt.jsx)(op,{children:(0,qt.jsxs)(pE,{flexDirection:"column",gap:{xs:1,lg:2},children:[(0,qt.jsxs)(Cf,{variant:"body1",component:"p",fontWeight:"h6.fontWeight",children:[o("rpm_ConfirmPassword"),(0,qt.jsx)(op,{component:"span",children:"*"})]}),(0,qt.jsxs)(op,{children:[(0,qt.jsx)(tH,{as:qj,fullWidth:!0,size:"small",id:"confirmPassword",name:"confirmPassword",variant:"outlined",type:"password",endAdornment:(0,qt.jsx)(tw,{position:"end",children:(0,qt.jsx)(sy,{title:o("message:rpm_ConfirmPasswordHelp"),placement:"top",children:(0,qt.jsx)(wh,{size:"small",disableRipple:!0,sx:{p:0},children:(0,qt.jsx)(pM.A,{fontSize:"small"})})})})}),(0,qt.jsx)(dH,{name:"confirmPassword",children:e=>(0,qt.jsx)(v_,{error:!0,children:o(e,{field:o("rpm_ConfirmPassword")})})}),(0,qt.jsx)(qH,{sx:{mt:4,p:0},children:(0,qt.jsxs)(Ff,{container:!0,spacing:2,children:[(0,qt.jsx)(Ff,{item:!0,children:(0,qt.jsx)(xh,{variant:"outlined",color:"primary",disableElevation:!0,onClick:()=>a(-1),children:"Cancel"})}),(0,qt.jsx)(Ff,{item:!0,children:(0,qt.jsx)(xh,{variant:"contained",color:"primary",disableElevation:!0,type:"submit",children:"Save"})})]})})]})]})})]}),(0,qt.jsx)(Ff,{item:!0,xs:!0,container:!0,justifyContent:"center",children:(0,qt.jsx)(Ff,{item:!0,children:(0,qt.jsxs)(op,{mt:4,children:[(0,qt.jsx)(Cf,{variant:"subtitle2",component:"h6",gutterBottom:!0,children:o("rpm_passwordStandards")+":"}),(0,qt.jsx)(op,{component:"ul",sx:{p:0,pl:3,m:0},children:s.map(e=>(0,qt.jsx)(op,{component:"li",children:(0,qt.jsx)(Cf,{sx:{display:"inline"},component:"p",variant:"body2",color:"text.primary",children:e.info})},e.id))})]})})})]})})]})})})},"password_formik")})})]})},MJ={currentPassword:"",password:"",confirmPassword:""};const OJ=function(){const e=Nt(),[t,n]=We.useState(!0);return We.useEffect(()=>{e(NC({activeMenuItem:"change-password",heading:{}}))},[]),(0,qt.jsx)(qt.Fragment,{children:(0,qt.jsx)(EJ,{showPassword:t,passwordFields:MJ,updateUserPassword:async(t,n)=>{let{setErrors:r,resetForm:o}=n;const a=(0,i.A)({},t);try{await e((e=>async t=>{t(na(!0));const n="".concat(ma.UPDATEPASSWORD),r={current_password:e.currentPassword,new_password:e.password};try{return await $u(n,r)}finally{t(na(!1))}})(a)),o(),e(Zo({subTitle:"message:rpm_UpdatePasswordSuccessfully",severity:ud.SUCCESS}))}catch(s){const t=us(s,"response.data.field_errors",{}),n=us(s,"response.data.code","");cs(t)?cs(n)?e(Zo({subTitle:"error:rpm_PasswordFailure",severity:ud.ERROR})):e(Zo({subTitle:Vd(n,"error:rpm_PasswordFailure"),severity:ud.ERROR})):r(Ud(t))}},handleShowHidePassword:()=>{n(!t)}})})};function RJ(e){var t,n,r="";if("string"==typeof e||"number"==typeof e)r+=e;else if("object"==typeof e)if(Array.isArray(e)){var i=e.length;for(t=0;t<i;t++)e[t]&&(n=RJ(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}const PJ=function(){for(var e,t,n=0,r="",i=arguments.length;n<i;n++)(e=arguments[n])&&(t=RJ(e))&&(r&&(r+=" "),r+=t);return r};var DJ=Object.getOwnPropertyNames,NJ=Object.getOwnPropertySymbols,LJ=Object.prototype.hasOwnProperty;function IJ(e,t){return function(n,r,i){return e(n,r,i)&&t(n,r,i)}}function FJ(e){return function(t,n,r){if(!t||!n||"object"!==typeof t||"object"!==typeof n)return e(t,n,r);var i=r.cache,o=i.get(t),a=i.get(n);if(o&&a)return o===n&&a===t;i.set(t,n),i.set(n,t);var s=e(t,n,r);return i.delete(t),i.delete(n),s}}function $J(e){return DJ(e).concat(NJ(e))}var BJ=Object.hasOwn||function(e,t){return LJ.call(e,t)};function zJ(e,t){return e===t||!e&&!t&&e!==e&&t!==t}var HJ=Object.getOwnPropertyDescriptor,WJ=Object.keys;function UJ(e,t,n){var r=e.length;if(t.length!==r)return!1;for(;r-- >0;)if(!n.equals(e[r],t[r],r,r,e,t,n))return!1;return!0}function VJ(e,t){return zJ(e.getTime(),t.getTime())}function GJ(e,t){return e.name===t.name&&e.message===t.message&&e.cause===t.cause&&e.stack===t.stack}function qJ(e,t){return e===t}function YJ(e,t,n){var r=e.size;if(r!==t.size)return!1;if(!r)return!0;for(var i,o,a=new Array(r),s=e.entries(),l=0;(i=s.next())&&!i.done;){for(var c=t.entries(),d=!1,u=0;(o=c.next())&&!o.done;)if(a[u])u++;else{var p=i.value,h=o.value;if(n.equals(p[0],h[0],l,u,e,t,n)&&n.equals(p[1],h[1],p[0],h[0],e,t,n)){d=a[u]=!0;break}u++}if(!d)return!1;l++}return!0}var ZJ=zJ;function KJ(e,t,n){var r=WJ(e),i=r.length;if(WJ(t).length!==i)return!1;for(;i-- >0;)if(!r0(e,t,n,r[i]))return!1;return!0}function XJ(e,t,n){var r,i,o,a=$J(e),s=a.length;if($J(t).length!==s)return!1;for(;s-- >0;){if(!r0(e,t,n,r=a[s]))return!1;if(i=HJ(e,r),o=HJ(t,r),(i||o)&&(!i||!o||i.configurable!==o.configurable||i.enumerable!==o.enumerable||i.writable!==o.writable))return!1}return!0}function QJ(e,t){return zJ(e.valueOf(),t.valueOf())}function JJ(e,t){return e.source===t.source&&e.flags===t.flags}function e0(e,t,n){var r=e.size;if(r!==t.size)return!1;if(!r)return!0;for(var i,o,a=new Array(r),s=e.values();(i=s.next())&&!i.done;){for(var l=t.values(),c=!1,d=0;(o=l.next())&&!o.done;){if(!a[d]&&n.equals(i.value,o.value,i.value,o.value,e,t,n)){c=a[d]=!0;break}d++}if(!c)return!1}return!0}function t0(e,t){var n=e.length;if(t.length!==n)return!1;for(;n-- >0;)if(e[n]!==t[n])return!1;return!0}function n0(e,t){return e.hostname===t.hostname&&e.pathname===t.pathname&&e.protocol===t.protocol&&e.port===t.port&&e.hash===t.hash&&e.username===t.username&&e.password===t.password}function r0(e,t,n,r){return!("_owner"!==r&&"__o"!==r&&"__v"!==r||!e.$$typeof&&!t.$$typeof)||BJ(t,r)&&n.equals(e[r],t[r],r,r,e,t,n)}var i0=Array.isArray,o0="function"===typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer.isView:null,a0=Object.assign,s0=Object.prototype.toString.call.bind(Object.prototype.toString);function l0(e){var t=e.areArraysEqual,n=e.areDatesEqual,r=e.areErrorsEqual,i=e.areFunctionsEqual,o=e.areMapsEqual,a=e.areNumbersEqual,s=e.areObjectsEqual,l=e.arePrimitiveWrappersEqual,c=e.areRegExpsEqual,d=e.areSetsEqual,u=e.areTypedArraysEqual,p=e.areUrlsEqual,h=e.unknownTagComparators;return function(e,m,f){if(e===m)return!0;if(null==e||null==m)return!1;var g=typeof e;if(g!==typeof m)return!1;if("object"!==g)return"number"===g?a(e,m,f):"function"===g&&i(e,m,f);var v=e.constructor;if(v!==m.constructor)return!1;if(v===Object)return s(e,m,f);if(i0(e))return t(e,m,f);if(null!=o0&&o0(e))return u(e,m,f);if(v===Date)return n(e,m,f);if(v===RegExp)return c(e,m,f);if(v===Map)return o(e,m,f);if(v===Set)return d(e,m,f);var x=s0(e);if("[object Date]"===x)return n(e,m,f);if("[object RegExp]"===x)return c(e,m,f);if("[object Map]"===x)return o(e,m,f);if("[object Set]"===x)return d(e,m,f);if("[object Object]"===x)return"function"!==typeof e.then&&"function"!==typeof m.then&&s(e,m,f);if("[object URL]"===x)return p(e,m,f);if("[object Error]"===x)return r(e,m,f);if("[object Arguments]"===x)return s(e,m,f);if("[object Boolean]"===x||"[object Number]"===x||"[object String]"===x)return l(e,m,f);if(h){var y=h[x];if(!y){var b=function(e){return null!=e?e[Symbol.toStringTag]:void 0}(e);b&&(y=h[b])}if(y)return y(e,m,f)}return!1}}var c0=d0();d0({strict:!0}),d0({circular:!0}),d0({circular:!0,strict:!0}),d0({createInternalComparator:function(){return zJ}}),d0({strict:!0,createInternalComparator:function(){return zJ}}),d0({circular:!0,createInternalComparator:function(){return zJ}}),d0({circular:!0,createInternalComparator:function(){return zJ},strict:!0});function d0(e){void 0===e&&(e={});var t,n=e.circular,r=void 0!==n&&n,i=e.createInternalComparator,o=e.createState,a=e.strict,s=void 0!==a&&a,l=function(e){var t=e.circular,n=e.createCustomConfig,r=e.strict,i={areArraysEqual:r?XJ:UJ,areDatesEqual:VJ,areErrorsEqual:GJ,areFunctionsEqual:qJ,areMapsEqual:r?IJ(YJ,XJ):YJ,areNumbersEqual:ZJ,areObjectsEqual:r?XJ:KJ,arePrimitiveWrappersEqual:QJ,areRegExpsEqual:JJ,areSetsEqual:r?IJ(e0,XJ):e0,areTypedArraysEqual:r?XJ:t0,areUrlsEqual:n0,unknownTagComparators:void 0};if(n&&(i=a0({},i,n(i))),t){var o=FJ(i.areArraysEqual),a=FJ(i.areMapsEqual),s=FJ(i.areObjectsEqual),l=FJ(i.areSetsEqual);i=a0({},i,{areArraysEqual:o,areMapsEqual:a,areObjectsEqual:s,areSetsEqual:l})}return i}(e),c=l0(l),d=i?i(c):(t=c,function(e,n,r,i,o,a,s){return t(e,n,s)});return function(e){var t=e.circular,n=e.comparator,r=e.createState,i=e.equals,o=e.strict;if(r)return function(e,a){var s=r(),l=s.cache,c=void 0===l?t?new WeakMap:void 0:l,d=s.meta;return n(e,a,{cache:c,equals:i,meta:d,strict:o})};if(t)return function(e,t){return n(e,t,{cache:new WeakMap,equals:i,meta:void 0,strict:o})};var a={cache:void 0,equals:i,meta:void 0,strict:o};return function(e,t){return n(e,t,a)}}({circular:r,comparator:c,createState:o,equals:d,strict:s})}function u0(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=-1;requestAnimationFrame(function r(i){n<0&&(n=i),i-n>t?(e(i),n=-1):function(e){"undefined"!==typeof requestAnimationFrame&&requestAnimationFrame(e)}(r)})}function p0(e){return p0="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},p0(e)}function h0(e){return function(e){if(Array.isArray(e))return 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)return;if("string"===typeof e)return m0(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return m0(e,t)}(e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function m0(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function f0(){var e=function(){return null},t=!1,n=function n(r){if(!t){if(Array.isArray(r)){if(!r.length)return;var i=h0(r),o=i[0],a=i.slice(1);return"number"===typeof o?void u0(n.bind(null,a),o):(n(o),void u0(n.bind(null,a)))}"object"===p0(r)&&e(r),"function"===typeof r&&r()}};return{stop:function(){t=!0},start:function(e){t=!1,n(e)},subscribe:function(t){return e=t,function(){e=function(){return null}}}}}function g0(e){return g0="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},g0(e)}function v0(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function x0(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?v0(Object(n),!0).forEach(function(t){y0(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):v0(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function y0(e,t,n){return t=function(e){var t=function(e,t){if("object"!==g0(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!==g0(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"===g0(t)?t:String(t)}(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var b0=function(e){return e},j0=function(e,t){return Object.keys(t).reduce(function(n,r){return x0(x0({},n),{},y0({},r,e(r,t[r])))},{})},_0=function(e,t,n){return e.map(function(e){return"".concat((r=e,r.replace(/([A-Z])/g,function(e){return"-".concat(e.toLowerCase())}))," ").concat(t,"ms ").concat(n);var r}).join(",")};function C0(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,i,o,a,s=[],l=!0,c=!1;try{if(o=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;l=!1}else for(;!(l=(r=o.call(n)).done)&&(s.push(r.value),s.length!==t);l=!0);}catch(e){c=!0,i=e}finally{try{if(!l&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(c)throw i}}return s}}(e,t)||S0(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function w0(e){return function(e){if(Array.isArray(e))return A0(e)}(e)||function(e){if("undefined"!==typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||S0(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.")}()}function S0(e,t){if(e){if("string"===typeof e)return A0(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)?A0(e,t):void 0}}function A0(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var k0=1e-4,T0=function(e,t){return[0,3*e,3*t-6*e,3*e-3*t+1]},E0=function(e,t){return e.map(function(e,n){return e*Math.pow(t,n)}).reduce(function(e,t){return e+t})},M0=function(e,t){return function(n){var r=T0(e,t);return E0(r,n)}},O0=function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];var r=t[0],i=t[1],o=t[2],a=t[3];if(1===t.length)switch(t[0]){case"linear":r=0,i=0,o=1,a=1;break;case"ease":r=.25,i=.1,o=.25,a=1;break;case"ease-in":r=.42,i=0,o=1,a=1;break;case"ease-out":r=.42,i=0,o=.58,a=1;break;case"ease-in-out":r=0,i=0,o=.58,a=1;break;default:var s=t[0].split("(");if("cubic-bezier"===s[0]&&4===s[1].split(")")[0].split(",").length){var l=C0(s[1].split(")")[0].split(",").map(function(e){return parseFloat(e)}),4);r=l[0],i=l[1],o=l[2],a=l[3]}}[r,o,i,a].every(function(e){return"number"===typeof e&&e>=0&&e<=1});var c,d,u=M0(r,o),p=M0(i,a),h=(c=r,d=o,function(e){var t=T0(c,d),n=[].concat(w0(t.map(function(e,t){return e*t}).slice(1)),[0]);return E0(n,e)}),m=function(e){return e>1?1:e<0?0:e},f=function(e){for(var t=e>1?1:e,n=t,r=0;r<8;++r){var i=u(n)-t,o=h(n);if(Math.abs(i-t)<k0||o<k0)return p(n);n=m(n-i/o)}return p(n)};return f.isStepper=!1,f},R0=function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];var r=t[0];if("string"===typeof r)switch(r){case"ease":case"ease-in-out":case"ease-out":case"ease-in":case"linear":return O0(r);case"spring":return function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.stiff,n=void 0===t?100:t,r=e.damping,i=void 0===r?8:r,o=e.dt,a=void 0===o?17:o,s=function(e,t,r){var o=r+(-(e-t)*n-r*i)*a/1e3,s=r*a/1e3+e;return Math.abs(s-t)<k0&&Math.abs(o)<k0?[t,0]:[s,o]};return s.isStepper=!0,s.dt=a,s}();default:if("cubic-bezier"===r.split("(")[0])return O0(r)}return"function"===typeof r?r:null};function P0(e){return P0="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},P0(e)}function D0(e){return function(e){if(Array.isArray(e))return B0(e)}(e)||function(e){if("undefined"!==typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||$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.")}()}function N0(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function L0(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?N0(Object(n),!0).forEach(function(t){I0(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):N0(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function I0(e,t,n){return t=function(e){var t=function(e,t){if("object"!==P0(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!==P0(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"===P0(t)?t:String(t)}(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function F0(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,i,o,a,s=[],l=!0,c=!1;try{if(o=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;l=!1}else for(;!(l=(r=o.call(n)).done)&&(s.push(r.value),s.length!==t);l=!0);}catch(e){c=!0,i=e}finally{try{if(!l&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(c)throw i}}return s}}(e,t)||$0(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function $0(e,t){if(e){if("string"===typeof e)return B0(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)?B0(e,t):void 0}}function B0(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var z0=function(e,t,n){return e+(t-e)*n},H0=function(e){return e.from!==e.to},W0=function e(t,n,r){var i=j0(function(e,n){if(H0(n)){var r=F0(t(n.from,n.to,n.velocity),2),i=r[0],o=r[1];return L0(L0({},n),{},{from:i,velocity:o})}return n},n);return r<1?j0(function(e,t){return H0(t)?L0(L0({},t),{},{velocity:z0(t.velocity,i[e].velocity,r),from:z0(t.from,i[e].from,r)}):t},n):e(t,i,r-1)};const U0=function(e,t,n,r,i){var o,a,s,l,c=(o=e,a=t,[Object.keys(o),Object.keys(a)].reduce(function(e,t){return e.filter(function(e){return t.includes(e)})})),d=c.reduce(function(n,r){return L0(L0({},n),{},I0({},r,[e[r],t[r]]))},{}),u=c.reduce(function(n,r){return L0(L0({},n),{},I0({},r,{from:e[r],velocity:0,to:t[r]}))},{}),p=-1,h=function(){return null};return h=n.isStepper?function(r){s||(s=r);var o=(r-s)/n.dt;u=W0(n,u,o),i(L0(L0(L0({},e),t),j0(function(e,t){return t.from},u))),s=r,Object.values(u).filter(H0).length&&(p=requestAnimationFrame(h))}:function(o){l||(l=o);var a=(o-l)/r,s=j0(function(e,t){return z0.apply(void 0,D0(t).concat([n(a)]))},d);if(i(L0(L0(L0({},e),t),s)),a<1)p=requestAnimationFrame(h);else{var c=j0(function(e,t){return z0.apply(void 0,D0(t).concat([n(1)]))},d);i(L0(L0(L0({},e),t),c))}},function(){return requestAnimationFrame(h),function(){cancelAnimationFrame(p)}}};function V0(e){return V0="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},V0(e)}var G0=["children","begin","duration","attributeName","easing","isActive","steps","from","to","canBegin","onAnimationEnd","shouldReAnimate","onAnimationReStart"];function q0(e,t){if(null==e)return{};var n,r,i=function(e,t){if(null==e)return{};var n,r,i={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(i[n]=e[n]);return i}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function Y0(e){return function(e){if(Array.isArray(e))return Z0(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)return;if("string"===typeof e)return Z0(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Z0(e,t)}(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.")}()}function Z0(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function K0(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function X0(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?K0(Object(n),!0).forEach(function(t){Q0(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):K0(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function Q0(e,t,n){return(t=e1(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function J0(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,e1(r.key),r)}}function e1(e){var t=function(e,t){if("object"!==V0(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!==V0(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"===V0(t)?t:String(t)}function t1(e,t){return t1=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},t1(e,t)}function n1(e){var t=function(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(Ca){return!1}}();return function(){var n,r=o1(e);if(t){var i=o1(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return r1(this,n)}}function r1(e,t){if(t&&("object"===V0(t)||"function"===typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return i1(e)}function i1(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function o1(e){return o1=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},o1(e)}var a1=function(e){!function(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&t1(e,t)}(o,e);var t,n,r,i=n1(o);function o(e,t){var n;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o);var r=(n=i.call(this,e,t)).props,a=r.isActive,s=r.attributeName,l=r.from,c=r.to,d=r.steps,u=r.children,p=r.duration;if(n.handleStyleChange=n.handleStyleChange.bind(i1(n)),n.changeStyle=n.changeStyle.bind(i1(n)),!a||p<=0)return n.state={style:{}},"function"===typeof u&&(n.state={style:c}),r1(n);if(d&&d.length)n.state={style:d[0].style};else if(l){if("function"===typeof u)return n.state={style:l},r1(n);n.state={style:s?Q0({},s,l):l}}else n.state={style:{}};return n}return t=o,n=[{key:"componentDidMount",value:function(){var e=this.props,t=e.isActive,n=e.canBegin;this.mounted=!0,t&&n&&this.runAnimation(this.props)}},{key:"componentDidUpdate",value:function(e){var t=this.props,n=t.isActive,r=t.canBegin,i=t.attributeName,o=t.shouldReAnimate,a=t.to,s=t.from,l=this.state.style;if(r)if(n){if(!(c0(e.to,a)&&e.canBegin&&e.isActive)){var c=!e.canBegin||!e.isActive;this.manager&&this.manager.stop(),this.stopJSAnimation&&this.stopJSAnimation();var d=c||o?s:e.to;if(this.state&&l){var u={style:i?Q0({},i,d):d};(i&&l[i]!==d||!i&&l!==d)&&this.setState(u)}this.runAnimation(X0(X0({},this.props),{},{from:d,begin:0}))}}else{var p={style:i?Q0({},i,a):a};this.state&&l&&(i&&l[i]!==a||!i&&l!==a)&&this.setState(p)}}},{key:"componentWillUnmount",value:function(){this.mounted=!1;var e=this.props.onAnimationEnd;this.unSubscribe&&this.unSubscribe(),this.manager&&(this.manager.stop(),this.manager=null),this.stopJSAnimation&&this.stopJSAnimation(),e&&e()}},{key:"handleStyleChange",value:function(e){this.changeStyle(e)}},{key:"changeStyle",value:function(e){this.mounted&&this.setState({style:e})}},{key:"runJSAnimation",value:function(e){var t=this,n=e.from,r=e.to,i=e.duration,o=e.easing,a=e.begin,s=e.onAnimationEnd,l=e.onAnimationStart,c=U0(n,r,R0(o),i,this.changeStyle);this.manager.start([l,a,function(){t.stopJSAnimation=c()},i,s])}},{key:"runStepAnimation",value:function(e){var t=this,n=e.steps,r=e.begin,i=e.onAnimationStart,o=n[0],a=o.style,s=o.duration,l=void 0===s?0:s;return this.manager.start([i].concat(Y0(n.reduce(function(e,r,i){if(0===i)return e;var o=r.duration,a=r.easing,s=void 0===a?"ease":a,l=r.style,c=r.properties,d=r.onAnimationEnd,u=i>0?n[i-1]:r,p=c||Object.keys(l);if("function"===typeof s||"spring"===s)return[].concat(Y0(e),[t.runJSAnimation.bind(t,{from:u.style,to:l,duration:o,easing:s}),o]);var h=_0(p,o,s),m=X0(X0(X0({},u.style),l),{},{transition:h});return[].concat(Y0(e),[m,o,d]).filter(b0)},[a,Math.max(l,r)])),[e.onAnimationEnd]))}},{key:"runAnimation",value:function(e){this.manager||(this.manager=f0());var t=e.begin,n=e.duration,r=e.attributeName,i=e.to,o=e.easing,a=e.onAnimationStart,s=e.onAnimationEnd,l=e.steps,c=e.children,d=this.manager;if(this.unSubscribe=d.subscribe(this.handleStyleChange),"function"!==typeof o&&"function"!==typeof c&&"spring"!==o)if(l.length>1)this.runStepAnimation(e);else{var u=r?Q0({},r,i):i,p=_0(Object.keys(u),n,o);d.start([a,t,X0(X0({},u),{},{transition:p}),n,s])}else this.runJSAnimation(e)}},{key:"render",value:function(){var e=this.props,t=e.children,n=(e.begin,e.duration),r=(e.attributeName,e.easing,e.isActive),i=(e.steps,e.from,e.to,e.canBegin,e.onAnimationEnd,e.shouldReAnimate,e.onAnimationReStart,q0(e,G0)),o=We.Children.count(t),a=this.state.style;if("function"===typeof t)return t(a);if(!r||0===o||n<=0)return t;var s=function(e){var t=e.props,n=t.style,r=void 0===n?{}:n,o=t.className;return(0,We.cloneElement)(e,X0(X0({},i),{},{style:X0(X0({},r),a),className:o}))};return 1===o?s(We.Children.only(t)):We.createElement("div",null,We.Children.map(t,function(e){return s(e)}))}}],n&&J0(t.prototype,n),r&&J0(t,r),Object.defineProperty(t,"prototype",{writable:!1}),o}(We.PureComponent);a1.displayName="Animate",a1.defaultProps={begin:0,duration:1e3,from:"",to:"",attributeName:"",easing:"ease",isActive:!0,canBegin:!0,steps:[],onAnimationEnd:function(){},onAnimationStart:function(){}},a1.propTypes={from:Uu().oneOfType([Uu().object,Uu().string]),to:Uu().oneOfType([Uu().object,Uu().string]),attributeName:Uu().string,duration:Uu().number,begin:Uu().number,easing:Uu().oneOfType([Uu().string,Uu().func]),steps:Uu().arrayOf(Uu().shape({duration:Uu().number.isRequired,style:Uu().object.isRequired,easing:Uu().oneOfType([Uu().oneOf(["ease","ease-in","ease-out","ease-in-out","linear"]),Uu().func]),properties:Uu().arrayOf("string"),onAnimationEnd:Uu().func})),children:Uu().oneOfType([Uu().node,Uu().func]),isActive:Uu().bool,canBegin:Uu().bool,onAnimationEnd:Uu().func,shouldReAnimate:Uu().bool,onAnimationStart:Uu().func,onAnimationReStart:Uu().func};const s1=a1;var l1=n(79686),c1=n.n(l1),d1=n(90620),u1=n.n(d1),p1=n(11629),h1=n.n(p1),m1=n(46686),f1=n.n(m1),g1=n(69062),v1=n(35268),x1=n.n(v1),y1=n(79160),b1=n.n(y1),j1=function(e){return 0===e?0:e>0?1:-1},_1=function(e){return u1()(e)&&e.indexOf("%")===e.length-1},C1=function(e){return b1()(e)&&!x1()(e)},w1=function(e){return C1(e)||u1()(e)},S1=0,A1=function(e){var t=++S1;return"".concat(e||"").concat(t)},k1=function(e,t){var n,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,i=arguments.length>3&&void 0!==arguments[3]&&arguments[3];if(!C1(e)&&!u1()(e))return r;if(_1(e)){var o=e.indexOf("%");n=t*parseFloat(e.slice(0,o))/100}else n=+e;return x1()(n)&&(n=r),i&&n>t&&(n=t),n},T1=function(e){if(!e)return null;var t=Object.keys(e);return t&&t.length?e[t[0]]:null},E1=function(e,t){return C1(e)&&C1(t)?function(n){return e+n*(t-e)}:function(){return t}};function M1(e,t,n){return e&&e.length?e.find(function(e){return e&&("function"===typeof t?t(e):oa()(e,t))===n}):null}var O1=function(e,t){return C1(e)&&C1(t)?e-t:u1()(e)&&u1()(t)?e.localeCompare(t):e instanceof Date&&t instanceof Date?e.getTime()-t.getTime():String(e).localeCompare(String(t))};function R1(e,t){for(var n in e)if({}.hasOwnProperty.call(e,n)&&(!{}.hasOwnProperty.call(t,n)||e[n]!==t[n]))return!1;for(var r in t)if({}.hasOwnProperty.call(t,r)&&!{}.hasOwnProperty.call(e,r))return!1;return!0}function P1(e){return P1="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},P1(e)}var D1=["aria-activedescendant","aria-atomic","aria-autocomplete","aria-busy","aria-checked","aria-colcount","aria-colindex","aria-colspan","aria-controls","aria-current","aria-describedby","aria-details","aria-disabled","aria-errormessage","aria-expanded","aria-flowto","aria-haspopup","aria-hidden","aria-invalid","aria-keyshortcuts","aria-label","aria-labelledby","aria-level","aria-live","aria-modal","aria-multiline","aria-multiselectable","aria-orientation","aria-owns","aria-placeholder","aria-posinset","aria-pressed","aria-readonly","aria-relevant","aria-required","aria-roledescription","aria-rowcount","aria-rowindex","aria-rowspan","aria-selected","aria-setsize","aria-sort","aria-valuemax","aria-valuemin","aria-valuenow","aria-valuetext","className","color","height","id","lang","max","media","method","min","name","style","target","width","role","tabIndex","accentHeight","accumulate","additive","alignmentBaseline","allowReorder","alphabetic","amplitude","arabicForm","ascent","attributeName","attributeType","autoReverse","azimuth","baseFrequency","baselineShift","baseProfile","bbox","begin","bias","by","calcMode","capHeight","clip","clipPath","clipPathUnits","clipRule","colorInterpolation","colorInterpolationFilters","colorProfile","colorRendering","contentScriptType","contentStyleType","cursor","cx","cy","d","decelerate","descent","diffuseConstant","direction","display","divisor","dominantBaseline","dur","dx","dy","edgeMode","elevation","enableBackground","end","exponent","externalResourcesRequired","fill","fillOpacity","fillRule","filter","filterRes","filterUnits","floodColor","floodOpacity","focusable","fontFamily","fontSize","fontSizeAdjust","fontStretch","fontStyle","fontVariant","fontWeight","format","from","fx","fy","g1","g2","glyphName","glyphOrientationHorizontal","glyphOrientationVertical","glyphRef","gradientTransform","gradientUnits","hanging","horizAdvX","horizOriginX","href","ideographic","imageRendering","in2","in","intercept","k1","k2","k3","k4","k","kernelMatrix","kernelUnitLength","kerning","keyPoints","keySplines","keyTimes","lengthAdjust","letterSpacing","lightingColor","limitingConeAngle","local","markerEnd","markerHeight","markerMid","markerStart","markerUnits","markerWidth","mask","maskContentUnits","maskUnits","mathematical","mode","numOctaves","offset","opacity","operator","order","orient","orientation","origin","overflow","overlinePosition","overlineThickness","paintOrder","panose1","pathLength","patternContentUnits","patternTransform","patternUnits","pointerEvents","pointsAtX","pointsAtY","pointsAtZ","preserveAlpha","preserveAspectRatio","primitiveUnits","r","radius","refX","refY","renderingIntent","repeatCount","repeatDur","requiredExtensions","requiredFeatures","restart","result","rotate","rx","ry","seed","shapeRendering","slope","spacing","specularConstant","specularExponent","speed","spreadMethod","startOffset","stdDeviation","stemh","stemv","stitchTiles","stopColor","stopOpacity","strikethroughPosition","strikethroughThickness","string","stroke","strokeDasharray","strokeDashoffset","strokeLinecap","strokeLinejoin","strokeMiterlimit","strokeOpacity","strokeWidth","surfaceScale","systemLanguage","tableValues","targetX","targetY","textAnchor","textDecoration","textLength","textRendering","to","transform","u1","u2","underlinePosition","underlineThickness","unicode","unicodeBidi","unicodeRange","unitsPerEm","vAlphabetic","values","vectorEffect","version","vertAdvY","vertOriginX","vertOriginY","vHanging","vIdeographic","viewTarget","visibility","vMathematical","widths","wordSpacing","writingMode","x1","x2","x","xChannelSelector","xHeight","xlinkActuate","xlinkArcrole","xlinkHref","xlinkRole","xlinkShow","xlinkTitle","xlinkType","xmlBase","xmlLang","xmlns","xmlnsXlink","xmlSpace","y1","y2","y","yChannelSelector","z","zoomAndPan","ref","key","angle"],N1=["points","pathLength"],L1={svg:["viewBox","children"],polygon:N1,polyline:N1},I1=["dangerouslySetInnerHTML","onCopy","onCopyCapture","onCut","onCutCapture","onPaste","onPasteCapture","onCompositionEnd","onCompositionEndCapture","onCompositionStart","onCompositionStartCapture","onCompositionUpdate","onCompositionUpdateCapture","onFocus","onFocusCapture","onBlur","onBlurCapture","onChange","onChangeCapture","onBeforeInput","onBeforeInputCapture","onInput","onInputCapture","onReset","onResetCapture","onSubmit","onSubmitCapture","onInvalid","onInvalidCapture","onLoad","onLoadCapture","onError","onErrorCapture","onKeyDown","onKeyDownCapture","onKeyPress","onKeyPressCapture","onKeyUp","onKeyUpCapture","onAbort","onAbortCapture","onCanPlay","onCanPlayCapture","onCanPlayThrough","onCanPlayThroughCapture","onDurationChange","onDurationChangeCapture","onEmptied","onEmptiedCapture","onEncrypted","onEncryptedCapture","onEnded","onEndedCapture","onLoadedData","onLoadedDataCapture","onLoadedMetadata","onLoadedMetadataCapture","onLoadStart","onLoadStartCapture","onPause","onPauseCapture","onPlay","onPlayCapture","onPlaying","onPlayingCapture","onProgress","onProgressCapture","onRateChange","onRateChangeCapture","onSeeked","onSeekedCapture","onSeeking","onSeekingCapture","onStalled","onStalledCapture","onSuspend","onSuspendCapture","onTimeUpdate","onTimeUpdateCapture","onVolumeChange","onVolumeChangeCapture","onWaiting","onWaitingCapture","onAuxClick","onAuxClickCapture","onClick","onClickCapture","onContextMenu","onContextMenuCapture","onDoubleClick","onDoubleClickCapture","onDrag","onDragCapture","onDragEnd","onDragEndCapture","onDragEnter","onDragEnterCapture","onDragExit","onDragExitCapture","onDragLeave","onDragLeaveCapture","onDragOver","onDragOverCapture","onDragStart","onDragStartCapture","onDrop","onDropCapture","onMouseDown","onMouseDownCapture","onMouseEnter","onMouseLeave","onMouseMove","onMouseMoveCapture","onMouseOut","onMouseOutCapture","onMouseOver","onMouseOverCapture","onMouseUp","onMouseUpCapture","onSelect","onSelectCapture","onTouchCancel","onTouchCancelCapture","onTouchEnd","onTouchEndCapture","onTouchMove","onTouchMoveCapture","onTouchStart","onTouchStartCapture","onPointerDown","onPointerDownCapture","onPointerMove","onPointerMoveCapture","onPointerUp","onPointerUpCapture","onPointerCancel","onPointerCancelCapture","onPointerEnter","onPointerEnterCapture","onPointerLeave","onPointerLeaveCapture","onPointerOver","onPointerOverCapture","onPointerOut","onPointerOutCapture","onGotPointerCapture","onGotPointerCaptureCapture","onLostPointerCapture","onLostPointerCaptureCapture","onScroll","onScrollCapture","onWheel","onWheelCapture","onAnimationStart","onAnimationStartCapture","onAnimationEnd","onAnimationEndCapture","onAnimationIteration","onAnimationIterationCapture","onTransitionEnd","onTransitionEndCapture"],F1=function(e,t){if(!e||"function"===typeof e||"boolean"===typeof e)return null;var n=e;if((0,We.isValidElement)(e)&&(n=e.props),!f1()(n))return null;var r={};return Object.keys(n).forEach(function(e){I1.includes(e)&&(r[e]=t||function(t){return n[e](n,t)})}),r},$1=function(e,t,n){if(!f1()(e)||"object"!==P1(e))return null;var r=null;return Object.keys(e).forEach(function(i){var o=e[i];I1.includes(i)&&"function"===typeof o&&(r||(r={}),r[i]=function(e,t,n){return function(r){return e(t,n,r),null}}(o,t,n))}),r},B1=["children"],z1=["children"];function H1(e,t){if(null==e)return{};var n,r,i=function(e,t){if(null==e)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function W1(e){return W1="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},W1(e)}var U1={click:"onClick",mousedown:"onMouseDown",mouseup:"onMouseUp",mouseover:"onMouseOver",mousemove:"onMouseMove",mouseout:"onMouseOut",mouseenter:"onMouseEnter",mouseleave:"onMouseLeave",touchcancel:"onTouchCancel",touchend:"onTouchEnd",touchmove:"onTouchMove",touchstart:"onTouchStart",contextmenu:"onContextMenu",dblclick:"onDoubleClick"},V1=function(e){return"string"===typeof e?e:e?e.displayName||e.name||"Component":""},G1=null,q1=null,Y1=function e(t){if(t===G1&&Array.isArray(q1))return q1;var n=[];return We.Children.forEach(t,function(t){c1()(t)||((0,g1.isFragment)(t)?n=n.concat(e(t.props.children)):n.push(t))}),q1=n,G1=t,n};function Z1(e,t){var n=[],r=[];return r=Array.isArray(t)?t.map(function(e){return V1(e)}):[V1(t)],Y1(e).forEach(function(e){var t=oa()(e,"type.displayName")||oa()(e,"type.name");-1!==r.indexOf(t)&&n.push(e)}),n}function K1(e,t){var n=Z1(e,t);return n&&n[0]}var X1=function(e){if(!e||!e.props)return!1;var t=e.props,n=t.width,r=t.height;return!(!C1(n)||n<=0||!C1(r)||r<=0)},Q1=["a","altGlyph","altGlyphDef","altGlyphItem","animate","animateColor","animateMotion","animateTransform","circle","clipPath","color-profile","cursor","defs","desc","ellipse","feBlend","feColormatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence","filter","font","font-face","font-face-format","font-face-name","font-face-url","foreignObject","g","glyph","glyphRef","hkern","image","line","lineGradient","marker","mask","metadata","missing-glyph","mpath","path","pattern","polygon","polyline","radialGradient","rect","script","set","stop","style","svg","switch","symbol","text","textPath","title","tref","tspan","use","view","vkern"],J1=function(e){return e&&e.type&&u1()(e.type)&&Q1.indexOf(e.type)>=0},e2=function(e,t,n){if(!e||"function"===typeof e||"boolean"===typeof e)return null;var r=e;if((0,We.isValidElement)(e)&&(r=e.props),!f1()(r))return null;var i={};return Object.keys(r).forEach(function(e){var o;(function(e,t,n,r){var i,o=null!==(i=null===L1||void 0===L1?void 0:L1[r])&&void 0!==i?i:[];return t.startsWith("data-")||!h1()(e)&&(r&&o.includes(t)||D1.includes(t))||n&&I1.includes(t)})(null===(o=r)||void 0===o?void 0:o[e],e,t,n)&&(i[e]=r[e])}),i},t2=function e(t,n){if(t===n)return!0;var r=We.Children.count(t);if(r!==We.Children.count(n))return!1;if(0===r)return!0;if(1===r)return n2(Array.isArray(t)?t[0]:t,Array.isArray(n)?n[0]:n);for(var i=0;i<r;i++){var o=t[i],a=n[i];if(Array.isArray(o)||Array.isArray(a)){if(!e(o,a))return!1}else if(!n2(o,a))return!1}return!0},n2=function(e,t){if(c1()(e)&&c1()(t))return!0;if(!c1()(e)&&!c1()(t)){var n=e.props||{},r=n.children,i=H1(n,B1),o=t.props||{},a=o.children,s=H1(o,z1);return r&&a?R1(i,s)&&t2(r,a):!r&&!a&&R1(i,s)}return!1},r2=function(e,t){var n=[],r={};return Y1(e).forEach(function(e,i){if(J1(e))n.push(e);else if(e){var o=V1(e.type),a=t[o]||{},s=a.handler,l=a.once;if(s&&(!l||!r[o])){var c=s(e,o,i);n.push(c),r[o]=!0}}}),n};function i2(e){return i2="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},i2(e)}function o2(){return o2=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},o2.apply(this,arguments)}function a2(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,i,o,a,s=[],l=!0,c=!1;try{if(o=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;l=!1}else for(;!(l=(r=o.call(n)).done)&&(s.push(r.value),s.length!==t);l=!0);}catch(e){c=!0,i=e}finally{try{if(!l&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(c)throw i}}return s}}(e,t)||function(e,t){if(!e)return;if("string"===typeof e)return s2(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return s2(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function s2(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function l2(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function c2(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?l2(Object(n),!0).forEach(function(t){d2(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):l2(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function d2(e,t,n){return t=function(e){var t=function(e,t){if("object"!=i2(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=i2(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==i2(t)?t:t+""}(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var u2=function(e,t,n,r,i){var o,a=Math.min(Math.abs(n)/2,Math.abs(r)/2),s=r>=0?1:-1,l=n>=0?1:-1,c=r>=0&&n>=0||r<0&&n<0?1:0;if(a>0&&i instanceof Array){for(var d=[0,0,0,0],u=0;u<4;u++)d[u]=i[u]>a?a:i[u];o="M".concat(e,",").concat(t+s*d[0]),d[0]>0&&(o+="A ".concat(d[0],",").concat(d[0],",0,0,").concat(c,",").concat(e+l*d[0],",").concat(t)),o+="L ".concat(e+n-l*d[1],",").concat(t),d[1]>0&&(o+="A ".concat(d[1],",").concat(d[1],",0,0,").concat(c,",\n        ").concat(e+n,",").concat(t+s*d[1])),o+="L ".concat(e+n,",").concat(t+r-s*d[2]),d[2]>0&&(o+="A ".concat(d[2],",").concat(d[2],",0,0,").concat(c,",\n        ").concat(e+n-l*d[2],",").concat(t+r)),o+="L ".concat(e+l*d[3],",").concat(t+r),d[3]>0&&(o+="A ".concat(d[3],",").concat(d[3],",0,0,").concat(c,",\n        ").concat(e,",").concat(t+r-s*d[3])),o+="Z"}else if(a>0&&i===+i&&i>0){var p=Math.min(a,i);o="M ".concat(e,",").concat(t+s*p,"\n            A ").concat(p,",").concat(p,",0,0,").concat(c,",").concat(e+l*p,",").concat(t,"\n            L ").concat(e+n-l*p,",").concat(t,"\n            A ").concat(p,",").concat(p,",0,0,").concat(c,",").concat(e+n,",").concat(t+s*p,"\n            L ").concat(e+n,",").concat(t+r-s*p,"\n            A ").concat(p,",").concat(p,",0,0,").concat(c,",").concat(e+n-l*p,",").concat(t+r,"\n            L ").concat(e+l*p,",").concat(t+r,"\n            A ").concat(p,",").concat(p,",0,0,").concat(c,",").concat(e,",").concat(t+r-s*p," Z")}else o="M ".concat(e,",").concat(t," h ").concat(n," v ").concat(r," h ").concat(-n," Z");return o},p2=function(e,t){if(!e||!t)return!1;var n=e.x,r=e.y,i=t.x,o=t.y,a=t.width,s=t.height;if(Math.abs(a)>0&&Math.abs(s)>0){var l=Math.min(i,i+a),c=Math.max(i,i+a),d=Math.min(o,o+s),u=Math.max(o,o+s);return n>=l&&n<=c&&r>=d&&r<=u}return!1},h2={x:0,y:0,width:0,height:0,radius:0,isAnimationActive:!1,isUpdateAnimationActive:!1,animationBegin:0,animationDuration:1500,animationEasing:"ease"},m2=function(e){var t=c2(c2({},h2),e),n=(0,We.useRef)(),r=a2((0,We.useState)(-1),2),i=r[0],o=r[1];(0,We.useEffect)(function(){if(n.current&&n.current.getTotalLength)try{var e=n.current.getTotalLength();e&&o(e)}catch(t){}},[]);var a=t.x,s=t.y,l=t.width,c=t.height,d=t.radius,u=t.className,p=t.animationEasing,h=t.animationDuration,m=t.animationBegin,f=t.isAnimationActive,g=t.isUpdateAnimationActive;if(a!==+a||s!==+s||l!==+l||c!==+c||0===l||0===c)return null;var v=PJ("recharts-rectangle",u);return g?We.createElement(s1,{canBegin:i>0,from:{width:l,height:c,x:a,y:s},to:{width:l,height:c,x:a,y:s},duration:h,animationEasing:p,isActive:g},function(e){var r=e.width,o=e.height,a=e.x,s=e.y;return We.createElement(s1,{canBegin:i>0,from:"0px ".concat(-1===i?1:i,"px"),to:"".concat(i,"px 0px"),attributeName:"strokeDasharray",begin:m,duration:h,isActive:f,easing:p},We.createElement("path",o2({},e2(t,!0),{className:v,d:u2(a,s,r,o,d),ref:n})))}):We.createElement("path",o2({},e2(t,!0),{className:v,d:u2(a,s,l,c,d)}))},f2=n(79889),g2=n.n(f2),v2=function(e,t){for(var n=arguments.length,r=new Array(n>2?n-2:0),i=2;i<n;i++)r[i-2]=arguments[i]};function x2(e){return x2="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},x2(e)}function y2(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function b2(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?y2(Object(n),!0).forEach(function(t){j2(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):y2(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function j2(e,t,n){return t=function(e){var t=function(e,t){if("object"!=x2(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=x2(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==x2(t)?t:t+""}(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function _2(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,i,o,a,s=[],l=!0,c=!1;try{if(o=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;l=!1}else for(;!(l=(r=o.call(n)).done)&&(s.push(r.value),s.length!==t);l=!0);}catch(e){c=!0,i=e}finally{try{if(!l&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(c)throw i}}return s}}(e,t)||function(e,t){if(!e)return;if("string"===typeof e)return C2(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return C2(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function C2(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var w2=(0,We.forwardRef)(function(e,t){var n=e.aspect,r=e.initialDimension,i=void 0===r?{width:-1,height:-1}:r,o=e.width,a=void 0===o?"100%":o,s=e.height,l=void 0===s?"100%":s,c=e.minWidth,d=void 0===c?0:c,u=e.minHeight,p=e.maxHeight,h=e.children,m=e.debounce,f=void 0===m?0:m,g=e.id,v=e.className,x=e.onResize,y=e.style,b=void 0===y?{}:y,j=(0,We.useRef)(null),_=(0,We.useRef)();_.current=x,(0,We.useImperativeHandle)(t,function(){return Object.defineProperty(j.current,"current",{get:function(){return console.warn("The usage of ref.current.current is deprecated and will no longer be supported."),j.current},configurable:!0})});var C=_2((0,We.useState)({containerWidth:i.width,containerHeight:i.height}),2),w=C[0],S=C[1],A=(0,We.useCallback)(function(e,t){S(function(n){var r=Math.round(e),i=Math.round(t);return n.containerWidth===r&&n.containerHeight===i?n:{containerWidth:r,containerHeight:i}})},[]);(0,We.useEffect)(function(){var e=function(e){var t,n=e[0].contentRect,r=n.width,i=n.height;A(r,i),null===(t=_.current)||void 0===t||t.call(_,r,i)};f>0&&(e=g2()(e,f,{trailing:!0,leading:!1}));var t=new ResizeObserver(e),n=j.current.getBoundingClientRect(),r=n.width,i=n.height;return A(r,i),t.observe(j.current),function(){t.disconnect()}},[A,f]);var k=(0,We.useMemo)(function(){var e=w.containerWidth,t=w.containerHeight;if(e<0||t<0)return null;v2(_1(a)||_1(l),"The width(%s) and height(%s) are both fixed numbers,\n       maybe you don't need to use a ResponsiveContainer.",a,l),v2(!n||n>0,"The aspect(%s) must be greater than zero.",n);var r=_1(a)?e:a,i=_1(l)?t:l;n&&n>0&&(r?i=r/n:i&&(r=i*n),p&&i>p&&(i=p)),v2(r>0||i>0,"The width(%s) and height(%s) of chart should be greater than 0,\n       please check the style of container, or the props width(%s) and height(%s),\n       or add a minWidth(%s) or minHeight(%s) or use aspect(%s) to control the\n       height and width.",r,i,a,l,d,u,n);var o=!Array.isArray(h)&&V1(h.type).endsWith("Chart");return We.Children.map(h,function(e){return We.isValidElement(e)?(0,We.cloneElement)(e,b2({width:r,height:i},o?{style:b2({height:"100%",width:"100%",maxHeight:i,maxWidth:r},e.props.style)}:{})):e})},[n,h,l,p,u,d,w,a]);return We.createElement("div",{id:g?"".concat(g):void 0,className:PJ("recharts-responsive-container",v),style:b2(b2({},b),{},{width:a,height:l,minWidth:d,minHeight:u,maxHeight:p}),ref:j},k)}),S2=n(87424),A2=n.n(S2),k2="Invariant failed";function T2(e,t){if(!e)throw new Error(k2)}var E2=["children","width","height","viewBox","className","style","title","desc"];function M2(){return M2=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},M2.apply(this,arguments)}function O2(e,t){if(null==e)return{};var n,r,i=function(e,t){if(null==e)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function R2(e){var t=e.children,n=e.width,r=e.height,i=e.viewBox,o=e.className,a=e.style,s=e.title,l=e.desc,c=O2(e,E2),d=i||{width:n,height:r,x:0,y:0},u=PJ("recharts-surface",o);return We.createElement("svg",M2({},e2(c,!0,"svg"),{className:u,width:n,height:r,style:a,viewBox:"".concat(d.x," ").concat(d.y," ").concat(d.width," ").concat(d.height)}),We.createElement("title",null,s),We.createElement("desc",null,l),t)}var P2=["children","className"];function D2(){return D2=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},D2.apply(this,arguments)}function N2(e,t){if(null==e)return{};var n,r,i=function(e,t){if(null==e)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}var L2=We.forwardRef(function(e,t){var n=e.children,r=e.className,i=N2(e,P2),o=PJ("recharts-layer",r);return We.createElement("g",D2({className:o},e2(i,!0),{ref:t}),n)});function I2(e){return I2="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},I2(e)}function F2(){return F2=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},F2.apply(this,arguments)}function $2(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,i,o,a,s=[],l=!0,c=!1;try{if(o=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;l=!1}else for(;!(l=(r=o.call(n)).done)&&(s.push(r.value),s.length!==t);l=!0);}catch(e){c=!0,i=e}finally{try{if(!l&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(c)throw i}}return s}}(e,t)||function(e,t){if(!e)return;if("string"===typeof e)return B2(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return B2(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function B2(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function z2(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function H2(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?z2(Object(n),!0).forEach(function(t){W2(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):z2(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function W2(e,t,n){return t=function(e){var t=function(e,t){if("object"!=I2(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=I2(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==I2(t)?t:t+""}(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function U2(e){return Array.isArray(e)&&w1(e[0])&&w1(e[1])?e.join(" ~ "):e}var V2=function(e){var t=e.separator,n=void 0===t?" : ":t,r=e.contentStyle,i=void 0===r?{}:r,o=e.itemStyle,a=void 0===o?{}:o,s=e.labelStyle,l=void 0===s?{}:s,c=e.payload,d=e.formatter,u=e.itemSorter,p=e.wrapperClassName,h=e.labelClassName,m=e.label,f=e.labelFormatter,g=e.accessibilityLayer,v=void 0!==g&&g,x=H2({margin:0,padding:10,backgroundColor:"#fff",border:"1px solid #ccc",whiteSpace:"nowrap"},i),y=H2({margin:0},l),b=!c1()(m),j=b?m:"",_=PJ("recharts-default-tooltip",p),C=PJ("recharts-tooltip-label",h);b&&f&&void 0!==c&&null!==c&&(j=f(m,c));var w=v?{role:"status","aria-live":"assertive"}:{};return We.createElement("div",F2({className:_,style:x},w),We.createElement("p",{className:C,style:y},We.isValidElement(j)?j:"".concat(j)),function(){if(c&&c.length){var e=(u?A2()(c,u):c).map(function(e,t){if("none"===e.type)return null;var r=H2({display:"block",paddingTop:4,paddingBottom:4,color:e.color||"#000"},a),i=e.formatter||d||U2,o=e.value,s=e.name,l=o,u=s;if(i&&null!=l&&null!=u){var p=i(o,s,e,t,c);if(Array.isArray(p)){var h=$2(p,2);l=h[0],u=h[1]}else l=p}return We.createElement("li",{className:"recharts-tooltip-item",key:"tooltip-item-".concat(t),style:r},w1(u)?We.createElement("span",{className:"recharts-tooltip-item-name"},u):null,w1(u)?We.createElement("span",{className:"recharts-tooltip-item-separator"},n):null,We.createElement("span",{className:"recharts-tooltip-item-value"},l),We.createElement("span",{className:"recharts-tooltip-item-unit"},e.unit||""))});return We.createElement("ul",{className:"recharts-tooltip-item-list",style:{padding:0,margin:0}},e)}return null}())};function G2(e){return G2="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},G2(e)}function q2(e,t,n){return t=function(e){var t=function(e,t){if("object"!=G2(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=G2(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==G2(t)?t:t+""}(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var Y2="recharts-tooltip-wrapper",Z2={visibility:"hidden"};function K2(e){var t=e.coordinate,n=e.translateX,r=e.translateY;return PJ(Y2,q2(q2(q2(q2({},"".concat(Y2,"-right"),C1(n)&&t&&C1(t.x)&&n>=t.x),"".concat(Y2,"-left"),C1(n)&&t&&C1(t.x)&&n<t.x),"".concat(Y2,"-bottom"),C1(r)&&t&&C1(t.y)&&r>=t.y),"".concat(Y2,"-top"),C1(r)&&t&&C1(t.y)&&r<t.y))}function X2(e){var t=e.allowEscapeViewBox,n=e.coordinate,r=e.key,i=e.offsetTopLeft,o=e.position,a=e.reverseDirection,s=e.tooltipDimension,l=e.viewBox,c=e.viewBoxDimension;if(o&&C1(o[r]))return o[r];var d=n[r]-s-i,u=n[r]+i;return t[r]?a[r]?d:u:a[r]?d<l[r]?Math.max(u,l[r]):Math.max(d,l[r]):u+s>l[r]+c?Math.max(d,l[r]):Math.max(u,l[r])}function Q2(e){return Q2="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Q2(e)}function J2(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function e6(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?J2(Object(n),!0).forEach(function(t){a6(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):J2(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function t6(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,s6(r.key),r)}}function n6(e,t,n){return t=i6(t),function(e,t){if(t&&("object"===Q2(t)||"function"===typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,r6()?Reflect.construct(t,n||[],i6(e).constructor):t.apply(e,n))}function r6(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(r6=function(){return!!e})()}function i6(e){return i6=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},i6(e)}function o6(e,t){return o6=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},o6(e,t)}function a6(e,t,n){return(t=s6(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function s6(e){var t=function(e,t){if("object"!=Q2(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=Q2(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==Q2(t)?t:t+""}var l6=function(e){function t(){var e;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return a6(e=n6(this,t,[].concat(r)),"state",{dismissed:!1,dismissedAtCoordinate:{x:0,y:0},lastBoundingBox:{width:-1,height:-1}}),a6(e,"handleKeyDown",function(t){var n,r,i,o;"Escape"===t.key&&e.setState({dismissed:!0,dismissedAtCoordinate:{x:null!==(n=null===(r=e.props.coordinate)||void 0===r?void 0:r.x)&&void 0!==n?n:0,y:null!==(i=null===(o=e.props.coordinate)||void 0===o?void 0:o.y)&&void 0!==i?i:0}})}),e}return function(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&o6(e,t)}(t,e),n=t,r=[{key:"updateBBox",value:function(){if(this.wrapperNode&&this.wrapperNode.getBoundingClientRect){var e=this.wrapperNode.getBoundingClientRect();(Math.abs(e.width-this.state.lastBoundingBox.width)>1||Math.abs(e.height-this.state.lastBoundingBox.height)>1)&&this.setState({lastBoundingBox:{width:e.width,height:e.height}})}else-1===this.state.lastBoundingBox.width&&-1===this.state.lastBoundingBox.height||this.setState({lastBoundingBox:{width:-1,height:-1}})}},{key:"componentDidMount",value:function(){document.addEventListener("keydown",this.handleKeyDown),this.updateBBox()}},{key:"componentWillUnmount",value:function(){document.removeEventListener("keydown",this.handleKeyDown)}},{key:"componentDidUpdate",value:function(){var e,t;this.props.active&&this.updateBBox(),this.state.dismissed&&((null===(e=this.props.coordinate)||void 0===e?void 0:e.x)===this.state.dismissedAtCoordinate.x&&(null===(t=this.props.coordinate)||void 0===t?void 0:t.y)===this.state.dismissedAtCoordinate.y||(this.state.dismissed=!1))}},{key:"render",value:function(){var e=this,t=this.props,n=t.active,r=t.allowEscapeViewBox,i=t.animationDuration,o=t.animationEasing,a=t.children,s=t.coordinate,l=t.hasPayload,c=t.isAnimationActive,d=t.offset,u=t.position,p=t.reverseDirection,h=t.useTranslate3d,m=t.viewBox,f=t.wrapperStyle,g=function(e){var t,n,r=e.allowEscapeViewBox,i=e.coordinate,o=e.offsetTopLeft,a=e.position,s=e.reverseDirection,l=e.tooltipBox,c=e.useTranslate3d,d=e.viewBox;return{cssProperties:l.height>0&&l.width>0&&i?function(e){var t=e.translateX,n=e.translateY;return{transform:e.useTranslate3d?"translate3d(".concat(t,"px, ").concat(n,"px, 0)"):"translate(".concat(t,"px, ").concat(n,"px)")}}({translateX:t=X2({allowEscapeViewBox:r,coordinate:i,key:"x",offsetTopLeft:o,position:a,reverseDirection:s,tooltipDimension:l.width,viewBox:d,viewBoxDimension:d.width}),translateY:n=X2({allowEscapeViewBox:r,coordinate:i,key:"y",offsetTopLeft:o,position:a,reverseDirection:s,tooltipDimension:l.height,viewBox:d,viewBoxDimension:d.height}),useTranslate3d:c}):Z2,cssClasses:K2({translateX:t,translateY:n,coordinate:i})}}({allowEscapeViewBox:r,coordinate:s,offsetTopLeft:d,position:u,reverseDirection:p,tooltipBox:this.state.lastBoundingBox,useTranslate3d:h,viewBox:m}),v=g.cssClasses,x=g.cssProperties,y=e6(e6({transition:c&&n?"transform ".concat(i,"ms ").concat(o):void 0},x),{},{pointerEvents:"none",visibility:!this.state.dismissed&&n&&l?"visible":"hidden",position:"absolute",top:0,left:0},f);return We.createElement("div",{tabIndex:-1,className:v,style:y,ref:function(t){e.wrapperNode=t}},a)}}],r&&t6(n.prototype,r),i&&t6(n,i),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r,i}(We.PureComponent),c6={isSsr:!("undefined"!==typeof window&&window.document&&window.document.createElement&&window.setTimeout),get:function(e){return c6[e]},set:function(e,t){if("string"===typeof e)c6[e]=t;else{var n=Object.keys(e);n&&n.length&&n.forEach(function(t){c6[t]=e[t]})}}},d6=n(20977),u6=n.n(d6);function p6(e,t,n){return!0===t?u6()(e,n):h1()(t)?u6()(e,t):e}function h6(e){return h6="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},h6(e)}function m6(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function f6(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?m6(Object(n),!0).forEach(function(t){j6(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):m6(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function g6(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,_6(r.key),r)}}function v6(e,t,n){return t=y6(t),function(e,t){if(t&&("object"===h6(t)||"function"===typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,x6()?Reflect.construct(t,n||[],y6(e).constructor):t.apply(e,n))}function x6(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(x6=function(){return!!e})()}function y6(e){return y6=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},y6(e)}function b6(e,t){return b6=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},b6(e,t)}function j6(e,t,n){return(t=_6(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function _6(e){var t=function(e,t){if("object"!=h6(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=h6(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==h6(t)?t:t+""}function C6(e){return e.dataKey}var w6=function(e){function t(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),v6(this,t,arguments)}return function(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&b6(e,t)}(t,e),n=t,r=[{key:"render",value:function(){var e=this,t=this.props,n=t.active,r=t.allowEscapeViewBox,i=t.animationDuration,o=t.animationEasing,a=t.content,s=t.coordinate,l=t.filterNull,c=t.isAnimationActive,d=t.offset,u=t.payload,p=t.payloadUniqBy,h=t.position,m=t.reverseDirection,f=t.useTranslate3d,g=t.viewBox,v=t.wrapperStyle,x=null!==u&&void 0!==u?u:[];l&&x.length&&(x=p6(u.filter(function(t){return null!=t.value&&(!0!==t.hide||e.props.includeHidden)}),p,C6));var y=x.length>0;return We.createElement(l6,{allowEscapeViewBox:r,animationDuration:i,animationEasing:o,isAnimationActive:c,active:n,coordinate:s,hasPayload:y,offset:d,position:h,reverseDirection:m,useTranslate3d:f,viewBox:g,wrapperStyle:v},function(e,t){return We.isValidElement(e)?We.cloneElement(e,t):"function"===typeof e?We.createElement(e,t):We.createElement(V2,t)}(a,f6(f6({},this.props),{},{payload:x})))}}],r&&g6(n.prototype,r),i&&g6(n,i),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r,i}(We.PureComponent);j6(w6,"displayName","Tooltip"),j6(w6,"defaultProps",{accessibilityLayer:!1,allowEscapeViewBox:{x:!1,y:!1},animationDuration:400,animationEasing:"ease",contentStyle:{},coordinate:{x:0,y:0},cursor:!0,cursorStyle:{},filterNull:!0,isAnimationActive:!c6.isSsr,itemStyle:{},labelStyle:{},offset:10,reverseDirection:{x:!1,y:!1},separator:" : ",trigger:"hover",useTranslate3d:!1,viewBox:{x:0,y:0,height:0,width:0},wrapperStyle:{}});var S6=n(643),A6=n.n(S6);Math.abs,Math.atan2;const k6=Math.cos,T6=(Math.max,Math.min,Math.sin),E6=Math.sqrt,M6=Math.PI,O6=2*M6;const R6={draw(e,t){const n=E6(t/M6);e.moveTo(n,0),e.arc(0,0,n,0,O6)}},P6={draw(e,t){const n=E6(t/5)/2;e.moveTo(-3*n,-n),e.lineTo(-n,-n),e.lineTo(-n,-3*n),e.lineTo(n,-3*n),e.lineTo(n,-n),e.lineTo(3*n,-n),e.lineTo(3*n,n),e.lineTo(n,n),e.lineTo(n,3*n),e.lineTo(-n,3*n),e.lineTo(-n,n),e.lineTo(-3*n,n),e.closePath()}},D6=E6(1/3),N6=2*D6,L6={draw(e,t){const n=E6(t/N6),r=n*D6;e.moveTo(0,-n),e.lineTo(r,0),e.lineTo(0,n),e.lineTo(-r,0),e.closePath()}},I6={draw(e,t){const n=E6(t),r=-n/2;e.rect(r,r,n,n)}},F6=T6(M6/10)/T6(7*M6/10),$6=T6(O6/10)*F6,B6=-k6(O6/10)*F6,z6={draw(e,t){const n=E6(.8908130915292852*t),r=$6*n,i=B6*n;e.moveTo(0,-n),e.lineTo(r,i);for(let o=1;o<5;++o){const t=O6*o/5,a=k6(t),s=T6(t);e.lineTo(s*n,-a*n),e.lineTo(a*r-s*i,s*r+a*i)}e.closePath()}},H6=E6(3),W6={draw(e,t){const n=-E6(t/(3*H6));e.moveTo(0,2*n),e.lineTo(-H6*n,-n),e.lineTo(H6*n,-n),e.closePath()}},U6=-.5,V6=E6(3)/2,G6=1/E6(12),q6=3*(G6/2+1),Y6={draw(e,t){const n=E6(t/q6),r=n/2,i=n*G6,o=r,a=n*G6+n,s=-o,l=a;e.moveTo(r,i),e.lineTo(o,a),e.lineTo(s,l),e.lineTo(U6*r-V6*i,V6*r+U6*i),e.lineTo(U6*o-V6*a,V6*o+U6*a),e.lineTo(U6*s-V6*l,V6*s+U6*l),e.lineTo(U6*r+V6*i,U6*i-V6*r),e.lineTo(U6*o+V6*a,U6*a-V6*o),e.lineTo(U6*s+V6*l,U6*l-V6*s),e.closePath()}};function Z6(e){return function(){return e}}var K6,X6,Q6,J6,e5,t5,n5,r5,i5,o5,a5,s5,l5,c5;const d5=Math.PI,u5=2*d5,p5=1e-6,h5=u5-p5;function m5(e){this._+=e[0];for(let t=1,n=e.length;t<n;++t)this._+=arguments[t]+e[t]}class f5{constructor(e){this._x0=this._y0=this._x1=this._y1=null,this._="",this._append=null==e?m5:function(e){let t=Math.floor(e);if(!(t>=0))throw new Error("invalid digits: ".concat(e));if(t>15)return m5;const n=10**t;return function(e){this._+=e[0];for(let t=1,r=e.length;t<r;++t)this._+=Math.round(arguments[t]*n)/n+e[t]}}(e)}moveTo(e,t){this._append(K6||(K6=Mp(["M",",",""])),this._x0=this._x1=+e,this._y0=this._y1=+t)}closePath(){null!==this._x1&&(this._x1=this._x0,this._y1=this._y0,this._append(X6||(X6=Mp(["Z"]))))}lineTo(e,t){this._append(Q6||(Q6=Mp(["L",",",""])),this._x1=+e,this._y1=+t)}quadraticCurveTo(e,t,n,r){this._append(J6||(J6=Mp(["Q",",",",",",",""])),+e,+t,this._x1=+n,this._y1=+r)}bezierCurveTo(e,t,n,r,i,o){this._append(e5||(e5=Mp(["C",",",",",",",",",",",""])),+e,+t,+n,+r,this._x1=+i,this._y1=+o)}arcTo(e,t,n,r,i){if(e=+e,t=+t,n=+n,r=+r,(i=+i)<0)throw new Error("negative radius: ".concat(i));let o=this._x1,a=this._y1,s=n-e,l=r-t,c=o-e,d=a-t,u=c*c+d*d;if(null===this._x1)this._append(t5||(t5=Mp(["M",",",""])),this._x1=e,this._y1=t);else if(u>p5)if(Math.abs(d*s-l*c)>p5&&i){let p=n-o,h=r-a,m=s*s+l*l,f=p*p+h*h,g=Math.sqrt(m),v=Math.sqrt(u),x=i*Math.tan((d5-Math.acos((m+u-f)/(2*g*v)))/2),y=x/v,b=x/g;Math.abs(y-1)>p5&&this._append(r5||(r5=Mp(["L",",",""])),e+y*c,t+y*d),this._append(i5||(i5=Mp(["A",",",",0,0,",",",",",""])),i,i,+(d*p>c*h),this._x1=e+b*s,this._y1=t+b*l)}else this._append(n5||(n5=Mp(["L",",",""])),this._x1=e,this._y1=t);else;}arc(e,t,n,r,i,o){if(e=+e,t=+t,o=!!o,(n=+n)<0)throw new Error("negative radius: ".concat(n));let a=n*Math.cos(r),s=n*Math.sin(r),l=e+a,c=t+s,d=1^o,u=o?r-i:i-r;null===this._x1?this._append(o5||(o5=Mp(["M",",",""])),l,c):(Math.abs(this._x1-l)>p5||Math.abs(this._y1-c)>p5)&&this._append(a5||(a5=Mp(["L",",",""])),l,c),n&&(u<0&&(u=u%u5+u5),u>h5?this._append(s5||(s5=Mp(["A",",",",0,1,",",",",","A",",",",0,1,",",",",",""])),n,n,d,e-a,t-s,n,n,d,this._x1=l,this._y1=c):u>p5&&this._append(l5||(l5=Mp(["A",",",",0,",",",",",",",""])),n,n,+(u>=d5),d,this._x1=e+n*Math.cos(i),this._y1=t+n*Math.sin(i)))}rect(e,t,n,r){this._append(c5||(c5=Mp(["M",",","h","v","h","Z"])),this._x0=this._x1=+e,this._y0=this._y1=+t,n=+n,+r,-n)}toString(){return this._}}function g5(e){let t=3;return e.digits=function(n){if(!arguments.length)return t;if(null==n)t=null;else{const e=Math.floor(n);if(!(e>=0))throw new RangeError("invalid digits: ".concat(n));t=e}return e},()=>new f5(t)}E6(3),E6(3);function v5(e){return v5="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},v5(e)}var x5=["type","size","sizeType"];function y5(){return y5=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},y5.apply(this,arguments)}function b5(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function j5(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?b5(Object(n),!0).forEach(function(t){_5(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):b5(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function _5(e,t,n){return t=function(e){var t=function(e,t){if("object"!=v5(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=v5(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==v5(t)?t:t+""}(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function C5(e,t){if(null==e)return{};var n,r,i=function(e,t){if(null==e)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}var w5={symbolCircle:R6,symbolCross:P6,symbolDiamond:L6,symbolSquare:I6,symbolStar:z6,symbolTriangle:W6,symbolWye:Y6},S5=Math.PI/180,A5=function(e){var t=e.type,n=void 0===t?"circle":t,r=e.size,i=void 0===r?64:r,o=e.sizeType,a=void 0===o?"area":o,s=j5(j5({},C5(e,x5)),{},{type:n,size:i,sizeType:a}),l=s.className,c=s.cx,d=s.cy,u=e2(s,!0);return c===+c&&d===+d&&i===+i?We.createElement("path",y5({},u,{className:PJ("recharts-symbols",l),transform:"translate(".concat(c,", ").concat(d,")"),d:function(){var e=function(e){var t="symbol".concat(A6()(e));return w5[t]||R6}(n),t=function(e,t){let n=null,r=g5(i);function i(){let i;if(n||(n=i=r()),e.apply(this,arguments).draw(n,+t.apply(this,arguments)),i)return n=null,i+""||null}return e="function"===typeof e?e:Z6(e||R6),t="function"===typeof t?t:Z6(void 0===t?64:+t),i.type=function(t){return arguments.length?(e="function"===typeof t?t:Z6(t),i):e},i.size=function(e){return arguments.length?(t="function"===typeof e?e:Z6(+e),i):t},i.context=function(e){return arguments.length?(n=null==e?null:e,i):n},i}().type(e).size(function(e,t,n){if("area"===t)return e;switch(n){case"cross":return 5*e*e/9;case"diamond":return.5*e*e/Math.sqrt(3);case"square":return e*e;case"star":var r=18*S5;return 1.25*e*e*(Math.tan(r)-Math.tan(2*r)*Math.pow(Math.tan(r),2));case"triangle":return Math.sqrt(3)*e*e/4;case"wye":return(21-10*Math.sqrt(3))*e*e/8;default:return Math.PI*e*e/4}}(i,a,n));return t()}()})):null};function k5(e){return k5="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},k5(e)}function T5(){return T5=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},T5.apply(this,arguments)}function E5(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function M5(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,L5(r.key),r)}}function O5(e,t,n){return t=P5(t),function(e,t){if(t&&("object"===k5(t)||"function"===typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,R5()?Reflect.construct(t,n||[],P5(e).constructor):t.apply(e,n))}function R5(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(R5=function(){return!!e})()}function P5(e){return P5=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},P5(e)}function D5(e,t){return D5=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},D5(e,t)}function N5(e,t,n){return(t=L5(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function L5(e){var t=function(e,t){if("object"!=k5(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=k5(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==k5(t)?t:t+""}A5.registerSymbol=function(e,t){w5["symbol".concat(A6()(e))]=t};var I5=32,F5=function(e){function t(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),O5(this,t,arguments)}return function(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&D5(e,t)}(t,e),n=t,r=[{key:"renderIcon",value:function(e){var t=this.props.inactiveColor,n=16,r=5.333333333333333,i=10.666666666666666,o=e.inactive?t:e.color;if("plainline"===e.type)return We.createElement("line",{strokeWidth:4,fill:"none",stroke:o,strokeDasharray:e.payload.strokeDasharray,x1:0,y1:n,x2:I5,y2:n,className:"recharts-legend-icon"});if("line"===e.type)return We.createElement("path",{strokeWidth:4,fill:"none",stroke:o,d:"M0,".concat(n,"h").concat(i,"\n            A").concat(r,",").concat(r,",0,1,1,").concat(2*i,",").concat(n,"\n            H").concat(I5,"M").concat(2*i,",").concat(n,"\n            A").concat(r,",").concat(r,",0,1,1,").concat(i,",").concat(n),className:"recharts-legend-icon"});if("rect"===e.type)return We.createElement("path",{stroke:"none",fill:o,d:"M0,".concat(4,"h").concat(I5,"v").concat(24,"h").concat(-32,"z"),className:"recharts-legend-icon"});if(We.isValidElement(e.legendIcon)){var a=function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?E5(Object(n),!0).forEach(function(t){N5(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):E5(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}({},e);return delete a.legendIcon,We.cloneElement(e.legendIcon,a)}return We.createElement(A5,{fill:o,cx:n,cy:n,size:I5,sizeType:"diameter",type:e.type})}},{key:"renderItems",value:function(){var e=this,t=this.props,n=t.payload,r=t.iconSize,i=t.layout,o=t.formatter,a=t.inactiveColor,s={x:0,y:0,width:I5,height:I5},l={display:"horizontal"===i?"inline-block":"block",marginRight:10},c={display:"inline-block",verticalAlign:"middle",marginRight:4};return n.map(function(t,n){var i=t.formatter||o,d=PJ(N5(N5({"recharts-legend-item":!0},"legend-item-".concat(n),!0),"inactive",t.inactive));if("none"===t.type)return null;var u=h1()(t.value)?null:t.value;v2(!h1()(t.value),'The name property is also required when using a function for the dataKey of a chart\'s cartesian components. Ex: <Bar name="Name of my Data"/>');var p=t.inactive?a:t.color;return We.createElement("li",T5({className:d,style:l,key:"legend-item-".concat(n)},$1(e.props,t,n)),We.createElement(R2,{width:r,height:r,viewBox:s,style:c},e.renderIcon(t)),We.createElement("span",{className:"recharts-legend-item-text",style:{color:p}},i?i(u,t,n):u))})}},{key:"render",value:function(){var e=this.props,t=e.payload,n=e.layout,r=e.align;if(!t||!t.length)return null;var i={padding:0,margin:0,textAlign:"horizontal"===n?r:"left"};return We.createElement("ul",{className:"recharts-default-legend",style:i},this.renderItems())}}],r&&M5(n.prototype,r),i&&M5(n,i),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r,i}(We.PureComponent);function $5(e){return $5="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},$5(e)}N5(F5,"displayName","Legend"),N5(F5,"defaultProps",{iconSize:14,layout:"horizontal",align:"center",verticalAlign:"middle",inactiveColor:"#ccc"});var B5=["ref"];function z5(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function H5(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?z5(Object(n),!0).forEach(function(t){Y5(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):z5(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function W5(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,Z5(r.key),r)}}function U5(e,t,n){return t=G5(t),function(e,t){if(t&&("object"===$5(t)||"function"===typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,V5()?Reflect.construct(t,n||[],G5(e).constructor):t.apply(e,n))}function V5(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(V5=function(){return!!e})()}function G5(e){return G5=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},G5(e)}function q5(e,t){return q5=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},q5(e,t)}function Y5(e,t,n){return(t=Z5(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Z5(e){var t=function(e,t){if("object"!=$5(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=$5(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==$5(t)?t:t+""}function K5(e,t){if(null==e)return{};var n,r,i=function(e,t){if(null==e)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function X5(e){return e.value}var Q5=function(e){function t(){var e;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return Y5(e=U5(this,t,[].concat(r)),"lastBoundingBox",{width:-1,height:-1}),e}return function(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&q5(e,t)}(t,e),n=t,r=[{key:"componentDidMount",value:function(){this.updateBBox()}},{key:"componentDidUpdate",value:function(){this.updateBBox()}},{key:"getBBox",value:function(){if(this.wrapperNode&&this.wrapperNode.getBoundingClientRect){var e=this.wrapperNode.getBoundingClientRect();return e.height=this.wrapperNode.offsetHeight,e.width=this.wrapperNode.offsetWidth,e}return null}},{key:"updateBBox",value:function(){var e=this.props.onBBoxUpdate,t=this.getBBox();t?(Math.abs(t.width-this.lastBoundingBox.width)>1||Math.abs(t.height-this.lastBoundingBox.height)>1)&&(this.lastBoundingBox.width=t.width,this.lastBoundingBox.height=t.height,e&&e(t)):-1===this.lastBoundingBox.width&&-1===this.lastBoundingBox.height||(this.lastBoundingBox.width=-1,this.lastBoundingBox.height=-1,e&&e(null))}},{key:"getBBoxSnapshot",value:function(){return this.lastBoundingBox.width>=0&&this.lastBoundingBox.height>=0?H5({},this.lastBoundingBox):{width:0,height:0}}},{key:"getDefaultPosition",value:function(e){var t,n,r=this.props,i=r.layout,o=r.align,a=r.verticalAlign,s=r.margin,l=r.chartWidth,c=r.chartHeight;return e&&(void 0!==e.left&&null!==e.left||void 0!==e.right&&null!==e.right)||(t="center"===o&&"vertical"===i?{left:((l||0)-this.getBBoxSnapshot().width)/2}:"right"===o?{right:s&&s.right||0}:{left:s&&s.left||0}),e&&(void 0!==e.top&&null!==e.top||void 0!==e.bottom&&null!==e.bottom)||(n="middle"===a?{top:((c||0)-this.getBBoxSnapshot().height)/2}:"bottom"===a?{bottom:s&&s.bottom||0}:{top:s&&s.top||0}),H5(H5({},t),n)}},{key:"render",value:function(){var e=this,t=this.props,n=t.content,r=t.width,i=t.height,o=t.wrapperStyle,a=t.payloadUniqBy,s=t.payload,l=H5(H5({position:"absolute",width:r||"auto",height:i||"auto"},this.getDefaultPosition(o)),o);return We.createElement("div",{className:"recharts-legend-wrapper",style:l,ref:function(t){e.wrapperNode=t}},function(e,t){if(We.isValidElement(e))return We.cloneElement(e,t);if("function"===typeof e)return We.createElement(e,t);t.ref;var n=K5(t,B5);return We.createElement(F5,n)}(n,H5(H5({},this.props),{},{payload:p6(s,a,X5)})))}}],i=[{key:"getWithHeight",value:function(e,t){var n=H5(H5({},this.defaultProps),e.props).layout;return"vertical"===n&&C1(e.props.height)?{height:e.props.height}:"horizontal"===n?{width:e.props.width||t}:null}}],r&&W5(n.prototype,r),i&&W5(n,i),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r,i}(We.PureComponent);function J5(){return J5=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},J5.apply(this,arguments)}Y5(Q5,"displayName","Legend"),Y5(Q5,"defaultProps",{iconSize:14,layout:"horizontal",align:"center",verticalAlign:"bottom"});var e3=function(e){var t=e.cx,n=e.cy,r=e.r,i=e.className,o=PJ("recharts-dot",i);return t===+t&&n===+n&&r===+r?We.createElement("circle",J5({},e2(e,!1),F1(e),{className:o,cx:t,cy:n,r:r})):null};function t3(e,t){switch(arguments.length){case 0:break;case 1:this.range(e);break;default:this.range(t).domain(e)}return this}function n3(e,t){switch(arguments.length){case 0:break;case 1:"function"===typeof e?this.interpolator(e):this.range(e);break;default:this.domain(e),"function"===typeof t?this.interpolator(t):this.range(t)}return this}class r3 extends Map{constructor(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:s3;if(super(),Object.defineProperties(this,{_intern:{value:new Map},_key:{value:t}}),null!=e)for(const[n,r]of e)this.set(n,r)}get(e){return super.get(i3(this,e))}has(e){return super.has(i3(this,e))}set(e,t){return super.set(o3(this,e),t)}delete(e){return super.delete(a3(this,e))}}Set;function i3(e,t){let{_intern:n,_key:r}=e;const i=r(t);return n.has(i)?n.get(i):t}function o3(e,t){let{_intern:n,_key:r}=e;const i=r(t);return n.has(i)?n.get(i):(n.set(i,t),t)}function a3(e,t){let{_intern:n,_key:r}=e;const i=r(t);return n.has(i)&&(t=n.get(i),n.delete(i)),t}function s3(e){return null!==e&&"object"===typeof e?e.valueOf():e}const l3=Symbol("implicit");function c3(){var e=new r3,t=[],n=[],r=l3;function i(i){let o=e.get(i);if(void 0===o){if(r!==l3)return r;e.set(i,o=t.push(i)-1)}return n[o%n.length]}return i.domain=function(n){if(!arguments.length)return t.slice();t=[],e=new r3;for(const r of n)e.has(r)||e.set(r,t.push(r)-1);return i},i.range=function(e){return arguments.length?(n=Array.from(e),i):n.slice()},i.unknown=function(e){return arguments.length?(r=e,i):r},i.copy=function(){return c3(t,n).unknown(r)},t3.apply(i,arguments),i}function d3(){var e,t,n=c3().unknown(void 0),r=n.domain,i=n.range,o=0,a=1,s=!1,l=0,c=0,d=.5;function u(){var n=r().length,u=a<o,p=u?a:o,h=u?o:a;e=(h-p)/Math.max(1,n-l+2*c),s&&(e=Math.floor(e)),p+=(h-p-e*(n-l))*d,t=e*(1-l),s&&(p=Math.round(p),t=Math.round(t));var m=function(e,t,n){e=+e,t=+t,n=(i=arguments.length)<2?(t=e,e=0,1):i<3?1:+n;for(var r=-1,i=0|Math.max(0,Math.ceil((t-e)/n)),o=new Array(i);++r<i;)o[r]=e+r*n;return o}(n).map(function(t){return p+e*t});return i(u?m.reverse():m)}return delete n.unknown,n.domain=function(e){return arguments.length?(r(e),u()):r()},n.range=function(e){return arguments.length?([o,a]=e,o=+o,a=+a,u()):[o,a]},n.rangeRound=function(e){return[o,a]=e,o=+o,a=+a,s=!0,u()},n.bandwidth=function(){return t},n.step=function(){return e},n.round=function(e){return arguments.length?(s=!!e,u()):s},n.padding=function(e){return arguments.length?(l=Math.min(1,c=+e),u()):l},n.paddingInner=function(e){return arguments.length?(l=Math.min(1,e),u()):l},n.paddingOuter=function(e){return arguments.length?(c=+e,u()):c},n.align=function(e){return arguments.length?(d=Math.max(0,Math.min(1,e)),u()):d},n.copy=function(){return d3(r(),[o,a]).round(s).paddingInner(l).paddingOuter(c).align(d)},t3.apply(u(),arguments)}function u3(e){var t=e.copy;return e.padding=e.paddingOuter,delete e.paddingInner,delete e.paddingOuter,e.copy=function(){return u3(t())},e}function p3(){return u3(d3.apply(null,arguments).paddingInner(1))}function h3(e){return h3="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},h3(e)}function m3(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function f3(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?m3(Object(n),!0).forEach(function(t){g3(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):m3(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function g3(e,t,n){return t=function(e){var t=function(e,t){if("object"!=h3(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=h3(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==h3(t)?t:t+""}(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var v3={widthCache:{},cacheCount:0},x3={position:"absolute",top:"-20000px",left:0,padding:0,margin:0,border:"none",whiteSpace:"pre"},y3="recharts_measurement_span";var b3=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(void 0===e||null===e||c6.isSsr)return{width:0,height:0};var n=function(e){var t=f3({},e);return Object.keys(t).forEach(function(e){t[e]||delete t[e]}),t}(t),r=JSON.stringify({text:e,copyStyle:n});if(v3.widthCache[r])return v3.widthCache[r];try{var i=document.getElementById(y3);i||((i=document.createElement("span")).setAttribute("id",y3),i.setAttribute("aria-hidden","true"),document.body.appendChild(i));var o=f3(f3({},x3),n);Object.assign(i.style,o),i.textContent="".concat(e);var a=i.getBoundingClientRect(),s={width:a.width,height:a.height};return v3.widthCache[r]=s,++v3.cacheCount>2e3&&(v3.cacheCount=0,v3.widthCache={}),s}catch(Ca){return{width:0,height:0}}};function j3(e){return j3="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},j3(e)}function _3(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,i,o,a,s=[],l=!0,c=!1;try{if(o=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;l=!1}else for(;!(l=(r=o.call(n)).done)&&(s.push(r.value),s.length!==t);l=!0);}catch(e){c=!0,i=e}finally{try{if(!l&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(c)throw i}}return s}}(e,t)||function(e,t){if(!e)return;if("string"===typeof e)return C3(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return C3(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function C3(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function w3(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,S3(r.key),r)}}function S3(e){var t=function(e,t){if("object"!=j3(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=j3(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==j3(t)?t:t+""}var A3=/(-?\d+(?:\.\d+)?[a-zA-Z%]*)([*/])(-?\d+(?:\.\d+)?[a-zA-Z%]*)/,k3=/(-?\d+(?:\.\d+)?[a-zA-Z%]*)([+-])(-?\d+(?:\.\d+)?[a-zA-Z%]*)/,T3=/^px|cm|vh|vw|em|rem|%|mm|in|pt|pc|ex|ch|vmin|vmax|Q$/,E3=/(-?\d+(?:\.\d+)?)([a-zA-Z%]+)?/,M3={cm:96/2.54,mm:96/25.4,pt:96/72,pc:16,in:96,Q:96/101.6,px:1},O3=Object.keys(M3),R3="NaN";var P3=function(){function e(t,n){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.num=t,this.unit=n,this.num=t,this.unit=n,Number.isNaN(t)&&(this.unit=""),""===n||T3.test(n)||(this.num=NaN,this.unit=""),O3.includes(n)&&(this.num=function(e,t){return e*M3[t]}(t,n),this.unit="px")}return t=e,r=[{key:"parse",value:function(t){var n,r=_3(null!==(n=E3.exec(t))&&void 0!==n?n:[],3),i=r[1],o=r[2];return new e(parseFloat(i),null!==o&&void 0!==o?o:"")}}],(n=[{key:"add",value:function(t){return this.unit!==t.unit?new e(NaN,""):new e(this.num+t.num,this.unit)}},{key:"subtract",value:function(t){return this.unit!==t.unit?new e(NaN,""):new e(this.num-t.num,this.unit)}},{key:"multiply",value:function(t){return""!==this.unit&&""!==t.unit&&this.unit!==t.unit?new e(NaN,""):new e(this.num*t.num,this.unit||t.unit)}},{key:"divide",value:function(t){return""!==this.unit&&""!==t.unit&&this.unit!==t.unit?new e(NaN,""):new e(this.num/t.num,this.unit||t.unit)}},{key:"toString",value:function(){return"".concat(this.num).concat(this.unit)}},{key:"isNaN",value:function(){return Number.isNaN(this.num)}}])&&w3(t.prototype,n),r&&w3(t,r),Object.defineProperty(t,"prototype",{writable:!1}),t;var t,n,r}();function D3(e){if(e.includes(R3))return R3;for(var t=e;t.includes("*")||t.includes("/");){var n,r=_3(null!==(n=A3.exec(t))&&void 0!==n?n:[],4),i=r[1],o=r[2],a=r[3],s=P3.parse(null!==i&&void 0!==i?i:""),l=P3.parse(null!==a&&void 0!==a?a:""),c="*"===o?s.multiply(l):s.divide(l);if(c.isNaN())return R3;t=t.replace(A3,c.toString())}for(;t.includes("+")||/.-\d+(?:\.\d+)?/.test(t);){var d,u=_3(null!==(d=k3.exec(t))&&void 0!==d?d:[],4),p=u[1],h=u[2],m=u[3],f=P3.parse(null!==p&&void 0!==p?p:""),g=P3.parse(null!==m&&void 0!==m?m:""),v="+"===h?f.add(g):f.subtract(g);if(v.isNaN())return R3;t=t.replace(k3,v.toString())}return t}var N3=/\(([^()]*)\)/;function L3(e){var t=e.replace(/\s+/g,"");return t=function(e){for(var t=e;t.includes("(");){var n=_3(N3.exec(t),2)[1];t=t.replace(N3,D3(n))}return t}(t),t=D3(t)}function I3(e){var t=function(e){try{return L3(e)}catch(Ca){return R3}}(e.slice(5,-1));return t===R3?"":t}var F3=["x","y","lineHeight","capHeight","scaleToFit","textAnchor","verticalAnchor","fill"],$3=["dx","dy","angle","className","breakAll"];function B3(){return B3=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},B3.apply(this,arguments)}function z3(e,t){if(null==e)return{};var n,r,i=function(e,t){if(null==e)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function H3(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,i,o,a,s=[],l=!0,c=!1;try{if(o=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;l=!1}else for(;!(l=(r=o.call(n)).done)&&(s.push(r.value),s.length!==t);l=!0);}catch(e){c=!0,i=e}finally{try{if(!l&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(c)throw i}}return s}}(e,t)||function(e,t){if(!e)return;if("string"===typeof e)return W3(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return W3(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function W3(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var U3=/[ \f\n\r\t\v\u2028\u2029]+/,V3=function(e){var t=e.children,n=e.breakAll,r=e.style;try{var i=[];return c1()(t)||(i=n?t.toString().split(""):t.toString().split(U3)),{wordsWithComputedWidth:i.map(function(e){return{word:e,width:b3(e,r).width}}),spaceWidth:n?0:b3("\xa0",r).width}}catch(Ca){return null}},G3=function(e){return[{words:c1()(e)?[]:e.toString().split(U3)}]},q3=function(e){var t=e.width,n=e.scaleToFit,r=e.children,i=e.style,o=e.breakAll,a=e.maxLines;if((t||n)&&!c6.isSsr){var s=V3({breakAll:o,children:r,style:i});return s?function(e,t,n,r,i){var o=e.maxLines,a=e.children,s=e.style,l=e.breakAll,c=C1(o),d=a,u=function(){return(arguments.length>0&&void 0!==arguments[0]?arguments[0]:[]).reduce(function(e,t){var o=t.word,a=t.width,s=e[e.length-1];if(s&&(null==r||i||s.width+a+n<Number(r)))s.words.push(o),s.width+=a+n;else{var l={words:[o],width:a};e.push(l)}return e},[])},p=u(t);if(!c)return p;for(var h,m=function(e){var t=d.slice(0,e),n=V3({breakAll:l,style:s,children:t+"\u2026"}).wordsWithComputedWidth,i=u(n),a=i.length>o||function(e){return e.reduce(function(e,t){return e.width>t.width?e:t})}(i).width>Number(r);return[a,i]},f=0,g=d.length-1,v=0;f<=g&&v<=d.length-1;){var x=Math.floor((f+g)/2),y=H3(m(x-1),2),b=y[0],j=y[1],_=H3(m(x),1)[0];if(b||_||(f=x+1),b&&_&&(g=x-1),!b&&_){h=j;break}v++}return h||p}({breakAll:o,children:r,maxLines:a,style:i},s.wordsWithComputedWidth,s.spaceWidth,t,n):G3(r)}return G3(r)},Y3="#808080",Z3=function(e){var t=e.x,n=void 0===t?0:t,r=e.y,i=void 0===r?0:r,o=e.lineHeight,a=void 0===o?"1em":o,s=e.capHeight,l=void 0===s?"0.71em":s,c=e.scaleToFit,d=void 0!==c&&c,u=e.textAnchor,p=void 0===u?"start":u,h=e.verticalAnchor,m=void 0===h?"end":h,f=e.fill,g=void 0===f?Y3:f,v=z3(e,F3),x=(0,We.useMemo)(function(){return q3({breakAll:v.breakAll,children:v.children,maxLines:v.maxLines,scaleToFit:d,style:v.style,width:v.width})},[v.breakAll,v.children,v.maxLines,d,v.style,v.width]),y=v.dx,b=v.dy,j=v.angle,_=v.className,C=v.breakAll,w=z3(v,$3);if(!w1(n)||!w1(i))return null;var S,A=n+(C1(y)?y:0),k=i+(C1(b)?b:0);switch(m){case"start":S=I3("calc(".concat(l,")"));break;case"middle":S=I3("calc(".concat((x.length-1)/2," * -").concat(a," + (").concat(l," / 2))"));break;default:S=I3("calc(".concat(x.length-1," * -").concat(a,")"))}var T=[];if(d){var E=x[0].width,M=v.width;T.push("scale(".concat((C1(M)?M/E:1)/E,")"))}return j&&T.push("rotate(".concat(j,", ").concat(A,", ").concat(k,")")),T.length&&(w.transform=T.join(" ")),We.createElement("text",B3({},e2(w,!0),{x:A,y:k,className:PJ("recharts-text",_),textAnchor:p,fill:g.includes("url")?Y3:g}),x.map(function(e,t){var n=e.words.join(C?"":" ");return We.createElement("tspan",{x:A,dy:0===t?S:a,key:"".concat(n,"-").concat(t)},n)}))};const K3=Math.sqrt(50),X3=Math.sqrt(10),Q3=Math.sqrt(2);function J3(e,t,n){const r=(t-e)/Math.max(0,n),i=Math.floor(Math.log10(r)),o=r/Math.pow(10,i),a=o>=K3?10:o>=X3?5:o>=Q3?2:1;let s,l,c;return i<0?(c=Math.pow(10,-i)/a,s=Math.round(e*c),l=Math.round(t*c),s/c<e&&++s,l/c>t&&--l,c=-c):(c=Math.pow(10,i)*a,s=Math.round(e/c),l=Math.round(t/c),s*c<e&&++s,l*c>t&&--l),l<s&&.5<=n&&n<2?J3(e,t,2*n):[s,l,c]}function e4(e,t,n){if(!((n=+n)>0))return[];if((e=+e)===(t=+t))return[e];const r=t<e,[i,o,a]=r?J3(t,e,n):J3(e,t,n);if(!(o>=i))return[];const s=o-i+1,l=new Array(s);if(r)if(a<0)for(let c=0;c<s;++c)l[c]=(o-c)/-a;else for(let c=0;c<s;++c)l[c]=(o-c)*a;else if(a<0)for(let c=0;c<s;++c)l[c]=(i+c)/-a;else for(let c=0;c<s;++c)l[c]=(i+c)*a;return l}function t4(e,t,n){return J3(e=+e,t=+t,n=+n)[2]}function n4(e,t,n){n=+n;const r=(t=+t)<(e=+e),i=r?t4(t,e,n):t4(e,t,n);return(r?-1:1)*(i<0?1/-i:i)}function r4(e,t){return null==e||null==t?NaN:e<t?-1:e>t?1:e>=t?0:NaN}function i4(e,t){return null==e||null==t?NaN:t<e?-1:t>e?1:t>=e?0:NaN}function o4(e){let t,n,r;function i(e,r){let i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:e.length;if(i<o){if(0!==t(r,r))return o;do{const t=i+o>>>1;n(e[t],r)<0?i=t+1:o=t}while(i<o)}return i}return 2!==e.length?(t=r4,n=(t,n)=>r4(e(t),n),r=(t,n)=>e(t)-n):(t=e===r4||e===i4?e:a4,n=e,r=e),{left:i,center:function(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;const o=i(e,t,n,(arguments.length>3&&void 0!==arguments[3]?arguments[3]:e.length)-1);return o>n&&r(e[o-1],t)>-r(e[o],t)?o-1:o},right:function(e,r){let i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:e.length;if(i<o){if(0!==t(r,r))return o;do{const t=i+o>>>1;n(e[t],r)<=0?i=t+1:o=t}while(i<o)}return i}}}function a4(){return 0}function s4(e){return null===e?NaN:+e}const l4=o4(r4),c4=l4.right,d4=(l4.left,o4(s4).center,c4);function u4(e,t,n){e.prototype=t.prototype=n,n.constructor=e}function p4(e,t){var n=Object.create(e.prototype);for(var r in t)n[r]=t[r];return n}function h4(){}var m4=.7,f4=1/m4,g4="\\s*([+-]?\\d+)\\s*",v4="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",x4="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",y4=/^#([0-9a-f]{3,8})$/,b4=new RegExp("^rgb\\(".concat(g4,",").concat(g4,",").concat(g4,"\\)$")),j4=new RegExp("^rgb\\(".concat(x4,",").concat(x4,",").concat(x4,"\\)$")),_4=new RegExp("^rgba\\(".concat(g4,",").concat(g4,",").concat(g4,",").concat(v4,"\\)$")),C4=new RegExp("^rgba\\(".concat(x4,",").concat(x4,",").concat(x4,",").concat(v4,"\\)$")),w4=new RegExp("^hsl\\(".concat(v4,",").concat(x4,",").concat(x4,"\\)$")),S4=new RegExp("^hsla\\(".concat(v4,",").concat(x4,",").concat(x4,",").concat(v4,"\\)$")),A4={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074};function k4(){return this.rgb().formatHex()}function T4(){return this.rgb().formatRgb()}function E4(e){var t,n;return e=(e+"").trim().toLowerCase(),(t=y4.exec(e))?(n=t[1].length,t=parseInt(t[1],16),6===n?M4(t):3===n?new P4(t>>8&15|t>>4&240,t>>4&15|240&t,(15&t)<<4|15&t,1):8===n?O4(t>>24&255,t>>16&255,t>>8&255,(255&t)/255):4===n?O4(t>>12&15|t>>8&240,t>>8&15|t>>4&240,t>>4&15|240&t,((15&t)<<4|15&t)/255):null):(t=b4.exec(e))?new P4(t[1],t[2],t[3],1):(t=j4.exec(e))?new P4(255*t[1]/100,255*t[2]/100,255*t[3]/100,1):(t=_4.exec(e))?O4(t[1],t[2],t[3],t[4]):(t=C4.exec(e))?O4(255*t[1]/100,255*t[2]/100,255*t[3]/100,t[4]):(t=w4.exec(e))?$4(t[1],t[2]/100,t[3]/100,1):(t=S4.exec(e))?$4(t[1],t[2]/100,t[3]/100,t[4]):A4.hasOwnProperty(e)?M4(A4[e]):"transparent"===e?new P4(NaN,NaN,NaN,0):null}function M4(e){return new P4(e>>16&255,e>>8&255,255&e,1)}function O4(e,t,n,r){return r<=0&&(e=t=n=NaN),new P4(e,t,n,r)}function R4(e,t,n,r){return 1===arguments.length?function(e){return e instanceof h4||(e=E4(e)),e?new P4((e=e.rgb()).r,e.g,e.b,e.opacity):new P4}(e):new P4(e,t,n,null==r?1:r)}function P4(e,t,n,r){this.r=+e,this.g=+t,this.b=+n,this.opacity=+r}function D4(){return"#".concat(F4(this.r)).concat(F4(this.g)).concat(F4(this.b))}function N4(){const e=L4(this.opacity);return"".concat(1===e?"rgb(":"rgba(").concat(I4(this.r),", ").concat(I4(this.g),", ").concat(I4(this.b)).concat(1===e?")":", ".concat(e,")"))}function L4(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function I4(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function F4(e){return((e=I4(e))<16?"0":"")+e.toString(16)}function $4(e,t,n,r){return r<=0?e=t=n=NaN:n<=0||n>=1?e=t=NaN:t<=0&&(e=NaN),new z4(e,t,n,r)}function B4(e){if(e instanceof z4)return new z4(e.h,e.s,e.l,e.opacity);if(e instanceof h4||(e=E4(e)),!e)return new z4;if(e instanceof z4)return e;var t=(e=e.rgb()).r/255,n=e.g/255,r=e.b/255,i=Math.min(t,n,r),o=Math.max(t,n,r),a=NaN,s=o-i,l=(o+i)/2;return s?(a=t===o?(n-r)/s+6*(n<r):n===o?(r-t)/s+2:(t-n)/s+4,s/=l<.5?o+i:2-o-i,a*=60):s=l>0&&l<1?0:a,new z4(a,s,l,e.opacity)}function z4(e,t,n,r){this.h=+e,this.s=+t,this.l=+n,this.opacity=+r}function H4(e){return(e=(e||0)%360)<0?e+360:e}function W4(e){return Math.max(0,Math.min(1,e||0))}function U4(e,t,n){return 255*(e<60?t+(n-t)*e/60:e<180?n:e<240?t+(n-t)*(240-e)/60:t)}function V4(e,t,n,r,i){var o=e*e,a=o*e;return((1-3*e+3*o-a)*t+(4-6*o+3*a)*n+(1+3*e+3*o-3*a)*r+a*i)/6}u4(h4,E4,{copy(e){return Object.assign(new this.constructor,this,e)},displayable(){return this.rgb().displayable()},hex:k4,formatHex:k4,formatHex8:function(){return this.rgb().formatHex8()},formatHsl:function(){return B4(this).formatHsl()},formatRgb:T4,toString:T4}),u4(P4,R4,p4(h4,{brighter(e){return e=null==e?f4:Math.pow(f4,e),new P4(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=null==e?m4:Math.pow(m4,e),new P4(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new P4(I4(this.r),I4(this.g),I4(this.b),L4(this.opacity))},displayable(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:D4,formatHex:D4,formatHex8:function(){return"#".concat(F4(this.r)).concat(F4(this.g)).concat(F4(this.b)).concat(F4(255*(isNaN(this.opacity)?1:this.opacity)))},formatRgb:N4,toString:N4})),u4(z4,function(e,t,n,r){return 1===arguments.length?B4(e):new z4(e,t,n,null==r?1:r)},p4(h4,{brighter(e){return e=null==e?f4:Math.pow(f4,e),new z4(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=null==e?m4:Math.pow(m4,e),new z4(this.h,this.s,this.l*e,this.opacity)},rgb(){var e=this.h%360+360*(this.h<0),t=isNaN(e)||isNaN(this.s)?0:this.s,n=this.l,r=n+(n<.5?n:1-n)*t,i=2*n-r;return new P4(U4(e>=240?e-240:e+120,i,r),U4(e,i,r),U4(e<120?e+240:e-120,i,r),this.opacity)},clamp(){return new z4(H4(this.h),W4(this.s),W4(this.l),L4(this.opacity))},displayable(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl(){const e=L4(this.opacity);return"".concat(1===e?"hsl(":"hsla(").concat(H4(this.h),", ").concat(100*W4(this.s),"%, ").concat(100*W4(this.l),"%").concat(1===e?")":", ".concat(e,")"))}}));const G4=e=>()=>e;function q4(e,t){return function(n){return e+n*t}}function Y4(e){return 1===(e=+e)?Z4:function(t,n){return n-t?function(e,t,n){return e=Math.pow(e,n),t=Math.pow(t,n)-e,n=1/n,function(r){return Math.pow(e+r*t,n)}}(t,n,e):G4(isNaN(t)?n:t)}}function Z4(e,t){var n=t-e;return n?q4(e,n):G4(isNaN(e)?t:e)}const K4=function e(t){var n=Y4(t);function r(e,t){var r=n((e=R4(e)).r,(t=R4(t)).r),i=n(e.g,t.g),o=n(e.b,t.b),a=Z4(e.opacity,t.opacity);return function(t){return e.r=r(t),e.g=i(t),e.b=o(t),e.opacity=a(t),e+""}}return r.gamma=e,r}(1);function X4(e){return function(t){var n,r,i=t.length,o=new Array(i),a=new Array(i),s=new Array(i);for(n=0;n<i;++n)r=R4(t[n]),o[n]=r.r||0,a[n]=r.g||0,s[n]=r.b||0;return o=e(o),a=e(a),s=e(s),r.opacity=1,function(e){return r.r=o(e),r.g=a(e),r.b=s(e),r+""}}}X4(function(e){var t=e.length-1;return function(n){var r=n<=0?n=0:n>=1?(n=1,t-1):Math.floor(n*t),i=e[r],o=e[r+1],a=r>0?e[r-1]:2*i-o,s=r<t-1?e[r+2]:2*o-i;return V4((n-r/t)*t,a,i,o,s)}}),X4(function(e){var t=e.length;return function(n){var r=Math.floor(((n%=1)<0?++n:n)*t),i=e[(r+t-1)%t],o=e[r%t],a=e[(r+1)%t],s=e[(r+2)%t];return V4((n-r/t)*t,i,o,a,s)}});function Q4(e,t){var n,r=t?t.length:0,i=e?Math.min(r,e.length):0,o=new Array(i),a=new Array(r);for(n=0;n<i;++n)o[n]=a9(e[n],t[n]);for(;n<r;++n)a[n]=t[n];return function(e){for(n=0;n<i;++n)a[n]=o[n](e);return a}}function J4(e,t){var n=new Date;return e=+e,t=+t,function(r){return n.setTime(e*(1-r)+t*r),n}}function e9(e,t){return e=+e,t=+t,function(n){return e*(1-n)+t*n}}function t9(e,t){var n,r={},i={};for(n in null!==e&&"object"===typeof e||(e={}),null!==t&&"object"===typeof t||(t={}),t)n in e?r[n]=a9(e[n],t[n]):i[n]=t[n];return function(e){for(n in r)i[n]=r[n](e);return i}}var n9=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,r9=new RegExp(n9.source,"g");function i9(e,t){var n,r,i,o=n9.lastIndex=r9.lastIndex=0,a=-1,s=[],l=[];for(e+="",t+="";(n=n9.exec(e))&&(r=r9.exec(t));)(i=r.index)>o&&(i=t.slice(o,i),s[a]?s[a]+=i:s[++a]=i),(n=n[0])===(r=r[0])?s[a]?s[a]+=r:s[++a]=r:(s[++a]=null,l.push({i:a,x:e9(n,r)})),o=r9.lastIndex;return o<t.length&&(i=t.slice(o),s[a]?s[a]+=i:s[++a]=i),s.length<2?l[0]?function(e){return function(t){return e(t)+""}}(l[0].x):function(e){return function(){return e}}(t):(t=l.length,function(e){for(var n,r=0;r<t;++r)s[(n=l[r]).i]=n.x(e);return s.join("")})}function o9(e,t){t||(t=[]);var n,r=e?Math.min(t.length,e.length):0,i=t.slice();return function(o){for(n=0;n<r;++n)i[n]=e[n]*(1-o)+t[n]*o;return i}}function a9(e,t){var n,r,i=typeof t;return null==t||"boolean"===i?G4(t):("number"===i?e9:"string"===i?(n=E4(t))?(t=n,K4):i9:t instanceof E4?K4:t instanceof Date?J4:(r=t,!ArrayBuffer.isView(r)||r instanceof DataView?Array.isArray(t)?Q4:"function"!==typeof t.valueOf&&"function"!==typeof t.toString||isNaN(t)?t9:e9:o9))(e,t)}function s9(e,t){return e=+e,t=+t,function(n){return Math.round(e*(1-n)+t*n)}}function l9(e){return+e}var c9=[0,1];function d9(e){return e}function u9(e,t){return(t-=e=+e)?function(n){return(n-e)/t}:(n=isNaN(t)?NaN:.5,function(){return n});var n}function p9(e,t,n){var r=e[0],i=e[1],o=t[0],a=t[1];return i<r?(r=u9(i,r),o=n(a,o)):(r=u9(r,i),o=n(o,a)),function(e){return o(r(e))}}function h9(e,t,n){var r=Math.min(e.length,t.length)-1,i=new Array(r),o=new Array(r),a=-1;for(e[r]<e[0]&&(e=e.slice().reverse(),t=t.slice().reverse());++a<r;)i[a]=u9(e[a],e[a+1]),o[a]=n(t[a],t[a+1]);return function(t){var n=d4(e,t,1,r)-1;return o[n](i[n](t))}}function m9(e,t){return t.domain(e.domain()).range(e.range()).interpolate(e.interpolate()).clamp(e.clamp()).unknown(e.unknown())}function f9(){var e,t,n,r,i,o,a=c9,s=c9,l=a9,c=d9;function d(){var e=Math.min(a.length,s.length);return c!==d9&&(c=function(e,t){var n;return e>t&&(n=e,e=t,t=n),function(n){return Math.max(e,Math.min(t,n))}}(a[0],a[e-1])),r=e>2?h9:p9,i=o=null,u}function u(t){return null==t||isNaN(t=+t)?n:(i||(i=r(a.map(e),s,l)))(e(c(t)))}return u.invert=function(n){return c(t((o||(o=r(s,a.map(e),e9)))(n)))},u.domain=function(e){return arguments.length?(a=Array.from(e,l9),d()):a.slice()},u.range=function(e){return arguments.length?(s=Array.from(e),d()):s.slice()},u.rangeRound=function(e){return s=Array.from(e),l=s9,d()},u.clamp=function(e){return arguments.length?(c=!!e||d9,d()):c!==d9},u.interpolate=function(e){return arguments.length?(l=e,d()):l},u.unknown=function(e){return arguments.length?(n=e,u):n},function(n,r){return e=n,t=r,d()}}function g9(){return f9()(d9,d9)}var v9,x9=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function y9(e){if(!(t=x9.exec(e)))throw new Error("invalid format: "+e);var t;return new b9({fill:t[1],align:t[2],sign:t[3],symbol:t[4],zero:t[5],width:t[6],comma:t[7],precision:t[8]&&t[8].slice(1),trim:t[9],type:t[10]})}function b9(e){this.fill=void 0===e.fill?" ":e.fill+"",this.align=void 0===e.align?">":e.align+"",this.sign=void 0===e.sign?"-":e.sign+"",this.symbol=void 0===e.symbol?"":e.symbol+"",this.zero=!!e.zero,this.width=void 0===e.width?void 0:+e.width,this.comma=!!e.comma,this.precision=void 0===e.precision?void 0:+e.precision,this.trim=!!e.trim,this.type=void 0===e.type?"":e.type+""}function j9(e,t){if((n=(e=t?e.toExponential(t-1):e.toExponential()).indexOf("e"))<0)return null;var n,r=e.slice(0,n);return[r.length>1?r[0]+r.slice(2):r,+e.slice(n+1)]}function _9(e){return(e=j9(Math.abs(e)))?e[1]:NaN}function C9(e,t){var n=j9(e,t);if(!n)return e+"";var r=n[0],i=n[1];return i<0?"0."+new Array(-i).join("0")+r:r.length>i+1?r.slice(0,i+1)+"."+r.slice(i+1):r+new Array(i-r.length+2).join("0")}y9.prototype=b9.prototype,b9.prototype.toString=function(){return this.fill+this.align+this.sign+this.symbol+(this.zero?"0":"")+(void 0===this.width?"":Math.max(1,0|this.width))+(this.comma?",":"")+(void 0===this.precision?"":"."+Math.max(0,0|this.precision))+(this.trim?"~":"")+this.type};const w9={"%":(e,t)=>(100*e).toFixed(t),b:e=>Math.round(e).toString(2),c:e=>e+"",d:function(e){return Math.abs(e=Math.round(e))>=1e21?e.toLocaleString("en").replace(/,/g,""):e.toString(10)},e:(e,t)=>e.toExponential(t),f:(e,t)=>e.toFixed(t),g:(e,t)=>e.toPrecision(t),o:e=>Math.round(e).toString(8),p:(e,t)=>C9(100*e,t),r:C9,s:function(e,t){var n=j9(e,t);if(!n)return e+"";var r=n[0],i=n[1],o=i-(v9=3*Math.max(-8,Math.min(8,Math.floor(i/3))))+1,a=r.length;return o===a?r:o>a?r+new Array(o-a+1).join("0"):o>0?r.slice(0,o)+"."+r.slice(o):"0."+new Array(1-o).join("0")+j9(e,Math.max(0,t+o-1))[0]},X:e=>Math.round(e).toString(16).toUpperCase(),x:e=>Math.round(e).toString(16)};function S9(e){return e}var A9,k9,T9,E9=Array.prototype.map,M9=["y","z","a","f","p","n","\xb5","m","","k","M","G","T","P","E","Z","Y"];function O9(e){var t,n,r=void 0===e.grouping||void 0===e.thousands?S9:(t=E9.call(e.grouping,Number),n=e.thousands+"",function(e,r){for(var i=e.length,o=[],a=0,s=t[0],l=0;i>0&&s>0&&(l+s+1>r&&(s=Math.max(1,r-l)),o.push(e.substring(i-=s,i+s)),!((l+=s+1)>r));)s=t[a=(a+1)%t.length];return o.reverse().join(n)}),i=void 0===e.currency?"":e.currency[0]+"",o=void 0===e.currency?"":e.currency[1]+"",a=void 0===e.decimal?".":e.decimal+"",s=void 0===e.numerals?S9:function(e){return function(t){return t.replace(/[0-9]/g,function(t){return e[+t]})}}(E9.call(e.numerals,String)),l=void 0===e.percent?"%":e.percent+"",c=void 0===e.minus?"\u2212":e.minus+"",d=void 0===e.nan?"NaN":e.nan+"";function u(e){var t=(e=y9(e)).fill,n=e.align,u=e.sign,p=e.symbol,h=e.zero,m=e.width,f=e.comma,g=e.precision,v=e.trim,x=e.type;"n"===x?(f=!0,x="g"):w9[x]||(void 0===g&&(g=12),v=!0,x="g"),(h||"0"===t&&"="===n)&&(h=!0,t="0",n="=");var y="$"===p?i:"#"===p&&/[boxX]/.test(x)?"0"+x.toLowerCase():"",b="$"===p?o:/[%p]/.test(x)?l:"",j=w9[x],_=/[defgprs%]/.test(x);function C(e){var i,o,l,p=y,C=b;if("c"===x)C=j(e)+C,e="";else{var w=(e=+e)<0||1/e<0;if(e=isNaN(e)?d:j(Math.abs(e),g),v&&(e=function(e){e:for(var t,n=e.length,r=1,i=-1;r<n;++r)switch(e[r]){case".":i=t=r;break;case"0":0===i&&(i=r),t=r;break;default:if(!+e[r])break e;i>0&&(i=0)}return i>0?e.slice(0,i)+e.slice(t+1):e}(e)),w&&0===+e&&"+"!==u&&(w=!1),p=(w?"("===u?u:c:"-"===u||"("===u?"":u)+p,C=("s"===x?M9[8+v9/3]:"")+C+(w&&"("===u?")":""),_)for(i=-1,o=e.length;++i<o;)if(48>(l=e.charCodeAt(i))||l>57){C=(46===l?a+e.slice(i+1):e.slice(i))+C,e=e.slice(0,i);break}}f&&!h&&(e=r(e,1/0));var S=p.length+e.length+C.length,A=S<m?new Array(m-S+1).join(t):"";switch(f&&h&&(e=r(A+e,A.length?m-C.length:1/0),A=""),n){case"<":e=p+e+C+A;break;case"=":e=p+A+e+C;break;case"^":e=A.slice(0,S=A.length>>1)+p+e+C+A.slice(S);break;default:e=A+p+e+C}return s(e)}return g=void 0===g?6:/[gprs]/.test(x)?Math.max(1,Math.min(21,g)):Math.max(0,Math.min(20,g)),C.toString=function(){return e+""},C}return{format:u,formatPrefix:function(e,t){var n=u(((e=y9(e)).type="f",e)),r=3*Math.max(-8,Math.min(8,Math.floor(_9(t)/3))),i=Math.pow(10,-r),o=M9[8+r/3];return function(e){return n(i*e)+o}}}}function R9(e,t,n,r){var i,o=n4(e,t,n);switch((r=y9(null==r?",f":r)).type){case"s":var a=Math.max(Math.abs(e),Math.abs(t));return null!=r.precision||isNaN(i=function(e,t){return Math.max(0,3*Math.max(-8,Math.min(8,Math.floor(_9(t)/3)))-_9(Math.abs(e)))}(o,a))||(r.precision=i),T9(r,a);case"":case"e":case"g":case"p":case"r":null!=r.precision||isNaN(i=function(e,t){return e=Math.abs(e),t=Math.abs(t)-e,Math.max(0,_9(t)-_9(e))+1}(o,Math.max(Math.abs(e),Math.abs(t))))||(r.precision=i-("e"===r.type));break;case"f":case"%":null!=r.precision||isNaN(i=function(e){return Math.max(0,-_9(Math.abs(e)))}(o))||(r.precision=i-2*("%"===r.type))}return k9(r)}function P9(e){var t=e.domain;return e.ticks=function(e){var n=t();return e4(n[0],n[n.length-1],null==e?10:e)},e.tickFormat=function(e,n){var r=t();return R9(r[0],r[r.length-1],null==e?10:e,n)},e.nice=function(n){null==n&&(n=10);var r,i,o=t(),a=0,s=o.length-1,l=o[a],c=o[s],d=10;for(c<l&&(i=l,l=c,c=i,i=a,a=s,s=i);d-- >0;){if((i=t4(l,c,n))===r)return o[a]=l,o[s]=c,t(o);if(i>0)l=Math.floor(l/i)*i,c=Math.ceil(c/i)*i;else{if(!(i<0))break;l=Math.ceil(l*i)/i,c=Math.floor(c*i)/i}r=i}return e},e}function D9(){var e=g9();return e.copy=function(){return m9(e,D9())},t3.apply(e,arguments),P9(e)}function N9(e){var t;function n(e){return null==e||isNaN(e=+e)?t:e}return n.invert=n,n.domain=n.range=function(t){return arguments.length?(e=Array.from(t,l9),n):e.slice()},n.unknown=function(e){return arguments.length?(t=e,n):t},n.copy=function(){return N9(e).unknown(t)},e=arguments.length?Array.from(e,l9):[0,1],P9(n)}function L9(e,t){var n,r=0,i=(e=e.slice()).length-1,o=e[r],a=e[i];return a<o&&(n=r,r=i,i=n,n=o,o=a,a=n),e[r]=t.floor(o),e[i]=t.ceil(a),e}function I9(e){return Math.log(e)}function F9(e){return Math.exp(e)}function $9(e){return-Math.log(-e)}function B9(e){return-Math.exp(-e)}function z9(e){return isFinite(e)?+("1e"+e):e<0?0:e}function H9(e){return(t,n)=>-e(-t,n)}function W9(e){const t=e(I9,F9),n=t.domain;let r,i,o=10;function a(){return r=function(e){return e===Math.E?Math.log:10===e&&Math.log10||2===e&&Math.log2||(e=Math.log(e),t=>Math.log(t)/e)}(o),i=function(e){return 10===e?z9:e===Math.E?Math.exp:t=>Math.pow(e,t)}(o),n()[0]<0?(r=H9(r),i=H9(i),e($9,B9)):e(I9,F9),t}return t.base=function(e){return arguments.length?(o=+e,a()):o},t.domain=function(e){return arguments.length?(n(e),a()):n()},t.ticks=e=>{const t=n();let a=t[0],s=t[t.length-1];const l=s<a;l&&([a,s]=[s,a]);let c,d,u=r(a),p=r(s);const h=null==e?10:+e;let m=[];if(!(o%1)&&p-u<h){if(u=Math.floor(u),p=Math.ceil(p),a>0){for(;u<=p;++u)for(c=1;c<o;++c)if(d=u<0?c/i(-u):c*i(u),!(d<a)){if(d>s)break;m.push(d)}}else for(;u<=p;++u)for(c=o-1;c>=1;--c)if(d=u>0?c/i(-u):c*i(u),!(d<a)){if(d>s)break;m.push(d)}2*m.length<h&&(m=e4(a,s,h))}else m=e4(u,p,Math.min(p-u,h)).map(i);return l?m.reverse():m},t.tickFormat=(e,n)=>{if(null==e&&(e=10),null==n&&(n=10===o?"s":","),"function"!==typeof n&&(o%1||null!=(n=y9(n)).precision||(n.trim=!0),n=k9(n)),e===1/0)return n;const a=Math.max(1,o*e/t.ticks().length);return e=>{let t=e/i(Math.round(r(e)));return t*o<o-.5&&(t*=o),t<=a?n(e):""}},t.nice=()=>n(L9(n(),{floor:e=>i(Math.floor(r(e))),ceil:e=>i(Math.ceil(r(e)))})),t}function U9(){const e=W9(f9()).domain([1,10]);return e.copy=()=>m9(e,U9()).base(e.base()),t3.apply(e,arguments),e}function V9(e){return function(t){return Math.sign(t)*Math.log1p(Math.abs(t/e))}}function G9(e){return function(t){return Math.sign(t)*Math.expm1(Math.abs(t))*e}}function q9(e){var t=1,n=e(V9(t),G9(t));return n.constant=function(n){return arguments.length?e(V9(t=+n),G9(t)):t},P9(n)}function Y9(){var e=q9(f9());return e.copy=function(){return m9(e,Y9()).constant(e.constant())},t3.apply(e,arguments)}function Z9(e){return function(t){return t<0?-Math.pow(-t,e):Math.pow(t,e)}}function K9(e){return e<0?-Math.sqrt(-e):Math.sqrt(e)}function X9(e){return e<0?-e*e:e*e}function Q9(e){var t=e(d9,d9),n=1;return t.exponent=function(t){return arguments.length?1===(n=+t)?e(d9,d9):.5===n?e(K9,X9):e(Z9(n),Z9(1/n)):n},P9(t)}function J9(){var e=Q9(f9());return e.copy=function(){return m9(e,J9()).exponent(e.exponent())},t3.apply(e,arguments),e}function e8(){return J9.apply(null,arguments).exponent(.5)}function t8(e){return Math.sign(e)*e*e}function n8(){var e,t=g9(),n=[0,1],r=!1;function i(n){var i=function(e){return Math.sign(e)*Math.sqrt(Math.abs(e))}(t(n));return isNaN(i)?e:r?Math.round(i):i}return i.invert=function(e){return t.invert(t8(e))},i.domain=function(e){return arguments.length?(t.domain(e),i):t.domain()},i.range=function(e){return arguments.length?(t.range((n=Array.from(e,l9)).map(t8)),i):n.slice()},i.rangeRound=function(e){return i.range(e).round(!0)},i.round=function(e){return arguments.length?(r=!!e,i):r},i.clamp=function(e){return arguments.length?(t.clamp(e),i):t.clamp()},i.unknown=function(t){return arguments.length?(e=t,i):e},i.copy=function(){return n8(t.domain(),n).round(r).clamp(t.clamp()).unknown(e)},t3.apply(i,arguments),P9(i)}function r8(e,t){let n;if(void 0===t)for(const r of e)null!=r&&(n<r||void 0===n&&r>=r)&&(n=r);else{let r=-1;for(let i of e)null!=(i=t(i,++r,e))&&(n<i||void 0===n&&i>=i)&&(n=i)}return n}function i8(e,t){let n;if(void 0===t)for(const r of e)null!=r&&(n>r||void 0===n&&r>=r)&&(n=r);else{let r=-1;for(let i of e)null!=(i=t(i,++r,e))&&(n>i||void 0===n&&i>=i)&&(n=i)}return n}function o8(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:r4;if(e===r4)return a8;if("function"!==typeof e)throw new TypeError("compare is not a function");return(t,n)=>{const r=e(t,n);return r||0===r?r:(0===e(n,n))-(0===e(t,t))}}function a8(e,t){return(null==e||!(e>=e))-(null==t||!(t>=t))||(e<t?-1:e>t?1:0)}function s8(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:1/0,i=arguments.length>4?arguments[4]:void 0;if(t=Math.floor(t),n=Math.floor(Math.max(0,n)),r=Math.floor(Math.min(e.length-1,r)),!(n<=t&&t<=r))return e;for(i=void 0===i?a8:o8(i);r>n;){if(r-n>600){const o=r-n+1,a=t-n+1,s=Math.log(o),l=.5*Math.exp(2*s/3),c=.5*Math.sqrt(s*l*(o-l)/o)*(a-o/2<0?-1:1);s8(e,t,Math.max(n,Math.floor(t-a*l/o+c)),Math.min(r,Math.floor(t+(o-a)*l/o+c)),i)}const o=e[t];let a=n,s=r;for(l8(e,n,t),i(e[r],o)>0&&l8(e,n,r);a<s;){for(l8(e,a,s),++a,--s;i(e[a],o)<0;)++a;for(;i(e[s],o)>0;)--s}0===i(e[n],o)?l8(e,n,s):(++s,l8(e,s,r)),s<=t&&(n=s+1),t<=s&&(r=s-1)}return e}function l8(e,t,n){const r=e[t];e[t]=e[n],e[n]=r}function c8(e,t,n){if(e=Float64Array.from(function*(e,t){if(void 0===t)for(let n of e)null!=n&&(n=+n)>=n&&(yield n);else{let n=-1;for(let r of e)null!=(r=t(r,++n,e))&&(r=+r)>=r&&(yield r)}}(e,n)),(r=e.length)&&!isNaN(t=+t)){if(t<=0||r<2)return i8(e);if(t>=1)return r8(e);var r,i=(r-1)*t,o=Math.floor(i),a=r8(s8(e,o).subarray(0,o+1));return a+(i8(e.subarray(o+1))-a)*(i-o)}}function d8(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:s4;if((r=e.length)&&!isNaN(t=+t)){if(t<=0||r<2)return+n(e[0],0,e);if(t>=1)return+n(e[r-1],r-1,e);var r,i=(r-1)*t,o=Math.floor(i),a=+n(e[o],o,e);return a+(+n(e[o+1],o+1,e)-a)*(i-o)}}function u8(){var e,t=[],n=[],r=[];function i(){var e=0,i=Math.max(1,n.length);for(r=new Array(i-1);++e<i;)r[e-1]=d8(t,e/i);return o}function o(t){return null==t||isNaN(t=+t)?e:n[d4(r,t)]}return o.invertExtent=function(e){var i=n.indexOf(e);return i<0?[NaN,NaN]:[i>0?r[i-1]:t[0],i<r.length?r[i]:t[t.length-1]]},o.domain=function(e){if(!arguments.length)return t.slice();t=[];for(let n of e)null==n||isNaN(n=+n)||t.push(n);return t.sort(r4),i()},o.range=function(e){return arguments.length?(n=Array.from(e),i()):n.slice()},o.unknown=function(t){return arguments.length?(e=t,o):e},o.quantiles=function(){return r.slice()},o.copy=function(){return u8().domain(t).range(n).unknown(e)},t3.apply(o,arguments)}function p8(){var e,t=0,n=1,r=1,i=[.5],o=[0,1];function a(t){return null!=t&&t<=t?o[d4(i,t,0,r)]:e}function s(){var e=-1;for(i=new Array(r);++e<r;)i[e]=((e+1)*n-(e-r)*t)/(r+1);return a}return a.domain=function(e){return arguments.length?([t,n]=e,t=+t,n=+n,s()):[t,n]},a.range=function(e){return arguments.length?(r=(o=Array.from(e)).length-1,s()):o.slice()},a.invertExtent=function(e){var a=o.indexOf(e);return a<0?[NaN,NaN]:a<1?[t,i[0]]:a>=r?[i[r-1],n]:[i[a-1],i[a]]},a.unknown=function(t){return arguments.length?(e=t,a):a},a.thresholds=function(){return i.slice()},a.copy=function(){return p8().domain([t,n]).range(o).unknown(e)},t3.apply(P9(a),arguments)}function h8(){var e,t=[.5],n=[0,1],r=1;function i(i){return null!=i&&i<=i?n[d4(t,i,0,r)]:e}return i.domain=function(e){return arguments.length?(t=Array.from(e),r=Math.min(t.length,n.length-1),i):t.slice()},i.range=function(e){return arguments.length?(n=Array.from(e),r=Math.min(t.length,n.length-1),i):n.slice()},i.invertExtent=function(e){var r=n.indexOf(e);return[t[r-1],t[r]]},i.unknown=function(t){return arguments.length?(e=t,i):e},i.copy=function(){return h8().domain(t).range(n).unknown(e)},t3.apply(i,arguments)}A9=O9({thousands:",",grouping:[3],currency:["$",""]}),k9=A9.format,T9=A9.formatPrefix;const m8=1e3,f8=6e4,g8=36e5,v8=864e5,x8=6048e5,y8=2592e6,b8=31536e6,j8=new Date,_8=new Date;function C8(e,t,n,r){function i(t){return e(t=0===arguments.length?new Date:new Date(+t)),t}return i.floor=t=>(e(t=new Date(+t)),t),i.ceil=n=>(e(n=new Date(n-1)),t(n,1),e(n),n),i.round=e=>{const t=i(e),n=i.ceil(e);return e-t<n-e?t:n},i.offset=(e,n)=>(t(e=new Date(+e),null==n?1:Math.floor(n)),e),i.range=(n,r,o)=>{const a=[];if(n=i.ceil(n),o=null==o?1:Math.floor(o),!(n<r)||!(o>0))return a;let s;do{a.push(s=new Date(+n)),t(n,o),e(n)}while(s<n&&n<r);return a},i.filter=n=>C8(t=>{if(t>=t)for(;e(t),!n(t);)t.setTime(t-1)},(e,r)=>{if(e>=e)if(r<0)for(;++r<=0;)for(;t(e,-1),!n(e););else for(;--r>=0;)for(;t(e,1),!n(e););}),n&&(i.count=(t,r)=>(j8.setTime(+t),_8.setTime(+r),e(j8),e(_8),Math.floor(n(j8,_8))),i.every=e=>(e=Math.floor(e),isFinite(e)&&e>0?e>1?i.filter(r?t=>r(t)%e===0:t=>i.count(0,t)%e===0):i:null)),i}const w8=C8(()=>{},(e,t)=>{e.setTime(+e+t)},(e,t)=>t-e);w8.every=e=>(e=Math.floor(e),isFinite(e)&&e>0?e>1?C8(t=>{t.setTime(Math.floor(t/e)*e)},(t,n)=>{t.setTime(+t+n*e)},(t,n)=>(n-t)/e):w8:null);w8.range;const S8=C8(e=>{e.setTime(e-e.getMilliseconds())},(e,t)=>{e.setTime(+e+t*m8)},(e,t)=>(t-e)/m8,e=>e.getUTCSeconds()),A8=(S8.range,C8(e=>{e.setTime(e-e.getMilliseconds()-e.getSeconds()*m8)},(e,t)=>{e.setTime(+e+t*f8)},(e,t)=>(t-e)/f8,e=>e.getMinutes())),k8=(A8.range,C8(e=>{e.setUTCSeconds(0,0)},(e,t)=>{e.setTime(+e+t*f8)},(e,t)=>(t-e)/f8,e=>e.getUTCMinutes())),T8=(k8.range,C8(e=>{e.setTime(e-e.getMilliseconds()-e.getSeconds()*m8-e.getMinutes()*f8)},(e,t)=>{e.setTime(+e+t*g8)},(e,t)=>(t-e)/g8,e=>e.getHours())),E8=(T8.range,C8(e=>{e.setUTCMinutes(0,0,0)},(e,t)=>{e.setTime(+e+t*g8)},(e,t)=>(t-e)/g8,e=>e.getUTCHours())),M8=(E8.range,C8(e=>e.setHours(0,0,0,0),(e,t)=>e.setDate(e.getDate()+t),(e,t)=>(t-e-(t.getTimezoneOffset()-e.getTimezoneOffset())*f8)/v8,e=>e.getDate()-1)),O8=(M8.range,C8(e=>{e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+t)},(e,t)=>(t-e)/v8,e=>e.getUTCDate()-1)),R8=(O8.range,C8(e=>{e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+t)},(e,t)=>(t-e)/v8,e=>Math.floor(e/v8)));R8.range;function P8(e){return C8(t=>{t.setDate(t.getDate()-(t.getDay()+7-e)%7),t.setHours(0,0,0,0)},(e,t)=>{e.setDate(e.getDate()+7*t)},(e,t)=>(t-e-(t.getTimezoneOffset()-e.getTimezoneOffset())*f8)/x8)}const D8=P8(0),N8=P8(1),L8=P8(2),I8=P8(3),F8=P8(4),$8=P8(5),B8=P8(6);D8.range,N8.range,L8.range,I8.range,F8.range,$8.range,B8.range;function z8(e){return C8(t=>{t.setUTCDate(t.getUTCDate()-(t.getUTCDay()+7-e)%7),t.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+7*t)},(e,t)=>(t-e)/x8)}const H8=z8(0),W8=z8(1),U8=z8(2),V8=z8(3),G8=z8(4),q8=z8(5),Y8=z8(6),Z8=(H8.range,W8.range,U8.range,V8.range,G8.range,q8.range,Y8.range,C8(e=>{e.setDate(1),e.setHours(0,0,0,0)},(e,t)=>{e.setMonth(e.getMonth()+t)},(e,t)=>t.getMonth()-e.getMonth()+12*(t.getFullYear()-e.getFullYear()),e=>e.getMonth())),K8=(Z8.range,C8(e=>{e.setUTCDate(1),e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCMonth(e.getUTCMonth()+t)},(e,t)=>t.getUTCMonth()-e.getUTCMonth()+12*(t.getUTCFullYear()-e.getUTCFullYear()),e=>e.getUTCMonth())),X8=(K8.range,C8(e=>{e.setMonth(0,1),e.setHours(0,0,0,0)},(e,t)=>{e.setFullYear(e.getFullYear()+t)},(e,t)=>t.getFullYear()-e.getFullYear(),e=>e.getFullYear()));X8.every=e=>isFinite(e=Math.floor(e))&&e>0?C8(t=>{t.setFullYear(Math.floor(t.getFullYear()/e)*e),t.setMonth(0,1),t.setHours(0,0,0,0)},(t,n)=>{t.setFullYear(t.getFullYear()+n*e)}):null;X8.range;const Q8=C8(e=>{e.setUTCMonth(0,1),e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCFullYear(e.getUTCFullYear()+t)},(e,t)=>t.getUTCFullYear()-e.getUTCFullYear(),e=>e.getUTCFullYear());Q8.every=e=>isFinite(e=Math.floor(e))&&e>0?C8(t=>{t.setUTCFullYear(Math.floor(t.getUTCFullYear()/e)*e),t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0)},(t,n)=>{t.setUTCFullYear(t.getUTCFullYear()+n*e)}):null;Q8.range;function J8(e,t,n,r,i,o){const a=[[S8,1,m8],[S8,5,5e3],[S8,15,15e3],[S8,30,3e4],[o,1,f8],[o,5,3e5],[o,15,9e5],[o,30,18e5],[i,1,g8],[i,3,108e5],[i,6,216e5],[i,12,432e5],[r,1,v8],[r,2,1728e5],[n,1,x8],[t,1,y8],[t,3,7776e6],[e,1,b8]];function s(t,n,r){const i=Math.abs(n-t)/r,o=o4(e=>{let[,,t]=e;return t}).right(a,i);if(o===a.length)return e.every(n4(t/b8,n/b8,r));if(0===o)return w8.every(Math.max(n4(t,n,r),1));const[s,l]=a[i/a[o-1][2]<a[o][2]/i?o-1:o];return s.every(l)}return[function(e,t,n){const r=t<e;r&&([e,t]=[t,e]);const i=n&&"function"===typeof n.range?n:s(e,t,n),o=i?i.range(e,+t+1):[];return r?o.reverse():o},s]}const[e7,t7]=J8(Q8,K8,H8,R8,E8,k8),[n7,r7]=J8(X8,Z8,D8,M8,T8,A8);function i7(e){if(0<=e.y&&e.y<100){var t=new Date(-1,e.m,e.d,e.H,e.M,e.S,e.L);return t.setFullYear(e.y),t}return new Date(e.y,e.m,e.d,e.H,e.M,e.S,e.L)}function o7(e){if(0<=e.y&&e.y<100){var t=new Date(Date.UTC(-1,e.m,e.d,e.H,e.M,e.S,e.L));return t.setUTCFullYear(e.y),t}return new Date(Date.UTC(e.y,e.m,e.d,e.H,e.M,e.S,e.L))}function a7(e,t,n){return{y:e,m:t,d:n,H:0,M:0,S:0,L:0}}var s7,l7,c7,d7={"-":"",_:" ",0:"0"},u7=/^\s*\d+/,p7=/^%/,h7=/[\\^$*+?|[\]().{}]/g;function m7(e,t,n){var r=e<0?"-":"",i=(r?-e:e)+"",o=i.length;return r+(o<n?new Array(n-o+1).join(t)+i:i)}function f7(e){return e.replace(h7,"\\$&")}function g7(e){return new RegExp("^(?:"+e.map(f7).join("|")+")","i")}function v7(e){return new Map(e.map((e,t)=>[e.toLowerCase(),t]))}function x7(e,t,n){var r=u7.exec(t.slice(n,n+1));return r?(e.w=+r[0],n+r[0].length):-1}function y7(e,t,n){var r=u7.exec(t.slice(n,n+1));return r?(e.u=+r[0],n+r[0].length):-1}function b7(e,t,n){var r=u7.exec(t.slice(n,n+2));return r?(e.U=+r[0],n+r[0].length):-1}function j7(e,t,n){var r=u7.exec(t.slice(n,n+2));return r?(e.V=+r[0],n+r[0].length):-1}function _7(e,t,n){var r=u7.exec(t.slice(n,n+2));return r?(e.W=+r[0],n+r[0].length):-1}function C7(e,t,n){var r=u7.exec(t.slice(n,n+4));return r?(e.y=+r[0],n+r[0].length):-1}function w7(e,t,n){var r=u7.exec(t.slice(n,n+2));return r?(e.y=+r[0]+(+r[0]>68?1900:2e3),n+r[0].length):-1}function S7(e,t,n){var r=/^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(t.slice(n,n+6));return r?(e.Z=r[1]?0:-(r[2]+(r[3]||"00")),n+r[0].length):-1}function A7(e,t,n){var r=u7.exec(t.slice(n,n+1));return r?(e.q=3*r[0]-3,n+r[0].length):-1}function k7(e,t,n){var r=u7.exec(t.slice(n,n+2));return r?(e.m=r[0]-1,n+r[0].length):-1}function T7(e,t,n){var r=u7.exec(t.slice(n,n+2));return r?(e.d=+r[0],n+r[0].length):-1}function E7(e,t,n){var r=u7.exec(t.slice(n,n+3));return r?(e.m=0,e.d=+r[0],n+r[0].length):-1}function M7(e,t,n){var r=u7.exec(t.slice(n,n+2));return r?(e.H=+r[0],n+r[0].length):-1}function O7(e,t,n){var r=u7.exec(t.slice(n,n+2));return r?(e.M=+r[0],n+r[0].length):-1}function R7(e,t,n){var r=u7.exec(t.slice(n,n+2));return r?(e.S=+r[0],n+r[0].length):-1}function P7(e,t,n){var r=u7.exec(t.slice(n,n+3));return r?(e.L=+r[0],n+r[0].length):-1}function D7(e,t,n){var r=u7.exec(t.slice(n,n+6));return r?(e.L=Math.floor(r[0]/1e3),n+r[0].length):-1}function N7(e,t,n){var r=p7.exec(t.slice(n,n+1));return r?n+r[0].length:-1}function L7(e,t,n){var r=u7.exec(t.slice(n));return r?(e.Q=+r[0],n+r[0].length):-1}function I7(e,t,n){var r=u7.exec(t.slice(n));return r?(e.s=+r[0],n+r[0].length):-1}function F7(e,t){return m7(e.getDate(),t,2)}function $7(e,t){return m7(e.getHours(),t,2)}function B7(e,t){return m7(e.getHours()%12||12,t,2)}function z7(e,t){return m7(1+M8.count(X8(e),e),t,3)}function H7(e,t){return m7(e.getMilliseconds(),t,3)}function W7(e,t){return H7(e,t)+"000"}function U7(e,t){return m7(e.getMonth()+1,t,2)}function V7(e,t){return m7(e.getMinutes(),t,2)}function G7(e,t){return m7(e.getSeconds(),t,2)}function q7(e){var t=e.getDay();return 0===t?7:t}function Y7(e,t){return m7(D8.count(X8(e)-1,e),t,2)}function Z7(e){var t=e.getDay();return t>=4||0===t?F8(e):F8.ceil(e)}function K7(e,t){return e=Z7(e),m7(F8.count(X8(e),e)+(4===X8(e).getDay()),t,2)}function X7(e){return e.getDay()}function Q7(e,t){return m7(N8.count(X8(e)-1,e),t,2)}function J7(e,t){return m7(e.getFullYear()%100,t,2)}function eee(e,t){return m7((e=Z7(e)).getFullYear()%100,t,2)}function tee(e,t){return m7(e.getFullYear()%1e4,t,4)}function nee(e,t){var n=e.getDay();return m7((e=n>=4||0===n?F8(e):F8.ceil(e)).getFullYear()%1e4,t,4)}function ree(e){var t=e.getTimezoneOffset();return(t>0?"-":(t*=-1,"+"))+m7(t/60|0,"0",2)+m7(t%60,"0",2)}function iee(e,t){return m7(e.getUTCDate(),t,2)}function oee(e,t){return m7(e.getUTCHours(),t,2)}function aee(e,t){return m7(e.getUTCHours()%12||12,t,2)}function see(e,t){return m7(1+O8.count(Q8(e),e),t,3)}function lee(e,t){return m7(e.getUTCMilliseconds(),t,3)}function cee(e,t){return lee(e,t)+"000"}function dee(e,t){return m7(e.getUTCMonth()+1,t,2)}function uee(e,t){return m7(e.getUTCMinutes(),t,2)}function pee(e,t){return m7(e.getUTCSeconds(),t,2)}function hee(e){var t=e.getUTCDay();return 0===t?7:t}function mee(e,t){return m7(H8.count(Q8(e)-1,e),t,2)}function fee(e){var t=e.getUTCDay();return t>=4||0===t?G8(e):G8.ceil(e)}function gee(e,t){return e=fee(e),m7(G8.count(Q8(e),e)+(4===Q8(e).getUTCDay()),t,2)}function vee(e){return e.getUTCDay()}function xee(e,t){return m7(W8.count(Q8(e)-1,e),t,2)}function yee(e,t){return m7(e.getUTCFullYear()%100,t,2)}function bee(e,t){return m7((e=fee(e)).getUTCFullYear()%100,t,2)}function jee(e,t){return m7(e.getUTCFullYear()%1e4,t,4)}function _ee(e,t){var n=e.getUTCDay();return m7((e=n>=4||0===n?G8(e):G8.ceil(e)).getUTCFullYear()%1e4,t,4)}function Cee(){return"+0000"}function wee(){return"%"}function See(e){return+e}function Aee(e){return Math.floor(+e/1e3)}function kee(e){return new Date(e)}function Tee(e){return e instanceof Date?+e:+new Date(+e)}function Eee(e,t,n,r,i,o,a,s,l,c){var d=g9(),u=d.invert,p=d.domain,h=c(".%L"),m=c(":%S"),f=c("%I:%M"),g=c("%I %p"),v=c("%a %d"),x=c("%b %d"),y=c("%B"),b=c("%Y");function j(e){return(l(e)<e?h:s(e)<e?m:a(e)<e?f:o(e)<e?g:r(e)<e?i(e)<e?v:x:n(e)<e?y:b)(e)}return d.invert=function(e){return new Date(u(e))},d.domain=function(e){return arguments.length?p(Array.from(e,Tee)):p().map(kee)},d.ticks=function(t){var n=p();return e(n[0],n[n.length-1],null==t?10:t)},d.tickFormat=function(e,t){return null==t?j:c(t)},d.nice=function(e){var n=p();return e&&"function"===typeof e.range||(e=t(n[0],n[n.length-1],null==e?10:e)),e?p(L9(n,e)):d},d.copy=function(){return m9(d,Eee(e,t,n,r,i,o,a,s,l,c))},d}function Mee(){return t3.apply(Eee(n7,r7,X8,Z8,D8,M8,T8,A8,S8,l7).domain([new Date(2e3,0,1),new Date(2e3,0,2)]),arguments)}function Oee(){return t3.apply(Eee(e7,t7,Q8,K8,H8,O8,E8,k8,S8,c7).domain([Date.UTC(2e3,0,1),Date.UTC(2e3,0,2)]),arguments)}function Ree(){var e,t,n,r,i,o=0,a=1,s=d9,l=!1;function c(t){return null==t||isNaN(t=+t)?i:s(0===n?.5:(t=(r(t)-e)*n,l?Math.max(0,Math.min(1,t)):t))}function d(e){return function(t){var n,r;return arguments.length?([n,r]=t,s=e(n,r),c):[s(0),s(1)]}}return c.domain=function(i){return arguments.length?([o,a]=i,e=r(o=+o),t=r(a=+a),n=e===t?0:1/(t-e),c):[o,a]},c.clamp=function(e){return arguments.length?(l=!!e,c):l},c.interpolator=function(e){return arguments.length?(s=e,c):s},c.range=d(a9),c.rangeRound=d(s9),c.unknown=function(e){return arguments.length?(i=e,c):i},function(i){return r=i,e=i(o),t=i(a),n=e===t?0:1/(t-e),c}}function Pee(e,t){return t.domain(e.domain()).interpolator(e.interpolator()).clamp(e.clamp()).unknown(e.unknown())}function Dee(){var e=P9(Ree()(d9));return e.copy=function(){return Pee(e,Dee())},n3.apply(e,arguments)}function Nee(){var e=W9(Ree()).domain([1,10]);return e.copy=function(){return Pee(e,Nee()).base(e.base())},n3.apply(e,arguments)}function Lee(){var e=q9(Ree());return e.copy=function(){return Pee(e,Lee()).constant(e.constant())},n3.apply(e,arguments)}function Iee(){var e=Q9(Ree());return e.copy=function(){return Pee(e,Iee()).exponent(e.exponent())},n3.apply(e,arguments)}function Fee(){return Iee.apply(null,arguments).exponent(.5)}function $ee(){var e=[],t=d9;function n(n){if(null!=n&&!isNaN(n=+n))return t((d4(e,n,1)-1)/(e.length-1))}return n.domain=function(t){if(!arguments.length)return e.slice();e=[];for(let n of t)null==n||isNaN(n=+n)||e.push(n);return e.sort(r4),n},n.interpolator=function(e){return arguments.length?(t=e,n):t},n.range=function(){return e.map((n,r)=>t(r/(e.length-1)))},n.quantiles=function(t){return Array.from({length:t+1},(n,r)=>c8(e,r/t))},n.copy=function(){return $ee(t).domain(e)},n3.apply(n,arguments)}function Bee(){var e,t,n,r,i,o,a,s=0,l=.5,c=1,d=1,u=d9,p=!1;function h(e){return isNaN(e=+e)?a:(e=.5+((e=+o(e))-t)*(d*e<d*t?r:i),u(p?Math.max(0,Math.min(1,e)):e))}function m(e){return function(t){var n,r,i;return arguments.length?([n,r,i]=t,u=function(e,t){void 0===t&&(t=e,e=a9);for(var n=0,r=t.length-1,i=t[0],o=new Array(r<0?0:r);n<r;)o[n]=e(i,i=t[++n]);return function(e){var t=Math.max(0,Math.min(r-1,Math.floor(e*=r)));return o[t](e-t)}}(e,[n,r,i]),h):[u(0),u(.5),u(1)]}}return h.domain=function(a){return arguments.length?([s,l,c]=a,e=o(s=+s),t=o(l=+l),n=o(c=+c),r=e===t?0:.5/(t-e),i=t===n?0:.5/(n-t),d=t<e?-1:1,h):[s,l,c]},h.clamp=function(e){return arguments.length?(p=!!e,h):p},h.interpolator=function(e){return arguments.length?(u=e,h):u},h.range=m(a9),h.rangeRound=m(s9),h.unknown=function(e){return arguments.length?(a=e,h):a},function(a){return o=a,e=a(s),t=a(l),n=a(c),r=e===t?0:.5/(t-e),i=t===n?0:.5/(n-t),d=t<e?-1:1,h}}function zee(){var e=P9(Bee()(d9));return e.copy=function(){return Pee(e,zee())},n3.apply(e,arguments)}function Hee(){var e=W9(Bee()).domain([.1,1,10]);return e.copy=function(){return Pee(e,Hee()).base(e.base())},n3.apply(e,arguments)}function Wee(){var e=q9(Bee());return e.copy=function(){return Pee(e,Wee()).constant(e.constant())},n3.apply(e,arguments)}function Uee(){var e=Q9(Bee());return e.copy=function(){return Pee(e,Uee()).exponent(e.exponent())},n3.apply(e,arguments)}function Vee(){return Uee.apply(null,arguments).exponent(.5)}function Gee(e,t){if((i=e.length)>1)for(var n,r,i,o=1,a=e[t[0]],s=a.length;o<i;++o)for(r=a,a=e[t[o]],n=0;n<s;++n)a[n][1]+=a[n][0]=isNaN(r[n][1])?r[n][0]:r[n][1]}!function(e){s7=function(e){var t=e.dateTime,n=e.date,r=e.time,i=e.periods,o=e.days,a=e.shortDays,s=e.months,l=e.shortMonths,c=g7(i),d=v7(i),u=g7(o),p=v7(o),h=g7(a),m=v7(a),f=g7(s),g=v7(s),v=g7(l),x=v7(l),y={a:function(e){return a[e.getDay()]},A:function(e){return o[e.getDay()]},b:function(e){return l[e.getMonth()]},B:function(e){return s[e.getMonth()]},c:null,d:F7,e:F7,f:W7,g:eee,G:nee,H:$7,I:B7,j:z7,L:H7,m:U7,M:V7,p:function(e){return i[+(e.getHours()>=12)]},q:function(e){return 1+~~(e.getMonth()/3)},Q:See,s:Aee,S:G7,u:q7,U:Y7,V:K7,w:X7,W:Q7,x:null,X:null,y:J7,Y:tee,Z:ree,"%":wee},b={a:function(e){return a[e.getUTCDay()]},A:function(e){return o[e.getUTCDay()]},b:function(e){return l[e.getUTCMonth()]},B:function(e){return s[e.getUTCMonth()]},c:null,d:iee,e:iee,f:cee,g:bee,G:_ee,H:oee,I:aee,j:see,L:lee,m:dee,M:uee,p:function(e){return i[+(e.getUTCHours()>=12)]},q:function(e){return 1+~~(e.getUTCMonth()/3)},Q:See,s:Aee,S:pee,u:hee,U:mee,V:gee,w:vee,W:xee,x:null,X:null,y:yee,Y:jee,Z:Cee,"%":wee},j={a:function(e,t,n){var r=h.exec(t.slice(n));return r?(e.w=m.get(r[0].toLowerCase()),n+r[0].length):-1},A:function(e,t,n){var r=u.exec(t.slice(n));return r?(e.w=p.get(r[0].toLowerCase()),n+r[0].length):-1},b:function(e,t,n){var r=v.exec(t.slice(n));return r?(e.m=x.get(r[0].toLowerCase()),n+r[0].length):-1},B:function(e,t,n){var r=f.exec(t.slice(n));return r?(e.m=g.get(r[0].toLowerCase()),n+r[0].length):-1},c:function(e,n,r){return w(e,t,n,r)},d:T7,e:T7,f:D7,g:w7,G:C7,H:M7,I:M7,j:E7,L:P7,m:k7,M:O7,p:function(e,t,n){var r=c.exec(t.slice(n));return r?(e.p=d.get(r[0].toLowerCase()),n+r[0].length):-1},q:A7,Q:L7,s:I7,S:R7,u:y7,U:b7,V:j7,w:x7,W:_7,x:function(e,t,r){return w(e,n,t,r)},X:function(e,t,n){return w(e,r,t,n)},y:w7,Y:C7,Z:S7,"%":N7};function _(e,t){return function(n){var r,i,o,a=[],s=-1,l=0,c=e.length;for(n instanceof Date||(n=new Date(+n));++s<c;)37===e.charCodeAt(s)&&(a.push(e.slice(l,s)),null!=(i=d7[r=e.charAt(++s)])?r=e.charAt(++s):i="e"===r?" ":"0",(o=t[r])&&(r=o(n,i)),a.push(r),l=s+1);return a.push(e.slice(l,s)),a.join("")}}function C(e,t){return function(n){var r,i,o=a7(1900,void 0,1);if(w(o,e,n+="",0)!=n.length)return null;if("Q"in o)return new Date(o.Q);if("s"in o)return new Date(1e3*o.s+("L"in o?o.L:0));if(t&&!("Z"in o)&&(o.Z=0),"p"in o&&(o.H=o.H%12+12*o.p),void 0===o.m&&(o.m="q"in o?o.q:0),"V"in o){if(o.V<1||o.V>53)return null;"w"in o||(o.w=1),"Z"in o?(i=(r=o7(a7(o.y,0,1))).getUTCDay(),r=i>4||0===i?W8.ceil(r):W8(r),r=O8.offset(r,7*(o.V-1)),o.y=r.getUTCFullYear(),o.m=r.getUTCMonth(),o.d=r.getUTCDate()+(o.w+6)%7):(i=(r=i7(a7(o.y,0,1))).getDay(),r=i>4||0===i?N8.ceil(r):N8(r),r=M8.offset(r,7*(o.V-1)),o.y=r.getFullYear(),o.m=r.getMonth(),o.d=r.getDate()+(o.w+6)%7)}else("W"in o||"U"in o)&&("w"in o||(o.w="u"in o?o.u%7:"W"in o?1:0),i="Z"in o?o7(a7(o.y,0,1)).getUTCDay():i7(a7(o.y,0,1)).getDay(),o.m=0,o.d="W"in o?(o.w+6)%7+7*o.W-(i+5)%7:o.w+7*o.U-(i+6)%7);return"Z"in o?(o.H+=o.Z/100|0,o.M+=o.Z%100,o7(o)):i7(o)}}function w(e,t,n,r){for(var i,o,a=0,s=t.length,l=n.length;a<s;){if(r>=l)return-1;if(37===(i=t.charCodeAt(a++))){if(i=t.charAt(a++),!(o=j[i in d7?t.charAt(a++):i])||(r=o(e,n,r))<0)return-1}else if(i!=n.charCodeAt(r++))return-1}return r}return y.x=_(n,y),y.X=_(r,y),y.c=_(t,y),b.x=_(n,b),b.X=_(r,b),b.c=_(t,b),{format:function(e){var t=_(e+="",y);return t.toString=function(){return e},t},parse:function(e){var t=C(e+="",!1);return t.toString=function(){return e},t},utcFormat:function(e){var t=_(e+="",b);return t.toString=function(){return e},t},utcParse:function(e){var t=C(e+="",!0);return t.toString=function(){return e},t}}}(e),l7=s7.format,s7.parse,c7=s7.utcFormat,s7.utcParse}({dateTime:"%x, %X",date:"%-m/%-d/%Y",time:"%-I:%M:%S %p",periods:["AM","PM"],days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],shortDays:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],shortMonths:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"]});Array.prototype.slice;function qee(e){return"object"===typeof e&&"length"in e?e:Array.from(e)}function Yee(e){for(var t=e.length,n=new Array(t);--t>=0;)n[t]=t;return n}function Zee(e,t){return e[t]}function Kee(e){const t=[];return t.key=e,t}var Xee=n(50539),Qee=n.n(Xee),Jee=n(76745),ete=n.n(Jee),tte=n(63538),nte=n.n(tte),rte=n(19853),ite=n.n(rte),ote=n(98210),ate=n.n(ote);function ste(e){return function(e){if(Array.isArray(e))return lte(e)}(e)||function(e){if("undefined"!==typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}(e)||function(e,t){if(!e)return;if("string"===typeof e)return lte(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return lte(e,t)}(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.")}()}function lte(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var cte=function(e){return e},dte={"@@functional/placeholder":!0},ute=function(e){return e===dte},pte=function(e){return function t(){return 0===arguments.length||1===arguments.length&&ute(arguments.length<=0?void 0:arguments[0])?t:e.apply(void 0,arguments)}},hte=function e(t,n){return 1===t?n:pte(function(){for(var r=arguments.length,i=new Array(r),o=0;o<r;o++)i[o]=arguments[o];var a=i.filter(function(e){return e!==dte}).length;return a>=t?n.apply(void 0,i):e(t-a,pte(function(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];var o=i.map(function(e){return ute(e)?t.shift():e});return n.apply(void 0,ste(o).concat(t))}))})},mte=function(e){return hte(e.length,e)},fte=function(e,t){for(var n=[],r=e;r<t;++r)n[r-e]=r;return n},gte=mte(function(e,t){return Array.isArray(t)?t.map(e):Object.keys(t).map(function(e){return t[e]}).map(e)}),vte=function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];if(!t.length)return cte;var r=t.reverse(),i=r[0],o=r.slice(1);return function(){return o.reduce(function(e,t){return t(e)},i.apply(void 0,arguments))}},xte=function(e){return Array.isArray(e)?e.reverse():e.split("").reverse.join("")},yte=function(e){var t=null,n=null;return function(){for(var r=arguments.length,i=new Array(r),o=0;o<r;o++)i[o]=arguments[o];return t&&i.every(function(e,n){return e===t[n]})?n:(t=i,n=e.apply(void 0,i))}};var bte=mte(function(e,t,n){var r=+e;return r+n*(+t-r)}),jte=mte(function(e,t,n){var r=t-+e;return(n-e)/(r=r||1/0)}),_te=mte(function(e,t,n){var r=t-+e;return r=r||1/0,Math.max(0,Math.min(1,(n-e)/r))});const Cte={rangeStep:function(e,t,n){for(var r=new(ate())(e),i=0,o=[];r.lt(t)&&i<1e5;)o.push(r.toNumber()),r=r.add(n),i++;return o},getDigitCount:function(e){return 0===e?1:Math.floor(new(ate())(e).abs().log(10).toNumber())+1},interpolateNumber:bte,uninterpolateNumber:jte,uninterpolateTruncation:_te};function wte(e){return function(e){if(Array.isArray(e))return kte(e)}(e)||function(e){if("undefined"!==typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}(e)||Ate(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.")}()}function Ste(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"===typeof Symbol||!(Symbol.iterator in Object(e)))return;var n=[],r=!0,i=!1,o=void 0;try{for(var a,s=e[Symbol.iterator]();!(r=(a=s.next()).done)&&(n.push(a.value),!t||n.length!==t);r=!0);}catch(l){i=!0,o=l}finally{try{r||null==s.return||s.return()}finally{if(i)throw o}}return n}(e,t)||Ate(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Ate(e,t){if(e){if("string"===typeof e)return kte(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)?kte(e,t):void 0}}function kte(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function Tte(e){var t=Ste(e,2),n=t[0],r=t[1],i=n,o=r;return n>r&&(i=r,o=n),[i,o]}function Ete(e,t,n){if(e.lte(0))return new(ate())(0);var r=Cte.getDigitCount(e.toNumber()),i=new(ate())(10).pow(r),o=e.div(i),a=1!==r?.05:.1,s=new(ate())(Math.ceil(o.div(a).toNumber())).add(n).mul(a).mul(i);return t?s:new(ate())(Math.ceil(s))}function Mte(e,t,n){var r=1,i=new(ate())(e);if(!i.isint()&&n){var o=Math.abs(e);o<1?(r=new(ate())(10).pow(Cte.getDigitCount(e)-1),i=new(ate())(Math.floor(i.div(r).toNumber())).mul(r)):o>1&&(i=new(ate())(Math.floor(e)))}else 0===e?i=new(ate())(Math.floor((t-1)/2)):n||(i=new(ate())(Math.floor(e)));var a=Math.floor((t-1)/2),s=vte(gte(function(e){return i.add(new(ate())(e-a).mul(r)).toNumber()}),fte);return s(0,t)}function Ote(e,t,n,r){var i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:0;if(!Number.isFinite((t-e)/(n-1)))return{step:new(ate())(0),tickMin:new(ate())(0),tickMax:new(ate())(0)};var o,a=Ete(new(ate())(t).sub(e).div(n-1),r,i);o=e<=0&&t>=0?new(ate())(0):(o=new(ate())(e).add(t).div(2)).sub(new(ate())(o).mod(a));var s=Math.ceil(o.sub(e).div(a).toNumber()),l=Math.ceil(new(ate())(t).sub(o).div(a).toNumber()),c=s+l+1;return c>n?Ote(e,t,n,r,i+1):(c<n&&(l=t>0?l+(n-c):l,s=t>0?s:s+(n-c)),{step:a,tickMin:o.sub(new(ate())(s).mul(a)),tickMax:o.add(new(ate())(l).mul(a))})}var Rte=yte(function(e){var t=Ste(e,2),n=t[0],r=t[1],i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:6,o=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],a=Math.max(i,2),s=Ste(Tte([n,r]),2),l=s[0],c=s[1];if(l===-1/0||c===1/0){var d=c===1/0?[l].concat(wte(fte(0,i-1).map(function(){return 1/0}))):[].concat(wte(fte(0,i-1).map(function(){return-1/0})),[c]);return n>r?xte(d):d}if(l===c)return Mte(l,i,o);var u=Ote(l,c,a,o),p=u.step,h=u.tickMin,m=u.tickMax,f=Cte.rangeStep(h,m.add(new(ate())(.1).mul(p)),p);return n>r?xte(f):f}),Pte=(yte(function(e){var t=Ste(e,2),n=t[0],r=t[1],i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:6,o=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],a=Math.max(i,2),s=Ste(Tte([n,r]),2),l=s[0],c=s[1];if(l===-1/0||c===1/0)return[n,r];if(l===c)return Mte(l,i,o);var d=Ete(new(ate())(c).sub(l).div(a-1),o,0),u=vte(gte(function(e){return new(ate())(l).add(new(ate())(e).mul(d)).toNumber()}),fte),p=u(0,a).filter(function(e){return e>=l&&e<=c});return n>r?xte(p):p}),yte(function(e,t){var n=Ste(e,2),r=n[0],i=n[1],o=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],a=Ste(Tte([r,i]),2),s=a[0],l=a[1];if(s===-1/0||l===1/0)return[r,i];if(s===l)return[s];var c=Math.max(t,2),d=Ete(new(ate())(l).sub(s).div(c-1),o,0),u=[].concat(wte(Cte.rangeStep(new(ate())(s),new(ate())(l).sub(new(ate())(.99).mul(d)),d)),[l]);return r>i?xte(u):u})),Dte=["offset","layout","width","dataKey","data","dataPointFormatter","xAxis","yAxis"];function Nte(e){return Nte="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Nte(e)}function Lte(){return Lte=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Lte.apply(this,arguments)}function Ite(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,i,o,a,s=[],l=!0,c=!1;try{if(o=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;l=!1}else for(;!(l=(r=o.call(n)).done)&&(s.push(r.value),s.length!==t);l=!0);}catch(e){c=!0,i=e}finally{try{if(!l&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(c)throw i}}return s}}(e,t)||function(e,t){if(!e)return;if("string"===typeof e)return Fte(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Fte(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Fte(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function $te(e,t){if(null==e)return{};var n,r,i=function(e,t){if(null==e)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function Bte(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,Gte(r.key),r)}}function zte(e,t,n){return t=Wte(t),function(e,t){if(t&&("object"===Nte(t)||"function"===typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,Hte()?Reflect.construct(t,n||[],Wte(e).constructor):t.apply(e,n))}function Hte(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(Hte=function(){return!!e})()}function Wte(e){return Wte=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},Wte(e)}function Ute(e,t){return Ute=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},Ute(e,t)}function Vte(e,t,n){return(t=Gte(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Gte(e){var t=function(e,t){if("object"!=Nte(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=Nte(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==Nte(t)?t:t+""}var qte=function(e){function t(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),zte(this,t,arguments)}return function(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Ute(e,t)}(t,e),n=t,r=[{key:"render",value:function(){var e=this.props,t=e.offset,n=e.layout,r=e.width,i=e.dataKey,o=e.data,a=e.dataPointFormatter,s=e.xAxis,l=e.yAxis,c=$te(e,Dte),d=e2(c,!1);"x"===this.props.direction&&"number"!==s.type&&T2(!1);var u=o.map(function(e){var o=a(e,i),c=o.x,u=o.y,p=o.value,h=o.errorVal;if(!h)return null;var m,f,g=[];if(Array.isArray(h)){var v=Ite(h,2);m=v[0],f=v[1]}else m=f=h;if("vertical"===n){var x=s.scale,y=u+t,b=y+r,j=y-r,_=x(p-m),C=x(p+f);g.push({x1:C,y1:b,x2:C,y2:j}),g.push({x1:_,y1:y,x2:C,y2:y}),g.push({x1:_,y1:b,x2:_,y2:j})}else if("horizontal"===n){var w=l.scale,S=c+t,A=S-r,k=S+r,T=w(p-m),E=w(p+f);g.push({x1:A,y1:E,x2:k,y2:E}),g.push({x1:S,y1:T,x2:S,y2:E}),g.push({x1:A,y1:T,x2:k,y2:T})}return We.createElement(L2,Lte({className:"recharts-errorBar",key:"bar-".concat(g.map(function(e){return"".concat(e.x1,"-").concat(e.x2,"-").concat(e.y1,"-").concat(e.y2)}))},d),g.map(function(e){return We.createElement("line",Lte({},e,{key:"line-".concat(e.x1,"-").concat(e.x2,"-").concat(e.y1,"-").concat(e.y2)}))}))});return We.createElement(L2,{className:"recharts-errorBars"},u)}}],r&&Bte(n.prototype,r),i&&Bte(n,i),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r,i}(We.Component);function Yte(e){return Yte="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Yte(e)}function Zte(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function Kte(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Zte(Object(n),!0).forEach(function(t){Xte(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Zte(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function Xte(e,t,n){return t=function(e){var t=function(e,t){if("object"!=Yte(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=Yte(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==Yte(t)?t:t+""}(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}Vte(qte,"defaultProps",{stroke:"black",strokeWidth:1.5,width:5,offset:0,layout:"horizontal"}),Vte(qte,"displayName","ErrorBar");var Qte=function(e){var t=e.children,n=e.formattedGraphicalItems,r=e.legendWidth,i=e.legendContent,o=K1(t,Q5);if(!o)return null;var a,s=Q5.defaultProps,l=void 0!==s?Kte(Kte({},s),o.props):{};return a=o.props&&o.props.payload?o.props&&o.props.payload:"children"===i?(n||[]).reduce(function(e,t){var n=t.item,r=t.props,i=r.sectors||r.data||[];return e.concat(i.map(function(e){return{type:o.props.iconType||n.props.legendType,value:e.name,color:e.fill,payload:e}}))},[]):(n||[]).map(function(e){var t=e.item,n=t.type.defaultProps,r=void 0!==n?Kte(Kte({},n),t.props):{},i=r.dataKey,o=r.name,a=r.legendType;return{inactive:r.hide,dataKey:i,type:l.iconType||a||"square",color:sne(t),value:o||i,payload:r}}),Kte(Kte(Kte({},l),Q5.getWithHeight(o,r)),{},{payload:a,item:o})};function Jte(e){return Jte="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Jte(e)}function ene(e){return function(e){if(Array.isArray(e))return tne(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)return;if("string"===typeof e)return tne(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return tne(e,t)}(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.")}()}function tne(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function nne(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function rne(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?nne(Object(n),!0).forEach(function(t){ine(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):nne(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function ine(e,t,n){return t=function(e){var t=function(e,t){if("object"!=Jte(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=Jte(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==Jte(t)?t:t+""}(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function one(e,t,n){return c1()(e)||c1()(t)?n:w1(t)?oa()(e,t,n):h1()(t)?t(e):n}function ane(e,t,n,r){var i=nte()(e,function(e){return one(e,t)});if("number"===n){var o=i.filter(function(e){return C1(e)||parseFloat(e)});return o.length?[ete()(o),Qee()(o)]:[1/0,-1/0]}return(r?i.filter(function(e){return!c1()(e)}):i).map(function(e){return w1(e)||e instanceof Date?e:""})}var sne=function(e){var t,n,r=e.type.displayName,i=null!==(t=e.type)&&void 0!==t&&t.defaultProps?rne(rne({},e.type.defaultProps),e.props):e.props,o=i.stroke,a=i.fill;switch(r){case"Line":n=o;break;case"Area":case"Radar":n=o&&"none"!==o?o:a;break;default:n=a}return n},lne=function(e,t,n,r,i){var o=Z1(t.props.children,qte).filter(function(e){return function(e,t,n){return!!c1()(t)||("horizontal"===e?"yAxis"===t:"vertical"===e||"x"===n?"xAxis"===t:"y"!==n||"yAxis"===t)}(r,i,e.props.direction)});if(o&&o.length){var a=o.map(function(e){return e.props.dataKey});return e.reduce(function(e,t){var r=one(t,n);if(c1()(r))return e;var i=Array.isArray(r)?[ete()(r),Qee()(r)]:[r,r],o=a.reduce(function(e,n){var r=one(t,n,0),o=i[0]-Math.abs(Array.isArray(r)?r[0]:r),a=i[1]+Math.abs(Array.isArray(r)?r[1]:r);return[Math.min(o,e[0]),Math.max(a,e[1])]},[1/0,-1/0]);return[Math.min(o[0],e[0]),Math.max(o[1],e[1])]},[1/0,-1/0])}return null},cne=function(e,t,n,r,i){var o=t.map(function(t){var o=t.props.dataKey;return"number"===n&&o&&lne(e,t,o,r)||ane(e,o,n,i)});if("number"===n)return o.reduce(function(e,t){return[Math.min(e[0],t[0]),Math.max(e[1],t[1])]},[1/0,-1/0]);var a={};return o.reduce(function(e,t){for(var n=0,r=t.length;n<r;n++)a[t[n]]||(a[t[n]]=!0,e.push(t[n]));return e},[])},dne=function(e,t){return"horizontal"===e&&"xAxis"===t||"vertical"===e&&"yAxis"===t||"centric"===e&&"angleAxis"===t||"radial"===e&&"radiusAxis"===t},une=function(e,t,n,r){if(r)return e.map(function(e){return e.coordinate});var i,o,a=e.map(function(e){return e.coordinate===t&&(i=!0),e.coordinate===n&&(o=!0),e.coordinate});return i||a.push(t),o||a.push(n),a},pne=function(e,t,n){if(!e)return null;var r=e.scale,i=e.duplicateDomain,o=e.type,a=e.range,s="scaleBand"===e.realScaleType?r.bandwidth()/2:2,l=(t||n)&&"category"===o&&r.bandwidth?r.bandwidth()/s:0;return l="angleAxis"===e.axisType&&(null===a||void 0===a?void 0:a.length)>=2?2*j1(a[0]-a[1])*l:l,t&&(e.ticks||e.niceTicks)?(e.ticks||e.niceTicks).map(function(e){var t=i?i.indexOf(e):e;return{coordinate:r(t)+l,value:e,offset:l}}).filter(function(e){return!x1()(e.coordinate)}):e.isCategorical&&e.categoricalDomain?e.categoricalDomain.map(function(e,t){return{coordinate:r(e)+l,value:e,index:t,offset:l}}):r.ticks&&!n?r.ticks(e.tickCount).map(function(e){return{coordinate:r(e)+l,value:e,offset:l}}):r.domain().map(function(e,t){return{coordinate:r(e)+l,value:i?i[e]:e,index:t,offset:l}})},hne=new WeakMap,mne=function(e,t){if("function"!==typeof t)return e;hne.has(e)||hne.set(e,new WeakMap);var n=hne.get(e);if(n.has(t))return n.get(t);var r=function(){e.apply(void 0,arguments),t.apply(void 0,arguments)};return n.set(t,r),r},fne=function(e,n,r){var i=e.scale,o=e.type,a=e.layout,s=e.axisType;if("auto"===i)return"radial"===a&&"radiusAxis"===s?{scale:d3(),realScaleType:"band"}:"radial"===a&&"angleAxis"===s?{scale:D9(),realScaleType:"linear"}:"category"===o&&n&&(n.indexOf("LineChart")>=0||n.indexOf("AreaChart")>=0||n.indexOf("ComposedChart")>=0&&!r)?{scale:p3(),realScaleType:"point"}:"category"===o?{scale:d3(),realScaleType:"band"}:{scale:D9(),realScaleType:"linear"};if(u1()(i)){var l="scale".concat(A6()(i));return{scale:(t[l]||p3)(),realScaleType:t[l]?l:"point"}}return h1()(i)?{scale:i}:{scale:p3(),realScaleType:"point"}},gne=1e-4,vne=function(e){var t=e.domain();if(t&&!(t.length<=2)){var n=t.length,r=e.range(),i=Math.min(r[0],r[1])-gne,o=Math.max(r[0],r[1])+gne,a=e(t[0]),s=e(t[n-1]);(a<i||a>o||s<i||s>o)&&e.domain([t[0],t[n-1]])}},xne={sign:function(e){var t=e.length;if(!(t<=0))for(var n=0,r=e[0].length;n<r;++n)for(var i=0,o=0,a=0;a<t;++a){var s=x1()(e[a][n][1])?e[a][n][0]:e[a][n][1];s>=0?(e[a][n][0]=i,e[a][n][1]=i+s,i=e[a][n][1]):(e[a][n][0]=o,e[a][n][1]=o+s,o=e[a][n][1])}},expand:function(e,t){if((r=e.length)>0){for(var n,r,i,o=0,a=e[0].length;o<a;++o){for(i=n=0;n<r;++n)i+=e[n][o][1]||0;if(i)for(n=0;n<r;++n)e[n][o][1]/=i}Gee(e,t)}},none:Gee,silhouette:function(e,t){if((n=e.length)>0){for(var n,r=0,i=e[t[0]],o=i.length;r<o;++r){for(var a=0,s=0;a<n;++a)s+=e[a][r][1]||0;i[r][1]+=i[r][0]=-s/2}Gee(e,t)}},wiggle:function(e,t){if((i=e.length)>0&&(r=(n=e[t[0]]).length)>0){for(var n,r,i,o=0,a=1;a<r;++a){for(var s=0,l=0,c=0;s<i;++s){for(var d=e[t[s]],u=d[a][1]||0,p=(u-(d[a-1][1]||0))/2,h=0;h<s;++h){var m=e[t[h]];p+=(m[a][1]||0)-(m[a-1][1]||0)}l+=u,c+=p*u}n[a-1][1]+=n[a-1][0]=o,l&&(o-=c/l)}n[a-1][1]+=n[a-1][0]=o,Gee(e,t)}},positive:function(e){var t=e.length;if(!(t<=0))for(var n=0,r=e[0].length;n<r;++n)for(var i=0,o=0;o<t;++o){var a=x1()(e[o][n][1])?e[o][n][0]:e[o][n][1];a>=0?(e[o][n][0]=i,e[o][n][1]=i+a,i=e[o][n][1]):(e[o][n][0]=0,e[o][n][1]=0)}}},yne=function(e,t,n){var r=t.map(function(e){return e.props.dataKey}),i=xne[n],o=function(){var e=Z6([]),t=Yee,n=Gee,r=Zee;function i(i){var o,a,s=Array.from(e.apply(this,arguments),Kee),l=s.length,c=-1;for(const e of i)for(o=0,++c;o<l;++o)(s[o][c]=[0,+r(e,s[o].key,c,i)]).data=e;for(o=0,a=qee(t(s));o<l;++o)s[a[o]].index=o;return n(s,a),s}return i.keys=function(t){return arguments.length?(e="function"===typeof t?t:Z6(Array.from(t)),i):e},i.value=function(e){return arguments.length?(r="function"===typeof e?e:Z6(+e),i):r},i.order=function(e){return arguments.length?(t=null==e?Yee:"function"===typeof e?e:Z6(Array.from(e)),i):t},i.offset=function(e){return arguments.length?(n=null==e?Gee:e,i):n},i}().keys(r).value(function(e,t){return+one(e,t,0)}).order(Yee).offset(i);return o(e)},bne=function(e,t){var n=t.realScaleType,r=t.type,i=t.tickCount,o=t.originalDomain,a=t.allowDecimals,s=n||t.scale;if("auto"!==s&&"linear"!==s)return null;if(i&&"number"===r&&o&&("auto"===o[0]||"auto"===o[1])){var l=e.domain();if(!l.length)return null;var c=Rte(l,i,a);return e.domain([ete()(c),Qee()(c)]),{niceTicks:c}}if(i&&"number"===r){var d=e.domain();return{niceTicks:Pte(d,i,a)}}return null};function jne(e){var t=e.axis,n=e.ticks,r=e.bandSize,i=e.entry,o=e.index,a=e.dataKey;if("category"===t.type){if(!t.allowDuplicatedCategory&&t.dataKey&&!c1()(i[t.dataKey])){var s=M1(n,"value",i[t.dataKey]);if(s)return s.coordinate+r/2}return n[o]?n[o].coordinate+r/2:null}var l=one(i,c1()(a)?t.dataKey:a);return c1()(l)?null:t.scale(l)}var _ne=function(e){var t=e.axis,n=e.ticks,r=e.offset,i=e.bandSize,o=e.entry,a=e.index;if("category"===t.type)return n[a]?n[a].coordinate+r:null;var s=one(o,t.dataKey,t.domain[a]);return c1()(s)?null:t.scale(s)-i/2+r},Cne=function(e,t,n){return Object.keys(e).reduce(function(r,i){var o=e[i].stackedData.reduce(function(e,r){var i=function(e){return e.reduce(function(e,t){return[ete()(t.concat([e[0]]).filter(C1)),Qee()(t.concat([e[1]]).filter(C1))]},[1/0,-1/0])}(r.slice(t,n+1));return[Math.min(e[0],i[0]),Math.max(e[1],i[1])]},[1/0,-1/0]);return[Math.min(o[0],r[0]),Math.max(o[1],r[1])]},[1/0,-1/0]).map(function(e){return e===1/0||e===-1/0?0:e})},wne=/^dataMin[\s]*-[\s]*([0-9]+([.]{1}[0-9]+){0,1})$/,Sne=/^dataMax[\s]*\+[\s]*([0-9]+([.]{1}[0-9]+){0,1})$/,Ane=function(e,t,n){if(h1()(e))return e(t,n);if(!Array.isArray(e))return t;var r=[];if(C1(e[0]))r[0]=n?e[0]:Math.min(e[0],t[0]);else if(wne.test(e[0])){var i=+wne.exec(e[0])[1];r[0]=t[0]-i}else h1()(e[0])?r[0]=e[0](t[0]):r[0]=t[0];if(C1(e[1]))r[1]=n?e[1]:Math.max(e[1],t[1]);else if(Sne.test(e[1])){var o=+Sne.exec(e[1])[1];r[1]=t[1]+o}else h1()(e[1])?r[1]=e[1](t[1]):r[1]=t[1];return r},kne=function(e,t,n){if(e&&e.scale&&e.scale.bandwidth){var r=e.scale.bandwidth();if(!n||r>0)return r}if(e&&t&&t.length>=2){for(var i=A2()(t,function(e){return e.coordinate}),o=1/0,a=1,s=i.length;a<s;a++){var l=i[a],c=i[a-1];o=Math.min((l.coordinate||0)-(c.coordinate||0),o)}return o===1/0?0:o}return n?void 0:0},Tne=function(e,t,n){return e&&e.length?ite()(e,oa()(n,"type.defaultProps.domain"))?t:e:t},Ene=function(e,t){var n=e.type.defaultProps?rne(rne({},e.type.defaultProps),e.props):e.props,r=n.dataKey,i=n.name,o=n.unit,a=n.formatter,s=n.tooltipType,l=n.chartType,c=n.hide;return rne(rne({},e2(e,!1)),{},{dataKey:r,unit:o,formatter:a,name:i||r,color:sne(e),value:one(t,r),type:s,payload:t,chartType:l,hide:c})};function Mne(e){return Mne="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Mne(e)}function One(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function Rne(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?One(Object(n),!0).forEach(function(t){Pne(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):One(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function Pne(e,t,n){return t=function(e){var t=function(e,t){if("object"!=Mne(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=Mne(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==Mne(t)?t:t+""}(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var Dne=["Webkit","Moz","O","ms"];function Nne(e){return Nne="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Nne(e)}function Lne(){return Lne=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Lne.apply(this,arguments)}function Ine(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function Fne(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Ine(Object(n),!0).forEach(function(t){Une(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Ine(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function $ne(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,Vne(r.key),r)}}function Bne(e,t,n){return t=Hne(t),function(e,t){if(t&&("object"===Nne(t)||"function"===typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,zne()?Reflect.construct(t,n||[],Hne(e).constructor):t.apply(e,n))}function zne(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(zne=function(){return!!e})()}function Hne(e){return Hne=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},Hne(e)}function Wne(e,t){return Wne=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},Wne(e,t)}function Une(e,t,n){return(t=Vne(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Vne(e){var t=function(e,t){if("object"!=Nne(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=Nne(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==Nne(t)?t:t+""}var Gne=function(e){return e.changedTouches&&!!e.changedTouches.length},qne=function(e){function t(e){var n;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),Une(n=Bne(this,t,[e]),"handleDrag",function(e){n.leaveTimer&&(clearTimeout(n.leaveTimer),n.leaveTimer=null),n.state.isTravellerMoving?n.handleTravellerMove(e):n.state.isSlideMoving&&n.handleSlideDrag(e)}),Une(n,"handleTouchMove",function(e){null!=e.changedTouches&&e.changedTouches.length>0&&n.handleDrag(e.changedTouches[0])}),Une(n,"handleDragEnd",function(){n.setState({isTravellerMoving:!1,isSlideMoving:!1},function(){var e=n.props,t=e.endIndex,r=e.onDragEnd,i=e.startIndex;null===r||void 0===r||r({endIndex:t,startIndex:i})}),n.detachDragEndListener()}),Une(n,"handleLeaveWrapper",function(){(n.state.isTravellerMoving||n.state.isSlideMoving)&&(n.leaveTimer=window.setTimeout(n.handleDragEnd,n.props.leaveTimeOut))}),Une(n,"handleEnterSlideOrTraveller",function(){n.setState({isTextActive:!0})}),Une(n,"handleLeaveSlideOrTraveller",function(){n.setState({isTextActive:!1})}),Une(n,"handleSlideDragStart",function(e){var t=Gne(e)?e.changedTouches[0]:e;n.setState({isTravellerMoving:!1,isSlideMoving:!0,slideMoveStartX:t.pageX}),n.attachDragEndListener()}),n.travellerDragStartHandlers={startX:n.handleTravellerDragStart.bind(n,"startX"),endX:n.handleTravellerDragStart.bind(n,"endX")},n.state={},n}return function(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Wne(e,t)}(t,e),n=t,r=[{key:"componentWillUnmount",value:function(){this.leaveTimer&&(clearTimeout(this.leaveTimer),this.leaveTimer=null),this.detachDragEndListener()}},{key:"getIndex",value:function(e){var n=e.startX,r=e.endX,i=this.state.scaleValues,o=this.props,a=o.gap,s=o.data.length-1,l=Math.min(n,r),c=Math.max(n,r),d=t.getIndexInRange(i,l),u=t.getIndexInRange(i,c);return{startIndex:d-d%a,endIndex:u===s?s:u-u%a}}},{key:"getTextOfTick",value:function(e){var t=this.props,n=t.data,r=t.tickFormatter,i=t.dataKey,o=one(n[e],i,e);return h1()(r)?r(o,e):o}},{key:"attachDragEndListener",value:function(){window.addEventListener("mouseup",this.handleDragEnd,!0),window.addEventListener("touchend",this.handleDragEnd,!0),window.addEventListener("mousemove",this.handleDrag,!0)}},{key:"detachDragEndListener",value:function(){window.removeEventListener("mouseup",this.handleDragEnd,!0),window.removeEventListener("touchend",this.handleDragEnd,!0),window.removeEventListener("mousemove",this.handleDrag,!0)}},{key:"handleSlideDrag",value:function(e){var t=this.state,n=t.slideMoveStartX,r=t.startX,i=t.endX,o=this.props,a=o.x,s=o.width,l=o.travellerWidth,c=o.startIndex,d=o.endIndex,u=o.onChange,p=e.pageX-n;p>0?p=Math.min(p,a+s-l-i,a+s-l-r):p<0&&(p=Math.max(p,a-r,a-i));var h=this.getIndex({startX:r+p,endX:i+p});h.startIndex===c&&h.endIndex===d||!u||u(h),this.setState({startX:r+p,endX:i+p,slideMoveStartX:e.pageX})}},{key:"handleTravellerDragStart",value:function(e,t){var n=Gne(t)?t.changedTouches[0]:t;this.setState({isSlideMoving:!1,isTravellerMoving:!0,movingTravellerId:e,brushMoveStartX:n.pageX}),this.attachDragEndListener()}},{key:"handleTravellerMove",value:function(e){var t=this.state,n=t.brushMoveStartX,r=t.movingTravellerId,i=t.endX,o=t.startX,a=this.state[r],s=this.props,l=s.x,c=s.width,d=s.travellerWidth,u=s.onChange,p=s.gap,h=s.data,m={startX:this.state.startX,endX:this.state.endX},f=e.pageX-n;f>0?f=Math.min(f,l+c-d-a):f<0&&(f=Math.max(f,l-a)),m[r]=a+f;var g=this.getIndex(m),v=g.startIndex,x=g.endIndex;this.setState(Une(Une({},r,a+f),"brushMoveStartX",e.pageX),function(){u&&function(){var e=h.length-1;return"startX"===r&&(i>o?v%p===0:x%p===0)||i<o&&x===e||"endX"===r&&(i>o?x%p===0:v%p===0)||i>o&&x===e}()&&u(g)})}},{key:"handleTravellerMoveKeyboard",value:function(e,t){var n=this,r=this.state,i=r.scaleValues,o=r.startX,a=r.endX,s=this.state[t],l=i.indexOf(s);if(-1!==l){var c=l+e;if(!(-1===c||c>=i.length)){var d=i[c];"startX"===t&&d>=a||"endX"===t&&d<=o||this.setState(Une({},t,d),function(){n.props.onChange(n.getIndex({startX:n.state.startX,endX:n.state.endX}))})}}}},{key:"renderBackground",value:function(){var e=this.props,t=e.x,n=e.y,r=e.width,i=e.height,o=e.fill,a=e.stroke;return We.createElement("rect",{stroke:a,fill:o,x:t,y:n,width:r,height:i})}},{key:"renderPanorama",value:function(){var e=this.props,t=e.x,n=e.y,r=e.width,i=e.height,o=e.data,a=e.children,s=e.padding,l=We.Children.only(a);return l?We.cloneElement(l,{x:t,y:n,width:r,height:i,margin:s,compact:!0,data:o}):null}},{key:"renderTravellerLayer",value:function(e,n){var r,i,o=this,a=this.props,s=a.y,l=a.travellerWidth,c=a.height,d=a.traveller,u=a.ariaLabel,p=a.data,h=a.startIndex,m=a.endIndex,f=Math.max(e,this.props.x),g=Fne(Fne({},e2(this.props,!1)),{},{x:f,y:s,width:l,height:c}),v=u||"Min value: ".concat(null===(r=p[h])||void 0===r?void 0:r.name,", Max value: ").concat(null===(i=p[m])||void 0===i?void 0:i.name);return We.createElement(L2,{tabIndex:0,role:"slider","aria-label":v,"aria-valuenow":e,className:"recharts-brush-traveller",onMouseEnter:this.handleEnterSlideOrTraveller,onMouseLeave:this.handleLeaveSlideOrTraveller,onMouseDown:this.travellerDragStartHandlers[n],onTouchStart:this.travellerDragStartHandlers[n],onKeyDown:function(e){["ArrowLeft","ArrowRight"].includes(e.key)&&(e.preventDefault(),e.stopPropagation(),o.handleTravellerMoveKeyboard("ArrowRight"===e.key?1:-1,n))},onFocus:function(){o.setState({isTravellerFocused:!0})},onBlur:function(){o.setState({isTravellerFocused:!1})},style:{cursor:"col-resize"}},t.renderTraveller(d,g))}},{key:"renderSlide",value:function(e,t){var n=this.props,r=n.y,i=n.height,o=n.stroke,a=n.travellerWidth,s=Math.min(e,t)+a,l=Math.max(Math.abs(t-e)-a,0);return We.createElement("rect",{className:"recharts-brush-slide",onMouseEnter:this.handleEnterSlideOrTraveller,onMouseLeave:this.handleLeaveSlideOrTraveller,onMouseDown:this.handleSlideDragStart,onTouchStart:this.handleSlideDragStart,style:{cursor:"move"},stroke:"none",fill:o,fillOpacity:.2,x:s,y:r,width:l,height:i})}},{key:"renderText",value:function(){var e=this.props,t=e.startIndex,n=e.endIndex,r=e.y,i=e.height,o=e.travellerWidth,a=e.stroke,s=this.state,l=s.startX,c=s.endX,d={pointerEvents:"none",fill:a};return We.createElement(L2,{className:"recharts-brush-texts"},We.createElement(Z3,Lne({textAnchor:"end",verticalAnchor:"middle",x:Math.min(l,c)-5,y:r+i/2},d),this.getTextOfTick(t)),We.createElement(Z3,Lne({textAnchor:"start",verticalAnchor:"middle",x:Math.max(l,c)+o+5,y:r+i/2},d),this.getTextOfTick(n)))}},{key:"render",value:function(){var e=this.props,t=e.data,n=e.className,r=e.children,i=e.x,o=e.y,a=e.width,s=e.height,l=e.alwaysShowText,c=this.state,d=c.startX,u=c.endX,p=c.isTextActive,h=c.isSlideMoving,m=c.isTravellerMoving,f=c.isTravellerFocused;if(!t||!t.length||!C1(i)||!C1(o)||!C1(a)||!C1(s)||a<=0||s<=0)return null;var g=PJ("recharts-brush",n),v=1===We.Children.count(r),x=function(e,t){if(!e)return null;var n=e.replace(/(\w)/,function(e){return e.toUpperCase()}),r=Dne.reduce(function(e,r){return Rne(Rne({},e),{},Pne({},r+n,t))},{});return r[e]=t,r}("userSelect","none");return We.createElement(L2,{className:g,onMouseLeave:this.handleLeaveWrapper,onTouchMove:this.handleTouchMove,style:x},this.renderBackground(),v&&this.renderPanorama(),this.renderSlide(d,u),this.renderTravellerLayer(d,"startX"),this.renderTravellerLayer(u,"endX"),(p||h||m||f||l)&&this.renderText())}}],i=[{key:"renderDefaultTraveller",value:function(e){var t=e.x,n=e.y,r=e.width,i=e.height,o=e.stroke,a=Math.floor(n+i/2)-1;return We.createElement(We.Fragment,null,We.createElement("rect",{x:t,y:n,width:r,height:i,fill:o,stroke:"none"}),We.createElement("line",{x1:t+1,y1:a,x2:t+r-1,y2:a,fill:"none",stroke:"#fff"}),We.createElement("line",{x1:t+1,y1:a+2,x2:t+r-1,y2:a+2,fill:"none",stroke:"#fff"}))}},{key:"renderTraveller",value:function(e,n){return We.isValidElement(e)?We.cloneElement(e,n):h1()(e)?e(n):t.renderDefaultTraveller(n)}},{key:"getDerivedStateFromProps",value:function(e,t){var n=e.data,r=e.width,i=e.x,o=e.travellerWidth,a=e.updateId,s=e.startIndex,l=e.endIndex;if(n!==t.prevData||a!==t.prevUpdateId)return Fne({prevData:n,prevTravellerWidth:o,prevUpdateId:a,prevX:i,prevWidth:r},n&&n.length?function(e){var t=e.data,n=e.startIndex,r=e.endIndex,i=e.x,o=e.width,a=e.travellerWidth;if(!t||!t.length)return{};var s=t.length,l=p3().domain(wS()(0,s)).range([i,i+o-a]),c=l.domain().map(function(e){return l(e)});return{isTextActive:!1,isSlideMoving:!1,isTravellerMoving:!1,isTravellerFocused:!1,startX:l(n),endX:l(r),scale:l,scaleValues:c}}({data:n,width:r,x:i,travellerWidth:o,startIndex:s,endIndex:l}):{scale:null,scaleValues:null});if(t.scale&&(r!==t.prevWidth||i!==t.prevX||o!==t.prevTravellerWidth)){t.scale.range([i,i+r-o]);var c=t.scale.domain().map(function(e){return t.scale(e)});return{prevData:n,prevTravellerWidth:o,prevUpdateId:a,prevX:i,prevWidth:r,startX:t.scale(e.startIndex),endX:t.scale(e.endIndex),scaleValues:c}}return null}},{key:"getIndexInRange",value:function(e,t){for(var n=0,r=e.length-1;r-n>1;){var i=Math.floor((n+r)/2);e[i]>t?r=i:n=i}return t>=e[r]?r:n}}],r&&$ne(n.prototype,r),i&&$ne(n,i),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r,i}(We.PureComponent);function Yne(e){return Yne="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Yne(e)}function Zne(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function Kne(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Zne(Object(n),!0).forEach(function(t){Xne(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Zne(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function Xne(e,t,n){return t=function(e){var t=function(e,t){if("object"!=Yne(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=Yne(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==Yne(t)?t:t+""}(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Qne(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,i,o,a,s=[],l=!0,c=!1;try{if(o=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;l=!1}else for(;!(l=(r=o.call(n)).done)&&(s.push(r.value),s.length!==t);l=!0);}catch(e){c=!0,i=e}finally{try{if(!l&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(c)throw i}}return s}}(e,t)||function(e,t){if(!e)return;if("string"===typeof e)return Jne(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Jne(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Jne(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}Une(qne,"displayName","Brush"),Une(qne,"defaultProps",{height:40,travellerWidth:5,gap:1,fill:"#fff",stroke:"#666",padding:{top:1,right:1,bottom:1,left:1},leaveTimeOut:1e3,alwaysShowText:!1});var ere=Math.PI/180,tre=function(e){return 180*e/Math.PI},nre=function(e,t,n,r){return{x:e+Math.cos(-ere*r)*n,y:t+Math.sin(-ere*r)*n}},rre=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{top:0,right:0,bottom:0,left:0};return Math.min(Math.abs(e-(n.left||0)-(n.right||0)),Math.abs(t-(n.top||0)-(n.bottom||0)))/2},ire=function(e,t){var n=e.x,r=e.y,i=t.cx,o=t.cy,a=function(e,t){var n=e.x,r=e.y,i=t.x,o=t.y;return Math.sqrt(Math.pow(n-i,2)+Math.pow(r-o,2))}({x:n,y:r},{x:i,y:o});if(a<=0)return{radius:a};var s=(n-i)/a,l=Math.acos(s);return r>o&&(l=2*Math.PI-l),{radius:a,angle:tre(l),angleInRadian:l}},ore=function(e,t){var n=t.startAngle,r=t.endAngle,i=Math.floor(n/360),o=Math.floor(r/360);return e+360*Math.min(i,o)},are=function(e,t){var n=e.x,r=e.y,i=ire({x:n,y:r},t),o=i.radius,a=i.angle,s=t.innerRadius,l=t.outerRadius;if(o<s||o>l)return!1;if(0===o)return!0;var c,d=function(e){var t=e.startAngle,n=e.endAngle,r=Math.floor(t/360),i=Math.floor(n/360),o=Math.min(r,i);return{startAngle:t-360*o,endAngle:n-360*o}}(t),u=d.startAngle,p=d.endAngle,h=a;if(u<=p){for(;h>p;)h-=360;for(;h<u;)h+=360;c=h>=u&&h<=p}else{for(;h>u;)h-=360;for(;h<p;)h+=360;c=h>=p&&h<=u}return c?Kne(Kne({},t),{},{radius:o,angle:ore(h,t)}):null},sre=function(e){return(0,We.isValidElement)(e)||h1()(e)||"boolean"===typeof e?"":e.className};function lre(e){return lre="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},lre(e)}var cre=["offset"];function dre(e){return function(e){if(Array.isArray(e))return ure(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)return;if("string"===typeof e)return ure(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return ure(e,t)}(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.")}()}function ure(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function pre(e,t){if(null==e)return{};var n,r,i=function(e,t){if(null==e)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function hre(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function mre(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?hre(Object(n),!0).forEach(function(t){fre(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):hre(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function fre(e,t,n){return t=function(e){var t=function(e,t){if("object"!=lre(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=lre(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==lre(t)?t:t+""}(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function gre(){return gre=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},gre.apply(this,arguments)}var vre=function(e,t,n){var r,i,o=e.position,a=e.viewBox,s=e.offset,l=e.className,c=a,d=c.cx,u=c.cy,p=c.innerRadius,h=c.outerRadius,m=c.startAngle,f=c.endAngle,g=c.clockWise,v=(p+h)/2,x=function(e,t){return j1(t-e)*Math.min(Math.abs(t-e),360)}(m,f),y=x>=0?1:-1;"insideStart"===o?(r=m+y*s,i=g):"insideEnd"===o?(r=f-y*s,i=!g):"end"===o&&(r=f+y*s,i=g),i=x<=0?i:!i;var b=nre(d,u,v,r),j=nre(d,u,v,r+359*(i?1:-1)),_="M".concat(b.x,",").concat(b.y,"\n    A").concat(v,",").concat(v,",0,1,").concat(i?0:1,",\n    ").concat(j.x,",").concat(j.y),C=c1()(e.id)?A1("recharts-radial-line-"):e.id;return We.createElement("text",gre({},n,{dominantBaseline:"central",className:PJ("recharts-radial-bar-label",l)}),We.createElement("defs",null,We.createElement("path",{id:C,d:_})),We.createElement("textPath",{xlinkHref:"#".concat(C)},t))};function xre(e){var t,n=e.offset,r=mre({offset:void 0===n?5:n},pre(e,cre)),i=r.viewBox,o=r.position,a=r.value,s=r.children,l=r.content,c=r.className,d=void 0===c?"":c,u=r.textBreakAll;if(!i||c1()(a)&&c1()(s)&&!(0,We.isValidElement)(l)&&!h1()(l))return null;if((0,We.isValidElement)(l))return(0,We.cloneElement)(l,r);if(h1()(l)){if(t=(0,We.createElement)(l,r),(0,We.isValidElement)(t))return t}else t=function(e){var t=e.value,n=e.formatter,r=c1()(e.children)?t:e.children;return h1()(n)?n(r):r}(r);var p=function(e){return"cx"in e&&C1(e.cx)}(i),h=e2(r,!0);if(p&&("insideStart"===o||"insideEnd"===o||"end"===o))return vre(r,t,h);var m=p?function(e){var t=e.viewBox,n=e.offset,r=e.position,i=t,o=i.cx,a=i.cy,s=i.innerRadius,l=i.outerRadius,c=(i.startAngle+i.endAngle)/2;if("outside"===r){var d=nre(o,a,l+n,c),u=d.x;return{x:u,y:d.y,textAnchor:u>=o?"start":"end",verticalAnchor:"middle"}}if("center"===r)return{x:o,y:a,textAnchor:"middle",verticalAnchor:"middle"};if("centerTop"===r)return{x:o,y:a,textAnchor:"middle",verticalAnchor:"start"};if("centerBottom"===r)return{x:o,y:a,textAnchor:"middle",verticalAnchor:"end"};var p=nre(o,a,(s+l)/2,c);return{x:p.x,y:p.y,textAnchor:"middle",verticalAnchor:"middle"}}(r):function(e){var t=e.viewBox,n=e.parentViewBox,r=e.offset,i=e.position,o=t,a=o.x,s=o.y,l=o.width,c=o.height,d=c>=0?1:-1,u=d*r,p=d>0?"end":"start",h=d>0?"start":"end",m=l>=0?1:-1,f=m*r,g=m>0?"end":"start",v=m>0?"start":"end";if("top"===i)return mre(mre({},{x:a+l/2,y:s-d*r,textAnchor:"middle",verticalAnchor:p}),n?{height:Math.max(s-n.y,0),width:l}:{});if("bottom"===i)return mre(mre({},{x:a+l/2,y:s+c+u,textAnchor:"middle",verticalAnchor:h}),n?{height:Math.max(n.y+n.height-(s+c),0),width:l}:{});if("left"===i){var x={x:a-f,y:s+c/2,textAnchor:g,verticalAnchor:"middle"};return mre(mre({},x),n?{width:Math.max(x.x-n.x,0),height:c}:{})}if("right"===i){var y={x:a+l+f,y:s+c/2,textAnchor:v,verticalAnchor:"middle"};return mre(mre({},y),n?{width:Math.max(n.x+n.width-y.x,0),height:c}:{})}var b=n?{width:l,height:c}:{};return"insideLeft"===i?mre({x:a+f,y:s+c/2,textAnchor:v,verticalAnchor:"middle"},b):"insideRight"===i?mre({x:a+l-f,y:s+c/2,textAnchor:g,verticalAnchor:"middle"},b):"insideTop"===i?mre({x:a+l/2,y:s+u,textAnchor:"middle",verticalAnchor:h},b):"insideBottom"===i?mre({x:a+l/2,y:s+c-u,textAnchor:"middle",verticalAnchor:p},b):"insideTopLeft"===i?mre({x:a+f,y:s+u,textAnchor:v,verticalAnchor:h},b):"insideTopRight"===i?mre({x:a+l-f,y:s+u,textAnchor:g,verticalAnchor:h},b):"insideBottomLeft"===i?mre({x:a+f,y:s+c-u,textAnchor:v,verticalAnchor:p},b):"insideBottomRight"===i?mre({x:a+l-f,y:s+c-u,textAnchor:g,verticalAnchor:p},b):f1()(i)&&(C1(i.x)||_1(i.x))&&(C1(i.y)||_1(i.y))?mre({x:a+k1(i.x,l),y:s+k1(i.y,c),textAnchor:"end",verticalAnchor:"end"},b):mre({x:a+l/2,y:s+c/2,textAnchor:"middle",verticalAnchor:"middle"},b)}(r);return We.createElement(Z3,gre({className:PJ("recharts-label",d)},h,m,{breakAll:u}),t)}xre.displayName="Label";var yre=function(e){var t=e.cx,n=e.cy,r=e.angle,i=e.startAngle,o=e.endAngle,a=e.r,s=e.radius,l=e.innerRadius,c=e.outerRadius,d=e.x,u=e.y,p=e.top,h=e.left,m=e.width,f=e.height,g=e.clockWise,v=e.labelViewBox;if(v)return v;if(C1(m)&&C1(f)){if(C1(d)&&C1(u))return{x:d,y:u,width:m,height:f};if(C1(p)&&C1(h))return{x:p,y:h,width:m,height:f}}return C1(d)&&C1(u)?{x:d,y:u,width:0,height:0}:C1(t)&&C1(n)?{cx:t,cy:n,startAngle:i||r||0,endAngle:o||r||0,innerRadius:l||0,outerRadius:c||s||a||0,clockWise:g}:e.viewBox?e.viewBox:{}};xre.parseViewBox=yre,xre.renderCallByParent=function(e,t){var n=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];if(!e||!e.children&&n&&!e.label)return null;var r=e.children,i=yre(e),o=Z1(r,xre).map(function(e,n){return(0,We.cloneElement)(e,{viewBox:t||i,key:"label-".concat(n)})});if(!n)return o;var a=function(e,t){return e?!0===e?We.createElement(xre,{key:"label-implicit",viewBox:t}):w1(e)?We.createElement(xre,{key:"label-implicit",viewBox:t,value:e}):(0,We.isValidElement)(e)?e.type===xre?(0,We.cloneElement)(e,{key:"label-implicit",viewBox:t}):We.createElement(xre,{key:"label-implicit",content:e,viewBox:t}):h1()(e)?We.createElement(xre,{key:"label-implicit",content:e,viewBox:t}):f1()(e)?We.createElement(xre,gre({viewBox:t},e,{key:"label-implicit"})):null:null}(e.label,t||i);return[a].concat(dre(o))};var bre=function(e,t){var n=e.alwaysShow,r=e.ifOverflow;return n&&(r="extendDomain"),r===t},jre=n(17002),_re=n.n(jre),Cre=function(e){return null};Cre.displayName="Cell";var wre=n(74065),Sre=n.n(wre);function Are(e){return Are="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Are(e)}var kre=["valueAccessor"],Tre=["data","dataKey","clockWise","id","textBreakAll"];function Ere(e){return function(e){if(Array.isArray(e))return Mre(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)return;if("string"===typeof e)return Mre(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Mre(e,t)}(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.")}()}function Mre(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function Ore(){return Ore=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Ore.apply(this,arguments)}function Rre(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function Pre(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Rre(Object(n),!0).forEach(function(t){Dre(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Rre(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function Dre(e,t,n){return t=function(e){var t=function(e,t){if("object"!=Are(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=Are(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==Are(t)?t:t+""}(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Nre(e,t){if(null==e)return{};var n,r,i=function(e,t){if(null==e)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}var Lre=function(e){return Array.isArray(e.value)?Sre()(e.value):e.value};function Ire(e){var t=e.valueAccessor,n=void 0===t?Lre:t,r=Nre(e,kre),i=r.data,o=r.dataKey,a=r.clockWise,s=r.id,l=r.textBreakAll,c=Nre(r,Tre);return i&&i.length?We.createElement(L2,{className:"recharts-label-list"},i.map(function(e,t){var r=c1()(o)?n(e,t):one(e&&e.payload,o),i=c1()(s)?{}:{id:"".concat(s,"-").concat(t)};return We.createElement(xre,Ore({},e2(e,!0),c,i,{parentViewBox:e.parentViewBox,value:r,textBreakAll:l,viewBox:xre.parseViewBox(c1()(a)?e:Pre(Pre({},e),{},{clockWise:a})),key:"label-".concat(t),index:t}))})):null}Ire.displayName="LabelList",Ire.renderCallByParent=function(e,t){var n=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];if(!e||!e.children&&n&&!e.label)return null;var r=Z1(e.children,Ire).map(function(e,n){return(0,We.cloneElement)(e,{data:t,key:"labelList-".concat(n)})});if(!n)return r;var i=function(e,t){return e?!0===e?We.createElement(Ire,{key:"labelList-implicit",data:t}):We.isValidElement(e)||h1()(e)?We.createElement(Ire,{key:"labelList-implicit",data:t,content:e}):f1()(e)?We.createElement(Ire,Ore({data:t},e,{key:"labelList-implicit"})):null:null}(e.label,t);return[i].concat(Ere(r))};var Fre=n(12322),$re=n.n(Fre),Bre=n(96361),zre=n.n(Bre);function Hre(e){return Hre="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Hre(e)}function Wre(){return Wre=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Wre.apply(this,arguments)}function Ure(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,i,o,a,s=[],l=!0,c=!1;try{if(o=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;l=!1}else for(;!(l=(r=o.call(n)).done)&&(s.push(r.value),s.length!==t);l=!0);}catch(e){c=!0,i=e}finally{try{if(!l&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(c)throw i}}return s}}(e,t)||function(e,t){if(!e)return;if("string"===typeof e)return Vre(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Vre(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Vre(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function Gre(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function qre(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Gre(Object(n),!0).forEach(function(t){Yre(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Gre(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function Yre(e,t,n){return t=function(e){var t=function(e,t){if("object"!=Hre(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=Hre(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==Hre(t)?t:t+""}(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var Zre=function(e,t,n,r,i){var o,a=n-r;return o="M ".concat(e,",").concat(t),o+="L ".concat(e+n,",").concat(t),o+="L ".concat(e+n-a/2,",").concat(t+i),o+="L ".concat(e+n-a/2-r,",").concat(t+i),o+="L ".concat(e,",").concat(t," Z")},Kre={x:0,y:0,upperWidth:0,lowerWidth:0,height:0,isUpdateAnimationActive:!1,animationBegin:0,animationDuration:1500,animationEasing:"ease"},Xre=function(e){var t=qre(qre({},Kre),e),n=(0,We.useRef)(),r=Ure((0,We.useState)(-1),2),i=r[0],o=r[1];(0,We.useEffect)(function(){if(n.current&&n.current.getTotalLength)try{var e=n.current.getTotalLength();e&&o(e)}catch(t){}},[]);var a=t.x,s=t.y,l=t.upperWidth,c=t.lowerWidth,d=t.height,u=t.className,p=t.animationEasing,h=t.animationDuration,m=t.animationBegin,f=t.isUpdateAnimationActive;if(a!==+a||s!==+s||l!==+l||c!==+c||d!==+d||0===l&&0===c||0===d)return null;var g=PJ("recharts-trapezoid",u);return f?We.createElement(s1,{canBegin:i>0,from:{upperWidth:0,lowerWidth:0,height:d,x:a,y:s},to:{upperWidth:l,lowerWidth:c,height:d,x:a,y:s},duration:h,animationEasing:p,isActive:f},function(e){var r=e.upperWidth,o=e.lowerWidth,a=e.height,s=e.x,l=e.y;return We.createElement(s1,{canBegin:i>0,from:"0px ".concat(-1===i?1:i,"px"),to:"".concat(i,"px 0px"),attributeName:"strokeDasharray",begin:m,duration:h,easing:p},We.createElement("path",Wre({},e2(t,!0),{className:g,d:Zre(s,l,r,o,a),ref:n})))}):We.createElement("g",null,We.createElement("path",Wre({},e2(t,!0),{className:g,d:Zre(a,s,l,c,d)})))};function Qre(e){return Qre="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Qre(e)}function Jre(){return Jre=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Jre.apply(this,arguments)}function eie(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function tie(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?eie(Object(n),!0).forEach(function(t){nie(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):eie(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function nie(e,t,n){return t=function(e){var t=function(e,t){if("object"!=Qre(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=Qre(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==Qre(t)?t:t+""}(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var rie=function(e){var t=e.cx,n=e.cy,r=e.radius,i=e.angle,o=e.sign,a=e.isExternal,s=e.cornerRadius,l=e.cornerIsExternal,c=s*(a?1:-1)+r,d=Math.asin(s/c)/ere,u=l?i:i+o*d,p=l?i-o*d:i;return{center:nre(t,n,c,u),circleTangency:nre(t,n,r,u),lineTangency:nre(t,n,c*Math.cos(d*ere),p),theta:d}},iie=function(e){var t=e.cx,n=e.cy,r=e.innerRadius,i=e.outerRadius,o=e.startAngle,a=function(e,t){return j1(t-e)*Math.min(Math.abs(t-e),359.999)}(o,e.endAngle),s=o+a,l=nre(t,n,i,o),c=nre(t,n,i,s),d="M ".concat(l.x,",").concat(l.y,"\n    A ").concat(i,",").concat(i,",0,\n    ").concat(+(Math.abs(a)>180),",").concat(+(o>s),",\n    ").concat(c.x,",").concat(c.y,"\n  ");if(r>0){var u=nre(t,n,r,o),p=nre(t,n,r,s);d+="L ".concat(p.x,",").concat(p.y,"\n            A ").concat(r,",").concat(r,",0,\n            ").concat(+(Math.abs(a)>180),",").concat(+(o<=s),",\n            ").concat(u.x,",").concat(u.y," Z")}else d+="L ".concat(t,",").concat(n," Z");return d},oie={cx:0,cy:0,innerRadius:0,outerRadius:0,startAngle:0,endAngle:0,cornerRadius:0,forceCornerRadius:!1,cornerIsExternal:!1},aie=function(e){var t=tie(tie({},oie),e),n=t.cx,r=t.cy,i=t.innerRadius,o=t.outerRadius,a=t.cornerRadius,s=t.forceCornerRadius,l=t.cornerIsExternal,c=t.startAngle,d=t.endAngle,u=t.className;if(o<i||c===d)return null;var p,h=PJ("recharts-sector",u),m=o-i,f=k1(a,m,0,!0);return p=f>0&&Math.abs(c-d)<360?function(e){var t=e.cx,n=e.cy,r=e.innerRadius,i=e.outerRadius,o=e.cornerRadius,a=e.forceCornerRadius,s=e.cornerIsExternal,l=e.startAngle,c=e.endAngle,d=j1(c-l),u=rie({cx:t,cy:n,radius:i,angle:l,sign:d,cornerRadius:o,cornerIsExternal:s}),p=u.circleTangency,h=u.lineTangency,m=u.theta,f=rie({cx:t,cy:n,radius:i,angle:c,sign:-d,cornerRadius:o,cornerIsExternal:s}),g=f.circleTangency,v=f.lineTangency,x=f.theta,y=s?Math.abs(l-c):Math.abs(l-c)-m-x;if(y<0)return a?"M ".concat(h.x,",").concat(h.y,"\n        a").concat(o,",").concat(o,",0,0,1,").concat(2*o,",0\n        a").concat(o,",").concat(o,",0,0,1,").concat(2*-o,",0\n      "):iie({cx:t,cy:n,innerRadius:r,outerRadius:i,startAngle:l,endAngle:c});var b="M ".concat(h.x,",").concat(h.y,"\n    A").concat(o,",").concat(o,",0,0,").concat(+(d<0),",").concat(p.x,",").concat(p.y,"\n    A").concat(i,",").concat(i,",0,").concat(+(y>180),",").concat(+(d<0),",").concat(g.x,",").concat(g.y,"\n    A").concat(o,",").concat(o,",0,0,").concat(+(d<0),",").concat(v.x,",").concat(v.y,"\n  ");if(r>0){var j=rie({cx:t,cy:n,radius:r,angle:l,sign:d,isExternal:!0,cornerRadius:o,cornerIsExternal:s}),_=j.circleTangency,C=j.lineTangency,w=j.theta,S=rie({cx:t,cy:n,radius:r,angle:c,sign:-d,isExternal:!0,cornerRadius:o,cornerIsExternal:s}),A=S.circleTangency,k=S.lineTangency,T=S.theta,E=s?Math.abs(l-c):Math.abs(l-c)-w-T;if(E<0&&0===o)return"".concat(b,"L").concat(t,",").concat(n,"Z");b+="L".concat(k.x,",").concat(k.y,"\n      A").concat(o,",").concat(o,",0,0,").concat(+(d<0),",").concat(A.x,",").concat(A.y,"\n      A").concat(r,",").concat(r,",0,").concat(+(E>180),",").concat(+(d>0),",").concat(_.x,",").concat(_.y,"\n      A").concat(o,",").concat(o,",0,0,").concat(+(d<0),",").concat(C.x,",").concat(C.y,"Z")}else b+="L".concat(t,",").concat(n,"Z");return b}({cx:n,cy:r,innerRadius:i,outerRadius:o,cornerRadius:Math.min(f,m/2),forceCornerRadius:s,cornerIsExternal:l,startAngle:c,endAngle:d}):iie({cx:n,cy:r,innerRadius:i,outerRadius:o,startAngle:c,endAngle:d}),We.createElement("path",Jre({},e2(t,!0),{className:h,d:p,role:"img"}))},sie=["option","shapeType","propTransformer","activeClassName","isActive"];function lie(e){return lie="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},lie(e)}function cie(e,t){if(null==e)return{};var n,r,i=function(e,t){if(null==e)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function die(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function uie(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?die(Object(n),!0).forEach(function(t){pie(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):die(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function pie(e,t,n){return t=function(e){var t=function(e,t){if("object"!=lie(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=lie(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==lie(t)?t:t+""}(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function hie(e,t){return uie(uie({},t),e)}function mie(e){var t=e.shapeType,n=e.elementProps;switch(t){case"rectangle":return We.createElement(m2,n);case"trapezoid":return We.createElement(Xre,n);case"sector":return We.createElement(aie,n);case"symbols":if(function(e){return"symbols"===e}(t))return We.createElement(A5,n);break;default:return null}}function fie(e){var t,n=e.option,r=e.shapeType,i=e.propTransformer,o=void 0===i?hie:i,a=e.activeClassName,s=void 0===a?"recharts-active-shape":a,l=e.isActive,c=cie(e,sie);if((0,We.isValidElement)(n))t=(0,We.cloneElement)(n,uie(uie({},c),function(e){return(0,We.isValidElement)(e)?e.props:e}(n)));else if(h1()(n))t=n(c);else if($re()(n)&&!zre()(n)){var d=o(n,c);t=We.createElement(mie,{shapeType:r,elementProps:d})}else{var u=c;t=We.createElement(mie,{shapeType:r,elementProps:u})}return l?We.createElement(L2,{className:s},t):t}function gie(e,t){return null!=t&&"trapezoids"in e.props}function vie(e,t){return null!=t&&"sectors"in e.props}function xie(e,t){return null!=t&&"points"in e.props}function yie(e,t){var n,r,i=e.x===(null===t||void 0===t||null===(n=t.labelViewBox)||void 0===n?void 0:n.x)||e.x===t.x,o=e.y===(null===t||void 0===t||null===(r=t.labelViewBox)||void 0===r?void 0:r.y)||e.y===t.y;return i&&o}function bie(e,t){var n=e.endAngle===t.endAngle,r=e.startAngle===t.startAngle;return n&&r}function jie(e,t){var n=e.x===t.x,r=e.y===t.y,i=e.z===t.z;return n&&r&&i}function _ie(e){var t=e.activeTooltipItem,n=e.graphicalItem,r=e.itemData,i=function(e,t){var n;return gie(e,t)?n="trapezoids":vie(e,t)?n="sectors":xie(e,t)&&(n="points"),n}(n,t),o=function(e,t){var n,r;return gie(e,t)?null===(n=t.tooltipPayload)||void 0===n||null===(n=n[0])||void 0===n||null===(n=n.payload)||void 0===n?void 0:n.payload:vie(e,t)?null===(r=t.tooltipPayload)||void 0===r||null===(r=r[0])||void 0===r||null===(r=r.payload)||void 0===r?void 0:r.payload:xie(e,t)?t.payload:{}}(n,t),a=r.filter(function(e,r){var a=ite()(o,e),s=n.props[i].filter(function(e){var r=function(e,t){var n;return gie(e,t)?n=yie:vie(e,t)?n=bie:xie(e,t)&&(n=jie),n}(n,t);return r(e,t)}),l=n.props[i].indexOf(s[s.length-1]);return a&&r===l});return r.indexOf(a[a.length-1])}var Cie=["x","y"];function wie(e){return wie="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},wie(e)}function Sie(){return Sie=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Sie.apply(this,arguments)}function Aie(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function kie(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Aie(Object(n),!0).forEach(function(t){Tie(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Aie(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function Tie(e,t,n){return t=function(e){var t=function(e,t){if("object"!=wie(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=wie(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==wie(t)?t:t+""}(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Eie(e,t){if(null==e)return{};var n,r,i=function(e,t){if(null==e)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function Mie(e,t){var n=e.x,r=e.y,i=Eie(e,Cie),o="".concat(n),a=parseInt(o,10),s="".concat(r),l=parseInt(s,10),c="".concat(t.height||i.height),d=parseInt(c,10),u="".concat(t.width||i.width),p=parseInt(u,10);return kie(kie(kie(kie(kie({},t),i),a?{x:a}:{}),l?{y:l}:{}),{},{height:d,width:p,name:t.name,radius:t.radius})}function Oie(e){return We.createElement(fie,Sie({shapeType:"rectangle",propTransformer:Mie,activeClassName:"recharts-active-bar"},e))}var Rie,Pie=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return function(n,r){if("number"===typeof e)return e;var i=C1(n)||function(e){return c1()(e)}(n);return i?e(n,r):(i||T2(!1),t)}},Die=["value","background"];function Nie(e){return Nie="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Nie(e)}function Lie(e,t){if(null==e)return{};var n,r,i=function(e,t){if(null==e)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function Iie(){return Iie=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Iie.apply(this,arguments)}function Fie(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function $ie(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Fie(Object(n),!0).forEach(function(t){Vie(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Fie(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function Bie(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,Gie(r.key),r)}}function zie(e,t,n){return t=Wie(t),function(e,t){if(t&&("object"===Nie(t)||"function"===typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,Hie()?Reflect.construct(t,n||[],Wie(e).constructor):t.apply(e,n))}function Hie(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(Hie=function(){return!!e})()}function Wie(e){return Wie=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},Wie(e)}function Uie(e,t){return Uie=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},Uie(e,t)}function Vie(e,t,n){return(t=Gie(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Gie(e){var t=function(e,t){if("object"!=Nie(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=Nie(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==Nie(t)?t:t+""}var qie=function(e){function t(){var e;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return Vie(e=zie(this,t,[].concat(r)),"state",{isAnimationFinished:!1}),Vie(e,"id",A1("recharts-bar-")),Vie(e,"handleAnimationEnd",function(){var t=e.props.onAnimationEnd;e.setState({isAnimationFinished:!0}),t&&t()}),Vie(e,"handleAnimationStart",function(){var t=e.props.onAnimationStart;e.setState({isAnimationFinished:!1}),t&&t()}),e}return function(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Uie(e,t)}(t,e),n=t,r=[{key:"renderRectanglesStatically",value:function(e){var t=this,n=this.props,r=n.shape,i=n.dataKey,o=n.activeIndex,a=n.activeBar,s=e2(this.props,!1);return e&&e.map(function(e,n){var l=n===o,c=l?a:r,d=$ie($ie($ie({},s),e),{},{isActive:l,option:c,index:n,dataKey:i,onAnimationStart:t.handleAnimationStart,onAnimationEnd:t.handleAnimationEnd});return We.createElement(L2,Iie({className:"recharts-bar-rectangle"},$1(t.props,e,n),{key:"rectangle-".concat(null===e||void 0===e?void 0:e.x,"-").concat(null===e||void 0===e?void 0:e.y,"-").concat(null===e||void 0===e?void 0:e.value,"-").concat(n)}),We.createElement(Oie,d))})}},{key:"renderRectanglesWithAnimation",value:function(){var e=this,t=this.props,n=t.data,r=t.layout,i=t.isAnimationActive,o=t.animationBegin,a=t.animationDuration,s=t.animationEasing,l=t.animationId,c=this.state.prevData;return We.createElement(s1,{begin:o,duration:a,isActive:i,easing:s,from:{t:0},to:{t:1},key:"bar-".concat(l),onAnimationEnd:this.handleAnimationEnd,onAnimationStart:this.handleAnimationStart},function(t){var i=t.t,o=n.map(function(e,t){var n=c&&c[t];if(n){var o=E1(n.x,e.x),a=E1(n.y,e.y),s=E1(n.width,e.width),l=E1(n.height,e.height);return $ie($ie({},e),{},{x:o(i),y:a(i),width:s(i),height:l(i)})}if("horizontal"===r){var d=E1(0,e.height)(i);return $ie($ie({},e),{},{y:e.y+e.height-d,height:d})}var u=E1(0,e.width)(i);return $ie($ie({},e),{},{width:u})});return We.createElement(L2,null,e.renderRectanglesStatically(o))})}},{key:"renderRectangles",value:function(){var e=this.props,t=e.data,n=e.isAnimationActive,r=this.state.prevData;return!(n&&t&&t.length)||r&&ite()(r,t)?this.renderRectanglesStatically(t):this.renderRectanglesWithAnimation()}},{key:"renderBackground",value:function(){var e=this,t=this.props,n=t.data,r=t.dataKey,i=t.activeIndex,o=e2(this.props.background,!1);return n.map(function(t,n){t.value;var a=t.background,s=Lie(t,Die);if(!a)return null;var l=$ie($ie($ie($ie($ie({},s),{},{fill:"#eee"},a),o),$1(e.props,t,n)),{},{onAnimationStart:e.handleAnimationStart,onAnimationEnd:e.handleAnimationEnd,dataKey:r,index:n,className:"recharts-bar-background-rectangle"});return We.createElement(Oie,Iie({key:"background-bar-".concat(n),option:e.props.background,isActive:n===i},l))})}},{key:"renderErrorBar",value:function(e,t){if(this.props.isAnimationActive&&!this.state.isAnimationFinished)return null;var n=this.props,r=n.data,i=n.xAxis,o=n.yAxis,a=n.layout,s=Z1(n.children,qte);if(!s)return null;var l="vertical"===a?r[0].height/2:r[0].width/2,c=function(e,t){var n=Array.isArray(e.value)?e.value[1]:e.value;return{x:e.x,y:e.y,value:n,errorVal:one(e,t)}},d={clipPath:e?"url(#clipPath-".concat(t,")"):null};return We.createElement(L2,d,s.map(function(e){return We.cloneElement(e,{key:"error-bar-".concat(t,"-").concat(e.props.dataKey),data:r,xAxis:i,yAxis:o,layout:a,offset:l,dataPointFormatter:c})}))}},{key:"render",value:function(){var e=this.props,t=e.hide,n=e.data,r=e.className,i=e.xAxis,o=e.yAxis,a=e.left,s=e.top,l=e.width,c=e.height,d=e.isAnimationActive,u=e.background,p=e.id;if(t||!n||!n.length)return null;var h=this.state.isAnimationFinished,m=PJ("recharts-bar",r),f=i&&i.allowDataOverflow,g=o&&o.allowDataOverflow,v=f||g,x=c1()(p)?this.id:p;return We.createElement(L2,{className:m},f||g?We.createElement("defs",null,We.createElement("clipPath",{id:"clipPath-".concat(x)},We.createElement("rect",{x:f?a:a-l/2,y:g?s:s-c/2,width:f?l:2*l,height:g?c:2*c}))):null,We.createElement(L2,{className:"recharts-bar-rectangles",clipPath:v?"url(#clipPath-".concat(x,")"):null},u?this.renderBackground():null,this.renderRectangles()),this.renderErrorBar(v,x),(!d||h)&&Ire.renderCallByParent(this.props,n))}}],i=[{key:"getDerivedStateFromProps",value:function(e,t){return e.animationId!==t.prevAnimationId?{prevAnimationId:e.animationId,curData:e.data,prevData:t.curData}:e.data!==t.curData?{curData:e.data}:null}}],r&&Bie(n.prototype,r),i&&Bie(n,i),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r,i}(We.PureComponent);function Yie(e){return Yie="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Yie(e)}function Zie(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,Jie(r.key),r)}}function Kie(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function Xie(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Kie(Object(n),!0).forEach(function(t){Qie(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Kie(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function Qie(e,t,n){return(t=Jie(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Jie(e){var t=function(e,t){if("object"!=Yie(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=Yie(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==Yie(t)?t:t+""}Rie=qie,Vie(qie,"displayName","Bar"),Vie(qie,"defaultProps",{xAxisId:0,yAxisId:0,legendType:"rect",minPointSize:0,hide:!1,data:[],layout:"vertical",activeBar:!1,isAnimationActive:!c6.isSsr,animationBegin:0,animationDuration:400,animationEasing:"ease"}),Vie(qie,"getComposedData",function(e){var t=e.props,n=e.item,r=e.barPosition,i=e.bandSize,o=e.xAxis,a=e.yAxis,s=e.xAxisTicks,l=e.yAxisTicks,c=e.stackedData,d=e.dataStartIndex,u=e.displayedData,p=e.offset,h=function(e,t){if(!e)return null;for(var n=0,r=e.length;n<r;n++)if(e[n].item===t)return e[n].position;return null}(r,n);if(!h)return null;var m=t.layout,f=n.type.defaultProps,g=void 0!==f?$ie($ie({},f),n.props):n.props,v=g.dataKey,x=g.children,y=g.minPointSize,b="horizontal"===m?a:o,j=c?b.scale.domain():null,_=function(e){var t=e.numericAxis,n=t.scale.domain();if("number"===t.type){var r=Math.min(n[0],n[1]),i=Math.max(n[0],n[1]);return r<=0&&i>=0?0:i<0?i:r}return n[0]}({numericAxis:b}),C=Z1(x,Cre),w=u.map(function(e,t){var r,u,p,f,g,x;c?r=function(e,t){if(!t||2!==t.length||!C1(t[0])||!C1(t[1]))return e;var n=Math.min(t[0],t[1]),r=Math.max(t[0],t[1]),i=[e[0],e[1]];return(!C1(e[0])||e[0]<n)&&(i[0]=n),(!C1(e[1])||e[1]>r)&&(i[1]=r),i[0]>r&&(i[0]=r),i[1]<n&&(i[1]=n),i}(c[d+t],j):(r=one(e,v),Array.isArray(r)||(r=[_,r]));var b=Pie(y,Rie.defaultProps.minPointSize)(r[1],t);if("horizontal"===m){var w,S=[a.scale(r[0]),a.scale(r[1])],A=S[0],k=S[1];u=_ne({axis:o,ticks:s,bandSize:i,offset:h.offset,entry:e,index:t}),p=null!==(w=null!==k&&void 0!==k?k:A)&&void 0!==w?w:void 0,f=h.size;var T=A-k;if(g=Number.isNaN(T)?0:T,x={x:u,y:a.y,width:f,height:a.height},Math.abs(b)>0&&Math.abs(g)<Math.abs(b)){var E=j1(g||b)*(Math.abs(b)-Math.abs(g));p-=E,g+=E}}else{var M=[o.scale(r[0]),o.scale(r[1])],O=M[0],R=M[1];if(u=O,p=_ne({axis:a,ticks:l,bandSize:i,offset:h.offset,entry:e,index:t}),f=R-O,g=h.size,x={x:o.x,y:p,width:o.width,height:g},Math.abs(b)>0&&Math.abs(f)<Math.abs(b))f+=j1(f||b)*(Math.abs(b)-Math.abs(f))}return $ie($ie($ie({},e),{},{x:u,y:p,width:f,height:g,value:c?r:r[1],payload:e,background:x},C&&C[t]&&C[t].props),{},{tooltipPayload:[Ene(n,e)],tooltipPosition:{x:u+f/2,y:p+g/2}})});return $ie({data:w,layout:m},p)});var eoe=function(e,t,n,r,i){var o=e.width,a=e.height,s=e.layout,l=e.children,c=Object.keys(t),d={left:n.left,leftMirror:n.left,right:o-n.right,rightMirror:o-n.right,top:n.top,topMirror:n.top,bottom:a-n.bottom,bottomMirror:a-n.bottom},u=!!K1(l,qie);return c.reduce(function(o,a){var l,c,p,h,m,f=t[a],g=f.orientation,v=f.domain,x=f.padding,y=void 0===x?{}:x,b=f.mirror,j=f.reversed,_="".concat(g).concat(b?"Mirror":"");if("number"===f.type&&("gap"===f.padding||"no-gap"===f.padding)){var C=v[1]-v[0],w=1/0,S=f.categoricalDomain.sort(O1);if(S.forEach(function(e,t){t>0&&(w=Math.min((e||0)-(S[t-1]||0),w))}),Number.isFinite(w)){var A=w/C,k="vertical"===f.layout?n.height:n.width;if("gap"===f.padding&&(l=A*k/2),"no-gap"===f.padding){var T=k1(e.barCategoryGap,A*k),E=A*k/2;l=E-T-(E-T)/k*T}}}c="xAxis"===r?[n.left+(y.left||0)+(l||0),n.left+n.width-(y.right||0)-(l||0)]:"yAxis"===r?"horizontal"===s?[n.top+n.height-(y.bottom||0),n.top+(y.top||0)]:[n.top+(y.top||0)+(l||0),n.top+n.height-(y.bottom||0)-(l||0)]:f.range,j&&(c=[c[1],c[0]]);var M=fne(f,i,u),O=M.scale,R=M.realScaleType;O.domain(v).range(c),vne(O);var P=bne(O,Xie(Xie({},f),{},{realScaleType:R}));"xAxis"===r?(m="top"===g&&!b||"bottom"===g&&b,p=n.left,h=d[_]-m*f.height):"yAxis"===r&&(m="left"===g&&!b||"right"===g&&b,p=d[_]-m*f.width,h=n.top);var D=Xie(Xie(Xie({},f),P),{},{realScaleType:R,x:p,y:h,scale:O,width:"xAxis"===r?n.width:f.width,height:"yAxis"===r?n.height:f.height});return D.bandSize=kne(D,P),f.hide||"xAxis"!==r?f.hide||(d[_]+=(m?-1:1)*D.width):d[_]+=(m?-1:1)*D.height,Xie(Xie({},o),{},Qie({},a,D))},{})},toe=function(e,t){var n=e.x,r=e.y,i=t.x,o=t.y;return{x:Math.min(n,i),y:Math.min(r,o),width:Math.abs(i-n),height:Math.abs(o-r)}},noe=function(){function e(t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.scale=t}return t=e,n=[{key:"domain",get:function(){return this.scale.domain}},{key:"range",get:function(){return this.scale.range}},{key:"rangeMin",get:function(){return this.range()[0]}},{key:"rangeMax",get:function(){return this.range()[1]}},{key:"bandwidth",get:function(){return this.scale.bandwidth}},{key:"apply",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.bandAware,r=t.position;if(void 0!==e){if(r)switch(r){case"start":default:return this.scale(e);case"middle":var i=this.bandwidth?this.bandwidth()/2:0;return this.scale(e)+i;case"end":var o=this.bandwidth?this.bandwidth():0;return this.scale(e)+o}if(n){var a=this.bandwidth?this.bandwidth()/2:0;return this.scale(e)+a}return this.scale(e)}}},{key:"isInRange",value:function(e){var t=this.range(),n=t[0],r=t[t.length-1];return n<=r?e>=n&&e<=r:e>=r&&e<=n}}],r=[{key:"create",value:function(t){return new e(t)}}],n&&Zie(t.prototype,n),r&&Zie(t,r),Object.defineProperty(t,"prototype",{writable:!1}),t;var t,n,r}();Qie(noe,"EPS",1e-4);var roe=function(e){var t=Object.keys(e).reduce(function(t,n){return Xie(Xie({},t),{},Qie({},n,noe.create(e[n])))},{});return Xie(Xie({},t),{},{apply:function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=n.bandAware,i=n.position;return EW()(e,function(e,n){return t[n].apply(e,{bandAware:r,position:i})})},isInRange:function(e){return _re()(e,function(e,n){return t[n].isInRange(e)})}})};function ioe(){return ioe=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},ioe.apply(this,arguments)}function ooe(e){return ooe="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},ooe(e)}function aoe(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function soe(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?aoe(Object(n),!0).forEach(function(t){hoe(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):aoe(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function loe(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,moe(r.key),r)}}function coe(e,t,n){return t=uoe(t),function(e,t){if(t&&("object"===ooe(t)||"function"===typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,doe()?Reflect.construct(t,n||[],uoe(e).constructor):t.apply(e,n))}function doe(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(doe=function(){return!!e})()}function uoe(e){return uoe=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},uoe(e)}function poe(e,t){return poe=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},poe(e,t)}function hoe(e,t,n){return(t=moe(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function moe(e){var t=function(e,t){if("object"!=ooe(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=ooe(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==ooe(t)?t:t+""}var foe=function(e){function t(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),coe(this,t,arguments)}return function(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&poe(e,t)}(t,e),n=t,r=[{key:"render",value:function(){var e=this.props,n=e.x,r=e.y,i=e.r,o=e.alwaysShow,a=e.clipPathId,s=w1(n),l=w1(r);if(v2(void 0===o,'The alwaysShow prop is deprecated. Please use ifOverflow="extendDomain" instead.'),!s||!l)return null;var c=function(e){var t=e.x,n=e.y,r=e.xAxis,i=e.yAxis,o=roe({x:r.scale,y:i.scale}),a=o.apply({x:t,y:n},{bandAware:!0});return bre(e,"discard")&&!o.isInRange(a)?null:a}(this.props);if(!c)return null;var d=c.x,u=c.y,p=this.props,h=p.shape,m=p.className,f=soe(soe({clipPath:bre(this.props,"hidden")?"url(#".concat(a,")"):void 0},e2(this.props,!0)),{},{cx:d,cy:u});return We.createElement(L2,{className:PJ("recharts-reference-dot",m)},t.renderDot(h,f),xre.renderCallByParent(this.props,{x:d-i,y:u-i,width:2*i,height:2*i}))}}],r&&loe(n.prototype,r),i&&loe(n,i),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r,i}(We.Component);hoe(foe,"displayName","ReferenceDot"),hoe(foe,"defaultProps",{isFront:!1,ifOverflow:"discard",xAxisId:0,yAxisId:0,r:10,fill:"#fff",stroke:"#ccc",fillOpacity:1,strokeWidth:1}),hoe(foe,"renderDot",function(e,t){return We.isValidElement(e)?We.cloneElement(e,t):h1()(e)?e(t):We.createElement(e3,ioe({},t,{cx:t.cx,cy:t.cy,className:"recharts-reference-dot-dot"}))});var goe=n(24597),voe=n.n(goe),xoe=n(98990),yoe=n.n(xoe),boe=n(15797),joe=n.n(boe)()(function(e){return{x:e.left,y:e.top,width:e.width,height:e.height}},function(e){return["l",e.left,"t",e.top,"w",e.width,"h",e.height].join("")});var _oe=(0,We.createContext)(void 0),Coe=(0,We.createContext)(void 0),woe=(0,We.createContext)(void 0),Soe=(0,We.createContext)({}),Aoe=(0,We.createContext)(void 0),koe=(0,We.createContext)(0),Toe=(0,We.createContext)(0),Eoe=function(e){var t=e.state,n=t.xAxisMap,r=t.yAxisMap,i=t.offset,o=e.clipPathId,a=e.children,s=e.width,l=e.height,c=joe(i);return We.createElement(_oe.Provider,{value:n},We.createElement(Coe.Provider,{value:r},We.createElement(Soe.Provider,{value:i},We.createElement(woe.Provider,{value:c},We.createElement(Aoe.Provider,{value:o},We.createElement(koe.Provider,{value:l},We.createElement(Toe.Provider,{value:s},a)))))))};var Moe=function(e){var t=(0,We.useContext)(_oe);null==t&&T2(!1);var n=t[e];return null==n&&T2(!1),n},Ooe=function(e){var t=(0,We.useContext)(Coe);null==t&&T2(!1);var n=t[e];return null==n&&T2(!1),n},Roe=function(){return(0,We.useContext)(Toe)},Poe=function(){return(0,We.useContext)(koe)};function Doe(e){return Doe="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Doe(e)}function Noe(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,Woe(r.key),r)}}function Loe(e,t,n){return t=Foe(t),function(e,t){if(t&&("object"===Doe(t)||"function"===typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,Ioe()?Reflect.construct(t,n||[],Foe(e).constructor):t.apply(e,n))}function Ioe(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(Ioe=function(){return!!e})()}function Foe(e){return Foe=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},Foe(e)}function $oe(e,t){return $oe=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},$oe(e,t)}function Boe(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function zoe(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Boe(Object(n),!0).forEach(function(t){Hoe(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Boe(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function Hoe(e,t,n){return(t=Woe(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Woe(e){var t=function(e,t){if("object"!=Doe(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=Doe(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==Doe(t)?t:t+""}function Uoe(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,i,o,a,s=[],l=!0,c=!1;try{if(o=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;l=!1}else for(;!(l=(r=o.call(n)).done)&&(s.push(r.value),s.length!==t);l=!0);}catch(e){c=!0,i=e}finally{try{if(!l&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(c)throw i}}return s}}(e,t)||function(e,t){if(!e)return;if("string"===typeof e)return Voe(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Voe(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Voe(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function Goe(){return Goe=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Goe.apply(this,arguments)}function qoe(e){var t=e.x,n=e.y,r=e.segment,i=e.xAxisId,o=e.yAxisId,a=e.shape,s=e.className,l=e.alwaysShow,c=(0,We.useContext)(Aoe),d=Moe(i),u=Ooe(o),p=(0,We.useContext)(woe);if(!c||!p)return null;v2(void 0===l,'The alwaysShow prop is deprecated. Please use ifOverflow="extendDomain" instead.');var h=function(e,t,n,r,i,o,a,s,l){var c=i.x,d=i.y,u=i.width,p=i.height;if(n){var h=l.y,m=e.y.apply(h,{position:o});if(bre(l,"discard")&&!e.y.isInRange(m))return null;var f=[{x:c+u,y:m},{x:c,y:m}];return"left"===s?f.reverse():f}if(t){var g=l.x,v=e.x.apply(g,{position:o});if(bre(l,"discard")&&!e.x.isInRange(v))return null;var x=[{x:v,y:d+p},{x:v,y:d}];return"top"===a?x.reverse():x}if(r){var y=l.segment.map(function(t){return e.apply(t,{position:o})});return bre(l,"discard")&&voe()(y,function(t){return!e.isInRange(t)})?null:y}return null}(roe({x:d.scale,y:u.scale}),w1(t),w1(n),r&&2===r.length,p,e.position,d.orientation,u.orientation,e);if(!h)return null;var m=Uoe(h,2),f=m[0],g=f.x,v=f.y,x=m[1],y=x.x,b=x.y,j=zoe(zoe({clipPath:bre(e,"hidden")?"url(#".concat(c,")"):void 0},e2(e,!0)),{},{x1:g,y1:v,x2:y,y2:b});return We.createElement(L2,{className:PJ("recharts-reference-line",s)},function(e,t){return We.isValidElement(e)?We.cloneElement(e,t):h1()(e)?e(t):We.createElement("line",Goe({},t,{className:"recharts-reference-line-line"}))}(a,j),xre.renderCallByParent(e,function(e){var t=e.x1,n=e.y1,r=e.x2,i=e.y2;return toe({x:t,y:n},{x:r,y:i})}({x1:g,y1:v,x2:y,y2:b})))}var Yoe=function(e){function t(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),Loe(this,t,arguments)}return function(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&$oe(e,t)}(t,e),n=t,(r=[{key:"render",value:function(){return We.createElement(qoe,this.props)}}])&&Noe(n.prototype,r),i&&Noe(n,i),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r,i}(We.Component);function Zoe(){return Zoe=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Zoe.apply(this,arguments)}function Koe(e){return Koe="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Koe(e)}function Xoe(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function Qoe(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Xoe(Object(n),!0).forEach(function(t){iae(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Xoe(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function Joe(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,oae(r.key),r)}}function eae(e,t,n){return t=nae(t),function(e,t){if(t&&("object"===Koe(t)||"function"===typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,tae()?Reflect.construct(t,n||[],nae(e).constructor):t.apply(e,n))}function tae(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(tae=function(){return!!e})()}function nae(e){return nae=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},nae(e)}function rae(e,t){return rae=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},rae(e,t)}function iae(e,t,n){return(t=oae(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function oae(e){var t=function(e,t){if("object"!=Koe(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=Koe(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==Koe(t)?t:t+""}Hoe(Yoe,"displayName","ReferenceLine"),Hoe(Yoe,"defaultProps",{isFront:!1,ifOverflow:"discard",xAxisId:0,yAxisId:0,fill:"none",stroke:"#ccc",fillOpacity:1,strokeWidth:1,position:"middle"});var aae=function(e){function t(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),eae(this,t,arguments)}return function(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&rae(e,t)}(t,e),n=t,(r=[{key:"render",value:function(){var e=this.props,n=e.x1,r=e.x2,i=e.y1,o=e.y2,a=e.className,s=e.alwaysShow,l=e.clipPathId;v2(void 0===s,'The alwaysShow prop is deprecated. Please use ifOverflow="extendDomain" instead.');var c=w1(n),d=w1(r),u=w1(i),p=w1(o),h=this.props.shape;if(!c&&!d&&!u&&!p&&!h)return null;var m=function(e,t,n,r,i){var o=i.x1,a=i.x2,s=i.y1,l=i.y2,c=i.xAxis,d=i.yAxis;if(!c||!d)return null;var u=roe({x:c.scale,y:d.scale}),p={x:e?u.x.apply(o,{position:"start"}):u.x.rangeMin,y:n?u.y.apply(s,{position:"start"}):u.y.rangeMin},h={x:t?u.x.apply(a,{position:"end"}):u.x.rangeMax,y:r?u.y.apply(l,{position:"end"}):u.y.rangeMax};return!bre(i,"discard")||u.isInRange(p)&&u.isInRange(h)?toe(p,h):null}(c,d,u,p,this.props);if(!m&&!h)return null;var f=bre(this.props,"hidden")?"url(#".concat(l,")"):void 0;return We.createElement(L2,{className:PJ("recharts-reference-area",a)},t.renderRect(h,Qoe(Qoe({clipPath:f},e2(this.props,!0)),m)),xre.renderCallByParent(this.props,m))}}])&&Joe(n.prototype,r),i&&Joe(n,i),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r,i}(We.Component);function sae(e){return function(e){if(Array.isArray(e))return lae(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)return;if("string"===typeof e)return lae(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return lae(e,t)}(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.")}()}function lae(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}iae(aae,"displayName","ReferenceArea"),iae(aae,"defaultProps",{isFront:!1,ifOverflow:"discard",xAxisId:0,yAxisId:0,r:10,fill:"#ccc",fillOpacity:.5,stroke:"none",strokeWidth:1}),iae(aae,"renderRect",function(e,t){return We.isValidElement(e)?We.cloneElement(e,t):h1()(e)?e(t):We.createElement(m2,Zoe({},t,{className:"recharts-reference-area-rect"}))});var cae=function(e,t,n,r,i){var o=Z1(e,Yoe),a=Z1(e,foe),s=[].concat(sae(o),sae(a)),l=Z1(e,aae),c="".concat(r,"Id"),d=r[0],u=t;if(s.length&&(u=s.reduce(function(e,t){if(t.props[c]===n&&bre(t.props,"extendDomain")&&C1(t.props[d])){var r=t.props[d];return[Math.min(e[0],r),Math.max(e[1],r)]}return e},u)),l.length){var p="".concat(d,"1"),h="".concat(d,"2");u=l.reduce(function(e,t){if(t.props[c]===n&&bre(t.props,"extendDomain")&&C1(t.props[p])&&C1(t.props[h])){var r=t.props[p],i=t.props[h];return[Math.min(e[0],r,i),Math.max(e[1],r,i)]}return e},u)}return i&&i.length&&(u=i.reduce(function(e,t){return C1(t)?[Math.min(e[0],t),Math.max(e[1],t)]:e},u)),u},dae=n(38499),uae=new(n.n(dae)()),pae="recharts.syncMouseEvents";function hae(e){return hae="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},hae(e)}function mae(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,gae(r.key),r)}}function fae(e,t,n){return(t=gae(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function gae(e){var t=function(e,t){if("object"!=hae(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=hae(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==hae(t)?t:t+""}var vae=function(){return e=function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),fae(this,"activeIndex",0),fae(this,"coordinateList",[]),fae(this,"layout","horizontal")},t=[{key:"setDetails",value:function(e){var t,n=e.coordinateList,r=void 0===n?null:n,i=e.container,o=void 0===i?null:i,a=e.layout,s=void 0===a?null:a,l=e.offset,c=void 0===l?null:l,d=e.mouseHandlerCallback,u=void 0===d?null:d;this.coordinateList=null!==(t=null!==r&&void 0!==r?r:this.coordinateList)&&void 0!==t?t:[],this.container=null!==o&&void 0!==o?o:this.container,this.layout=null!==s&&void 0!==s?s:this.layout,this.offset=null!==c&&void 0!==c?c:this.offset,this.mouseHandlerCallback=null!==u&&void 0!==u?u:this.mouseHandlerCallback,this.activeIndex=Math.min(Math.max(this.activeIndex,0),this.coordinateList.length-1)}},{key:"focus",value:function(){this.spoofMouse()}},{key:"keyboardEvent",value:function(e){if(0!==this.coordinateList.length)switch(e.key){case"ArrowRight":if("horizontal"!==this.layout)return;this.activeIndex=Math.min(this.activeIndex+1,this.coordinateList.length-1),this.spoofMouse();break;case"ArrowLeft":if("horizontal"!==this.layout)return;this.activeIndex=Math.max(this.activeIndex-1,0),this.spoofMouse()}}},{key:"setIndex",value:function(e){this.activeIndex=e}},{key:"spoofMouse",value:function(){var e,t;if("horizontal"===this.layout&&0!==this.coordinateList.length){var n=this.container.getBoundingClientRect(),r=n.x,i=n.y,o=n.height,a=this.coordinateList[this.activeIndex].coordinate,s=(null===(e=window)||void 0===e?void 0:e.scrollX)||0,l=(null===(t=window)||void 0===t?void 0:t.scrollY)||0,c=r+a+s,d=i+this.offset.top+o/2+l;this.mouseHandlerCallback({pageX:c,pageY:d})}}}],t&&mae(e.prototype,t),n&&mae(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e;var e,t,n}();function xae(){}function yae(e,t,n){e._context.bezierCurveTo((2*e._x0+e._x1)/3,(2*e._y0+e._y1)/3,(e._x0+2*e._x1)/3,(e._y0+2*e._y1)/3,(e._x0+4*e._x1+t)/6,(e._y0+4*e._y1+n)/6)}function bae(e){this._context=e}function jae(e){this._context=e}function _ae(e){this._context=e}bae.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){switch(this._point){case 3:yae(this,this._x1,this._y1);case 2:this._context.lineTo(this._x1,this._y1)}(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;break;case 2:this._point=3,this._context.lineTo((5*this._x0+this._x1)/6,(5*this._y0+this._y1)/6);default:yae(this,e,t)}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}},jae.prototype={areaStart:xae,areaEnd:xae,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._y0=this._y1=this._y2=this._y3=this._y4=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:this._context.moveTo(this._x2,this._y2),this._context.closePath();break;case 2:this._context.moveTo((this._x2+2*this._x3)/3,(this._y2+2*this._y3)/3),this._context.lineTo((this._x3+2*this._x2)/3,(this._y3+2*this._y2)/3),this._context.closePath();break;case 3:this.point(this._x2,this._y2),this.point(this._x3,this._y3),this.point(this._x4,this._y4)}},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._x2=e,this._y2=t;break;case 1:this._point=2,this._x3=e,this._y3=t;break;case 2:this._point=3,this._x4=e,this._y4=t,this._context.moveTo((this._x0+4*this._x1+e)/6,(this._y0+4*this._y1+t)/6);break;default:yae(this,e,t)}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}},_ae.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){(this._line||0!==this._line&&3===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3;var n=(this._x0+4*this._x1+e)/6,r=(this._y0+4*this._y1+t)/6;this._line?this._context.lineTo(n,r):this._context.moveTo(n,r);break;case 3:this._point=4;default:yae(this,e,t)}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};class Cae{constructor(e,t){this._context=e,this._x=t}areaStart(){this._line=0}areaEnd(){this._line=NaN}lineStart(){this._point=0}lineEnd(){(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line}point(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;default:this._x?this._context.bezierCurveTo(this._x0=(this._x0+e)/2,this._y0,this._x0,t,e,t):this._context.bezierCurveTo(this._x0,this._y0=(this._y0+t)/2,e,this._y0,e,t)}this._x0=e,this._y0=t}}function wae(e){this._context=e}function Sae(e){this._context=e}function Aae(e){return new Sae(e)}function kae(e){return e<0?-1:1}function Tae(e,t,n){var r=e._x1-e._x0,i=t-e._x1,o=(e._y1-e._y0)/(r||i<0&&-0),a=(n-e._y1)/(i||r<0&&-0),s=(o*i+a*r)/(r+i);return(kae(o)+kae(a))*Math.min(Math.abs(o),Math.abs(a),.5*Math.abs(s))||0}function Eae(e,t){var n=e._x1-e._x0;return n?(3*(e._y1-e._y0)/n-t)/2:t}function Mae(e,t,n){var r=e._x0,i=e._y0,o=e._x1,a=e._y1,s=(o-r)/3;e._context.bezierCurveTo(r+s,i+s*t,o-s,a-s*n,o,a)}function Oae(e){this._context=e}function Rae(e){this._context=new Pae(e)}function Pae(e){this._context=e}function Dae(e){this._context=e}function Nae(e){var t,n,r=e.length-1,i=new Array(r),o=new Array(r),a=new Array(r);for(i[0]=0,o[0]=2,a[0]=e[0]+2*e[1],t=1;t<r-1;++t)i[t]=1,o[t]=4,a[t]=4*e[t]+2*e[t+1];for(i[r-1]=2,o[r-1]=7,a[r-1]=8*e[r-1]+e[r],t=1;t<r;++t)n=i[t]/o[t-1],o[t]-=n,a[t]-=n*a[t-1];for(i[r-1]=a[r-1]/o[r-1],t=r-2;t>=0;--t)i[t]=(a[t]-i[t+1])/o[t];for(o[r-1]=(e[r]+i[r-1])/2,t=0;t<r-1;++t)o[t]=2*e[t+1]-i[t+1];return[i,o]}function Lae(e,t){this._context=e,this._t=t}function Iae(e){return e[0]}function Fae(e){return e[1]}function $ae(e,t){var n=Z6(!0),r=null,i=Aae,o=null,a=g5(s);function s(s){var l,c,d,u=(s=qee(s)).length,p=!1;for(null==r&&(o=i(d=a())),l=0;l<=u;++l)!(l<u&&n(c=s[l],l,s))===p&&((p=!p)?o.lineStart():o.lineEnd()),p&&o.point(+e(c,l,s),+t(c,l,s));if(d)return o=null,d+""||null}return e="function"===typeof e?e:void 0===e?Iae:Z6(e),t="function"===typeof t?t:void 0===t?Fae:Z6(t),s.x=function(t){return arguments.length?(e="function"===typeof t?t:Z6(+t),s):e},s.y=function(e){return arguments.length?(t="function"===typeof e?e:Z6(+e),s):t},s.defined=function(e){return arguments.length?(n="function"===typeof e?e:Z6(!!e),s):n},s.curve=function(e){return arguments.length?(i=e,null!=r&&(o=i(r)),s):i},s.context=function(e){return arguments.length?(null==e?r=o=null:o=i(r=e),s):r},s}function Bae(e,t,n){var r=null,i=Z6(!0),o=null,a=Aae,s=null,l=g5(c);function c(c){var d,u,p,h,m,f=(c=qee(c)).length,g=!1,v=new Array(f),x=new Array(f);for(null==o&&(s=a(m=l())),d=0;d<=f;++d){if(!(d<f&&i(h=c[d],d,c))===g)if(g=!g)u=d,s.areaStart(),s.lineStart();else{for(s.lineEnd(),s.lineStart(),p=d-1;p>=u;--p)s.point(v[p],x[p]);s.lineEnd(),s.areaEnd()}g&&(v[d]=+e(h,d,c),x[d]=+t(h,d,c),s.point(r?+r(h,d,c):v[d],n?+n(h,d,c):x[d]))}if(m)return s=null,m+""||null}function d(){return $ae().defined(i).curve(a).context(o)}return e="function"===typeof e?e:void 0===e?Iae:Z6(+e),t="function"===typeof t?t:Z6(void 0===t?0:+t),n="function"===typeof n?n:void 0===n?Fae:Z6(+n),c.x=function(t){return arguments.length?(e="function"===typeof t?t:Z6(+t),r=null,c):e},c.x0=function(t){return arguments.length?(e="function"===typeof t?t:Z6(+t),c):e},c.x1=function(e){return arguments.length?(r=null==e?null:"function"===typeof e?e:Z6(+e),c):r},c.y=function(e){return arguments.length?(t="function"===typeof e?e:Z6(+e),n=null,c):t},c.y0=function(e){return arguments.length?(t="function"===typeof e?e:Z6(+e),c):t},c.y1=function(e){return arguments.length?(n=null==e?null:"function"===typeof e?e:Z6(+e),c):n},c.lineX0=c.lineY0=function(){return d().x(e).y(t)},c.lineY1=function(){return d().x(e).y(n)},c.lineX1=function(){return d().x(r).y(t)},c.defined=function(e){return arguments.length?(i="function"===typeof e?e:Z6(!!e),c):i},c.curve=function(e){return arguments.length?(a=e,null!=o&&(s=a(o)),c):a},c.context=function(e){return arguments.length?(null==e?o=s=null:s=a(o=e),c):o},c}function zae(e){return zae="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},zae(e)}function Hae(){return Hae=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Hae.apply(this,arguments)}function Wae(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function Uae(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Wae(Object(n),!0).forEach(function(t){Vae(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Wae(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function Vae(e,t,n){return t=function(e){var t=function(e,t){if("object"!=zae(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=zae(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==zae(t)?t:t+""}(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}wae.prototype={areaStart:xae,areaEnd:xae,lineStart:function(){this._point=0},lineEnd:function(){this._point&&this._context.closePath()},point:function(e,t){e=+e,t=+t,this._point?this._context.lineTo(e,t):(this._point=1,this._context.moveTo(e,t))}},Sae.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;default:this._context.lineTo(e,t)}}},Oae.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=this._t0=NaN,this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x1,this._y1);break;case 3:Mae(this,this._t0,Eae(this,this._t0))}(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){var n=NaN;if(t=+t,(e=+e)!==this._x1||t!==this._y1){switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;break;case 2:this._point=3,Mae(this,Eae(this,n=Tae(this,e,t)),n);break;default:Mae(this,this._t0,n=Tae(this,e,t))}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t,this._t0=n}}},(Rae.prototype=Object.create(Oae.prototype)).point=function(e,t){Oae.prototype.point.call(this,t,e)},Pae.prototype={moveTo:function(e,t){this._context.moveTo(t,e)},closePath:function(){this._context.closePath()},lineTo:function(e,t){this._context.lineTo(t,e)},bezierCurveTo:function(e,t,n,r,i,o){this._context.bezierCurveTo(t,e,r,n,o,i)}},Dae.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=[],this._y=[]},lineEnd:function(){var e=this._x,t=this._y,n=e.length;if(n)if(this._line?this._context.lineTo(e[0],t[0]):this._context.moveTo(e[0],t[0]),2===n)this._context.lineTo(e[1],t[1]);else for(var r=Nae(e),i=Nae(t),o=0,a=1;a<n;++o,++a)this._context.bezierCurveTo(r[0][o],i[0][o],r[1][o],i[1][o],e[a],t[a]);(this._line||0!==this._line&&1===n)&&this._context.closePath(),this._line=1-this._line,this._x=this._y=null},point:function(e,t){this._x.push(+e),this._y.push(+t)}},Lae.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=this._y=NaN,this._point=0},lineEnd:function(){0<this._t&&this._t<1&&2===this._point&&this._context.lineTo(this._x,this._y),(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line>=0&&(this._t=1-this._t,this._line=1-this._line)},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;default:if(this._t<=0)this._context.lineTo(this._x,t),this._context.lineTo(e,t);else{var n=this._x*(1-this._t)+e*this._t;this._context.lineTo(n,this._y),this._context.lineTo(n,t)}}this._x=e,this._y=t}};var Gae={curveBasisClosed:function(e){return new jae(e)},curveBasisOpen:function(e){return new _ae(e)},curveBasis:function(e){return new bae(e)},curveBumpX:function(e){return new Cae(e,!0)},curveBumpY:function(e){return new Cae(e,!1)},curveLinearClosed:function(e){return new wae(e)},curveLinear:Aae,curveMonotoneX:function(e){return new Oae(e)},curveMonotoneY:function(e){return new Rae(e)},curveNatural:function(e){return new Dae(e)},curveStep:function(e){return new Lae(e,.5)},curveStepAfter:function(e){return new Lae(e,1)},curveStepBefore:function(e){return new Lae(e,0)}},qae=function(e){return e.x===+e.x&&e.y===+e.y},Yae=function(e){return e.x},Zae=function(e){return e.y},Kae=function(e){var t,n=e.type,r=void 0===n?"linear":n,i=e.points,o=void 0===i?[]:i,a=e.baseLine,s=e.layout,l=e.connectNulls,c=void 0!==l&&l,d=function(e,t){if(h1()(e))return e;var n="curve".concat(A6()(e));return"curveMonotone"!==n&&"curveBump"!==n||!t?Gae[n]||Aae:Gae["".concat(n).concat("vertical"===t?"Y":"X")]}(r,s),u=c?o.filter(function(e){return qae(e)}):o;if(Array.isArray(a)){var p=c?a.filter(function(e){return qae(e)}):a,h=u.map(function(e,t){return Uae(Uae({},e),{},{base:p[t]})});return(t="vertical"===s?Bae().y(Zae).x1(Yae).x0(function(e){return e.base.x}):Bae().x(Yae).y1(Zae).y0(function(e){return e.base.y})).defined(qae).curve(d),t(h)}return(t="vertical"===s&&C1(a)?Bae().y(Zae).x1(Yae).x0(a):C1(a)?Bae().x(Yae).y1(Zae).y0(a):$ae().x(Yae).y(Zae)).defined(qae).curve(d),t(u)},Xae=function(e){var t=e.className,n=e.points,r=e.path,i=e.pathRef;if((!n||!n.length)&&!r)return null;var o=n&&n.length?Kae(e):r;return We.createElement("path",Hae({},e2(e,!1),F1(e),{className:PJ("recharts-curve",t),d:o,ref:i}))};function Qae(e){return Qae="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Qae(e)}var Jae=["x","y","top","left","width","height","className"];function ese(){return ese=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},ese.apply(this,arguments)}function tse(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function nse(e,t,n){return t=function(e){var t=function(e,t){if("object"!=Qae(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=Qae(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==Qae(t)?t:t+""}(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function rse(e,t){if(null==e)return{};var n,r,i=function(e,t){if(null==e)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}var ise=function(e,t,n,r,i,o){return"M".concat(e,",").concat(i,"v").concat(r,"M").concat(o,",").concat(t,"h").concat(n)},ose=function(e){var t=e.x,n=void 0===t?0:t,r=e.y,i=void 0===r?0:r,o=e.top,a=void 0===o?0:o,s=e.left,l=void 0===s?0:s,c=e.width,d=void 0===c?0:c,u=e.height,p=void 0===u?0:u,h=e.className,m=function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?tse(Object(n),!0).forEach(function(t){nse(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):tse(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}({x:n,y:i,top:a,left:l,width:d,height:p},rse(e,Jae));return C1(n)&&C1(i)&&C1(d)&&C1(p)&&C1(a)&&C1(l)?We.createElement("path",ese({},e2(m,!0),{className:PJ("recharts-cross",h),d:ise(n,i,d,p,a,l)})):null};function ase(e){var t=e.cx,n=e.cy,r=e.radius,i=e.startAngle,o=e.endAngle;return{points:[nre(t,n,r,i),nre(t,n,r,o)],cx:t,cy:n,radius:r,startAngle:i,endAngle:o}}function sse(e,t,n){var r,i,o,a;if("horizontal"===e)o=r=t.x,i=n.top,a=n.top+n.height;else if("vertical"===e)a=i=t.y,r=n.left,o=n.left+n.width;else if(null!=t.cx&&null!=t.cy){if("centric"!==e)return ase(t);var s=t.cx,l=t.cy,c=t.innerRadius,d=t.outerRadius,u=t.angle,p=nre(s,l,c,u),h=nre(s,l,d,u);r=p.x,i=p.y,o=h.x,a=h.y}return[{x:r,y:i},{x:o,y:a}]}function lse(e){return lse="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},lse(e)}function cse(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function dse(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?cse(Object(n),!0).forEach(function(t){use(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):cse(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function use(e,t,n){return t=function(e){var t=function(e,t){if("object"!=lse(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=lse(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==lse(t)?t:t+""}(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function pse(e){var t,n,r,i=e.element,o=e.tooltipEventType,a=e.isActive,s=e.activeCoordinate,l=e.activePayload,c=e.offset,d=e.activeTooltipIndex,u=e.tooltipAxisBandSize,p=e.layout,h=e.chartName,m=null!==(t=i.props.cursor)&&void 0!==t?t:null===(n=i.type.defaultProps)||void 0===n?void 0:n.cursor;if(!i||!m||!a||!s||"ScatterChart"!==h&&"axis"!==o)return null;var f=Xae;if("ScatterChart"===h)r=s,f=ose;else if("BarChart"===h)r=function(e,t,n,r){var i=r/2;return{stroke:"none",fill:"#ccc",x:"horizontal"===e?t.x-i:n.left+.5,y:"horizontal"===e?n.top+.5:t.y-i,width:"horizontal"===e?r:n.width-1,height:"horizontal"===e?n.height-1:r}}(p,s,c,u),f=m2;else if("radial"===p){var g=ase(s),v=g.cx,x=g.cy,y=g.radius;r={cx:v,cy:x,startAngle:g.startAngle,endAngle:g.endAngle,innerRadius:y,outerRadius:y},f=aie}else r={points:sse(p,s,c)},f=Xae;var b=dse(dse(dse(dse({stroke:"#ccc",pointerEvents:"none"},c),r),e2(m,!1)),{},{payload:l,payloadIndex:d,className:PJ("recharts-tooltip-cursor",m.className)});return(0,We.isValidElement)(m)?(0,We.cloneElement)(m,b):(0,We.createElement)(f,b)}var hse=["item"],mse=["children","className","width","height","style","compact","title","desc"];function fse(e){return fse="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},fse(e)}function gse(){return gse=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},gse.apply(this,arguments)}function vse(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,i,o,a,s=[],l=!0,c=!1;try{if(o=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;l=!1}else for(;!(l=(r=o.call(n)).done)&&(s.push(r.value),s.length!==t);l=!0);}catch(e){c=!0,i=e}finally{try{if(!l&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(c)throw i}}return s}}(e,t)||Sse(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function xse(e,t){if(null==e)return{};var n,r,i=function(e,t){if(null==e)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function yse(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,Mse(r.key),r)}}function bse(e,t,n){return t=_se(t),function(e,t){if(t&&("object"===fse(t)||"function"===typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,jse()?Reflect.construct(t,n||[],_se(e).constructor):t.apply(e,n))}function jse(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(jse=function(){return!!e})()}function _se(e){return _se=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},_se(e)}function Cse(e,t){return Cse=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},Cse(e,t)}function wse(e){return function(e){if(Array.isArray(e))return Ase(e)}(e)||function(e){if("undefined"!==typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||Sse(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.")}()}function Sse(e,t){if(e){if("string"===typeof e)return Ase(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)?Ase(e,t):void 0}}function Ase(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function kse(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function Tse(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?kse(Object(n),!0).forEach(function(t){Ese(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):kse(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function Ese(e,t,n){return(t=Mse(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Mse(e){var t=function(e,t){if("object"!=fse(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=fse(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==fse(t)?t:t+""}var Ose={xAxis:["bottom","top"],yAxis:["left","right"]},Rse={width:"100%",height:"100%"},Pse={x:0,y:0};function Dse(e){return e}var Nse=function(e,t){var n=t.graphicalItems,r=t.dataStartIndex,i=t.dataEndIndex,o=(null!==n&&void 0!==n?n:[]).reduce(function(e,t){var n=t.props.data;return n&&n.length?[].concat(wse(e),wse(n)):e},[]);return o.length>0?o:e&&e.length&&C1(r)&&C1(i)?e.slice(r,i+1):[]};function Lse(e){return"number"===e?[0,"auto"]:void 0}var Ise=function(e,t,n,r){var i=e.graphicalItems,o=e.tooltipAxis,a=Nse(t,e);return n<0||!i||!i.length||n>=a.length?null:i.reduce(function(i,s){var l,c,d=null!==(l=s.props.data)&&void 0!==l?l:t;(d&&e.dataStartIndex+e.dataEndIndex!==0&&e.dataEndIndex-e.dataStartIndex>=n&&(d=d.slice(e.dataStartIndex,e.dataEndIndex+1)),o.dataKey&&!o.allowDuplicatedCategory)?c=M1(void 0===d?a:d,o.dataKey,r):c=d&&d[n]||a[n];return c?[].concat(wse(i),[Ene(s,c)]):i},[])},Fse=function(e,t,n,r){var i=r||{x:e.chartX,y:e.chartY},o=function(e,t){return"horizontal"===t?e.x:"vertical"===t?e.y:"centric"===t?e.angle:e.radius}(i,n),a=e.orderedTooltipTicks,s=e.tooltipAxis,l=e.tooltipTicks,c=function(e){var t,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],r=arguments.length>2?arguments[2]:void 0,i=arguments.length>3?arguments[3]:void 0,o=-1,a=null!==(t=null===n||void 0===n?void 0:n.length)&&void 0!==t?t:0;if(a<=1)return 0;if(i&&"angleAxis"===i.axisType&&Math.abs(Math.abs(i.range[1]-i.range[0])-360)<=1e-6)for(var s=i.range,l=0;l<a;l++){var c=l>0?r[l-1].coordinate:r[a-1].coordinate,d=r[l].coordinate,u=l>=a-1?r[0].coordinate:r[l+1].coordinate,p=void 0;if(j1(d-c)!==j1(u-d)){var h=[];if(j1(u-d)===j1(s[1]-s[0])){p=u;var m=d+s[1]-s[0];h[0]=Math.min(m,(m+c)/2),h[1]=Math.max(m,(m+c)/2)}else{p=c;var f=u+s[1]-s[0];h[0]=Math.min(d,(f+d)/2),h[1]=Math.max(d,(f+d)/2)}var g=[Math.min(d,(p+d)/2),Math.max(d,(p+d)/2)];if(e>g[0]&&e<=g[1]||e>=h[0]&&e<=h[1]){o=r[l].index;break}}else{var v=Math.min(c,u),x=Math.max(c,u);if(e>(v+d)/2&&e<=(x+d)/2){o=r[l].index;break}}}else for(var y=0;y<a;y++)if(0===y&&e<=(n[y].coordinate+n[y+1].coordinate)/2||y>0&&y<a-1&&e>(n[y].coordinate+n[y-1].coordinate)/2&&e<=(n[y].coordinate+n[y+1].coordinate)/2||y===a-1&&e>(n[y].coordinate+n[y-1].coordinate)/2){o=n[y].index;break}return o}(o,a,l,s);if(c>=0&&l){var d=l[c]&&l[c].value,u=Ise(e,t,c,d),p=function(e,t,n,r){var i=t.find(function(e){return e&&e.index===n});if(i){if("horizontal"===e)return{x:i.coordinate,y:r.y};if("vertical"===e)return{x:r.x,y:i.coordinate};if("centric"===e){var o=i.coordinate,a=r.radius;return Tse(Tse(Tse({},r),nre(r.cx,r.cy,a,o)),{},{angle:o,radius:a})}var s=i.coordinate,l=r.angle;return Tse(Tse(Tse({},r),nre(r.cx,r.cy,s,l)),{},{angle:l,radius:s})}return Pse}(n,a,c,i);return{activeTooltipIndex:c,activeLabel:d,activePayload:u,activeCoordinate:p}}return null},$se=function(e,t){var n=t.axes,r=t.graphicalItems,i=t.axisType,o=t.axisIdKey,a=t.stackGroups,s=t.dataStartIndex,l=t.dataEndIndex,c=e.layout,d=e.children,u=e.stackOffset,p=dne(c,i);return n.reduce(function(t,n){var h,m=void 0!==n.type.defaultProps?Tse(Tse({},n.type.defaultProps),n.props):n.props,f=m.type,g=m.dataKey,v=m.allowDataOverflow,x=m.allowDuplicatedCategory,y=m.scale,b=m.ticks,j=m.includeHidden,_=m[o];if(t[_])return t;var C,w,S,A=Nse(e.data,{graphicalItems:r.filter(function(e){var t;return(o in e.props?e.props[o]:null===(t=e.type.defaultProps)||void 0===t?void 0:t[o])===_}),dataStartIndex:s,dataEndIndex:l}),k=A.length;(function(e,t,n){if("number"===n&&!0===t&&Array.isArray(e)){var r=null===e||void 0===e?void 0:e[0],i=null===e||void 0===e?void 0:e[1];if(r&&i&&C1(r)&&C1(i))return!0}return!1})(m.domain,v,f)&&(C=Ane(m.domain,null,v),!p||"number"!==f&&"auto"===y||(S=ane(A,g,"category")));var T=Lse(f);if(!C||0===C.length){var E,M=null!==(E=m.domain)&&void 0!==E?E:T;if(g){if(C=ane(A,g,f),"category"===f&&p){var O=function(e){if(!Array.isArray(e))return!1;for(var t=e.length,n={},r=0;r<t;r++){if(n[e[r]])return!0;n[e[r]]=!0}return!1}(C);x&&O?(w=C,C=wS()(0,k)):x||(C=Tne(M,C,n).reduce(function(e,t){return e.indexOf(t)>=0?e:[].concat(wse(e),[t])},[]))}else if("category"===f)C=x?C.filter(function(e){return""!==e&&!c1()(e)}):Tne(M,C,n).reduce(function(e,t){return e.indexOf(t)>=0||""===t||c1()(t)?e:[].concat(wse(e),[t])},[]);else if("number"===f){var R=function(e,t,n,r,i){var o=t.map(function(t){return lne(e,t,n,i,r)}).filter(function(e){return!c1()(e)});return o&&o.length?o.reduce(function(e,t){return[Math.min(e[0],t[0]),Math.max(e[1],t[1])]},[1/0,-1/0]):null}(A,r.filter(function(e){var t,n,r=o in e.props?e.props[o]:null===(t=e.type.defaultProps)||void 0===t?void 0:t[o],i="hide"in e.props?e.props.hide:null===(n=e.type.defaultProps)||void 0===n?void 0:n.hide;return r===_&&(j||!i)}),g,i,c);R&&(C=R)}!p||"number"!==f&&"auto"===y||(S=ane(A,g,"category"))}else C=p?wS()(0,k):a&&a[_]&&a[_].hasStack&&"number"===f?"expand"===u?[0,1]:Cne(a[_].stackGroups,s,l):cne(A,r.filter(function(e){var t=o in e.props?e.props[o]:e.type.defaultProps[o],n="hide"in e.props?e.props.hide:e.type.defaultProps.hide;return t===_&&(j||!n)}),f,c,!0);if("number"===f)C=cae(d,C,_,i,b),M&&(C=Ane(M,C,v));else if("category"===f&&M){var P=M;C.every(function(e){return P.indexOf(e)>=0})&&(C=P)}}return Tse(Tse({},t),{},Ese({},_,Tse(Tse({},m),{},{axisType:i,domain:C,categoricalDomain:S,duplicateDomain:w,originalDomain:null!==(h=m.domain)&&void 0!==h?h:T,isCategorical:p,layout:c})))},{})},Bse=function(e,t){var n=t.axisType,r=void 0===n?"xAxis":n,i=t.AxisComp,o=t.graphicalItems,a=t.stackGroups,s=t.dataStartIndex,l=t.dataEndIndex,c=e.children,d="".concat(r,"Id"),u=Z1(c,i),p={};return u&&u.length?p=$se(e,{axes:u,graphicalItems:o,axisType:r,axisIdKey:d,stackGroups:a,dataStartIndex:s,dataEndIndex:l}):o&&o.length&&(p=function(e,t){var n=t.graphicalItems,r=t.Axis,i=t.axisType,o=t.axisIdKey,a=t.stackGroups,s=t.dataStartIndex,l=t.dataEndIndex,c=e.layout,d=e.children,u=Nse(e.data,{graphicalItems:n,dataStartIndex:s,dataEndIndex:l}),p=u.length,h=dne(c,i),m=-1;return n.reduce(function(e,t){var f,g=(void 0!==t.type.defaultProps?Tse(Tse({},t.type.defaultProps),t.props):t.props)[o],v=Lse("number");return e[g]?e:(m++,h?f=wS()(0,p):a&&a[g]&&a[g].hasStack?(f=Cne(a[g].stackGroups,s,l),f=cae(d,f,g,i)):(f=Ane(v,cne(u,n.filter(function(e){var t,n,r=o in e.props?e.props[o]:null===(t=e.type.defaultProps)||void 0===t?void 0:t[o],i="hide"in e.props?e.props.hide:null===(n=e.type.defaultProps)||void 0===n?void 0:n.hide;return r===g&&!i}),"number",c),r.defaultProps.allowDataOverflow),f=cae(d,f,g,i)),Tse(Tse({},e),{},Ese({},g,Tse(Tse({axisType:i},r.defaultProps),{},{hide:!0,orientation:oa()(Ose,"".concat(i,".").concat(m%2),null),domain:f,originalDomain:v,isCategorical:h,layout:c}))))},{})}(e,{Axis:i,graphicalItems:o,axisType:r,axisIdKey:d,stackGroups:a,dataStartIndex:s,dataEndIndex:l})),p},zse=function(e){var t=e.children,n=e.defaultShowTooltip,r=K1(t,qne),i=0,o=0;return e.data&&0!==e.data.length&&(o=e.data.length-1),r&&r.props&&(r.props.startIndex>=0&&(i=r.props.startIndex),r.props.endIndex>=0&&(o=r.props.endIndex)),{chartX:0,chartY:0,dataStartIndex:i,dataEndIndex:o,activeTooltipIndex:-1,isTooltipActive:Boolean(n)}},Hse=function(e){return"horizontal"===e?{numericAxisName:"yAxis",cateAxisName:"xAxis"}:"vertical"===e?{numericAxisName:"xAxis",cateAxisName:"yAxis"}:"centric"===e?{numericAxisName:"radiusAxis",cateAxisName:"angleAxis"}:{numericAxisName:"angleAxis",cateAxisName:"radiusAxis"}},Wse=function(e,t){var n=e.props,r=(e.graphicalItems,e.xAxisMap),i=void 0===r?{}:r,o=e.yAxisMap,a=void 0===o?{}:o,s=n.width,l=n.height,c=n.children,d=n.margin||{},u=K1(c,qne),p=K1(c,Q5),h=Object.keys(a).reduce(function(e,t){var n=a[t],r=n.orientation;return n.mirror||n.hide?e:Tse(Tse({},e),{},Ese({},r,e[r]+n.width))},{left:d.left||0,right:d.right||0}),m=Object.keys(i).reduce(function(e,t){var n=i[t],r=n.orientation;return n.mirror||n.hide?e:Tse(Tse({},e),{},Ese({},r,oa()(e,"".concat(r))+n.height))},{top:d.top||0,bottom:d.bottom||0}),f=Tse(Tse({},m),h),g=f.bottom;u&&(f.bottom+=u.props.height||qne.defaultProps.height),p&&t&&(f=function(e,t,n,r){var i=n.children,o=n.width,a=n.margin,s=o-(a.left||0)-(a.right||0),l=Qte({children:i,legendWidth:s});if(l){var c=r||{},d=c.width,u=c.height,p=l.align,h=l.verticalAlign,m=l.layout;if(("vertical"===m||"horizontal"===m&&"middle"===h)&&"center"!==p&&C1(e[p]))return rne(rne({},e),{},ine({},p,e[p]+(d||0)));if(("horizontal"===m||"vertical"===m&&"center"===p)&&"middle"!==h&&C1(e[h]))return rne(rne({},e),{},ine({},h,e[h]+(u||0)))}return e}(f,0,n,t));var v=s-f.left-f.right,x=l-f.top-f.bottom;return Tse(Tse({brushBottom:g},f),{},{width:Math.max(v,0),height:Math.max(x,0)})},Use=function(e,t){return"xAxis"===t?e[t].width:"yAxis"===t?e[t].height:void 0},Vse=function(e){var t=e.chartName,n=e.GraphicalChild,r=e.defaultTooltipEventType,i=void 0===r?"axis":r,o=e.validateTooltipEventTypes,a=void 0===o?["axis"]:o,s=e.axisComponents,l=e.legendContent,c=e.formatAxisMap,d=e.defaultProps,u=function(e,t){var n=t.graphicalItems,r=t.stackGroups,i=t.offset,o=t.updateId,a=t.dataStartIndex,l=t.dataEndIndex,c=e.barSize,d=e.layout,u=e.barGap,p=e.barCategoryGap,h=e.maxBarSize,m=Hse(d),f=m.numericAxisName,g=m.cateAxisName,v=function(e){return!(!e||!e.length)&&e.some(function(e){var t=V1(e&&e.type);return t&&t.indexOf("Bar")>=0})}(n),x=[];return n.forEach(function(n,m){var y=Nse(e.data,{graphicalItems:[n],dataStartIndex:a,dataEndIndex:l}),b=void 0!==n.type.defaultProps?Tse(Tse({},n.type.defaultProps),n.props):n.props,j=b.dataKey,_=b.maxBarSize,C=b["".concat(f,"Id")],w=b["".concat(g,"Id")],S=s.reduce(function(e,n){var r=t["".concat(n.axisType,"Map")],i=b["".concat(n.axisType,"Id")];r&&r[i]||"zAxis"===n.axisType||T2(!1);var o=r[i];return Tse(Tse({},e),{},Ese(Ese({},n.axisType,o),"".concat(n.axisType,"Ticks"),pne(o)))},{}),A=S[g],k=S["".concat(g,"Ticks")],T=r&&r[C]&&r[C].hasStack&&function(e,t){var n,r=(null!==(n=e.type)&&void 0!==n&&n.defaultProps?rne(rne({},e.type.defaultProps),e.props):e.props).stackId;if(w1(r)){var i=t[r];if(i){var o=i.items.indexOf(e);return o>=0?i.stackedData[o]:null}}return null}(n,r[C].stackGroups),E=V1(n.type).indexOf("Bar")>=0,M=kne(A,k),O=[],R=v&&function(e){var t=e.barSize,n=e.totalSize,r=e.stackGroups,i=void 0===r?{}:r;if(!i)return{};for(var o={},a=Object.keys(i),s=0,l=a.length;s<l;s++)for(var c=i[a[s]].stackGroups,d=Object.keys(c),u=0,p=d.length;u<p;u++){var h=c[d[u]],m=h.items,f=h.cateAxisId,g=m.filter(function(e){return V1(e.type).indexOf("Bar")>=0});if(g&&g.length){var v=g[0].type.defaultProps,x=void 0!==v?rne(rne({},v),g[0].props):g[0].props,y=x.barSize,b=x[f];o[b]||(o[b]=[]);var j=c1()(y)?t:y;o[b].push({item:g[0],stackList:g.slice(1),barSize:c1()(j)?void 0:k1(j,n,0)})}}return o}({barSize:c,stackGroups:r,totalSize:Use(S,g)});if(E){var P,D,N=c1()(_)?h:_,L=null!==(P=null!==(D=kne(A,k,!0))&&void 0!==D?D:N)&&void 0!==P?P:0;O=function(e){var t=e.barGap,n=e.barCategoryGap,r=e.bandSize,i=e.sizeList,o=void 0===i?[]:i,a=e.maxBarSize,s=o.length;if(s<1)return null;var l,c=k1(t,r,0,!0),d=[];if(o[0].barSize===+o[0].barSize){var u=!1,p=r/s,h=o.reduce(function(e,t){return e+t.barSize||0},0);(h+=(s-1)*c)>=r&&(h-=(s-1)*c,c=0),h>=r&&p>0&&(u=!0,h=s*(p*=.9));var m={offset:((r-h)/2|0)-c,size:0};l=o.reduce(function(e,t){var n={item:t.item,position:{offset:m.offset+m.size+c,size:u?p:t.barSize}},r=[].concat(ene(e),[n]);return m=r[r.length-1].position,t.stackList&&t.stackList.length&&t.stackList.forEach(function(e){r.push({item:e,position:m})}),r},d)}else{var f=k1(n,r,0,!0);r-2*f-(s-1)*c<=0&&(c=0);var g=(r-2*f-(s-1)*c)/s;g>1&&(g>>=0);var v=a===+a?Math.min(g,a):g;l=o.reduce(function(e,t,n){var r=[].concat(ene(e),[{item:t.item,position:{offset:f+(g+c)*n+(g-v)/2,size:v}}]);return t.stackList&&t.stackList.length&&t.stackList.forEach(function(e){r.push({item:e,position:r[r.length-1].position})}),r},d)}return l}({barGap:u,barCategoryGap:p,bandSize:L!==M?L:M,sizeList:R[w],maxBarSize:N}),L!==M&&(O=O.map(function(e){return Tse(Tse({},e),{},{position:Tse(Tse({},e.position),{},{offset:e.position.offset-L/2})})}))}var I,F,$=n&&n.type&&n.type.getComposedData;$&&x.push({props:Tse(Tse({},$(Tse(Tse({},S),{},{displayedData:y,props:e,dataKey:j,item:n,bandSize:M,barPosition:O,offset:i,stackedData:T,layout:d,dataStartIndex:a,dataEndIndex:l}))),{},Ese(Ese(Ese({key:n.key||"item-".concat(m)},f,S[f]),g,S[g]),"animationId",o)),childIndex:(I=n,F=e.children,Y1(F).indexOf(I)),item:n})}),x},p=function(e,r){var i=e.props,o=e.dataStartIndex,a=e.dataEndIndex,l=e.updateId;if(!X1({props:i}))return null;var d=i.children,p=i.layout,h=i.stackOffset,m=i.data,f=i.reverseStackOrder,g=Hse(p),v=g.numericAxisName,x=g.cateAxisName,y=Z1(d,n),b=function(e,t,n,r,i,o){if(!e)return null;var a=(o?t.reverse():t).reduce(function(e,t){var i,o=null!==(i=t.type)&&void 0!==i&&i.defaultProps?rne(rne({},t.type.defaultProps),t.props):t.props,a=o.stackId;if(o.hide)return e;var s=o[n],l=e[s]||{hasStack:!1,stackGroups:{}};if(w1(a)){var c=l.stackGroups[a]||{numericAxisId:n,cateAxisId:r,items:[]};c.items.push(t),l.hasStack=!0,l.stackGroups[a]=c}else l.stackGroups[A1("_stackId_")]={numericAxisId:n,cateAxisId:r,items:[t]};return rne(rne({},e),{},ine({},s,l))},{});return Object.keys(a).reduce(function(t,o){var s=a[o];return s.hasStack&&(s.stackGroups=Object.keys(s.stackGroups).reduce(function(t,o){var a=s.stackGroups[o];return rne(rne({},t),{},ine({},o,{numericAxisId:n,cateAxisId:r,items:a.items,stackedData:yne(e,a.items,i)}))},{})),rne(rne({},t),{},ine({},o,s))},{})}(m,y,"".concat(v,"Id"),"".concat(x,"Id"),h,f),j=s.reduce(function(e,t){var n="".concat(t.axisType,"Map");return Tse(Tse({},e),{},Ese({},n,Bse(i,Tse(Tse({},t),{},{graphicalItems:y,stackGroups:t.axisType===v&&b,dataStartIndex:o,dataEndIndex:a}))))},{}),_=Wse(Tse(Tse({},j),{},{props:i,graphicalItems:y}),null===r||void 0===r?void 0:r.legendBBox);Object.keys(j).forEach(function(e){j[e]=c(i,j[e],_,e.replace("Map",""),t)});var C=function(e){var t=T1(e),n=pne(t,!1,!0);return{tooltipTicks:n,orderedTooltipTicks:A2()(n,function(e){return e.coordinate}),tooltipAxis:t,tooltipAxisBandSize:kne(t,n)}}(j["".concat(x,"Map")]),w=u(i,Tse(Tse({},j),{},{dataStartIndex:o,dataEndIndex:a,updateId:l,graphicalItems:y,stackGroups:b,offset:_}));return Tse(Tse({formattedGraphicalItems:w,graphicalItems:y,offset:_,stackGroups:b},C),j)},h=function(e){function n(e){var r,i,o;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,n),Ese(o=bse(this,n,[e]),"eventEmitterSymbol",Symbol("rechartsEventEmitter")),Ese(o,"accessibilityManager",new vae),Ese(o,"handleLegendBBoxUpdate",function(e){if(e){var t=o.state,n=t.dataStartIndex,r=t.dataEndIndex,i=t.updateId;o.setState(Tse({legendBBox:e},p({props:o.props,dataStartIndex:n,dataEndIndex:r,updateId:i},Tse(Tse({},o.state),{},{legendBBox:e}))))}}),Ese(o,"handleReceiveSyncEvent",function(e,t,n){if(o.props.syncId===e){if(n===o.eventEmitterSymbol&&"function"!==typeof o.props.syncMethod)return;o.applySyncEvent(t)}}),Ese(o,"handleBrushChange",function(e){var t=e.startIndex,n=e.endIndex;if(t!==o.state.dataStartIndex||n!==o.state.dataEndIndex){var r=o.state.updateId;o.setState(function(){return Tse({dataStartIndex:t,dataEndIndex:n},p({props:o.props,dataStartIndex:t,dataEndIndex:n,updateId:r},o.state))}),o.triggerSyncEvent({dataStartIndex:t,dataEndIndex:n})}}),Ese(o,"handleMouseEnter",function(e){var t=o.getMouseInfo(e);if(t){var n=Tse(Tse({},t),{},{isTooltipActive:!0});o.setState(n),o.triggerSyncEvent(n);var r=o.props.onMouseEnter;h1()(r)&&r(n,e)}}),Ese(o,"triggeredAfterMouseMove",function(e){var t=o.getMouseInfo(e),n=t?Tse(Tse({},t),{},{isTooltipActive:!0}):{isTooltipActive:!1};o.setState(n),o.triggerSyncEvent(n);var r=o.props.onMouseMove;h1()(r)&&r(n,e)}),Ese(o,"handleItemMouseEnter",function(e){o.setState(function(){return{isTooltipActive:!0,activeItem:e,activePayload:e.tooltipPayload,activeCoordinate:e.tooltipPosition||{x:e.cx,y:e.cy}}})}),Ese(o,"handleItemMouseLeave",function(){o.setState(function(){return{isTooltipActive:!1}})}),Ese(o,"handleMouseMove",function(e){e.persist(),o.throttleTriggeredAfterMouseMove(e)}),Ese(o,"handleMouseLeave",function(e){o.throttleTriggeredAfterMouseMove.cancel();var t={isTooltipActive:!1};o.setState(t),o.triggerSyncEvent(t);var n=o.props.onMouseLeave;h1()(n)&&n(t,e)}),Ese(o,"handleOuterEvent",function(e){var t,n=function(e){var t=e&&e.type;return t&&U1[t]?U1[t]:null}(e),r=oa()(o.props,"".concat(n));n&&h1()(r)&&r(null!==(t=/.*touch.*/i.test(n)?o.getMouseInfo(e.changedTouches[0]):o.getMouseInfo(e))&&void 0!==t?t:{},e)}),Ese(o,"handleClick",function(e){var t=o.getMouseInfo(e);if(t){var n=Tse(Tse({},t),{},{isTooltipActive:!0});o.setState(n),o.triggerSyncEvent(n);var r=o.props.onClick;h1()(r)&&r(n,e)}}),Ese(o,"handleMouseDown",function(e){var t=o.props.onMouseDown;h1()(t)&&t(o.getMouseInfo(e),e)}),Ese(o,"handleMouseUp",function(e){var t=o.props.onMouseUp;h1()(t)&&t(o.getMouseInfo(e),e)}),Ese(o,"handleTouchMove",function(e){null!=e.changedTouches&&e.changedTouches.length>0&&o.throttleTriggeredAfterMouseMove(e.changedTouches[0])}),Ese(o,"handleTouchStart",function(e){null!=e.changedTouches&&e.changedTouches.length>0&&o.handleMouseDown(e.changedTouches[0])}),Ese(o,"handleTouchEnd",function(e){null!=e.changedTouches&&e.changedTouches.length>0&&o.handleMouseUp(e.changedTouches[0])}),Ese(o,"handleDoubleClick",function(e){var t=o.props.onDoubleClick;h1()(t)&&t(o.getMouseInfo(e),e)}),Ese(o,"handleContextMenu",function(e){var t=o.props.onContextMenu;h1()(t)&&t(o.getMouseInfo(e),e)}),Ese(o,"triggerSyncEvent",function(e){void 0!==o.props.syncId&&uae.emit(pae,o.props.syncId,e,o.eventEmitterSymbol)}),Ese(o,"applySyncEvent",function(e){var t=o.props,n=t.layout,r=t.syncMethod,i=o.state.updateId,a=e.dataStartIndex,s=e.dataEndIndex;if(void 0!==e.dataStartIndex||void 0!==e.dataEndIndex)o.setState(Tse({dataStartIndex:a,dataEndIndex:s},p({props:o.props,dataStartIndex:a,dataEndIndex:s,updateId:i},o.state)));else if(void 0!==e.activeTooltipIndex){var l=e.chartX,c=e.chartY,d=e.activeTooltipIndex,u=o.state,h=u.offset,m=u.tooltipTicks;if(!h)return;if("function"===typeof r)d=r(m,e);else if("value"===r){d=-1;for(var f=0;f<m.length;f++)if(m[f].value===e.activeLabel){d=f;break}}var g=Tse(Tse({},h),{},{x:h.left,y:h.top}),v=Math.min(l,g.x+g.width),x=Math.min(c,g.y+g.height),y=m[d]&&m[d].value,b=Ise(o.state,o.props.data,d),j=m[d]?{x:"horizontal"===n?m[d].coordinate:v,y:"horizontal"===n?x:m[d].coordinate}:Pse;o.setState(Tse(Tse({},e),{},{activeLabel:y,activeCoordinate:j,activePayload:b,activeTooltipIndex:d}))}else o.setState(e)}),Ese(o,"renderCursor",function(e){var n,r=o.state,i=r.isTooltipActive,a=r.activeCoordinate,s=r.activePayload,l=r.offset,c=r.activeTooltipIndex,d=r.tooltipAxisBandSize,u=o.getTooltipEventType(),p=null!==(n=e.props.active)&&void 0!==n?n:i,h=o.props.layout,m=e.key||"_recharts-cursor";return We.createElement(pse,{key:m,activeCoordinate:a,activePayload:s,activeTooltipIndex:c,chartName:t,element:e,isActive:p,layout:h,offset:l,tooltipAxisBandSize:d,tooltipEventType:u})}),Ese(o,"renderPolarAxis",function(e,t,n){var r=oa()(e,"type.axisType"),i=oa()(o.state,"".concat(r,"Map")),a=e.type.defaultProps,s=void 0!==a?Tse(Tse({},a),e.props):e.props,l=i&&i[s["".concat(r,"Id")]];return(0,We.cloneElement)(e,Tse(Tse({},l),{},{className:PJ(r,l.className),key:e.key||"".concat(t,"-").concat(n),ticks:pne(l,!0)}))}),Ese(o,"renderPolarGrid",function(e){var t=e.props,n=t.radialLines,r=t.polarAngles,i=t.polarRadius,a=o.state,s=a.radiusAxisMap,l=a.angleAxisMap,c=T1(s),d=T1(l),u=d.cx,p=d.cy,h=d.innerRadius,m=d.outerRadius;return(0,We.cloneElement)(e,{polarAngles:Array.isArray(r)?r:pne(d,!0).map(function(e){return e.coordinate}),polarRadius:Array.isArray(i)?i:pne(c,!0).map(function(e){return e.coordinate}),cx:u,cy:p,innerRadius:h,outerRadius:m,key:e.key||"polar-grid",radialLines:n})}),Ese(o,"renderLegend",function(){var e=o.state.formattedGraphicalItems,t=o.props,n=t.children,r=t.width,i=t.height,a=o.props.margin||{},s=r-(a.left||0)-(a.right||0),c=Qte({children:n,formattedGraphicalItems:e,legendWidth:s,legendContent:l});if(!c)return null;var d=c.item,u=xse(c,hse);return(0,We.cloneElement)(d,Tse(Tse({},u),{},{chartWidth:r,chartHeight:i,margin:a,onBBoxUpdate:o.handleLegendBBoxUpdate}))}),Ese(o,"renderTooltip",function(){var e,t=o.props,n=t.children,r=t.accessibilityLayer,i=K1(n,w6);if(!i)return null;var a=o.state,s=a.isTooltipActive,l=a.activeCoordinate,c=a.activePayload,d=a.activeLabel,u=a.offset,p=null!==(e=i.props.active)&&void 0!==e?e:s;return(0,We.cloneElement)(i,{viewBox:Tse(Tse({},u),{},{x:u.left,y:u.top}),active:p,label:d,payload:p?c:[],coordinate:l,accessibilityLayer:r})}),Ese(o,"renderBrush",function(e){var t=o.props,n=t.margin,r=t.data,i=o.state,a=i.offset,s=i.dataStartIndex,l=i.dataEndIndex,c=i.updateId;return(0,We.cloneElement)(e,{key:e.key||"_recharts-brush",onChange:mne(o.handleBrushChange,e.props.onChange),data:r,x:C1(e.props.x)?e.props.x:a.left,y:C1(e.props.y)?e.props.y:a.top+a.height+a.brushBottom-(n.bottom||0),width:C1(e.props.width)?e.props.width:a.width,startIndex:s,endIndex:l,updateId:"brush-".concat(c)})}),Ese(o,"renderReferenceElement",function(e,t,n){if(!e)return null;var r=o.clipPathId,i=o.state,a=i.xAxisMap,s=i.yAxisMap,l=i.offset,c=e.type.defaultProps||{},d=e.props,u=d.xAxisId,p=void 0===u?c.xAxisId:u,h=d.yAxisId,m=void 0===h?c.yAxisId:h;return(0,We.cloneElement)(e,{key:e.key||"".concat(t,"-").concat(n),xAxis:a[p],yAxis:s[m],viewBox:{x:l.left,y:l.top,width:l.width,height:l.height},clipPathId:r})}),Ese(o,"renderActivePoints",function(e){var t=e.item,r=e.activePoint,i=e.basePoint,o=e.childIndex,a=e.isRange,s=[],l=t.props.key,c=void 0!==t.item.type.defaultProps?Tse(Tse({},t.item.type.defaultProps),t.item.props):t.item.props,d=c.activeDot,u=Tse(Tse({index:o,dataKey:c.dataKey,cx:r.x,cy:r.y,r:4,fill:sne(t.item),strokeWidth:2,stroke:"#fff",payload:r.payload,value:r.value},e2(d,!1)),F1(d));return s.push(n.renderActiveDot(d,u,"".concat(l,"-activePoint-").concat(o))),i?s.push(n.renderActiveDot(d,Tse(Tse({},u),{},{cx:i.x,cy:i.y}),"".concat(l,"-basePoint-").concat(o))):a&&s.push(null),s}),Ese(o,"renderGraphicChild",function(e,t,n){var r=o.filterFormatItem(e,t,n);if(!r)return null;var i=o.getTooltipEventType(),a=o.state,s=a.isTooltipActive,l=a.tooltipAxis,c=a.activeTooltipIndex,d=a.activeLabel,u=K1(o.props.children,w6),p=r.props,h=p.points,m=p.isRange,f=p.baseLine,g=void 0!==r.item.type.defaultProps?Tse(Tse({},r.item.type.defaultProps),r.item.props):r.item.props,v=g.activeDot,x=g.hide,y=g.activeBar,b=g.activeShape,j=Boolean(!x&&s&&u&&(v||y||b)),_={};"axis"!==i&&u&&"click"===u.props.trigger?_={onClick:mne(o.handleItemMouseEnter,e.props.onClick)}:"axis"!==i&&(_={onMouseLeave:mne(o.handleItemMouseLeave,e.props.onMouseLeave),onMouseEnter:mne(o.handleItemMouseEnter,e.props.onMouseEnter)});var C=(0,We.cloneElement)(e,Tse(Tse({},r.props),_));if(j){if(!(c>=0)){var w,S=(null!==(w=o.getItemByXY(o.state.activeCoordinate))&&void 0!==w?w:{graphicalItem:C}).graphicalItem,A=S.item,k=void 0===A?e:A,T=S.childIndex,E=Tse(Tse(Tse({},r.props),_),{},{activeIndex:T});return[(0,We.cloneElement)(k,E),null,null]}var M,O;if(l.dataKey&&!l.allowDuplicatedCategory){var R="function"===typeof l.dataKey?function(e){return"function"===typeof l.dataKey?l.dataKey(e.payload):null}:"payload.".concat(l.dataKey.toString());M=M1(h,R,d),O=m&&f&&M1(f,R,d)}else M=null===h||void 0===h?void 0:h[c],O=m&&f&&f[c];if(b||y){var P=void 0!==e.props.activeIndex?e.props.activeIndex:c;return[(0,We.cloneElement)(e,Tse(Tse(Tse({},r.props),_),{},{activeIndex:P})),null,null]}if(!c1()(M))return[C].concat(wse(o.renderActivePoints({item:r,activePoint:M,basePoint:O,childIndex:c,isRange:m})))}return m?[C,null,null]:[C,null]}),Ese(o,"renderCustomized",function(e,t,n){return(0,We.cloneElement)(e,Tse(Tse({key:"recharts-customized-".concat(n)},o.props),o.state))}),Ese(o,"renderMap",{CartesianGrid:{handler:Dse,once:!0},ReferenceArea:{handler:o.renderReferenceElement},ReferenceLine:{handler:Dse},ReferenceDot:{handler:o.renderReferenceElement},XAxis:{handler:Dse},YAxis:{handler:Dse},Brush:{handler:o.renderBrush,once:!0},Bar:{handler:o.renderGraphicChild},Line:{handler:o.renderGraphicChild},Area:{handler:o.renderGraphicChild},Radar:{handler:o.renderGraphicChild},RadialBar:{handler:o.renderGraphicChild},Scatter:{handler:o.renderGraphicChild},Pie:{handler:o.renderGraphicChild},Funnel:{handler:o.renderGraphicChild},Tooltip:{handler:o.renderCursor,once:!0},PolarGrid:{handler:o.renderPolarGrid,once:!0},PolarAngleAxis:{handler:o.renderPolarAxis},PolarRadiusAxis:{handler:o.renderPolarAxis},Customized:{handler:o.renderCustomized}}),o.clipPathId="".concat(null!==(r=e.id)&&void 0!==r?r:A1("recharts"),"-clip"),o.throttleTriggeredAfterMouseMove=g2()(o.triggeredAfterMouseMove,null!==(i=e.throttleDelay)&&void 0!==i?i:1e3/60),o.state={},o}return function(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Cse(e,t)}(n,e),r=n,o=[{key:"componentDidMount",value:function(){var e,t;this.addListener(),this.accessibilityManager.setDetails({container:this.container,offset:{left:null!==(e=this.props.margin.left)&&void 0!==e?e:0,top:null!==(t=this.props.margin.top)&&void 0!==t?t:0},coordinateList:this.state.tooltipTicks,mouseHandlerCallback:this.triggeredAfterMouseMove,layout:this.props.layout}),this.displayDefaultTooltip()}},{key:"displayDefaultTooltip",value:function(){var e=this.props,t=e.children,n=e.data,r=e.height,i=e.layout,o=K1(t,w6);if(o){var a=o.props.defaultIndex;if(!("number"!==typeof a||a<0||a>this.state.tooltipTicks.length-1)){var s=this.state.tooltipTicks[a]&&this.state.tooltipTicks[a].value,l=Ise(this.state,n,a,s),c=this.state.tooltipTicks[a].coordinate,d=(this.state.offset.top+r)/2,u="horizontal"===i?{x:c,y:d}:{y:c,x:d},p=this.state.formattedGraphicalItems.find(function(e){return"Scatter"===e.item.type.name});p&&(u=Tse(Tse({},u),p.props.points[a].tooltipPosition),l=p.props.points[a].tooltipPayload);var h={activeTooltipIndex:a,isTooltipActive:!0,activeLabel:s,activePayload:l,activeCoordinate:u};this.setState(h),this.renderCursor(o),this.accessibilityManager.setIndex(a)}}}},{key:"getSnapshotBeforeUpdate",value:function(e,t){return this.props.accessibilityLayer?(this.state.tooltipTicks!==t.tooltipTicks&&this.accessibilityManager.setDetails({coordinateList:this.state.tooltipTicks}),this.props.layout!==e.layout&&this.accessibilityManager.setDetails({layout:this.props.layout}),this.props.margin!==e.margin&&this.accessibilityManager.setDetails({offset:{left:null!==(n=this.props.margin.left)&&void 0!==n?n:0,top:null!==(r=this.props.margin.top)&&void 0!==r?r:0}}),null):null;var n,r}},{key:"componentDidUpdate",value:function(e){t2([K1(e.children,w6)],[K1(this.props.children,w6)])||this.displayDefaultTooltip()}},{key:"componentWillUnmount",value:function(){this.removeListener(),this.throttleTriggeredAfterMouseMove.cancel()}},{key:"getTooltipEventType",value:function(){var e=K1(this.props.children,w6);if(e&&"boolean"===typeof e.props.shared){var t=e.props.shared?"axis":"item";return a.indexOf(t)>=0?t:i}return i}},{key:"getMouseInfo",value:function(e){if(!this.container)return null;var t,n=this.container,r=n.getBoundingClientRect(),i={top:(t=r).top+window.scrollY-document.documentElement.clientTop,left:t.left+window.scrollX-document.documentElement.clientLeft},o={chartX:Math.round(e.pageX-i.left),chartY:Math.round(e.pageY-i.top)},a=r.width/n.offsetWidth||1,s=this.inRange(o.chartX,o.chartY,a);if(!s)return null;var l=this.state,c=l.xAxisMap,d=l.yAxisMap,u=this.getTooltipEventType(),p=Fse(this.state,this.props.data,this.props.layout,s);if("axis"!==u&&c&&d){var h=T1(c).scale,m=T1(d).scale,f=h&&h.invert?h.invert(o.chartX):null,g=m&&m.invert?m.invert(o.chartY):null;return Tse(Tse({},o),{},{xValue:f,yValue:g},p)}return p?Tse(Tse({},o),p):null}},{key:"inRange",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1,r=this.props.layout,i=e/n,o=t/n;if("horizontal"===r||"vertical"===r){var a=this.state.offset;return i>=a.left&&i<=a.left+a.width&&o>=a.top&&o<=a.top+a.height?{x:i,y:o}:null}var s=this.state,l=s.angleAxisMap,c=s.radiusAxisMap;if(l&&c){var d=T1(l);return are({x:i,y:o},d)}return null}},{key:"parseEventsOfWrapper",value:function(){var e=this.props.children,t=this.getTooltipEventType(),n=K1(e,w6),r={};return n&&"axis"===t&&(r="click"===n.props.trigger?{onClick:this.handleClick}:{onMouseEnter:this.handleMouseEnter,onDoubleClick:this.handleDoubleClick,onMouseMove:this.handleMouseMove,onMouseLeave:this.handleMouseLeave,onTouchMove:this.handleTouchMove,onTouchStart:this.handleTouchStart,onTouchEnd:this.handleTouchEnd,onContextMenu:this.handleContextMenu}),Tse(Tse({},F1(this.props,this.handleOuterEvent)),r)}},{key:"addListener",value:function(){uae.on(pae,this.handleReceiveSyncEvent)}},{key:"removeListener",value:function(){uae.removeListener(pae,this.handleReceiveSyncEvent)}},{key:"filterFormatItem",value:function(e,t,n){for(var r=this.state.formattedGraphicalItems,i=0,o=r.length;i<o;i++){var a=r[i];if(a.item===e||a.props.key===e.key||t===V1(a.item.type)&&n===a.childIndex)return a}return null}},{key:"renderClipPath",value:function(){var e=this.clipPathId,t=this.state.offset,n=t.left,r=t.top,i=t.height,o=t.width;return We.createElement("defs",null,We.createElement("clipPath",{id:e},We.createElement("rect",{x:n,y:r,height:i,width:o})))}},{key:"getXScales",value:function(){var e=this.state.xAxisMap;return e?Object.entries(e).reduce(function(e,t){var n=vse(t,2),r=n[0],i=n[1];return Tse(Tse({},e),{},Ese({},r,i.scale))},{}):null}},{key:"getYScales",value:function(){var e=this.state.yAxisMap;return e?Object.entries(e).reduce(function(e,t){var n=vse(t,2),r=n[0],i=n[1];return Tse(Tse({},e),{},Ese({},r,i.scale))},{}):null}},{key:"getXScaleByAxisId",value:function(e){var t;return null===(t=this.state.xAxisMap)||void 0===t||null===(t=t[e])||void 0===t?void 0:t.scale}},{key:"getYScaleByAxisId",value:function(e){var t;return null===(t=this.state.yAxisMap)||void 0===t||null===(t=t[e])||void 0===t?void 0:t.scale}},{key:"getItemByXY",value:function(e){var t=this.state,n=t.formattedGraphicalItems,r=t.activeItem;if(n&&n.length)for(var i=0,o=n.length;i<o;i++){var a=n[i],s=a.props,l=a.item,c=void 0!==l.type.defaultProps?Tse(Tse({},l.type.defaultProps),l.props):l.props,d=V1(l.type);if("Bar"===d){var u=(s.data||[]).find(function(t){return p2(e,t)});if(u)return{graphicalItem:a,payload:u}}else if("RadialBar"===d){var p=(s.data||[]).find(function(t){return are(e,t)});if(p)return{graphicalItem:a,payload:p}}else if(gie(a,r)||vie(a,r)||xie(a,r)){var h=_ie({graphicalItem:a,activeTooltipItem:r,itemData:c.data}),m=void 0===c.activeIndex?h:c.activeIndex;return{graphicalItem:Tse(Tse({},a),{},{childIndex:m}),payload:xie(a,r)?c.data[h]:a.props.data[h]}}}return null}},{key:"render",value:function(){var e=this;if(!X1(this))return null;var t,n,r=this.props,i=r.children,o=r.className,a=r.width,s=r.height,l=r.style,c=r.compact,d=r.title,u=r.desc,p=xse(r,mse),h=e2(p,!1);if(c)return We.createElement(Eoe,{state:this.state,width:this.props.width,height:this.props.height,clipPathId:this.clipPathId},We.createElement(R2,gse({},h,{width:a,height:s,title:d,desc:u}),this.renderClipPath(),r2(i,this.renderMap)));this.props.accessibilityLayer&&(h.tabIndex=null!==(t=this.props.tabIndex)&&void 0!==t?t:0,h.role=null!==(n=this.props.role)&&void 0!==n?n:"application",h.onKeyDown=function(t){e.accessibilityManager.keyboardEvent(t)},h.onFocus=function(){e.accessibilityManager.focus()});var m=this.parseEventsOfWrapper();return We.createElement(Eoe,{state:this.state,width:this.props.width,height:this.props.height,clipPathId:this.clipPathId},We.createElement("div",gse({className:PJ("recharts-wrapper",o),style:Tse({position:"relative",cursor:"default",width:a,height:s},l)},m,{ref:function(t){e.container=t}}),We.createElement(R2,gse({},h,{width:a,height:s,title:d,desc:u,style:Rse}),this.renderClipPath(),r2(i,this.renderMap)),this.renderLegend(),this.renderTooltip()))}}],o&&yse(r.prototype,o),s&&yse(r,s),Object.defineProperty(r,"prototype",{writable:!1}),r;var r,o,s}(We.Component);Ese(h,"displayName",t),Ese(h,"defaultProps",Tse({layout:"horizontal",stackOffset:"none",barCategoryGap:"10%",barGap:4,margin:{top:5,right:5,bottom:5,left:5},reverseStackOrder:!1,syncMethod:"index"},d)),Ese(h,"getDerivedStateFromProps",function(e,t){var n=e.dataKey,r=e.data,i=e.children,o=e.width,a=e.height,s=e.layout,l=e.stackOffset,c=e.margin,d=t.dataStartIndex,u=t.dataEndIndex;if(void 0===t.updateId){var h=zse(e);return Tse(Tse(Tse({},h),{},{updateId:0},p(Tse(Tse({props:e},h),{},{updateId:0}),t)),{},{prevDataKey:n,prevData:r,prevWidth:o,prevHeight:a,prevLayout:s,prevStackOffset:l,prevMargin:c,prevChildren:i})}if(n!==t.prevDataKey||r!==t.prevData||o!==t.prevWidth||a!==t.prevHeight||s!==t.prevLayout||l!==t.prevStackOffset||!R1(c,t.prevMargin)){var m=zse(e),f={chartX:t.chartX,chartY:t.chartY,isTooltipActive:t.isTooltipActive},g=Tse(Tse({},Fse(t,r,s)),{},{updateId:t.updateId+1}),v=Tse(Tse(Tse({},m),f),g);return Tse(Tse(Tse({},v),p(Tse({props:e},v),t)),{},{prevDataKey:n,prevData:r,prevWidth:o,prevHeight:a,prevLayout:s,prevStackOffset:l,prevMargin:c,prevChildren:i})}if(!t2(i,t.prevChildren)){var x,y,b,j,_=K1(i,qne),C=_&&null!==(x=null===(y=_.props)||void 0===y?void 0:y.startIndex)&&void 0!==x?x:d,w=_&&null!==(b=null===(j=_.props)||void 0===j?void 0:j.endIndex)&&void 0!==b?b:u,S=C!==d||w!==u,A=!c1()(r)&&!S?t.updateId:t.updateId+1;return Tse(Tse({updateId:A},p(Tse(Tse({props:e},t),{},{updateId:A,dataStartIndex:C,dataEndIndex:w}),t)),{},{prevChildren:i,dataStartIndex:C,dataEndIndex:w})}return null}),Ese(h,"renderActiveDot",function(e,t,n){var r;return r=(0,We.isValidElement)(e)?(0,We.cloneElement)(e,t):h1()(e)?e(t):We.createElement(e3,t),We.createElement(L2,{className:"recharts-active-dot",key:n},r)});var m=(0,We.forwardRef)(function(e,t){return We.createElement(h,gse({},e,{ref:t}))});return m.displayName=h.displayName,m},Gse=["type","layout","connectNulls","ref"],qse=["key"];function Yse(e){return Yse="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Yse(e)}function Zse(e,t){if(null==e)return{};var n,r,i=function(e,t){if(null==e)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function Kse(){return Kse=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Kse.apply(this,arguments)}function Xse(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function Qse(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Xse(Object(n),!0).forEach(function(t){ale(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Xse(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function Jse(e){return function(e){if(Array.isArray(e))return ele(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)return;if("string"===typeof e)return ele(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return ele(e,t)}(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.")}()}function ele(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function tle(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,sle(r.key),r)}}function nle(e,t,n){return t=ile(t),function(e,t){if(t&&("object"===Yse(t)||"function"===typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,rle()?Reflect.construct(t,n||[],ile(e).constructor):t.apply(e,n))}function rle(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(rle=function(){return!!e})()}function ile(e){return ile=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},ile(e)}function ole(e,t){return ole=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},ole(e,t)}function ale(e,t,n){return(t=sle(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function sle(e){var t=function(e,t){if("object"!=Yse(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=Yse(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==Yse(t)?t:t+""}var lle=function(e){function t(){var e;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return ale(e=nle(this,t,[].concat(r)),"state",{isAnimationFinished:!0,totalLength:0}),ale(e,"generateSimpleStrokeDasharray",function(e,t){return"".concat(t,"px ").concat(e-t,"px")}),ale(e,"getStrokeDasharray",function(n,r,i){var o=i.reduce(function(e,t){return e+t});if(!o)return e.generateSimpleStrokeDasharray(r,n);for(var a=Math.floor(n/o),s=n%o,l=r-n,c=[],d=0,u=0;d<i.length;u+=i[d],++d)if(u+i[d]>s){c=[].concat(Jse(i.slice(0,d)),[s-u]);break}var p=c.length%2===0?[0,l]:[l];return[].concat(Jse(t.repeat(i,a)),Jse(c),p).map(function(e){return"".concat(e,"px")}).join(", ")}),ale(e,"id",A1("recharts-line-")),ale(e,"pathRef",function(t){e.mainCurve=t}),ale(e,"handleAnimationEnd",function(){e.setState({isAnimationFinished:!0}),e.props.onAnimationEnd&&e.props.onAnimationEnd()}),ale(e,"handleAnimationStart",function(){e.setState({isAnimationFinished:!1}),e.props.onAnimationStart&&e.props.onAnimationStart()}),e}return function(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&ole(e,t)}(t,e),n=t,r=[{key:"componentDidMount",value:function(){if(this.props.isAnimationActive){var e=this.getTotalLength();this.setState({totalLength:e})}}},{key:"componentDidUpdate",value:function(){if(this.props.isAnimationActive){var e=this.getTotalLength();e!==this.state.totalLength&&this.setState({totalLength:e})}}},{key:"getTotalLength",value:function(){var e=this.mainCurve;try{return e&&e.getTotalLength&&e.getTotalLength()||0}catch(t){return 0}}},{key:"renderErrorBar",value:function(e,t){if(this.props.isAnimationActive&&!this.state.isAnimationFinished)return null;var n=this.props,r=n.points,i=n.xAxis,o=n.yAxis,a=n.layout,s=Z1(n.children,qte);if(!s)return null;var l=function(e,t){return{x:e.x,y:e.y,value:e.value,errorVal:one(e.payload,t)}},c={clipPath:e?"url(#clipPath-".concat(t,")"):null};return We.createElement(L2,c,s.map(function(e){return We.cloneElement(e,{key:"bar-".concat(e.props.dataKey),data:r,xAxis:i,yAxis:o,layout:a,dataPointFormatter:l})}))}},{key:"renderDots",value:function(e,n,r){if(this.props.isAnimationActive&&!this.state.isAnimationFinished)return null;var i=this.props,o=i.dot,a=i.points,s=i.dataKey,l=e2(this.props,!1),c=e2(o,!0),d=a.map(function(e,n){var r=Qse(Qse(Qse({key:"dot-".concat(n),r:3},l),c),{},{index:n,cx:e.x,cy:e.y,value:e.value,dataKey:s,payload:e.payload,points:a});return t.renderDotItem(o,r)}),u={clipPath:e?"url(#clipPath-".concat(n?"":"dots-").concat(r,")"):null};return We.createElement(L2,Kse({className:"recharts-line-dots",key:"dots"},u),d)}},{key:"renderCurveStatically",value:function(e,t,n,r){var i=this.props,o=i.type,a=i.layout,s=i.connectNulls,l=(i.ref,Zse(i,Gse)),c=Qse(Qse(Qse({},e2(l,!0)),{},{fill:"none",className:"recharts-line-curve",clipPath:t?"url(#clipPath-".concat(n,")"):null,points:e},r),{},{type:o,layout:a,connectNulls:s});return We.createElement(Xae,Kse({},c,{pathRef:this.pathRef}))}},{key:"renderCurveWithAnimation",value:function(e,t){var n=this,r=this.props,i=r.points,o=r.strokeDasharray,a=r.isAnimationActive,s=r.animationBegin,l=r.animationDuration,c=r.animationEasing,d=r.animationId,u=r.animateNewValues,p=r.width,h=r.height,m=this.state,f=m.prevPoints,g=m.totalLength;return We.createElement(s1,{begin:s,duration:l,isActive:a,easing:c,from:{t:0},to:{t:1},key:"line-".concat(d),onAnimationEnd:this.handleAnimationEnd,onAnimationStart:this.handleAnimationStart},function(r){var a=r.t;if(f){var s=f.length/i.length,l=i.map(function(e,t){var n=Math.floor(t*s);if(f[n]){var r=f[n],i=E1(r.x,e.x),o=E1(r.y,e.y);return Qse(Qse({},e),{},{x:i(a),y:o(a)})}if(u){var l=E1(2*p,e.x),c=E1(h/2,e.y);return Qse(Qse({},e),{},{x:l(a),y:c(a)})}return Qse(Qse({},e),{},{x:e.x,y:e.y})});return n.renderCurveStatically(l,e,t)}var c,d=E1(0,g)(a);if(o){var m="".concat(o).split(/[,\s]+/gim).map(function(e){return parseFloat(e)});c=n.getStrokeDasharray(d,g,m)}else c=n.generateSimpleStrokeDasharray(g,d);return n.renderCurveStatically(i,e,t,{strokeDasharray:c})})}},{key:"renderCurve",value:function(e,t){var n=this.props,r=n.points,i=n.isAnimationActive,o=this.state,a=o.prevPoints,s=o.totalLength;return i&&r&&r.length&&(!a&&s>0||!ite()(a,r))?this.renderCurveWithAnimation(e,t):this.renderCurveStatically(r,e,t)}},{key:"render",value:function(){var e,t=this.props,n=t.hide,r=t.dot,i=t.points,o=t.className,a=t.xAxis,s=t.yAxis,l=t.top,c=t.left,d=t.width,u=t.height,p=t.isAnimationActive,h=t.id;if(n||!i||!i.length)return null;var m=this.state.isAnimationFinished,f=1===i.length,g=PJ("recharts-line",o),v=a&&a.allowDataOverflow,x=s&&s.allowDataOverflow,y=v||x,b=c1()(h)?this.id:h,j=null!==(e=e2(r,!1))&&void 0!==e?e:{r:3,strokeWidth:2},_=j.r,C=void 0===_?3:_,w=j.strokeWidth,S=void 0===w?2:w,A=(function(e){return e&&"object"===W1(e)&&"clipDot"in e}(r)?r:{}).clipDot,k=void 0===A||A,T=2*C+S;return We.createElement(L2,{className:g},v||x?We.createElement("defs",null,We.createElement("clipPath",{id:"clipPath-".concat(b)},We.createElement("rect",{x:v?c:c-d/2,y:x?l:l-u/2,width:v?d:2*d,height:x?u:2*u})),!k&&We.createElement("clipPath",{id:"clipPath-dots-".concat(b)},We.createElement("rect",{x:c-T/2,y:l-T/2,width:d+T,height:u+T}))):null,!f&&this.renderCurve(y,b),this.renderErrorBar(y,b),(f||r)&&this.renderDots(y,k,b),(!p||m)&&Ire.renderCallByParent(this.props,i))}}],i=[{key:"getDerivedStateFromProps",value:function(e,t){return e.animationId!==t.prevAnimationId?{prevAnimationId:e.animationId,curPoints:e.points,prevPoints:t.curPoints}:e.points!==t.curPoints?{curPoints:e.points}:null}},{key:"repeat",value:function(e,t){for(var n=e.length%2!==0?[].concat(Jse(e),[0]):e,r=[],i=0;i<t;++i)r=[].concat(Jse(r),Jse(n));return r}},{key:"renderDotItem",value:function(e,t){var n;if(We.isValidElement(e))n=We.cloneElement(e,t);else if(h1()(e))n=e(t);else{var r=t.key,i=Zse(t,qse),o=PJ("recharts-line-dot","boolean"!==typeof e?e.className:"");n=We.createElement(e3,Kse({key:r},i,{className:o}))}return n}}],r&&tle(n.prototype,r),i&&tle(n,i),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r,i}(We.PureComponent);function cle(e,t,n){if(t<1)return[];if(1===t&&void 0===n)return e;for(var r=[],i=0;i<e.length;i+=t){if(void 0!==n&&!0!==n(e[i]))return;r.push(e[i])}return r}function dle(e,t,n){return function(e){var t=e.width,n=e.height,r=function(e){return(e%180+180)%180}(arguments.length>1&&void 0!==arguments[1]?arguments[1]:0),i=r*Math.PI/180,o=Math.atan(n/t),a=i>o&&i<Math.PI-o?n/Math.sin(i):t/Math.cos(i);return Math.abs(a)}({width:e.width+t.width,height:e.height+t.height},n)}function ule(e,t,n,r,i){if(e*t<e*r||e*t>e*i)return!1;var o=n();return e*(t-e*o/2-r)>=0&&e*(t+e*o/2-i)<=0}function ple(e){return ple="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},ple(e)}function hle(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function mle(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?hle(Object(n),!0).forEach(function(t){fle(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):hle(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function fle(e,t,n){return t=function(e){var t=function(e,t){if("object"!=ple(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=ple(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==ple(t)?t:t+""}(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function gle(e,t,n){var r=e.tick,i=e.ticks,o=e.viewBox,a=e.minTickGap,s=e.orientation,l=e.interval,c=e.tickFormatter,d=e.unit,u=e.angle;if(!i||!i.length||!r)return[];if(C1(l)||c6.isSsr)return function(e,t){return cle(e,t+1)}(i,"number"===typeof l&&C1(l)?l:0);var p=[],h="top"===s||"bottom"===s?"width":"height",m=d&&"width"===h?b3(d,{fontSize:t,letterSpacing:n}):{width:0,height:0},f=function(e,r){var i=h1()(c)?c(e.value,r):e.value;return"width"===h?dle(b3(i,{fontSize:t,letterSpacing:n}),m,u):b3(i,{fontSize:t,letterSpacing:n})[h]},g=i.length>=2?j1(i[1].coordinate-i[0].coordinate):1,v=function(e,t,n){var r="width"===n,i=e.x,o=e.y,a=e.width,s=e.height;return 1===t?{start:r?i:o,end:r?i+a:o+s}:{start:r?i+a:o+s,end:r?i:o}}(o,g,h);return"equidistantPreserveStart"===l?function(e,t,n,r,i){for(var o,a=(r||[]).slice(),s=t.start,l=t.end,c=0,d=1,u=s,p=function(){var t=null===r||void 0===r?void 0:r[c];if(void 0===t)return{v:cle(r,d)};var o,a=c,p=function(){return void 0===o&&(o=n(t,a)),o},h=t.coordinate,m=0===c||ule(e,h,p,u,l);m||(c=0,u=s,d+=1),m&&(u=h+e*(p()/2+i),c+=d)};d<=a.length;)if(o=p())return o.v;return[]}(g,v,f,i,a):(p="preserveStart"===l||"preserveStartEnd"===l?function(e,t,n,r,i,o){var a=(r||[]).slice(),s=a.length,l=t.start,c=t.end;if(o){var d=r[s-1],u=n(d,s-1),p=e*(d.coordinate+e*u/2-c);a[s-1]=d=mle(mle({},d),{},{tickCoord:p>0?d.coordinate-p*e:d.coordinate}),ule(e,d.tickCoord,function(){return u},l,c)&&(c=d.tickCoord-e*(u/2+i),a[s-1]=mle(mle({},d),{},{isShow:!0}))}for(var h=o?s-1:s,m=function(t){var r,o=a[t],s=function(){return void 0===r&&(r=n(o,t)),r};if(0===t){var d=e*(o.coordinate-e*s()/2-l);a[t]=o=mle(mle({},o),{},{tickCoord:d<0?o.coordinate-d*e:o.coordinate})}else a[t]=o=mle(mle({},o),{},{tickCoord:o.coordinate});ule(e,o.tickCoord,s,l,c)&&(l=o.tickCoord+e*(s()/2+i),a[t]=mle(mle({},o),{},{isShow:!0}))},f=0;f<h;f++)m(f);return a}(g,v,f,i,a,"preserveStartEnd"===l):function(e,t,n,r,i){for(var o=(r||[]).slice(),a=o.length,s=t.start,l=t.end,c=function(t){var r,c=o[t],d=function(){return void 0===r&&(r=n(c,t)),r};if(t===a-1){var u=e*(c.coordinate+e*d()/2-l);o[t]=c=mle(mle({},c),{},{tickCoord:u>0?c.coordinate-u*e:c.coordinate})}else o[t]=c=mle(mle({},c),{},{tickCoord:c.coordinate});ule(e,c.tickCoord,d,s,l)&&(l=c.tickCoord-e*(d()/2+i),o[t]=mle(mle({},c),{},{isShow:!0}))},d=a-1;d>=0;d--)c(d);return o}(g,v,f,i,a),p.filter(function(e){return e.isShow}))}ale(lle,"displayName","Line"),ale(lle,"defaultProps",{xAxisId:0,yAxisId:0,connectNulls:!1,activeDot:!0,dot:!0,legendType:"line",stroke:"#3182bd",strokeWidth:1,fill:"#fff",points:[],isAnimationActive:!c6.isSsr,animateNewValues:!0,animationBegin:0,animationDuration:1500,animationEasing:"ease",hide:!1,label:!1}),ale(lle,"getComposedData",function(e){var t=e.props,n=e.xAxis,r=e.yAxis,i=e.xAxisTicks,o=e.yAxisTicks,a=e.dataKey,s=e.bandSize,l=e.displayedData,c=e.offset,d=t.layout,u=l.map(function(e,t){var l=one(e,a);return"horizontal"===d?{x:jne({axis:n,ticks:i,bandSize:s,entry:e,index:t}),y:c1()(l)?null:r.scale(l),value:l,payload:e}:{x:c1()(l)?null:n.scale(l),y:jne({axis:r,ticks:o,bandSize:s,entry:e,index:t}),value:l,payload:e}});return Qse({points:u,layout:d},c)});var vle=["viewBox"],xle=["viewBox"],yle=["ticks"];function ble(e){return ble="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},ble(e)}function jle(){return jle=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},jle.apply(this,arguments)}function _le(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function Cle(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?_le(Object(n),!0).forEach(function(t){Mle(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):_le(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function wle(e,t){if(null==e)return{};var n,r,i=function(e,t){if(null==e)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function Sle(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,Ole(r.key),r)}}function Ale(e,t,n){return t=Tle(t),function(e,t){if(t&&("object"===ble(t)||"function"===typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,kle()?Reflect.construct(t,n||[],Tle(e).constructor):t.apply(e,n))}function kle(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(kle=function(){return!!e})()}function Tle(e){return Tle=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},Tle(e)}function Ele(e,t){return Ele=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},Ele(e,t)}function Mle(e,t,n){return(t=Ole(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Ole(e){var t=function(e,t){if("object"!=ble(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=ble(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==ble(t)?t:t+""}var Rle=function(e){function t(e){var n;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),(n=Ale(this,t,[e])).state={fontSize:"",letterSpacing:""},n}return function(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Ele(e,t)}(t,e),n=t,r=[{key:"shouldComponentUpdate",value:function(e,t){var n=e.viewBox,r=wle(e,vle),i=this.props,o=i.viewBox,a=wle(i,xle);return!R1(n,o)||!R1(r,a)||!R1(t,this.state)}},{key:"componentDidMount",value:function(){var e=this.layerReference;if(e){var t=e.getElementsByClassName("recharts-cartesian-axis-tick-value")[0];t&&this.setState({fontSize:window.getComputedStyle(t).fontSize,letterSpacing:window.getComputedStyle(t).letterSpacing})}}},{key:"getTickLineCoord",value:function(e){var t,n,r,i,o,a,s=this.props,l=s.x,c=s.y,d=s.width,u=s.height,p=s.orientation,h=s.tickSize,m=s.mirror,f=s.tickMargin,g=m?-1:1,v=e.tickSize||h,x=C1(e.tickCoord)?e.tickCoord:e.coordinate;switch(p){case"top":t=n=e.coordinate,a=(r=(i=c+ +!m*u)-g*v)-g*f,o=x;break;case"left":r=i=e.coordinate,o=(t=(n=l+ +!m*d)-g*v)-g*f,a=x;break;case"right":r=i=e.coordinate,o=(t=(n=l+ +m*d)+g*v)+g*f,a=x;break;default:t=n=e.coordinate,a=(r=(i=c+ +m*u)+g*v)+g*f,o=x}return{line:{x1:t,y1:r,x2:n,y2:i},tick:{x:o,y:a}}}},{key:"getTickTextAnchor",value:function(){var e,t=this.props,n=t.orientation,r=t.mirror;switch(n){case"left":e=r?"start":"end";break;case"right":e=r?"end":"start";break;default:e="middle"}return e}},{key:"getTickVerticalAnchor",value:function(){var e=this.props,t=e.orientation,n=e.mirror,r="end";switch(t){case"left":case"right":r="middle";break;case"top":r=n?"start":"end";break;default:r=n?"end":"start"}return r}},{key:"renderAxisLine",value:function(){var e=this.props,t=e.x,n=e.y,r=e.width,i=e.height,o=e.orientation,a=e.mirror,s=e.axisLine,l=Cle(Cle(Cle({},e2(this.props,!1)),e2(s,!1)),{},{fill:"none"});if("top"===o||"bottom"===o){var c=+("top"===o&&!a||"bottom"===o&&a);l=Cle(Cle({},l),{},{x1:t,y1:n+c*i,x2:t+r,y2:n+c*i})}else{var d=+("left"===o&&!a||"right"===o&&a);l=Cle(Cle({},l),{},{x1:t+d*r,y1:n,x2:t+d*r,y2:n+i})}return We.createElement("line",jle({},l,{className:PJ("recharts-cartesian-axis-line",oa()(s,"className"))}))}},{key:"renderTicks",value:function(e,n,r){var i=this,o=this.props,a=o.tickLine,s=o.stroke,l=o.tick,c=o.tickFormatter,d=o.unit,u=gle(Cle(Cle({},this.props),{},{ticks:e}),n,r),p=this.getTickTextAnchor(),h=this.getTickVerticalAnchor(),m=e2(this.props,!1),f=e2(l,!1),g=Cle(Cle({},m),{},{fill:"none"},e2(a,!1)),v=u.map(function(e,n){var r=i.getTickLineCoord(e),o=r.line,v=r.tick,x=Cle(Cle(Cle(Cle({textAnchor:p,verticalAnchor:h},m),{},{stroke:"none",fill:s},f),v),{},{index:n,payload:e,visibleTicksCount:u.length,tickFormatter:c});return We.createElement(L2,jle({className:"recharts-cartesian-axis-tick",key:"tick-".concat(e.value,"-").concat(e.coordinate,"-").concat(e.tickCoord)},$1(i.props,e,n)),a&&We.createElement("line",jle({},g,o,{className:PJ("recharts-cartesian-axis-tick-line",oa()(a,"className"))})),l&&t.renderTickItem(l,x,"".concat(h1()(c)?c(e.value,n):e.value).concat(d||"")))});return We.createElement("g",{className:"recharts-cartesian-axis-ticks"},v)}},{key:"render",value:function(){var e=this,t=this.props,n=t.axisLine,r=t.width,i=t.height,o=t.ticksGenerator,a=t.className;if(t.hide)return null;var s=this.props,l=s.ticks,c=wle(s,yle),d=l;return h1()(o)&&(d=l&&l.length>0?o(this.props):o(c)),r<=0||i<=0||!d||!d.length?null:We.createElement(L2,{className:PJ("recharts-cartesian-axis",a),ref:function(t){e.layerReference=t}},n&&this.renderAxisLine(),this.renderTicks(d,this.state.fontSize,this.state.letterSpacing),xre.renderCallByParent(this.props))}}],i=[{key:"renderTickItem",value:function(e,t,n){var r=PJ(t.className,"recharts-cartesian-axis-tick-value");return We.isValidElement(e)?We.cloneElement(e,Cle(Cle({},t),{},{className:r})):h1()(e)?e(Cle(Cle({},t),{},{className:r})):We.createElement(Z3,jle({},t,{className:"recharts-cartesian-axis-tick-value"}),n)}}],r&&Sle(n.prototype,r),i&&Sle(n,i),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r,i}(We.Component);function Ple(e){return Ple="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Ple(e)}function Dle(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,Ble(r.key),r)}}function Nle(e,t,n){return t=Ile(t),function(e,t){if(t&&("object"===Ple(t)||"function"===typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,Lle()?Reflect.construct(t,n||[],Ile(e).constructor):t.apply(e,n))}function Lle(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(Lle=function(){return!!e})()}function Ile(e){return Ile=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},Ile(e)}function Fle(e,t){return Fle=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},Fle(e,t)}function $le(e,t,n){return(t=Ble(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Ble(e){var t=function(e,t){if("object"!=Ple(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=Ple(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==Ple(t)?t:t+""}function zle(){return zle=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},zle.apply(this,arguments)}function Hle(e){var t=e.xAxisId,n=Roe(),r=Poe(),i=Moe(t);return null==i?null:We.createElement(Rle,zle({},i,{className:PJ("recharts-".concat(i.axisType," ").concat(i.axisType),i.className),viewBox:{x:0,y:0,width:n,height:r},ticksGenerator:function(e){return pne(e,!0)}}))}Mle(Rle,"displayName","CartesianAxis"),Mle(Rle,"defaultProps",{x:0,y:0,width:0,height:0,viewBox:{x:0,y:0,width:0,height:0},orientation:"bottom",ticks:[],stroke:"#666",tickLine:!0,axisLine:!0,tick:!0,mirror:!1,minTickGap:5,tickSize:6,tickMargin:2,interval:"preserveEnd"});var Wle=function(e){function t(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),Nle(this,t,arguments)}return function(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Fle(e,t)}(t,e),n=t,(r=[{key:"render",value:function(){return We.createElement(Hle,this.props)}}])&&Dle(n.prototype,r),i&&Dle(n,i),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r,i}(We.Component);function Ule(e){return Ule="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Ule(e)}function Vle(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,Xle(r.key),r)}}function Gle(e,t,n){return t=Yle(t),function(e,t){if(t&&("object"===Ule(t)||"function"===typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,qle()?Reflect.construct(t,n||[],Yle(e).constructor):t.apply(e,n))}function qle(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(qle=function(){return!!e})()}function Yle(e){return Yle=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},Yle(e)}function Zle(e,t){return Zle=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},Zle(e,t)}function Kle(e,t,n){return(t=Xle(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Xle(e){var t=function(e,t){if("object"!=Ule(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=Ule(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==Ule(t)?t:t+""}function Qle(){return Qle=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Qle.apply(this,arguments)}$le(Wle,"displayName","XAxis"),$le(Wle,"defaultProps",{allowDecimals:!0,hide:!1,orientation:"bottom",width:0,height:30,mirror:!1,xAxisId:0,tickCount:5,type:"category",padding:{left:0,right:0},allowDataOverflow:!1,scale:"auto",reversed:!1,allowDuplicatedCategory:!0});var Jle=function(e){var t=e.yAxisId,n=Roe(),r=Poe(),i=Ooe(t);return null==i?null:We.createElement(Rle,Qle({},i,{className:PJ("recharts-".concat(i.axisType," ").concat(i.axisType),i.className),viewBox:{x:0,y:0,width:n,height:r},ticksGenerator:function(e){return pne(e,!0)}}))},ece=function(e){function t(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),Gle(this,t,arguments)}return function(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Zle(e,t)}(t,e),n=t,(r=[{key:"render",value:function(){return We.createElement(Jle,this.props)}}])&&Vle(n.prototype,r),i&&Vle(n,i),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r,i}(We.Component);Kle(ece,"displayName","YAxis"),Kle(ece,"defaultProps",{allowDuplicatedCategory:!0,allowDecimals:!0,hide:!1,orientation:"left",width:60,height:0,mirror:!1,yAxisId:0,tickCount:5,type:"number",padding:{top:0,bottom:0},allowDataOverflow:!1,scale:"auto",reversed:!1});var tce=Vse({chartName:"LineChart",GraphicalChild:lle,axisComponents:[{axisType:"xAxis",AxisComp:Wle},{axisType:"yAxis",AxisComp:ece}],formatAxisMap:eoe}),nce=["x1","y1","x2","y2","key"],rce=["offset"];function ice(e){return ice="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},ice(e)}function oce(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function ace(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?oce(Object(n),!0).forEach(function(t){sce(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):oce(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function sce(e,t,n){return t=function(e){var t=function(e,t){if("object"!=ice(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=ice(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==ice(t)?t:t+""}(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function lce(){return lce=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},lce.apply(this,arguments)}function cce(e,t){if(null==e)return{};var n,r,i=function(e,t){if(null==e)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}var dce=function(e){var t=e.fill;if(!t||"none"===t)return null;var n=e.fillOpacity,r=e.x,i=e.y,o=e.width,a=e.height,s=e.ry;return We.createElement("rect",{x:r,y:i,ry:s,width:o,height:a,stroke:"none",fill:t,fillOpacity:n,className:"recharts-cartesian-grid-bg"})};function uce(e,t){var n;if(We.isValidElement(e))n=We.cloneElement(e,t);else if(h1()(e))n=e(t);else{var r=t.x1,i=t.y1,o=t.x2,a=t.y2,s=t.key,l=cce(t,nce),c=e2(l,!1),d=(c.offset,cce(c,rce));n=We.createElement("line",lce({},d,{x1:r,y1:i,x2:o,y2:a,fill:"none",key:s}))}return n}function pce(e){var t=e.x,n=e.width,r=e.horizontal,i=void 0===r||r,o=e.horizontalPoints;if(!i||!o||!o.length)return null;var a=o.map(function(r,o){var a=ace(ace({},e),{},{x1:t,y1:r,x2:t+n,y2:r,key:"line-".concat(o),index:o});return uce(i,a)});return We.createElement("g",{className:"recharts-cartesian-grid-horizontal"},a)}function hce(e){var t=e.y,n=e.height,r=e.vertical,i=void 0===r||r,o=e.verticalPoints;if(!i||!o||!o.length)return null;var a=o.map(function(r,o){var a=ace(ace({},e),{},{x1:r,y1:t,x2:r,y2:t+n,key:"line-".concat(o),index:o});return uce(i,a)});return We.createElement("g",{className:"recharts-cartesian-grid-vertical"},a)}function mce(e){var t=e.horizontalFill,n=e.fillOpacity,r=e.x,i=e.y,o=e.width,a=e.height,s=e.horizontalPoints,l=e.horizontal;if(!(void 0===l||l)||!t||!t.length)return null;var c=s.map(function(e){return Math.round(e+i-i)}).sort(function(e,t){return e-t});i!==c[0]&&c.unshift(0);var d=c.map(function(e,s){var l=!c[s+1]?i+a-e:c[s+1]-e;if(l<=0)return null;var d=s%t.length;return We.createElement("rect",{key:"react-".concat(s),y:e,x:r,height:l,width:o,stroke:"none",fill:t[d],fillOpacity:n,className:"recharts-cartesian-grid-bg"})});return We.createElement("g",{className:"recharts-cartesian-gridstripes-horizontal"},d)}function fce(e){var t=e.vertical,n=void 0===t||t,r=e.verticalFill,i=e.fillOpacity,o=e.x,a=e.y,s=e.width,l=e.height,c=e.verticalPoints;if(!n||!r||!r.length)return null;var d=c.map(function(e){return Math.round(e+o-o)}).sort(function(e,t){return e-t});o!==d[0]&&d.unshift(0);var u=d.map(function(e,t){var n=!d[t+1]?o+s-e:d[t+1]-e;if(n<=0)return null;var c=t%r.length;return We.createElement("rect",{key:"react-".concat(t),x:e,y:a,width:n,height:l,stroke:"none",fill:r[c],fillOpacity:i,className:"recharts-cartesian-grid-bg"})});return We.createElement("g",{className:"recharts-cartesian-gridstripes-vertical"},u)}var gce=function(e,t){var n=e.xAxis,r=e.width,i=e.height,o=e.offset;return une(gle(ace(ace(ace({},Rle.defaultProps),n),{},{ticks:pne(n,!0),viewBox:{x:0,y:0,width:r,height:i}})),o.left,o.left+o.width,t)},vce=function(e,t){var n=e.yAxis,r=e.width,i=e.height,o=e.offset;return une(gle(ace(ace(ace({},Rle.defaultProps),n),{},{ticks:pne(n,!0),viewBox:{x:0,y:0,width:r,height:i}})),o.top,o.top+o.height,t)},xce={horizontal:!0,vertical:!0,horizontalPoints:[],verticalPoints:[],stroke:"#ccc",fill:"none",verticalFill:[],horizontalFill:[]};function yce(e){var t,n,r,i,o,a,s=Roe(),l=Poe(),c=(0,We.useContext)(Soe),d=ace(ace({},e),{},{stroke:null!==(t=e.stroke)&&void 0!==t?t:xce.stroke,fill:null!==(n=e.fill)&&void 0!==n?n:xce.fill,horizontal:null!==(r=e.horizontal)&&void 0!==r?r:xce.horizontal,horizontalFill:null!==(i=e.horizontalFill)&&void 0!==i?i:xce.horizontalFill,vertical:null!==(o=e.vertical)&&void 0!==o?o:xce.vertical,verticalFill:null!==(a=e.verticalFill)&&void 0!==a?a:xce.verticalFill,x:C1(e.x)?e.x:c.left,y:C1(e.y)?e.y:c.top,width:C1(e.width)?e.width:c.width,height:C1(e.height)?e.height:c.height}),u=d.x,p=d.y,h=d.width,m=d.height,f=d.syncWithTicks,g=d.horizontalValues,v=d.verticalValues,x=function(){var e=(0,We.useContext)(_oe);return T1(e)}(),y=function(){var e=(0,We.useContext)(Coe);return yoe()(e,function(e){return _re()(e.domain,Number.isFinite)})||T1(e)}();if(!C1(h)||h<=0||!C1(m)||m<=0||!C1(u)||u!==+u||!C1(p)||p!==+p)return null;var b=d.verticalCoordinatesGenerator||gce,j=d.horizontalCoordinatesGenerator||vce,_=d.horizontalPoints,C=d.verticalPoints;if((!_||!_.length)&&h1()(j)){var w=g&&g.length,S=j({yAxis:y?ace(ace({},y),{},{ticks:w?g:y.ticks}):void 0,width:s,height:l,offset:c},!!w||f);v2(Array.isArray(S),"horizontalCoordinatesGenerator should return Array but instead it returned [".concat(ice(S),"]")),Array.isArray(S)&&(_=S)}if((!C||!C.length)&&h1()(b)){var A=v&&v.length,k=b({xAxis:x?ace(ace({},x),{},{ticks:A?v:x.ticks}):void 0,width:s,height:l,offset:c},!!A||f);v2(Array.isArray(k),"verticalCoordinatesGenerator should return Array but instead it returned [".concat(ice(k),"]")),Array.isArray(k)&&(C=k)}return We.createElement("g",{className:"recharts-cartesian-grid"},We.createElement(dce,{fill:d.fill,fillOpacity:d.fillOpacity,x:d.x,y:d.y,width:d.width,height:d.height,ry:d.ry}),We.createElement(pce,lce({},d,{offset:c,horizontalPoints:_,xAxis:x,yAxis:y})),We.createElement(hce,lce({},d,{offset:c,verticalPoints:C,xAxis:x,yAxis:y})),We.createElement(mce,lce({},d,{horizontalPoints:_})),We.createElement(fce,lce({},d,{verticalPoints:C})))}yce.displayName="CartesianGrid";var bce=["component"];function jce(e){return jce="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},jce(e)}function _ce(e,t){if(null==e)return{};var n,r,i=function(e,t){if(null==e)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function Cce(e){var t,n=e.component,r=_ce(e,bce);return(0,We.isValidElement)(n)?t=(0,We.cloneElement)(n,r):h1()(n)?t=(0,We.createElement)(n,r):v2(!1,"Customized's props `component` must be React.element or Function, but got %s.",jce(n)),We.createElement(L2,{className:"recharts-customized-wrapper"},t)}Cce.displayName="Customized";var wce=n(26480),Sce=n(76378),Ace=n(60991),kce=n(56893),Tce=n(40995),Ece=n(63102),Mce=Vse({chartName:"BarChart",GraphicalChild:qie,defaultTooltipEventType:"axis",validateTooltipEventTypes:["axis","item"],axisComponents:[{axisType:"xAxis",AxisComp:Wle},{axisType:"yAxis",AxisComp:ece}],formatAxisMap:eoe}),Oce=["points","className","baseLinePoints","connectNulls"];function Rce(){return Rce=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Rce.apply(this,arguments)}function Pce(e,t){if(null==e)return{};var n,r,i=function(e,t){if(null==e)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function Dce(e){return function(e){if(Array.isArray(e))return Nce(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)return;if("string"===typeof e)return Nce(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Nce(e,t)}(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.")}()}function Nce(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var Lce=function(e){return e&&e.x===+e.x&&e.y===+e.y},Ice=function(e,t){var n=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=[[]];return e.forEach(function(e){Lce(e)?t[t.length-1].push(e):t[t.length-1].length>0&&t.push([])}),Lce(e[0])&&t[t.length-1].push(e[0]),t[t.length-1].length<=0&&(t=t.slice(0,-1)),t}(e);t&&(n=[n.reduce(function(e,t){return[].concat(Dce(e),Dce(t))},[])]);var r=n.map(function(e){return e.reduce(function(e,t,n){return"".concat(e).concat(0===n?"M":"L").concat(t.x,",").concat(t.y)},"")}).join("");return 1===n.length?"".concat(r,"Z"):r},Fce=function(e){var t=e.points,n=e.className,r=e.baseLinePoints,i=e.connectNulls,o=Pce(e,Oce);if(!t||!t.length)return null;var a=PJ("recharts-polygon",n);if(r&&r.length){var s=o.stroke&&"none"!==o.stroke,l=function(e,t,n){var r=Ice(e,n);return"".concat("Z"===r.slice(-1)?r.slice(0,-1):r,"L").concat(Ice(t.reverse(),n).slice(1))}(t,r,i);return We.createElement("g",{className:a},We.createElement("path",Rce({},e2(o,!0),{fill:"Z"===l.slice(-1)?o.fill:"none",stroke:"none",d:l})),s?We.createElement("path",Rce({},e2(o,!0),{fill:"none",d:Ice(t,i)})):null,s?We.createElement("path",Rce({},e2(o,!0),{fill:"none",d:Ice(r,i)})):null)}var c=Ice(t,i);return We.createElement("path",Rce({},e2(o,!0),{fill:"Z"===c.slice(-1)?o.fill:"none",className:a,d:c}))};function $ce(e){return $ce="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},$ce(e)}function Bce(){return Bce=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Bce.apply(this,arguments)}function zce(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function Hce(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?zce(Object(n),!0).forEach(function(t){Yce(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):zce(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function Wce(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,Zce(r.key),r)}}function Uce(e,t,n){return t=Gce(t),function(e,t){if(t&&("object"===$ce(t)||"function"===typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,Vce()?Reflect.construct(t,n||[],Gce(e).constructor):t.apply(e,n))}function Vce(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(Vce=function(){return!!e})()}function Gce(e){return Gce=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},Gce(e)}function qce(e,t){return qce=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},qce(e,t)}function Yce(e,t,n){return(t=Zce(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Zce(e){var t=function(e,t){if("object"!=$ce(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=$ce(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==$ce(t)?t:t+""}var Kce=Math.PI/180,Xce=1e-5,Qce=function(e){function t(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),Uce(this,t,arguments)}return function(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&qce(e,t)}(t,e),n=t,r=[{key:"getTickLineCoord",value:function(e){var t=this.props,n=t.cx,r=t.cy,i=t.radius,o=t.orientation,a=t.tickSize||8,s=nre(n,r,i,e.coordinate),l=nre(n,r,i+("inner"===o?-1:1)*a,e.coordinate);return{x1:s.x,y1:s.y,x2:l.x,y2:l.y}}},{key:"getTickTextAnchor",value:function(e){var t=this.props.orientation,n=Math.cos(-e.coordinate*Kce);return n>Xce?"outer"===t?"start":"end":n<-Xce?"outer"===t?"end":"start":"middle"}},{key:"renderAxisLine",value:function(){var e=this.props,t=e.cx,n=e.cy,r=e.radius,i=e.axisLine,o=e.axisLineType,a=Hce(Hce({},e2(this.props,!1)),{},{fill:"none"},e2(i,!1));if("circle"===o)return We.createElement(e3,Bce({className:"recharts-polar-angle-axis-line"},a,{cx:t,cy:n,r:r}));var s=this.props.ticks.map(function(e){return nre(t,n,r,e.coordinate)});return We.createElement(Fce,Bce({className:"recharts-polar-angle-axis-line"},a,{points:s}))}},{key:"renderTicks",value:function(){var e=this,n=this.props,r=n.ticks,i=n.tick,o=n.tickLine,a=n.tickFormatter,s=n.stroke,l=e2(this.props,!1),c=e2(i,!1),d=Hce(Hce({},l),{},{fill:"none"},e2(o,!1)),u=r.map(function(n,r){var u=e.getTickLineCoord(n),p=Hce(Hce(Hce({textAnchor:e.getTickTextAnchor(n)},l),{},{stroke:"none",fill:s},c),{},{index:r,payload:n,x:u.x2,y:u.y2});return We.createElement(L2,Bce({className:PJ("recharts-polar-angle-axis-tick",sre(i)),key:"tick-".concat(n.coordinate)},$1(e.props,n,r)),o&&We.createElement("line",Bce({className:"recharts-polar-angle-axis-tick-line"},d,u)),i&&t.renderTickItem(i,p,a?a(n.value,r):n.value))});return We.createElement(L2,{className:"recharts-polar-angle-axis-ticks"},u)}},{key:"render",value:function(){var e=this.props,t=e.ticks,n=e.radius,r=e.axisLine;return n<=0||!t||!t.length?null:We.createElement(L2,{className:PJ("recharts-polar-angle-axis",this.props.className)},r&&this.renderAxisLine(),this.renderTicks())}}],i=[{key:"renderTickItem",value:function(e,t,n){return We.isValidElement(e)?We.cloneElement(e,t):h1()(e)?e(t):We.createElement(Z3,Bce({},t,{className:"recharts-polar-angle-axis-tick-value"}),n)}}],r&&Wce(n.prototype,r),i&&Wce(n,i),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r,i}(We.PureComponent);Yce(Qce,"displayName","PolarAngleAxis"),Yce(Qce,"axisType","angleAxis"),Yce(Qce,"defaultProps",{type:"category",angleAxisId:0,scale:"auto",cx:0,cy:0,orientation:"outer",axisLine:!0,tickLine:!0,tickSize:8,tick:!0,hide:!1,allowDuplicatedCategory:!0});var Jce=n(22794),ede=n.n(Jce),tde=n(59364),nde=n.n(tde),rde=["cx","cy","angle","ticks","axisLine"],ide=["ticks","tick","angle","tickFormatter","stroke"];function ode(e){return ode="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},ode(e)}function ade(){return ade=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},ade.apply(this,arguments)}function sde(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function lde(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?sde(Object(n),!0).forEach(function(t){fde(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):sde(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function cde(e,t){if(null==e)return{};var n,r,i=function(e,t){if(null==e)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function dde(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,gde(r.key),r)}}function ude(e,t,n){return t=hde(t),function(e,t){if(t&&("object"===ode(t)||"function"===typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,pde()?Reflect.construct(t,n||[],hde(e).constructor):t.apply(e,n))}function pde(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(pde=function(){return!!e})()}function hde(e){return hde=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},hde(e)}function mde(e,t){return mde=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},mde(e,t)}function fde(e,t,n){return(t=gde(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function gde(e){var t=function(e,t){if("object"!=ode(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=ode(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==ode(t)?t:t+""}var vde,xde=function(e){function t(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),ude(this,t,arguments)}return function(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&mde(e,t)}(t,e),n=t,r=[{key:"getTickValueCoord",value:function(e){var t=e.coordinate,n=this.props,r=n.angle,i=n.cx,o=n.cy;return nre(i,o,t,r)}},{key:"getTickTextAnchor",value:function(){var e;switch(this.props.orientation){case"left":e="end";break;case"right":e="start";break;default:e="middle"}return e}},{key:"getViewBox",value:function(){var e=this.props,t=e.cx,n=e.cy,r=e.angle,i=e.ticks,o=ede()(i,function(e){return e.coordinate||0});return{cx:t,cy:n,startAngle:r,endAngle:r,innerRadius:nde()(i,function(e){return e.coordinate||0}).coordinate||0,outerRadius:o.coordinate||0}}},{key:"renderAxisLine",value:function(){var e=this.props,t=e.cx,n=e.cy,r=e.angle,i=e.ticks,o=e.axisLine,a=cde(e,rde),s=i.reduce(function(e,t){return[Math.min(e[0],t.coordinate),Math.max(e[1],t.coordinate)]},[1/0,-1/0]),l=nre(t,n,s[0],r),c=nre(t,n,s[1],r),d=lde(lde(lde({},e2(a,!1)),{},{fill:"none"},e2(o,!1)),{},{x1:l.x,y1:l.y,x2:c.x,y2:c.y});return We.createElement("line",ade({className:"recharts-polar-radius-axis-line"},d))}},{key:"renderTicks",value:function(){var e=this,n=this.props,r=n.ticks,i=n.tick,o=n.angle,a=n.tickFormatter,s=n.stroke,l=cde(n,ide),c=this.getTickTextAnchor(),d=e2(l,!1),u=e2(i,!1),p=r.map(function(n,r){var l=e.getTickValueCoord(n),p=lde(lde(lde(lde({textAnchor:c,transform:"rotate(".concat(90-o,", ").concat(l.x,", ").concat(l.y,")")},d),{},{stroke:"none",fill:s},u),{},{index:r},l),{},{payload:n});return We.createElement(L2,ade({className:PJ("recharts-polar-radius-axis-tick",sre(i)),key:"tick-".concat(n.coordinate)},$1(e.props,n,r)),t.renderTickItem(i,p,a?a(n.value,r):n.value))});return We.createElement(L2,{className:"recharts-polar-radius-axis-ticks"},p)}},{key:"render",value:function(){var e=this.props,t=e.ticks,n=e.axisLine,r=e.tick;return t&&t.length?We.createElement(L2,{className:PJ("recharts-polar-radius-axis",this.props.className)},n&&this.renderAxisLine(),r&&this.renderTicks(),xre.renderCallByParent(this.props,this.getViewBox())):null}}],i=[{key:"renderTickItem",value:function(e,t,n){return We.isValidElement(e)?We.cloneElement(e,t):h1()(e)?e(t):We.createElement(Z3,ade({},t,{className:"recharts-polar-radius-axis-tick-value"}),n)}}],r&&dde(n.prototype,r),i&&dde(n,i),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r,i}(We.PureComponent);function yde(e){return yde="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},yde(e)}function bde(){return bde=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},bde.apply(this,arguments)}function jde(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function _de(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?jde(Object(n),!0).forEach(function(t){Tde(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):jde(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function Cde(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,Ede(r.key),r)}}function wde(e,t,n){return t=Ade(t),function(e,t){if(t&&("object"===yde(t)||"function"===typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,Sde()?Reflect.construct(t,n||[],Ade(e).constructor):t.apply(e,n))}function Sde(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(Sde=function(){return!!e})()}function Ade(e){return Ade=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},Ade(e)}function kde(e,t){return kde=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},kde(e,t)}function Tde(e,t,n){return(t=Ede(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Ede(e){var t=function(e,t){if("object"!=yde(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=yde(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==yde(t)?t:t+""}fde(xde,"displayName","PolarRadiusAxis"),fde(xde,"axisType","radiusAxis"),fde(xde,"defaultProps",{type:"number",radiusAxisId:0,cx:0,cy:0,angle:0,orientation:"right",stroke:"#ccc",axisLine:!0,tick:!0,tickCount:5,allowDataOverflow:!1,scale:"auto",allowDuplicatedCategory:!0});var Mde=function(e){function t(e){var n;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),Tde(n=wde(this,t,[e]),"pieRef",null),Tde(n,"sectorRefs",[]),Tde(n,"id",A1("recharts-pie-")),Tde(n,"handleAnimationEnd",function(){var e=n.props.onAnimationEnd;n.setState({isAnimationFinished:!0}),h1()(e)&&e()}),Tde(n,"handleAnimationStart",function(){var e=n.props.onAnimationStart;n.setState({isAnimationFinished:!1}),h1()(e)&&e()}),n.state={isAnimationFinished:!e.isAnimationActive,prevIsAnimationActive:e.isAnimationActive,prevAnimationId:e.animationId,sectorToFocus:0},n}return function(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&kde(e,t)}(t,e),n=t,r=[{key:"isActiveIndex",value:function(e){var t=this.props.activeIndex;return Array.isArray(t)?-1!==t.indexOf(e):e===t}},{key:"hasActiveIndex",value:function(){var e=this.props.activeIndex;return Array.isArray(e)?0!==e.length:e||0===e}},{key:"renderLabels",value:function(e){if(this.props.isAnimationActive&&!this.state.isAnimationFinished)return null;var n=this.props,r=n.label,i=n.labelLine,o=n.dataKey,a=n.valueKey,s=e2(this.props,!1),l=e2(r,!1),c=e2(i,!1),d=r&&r.offsetRadius||20,u=e.map(function(e,n){var u=(e.startAngle+e.endAngle)/2,p=nre(e.cx,e.cy,e.outerRadius+d,u),h=_de(_de(_de(_de({},s),e),{},{stroke:"none"},l),{},{index:n,textAnchor:t.getTextAnchor(p.x,e.cx)},p),m=_de(_de(_de(_de({},s),e),{},{fill:"none",stroke:e.fill},c),{},{index:n,points:[nre(e.cx,e.cy,e.outerRadius,u),p]}),f=o;return c1()(o)&&c1()(a)?f="value":c1()(o)&&(f=a),We.createElement(L2,{key:"label-".concat(e.startAngle,"-").concat(e.endAngle,"-").concat(e.midAngle,"-").concat(n)},i&&t.renderLabelLineItem(i,m,"line"),t.renderLabelItem(r,h,one(e,f)))});return We.createElement(L2,{className:"recharts-pie-labels"},u)}},{key:"renderSectorsStatically",value:function(e){var t=this,n=this.props,r=n.activeShape,i=n.blendStroke,o=n.inactiveShape;return e.map(function(n,a){if(0===(null===n||void 0===n?void 0:n.startAngle)&&0===(null===n||void 0===n?void 0:n.endAngle)&&1!==e.length)return null;var s=t.isActiveIndex(a),l=o&&t.hasActiveIndex()?o:null,c=s?r:l,d=_de(_de({},n),{},{stroke:i?n.fill:n.stroke,tabIndex:-1});return We.createElement(L2,bde({ref:function(e){e&&!t.sectorRefs.includes(e)&&t.sectorRefs.push(e)},tabIndex:-1,className:"recharts-pie-sector"},$1(t.props,n,a),{key:"sector-".concat(null===n||void 0===n?void 0:n.startAngle,"-").concat(null===n||void 0===n?void 0:n.endAngle,"-").concat(n.midAngle,"-").concat(a)}),We.createElement(fie,bde({option:c,isActive:s,shapeType:"sector"},d)))})}},{key:"renderSectorsWithAnimation",value:function(){var e=this,t=this.props,n=t.sectors,r=t.isAnimationActive,i=t.animationBegin,o=t.animationDuration,a=t.animationEasing,s=t.animationId,l=this.state,c=l.prevSectors,d=l.prevIsAnimationActive;return We.createElement(s1,{begin:i,duration:o,isActive:r,easing:a,from:{t:0},to:{t:1},key:"pie-".concat(s,"-").concat(d),onAnimationStart:this.handleAnimationStart,onAnimationEnd:this.handleAnimationEnd},function(t){var r=t.t,i=[],o=(n&&n[0]).startAngle;return n.forEach(function(e,t){var n=c&&c[t],a=t>0?oa()(e,"paddingAngle",0):0;if(n){var s=E1(n.endAngle-n.startAngle,e.endAngle-e.startAngle),l=_de(_de({},e),{},{startAngle:o+a,endAngle:o+s(r)+a});i.push(l),o=l.endAngle}else{var d=e.endAngle,u=e.startAngle,p=E1(0,d-u)(r),h=_de(_de({},e),{},{startAngle:o+a,endAngle:o+p+a});i.push(h),o=h.endAngle}}),We.createElement(L2,null,e.renderSectorsStatically(i))})}},{key:"attachKeyboardHandlers",value:function(e){var t=this;e.onkeydown=function(e){if(!e.altKey)switch(e.key){case"ArrowLeft":var n=++t.state.sectorToFocus%t.sectorRefs.length;t.sectorRefs[n].focus(),t.setState({sectorToFocus:n});break;case"ArrowRight":var r=--t.state.sectorToFocus<0?t.sectorRefs.length-1:t.state.sectorToFocus%t.sectorRefs.length;t.sectorRefs[r].focus(),t.setState({sectorToFocus:r});break;case"Escape":t.sectorRefs[t.state.sectorToFocus].blur(),t.setState({sectorToFocus:0})}}}},{key:"renderSectors",value:function(){var e=this.props,t=e.sectors,n=e.isAnimationActive,r=this.state.prevSectors;return!(n&&t&&t.length)||r&&ite()(r,t)?this.renderSectorsStatically(t):this.renderSectorsWithAnimation()}},{key:"componentDidMount",value:function(){this.pieRef&&this.attachKeyboardHandlers(this.pieRef)}},{key:"render",value:function(){var e=this,t=this.props,n=t.hide,r=t.sectors,i=t.className,o=t.label,a=t.cx,s=t.cy,l=t.innerRadius,c=t.outerRadius,d=t.isAnimationActive,u=this.state.isAnimationFinished;if(n||!r||!r.length||!C1(a)||!C1(s)||!C1(l)||!C1(c))return null;var p=PJ("recharts-pie",i);return We.createElement(L2,{tabIndex:this.props.rootTabIndex,className:p,ref:function(t){e.pieRef=t}},this.renderSectors(),o&&this.renderLabels(r),xre.renderCallByParent(this.props,null,!1),(!d||u)&&Ire.renderCallByParent(this.props,r,!1))}}],i=[{key:"getDerivedStateFromProps",value:function(e,t){return t.prevIsAnimationActive!==e.isAnimationActive?{prevIsAnimationActive:e.isAnimationActive,prevAnimationId:e.animationId,curSectors:e.sectors,prevSectors:[],isAnimationFinished:!0}:e.isAnimationActive&&e.animationId!==t.prevAnimationId?{prevAnimationId:e.animationId,curSectors:e.sectors,prevSectors:t.curSectors,isAnimationFinished:!0}:e.sectors!==t.curSectors?{curSectors:e.sectors,isAnimationFinished:!0}:null}},{key:"getTextAnchor",value:function(e,t){return e>t?"start":e<t?"end":"middle"}},{key:"renderLabelLineItem",value:function(e,t,n){if(We.isValidElement(e))return We.cloneElement(e,t);if(h1()(e))return e(t);var r=PJ("recharts-pie-label-line","boolean"!==typeof e?e.className:"");return We.createElement(Xae,bde({},t,{key:n,type:"linear",className:r}))}},{key:"renderLabelItem",value:function(e,t,n){if(We.isValidElement(e))return We.cloneElement(e,t);var r=n;if(h1()(e)&&(r=e(t),We.isValidElement(r)))return r;var i=PJ("recharts-pie-label-text","boolean"===typeof e||h1()(e)?"":e.className);return We.createElement(Z3,bde({},t,{alignmentBaseline:"middle",className:i}),r)}}],r&&Cde(n.prototype,r),i&&Cde(n,i),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r,i}(We.PureComponent);vde=Mde,Tde(Mde,"displayName","Pie"),Tde(Mde,"defaultProps",{stroke:"#fff",fill:"#808080",legendType:"rect",cx:"50%",cy:"50%",startAngle:0,endAngle:360,innerRadius:0,outerRadius:"80%",paddingAngle:0,labelLine:!0,hide:!1,minAngle:0,isAnimationActive:!c6.isSsr,animationBegin:400,animationDuration:1500,animationEasing:"ease",nameKey:"name",blendStroke:!1,rootTabIndex:0}),Tde(Mde,"parseDeltaAngle",function(e,t){return j1(t-e)*Math.min(Math.abs(t-e),360)}),Tde(Mde,"getRealPieData",function(e){var t=e.data,n=e.children,r=e2(e,!1),i=Z1(n,Cre);return t&&t.length?t.map(function(e,t){return _de(_de(_de({payload:e},r),e),i&&i[t]&&i[t].props)}):i&&i.length?i.map(function(e){return _de(_de({},r),e.props)}):[]}),Tde(Mde,"parseCoordinateOfPie",function(e,t){var n=t.top,r=t.left,i=t.width,o=t.height,a=rre(i,o);return{cx:r+k1(e.cx,i,i/2),cy:n+k1(e.cy,o,o/2),innerRadius:k1(e.innerRadius,a,0),outerRadius:k1(e.outerRadius,a,.8*a),maxRadius:e.maxRadius||Math.sqrt(i*i+o*o)/2}}),Tde(Mde,"getComposedData",function(e){var t=e.item,n=e.offset,r=void 0!==t.type.defaultProps?_de(_de({},t.type.defaultProps),t.props):t.props,i=vde.getRealPieData(r);if(!i||!i.length)return null;var o=r.cornerRadius,a=r.startAngle,s=r.endAngle,l=r.paddingAngle,c=r.dataKey,d=r.nameKey,u=r.valueKey,p=r.tooltipType,h=Math.abs(r.minAngle),m=vde.parseCoordinateOfPie(r,n),f=vde.parseDeltaAngle(a,s),g=Math.abs(f),v=c;c1()(c)&&c1()(u)?(v2(!1,'Use "dataKey" to specify the value of pie,\n      the props "valueKey" will be deprecated in 1.1.0'),v="value"):c1()(c)&&(v2(!1,'Use "dataKey" to specify the value of pie,\n      the props "valueKey" will be deprecated in 1.1.0'),v=u);var x,y,b=i.filter(function(e){return 0!==one(e,v,0)}).length,j=g-b*h-(g>=360?b:b-1)*l,_=i.reduce(function(e,t){var n=one(t,v,0);return e+(C1(n)?n:0)},0);_>0&&(x=i.map(function(e,t){var n,r=one(e,v,0),i=one(e,d,t),s=(C1(r)?r:0)/_,c=(n=t?y.endAngle+j1(f)*l*(0!==r?1:0):a)+j1(f)*((0!==r?h:0)+s*j),u=(n+c)/2,g=(m.innerRadius+m.outerRadius)/2,x=[{name:i,value:r,payload:e,dataKey:v,type:p}],b=nre(m.cx,m.cy,g,u);return y=_de(_de(_de({percent:s,cornerRadius:o,name:i,tooltipPayload:x,midAngle:u,middleRadius:g,tooltipPosition:b},e),m),{},{value:one(e,v),startAngle:n,endAngle:c,payload:e,paddingAngle:j1(f)*l})}));return _de(_de({},m),{},{sectors:x,data:i})});var Ode=Vse({chartName:"PieChart",GraphicalChild:Mde,validateTooltipEventTypes:["item"],defaultTooltipEventType:"item",legendContent:"children",axisComponents:[{axisType:"angleAxis",AxisComp:Qce},{axisType:"radiusAxis",AxisComp:xde}],formatAxisMap:function(e,t,n,r,i){var o=e.width,a=e.height,s=e.startAngle,l=e.endAngle,c=k1(e.cx,o,o/2),d=k1(e.cy,a,a/2),u=rre(o,a,n),p=k1(e.innerRadius,u,0),h=k1(e.outerRadius,u,.8*u);return Object.keys(t).reduce(function(e,n){var o,a=t[n],u=a.domain,m=a.reversed;if(c1()(a.range))"angleAxis"===r?o=[s,l]:"radiusAxis"===r&&(o=[p,h]),m&&(o=[o[1],o[0]]);else{var f=Qne(o=a.range,2);s=f[0],l=f[1]}var g=fne(a,i),v=g.realScaleType,x=g.scale;x.domain(u).range(o),vne(x);var y=bne(x,Kne(Kne({},a),{},{realScaleType:v})),b=Kne(Kne(Kne({},a),y),{},{range:o,radius:h,realScaleType:v,scale:x,cx:c,cy:d,innerRadius:p,outerRadius:h,startAngle:s,endAngle:l});return Kne(Kne({},e),{},Xne({},n,b))},{})},defaultProps:{layout:"centric",startAngle:0,endAngle:360,cx:"50%",cy:"50%",innerRadius:0,outerRadius:"80%"}});const Rde={30:"#F9F9FF",50:"#e8eaf6",100:"#c5cae9",200:"#9fa8da",300:"#7986cb",400:"#5c6bc0",500:"#3f51b5",600:"#3949ab",700:"#303f9f",800:"#283593",900:"#1a237e",A100:"#8c9eff",A200:"#536dfe",A400:"#3d5afe",A700:"#304ffe"},Pde={50:"#fbe9e7",100:"#ffccbc",200:"#ffab91",300:"#ff8a65",400:"#ff7043",500:"#ff5722",600:"#f4511e",700:"#e64a19",800:"#d84315",900:"#bf360c",A100:"#ff9e80",A200:"#ff6e40",A400:"#ff3d00",A700:"#dd2c00"},Dde={50:"#fff8e1",100:"#ffecb3",200:"#ffe082",300:"#ffd54f",400:"#ffca28",500:"#ffc107",600:"#ffb300",700:"#ffa000",800:"#ff8f00",900:"#ff6f00",A100:"#ffe57f",A200:"#ffd740",A400:"#ffc400",A700:"#ffab00"},Nde={50:"#e3f2fd",100:"#bbdefb",200:"#90caf9",300:"#64b5f6",400:"#42a5f5",500:"#2196f3",600:"#1e88e5",700:"#1976d2",800:"#1565c0",900:"#0d47a1",A100:"#82b1ff",A200:"#448aff",A400:"#2979ff",A700:"#2962ff"},Lde={50:"#eceff1",100:"#cfd8dc",200:"#b0bec5",300:"#90a4ae",400:"#78909c",500:"#607d8b",600:"#546e7a",700:"#455a64",800:"#37474f",900:"#263238",A100:"#cfd8dc",A200:"#b0bec5",A400:"#78909c",A700:"#455a64"},Ide={50:"#efebe9",100:"#d7ccc8",200:"#bcaaa4",300:"#a1887f",400:"#8d6e63",500:"#795548",600:"#6d4c41",700:"#5d4037",800:"#4e342e",900:"#3e2723",A100:"#d7ccc8",A200:"#bcaaa4",A400:"#8d6e63",A700:"#5d4037"},Fde={50:"#e0f7fa",100:"#b2ebf2",200:"#80deea",300:"#4dd0e1",400:"#26c6da",500:"#00bcd4",600:"#00acc1",700:"#0097a7",800:"#00838f",900:"#006064",A100:"#84ffff",A200:"#18ffff",A400:"#00e5ff",A700:"#00b8d4"},$de={50:"#ede7f6",100:"#d1c4e9",200:"#b39ddb",300:"#9575cd",400:"#7e57c2",500:"#673ab7",600:"#5e35b1",700:"#512da8",800:"#4527a0",900:"#311b92",A100:"#b388ff",A200:"#7c4dff",A400:"#651fff",A700:"#6200ea",A800:"#CD75AF",A900:"#932474"},Bde={50:"#e8f5e9",100:"#c8e6c9",200:"#a5d6a7",300:"#81c784",400:"#66bb6a",500:"#4caf50",600:"#43a047",700:"#388e3c",800:"#2e7d32",900:"#1b5e20",A100:"#b9f6ca",A200:"#69f0ae",A400:"#00e676",A700:"#00c853"},zde={50:"#fafafa",100:"#f5f5f5",200:"#eeeeee",300:"#e0e0e0",400:"#bdbdbd",500:"#9e9e9e",600:"#757575",700:"#616161",800:"#424242",900:"#212121",A100:"#f5f5f5",A200:"#eeeeee",A400:"#bdbdbd",A700:"#616161"},Hde={50:"#e1f5fe",100:"#b3e5fc",200:"#81d4fa",300:"#4fc3f7",400:"#29b6f6",500:"#03a9f4",600:"#039be5",700:"#0288d1",800:"#0277bd",900:"#01579b",A100:"#80d8ff",A200:"#40c4ff",A400:"#00b0ff",A700:"#0091ea"},Wde={50:"#f1f8e9",100:"#dcedc8",200:"#c5e1a5",300:"#aed581",400:"#9ccc65",500:"#8bc34a",600:"#7cb342",700:"#689f38",800:"#558b2f",900:"#33691e",A100:"#ccff90",A200:"#b2ff59",A400:"#76ff03",A700:"#64dd17"},Ude={50:"#f9fbe7",100:"#f0f4c3",200:"#e6ee9c",300:"#dce775",400:"#d4e157",500:"#cddc39",600:"#c0ca33",700:"#afb42b",800:"#9e9d24",900:"#827717",A100:"#f4ff81",A200:"#eeff41",A400:"#c6ff00",A700:"#aeea00"},Vde={50:"#fff3e0",100:"#ffe0b2",200:"#ffcc80",300:"#ffb74d",400:"#ffa726",500:"#ff9800",600:"#fb8c00",700:"#f57c00",800:"#ef6c00",900:"#e65100",A100:"#ffd180",A200:"#ffab40",A400:"#ff9100",A700:"#ff6d00"},Gde={50:"#fce4ec",100:"#f8bbd0",200:"#f48fb1",300:"#f06292",400:"#ec407a",500:"#e91e63",600:"#d81b60",700:"#c2185b",800:"#CD75AF",900:"#932474",A100:"#ff80ab",A200:"#ff4081",A400:"#f50057",A700:"#c51162"},qde={50:"#f3e5f5",100:"#e1bee7",200:"#ce93d8",300:"#ba68c8",400:"#ab47bc",500:"#9c27b0",600:"#8e24aa",700:"#7b1fa2",800:"#6a1b9a",900:"#4a148c",A100:"#ea80fc",A200:"#e040fb",A400:"#d500f9",A700:"#aa00ff"},Yde={50:"#ffebee",100:"#ffcdd2",200:"#ef9a9a",300:"#e57373",400:"#ef5350",500:"#f44336",600:"#e53935",700:"#d32f2f",800:"#c62828",900:"#b71c1c",A100:"#ff8a80",A200:"#ff5252",A400:"#ff1744",A700:"#d50000"},Zde={50:"#e0f2f1",100:"#b2dfdb",200:"#80cbc4",300:"#4db6ac",400:"#26a69a",500:"#009688",600:"#00897b",700:"#00796b",800:"#00695c",900:"#004d40",A100:"#a7ffeb",A200:"#64ffda",A400:"#1de9b6",A700:"#00bfa5"},Kde={50:"#fffde7",100:"#fff9c4",200:"#fff59d",300:"#fff176",400:"#ffee58",500:"#ffeb3b",600:"#fdd835",700:"#fbc02d",800:"#f9a825",900:"#f57f17",A100:"#ffff8d",A200:"#ffff00",A400:"#ffea00",A700:"#ffd600"};let Xde=Rde;window.changeTheme=e=>{Xde=r[e]};const Qde=(0,np.A)({palette:{primary:{main:Xde[500],theme:Xde},secondary:{main:Lde[500],theme:Lde},customClr:{bp:"#3f51b5",glucose:"#AF9300",others:"#AF9300",pulse:"#B94FBB",fastingBg:"#DCEBF0",fastingText:"#167B97",nonfastingBg:"#E2E4F2",nonfastingText:"#3B49A6",fastingBar:"#CD75AF",nonfastingBar:"#932474"},amber:Dde,blue:Nde,blueGrey:Lde,brown:Ide,cyan:Fde,deepPurple:$de,green:Bde,grey:zde,lightBlue:Hde,lightGreen:Wde,lime:Ude,orange:Vde,pink:Gde,purple:qde,red:Yde,teal:Zde,yellow:Kde},typography:{fontFamily:['"Quicksand", sans-serif'].join(",")},components:{MuiDrawer:{styleOverrides:{paper:e=>{var t,n,r,i,o,a,s,l,c,d,u,p,h,m,f,g,v,x,y;let{theme:b}=e;return{backgroundColor:null===b||void 0===b||null===(t=b.palette)||void 0===t||null===(n=t.common)||void 0===n?void 0:n.white,color:b.palette.grey[800],"& .MuiSvgIcon-root":{color:b.palette.grey[800]},"& ul":{paddingTop:10,paddingBottom:20,overflow:"hidden",overflowY:"auto","& li":{padding:10,paddingTop:0,"& a, & div.MuiListItemButton-root":{backgroundColor:null===b||void 0===b||null===(r=b.palette)||void 0===r||null===(i=r.common)||void 0===i?void 0:i.white,borderRadius:2*(null===b||void 0===b||null===(o=b.shape)||void 0===o?void 0:o.borderRadius),boxShadow:"0px 4px 24px 10px rgba(0, 0, 0, 0.06)","&.Mui-selected":{color:null===b||void 0===b||null===(a=b.palette)||void 0===a||null===(s=a.common)||void 0===s?void 0:s.white,backgroundColor:null===b||void 0===b||null===(l=b.palette)||void 0===l||null===(c=l.primary)||void 0===c?void 0:c.main,"& .MuiSvgIcon-root":{color:null===b||void 0===b||null===(d=b.palette)||void 0===d||null===(u=d.common)||void 0===u?void 0:u.white},"&:hover":{backgroundColor:null===b||void 0===b||null===(p=b.palette)||void 0===p||null===(h=p.primary)||void 0===h?void 0:h.main}}},"& a":{"&:hover":{color:null===b||void 0===b||null===(m=b.palette)||void 0===m||null===(f=m.common)||void 0===f?void 0:f.white,backgroundColor:null===b||void 0===b||null===(g=b.palette)||void 0===g||null===(v=g.primary)||void 0===v?void 0:v.main,"& .MuiSvgIcon-root":{color:null===b||void 0===b||null===(x=b.palette)||void 0===x||null===(y=x.common)||void 0===y?void 0:y.white}}},"& div.patientHeader":{backgroundColor:Xde[100]}}}}}}},MuiAppBar:{styleOverrides:{root:e=>{var t,n;let{ownerState:r,theme:o}=e;return(0,i.A)({},"fixed"===r.position&&{boxShadow:"none",color:zde[900],backgroundColor:null===o||void 0===o||null===(t=o.palette)||void 0===t||null===(n=t.common)||void 0===n?void 0:n.white})}}},MuiToolbar:{styleOverrides:{root:e=>{var t;let{theme:n}=e;return{[null===n||void 0===n||null===(t=n.breakpoints)||void 0===t?void 0:t.up("md")]:{minHeight:80}}}}},MuiTableCell:{styleOverrides:{root:{whiteSpace:"nowrap"}}},MuiButton:{styleOverrides:{root:{textTransform:"capitalize"}}},MuiOutlinedInput:{styleOverrides:{root:e=>{var t;let{theme:n}=e;return{borderRadius:2*(null===n||void 0===n||null===(t=n.shape)||void 0===t?void 0:t.borderRadius)}}}},MuiTooltip:{defaultProps:{enterTouchDelay:0}}}}),Jde=[{name:"Page A",uv:4e3,pv:2400,cv:2100,amt:2400},{name:"Page B",uv:3e3,pv:1398,cv:2e3,amt:2210},{name:"Page C",uv:2e3,pv:9800,cv:5e3,amt:2290},{name:"Page D",uv:2780,pv:3908,cv:2500,amt:2e3},{name:"Page E",uv:1890,pv:4800,cv:2300,amt:2181},{name:"Page F",uv:2390,pv:3800,cv:4e3,amt:2500},{name:"Page G",uv:3490,pv:4300,cv:5e3,amt:2100}];function eue(){const e=[Qde.palette.deepPurple[500],Qde.palette.blue[500],Qde.palette.primary.main],t=Math.PI/180;return(0,qt.jsx)(w2,{width:"100%",height:"100%",children:(0,qt.jsxs)(Ode,{width:400,height:400,children:[(0,qt.jsx)(Mde,{data:[{name:"Male",value:3e3},{name:"Female",value:1200},{name:"Other",value:2400}],cx:"50%",cy:"50%",labelLine:!1,label:e=>{let{cx:n,cy:r,midAngle:i,innerRadius:o,outerRadius:a,percent:s}=e;const l=o+.5*(a-o),c=n+l*Math.cos(-i*t),d=r+l*Math.sin(-i*t);return(0,qt.jsx)("text",{x:c,y:d,fill:"white",textAnchor:c>n?"start":"end",dominantBaseline:"central",children:"".concat((100*s).toFixed(0),"%")})},outerRadius:120,fill:"#8884d8",dataKey:"value",children:Jde.map((t,n)=>(0,qt.jsx)(Cre,{fill:e[n%e.length]},"cell-".concat(n)))}),(0,qt.jsx)(w6,{}),(0,qt.jsx)(Q5,{})]})})}function tue(){const e=[Qde.palette.deepPurple[500],Qde.palette.blue[500],Qde.palette.primary.main,Qde.palette.blueGrey[500]],t=Math.PI/180;return(0,qt.jsx)(w2,{width:"100%",height:"100%",children:(0,qt.jsxs)(Ode,{width:400,height:400,children:[(0,qt.jsx)(Mde,{data:[{name:"40 yrs",value:3e3},{name:"50-60 yrs",value:1200},{name:"60-75 yrs",value:2400},{name:"75+ yrs",value:2e3}],cx:"50%",cy:"50%",labelLine:!1,label:e=>{let{cx:n,cy:r,midAngle:i,innerRadius:o,outerRadius:a,percent:s}=e;const l=o+.5*(a-o),c=n+l*Math.cos(-i*t),d=r+l*Math.sin(-i*t);return(0,qt.jsx)("text",{x:c,y:d,fill:"white",textAnchor:c>n?"start":"end",dominantBaseline:"central",children:"".concat((100*s).toFixed(0),"%")})},outerRadius:120,fill:"#8884d8",dataKey:"value",children:Jde.map((t,n)=>(0,qt.jsx)(Cre,{fill:e[n%e.length]},"cell-".concat(n)))}),(0,qt.jsx)(w6,{}),(0,qt.jsx)(Q5,{})]})})}eue.defaultProps={data:[]},tue.defaultProps={data:[]};const nue=["children","value","index"];function rue(e){const{children:t,value:n,index:r}=e,o=Ko(e,nue);return(0,qt.jsx)("div",(0,i.A)((0,i.A)({role:"tabpanel",hidden:n!==r,id:"simple-tabpanel-".concat(r),"aria-labelledby":"simple-tab-".concat(r)},o),{},{children:n===r&&t}))}function iue(e){return{id:"simple-tab-".concat(e),"aria-controls":"simple-tabpanel-".concat(e)}}function oue(e){let{populationbyCond:t,populationbyAge:n,order:r,orderBy:o,setOrder:a,setOrderBy:s,dataParameter:l,headCellsItemsPopCond:c,headCellsItemsPopAge:d,checkState:u,onCheck:p,isSelection:h,nodata:m,fetchPopulationList:f,pageDetails:g,Example:v}=e;const{t:x}=Vg(),y=so(),[b,j]=We.useState(0),[_,C]=We.useState(0);return(0,qt.jsxs)(op,{sx:{width:"100%"},children:[(0,qt.jsxs)(Ff,{container:!0,spacing:2.5,children:[(0,qt.jsx)(Ff,{item:!0,xs:12,md:4,lg:3,children:(0,qt.jsx)(yp,{elevation:0,sx:{p:2.5,bgcolor:"primary.theme.100",cursor:"pointer"},onClick:()=>y("".concat(ld.DOCTOR.PATIENT)),children:(0,qt.jsxs)(op,{sx:{display:"flex",alignItems:"center"},children:[(0,qt.jsx)(op,{sx:{display:"flex",p:1,bgcolor:"primary.theme.500",borderRadius:1},children:(0,qt.jsx)(wce.A,{fontSize:"large",sx:{color:"primary.theme.50"}})}),(0,qt.jsxs)(op,{sx:{flexGrow:1,ml:{xs:1.5,lg:2.5}},children:[(0,qt.jsx)(Cf,{variant:"h6",component:"h6",children:x("rpm_TotalPatient")}),(0,qt.jsx)(Cf,{variant:"body1",component:"p",fontWeight:500,children:"1500"})]})]})})}),(0,qt.jsx)(Ff,{item:!0,xs:12,md:4,lg:3,children:(0,qt.jsx)(yp,{elevation:0,sx:{p:2.5,bgcolor:"red.100",cursor:"pointer"},onClick:()=>y("".concat(ld.DOCTOR.PATIENT)),children:(0,qt.jsxs)(op,{sx:{display:"flex",alignItems:"center"},children:[(0,qt.jsx)(op,{sx:{display:"flex",p:1,bgcolor:"red.500",borderRadius:1},children:(0,qt.jsx)(Ece.A,{fontSize:"large",sx:{color:"red.50"}})}),(0,qt.jsxs)(op,{sx:{flexGrow:1,ml:{xs:1.5,lg:2.5}},children:[(0,qt.jsx)(Cf,{variant:"h6",component:"h6",children:x("rpm_AlertPatient")}),(0,qt.jsx)(Cf,{variant:"body1",component:"p",children:"50"})]})]})})}),(0,qt.jsx)(Ff,{item:!0,xs:12,md:4,lg:3,children:(0,qt.jsx)(yp,{elevation:0,sx:{p:2.5,bgcolor:"blueGrey.100",cursor:"pointer"},onClick:()=>y("".concat(ld.DOCTOR.PATIENT)),children:(0,qt.jsxs)(op,{sx:{display:"flex",alignItems:"center"},children:[(0,qt.jsx)(op,{sx:{display:"flex",p:1,bgcolor:"blueGrey.500",borderRadius:1},children:(0,qt.jsx)(Ace.A,{fontSize:"large",sx:{color:"blueGrey.50"}})}),(0,qt.jsxs)(op,{sx:{flexGrow:1,ml:{xs:1.5,lg:2.5}},children:[(0,qt.jsx)(Cf,{variant:"h6",component:"h6",children:x("rpm_NonActivePatient")}),(0,qt.jsx)(Cf,{variant:"body1",component:"p",fontWeight:500,children:"750"})]})]})})}),(0,qt.jsx)(Ff,{item:!0,xs:12,md:4,lg:3,children:(0,qt.jsx)(yp,{elevation:0,sx:{p:2.5,bgcolor:"deepPurple.100",cursor:"pointer"},onClick:()=>y("".concat(ld.DOCTOR.PATIENT)),children:(0,qt.jsxs)(op,{sx:{display:"flex",alignItems:"center"},children:[(0,qt.jsx)(op,{sx:{display:"flex",p:1,bgcolor:"deepPurple.500",borderRadius:1},children:(0,qt.jsx)(Sce.A,{fontSize:"large",sx:{color:"deepPurple.50"}})}),(0,qt.jsxs)(op,{sx:{flexGrow:1,ml:{xs:1.5,lg:2.5}},children:[(0,qt.jsx)(Cf,{variant:"h6",component:"h6",children:x("rpm_ActivePatient")}),(0,qt.jsx)(Cf,{variant:"body1",component:"p",fontWeight:500,children:"750"})]})]})})}),!1]}),(0,qt.jsxs)(Ff,{container:!0,spacing:2.5,sx:{mt:.01},children:[(0,qt.jsx)(Ff,{item:!0,xs:!0,md:6,children:(0,qt.jsxs)(yp,{variant:"outlined",children:[(0,qt.jsx)(op,{sx:{px:2.5,py:1.5,bgcolor:"primary.theme.50"},children:(0,qt.jsx)(Ff,{container:!0,spacing:2,alignItems:"center",children:(0,qt.jsx)(Ff,{item:!0,xs:12,sm:!0,children:(0,qt.jsx)(Cf,{variant:"h6",component:"h6",children:"Population by Gender"})})})}),(0,qt.jsx)(eg,{}),(0,qt.jsx)(op,{sx:{borderBottom:1,borderColor:"divider"},children:(0,qt.jsxs)(fV,{value:b,onChange:(e,t)=>{j(t)},"aria-label":"basic tabs example",children:[(0,qt.jsx)(zU,(0,i.A)({label:"Stats"},iue(0))),(0,qt.jsx)(zU,(0,i.A)({label:"List"},iue(1)))]})}),(0,qt.jsxs)(op,{sx:{p:2.5},children:[(0,qt.jsx)(rue,{value:b,index:0,children:(0,qt.jsx)(op,{sx:{height:"300px"},children:(0,qt.jsx)(eue,{})})}),(0,qt.jsx)(rue,{value:b,index:1,children:(0,qt.jsx)(UT,{order:r,orderBy:o,setOrder:a,setOrderBy:s,data:t,headCells:c,dataParameter:l,selected:u,setSelected:p,isSelection:h,noDataImage:m,fetchList:f,pageDetails:g,children:t.map(e=>(0,qt.jsxs)(cw,{sx:{"&:last-child td, &:last-child th":{border:0}},children:[(0,qt.jsx)(gw,{children:e.gender}),(0,qt.jsx)(gw,{children:e.population})]},e.id))})})]})]})}),(0,qt.jsx)(Ff,{item:!0,xs:!0,md:6,children:(0,qt.jsxs)(yp,{variant:"outlined",children:[(0,qt.jsx)(op,{sx:{px:2.5,py:1.5,bgcolor:"primary.theme.50"},children:(0,qt.jsx)(Ff,{container:!0,spacing:2,alignItems:"center",children:(0,qt.jsx)(Ff,{item:!0,xs:12,sm:!0,children:(0,qt.jsx)(Cf,{variant:"h6",component:"h6",children:"Population by Age Group"})})})}),(0,qt.jsx)(eg,{}),(0,qt.jsx)(op,{sx:{borderBottom:1,borderColor:"divider"},children:(0,qt.jsxs)(fV,{value:_,onChange:(e,t)=>{C(t)},"aria-label":"basic tabs example",children:[(0,qt.jsx)(zU,(0,i.A)({label:"Stats"},iue(0))),(0,qt.jsx)(zU,(0,i.A)({label:"List"},iue(1)))]})}),(0,qt.jsxs)(op,{sx:{p:2.5},children:[(0,qt.jsx)(rue,{value:_,index:0,children:(0,qt.jsx)(op,{sx:{height:"300px"},children:(0,qt.jsx)(tue,{})})}),(0,qt.jsx)(rue,{value:_,index:1,children:(0,qt.jsx)(UT,{order:r,orderBy:o,setOrder:a,setOrderBy:s,data:n,headCells:d,dataParameter:l,selected:u,setSelected:p,isSelection:h,noDataImage:m,fetchList:f,pageDetails:g,children:n.map(e=>(0,qt.jsxs)(cw,{sx:{"&:last-child td, &:last-child th":{border:0}},children:[(0,qt.jsx)(gw,{children:e.age_group}),(0,qt.jsx)(gw,{children:e.population})]},e.id))})})]})]})})]}),(0,qt.jsxs)(Ff,{container:!0,spacing:2,sx:{mt:3},children:[(0,qt.jsx)(Ff,{item:!0,xs:!0,md:6,children:(0,qt.jsxs)(yp,{variant:"outlined",children:[(0,qt.jsx)(op,{sx:{px:2.5,py:1.5,bgcolor:"primary.theme.50"},children:(0,qt.jsx)(Cf,{variant:"h6",component:"h6",children:"Population by Condition"})}),(0,qt.jsx)(eg,{}),(0,qt.jsx)(op,{sx:{p:2.5},children:(0,qt.jsxs)(Ff,{container:!0,spacing:2,children:[(0,qt.jsx)(Ff,{item:!0,xs:12,md:4,children:(0,qt.jsxs)(op,{sx:{display:"flex",alignItems:"center"},children:[(0,qt.jsx)(op,{sx:{display:"flex",p:1,bgcolor:"primary.theme.50",borderRadius:1},children:(0,qt.jsx)(Tce.A,{fontSize:"large",sx:{color:"primary.theme.300"}})}),(0,qt.jsxs)(op,{sx:{flexGrow:1,ml:2},children:[(0,qt.jsx)(Cf,{variant:"body2",component:"p",fontWeight:500,children:x("rpm_bp")}),(0,qt.jsx)(Cf,{variant:"h6",component:"h6",children:"3000"})]})]})}),(0,qt.jsx)(Ff,{item:!0,xs:12,md:4,children:(0,qt.jsxs)(op,{sx:{display:"flex",alignItems:"center"},children:[(0,qt.jsx)(op,{sx:{display:"flex",p:1,bgcolor:"primary.theme.50",borderRadius:1},children:(0,qt.jsx)(Tce.A,{fontSize:"large",sx:{color:"primary.theme.300"}})}),(0,qt.jsxs)(op,{sx:{flexGrow:1,ml:2},children:[(0,qt.jsx)(Cf,{variant:"body2",component:"p",fontWeight:500,children:"Diabetes"}),(0,qt.jsx)(Cf,{variant:"h6",component:"h6",children:"1200"})]})]})}),(0,qt.jsx)(Ff,{item:!0,xs:12,md:4,children:(0,qt.jsxs)(op,{sx:{display:"flex",alignItems:"center"},children:[(0,qt.jsx)(op,{sx:{display:"flex",p:1,bgcolor:"primary.theme.50",borderRadius:1},children:(0,qt.jsx)(Tce.A,{fontSize:"large",sx:{color:"primary.theme.300"}})}),(0,qt.jsxs)(op,{sx:{flexGrow:1,ml:2},children:[(0,qt.jsx)(Cf,{variant:"body2",component:"p",fontWeight:500,children:"Obesity"}),(0,qt.jsx)(Cf,{variant:"h6",component:"h6",children:"2400"})]})]})})]})})]})}),(0,qt.jsx)(Ff,{item:!0,xs:!0,md:6,children:(0,qt.jsxs)(yp,{variant:"outlined",children:[(0,qt.jsx)(op,{sx:{px:2.5,py:1.5,bgcolor:"primary.theme.50"},children:(0,qt.jsx)(Cf,{variant:"h6",component:"h6",children:"Population by Age Group"})}),(0,qt.jsx)(eg,{}),(0,qt.jsx)(op,{sx:{p:2.5},children:(0,qt.jsxs)(Ff,{container:!0,spacing:2,children:[(0,qt.jsx)(Ff,{item:!0,xs:12,md:6,children:(0,qt.jsxs)(op,{sx:{display:"flex",alignItems:"center"},children:[(0,qt.jsx)(op,{sx:{display:"flex",p:1,bgcolor:"primary.theme.50",borderRadius:1},children:(0,qt.jsx)(kce.A,{fontSize:"large",sx:{color:"primary.theme.300"}})}),(0,qt.jsxs)(op,{sx:{flexGrow:1,ml:2},children:[(0,qt.jsx)(Cf,{variant:"body2",component:"p",fontWeight:500,children:"40"}),(0,qt.jsx)(Cf,{variant:"h6",component:"h6",children:"3000"})]})]})}),(0,qt.jsx)(Ff,{item:!0,xs:12,md:6,children:(0,qt.jsxs)(op,{sx:{display:"flex",alignItems:"center"},children:[(0,qt.jsx)(op,{sx:{display:"flex",p:1,bgcolor:"primary.theme.50",borderRadius:1},children:(0,qt.jsx)(kce.A,{fontSize:"large",sx:{color:"primary.theme.300"}})}),(0,qt.jsxs)(op,{sx:{flexGrow:1,ml:2},children:[(0,qt.jsx)(Cf,{variant:"body2",component:"p",fontWeight:500,children:"50-60"}),(0,qt.jsx)(Cf,{variant:"h6",component:"h6",children:"1200"})]})]})}),(0,qt.jsx)(Ff,{item:!0,xs:12,md:6,children:(0,qt.jsxs)(op,{sx:{display:"flex",alignItems:"center"},children:[(0,qt.jsx)(op,{sx:{display:"flex",p:1,bgcolor:"primary.theme.50",borderRadius:1},children:(0,qt.jsx)(kce.A,{fontSize:"large",sx:{color:"primary.theme.300"}})}),(0,qt.jsxs)(op,{sx:{flexGrow:1,ml:2},children:[(0,qt.jsx)(Cf,{variant:"body2",component:"p",fontWeight:500,children:"60-75"}),(0,qt.jsx)(Cf,{variant:"h6",component:"h6",children:"2400"})]})]})}),(0,qt.jsx)(Ff,{item:!0,xs:12,md:6,children:(0,qt.jsxs)(op,{sx:{display:"flex",alignItems:"center"},children:[(0,qt.jsx)(op,{sx:{display:"flex",p:1,bgcolor:"primary.theme.50",borderRadius:1},children:(0,qt.jsx)(kce.A,{fontSize:"large",sx:{color:"primary.theme.300"}})}),(0,qt.jsxs)(op,{sx:{flexGrow:1,ml:2},children:[(0,qt.jsx)(Cf,{variant:"body2",component:"p",fontWeight:500,children:"75+"}),(0,qt.jsx)(Cf,{variant:"h6",component:"h6",children:"2400"})]})]})}),(0,qt.jsx)(Ff,{item:!0,xs:!0,children:(0,qt.jsx)(op,{sx:{height:"250px"},children:(0,qt.jsx)(tue,{})})})]})})]})}),(0,qt.jsx)(Ff,{item:!0,xs:!0,md:12,children:(0,qt.jsx)(yp,{variant:"outlined",sx:{p:3},children:(0,qt.jsx)(v,{})})})]})]})}oue.defaultProps={headCellsItemsPopCond:[],headCellsItemsOxy:[],pageDetails:{},order:"",orderBy:"",setOrder:()=>{},setOrderBy:()=>{},dataParameter:"",checkState:"",onCheck:()=>{},isSelection:"",nodata:"",populationbyCond:{},patientOxyReport:{},fetchPopulationList:()=>{}};const aue=["content"],sue=[{id:"#p245890",gender:"Male",population:"3000",variant:"gender"},{id:"#p245891",gender:"Female",population:"1200",variant:"gender"},{id:"#p245892",gender:"Other",population:"2400",variant:"gender"},{id:"#p245893",age_group:"40 yrs",population:"3000",variant:"age"},{id:"#p245894",age_group:"50-60 yrs",population:"1200",variant:"age"},{id:"#p245895",age_group:"60-75 yrs",population:"2400",variant:"age"},{id:"#p245896",age_group:"75+ yrs",population:"2800",variant:"age"}];const lue=function(){const e=Nt(),{t:t}=Vg(),[n,r]=(0,We.useState)("desc"),[o,a]=(0,We.useState)("updated_at"),[s,l]=We.useState([]),[c,d]=We.useState([]),[u,p]=(0,We.useState)([]),[h,m]=(0,We.useState)((0,i.A)({},dd));return t("rpm_Gender"),t("rpm_Population"),t("rpm_AgeGroup"),t("rpm_Population"),We.useEffect(()=>{(async()=>{const e={content:sue,from:1,last_page:1,per_page:30,to:3,total:3,current_page:1}||{},{content:t}=e,n=Ko(e,aue),r=t.filter(e=>"gender"===e.variant),o=t.filter(e=>"age"===e.variant);l(r),d(o),m(e=>(0,i.A)((0,i.A)({},e),{},{last_page:n.last_page,current_page:n.current_page,from:n.from,per_page:n.per_page,to:n.to,total:n.total}))})();e(NC({activeMenuItem:"dashboard",heading:""}))},[]),!1};const cue=function(e){var t,n,r,i,o,a,s,l,c,d,u,p,h,m,f,g,v,x,y,b,j,_,C,w,S,A,k,T,E;let{user:M}=e;const{t:O}=Vg(),R=so(),P=[{name:O("rpm_Profile"),url:""}];return(0,qt.jsxs)(op,{sx:{width:"100%"},children:[(0,qt.jsx)(op,{mb:2.5,children:(0,qt.jsx)(BH,{labels:P})}),(0,qt.jsx)(Ff,{container:!0,spacing:2,children:(0,qt.jsx)(Ff,{item:!0,xs:12,md:12,lg:12,children:(0,qt.jsxs)(yH,{variant:"outlined",children:[(0,qt.jsx)(nW,{sx:{py:1.5,bgcolor:"primary.theme.50"},title:(0,qt.jsx)(qt.Fragment,{children:(0,qt.jsxs)(Ff,{container:!0,spacing:2,alignItems:"center",children:[(0,qt.jsx)(Ff,{item:!0,xs:!0,children:(0,qt.jsx)(Cf,{variant:"h6",component:"h6",children:O("rpm_Profile")})}),(0,qt.jsx)(Ff,{item:!0,className:"profile-tour-step0",children:(0,qt.jsx)(xh,{color:"primary",variant:"contained",disableElevation:!0,onClick:()=>R("edit/".concat(null===M||void 0===M?void 0:M.id)),children:O("rpm_EditProfile")})})]})})}),(0,qt.jsx)(wH,{children:(0,qt.jsxs)(Ff,{container:!0,spacing:2,alignItems:"flex-start",children:[(0,qt.jsx)(Ff,{item:!0,xs:12,md:12,lg:4,children:(0,qt.jsxs)(op,{sx:{px:2,py:{xs:4,md:10},bgcolor:"primary.theme.50",textAlign:"center",borderRadius:1},children:[(0,qt.jsx)(op,{mb:1,children:(0,qt.jsx)(Ny,{sx:{bgcolor:"secondary.main",width:140,height:140,fontSize:64,mx:"auto"},children:null===M||void 0===M||null===(t=M.first_name)||void 0===t||null===(n=t.charAt(0))||void 0===n?void 0:n.toLocaleUpperCase()})}),ta()(M)?(0,qt.jsx)(lS,{width:150,sx:{mx:"auto"}}):(0,qt.jsx)(Cf,{variant:"h6",component:"h6",children:(null===M||void 0===M?void 0:M.first_name)+" "+(null===M||void 0===M?void 0:M.last_name)}),ta()(M)?(0,qt.jsx)(lS,{width:150,sx:{mx:"auto"}}):(0,qt.jsx)(Cf,{variant:"body2",component:"p",children:null===M||void 0===M?void 0:M.email}),(0,qt.jsx)(pE,{sx:{mt:3},flexDirection:"row",gap:1,alignItems:"center",justifyContent:"center",children:ta()(M)?(0,qt.jsx)(lS,{width:60,height:48}):null!==M&&void 0!==M&&M.active?(0,qt.jsx)(dM,{severity:"success",icon:!1,sx:e=>({py:0,px:1,display:"inline-flex",fontSize:e.spacing(1.75),"& .MuiAlert-message":{p:e.spacing(1)}}),children:(0,qt.jsx)("strong",{children:"Active"})}):(0,qt.jsx)(dM,{severity:"error",icon:!1,sx:e=>({py:0,px:1,display:"inline-flex",fontSize:e.spacing(1.75),"& .MuiAlert-message":{p:e.spacing(1)}}),children:(0,qt.jsx)("strong",{children:"Inactive"})})})]})}),(0,qt.jsxs)(Ff,{item:!0,xs:12,lg:8,container:!0,spacing:4,children:[(0,qt.jsx)(Ff,{item:!0,xs:12,children:(0,qt.jsx)(op,{sx:{p:1.5,bgcolor:"primary.theme.100",borderRadius:1},children:(0,qt.jsx)(Cf,{variant:"body1",component:"p",fontWeight:"h6.fontWeight",children:O("rpm_GeneralInformation")})})}),(0,qt.jsx)(Ff,{item:!0,xs:12,md:4,children:(0,qt.jsxs)(pE,{flexDirection:"column",gap:{xs:1,lg:2},children:[(0,qt.jsx)(Cf,{variant:"body2",component:"p",fontWeight:"h6.fontWeight",sx:{flex:.4},children:"First Name"}),(0,qt.jsx)(op,{sx:{flex:.6},children:ta()(M)?(0,qt.jsx)(lS,{}):(0,qt.jsx)(Cf,{variant:"body1",component:"p",color:"primary",children:null===M||void 0===M?void 0:M.first_name})})]})}),(0,qt.jsx)(Ff,{item:!0,xs:12,md:4,children:(0,qt.jsxs)(pE,{flexDirection:"column",gap:{xs:1,lg:2},children:[(0,qt.jsx)(Cf,{variant:"body2",component:"p",fontWeight:"h6.fontWeight",sx:{flex:.4},children:"Last Name"}),(0,qt.jsx)(op,{sx:{flex:.6},children:ta()(M)?(0,qt.jsx)(lS,{}):(0,qt.jsx)(Cf,{variant:"body1",component:"p",color:"primary",children:null===M||void 0===M?void 0:M.last_name})})]})}),(0,qt.jsx)(Ff,{item:!0,xs:12,md:4,children:(0,qt.jsxs)(pE,{flexDirection:"column",gap:{xs:1,lg:2},children:[(0,qt.jsx)(Cf,{variant:"body2",component:"p",fontWeight:"h6.fontWeight",sx:{flex:.4},children:"Email"}),(0,qt.jsx)(op,{sx:{flex:.6},children:ta()(M)?(0,qt.jsx)(lS,{}):(0,qt.jsx)(Cf,{variant:"body1",component:"p",color:"primary",children:null===M||void 0===M?void 0:M.email})})]})}),(0,qt.jsx)(Ff,{item:!0,xs:12,md:4,children:(0,qt.jsxs)(pE,{flexDirection:"column",gap:{xs:1,lg:2},children:[(0,qt.jsx)(Cf,{variant:"body2",component:"p",fontWeight:"h6.fontWeight",sx:{flex:.4},children:"Mobile"}),(0,qt.jsx)(op,{sx:{flex:.6},children:ta()(M)?(0,qt.jsx)(lS,{}):(0,qt.jsx)(Cf,{variant:"body1",component:"p",color:"primary",children:null===M||void 0===M||null===(r=M.attributes)||void 0===r?void 0:r.mobile})})]})}),(0,qt.jsx)(Ff,{item:!0,xs:12,md:4,children:(0,qt.jsxs)(pE,{flexDirection:"column",gap:{xs:1,lg:2},children:[(0,qt.jsx)(Cf,{variant:"body2",component:"p",fontWeight:"h6.fontWeight",sx:{flex:.4},children:"DOB"}),(0,qt.jsx)(op,{sx:{flex:.6},children:ta()(M)?(0,qt.jsx)(lS,{}):(0,qt.jsx)(Cf,{variant:"body1",component:"p",color:"primary",children:null!==M&&void 0!==M&&null!==(i=M.attributes)&&void 0!==i&&i.dob?sa()(null===M||void 0===M||null===(o=M.attributes)||void 0===o?void 0:o.dob).format("DD/MM/YYYY"):""})})]})}),(0,qt.jsx)(Ff,{item:!0,xs:12,md:4,children:(0,qt.jsxs)(pE,{flexDirection:"column",gap:{xs:1,lg:2},children:[(0,qt.jsx)(Cf,{variant:"body2",component:"p",fontWeight:"h6.fontWeight",sx:{flex:.4},children:"Gender"}),(0,qt.jsx)(op,{sx:{flex:.6},children:ta()(M)?(0,qt.jsx)(lS,{}):(0,qt.jsx)(Cf,{variant:"body1",component:"p",color:"primary",children:null===M||void 0===M||null===(a=M.attributes)||void 0===a?void 0:a.gender})})]})}),(0,qt.jsx)(Ff,{item:!0,xs:12,md:4,children:(0,qt.jsxs)(pE,{flexDirection:"column",gap:{xs:1,lg:2},children:[(0,qt.jsx)(Cf,{variant:"body2",component:"p",fontWeight:"h6.fontWeight",sx:{flex:.4},children:"Created Date"}),(0,qt.jsx)(op,{sx:{flex:.6},children:ta()(M)?(0,qt.jsx)(lS,{}):(0,qt.jsx)(Cf,{variant:"body1",component:"p",color:"primary",children:sa()(null===M||void 0===M?void 0:M.created_at).format("DD MMM YYYY hh:mm A")})})]})}),(0,qt.jsx)(Ff,{item:!0,xs:12,children:(0,qt.jsx)(op,{sx:{p:1.5,bgcolor:"primary.theme.100",borderRadius:1},children:(0,qt.jsx)(Cf,{variant:"body1",component:"p",fontWeight:"h6.fontWeight",children:O("rpm_ProfessionalDetail")})})}),(0,qt.jsx)(Ff,{item:!0,xs:12,md:4,children:(0,qt.jsxs)(pE,{flexDirection:"column",gap:{xs:1,lg:2},children:[(0,qt.jsx)(Cf,{variant:"body2",component:"p",fontWeight:"h6.fontWeight",sx:{flex:.4},children:O("rpm_Speciality")}),(0,qt.jsx)(op,{sx:{flex:.6},children:ta()(M)?(0,qt.jsx)(lS,{}):(0,qt.jsx)(Cf,{variant:"body1",component:"p",color:"primary",children:null!==M&&void 0!==M&&null!==(s=M.attributes)&&void 0!==s&&s.speciality?null===M||void 0===M||null===(l=M.attributes)||void 0===l?void 0:l.speciality:"NA"})})]})}),(0,qt.jsx)(Ff,{item:!0,xs:12,md:4,children:(0,qt.jsxs)(pE,{flexDirection:"column",gap:{xs:1,lg:2},children:[(0,qt.jsx)(Cf,{variant:"body2",component:"p",fontWeight:"h6.fontWeight",sx:{flex:.4},children:O("rpm_Experience")}),(0,qt.jsx)(op,{sx:{flex:.6},children:ta()(M)?(0,qt.jsx)(lS,{}):(0,qt.jsx)(Cf,{variant:"body1",component:"p",color:"primary",children:null!==M&&void 0!==M&&null!==(c=M.attributes)&&void 0!==c&&c.experience?null===M||void 0===M||null===(d=M.attributes)||void 0===d?void 0:d.experience:"NA"})})]})}),(0,qt.jsx)(Ff,{item:!0,xs:12,md:4,children:(0,qt.jsxs)(pE,{flexDirection:"column",gap:{xs:1,lg:2},children:[(0,qt.jsx)(Cf,{variant:"body2",component:"p",fontWeight:"h6.fontWeight",sx:{flex:.4},children:O("rpm_ConsultingLanguage")}),(0,qt.jsx)(op,{sx:{flex:.6},children:ta()(M)?(0,qt.jsx)(lS,{}):(0,qt.jsx)(Cf,{variant:"body1",component:"p",color:"primary",children:null!==M&&void 0!==M&&null!==(u=M.attributes)&&void 0!==u&&u.consulting_language?null===M||void 0===M||null===(p=M.attributes)||void 0===p?void 0:p.consulting_language:"NA"})})]})}),(0,qt.jsx)(Ff,{item:!0,xs:12,md:4,children:(0,qt.jsxs)(pE,{flexDirection:"column",gap:{xs:1,lg:2},children:[(0,qt.jsx)(Cf,{variant:"body2",component:"p",fontWeight:"h6.fontWeight",sx:{flex:.4},children:O("rpm_ProfessionalBio")}),(0,qt.jsx)(op,{sx:{flex:.6},children:ta()(M)?(0,qt.jsx)(lS,{}):(0,qt.jsx)(Cf,{variant:"body1",component:"p",color:"primary",sx:{wordBreak:"break-all"},children:null!==M&&void 0!==M&&null!==(h=M.attributes)&&void 0!==h&&h.professional_bio?null===M||void 0===M||null===(m=M.attributes)||void 0===m?void 0:m.professional_bio:"NA"})})]})}),(0,qt.jsx)(Ff,{item:!0,xs:12,md:4,children:(0,qt.jsxs)(pE,{flexDirection:"column",gap:{xs:1,lg:2},children:[(0,qt.jsx)(Cf,{variant:"body2",component:"p",fontWeight:"h6.fontWeight",sx:{flex:.4},children:O("rpm_HighestQualifications")}),(0,qt.jsx)(op,{sx:{flex:.6},children:ta()(M)?(0,qt.jsx)(lS,{}):(0,qt.jsx)(Cf,{variant:"body1",component:"p",color:"primary",children:null!==M&&void 0!==M&&null!==(f=M.attributes)&&void 0!==f&&f.qualification?null===M||void 0===M||null===(g=M.attributes)||void 0===g?void 0:g.qualification:"NA"})})]})}),(0,qt.jsx)(Ff,{item:!0,xs:12,md:4,children:(0,qt.jsxs)(pE,{flexDirection:"column",gap:{xs:1,lg:2},children:[(0,qt.jsx)(Cf,{variant:"body1",component:"p",fontWeight:"h6.fontWeight",sx:{flex:.4},children:"Registration Number"}),(0,qt.jsx)(op,{sx:{flex:.6},children:ta()(M)?(0,qt.jsx)(lS,{}):(0,qt.jsx)(Cf,{variant:"body2",component:"p",color:"primary",children:(null===M||void 0===M||null===(v=M.attributes)||void 0===v?void 0:v.registration)||"NA"})})]})}),(0,qt.jsx)(Ff,{item:!0,xs:12,children:(0,qt.jsx)(op,{sx:{p:1.5,bgcolor:"primary.theme.100",borderRadius:1},children:(0,qt.jsx)(Cf,{variant:"body1",component:"p",fontWeight:"h6.fontWeight",children:O("rpm_AddressInformation")})})}),(0,qt.jsx)(Ff,{item:!0,xs:12,md:4,lg:3,children:(0,qt.jsxs)(pE,{flexDirection:"column",gap:{xs:1,lg:2},children:[(0,qt.jsx)(Cf,{variant:"body2",component:"p",fontWeight:"h6.fontWeight",sx:{flex:.4},children:O("rpm_Address1")}),(0,qt.jsx)(op,{sx:{flex:.6},children:ta()(M)?(0,qt.jsx)(lS,{}):(0,qt.jsx)(Cf,{variant:"body1",component:"p",color:"primary",children:null!==M&&void 0!==M&&null!==(x=M.attributes)&&void 0!==x&&x.adr_address1?null===M||void 0===M||null===(y=M.attributes)||void 0===y?void 0:y.adr_address1:"NA"})})]})}),(0,qt.jsx)(Ff,{item:!0,xs:12,md:4,lg:3,children:(0,qt.jsxs)(pE,{flexDirection:"column",gap:{xs:1,lg:2},children:[(0,qt.jsx)(Cf,{variant:"body2",component:"p",fontWeight:"h6.fontWeight",sx:{flex:.4},children:O("rpm_Address2")}),(0,qt.jsx)(op,{sx:{flex:.6},children:ta()(M)?(0,qt.jsx)(lS,{}):(0,qt.jsx)(Cf,{variant:"body1",component:"p",color:"primary",children:null!==M&&void 0!==M&&null!==(b=M.attributes)&&void 0!==b&&b.adr_address2?null===M||void 0===M||null===(j=M.attributes)||void 0===j?void 0:j.adr_address2:"NA"})})]})}),(0,qt.jsx)(Ff,{item:!0,xs:12,md:4,lg:3,children:(0,qt.jsxs)(pE,{flexDirection:"column",gap:{xs:1,lg:2},children:[(0,qt.jsx)(Cf,{variant:"body2",component:"p",fontWeight:"h6.fontWeight",sx:{flex:.4},children:O("rpm_Country")}),(0,qt.jsx)(op,{sx:{flex:.6},children:ta()(M)?(0,qt.jsx)(lS,{}):(0,qt.jsx)(Cf,{variant:"body1",component:"p",color:"primary",children:null!==M&&void 0!==M&&null!==(_=M.attributes)&&void 0!==_&&_.adr_country_name?null===M||void 0===M||null===(C=M.attributes)||void 0===C?void 0:C.adr_country_name:"NA"})})]})}),(0,qt.jsx)(Ff,{item:!0,xs:12,md:4,lg:3,children:(0,qt.jsxs)(pE,{flexDirection:"column",gap:{xs:1,lg:2},children:[(0,qt.jsx)(Cf,{variant:"body2",component:"p",fontWeight:"h6.fontWeight",sx:{flex:.4},children:O("rpm_State")}),(0,qt.jsx)(op,{sx:{flex:.6},children:ta()(M)?(0,qt.jsx)(lS,{}):(0,qt.jsx)(Cf,{variant:"body1",component:"p",color:"primary",children:null!==M&&void 0!==M&&null!==(w=M.attributes)&&void 0!==w&&w.adr_state_name?null===M||void 0===M||null===(S=M.attributes)||void 0===S?void 0:S.adr_state_name:"NA"})})]})}),(0,qt.jsx)(Ff,{item:!0,xs:12,md:4,lg:3,children:(0,qt.jsxs)(pE,{flexDirection:"column",gap:{xs:1,lg:2},children:[(0,qt.jsx)(Cf,{variant:"body2",component:"p",fontWeight:"h6.fontWeight",sx:{flex:.4},children:O("rpm_City")}),(0,qt.jsx)(op,{sx:{flex:.6},children:ta()(M)?(0,qt.jsx)(lS,{}):(0,qt.jsx)(Cf,{variant:"body1",component:"p",color:"primary",children:null!==M&&void 0!==M&&null!==(A=M.attributes)&&void 0!==A&&A.adr_city?null===M||void 0===M||null===(k=M.attributes)||void 0===k?void 0:k.adr_city:"NA"})})]})}),(0,qt.jsx)(Ff,{item:!0,xs:12,md:4,lg:3,children:(0,qt.jsxs)(pE,{flexDirection:"column",gap:{xs:1,lg:2},children:[(0,qt.jsx)(Cf,{variant:"body2",component:"p",fontWeight:"h6.fontWeight",sx:{flex:.4},children:O("rpm_Pin")}),(0,qt.jsx)(op,{sx:{flex:.6},children:ta()(M)?(0,qt.jsx)(lS,{}):(0,qt.jsx)(Cf,{variant:"body1",component:"p",color:"primary",children:null!==M&&void 0!==M&&null!==(T=M.attributes)&&void 0!==T&&T.adr_zipcode?null===M||void 0===M||null===(E=M.attributes)||void 0===E?void 0:E.adr_zipcode:"NA"})})]})})]})]})})]})})})]})};const due=function(){var e;const{userData:t}=(0,We.useContext)(lv),n=null===t||void 0===t||null===(e=t.user_principal)||void 0===e?void 0:e.id,r=Nt(),{enqueueSnackbar:i}=hi(),[o,a]=We.useState({});return We.useEffect(()=>{cs(t)||(async()=>{try{const{data:e}=await r(Xg(n));a(e)}catch(e){i(e.message,{variant:"error"})}})()},[t]),We.useEffect(()=>{r(NC({activeMenuItem:"profile",heading:{}}))},[]),(0,qt.jsx)(qt.Fragment,{children:(0,qt.jsx)(cue,{user:o})})},uue=(e,t,n,r)=>async o=>{o(na(!0));const a="".concat(_a,"mds/").concat(t,"/country?per_page=10000&page=1"),s="".concat(_a,"api/countries?sort_by=").concat(e.sort_by||"","&sort_order=").concat(e.sort_order||"","&per_page=10000&page=").concat(e.page||"","&q=").concat(e.q||""),l="".concat(_a,"mds/").concat(t,"/country/").concat(e.countryCode,"/state?per_page=10000&page=1"),c="".concat(_a,"api/countries/").concat(e.countryCode,"/state?sort_by=").concat(e.sort_by||"","&sort_order=").concat(e.sort_order||"","&per_page=10000&page=").concat(e.page||"","&q=").concat(e.q||"");try{let[e,t,r,o]=await Promise.all([Iu(s),Iu(a),Iu(c),Iu(l)]);e=oa()(e,"data",{}),t=oa()(t,"data.content",[]);const d=t.map(e=>e.isoCode),u=oa()(t.find(e=>e.isDefaultCountry),"isoCode",""),p=oa()(t.find(e=>e.isDefaultPhonePrefix),"isoCode",""),h=oa()(e,"content",[]).map(e=>(0,i.A)((0,i.A)({},e),{},{id:e.isoCode,isEnabled:d.includes(e.isoCode)}));Ra()(e,"content",h),r=oa()(r,"data",{}),o=oa()(o,"data.content",[]);const m=o.map(e=>e.isoCode),f=oa()(r,"content",[]).map(e=>(0,i.A)((0,i.A)({},e),{},{id:e.isoCode,isEnabled:m.includes(e.isoCode)}));Ra()(r,"content",f),"function"===typeof n&&n({countries:e,states:r,defaultCountryCode:u,defaultPhoneCode:p})}catch(d){"function"!==typeof r||[404,403,401,408,409,500].includes(d.response.status)||r(d)}finally{o(na(!1))}},pue=(e,t,n,r)=>async o=>{o(na(!0));const a="".concat(_a,"mds/").concat(t,"/country?per_page=10000&page=1"),s="".concat(_a,"api/countries?sort_by=").concat(e.sort_by||"","&sort_order=").concat(e.sort_order||"","&per_page=10000&page=").concat(e.page||"","&q=").concat(e.q||"");try{let[e,t]=await Promise.all([Iu(s),Iu(a)]);e=oa()(e,"data",{}),t=oa()(t,"data.content",[]);const r=t.map(e=>e.isoCode),o=oa()(t.find(e=>e.isDefaultCountry),"isoCode",""),l=oa()(t.find(e=>e.isDefaultPhonePrefix),"isoCode",""),c=oa()(e,"content",[]).map(e=>(0,i.A)((0,i.A)({},e),{},{id:e.isoCode,isEnabled:r.includes(e.isoCode)}));Ra()(e,"content",c),"function"===typeof n&&n({countries:e,defaultCountryCode:o,defaultPhoneCode:l})}catch(c){var l;"function"!==typeof r||[404,403,401,408,409,500].includes(null===c||void 0===c||null===(l=c.response)||void 0===l?void 0:l.status)||r(c)}finally{o(na(!1))}},hue=(e,t,n,r,o)=>async a=>{a(na(!0));const s="".concat(_a,"mds/").concat(n,"/country/").concat(e,"/state?per_page=10000&page=1"),l="".concat(_a,"api/countries/").concat(e,"/state?sort_by=").concat(t.sort_by||"","&sort_order=").concat(t.sort_order||"","&per_page=10000&page=").concat(t.page||"","&q=").concat(t.q||"");try{let[e,t]=await Promise.all([Iu(l),Iu(s)]);e=oa()(e,"data",{}),t=oa()(t,"data.content",[]);const n=t.map(e=>e.isoCode),o=oa()(t.find(e=>e.isDefaultState),"isoCode",""),a=oa()(e,"content",[]).map(e=>(0,i.A)((0,i.A)({},e),{},{id:e.isoCode,isEnabled:n.includes(e.isoCode)}));Ra()(e,"content",a),"function"===typeof r&&r({states:e,defaultStateCode:o})}catch(c){"function"!==typeof o||[404,403,401,408,409,500].includes(c.response.status)||o(c)}finally{a(na(!1))}};function mue(e){const[t]=function(e){var t=Lz(),n=t.getFieldProps,r=t.getFieldMeta,i=t.getFieldHelpers,o=t.registerField,a=t.unregisterField,s=$z(e)?e:{name:e},l=s.name,c=s.validate;(0,We.useEffect)(function(){return l&&o(l,{validate:c}),function(){l&&a(l)}},[o,a,l,c]),l||pz(!1);var d=(0,We.useMemo)(function(){return i(l)},[i,l]);return[n(s),r(l),d]}(e.name);return(0,qt.jsx)(wE,{value:t.value,control:(0,qt.jsx)(Dw,(0,i.A)({inputProps:{"aria-label":"Keep Active"},checked:t.value,color:"primary",disabled:t.disabled},t)),label:e.label,labelPlacement:"end"})}mue.defaultProps={name:"",label:"",checked:!0,disabled:!1};const fue=mue;const gue=function(e){var t,n,r,o,a,s,l,c,d,u,p,h,m,f,g,v,x,y,b,j,_,C,w,S,A,k,T,E,M,O;let{user:R,editUser:P,showAdminDetails:D,countries:N}=e;const{t:L}=Vg(),I=so(),[F,$]=We.useState(null),B={active:!(null===R||void 0===R||!R.active)&&(null===R||void 0===R?void 0:R.active),first_name:null!==R&&void 0!==R&&R.first_name?null===R||void 0===R?void 0:R.first_name:"",last_name:null!==R&&void 0!==R&&R.last_name?null===R||void 0===R?void 0:R.last_name:"",email:null!==R&&void 0!==R&&R.email?null===R||void 0===R?void 0:R.email:"",mobile:null!==R&&void 0!==R&&R.phone_number?null===(t=cJ(R.phone_number))||void 0===t?void 0:t.nationalNumber:"",gender:null!==R&&void 0!==R&&null!==(n=R.attributes)&&void 0!==n&&n.gender?null===R||void 0===R||null===(r=R.attributes)||void 0===r?void 0:r.gender:"",dob:null!==R&&void 0!==R&&null!==(o=R.attributes)&&void 0!==o&&o.dob?null===R||void 0===R||null===(a=R.attributes)||void 0===a?void 0:a.dob:null,adr_address1:null!==R&&void 0!==R&&null!==(s=R.attributes)&&void 0!==s&&s.adr_address1?null===R||void 0===R||null===(l=R.attributes)||void 0===l?void 0:l.adr_address1:"",adr_address2:null!==R&&void 0!==R&&null!==(c=R.attributes)&&void 0!==c&&c.adr_address2?null===R||void 0===R||null===(d=R.attributes)||void 0===d?void 0:d.adr_address2:"",adr_country_name:null!==R&&void 0!==R&&null!==(u=R.attributes)&&void 0!==u&&u.adr_country_name?null===R||void 0===R||null===(p=R.attributes)||void 0===p?void 0:p.adr_country_name:"",adr_state_name:null!==R&&void 0!==R&&null!==(h=R.attributes)&&void 0!==h&&h.adr_state_name?null===R||void 0===R||null===(m=R.attributes)||void 0===m?void 0:m.adr_state_name:"",adr_city:null!==R&&void 0!==R&&null!==(f=R.attributes)&&void 0!==f&&f.adr_city?null===R||void 0===R||null===(g=R.attributes)||void 0===g?void 0:g.adr_city:"",adr_zipcode:null!==R&&void 0!==R&&null!==(v=R.attributes)&&void 0!==v&&v.adr_zipcode?null===R||void 0===R||null===(x=R.attributes)||void 0===x?void 0:x.adr_zipcode:"",speciality:null!==R&&void 0!==R&&null!==(y=R.attributes)&&void 0!==y&&y.speciality?null===R||void 0===R||null===(b=R.attributes)||void 0===b?void 0:b.speciality:"",consulting_language:null!==R&&void 0!==R&&null!==(j=R.attributes)&&void 0!==j&&j.consulting_language?null===R||void 0===R||null===(_=R.attributes)||void 0===_?void 0:_.consulting_language:"",experience:null!==R&&void 0!==R&&null!==(C=R.attributes)&&void 0!==C&&C.experience?null===R||void 0===R||null===(w=R.attributes)||void 0===w?void 0:w.experience:"",professional_bio:null!==R&&void 0!==R&&null!==(S=R.attributes)&&void 0!==S&&S.professional_bio?null===R||void 0===R||null===(A=R.attributes)||void 0===A?void 0:A.professional_bio:"",qualification:null!==R&&void 0!==R&&null!==(k=R.attributes)&&void 0!==k&&k.qualification?null===R||void 0===R||null===(T=R.attributes)||void 0===T?void 0:T.qualification:"",registration:null!==R&&void 0!==R&&null!==(E=R.attributes)&&void 0!==E&&E.registration?null===R||void 0===R||null===(M=R.attributes)||void 0===M?void 0:M.registration:"",mobile_code:null!==R&&void 0!==R&&R.phone_number?"+".concat(null===(O=cJ(null===R||void 0===R?void 0:R.phone_number))||void 0===O?void 0:O.countryCallingCode):"+91"},z=[{name:L("rpm_Profile"),url:ld.DOCTOR.PROFILE},{name:L("rpm_EditProfile"),url:""}];return(0,qt.jsxs)(op,{sx:{width:"100%"},children:[(0,qt.jsx)(op,{mb:2.5,children:(0,qt.jsx)(BH,{labels:z})}),(0,qt.jsx)(Ff,{container:!0,spacing:2,children:(0,qt.jsx)(Ff,{item:!0,xs:12,md:12,lg:12,children:(0,qt.jsx)(Kz,{initialValues:B,validationSchema:RU.userProfileUpdate,onSubmit:F?()=>{}:P,enableReinitialize:!0,children:e=>{var t,n;let{values:r,setFieldValue:o}=e;return(0,qt.jsx)(qt.Fragment,{children:(0,qt.jsx)(nH,{children:(0,qt.jsxs)(yH,{variant:"outlined",children:[(0,qt.jsx)(nW,{sx:{py:1.5,bgcolor:"primary.theme.50"},title:(0,qt.jsx)(qt.Fragment,{children:(0,qt.jsxs)(Ff,{container:!0,spacing:2,children:[(0,qt.jsx)(Ff,{item:!0,xs:!0,children:(0,qt.jsx)(Cf,{variant:"h6",component:"h6",children:L("rpm_Profile")})}),(0,qt.jsx)(Ff,{item:!0,children:(0,qt.jsx)(xh,{variant:"outlined",color:"primary",disableElevation:!0,onClick:()=>I(-1),children:L("rpm_Cancel")})}),(0,qt.jsx)(Ff,{item:!0,children:(0,qt.jsx)(xh,{variant:"contained",color:"primary",disableElevation:!0,type:"submit",children:L("rpm_Save")})})]})})}),(0,qt.jsx)(wH,{children:(0,qt.jsxs)(Ff,{container:!0,spacing:2,alignItems:"flex-start",children:[(0,qt.jsx)(Ff,{item:!0,xs:12,md:12,lg:4,children:(0,qt.jsxs)(op,{sx:{px:2,py:{xs:4,md:10},bgcolor:"primary.theme.50",textAlign:"center",borderRadius:1},children:[(0,qt.jsx)(op,{mb:1,children:(0,qt.jsx)(Ny,{sx:{bgcolor:"secondary.main",width:140,height:140,fontSize:64,mx:"auto"},children:null===R||void 0===R||null===(t=R.first_name)||void 0===t||null===(n=t.charAt(0))||void 0===n?void 0:n.toLocaleUpperCase()})}),cs(R)?(0,qt.jsx)(lS,{width:150,sx:{mx:"auto"}}):(0,qt.jsx)(Cf,{variant:"h6",component:"h6",children:(null===R||void 0===R?void 0:R.first_name)+" "+(null===R||void 0===R?void 0:R.last_name)}),cs(R)?(0,qt.jsx)(lS,{width:150,sx:{mx:"auto"}}):(0,qt.jsx)(Cf,{variant:"body2",component:"p",children:null===R||void 0===R?void 0:R.email})]})}),(0,qt.jsxs)(Ff,{item:!0,xs:12,lg:8,container:!0,spacing:4,children:[(0,qt.jsx)(Ff,{item:!0,xs:12,children:(0,qt.jsx)(op,{sx:{p:1.5,bgcolor:"primary.theme.100",borderRadius:1},children:(0,qt.jsx)(Cf,{variant:"body1",component:"p",fontWeight:"h6.fontWeight",children:L("rpm_GeneralInformation")})})}),(0,qt.jsx)(Ff,{item:!0,xs:12,md:4,children:(0,qt.jsxs)(pE,{flexDirection:"column",gap:{xs:1,lg:2},children:[(0,qt.jsxs)(Cf,{variant:"body1",component:"p",fontWeight:"h6.fontWeight",sx:{flex:.4},children:[L("rpm_FirstName"),(0,qt.jsx)(op,{component:"span",children:"*"})]}),(0,qt.jsxs)(op,{sx:{flex:.6},children:[(0,qt.jsx)(tH,{as:qj,fullWidth:!0,size:"small",id:"first_name",name:"first_name",variant:"outlined",endAdornment:(0,qt.jsx)(tw,{position:"end",children:(0,qt.jsx)(sy,{title:L("message:rpm_FirstNameDrHelp"),placement:"top",children:(0,qt.jsx)(wh,{size:"small",disableRipple:!0,sx:{p:0},children:(0,qt.jsx)(pM.A,{fontSize:"small"})})})})}),(0,qt.jsx)(dH,{name:"first_name",children:e=>(0,qt.jsx)(v_,{error:!0,children:L(e,{field:L("rpm_FirstName")})})})]})]})}),(0,qt.jsx)(Ff,{item:!0,xs:12,md:4,children:(0,qt.jsxs)(pE,{flexDirection:"column",gap:{xs:1,lg:2},children:[(0,qt.jsxs)(Cf,{variant:"body1",component:"p",fontWeight:"h6.fontWeight",sx:{flex:.4},children:[L("rpm_LastName"),(0,qt.jsx)(op,{component:"span",children:"*"})]}),(0,qt.jsxs)(op,{sx:{flex:.6},children:[(0,qt.jsx)(tH,{as:qj,fullWidth:!0,size:"small",id:"last_name",name:"last_name",variant:"outlined",endAdornment:(0,qt.jsx)(tw,{position:"end",children:(0,qt.jsx)(sy,{title:L("message:rpm_LastNameDrHelp"),placement:"top",children:(0,qt.jsx)(wh,{size:"small",disableRipple:!0,sx:{p:0},children:(0,qt.jsx)(pM.A,{fontSize:"small"})})})})}),(0,qt.jsx)(dH,{name:"last_name",children:e=>(0,qt.jsx)(v_,{error:!0,children:L(e,{field:L("rpm_LastName")})})})]})]})}),(0,qt.jsx)(Ff,{item:!0,xs:12,md:4,children:(0,qt.jsxs)(pE,{flexDirection:"column",gap:{xs:1,lg:2},children:[(0,qt.jsxs)(Cf,{variant:"body1",component:"p",fontWeight:"h6.fontWeight",sx:{flex:.4},children:[L("rpm_Email"),(0,qt.jsx)(op,{component:"span",children:"*"})]}),(0,qt.jsxs)(op,{sx:{flex:.6},children:[(0,qt.jsx)(tH,{as:qj,fullWidth:!0,size:"small",id:"email",name:"email",variant:"outlined",disabled:!0,endAdornment:(0,qt.jsx)(tw,{position:"end",children:(0,qt.jsx)(sy,{title:L("message:rpm_EmailDrHelp"),placement:"top",children:(0,qt.jsx)(wh,{size:"small",disableRipple:!0,sx:{p:0},children:(0,qt.jsx)(pM.A,{fontSize:"small"})})})})}),(0,qt.jsx)(dH,{name:"email",children:e=>(0,qt.jsx)(v_,{error:!0,children:L(e,{field:L("rpm_Email")})})})]})]})}),(0,qt.jsx)(Ff,{item:!0,xs:12,md:4,children:(0,qt.jsxs)(pE,{flexDirection:"column",gap:{xs:1,lg:2},children:[(0,qt.jsx)(Cf,{variant:"body1",component:"p",fontWeight:"h6.fontWeight",sx:{flex:.4},children:L("rpm_CountryCode")}),(0,qt.jsxs)(op,{sx:{flex:.6},children:[(0,qt.jsx)(tH,{component:KK,size:"small",optionId:"phoneCode",id:"mobile_code",name:"mobile_code",options:N,browserAutocomplete:!1,valueKey:"phoneCode",nameKey:"phoneCode",variant:"outlined",margin:"normal",fullWidth:!0}),(0,qt.jsx)(dH,{name:"mobile_code",children:e=>(0,qt.jsx)(v_,{error:!0,children:L(e,{field:L("rpm_CountryCode")})})})]})]})}),(0,qt.jsx)(Ff,{item:!0,xs:12,md:4,children:(0,qt.jsxs)(pE,{flexDirection:"column",gap:{xs:1,lg:2},children:[(0,qt.jsx)(Cf,{variant:"body1",component:"p",fontWeight:"h6.fontWeight",sx:{flex:.4},children:L("rpm_Mobile")}),(0,qt.jsxs)(op,{sx:{flex:.6},children:[(0,qt.jsx)(tH,{as:qj,fullWidth:!0,size:"small",id:"mobile",name:"mobile",variant:"outlined",endAdornment:(0,qt.jsx)(tw,{position:"end",children:(0,qt.jsx)(sy,{title:L("message:rpm_MobileDrHelp"),placement:"top",children:(0,qt.jsx)(wh,{size:"small",disableRipple:!0,sx:{p:0},children:(0,qt.jsx)(pM.A,{fontSize:"small"})})})})}),(0,qt.jsx)(dH,{name:"mobile",children:e=>(0,qt.jsx)(v_,{error:!0,children:L(e,{field:L("rpm_Mobile")})})})]})]})}),(0,qt.jsx)(Ff,{item:!0,xs:12,md:4,children:(0,qt.jsxs)(pE,{flexDirection:"column",gap:{xs:1,lg:2},children:[(0,qt.jsxs)(Cf,{variant:"body1",component:"p",fontWeight:"h6.fontWeight",sx:{flex:.4},children:[L("rpm_DOB")," \xa0",(0,qt.jsx)(sy,{title:L("message:rpm_DOBDrHelp"),placement:"top",children:(0,qt.jsx)(wh,{size:"small",disableRipple:!0,sx:{p:0},children:(0,qt.jsx)(pM.A,{fontSize:"small"})})})]}),(0,qt.jsxs)(op,{sx:{flex:.6},children:[(0,qt.jsxs)(op,{sx:{"& .MuiOutlinedInput-input":{py:1.0625}},children:[(0,qt.jsx)(WM,{dateAdapter:DI,children:(0,qt.jsx)(tH,{as:fD,size:"small",id:"dob",name:"dob",value:r.dob,onChange:e=>o("dob",e),renderInput:e=>(0,qt.jsx)(Q_,(0,i.A)({fullWidth:!0},e)),maxDate:gs(18,11,31),inputFormat:"dd/MM/yyyy",defaultCalendarMonth:gs(18,11,31),onError:e=>$(e)})}),("minDate"===F||"maxDate"===F)&&(0,qt.jsx)(v_,{error:!0,children:L("error:rpm_minMaxDateErr")}),"invalidDate"===F&&(0,qt.jsx)(v_,{error:!0,children:L("error:rpm_invailidDateErr")})]}),(0,qt.jsx)(dH,{name:"dob",children:e=>(0,qt.jsx)(v_,{error:!0,children:L(e,{field:L("rpm_DOB")})})})]})]})}),(0,qt.jsx)(Ff,{item:!0,xs:12,md:4,children:(0,qt.jsxs)(pE,{flexDirection:"column",gap:{xs:1,lg:2},children:[(0,qt.jsx)(Cf,{variant:"body1",component:"p",fontWeight:"h6.fontWeight",sx:{flex:.4},children:L("rpm_Gender")}),(0,qt.jsxs)(op,{sx:{flex:.6},children:[(0,qt.jsxs)(tH,{as:G_,fullWidth:!0,size:"small",id:"gender",name:"gender",variant:"outlined",endAdornment:(0,qt.jsx)(tw,{position:"end",sx:{position:"absolute",right:"28px"},children:(0,qt.jsx)(sy,{title:L("message:rpm_GenderDrHelp"),placement:"top",children:(0,qt.jsx)(wh,{size:"small",disableRipple:!0,sx:{p:0},children:(0,qt.jsx)(pM.A,{fontSize:"small"})})})}),children:[(0,qt.jsx)(mf,{value:"Male",children:"Male"}),(0,qt.jsx)(mf,{value:"Female",children:"Female"})]}),(0,qt.jsx)(dH,{name:"gender",children:e=>(0,qt.jsx)(v_,{error:!0,children:L(e,{field:L("rpm_Gender")})})})]})]})}),D&&(0,qt.jsx)(Ff,{item:!0,xs:12,md:4,children:(0,qt.jsx)(pE,{flexDirection:"column",gap:{xs:1,lg:2},children:(0,qt.jsx)(fue,{checked:r.active,id:"active",name:"active",color:"primary",label:(0,qt.jsx)(Cf,{component:"p",variant:"body1",fontWeight:500,children:L("rpm_Active")})})})}),(0,qt.jsx)(Ff,{item:!0,xs:12,children:(0,qt.jsx)(op,{sx:{p:1.5,bgcolor:"primary.theme.100",borderRadius:1},children:(0,qt.jsx)(Cf,{variant:"body1",component:"p",fontWeight:"h6.fontWeight",children:L("rpm_ProfessionalDetail")})})}),(0,qt.jsx)(Ff,{item:!0,xs:12,md:4,children:(0,qt.jsxs)(pE,{flexDirection:"column",gap:{xs:1,lg:2},children:[(0,qt.jsx)(Cf,{variant:"body1",component:"p",fontWeight:"h6.fontWeight",sx:{flex:.4},children:L("rpm_Speciality")}),(0,qt.jsxs)(op,{sx:{flex:.6},children:[(0,qt.jsx)(tH,{as:G_,fullWidth:!0,size:"small",id:"speciality",name:"speciality",variant:"outlined",endAdornment:(0,qt.jsx)(tw,{position:"end",sx:{position:"absolute",right:"28px"},children:(0,qt.jsx)(sy,{title:L("message:rpm_SpecialityHelp"),placement:"top",children:(0,qt.jsx)(wh,{size:"small",disableRipple:!0,sx:{p:0},children:(0,qt.jsx)(pM.A,{fontSize:"small"})})})}),children:_d.map(e=>(0,qt.jsx)(mf,{value:e,children:e},e))}),(0,qt.jsx)(dH,{name:"speciality",children:e=>(0,qt.jsx)(v_,{error:!0,children:L(e,{field:L("rpm_Speciality")})})})]})]})}),(0,qt.jsx)(Ff,{item:!0,xs:12,md:4,children:(0,qt.jsxs)(pE,{flexDirection:"column",gap:{xs:1,lg:2},children:[(0,qt.jsx)(Cf,{variant:"body1",component:"p",fontWeight:"h6.fontWeight",sx:{flex:.4},children:L("rpm_Experience")}),(0,qt.jsxs)(op,{sx:{flex:.6},children:[(0,qt.jsx)(tH,{as:qj,fullWidth:!0,size:"small",id:"experience",name:"experience",variant:"outlined",endAdornment:(0,qt.jsx)(tw,{position:"end",children:(0,qt.jsx)(sy,{title:L("message:rpm_ExperienceHelp"),placement:"top",children:(0,qt.jsx)(wh,{size:"small",disableRipple:!0,sx:{p:0},children:(0,qt.jsx)(pM.A,{fontSize:"small"})})})})}),(0,qt.jsx)(dH,{name:"experience",children:e=>(0,qt.jsx)(v_,{error:!0,children:L(e,{field:L("rpm_Experience")})})})]})]})}),(0,qt.jsx)(Ff,{item:!0,xs:12,md:4,children:(0,qt.jsxs)(pE,{flexDirection:"column",gap:{xs:1,lg:2},children:[(0,qt.jsx)(Cf,{variant:"body1",component:"p",fontWeight:"h6.fontWeight",sx:{flex:.4},children:L("rpm_ConsultingLanguage")}),(0,qt.jsxs)(op,{sx:{flex:.6},children:[(0,qt.jsx)(tH,{as:qj,fullWidth:!0,size:"small",id:"consulting_language",name:"consulting_language",variant:"outlined",endAdornment:(0,qt.jsx)(tw,{position:"end",children:(0,qt.jsx)(sy,{title:L("message:rpm_ConsultingLanguageHelp"),placement:"top",children:(0,qt.jsx)(wh,{size:"small",disableRipple:!0,sx:{p:0},children:(0,qt.jsx)(pM.A,{fontSize:"small"})})})})}),(0,qt.jsx)(dH,{name:"consulting_language",children:e=>(0,qt.jsx)(v_,{error:!0,children:L(e,{field:L("rpm_ConsultingLanguage")})})})]})]})}),(0,qt.jsx)(Ff,{item:!0,xs:12,md:4,children:(0,qt.jsxs)(pE,{flexDirection:"column",gap:{xs:1,lg:2},children:[(0,qt.jsx)(Cf,{variant:"body1",component:"p",fontWeight:"h6.fontWeight",sx:{flex:.4},children:L("rpm_ProfessionalBio")}),(0,qt.jsxs)(op,{sx:{flex:.6},children:[(0,qt.jsx)(tH,{as:qj,fullWidth:!0,size:"small",id:"professional_bio",name:"professional_bio",variant:"outlined",multiline:!0,rows:3,endAdornment:(0,qt.jsx)(tw,{position:"end",children:(0,qt.jsx)(sy,{title:L("message:rpm_ProfessionalBioHelp"),placement:"top",children:(0,qt.jsx)(wh,{size:"small",disableRipple:!0,sx:{p:0},children:(0,qt.jsx)(pM.A,{fontSize:"small"})})})})}),(0,qt.jsx)(dH,{name:"professional_bio",children:e=>(0,qt.jsx)(v_,{error:!0,children:L(e,{field:L("rpm_ProfessionalBio")})})})]})]})}),(0,qt.jsx)(Ff,{item:!0,xs:12,md:4,children:(0,qt.jsxs)(pE,{flexDirection:"column",gap:{xs:1,lg:2},children:[(0,qt.jsx)(Cf,{variant:"body1",component:"p",fontWeight:"h6.fontWeight",sx:{flex:.4},children:L("rpm_HighestQualifications")}),(0,qt.jsxs)(op,{sx:{flex:.6},children:[(0,qt.jsx)(tH,{as:qj,fullWidth:!0,size:"small",id:"qualification",name:"qualification",variant:"outlined",endAdornment:(0,qt.jsx)(tw,{position:"end",children:(0,qt.jsx)(sy,{title:L("message:rpm_HighestQualificationsHelp"),placement:"top",children:(0,qt.jsx)(wh,{size:"small",disableRipple:!0,sx:{p:0},children:(0,qt.jsx)(pM.A,{fontSize:"small"})})})})}),(0,qt.jsx)(dH,{name:"qualification",children:e=>(0,qt.jsx)(v_,{error:!0,children:L(e,{field:L("rpm_HighestQualifications")})})})]})]})}),(0,qt.jsx)(Ff,{item:!0,xs:12,md:4,children:(0,qt.jsxs)(pE,{flexDirection:"column",gap:{xs:1,lg:2},children:[(0,qt.jsx)(Cf,{variant:"body1",component:"p",fontWeight:"h6.fontWeight",sx:{flex:.4},children:L("rpm_Registration")}),(0,qt.jsxs)(op,{sx:{flex:.6},children:[(0,qt.jsx)(tH,{as:qj,fullWidth:!0,size:"small",id:"registration",name:"registration",variant:"outlined",endAdornment:(0,qt.jsx)(tw,{position:"end",children:(0,qt.jsx)(sy,{title:L("message:rpm_RegistrationHelp"),placement:"top",children:(0,qt.jsx)(wh,{size:"small",disableRipple:!0,sx:{p:0},children:(0,qt.jsx)(pM.A,{fontSize:"small"})})})})}),(0,qt.jsx)(dH,{name:"qualification",children:e=>(0,qt.jsx)(v_,{error:!0,children:L(e,{field:L("rpm_Registration")})})})]})]})}),(0,qt.jsx)(Ff,{item:!0,xs:12,children:(0,qt.jsx)(op,{sx:{p:1.5,bgcolor:"primary.theme.100",borderRadius:1},children:(0,qt.jsx)(Cf,{variant:"body1",component:"p",fontWeight:"h6.fontWeight",children:L("rpm_AddressInformation")})})}),(0,qt.jsx)(Ff,{item:!0,xs:12,md:4,children:(0,qt.jsxs)(pE,{flexDirection:"column",gap:{xs:1,lg:2},children:[(0,qt.jsx)(Cf,{variant:"body1",component:"p",fontWeight:"h6.fontWeight",sx:{flex:.4},children:L("rpm_AddressLine1")}),(0,qt.jsxs)(op,{sx:{flex:.6},children:[(0,qt.jsx)(tH,{as:qj,fullWidth:!0,size:"small",id:"adr_address1",name:"adr_address1",variant:"outlined",endAdornment:(0,qt.jsx)(tw,{position:"end",children:(0,qt.jsx)(sy,{title:L("message:rpm_AddressLine1Help"),placement:"top",children:(0,qt.jsx)(wh,{size:"small",disableRipple:!0,sx:{p:0},children:(0,qt.jsx)(pM.A,{fontSize:"small"})})})})}),(0,qt.jsx)(dH,{name:"adr_address1",children:e=>(0,qt.jsx)(v_,{error:!0,children:L(e,{field:L("rpm_AddressLine1")})})})]})]})}),(0,qt.jsx)(Ff,{item:!0,xs:12,md:4,children:(0,qt.jsxs)(pE,{flexDirection:"column",gap:{xs:1,lg:2},children:[(0,qt.jsx)(Cf,{variant:"body1",component:"p",fontWeight:"h6.fontWeight",sx:{flex:.4},children:L("rpm_AddressLine2")}),(0,qt.jsxs)(op,{sx:{flex:.6},children:[(0,qt.jsx)(tH,{as:qj,fullWidth:!0,size:"small",id:"adr_address2",name:"adr_address2",variant:"outlined",endAdornment:(0,qt.jsx)(tw,{position:"end",children:(0,qt.jsx)(sy,{title:L("message:rpm_AddressLine2Help"),placement:"top",children:(0,qt.jsx)(wh,{size:"small",disableRipple:!0,sx:{p:0},children:(0,qt.jsx)(pM.A,{fontSize:"small"})})})})}),(0,qt.jsx)(dH,{name:"adr_address2",children:e=>(0,qt.jsx)(v_,{error:!0,children:L(e,{field:L("rpm_AddressLine2")})})})]})]})}),(0,qt.jsx)(Ff,{item:!0,xs:12,md:4,children:(0,qt.jsxs)(pE,{flexDirection:"column",gap:{xs:1,lg:2},children:[(0,qt.jsx)(Cf,{variant:"body1",component:"p",fontWeight:"h6.fontWeight",sx:{flex:.4},children:L("rpm_CountryRegion")}),(0,qt.jsxs)(op,{sx:{flex:.6},children:[(0,qt.jsx)(tH,{as:qj,fullWidth:!0,size:"small",id:"adr_country_name",name:"adr_country_name",variant:"outlined",endAdornment:(0,qt.jsx)(tw,{position:"end",children:(0,qt.jsx)(sy,{title:L("message:rpm_CountryDrHelp"),placement:"top",children:(0,qt.jsx)(wh,{size:"small",disableRipple:!0,sx:{p:0},children:(0,qt.jsx)(pM.A,{fontSize:"small"})})})})}),(0,qt.jsx)(dH,{name:"adr_country_name",children:e=>(0,qt.jsx)(v_,{error:!0,children:L(e,{field:L("rpm_CountryRegion")})})})]})]})}),(0,qt.jsx)(Ff,{item:!0,xs:12,md:4,children:(0,qt.jsxs)(pE,{flexDirection:"column",gap:{xs:1,lg:2},children:[(0,qt.jsx)(Cf,{variant:"body1",component:"p",fontWeight:"h6.fontWeight",sx:{flex:.4},children:L("rpm_StateProvince")}),(0,qt.jsxs)(op,{sx:{flex:.6},children:[(0,qt.jsx)(tH,{as:qj,fullWidth:!0,size:"small",id:"adr_state_name",name:"adr_state_name",variant:"outlined",endAdornment:(0,qt.jsx)(tw,{position:"end",children:(0,qt.jsx)(sy,{title:L("message:rpm_StateDrHelp"),placement:"top",children:(0,qt.jsx)(wh,{size:"small",disableRipple:!0,sx:{p:0},children:(0,qt.jsx)(pM.A,{fontSize:"small"})})})})}),(0,qt.jsx)(dH,{name:"adr_state_name",children:e=>(0,qt.jsx)(v_,{error:!0,children:L(e,{field:L("rpm_StateProvince")})})})]})]})}),(0,qt.jsx)(Ff,{item:!0,xs:12,md:4,children:(0,qt.jsxs)(pE,{flexDirection:"column",gap:{xs:1,lg:2},children:[(0,qt.jsx)(Cf,{variant:"body1",component:"p",fontWeight:"h6.fontWeight",sx:{flex:.4},children:L("rpm_City")}),(0,qt.jsxs)(op,{sx:{flex:.6},children:[(0,qt.jsx)(tH,{as:qj,fullWidth:!0,size:"small",id:"adr_city",name:"adr_city",variant:"outlined",endAdornment:(0,qt.jsx)(tw,{position:"end",children:(0,qt.jsx)(sy,{title:L("message:rpm_CityDrHelp"),placement:"top",children:(0,qt.jsx)(wh,{size:"small",disableRipple:!0,sx:{p:0},children:(0,qt.jsx)(pM.A,{fontSize:"small"})})})})}),(0,qt.jsx)(dH,{name:"adr_city",children:e=>(0,qt.jsx)(v_,{error:!0,children:L(e,{field:L("rpm_City")})})})]})]})}),(0,qt.jsx)(Ff,{item:!0,xs:12,md:4,children:(0,qt.jsxs)(pE,{flexDirection:"column",gap:{xs:1,lg:2},children:[(0,qt.jsx)(Cf,{variant:"body1",component:"p",fontWeight:"h6.fontWeight",sx:{flex:.4},children:L("rpm_PostalCodeZip")}),(0,qt.jsxs)(op,{sx:{flex:.6},children:[(0,qt.jsx)(tH,{as:qj,fullWidth:!0,size:"small",id:"adr_zipcode",name:"adr_zipcode",variant:"outlined",endAdornment:(0,qt.jsx)(tw,{position:"end",children:(0,qt.jsx)(sy,{title:L("message:rpm_PostalCodeZipHelp"),placement:"top",children:(0,qt.jsx)(wh,{size:"small",disableRipple:!0,sx:{p:0},children:(0,qt.jsx)(pM.A,{fontSize:"small"})})})})}),(0,qt.jsx)(dH,{name:"adr_zipcode",children:e=>(0,qt.jsx)(v_,{error:!0,children:L(e,{field:L("rpm_PostalCodeZip")})})})]})]})}),!1]})]})})]})})})}},"profile_formik")})})]})},vue=["active","first_name","last_name","email","mobile","mobile_code"];const xue=function(){const e=wt(cu),{userId:t}=lo(),n=t,r=Nt(),{t:i}=Vg(),{enqueueSnackbar:o}=hi(),a=so(),[s,l]=We.useState([]),[c,d]=We.useState({});return We.useEffect(()=>{e&&t&&(async()=>{try{const{data:e}=await r(Xg(n));d(e)}catch(e){o(e.message,{variant:"error"})}})()},[e,t]),We.useEffect(()=>{e&&async function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{q:""};await r(pue(e,"RPM",e=>{let{countries:t}=e;l(t.content)},()=>{}))}()},[e]),We.useEffect(()=>{r(NC({activeMenuItem:"account"}))},[]),(0,qt.jsx)(qt.Fragment,{children:(0,qt.jsx)(gue,{user:c,editUser:async(e,t)=>{let{setErrors:s}=t;const{active:l,first_name:c,last_name:d,email:u,mobile:p,mobile_code:h}=e,m=Ko(e,vue),f={active:l,first_name:c,last_name:d,email:u,phone_number:"".concat(h).concat(p),attributes:Object.keys(m).reduce((e,t)=>(e[t]=Array.isArray(m[t])?m[t]:[m[t]],e),{})};try{await r(((e,t)=>async n=>{n(na(!0));const r="".concat(ma.USERS,"/").concat(e);try{return await $u(r,t)}finally{n(na(!1))}})(n,f)),o(i("message:rpm_UpdateSuccessUserProfile"),{variant:"success"}),a(-1)}catch(g){const e=us(g,"response.data.field_errors",{}),t=us(g,"response.data.code","");cs(e)?cs(t)?r(Zo({subTitle:"error:rpm_ProfileUpdationFailed",severity:ud.ERROR})):r(Zo({subTitle:Vd(t,"error:rpm_PasswordResetFailed"),severity:ud.ERROR})):s(Ud(e))}},showAdminDetails:!1,countries:s})})};var yue=n(18851),bue=n(55722),jue=n(11227);const _ue=(0,Cy.A)((0,qt.jsx)("path",{d:"M11 7h2v2h-2zm0 4h2v6h-2zm1-9C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2m0 18c-4.41 0-8-3.59-8-8s3.59-8 8-8 8 3.59 8 8-3.59 8-8 8"}),"InfoOutlined"),Cue=(0,Cy.A)((0,qt.jsx)("path",{d:"M5 20h14v-2H5zm0-10h4v6h6v-6h4l-7-7z"}),"Upload"),wue=["children","onClose"],Sue=e=>{const{children:t,onClose:n}=e,r=Ko(e,wue);return(0,qt.jsxs)(fC,(0,i.A)((0,i.A)({sx:{m:0,p:2}},r),{},{children:[t,n?(0,qt.jsx)(wh,{"aria-label":"close",onClick:n,sx:{position:"absolute",right:8,top:8,color:e=>e.palette.grey[500]},children:(0,qt.jsx)(J_.A,{})}):null,(0,qt.jsxs)(op,{display:"flex",gap:.5,children:[(0,qt.jsx)(Cf,{component:"span",sx:{color:"grey.400"},children:(0,qt.jsx)(_ue,{sx:{fontSize:"14px"}})}),(0,qt.jsx)(Cf,{sx:{color:"grey.600",fontSize:"14px"},children:"A program is a hospital or clinic that is running in the same or different cities under one name."})]})]}))};function Aue(e){var t,n,r,i,o,a,s,l,c,d,u,p,h,m,f,g;let{openModal:v,onCloseModal:x,addNewProgram:y,editProgram:b,fetchStates:j,countries:_,states:C}=e;const{t:w}=Vg(),S=wt(uu),[A]=We.useState({display_name:null!==v&&void 0!==v&&null!==(t=v.data)&&void 0!==t&&t.display_name?null===v||void 0===v||null===(n=v.data)||void 0===n?void 0:n.display_name:"",city:null!==v&&void 0!==v&&null!==(r=v.data)&&void 0!==r&&r.city?null===v||void 0===v||null===(i=v.data)||void 0===i?void 0:i.city:"",country:null!==v&&void 0!==v&&null!==(o=v.data)&&void 0!==o&&o.country?null===v||void 0===v||null===(a=v.data)||void 0===a?void 0:a.country:"IN",state:null!==v&&void 0!==v&&null!==(s=v.data)&&void 0!==s&&s.state?null===v||void 0===v||null===(l=v.data)||void 0===l?void 0:l.state:"",address:null!==v&&void 0!==v&&null!==(c=v.data)&&void 0!==c&&c.address?null===v||void 0===v||null===(d=v.data)||void 0===d?void 0:d.address:"",image:null!==v&&void 0!==v&&null!==(u=v.data)&&void 0!==u&&u.image?null===v||void 0===v||null===(p=v.data)||void 0===p?void 0:p.image:"",def:!(null===v||void 0===v||null===(h=v.data)||void 0===h||!h.def)&&(null===v||void 0===v||null===(m=v.data)||void 0===m?void 0:m.def),facility_type:null!==v&&void 0!==v&&null!==(f=v.data)&&void 0!==f&&f.facility_type?null===v||void 0===v||null===(g=v.data)||void 0===g?void 0:g.facility_type:""});return(0,We.useEffect)(()=>{var e,t;j(null!==v&&void 0!==v&&null!==(e=v.data)&&void 0!==e&&e.country?null===v||void 0===v||null===(t=v.data)||void 0===t?void 0:t.country:"IN")},[]),(0,qt.jsx)(We.Fragment,{children:(0,qt.jsx)(cC,{fullWidth:!0,maxWidth:"sm",open:v.open,onClose:x,children:(0,qt.jsx)(Kz,{initialValues:A,validationSchema:RU.addNewProgram,onSubmit:(e,t)=>{var n;let{setErrors:r,resetForm:i}=t;return cs(null===v||void 0===v||null===(n=v.data)||void 0===n?void 0:n.id)?y(e,{setErrors:r,resetForm:i},!1):b(e,{setErrors:r,resetForm:i},!0)},enableReinitialize:!0,children:e=>{var t,n;let{values:r,setFieldValue:i}=e;return(0,qt.jsx)(qt.Fragment,{children:(0,qt.jsxs)(nH,{children:[(0,qt.jsx)(Sue,{sx:{px:4},onClose:x,children:cs(null===v||void 0===v||null===(t=v.data)||void 0===t?void 0:t.id)?w("rpm_AddNewProgram"):w("rpm_EditProgram")}),(0,qt.jsx)(bC,{sx:{p:4,pt:2},dividers:!0,children:(0,qt.jsxs)(Ff,{container:!0,spacing:2,direction:"column",children:[(0,qt.jsx)(Ff,{item:!0,xs:12,md:6,children:(0,qt.jsx)(op,{className:"upload-input-text",children:(0,qt.jsxs)(op,{children:[ps(null===r||void 0===r?void 0:r.image)?(0,qt.jsxs)(op,{className:"upload-input-text",sx:{bgcolor:"primary.theme.50",border:"1px solid #3f51b5",borderRadius:"4px",padding:"0 8px",width:"fit-content",fontSize:"14px"},children:[(0,qt.jsx)("input",{id:"image",name:"image",type:"file",onChange:e=>{i("image",e.currentTarget.files[0])}}),(0,qt.jsxs)("label",{htmlFor:"contained-button-file",style:{display:"flex",paddingTop:"5px"},children:[(0,qt.jsx)(op,{textOverflow:"ellipsis",whiteSpace:"nowrap",overflow:"hidden",children:w("uploadImage")}),(0,qt.jsx)(op,{clone:!0,color:"primary",height:"26px",ml:1,children:(0,qt.jsx)(Cue,{width:22,height:22,sx:{color:"primary.theme.500"}})})]})]}):(0,qt.jsxs)(op,{style:{display:"flex",paddingTop:"5px"},width:170,children:[(0,qt.jsx)(op,{textOverflow:"ellipsis",whiteSpace:"nowrap",style:{cursor:"pointer"},overflow:"hidden",children:null===r||void 0===r||null===(n=r.image)||void 0===n?void 0:n.name}),(0,qt.jsx)(op,{mr:1,color:"primary",position:"relative",zIndex:2,children:(0,qt.jsx)(wh,{size:"small",color:"error","aria-label":"remove file",onClick:()=>{i("image","")},children:(0,qt.jsx)(xc,{width:22,height:22})})})]}),(0,qt.jsx)(dH,{name:"image",children:e=>(0,qt.jsx)(v_,{error:!0,children:w(e,{field:w("rpm_image")})})})]})})}),(0,qt.jsx)(Ff,{item:!0,xs:12,md:6,children:(0,qt.jsxs)(op,{mb:.5,children:[(0,qt.jsx)(o_,{htmlFor:"display_name",required:!0,sx:{mb:.75},children:w("rpm_DisplayName")}),(0,qt.jsx)(tH,{fullWidth:!0,as:qj,id:"display_name",name:"display_name",color:"primary",size:"small",endAdornment:(0,qt.jsx)(tw,{position:"end",children:(0,qt.jsx)(sy,{title:w("message:rpm_DisplayNameHelp"),placement:"top",children:(0,qt.jsx)(wh,{size:"small",children:(0,qt.jsx)(pM.A,{fontSize:"small"})})})})}),(0,qt.jsx)(dH,{name:"display_name",children:e=>(0,qt.jsx)(v_,{error:!0,children:w(e,{field:w("rpm_DisplayName")})})})]})}),(0,qt.jsx)(Ff,{item:!0,xs:12,md:6,children:(0,qt.jsxs)(op,{mb:.5,children:[(0,qt.jsx)(o_,{htmlFor:"address",sx:{mb:.75},children:w("rpm_Address")}),(0,qt.jsx)(tH,{fullWidth:!0,as:qj,id:"address",name:"address",color:"primary",size:"small",endAdornment:(0,qt.jsx)(tw,{position:"end",children:(0,qt.jsx)(sy,{title:w("message:rpm_AddressHelp"),placement:"top",children:(0,qt.jsx)(wh,{size:"small",children:(0,qt.jsx)(pM.A,{fontSize:"small"})})})})})]})}),(0,qt.jsx)(Ff,{item:!0,xs:12,md:6,children:(0,qt.jsxs)(op,{mb:.5,children:[(0,qt.jsx)(o_,{htmlFor:"country",required:!0,sx:{mb:.75},children:w("rpm_ProgramCountry")}),(0,qt.jsxs)(op,{className:"autocomplete",sx:{position:"relative"},children:[(0,qt.jsx)(tH,{component:KK,size:"small",id:"country",optionId:"isoCode",name:"country",options:_,browserAutocomplete:!1,valueKey:"isoCode",nameKey:"name",onValueChange:(e,t)=>{i("state",""),j(t||"IN")},variant:"outlined",margin:"normal",fullWidth:!0}),(0,qt.jsx)(sy,{title:w("message:rpm_ProgramCountryHelp"),placement:"top",children:(0,qt.jsx)(wh,{size:"small",sx:{position:"absolute",right:"0.875rem",top:"0.25rem"},children:(0,qt.jsx)(pM.A,{fontSize:"small"})})})]}),(0,qt.jsx)(dH,{name:"country",children:e=>(0,qt.jsx)(v_,{error:!0,children:w(e,{field:w("rpm_ProgramCountry")})})})]})}),(0,qt.jsx)(Ff,{item:!0,xs:12,md:6,children:(0,qt.jsxs)(op,{mb:.5,children:[(0,qt.jsx)(o_,{htmlFor:"state",required:!0,sx:{mb:.75},children:w("rpm_ProgramState")}),(0,qt.jsxs)(op,{className:"autocomplete",sx:{position:"relative"},children:[(0,qt.jsx)(tH,{component:KK,size:"small",id:"state",optionId:"isoCode",name:"state",options:C,valueKey:"isoCode",nameKey:"name",dependent:!0,variant:"outlined",margin:"normal",fullWidth:!0}),(0,qt.jsx)(sy,{title:w("message:rpm_ProgramStateHelp"),placement:"top",children:(0,qt.jsx)(wh,{size:"small",sx:{position:"absolute",right:"0.875rem",top:"0.25rem"},children:(0,qt.jsx)(pM.A,{fontSize:"small"})})})]}),(0,qt.jsx)(dH,{name:"state",children:e=>(0,qt.jsx)(v_,{error:!0,children:w(e,{field:w("rpm_ProgramState")})})})]})}),(0,qt.jsx)(Ff,{item:!0,xs:12,md:6,children:(0,qt.jsxs)(op,{mb:.5,children:[(0,qt.jsx)(o_,{htmlFor:"city",required:!0,sx:{mb:.75},children:w("rpm_ProgramCity")}),(0,qt.jsx)(tH,{fullWidth:!0,as:qj,id:"city",name:"city",color:"primary",size:"small",endAdornment:(0,qt.jsx)(tw,{position:"end",children:(0,qt.jsx)(sy,{title:w("message:rpm_ProgramCityHelp"),placement:"top",children:(0,qt.jsx)(wh,{size:"small",children:(0,qt.jsx)(pM.A,{fontSize:"small"})})})})}),(0,qt.jsx)(dH,{name:"city",children:e=>(0,qt.jsx)(v_,{error:!0,children:w(e,{field:w("rpm_ProgramCity")})})})]})}),(0,qt.jsx)(Ff,{item:!0,xs:12,md:6,children:(0,qt.jsxs)(op,{mb:.5,children:[(0,qt.jsx)(o_,{htmlFor:"state",required:!0,sx:{mb:.75},children:w("rpm_facility_type")}),(0,qt.jsx)(op,{className:"autocomplete",sx:{position:"relative"},children:(0,qt.jsx)(tH,{as:G_,fullWidth:!0,className:"select-custom-field",size:"small",id:"facility_type",name:"facility_type",variant:"outlined",endAdornment:(0,qt.jsx)(tw,{position:"end",sx:{position:"absolute",right:"19px"},children:(0,qt.jsx)(sy,{title:w("message:rpm_FacilityHelp"),placement:"top",children:(0,qt.jsx)(wh,{size:"small",disableRipple:!0,sx:{p:0},children:(0,qt.jsx)(pM.A,{fontSize:"small"})})})}),children:eu.map(e=>(0,qt.jsx)(mf,{value:null===e||void 0===e?void 0:e.value,children:w("rpm_".concat(null===e||void 0===e?void 0:e.name))},null===e||void 0===e?void 0:e.value))})}),(0,qt.jsx)(dH,{name:"facility_type",children:e=>(0,qt.jsx)(v_,{error:!0,children:w(e,{field:w("rpm_facility_type")})})})]})})]})}),(0,qt.jsx)(vE,{sx:{py:3,px:4},children:(0,qt.jsxs)(op,{width:"100%",display:{xs:"block",sm:"flex"},justifyContent:"space-between",alignItems:"center",children:[(0,qt.jsx)(op,{py:3,children:(0,qt.jsx)(wE,{fontSize:18,label:w("rpm_defaultProgram"),sx:{"& .MuiTypography-root":{whiteSpace:{xs:"wrap",sm:"nowrap"},fontSize:"15px"}},control:(0,qt.jsx)(tH,{as:Dw,checked:r.def,type:"checkbox",id:"reading_reminder_enabled",name:"reading_reminder_enabled",onChange:()=>i("def",!r.def)})})}),(0,qt.jsx)(op,{children:(0,qt.jsxs)(Ff,{container:!0,spacing:2,children:[(0,qt.jsx)(Ff,{item:!0,children:(0,qt.jsx)(xh,{color:"primary",variant:"outlined",onClick:x,children:w("rpm_Cancel")})}),(0,qt.jsx)(Ff,{item:!0,children:(0,qt.jsx)(IM,{loading:S,color:"primary",disableElevation:!0,variant:"contained",type:"submit",children:w("rpm_Submit")})})]})})]})})]})})}},"program_formik")})})}const kue=ds((e,t)=>{e({programName:t})},500);function Tue(e,t){const n=null===e||void 0===e?void 0:e.split(new RegExp("(".concat(t,")"),"gi"));return(0,qt.jsx)(qt.Fragment,{children:n.map((e,n)=>(null===e||void 0===e?void 0:e.toLowerCase())===(null===t||void 0===t?void 0:t.toLowerCase())?(0,qt.jsx)("span",{style:{fontWeight:"bold"},children:e},n):(0,qt.jsx)("span",{children:e},n))})}const Eue=function(e){let{pageDetails:t,fetchListFunction:n,filterState:r,setFilterState:o,programSuggestions:a,fetchProgramListSuggestions:s,placeholder:l}=e;const{t:c}=Vg(),[d,u]=(0,We.useState)([]);(0,We.useEffect)(()=>{u(a)},[a]);const p=(0,We.useCallback)((e,t)=>{kue(s,t)},[s]),h=()=>{t.current_page=1,o({programName:""}),n({programName:""}),p(null,"")},m=e=>{t.current_page=1,o((0,i.A)((0,i.A)({},r),{},{programName:"".concat(e.display_name)})),n((0,i.A)((0,i.A)({},r),{},{programName:"".concat(e.display_name)})),u([])};return(0,qt.jsx)(Kz,{initialValues:{programName:""},onSubmit:()=>console.log("PatientFilter"),enableReinitialize:!0,children:()=>(0,qt.jsx)(nH,{style:{flex:"1"},children:(0,qt.jsx)(op,{sx:{borderRadius:"8px"},py:.2,pl:1,mr:2,className:"course_filter WhiteBG",children:(0,qt.jsx)(Ff,{container:!0,spacing:2,alignItems:"center",position:"relative",width:"100%",children:(0,qt.jsxs)(Ff,{item:!0,width:"100%",className:"globalSearchBox",sm:8,children:[(0,qt.jsxs)(op,{py:.2,display:"flex",alignItems:"center",position:"relative",width:"100%",children:[(0,qt.jsx)(qj,{sx:{position:"relative"},fullWidth:!0,size:"small",className:"program-tour-step3",placeholder:l,value:null===r||void 0===r?void 0:r.programName,onKeyDown:e=>{var t;"Enter"===e.key&&(null===d||void 0===d?void 0:d.length)>=0&&(o((0,i.A)((0,i.A)({},r),{},{programName:null===(t=d[0])||void 0===t?void 0:t.display_name})),m(d[0]))},onChange:e=>{const t=e.target.value;o((0,i.A)((0,i.A)({},r),{},{programName:t})),p(null,t)},endAdornment:(0,qt.jsx)(tw,{position:"end",children:(0,qt.jsx)(sy,{title:c("message:rpm_SearchProgramNameSearchBar"),placement:"top",children:(0,qt.jsx)(wh,{size:"small",children:(0,qt.jsx)(pM.A,{fontSize:"small"})})})})}),(0,qt.jsx)(op,{position:"absolute",right:"23px",children:!cs(null===r||void 0===r?void 0:r.programName)&&(0,qt.jsx)(xh,{variant:"text",disableElevation:!0,type:"reset",onClick:h,sx:{"&.MuiButtonBase-root:hover":{bgcolor:"transparent"}},children:(0,qt.jsx)(J_.A,{})})})]}),(0,qt.jsx)(op,{className:"globalSearchParent",sx:{position:"absolute",width:"100%",background:"#ffffff",zIndex:"1",borderBottom:"1px solid #efefef",maxHeight:"350px",overflow:"auto",scrollbarWidth:"thin","&::-webkit-scrollbar":{width:"0.2em"},"&::-webkit-scrollbar-track":{background:"#f1f1f1"},"&::-webkit-scrollbar-thumb":{backgroundColor:"#888"},"&::-webkit-scrollbar-thumb:hover":{background:"#555"}},children:(null===d||void 0===d?void 0:d.length)>0&&(0,qt.jsx)(zh,{dense:!0,children:d.map((e,t)=>(0,qt.jsx)(Ag,{button:!0,onClick:()=>m(e),children:(0,qt.jsx)(Dg,{onKey:e=>console.log(e),primary:(0,qt.jsx)(qt.Fragment,{children:(0,qt.jsx)(op,{display:"flex",alignItems:"center",justifyContent:"space-between",children:(0,qt.jsx)("span",{children:Tue("".concat(null===e||void 0===e?void 0:e.display_name),null===r||void 0===r?void 0:r.programName)})})})})},t))})})]})})})})},"filter_formik")},Mue=n.p+"static/media/defaultIcon.e88799ac34b526d941f9.png";function Oue(e){let{userData:t,programList:n,order:r,orderBy:i,setOrder:o,setOrderBy:a,dataParameter:s,programHead:l,checkState:c,onCheck:d,isSelection:u,nodata:p,fetchProgramList:h,pageDetails:m,viewButton:f,editButton:g,scheduleButton:v,programModal:x,handleProgramModalToggle:y,addNewProgram:b,editProgram:j,ruleButton:_,fetchStates:C,countries:w,states:S,setHeadcells:A,settingModal:k,initialHeadcells:T,handleSettingModalToggle:E,filterState:M,setFilterState:O,programSuggestions:R,fetchProgramListSuggestions:P}=e;const{t:D}=Vg();return(0,qt.jsxs)(op,{sx:{width:"100%"},children:[(0,qt.jsx)(op,{sx:{mb:2.5},children:(0,qt.jsxs)(Ff,{container:!0,spacing:2,alignItems:"center",children:[(0,qt.jsx)(Ff,{item:!0,xs:!0,children:(0,qt.jsx)(Cf,{variant:"h5",gutterBottom:!0,component:"h5",children:D("rpm_Programs")})}),(null===t||void 0===t?void 0:t.showAddProgramBtn)&&(null===t||void 0===t?void 0:t.isAdmin)&&(0,qt.jsx)(Ff,{item:!0,children:(0,qt.jsxs)(xh,{variant:"contained",color:"primary",disableElevation:!0,onClick:()=>{y({})},className:(null===t||void 0===t?void 0:t.showAddProgramBtn)&&"program-tour-step2",children:[(0,qt.jsx)(jue.A,{}),(0,qt.jsx)(Cf,{component:"span",className:"hideOnMobile",children:D("rpm_AddProgram")})]})})]})}),(0,qt.jsx)(op,{bgcolor:"#fff",sx:{borderTopLeftRadius:"8px",borderTopRightRadius:"8px"},children:(0,qt.jsxs)(Ff,{container:!0,spacing:1,children:[(0,qt.jsx)(Ff,{item:!0,lg:7,md:9,sm:9,xs:10,children:(0,qt.jsx)(Eue,{pageDetails:m,fetchListFunction:h,filterState:M,setFilterState:O,programSuggestions:R,fetchProgramListSuggestions:P,placeholder:"Search by program name"})}),(0,qt.jsx)(Ff,{item:!0,sx:{ml:"auto"},sm:3,xs:2,textAlign:"end",children:(0,qt.jsx)(sy,{title:D("rpm_TableCellSetting"),children:(0,qt.jsx)(sv,{sx:{boxShadow:"none",width:32,height:32,minHeight:"auto",marginRight:"10px",marginTop:"5px"},size:"small",color:"primary",onClick:E,children:(0,qt.jsx)(YC.A,{fontSize:"small",sx:{width:16,height:16}})})})}),(0,qt.jsxs)(Ff,{item:!0,xs:12,children:[(0,qt.jsx)(op,{children:(0,qt.jsx)(UT,{order:r,orderBy:i,setOrder:o,setOrderBy:a,data:n,headCells:null===l||void 0===l?void 0:l.filter(e=>T.includes(e.id)),dataParameter:s,selected:c,setSelected:d,isSelection:u,noDataImage:p,fetchList:h,pageDetails:m,skeletonVrows:6,className:"theme_scroll",children:null===n||void 0===n?void 0:n.map(e=>{var t,n,r,i;return(0,qt.jsxs)(cw,{sx:{"&:last-child td, &:last-child th":{border:0}},className:"program-tour-step0",children:[u&&(0,qt.jsx)(gw,{padding:"checkbox",children:(0,qt.jsx)(Dw,{onChange:d,checked:c.includes(e.code),name:e.code,color:"primary"})}),T.includes("name")&&(0,qt.jsx)(gw,{children:(0,qt.jsxs)(op,{display:"flex",alignItems:"center",children:[(0,qt.jsx)(Lo,{className:"linkClr",to:"".concat(e.code,"/patients"),children:e.display_name}),(null===e||void 0===e?void 0:e.def)&&(0,qt.jsx)(op,{ml:1.5,mt:1,children:(0,qt.jsx)("img",{src:Mue,height:20,width:20})})]})}),T.includes("location")&&(0,qt.jsx)(gw,{children:e.city}),T.includes("updated_at")&&(0,qt.jsx)(gw,{children:e.updated_at}),T.includes("updated_by")&&(0,qt.jsx)(gw,{children:e.updated_by}),T.includes("action")&&(0,qt.jsx)(gw,{children:(0,qt.jsxs)(op,{className:"program-tour-step1",width:"fit-content",children:[(null===(t=e.permissions)||void 0===t?void 0:t.showEditProgramBtn)&&g(e),(null===(n=e.permissions)||void 0===n?void 0:n.showViewProgramBtn)&&f(e),(null===(r=e.permissions)||void 0===r?void 0:r.showRuleList)&&_(e),(null===(i=e.permissions)||void 0===i?void 0:i.showCourseList)&&v(e)]})})]},e.code)})})}),(0,qt.jsx)(KE,{pageDetails:m,fetchListFunction:h})]})]})}),x.open&&(0,qt.jsx)(Aue,{openModal:x,onCloseModal:y,addNewProgram:b,editProgram:j,fetchStates:C,countries:w,states:S}),(0,qt.jsx)(TE,{open:k,allHeadCells:l,initialHeadcells:T,setHeadcells:A,onClose:E})]})}Oue.defaultProps={programHead:[],pageDetails:{},order:"",orderBy:"",setOrder:()=>{},setOrderBy:()=>{},dataParameter:"",checkState:"",onCheck:()=>{},isSelection:"",nodata:"",programList:[],fetchProgramList:()=>{},editButton:()=>{},viewButton:()=>{},deleteButton:()=>{},programModal:!1,handleProgramModalToggle:()=>{},addNewProgram:()=>{},editProgram:()=>{},ruleButton:()=>{},scheduleButton:()=>{},fetchCountries:()=>{},fetchStates:()=>{},countries:[],states:[],initialHeadcells:[],setHeadcells:()=>{},settingModal:!1,handleSettingModalToggle:()=>{},showFilterColor:"",setShowFilterColor:()=>{},filterState:{},setFilterState:()=>{},programSuggestions:[],fetchProgramListSuggestions:()=>{}};const Rue=Oue;const Pue=function(e){let{fetchProgramList:t,pageDetails:n,userData:r,fetchAllProgramList:o}=e;const a=Nt(),s=so(),l=VC(JA().breakpoints.down("sm")),{t:c}=Vg(),{programList:d}=(0,We.useContext)(DC),[u,p]=We.useState(""),h=wt(bu),m=!("true"===us(h,"user_principal.attributes.skip_tour[0]","")),[f,g]=(0,We.useState)("desc"),[v,x]=(0,We.useState)("updated_at"),[y,b]=(0,We.useState)([]),[j,_]=(0,We.useState)([]),[C,w]=(0,We.useState)([]),[S,A]=We.useState({open:!1,data:{}}),[k,T]=We.useState({open:!1,data:{}}),[E,M]=We.useState(!1),[O,R]=We.useState(null),[P,D]=We.useState({programName:""}),[N,L]=We.useState(""),[I,F]=(0,We.useState)(!1),[$,B]=(0,We.useState)(null),z=l?["name","action"]:["name","location","updated_at","updated_by","action"],H=e=>{T((0,i.A)((0,i.A)({},k),{},{open:!k.open,data:e}))},W=e=>{S.open?(_([]),w([]),A({})):Q(e)},[U,V]=We.useState(!1),[G,q]=We.useState(cs($o.getAllProgramsCells())?z:$o.getAllProgramsCells()),Y=function(e){q(e),$o.setAllProgramsCells(e)};We.useEffect(()=>{Y(z)},[l]);const Z=async(e,t,n)=>{try{const{data:n}=await a(ec());if(n){if(n===S.data.display_name)return K(e,t);L(n),F(!!n)}}catch(r){return n?K(e,t):zs(e)}},K=async(e,n)=>{let{setErrors:r,resetForm:s}=n;const l=(0,i.A)((0,i.A)({id:S.data.id},e),{},{country:e.country,state:e.state});try{await a(Hs(l)),s(),a(Zo({subTitle:"message:rpm_ProgramUpdatedSuccessfully",severity:ud.SUCCESS})),o(),t(),A({open:!1,data:{}}),B(null),X()}catch(c){const e=us(c,"response.data.field_errors",{}),t=us(c,"response.data.code","");cs(e)?cs(t)?a(Zo({subTitle:c.message,severity:ud.ERROR})):a(Zo({subTitle:Vd(t,"error:rpm_ProgramUpdateFailed"),severity:ud.ERROR})):r(Ud(e))}},X=()=>{F(!1)},Q=async e=>{const t=await ks(null===e||void 0===e?void 0:e.image,null===e||void 0===e?void 0:e.display_name);await a(uue((0,i.A)((0,i.A)({},n),{},{countryCode:e.country}),"RPM",n=>{let{countries:r,states:o}=n;_(r.content),w(o.content),A({open:!S.open,data:(0,i.A)((0,i.A)({},e),{},{image:t})})},()=>{}))};We.useEffect(()=>{a(NC({activeMenuItem:"programs",heading:{}}))},[]);const J=[{id:"name",label:c("rpm_Name"),isSort:!1,sortProperty:"name"},{id:"location",label:c("rpm_Location"),isSort:!1,sortProperty:"location"},{id:"updated_at",label:c("rpm_DateModified"),isSort:!1,sortProperty:"updated_at"},{id:"updated_by",label:c("rpm_ModifiedBy"),isSort:!1,sortProperty:"updated_by"},{id:"action",label:c("rpm_Actions"),isSort:!1,sortProperty:"action"}];return We.useEffect(()=>()=>{t()},[]),(0,qt.jsxs)(qt.Fragment,{children:[(0,qt.jsx)(Rue,{userData:r,order:f,orderBy:v,setOrder:g,setOrderBy:x,dataParameter:"code",checkState:y,onCheck:e=>{if(Array.isArray(e))return b(e.map(e=>e));const t=e.target.name;y.includes(t)?b(y.filter(e=>e!==t)):b(e=>[...e,t])},isSelection:!1,nodata:GC,programHead:J,programList:d,fetchProgramList:t,pageDetails:n,editButton:e=>(0,qt.jsx)(sy,{title:c("rpm_Edit"),children:(0,qt.jsx)(wh,{"data-id":e.id,color:"primary",onClick:()=>W(e),children:(0,qt.jsx)(fc,{fontSize:"small",sx:{width:16,height:16}})})}),viewButton:e=>(0,qt.jsx)(sy,{title:c("rpm_view"),children:(0,qt.jsx)(wh,{"data-id":e.id,color:"primary",onClick:()=>s("".concat(e.code,"/patients")),children:(0,qt.jsx)(gc,{fontSize:"small",sx:{width:16,height:16}})})}),deleteButton:e=>(0,qt.jsx)(wh,{"data-id":e.id,color:"error",onClick:()=>H(e),children:(0,qt.jsx)(xc,{fontSize:"small",sx:{width:16,height:16}})}),scheduleButton:e=>(0,qt.jsx)(sy,{title:c("rpm_Schedule"),children:(0,qt.jsx)(wh,{"data-id":e.id,color:"primary",onClick:()=>s("".concat(e.code,"/course")),children:(0,qt.jsx)(bue.A,{fontSize:"small",sx:{width:16,height:16}})})}),programModal:S,handleProgramModalToggle:W,addNewProgram:async(e,n)=>{let{setErrors:r,resetForm:l}=n;const c=(0,i.A)((0,i.A)({},e),{},{country:e.country,state:e.state});try{const{data:e}=await a(zs(c));l(),await a(Ks(null===e||void 0===e?void 0:e.code,Cd)),a(Zo({subTitle:"message:rpm_ProgramCreatedSuccessfully",severity:ud.SUCCESS})),s("".concat(null===e||void 0===e?void 0:e.code,"/course")),o(),t(),A({open:!1,data:{}})}catch(d){const e=us(d,"response.data.field_errors",{}),t=us(d,"response.data.code","");cs(e)?cs(t)?a(Zo({subTitle:d.message,severity:ud.ERROR})):a(Zo({subTitle:Vd(t,"error:rpm_ProgramCreateFailed"),severity:ud.ERROR})):r(Ud(e))}},editProgram:(e,t,n)=>{let{setErrors:r,resetForm:i}=t;null!==e&&void 0!==e&&e.def?(B({setErrors:r,resetForm:i,values:e}),Z(e,{setErrors:r,resetForm:i},n)):n?K(e,{setErrors:r,resetForm:i}):zs(e)},ruleButton:e=>(0,qt.jsx)(sy,{title:c("rpm_Rule"),children:(0,qt.jsx)(wh,{"data-id":e.id,color:"primary",onClick:()=>s("".concat(e.code,"/rules")),children:(0,qt.jsx)(yue.A,{fontSize:"small",sx:{width:16,height:16}})})}),fetchStates:async function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{q:""};await a(hue(e,t,"RPM",e=>{let{states:t}=e;w(t.content)},()=>{}))},countries:j,states:C,setHeadcells:Y,settingModal:U,initialHeadcells:G,handleSettingModalToggle:()=>{V(!U)},showFilterColor:E,setShowFilterColor:M,filterState:P,setFilterState:D,programSuggestions:O,fetchProgramListSuggestions:async e=>{if(null!==e&&void 0!==e&&e.programName){if(null!==e&&void 0!==e&&e.programName.trim())try{const{data:t}=await a(Ws((0,i.A)((0,i.A)({},n),{},{current_page:1}),e)),{content:r}=t||{};R(r)}catch(r){console.log(r)}}else R([]),t()}}),(0,qt.jsx)(qV,{openModal:k.open,onCloseModal:H,actionFunction:()=>console.log(k),dataName:k.data.display_name,options:{primaryText:c("message:rpm_DeleteTitle"),secondaryText:c("message:rpm_DeleteBodyText"),descText:c("message:rpm_DeleteSubText"),btn:{primaryText:c("rpm_Delete"),secondaryText:c("rpm_Cancel"),primaryColor:"error",secondaryColor:"primary"},btnSwap:!0}}),(0,qt.jsx)(qV,{openModal:I,onCloseModal:X,actionFunction:()=>K($.values,{setErrors:$.setErrors,resetForm:$.resetForm}),options:{primaryText:c("message:rpm_confirmation"),secondaryText:c("message:rpm_defaultProgramConfirm",{program:N}),btn:{primaryText:c("rpm_continue"),secondaryText:c("rpm_Cancel"),primaryColor:"error",secondaryColor:"primary"},btnSwap:!0}}),!cs(d)&&!cs(r)&&(0,qt.jsxs)(qt.Fragment,{children:[(0,qt.jsx)(zZ,{isTour:m,path:"programsTour",setRenderer:p}),(0,qt.jsx)("input",{type:"hidden",id:"rerenderer",value:u})]})]})},Due=ds((e,t)=>{console.log(t);/^\++$/.test(t.trim())||e({patientName:t})},500);function Nue(e,t){const n=null===e||void 0===e?void 0:e.split(new RegExp("(".concat(t,")"),"gi"));return(0,qt.jsx)(qt.Fragment,{children:null===n||void 0===n?void 0:n.map((e,n)=>(null===e||void 0===e?void 0:e.toLowerCase())===(null===t||void 0===t?void 0:t.toLowerCase())?(0,qt.jsx)("span",{style:{fontWeight:"bold"},children:e},n):(0,qt.jsx)("span",{children:e},n))})}const Lue=function(e){let{pageDetails:t,fetchListFunction:n,filterState:r,setFilterState:o,patientSuggestions:a,fetchPatientListSuggestions:s,placeholder:l,helpText:c}=e;const{t:d}=Vg(),[u,p]=(0,We.useState)([]);(0,We.useEffect)(()=>{p(a)},[a]);const h=(0,We.useCallback)((e,t)=>{Due(s,t)},[s]),m=()=>{t.current_page=1,o({patientName:"",urn:""}),n({patientName:""}),h(null,"")},f=e=>{var a;t.current_page=1,o((0,i.A)((0,i.A)({},r),{},{patientName:"".concat(e.first_name," ").concat(e.last_name),urn:(null===e||void 0===e?void 0:e.urn)||""})),n((0,i.A)((0,i.A)({},r),{},{patientName:"".concat(null===(a=cJ(e.mobile))||void 0===a?void 0:a.nationalNumber)})),p([])};return(0,qt.jsx)(Kz,{initialValues:{patientName:""},onSubmit:()=>console.log("PatientFilter"),enableReinitialize:!0,children:()=>(0,qt.jsx)(nH,{children:(0,qt.jsx)(op,{sx:{borderRadius:"8px",width:"100%"},py:.2,pl:1,mr:2,className:"course_filter WhiteBG",children:(0,qt.jsx)(Ff,{container:!0,spacing:2,alignItems:"center",position:"relative",children:(0,qt.jsxs)(Ff,{item:!0,width:"100%",className:"globalSearchBox",children:[(0,qt.jsxs)(op,{py:.2,display:"flex",alignItems:"center",position:"relative",width:"100%",children:[(0,qt.jsx)(qj,{sx:{position:"relative"},fullWidth:!0,size:"medium",className:"patients-tour-step0",placeholder:l,value:r.patientName,onKeyDown:e=>{if("Enter"===e.key&&(null===u||void 0===u?void 0:u.length)>0){const e=u[0];o((0,i.A)((0,i.A)({},r),{},{programName:null===e||void 0===e?void 0:e.display_name})),f(e)}},onChange:e=>{let t=e.target.value;o((0,i.A)((0,i.A)({},r),{},{patientName:t})),h(null,t)},endAdornment:(0,qt.jsx)(tw,{position:"end",children:(0,qt.jsx)(sy,{title:d(c||"message:rpm_SearchPatientFilterBar"),placement:"top",children:(0,qt.jsx)(wh,{size:"small",children:(0,qt.jsx)(pM.A,{fontSize:"small"})})})})}),(0,qt.jsx)(op,{position:"absolute",right:"23px",children:!cs(null===r||void 0===r?void 0:r.patientName)&&(0,qt.jsx)(xh,{variant:"text",disableElevation:!0,type:"reset",onClick:m,sx:{"&.MuiButtonBase-root:hover":{bgcolor:"transparent"}},children:(0,qt.jsx)(J_.A,{})})})]}),(0,qt.jsx)(op,{className:"globalSearchParent",sx:{position:"absolute",width:"100%",background:"#ffffff",zIndex:"1",borderBottom:"1px solid #efefef",maxHeight:"350px",overflow:"auto",scrollbarWidth:"thin","&::-webkit-scrollbar":{width:"0.2em"},"&::-webkit-scrollbar-track":{background:"#f1f1f1"},"&::-webkit-scrollbar-thumb":{backgroundColor:"#888"},"&::-webkit-scrollbar-thumb:hover":{background:"#555"}},children:(null===u||void 0===u?void 0:u.length)>0&&(0,qt.jsx)(zh,{dense:!0,children:null===u||void 0===u?void 0:u.map((e,t)=>(0,qt.jsx)(Ag,{button:!0,onClick:()=>f(e),children:(0,qt.jsx)(Dg,{primary:(0,qt.jsx)(qt.Fragment,{children:(0,qt.jsxs)(op,{display:"flex",alignItems:"center",justifyContent:"space-between",children:[(0,qt.jsx)("span",{children:Nue("".concat(null===e||void 0===e?void 0:e.first_name," ").concat(null===e||void 0===e?void 0:e.last_name),null===r||void 0===r?void 0:r.patientName)}),(0,qt.jsx)("span",{children:Nue(null===e||void 0===e?void 0:e.mobile,null===r||void 0===r?void 0:r.patientName)})]})})})},t))})})]})})})})},"filter_formik")},Iue=["children","onClose"],Fue=e=>{const{children:t,onClose:n}=e,r=Ko(e,Iue);return(0,qt.jsxs)(fC,(0,i.A)((0,i.A)({sx:{paddingY:"13px",fontWeight:600}},r),{},{children:[t,n?(0,qt.jsx)(wh,{"aria-label":"close",onClick:n,sx:{position:"absolute",right:16,top:8,color:e=>e.palette.grey[500]},children:(0,qt.jsx)(J_.A,{})}):null]}))},$ue=e=>{let{programDialogOpen:t,handleCloseProgramDialog:n,selectedPrograms:r}=e;const{t:i}=Vg(),o=e=>"fitnessCenter"===e?"#FED7AA":"wellnessCenter"===e?"#BBF7D0":"hospital"===e?" #BFDBFE":"clinic"===e?"#c4eff1":void 0;return(0,qt.jsxs)(cC,{open:t,onClose:n,maxWidth:"sm",fullWidth:!0,children:[(0,qt.jsx)(Fue,{onClose:n,children:i("rpm_assignedPrograms")}),(0,qt.jsx)(eg,{fullWidth:!0,orientation:"horizontal"}),(0,qt.jsx)(op,{maxHeight:"400px",overflow:"auto",children:(0,qt.jsx)(zh,{children:r.map((e,t)=>{var n;return(0,qt.jsxs)(qt.Fragment,{children:[(0,qt.jsxs)(Ag,{sx:{minWidth:"380px"},children:[(0,qt.jsx)(op,{display:"flex",alignItems:"center",justifyContent:"center",bgcolor:"#ebebff",color:"grey.800",fontWeight:700,borderRadius:"50%",width:40,height:40,fontSize:"16px",mr:1,children:null===e||void 0===e||null===(n=e.display_name)||void 0===n?void 0:n.charAt(0).toUpperCase()}),(0,qt.jsx)(Dg,{primary:(0,qt.jsx)(op,{fontSize:"16px",fontWeight:500,children:e.display_name})}),(0,qt.jsx)(op,{bgcolor:o(e.facility_type),component:"span",fontSize:"13px",padding:"2px 8px 2px 8px",borderRadius:"16px",marginLeft:{xs:"0px",sm:"8px"},fontWeight:500,alignItems:"center",children:i("".concat(e.facility_type))})]},e.id),t!==r.length-1&&(0,qt.jsx)(eg,{fullWidth:!0,orientation:"horizontal"})]})})})})]})};const Bue=function(e){let{allUserList:t,order:n,orderBy:r,setOrder:i,setOrderBy:o,dataParameter:a,initialHeadcells:s,headCellsItems:l,checkState:c,onCheck:d,isSelection:u,nodata:p,fetchPatientList:h,newPageDetails:m,fetchAllPatientsListSuggestions:f,allpatientSuggestions:g,filterState:v,setFilterState:x}=e;const{t:y}=Vg(),[b,j]=We.useState(!1),[_,C]=We.useState([]);return(0,qt.jsxs)(qt.Fragment,{children:[(0,qt.jsx)(op,{sx:{mb:3.5},children:(0,qt.jsx)(Ff,{container:!0,spacing:2,alignItems:"center",children:(0,qt.jsx)(Ff,{item:!0,xs:!0,children:(0,qt.jsx)(Cf,{variant:"h5",gutterBottom:!0,component:"h5",sx:{marginBottom:"0"},children:y("rpm_AllUsersList")})})})}),(0,qt.jsx)(yp,{elevation:0,children:(0,qt.jsxs)(Ff,{container:!0,alignItems:"center",spacing:2,className:"all-users-search",children:[(0,qt.jsx)(Ff,{item:!0,lg:7,md:9,xs:10,sm:10,children:(0,qt.jsx)(Lue,{pageDetails:m,fetchListFunction:h,filterState:v,setFilterState:x,patientSuggestions:g,fetchPatientListSuggestions:f,placeholder:"Search by name or phone number",helpText:"Enter name of the user"})}),(0,qt.jsxs)(Ff,{item:!0,xs:12,children:[(0,qt.jsx)(op,{marginTop:"-6px",children:(0,qt.jsx)(UT,{order:n,orderBy:r,setOrder:i,setOrderBy:o,data:t,headCells:l.filter(e=>s.includes(e.id)),dataParameter:a,selected:c,setSelected:d,isSelection:u,noDataImage:p,fetchList:h,pageDetails:m,skeletonVrows:6,className:"theme_scroll",children:(t||[]).map(e=>{const{years:t}=vs(null===e||void 0===e?void 0:e.birth_date);return(0,qt.jsxs)(cw,{hover:!0,selected:c.includes(e.id.toString()),sx:{"&:last-child td, &:last-child th":{border:0}},children:[u&&(0,qt.jsx)(gw,{padding:"checkbox",children:(0,qt.jsx)(Dw,{onChange:d,checked:c.includes(e.id.toString()),name:e.id,color:"primary"})}),s.includes("patient_name")&&(0,qt.jsx)(gw,{children:e.first_name+" "+e.last_name}),s.includes("email")&&(0,qt.jsx)(gw,{children:(0,qt.jsx)(Lo,{to:"mailto:".concat(e.email),children:e.email})}),s.includes("age")&&(0,qt.jsx)(gw,{children:t}),s.includes("mobile_no")&&(0,qt.jsx)(gw,{children:e.mobile}),s.includes("actions")&&(0,qt.jsx)(gw,{children:(0,qt.jsx)(op,{className:"patients-tour-step3",width:"fit-content",children:(0,qt.jsx)(xh,{"data-id":e.id,color:"primary",variant:"contained",disableElevation:!0,onClick:()=>{return t=e.program_details,C(t||[]),void j(!0);var t},children:y("rpm_viewPrograms")})})})]},e.id)})})}),(0,qt.jsx)(KE,{pageDetails:m,fetchListFunction:h}),(0,qt.jsx)($ue,{programDialogOpen:b,handleCloseProgramDialog:()=>{j(!1),C([])},selectedPrograms:_})]})]})})]})},zue=["content"];const Hue=function(){const e=Nt(),t=wt(cu),n=wt(bu),r=!("true"===us(n,"user_principal.attributes.skip_tour[0]","")),{t:o}=Vg(),a="000000",[s,l]=(0,We.useState)("desc"),[c,d]=(0,We.useState)("created_at"),[u,p]=(0,We.useState)([]),[h,m]=(0,We.useState)([]),[f,g]=(0,We.useState)([]),[v,x]=We.useState(""),[y,b]=We.useState({patientName:""}),[j,_]=(0,We.useState)((0,i.A)({},dd)),C=["patient_name","email","age","mobile_no","actions"],w=[{id:"patient_name",label:o("rpm_AllUsers"),isSort:!0,sortProperty:"first_name"},{id:"email",label:o("rpm_Email"),isSort:!0,sortProperty:"email"},{id:"age",label:o("rpm_Age"),isSort:!0,sortProperty:"dob"},{id:"mobile_no",label:o("rpm_MobileNumber"),isSort:!0,sortProperty:"mobile_no"},{id:"actions",label:o("rpm_Actions"),isSort:!1,sortProperty:"actions"}],[S,A]=We.useState(ta()($o.getHeadCellsPatient())?C:$o.getHeadCellsPatient()),k=async t=>{const n=(0,i.A)((0,i.A)({sort_by:c,sort_order:s},j),{},{newFilterState:t});try{const{data:t}=await e(sl(a,n)),r=t||{},{content:o}=r,s=Ko(r,zue);m(o),_(e=>(0,i.A)((0,i.A)({},e),{},{last_page:s.last_page,current_page:s.current_page,from:s.from,per_page:s.per_page,to:s.to,total:s.total}))}catch(r){console.log(r)}};return We.useEffect(()=>{var e;A(e=C),$o.setHeadCellsPatient(e)},[]),We.useEffect(()=>{e(NC({activeMenuItem:"allusers",heading:{}})),k()},[]),We.useEffect(()=>{t&&k()},[t]),(0,qt.jsxs)(qt.Fragment,{children:[(0,qt.jsx)(Bue,{allUserList:h,order:s,orderBy:c,setOrder:l,setOrderBy:d,dataParameter:"id",initialHeadcells:S,headCellsItems:w,checkState:u,onCheck:e=>{if(Array.isArray(e))return p(e.map(e=>e.toString()));const t=e.target.name;u.includes(t)?p(u.filter(e=>e!==t)):p(e=>[...e,t])},isSelection:!1,nodata:GC,fetchPatientList:k,newPageDetails:j,fetchAllPatientsListSuggestions:async t=>{const n=(0,i.A)((0,i.A)({sort_by:c,sort_order:s,newFilterState:t},j),{},{current_page:1});if(t.patientName){if(null!==t&&void 0!==t&&t.patientName.trim())try{const{data:t}=await e(sl(a,n)),{content:r}=t||{};g(r)}catch(r){console.log(r)}}else g([]),k()},allpatientSuggestions:f,filterState:y,setFilterState:b}),(0,qt.jsx)(zZ,{isTour:r,path:"allPatientsTour",setRenderer:x}),(0,qt.jsx)("input",{type:"hidden",id:"rerenderer",value:v})]})};function Wue(e){return(0,sr.Ay)("MuiFormGroup",e)}(0,ar.A)("MuiFormGroup",["root","row","error"]);const Uue=["className","row"],Vue=(0,Vn.Ay)("div",{name:"MuiFormGroup",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.row&&t.row]}})(e=>{let{ownerState:t}=e;return(0,Ft.A)({display:"flex",flexDirection:"column",flexWrap:"wrap"},t.row&&{flexDirection:"row"})}),Gue=We.forwardRef(function(e,t){const n=(0,$t.b)({props:e,name:"MuiFormGroup"}),{className:r,row:i=!1}=n,o=(0,nn.A)(n,Uue),a=fj({props:n,muiFormControl:vj(),states:["error"]}),s=(0,Ft.A)({},n,{row:i,error:a.error}),l=(e=>{const{classes:t,row:n,error:r}=e,i={root:["root",n&&"row",r&&"error"]};return(0,ir.A)(i,Wue,t)})(s);return(0,qt.jsx)(Vue,(0,Ft.A)({className:(0,nr.A)(l.root,r),ownerState:s,ref:t},o))}),que=Gue,Yue=(0,Cy.A)((0,qt.jsx)("path",{d:"M19 6.41 17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z"}),"Close"),Zue=(0,Cy.A)((0,qt.jsx)("path",{d:"M19 13h-6v6h-2v-6H5v-2h6V5h2v6h6z"}),"Add");var Kue=n(50805),Xue=We.createContext(null);var Que=function(e){e()};function Jue(){var e=Que,t=null,n=null;return{clear:function(){t=null,n=null},notify:function(){e(function(){for(var e=t;e;)e.callback(),e=e.next})},get:function(){for(var e=[],n=t;n;)e.push(n),n=n.next;return e},subscribe:function(e){var r=!0,i=n={callback:e,next:null,prev:n};return i.prev?i.prev.next=i:t=i,function(){r&&null!==t&&(r=!1,i.next?i.next.prev=i.prev:n=i.prev,i.prev?i.prev.next=i.next:t=i.next)}}}}var epe={notify:function(){},get:function(){return[]}};function tpe(e,t){var n,r=epe;function i(){a.onStateChange&&a.onStateChange()}function o(){n||(n=t?t.addNestedSub(i):e.subscribe(i),r=Jue())}var a={addNestedSub:function(e){return o(),r.subscribe(e)},notifyNestedSubs:function(){r.notify()},handleChangeWrapper:i,isSubscribed:function(){return Boolean(n)},trySubscribe:o,tryUnsubscribe:function(){n&&(n(),n=void 0,r.clear(),r=epe)},getListeners:function(){return r}};return a}var npe="undefined"!==typeof window&&"undefined"!==typeof window.document&&"undefined"!==typeof window.document.createElement?We.useLayoutEffect:We.useEffect;const rpe=function(e){var t=e.store,n=e.context,r=e.children,i=(0,We.useMemo)(function(){var e=tpe(t);return{store:t,subscription:e}},[t]),o=(0,We.useMemo)(function(){return t.getState()},[t]);npe(function(){var e=i.subscription;return e.onStateChange=e.notifyNestedSubs,e.trySubscribe(),o!==t.getState()&&e.notifyNestedSubs(),function(){e.tryUnsubscribe(),e.onStateChange=null}},[i,o]);var a=n||Xue;return We.createElement(a.Provider,{value:i},r)};var ipe=n(42348),ope=["getDisplayName","methodName","renderCountProp","shouldHandleStateChanges","storeKey","withRef","forwardRef","context"],ape=["reactReduxForwardedRef"],spe=[],lpe=[null,null];function cpe(e,t){var n=e[1];return[t.payload,n+1]}function dpe(e,t,n){npe(function(){return e.apply(void 0,t)},n)}function upe(e,t,n,r,i,o,a){e.current=r,t.current=i,n.current=!1,o.current&&(o.current=null,a())}function ppe(e,t,n,r,i,o,a,s,l,c){if(e){var d=!1,u=null,p=function(){if(!d){var e,n,p=t.getState();try{e=r(p,i.current)}catch(Ca){n=Ca,u=Ca}n||(u=null),e===o.current?a.current||l():(o.current=e,s.current=e,a.current=!0,c({type:"STORE_UPDATED",payload:{error:n}}))}};n.onStateChange=p,n.trySubscribe(),p();return function(){if(d=!0,n.tryUnsubscribe(),n.onStateChange=null,u)throw u}}}var hpe=function(){return[null,0]};function mpe(e,t){void 0===t&&(t={});var n=t,r=n.getDisplayName,i=void 0===r?function(e){return"ConnectAdvanced("+e+")"}:r,o=n.methodName,a=void 0===o?"connectAdvanced":o,s=n.renderCountProp,l=void 0===s?void 0:s,c=n.shouldHandleStateChanges,d=void 0===c||c,u=n.storeKey,p=void 0===u?"store":u,h=(n.withRef,n.forwardRef),m=void 0!==h&&h,f=n.context,g=void 0===f?Xue:f,v=(0,nn.A)(n,ope),x=g;return function(t){var n=t.displayName||t.name||"Component",r=i(n),o=(0,Ft.A)({},v,{getDisplayName:i,methodName:a,renderCountProp:l,shouldHandleStateChanges:d,storeKey:p,displayName:r,wrappedComponentName:n,WrappedComponent:t}),s=v.pure;var c=s?We.useMemo:function(e){return e()};function u(n){var r=(0,We.useMemo)(function(){var e=n.reactReduxForwardedRef,t=(0,nn.A)(n,ape);return[n.context,e,t]},[n]),i=r[0],a=r[1],s=r[2],l=(0,We.useMemo)(function(){return i&&i.Consumer&&(0,ipe.isContextConsumer)(We.createElement(i.Consumer,null))?i:x},[i,x]),u=(0,We.useContext)(l),p=Boolean(n.store)&&Boolean(n.store.getState)&&Boolean(n.store.dispatch);Boolean(u)&&Boolean(u.store);var h=p?n.store:u.store,m=(0,We.useMemo)(function(){return function(t){return e(t.dispatch,o)}(h)},[h]),f=(0,We.useMemo)(function(){if(!d)return lpe;var e=tpe(h,p?null:u.subscription),t=e.notifyNestedSubs.bind(e);return[e,t]},[h,p,u]),g=f[0],v=f[1],y=(0,We.useMemo)(function(){return p?u:(0,Ft.A)({},u,{subscription:g})},[p,u,g]),b=(0,We.useReducer)(cpe,spe,hpe),j=b[0][0],_=b[1];if(j&&j.error)throw j.error;var C=(0,We.useRef)(),w=(0,We.useRef)(s),S=(0,We.useRef)(),A=(0,We.useRef)(!1),k=c(function(){return S.current&&s===w.current?S.current:m(h.getState(),s)},[h,j,s]);dpe(upe,[w,C,A,s,k,S,v]),dpe(ppe,[d,h,g,m,w,C,A,S,v,_],[h,g,m]);var T=(0,We.useMemo)(function(){return We.createElement(t,(0,Ft.A)({},k,{ref:a}))},[a,t,k]);return(0,We.useMemo)(function(){return d?We.createElement(l.Provider,{value:y},T):T},[l,T,y])}var h=s?We.memo(u):u;if(h.WrappedComponent=t,h.displayName=u.displayName=r,m){var f=We.forwardRef(function(e,t){return We.createElement(h,(0,Ft.A)({},e,{reactReduxForwardedRef:t}))});return f.displayName=r,f.WrappedComponent=t,At()(f,t)}return At()(h,t)}}function fpe(e,t){return e===t?0!==e||0!==t||1/e===1/t:e!==e&&t!==t}function gpe(e,t){if(fpe(e,t))return!0;if("object"!==typeof e||null===e||"object"!==typeof t||null===t)return!1;var n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(var i=0;i<n.length;i++)if(!Object.prototype.hasOwnProperty.call(t,n[i])||!fpe(e[n[i]],t[n[i]]))return!1;return!0}function vpe(e){return function(t,n){var r=e(t,n);function i(){return r}return i.dependsOnOwnProps=!1,i}}function xpe(e){return null!==e.dependsOnOwnProps&&void 0!==e.dependsOnOwnProps?Boolean(e.dependsOnOwnProps):1!==e.length}function ype(e,t){return function(t,n){n.displayName;var r=function(e,t){return r.dependsOnOwnProps?r.mapToProps(e,t):r.mapToProps(e)};return r.dependsOnOwnProps=!0,r.mapToProps=function(t,n){r.mapToProps=e,r.dependsOnOwnProps=xpe(e);var i=r(t,n);return"function"===typeof i&&(r.mapToProps=i,r.dependsOnOwnProps=xpe(i),i=r(t,n)),i},r}}const bpe=[function(e){return"function"===typeof e?ype(e):void 0},function(e){return e?void 0:vpe(function(e){return{dispatch:e}})},function(e){return e&&"object"===typeof e?vpe(function(t){return function(e,t){var n={},r=function(r){var i=e[r];"function"===typeof i&&(n[r]=function(){return t(i.apply(void 0,arguments))})};for(var i in e)r(i);return n}(e,t)}):void 0}];const jpe=[function(e){return"function"===typeof e?ype(e):void 0},function(e){return e?void 0:vpe(function(){return{}})}];function _pe(e,t,n){return(0,Ft.A)({},n,e,t)}const Cpe=[function(e){return"function"===typeof e?function(e){return function(t,n){n.displayName;var r,i=n.pure,o=n.areMergedPropsEqual,a=!1;return function(t,n,s){var l=e(t,n,s);return a?i&&o(l,r)||(r=l):(a=!0,r=l),r}}}(e):void 0},function(e){return e?void 0:function(){return _pe}}];var wpe=["initMapStateToProps","initMapDispatchToProps","initMergeProps"];function Spe(e,t,n,r){return function(i,o){return n(e(i,o),t(r,o),o)}}function Ape(e,t,n,r,i){var o,a,s,l,c,d=i.areStatesEqual,u=i.areOwnPropsEqual,p=i.areStatePropsEqual,h=!1;function m(i,h){var m=!u(h,a),f=!d(i,o,h,a);return o=i,a=h,m&&f?(s=e(o,a),t.dependsOnOwnProps&&(l=t(r,a)),c=n(s,l,a)):m?(e.dependsOnOwnProps&&(s=e(o,a)),t.dependsOnOwnProps&&(l=t(r,a)),c=n(s,l,a)):f?function(){var t=e(o,a),r=!p(t,s);return s=t,r&&(c=n(s,l,a)),c}():c}return function(i,d){return h?m(i,d):(s=e(o=i,a=d),l=t(r,a),c=n(s,l,a),h=!0,c)}}function kpe(e,t){var n=t.initMapStateToProps,r=t.initMapDispatchToProps,i=t.initMergeProps,o=(0,nn.A)(t,wpe),a=n(e,o),s=r(e,o),l=i(e,o);return(o.pure?Ape:Spe)(a,s,l,e,o)}var Tpe=["pure","areStatesEqual","areOwnPropsEqual","areStatePropsEqual","areMergedPropsEqual"];function Epe(e,t,n){for(var r=t.length-1;r>=0;r--){var i=t[r](e);if(i)return i}return function(t,r){throw new Error("Invalid value of type "+typeof e+" for "+n+" argument when connecting component "+r.wrappedComponentName+".")}}function Mpe(e,t){return e===t}function Ope(e){var t=void 0===e?{}:e,n=t.connectHOC,r=void 0===n?mpe:n,i=t.mapStateToPropsFactories,o=void 0===i?jpe:i,a=t.mapDispatchToPropsFactories,s=void 0===a?bpe:a,l=t.mergePropsFactories,c=void 0===l?Cpe:l,d=t.selectorFactory,u=void 0===d?kpe:d;return function(e,t,n,i){void 0===i&&(i={});var a=i,l=a.pure,d=void 0===l||l,p=a.areStatesEqual,h=void 0===p?Mpe:p,m=a.areOwnPropsEqual,f=void 0===m?gpe:m,g=a.areStatePropsEqual,v=void 0===g?gpe:g,x=a.areMergedPropsEqual,y=void 0===x?gpe:x,b=(0,nn.A)(a,Tpe),j=Epe(e,o,"mapStateToProps"),_=Epe(t,s,"mapDispatchToProps"),C=Epe(n,c,"mergeProps");return r(u,(0,Ft.A)({methodName:"connect",getDisplayName:function(e){return"Connect("+e+")"},shouldHandleStateChanges:Boolean(e),initMapStateToProps:j,initMapDispatchToProps:_,initMergeProps:C,pure:d,areStatesEqual:h,areOwnPropsEqual:f,areStatePropsEqual:v,areMergedPropsEqual:y},b))}}const Rpe=Ope();function Ppe(e,t){var n=(0,We.useState)(function(){return{inputs:t,result:e()}})[0],r=(0,We.useRef)(!0),i=(0,We.useRef)(n),o=r.current||Boolean(t&&i.current.inputs&&function(e,t){if(e.length!==t.length)return!1;for(var n=0;n<e.length;n++)if(e[n]!==t[n])return!1;return!0}(t,i.current.inputs))?i.current:{inputs:t,result:e()};return(0,We.useEffect)(function(){r.current=!1,i.current=o},[o]),o.result}!function(e){Que=e}(ut.unstable_batchedUpdates);var Dpe=Ppe,Npe=function(e,t){return Ppe(function(){return e},t)},Lpe=function(e){var t=e.top,n=e.right,r=e.bottom,i=e.left;return{top:t,right:n,bottom:r,left:i,width:n-i,height:r-t,x:i,y:t,center:{x:(n+i)/2,y:(r+t)/2}}},Ipe=function(e,t){return{top:e.top-t.top,left:e.left-t.left,bottom:e.bottom+t.bottom,right:e.right+t.right}},Fpe=function(e,t){return{top:e.top+t.top,left:e.left+t.left,bottom:e.bottom-t.bottom,right:e.right-t.right}},$pe={top:0,right:0,bottom:0,left:0},Bpe=function(e){var t=e.borderBox,n=e.margin,r=void 0===n?$pe:n,i=e.border,o=void 0===i?$pe:i,a=e.padding,s=void 0===a?$pe:a,l=Lpe(Ipe(t,r)),c=Lpe(Fpe(t,o)),d=Lpe(Fpe(c,s));return{marginBox:l,borderBox:Lpe(t),paddingBox:c,contentBox:d,margin:r,border:o,padding:s}},zpe=function(e){var t=e.slice(0,-2);if("px"!==e.slice(-2))return 0;var n=Number(t);return isNaN(n)&&T2(!1),n},Hpe=function(e,t){var n,r,i=e.borderBox,o=e.border,a=e.margin,s=e.padding,l=(r=t,{top:(n=i).top+r.y,left:n.left+r.x,bottom:n.bottom+r.y,right:n.right+r.x});return Bpe({borderBox:l,border:o,margin:a,padding:s})},Wpe=function(e,t){return void 0===t&&(t={x:window.pageXOffset,y:window.pageYOffset}),Hpe(e,t)},Upe=function(e,t){var n={top:zpe(t.marginTop),right:zpe(t.marginRight),bottom:zpe(t.marginBottom),left:zpe(t.marginLeft)},r={top:zpe(t.paddingTop),right:zpe(t.paddingRight),bottom:zpe(t.paddingBottom),left:zpe(t.paddingLeft)},i={top:zpe(t.borderTopWidth),right:zpe(t.borderRightWidth),bottom:zpe(t.borderBottomWidth),left:zpe(t.borderLeftWidth)};return Bpe({borderBox:e,margin:n,padding:r,border:i})},Vpe=function(e){var t=e.getBoundingClientRect(),n=window.getComputedStyle(e);return Upe(t,n)},Gpe=Number.isNaN||function(e){return"number"===typeof e&&e!==e};function qpe(e,t){return e===t||!(!Gpe(e)||!Gpe(t))}function Ype(e,t){if(e.length!==t.length)return!1;for(var n=0;n<e.length;n++)if(!qpe(e[n],t[n]))return!1;return!0}const Zpe=function(e,t){var n;void 0===t&&(t=Ype);var r,i=[],o=!1;return function(){for(var a=[],s=0;s<arguments.length;s++)a[s]=arguments[s];return o&&n===this&&t(a,i)||(r=e.apply(this,a),o=!0,n=this,i=a),r}};const Kpe=function(e){var t=[],n=null,r=function(){for(var r=arguments.length,i=new Array(r),o=0;o<r;o++)i[o]=arguments[o];t=i,n||(n=requestAnimationFrame(function(){n=null,e.apply(void 0,t)}))};return r.cancel=function(){n&&(cancelAnimationFrame(n),n=null)},r};function Xpe(e,t){}Xpe.bind(null,"warn"),Xpe.bind(null,"error");function Qpe(){}function Jpe(e,t,n){var r=t.map(function(t){var r=function(e,t){return(0,Ft.A)({},e,{},t)}(n,t.options);return e.addEventListener(t.eventName,t.fn,r),function(){e.removeEventListener(t.eventName,t.fn,r)}});return function(){r.forEach(function(e){e()})}}var ehe="Invariant failed";function the(e){this.message=e}function nhe(e,t){if(!e)throw new the(ehe)}the.prototype.toString=function(){return this.message};var rhe=function(e){function t(){for(var t,n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return(t=e.call.apply(e,[this].concat(r))||this).callbacks=null,t.unbind=Qpe,t.onWindowError=function(e){var n=t.getCallbacks();n.isDragging()&&n.tryAbort(),e.error instanceof the&&e.preventDefault()},t.getCallbacks=function(){if(!t.callbacks)throw new Error("Unable to find AppCallbacks in <ErrorBoundary/>");return t.callbacks},t.setCallbacks=function(e){t.callbacks=e},t}_n(t,e);var n=t.prototype;return n.componentDidMount=function(){this.unbind=Jpe(window,[{eventName:"error",fn:this.onWindowError}])},n.componentDidCatch=function(e){if(!(e instanceof the))throw e;this.setState({})},n.componentWillUnmount=function(){this.unbind()},n.render=function(){return this.props.children(this.setCallbacks)},t}(We.Component),ihe=function(e){return e+1},ohe=function(e,t){var n=e.droppableId===t.droppableId,r=ihe(e.index),i=ihe(t.index);return n?"\n      You have moved the item from position "+r+"\n      to position "+i+"\n    ":"\n    You have moved the item from position "+r+"\n    in list "+e.droppableId+"\n    to list "+t.droppableId+"\n    in position "+i+"\n  "},ahe=function(e,t,n){return t.droppableId===n.droppableId?"\n      The item "+e+"\n      has been combined with "+n.draggableId:"\n      The item "+e+"\n      in list "+t.droppableId+"\n      has been combined with "+n.draggableId+"\n      in list "+n.droppableId+"\n    "},she=function(e){return"\n  The item has returned to its starting position\n  of "+ihe(e.index)+"\n"},lhe="\n  Press space bar to start a drag.\n  When dragging you can use the arrow keys to move the item around and escape to cancel.\n  Some screen readers may require you to be in focus mode or to use your pass through key\n",che=function(e){return"\n  You have lifted an item in position "+ihe(e.source.index)+"\n"},dhe=function(e){var t=e.destination;if(t)return ohe(e.source,t);var n=e.combine;return n?ahe(e.draggableId,e.source,n):"You are over an area that cannot be dropped on"},uhe=function(e){if("CANCEL"===e.reason)return"\n      Movement cancelled.\n      "+she(e.source)+"\n    ";var t=e.destination,n=e.combine;return t?"\n      You have dropped the item.\n      "+ohe(e.source,t)+"\n    ":n?"\n      You have dropped the item.\n      "+ahe(e.draggableId,e.source,n)+"\n    ":"\n    The item has been dropped while not over a drop area.\n    "+she(e.source)+"\n  "},phe={x:0,y:0},hhe=function(e,t){return{x:e.x+t.x,y:e.y+t.y}},mhe=function(e,t){return{x:e.x-t.x,y:e.y-t.y}},fhe=function(e,t){return e.x===t.x&&e.y===t.y},ghe=function(e){return{x:0!==e.x?-e.x:0,y:0!==e.y?-e.y:0}},vhe=function(e,t,n){var r;return void 0===n&&(n=0),(r={})[e]=t,r["x"===e?"y":"x"]=n,r},xhe=function(e,t){return Math.sqrt(Math.pow(t.x-e.x,2)+Math.pow(t.y-e.y,2))},yhe=function(e,t){return Math.min.apply(Math,t.map(function(t){return xhe(e,t)}))},bhe=function(e){return function(t){return{x:e(t.x),y:e(t.y)}}},jhe=function(e,t){return{top:e.top+t.y,left:e.left+t.x,bottom:e.bottom+t.y,right:e.right+t.x}},_he=function(e){return[{x:e.left,y:e.top},{x:e.right,y:e.top},{x:e.left,y:e.bottom},{x:e.right,y:e.bottom}]},Che=function(e,t){return t&&t.shouldClipSubject?function(e,t){var n=Lpe({top:Math.max(t.top,e.top),right:Math.min(t.right,e.right),bottom:Math.min(t.bottom,e.bottom),left:Math.max(t.left,e.left)});return n.width<=0||n.height<=0?null:n}(t.pageMarginBox,e):Lpe(e)},whe=function(e){var t=e.page,n=e.withPlaceholder,r=e.axis,i=e.frame,o=function(e,t){return t?jhe(e,t.scroll.diff.displacement):e}(t.marginBox,i),a=function(e,t,n){var r;return n&&n.increasedBy?(0,Ft.A)({},e,((r={})[t.end]=e[t.end]+n.increasedBy[t.line],r)):e}(o,r,n);return{page:t,withPlaceholder:n,active:Che(a,i)}},She=function(e,t){e.frame||nhe(!1);var n=e.frame,r=mhe(t,n.scroll.initial),i=ghe(r),o=(0,Ft.A)({},n,{scroll:{initial:n.scroll.initial,current:t,diff:{value:r,displacement:i},max:n.scroll.max}}),a=whe({page:e.subject.page,withPlaceholder:e.subject.withPlaceholder,axis:e.axis,frame:o});return(0,Ft.A)({},e,{frame:o,subject:a})};function Ahe(e){return Object.values?Object.values(e):Object.keys(e).map(function(t){return e[t]})}function khe(e,t){if(e.findIndex)return e.findIndex(t);for(var n=0;n<e.length;n++)if(t(e[n]))return n;return-1}function The(e,t){if(e.find)return e.find(t);var n=khe(e,t);return-1!==n?e[n]:void 0}function Ehe(e){return Array.prototype.slice.call(e)}var Mhe=Zpe(function(e){return e.reduce(function(e,t){return e[t.descriptor.id]=t,e},{})}),Ohe=Zpe(function(e){return e.reduce(function(e,t){return e[t.descriptor.id]=t,e},{})}),Rhe=Zpe(function(e){return Ahe(e)}),Phe=Zpe(function(e){return Ahe(e)}),Dhe=Zpe(function(e,t){var n=Phe(t).filter(function(t){return e===t.descriptor.droppableId}).sort(function(e,t){return e.descriptor.index-t.descriptor.index});return n});function Nhe(e){return e.at&&"REORDER"===e.at.type?e.at.destination:null}function Lhe(e){return e.at&&"COMBINE"===e.at.type?e.at.combine:null}var Ihe=Zpe(function(e,t){return t.filter(function(t){return t.descriptor.id!==e.descriptor.id})}),Fhe=function(e,t){return e.descriptor.droppableId===t.descriptor.id},$he={point:phe,value:0},Bhe={invisible:{},visible:{},all:[]},zhe={displaced:Bhe,displacedBy:$he,at:null},Hhe=function(e,t){return function(n){return e<=n&&n<=t}},Whe=function(e){var t=Hhe(e.top,e.bottom),n=Hhe(e.left,e.right);return function(r){if(t(r.top)&&t(r.bottom)&&n(r.left)&&n(r.right))return!0;var i=t(r.top)||t(r.bottom),o=n(r.left)||n(r.right);if(i&&o)return!0;var a=r.top<e.top&&r.bottom>e.bottom,s=r.left<e.left&&r.right>e.right;return!(!a||!s)||(a&&o||s&&i)}},Uhe=function(e){var t=Hhe(e.top,e.bottom),n=Hhe(e.left,e.right);return function(e){return t(e.top)&&t(e.bottom)&&n(e.left)&&n(e.right)}},Vhe={direction:"vertical",line:"y",crossAxisLine:"x",start:"top",end:"bottom",size:"height",crossAxisStart:"left",crossAxisEnd:"right",crossAxisSize:"width"},Ghe={direction:"horizontal",line:"x",crossAxisLine:"y",start:"left",end:"right",size:"width",crossAxisStart:"top",crossAxisEnd:"bottom",crossAxisSize:"height"},qhe=function(e){var t=e.target,n=e.destination,r=e.viewport,i=e.withDroppableDisplacement,o=e.isVisibleThroughFrameFn,a=i?function(e,t){var n=t.frame?t.frame.scroll.diff.displacement:phe;return jhe(e,n)}(t,n):t;return function(e,t,n){return!!t.subject.active&&n(t.subject.active)(e)}(a,n,o)&&function(e,t,n){return n(t)(e)}(a,r,o)},Yhe=function(e){return qhe((0,Ft.A)({},e,{isVisibleThroughFrameFn:Uhe}))};function Zhe(e){var t=e.afterDragging,n=e.destination,r=e.displacedBy,i=e.viewport,o=e.forceShouldAnimate,a=e.last;return t.reduce(function(e,t){var s=function(e,t){var n=e.page.marginBox,r={top:t.point.y,right:0,bottom:0,left:t.point.x};return Lpe(Ipe(n,r))}(t,r),l=t.descriptor.id;e.all.push(l);var c=function(e){return qhe((0,Ft.A)({},e,{isVisibleThroughFrameFn:Whe}))}({target:s,destination:n,viewport:i,withDroppableDisplacement:!0});if(!c)return e.invisible[t.descriptor.id]=!0,e;var d=function(e,t,n){if("boolean"===typeof n)return n;if(!t)return!0;var r=t.invisible,i=t.visible;if(r[e])return!1;var o=i[e];return!o||o.shouldAnimate}(l,a,o),u={draggableId:l,shouldAnimate:d};return e.visible[l]=u,e},{all:[],visible:{},invisible:{}})}function Khe(e){var t=e.insideDestination,n=e.inHomeList,r=e.displacedBy,i=e.destination,o=function(e,t){if(!e.length)return 0;var n=e[e.length-1].descriptor.index;return t.inHomeList?n:n+1}(t,{inHomeList:n});return{displaced:Bhe,displacedBy:r,at:{type:"REORDER",destination:{droppableId:i.descriptor.id,index:o}}}}function Xhe(e){var t=e.draggable,n=e.insideDestination,r=e.destination,i=e.viewport,o=e.displacedBy,a=e.last,s=e.index,l=e.forceShouldAnimate,c=Fhe(t,r);if(null==s)return Khe({insideDestination:n,inHomeList:c,displacedBy:o,destination:r});var d=The(n,function(e){return e.descriptor.index===s});if(!d)return Khe({insideDestination:n,inHomeList:c,displacedBy:o,destination:r});var u=Ihe(t,n),p=n.indexOf(d);return{displaced:Zhe({afterDragging:u.slice(p),destination:r,displacedBy:o,last:a,viewport:i.frame,forceShouldAnimate:l}),displacedBy:o,at:{type:"REORDER",destination:{droppableId:r.descriptor.id,index:s}}}}function Qhe(e,t){return Boolean(t.effected[e])}var Jhe=function(e){var t=e.isMovingForward,n=e.isInHomeList,r=e.draggable,i=e.draggables,o=e.destination,a=e.insideDestination,s=e.previousImpact,l=e.viewport,c=e.afterCritical,d=s.at;if(d||nhe(!1),"REORDER"===d.type){var u=function(e){var t=e.isMovingForward,n=e.isInHomeList,r=e.insideDestination,i=e.location;if(!r.length)return null;var o=i.index,a=t?o+1:o-1,s=r[0].descriptor.index,l=r[r.length-1].descriptor.index;return a<s||a>(n?l:l+1)?null:a}({isMovingForward:t,isInHomeList:n,location:d.destination,insideDestination:a});return null==u?null:Xhe({draggable:r,insideDestination:a,destination:o,viewport:l,last:s.displaced,displacedBy:s.displacedBy,index:u})}var p=function(e){var t=e.isMovingForward,n=e.destination,r=e.draggables,i=e.combine,o=e.afterCritical;if(!n.isCombineEnabled)return null;var a=i.draggableId,s=r[a].descriptor.index;return Qhe(a,o)?t?s:s-1:t?s+1:s}({isMovingForward:t,destination:o,displaced:s.displaced,draggables:i,combine:d.combine,afterCritical:c});return null==p?null:Xhe({draggable:r,insideDestination:a,destination:o,viewport:l,last:s.displaced,displacedBy:s.displacedBy,index:p})},eme=function(e){var t=e.afterCritical,n=e.impact,r=e.draggables,i=Lhe(n);i||nhe(!1);var o=i.draggableId,a=r[o].page.borderBox.center,s=function(e){var t=e.displaced,n=e.afterCritical,r=e.combineWith,i=e.displacedBy,o=Boolean(t.visible[r]||t.invisible[r]);return Qhe(r,n)?o?phe:ghe(i.point):o?i.point:phe}({displaced:n.displaced,afterCritical:t,combineWith:o,displacedBy:n.displacedBy});return hhe(a,s)},tme=function(e,t){return t.margin[e.start]+t.borderBox[e.size]/2},nme=function(e,t,n){return t[e.crossAxisStart]+n.margin[e.crossAxisStart]+n.borderBox[e.crossAxisSize]/2},rme=function(e){var t=e.axis,n=e.moveRelativeTo,r=e.isMoving;return vhe(t.line,n.marginBox[t.end]+tme(t,r),nme(t,n.marginBox,r))},ime=function(e){var t=e.axis,n=e.moveRelativeTo,r=e.isMoving;return vhe(t.line,n.marginBox[t.start]-function(e,t){return t.margin[e.end]+t.borderBox[e.size]/2}(t,r),nme(t,n.marginBox,r))},ome=function(e){var t=e.impact,n=e.draggable,r=e.draggables,i=e.droppable,o=e.afterCritical,a=Dhe(i.descriptor.id,r),s=n.page,l=i.axis;if(!a.length)return function(e){var t=e.axis,n=e.moveInto,r=e.isMoving;return vhe(t.line,n.contentBox[t.start]+tme(t,r),nme(t,n.contentBox,r))}({axis:l,moveInto:i.page,isMoving:s});var c=t.displaced,d=t.displacedBy,u=c.all[0];if(u){var p=r[u];if(Qhe(u,o))return ime({axis:l,moveRelativeTo:p.page,isMoving:s});var h=Hpe(p.page,d.point);return ime({axis:l,moveRelativeTo:h,isMoving:s})}var m=a[a.length-1];if(m.descriptor.id===n.descriptor.id)return s.borderBox.center;if(Qhe(m.descriptor.id,o)){var f=Hpe(m.page,ghe(o.displacedBy.point));return rme({axis:l,moveRelativeTo:f,isMoving:s})}return rme({axis:l,moveRelativeTo:m.page,isMoving:s})},ame=function(e,t){var n=e.frame;return n?hhe(t,n.scroll.diff.displacement):t},sme=function(e){var t=function(e){var t=e.impact,n=e.draggable,r=e.droppable,i=e.draggables,o=e.afterCritical,a=n.page.borderBox.center,s=t.at;return r&&s?"REORDER"===s.type?ome({impact:t,draggable:n,draggables:i,droppable:r,afterCritical:o}):eme({impact:t,draggables:i,afterCritical:o}):a}(e),n=e.droppable;return n?ame(n,t):t},lme=function(e,t){var n=mhe(t,e.scroll.initial),r=ghe(n);return{frame:Lpe({top:t.y,bottom:t.y+e.frame.height,left:t.x,right:t.x+e.frame.width}),scroll:{initial:e.scroll.initial,max:e.scroll.max,current:t,diff:{value:n,displacement:r}}}};function cme(e,t){return e.map(function(e){return t[e]})}var dme=function(e){var t=e.pageBorderBoxCenter,n=e.draggable,r=function(e,t){return hhe(e.scroll.diff.displacement,t)}(e.viewport,t),i=mhe(r,n.page.borderBox.center);return hhe(n.client.borderBox.center,i)},ume=function(e){var t=e.draggable,n=e.destination,r=e.newPageBorderBoxCenter,i=e.viewport,o=e.withDroppableDisplacement,a=e.onlyOnMainAxis,s=void 0!==a&&a,l=mhe(r,t.page.borderBox.center),c={target:jhe(t.page.borderBox,l),destination:n,withDroppableDisplacement:o,viewport:i};return s?function(e){return qhe((0,Ft.A)({},e,{isVisibleThroughFrameFn:(t=e.destination.axis,function(e){var n=Hhe(e.top,e.bottom),r=Hhe(e.left,e.right);return function(e){return t===Vhe?n(e.top)&&n(e.bottom):r(e.left)&&r(e.right)}})}));var t}(c):Yhe(c)},pme=function(e){var t=e.isMovingForward,n=e.draggable,r=e.destination,i=e.draggables,o=e.previousImpact,a=e.viewport,s=e.previousPageBorderBoxCenter,l=e.previousClientSelection,c=e.afterCritical;if(!r.isEnabled)return null;var d=Dhe(r.descriptor.id,i),u=Fhe(n,r),p=function(e){var t=e.isMovingForward,n=e.draggable,r=e.destination,i=e.insideDestination,o=e.previousImpact;if(!r.isCombineEnabled)return null;if(!Nhe(o))return null;function a(e){var t={type:"COMBINE",combine:{draggableId:e,droppableId:r.descriptor.id}};return(0,Ft.A)({},o,{at:t})}var s=o.displaced.all,l=s.length?s[0]:null;if(t)return l?a(l):null;var c=Ihe(n,i);if(!l)return c.length?a(c[c.length-1].descriptor.id):null;var d=khe(c,function(e){return e.descriptor.id===l});-1===d&&nhe(!1);var u=d-1;return u<0?null:a(c[u].descriptor.id)}({isMovingForward:t,draggable:n,destination:r,insideDestination:d,previousImpact:o})||Jhe({isMovingForward:t,isInHomeList:u,draggable:n,draggables:i,destination:r,insideDestination:d,previousImpact:o,viewport:a,afterCritical:c});if(!p)return null;var h=sme({impact:p,draggable:n,droppable:r,draggables:i,afterCritical:c});if(ume({draggable:n,destination:r,newPageBorderBoxCenter:h,viewport:a.frame,withDroppableDisplacement:!1,onlyOnMainAxis:!0}))return{clientSelection:dme({pageBorderBoxCenter:h,draggable:n,viewport:a}),impact:p,scrollJumpRequest:null};var m=mhe(h,s),f=function(e){var t=e.impact,n=e.viewport,r=e.destination,i=e.draggables,o=e.maxScrollChange,a=lme(n,hhe(n.scroll.current,o)),s=r.frame?She(r,hhe(r.frame.scroll.current,o)):r,l=t.displaced,c=Zhe({afterDragging:cme(l.all,i),destination:r,displacedBy:t.displacedBy,viewport:a.frame,last:l,forceShouldAnimate:!1}),d=Zhe({afterDragging:cme(l.all,i),destination:s,displacedBy:t.displacedBy,viewport:n.frame,last:l,forceShouldAnimate:!1}),u={},p={},h=[l,c,d];return l.all.forEach(function(e){var t=function(e,t){for(var n=0;n<t.length;n++){var r=t[n].visible[e];if(r)return r}return null}(e,h);t?p[e]=t:u[e]=!0}),(0,Ft.A)({},t,{displaced:{all:l.all,invisible:u,visible:p}})}({impact:p,viewport:a,destination:r,draggables:i,maxScrollChange:m});return{clientSelection:l,impact:f,scrollJumpRequest:m}},hme=function(e){var t=e.subject.active;return t||nhe(!1),t},mme=function(e,t){var n=e.page.borderBox.center;return Qhe(e.descriptor.id,t)?mhe(n,t.displacedBy.point):n},fme=function(e,t){var n=e.page.borderBox;return Qhe(e.descriptor.id,t)?jhe(n,ghe(t.displacedBy.point)):n},gme=Zpe(function(e,t){var n=t[e.line];return{value:n,point:vhe(e.line,n)}}),vme=function(e,t){return(0,Ft.A)({},e,{scroll:(0,Ft.A)({},e.scroll,{max:t})})},xme=function(e,t,n){var r=e.frame;Fhe(t,e)&&nhe(!1),e.subject.withPlaceholder&&nhe(!1);var i=gme(e.axis,t.displaceBy).point,o=function(e,t,n){var r=e.axis;if("virtual"===e.descriptor.mode)return vhe(r.line,t[r.line]);var i=e.subject.page.contentBox[r.size],o=Dhe(e.descriptor.id,n).reduce(function(e,t){return e+t.client.marginBox[r.size]},0)+t[r.line]-i;return o<=0?null:vhe(r.line,o)}(e,i,n),a={placeholderSize:i,increasedBy:o,oldFrameMaxScroll:e.frame?e.frame.scroll.max:null};if(!r){var s=whe({page:e.subject.page,withPlaceholder:a,axis:e.axis,frame:e.frame});return(0,Ft.A)({},e,{subject:s})}var l=o?hhe(r.scroll.max,o):r.scroll.max,c=vme(r,l),d=whe({page:e.subject.page,withPlaceholder:a,axis:e.axis,frame:c});return(0,Ft.A)({},e,{subject:d,frame:c})},yme=function(e){var t=e.isMovingForward,n=e.previousPageBorderBoxCenter,r=e.draggable,i=e.isOver,o=e.draggables,a=e.droppables,s=e.viewport,l=e.afterCritical,c=function(e){var t=e.isMovingForward,n=e.pageBorderBoxCenter,r=e.source,i=e.droppables,o=e.viewport,a=r.subject.active;if(!a)return null;var s=r.axis,l=Hhe(a[s.start],a[s.end]),c=Rhe(i).filter(function(e){return e!==r}).filter(function(e){return e.isEnabled}).filter(function(e){return Boolean(e.subject.active)}).filter(function(e){return Whe(o.frame)(hme(e))}).filter(function(e){var n=hme(e);return t?a[s.crossAxisEnd]<n[s.crossAxisEnd]:n[s.crossAxisStart]<a[s.crossAxisStart]}).filter(function(e){var t=hme(e),n=Hhe(t[s.start],t[s.end]);return l(t[s.start])||l(t[s.end])||n(a[s.start])||n(a[s.end])}).sort(function(e,n){var r=hme(e)[s.crossAxisStart],i=hme(n)[s.crossAxisStart];return t?r-i:i-r}).filter(function(e,t,n){return hme(e)[s.crossAxisStart]===hme(n[0])[s.crossAxisStart]});if(!c.length)return null;if(1===c.length)return c[0];var d=c.filter(function(e){return Hhe(hme(e)[s.start],hme(e)[s.end])(n[s.line])});return 1===d.length?d[0]:d.length>1?d.sort(function(e,t){return hme(e)[s.start]-hme(t)[s.start]})[0]:c.sort(function(e,t){var r=yhe(n,_he(hme(e))),i=yhe(n,_he(hme(t)));return r!==i?r-i:hme(e)[s.start]-hme(t)[s.start]})[0]}({isMovingForward:t,pageBorderBoxCenter:n,source:i,droppables:a,viewport:s});if(!c)return null;var d=Dhe(c.descriptor.id,o),u=function(e){var t=e.pageBorderBoxCenter,n=e.viewport,r=e.destination,i=e.insideDestination,o=e.afterCritical,a=i.filter(function(e){return Yhe({target:fme(e,o),destination:r,viewport:n.frame,withDroppableDisplacement:!0})}).sort(function(e,n){var i=xhe(t,ame(r,mme(e,o))),a=xhe(t,ame(r,mme(n,o)));return i<a?-1:a<i?1:e.descriptor.index-n.descriptor.index});return a[0]||null}({pageBorderBoxCenter:n,viewport:s,destination:c,insideDestination:d,afterCritical:l}),p=function(e){var t=e.previousPageBorderBoxCenter,n=e.moveRelativeTo,r=e.insideDestination,i=e.draggable,o=e.draggables,a=e.destination,s=e.viewport,l=e.afterCritical;if(!n){if(r.length)return null;var c={displaced:Bhe,displacedBy:$he,at:{type:"REORDER",destination:{droppableId:a.descriptor.id,index:0}}},d=sme({impact:c,draggable:i,droppable:a,draggables:o,afterCritical:l}),u=Fhe(i,a)?a:xme(a,i,o);return ume({draggable:i,destination:u,newPageBorderBoxCenter:d,viewport:s.frame,withDroppableDisplacement:!1,onlyOnMainAxis:!0})?c:null}var p=Boolean(t[a.axis.line]<=n.page.borderBox.center[a.axis.line]),h=function(){var e=n.descriptor.index;return n.descriptor.id===i.descriptor.id||p?e:e+1}(),m=gme(a.axis,i.displaceBy);return Xhe({draggable:i,insideDestination:r,destination:a,viewport:s,displacedBy:m,last:Bhe,index:h})}({previousPageBorderBoxCenter:n,destination:c,draggable:r,draggables:o,moveRelativeTo:u,insideDestination:d,viewport:s,afterCritical:l});if(!p)return null;var h=sme({impact:p,draggable:r,droppable:c,draggables:o,afterCritical:l});return{clientSelection:dme({pageBorderBoxCenter:h,draggable:r,viewport:s}),impact:p,scrollJumpRequest:null}},bme=function(e){var t=e.at;return t?"REORDER"===t.type?t.destination.droppableId:t.combine.droppableId:null},jme=function(e){var t=e.state,n=e.type,r=function(e,t){var n=bme(e);return n?t[n]:null}(t.impact,t.dimensions.droppables),i=Boolean(r),o=t.dimensions.droppables[t.critical.droppable.id],a=r||o,s=a.axis.direction,l="vertical"===s&&("MOVE_UP"===n||"MOVE_DOWN"===n)||"horizontal"===s&&("MOVE_LEFT"===n||"MOVE_RIGHT"===n);if(l&&!i)return null;var c="MOVE_DOWN"===n||"MOVE_RIGHT"===n,d=t.dimensions.draggables[t.critical.draggable.id],u=t.current.page.borderBoxCenter,p=t.dimensions,h=p.draggables,m=p.droppables;return l?pme({isMovingForward:c,previousPageBorderBoxCenter:u,draggable:d,destination:a,draggables:h,viewport:t.viewport,previousClientSelection:t.current.client.selection,previousImpact:t.impact,afterCritical:t.afterCritical}):yme({isMovingForward:c,previousPageBorderBoxCenter:u,draggable:d,isOver:a,draggables:h,droppables:m,viewport:t.viewport,afterCritical:t.afterCritical})};function _me(e){return"DRAGGING"===e.phase||"COLLECTING"===e.phase}function Cme(e){var t=Hhe(e.top,e.bottom),n=Hhe(e.left,e.right);return function(e){return t(e.y)&&n(e.x)}}function wme(e){var t=e.pageBorderBox,n=e.draggable,r=e.droppables,i=Rhe(r).filter(function(e){if(!e.isEnabled)return!1;var n=e.subject.active;if(!n)return!1;if(!function(e,t){return e.left<t.right&&e.right>t.left&&e.top<t.bottom&&e.bottom>t.top}(t,n))return!1;if(Cme(n)(t.center))return!0;var r=e.axis,i=n.center[r.crossAxisLine],o=t[r.crossAxisStart],a=t[r.crossAxisEnd],s=Hhe(n[r.crossAxisStart],n[r.crossAxisEnd]),l=s(o),c=s(a);return!l&&!c||(l?o<i:a>i)});return i.length?1===i.length?i[0].descriptor.id:function(e){var t=e.pageBorderBox,n=e.draggable,r=e.candidates,i=n.page.borderBox.center,o=r.map(function(e){var n=e.axis,r=vhe(e.axis.line,t.center[n.line],e.page.borderBox.center[n.crossAxisLine]);return{id:e.descriptor.id,distance:xhe(i,r)}}).sort(function(e,t){return t.distance-e.distance});return o[0]?o[0].id:null}({pageBorderBox:t,draggable:n,candidates:i}):null}var Sme=function(e,t){return Lpe(jhe(e,t))};function Ame(e){var t=e.displaced,n=e.id;return Boolean(t.visible[n]||t.invisible[n])}var kme=function(e){var t=e.pageOffset,n=e.draggable,r=e.draggables,i=e.droppables,o=e.previousImpact,a=e.viewport,s=e.afterCritical,l=Sme(n.page.borderBox,t),c=wme({pageBorderBox:l,draggable:n,droppables:i});if(!c)return zhe;var d=i[c],u=Dhe(d.descriptor.id,r),p=function(e,t){var n=e.frame;return n?Sme(t,n.scroll.diff.value):t}(d,l);return function(e){var t=e.draggable,n=e.pageBorderBoxWithDroppableScroll,r=e.previousImpact,i=e.destination,o=e.insideDestination,a=e.afterCritical;if(!i.isCombineEnabled)return null;var s=i.axis,l=gme(i.axis,t.displaceBy),c=l.value,d=n[s.start],u=n[s.end],p=The(Ihe(t,o),function(e){var t=e.descriptor.id,n=e.page.borderBox,i=n[s.size]/4,o=Qhe(t,a),l=Ame({displaced:r.displaced,id:t});return o?l?u>n[s.start]+i&&u<n[s.end]-i:d>n[s.start]-c+i&&d<n[s.end]-c-i:l?u>n[s.start]+c+i&&u<n[s.end]+c-i:d>n[s.start]+i&&d<n[s.end]-i});return p?{displacedBy:l,displaced:r.displaced,at:{type:"COMBINE",combine:{draggableId:p.descriptor.id,droppableId:i.descriptor.id}}}:null}({pageBorderBoxWithDroppableScroll:p,draggable:n,previousImpact:o,destination:d,insideDestination:u,afterCritical:s})||function(e){var t=e.pageBorderBoxWithDroppableScroll,n=e.draggable,r=e.destination,i=e.insideDestination,o=e.last,a=e.viewport,s=e.afterCritical,l=r.axis,c=gme(r.axis,n.displaceBy),d=c.value,u=t[l.start],p=t[l.end],h=function(e){var t=e.draggable,n=e.closest,r=e.inHomeList;return n?r&&n.descriptor.index>t.descriptor.index?n.descriptor.index-1:n.descriptor.index:null}({draggable:n,closest:The(Ihe(n,i),function(e){var t=e.descriptor.id,n=e.page.borderBox.center[l.line],r=Qhe(t,s),i=Ame({displaced:o,id:t});return r?i?p<=n:u<n-d:i?p<=n+d:u<n}),inHomeList:Fhe(n,r)});return Xhe({draggable:n,insideDestination:i,destination:r,viewport:a,last:o,displacedBy:c,index:h})}({pageBorderBoxWithDroppableScroll:p,draggable:n,destination:d,insideDestination:u,last:o.displaced,viewport:a,afterCritical:s})},Tme=function(e,t){var n;return(0,Ft.A)({},e,((n={})[t.descriptor.id]=t,n))},Eme=function(e){var t=e.previousImpact,n=e.impact,r=e.droppables,i=bme(t),o=bme(n);if(!i)return r;if(i===o)return r;var a=r[i];if(!a.subject.withPlaceholder)return r;var s=function(e){var t=e.subject.withPlaceholder;t||nhe(!1);var n=e.frame;if(!n){var r=whe({page:e.subject.page,axis:e.axis,frame:null,withPlaceholder:null});return(0,Ft.A)({},e,{subject:r})}var i=t.oldFrameMaxScroll;i||nhe(!1);var o=vme(n,i),a=whe({page:e.subject.page,axis:e.axis,frame:o,withPlaceholder:null});return(0,Ft.A)({},e,{subject:a,frame:o})}(a);return Tme(r,s)},Mme=function(e){var t=e.state,n=e.clientSelection,r=e.dimensions,i=e.viewport,o=e.impact,a=e.scrollJumpRequest,s=i||t.viewport,l=r||t.dimensions,c=n||t.current.client.selection,d=mhe(c,t.initial.client.selection),u={offset:d,selection:c,borderBoxCenter:hhe(t.initial.client.borderBoxCenter,d)},p={selection:hhe(u.selection,s.scroll.current),borderBoxCenter:hhe(u.borderBoxCenter,s.scroll.current),offset:hhe(u.offset,s.scroll.diff.value)},h={client:u,page:p};if("COLLECTING"===t.phase)return(0,Ft.A)({phase:"COLLECTING"},t,{dimensions:l,viewport:s,current:h});var m=l.draggables[t.critical.draggable.id],f=o||kme({pageOffset:p.offset,draggable:m,draggables:l.draggables,droppables:l.droppables,previousImpact:t.impact,viewport:s,afterCritical:t.afterCritical}),g=function(e){var t=e.draggable,n=e.draggables,r=e.droppables,i=e.previousImpact,o=e.impact,a=Eme({previousImpact:i,impact:o,droppables:r}),s=bme(o);if(!s)return a;var l=r[s];if(Fhe(t,l))return a;if(l.subject.withPlaceholder)return a;var c=xme(l,t,n);return Tme(a,c)}({draggable:m,impact:f,previousImpact:t.impact,draggables:l.draggables,droppables:l.droppables});return(0,Ft.A)({},t,{current:h,dimensions:{draggables:l.draggables,droppables:g},impact:f,viewport:s,scrollJumpRequest:a||null,forceShouldAnimate:!a&&null})};var Ome=function(e){var t=e.impact,n=e.viewport,r=e.draggables,i=e.destination,o=e.forceShouldAnimate,a=t.displaced,s=function(e,t){return e.map(function(e){return t[e]})}(a.all,r),l=Zhe({afterDragging:s,destination:i,displacedBy:t.displacedBy,viewport:n.frame,forceShouldAnimate:o,last:a});return(0,Ft.A)({},t,{displaced:l})},Rme=function(e){var t=e.impact,n=e.draggable,r=e.droppable,i=e.draggables,o=e.viewport,a=e.afterCritical,s=sme({impact:t,draggable:n,draggables:i,droppable:r,afterCritical:a});return dme({pageBorderBoxCenter:s,draggable:n,viewport:o})},Pme=function(e){var t=e.state,n=e.dimensions,r=e.viewport;"SNAP"!==t.movementMode&&nhe(!1);var i=t.impact,o=r||t.viewport,a=n||t.dimensions,s=a.draggables,l=a.droppables,c=s[t.critical.draggable.id],d=bme(i);d||nhe(!1);var u=l[d],p=Ome({impact:i,viewport:o,destination:u,draggables:s}),h=Rme({impact:p,draggable:c,droppable:u,draggables:s,viewport:o,afterCritical:t.afterCritical});return Mme({impact:p,clientSelection:h,state:t,dimensions:a,viewport:o})},Dme=function(e){var t=e.draggable,n=e.home,r=e.draggables,i=e.viewport,o=gme(n.axis,t.displaceBy),a=Dhe(n.descriptor.id,r),s=a.indexOf(t);-1===s&&nhe(!1);var l,c=a.slice(s+1),d=c.reduce(function(e,t){return e[t.descriptor.id]=!0,e},{}),u={inVirtualList:"virtual"===n.descriptor.mode,displacedBy:o,effected:d};return{impact:{displaced:Zhe({afterDragging:c,destination:n,displacedBy:o,last:null,viewport:i.frame,forceShouldAnimate:!1}),displacedBy:o,at:{type:"REORDER",destination:(l=t.descriptor,{index:l.index,droppableId:l.droppableId})}},afterCritical:u}},Nme=function(e){0},Lme=function(e){0},Ime=function(e){var t=e.additions,n=e.updatedDroppables,r=e.viewport,i=r.scroll.diff.value;return t.map(function(e){var t=e.descriptor.droppableId,o=function(e){var t=e.frame;return t||nhe(!1),t}(n[t]),a=o.scroll.diff.value,s=function(e){var t=e.draggable,n=e.offset,r=e.initialWindowScroll,i=Hpe(t.client,n),o=Wpe(i,r);return(0,Ft.A)({},t,{placeholder:(0,Ft.A)({},t.placeholder,{client:i}),client:i,page:o})}({draggable:e,offset:hhe(i,a),initialWindowScroll:r.scroll.initial});return s})},Fme=function(e){return"SNAP"===e.movementMode},$me=function(e,t,n){var r=function(e,t){return{draggables:e.draggables,droppables:Tme(e.droppables,t)}}(e.dimensions,t);return!Fme(e)||n?Mme({state:e,dimensions:r}):Pme({state:e,dimensions:r})};function Bme(e){return e.isDragging&&"SNAP"===e.movementMode?(0,Ft.A)({phase:"DRAGGING"},e,{scrollJumpRequest:null}):e}var zme={phase:"IDLE",completed:null,shouldFlush:!1},Hme=function(e,t){if(void 0===e&&(e=zme),"FLUSH"===t.type)return(0,Ft.A)({},zme,{shouldFlush:!0});if("INITIAL_PUBLISH"===t.type){"IDLE"!==e.phase&&nhe(!1);var n=t.payload,r=n.critical,i=n.clientSelection,o=n.viewport,a=n.dimensions,s=n.movementMode,l=a.draggables[r.draggable.id],c=a.droppables[r.droppable.id],d={selection:i,borderBoxCenter:l.client.borderBox.center,offset:phe},u={client:d,page:{selection:hhe(d.selection,o.scroll.initial),borderBoxCenter:hhe(d.selection,o.scroll.initial),offset:hhe(d.selection,o.scroll.diff.value)}},p=Rhe(a.droppables).every(function(e){return!e.isFixedOnPage}),h=Dme({draggable:l,home:c,draggables:a.draggables,viewport:o}),m=h.impact;return{phase:"DRAGGING",isDragging:!0,critical:r,movementMode:s,dimensions:a,initial:u,current:u,isWindowScrollAllowed:p,impact:m,afterCritical:h.afterCritical,onLiftImpact:m,viewport:o,scrollJumpRequest:null,forceShouldAnimate:null}}if("COLLECTION_STARTING"===t.type)return"COLLECTING"===e.phase||"DROP_PENDING"===e.phase?e:("DRAGGING"!==e.phase&&nhe(!1),(0,Ft.A)({phase:"COLLECTING"},e,{phase:"COLLECTING"}));if("PUBLISH_WHILE_DRAGGING"===t.type)return"COLLECTING"!==e.phase&&"DROP_PENDING"!==e.phase&&nhe(!1),function(e){var t=e.state,n=e.published;Nme();var r=n.modified.map(function(e){var n=t.dimensions.droppables[e.droppableId];return She(n,e.scroll)}),i=(0,Ft.A)({},t.dimensions.droppables,{},Mhe(r)),o=Ohe(Ime({additions:n.additions,updatedDroppables:i,viewport:t.viewport})),a=(0,Ft.A)({},t.dimensions.draggables,{},o);n.removals.forEach(function(e){delete a[e]});var s={droppables:i,draggables:a},l=bme(t.impact),c=l?s.droppables[l]:null,d=s.draggables[t.critical.draggable.id],u=s.droppables[t.critical.droppable.id],p=Dme({draggable:d,home:u,draggables:a,viewport:t.viewport}),h=p.impact,m=p.afterCritical,f=c&&c.isCombineEnabled?t.impact:h,g=kme({pageOffset:t.current.page.offset,draggable:s.draggables[t.critical.draggable.id],draggables:s.draggables,droppables:s.droppables,previousImpact:f,viewport:t.viewport,afterCritical:m});Lme();var v=(0,Ft.A)({phase:"DRAGGING"},t,{phase:"DRAGGING",impact:g,onLiftImpact:h,dimensions:s,afterCritical:m,forceShouldAnimate:!1});return"COLLECTING"===t.phase?v:(0,Ft.A)({phase:"DROP_PENDING"},v,{phase:"DROP_PENDING",reason:t.reason,isWaiting:!1})}({state:e,published:t.payload});if("MOVE"===t.type){if("DROP_PENDING"===e.phase)return e;_me(e)||nhe(!1);var f=t.payload.client;return fhe(f,e.current.client.selection)?e:Mme({state:e,clientSelection:f,impact:Fme(e)?e.impact:null})}if("UPDATE_DROPPABLE_SCROLL"===t.type){if("DROP_PENDING"===e.phase)return Bme(e);if("COLLECTING"===e.phase)return Bme(e);_me(e)||nhe(!1);var g=t.payload,v=g.id,x=g.newScroll,y=e.dimensions.droppables[v];if(!y)return e;var b=She(y,x);return $me(e,b,!1)}if("UPDATE_DROPPABLE_IS_ENABLED"===t.type){if("DROP_PENDING"===e.phase)return e;_me(e)||nhe(!1);var j=t.payload,_=j.id,C=j.isEnabled,w=e.dimensions.droppables[_];w||nhe(!1),w.isEnabled===C&&nhe(!1);var S=(0,Ft.A)({},w,{isEnabled:C});return $me(e,S,!0)}if("UPDATE_DROPPABLE_IS_COMBINE_ENABLED"===t.type){if("DROP_PENDING"===e.phase)return e;_me(e)||nhe(!1);var A=t.payload,k=A.id,T=A.isCombineEnabled,E=e.dimensions.droppables[k];E||nhe(!1),E.isCombineEnabled===T&&nhe(!1);var M=(0,Ft.A)({},E,{isCombineEnabled:T});return $me(e,M,!0)}if("MOVE_BY_WINDOW_SCROLL"===t.type){if("DROP_PENDING"===e.phase||"DROP_ANIMATING"===e.phase)return e;_me(e)||nhe(!1),e.isWindowScrollAllowed||nhe(!1);var O=t.payload.newScroll;if(fhe(e.viewport.scroll.current,O))return Bme(e);var R=lme(e.viewport,O);return Fme(e)?Pme({state:e,viewport:R}):Mme({state:e,viewport:R})}if("UPDATE_VIEWPORT_MAX_SCROLL"===t.type){if(!_me(e))return e;var P=t.payload.maxScroll;if(fhe(P,e.viewport.scroll.max))return e;var D=(0,Ft.A)({},e.viewport,{scroll:(0,Ft.A)({},e.viewport.scroll,{max:P})});return(0,Ft.A)({phase:"DRAGGING"},e,{viewport:D})}if("MOVE_UP"===t.type||"MOVE_DOWN"===t.type||"MOVE_LEFT"===t.type||"MOVE_RIGHT"===t.type){if("COLLECTING"===e.phase||"DROP_PENDING"===e.phase)return e;"DRAGGING"!==e.phase&&nhe(!1);var N=jme({state:e,type:t.type});return N?Mme({state:e,impact:N.impact,clientSelection:N.clientSelection,scrollJumpRequest:N.scrollJumpRequest}):e}if("DROP_PENDING"===t.type){var L=t.payload.reason;return"COLLECTING"!==e.phase&&nhe(!1),(0,Ft.A)({phase:"DROP_PENDING"},e,{phase:"DROP_PENDING",isWaiting:!0,reason:L})}if("DROP_ANIMATE"===t.type){var I=t.payload,F=I.completed,$=I.dropDuration,B=I.newHomeClientOffset;return"DRAGGING"!==e.phase&&"DROP_PENDING"!==e.phase&&nhe(!1),{phase:"DROP_ANIMATING",completed:F,dropDuration:$,newHomeClientOffset:B,dimensions:e.dimensions}}return"DROP_COMPLETE"===t.type?{phase:"IDLE",completed:t.payload.completed,shouldFlush:!1}:e},Wme=function(e){return{type:"PUBLISH_WHILE_DRAGGING",payload:e}},Ume=function(){return{type:"COLLECTION_STARTING",payload:null}},Vme=function(e){return{type:"UPDATE_DROPPABLE_SCROLL",payload:e}},Gme=function(e){return{type:"UPDATE_DROPPABLE_IS_ENABLED",payload:e}},qme=function(e){return{type:"UPDATE_DROPPABLE_IS_COMBINE_ENABLED",payload:e}},Yme=function(e){return{type:"MOVE",payload:e}},Zme=function(){return{type:"MOVE_UP",payload:null}},Kme=function(){return{type:"MOVE_DOWN",payload:null}},Xme=function(){return{type:"MOVE_RIGHT",payload:null}},Qme=function(){return{type:"MOVE_LEFT",payload:null}},Jme=function(e){return{type:"DROP_COMPLETE",payload:e}},efe=function(e){return{type:"DROP",payload:e}},tfe=function(){return{type:"DROP_ANIMATION_FINISHED",payload:null}};var nfe="cubic-bezier(.2,1,.1,1)",rfe={drop:0,combining:.7},ife={drop:.75},ofe=.2+"s "+"cubic-bezier(0.2, 0, 0, 1)",afe={fluid:"opacity "+ofe,snap:"transform "+ofe+", opacity "+ofe,drop:function(e){var t=e+"s "+nfe;return"transform "+t+", opacity "+t},outOfTheWay:"transform "+ofe,placeholder:"height "+ofe+", width "+ofe+", margin "+ofe},sfe=function(e){return fhe(e,phe)?null:"translate("+e.x+"px, "+e.y+"px)"},lfe=sfe,cfe=function(e,t){var n=sfe(e);return n?t?n+" scale("+ife.drop+")":n:null},dfe=.33,ufe=.55,pfe=ufe-dfe,hfe=function(e){var t=e.getState,n=e.dispatch;return function(e){return function(r){if("DROP"===r.type){var i=t(),o=r.payload.reason;if("COLLECTING"!==i.phase){if("IDLE"!==i.phase){"DROP_PENDING"===i.phase&&i.isWaiting&&nhe(!1),"DRAGGING"!==i.phase&&"DROP_PENDING"!==i.phase&&nhe(!1);var a=i.critical,s=i.dimensions,l=s.draggables[i.critical.draggable.id],c=function(e){var t=e.draggables,n=e.reason,r=e.lastImpact,i=e.home,o=e.viewport,a=e.onLiftImpact;return r.at&&"DROP"===n?"REORDER"===r.at.type?{impact:r,didDropInsideDroppable:!0}:{impact:(0,Ft.A)({},r,{displaced:Bhe}),didDropInsideDroppable:!0}:{impact:Ome({draggables:t,impact:a,destination:i,viewport:o,forceShouldAnimate:!0}),didDropInsideDroppable:!1}}({reason:o,lastImpact:i.impact,afterCritical:i.afterCritical,onLiftImpact:i.onLiftImpact,home:i.dimensions.droppables[i.critical.droppable.id],viewport:i.viewport,draggables:i.dimensions.draggables}),d=c.impact,u=c.didDropInsideDroppable,p=u?Nhe(d):null,h=u?Lhe(d):null,m={index:a.draggable.index,droppableId:a.droppable.id},f={draggableId:l.descriptor.id,type:l.descriptor.type,source:m,reason:o,mode:i.movementMode,destination:p,combine:h},g=function(e){var t=e.impact,n=e.draggable,r=e.dimensions,i=e.viewport,o=e.afterCritical,a=r.draggables,s=r.droppables,l=bme(t),c=l?s[l]:null,d=s[n.descriptor.droppableId],u=Rme({impact:t,draggable:n,draggables:a,afterCritical:o,droppable:c||d,viewport:i});return mhe(u,n.client.borderBox.center)}({impact:d,draggable:l,dimensions:s,viewport:i.viewport,afterCritical:i.afterCritical}),v={critical:i.critical,afterCritical:i.afterCritical,result:f,impact:d};if(!fhe(i.current.client.offset,g)||Boolean(f.combine)){var x=function(e){var t=e.current,n=e.destination,r=e.reason,i=xhe(t,n);if(i<=0)return dfe;if(i>=1500)return ufe;var o=dfe+pfe*(i/1500);return Number(("CANCEL"===r?.6*o:o).toFixed(2))}({current:i.current.client.offset,destination:g,reason:o});n(function(e){return{type:"DROP_ANIMATE",payload:e}}({newHomeClientOffset:g,dropDuration:x,completed:v}))}else n(Jme({completed:v}))}}else n(function(e){return{type:"DROP_PENDING",payload:e}}({reason:o}))}else e(r)}}},mfe=function(){return{x:window.pageXOffset,y:window.pageYOffset}};function ffe(e){var t=e.onWindowScroll;var n=Kpe(function(){t(mfe())}),r=function(e){return{eventName:"scroll",options:{passive:!0,capture:!1},fn:function(t){t.target!==window&&t.target!==window.document||e()}}}(n),i=Qpe;function o(){return i!==Qpe}return{start:function(){o()&&nhe(!1),i=Jpe(window,[r])},stop:function(){o()||nhe(!1),n.cancel(),i(),i=Qpe},isActive:o}}var gfe=function(e){var t=ffe({onWindowScroll:function(t){e.dispatch(function(e){return{type:"MOVE_BY_WINDOW_SCROLL",payload:e}}({newScroll:t}))}});return function(e){return function(n){t.isActive()||"INITIAL_PUBLISH"!==n.type||t.start(),t.isActive()&&function(e){return"DROP_COMPLETE"===e.type||"DROP_ANIMATE"===e.type||"FLUSH"===e.type}(n)&&t.stop(),e(n)}}},vfe=function(){var e=[];return{add:function(t){var n=setTimeout(function(){return function(t){var n=khe(e,function(e){return e.timerId===t});-1===n&&nhe(!1),e.splice(n,1)[0].callback()}(n)}),r={timerId:n,callback:t};e.push(r)},flush:function(){if(e.length){var t=[].concat(e);e.length=0,t.forEach(function(e){clearTimeout(e.timerId),e.callback()})}}}},xfe=function(e,t){Nme(),t(),Lme()},yfe=function(e,t){return{draggableId:e.draggable.id,type:e.droppable.type,source:{droppableId:e.droppable.id,index:e.draggable.index},mode:t}},bfe=function(e,t,n,r){if(e){var i=function(e){var t=!1,n=!1,r=setTimeout(function(){n=!0}),i=function(i){t||n||(t=!0,e(i),clearTimeout(r))};return i.wasCalled=function(){return t},i}(n);e(t,{announce:i}),i.wasCalled()||n(r(t))}else n(r(t))},jfe=function(e,t){var n=function(e,t){var n=vfe(),r=null,i=function(n){r||nhe(!1),r=null,xfe(0,function(){return bfe(e().onDragEnd,n,t,uhe)})};return{beforeCapture:function(t,n){r&&nhe(!1),xfe(0,function(){var r=e().onBeforeCapture;r&&r({draggableId:t,mode:n})})},beforeStart:function(t,n){r&&nhe(!1),xfe(0,function(){var r=e().onBeforeDragStart;r&&r(yfe(t,n))})},start:function(i,o){r&&nhe(!1);var a=yfe(i,o);r={mode:o,lastCritical:i,lastLocation:a.source,lastCombine:null},n.add(function(){xfe(0,function(){return bfe(e().onDragStart,a,t,che)})})},update:function(i,o){var a=Nhe(o),s=Lhe(o);r||nhe(!1);var l=!function(e,t){if(e===t)return!0;var n=e.draggable.id===t.draggable.id&&e.draggable.droppableId===t.draggable.droppableId&&e.draggable.type===t.draggable.type&&e.draggable.index===t.draggable.index,r=e.droppable.id===t.droppable.id&&e.droppable.type===t.droppable.type;return n&&r}(i,r.lastCritical);l&&(r.lastCritical=i);var c=!function(e,t){return null==e&&null==t||null!=e&&null!=t&&e.droppableId===t.droppableId&&e.index===t.index}(r.lastLocation,a);c&&(r.lastLocation=a);var d=!function(e,t){return null==e&&null==t||null!=e&&null!=t&&e.draggableId===t.draggableId&&e.droppableId===t.droppableId}(r.lastCombine,s);if(d&&(r.lastCombine=s),l||c||d){var u=(0,Ft.A)({},yfe(i,r.mode),{combine:s,destination:a});n.add(function(){xfe(0,function(){return bfe(e().onDragUpdate,u,t,dhe)})})}},flush:function(){r||nhe(!1),n.flush()},drop:i,abort:function(){if(r){var e=(0,Ft.A)({},yfe(r.lastCritical,r.mode),{combine:null,destination:null,reason:"CANCEL"});i(e)}}}}(e,t);return function(e){return function(t){return function(r){if("BEFORE_INITIAL_CAPTURE"!==r.type){if("INITIAL_PUBLISH"===r.type){var i=r.payload.critical;return n.beforeStart(i,r.payload.movementMode),t(r),void n.start(i,r.payload.movementMode)}if("DROP_COMPLETE"===r.type){var o=r.payload.completed.result;return n.flush(),t(r),void n.drop(o)}if(t(r),"FLUSH"!==r.type){var a=e.getState();"DRAGGING"===a.phase&&n.update(a.critical,a.impact)}else n.abort()}else n.beforeCapture(r.payload.draggableId,r.payload.movementMode)}}}},_fe=function(e){return function(t){return function(n){if("DROP_ANIMATION_FINISHED"===n.type){var r=e.getState();"DROP_ANIMATING"!==r.phase&&nhe(!1),e.dispatch(Jme({completed:r.completed}))}else t(n)}}},Cfe=function(e){var t=null,n=null;return function(r){return function(i){if("FLUSH"!==i.type&&"DROP_COMPLETE"!==i.type&&"DROP_ANIMATION_FINISHED"!==i.type||(n&&(cancelAnimationFrame(n),n=null),t&&(t(),t=null)),r(i),"DROP_ANIMATE"===i.type){var o={eventName:"scroll",options:{capture:!0,passive:!1,once:!0},fn:function(){"DROP_ANIMATING"===e.getState().phase&&e.dispatch({type:"DROP_ANIMATION_FINISHED",payload:null})}};n=requestAnimationFrame(function(){n=null,t=Jpe(window,[o])})}}}},wfe=function(e){return function(t){return function(n){if(t(n),"PUBLISH_WHILE_DRAGGING"===n.type){var r=e.getState();"DROP_PENDING"===r.phase&&(r.isWaiting||e.dispatch(efe({reason:r.reason})))}}}},Sfe=Kue.Zz,Afe=function(e){var t,n=e.dimensionMarshal,r=e.focusMarshal,i=e.styleMarshal,o=e.getResponders,a=e.announce,s=e.autoScroller;return(0,Kue.y$)(Hme,Sfe((0,Kue.Tw)((t=i,function(){return function(e){return function(n){"INITIAL_PUBLISH"===n.type&&t.dragging(),"DROP_ANIMATE"===n.type&&t.dropping(n.payload.completed.result.reason),"FLUSH"!==n.type&&"DROP_COMPLETE"!==n.type||t.resting(),e(n)}}}),function(e){return function(){return function(t){return function(n){"DROP_COMPLETE"!==n.type&&"FLUSH"!==n.type&&"DROP_ANIMATE"!==n.type||e.stopPublishing(),t(n)}}}}(n),function(e){return function(t){var n=t.getState,r=t.dispatch;return function(t){return function(i){if("LIFT"===i.type){var o=i.payload,a=o.id,s=o.clientSelection,l=o.movementMode,c=n();"DROP_ANIMATING"===c.phase&&r(Jme({completed:c.completed})),"IDLE"!==n().phase&&nhe(!1),r({type:"FLUSH",payload:null}),r(function(e){return{type:"BEFORE_INITIAL_CAPTURE",payload:e}}({draggableId:a,movementMode:l}));var d={draggableId:a,scrollOptions:{shouldPublishImmediately:"SNAP"===l}},u=e.startPublishing(d),p=u.critical,h=u.dimensions,m=u.viewport;r(function(e){return{type:"INITIAL_PUBLISH",payload:e}}({critical:p,dimensions:h,clientSelection:s,movementMode:l,viewport:m}))}else t(i)}}}}(n),hfe,_fe,Cfe,wfe,function(e){return function(t){return function(n){return function(r){if(function(e){return"DROP_COMPLETE"===e.type||"DROP_ANIMATE"===e.type||"FLUSH"===e.type}(r))return e.stop(),void n(r);if("INITIAL_PUBLISH"===r.type){n(r);var i=t.getState();return"DRAGGING"!==i.phase&&nhe(!1),void e.start(i)}n(r),e.scroll(t.getState())}}}}(s),gfe,function(e){var t=!1;return function(){return function(n){return function(r){if("INITIAL_PUBLISH"===r.type)return t=!0,e.tryRecordFocus(r.payload.critical.draggable.id),n(r),void e.tryRestoreFocusRecorded();if(n(r),t){if("FLUSH"===r.type)return t=!1,void e.tryRestoreFocusRecorded();if("DROP_COMPLETE"===r.type){t=!1;var i=r.payload.completed.result;i.combine&&e.tryShiftRecord(i.draggableId,i.combine.draggableId),e.tryRestoreFocusRecorded()}}}}}}(r),jfe(o,a))))};var kfe=function(e){var t=e.scrollHeight,n=e.scrollWidth,r=e.height,i=e.width,o=mhe({x:n,y:t},{x:i,y:r});return{x:Math.max(0,o.x),y:Math.max(0,o.y)}},Tfe=function(){var e=document.documentElement;return e||nhe(!1),e},Efe=function(){var e=Tfe();return kfe({scrollHeight:e.scrollHeight,scrollWidth:e.scrollWidth,width:e.clientWidth,height:e.clientHeight})},Mfe=function(e){var t=e.critical,n=e.scrollOptions,r=e.registry;Nme();var i=function(){var e=mfe(),t=Efe(),n=e.y,r=e.x,i=Tfe(),o=i.clientWidth,a=i.clientHeight;return{frame:Lpe({top:n,left:r,right:r+o,bottom:n+a}),scroll:{initial:e,current:e,max:t,diff:{value:phe,displacement:phe}}}}(),o=i.scroll.current,a=t.droppable,s=r.droppable.getAllByType(a.type).map(function(e){return e.callbacks.getDimensionAndWatchScroll(o,n)}),l=r.draggable.getAllByType(t.draggable.type).map(function(e){return e.getDimension(o)}),c={draggables:Ohe(l),droppables:Mhe(s)};return Lme(),{dimensions:c,critical:t,viewport:i}};function Ofe(e,t,n){return n.descriptor.id!==t.id&&(n.descriptor.type===t.type&&"virtual"===e.droppable.getById(n.descriptor.droppableId).descriptor.mode)}var Rfe=function(e,t){var n=null,r=function(e){var t=e.registry,n=e.callbacks,r={additions:{},removals:{},modified:{}},i=null,o=function(){i||(n.collectionStarting(),i=requestAnimationFrame(function(){i=null,Nme();var e=r,o=e.additions,a=e.removals,s=e.modified,l=Object.keys(o).map(function(e){return t.draggable.getById(e).getDimension(phe)}).sort(function(e,t){return e.descriptor.index-t.descriptor.index}),c=Object.keys(s).map(function(e){return{droppableId:e,scroll:t.droppable.getById(e).callbacks.getScrollWhileDragging()}}),d={additions:l,removals:Object.keys(a),modified:c};r={additions:{},removals:{},modified:{}},Lme(),n.publish(d)}))};return{add:function(e){var t=e.descriptor.id;r.additions[t]=e,r.modified[e.descriptor.droppableId]=!0,r.removals[t]&&delete r.removals[t],o()},remove:function(e){var t=e.descriptor;r.removals[t.id]=!0,r.modified[t.droppableId]=!0,r.additions[t.id]&&delete r.additions[t.id],o()},stop:function(){i&&(cancelAnimationFrame(i),i=null,r={additions:{},removals:{},modified:{}})}}}({callbacks:{publish:t.publishWhileDragging,collectionStarting:t.collectionStarting},registry:e}),i=function(t){n||nhe(!1);var i=n.critical.draggable;"ADDITION"===t.type&&Ofe(e,i,t.value)&&r.add(t.value),"REMOVAL"===t.type&&Ofe(e,i,t.value)&&r.remove(t.value)},o={updateDroppableIsEnabled:function(r,i){e.droppable.exists(r)||nhe(!1),n&&t.updateDroppableIsEnabled({id:r,isEnabled:i})},updateDroppableIsCombineEnabled:function(r,i){n&&(e.droppable.exists(r)||nhe(!1),t.updateDroppableIsCombineEnabled({id:r,isCombineEnabled:i}))},scrollDroppable:function(t,r){n&&e.droppable.getById(t).callbacks.scroll(r)},updateDroppableScroll:function(r,i){n&&(e.droppable.exists(r)||nhe(!1),t.updateDroppableScroll({id:r,newScroll:i}))},startPublishing:function(t){n&&nhe(!1);var r=e.draggable.getById(t.draggableId),o=e.droppable.getById(r.descriptor.droppableId),a={draggable:r.descriptor,droppable:o.descriptor},s=e.subscribe(i);return n={critical:a,unsubscribe:s},Mfe({critical:a,registry:e,scrollOptions:t.scrollOptions})},stopPublishing:function(){if(n){r.stop();var t=n.critical.droppable;e.droppable.getAllByType(t.type).forEach(function(e){return e.callbacks.dragStopped()}),n.unsubscribe(),n=null}}};return o},Pfe=function(e,t){return"IDLE"===e.phase||"DROP_ANIMATING"===e.phase&&(e.completed.result.draggableId!==t&&"DROP"===e.completed.result.reason)},Dfe=function(e){window.scrollBy(e.x,e.y)},Nfe=Zpe(function(e){return Rhe(e).filter(function(e){return!!e.isEnabled&&!!e.frame})}),Lfe=function(e){var t=e.center,n=e.destination,r=e.droppables;if(n){var i=r[n];return i.frame?i:null}var o=function(e,t){var n=The(Nfe(t),function(t){return t.frame||nhe(!1),Cme(t.frame.pageMarginBox)(e)});return n}(t,r);return o},Ife=.25,Ffe=.05,$fe=28,Bfe=function(e){return Math.pow(e,2)},zfe={stopDampeningAt:1200,accelerateAt:360},Hfe=function(e){var t=e.startOfRange,n=e.endOfRange,r=e.current,i=n-t;return 0===i?0:(r-t)/i},Wfe=zfe.accelerateAt,Ufe=zfe.stopDampeningAt,Vfe=function(e){var t=e.distanceToEdge,n=e.thresholds,r=e.dragStartTime,i=e.shouldUseTimeDampening,o=function(e,t){if(e>t.startScrollingFrom)return 0;if(e<=t.maxScrollValueAt)return $fe;if(e===t.startScrollingFrom)return 1;var n=Hfe({startOfRange:t.maxScrollValueAt,endOfRange:t.startScrollingFrom,current:e}),r=$fe*Bfe(1-n);return Math.ceil(r)}(t,n);return 0===o?0:i?Math.max(function(e,t){var n=t,r=Ufe,i=Date.now()-n;if(i>=Ufe)return e;if(i<Wfe)return 1;var o=Hfe({startOfRange:Wfe,endOfRange:r,current:i}),a=e*Bfe(o);return Math.ceil(a)}(o,r),1):o},Gfe=function(e){var t=e.container,n=e.distanceToEdges,r=e.dragStartTime,i=e.axis,o=e.shouldUseTimeDampening,a=function(e,t){return{startScrollingFrom:e[t.size]*Ife,maxScrollValueAt:e[t.size]*Ffe}}(t,i);return n[i.end]<n[i.start]?Vfe({distanceToEdge:n[i.end],thresholds:a,dragStartTime:r,shouldUseTimeDampening:o}):-1*Vfe({distanceToEdge:n[i.start],thresholds:a,dragStartTime:r,shouldUseTimeDampening:o})},qfe=bhe(function(e){return 0===e?0:e}),Yfe=function(e){var t=e.dragStartTime,n=e.container,r=e.subject,i=e.center,o=e.shouldUseTimeDampening,a={top:i.y-n.top,right:n.right-i.x,bottom:n.bottom-i.y,left:i.x-n.left},s=Gfe({container:n,distanceToEdges:a,dragStartTime:t,axis:Vhe,shouldUseTimeDampening:o}),l=Gfe({container:n,distanceToEdges:a,dragStartTime:t,axis:Ghe,shouldUseTimeDampening:o}),c=qfe({x:l,y:s});if(fhe(c,phe))return null;var d=function(e){var t=e.container,n=e.subject,r=e.proposedScroll,i=n.height>t.height,o=n.width>t.width;return o||i?o&&i?null:{x:o?0:r.x,y:i?0:r.y}:r}({container:n,subject:r,proposedScroll:c});return d?fhe(d,phe)?null:d:null},Zfe=bhe(function(e){return 0===e?0:e>0?1:-1}),Kfe=function(){var e=function(e,t){return e<0?e:e>t?e-t:0};return function(t){var n=t.current,r=t.max,i=t.change,o=hhe(n,i),a={x:e(o.x,r.x),y:e(o.y,r.y)};return fhe(a,phe)?null:a}}(),Xfe=function(e){var t=e.max,n=e.current,r=e.change,i={x:Math.max(n.x,t.x),y:Math.max(n.y,t.y)},o=Zfe(r),a=Kfe({max:i,current:n,change:o});return!a||(0!==o.x&&0===a.x||0!==o.y&&0===a.y)},Qfe=function(e,t){return Xfe({current:e.scroll.current,max:e.scroll.max,change:t})},Jfe=function(e,t){var n=e.frame;return!!n&&Xfe({current:n.scroll.current,max:n.scroll.max,change:t})},ege=function(e){var t=e.state,n=e.dragStartTime,r=e.shouldUseTimeDampening,i=e.scrollWindow,o=e.scrollDroppable,a=t.current.page.borderBoxCenter,s=t.dimensions.draggables[t.critical.draggable.id].page.marginBox;if(t.isWindowScrollAllowed){var l=function(e){var t=e.viewport,n=e.subject,r=e.center,i=e.dragStartTime,o=e.shouldUseTimeDampening,a=Yfe({dragStartTime:i,container:t.frame,subject:n,center:r,shouldUseTimeDampening:o});return a&&Qfe(t,a)?a:null}({dragStartTime:n,viewport:t.viewport,subject:s,center:a,shouldUseTimeDampening:r});if(l)return void i(l)}var c=Lfe({center:a,destination:bme(t.impact),droppables:t.dimensions.droppables});if(c){var d=function(e){var t=e.droppable,n=e.subject,r=e.center,i=e.dragStartTime,o=e.shouldUseTimeDampening,a=t.frame;if(!a)return null;var s=Yfe({dragStartTime:i,container:a.pageMarginBox,subject:n,center:r,shouldUseTimeDampening:o});return s&&Jfe(t,s)?s:null}({dragStartTime:n,droppable:c,subject:s,center:a,shouldUseTimeDampening:r});d&&o(c.descriptor.id,d)}},tge=function(e){var t=e.move,n=e.scrollDroppable,r=e.scrollWindow,i=function(e,t){if(!Jfe(e,t))return t;var r=function(e,t){var n=e.frame;return n&&Jfe(e,t)?Kfe({current:n.scroll.current,max:n.scroll.max,change:t}):null}(e,t);if(!r)return n(e.descriptor.id,t),null;var i=mhe(t,r);return n(e.descriptor.id,i),mhe(t,i)},o=function(e,t,n){if(!e)return n;if(!Qfe(t,n))return n;var i=function(e,t){if(!Qfe(e,t))return null;var n=e.scroll.max,r=e.scroll.current;return Kfe({current:r,max:n,change:t})}(t,n);if(!i)return r(n),null;var o=mhe(n,i);return r(o),mhe(n,o)};return function(e){var n=e.scrollJumpRequest;if(n){var r=bme(e.impact);r||nhe(!1);var a=i(e.dimensions.droppables[r],n);if(a){var s=e.viewport,l=o(e.isWindowScrollAllowed,s,a);l&&function(e,n){var r=hhe(e.current.client.selection,n);t({client:r})}(e,l)}}}},nge=function(e){var t=e.scrollDroppable,n=e.scrollWindow,r=e.move,i=function(e){var t=e.scrollWindow,n=e.scrollDroppable,r=Kpe(t),i=Kpe(n),o=null,a=function(e){o||nhe(!1);var t=o,n=t.shouldUseTimeDampening,a=t.dragStartTime;ege({state:e,scrollWindow:r,scrollDroppable:i,dragStartTime:a,shouldUseTimeDampening:n})};return{start:function(e){Nme(),o&&nhe(!1);var t=Date.now(),n=!1,r=function(){n=!0};ege({state:e,dragStartTime:0,shouldUseTimeDampening:!1,scrollWindow:r,scrollDroppable:r}),o={dragStartTime:t,shouldUseTimeDampening:n},Lme(),n&&a(e)},stop:function(){o&&(r.cancel(),i.cancel(),o=null)},scroll:a}}({scrollWindow:n,scrollDroppable:t}),o=tge({move:r,scrollWindow:n,scrollDroppable:t});return{scroll:function(e){"DRAGGING"===e.phase&&("FLUID"!==e.movementMode?e.scrollJumpRequest&&o(e):i.scroll(e))},start:i.start,stop:i.stop}},rge="data-rbd",ige=function(){var e=rge+"-drag-handle";return{base:e,draggableId:e+"-draggable-id",contextId:e+"-context-id"}}(),oge=function(){var e=rge+"-draggable";return{base:e,contextId:e+"-context-id",id:e+"-id"}}(),age=function(){var e=rge+"-droppable";return{base:e,contextId:e+"-context-id",id:e+"-id"}}(),sge={contextId:rge+"-scroll-container-context-id"},lge=function(e,t){return e.map(function(e){var n=e.styles[t];return n?e.selector+" { "+n+" }":""}).join(" ")},cge="undefined"!==typeof window&&"undefined"!==typeof window.document&&"undefined"!==typeof window.document.createElement?We.useLayoutEffect:We.useEffect,dge=function(){var e=document.querySelector("head");return e||nhe(!1),e},uge=function(e){var t=document.createElement("style");return e&&t.setAttribute("nonce",e),t.type="text/css",t};function pge(e,t){var n=Dpe(function(){return function(e){var t,n=(t=e,function(e){return"["+e+'="'+t+'"]'}),r=function(){var e="\n      cursor: -webkit-grab;\n      cursor: grab;\n    ";return{selector:n(ige.contextId),styles:{always:"\n          -webkit-touch-callout: none;\n          -webkit-tap-highlight-color: rgba(0,0,0,0);\n          touch-action: manipulation;\n        ",resting:e,dragging:"pointer-events: none;",dropAnimating:e}}}(),i=function(){var e="\n      transition: "+afe.outOfTheWay+";\n    ";return{selector:n(oge.contextId),styles:{dragging:e,dropAnimating:e,userCancel:e}}}(),o=[i,r,{selector:n(age.contextId),styles:{always:"overflow-anchor: none;"}},{selector:"body",styles:{dragging:"\n        cursor: grabbing;\n        cursor: -webkit-grabbing;\n        user-select: none;\n        -webkit-user-select: none;\n        -moz-user-select: none;\n        -ms-user-select: none;\n        overflow-anchor: none;\n      "}}];return{always:lge(o,"always"),resting:lge(o,"resting"),dragging:lge(o,"dragging"),dropAnimating:lge(o,"dropAnimating"),userCancel:lge(o,"userCancel")}}(e)},[e]),r=(0,We.useRef)(null),i=(0,We.useRef)(null),o=Npe(Zpe(function(e){var t=i.current;t||nhe(!1),t.textContent=e}),[]),a=Npe(function(e){var t=r.current;t||nhe(!1),t.textContent=e},[]);cge(function(){(r.current||i.current)&&nhe(!1);var s=uge(t),l=uge(t);return r.current=s,i.current=l,s.setAttribute(rge+"-always",e),l.setAttribute(rge+"-dynamic",e),dge().appendChild(s),dge().appendChild(l),a(n.always),o(n.resting),function(){var e=function(e){var t=e.current;t||nhe(!1),dge().removeChild(t),e.current=null};e(r),e(i)}},[t,a,o,n.always,n.resting,e]);var s=Npe(function(){return o(n.dragging)},[o,n.dragging]),l=Npe(function(e){o("DROP"!==e?n.userCancel:n.dropAnimating)},[o,n.dropAnimating,n.userCancel]),c=Npe(function(){i.current&&o(n.resting)},[o,n.resting]);return Dpe(function(){return{dragging:s,dropping:l,resting:c}},[s,l,c])}var hge=function(e){return e&&e.ownerDocument?e.ownerDocument.defaultView:window};function mge(e){return e instanceof hge(e).HTMLElement}function fge(e,t){var n="["+ige.contextId+'="'+e+'"]',r=Ehe(document.querySelectorAll(n));if(!r.length)return null;var i=The(r,function(e){return e.getAttribute(ige.draggableId)===t});return i&&mge(i)?i:null}function gge(){var e={draggables:{},droppables:{}},t=[];function n(e){t.length&&t.forEach(function(t){return t(e)})}function r(t){return e.draggables[t]||null}var i={register:function(t){e.draggables[t.descriptor.id]=t,n({type:"ADDITION",value:t})},update:function(t,n){var r=e.draggables[n.descriptor.id];r&&r.uniqueId===t.uniqueId&&(delete e.draggables[n.descriptor.id],e.draggables[t.descriptor.id]=t)},unregister:function(t){var i=t.descriptor.id,o=r(i);o&&t.uniqueId===o.uniqueId&&(delete e.draggables[i],n({type:"REMOVAL",value:t}))},getById:function(e){var t=r(e);return t||nhe(!1),t},findById:r,exists:function(e){return Boolean(r(e))},getAllByType:function(t){return Ahe(e.draggables).filter(function(e){return e.descriptor.type===t})}};function o(t){return e.droppables[t]||null}return{draggable:i,droppable:{register:function(t){e.droppables[t.descriptor.id]=t},unregister:function(t){var n=o(t.descriptor.id);n&&t.uniqueId===n.uniqueId&&delete e.droppables[t.descriptor.id]},getById:function(e){var t=o(e);return t||nhe(!1),t},findById:o,exists:function(e){return Boolean(o(e))},getAllByType:function(t){return Ahe(e.droppables).filter(function(e){return e.descriptor.type===t})}},subscribe:function(e){return t.push(e),function(){var n=t.indexOf(e);-1!==n&&t.splice(n,1)}},clean:function(){e.draggables={},e.droppables={},t.length=0}}}var vge=We.createContext(null),xge=function(){var e=document.body;return e||nhe(!1),e},yge={position:"absolute",width:"1px",height:"1px",margin:"-1px",border:"0",padding:"0",overflow:"hidden",clip:"rect(0 0 0 0)","clip-path":"inset(100%)"};var bge=0,jge={separator:"::"};function _ge(e,t){return void 0===t&&(t=jge),Dpe(function(){return""+e+t.separator+bge++},[t.separator,e])}var Cge=We.createContext(null);function wge(e){0}function Sge(e,t){wge()}function Age(){Sge()}function kge(e){var t=(0,We.useRef)(e);return(0,We.useEffect)(function(){t.current=e}),t}var Tge,Ege=((Tge={})[13]=!0,Tge[9]=!0,Tge),Mge=function(e){Ege[e.keyCode]&&e.preventDefault()},Oge=function(){var e="visibilitychange";return"undefined"===typeof document?e:The([e,"ms"+e,"webkit"+e,"moz"+e,"o"+e],function(e){return"on"+e in document})||e}();var Rge,Pge={type:"IDLE"};function Dge(e){var t=e.cancel,n=e.completed,r=e.getPhase,i=e.setPhase;return[{eventName:"mousemove",fn:function(e){var t=e.button,n=e.clientX,o=e.clientY;if(0===t){var a={x:n,y:o},s=r();if("DRAGGING"===s.type)return e.preventDefault(),void s.actions.move(a);"PENDING"!==s.type&&nhe(!1);var l=s.point;if(c=l,d=a,Math.abs(d.x-c.x)>=5||Math.abs(d.y-c.y)>=5){var c,d;e.preventDefault();var u=s.actions.fluidLift(a);i({type:"DRAGGING",actions:u})}}}},{eventName:"mouseup",fn:function(e){var i=r();"DRAGGING"===i.type?(e.preventDefault(),i.actions.drop({shouldBlockNextClick:!0}),n()):t()}},{eventName:"mousedown",fn:function(e){"DRAGGING"===r().type&&e.preventDefault(),t()}},{eventName:"keydown",fn:function(e){if("PENDING"!==r().type)return 27===e.keyCode?(e.preventDefault(),void t()):void Mge(e);t()}},{eventName:"resize",fn:t},{eventName:"scroll",options:{passive:!0,capture:!1},fn:function(){"PENDING"===r().type&&t()}},{eventName:"webkitmouseforcedown",fn:function(e){var n=r();"IDLE"===n.type&&nhe(!1),n.actions.shouldRespectForcePress()?t():e.preventDefault()}},{eventName:Oge,fn:t}]}function Nge(){}var Lge=((Rge={})[34]=!0,Rge[33]=!0,Rge[36]=!0,Rge[35]=!0,Rge);function Ige(e,t){function n(){t(),e.cancel()}return[{eventName:"keydown",fn:function(r){return 27===r.keyCode?(r.preventDefault(),void n()):32===r.keyCode?(r.preventDefault(),t(),void e.drop()):40===r.keyCode?(r.preventDefault(),void e.moveDown()):38===r.keyCode?(r.preventDefault(),void e.moveUp()):39===r.keyCode?(r.preventDefault(),void e.moveRight()):37===r.keyCode?(r.preventDefault(),void e.moveLeft()):void(Lge[r.keyCode]?r.preventDefault():Mge(r))}},{eventName:"mousedown",fn:n},{eventName:"mouseup",fn:n},{eventName:"click",fn:n},{eventName:"touchstart",fn:n},{eventName:"resize",fn:n},{eventName:"wheel",fn:n,options:{passive:!0}},{eventName:Oge,fn:n}]}var Fge={type:"IDLE"};var $ge={input:!0,button:!0,textarea:!0,select:!0,option:!0,optgroup:!0,video:!0,audio:!0};function Bge(e,t){if(null==t)return!1;if(Boolean($ge[t.tagName.toLowerCase()]))return!0;var n=t.getAttribute("contenteditable");return"true"===n||""===n||t!==e&&Bge(e,t.parentElement)}function zge(e,t){var n=t.target;return!!mge(n)&&Bge(e,n)}var Hge=function(e){return Lpe(e.getBoundingClientRect()).center};var Wge=function(){var e="matches";return"undefined"===typeof document?e:The([e,"msMatchesSelector","webkitMatchesSelector"],function(e){return e in Element.prototype})||e}();function Uge(e,t){return null==e?null:e[Wge](t)?e:Uge(e.parentElement,t)}function Vge(e,t){return e.closest?e.closest(t):Uge(e,t)}function Gge(e,t){var n=t.target;if(!function(e){return e instanceof hge(e).Element}(n))return null;var r=function(e){return"["+ige.contextId+'="'+e+'"]'}(e),i=Vge(n,r);return i&&mge(i)?i:null}function qge(e){e.preventDefault()}function Yge(e){var t=e.expected,n=e.phase,r=e.isLockActive;e.shouldWarn;return!!r()&&t===n}function Zge(e){var t=e.lockAPI,n=e.store,r=e.registry,i=e.draggableId;if(t.isClaimed())return!1;var o=r.draggable.findById(i);return!!o&&(!!o.options.isEnabled&&!!Pfe(n.getState(),i))}function Kge(e){var t=e.lockAPI,n=e.contextId,r=e.store,i=e.registry,o=e.draggableId,a=e.forceSensorStop,s=e.sourceEvent;if(!Zge({lockAPI:t,store:r,registry:i,draggableId:o}))return null;var l=i.draggable.getById(o),c=function(e,t){var n="["+oge.contextId+'="'+e+'"]',r=The(Ehe(document.querySelectorAll(n)),function(e){return e.getAttribute(oge.id)===t});return r&&mge(r)?r:null}(n,l.descriptor.id);if(!c)return null;if(s&&!l.options.canDragInteractiveElements&&zge(c,s))return null;var d=t.claim(a||Qpe),u="PRE_DRAG";function p(){return l.options.shouldRespectForcePress}function h(){return t.isActive(d)}var m=function(e,t){Yge({expected:e,phase:u,isLockActive:h,shouldWarn:!0})&&r.dispatch(t())}.bind(null,"DRAGGING");function f(e){function n(){t.release(),u="COMPLETED"}function i(t,i){if(void 0===i&&(i={shouldBlockNextClick:!1}),e.cleanup(),i.shouldBlockNextClick){var o=Jpe(window,[{eventName:"click",fn:qge,options:{once:!0,passive:!1,capture:!0}}]);setTimeout(o)}n(),r.dispatch(efe({reason:t}))}return"PRE_DRAG"!==u&&(n(),"PRE_DRAG"!==u&&nhe(!1)),r.dispatch(function(e){return{type:"LIFT",payload:e}}(e.liftActionArgs)),u="DRAGGING",(0,Ft.A)({isActive:function(){return Yge({expected:"DRAGGING",phase:u,isLockActive:h,shouldWarn:!1})},shouldRespectForcePress:p,drop:function(e){return i("DROP",e)},cancel:function(e){return i("CANCEL",e)}},e.actions)}var g={isActive:function(){return Yge({expected:"PRE_DRAG",phase:u,isLockActive:h,shouldWarn:!1})},shouldRespectForcePress:p,fluidLift:function(e){var t=Kpe(function(e){m(function(){return Yme({client:e})})}),n=f({liftActionArgs:{id:o,clientSelection:e,movementMode:"FLUID"},cleanup:function(){return t.cancel()},actions:{move:t}});return(0,Ft.A)({},n,{move:t})},snapLift:function(){var e={moveUp:function(){return m(Zme)},moveRight:function(){return m(Xme)},moveDown:function(){return m(Kme)},moveLeft:function(){return m(Qme)}};return f({liftActionArgs:{id:o,clientSelection:Hge(c),movementMode:"SNAP"},cleanup:Qpe,actions:e})},abort:function(){Yge({expected:"PRE_DRAG",phase:u,isLockActive:h,shouldWarn:!0})&&t.release()}};return g}var Xge=[function(e){var t=(0,We.useRef)(Pge),n=(0,We.useRef)(Qpe),r=Dpe(function(){return{eventName:"mousedown",fn:function(t){if(!t.defaultPrevented&&0===t.button&&!(t.ctrlKey||t.metaKey||t.shiftKey||t.altKey)){var r=e.findClosestDraggableId(t);if(r){var i=e.tryGetLock(r,a,{sourceEvent:t});if(i){t.preventDefault();var o={x:t.clientX,y:t.clientY};n.current(),c(i,o)}}}}}},[e]),i=Dpe(function(){return{eventName:"webkitmouseforcewillbegin",fn:function(t){if(!t.defaultPrevented){var n=e.findClosestDraggableId(t);if(n){var r=e.findOptionsForDraggable(n);r&&(r.shouldRespectForcePress||e.canGetLock(n)&&t.preventDefault())}}}}},[e]),o=Npe(function(){n.current=Jpe(window,[i,r],{passive:!1,capture:!0})},[i,r]),a=Npe(function(){"IDLE"!==t.current.type&&(t.current=Pge,n.current(),o())},[o]),s=Npe(function(){var e=t.current;a(),"DRAGGING"===e.type&&e.actions.cancel({shouldBlockNextClick:!0}),"PENDING"===e.type&&e.actions.abort()},[a]),l=Npe(function(){var e=Dge({cancel:s,completed:a,getPhase:function(){return t.current},setPhase:function(e){t.current=e}});n.current=Jpe(window,e,{capture:!0,passive:!1})},[s,a]),c=Npe(function(e,n){"IDLE"!==t.current.type&&nhe(!1),t.current={type:"PENDING",point:n,actions:e},l()},[l]);cge(function(){return o(),function(){n.current()}},[o])},function(e){var t=(0,We.useRef)(Nge),n=Dpe(function(){return{eventName:"keydown",fn:function(n){if(!n.defaultPrevented&&32===n.keyCode){var i=e.findClosestDraggableId(n);if(i){var o=e.tryGetLock(i,l,{sourceEvent:n});if(o){n.preventDefault();var a=!0,s=o.snapLift();t.current(),t.current=Jpe(window,Ige(s,l),{capture:!0,passive:!1})}}}function l(){a||nhe(!1),a=!1,t.current(),r()}}}},[e]),r=Npe(function(){t.current=Jpe(window,[n],{passive:!1,capture:!0})},[n]);cge(function(){return r(),function(){t.current()}},[r])},function(e){var t=(0,We.useRef)(Fge),n=(0,We.useRef)(Qpe),r=Npe(function(){return t.current},[]),i=Npe(function(e){t.current=e},[]),o=Dpe(function(){return{eventName:"touchstart",fn:function(t){if(!t.defaultPrevented){var r=e.findClosestDraggableId(t);if(r){var i=e.tryGetLock(r,s,{sourceEvent:t});if(i){var o=t.touches[0],a={x:o.clientX,y:o.clientY};n.current(),u(i,a)}}}}}},[e]),a=Npe(function(){n.current=Jpe(window,[o],{capture:!0,passive:!1})},[o]),s=Npe(function(){var e=t.current;"IDLE"!==e.type&&("PENDING"===e.type&&clearTimeout(e.longPressTimerId),i(Fge),n.current(),a())},[a,i]),l=Npe(function(){var e=t.current;s(),"DRAGGING"===e.type&&e.actions.cancel({shouldBlockNextClick:!0}),"PENDING"===e.type&&e.actions.abort()},[s]),c=Npe(function(){var e={capture:!0,passive:!1},t={cancel:l,completed:s,getPhase:r},i=Jpe(window,function(e){var t=e.cancel,n=e.completed,r=e.getPhase;return[{eventName:"touchmove",options:{capture:!1},fn:function(e){var n=r();if("DRAGGING"===n.type){n.hasMoved=!0;var i=e.touches[0],o={x:i.clientX,y:i.clientY};e.preventDefault(),n.actions.move(o)}else t()}},{eventName:"touchend",fn:function(e){var i=r();"DRAGGING"===i.type?(e.preventDefault(),i.actions.drop({shouldBlockNextClick:!0}),n()):t()}},{eventName:"touchcancel",fn:function(e){"DRAGGING"===r().type?(e.preventDefault(),t()):t()}},{eventName:"touchforcechange",fn:function(e){var n=r();"IDLE"===n.type&&nhe(!1);var i=e.touches[0];if(i&&i.force>=.15){var o=n.actions.shouldRespectForcePress();if("PENDING"!==n.type)return o?n.hasMoved?void e.preventDefault():void t():void e.preventDefault();o&&t()}}},{eventName:Oge,fn:t}]}(t),e),o=Jpe(window,function(e){var t=e.cancel,n=e.getPhase;return[{eventName:"orientationchange",fn:t},{eventName:"resize",fn:t},{eventName:"contextmenu",fn:function(e){e.preventDefault()}},{eventName:"keydown",fn:function(e){"DRAGGING"===n().type?(27===e.keyCode&&e.preventDefault(),t()):t()}},{eventName:Oge,fn:t}]}(t),e);n.current=function(){i(),o()}},[l,r,s]),d=Npe(function(){var e=r();"PENDING"!==e.type&&nhe(!1);var t=e.actions.fluidLift(e.point);i({type:"DRAGGING",actions:t,hasMoved:!1})},[r,i]),u=Npe(function(e,t){"IDLE"!==r().type&&nhe(!1);var n=setTimeout(d,120);i({type:"PENDING",point:t,actions:e,longPressTimerId:n}),c()},[c,r,i,d]);cge(function(){return a(),function(){n.current();var e=r();"PENDING"===e.type&&(clearTimeout(e.longPressTimerId),i(Fge))}},[r,a,i]),cge(function(){return Jpe(window,[{eventName:"touchmove",fn:function(){},options:{capture:!1,passive:!1}}])},[])}];function Qge(e){var t=e.contextId,n=e.store,r=e.registry,i=e.customSensors,o=e.enableDefaultSensors,a=[].concat(o?Xge:[],i||[]),s=(0,We.useState)(function(){return function(){var e=null;function t(){e||nhe(!1),e=null}return{isClaimed:function(){return Boolean(e)},isActive:function(t){return t===e},claim:function(t){e&&nhe(!1);var n={abandon:t};return e=n,n},release:t,tryAbandon:function(){e&&(e.abandon(),t())}}}()})[0],l=Npe(function(e,t){e.isDragging&&!t.isDragging&&s.tryAbandon()},[s]);cge(function(){var e=n.getState();return n.subscribe(function(){var t=n.getState();l(e,t),e=t})},[s,n,l]),cge(function(){return s.tryAbandon},[s.tryAbandon]);var c=Npe(function(e){return Zge({lockAPI:s,registry:r,store:n,draggableId:e})},[s,r,n]),d=Npe(function(e,i,o){return Kge({lockAPI:s,registry:r,contextId:t,store:n,draggableId:e,forceSensorStop:i,sourceEvent:o&&o.sourceEvent?o.sourceEvent:null})},[t,s,r,n]),u=Npe(function(e){return function(e,t){var n=Gge(e,t);return n?n.getAttribute(ige.draggableId):null}(t,e)},[t]),p=Npe(function(e){var t=r.draggable.findById(e);return t?t.options:null},[r.draggable]),h=Npe(function(){s.isClaimed()&&(s.tryAbandon(),"IDLE"!==n.getState().phase&&n.dispatch({type:"FLUSH",payload:null}))},[s,n]),m=Npe(s.isClaimed,[s]),f=Dpe(function(){return{canGetLock:c,tryGetLock:d,findClosestDraggableId:u,findOptionsForDraggable:p,tryReleaseLock:h,isLockClaimed:m}},[c,d,u,p,h,m]);wge();for(var g=0;g<a.length;g++)a[g](f)}function Jge(e){return e.current||nhe(!1),e.current}function eve(e){var t=e.contextId,n=e.setCallbacks,r=e.sensors,i=e.nonce,o=e.dragHandleUsageInstructions,a=(0,We.useRef)(null);Age();var s=kge(e),l=Npe(function(){return function(e){return{onBeforeCapture:e.onBeforeCapture,onBeforeDragStart:e.onBeforeDragStart,onDragStart:e.onDragStart,onDragEnd:e.onDragEnd,onDragUpdate:e.onDragUpdate}}(s.current)},[s]),c=function(e){var t=Dpe(function(){return function(e){return"rbd-announcement-"+e}(e)},[e]),n=(0,We.useRef)(null);(0,We.useEffect)(function(){var e=document.createElement("div");return n.current=e,e.id=t,e.setAttribute("aria-live","assertive"),e.setAttribute("aria-atomic","true"),(0,Ft.A)(e.style,yge),xge().appendChild(e),function(){setTimeout(function(){var t=xge();t.contains(e)&&t.removeChild(e),e===n.current&&(n.current=null)})}},[t]);var r=Npe(function(e){var t=n.current;t&&(t.textContent=e)},[]);return r}(t),d=function(e){var t=e.contextId,n=e.text,r=_ge("hidden-text",{separator:"-"}),i=Dpe(function(){return"rbd-hidden-text-"+(e={contextId:t,uniqueId:r}).contextId+"-"+e.uniqueId;var e},[r,t]);return(0,We.useEffect)(function(){var e=document.createElement("div");return e.id=i,e.textContent=n,e.style.display="none",xge().appendChild(e),function(){var t=xge();t.contains(e)&&t.removeChild(e)}},[i,n]),i}({contextId:t,text:o}),u=pge(t,i),p=Npe(function(e){Jge(a).dispatch(e)},[]),h=Dpe(function(){return(0,Kue.zH)({publishWhileDragging:Wme,updateDroppableScroll:Vme,updateDroppableIsEnabled:Gme,updateDroppableIsCombineEnabled:qme,collectionStarting:Ume},p)},[p]),m=function(){var e=Dpe(gge,[]);return(0,We.useEffect)(function(){return function(){requestAnimationFrame(e.clean)}},[e]),e}(),f=Dpe(function(){return Rfe(m,h)},[m,h]),g=Dpe(function(){return nge((0,Ft.A)({scrollWindow:Dfe,scrollDroppable:f.scrollDroppable},(0,Kue.zH)({move:Yme},p)))},[f.scrollDroppable,p]),v=function(e){var t=(0,We.useRef)({}),n=(0,We.useRef)(null),r=(0,We.useRef)(null),i=(0,We.useRef)(!1),o=Npe(function(e,n){var r={id:e,focus:n};return t.current[e]=r,function(){var n=t.current;n[e]!==r&&delete n[e]}},[]),a=Npe(function(t){var n=fge(e,t);n&&n!==document.activeElement&&n.focus()},[e]),s=Npe(function(e,t){n.current===e&&(n.current=t)},[]),l=Npe(function(){r.current||i.current&&(r.current=requestAnimationFrame(function(){r.current=null;var e=n.current;e&&a(e)}))},[a]),c=Npe(function(e){n.current=null;var t=document.activeElement;t&&t.getAttribute(ige.draggableId)===e&&(n.current=e)},[]);return cge(function(){return i.current=!0,function(){i.current=!1;var e=r.current;e&&cancelAnimationFrame(e)}},[]),Dpe(function(){return{register:o,tryRecordFocus:c,tryRestoreFocusRecorded:l,tryShiftRecord:s}},[o,c,l,s])}(t),x=Dpe(function(){return Afe({announce:c,autoScroller:g,dimensionMarshal:f,focusMarshal:v,getResponders:l,styleMarshal:u})},[c,g,f,v,l,u]);a.current=x;var y=Npe(function(){var e=Jge(a);"IDLE"!==e.getState().phase&&e.dispatch({type:"FLUSH",payload:null})},[]),b=Npe(function(){var e=Jge(a).getState();return e.isDragging||"DROP_ANIMATING"===e.phase},[]);n(Dpe(function(){return{isDragging:b,tryAbort:y}},[b,y]));var j=Npe(function(e){return Pfe(Jge(a).getState(),e)},[]),_=Npe(function(){return _me(Jge(a).getState())},[]),C=Dpe(function(){return{marshal:f,focus:v,contextId:t,canLift:j,isMovementAllowed:_,dragHandleUsageInstructionsId:d,registry:m}},[t,f,d,v,j,_,m]);return Qge({contextId:t,store:x,registry:m,customSensors:r,enableDefaultSensors:!1!==e.enableDefaultSensors}),(0,We.useEffect)(function(){return y},[y]),We.createElement(Cge.Provider,{value:C},We.createElement(rpe,{context:vge,store:x},e.children))}var tve=0;function nve(e){var t=Dpe(function(){return""+tve++},[]),n=e.dragHandleUsageInstructions||lhe;return We.createElement(rhe,null,function(r){return We.createElement(eve,{nonce:e.nonce,contextId:t,setCallbacks:r,dragHandleUsageInstructions:n,enableDefaultSensors:e.enableDefaultSensors,sensors:e.sensors,onBeforeCapture:e.onBeforeCapture,onBeforeDragStart:e.onBeforeDragStart,onDragStart:e.onDragStart,onDragUpdate:e.onDragUpdate,onDragEnd:e.onDragEnd},e.children)})}var rve=function(e){return function(t){return e===t}},ive=rve("scroll"),ove=rve("auto"),ave=(rve("visible"),function(e,t){return t(e.overflowX)||t(e.overflowY)}),sve=function e(t){return null==t||t===document.body||t===document.documentElement?null:function(e){var t=window.getComputedStyle(e),n={overflowX:t.overflowX,overflowY:t.overflowY};return ave(n,ive)||ave(n,ove)}(t)?t:e(t.parentElement)},lve=function(e){return{x:e.scrollLeft,y:e.scrollTop}},cve=function e(t){return!!t&&("fixed"===window.getComputedStyle(t).position||e(t.parentElement))},dve=function(e){return{closestScrollable:sve(e),isFixedOnPage:cve(e)}},uve=function(e){var t=e.ref,n=e.descriptor,r=e.env,i=e.windowScroll,o=e.direction,a=e.isDropDisabled,s=e.isCombineEnabled,l=e.shouldClipSubject,c=r.closestScrollable,d=function(e,t){var n=Vpe(e);if(!t)return n;if(e!==t)return n;var r=n.paddingBox.top-t.scrollTop,i=n.paddingBox.left-t.scrollLeft,o=r+t.scrollHeight,a=i+t.scrollWidth,s=Ipe({top:r,right:a,bottom:o,left:i},n.border);return Bpe({borderBox:s,margin:n.margin,border:n.border,padding:n.padding})}(t,c),u=Wpe(d,i),p=function(){if(!c)return null;var e=Vpe(c),t={scrollHeight:c.scrollHeight,scrollWidth:c.scrollWidth};return{client:e,page:Wpe(e,i),scroll:lve(c),scrollSize:t,shouldClipSubject:l}}(),h=function(e){var t=e.descriptor,n=e.isEnabled,r=e.isCombineEnabled,i=e.isFixedOnPage,o=e.direction,a=e.client,s=e.page,l=e.closest,c=function(){if(!l)return null;var e=l.scrollSize,t=l.client,n=kfe({scrollHeight:e.scrollHeight,scrollWidth:e.scrollWidth,height:t.paddingBox.height,width:t.paddingBox.width});return{pageMarginBox:l.page.marginBox,frameClient:t,scrollSize:e,shouldClipSubject:l.shouldClipSubject,scroll:{initial:l.scroll,current:l.scroll,max:n,diff:{value:phe,displacement:phe}}}}(),d="vertical"===o?Vhe:Ghe;return{descriptor:t,isCombineEnabled:r,isFixedOnPage:i,axis:d,isEnabled:n,client:a,page:s,frame:c,subject:whe({page:s,withPlaceholder:null,axis:d,frame:c})}}({descriptor:n,isEnabled:!a,isCombineEnabled:s,isFixedOnPage:r.isFixedOnPage,direction:o,client:d,page:u,closest:p});return h},pve={passive:!1},hve={passive:!0},mve=function(e){return e.shouldPublishImmediately?pve:hve};function fve(e){var t=(0,We.useContext)(e);return t||nhe(!1),t}var gve=function(e){return e&&e.env.closestScrollable||null};function vve(){}var xve={width:0,height:0,margin:{top:0,right:0,bottom:0,left:0}},yve=function(e){var t=e.isAnimatingOpenOnMount,n=e.placeholder,r=e.animate,i=function(e){var t=e.isAnimatingOpenOnMount,n=e.placeholder,r=e.animate;return t||"close"===r?xve:{height:n.client.borderBox.height,width:n.client.borderBox.width,margin:n.client.margin}}({isAnimatingOpenOnMount:t,placeholder:n,animate:r});return{display:n.display,boxSizing:"border-box",width:i.width,height:i.height,marginTop:i.margin.top,marginRight:i.margin.right,marginBottom:i.margin.bottom,marginLeft:i.margin.left,flexShrink:"0",flexGrow:"0",pointerEvents:"none",transition:"none"!==r?afe.placeholder:null}};var bve=We.memo(function(e){var t=(0,We.useRef)(null),n=Npe(function(){t.current&&(clearTimeout(t.current),t.current=null)},[]),r=e.animate,i=e.onTransitionEnd,o=e.onClose,a=e.contextId,s=(0,We.useState)("open"===e.animate),l=s[0],c=s[1];(0,We.useEffect)(function(){return l?"open"!==r?(n(),c(!1),vve):t.current?vve:(t.current=setTimeout(function(){t.current=null,c(!1)}),n):vve},[r,l,n]);var d=Npe(function(e){"height"===e.propertyName&&(i(),"close"===r&&o())},[r,o,i]),u=yve({isAnimatingOpenOnMount:l,animate:e.animate,placeholder:e.placeholder});return We.createElement(e.placeholder.tagName,{style:u,"data-rbd-placeholder-context-id":a,onTransitionEnd:d,ref:e.innerRef})}),jve=We.createContext(null);var _ve=function(e){function t(){for(var t,n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return(t=e.call.apply(e,[this].concat(r))||this).state={isVisible:Boolean(t.props.on),data:t.props.on,animate:t.props.shouldAnimate&&t.props.on?"open":"none"},t.onClose=function(){"close"===t.state.animate&&t.setState({isVisible:!1})},t}return _n(t,e),t.getDerivedStateFromProps=function(e,t){return e.shouldAnimate?e.on?{isVisible:!0,data:e.on,animate:"open"}:t.isVisible?{isVisible:!0,data:t.data,animate:"close"}:{isVisible:!1,animate:"close",data:null}:{isVisible:Boolean(e.on),data:e.on,animate:"none"}},t.prototype.render=function(){if(!this.state.isVisible)return null;var e={onClose:this.onClose,data:this.state.data,animate:this.state.animate};return this.props.children(e)},t}(We.PureComponent),Cve=5e3,wve=4500,Sve=function(e,t){return t?afe.drop(t.duration):e?afe.snap:afe.fluid},Ave=function(e,t){return e?t?rfe.drop:rfe.combining:null};function kve(e){return"DRAGGING"===e.type?function(e){var t=e.dimension.client,n=e.offset,r=e.combineWith,i=e.dropping,o=Boolean(r),a=function(e){return null!=e.forceShouldAnimate?e.forceShouldAnimate:"SNAP"===e.mode}(e),s=Boolean(i),l=s?cfe(n,o):lfe(n);return{position:"fixed",top:t.marginBox.top,left:t.marginBox.left,boxSizing:"border-box",width:t.borderBox.width,height:t.borderBox.height,transition:Sve(a,i),transform:l,opacity:Ave(o,s),zIndex:s?wve:Cve,pointerEvents:"none"}}(e):{transform:lfe((t=e).offset),transition:t.shouldAnimateDisplacement?null:"none"};var t}function Tve(e){var t=_ge("draggable"),n=e.descriptor,r=e.registry,i=e.getDraggableRef,o=e.canDragInteractiveElements,a=e.shouldRespectForcePress,s=e.isEnabled,l=Dpe(function(){return{canDragInteractiveElements:o,shouldRespectForcePress:a,isEnabled:s}},[o,s,a]),c=Npe(function(e){var t=i();return t||nhe(!1),function(e,t,n){void 0===n&&(n=phe);var r=window.getComputedStyle(t),i=t.getBoundingClientRect(),o=Upe(i,r),a=Wpe(o,n);return{descriptor:e,placeholder:{client:o,tagName:t.tagName.toLowerCase(),display:r.display},displaceBy:{x:o.marginBox.width,y:o.marginBox.height},client:o,page:a}}(n,t,e)},[n,i]),d=Dpe(function(){return{uniqueId:t,descriptor:n,options:l,getDimension:c}},[n,c,l,t]),u=(0,We.useRef)(d),p=(0,We.useRef)(!0);cge(function(){return r.draggable.register(u.current),function(){return r.draggable.unregister(u.current)}},[r.draggable]),cge(function(){if(p.current)p.current=!1;else{var e=u.current;u.current=d,r.draggable.update(d,e)}},[d,r.draggable])}function Eve(e,t,n){Sge()}function Mve(e){e.preventDefault()}var Ove=function(e,t){return e===t},Rve=function(e){var t=e.combine,n=e.destination;return n?n.droppableId:t?t.droppableId:null};function Pve(e){return{isDragging:!1,isDropAnimating:!1,isClone:!1,dropAnimation:null,mode:null,draggingOver:null,combineTargetFor:e,combineWith:null}}var Dve={mapped:{type:"SECONDARY",offset:phe,combineTargetFor:null,shouldAnimateDisplacement:!0,snapshot:Pve(null)}};var Nve=Rpe(function(){var e=function(){var e=Zpe(function(e,t){return{x:e,y:t}}),t=Zpe(function(e,t,n,r,i){return{isDragging:!0,isClone:t,isDropAnimating:Boolean(i),dropAnimation:i,mode:e,draggingOver:n,combineWith:r,combineTargetFor:null}}),n=Zpe(function(e,n,r,i,o,a,s){return{mapped:{type:"DRAGGING",dropping:null,draggingOver:o,combineWith:a,mode:n,offset:e,dimension:r,forceShouldAnimate:s,snapshot:t(n,i,o,a,null)}}});return function(r,i){if(r.isDragging){if(r.critical.draggable.id!==i.draggableId)return null;var o=r.current.client.offset,a=r.dimensions.draggables[i.draggableId],s=bme(r.impact),l=(d=r.impact).at&&"COMBINE"===d.at.type?d.at.combine.draggableId:null,c=r.forceShouldAnimate;return n(e(o.x,o.y),r.movementMode,a,i.isClone,s,l,c)}var d;if("DROP_ANIMATING"===r.phase){var u=r.completed;if(u.result.draggableId!==i.draggableId)return null;var p=i.isClone,h=r.dimensions.draggables[i.draggableId],m=u.result,f=m.mode,g=Rve(m),v=function(e){return e.combine?e.combine.draggableId:null}(m),x={duration:r.dropDuration,curve:nfe,moveTo:r.newHomeClientOffset,opacity:v?rfe.drop:null,scale:v?ife.drop:null};return{mapped:{type:"DRAGGING",offset:r.newHomeClientOffset,dimension:h,dropping:x,draggingOver:g,combineWith:v,mode:f,forceShouldAnimate:null,snapshot:t(f,p,g,v,x)}}}return null}}(),t=function(){var e=Zpe(function(e,t){return{x:e,y:t}}),t=Zpe(Pve),n=Zpe(function(e,n,r){return void 0===n&&(n=null),{mapped:{type:"SECONDARY",offset:e,combineTargetFor:n,shouldAnimateDisplacement:r,snapshot:t(n)}}}),r=function(e){return e?n(phe,e,!0):null},i=function(t,i,o,a){var s=o.displaced.visible[t],l=Boolean(a.inVirtualList&&a.effected[t]),c=Lhe(o),d=c&&c.draggableId===t?i:null;if(!s){if(!l)return r(d);if(o.displaced.invisible[t])return null;var u=ghe(a.displacedBy.point),p=e(u.x,u.y);return n(p,d,!0)}if(l)return r(d);var h=o.displacedBy.point,m=e(h.x,h.y);return n(m,d,s.shouldAnimate)};return function(e,t){if(e.isDragging)return e.critical.draggable.id===t.draggableId?null:i(t.draggableId,e.critical.draggable.id,e.impact,e.afterCritical);if("DROP_ANIMATING"===e.phase){var n=e.completed;return n.result.draggableId===t.draggableId?null:i(t.draggableId,n.result.draggableId,n.impact,n.afterCritical)}return null}}();return function(n,r){return e(n,r)||t(n,r)||Dve}},{dropAnimationFinished:tfe},null,{context:vge,pure:!0,areStatePropsEqual:Ove})(function(e){var t=(0,We.useRef)(null),n=Npe(function(e){t.current=e},[]),r=Npe(function(){return t.current},[]),i=fve(Cge),o=i.contextId,a=i.dragHandleUsageInstructionsId,s=i.registry,l=fve(jve),c=l.type,d=l.droppableId,u=Dpe(function(){return{id:e.draggableId,index:e.index,type:c,droppableId:d}},[e.draggableId,e.index,c,d]),p=e.children,h=e.draggableId,m=e.isEnabled,f=e.shouldRespectForcePress,g=e.canDragInteractiveElements,v=e.isClone,x=e.mapped,y=e.dropAnimationFinished;Eve(),wge(),v||Tve(Dpe(function(){return{descriptor:u,registry:s,getDraggableRef:r,canDragInteractiveElements:g,shouldRespectForcePress:f,isEnabled:m}},[u,s,r,g,f,m]));var b=Dpe(function(){return m?{tabIndex:0,role:"button","aria-describedby":a,"data-rbd-drag-handle-draggable-id":h,"data-rbd-drag-handle-context-id":o,draggable:!1,onDragStart:Mve}:null},[o,a,h,m]),j=Npe(function(e){"DRAGGING"===x.type&&x.dropping&&"transform"===e.propertyName&&y()},[y,x]),_=Dpe(function(){var e=kve(x),t="DRAGGING"===x.type&&x.dropping?j:null;return{innerRef:n,draggableProps:{"data-rbd-draggable-context-id":o,"data-rbd-draggable-id":h,style:e,onTransitionEnd:t},dragHandleProps:b}},[o,b,h,x,j,n]),C=Dpe(function(){return{draggableId:u.id,type:u.type,source:{index:u.index,droppableId:u.droppableId}}},[u.droppableId,u.id,u.index,u.type]);return p(_,x.snapshot,C)});function Lve(e){return fve(jve).isUsingCloneFor!==e.draggableId||e.isClone?We.createElement(Nve,e):null}function Ive(e){var t="boolean"!==typeof e.isDragDisabled||!e.isDragDisabled,n=Boolean(e.disableInteractiveElementBlocking),r=Boolean(e.shouldRespectForcePress);return We.createElement(Lve,(0,Ft.A)({},e,{isClone:!1,isEnabled:t,canDragInteractiveElements:n,shouldRespectForcePress:r}))}var Fve=function(e,t){return e===t.droppable.type},$ve=function(e,t){return t.draggables[e.draggable.id]},Bve={updateViewportMaxScroll:function(e){return{type:"UPDATE_VIEWPORT_MAX_SCROLL",payload:e}}};var zve={mode:"standard",type:"DEFAULT",direction:"vertical",isDropDisabled:!1,isCombineEnabled:!1,ignoreContainerClipping:!1,renderClone:null,getContainerForClone:function(){return document.body||nhe(!1),document.body}},Hve=Rpe(function(){var e={placeholder:null,shouldAnimatePlaceholder:!0,snapshot:{isDraggingOver:!1,draggingOverWith:null,draggingFromThisWith:null,isUsingPlaceholder:!1},useClone:null},t=(0,Ft.A)({},e,{shouldAnimatePlaceholder:!1}),n=Zpe(function(e){return{draggableId:e.id,type:e.type,source:{index:e.index,droppableId:e.droppableId}}}),r=Zpe(function(r,i,o,a,s,l){var c=s.descriptor.id;if(s.descriptor.droppableId===r){var d=l?{render:l,dragging:n(s.descriptor)}:null,u={isDraggingOver:o,draggingOverWith:o?c:null,draggingFromThisWith:c,isUsingPlaceholder:!0};return{placeholder:s.placeholder,shouldAnimatePlaceholder:!1,snapshot:u,useClone:d}}if(!i)return t;if(!a)return e;var p={isDraggingOver:o,draggingOverWith:c,draggingFromThisWith:null,isUsingPlaceholder:!0};return{placeholder:s.placeholder,shouldAnimatePlaceholder:!0,snapshot:p,useClone:null}});return function(n,i){var o=i.droppableId,a=i.type,s=!i.isDropDisabled,l=i.renderClone;if(n.isDragging){var c=n.critical;if(!Fve(a,c))return t;var d=$ve(c,n.dimensions),u=bme(n.impact)===o;return r(o,s,u,u,d,l)}if("DROP_ANIMATING"===n.phase){var p=n.completed;if(!Fve(a,p.critical))return t;var h=$ve(p.critical,n.dimensions);return r(o,s,Rve(p.result)===o,bme(p.impact)===o,h,l)}if("IDLE"===n.phase&&n.completed&&!n.shouldFlush){var m=n.completed;if(!Fve(a,m.critical))return t;var f=bme(m.impact)===o,g=Boolean(m.impact.at&&"COMBINE"===m.impact.at.type),v=m.critical.droppable.id===o;return f?g?e:t:v?e:t}return t}},Bve,null,{context:vge,pure:!0,areStatePropsEqual:Ove})(function(e){var t=(0,We.useContext)(Cge);t||nhe(!1);var n=t.contextId,r=t.isMovementAllowed,i=(0,We.useRef)(null),o=(0,We.useRef)(null),a=e.children,s=e.droppableId,l=e.type,c=e.mode,d=e.direction,u=e.ignoreContainerClipping,p=e.isDropDisabled,h=e.isCombineEnabled,m=e.snapshot,f=e.useClone,g=e.updateViewportMaxScroll,v=e.getContainerForClone,x=Npe(function(){return i.current},[]),y=Npe(function(e){i.current=e},[]),b=(Npe(function(){return o.current},[]),Npe(function(e){o.current=e},[]));Sge();var j=Npe(function(){r()&&g({maxScroll:Efe()})},[r,g]);!function(e){var t=(0,We.useRef)(null),n=fve(Cge),r=_ge("droppable"),i=n.registry,o=n.marshal,a=kge(e),s=Dpe(function(){return{id:e.droppableId,type:e.type,mode:e.mode}},[e.droppableId,e.mode,e.type]),l=(0,We.useRef)(s),c=Dpe(function(){return Zpe(function(e,n){t.current||nhe(!1);var r={x:e,y:n};o.updateDroppableScroll(s.id,r)})},[s.id,o]),d=Npe(function(){var e=t.current;return e&&e.env.closestScrollable?lve(e.env.closestScrollable):phe},[]),u=Npe(function(){var e=d();c(e.x,e.y)},[d,c]),p=Dpe(function(){return Kpe(u)},[u]),h=Npe(function(){var e=t.current,n=gve(e);e&&n||nhe(!1),e.scrollOptions.shouldPublishImmediately?u():p()},[p,u]),m=Npe(function(e,r){t.current&&nhe(!1);var i=a.current,o=i.getDroppableRef();o||nhe(!1);var l=dve(o),c={ref:o,descriptor:s,env:l,scrollOptions:r};t.current=c;var d=uve({ref:o,descriptor:s,env:l,windowScroll:e,direction:i.direction,isDropDisabled:i.isDropDisabled,isCombineEnabled:i.isCombineEnabled,shouldClipSubject:!i.ignoreContainerClipping}),u=l.closestScrollable;return u&&(u.setAttribute(sge.contextId,n.contextId),u.addEventListener("scroll",h,mve(c.scrollOptions))),d},[n.contextId,s,h,a]),f=Npe(function(){var e=t.current,n=gve(e);return e&&n||nhe(!1),lve(n)},[]),g=Npe(function(){var e=t.current;e||nhe(!1);var n=gve(e);t.current=null,n&&(p.cancel(),n.removeAttribute(sge.contextId),n.removeEventListener("scroll",h,mve(e.scrollOptions)))},[h,p]),v=Npe(function(e){var n=t.current;n||nhe(!1);var r=gve(n);r||nhe(!1),r.scrollTop+=e.y,r.scrollLeft+=e.x},[]),x=Dpe(function(){return{getDimensionAndWatchScroll:m,getScrollWhileDragging:f,dragStopped:g,scroll:v}},[g,m,f,v]),y=Dpe(function(){return{uniqueId:r,descriptor:s,callbacks:x}},[x,s,r]);cge(function(){return l.current=y.descriptor,i.droppable.register(y),function(){t.current&&g(),i.droppable.unregister(y)}},[x,s,g,y,o,i.droppable]),cge(function(){t.current&&o.updateDroppableIsEnabled(l.current.id,!e.isDropDisabled)},[e.isDropDisabled,o]),cge(function(){t.current&&o.updateDroppableIsCombineEnabled(l.current.id,e.isCombineEnabled)},[e.isCombineEnabled,o])}({droppableId:s,type:l,mode:c,direction:d,isDropDisabled:p,isCombineEnabled:h,ignoreContainerClipping:u,getDroppableRef:x});var _=We.createElement(_ve,{on:e.placeholder,shouldAnimate:e.shouldAnimatePlaceholder},function(e){var t=e.onClose,r=e.data,i=e.animate;return We.createElement(bve,{placeholder:r,onClose:t,innerRef:b,animate:i,contextId:n,onTransitionEnd:j})}),C=Dpe(function(){return{innerRef:y,placeholder:_,droppableProps:{"data-rbd-droppable-id":s,"data-rbd-droppable-context-id":n}}},[n,s,_,y]),w=f?f.dragging.draggableId:null,S=Dpe(function(){return{droppableId:s,type:l,isUsingCloneFor:w}},[s,w,l]);return We.createElement(jve.Provider,{value:S},a(C,m),function(){if(!f)return null;var e=f.dragging,t=f.render,n=We.createElement(Lve,{draggableId:e.draggableId,index:e.source.index,isClone:!0,isEnabled:!0,shouldRespectForcePress:!1,canDragInteractiveElements:!0},function(n,r){return t(n,r,e)});return ut.createPortal(n,v())}())});Hve.defaultProps=zve;const Wve="goal_name",Uve="category",Vve="is_active",Gve="priority",qve="metrics",Yve="_id",Zve="calorie_strategy",Kve=e=>{var t,n,r,o,a,s,l,c,d,u,p,h,m,f;let{modal:g,onClose:v,onSubmit:x}=e;const{t:y}=Vg(),[b,j]=(0,We.useState)(!1),[_,C]=(0,We.useState)([]),[w]=(0,We.useState)({[Wve]:null!==g&&void 0!==g&&null!==(t=g.data)&&void 0!==t&&t.goal_name?null===g||void 0===g||null===(n=g.data)||void 0===n?void 0:n.goal_name:"",[Uve]:null!==g&&void 0!==g&&null!==(r=g.data)&&void 0!==r&&r.category?null===g||void 0===g||null===(o=g.data)||void 0===o?void 0:o.category:[],[Zve]:null!==g&&void 0!==g&&null!==(a=g.data)&&void 0!==a&&a.calorie_strategy?null===g||void 0===g||null===(s=g.data)||void 0===s?void 0:s.calorie_strategy:"",[Vve]:null===g||void 0===g||null===(l=g.data)||void 0===l||!l.is_active||(null===g||void 0===g||null===(c=g.data)||void 0===c?void 0:c.is_active),[Gve]:null!==g&&void 0!==g&&null!==(d=g.data)&&void 0!==d&&d.priority?null===g||void 0===g||null===(u=g.data)||void 0===u?void 0:u.priority:"",[qve]:null!==g&&void 0!==g&&null!==(p=g.data)&&void 0!==p&&p.metrics?null===g||void 0===g||null===(h=g.data)||void 0===h?void 0:h.metrics:[{name:"Gender",unit:"",field_type:tu.SELECT,range:"",key:"gender",options:["Male","Female","Other"],disabled:!0,is_required:!0,traceableBy:["Provider"]},{name:"Next Assessment",fieldType:"textfield",range:{min:"",max:""},options:[],key:"nextSessionDate",unit:"",traceableBy:["Provider"],is_required:!0}],[Yve]:null!==g&&void 0!==g&&null!==(m=g.data)&&void 0!==m&&m._id?null===g||void 0===g||null===(f=g.data)||void 0===f?void 0:f._id:""}),[S,A]=(0,We.useState)({question:"",short_description:"",fieldType:"",range:{min:"",max:""},options:[],unit:"",is_required:!1,traceableBy:["Provider"],key:"",pre_assessment:!1}),k=(e,t,n)=>{if(!e.destination)return;const r=((e,t,n)=>{const r=Array.from(e),[i]=r.splice(t,1);return r.splice(n,0,i),r})(t[qve],e.source.index,e.destination.index);n(qve,r)};return(0,qt.jsx)(cC,{fullWidth:!0,maxWidth:"md",open:g,onClose:v,children:(0,qt.jsx)(Kz,{initialValues:w,validationSchema:RU.addGoal,onSubmit:(e,t)=>{let{setErrors:n,resetForm:r}=t;return x(e,{setErrors:n,resetForm:r})},enableReinitialize:!0,children:e=>{var t,n,r;let{values:o,setFieldValue:a,handleChange:s}=e;return(0,qt.jsxs)(nH,{children:[(0,qt.jsxs)(fC,{children:[y("add"===g.type?"rpm_CreateGoal":"rpm_EditGoal"),(0,qt.jsx)(wh,{onClick:v,sx:{position:"absolute",right:8,top:8},children:(0,qt.jsx)(Yue,{})})]}),(0,qt.jsx)(bC,{dividers:!0,children:(0,qt.jsxs)(Ff,{container:!0,spacing:2,direction:"column",children:[(0,qt.jsxs)(Ff,{item:!0,children:[(0,qt.jsx)(Q_,{fullWidth:!0,label:y("rpm_GoalName"),name:Wve,value:o[Wve],onChange:s,margin:"normal"}),(0,qt.jsx)(dH,{name:Wve,children:e=>(0,qt.jsx)(v_,{error:!0,children:y(e,{field:y("rpm_GoalName")})})}),(0,qt.jsx)(op,{display:"flex",gap:1,flexWrap:"wrap",mt:1,children:iu.map((e,t)=>(0,qt.jsx)(Eb,{label:e,onClick:()=>((e,t)=>{nu.find(t=>t.goal===e)&&t(Wve,e)})(e,a),clickable:!0,color:o[Wve]===e?"primary":"default"},t))})]}),(0,qt.jsxs)(Ff,{item:!0,children:[(0,qt.jsx)(o_,{children:y("rpm_Category")}),(0,qt.jsx)(tH,{as:G_,name:Uve,fullWidth:!0,size:"small",multiple:!0,value:o[Uve],onChange:s,renderValue:e=>e.map(e=>{var t;return null===(t=au.find(t=>t.value===e))||void 0===t?void 0:t.name}).join(", "),children:au.map(e=>(0,qt.jsxs)(mf,{value:e.value,children:[(0,qt.jsx)(Dw,{checked:o[Uve].includes(e.value)}),(0,qt.jsx)(Cf,{children:e.name})]},e.id))}),(0,qt.jsx)(dH,{name:Uve,children:e=>(0,qt.jsx)(v_,{error:!0,children:y(e,{field:y("rpm_Category")})})})]}),(0,qt.jsxs)(Ff,{item:!0,children:[(0,qt.jsx)(o_,{children:y("strategy")}),(0,qt.jsx)(tH,{as:G_,name:Zve,fullWidth:!0,size:"small",value:o[Zve],onChange:s,displayEmpty:!0,renderValue:e=>{var t;return(null===(t=su.find(t=>t.value===e))||void 0===t?void 0:t.name)||""},children:su.map(e=>(0,qt.jsx)(mf,{value:e.value,children:(0,qt.jsx)(Cf,{children:e.name})},e.id))}),(0,qt.jsx)(dH,{name:Zve,children:e=>(0,qt.jsx)(v_,{error:!0,children:y(e,{field:y("strategy")})})})]}),(0,qt.jsx)(Ff,{item:!0,children:(0,qt.jsx)(wE,{control:(0,qt.jsx)(tH,{as:Dw,name:Vve,checked:o[Vve],onChange:()=>a(Vve,!o[Vve])}),label:"Is Active"})}),(0,qt.jsxs)(Ff,{item:!0,children:[(0,qt.jsx)(Q_,{fullWidth:!0,label:y("rpm_Priority"),name:Gve,size:"small",value:o[Gve],onChange:s}),(0,qt.jsx)(dH,{name:Gve,children:e=>(0,qt.jsx)(v_,{error:!0,children:y(e,{field:y("rpm_Priority")})})})]}),(0,qt.jsxs)(Ff,{item:!0,children:[(0,qt.jsx)(Cf,{fontWeight:600,mb:1,children:y("rpm_DefaultMetrics")}),(0,qt.jsx)(op,{display:"flex",flexWrap:"wrap",gap:1,children:ou.map(e=>(0,qt.jsx)(Eb,{label:e.name,clickable:!0,color:o[qve].some(t=>t.name===e.name)?"primary":"default",onClick:()=>{e.disabled||((e,t,n)=>{const r=t[qve];let i;if(r.some(t=>t.name===e.name)){if("nextSessionDate"===e.key)return;i=r.filter(t=>t.name!==e.name)}else i=[...r,{name:e.name,fieldType:e.field_type,range:"string"===typeof e.range?{min:e.range.split("-")[0]||"",max:e.range.split("-")[1]||""}:e.range,options:e.options||[],key:e.key||"",unit:e.unit||"",is_required:e.is_required,traceableBy:e.traceableBy,short_description:e.short_description,pre_assessment:e.pre_assessment}];const o=i.find(e=>"nextSessionDate"===e.key),a=i.filter(e=>"nextSessionDate"!==e.key),s=o?[...a,o]:a;n(qve,s)})(e,o,a)}},e.name))}),(0,qt.jsx)(op,{mt:2,children:(0,qt.jsx)(xh,{variant:"outlined",size:"small",startIcon:(0,qt.jsx)(Zue,{}),onClick:()=>j(e=>!e),children:y("rpm_CreateNewMetric")})}),b&&(0,qt.jsxs)(op,{mt:2,p:2,border:"1px dashed grey",borderRadius:2,children:[(0,qt.jsx)(Cf,{variant:"subtitle1",mb:1,fontWeight:600,children:y("rpm_NewMetric")}),(0,qt.jsxs)(Ff,{container:!0,spacing:2,children:[(0,qt.jsxs)(Ff,{item:!0,xs:12,children:[(0,qt.jsx)(Q_,{label:"Question",fullWidth:!0,size:"small",value:S.question,onChange:e=>(e=>{A((0,i.A)((0,i.A)({},S),{},{question:e}));const t=ru.filter(t=>t.name.toLowerCase().includes(e.toLowerCase()));C(t)})(e.target.value)}),_.length>0&&(0,qt.jsx)(yp,{style:{maxHeight:150,overflowY:"auto",marginTop:4,position:"absolute",zIndex:1e3,width:"100%"},children:(0,qt.jsx)(zh,{children:_.map(e=>(0,qt.jsx)(Ag,{button:!0,onClick:()=>{return t=e,A((0,i.A)((0,i.A)({},S),{},{question:t.name,short_description:t.short_description||"",fieldType:t.field_type,range:t.range,unit:t.unit,options:(t.field_type,[]),is_required:t.is_required,traceableBy:t.traceableBy,key:t.key,pre_assessment:t.pre_assessment})),void C([]);var t},children:e.name},e.name))})})]}),(0,qt.jsx)(Ff,{item:!0,xs:12,children:(0,qt.jsx)(Q_,{fullWidth:!0,label:y("rpm_ShortDescription"),size:"small",value:S.short_description,onChange:e=>A((0,i.A)((0,i.A)({},S),{},{short_description:e.target.value}))})}),(0,qt.jsx)(Ff,{item:!0,xs:12,children:(0,qt.jsx)(Q_,{fullWidth:!0,label:"Unit",size:"small",value:S.unit,onChange:e=>A((0,i.A)((0,i.A)({},S),{},{unit:e.target.value}))})}),(0,qt.jsxs)(Ff,{item:!0,xs:12,children:[(0,qt.jsx)(o_,{style:{marginBottom:4,display:"block",fontWeight:500},children:y("rpm_TraceableBy")}),(0,qt.jsxs)(que,{row:!0,children:[(0,qt.jsx)(wE,{control:(0,qt.jsx)(Dw,{checked:(null===(t=S.traceableBy)||void 0===t?void 0:t.includes("Provider"))||!1,onChange:e=>{const t=e.target.checked,n=S.traceableBy||[];A((0,i.A)((0,i.A)({},S),{},{traceableBy:t?[...n,"Provider"]:n.filter(e=>"Provider"!==e)}))}}),label:y("rpm_Provider")}),(0,qt.jsx)(wE,{control:(0,qt.jsx)(Dw,{checked:(null===(n=S.traceableBy)||void 0===n?void 0:n.includes("Client"))||!1,onChange:e=>{const t=e.target.checked,n=S.traceableBy||[];A((0,i.A)((0,i.A)({},S),{},{traceableBy:t?[...n,"Client"]:n.filter(e=>"Client"!==e)}))}}),label:y("rpm_Client")})]})]}),(0,qt.jsx)(Ff,{item:!0,children:(0,qt.jsx)(wE,{control:(0,qt.jsx)(tH,{as:Dw,name:"is_required",checked:S.is_required,onChange:e=>{const t=e.target.checked;A((0,i.A)((0,i.A)({},S),{},{is_required:t}))}}),label:y("rpm_Required")})}),(0,qt.jsx)(Ff,{item:!0,children:(0,qt.jsx)(wE,{control:(0,qt.jsx)(tH,{as:Dw,name:"pre_assessment",checked:S.pre_assessment,onChange:e=>{const t=e.target.checked;A((0,i.A)((0,i.A)({},S),{},{pre_assessment:t}))}}),label:y("rpm_PreAssessment")})}),(0,qt.jsxs)(Ff,{item:!0,xs:12,children:[(0,qt.jsx)(o_,{children:y("rpm_FieldType")}),(0,qt.jsxs)(G_,{fullWidth:!0,size:"small",value:S.fieldType,onChange:e=>A((0,i.A)((0,i.A)({},S),{},{fieldType:e.target.value})),children:[(0,qt.jsx)(mf,{value:"",children:y("rpm_SelectType")}),Object.entries(tu).map(e=>{let[t,n]=e;return(0,qt.jsx)(mf,{value:n,children:t.replaceAll("_"," ").toLowerCase().replace(/(^\w|\s\w)/g,e=>e.toUpperCase())},t)})]})]}),S.fieldType===tu.NUMBER&&(0,qt.jsx)(Ff,{item:!0,xs:12,children:(0,qt.jsxs)(op,{display:"flex",gap:2,children:[(0,qt.jsx)(Q_,{label:"Min",size:"small",type:"number",value:S.range.min,onChange:e=>A((0,i.A)((0,i.A)({},S),{},{range:(0,i.A)((0,i.A)({},S.range),{},{min:e.target.value})}))}),(0,qt.jsx)(Q_,{label:"Max",size:"small",type:"number",value:S.range.max,onChange:e=>A((0,i.A)((0,i.A)({},S),{},{range:(0,i.A)((0,i.A)({},S.range),{},{max:e.target.value})}))})]})}),(S.fieldType===tu.DROPDOWN||S.fieldType===tu.MULTI_DROPDOWN)&&(0,qt.jsx)(Ff,{item:!0,xs:12,children:(0,qt.jsx)(Q_,{label:"Options (comma separated)",fullWidth:!0,size:"small",value:S.options.join(","),onChange:e=>A((0,i.A)((0,i.A)({},S),{},{options:e.target.value.split(",")}))})})]}),(0,qt.jsxs)(op,{display:"flex",justifyContent:"flex-end",mt:2,gap:1,children:[(0,qt.jsx)(xh,{size:"small",onClick:()=>{j(!1),A({question:"",fieldType:"",short_description:"",range:{min:"",max:""},options:[],unit:"",is_required:!1,traceableBy:["Provider"],key:"",pre_assessment:!1})},children:y("rpm_Cancel")}),(0,qt.jsx)(xh,{size:"small",variant:"contained",onClick:()=>((e,t)=>{const n={name:S.question,short_description:S.short_description||"",fieldType:S.fieldType,range:S.range,options:S.options,unit:S.unit,is_required:S.is_required,traceableBy:S.traceableBy,key:S.key||(r=S.question,r.replace(/[^a-zA-Z0-9 ]/g,"").replace(/(?:^\w|[A-Z]|\b\w)/g,(e,t)=>0===t?e.toLowerCase():e.toUpperCase()).replace(/\s+/g,"")),pre_assessment:S.pre_assessment};var r;if(typeof S.editIndex===tu.NUMBER){const r=[...e[qve]];r[S.editIndex]=n,t(qve,r)}else t(qve,[...e[qve],n]);A({question:"",short_description:"",fieldType:"",key:"",range:{min:"",max:""},options:[],unit:"",is_required:!1,pre_assessment:!1,traceableBy:["Provider"]}),j(!1)})(o,a),disabled:!S.question||!S.fieldType,children:y("rpm_SaveMetric")})]})]})]}),(null===(r=o[qve])||void 0===r?void 0:r.length)>0&&(0,qt.jsxs)(Ff,{item:!0,children:[(0,qt.jsxs)(Cf,{fontWeight:600,mb:1,children:[y("rpm_MetricPriority")," (",y("rpm_DragToReorder"),")"]}),(0,qt.jsx)(nve,{onDragEnd:e=>k(e,o,a),children:(0,qt.jsx)(Hve,{droppableId:qve,children:e=>{var t;return(0,qt.jsxs)(op,(0,i.A)((0,i.A)({},e.droppableProps),{},{ref:e.innerRef,display:"flex",flexDirection:"column",gap:1,children:[null===(t=o[qve])||void 0===t?void 0:t.map((e,t)=>(0,qt.jsx)(Ive,{draggableId:e.name+t,index:t,children:(n,r)=>{var s,l,c;return(0,qt.jsxs)(op,(0,i.A)((0,i.A)((0,i.A)({ref:n.innerRef},n.draggableProps),n.dragHandleProps),{},{sx:{p:1.5,borderRadius:1,border:"1px solid #ccc",bgcolor:r.isDragging?"grey.100":"white",display:"flex",alignItems:"center",justifyContent:"space-between"},children:[(0,qt.jsxs)(op,{children:[(0,qt.jsxs)(Cf,{fontWeight:600,children:[t+1,". ",e.name]}),(0,qt.jsxs)(Cf,{variant:"body2",color:"text.secondary",children:["Type: ",e.fieldType,e.unit?" | Unit: ".concat(e.unit):"",null!==(s=e.range)&&void 0!==s&&s.min||null!==(l=e.range)&&void 0!==l&&l.max?" | Range: ".concat(e.range.min,"-").concat(e.range.max):"",null!==(c=e.options)&&void 0!==c&&c.length?" | Options: ".concat(e.options.join(", ")):""]})]}),(0,qt.jsxs)(op,{children:[(0,qt.jsx)(wh,{color:"primary",onClick:()=>{j(!0),A({question:e.name,fieldType:e.fieldType,range:e.range||{min:"",max:""},options:e.options||[],unit:e.unit||"",editIndex:t,traceableBy:e.traceableBy||["Provider"],is_required:e.is_required||!1,key:e.key||"",short_description:e.short_description||"",pre_assessment:e.pre_assessment||!1})},children:(0,qt.jsx)(fc,{fontSize:"small",sx:{width:16,height:16}})}),(0,qt.jsx)(wh,{size:"small",color:"error",onClick:()=>{const e=o[qve].filter((e,n)=>n!==t);a(qve,e)},children:(0,qt.jsx)(xc,{fontSize:"small",sx:{width:16,height:16}})})]})]}))}},e.name+t)),e.placeholder]}))}})})]})]})}),(0,qt.jsxs)(vE,{children:[(0,qt.jsx)(xh,{onClick:v,children:y("rpm_Cancel")}),(0,qt.jsx)(xh,{type:"submit",variant:"contained",color:"primary",children:y("rpm_Submit")})]})]})}})})},Xve=e=>{var t,n;let{open:r,onClose:i}=e;const{t:o}=Vg(),a=(null===r||void 0===r?void 0:r.data)||{};return(0,qt.jsxs)(cC,{fullWidth:!0,maxWidth:"md",open:null===r||void 0===r?void 0:r.open,onClose:i,children:[(0,qt.jsxs)(fC,{sx:{fontWeight:600},children:[o("rpm_GoalDetails"),(0,qt.jsx)(wh,{onClick:i,sx:{position:"absolute",right:8,top:8},children:(0,qt.jsx)(Yue,{})})]}),(0,qt.jsx)(bC,{dividers:!0,children:(0,qt.jsxs)(yp,{variant:"outlined",sx:{p:2.5,borderRadius:2,mb:2,bgcolor:"#fcfcfc"},children:[(0,qt.jsxs)(Ff,{container:!0,spacing:3,children:[(0,qt.jsxs)(Ff,{item:!0,xs:12,sm:6,md:4,children:[(0,qt.jsx)(Cf,{variant:"body2",color:"text.secondary",children:o("rpm_GoalName")}),(0,qt.jsx)(Cf,{variant:"body1",fontWeight:600,children:a.goal_name||"-"})]}),(0,qt.jsxs)(Ff,{item:!0,xs:12,sm:6,md:4,children:[(0,qt.jsx)(Cf,{variant:"body2",color:"text.secondary",children:o("rpm_Priority")}),(0,qt.jsx)(Cf,{variant:"body1",fontWeight:600,children:a.priority||"-"})]}),(0,qt.jsxs)(Ff,{item:!0,xs:12,sm:6,md:4,children:[(0,qt.jsx)(Cf,{variant:"body2",color:"text.secondary",children:o("rpm_Status")}),(0,qt.jsx)(wE,{control:(0,qt.jsx)(Dw,{checked:a.is_active,disabled:!0}),label:a.is_active?o("rpm_Active"):o("rpm_Inactive")})]}),(0,qt.jsxs)(Ff,{item:!0,xs:12,sm:6,children:[(0,qt.jsx)(Cf,{variant:"body2",color:"text.secondary",children:o("rpm_Categories")}),(0,qt.jsx)(op,{display:"flex",flexWrap:"wrap",gap:1,mt:.5,children:(a.category||[]).map((e,t)=>{var n;const r=(null===(n=au.find(t=>t.value===e))||void 0===n?void 0:n.name)||e;return(0,qt.jsx)(Eb,{label:r,color:"primary",size:"small"},t)})})]})]}),(null===(t=a.metrics)||void 0===t?void 0:t.length)>0&&(0,qt.jsxs)(qt.Fragment,{children:[(0,qt.jsx)(Cf,{variant:"h6",fontWeight:600,mb:1.5,mt:2.5,children:o("rpm_Metrics")}),(0,qt.jsx)(Ff,{container:!0,spacing:2,children:a.metrics.map((e,t)=>{var n,r;return(0,qt.jsx)(Ff,{item:!0,xs:12,md:6,children:(0,qt.jsxs)(yp,{variant:"outlined",sx:{p:2,borderRadius:2,bgcolor:"#fafafa",height:"100%"},children:[(0,qt.jsxs)(Cf,{fontWeight:600,gutterBottom:!0,children:[t+1,". ",e.name]}),e.fieldType&&(0,qt.jsxs)(Cf,{variant:"body2",color:"text.secondary",children:[o("rpm_FieldType"),": ",e.fieldType]}),e.unit&&(0,qt.jsxs)(Cf,{variant:"body2",color:"text.secondary",children:[o("rpm_Unit"),": ",e.unit]}),e.range&&(e.range.min||e.range.max)&&(0,qt.jsxs)(Cf,{variant:"body2",color:"text.secondary",children:[o("rpm_Range"),": ",e.range.min||"-"," - ",e.range.max||"-"]}),(null===(n=e.options)||void 0===n?void 0:n.length)>0&&(0,qt.jsxs)(Cf,{variant:"body2",color:"text.secondary",children:[o("rpm_Options"),": ",e.options.join(", ")]}),(0,qt.jsxs)(Cf,{variant:"body2",color:"text.secondary",children:[o("rpm_Required"),": ",e.is_required?o("rpm_Yes"):o("rpm_No")]}),(null===(r=e.traceableBy)||void 0===r?void 0:r.length)>0&&(0,qt.jsxs)(Cf,{variant:"body2",color:"text.secondary",children:[o("rpm_TraceableBy"),": ",e.traceableBy.join(", ")]})]})},t)})})]}),!(null!==(n=a.metrics)&&void 0!==n&&n.length)&&(0,qt.jsxs)(qt.Fragment,{children:[(0,qt.jsx)(Cf,{variant:"h6",fontWeight:600,mb:1.5,mt:2.5,children:o("rpm_Metrics")}),(0,qt.jsx)(Ff,{container:!0,spacing:2,children:(0,qt.jsx)(Ff,{item:!0,xs:12,md:12,children:(0,qt.jsx)(yp,{variant:"outlined",sx:{p:2,borderRadius:2,bgcolor:"#fafafa",height:"100%"},children:(0,qt.jsx)(Cf,{color:"text.secondary",children:o("rpm_NoMetricsFound")})})})})]})]})}),(0,qt.jsx)(vE,{children:(0,qt.jsx)(xh,{onClick:i,variant:"contained",children:o("rpm_Close")})})]})};function Qve(e){let{goalsList:t,order:n,orderBy:r,setOrder:i,setOrderBy:o,dataParameter:a,programHead:s,checkState:l,onCheck:c,isSelection:d,nodata:u,fetchGoals:p,pageDetails:h,viewButton:m,editButton:f,goalModal:g,deleteButton:v,handleProgramModalToggle:x,createGoal:y,setHeadcells:b,settingModal:j,initialHeadcells:_,handleSettingModalToggle:C}=e;const{t:w}=Vg();return(0,qt.jsxs)(op,{sx:{width:"100%"},children:[(0,qt.jsx)(op,{sx:{mb:2.5},children:(0,qt.jsxs)(Ff,{container:!0,spacing:2,alignItems:"center",children:[(0,qt.jsx)(Ff,{item:!0,xs:!0,children:(0,qt.jsx)(Cf,{variant:"h5",gutterBottom:!0,component:"h5",children:w("rpm_WellnessGoals")})}),(0,qt.jsx)(Ff,{item:!0,children:(0,qt.jsxs)(xh,{variant:"contained",color:"primary",disableElevation:!0,onClick:()=>{x({},"add")},children:[(0,qt.jsx)(jue.A,{}),(0,qt.jsx)(Cf,{component:"span",className:"hideOnMobile",children:w("rpm_CreateGoal")})]})})]})}),(0,qt.jsx)(op,{bgcolor:"#fff",sx:{borderTopLeftRadius:"8px",borderTopRightRadius:"8px"},children:(0,qt.jsxs)(Ff,{container:!0,spacing:1,children:[(0,qt.jsx)(Ff,{item:!0,sx:{ml:"auto"},sm:3,xs:2,textAlign:"end",children:(0,qt.jsx)(sy,{title:w("rpm_TableCellSetting"),children:(0,qt.jsx)(sv,{sx:{boxShadow:"none",width:32,height:32,minHeight:"auto",marginRight:"10px",marginTop:"5px"},size:"small",color:"primary",onClick:C,children:(0,qt.jsx)(YC.A,{fontSize:"small",sx:{width:16,height:16}})})})}),(0,qt.jsxs)(Ff,{item:!0,xs:12,children:[(0,qt.jsx)(op,{children:(0,qt.jsx)(UT,{order:n,orderBy:r,setOrder:i,setOrderBy:o,data:t,headCells:null===s||void 0===s?void 0:s.filter(e=>_.includes(e.id)),dataParameter:a,selected:l,setSelected:c,isSelection:d,noDataImage:u,fetchList:p,pageDetails:h,skeletonVrows:6,className:"theme_scroll",children:null===t||void 0===t?void 0:t.map(e=>(0,qt.jsxs)(cw,{sx:{"&:last-child td, &:last-child th":{border:0}},className:"program-tour-step0",children:[d&&(0,qt.jsx)(gw,{padding:"checkbox",children:(0,qt.jsx)(Dw,{onChange:c,checked:l.includes(e.code),name:e.code,color:"primary"})}),_.includes("goal_name")&&(0,qt.jsx)(gw,{children:(0,qt.jsx)(op,{display:"flex",alignItems:"center",children:e.goal_name})}),_.includes("category")&&(0,qt.jsx)(gw,{children:e.category}),_.includes("is_active")&&(0,qt.jsx)(gw,{children:e.is_active}),_.includes("priority")&&(0,qt.jsx)(gw,{children:e.priority||"-"}),_.includes("action")&&(0,qt.jsx)(gw,{children:(0,qt.jsxs)(op,{className:"program-tour-step1",width:"fit-content",children:[f(e),m(e),v(e)]})})]},e.code))})}),(0,qt.jsx)(KE,{pageDetails:h,fetchListFunction:p})]})]})}),g.open&&("edit"===g.type||"add"===g.type)&&(0,qt.jsx)(Kve,{modal:g,onClose:x,onSubmit:y}),g.open&&"details"===g.type&&(0,qt.jsx)(Xve,{open:g,onClose:x}),(0,qt.jsx)(TE,{open:j,allHeadCells:s,initialHeadcells:_,setHeadcells:b,onClose:C})]})}Qve.defaultProps={programHead:[],pageDetails:{},order:"",orderBy:"",setOrder:()=>{},setOrderBy:()=>{},dataParameter:"",checkState:"",onCheck:()=>{},isSelection:"",nodata:"",goalsList:[],fetchGoals:()=>{},editButton:()=>{},viewButton:()=>{},deleteButton:()=>{},goalModal:!1,handleProgramModalToggle:()=>{},createGoal:()=>{},initialHeadcells:[],setHeadcells:()=>{},settingModal:!1,handleSettingModalToggle:()=>{}};const Jve=Qve,exe=()=>async e=>{e(na(!0));try{const e="".concat(ga.WELLNESS_GOAL),t=await Iu(e,{});return oa()(t,"data",[]).forEach(e=>txe(e)),null===t||void 0===t?void 0:t.data}catch(t){return t}finally{e(na(!1))}},txe=function(e){if(cs(e))return;const t=Object.fromEntries(au.map(e=>[e.value,e.name]));e.id=e._id,e.is_active=e.is_active?"Yes":"No",e.category=(e.category||[]).map(e=>{var n;return null!==(n=t[e])&&void 0!==n?n:e}).join(", ")};const nxe=function(e){let{pageDetails:t,userData:n}=e;const r=Nt(),o=wt(cu),a=VC(JA().breakpoints.down("sm")),{t:s}=Vg(),[l,c]=(0,We.useState)("desc"),[d,u]=(0,We.useState)("updated_at"),[p,h]=(0,We.useState)([]),[m,f]=We.useState({open:!1,data:{},type:""}),[g,v]=We.useState({open:!1,data:{}}),[x,y]=(0,We.useState)([]),[b,j]=We.useState(!1),_=a?["goal_name","action"]:["goal_name","category","is_active","priority","action"],C=e=>{v((0,i.A)((0,i.A)({},g),{},{open:!g.open,data:e}))},w=(e,t)=>{m.open||"add"===t?m.open||"add"!==t?f({open:!m.open,data:{},type:""}):f({open:!m.open,data:{},type:"add"}):E(e.id,t)},[S,A]=We.useState(cs($o.getAllProgramsCells())?_:$o.getAllProgramsCells()),k=function(e){A(e),$o.setAllProgramsCells(e)},T=async e=>{try{const e=await r(exe((0,i.A)((0,i.A)({},t),{},{current_page:1})));y(e)}catch(n){console.log(n)}},E=async(e,t)=>{try{const n=await r((e=>async t=>{t(na(!0));try{const t="".concat(ga.WELLNESS_GOAL,"/").concat(e),n=await Iu(t,{});return null===n||void 0===n?void 0:n.data}catch(n){return n}finally{t(na(!1))}})(e));f({open:!m.open,data:n,type:t})}catch(n){console.log(n)}},M=async(e,t)=>{try{await r((n=e,async e=>{e(na(!0));try{const e="".concat(ga.WELLNESS_GOAL,"/").concat(n);return await Bu(e,{})}finally{e(na(!1))}})),T(),v({open:!1,data:{}}),r(Zo({subTitle:"message:rpm_DeleteGoalSuccess",severity:ud.SUCCESS}))}catch(i){r(Zo({subTitle:i.message,severity:ud.ERROR}))}var n};We.useEffect(()=>{r(NC({activeMenuItem:"wellnessGoals",heading:{}}))},[]),We.useEffect(()=>{k(_)},[a]),We.useEffect(()=>{o&&T()},[o]);const O=[{id:"goal_name",label:s("rpm_GoalName"),isSort:!1,sortProperty:"goal_name"},{id:"category",label:s("rpm_Category"),isSort:!1,sortProperty:"category"},{id:"is_active",label:s("rpm_Active"),isSort:!1,sortProperty:"is_active"},{id:"priority",label:s("rpm_Priority"),isSort:!1,sortProperty:"priority"},{id:"action",label:s("rpm_Actions"),isSort:!1,sortProperty:"action"}];return(0,qt.jsxs)(qt.Fragment,{children:[(0,qt.jsx)(Jve,{userData:n,order:l,orderBy:d,setOrder:c,setOrderBy:u,dataParameter:"code",checkState:p,onCheck:e=>{if(Array.isArray(e))return h(e.map(e=>e));const t=e.target.name;p.includes(t)?h(p.filter(e=>e!==t)):h(e=>[...e,t])},isSelection:!1,nodata:GC,programHead:O,goalsList:x,fetchGoals:T,pageDetails:t,editButton:e=>(0,qt.jsx)(sy,{title:s("rpm_Edit"),children:(0,qt.jsx)(wh,{"data-id":e.id,color:"primary",onClick:()=>w(e,"edit"),children:(0,qt.jsx)(fc,{fontSize:"small",sx:{width:16,height:16}})})}),viewButton:e=>(0,qt.jsx)(sy,{title:s("rpm_view"),children:(0,qt.jsx)(wh,{"data-id":e.id,color:"primary",onClick:()=>w(e,"details"),children:(0,qt.jsx)(gc,{fontSize:"small",sx:{width:16,height:16}})})}),deleteButton:e=>(0,qt.jsx)(sy,{title:s("rpm_Delete"),children:(0,qt.jsx)("span",{children:(0,qt.jsx)(wh,{"data-id":e.id,color:"error",onClick:()=>C(e),children:(0,qt.jsx)(xc,{fontSize:"small",sx:{width:16,height:16}})})})}),goalModal:m,handleProgramModalToggle:w,setHeadcells:k,settingModal:b,initialHeadcells:S,handleSettingModalToggle:()=>{j(!b)},createGoal:async(e,t)=>{let{setErrors:n,resetForm:o}=t;try{await r((a=e,async e=>{e(na(!0));const t=$o.getAccessToken(),n=(0,i.A)((0,i.A)({},a),{},{priority:Number(a.priority||"0"),tenant_id:null===t||void 0===t?void 0:t.accountId});try{const e="".concat(ga.WELLNESS_GOAL);return await Fu(e,n)}finally{e(na(!1))}})),o(),r(Zo({subTitle:"message:rpm_GoalCreatedSuccessfully",severity:ud.SUCCESS})),T(),f({open:!1,data:{},type:""})}catch(s){const e=us(s,"response.data.field_errors",{}),t=us(s,"response.data.code","");cs(e)?cs(t)?r(Zo({subTitle:s.message,severity:ud.ERROR})):r(Zo({subTitle:Vd(t,"error:rpm_GoalCreatedFailed"),severity:ud.ERROR})):n(Ud(e))}var a}}),(0,qt.jsx)(qV,{openModal:g.open,onCloseModal:C,actionFunction:()=>{var e;return M(null===g||void 0===g||null===(e=g.data)||void 0===e?void 0:e.id)},dataName:g.data.display_name,options:{primaryText:s("message:rpm_DeleteTitle"),secondaryText:s("message:rpm_DeleteBodyText"),descText:s("message:rpm_DeleteSubText"),btn:{primaryText:s("rpm_Delete"),secondaryText:s("rpm_Cancel"),primaryColor:"error",secondaryColor:"primary"},btnSwap:!0}})]})};var rxe=n(34109),ixe=n(26581);const oxe="name",axe="primary_muscle",sxe="secondary_muscles",lxe="equipment",cxe="exercise_type",dxe="movement_pattern",uxe="level",pxe="instructions",hxe="tips",mxe="common_mistakes",fxe="is_bodyweight",gxe="calorie_burn_rate_per_min",vxe="category",xxe=e=>{var t,n,r,o,a,s,l,c,d,u,p,h,m,f,g,v,x,y,b,j,_,C,w,S,A,k;let{modal:T,onClose:E,onSubmit:M,muscleGroup:O,gymEquipments:R,exerciseType:P}=e;const{t:D}=Vg(),[N]=(0,We.useState)({[oxe]:null!==T&&void 0!==T&&null!==(t=T.data)&&void 0!==t&&t.name?null===T||void 0===T||null===(n=T.data)||void 0===n?void 0:n.name:"",[axe]:null!==T&&void 0!==T&&null!==(r=T.data)&&void 0!==r&&r.primary_muscle?null===T||void 0===T||null===(o=T.data)||void 0===o?void 0:o.primary_muscle:"",[sxe]:null!==T&&void 0!==T&&null!==(a=T.data)&&void 0!==a&&a.secondary_muscles?null===T||void 0===T||null===(s=T.data)||void 0===s?void 0:s.secondary_muscles:[],[lxe]:null!==T&&void 0!==T&&null!==(l=T.data)&&void 0!==l&&l.equipment?null===T||void 0===T||null===(c=T.data)||void 0===c?void 0:c.equipment:"",[cxe]:null!==T&&void 0!==T&&null!==(d=T.data)&&void 0!==d&&d.exercise_type?null===T||void 0===T||null===(u=T.data)||void 0===u?void 0:u.exercise_type:"",[dxe]:null!==T&&void 0!==T&&null!==(p=T.data)&&void 0!==p&&p.movement_pattern?null===T||void 0===T||null===(h=T.data)||void 0===h?void 0:h.movement_pattern:"",[uxe]:null!==T&&void 0!==T&&null!==(m=T.data)&&void 0!==m&&m.level?null===T||void 0===T||null===(f=T.data)||void 0===f?void 0:f.level:"",[pxe]:null!==T&&void 0!==T&&null!==(g=T.data)&&void 0!==g&&g.instructions?null===T||void 0===T||null===(v=T.data)||void 0===v?void 0:v.instructions:"",[hxe]:null!==T&&void 0!==T&&null!==(x=T.data)&&void 0!==x&&x.tips?null===T||void 0===T||null===(y=T.data)||void 0===y?void 0:y.tips:[],[mxe]:null!==T&&void 0!==T&&null!==(b=T.data)&&void 0!==b&&b.common_mistakes?null===T||void 0===T||null===(j=T.data)||void 0===j?void 0:j.common_mistakes:[],[fxe]:!(null===T||void 0===T||null===(_=T.data)||void 0===_||!_.is_bodyweight)&&(null===T||void 0===T||null===(C=T.data)||void 0===C?void 0:C.is_bodyweight),[gxe]:null!==T&&void 0!==T&&null!==(w=T.data)&&void 0!==w&&w.calorie_burn_rate_per_min?null===T||void 0===T||null===(S=T.data)||void 0===S?void 0:S.calorie_burn_rate_per_min:0,[vxe]:null!==T&&void 0!==T&&null!==(A=T.data)&&void 0!==A&&A.category?null===T||void 0===T||null===(k=T.data)||void 0===k?void 0:k.category:""}),L=Object.values(O),I=Object.values(P),F=["None",...Object.values(R)],$=(0,qt.jsx)(rxe.A,{fontSize:"small"}),B=(0,qt.jsx)(ixe.A,{fontSize:"small"});return(0,qt.jsx)(cC,{fullWidth:!0,maxWidth:"md",open:T,onClose:E,children:(0,qt.jsx)(Kz,{initialValues:N,validationSchema:RU.addExercise,onSubmit:(e,t)=>{let{setErrors:n,resetForm:r}=t;return M(T.data._id&&"edit"==T.type?T.data._id:"",e,{setErrors:n,resetForm:r})},enableReinitialize:!0,children:e=>{let{values:t,handleChange:n,setFieldValue:r}=e;return(0,qt.jsxs)(nH,{children:[(0,qt.jsxs)(fC,{children:[D("add"===T.type?"rpm_CreateExercise":"rpm_EditExerciseGoal"),(0,qt.jsx)(wh,{onClick:E,sx:{position:"absolute",right:8,top:8},children:(0,qt.jsx)(Yue,{})})]}),(0,qt.jsx)(bC,{dividers:!0,children:(0,qt.jsxs)(Ff,{container:!0,spacing:2,direction:"column",children:[(0,qt.jsxs)(Ff,{item:!0,children:[(0,qt.jsx)(Q_,{fullWidth:!0,label:D("rpm_ExerciseName"),name:oxe,value:t[oxe],onChange:n,margin:"normal"}),(0,qt.jsx)(dH,{name:oxe,children:e=>(0,qt.jsx)(v_,{error:!0,children:D(e,{field:D("rpm_ExerciseName")})})})]}),(0,qt.jsxs)(Ff,{item:!0,children:[(0,qt.jsx)(o_,{children:D("rpm_PrimaryMuscle")}),(0,qt.jsx)(tH,{name:axe,children:e=>{let{field:t,form:n}=e;return(0,qt.jsx)(aj,{options:L,value:t.value||null,onChange:(e,t)=>{n.setFieldValue(axe,t)},renderInput:e=>(0,qt.jsx)(Q_,(0,i.A)((0,i.A)({},e),{},{fullWidth:!0,size:"small",error:Boolean(n.errors[axe]),helperText:n.errors[axe]?D(n.errors[axe],{field:D("rpm_PrimaryMuscle")}):""}))})}})]}),(0,qt.jsxs)(Ff,{item:!0,children:[(0,qt.jsx)(o_,{children:D("rpm_SecondaryMuscle")}),(0,qt.jsx)(tH,{name:sxe,children:e=>{let{field:t,form:n}=e;return(0,qt.jsx)(aj,{multiple:!0,options:L,value:t.value||[],onChange:(e,t)=>{n.setFieldValue(sxe,t)},disableCloseOnSelect:!0,renderOption:(e,t,n)=>{let{selected:r}=n;return(0,qt.jsxs)("li",(0,i.A)((0,i.A)({},e),{},{children:[(0,qt.jsx)(Dw,{icon:$,checkedIcon:B,checked:r,style:{marginRight:8}}),t]}))},renderInput:e=>(0,qt.jsx)(Q_,(0,i.A)((0,i.A)({},e),{},{fullWidth:!0,size:"small",error:Boolean(n.errors[sxe]),helperText:n.errors[sxe]?D(n.errors[sxe],{field:D("rpm_SecondaryMuscle")}):""}))})}})]}),(0,qt.jsxs)(Ff,{item:!0,children:[(0,qt.jsx)(o_,{children:D("rpm_Equipment")}),(0,qt.jsx)(tH,{name:lxe,children:e=>{let{field:t,form:n}=e;return(0,qt.jsx)(aj,{options:F,value:t.value||null,onChange:(e,t)=>n.setFieldValue(lxe,t),renderInput:e=>(0,qt.jsx)(Q_,(0,i.A)((0,i.A)({},e),{},{fullWidth:!0,size:"small",error:Boolean(n.errors[lxe]),helperText:n.errors[lxe]?D(n.errors[lxe],{field:D("rpm_Equipment")}):""}))})}})]}),(0,qt.jsxs)(Ff,{item:!0,children:[(0,qt.jsx)(o_,{children:D("rpm_ExerciseType")}),(0,qt.jsx)(tH,{name:cxe,children:e=>{let{field:t,form:n}=e;return(0,qt.jsx)(aj,{options:I,value:t.value||null,onChange:(e,t)=>n.setFieldValue(cxe,t),renderInput:e=>(0,qt.jsx)(Q_,(0,i.A)((0,i.A)({},e),{},{fullWidth:!0,size:"small",error:Boolean(n.errors[cxe]),helperText:n.errors[cxe]?D(n.errors[cxe],{field:D("rpm_ExerciseType")}):""}))})}})]}),(0,qt.jsxs)(Ff,{item:!0,children:[(0,qt.jsx)(Q_,{fullWidth:!0,label:D("rpm_MovementPattern"),name:dxe,value:t[dxe],onChange:n,margin:"normal"}),(0,qt.jsx)(dH,{name:dxe,children:e=>(0,qt.jsx)(v_,{error:!0,children:D(e,{field:D("rpm_MovementPattern")})})})]}),(0,qt.jsxs)(Ff,{item:!0,children:[(0,qt.jsx)(o_,{children:D("rpm_ExerciseLevel")}),(0,qt.jsx)(tH,{as:G_,name:uxe,fullWidth:!0,size:"small",value:t[uxe]||"",onChange:n,children:["Beginner","Intermediate","Advanced"].map(e=>(0,qt.jsx)(mf,{value:e,children:(0,qt.jsx)(Cf,{children:e})},e))}),(0,qt.jsx)(dH,{name:uxe,children:e=>(0,qt.jsx)(v_,{error:!0,children:D(e,{field:D("rpm_ExerciseLevel")})})})]}),(0,qt.jsxs)(Ff,{item:!0,children:[(0,qt.jsx)(o_,{children:D("rpm_Instructions")}),(0,qt.jsx)(Q_,{fullWidth:!0,label:D("rpm_Instructions"),name:pxe,value:t[pxe],onChange:n,margin:"normal"}),(0,qt.jsx)(dH,{name:pxe,children:e=>(0,qt.jsx)(v_,{error:!0,children:D(e,{field:D("rpm_Instructions")})})})]}),(0,qt.jsxs)(Ff,{item:!0,children:[(0,qt.jsx)(o_,{children:D("rpm_Tips")}),(0,qt.jsxs)(op,{sx:{display:"flex",flexWrap:"wrap",gap:1,padding:"4px 4px",border:"1px solid #ccc",borderRadius:"4px"},children:[(t[hxe]||[]).map((e,n)=>(0,qt.jsx)(Eb,{label:e,onDelete:()=>{const e=t[hxe].filter((e,t)=>t!==n);r(hxe,e)},size:"small"},n)),(0,qt.jsx)(Q_,{variant:"standard",placeholder:D("Add tips and press Enter"),value:t.tempTip||"",onChange:e=>r("tempTip",e.target.value),onKeyDown:e=>{if("Enter"===e.key){var n;e.preventDefault();const i=null===(n=t.tempTip)||void 0===n?void 0:n.trim();if(!i)return;const o=[...t[hxe]||[],i];r(hxe,o),r("tempTip","")}},sx:{minWidth:"120px"}})]}),(0,qt.jsx)(dH,{name:hxe,children:e=>(0,qt.jsx)(v_,{error:!0,children:D(e,{field:D("rpm_Tips")})})})]}),(0,qt.jsxs)(Ff,{item:!0,children:[(0,qt.jsx)(o_,{children:D("rpm_CommonMistakes")}),(0,qt.jsxs)(op,{sx:{display:"flex",flexWrap:"wrap",gap:1,padding:"4px 0",border:"1px solid #ccc",borderRadius:"4px"},children:[(t[mxe]||[]).map((e,n)=>(0,qt.jsx)(Eb,{label:e,size:"small",onDelete:()=>{const e=t[mxe].filter((e,t)=>t!==n);r(mxe,e)}},n)),(0,qt.jsx)(Q_,{variant:"standard",placeholder:D("Add common mistake and press Enter"),value:t.tempCommonMistake||"",onChange:e=>r("tempCommonMistake",e.target.value),onKeyDown:e=>{if("Enter"===e.key){var n;e.preventDefault();const i=null===(n=t.tempCommonMistake)||void 0===n?void 0:n.trim();if(!i)return;const o=[...t[mxe]||[],i];r(mxe,o),r("tempCommonMistake","")}},sx:{minWidth:"150px"}})]}),(0,qt.jsx)(dH,{name:mxe,children:e=>(0,qt.jsx)(v_,{error:!0,children:D(e,{field:D("rpm_CommonMistakes")})})})]}),(0,qt.jsx)(Ff,{item:!0,children:(0,qt.jsx)(wE,{control:(0,qt.jsx)(tH,{as:Dw,name:fxe,checked:t[fxe],onChange:()=>r(fxe,!t[fxe])}),label:"Is Body Weight"})}),(0,qt.jsxs)(Ff,{item:!0,children:[(0,qt.jsx)(Q_,{fullWidth:!0,label:D("rpm_Calorie_burn_rate"),name:gxe,value:t[gxe],onChange:n,margin:"normal",type:"number"}),(0,qt.jsx)(dH,{name:gxe,children:e=>(0,qt.jsx)(v_,{error:!0,children:D(e,{field:D("rpm_Calorie_burn_rate")})})})]}),(0,qt.jsxs)(Ff,{item:!0,children:[(0,qt.jsx)(o_,{children:D("rpm_Category")}),(0,qt.jsx)(tH,{as:G_,name:vxe,fullWidth:!0,size:"small",value:t[vxe]||"",onChange:n,children:lu.map(e=>(0,qt.jsx)(mf,{value:e,children:(0,qt.jsx)(Cf,{children:e})},e))}),(0,qt.jsx)(dH,{name:vxe,children:e=>(0,qt.jsx)(v_,{error:!0,children:D(e,{field:D("rpm_Category")})})})]})]})}),(0,qt.jsxs)(vE,{children:[(0,qt.jsx)(xh,{onClick:E,children:D("rpm_Cancel")}),(0,qt.jsx)(xh,{type:"submit",variant:"contained",color:"primary",children:D("rpm_Submit")})]})]})}})})},yxe=e=>{let{open:t,onClose:n}=e;const{t:r}=Vg(),i=(null===t||void 0===t?void 0:t.data)||{};return(0,qt.jsxs)(cC,{fullWidth:!0,maxWidth:"md",open:null===t||void 0===t?void 0:t.open,onClose:n,children:[(0,qt.jsxs)(fC,{sx:{fontWeight:600},children:[r("rpm_GoalDetails"),(0,qt.jsx)(wh,{onClick:n,sx:{position:"absolute",right:8,top:8},children:(0,qt.jsx)(Yue,{})})]}),(0,qt.jsx)(bC,{dividers:!0,children:(0,qt.jsx)(yp,{variant:"outlined",sx:{p:2.5,borderRadius:2,mb:2,bgcolor:"#fcfcfc"},children:(0,qt.jsxs)(Ff,{container:!0,spacing:3,children:[(0,qt.jsxs)(Ff,{item:!0,xs:12,sm:6,md:4,children:[(0,qt.jsx)(Cf,{variant:"body2",color:"text.secondary",children:r("rpm_ExerciseName")}),(0,qt.jsx)(Cf,{variant:"body1",fontWeight:600,children:i.name||"-"})]}),(0,qt.jsxs)(Ff,{item:!0,xs:12,sm:6,md:4,children:[(0,qt.jsx)(Cf,{variant:"body2",color:"text.secondary",children:r("rpm_PrimaryMuscle")}),(0,qt.jsx)(Cf,{variant:"body1",fontWeight:600,children:i.primary_muscle||"-"})]}),(0,qt.jsxs)(Ff,{item:!0,xs:12,sm:6,md:4,children:[(0,qt.jsx)(Cf,{variant:"body2",color:"text.secondary",children:r("rpm_ExerciseLevel")}),(0,qt.jsx)(Cf,{variant:"body1",fontWeight:600,children:i.level||"-"})]}),(0,qt.jsxs)(Ff,{item:!0,xs:12,sm:6,md:4,children:[(0,qt.jsx)(Cf,{variant:"body2",color:"text.secondary",children:r("rpm_ExerciseType")}),(0,qt.jsx)(Cf,{variant:"body1",fontWeight:600,children:i.exercise_type||"-"})]}),(0,qt.jsxs)(Ff,{item:!0,xs:12,sm:6,md:4,children:[(0,qt.jsx)(Cf,{variant:"body2",color:"text.secondary",children:r("rpm_Priority")}),(0,qt.jsx)(Cf,{variant:"body1",fontWeight:600,children:i.priority||"-"})]}),(0,qt.jsxs)(Ff,{item:!0,xs:12,sm:6,md:4,children:[(0,qt.jsx)(Cf,{variant:"body2",color:"text.secondary",children:r("rpm_Calorie_burn_rate")}),(0,qt.jsx)(Cf,{variant:"body1",fontWeight:600,children:i.calorie_burn_rate_per_min||"-"})]})]})})}),(0,qt.jsx)(vE,{children:(0,qt.jsx)(xh,{onClick:n,variant:"contained",children:r("rpm_Close")})})]})},bxe=ds((e,t)=>{/^\++$/.test(t.trim())||e({exercise:t})},500);function jxe(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";if(!t)return e;const n=new RegExp("(".concat(t,")"),"gi"),r=e.split(n);return(0,qt.jsx)(qt.Fragment,{children:r.map((e,n)=>e.toLowerCase()===t.toLowerCase()?(0,qt.jsx)("span",{style:{fontWeight:"bold"},children:e},n):(0,qt.jsx)("span",{children:e},n))})}const _xe=function(e){let{pageDetails:t,fetchListFunction:n,filterState:r,setFilterState:o,ExerciseSuggestions:a,fetchExerciseListSuggestions:s,placeholder:l,helpText:c}=e;const{t:d}=Vg(),[u,p]=(0,We.useState)([]),[h,m]=(0,We.useState)("");(0,We.useEffect)(()=>{p(a)},[a]),(0,We.useEffect)(()=>{n()},[r]);const f=(0,We.useCallback)((e,t)=>{bxe(s,t)},[s]),g=()=>{t.current_page=1,m(""),o({exercise:""})},v=e=>{t.current_page=1,o({exercise:"".concat(e.name)}),a=[],p([])};return(0,qt.jsx)(Kz,{initialValues:{patientName:""},onSubmit:()=>console.log("ExerciseFilter"),enableReinitialize:!0,children:()=>(0,qt.jsx)(nH,{style:{flex:"1"},children:(0,qt.jsx)(op,{sx:{borderRadius:"8px"},py:.2,pl:1,mr:2,className:"course_filter WhiteBG",children:(0,qt.jsx)(Ff,{container:!0,spacing:2,alignItems:"center",position:"relative",width:"100%",children:(0,qt.jsxs)(Ff,{item:!0,width:"100%",className:"globalSearchBox",children:[(0,qt.jsxs)(op,{py:.2,display:"flex",alignItems:"center",position:"relative",width:"100%",children:[(0,qt.jsx)(qj,{sx:{position:"relative"},fullWidth:!0,size:"small",className:"exercises-tour-step0",placeholder:l,value:h,onKeyDown:e=>{if("Enter"===e.key&&(null===u||void 0===u?void 0:u.length)>0){const e=u[0];o((0,i.A)((0,i.A)({},r),{},{exercise:h})),v(e)}},onChange:e=>{let t=e.target.value;m(t),f(null,t)},endAdornment:(0,qt.jsx)(tw,{position:"end",children:(0,qt.jsx)(sy,{title:d(c||"message:rpm_SearchExerciseFilterBar"),placement:"top",children:(0,qt.jsx)(wh,{size:"small",children:(0,qt.jsx)(pM.A,{fontSize:"small"})})})})}),(0,qt.jsx)(op,{position:"absolute",right:"23px",children:!cs(null===r||void 0===r?void 0:r.exercise)&&(0,qt.jsx)(xh,{variant:"text",disableElevation:!0,type:"reset",onClick:g,sx:{"&.MuiButtonBase-root:hover":{bgcolor:"transparent"}},children:(0,qt.jsx)(J_.A,{})})})]}),(0,qt.jsx)(op,{className:"globalSearchParent",sx:{position:"absolute",width:"100%",background:"#ffffff",zIndex:"1",borderBottom:"1px solid #efefef",maxHeight:"350px",overflow:"auto",scrollbarWidth:"thin","&::-webkit-scrollbar":{width:"0.2em"},"&::-webkit-scrollbar-track":{background:"#f1f1f1"},"&::-webkit-scrollbar-thumb":{backgroundColor:"#888"},"&::-webkit-scrollbar-thumb:hover":{background:"#555"}},children:(null===u||void 0===u?void 0:u.length)>0&&(0,qt.jsx)(zh,{dense:!0,children:null===u||void 0===u?void 0:u.map((e,t)=>(0,qt.jsx)(Ag,{button:!0,onClick:()=>v(e),children:(0,qt.jsx)(Dg,{primary:(0,qt.jsx)(qt.Fragment,{children:(0,qt.jsxs)(op,{display:"flex",alignItems:"center",justifyContent:"space-between",width:"100%",children:[(0,qt.jsx)("span",{children:jxe(null===e||void 0===e?void 0:e.name,h)}),(0,qt.jsx)("span",{children:jxe(null===e||void 0===e?void 0:e.primary_muscle,h)})]})})})},t))})})]})})})})},"filter_formik")};function Cxe(e){let{goalsList:t,order:n,orderBy:r,setOrder:i,setOrderBy:o,dataParameter:a,programHead:s,checkState:l,onCheck:c,isSelection:d,nodata:u,fetchWorkoutGoals:p,pageDetails:h,viewButton:m,editButton:f,goalModal:g,deleteButton:v,handleProgramModalToggle:x,createWorkoutGoal:y,setHeadcells:b,settingModal:j,initialHeadcells:_,handleSettingModalToggle:C,muscleGroup:w,exerciseType:S,gymEquipments:A,fetchAllExerciseListSuggestions:k,filterState:T,setFilterState:E,allExerciseSuggestions:M,fetchWorkoutGoalDetails:O}=e;const{t:R}=Vg();return(0,qt.jsxs)(op,{sx:{width:"100%"},children:[(0,qt.jsx)(op,{sx:{mb:2.5},children:(0,qt.jsxs)(Ff,{container:!0,spacing:2,alignItems:"center",children:[(0,qt.jsx)(Ff,{item:!0,xs:!0,children:(0,qt.jsx)(Cf,{variant:"h5",gutterBottom:!0,component:"h5",children:R("rpm_ExerciseGoals")})}),(0,qt.jsx)(Ff,{item:!0,children:(0,qt.jsxs)(xh,{variant:"contained",color:"primary",disableElevation:!0,onClick:()=>{x({},"add")},children:[(0,qt.jsx)(jue.A,{}),(0,qt.jsx)(Cf,{component:"span",className:"hideOnMobile",children:R("rpm_CreateExercise")})]})})]})}),(0,qt.jsx)(op,{bgcolor:"#fff",sx:{borderTopLeftRadius:"8px",borderTopRightRadius:"8px"},children:(0,qt.jsxs)(Ff,{container:!0,spacing:1,children:[(0,qt.jsx)(Ff,{item:!0,lg:7,md:9,xs:10,sm:10,children:(0,qt.jsx)(_xe,{pageDetails:h,fetchListFunction:p,filterState:T,setFilterState:E,ExerciseSuggestions:M,fetchExerciseListSuggestions:k,placeholder:"Search by exercise name",helpText:"Enter exercise name"})}),(0,qt.jsx)(Ff,{item:!0,sx:{ml:"auto"},sm:3,xs:2,textAlign:"end",children:(0,qt.jsx)(sy,{title:R("rpm_TableCellSetting"),children:(0,qt.jsx)(sv,{sx:{boxShadow:"none",width:32,height:32,minHeight:"auto",marginRight:"10px",marginTop:"5px"},size:"small",color:"primary",onClick:C,children:(0,qt.jsx)(YC.A,{fontSize:"small",sx:{width:16,height:16}})})})}),(0,qt.jsxs)(Ff,{item:!0,xs:12,children:[(0,qt.jsx)(op,{children:(0,qt.jsx)(UT,{order:n,orderBy:r,setOrder:i,setOrderBy:o,data:t,headCells:null===s||void 0===s?void 0:s.filter(e=>_.includes(e.id)),dataParameter:a,selected:l,setSelected:c,isSelection:d,noDataImage:u,fetchList:O,pageDetails:h,skeletonVrows:6,className:"theme_scroll",children:null!==t&&void 0!==t&&t.length?null===t||void 0===t?void 0:t.map(e=>(0,qt.jsxs)(cw,{sx:{"&:last-child td, &:last-child th":{border:0}},className:"program-tour-step0",children:[d&&(0,qt.jsx)(gw,{padding:"checkbox",children:(0,qt.jsx)(Dw,{onChange:c,checked:l.includes(e.code),name:e.code,color:"primary"})}),_.includes("goal_name")&&(0,qt.jsx)(gw,{children:(0,qt.jsx)(op,{display:"flex",alignItems:"center",children:e.name})}),_.includes("primary_muscle")&&(0,qt.jsx)(gw,{children:e.primary_muscle}),_.includes("level")&&(0,qt.jsx)(gw,{children:e.level}),_.includes("action")&&(0,qt.jsx)(gw,{children:(0,qt.jsxs)(op,{className:"program-tour-step1",width:"fit-content",children:[f(e),m(e),v(e)]})})]},e.code)):(0,qt.jsx)(qt.Fragment,{})})}),(0,qt.jsx)(KE,{pageDetails:h,fetchListFunction:p})]})]})}),g.open&&("edit"===g.type||"add"===g.type)&&(0,qt.jsx)(xxe,{modal:g,onClose:x,onSubmit:y,muscleGroup:w,gymEquipments:A,exerciseType:S}),g.open&&"details"===g.type&&(0,qt.jsx)(yxe,{open:g,onClose:x}),(0,qt.jsx)(TE,{open:j,allHeadCells:s,initialHeadcells:_,setHeadcells:b,onClose:C})]})}Cxe.defaultProps={programHead:[],pageDetails:{},order:"",orderBy:"",setOrder:()=>{},setOrderBy:()=>{},dataParameter:"",checkState:"",onCheck:()=>{},isSelection:"",nodata:"",goalsList:[],fetchWorkoutGoals:()=>{},editButton:()=>{},viewButton:()=>{},deleteButton:()=>{},goalModal:!1,handleProgramModalToggle:()=>{},createWorkoutGoal:()=>{},initialHeadcells:[],setHeadcells:()=>{},settingModal:!1,handleSettingModalToggle:()=>{},muscleGroup:{},exerciseType:{},gymEquipments:[],filterState:{},setFilterState:()=>{},allExerciseSuggestions:[],fetchAllExerciseListSuggestions:()=>{},fetchWorkoutGoalDetails:()=>{}};const wxe=Cxe,Sxe=e=>async t=>{const{current_page:n,per_page:r,newFilterState:i}=e;t(na(!0));try{let e="".concat(va.EXERCISE_GOAL,"?page=").concat(n||1,"&perPage=").concat(r);null!==i&&void 0!==i&&i.exercise&&(e+="&q=".concat(i.exercise));const t=await Iu(e,{});return null===t||void 0===t?void 0:t.data}catch(o){return o}finally{t(na(!1))}},Axe=["content"];const kxe=function(e){let{userData:t}=e;const n=Nt(),r=VC(JA().breakpoints.down("sm")),{t:o}=Vg(),[a,s]=(0,We.useState)("desc"),[l,c]=(0,We.useState)("updated_at"),[d,u]=(0,We.useState)([]),[p,h]=We.useState({open:!1,data:{},type:""}),[m,f]=We.useState({open:!1,data:{}}),[g,v]=(0,We.useState)([]),[x,y]=We.useState(!1),[b,j]=We.useState({}),[_,C]=We.useState({}),[w,S]=We.useState([]),[A,k]=(0,We.useState)((0,i.A)({},dd)),[T,E]=(0,We.useState)([]),[M,O]=We.useState({}),R=r?["goal_name","action"]:["goal_name","primary_muscle","level","action"],P=e=>{f((0,i.A)((0,i.A)({},m),{},{open:!m.open,data:e}))},D=(e,t)=>{B(),z(),p.open||"add"===t?p.open||"add"!==t?h({open:!p.open,data:{},type:""}):h({open:!p.open,data:{},type:"add"}):H(e._id,t)},[N,L]=We.useState(cs($o.getAllProgramsCells())?R:$o.getAllProgramsCells()),I=function(e){L(e),$o.setAllProgramsCells(e)},F=async(e,t,r)=>{let{setErrors:o}=r;try{await n(((e,t)=>async n=>{n(na(!0));const r=(0,i.A)((0,i.A)({},e),{},{priority:Number(e.priority||"0")});try{const e="".concat(va.EXERCISE_GOAL,"/").concat(t);return await $u(e,r)}finally{n(na(!1))}})(t,e)),n(Zo({subTitle:"message:rpm_ExerciseUpdatedSuccessfully",severity:ud.SUCCESS})),$(),h({open:!1,data:{},type:""})}catch(a){const e=us(a,"response.data.field_errors",{}),t=us(a,"response.data.code","");cs(e)?cs(t)?n(Zo({subTitle:a.message,severity:ud.ERROR})):n(Zo({subTitle:Vd(t,"error:rpm_ExerciseCreatedFailed"),severity:ud.ERROR})):o(Ud(e))}},$=async()=>{const e=(0,i.A)((0,i.A)({sort_by:l,sort_order:a},A),{},{newFilterState:M});try{const t=await n(Sxe(e))||{},{content:r}=t,o=Ko(t,Axe);v(r),k(e=>(0,i.A)((0,i.A)({},e),{},{last_page:o.last_page,current_page:o.current_page,from:o.from,to:o.to,total:o.total}))}catch(t){console.log(t)}},B=async()=>{try{const e=await n(async e=>{e(na(!0));try{const e="".concat(va.ENUM),t=await Iu(e,{});return null===t||void 0===t?void 0:t.data}catch(t){return t}finally{e(na(!1))}});j(null===e||void 0===e?void 0:e.muscle_group),C(null===e||void 0===e?void 0:e.exercise_type)}catch(e){console.log(e)}},z=async()=>{try{const e=await n(async e=>{e(na(!0));try{var t;const e="".concat(va.GYM_EQUIPMENTS),n=await Iu(e,{});return null===n||void 0===n||null===(t=n.data)||void 0===t?void 0:t.gymEquipments}catch(n){return n}finally{e(na(!1))}});S(e)}catch(e){console.log(e)}},H=async(e,t)=>{try{const r=await n((e=>async t=>{t(na(!0));try{const t="".concat(va.EXERCISE_GOAL,"/").concat(e),n=await Iu(t,{});return null===n||void 0===n?void 0:n.data}catch(n){return n}finally{t(na(!1))}})(e));h({open:!p.open,data:r,type:t})}catch(r){console.log(r)}},W=async e=>{try{await n((t=e,async e=>{e(na(!0));try{const e="".concat(va.EXERCISE_GOAL,"/").concat(t);return await Bu(e,{})}finally{e(na(!1))}})),$(),f({open:!1,data:{}}),n(Zo({subTitle:"message:rpm_DeleteWorkoutSuccess",severity:ud.SUCCESS}))}catch(r){n(Zo({subTitle:r.message,severity:ud.ERROR}))}var t};We.useEffect(()=>{n(NC({activeMenuItem:"exerciseGoals",heading:{}}))},[]),We.useEffect(()=>{I(R)},[r]);const U=[{id:"goal_name",label:o("rpm_ExerciseName"),isSort:!1,sortProperty:"goal_name"},{id:"primary_muscle",label:o("rpm_primary_muscle"),isSort:!1,sortProperty:"category"},{id:"level",label:o("rpm_Level"),isSort:!1,sortProperty:"is_active"},{id:"action",label:o("rpm_Actions"),isSort:!1,sortProperty:"action"}];return(0,qt.jsxs)(qt.Fragment,{children:[(0,qt.jsx)(wxe,{userData:t,order:a,orderBy:l,setOrder:s,setOrderBy:c,dataParameter:"code",checkState:d,onCheck:e=>{if(Array.isArray(e))return u(e.map(e=>e));const t=e.target.name;d.includes(t)?u(d.filter(e=>e!==t)):u(e=>[...e,t])},isSelection:!1,nodata:GC,programHead:U,goalsList:g,fetchWorkoutGoals:$,pageDetails:A,editButton:e=>(0,qt.jsx)(sy,{title:o("rpm_Edit"),children:(0,qt.jsx)(wh,{"data-id":e._id,color:"primary",onClick:()=>D(e,"edit"),children:(0,qt.jsx)(fc,{fontSize:"small",sx:{width:16,height:16}})})}),viewButton:e=>(0,qt.jsx)(sy,{title:o("rpm_view"),children:(0,qt.jsx)(wh,{"data-id":e.id,color:"primary",onClick:()=>D(e,"details"),children:(0,qt.jsx)(gc,{fontSize:"small",sx:{width:16,height:16}})})}),deleteButton:e=>(0,qt.jsx)(sy,{title:o("rpm_Delete"),children:(0,qt.jsx)("span",{children:(0,qt.jsx)(wh,{"data-id":e.id,color:"error",onClick:()=>P(e),children:(0,qt.jsx)(xc,{fontSize:"small",sx:{width:16,height:16}})})})}),goalModal:p,handleProgramModalToggle:D,setHeadcells:I,settingModal:x,initialHeadcells:N,handleSettingModalToggle:()=>{y(!x)},createWorkoutGoal:async(e,t,r)=>{let{setErrors:o,resetForm:a}=r;if(e){await F(e,t,{setErrors:o});const r=await n($());return v(r),void h({open:!1,data:{},type:""})}try{await n((s=t,async e=>{e(na(!0));const t=(0,i.A)((0,i.A)({},s),{},{priority:Number(s.priority||"0")});try{const e="".concat(va.EXERCISE_GOAL);return await Fu(e,t)}finally{e(na(!1))}})),a(),n(Zo({subTitle:"message:rpm_ExerciseCreatedSuccessfully",severity:ud.SUCCESS})),$(),h({open:!1,data:{},type:""})}catch(l){let e=us(l,"response.data.errorCode","");e?(e=e.split(":")[1],n(Zo({subTitle:Vd(e,"error:rpm_ExerciseCreatedFailed"),severity:ud.ERROR}))):n(Zo({subTitle:l.message,severity:ud.ERROR}))}var s},muscleGroup:b,exerciseType:_,gymEquipments:w,filterState:M,setFilterState:O,allExerciseSuggestions:T,fetchAllExerciseListSuggestions:async e=>{const t=(0,i.A)({sort_by:l,sort_order:a,newFilterState:e},A);if(null!==e&&void 0!==e&&e.exercise){if(null!==e&&void 0!==e&&e.exercise.trim())try{const e=await n(Sxe(t)),r=(null===e||void 0===e?void 0:e.content)||[];E(r)}catch(r){console.log(r)}}else E([]),$()},fetchWorkoutGoalDetails:H}),(0,qt.jsx)(qV,{openModal:m.open,onCloseModal:P,actionFunction:()=>{var e;return W(null===m||void 0===m||null===(e=m.data)||void 0===e?void 0:e._id)},dataName:m.data.display_name,options:{primaryText:o("message:rpm_DeleteTitle"),secondaryText:o("message:rpm_DeleteBodyText"),descText:o("message:rpm_DeleteSubText"),btn:{primaryText:o("rpm_Delete"),secondaryText:o("rpm_Cancel"),primaryColor:"error",secondaryColor:"primary"},btnSwap:!0}})]})};function Txe(e){let{order:t,orderBy:n,setOrder:r,setOrderBy:i,dataParameter:o,programHead:a,checkState:s,enquiryList:l,onCheck:c,isSelection:d,nodata:u,pageDetails:p,initialHeadcells:h,fetchEnquiryList:m}=e;const{t:f}=Vg();return(0,qt.jsxs)(op,{sx:{width:"100%"},children:[(0,qt.jsx)(op,{sx:{mb:2.5},children:(0,qt.jsx)(Ff,{container:!0,spacing:2,alignItems:"center",children:(0,qt.jsx)(Ff,{item:!0,xs:!0,children:(0,qt.jsx)(Cf,{variant:"h5",gutterBottom:!0,component:"h5",children:f("rpm_EnquiryList")})})})}),(0,qt.jsx)(op,{bgcolor:"#fff",sx:{borderTopLeftRadius:"8px",borderTopRightRadius:"8px"},children:(0,qt.jsx)(Ff,{container:!0,spacing:1,children:(0,qt.jsxs)(Ff,{item:!0,xs:12,children:[(0,qt.jsx)(op,{children:(0,qt.jsx)(UT,{order:t,orderBy:n,setOrder:r,setOrderBy:i,data:l,headCells:null===a||void 0===a?void 0:a.filter(e=>h.includes(e.id)),dataParameter:o,selected:s,setSelected:c,isSelection:d,noDataImage:u,fetchList:m,pageDetails:p,skeletonVrows:6,className:"theme_scroll",children:null!==l&&void 0!==l&&l.length?null===l||void 0===l?void 0:l.map(e=>(0,qt.jsxs)(cw,{sx:{"&:last-child td, &:last-child th":{border:0}},className:"program-tour-step0",children:[h.includes("name")&&(0,qt.jsx)(gw,{children:(0,qt.jsx)(op,{display:"flex",alignItems:"center",children:e.name})}),h.includes("email")&&(0,qt.jsx)(gw,{children:(0,qt.jsx)(op,{display:"flex",alignItems:"center",children:e.email})}),h.includes("mobile")&&(0,qt.jsx)(gw,{children:(0,qt.jsx)(op,{display:"flex",alignItems:"center",children:e.phoneNumber?e.countryCode?"".concat(e.countryCode,"-").concat(e.phoneNumber):e.phoneNumber:"-"})}),h.includes("userType")&&(0,qt.jsx)(gw,{children:(0,qt.jsx)(op,{display:"flex",alignItems:"center",children:e.userType||"-"})})]},e.code)):(0,qt.jsx)(qt.Fragment,{})})}),(0,qt.jsx)(KE,{pageDetails:p,fetchListFunction:m})]})})})]})}Txe.defaultProps={programHead:[],pageDetails:{},order:"",orderBy:"",setOrder:()=>{},setOrderBy:()=>{},dataParameter:"",checkState:"",onCheck:()=>{},isSelection:"",nodata:"",enquiryList:[],fetchEnquiryList:()=>{},goalModal:!1,handleProgramModalToggle:()=>{},createWorkoutGoal:()=>{},initialHeadcells:[],setHeadcells:()=>{}};const Exe=Txe,Mxe=["content"];const Oxe=function(e){let{userData:t}=e;const n=Nt(),r=wt(cu),o=VC(JA().breakpoints.down("sm")),{t:a}=Vg(),[s,l]=(0,We.useState)("desc"),[c,d]=(0,We.useState)("updated_at"),[u,p]=(0,We.useState)([]),[h,m]=We.useState(!1),[f,g]=(0,We.useState)({}),[v,x]=(0,We.useState)((0,i.A)({},dd)),y=o?["name","email"]:["name","email","mobile","userType"],[b,j]=We.useState(cs($o.getAllProgramsCells())?y:$o.getAllProgramsCells()),_=function(e){j(e),$o.setAllProgramsCells(e)},C=async()=>{const e=(0,i.A)({},v);try{const t=await n((e=>async t=>{const{current_page:n,per_page:r}=e;t(na(!0));try{let e="".concat(xa.ENQUIRY_LIST,"?page=").concat(n||1,"&perPage=").concat(r);const t=await Fu(e,{});return null===t||void 0===t?void 0:t.data}catch(i){return i}finally{t(na(!1))}})(e)),r=t||{},{content:o}=r,a=Ko(r,Mxe);g(o),x(e=>(0,i.A)((0,i.A)({},e),{},{last_page:a.lastPage||a.last_page,current_page:a.currentPage||a.current_page,from:a.from,to:a.to,total:a.total}))}catch(t){console.log(t)}};We.useEffect(()=>{n(NC({activeMenuItem:"enquiryList",heading:{}}))},[]),We.useEffect(()=>{_(y)},[o]),We.useEffect(()=>{r&&C()},[r,v.current_page,v.per_page]);const w=[{id:"name",label:a("rpm_Name"),isSort:!1,sortProperty:"name"},{id:"email",label:a("rpm_Email"),isSort:!1,sortProperty:"email"},{id:"mobile",label:a("rpm_Mobile"),isSort:!1,sortProperty:"mobile"},{id:"userType",label:a("rpm_UserType"),isSort:!1,sortProperty:"type"}];return(0,qt.jsx)(qt.Fragment,{children:(0,qt.jsx)(Exe,{userData:t,order:s,orderBy:c,setOrder:l,setOrderBy:d,dataParameter:"code",checkState:u,onCheck:e=>{if(Array.isArray(e))return p(e.map(e=>e));const t=e.target.name;u.includes(t)?p(u.filter(e=>e!==t)):p(e=>[...e,t])},isSelection:!1,nodata:GC,enquiryList:f,programHead:w,pageDetails:v,setHeadcells:_,settingModal:h,initialHeadcells:b,handleSettingModalToggle:()=>{m(!h)},fetchEnquiryList:C})})};function Rxe(e){let{packageList:t,order:n,orderBy:r,setOrder:i,setOrderBy:o,dataParameter:a,programHead:s,checkState:l,onCheck:c,isSelection:d,nodata:u,fetchAccountPackages:p,pageDetails:h,editButton:m,deleteButton:f,handlePackageModalToggle:g,setHeadcells:v,settingModal:x,initialHeadcells:y,handleSettingModalToggle:b}=e;const{t:j}=Vg();return(0,qt.jsxs)(op,{sx:{width:"100%"},children:[(0,qt.jsx)(op,{sx:{mb:2.5},children:(0,qt.jsxs)(Ff,{container:!0,spacing:2,alignItems:"center",children:[(0,qt.jsx)(Ff,{item:!0,xs:!0,children:(0,qt.jsx)(Cf,{variant:"h5",gutterBottom:!0,component:"h5",children:j("rpm_PackageTemplates")})}),(0,qt.jsx)(Ff,{item:!0,children:(0,qt.jsxs)(xh,{variant:"contained",color:"primary",disableElevation:!0,onClick:()=>g({},"add"),children:[(0,qt.jsx)(jue.A,{}),(0,qt.jsx)(Cf,{component:"span",className:"hideOnMobile",children:j("rpm_CreatePackage")})]})})]})}),(0,qt.jsx)(op,{bgcolor:"#fff",sx:{borderTopLeftRadius:"8px",borderTopRightRadius:"8px"},children:(0,qt.jsxs)(Ff,{container:!0,spacing:1,children:[(0,qt.jsx)(Ff,{item:!0,sx:{ml:"auto"},sm:3,xs:2,textAlign:"end",children:(0,qt.jsx)(sy,{title:j("rpm_TableCellSetting"),children:(0,qt.jsx)(sv,{sx:{boxShadow:"none",width:32,height:32,minHeight:"auto",marginRight:"10px",marginTop:"5px"},size:"small",color:"primary",onClick:b,children:(0,qt.jsx)(YC.A,{fontSize:"small",sx:{width:16,height:16}})})})}),(0,qt.jsxs)(Ff,{item:!0,xs:12,children:[(0,qt.jsx)(op,{children:(0,qt.jsx)(UT,{order:n,orderBy:r,setOrder:i,setOrderBy:o,data:t,headCells:null===s||void 0===s?void 0:s.filter(e=>y.includes(e.id)),dataParameter:a,selected:l,setSelected:c,isSelection:d,noDataImage:u,fetchList:()=>{},pageDetails:h,skeletonVrows:6,className:"theme_scroll",children:null!==t&&void 0!==t&&t.length?t.map(e=>{var t,n;return(0,qt.jsxs)(cw,{sx:{"&:last-child td, &:last-child th":{border:0}},children:[d&&(0,qt.jsx)(gw,{padding:"checkbox",children:(0,qt.jsx)(Dw,{onChange:c,checked:l.includes(e._id),name:e._id,color:"primary"})}),y.includes("package_name")&&(0,qt.jsx)(gw,{children:(0,qt.jsx)(op,{display:"flex",alignItems:"center",children:e.package_name})}),y.includes("base_price")&&(0,qt.jsx)(gw,{children:(0,qt.jsx)(Cf,{variant:"body2",children:e.base_price})}),y.includes("user_limit")&&(0,qt.jsx)(gw,{children:e.user_limit}),y.includes("user_payment_scheme")&&(0,qt.jsx)(gw,{children:(0,qt.jsx)(Eb,{label:"self_paid"===e.user_payment_scheme?"User Paid":"program_paid"===e.user_payment_scheme?"Organisation Paid":e.user_payment_scheme,size:"small",variant:"outlined"})}),y.includes("plans_count")&&(0,qt.jsx)(gw,{children:(0,qt.jsx)(Eb,{label:"".concat((null===(t=e.user_self_pay_plans)||void 0===t?void 0:t.length)||"-"," Plans"),size:"small",color:"primary",variant:"outlined"})}),y.includes("features_count")&&(0,qt.jsx)(gw,{children:(0,qt.jsx)(Eb,{label:"".concat((null===e||void 0===e||null===(n=e.program_features)||void 0===n?void 0:n.length)||"-"," Features"),size:"small",color:"secondary",variant:"outlined"})}),y.includes("is_active")&&(0,qt.jsx)(gw,{children:(0,qt.jsx)(Eb,{label:null!==e&&void 0!==e&&e.is_active?j("rpm_active"):j("rpm_inactive"),size:"small",color:null!==e&&void 0!==e&&e.is_active?"success":"default"})}),y.includes("action")&&(0,qt.jsx)(gw,{children:(0,qt.jsxs)(op,{width:"fit-content",children:[m(e),f(e)]})})]},e._id)}):(0,qt.jsx)(qt.Fragment,{})})}),(0,qt.jsx)(KE,{pageDetails:h,fetchListFunction:p})]})]})}),(0,qt.jsx)(TE,{open:x,allHeadCells:s,initialHeadcells:y,setHeadcells:v,onClose:b})]})}Rxe.defaultProps={packageList:[],programHead:[],pageDetails:{},order:"",orderBy:"",setOrder:()=>{},setOrderBy:()=>{},dataParameter:"",checkState:[],onCheck:()=>{},isSelection:!1,nodata:"",fetchAccountPackages:()=>{},editButton:()=>{},deleteButton:()=>{},handlePackageModalToggle:()=>{},initialHeadcells:[],setHeadcells:()=>{},settingModal:!1,handleSettingModalToggle:()=>{}};const Pxe=Rxe,Dxe=e=>async t=>{const{sort_by:n,sort_order:r,current_page:i,per_page:o,newFilterState:a}=e;t(na(!0));try{let e="".concat(ba.ACCOUNT_PACKAGE,"?page=").concat(i||1,"&perPage=").concat(o,"&sort_by=").concat(n,"&sort_order=").concat(r);null!==a&&void 0!==a&&a.package&&(e+="&q=".concat(a.package));const t=await Iu(e,{});return null===t||void 0===t?void 0:t.data}catch(s){return s}finally{t(na(!1))}},Nxe=["content"];const Lxe=function(){var e;const t=so(),n=Nt(),r=VC(JA().breakpoints.down("sm")),o=wt(cu),{t:a}=Vg(),[s,l]=(0,We.useState)("desc"),[c,d]=(0,We.useState)("updated_on"),[u,p]=(0,We.useState)([]),[h,m]=(0,We.useState)({open:!1,data:{}}),[f,g]=(0,We.useState)([]),[v,x]=(0,We.useState)(!1),[y,b]=(0,We.useState)((0,i.A)({},dd)),[j,_]=We.useState({}),C=r?["package_name","action"]:["package_name","base_price","user_limit","user_payment_scheme","plans_count","features_count","is_active","action"],[w,S]=We.useState(cs($o.getAllProgramsCells())?C:$o.getAllProgramsCells()),A=e=>{S(e),$o.setAllProgramsCells(e)},k=[{id:"package_name",label:a("rpm_PackageName"),isSort:!0,sortProperty:"package_name"},{id:"base_price",label:a("rpm_BasePriceHeading"),isSort:!1,sortProperty:"base_price"},{id:"user_limit",label:a("rpm_UserLimit"),isSort:!1,sortProperty:"user_limit"},{id:"user_payment_scheme",label:a("rpm_PaymentScheme"),isSort:!0,sortProperty:"user_payment_scheme"},{id:"plans_count",label:a("rpm_Plans"),isSort:!1,sortProperty:"plans_count"},{id:"features_count",label:a("rpm_Features"),isSort:!1,sortProperty:"features_count"},{id:"is_active",label:a("rpm_Status"),isSort:!0,sortProperty:"is_active"},{id:"action",label:a("rpm_Actions"),isSort:!1,sortProperty:"action"}],T=e=>{m((0,i.A)((0,i.A)({},h),{},{open:!h.open,data:e}))},E=(e,n)=>{"add"===n?t(ld.LICENSE_MANAGER.CREATE_PACKAGE):"edit"===n&&null!==e&&void 0!==e&&e._id&&t("".concat(ld.LICENSE_MANAGER.EDIT_PACKAGE,"/").concat(e._id))},M=async()=>{const e=(0,i.A)((0,i.A)({sort_by:c,sort_order:s},y),{},{newFilterState:j});try{const t=await n(Dxe(e));if(Array.isArray(t))g(t);else{const e=t||{},{content:n}=e,r=Ko(e,Nxe);g(n||[]),b(e=>(0,i.A)((0,i.A)({},e),{},{last_page:r.last_page,current_page:r.current_page,from:r.from,to:r.to,total:r.total}))}}catch(t){console.log(t)}},O=async e=>{try{await n((t=e,async e=>{e(na(!0));try{const e="".concat(ba.ACCOUNT_PACKAGE,"/").concat(t);return await Bu(e,{})}finally{e(na(!1))}})),M(),m({open:!1,data:{}}),n(Zo({subTitle:"message:rpm_packageDeleteSuccess",severity:ud.SUCCESS}))}catch(r){n(Zo({subTitle:r.message,severity:ud.ERROR}))}var t};return We.useEffect(()=>{n(NC({activeMenuItem:"packageTemplates",heading:{}}))},[]),We.useEffect(()=>{A(C)},[r]),We.useEffect(()=>{M()},[o,c,s]),(0,qt.jsxs)(qt.Fragment,{children:[(0,qt.jsx)(qV,{openModal:h.open,onCloseModal:T,actionFunction:()=>{var e;return O(null===h||void 0===h||null===(e=h.data)||void 0===e?void 0:e._id)},options:{primaryText:a("message:rpm_DeletePackage"),secondaryText:"Are you sure you want to delete ".concat(null===h||void 0===h||null===(e=h.data)||void 0===e?void 0:e.package_name," Package?"),btn:{primaryText:a("rpm_Delete"),secondaryText:a("rpm_Cancel"),primaryColor:"error",secondaryColor:"primary"},btnSwap:!0}}),(0,qt.jsx)(Pxe,{packageList:f,order:s,orderBy:c,setOrder:l,setOrderBy:d,dataParameter:"code",programHead:k,checkState:u,onCheck:e=>{if(Array.isArray(e))return p(e.map(e=>e));const t=e.target.name;u.includes(t)?p(u.filter(e=>e!==t)):p(e=>[...e,t])},nodata:GC,fetchAccountPackages:M,pageDetails:y,editButton:e=>(0,qt.jsx)(sy,{title:a("rpm_Edit"),children:(0,qt.jsx)(wh,{color:"primary",size:"small",onClick:()=>E(e,"edit"),children:(0,qt.jsx)(fc,{})})}),deleteButton:e=>(0,qt.jsx)(sy,{title:a("rpm_Delete"),children:(0,qt.jsx)(wh,{color:"error",size:"small",onClick:()=>T(e),children:(0,qt.jsx)(xc,{})})}),handlePackageModalToggle:E,setHeadcells:A,settingModal:v,initialHeadcells:w,handleSettingModalToggle:()=>{x(!v)},filterState:j,setFilterState:_})]})},Ixe="program_urn",Fxe="package_name",$xe="account_package_id",Bxe="start_date",zxe="end_date",Hxe="original_start_date",Wxe="is_active",Uxe="created_by",Vxe=e=>{var t,n,r,o,a,s,l,c,d;let{modal:u,onClose:p,onSubmit:h,accountPackageList:m,programs:f,user:g}=e;const{t:v}=Vg(),x="".concat(null!==(t=null!==(n=null===u||void 0===u||null===(r=u.data)||void 0===r?void 0:r.IS_ACTIVE)&&void 0!==n?n:null===u||void 0===u||null===(o=u.data)||void 0===o?void 0:o.is_active)&&void 0!==t?t:"true"),y="edit"===(null===u||void 0===u?void 0:u.type),b=(null===u||void 0===u?void 0:u.data)||{},j=function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return t.find(e=>void 0!==e&&null!==e)},_={[Ixe]:j(b.PROGRAM_URN,b.program_urn,null===(a=b.program)||void 0===a?void 0:a.urn,""),[Fxe]:j(b.PACKAGE_ID,b.package_name,b.PACKAGE_NAME,""),[$xe]:j(b.ACCOUNT_PACKAGE_ID,b.account_package_id,null===(s=b.account_package)||void 0===s?void 0:s.id,null===(l=b.account_package)||void 0===l?void 0:l._id,b.package_id,""),[Bxe]:fs(j(b.START_DATE,b.start_date)),[zxe]:fs(j(b.END_DATE,b.end_date)),[Hxe]:fs(j(b.START_DATE,b.start_date)),[Wxe]:x,[Uxe]:j(b.CREATED_BY,b.created_by,null===g||void 0===g||null===(c=g.user_principal)||void 0===c?void 0:c.username,"")},C=e=>(null===e||void 0===e?void 0:e.display_name)||(null===e||void 0===e?void 0:e.name)||"",w=e=>(null===e||void 0===e?void 0:e.package_name)||(null===e||void 0===e?void 0:e.PACKAGE_NAME)||"",S=We.useMemo(()=>(f||[]).filter(e=>C(e)&&(null===e||void 0===e?void 0:e.urn)),[f]),A=We.useMemo(()=>(m||[]).filter(e=>w(e)),[m]),[k,T]=We.useState(""),[E,M]=We.useState(!1),O=j(b.PROGRAM_URN,b.program_urn,null===(d=b.program)||void 0===d?void 0:d.urn,""),R=We.useMemo(()=>{const e=k.trim().toLowerCase();return e?S.filter(t=>C(t).toLowerCase().includes(e)):S},[S,k]);We.useEffect(()=>{if(null===u||void 0===u||!u.open)return;const e=S.find(e=>(null===e||void 0===e?void 0:e.urn)===O);T((null===e||void 0===e?void 0:e.display_name)||(null===e||void 0===e?void 0:e.name)||""),M(!1)},[null===u||void 0===u?void 0:u.open,S,O]);const P=e=>(null===e||void 0===e?void 0:e.account_package_id)||(null===e||void 0===e?void 0:e.ACCOUNT_PACKAGE_ID)||(null===e||void 0===e?void 0:e.package_id)||(null===e||void 0===e?void 0:e.PACKAGE_ID)||(null===e||void 0===e?void 0:e._id)||"",D=(new Date).toISOString().split("T")[0],N=y&&_[Hxe]||D;return(0,qt.jsx)(cC,{fullWidth:!0,maxWidth:"md",open:null===u||void 0===u?void 0:u.open,onClose:p,children:(0,qt.jsx)(Kz,{initialValues:_,validationSchema:y?RU.editPackage:RU.addPackage,onSubmit:(e,t)=>{var n;let{setErrors:r,resetForm:i}=t;return h(null!==u&&void 0!==u&&null!==(n=u.data)&&void 0!==n&&n._id&&"edit"===(null===u||void 0===u?void 0:u.type)?u.data._id:"",e,{setErrors:r,resetForm:i})},enableReinitialize:!0,children:e=>{let{values:t,handleChange:n,setFieldValue:r}=e;return(0,qt.jsxs)(nH,{children:[(0,qt.jsxs)(fC,{children:["edit"===(null===u||void 0===u?void 0:u.type)?v("rpm_EditPackage"):v("rpm_AddPackage"),(0,qt.jsx)(wh,{onClick:p,sx:{position:"absolute",right:8,top:8},children:(0,qt.jsx)(Yue,{})})]}),(0,qt.jsx)(bC,{dividers:!0,children:(0,qt.jsxs)(Ff,{container:!0,spacing:2,children:[(0,qt.jsxs)(Ff,{item:!0,xs:12,children:[(0,qt.jsxs)(op,{sx:{position:"relative"},children:[(0,qt.jsx)(Q_,{fullWidth:!0,label:v("rpm_ProgramName"),margin:"normal",value:k,disabled:y,onFocus:()=>{y||M(!0)},onBlur:()=>{setTimeout(()=>M(!1),150)},onChange:e=>{const t=e.target.value;T(t),r(Ixe,""),M(!0)},onKeyDown:e=>{if("Enter"===e.key&&R.length>0){e.preventDefault();const t=R[0];T(C(t)),r(Ixe,(null===t||void 0===t?void 0:t.urn)||""),M(!1)}}}),!y&&E&&R.length>0&&(0,qt.jsx)(op,{sx:{position:"absolute",left:0,right:0,top:"100%",zIndex:20,bgcolor:"#fff",border:"1px solid",borderColor:"grey.300",borderRadius:1,maxHeight:240,overflowY:"auto"},children:(0,qt.jsx)(zh,{dense:!0,children:R.map(e=>(0,qt.jsx)(Mg,{onMouseDown:()=>{T(C(e)),r(Ixe,(null===e||void 0===e?void 0:e.urn)||""),M(!1)},children:(0,qt.jsx)(Dg,{primary:Fs(C(e),k)})},null===e||void 0===e?void 0:e.urn))})})]}),(0,qt.jsx)(dH,{name:Ixe,children:e=>(0,qt.jsx)(v_,{error:!0,children:v(e,{field:v("rpm_ProgramName")})})})]}),(0,qt.jsxs)(Ff,{item:!0,xs:12,children:[(0,qt.jsx)(aj,{options:A,fullWidth:!0,disabled:y,inputValue:t[Fxe]||"",getOptionLabel:e=>"string"===typeof e?e:w(e),isOptionEqualToValue:(e,t)=>P(e)===P(t),value:A.find(e=>P(e)===t[$xe]||w(e)===t[Fxe])||null,onChange:(e,t)=>{const n=t||{},i=P(n);r(Fxe,w(n)),r($xe,i)},onInputChange:(e,t,n)=>{"input"===n&&(r(Fxe,t||""),r($xe,""))},renderInput:e=>(0,qt.jsx)(Q_,(0,i.A)((0,i.A)({},e),{},{fullWidth:!0,label:v("rpm_PackageName"),margin:"normal"}))}),(0,qt.jsx)(dH,{name:Fxe,children:e=>(0,qt.jsx)(v_,{error:!0,children:v(e,{field:v("rpm_PackageName")})})})]}),(0,qt.jsxs)(Ff,{item:!0,xs:12,sm:6,children:[(0,qt.jsx)(Q_,{fullWidth:!0,label:v("rpm_StartDate"),type:"date",name:Bxe,value:t[Bxe],onChange:n,margin:"normal",InputLabelProps:{shrink:!0},placeholder:"select start date",inputProps:{min:N},sx:{"& .MuiInputBase-root":{cursor:"pointer"},"& .MuiInputBase-input":{cursor:"pointer"}}}),(0,qt.jsx)(dH,{name:Bxe,children:e=>(0,qt.jsx)(v_,{error:!0,children:v(e,{field:v("rpm_StartDate")})})})]}),(0,qt.jsxs)(Ff,{item:!0,xs:12,sm:6,children:[(0,qt.jsx)(Q_,{fullWidth:!0,label:v("rpm_EndDate"),type:"date",name:zxe,value:t[zxe],onChange:n,margin:"normal",InputLabelProps:{shrink:!0},placeholder:"select end date",inputProps:{min:t[Bxe]||N},sx:{"& .MuiInputBase-root":{cursor:"pointer"},"& .MuiInputBase-input":{cursor:"pointer"}}}),(0,qt.jsx)(dH,{name:zxe,children:e=>(0,qt.jsx)(v_,{error:!0,children:v(e,{field:v("rpm_EndDate")})})})]}),(0,qt.jsxs)(Ff,{item:!0,xs:12,children:[(0,qt.jsxs)(d_,{fullWidth:!0,size:"small",margin:"normal",children:[(0,qt.jsx)(o_,{id:"status-select-label",shrink:!0,children:v("rpm_Status")}),(0,qt.jsxs)(tH,{as:G_,name:Wxe,labelId:"status-select-label",id:"status-select",fullWidth:!0,size:"small",value:t[Wxe]||"",onChange:n,label:v("rpm_Status"),children:[(0,qt.jsx)(mf,{value:"true",children:v("rpm_Active")}),(0,qt.jsx)(mf,{value:"false",children:v("rpm_inactive")})]})]}),(0,qt.jsx)(dH,{name:Wxe,children:e=>(0,qt.jsx)(v_,{error:!0,children:v(e,{field:v("rpm_Status")})})})]}),(0,qt.jsxs)(Ff,{item:!0,xs:12,children:[(0,qt.jsx)(Q_,{fullWidth:!0,label:v("rpm_Created_By"),name:Uxe,value:t[Uxe],onChange:n,margin:"normal",disabled:!0,InputProps:{readOnly:!0}}),(0,qt.jsx)(dH,{name:Uxe,children:e=>(0,qt.jsx)(v_,{error:!0,children:v(e,{field:v("rpm_Created_By")})})})]})]})}),(0,qt.jsxs)(vE,{children:[(0,qt.jsx)(xh,{onClick:p,children:v("rpm_Cancel")}),(0,qt.jsx)(xh,{type:"submit",variant:"contained",color:"primary",children:v("rpm_Submit")})]})]})}})})};function Gxe(e){let{programList:t,programs:n,accountPackageList:r,user:i,order:o,orderBy:a,setOrder:s,setOrderBy:l,dataParameter:c,packageHead:d,checkState:u,onCheck:p,isSelection:h,nodata:m,fetchProgramPackages:f,AddProgramPackages:g,pageDetails:v,packageModal:x,handlePackageModalToggle:y,setHeadcells:b,settingModal:j,initialHeadcells:_,handleSettingModalToggle:C,handleEditPackage:w}=e;const{t:S}=Vg();return(0,qt.jsxs)(op,{sx:{width:"100%"},children:[(0,qt.jsx)(op,{sx:{mb:2.5},children:(0,qt.jsxs)(Ff,{container:!0,spacing:2,alignItems:"center",children:[(0,qt.jsx)(Ff,{item:!0,xs:!0,children:(0,qt.jsx)(Cf,{variant:"h5",gutterBottom:!0,component:"h5",children:S("Program Packages")})}),(0,qt.jsx)(Ff,{item:!0,children:(0,qt.jsxs)(xh,{variant:"contained",color:"primary",disableElevation:!0,onClick:()=>y({},"add"),children:[(0,qt.jsx)(jue.A,{}),(0,qt.jsx)(Cf,{component:"span",className:"hideOnMobile",children:S("Attach Packages")})]})})]})}),(0,qt.jsx)(op,{bgcolor:"#fff",sx:{borderTopLeftRadius:"8px",borderTopRightRadius:"8px"},children:(0,qt.jsxs)(Ff,{container:!0,spacing:1,children:[(0,qt.jsx)(Ff,{item:!0,sx:{ml:"auto"},sm:3,xs:2,textAlign:"end",children:(0,qt.jsx)(sy,{title:S("rpm_TableCellSetting"),children:(0,qt.jsx)(sv,{sx:{boxShadow:"none",width:32,height:32,minHeight:"auto",marginRight:"10px",marginTop:"5px"},size:"small",color:"primary",onClick:C,children:(0,qt.jsx)(YC.A,{fontSize:"small",sx:{width:16,height:16}})})})}),(0,qt.jsxs)(Ff,{item:!0,xs:12,children:[(0,qt.jsx)(op,{children:(0,qt.jsx)(UT,{order:o,orderBy:a,setOrder:s,setOrderBy:l,data:t,headCells:null===d||void 0===d?void 0:d.filter(e=>_.includes(e.id)),dataParameter:c,selected:u,setSelected:p,isSelection:h,noDataImage:m,fetchList:f,pageDetails:v,skeletonVrows:6,className:"theme_scroll",children:null!==t&&void 0!==t&&t.length?t.map(e=>(0,qt.jsxs)(cw,{sx:{"&:last-child td, &:last-child th":{border:0}},children:[_.includes("program_name")&&(0,qt.jsx)(gw,{children:(0,qt.jsx)(op,{display:"flex",alignItems:"center",children:e.program_name})}),_.includes("package_name")&&(0,qt.jsx)(gw,{children:(0,qt.jsx)(op,{display:"flex",alignItems:"center",children:e.package_name})}),_.includes("is_active")&&(0,qt.jsx)(gw,{children:(0,qt.jsx)(Eb,{label:e.is_active?S("Active"):S("Inactive"),size:"small",color:e.is_active?"success":"default"})}),_.includes("start_date")&&(0,qt.jsx)(gw,{children:e.start_date}),_.includes("end_date")&&(0,qt.jsx)(gw,{children:e.end_date}),_.includes("created_by")&&(0,qt.jsx)(gw,{children:e.created_by}),_.includes("updated_by")&&(0,qt.jsx)(gw,{children:e.updated_by}),_.includes("action")&&(0,qt.jsx)(gw,{children:(0,qt.jsx)(op,{display:"flex",gap:1,width:"fit-content",children:(0,qt.jsx)(xh,{variant:"contained",color:"primary",disableElevation:!0,size:"small",onClick:()=>w(e),children:S("rpm_EditPackage")})})})]},e._id)):(0,qt.jsx)(qt.Fragment,{})})}),(0,qt.jsx)(KE,{pageDetails:v,fetchListFunction:f})]})]})}),x.open&&("edit"===x.type||"add"===x.type)&&(0,qt.jsx)(Vxe,{modal:x,accountPackageList:r,programs:n,user:i,onClose:y,onSubmit:g}),(0,qt.jsx)(TE,{open:j,allHeadCells:d,initialHeadcells:_,setHeadcells:b,onClose:C})]})}Gxe.defaultProps={programList:[],programs:[],accountPackageList:[],packageHead:[],pageDetails:{},order:"",orderBy:"",setOrder:()=>{},setOrderBy:()=>{},dataParameter:"",checkState:[],onCheck:()=>{},isSelection:!1,nodata:"",fetchProgramPackages:()=>{},editButton:()=>{},viewButton:()=>{},deleteButton:()=>{},packageModal:{open:!1,data:{},type:""},handlePackageModalToggle:()=>{},initialHeadcells:[],setHeadcells:()=>{},settingModal:!1,handleSettingModalToggle:()=>{},filterState:{},setFilterState:()=>{},allPackageSuggestions:[],fetchAllPackageSuggestions:()=>{},AddProgramPackages:()=>{},handleEditPackage:()=>{}};const qxe=Gxe,Yxe=e=>e?sa()(e).format("DD MMM YYYY"):"-",Zxe=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return(0,i.A)((0,i.A)({},e),{},{start_date:Yxe(null===e||void 0===e?void 0:e.start_date),end_date:Yxe(null===e||void 0===e?void 0:e.end_date)})},Kxe=(e,t)=>async n=>{n(na(!0));try{const n="".concat(ja.PROGRAM_PACKAGE,"/").concat(t);return await $u(n,e)}finally{n(na(!1))}},Xxe=["content"];const Qxe=function(){const e=so(),t=Nt(),n=VC(JA().breakpoints.down("sm")),r=wt(cu),o=wt(ju)||[],a=wt(bu)||"",{t:s}=Vg(),[l,c]=(0,We.useState)("desc"),[d,u]=(0,We.useState)("updated_on"),[p,h]=(0,We.useState)([]),[m,f]=We.useState({open:!1,data:{},type:""}),[g,v]=(0,We.useState)([]),[x,y]=(0,We.useState)([]),[b,j]=We.useState(!1),[_,C]=(0,We.useState)((0,i.A)({},dd)),[w,S]=We.useState({}),A=n?["program_name","package_name","action"]:["program_name","package_name","is_active","start_date","end_date","created_by","updated_by","action"],[k,T]=We.useState(cs($o.getAllProgramsCells())?A:$o.getAllProgramsCells()),E=e=>{T(e),$o.setAllProgramsCells(e)},M=(e,t)=>{m.open||"add"===t?m.open||"add"!==t?f({open:!m.open,data:{},type:""}):f({open:!m.open,data:{},type:"add"}):O(null===e||void 0===e?void 0:e._id,t)},O=async(e,n)=>{try{const r=await t((e=>async t=>{t(na(!0));try{const t="".concat(ja.PROGRAM_PACKAGE,"/").concat(e),n=await Iu(t,{});return null===n||void 0===n?void 0:n.data}finally{t(na(!1))}})(e));f({open:!0,data:r||{},type:n||"edit"})}catch(r){console.log(r)}},R=async()=>{const e=(0,i.A)((0,i.A)({sort_by:d,sort_order:l},_),{},{newFilterState:w});try{const n=await t((e=>async t=>{const{current_page:n,per_page:r,newFilterState:o}=e;t(na(!0));try{let e="".concat(ja.PROGRAM_PACKAGE,"?page=").concat(n||1,"&perPage=").concat(r);null!==o&&void 0!==o&&o.package&&(e+="&q=".concat(o.package));const t=await Iu(e,{}),a=null===t||void 0===t?void 0:t.data;return Array.isArray(a)?a.map(Zxe):Array.isArray(null===a||void 0===a?void 0:a.content)?(0,i.A)((0,i.A)({},a),{},{content:a.content.map(Zxe)}):a}catch(a){return a}finally{t(na(!1))}})(e));if(Array.isArray(n))v(n);else{const e=n||{},{content:t}=e,r=Ko(e,Xxe);v(t||[]),C(e=>(0,i.A)((0,i.A)({},e),{},{last_page:r.last_page,current_page:r.current_page,from:r.from,to:r.to,total:r.total}))}}catch(n){console.log(n)}};We.useEffect(()=>{t(NC({activeMenuItem:"programPackages",heading:{}}))},[]),We.useEffect(()=>{E(A)},[n]),We.useEffect(()=>{R(),(async()=>{const e={current_page:1,per_page:1e3,newFilterState:{}};try{const n=await t(Dxe(e));Array.isArray(n)?y(n):y((null===n||void 0===n?void 0:n.content)||[])}catch(n){console.log(n)}})()},[r]);const P=[{id:"program_name",label:s("rpm_ProgramName"),isSort:!1,sortProperty:"program_name"},{id:"package_name",label:s("rpm_PackageName"),isSort:!1,sortProperty:"package_name"},{id:"is_active",label:s("rpm_Status"),isSort:!1,sortProperty:"is_active"},{id:"start_date",label:s("rpm_StartDate"),isSort:!1,sortProperty:"start_date"},{id:"end_date",label:s("rpm_EndDate"),isSort:!1,sortProperty:"end_date"},{id:"created_by",label:s("rpm_Created_By"),isSort:!1,sortProperty:"created_by"},{id:"updated_by",label:s("rpm_Modified_By"),isSort:!1,sortProperty:"updated_by"},{id:"action",label:s("rpm_Actions"),isSort:!1,sortProperty:"action"}];return(0,qt.jsx)(qt.Fragment,{children:(0,qt.jsx)(qxe,{programList:g,order:l,orderBy:d,setOrder:c,setOrderBy:u,dataParameter:"code",packageHead:P,checkState:p,onCheck:e=>{if(Array.isArray(e))return h(e.map(e=>e));const t=e.target.name;p.includes(t)?h(p.filter(e=>e!==t)):h(e=>[...e,t])},nodata:GC,fetchProgramPackages:R,AddProgramPackages:async(e,n,r)=>{let{setErrors:i,resetForm:o}=r;const a=e=>"".concat(e||"").trim().toLowerCase(),s=a(null===n||void 0===n?void 0:n.package_name),l=x.find(e=>a(null===e||void 0===e?void 0:e.package_name)===s||a(null===e||void 0===e?void 0:e.PACKAGE_NAME)===s),c=(null===n||void 0===n?void 0:n.account_package_id)||(null===l||void 0===l?void 0:l.account_package_id)||(null===l||void 0===l?void 0:l.ACCOUNT_PACKAGE_ID)||(null===l||void 0===l?void 0:l.package_id)||(null===l||void 0===l?void 0:l._id)||"",d=Boolean(e),u={program_urn:(null===n||void 0===n?void 0:n.program_urn)||"",start_date:(null===n||void 0===n?void 0:n.start_date)||"",end_date:(null===n||void 0===n?void 0:n.end_date)||"",is_active:!0===(null===n||void 0===n?void 0:n.is_active)||"true"===(null===n||void 0===n?void 0:n.is_active),created_by:(null===n||void 0===n?void 0:n.created_by)||""};if(d&&!c||(u.account_package_id=c),u.program_urn&&(d||u.account_package_id))try{e?await t(Kxe(u,e)):await t((e=>async t=>{t(na(!0));try{const t="".concat(ja.PROGRAM_PACKAGE);return await Fu(t,e)}finally{t(na(!1))}})(u)),o(),t(Zo({subTitle:e?"message:rpm_ProgramPackageEditedSuccess":"message:rpm_PackageAdded",severity:ud.SUCCESS})),R(),f({open:!1,data:{},type:""})}catch(p){let e=us(p,"response.data.errorCode","");e?(e=e.split(":")[1],t(Zo({subTitle:Vd(e,"error:rpm_PackageAddedFailed"),severity:ud.ERROR}))):t(Zo({subTitle:p.message,severity:ud.ERROR}))}else i({package_name:"error:rpm_required"})},pageDetails:_,editButton:e=>(0,qt.jsx)(sy,{title:s("rpm_Edit"),children:(0,qt.jsx)(wh,{size:"small",color:"primary",onClick:()=>M(e,"edit"),children:(0,qt.jsx)(fc,{})})}),packageModal:m,handlePackageModalToggle:M,setHeadcells:E,settingModal:b,initialHeadcells:k,handleSettingModalToggle:()=>{j(!b)},filterState:w,setFilterState:S,programs:o,accountPackageList:x,user:a,handleEditPackage:t=>{e("".concat(ld.LICENSE_MANAGER.EDIT_PACKAGE,"/").concat(t._id),{state:{packageData:t}})}})})};var Jxe=n(22505),eye=n(24914),tye=n(10697);function nye(e){return(0,sr.Ay)("MuiSwitch",e)}const rye=(0,ar.A)("MuiSwitch",["root","edgeStart","edgeEnd","switchBase","colorPrimary","colorSecondary","sizeSmall","sizeMedium","checked","disabled","input","thumb","track"]),iye=["className","color","edge","size","sx"],oye=(0,Vn.Ay)("span",{name:"MuiSwitch",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.edge&&t["edge".concat((0,pp.A)(n.edge))],t["size".concat((0,pp.A)(n.size))]]}})({display:"inline-flex",width:58,height:38,overflow:"hidden",padding:12,boxSizing:"border-box",position:"relative",flexShrink:0,zIndex:0,verticalAlign:"middle","@media print":{colorAdjust:"exact"},variants:[{props:{edge:"start"},style:{marginLeft:-8}},{props:{edge:"end"},style:{marginRight:-8}},{props:{size:"small"},style:{width:40,height:24,padding:7,["& .".concat(rye.thumb)]:{width:16,height:16},["& .".concat(rye.switchBase)]:{padding:4,["&.".concat(rye.checked)]:{transform:"translateX(16px)"}}}}]}),aye=(0,Vn.Ay)(_w,{name:"MuiSwitch",slot:"SwitchBase",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.switchBase,{["& .".concat(rye.input)]:t.input},"default"!==n.color&&t["color".concat((0,pp.A)(n.color))]]}})(e=>{let{theme:t}=e;return{position:"absolute",top:0,left:0,zIndex:1,color:t.vars?t.vars.palette.Switch.defaultColor:"".concat("light"===t.palette.mode?t.palette.common.white:t.palette.grey[300]),transition:t.transitions.create(["left","transform"],{duration:t.transitions.duration.shortest}),["&.".concat(rye.checked)]:{transform:"translateX(20px)"},["&.".concat(rye.disabled)]:{color:t.vars?t.vars.palette.Switch.defaultDisabledColor:"".concat("light"===t.palette.mode?t.palette.grey[100]:t.palette.grey[600])},["&.".concat(rye.checked," + .").concat(rye.track)]:{opacity:.5},["&.".concat(rye.disabled," + .").concat(rye.track)]:{opacity:t.vars?t.vars.opacity.switchTrackDisabled:"".concat("light"===t.palette.mode?.12:.2)},["& .".concat(rye.input)]:{left:"-100%",width:"300%"}}},e=>{let{theme:t}=e;return{"&:hover":{backgroundColor:t.vars?"rgba(".concat(t.vars.palette.action.activeChannel," / ").concat(t.vars.palette.action.hoverOpacity,")"):(0,hp.X4)(t.palette.action.active,t.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}},variants:[...Object.entries(t.palette).filter(e=>{let[,t]=e;return t.main&&t.light}).map(e=>{let[n]=e;return{props:{color:n},style:{["&.".concat(rye.checked)]:{color:(t.vars||t).palette[n].main,"&:hover":{backgroundColor:t.vars?"rgba(".concat(t.vars.palette[n].mainChannel," / ").concat(t.vars.palette.action.hoverOpacity,")"):(0,hp.X4)(t.palette[n].main,t.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}},["&.".concat(rye.disabled)]:{color:t.vars?t.vars.palette.Switch["".concat(n,"DisabledColor")]:"".concat("light"===t.palette.mode?(0,hp.a)(t.palette[n].main,.62):(0,hp.e$)(t.palette[n].main,.55))}},["&.".concat(rye.checked," + .").concat(rye.track)]:{backgroundColor:(t.vars||t).palette[n].main}}}})]}}),sye=(0,Vn.Ay)("span",{name:"MuiSwitch",slot:"Track",overridesResolver:(e,t)=>t.track})(e=>{let{theme:t}=e;return{height:"100%",width:"100%",borderRadius:7,zIndex:-1,transition:t.transitions.create(["opacity","background-color"],{duration:t.transitions.duration.shortest}),backgroundColor:t.vars?t.vars.palette.common.onBackground:"".concat("light"===t.palette.mode?t.palette.common.black:t.palette.common.white),opacity:t.vars?t.vars.opacity.switchTrack:"".concat("light"===t.palette.mode?.38:.3)}}),lye=(0,Vn.Ay)("span",{name:"MuiSwitch",slot:"Thumb",overridesResolver:(e,t)=>t.thumb})(e=>{let{theme:t}=e;return{boxShadow:(t.vars||t).shadows[1],backgroundColor:"currentColor",width:20,height:20,borderRadius:"50%"}}),cye=We.forwardRef(function(e,t){const n=(0,$t.b)({props:e,name:"MuiSwitch"}),{className:r,color:i="primary",edge:o=!1,size:a="medium",sx:s}=n,l=(0,nn.A)(n,iye),c=(0,Ft.A)({},n,{color:i,edge:o,size:a}),d=(e=>{const{classes:t,edge:n,size:r,color:i,checked:o,disabled:a}=e,s={root:["root",n&&"edge".concat((0,pp.A)(n)),"size".concat((0,pp.A)(r))],switchBase:["switchBase","color".concat((0,pp.A)(i)),o&&"checked",a&&"disabled"],thumb:["thumb"],track:["track"],input:["input"]},l=(0,ir.A)(s,nye,t);return(0,Ft.A)({},t,l)})(c),u=(0,qt.jsx)(lye,{className:d.thumb,ownerState:c});return(0,qt.jsxs)(oye,{className:(0,nr.A)(d.root,r),sx:s,ownerState:c,children:[(0,qt.jsx)(aye,(0,Ft.A)({type:"checkbox",icon:u,checkedIcon:u,ref:t,ownerState:c},l,{classes:(0,Ft.A)({},d,{root:d.switchBase})})),(0,qt.jsx)(sye,{className:d.track,ownerState:c})]})}),dye=cye,uye=[{value:"self_paid",label:"User Paid"},{value:"program_paid",label:"Organisation Paid"}],pye=(e,t)=>e.map(e=>{const n=null===t||void 0===t?void 0:t.find(t=>t.feature_key===e.feature_key),r={feature_key:e.feature_key,enabled:!!n};return e.columns.forEach(e=>{var t,i,o,a;"boolean_checkbox"===e.type?r[e.column_key]=null!==(t=null!==(i=null===n||void 0===n?void 0:n[e.column_key])&&void 0!==i?i:null===(o=e.options)||void 0===o?void 0:o.false)&&void 0!==t?t:"limited":r[e.column_key]=null!==(a=null===n||void 0===n?void 0:n[e.column_key])&&void 0!==a?a:""}),r}),hye=(e,t)=>e.map(e=>{const n=null===t||void 0===t?void 0:t.find(t=>t.feature_key===e.feature_key),r={feature_key:e.feature_key,enabled:!!n};return e.columns.forEach(e=>{var t,i,o,a;"boolean_checkbox"===e.type?r[e.column_key]=null!==(t=null!==(i=null===n||void 0===n?void 0:n[e.column_key])&&void 0!==i?i:null===(o=e.options)||void 0===o?void 0:o.false)&&void 0!==t?t:"limited":r[e.column_key]=null!==(a=null===n||void 0===n?void 0:n[e.column_key])&&void 0!==a?a:""}),r}),mye=xU({package_name:KW().required("Package name is required")});function fye(e){var t,n;let{feature:r,index:i,licenseFeature:o,onChange:a}=e;const s=null!==(t=null===o||void 0===o?void 0:o.columns)&&void 0!==t?t:[],l=s.find(e=>"boolean_checkbox"===e.type),c=s.filter(e=>"string"===e.type),d=!!l&&r[l.column_key]===(null===(n=l.options)||void 0===n?void 0:n.true);return(0,qt.jsxs)(Ff,{container:!0,alignItems:"center",spacing:1,sx:{py:1,borderBottom:"1px solid",borderColor:"grey.100"},children:[(0,qt.jsx)(Ff,{item:!0,xs:12,sm:4,px:12,children:(0,qt.jsx)(wE,{sx:{ml:1},control:(0,qt.jsx)(dye,{checked:r.enabled,onChange:e=>a(i,"enabled",e.target.checked),color:"primary",size:"small"}),label:(0,qt.jsx)(Cf,{variant:"body2",fontWeight:r.enabled?600:400,children:null===o||void 0===o?void 0:o.feature_label})})}),l&&(0,qt.jsx)(Ff,{item:!0,xs:6,sm:3,children:(0,qt.jsx)(wE,{control:(0,qt.jsx)(Dw,{checked:d,onChange:e=>{var t,n;return a(i,l.column_key,e.target.checked?null===(t=l.options)||void 0===t?void 0:t.true:null===(n=l.options)||void 0===n?void 0:n.false)},disabled:!r.enabled,size:"small"}),label:(0,qt.jsx)(Cf,{variant:"body2",children:l.column_label})})}),c.map(e=>{var t;return(0,qt.jsx)(Ff,{item:!0,xs:6,sm:4,children:(0,qt.jsx)(Q_,{size:"small",type:"number",label:e.column_label,value:d?"":null!==(t=r[e.column_key])&&void 0!==t?t:"",disabled:!r.enabled||d,onChange:t=>a(i,e.column_key,t.target.value),sx:{width:"100%"}})},e.column_key)})]})}function gye(e){var t,n;let{feature:r,index:i,planIndex:o,licenseFeature:a,onChange:s}=e;const l=null!==(t=null===a||void 0===a?void 0:a.columns)&&void 0!==t?t:[],c=l.find(e=>"boolean_checkbox"===e.type),d=l.filter(e=>"string"===e.type),u=!!c&&r[c.column_key]===(null===(n=c.options)||void 0===n?void 0:n.true);return(0,qt.jsxs)(Ff,{container:!0,alignItems:"center",spacing:1,sx:{py:1,borderBottom:"1px solid",borderColor:"grey.100"},children:[(0,qt.jsx)(Ff,{item:!0,xs:12,sm:3,pl:12,children:(0,qt.jsx)(wE,{sx:{ml:1},control:(0,qt.jsx)(dye,{checked:r.enabled,onChange:e=>s(o,i,"enabled",e.target.checked),color:"primary",size:"small"}),label:(0,qt.jsx)(Cf,{variant:"body2",fontWeight:r.enabled?600:400,children:null===a||void 0===a?void 0:a.feature_label})})}),c&&(0,qt.jsx)(Ff,{item:!0,xs:6,sm:2,children:(0,qt.jsx)(wE,{control:(0,qt.jsx)(Dw,{checked:u,onChange:e=>{var t,n;return s(o,i,c.column_key,e.target.checked?null===(t=c.options)||void 0===t?void 0:t.true:null===(n=c.options)||void 0===n?void 0:n.false)},disabled:!r.enabled,size:"small"}),label:(0,qt.jsx)(Cf,{variant:"body2",children:c.column_label})})}),d.map(e=>{var t;return(0,qt.jsx)(Ff,{item:!0,xs:6,sm:3,children:(0,qt.jsx)(Q_,{size:"small",type:"number",label:e.column_label,value:u?"":null!==(t=r[e.column_key])&&void 0!==t?t:"",disabled:!r.enabled||u,onChange:t=>s(o,i,e.column_key,t.target.value),sx:{width:"100%"}})},e.column_key)})]})}function vye(e){var t,n,r,o,a,s,l;let{isEditMode:c,packageData:d,loading:u,onSubmit:p,onCancel:h,licenseFeatures:m,licenseFeaturesFetching:f,isProgramPackageEdit:g}=e;const{t:v}=Vg(),x=null!==(t=null===m||void 0===m?void 0:m.program_license_features)&&void 0!==t?t:[],y=null!==(n=null===m||void 0===m?void 0:m.user_license_features)&&void 0!==n?n:[],b=(e=>({plan_name:"",plan_inr_price:"",plan_original_price:"",plan_duration_days:30,short_description:"",plan_description:"",provider_commission:"",user_features:e.map(e=>{const t={feature_key:e.feature_key,enabled:!1};return e.columns.forEach(e=>{var n,r;t[e.column_key]="boolean_checkbox"===e.type?null!==(n=null===(r=e.options)||void 0===r?void 0:r.false)&&void 0!==n?n:"limited":""}),t})}))(y),j=(0,i.A)((0,i.A)({},d||{}),{},{package_name:(null===d||void 0===d?void 0:d.package_name)||"",description:(null===d||void 0===d?void 0:d.description)||"",base_price:null!==(r=null===d||void 0===d?void 0:d.base_price)&&void 0!==r?r:"",original_price:null!==(o=null===d||void 0===d?void 0:d.original_price)&&void 0!==o?o:"",user_limit:null!==(a=null===d||void 0===d?void 0:d.user_limit)&&void 0!==a?a:"",user_payment_scheme:(null===d||void 0===d?void 0:d.user_payment_scheme)||"self_paid",is_active:null===(s=null===d||void 0===d?void 0:d.is_active)||void 0===s||s,program_name:(null===d||void 0===d?void 0:d.program_name)||"",start_date:fs(null===d||void 0===d?void 0:d.start_date),end_date:fs(null===d||void 0===d?void 0:d.end_date),program_features:pye(x,null===d||void 0===d?void 0:d.program_features),user_self_pay_plans:null!==d&&void 0!==d&&null!==(l=d.user_self_pay_plans)&&void 0!==l&&l.length?d.user_self_pay_plans.map(e=>{var t;return(0,i.A)((0,i.A)({},e),{},{provider_commission:null!==(t=e.provider_commission)&&void 0!==t?t:"",user_features:hye(y,e.user_features)})}):[(0,i.A)({},b)]});return f?(0,qt.jsx)(op,{display:"flex",justifyContent:"center",alignItems:"center",py:8,children:(0,qt.jsx)(MM,{size:32})}):(0,qt.jsx)(Kz,{initialValues:j,validationSchema:mye,enableReinitialize:!0,onSubmit:(e,t)=>{const n=e.program_features.filter(e=>e.enabled).map(e=>{const t=x.find(t=>t.feature_key===e.feature_key),n={feature_key:e.feature_key};return null===t||void 0===t||t.columns.forEach(t=>{n[t.column_key]="string"===t.type?Number(e[t.column_key]):e[t.column_key]}),n}),r=e.user_self_pay_plans.map(e=>{var t;const n=null===d||void 0===d||null===(t=d.user_self_pay_plans)||void 0===t?void 0:t.find(t=>t.user_plan_id===e.user_plan_id);return(0,i.A)((0,i.A)({},n),{},{plan_name:e.plan_name,plan_inr_price:e.plan_inr_price,plan_original_price:e.plan_original_price,plan_duration_days:e.plan_duration_days,short_description:e.short_description,plan_description:e.plan_description,provider_commission:Number(e.provider_commission),user_features:e.user_features.filter(e=>e.enabled).map(e=>{const t=y.find(t=>t.feature_key===e.feature_key),n={feature_key:e.feature_key};return null===t||void 0===t||t.columns.forEach(t=>{n[t.column_key]="string"===t.type?Number(e[t.column_key]):e[t.column_key]}),n})})}),o=(0,i.A)({package_name:e.package_name,description:e.description,base_price:"self_paid"===(null===e||void 0===e?void 0:e.user_payment_scheme)?0:e.base_price,original_price:"self_paid"===(null===e||void 0===e?void 0:e.user_payment_scheme)?0:e.original_price,user_limit:"self_paid"===(null===e||void 0===e?void 0:e.user_payment_scheme)?0:e.user_limit,user_payment_scheme:e.user_payment_scheme,is_active:e.is_active,program_features:n,user_self_pay_plans:r},g&&{start_date:e.start_date,end_date:e.end_date});p(o,t)},children:e=>{var t;let{values:n,errors:r,touched:o,handleChange:a,handleBlur:s,setFieldValue:l,isSubmitting:d}=e;return(0,qt.jsx)(nH,{children:(0,qt.jsxs)(Ff,{container:!0,spacing:3,children:[(0,qt.jsxs)(Ff,{item:!0,xs:12,children:[(0,qt.jsx)(Cf,{variant:"subtitle1",fontWeight:600,color:"text.secondary",gutterBottom:!0,children:v("rpm_BasicInformation")}),(0,qt.jsx)(eg,{sx:{mb:2}})]}),(0,qt.jsx)(Ff,{item:!0,xs:12,sm:5,children:(0,qt.jsx)(Q_,{fullWidth:!0,label:v("rpm_PackageName"),name:"package_name",value:n.package_name,onChange:a,onBlur:s,error:o.package_name&&Boolean(r.package_name),helperText:o.package_name&&r.package_name})}),(0,qt.jsx)(Ff,{item:!0,xs:12,sm:4,children:(0,qt.jsxs)(d_,{fullWidth:!0,error:o.user_payment_scheme&&Boolean(r.user_payment_scheme),children:[(0,qt.jsx)(o_,{children:v("rpm_UserPaymentType")}),(0,qt.jsx)(G_,{name:"user_payment_scheme",value:n.user_payment_scheme,label:v("rpm_UserPaymentType"),onChange:a,children:uye.map(e=>(0,qt.jsx)(mf,{value:e.value,children:e.label},e.value))}),o.user_payment_scheme&&r.user_payment_scheme&&(0,qt.jsx)(v_,{children:r.user_payment_scheme})]})}),(0,qt.jsx)(Ff,{item:!0,xs:12,sm:3,display:"flex",alignItems:"center",children:(0,qt.jsx)(wE,{control:(0,qt.jsx)(dye,{checked:n.is_active,onChange:e=>l("is_active",e.target.checked),color:"primary"}),label:v("rpm_PackageStatus")})}),"program_paid"===n.user_payment_scheme&&(0,qt.jsxs)(qt.Fragment,{children:[(0,qt.jsx)(Ff,{item:!0,xs:12,sm:4,children:(0,qt.jsx)(Q_,{fullWidth:!0,label:v("rpm_UserLimit"),name:"user_limit",type:"number",value:n.user_limit,onChange:a,onBlur:s,error:o.user_limit&&Boolean(r.user_limit),helperText:o.user_limit&&r.user_limit})}),(0,qt.jsx)(Ff,{item:!0,xs:12,sm:4,children:(0,qt.jsx)(Q_,{fullWidth:!0,label:v("rpm_StandardPrice"),name:"original_price",type:"number",value:n.original_price,onChange:a,onBlur:s,InputProps:{startAdornment:(0,qt.jsx)(tw,{position:"start",children:"\u20b9"})}})}),(0,qt.jsx)(Ff,{item:!0,xs:12,sm:4,children:(0,qt.jsx)(Q_,{fullWidth:!0,label:v("rpm_DiscountedPrice"),name:"base_price",type:"number",value:n.base_price,onChange:a,onBlur:s,InputProps:{startAdornment:(0,qt.jsx)(tw,{position:"start",children:"\u20b9"})}})})]}),(0,qt.jsx)(Ff,{item:!0,xs:12,children:(0,qt.jsx)(Q_,{fullWidth:!0,label:v("rpm_PackageDescription"),name:"description",multiline:!0,rows:2,value:n.description,onChange:a,onBlur:s})}),g&&(0,qt.jsxs)(qt.Fragment,{children:[(0,qt.jsx)(Ff,{item:!0,xs:12,sm:6,children:(0,qt.jsx)(Q_,{fullWidth:!0,label:v("rpm_ProgramName"),value:n.program_name,disabled:!0})}),(0,qt.jsx)(Ff,{item:!0,xs:12,sm:3,children:(0,qt.jsx)(Q_,{name:"start_date",fullWidth:!0,label:v("rpm_StartDate"),type:"date",value:n.start_date,onChange:a,InputLabelProps:{shrink:!0}})}),(0,qt.jsx)(Ff,{item:!0,xs:12,sm:3,children:(0,qt.jsx)(Q_,{name:"end_date",fullWidth:!0,label:v("rpm_EndDate"),type:"date",value:n.end_date,onChange:a,InputLabelProps:{shrink:!0}})})]}),(0,qt.jsxs)(Ff,{item:!0,xs:12,children:[(0,qt.jsx)(op,{display:"flex",alignItems:"center",justifyContent:"space-between",mb:1,children:(0,qt.jsx)(Cf,{variant:"subtitle1",fontWeight:600,color:"text.secondary",children:v("rpm_providerAccessFeatures")})}),(0,qt.jsx)(eg,{sx:{mb:1}}),x.length>0&&(0,qt.jsxs)(qt.Fragment,{children:[(0,qt.jsxs)(Ff,{container:!0,spacing:1,sx:{mb:.5,px:1},children:[(0,qt.jsx)(Ff,{item:!0,xs:12,sm:4,children:(0,qt.jsx)(Cf,{variant:"caption",color:"text.secondary",fontWeight:600,children:v("rpm_Feature")})}),null===(t=x[0])||void 0===t?void 0:t.columns.map(e=>(0,qt.jsx)(Ff,{item:!0,xs:6,sm:"boolean_checkbox"===e.type?3:4,children:(0,qt.jsx)(Cf,{variant:"caption",color:"text.secondary",fontWeight:600,children:e.column_label})},e.column_key))]}),(0,qt.jsx)(op,{sx:{border:"1px solid",borderColor:"grey.200",borderRadius:1,px:1},children:n.program_features.map((e,t)=>{const r=x.find(t=>t.feature_key===e.feature_key);return(0,qt.jsx)(fye,{feature:e,index:t,licenseFeature:r,onChange:(e,t,r)=>((e,t,n,r,o)=>{e("program_features",t.program_features.map((e,t)=>t===n?(0,i.A)((0,i.A)({},e),{},{[r]:o}):e))})(l,n,e,t,r)},e.feature_key)})})]})]}),(0,qt.jsxs)(Ff,{item:!0,xs:12,children:[(0,qt.jsx)(op,{display:"flex",alignItems:"center",justifyContent:"space-between",mb:1,children:(0,qt.jsx)(Cf,{variant:"subtitle1",fontWeight:600,color:"text.secondary",children:"self_paid"===n.user_payment_scheme?v("rpm_UserSubscriptionPlans"):v("rpm_UserSubscriptionPlan")})}),(0,qt.jsx)(eg,{sx:{mb:2}}),(0,qt.jsx)(lH,{name:"user_self_pay_plans",children:e=>{let{push:t,remove:a}=e;return(0,qt.jsxs)(op,{children:[n.user_self_pay_plans.map((e,s)=>{var c,d,u,p,h,m,f,g,x,b,j,_,C,w,S,A,k,T,E,M,O,R,P,D,N,L,I,F;return(0,qt.jsxs)(CV,{defaultExpanded:s===n.user_self_pay_plans.length-1,variant:"outlined",sx:{mb:2,"&:before":{display:"none"},borderRadius:"8px !important"},children:[(0,qt.jsx)(LV,{expandIcon:(0,qt.jsx)(pv.A,{}),children:(0,qt.jsxs)(op,{display:"flex",alignItems:"center",justifyContent:"space-between",width:"100%",pr:1,children:[(0,qt.jsxs)(op,{display:"flex",alignItems:"center",gap:1,children:[(0,qt.jsx)(Cf,{fontWeight:600,children:e.plan_name||"Plan ".concat("self_paid"===n.user_payment_scheme?s+1:"")}),e.plan_inr_price&&(0,qt.jsx)(Eb,{label:"\u20b9".concat(e.plan_inr_price),size:"small",color:"primary",variant:"outlined"})]}),(0,qt.jsxs)(op,{display:"flex",gap:.5,onClick:e=>e.stopPropagation(),children:["self_paid"===n.user_payment_scheme&&(0,qt.jsx)(wh,{size:"small",title:"Clone plan",onClick:()=>{const n=(0,i.A)({},e);null===n||void 0===n||delete n.user_plan_id,t((0,i.A)((0,i.A)({},n),{},{plan_name:"".concat(null===e||void 0===e?void 0:e.plan_name," (Copy)")}))},children:(0,qt.jsx)(eye.A,{fontSize:"small"})}),n.user_self_pay_plans.length>1&&(0,qt.jsx)(wh,{size:"small",color:"error",onClick:()=>a(s),children:(0,qt.jsx)(tye.A,{fontSize:"small"})})]})]})}),(0,qt.jsx)(TV,{children:(0,qt.jsxs)(Ff,{container:!0,spacing:2,children:[(0,qt.jsx)(Ff,{item:!0,xs:12,sm:4,children:(0,qt.jsx)(Q_,{fullWidth:!0,size:"small",label:v("rpm_PlanName"),value:e.plan_name,onChange:e=>l("user_self_pay_plans[".concat(s,"].plan_name"),e.target.value),error:(null===(c=o.user_self_pay_plans)||void 0===c||null===(d=c[s])||void 0===d?void 0:d.plan_name)&&Boolean(null===(u=r.user_self_pay_plans)||void 0===u||null===(p=u[s])||void 0===p?void 0:p.plan_name),helperText:(null===(h=o.user_self_pay_plans)||void 0===h||null===(m=h[s])||void 0===m?void 0:m.plan_name)&&(null===(f=r.user_self_pay_plans)||void 0===f||null===(g=f[s])||void 0===g?void 0:g.plan_name)})}),(0,qt.jsx)(Ff,{item:!0,xs:12,sm:4,children:(0,qt.jsx)(Q_,{fullWidth:!0,size:"small",label:v("rpm_StandardPrice"),type:"number",value:e.plan_original_price,onChange:e=>l("user_self_pay_plans[".concat(s,"].plan_original_price"),e.target.value),InputProps:{startAdornment:(0,qt.jsx)(tw,{position:"start",children:"\u20b9"})}})}),(0,qt.jsx)(Ff,{item:!0,xs:12,sm:4,children:(0,qt.jsx)(Q_,{fullWidth:!0,size:"small",label:v("rpm_DiscountedPrice"),type:"number",value:e.plan_inr_price,onChange:e=>l("user_self_pay_plans[".concat(s,"].plan_inr_price"),e.target.value),InputProps:{startAdornment:(0,qt.jsx)(tw,{position:"start",children:"\u20b9"})},error:(null===(x=o.user_self_pay_plans)||void 0===x||null===(b=x[s])||void 0===b?void 0:b.plan_inr_price)&&Boolean(null===(j=r.user_self_pay_plans)||void 0===j||null===(_=j[s])||void 0===_?void 0:_.plan_inr_price),helperText:(null===(C=o.user_self_pay_plans)||void 0===C||null===(w=C[s])||void 0===w?void 0:w.plan_inr_price)&&(null===(S=r.user_self_pay_plans)||void 0===S||null===(A=S[s])||void 0===A?void 0:A.plan_inr_price)})}),(0,qt.jsx)(Ff,{item:!0,xs:12,sm:4,children:(0,qt.jsx)(Q_,{fullWidth:!0,size:"small",label:v("rpm_DurationDays"),type:"number",value:e.plan_duration_days,onChange:e=>l("user_self_pay_plans[".concat(s,"].plan_duration_days"),e.target.value),error:(null===(k=o.user_self_pay_plans)||void 0===k||null===(T=k[s])||void 0===T?void 0:T.plan_duration_days)&&Boolean(null===(E=r.user_self_pay_plans)||void 0===E||null===(M=E[s])||void 0===M?void 0:M.plan_duration_days),helperText:(null===(O=o.user_self_pay_plans)||void 0===O||null===(R=O[s])||void 0===R?void 0:R.plan_duration_days)&&(null===(P=r.user_self_pay_plans)||void 0===P||null===(D=P[s])||void 0===D?void 0:D.plan_duration_days)})}),(0,qt.jsx)(Ff,{item:!0,xs:12,sm:4,children:(0,qt.jsx)(Q_,{fullWidth:!0,size:"small",label:v("rpm_ProviderCommission"),type:"number",value:e.provider_commission,onChange:e=>l("user_self_pay_plans[".concat(s,"].provider_commission"),e.target.value),onBlur:()=>{},helperText:(null===(N=o.user_self_pay_plans)||void 0===N||null===(L=N[s])||void 0===L?void 0:L.provider_commission)&&(null===(I=r.user_self_pay_plans)||void 0===I||null===(F=I[s])||void 0===F?void 0:F.provider_commission),InputProps:{startAdornment:(0,qt.jsx)(tw,{position:"start",children:"\u20b9"})}})}),(0,qt.jsx)(Ff,{item:!0,xs:12,sm:8,children:(0,qt.jsx)(Q_,{fullWidth:!0,size:"small",label:v("rpm_UserShortDescription"),value:e.short_description,onChange:e=>l("user_self_pay_plans[".concat(s,"].short_description"),e.target.value)})}),(0,qt.jsx)(Ff,{item:!0,xs:12,children:(0,qt.jsx)(Q_,{fullWidth:!0,size:"small",label:v("rpm_LongDescription"),multiline:!0,rows:2,value:e.plan_description,onChange:e=>l("user_self_pay_plans[".concat(s,"].plan_description"),e.target.value)})}),(0,qt.jsxs)(Ff,{item:!0,xs:12,children:[(0,qt.jsx)(Cf,{variant:"body2",fontWeight:600,color:"text.secondary",mb:1,children:v("rpm_PlanFeatures")}),(()=>{const t=e.user_features.map((e,t)=>({feature:e,originalIndex:t})).filter(e=>{let{feature:t}=e;return y.some(e=>e.feature_key===t.feature_key)});if(0===t.length)return(0,qt.jsx)(op,{sx:{p:2,textAlign:"center"},children:(0,qt.jsx)(Cf,{variant:"body2",color:"text.secondary",children:v("No user features available.")})});const r=y.find(e=>{var n;return e.feature_key===(null===(n=t[0])||void 0===n?void 0:n.feature.feature_key)});return(0,qt.jsxs)(qt.Fragment,{children:[(null===r||void 0===r?void 0:r.columns.length)>0&&(0,qt.jsxs)(Ff,{container:!0,spacing:1,sx:{mb:.5,px:1},children:[(0,qt.jsx)(Ff,{item:!0,xs:12,sm:3,children:(0,qt.jsx)(Cf,{variant:"caption",color:"text.secondary",fontWeight:600,children:v("rpm_Feature")})}),r.columns.map(e=>(0,qt.jsx)(Ff,{item:!0,xs:6,sm:"boolean_checkbox"===e.type?2:3,children:(0,qt.jsx)(Cf,{variant:"caption",color:"text.secondary",fontWeight:600,children:e.column_label})},e.column_key))]}),(0,qt.jsx)(op,{sx:{border:"1px solid",borderColor:"grey.200",borderRadius:1,px:1},children:t.map(e=>{let{feature:t,originalIndex:r}=e;const o=y.find(e=>e.feature_key===t.feature_key);return(0,qt.jsx)(gye,{feature:t,index:r,planIndex:s,licenseFeature:o,onChange:(e,t,r,o)=>((e,t,n,r,o,a)=>{const s=t.user_self_pay_plans.map((e,t)=>t!==n?e:(0,i.A)((0,i.A)({},e),{},{user_features:e.user_features.map((e,t)=>t===r?(0,i.A)((0,i.A)({},e),{},{[o]:a}):e)}));e("user_self_pay_plans",s)})(l,n,e,t,r,o)},t.feature_key)})})]})})()]})]})})]},s)}),"self_paid"===n.user_payment_scheme&&(0,qt.jsx)(xh,{variant:"outlined",startIcon:(0,qt.jsx)(Jxe.A,{}),onClick:()=>t((0,i.A)({},b)),sx:{mt:1},children:v("rpm_AddPlan")})]})}})]}),(0,qt.jsxs)(Ff,{item:!0,xs:12,children:[(0,qt.jsx)(eg,{sx:{mb:2}}),(0,qt.jsxs)(op,{display:"flex",gap:2,justifyContent:"flex-end",children:[(0,qt.jsx)(xh,{variant:"outlined",color:"primary",onClick:h,disabled:d,children:v("rpm_Cancel")}),(0,qt.jsx)(xh,{variant:"contained",color:"primary",disableElevation:!0,type:"submit",disabled:d||u,startIcon:d?(0,qt.jsx)(MM,{size:16}):null,children:v(d?"rpm_Saving":c?"rpm_UpdatePackage":"rpm_CreatePackage")})]})]})]})})}})}vye.defaultProps={isEditMode:!1,packageData:null,loading:!1,onSubmit:()=>{},onCancel:()=>{},licenseFeatures:null,licenseFeaturesFetching:!1,isProgramPackageEdit:!1};const xye=vye;function yye(e){let{isEditMode:t,packageData:n,loading:r,onSubmit:i,onCancel:o,licenseFeatures:a,licenseFeaturesFetching:s,isProgramPackageEdit:l}=e;const{t:c}=Vg(),d=l?[{name:c("rpm_LicenseManager"),url:ld.LICENSE_MANAGER.PROGRAM_PACKAGES},{name:c("rpm_ProgramPackages"),url:ld.LICENSE_MANAGER.PROGRAM_PACKAGES},{name:c("rpm_EditPackage"),url:""}]:[{name:c("rpm_LicenseManager"),url:ld.LICENSE_MANAGER.PACKAGE_TEMPLATES},{name:c("rpm_PackageTemplates"),url:ld.LICENSE_MANAGER.PACKAGE_TEMPLATES},{name:c(t?"rpm_EditPackage":"rpm_CreatePackage"),url:""}];return c(t?"rpm_EditPackage":"rpm_CreatePackage"),(0,qt.jsxs)(op,{sx:{width:"100%"},children:[(0,qt.jsx)(op,{mb:2.5,children:(0,qt.jsx)(BH,{labels:d})}),(0,qt.jsx)(Ff,{container:!0,spacing:2,children:(0,qt.jsx)(Ff,{item:!0,xs:12,children:(0,qt.jsxs)(yH,{variant:"outlined",children:[(0,qt.jsx)(nW,{title:(0,qt.jsx)(Ff,{container:!0,spacing:2,alignItems:"center",children:(0,qt.jsx)(Ff,{item:!0,xs:!0,children:(0,qt.jsx)(Cf,{variant:"h6",component:"h6",children:c(t?"rpm_EditPackage":"rpm_CreatePackage")})})}),sx:{py:1.5,bgcolor:"primary.theme.50"}}),(0,qt.jsx)(wH,{sx:{py:4,":last-child":{pb:4}},children:(0,qt.jsx)(xye,{isEditMode:t,packageData:n,loading:r,onSubmit:i,onCancel:o,licenseFeatures:a,licenseFeaturesFetching:s,isProgramPackageEdit:l})})]})})})]})}yye.defaultProps={isEditMode:!1,packageData:null,loading:!1,onSubmit:()=>{},onCancel:()=>{},licenseFeatures:null,licenseFeaturesFetching:!1,isProgramPackageEdit:!1};const bye=yye;const jye=function(){var e;const t=Nt(),n=so(),{id:r}=lo(),o=null===(e=oo().state)||void 0===e?void 0:e.packageData,a=!!o,s=wt(cu),[l,c]=(0,We.useState)(null),[d,u]=(0,We.useState)(!1),[p,h]=(0,We.useState)(null),[m,f]=(0,We.useState)(!1),g=async()=>{if(r){u(!0);try{const e=await t((e=>async t=>{t(na(!0));try{const t="".concat(ba.ACCOUNT_PACKAGE,"/").concat(e),n=await Iu(t,{});return null===n||void 0===n?void 0:n.data}catch(n){return n}finally{t(na(!1))}})(r));c(e)}catch(e){console.log(e)}finally{u(!1)}}},v=async()=>{f(!0);try{const e=await t(async e=>{e(na(!0));try{const e=ba.LICENSE_FEATURES,t=await Iu(e,{});return null===t||void 0===t?void 0:t.data}catch(t){return t}finally{e(na(!1))}});h(e)}catch(e){console.error("Failed to fetch license features:",e)}finally{f(!1)}};return(0,We.useEffect)(()=>{if(o)c(o);else{g();t(NC({activeMenuItem:"packageTemplates",heading:{}}))}v()},[r,s,o]),(0,qt.jsx)(bye,{isEditMode:!!r,packageData:l,loading:d,onSubmit:async(e,s)=>{let{setErrors:l,resetForm:c,setSubmitting:d}=s;try{if(r){if(a){const n=(0,i.A)((0,i.A)({},e),{},{account_package_id:null===o||void 0===o?void 0:o._id});await t(Kxe(n,r))}else await t(((e,t)=>async n=>{n(na(!0));try{const n="".concat(ba.ACCOUNT_PACKAGE,"/").concat(t);return await $u(n,e)}finally{n(na(!1))}})(e,r));t(Zo({subTitle:"message:rpm_packageUpdatedSuccess",severity:ud.SUCCESS}))}else await t((u=e,async e=>{e(na(!0));try{const e="".concat(ba.ACCOUNT_PACKAGE);return await Fu(e,u)}finally{e(na(!1))}})),t(Zo({subTitle:"message:rpm_packageCreatedSuccess",severity:ud.SUCCESS})),c();n(-1)}catch(p){const e=us(p,"response.data.field_errors",{});cs(e)?t(Zo({subTitle:p.message||"error:rpm_packageSaveFailed",severity:ud.ERROR})):l(e)}finally{d(!1)}var u},onCancel:()=>{n(-1)},licenseFeatures:p,licenseFeaturesFetching:m,isProgramPackageEdit:a})};const _ye=function(){const e=Nt(),{userData:t}=(0,We.useContext)(lv),{programFetch:n,programPage:r,allProgramFetch:i}=(0,We.useContext)(DC);return We.useEffect(()=>{const n={sideBar:!0,listItems:FC(t)};e(NC(n))},[t]),(0,qt.jsxs)(ko,{children:[(0,qt.jsx)(So,{path:"/program",element:cs(t)||null!==t&&void 0!==t&&t.showProgramList?(0,qt.jsx)(Pue,{fetchProgramList:n,pageDetails:r,userData:t,fetchAllProgramList:i}):(0,qt.jsx)(LC,{})}),(0,qt.jsx)(So,{path:"/allusers",element:(0,qt.jsx)(Hue,{})}),(0,qt.jsx)(So,{path:"/wellness",element:(0,qt.jsx)(nxe,{})}),(0,qt.jsx)(So,{path:"/exercise",element:(0,qt.jsx)(kxe,{})}),(0,qt.jsx)(So,{path:"/enquiry",element:(0,qt.jsx)(Oxe,{})}),(0,qt.jsx)(So,{path:"/logs",element:(0,qt.jsx)(mH,{})}),(0,qt.jsx)(So,{path:"/logs/:eventId",element:(0,qt.jsx)(HH,{})}),(0,qt.jsx)(So,{path:"/dashboard",element:(0,qt.jsx)(lue,{})}),(0,qt.jsx)(So,{path:"/profile",element:(0,qt.jsx)(due,{})}),(0,qt.jsx)(So,{path:"/profile/edit/:userId",element:(0,qt.jsx)(xue,{})}),(0,qt.jsx)(So,{path:"/change-password",element:(0,qt.jsx)(OJ,{})}),(0,qt.jsx)(So,{path:"/roles",element:cs(t)||null!==t&&void 0!==t&&t.showRoleMenu?(0,qt.jsx)(XZ,{}):(0,qt.jsx)(LC,{})}),(0,qt.jsx)(So,{path:"/roles/add",element:cs(t)||null!==t&&void 0!==t&&t.showCreateRoleBtn?(0,qt.jsx)(NU,{}):(0,qt.jsx)(LC,{})}),(0,qt.jsx)(So,{path:"/roles/edit/:roleId",element:(0,qt.jsx)(UV,{})}),(0,qt.jsx)(So,{path:"/users",element:cs(t)||null!==t&&void 0!==t&&t.showStaffMenu?(0,qt.jsx)(TJ,{}):(0,qt.jsx)(LC,{})}),(0,qt.jsx)(So,{path:"/users/add",element:cs(t)||null!==t&&void 0!==t&&t.showCreateUserBtn?(0,qt.jsx)(aX,{}):(0,qt.jsx)(LC,{})}),(0,qt.jsx)(So,{path:"/users/edit/:userId",element:cs(t)||null!==t&&void 0!==t&&t.showReadUserBtn?(0,qt.jsx)(wJ,{fetchProgramList:n,pageDetails:r}):(0,qt.jsx)(LC,{})}),(0,qt.jsx)(So,{path:"/license-manager",element:(0,qt.jsx)(wo,{to:"/license-manager/packages-templates",replace:!0})}),",",(0,qt.jsx)(So,{path:"/license-manager/packages-templates",element:(0,qt.jsx)(Lxe,{})}),(0,qt.jsx)(So,{path:"/license-manager/program-packages",element:(0,qt.jsx)(Qxe,{})}),(0,qt.jsx)(So,{path:"/license-manager/packages-templates/create",element:(0,qt.jsx)(jye,{})}),(0,qt.jsx)(So,{path:"/license-manager/packages-templates/edit/:id",element:(0,qt.jsx)(jye,{})})]})};const Cye=function(e){var t,n,r,i,o,a,s,l,c,d,u,p,h,m,f;let{patientData:g,scheduleList:v,scheduleGlucoseList:x}=e;const y=Nt(),{t:b}=Vg(),{years:j}=vs(null===g||void 0===g?void 0:g.birth_date),_=wt(vu),C=wt(fu),{patientId:w,programId:S}=lo(),[A,k]=We.useState({}),[T,E]=We.useState({});return We.useEffect(()=>{const e={course:A,course_glucose:T};$o.setPatientDefaultCourse(null===e||void 0===e?void 0:e.course),$o.setPatientDefaultCourseGlucose(null===e||void 0===e?void 0:e.course_glucose),y(NC(e))},[A,T]),We.useEffect(()=>{if(cs(v))k({});else{const e=null===v||void 0===v?void 0:v.find(e=>"active"===(null===e||void 0===e?void 0:e.status)),t=null===v||void 0===v?void 0:v.find(e=>"inactive"===(null===e||void 0===e?void 0:e.status)),n=null===v||void 0===v?void 0:v.find(e=>"upcoming"===(null===e||void 0===e?void 0:e.status));k(e||(t||n))}},[v]),We.useEffect(()=>{if(cs(x))E({});else{const e=null===x||void 0===x?void 0:x.find(e=>"active"===(null===e||void 0===e?void 0:e.status)),t=null===x||void 0===x?void 0:x.find(e=>"inactive"===(null===e||void 0===e?void 0:e.status)),n=null===x||void 0===x?void 0:x.find(e=>"upcoming"===(null===e||void 0===e?void 0:e.status));E(e||(t||n))}},[x]),(0,qt.jsxs)(op,{sx:{mb:2.5},position:"relative",children:[(0,qt.jsx)(op,{children:(0,qt.jsx)(Cf,{variant:"h6",component:"h6",sx:{display:{xs:"block",md:"none"},marginBottom:"8px"},children:b("rpm_medicalCharts")})}),g?(0,qt.jsxs)(Ff,{container:!0,spacing:2.5,className:"patientDashboard-tour-step0",children:[(0,qt.jsx)(Ff,{item:!0,xs:12,md:12,lg:3,children:(0,qt.jsx)(Lo,{to:"".concat(ld.PROGRAM.MAIN,"/").concat(S,"/patients/").concat(w,"/details"),className:"linkNoClr",children:(0,qt.jsxs)(op,{sx:{position:"relative",display:"flex",p:2,bgcolor:"NON_COMPLIANT"==C?"red.50":"COMPLIANT"==C?"green.50":"#fff",borderRadius:1},children:[(0,qt.jsx)(op,{sx:{display:"flex"},children:(0,qt.jsx)(Ny,{src:null===g||void 0===g||null===(t=g.profile)||void 0===t?void 0:t.profileImage,sx:{bgcolor:"secondary.main",width:48,height:48,fontSize:32},children:null===g||void 0===g||null===(n=g.first_name)||void 0===n?void 0:n.charAt(0).toLocaleUpperCase()})}),(0,qt.jsxs)(op,{sx:{flexGrow:1,pl:1.5,overflow:"hidden"},children:["NA"==C&&(0,qt.jsx)(op,{component:"span",sx:e=>({position:"absolute",top:0,right:0,py:.25,px:1,display:"inline-flex",fontSize:e.spacing(1.25),borderRadius:.5,fontWeight:600})}),"NON_COMPLIANT"==C&&(0,qt.jsx)(op,{component:"span",sx:e=>({position:"absolute",top:0,right:0,py:.25,px:1,color:e.palette.red[900],backgroundColor:e.palette.red[100],display:"inline-flex",fontSize:e.spacing(1.25),borderRadius:.5,fontWeight:600}),children:"NON-COMPLIANT"}),"COMPLIANT"==C&&(0,qt.jsx)(op,{component:"span",sx:e=>({position:"absolute",top:0,right:0,py:.25,px:1,color:e.palette.green[900],backgroundColor:e.palette.green[100],display:"inline-flex",fontSize:e.spacing(1.25),borderRadius:.5,fontWeight:600}),children:"COMPLIANT"}),(0,qt.jsxs)(Cf,{variant:"h6",component:"h6",fontWeight:600,noWrap:!0,title:(null===g||void 0===g?void 0:g.first_name)+" "+(null===g||void 0===g?void 0:g.last_name),children:[(null===g||void 0===g?void 0:g.first_name)+" "+(null===g||void 0===g?void 0:g.last_name)," "]}),(0,qt.jsxs)(Cf,{variant:"body2",component:"p",sx:{color:"grey.600",fontWeight:600},children:["Age: ",null!==g&&void 0!==g&&g.birth_date?j:"NA"," ",null!==g&&void 0!==g&&null!==(r=g.profile)&&void 0!==r&&r.gender?", ".concat(null===g||void 0===g||null===(i=g.profile)||void 0===i?void 0:i.gender):""]})]})]})})}),(0,qt.jsx)(Ff,{item:!0,md:!0,children:(0,qt.jsx)(op,{sx:{p:2,bgcolor:"white",borderRadius:1},children:(0,qt.jsxs)(Ff,{container:!0,spacing:2.5,children:[(0,qt.jsxs)(Ff,{item:!0,md:5,children:[(0,qt.jsx)(Cf,{variant:"body1",fontWeight:600,children:(0,qt.jsx)(Lo,{to:"".concat(ld.PROGRAM.MAIN,"/").concat(S,"/patients/").concat(w,"/details"),className:"linkNoClr",children:b("rpm_Vitals")})}),(0,qt.jsxs)(op,{children:[(0,qt.jsxs)(Lo,{to:"".concat(ld.PROGRAM.MAIN,"/").concat(S,"/patients/").concat(w,"/details"),className:"linkNoClr",children:[(0,qt.jsx)(Cf,{component:"span",variant:"body2",fontWeight:500,children:b("rpm_Height")+":"}),"\xa0",(0,qt.jsxs)(Cf,{component:"span",variant:"body2",sx:{color:"grey.600"},children:[null!==g&&void 0!==g&&null!==(o=g.patient_health_profile)&&void 0!==o&&null!==(a=o.height)&&void 0!==a&&a.split(".")[0]?(null===g||void 0===g||null===(s=g.patient_health_profile)||void 0===s||null===(l=s.height)||void 0===l?void 0:l.split(".")[0])+"' "+(null===g||void 0===g||null===(c=g.patient_health_profile)||void 0===c||null===(d=c.height)||void 0===d?void 0:d.split(".")[1])+"''":"NA"," ","\xa0 |"]})," "]}),"\xa0",(0,qt.jsxs)(Lo,{to:"".concat(ld.PROGRAM.MAIN,"/").concat(S,"/patients/").concat(w,"/details"),className:"linkNoClr",children:[(0,qt.jsx)(Cf,{component:"span",variant:"body2",fontWeight:500,children:b("rpm_Weight")+":"}),"\xa0",(0,qt.jsxs)(Cf,{component:"span",variant:"body2",sx:{color:"grey.600"},children:[null!==g&&void 0!==g&&null!==(u=g.patient_health_profile)&&void 0!==u&&u.weight?(null===g||void 0===g||null===(p=g.patient_health_profile)||void 0===p?void 0:p.weight)+"kg":"NA"," ","\xa0 |"]})," "]}),"\xa0",(0,qt.jsxs)(Lo,{to:"".concat(ld.PROGRAM.MAIN,"/").concat(S,"/patients/").concat(w,"/details"),className:"linkNoClr",children:[(0,qt.jsx)(Cf,{component:"span",variant:"body2",fontWeight:500,children:b("rpm_BMI")+":"}),"\xa0",(0,qt.jsx)(Cf,{component:"span",variant:"body2",sx:{color:"grey.600"},children:null!==g&&void 0!==g&&null!==(h=g.patient_health_profile)&&void 0!==h&&h.weight?Ps(null===g||void 0===g||null===(m=g.patient_health_profile)||void 0===m?void 0:m.height,null===g||void 0===g||null===(f=g.patient_health_profile)||void 0===f?void 0:f.weight):"NA"})]})]})]}),(0,qt.jsxs)(Ff,{item:!0,md:3,children:[(0,qt.jsx)(Cf,{variant:"body1",fontWeight:600,children:b("rpm_Courses")}),0===(null===_||void 0===_?void 0:_.activeVitalTab)&&(0,qt.jsx)(op,{children:A?cs(A)?(0,qt.jsx)(Cf,{component:"span",variant:"body2",sx:{color:"grey.600"},children:"NA"}):(0,qt.jsx)(G_,{fullWidth:!0,size:"small",id:"course",name:"course",variant:"outlined",value:null===A||void 0===A?void 0:A.id,onChange:e=>{const t=null===v||void 0===v?void 0:v.find(t=>t.id===e.target.value);$o.setPatientDefaultCourse(t),k(t)},sx:{".MuiSelect-select":{p:0,fontSize:"body2.fontSize"},"& fieldset":{border:"none"}},MenuProps:{style:{maxHeight:"250px"}},children:!cs(v)&&(null===v||void 0===v?void 0:v.map(e=>{var t;return(0,qt.jsxs)(mf,{value:null===e||void 0===e?void 0:e.id,sx:{justifyContent:"space-between",alignItems:"center"},children:[null===e||void 0===e||null===(t=e.schedule)||void 0===t?void 0:t.name," ",(0,qt.jsx)(dM,{component:"span",icon:!1,severity:Cs(null===e||void 0===e?void 0:e.status),sx:e=>({py:0,px:1,ml:.5,display:"inline-flex",fontSize:e.spacing(1.5),fontWeight:600,"& .MuiAlert-message":{p:e.spacing(.5,0)}}),children:b("rpm_".concat(null===e||void 0===e?void 0:e.status))})]},null===e||void 0===e?void 0:e.id)}))}):(0,qt.jsx)(lS,{variant:"rounded"})}),1===(null===_||void 0===_?void 0:_.activeVitalTab)&&(0,qt.jsx)(op,{children:T?cs(T)?(0,qt.jsx)(Cf,{component:"span",variant:"body2",sx:{color:"grey.600"},children:"NA"}):(0,qt.jsx)(G_,{fullWidth:!0,size:"small",id:"course",name:"course",variant:"outlined",value:null===T||void 0===T?void 0:T.id,onChange:e=>{const t=null===x||void 0===x?void 0:x.find(t=>t.id===e.target.value);$o.setPatientDefaultCourseGlucose(t),E(t)},sx:{".MuiSelect-select":{p:0,fontSize:"body2.fontSize"},"& fieldset":{border:"none"}},MenuProps:{style:{maxHeight:"250px"}},children:!cs(x)&&(null===x||void 0===x?void 0:x.map(e=>{var t;return(0,qt.jsxs)(mf,{value:null===e||void 0===e?void 0:e.id,sx:{justifyContent:"space-between",alignItems:"center"},children:[null===e||void 0===e||null===(t=e.schedule)||void 0===t?void 0:t.name,(0,qt.jsx)(dM,{component:"span",icon:!1,severity:Cs(null===e||void 0===e?void 0:e.status),sx:e=>({py:0,px:1,ml:1,display:"inline-flex",fontSize:e.spacing(1.5),fontWeight:600,"& .MuiAlert-message":{p:e.spacing(.5,0)}}),children:b("rpm_".concat(null===e||void 0===e?void 0:e.status))})]},null===e||void 0===e?void 0:e.id)}))}):(0,qt.jsx)(lS,{variant:"rounded"})}),null===(null===_||void 0===_?void 0:_.activeVitalTab)&&(0,qt.jsx)(op,{children:(0,qt.jsx)(Cf,{component:"span",variant:"body2",sx:{color:"grey.600"},children:"No course attached"})})]}),(0,qt.jsxs)(Ff,{item:!0,md:!0,children:[(0,qt.jsx)(Cf,{variant:"body1",fontWeight:600,children:b("rpm_StartDate")}),0===(null===_||void 0===_?void 0:_.activeVitalTab)&&(0,qt.jsx)(op,{children:(0,qt.jsx)(Cf,{component:"span",variant:"body2",sx:{color:"grey.600"},children:null!==A&&void 0!==A&&A.start_date?sa()(null===A||void 0===A?void 0:A.start_date).format("DD MMM YYYY"):"NA"})}),1===(null===_||void 0===_?void 0:_.activeVitalTab)&&(0,qt.jsx)(op,{children:(0,qt.jsx)(Cf,{component:"span",variant:"body2",sx:{color:"grey.600"},children:null!==T&&void 0!==T&&T.start_date?sa()(null===T||void 0===T?void 0:T.start_date).format("DD MMM YYYY"):"NA"})}),null===(null===_||void 0===_?void 0:_.activeVitalTab)&&(0,qt.jsx)(op,{children:(0,qt.jsx)(Cf,{component:"span",variant:"body2",sx:{color:"grey.600"},children:"NA"})})]}),(0,qt.jsxs)(Ff,{item:!0,md:!0,children:[(0,qt.jsx)(Cf,{variant:"body1",fontWeight:600,children:b("rpm_EndDate")}),0===(null===_||void 0===_?void 0:_.activeVitalTab)&&(0,qt.jsx)(op,{children:(0,qt.jsx)(Cf,{component:"span",variant:"body2",sx:{color:"grey.600"},children:null!==A&&void 0!==A&&A.end_date?sa()(null===A||void 0===A?void 0:A.end_date).format("DD MMM YYYY"):"NA"})}),1===(null===_||void 0===_?void 0:_.activeVitalTab)&&(0,qt.jsx)(op,{children:(0,qt.jsx)(Cf,{component:"span",variant:"body2",sx:{color:"grey.600"},children:null!==T&&void 0!==T&&T.end_date?sa()(null===T||void 0===T?void 0:T.end_date).format("DD MMM YYYY"):"NA"})}),null===(null===_||void 0===_?void 0:_.activeVitalTab)&&(0,qt.jsx)(op,{children:(0,qt.jsx)(Cf,{component:"span",variant:"body2",sx:{color:"grey.600"},children:"NA"})})]})]})})})]}):(0,qt.jsxs)(Ff,{container:!0,spacing:2.5,children:[(0,qt.jsx)(Ff,{item:!0,xs:12,md:12,lg:3,children:(0,qt.jsxs)(op,{sx:{display:"flex",p:2,bgcolor:"primary.theme.50",borderRadius:1},children:[(0,qt.jsx)(op,{sx:{display:"flex"},children:(0,qt.jsx)(lS,{variant:"circular",width:48,height:48})}),(0,qt.jsxs)(op,{sx:{flexGrow:1,pl:1.5},children:[(0,qt.jsx)(Cf,{variant:"h6",component:"h6",fontWeight:600,children:(0,qt.jsx)(lS,{variant:"text",width:100})}),(0,qt.jsx)(Cf,{variant:"body2",component:"p",children:(0,qt.jsx)(lS,{variant:"text",width:60})})]})]})}),(0,qt.jsx)(Ff,{item:!0,md:!0,children:(0,qt.jsx)(op,{sx:{p:2,bgcolor:"white",borderRadius:1},children:(0,qt.jsxs)(Ff,{container:!0,spacing:2.5,children:[(0,qt.jsxs)(Ff,{item:!0,md:4,children:[(0,qt.jsx)(Cf,{variant:"body1",fontWeight:600,children:b("rpm_Vitals")}),(0,qt.jsx)(op,{children:(0,qt.jsx)(Cf,{component:"span",variant:"body2",children:(0,qt.jsx)(lS,{variant:"text"})})})]}),(0,qt.jsxs)(Ff,{item:!0,md:3,children:[(0,qt.jsx)(Cf,{variant:"body1",fontWeight:600,children:b("rpm_Courses")}),(0,qt.jsx)(Cf,{component:"span",variant:"body2",children:(0,qt.jsx)(lS,{variant:"text"})})]}),(0,qt.jsxs)(Ff,{item:!0,md:!0,children:[(0,qt.jsx)(Cf,{variant:"body1",fontWeight:600,children:b("rpm_StartDate")}),(0,qt.jsx)(Cf,{component:"span",variant:"body2",children:(0,qt.jsx)(lS,{variant:"text"})})]}),(0,qt.jsxs)(Ff,{item:!0,md:!0,children:[(0,qt.jsx)(Cf,{variant:"body1",fontWeight:600,children:b("rpm_EndDate")}),(0,qt.jsx)(Cf,{component:"span",variant:"body2",children:(0,qt.jsx)(lS,{variant:"text"})})]})]})})})]})]})},wye=(0,Vn.Ay)(gw)(()=>({["&.".concat(pw.head)]:{padding:"8px 16px",fontWeight:"600"}})),Sye=We.forwardRef((e,t)=>{var n,r,i,o,a,s,l,c,d,u,p,h,m,f,g,v,x,y,b,j,_,C,w,S,A,k,T,E,M,O,R,P,D,N,L,I,F,$,B;const{t:z}=Vg(),H=Nt(),{state:W}=oo(),U=(null===W||void 0===W?void 0:W.doctor)||(null===e||void 0===e?void 0:e.doctor);let V=function(e){const{vital:t,medications_list:n,intervals:r,start_date:i,end_date:o,id:a,created_by:s,created_at:l}=e,c=null===n||void 0===n?void 0:n.map(e=>{const t=r.filter(t=>{var n;return null===(n=t.medicines)||void 0===n?void 0:n.includes(e.id)}).map(e=>{let{id:t,repetition_kind:n,start_time:r}=e;return{id:t,repetition_kind:n,start_time:r?Ds(r,pd):"",interval:null}});return{id:e.id,medicine:e.medicine,medicine_form:e.medicine_form,icon_type:e.icon_type,dose:e.dose,unit:e.unit,color:e.color,image:e.image,start_date:e.start_date,end_date:e.end_date,days:e.days,repetition_kind:gd,timing:t,frequency:e.frequency,comments:e.comments}});return{vital:t,presId:a,pres_start_date:i,pres_end_date:o,created_by:s,created_at:l,medicationList:c}}(W||(null===e||void 0===e?void 0:e.details));const G=null===e||void 0===e||null===(n=e.details)||void 0===n||null===(r=n.advices)||void 0===r?void 0:r.join(", "),q=null===e||void 0===e||null===(i=e.details)||void 0===i||null===(o=i.tests)||void 0===o?void 0:o.join(", "),{years:Y}=vs(null===(a=e.patientData)||void 0===a?void 0:a.birth_date);return We.useEffect(()=>{if(!cs(e.patientData)&&!cs(e.program)&&W){H(NC({activeMenuItem:"prescription_report"}))}},[e.patientData,e.program]),(0,qt.jsx)(op,{height:"100%",children:(0,qt.jsxs)(op,{sx:{flexGrow:1,wordBreak:"break-all",mx:"auto",flexDirection:"column",height:"100%",display:"flex"},maxWidth:900,border:1,bgcolor:"white",borderColor:"grey.400",ref:t,height:"100%",children:[(0,qt.jsxs)(op,{className:"prescritionPaper",children:[(0,qt.jsx)(op,{sx:{backgroundColor:"#3F51B5"},p:2,pb:0,children:(0,qt.jsxs)(Ff,{container:!0,spacing:2,pb:1,children:[(0,qt.jsx)(Ff,{item:!0,xs:7,lg:7,children:(0,qt.jsxs)(op,{display:"flex",children:[(null===e||void 0===e||null===(s=e.program)||void 0===s?void 0:s.image)&&(0,qt.jsx)(op,{sx:{lineHeight:1},className:"LogoImage",width:100,height:"100%",children:(0,qt.jsx)("img",{src:null===e||void 0===e||null===(l=e.program)||void 0===l?void 0:l.image,width:90,height:"100%"})}),(0,qt.jsxs)(op,{children:[(0,qt.jsx)(op,{pb:.5,sx:{marginLeft:"10px"},children:(0,qt.jsx)(Cf,{component:"span",fontWeight:"900",sx:{wordBreak:"break-word",fontSize:"28px"},color:"white",children:null!==e&&void 0!==e&&null!==(c=e.program)&&void 0!==c&&c.display_name?null===e||void 0===e||null===(d=e.program)||void 0===d?void 0:d.display_name:""})}),(0,qt.jsx)(op,{pb:.5,sx:{marginLeft:"10px"},children:(0,qt.jsx)(Cf,{component:"span",fontWeight:"500",sx:{wordBreak:"break-word",fontSize:"16px"},color:"white",children:(null===e||void 0===e||null===(u=e.program)||void 0===u?void 0:u.address)+", "+(null===e||void 0===e||null===(p=e.program)||void 0===p?void 0:p.city)+", "+(null===e||void 0===e||null===(h=e.program)||void 0===h?void 0:h.country)})})]})]})}),(0,qt.jsx)(Ff,{item:!0,xs:5,lg:5,children:(0,qt.jsxs)(op,{pt:0,textAlign:"right",children:[(0,qt.jsx)(op,{pb:.5,children:(0,qt.jsxs)(Cf,{component:"h1",fontWeight:"500",sx:{color:"#ffffff",fontSize:"28px"},children:["Dr. ",null===U||void 0===U?void 0:U.first_name," ",null===U||void 0===U?void 0:U.last_name]})}),(0,qt.jsx)(op,{pb:.5,children:(0,qt.jsx)(Cf,{component:"span",fontWeight:"500",sx:{wordBreak:"break-word"},color:"white",children:null!==U&&void 0!==U&&null!==(m=U.attributes)&&void 0!==m&&m.qualification?null===U||void 0===U||null===(f=U.attributes)||void 0===f?void 0:f.qualification:""})}),(0,qt.jsx)(op,{pb:.5,children:(0,qt.jsx)(Cf,{component:"span",fontWeight:"500",color:"white",children:null!==U&&void 0!==U&&null!==(g=U.attributes)&&void 0!==g&&g.registration?"Reg No. : ".concat(null===U||void 0===U||null===(v=U.attributes)||void 0===v?void 0:v.registration):""})}),(0,qt.jsx)(op,{pb:.5,children:(0,qt.jsx)(Cf,{component:"span",fontWeight:"500",color:"white",children:null!==U&&void 0!==U&&null!==(x=U.attributes)&&void 0!==x&&x.mobile?"Mob : ".concat(null===U||void 0===U||null===(y=U.attributes)||void 0===y?void 0:y.mobile):""})})]})})]})}),(0,qt.jsxs)(op,{p:2,pt:0,mt:0,children:[(0,qt.jsxs)(Ff,{container:!0,spacing:1,py:1,children:[(0,qt.jsxs)(Ff,{item:!0,xs:6,children:[(0,qt.jsx)(op,{display:"flex",children:(0,qt.jsx)(Cf,{component:"span",fontSize:20,sx:{flex:"1"},fontWeight:"bold",children:(null===e||void 0===e||null===(b=e.patientData)||void 0===b?void 0:b.first_name)+" "+(null===e||void 0===e||null===(j=e.patientData)||void 0===j?void 0:j.last_name)})}),(0,qt.jsx)(op,{display:"flex",children:(0,qt.jsxs)(Cf,{component:"span",fontSize:16,sx:{flex:"1",fontWeight:"500"},children:[z("rpm_AgeYears",{count:Y})," ",(null===e||void 0===e||null===(_=e.patientData)||void 0===_||null===(C=_.profile)||void 0===C?void 0:C.gender)&&"/"," ",null===e||void 0===e||null===(w=e.patientData)||void 0===w||null===(S=w.profile)||void 0===S?void 0:S.gender]})})]}),(0,qt.jsx)(Ff,{item:!0,xs:6,children:(0,qt.jsx)(op,{display:"flex",alignItems:"end",children:(0,qt.jsx)(Cf,{component:"span",fontSize:20,sx:{flex:"1"},textAlign:"end",fontWeight:"600",children:"".concat(sa()(null===V||void 0===V?void 0:V.created_at).format("DD MMM YYYY"))})})})]}),(0,qt.jsx)(eg,{sx:{borderColor:"#E2E3E6",borderWidth:"1px",mt:"5px"}}),(0,qt.jsxs)(Ff,{container:!0,spacing:2,mt:1,pl:2,pr:2,children:[(null===e||void 0===e?void 0:e.isComplaints)&&(0,qt.jsx)(Ff,{sm:6,lg:6,children:(0,qt.jsxs)(op,{pb:.8,children:[(0,qt.jsx)(Cf,{component:"Subtitle",pr:.5,fontSize:16,fontWeight:"600",children:z("rpm_ChiefComplaints")}),(0,qt.jsx)(Cf,{component:"h3",fontSize:14,sx:{wordBreak:"break-word"},children:cs(null===e||void 0===e||null===(A=e.details)||void 0===A?void 0:A.complaints)?"N/A":null===e||void 0===e||null===(k=e.details)||void 0===k?void 0:k.complaints.map(e=>null===e||void 0===e?void 0:e.name).join(", ")})]})}),(null===e||void 0===e?void 0:e.isDiagnosis)&&(0,qt.jsx)(Ff,{sm:6,lg:6,children:(0,qt.jsxs)(op,{pb:.8,children:[(0,qt.jsx)(Cf,{component:"Subtitle",pr:.5,fontSize:16,fontWeight:"600",children:z("rpm_Diagnosis")}),(0,qt.jsx)(Cf,{component:"h3",fontSize:14,sx:{wordBreak:"break-word"},children:cs(null===e||void 0===e||null===(T=e.details)||void 0===T?void 0:T.diagnosis)?"N/A":null===e||void 0===e||null===(E=e.details)||void 0===E?void 0:E.diagnosis.map(e=>null===e||void 0===e?void 0:e.name).join(", ")})]})})]}),((null===e||void 0===e?void 0:e.isComplaints)||(null===e||void 0===e?void 0:e.isDiagnosis))&&(0,qt.jsx)(eg,{sx:{borderColor:"#E2E3E6",borderWidth:"1px",mt:"5px"}}),(0,qt.jsx)(op,{pb:.8,mt:1,children:(0,qt.jsx)(Cf,{component:"Subtitle",pr:.5,fontSize:16,fontWeight:"600",children:z("Rx")})}),(0,qt.jsx)(Ff,{container:!0,spacing:2,children:(0,qt.jsx)(Ff,{item:!0,xs:12,children:(0,qt.jsx)(Vw,{children:(0,qt.jsxs)(Bw,{"aria-label":"simple table",children:[(0,qt.jsx)(_S,{sx:{backgroundColor:"#efefef"},children:(0,qt.jsxs)(cw,{children:[(0,qt.jsx)(wye,{width:"120px",whiteSpace:"initial",children:(0,qt.jsx)(op,{children:z("rpm_MedicineName")})}),(0,qt.jsx)(wye,{children:z("rpm_Dosage")}),(0,qt.jsx)(wye,{children:z("rpm_Duration&Time")}),(0,qt.jsx)(wye,{children:z("rpm_Comments")})]})}),(0,qt.jsx)(fS,{children:null===V||void 0===V||null===(M=V.medicationList)||void 0===M?void 0:M.map(e=>{var t;return(0,qt.jsxs)(cw,{sx:{"td, &:last-child th":{border:0,borderBottom:1,borderColor:"grey.400"},td:{padding:"8px 16px"}},children:[(0,qt.jsx)(gw,{sx:{whiteSpace:"normal",wordBreak:"break-word",width:"25%"},children:(0,qt.jsxs)(op,{whiteSpace:"initial",children:[e.medicine," ",cs(null===e||void 0===e?void 0:e.dose)||cs(null===e||void 0===e?void 0:e.unit)?"":"- "+e.dose+" "+e.unit]})}),(0,qt.jsx)(gw,{sx:{whiteSpace:"normal",wordBreak:"break-word",width:"20%"},children:(0,qt.jsx)(op,{whiteSpace:"initial",children:null===(t=Ld.find(t=>(null===e||void 0===e?void 0:e.frequency)===(null===t||void 0===t?void 0:t.key)))||void 0===t?void 0:t.text})}),(0,qt.jsx)(gw,{sx:{whiteSpace:"normal",wordBreak:"break-word",width:"25%"},children:(0,qt.jsxs)(op,{whiteSpace:"initial",children:[(0,qt.jsxs)("div",{children:[null===e||void 0===e?void 0:e.days," days"," ","(".concat(sa()(null===e||void 0===e?void 0:e.start_date).format("DD MMM")," - ").concat(sa()(null===e||void 0===e?void 0:e.end_date).format("DD MMM"),")")," "]}),e.timing.map((t,n)=>(0,qt.jsx)(We.Fragment,{children:(0,qt.jsxs)("span",{children:[t.start_time&&"Intervals"===(null===t||void 0===t?void 0:t.repetition_kind)?"From":""," ",t.start_time," ",t.start_time&&"Intervals"===(null===t||void 0===t?void 0:t.repetition_kind)?"onwards":"",n<e.timing.length-1&&", "]})},n))]})}),(0,qt.jsx)(gw,{sx:{whiteSpace:"normal",wordBreak:"break-word",width:"30%"},children:(0,qt.jsx)(op,{whiteSpace:"initial",children:e.comments||"NA"})})]},e.medicine)})})]})})})}),(null===e||void 0===e?void 0:e.isAdvices)&&(0,qt.jsxs)(qt.Fragment,{children:[(0,qt.jsxs)(op,{mt:2,mb:2,children:[(0,qt.jsxs)(Cf,{component:"h4",pr:.5,fontSize:16,fontWeight:"600",children:[z("rpm_advice"),":"]}),cs(null===e||void 0===e||null===(O=e.details)||void 0===O?void 0:O.advices)?(0,qt.jsx)(Cf,{variant:"body1",fontSize:14,children:"N/A"}):(0,qt.jsx)(Cf,{variant:"body1",fontSize:14,children:G})]}),(0,qt.jsx)(eg,{sx:{borderColor:"#E2E3E6",borderWidth:"1px",mt:"5px"}})]}),(null===e||void 0===e?void 0:e.isTests)&&(0,qt.jsxs)(qt.Fragment,{children:[(0,qt.jsxs)(op,{mt:2,mb:2,children:[(0,qt.jsx)(Cf,{component:"h4",pr:.5,fontSize:16,fontWeight:"600",children:z("rpm_TestRequired")}),(0,qt.jsx)(Cf,{component:"p",pr:.5,fontSize:16,mt:.5,children:cs(null===e||void 0===e||null===(R=e.details)||void 0===R?void 0:R.tests)?(0,qt.jsx)(Cf,{variant:"body1",fontSize:14,children:"N/A"}):(0,qt.jsx)(Cf,{variant:"body1",fontSize:14,children:q})})]}),(0,qt.jsx)(eg,{sx:{borderColor:"#E2E3E6",borderWidth:"1px",mt:"5px"}})]}),(null===e||void 0===e||null===(P=e.details)||void 0===P||null===(D=P.follow_up)||void 0===D?void 0:D.date)&&(0,qt.jsxs)(op,{mt:2,mb:2,children:[(0,qt.jsx)(Cf,{component:"h4",pr:.5,fontSize:16,fontWeight:"600",children:z("rpm_followUpDate")}),(0,qt.jsx)(Cf,{component:"p",pr:.5,fontSize:16,mt:.5,children:sa()(null===e||void 0===e||null===(N=e.details)||void 0===N||null===(L=N.follow_up)||void 0===L?void 0:L.date).format("DD MMM YYYY")})]})]})]}),(0,qt.jsxs)(op,{className:"precescriptionFooter",sx:{mt:"auto"},children:[(0,qt.jsxs)(op,{pt:0,textAlign:"right",pr:2,mb:2,sx:{breakInside:"avoid"},children:[(0,qt.jsx)(op,{pb:.5,children:(0,qt.jsxs)(Cf,{component:"h1",fontWeight:"500",sx:{color:"#000000",fontSize:"30px"},children:["Dr. ",null===U||void 0===U?void 0:U.first_name," ",null===U||void 0===U?void 0:U.last_name]})}),(0,qt.jsx)(op,{pb:1,children:(0,qt.jsx)(Cf,{component:"span",fontWeight:"600",sx:{wordBreak:"break-word"},color:"#000000",children:null!==U&&void 0!==U&&null!==(I=U.attributes)&&void 0!==I&&I.qualification?null===U||void 0===U||null===(F=U.attributes)||void 0===F?void 0:F.qualification:""})}),(0,qt.jsx)(op,{pb:.5,children:(0,qt.jsx)(Cf,{component:"span",fontWeight:"500",color:"#000000",children:null!==U&&void 0!==U&&null!==($=U.attributes)&&void 0!==$&&$.registration?"Reg No. : ".concat(null===U||void 0===U||null===(B=U.attributes)||void 0===B?void 0:B.registration):""})})]}),(0,qt.jsxs)(op,{bgcolor:"#EBEEF2",mt:1,p:2,children:[(0,qt.jsx)(Cf,{component:"span",justifyContent:"left",display:"flex",fontSize:14,color:"#7E8491",sx:{breakInside:"avoid"},children:"Disclaimer : THIS WEBSITE DOES NOT PROVIDE MEDICAL ADVICE. The information, including but not limited to, text, graphics, images, and other material contained on this website is for informational purposes only. No material on this site is intended to be a substitute for a qualified medical professional. All analysis are subject to clinical interpretation by a qualified medical professional."}),(0,qt.jsx)(op,{mr:3.3,children:(0,qt.jsxs)(Cf,{component:"span",justifyContent:"center",display:"flex",fontSize:16,p:2,fontWeight:600,children:["Powered by ",(0,qt.jsx)("img",{src:cv,width:80,className:"powerdLogo"})]})})]})]})]})})});Sye.displayName="PrintPrescriptionNotes";const Aye=Sye;const kye=function(){const{t:e}=Vg(),t=so();return(0,qt.jsx)(op,{sx:{width:"100%"},children:(0,qt.jsx)(Ff,{container:!0,spacing:2,children:(0,qt.jsx)(Ff,{item:!0,xs:12,md:12,lg:12,children:(0,qt.jsxs)(yH,{variant:"outlined",children:[(0,qt.jsx)(nW,{title:(0,qt.jsx)(Cf,{variant:"h6",component:"h6",children:e("rpm_AddNewNote")}),sx:{py:1.5,bgcolor:"primary.theme.50"}}),(0,qt.jsx)(Kz,{initialValues:{title:"",vital:"",description:""},onSubmit:e=>console.log(e),enableReinitialize:!0,children:()=>(0,qt.jsx)(qt.Fragment,{children:(0,qt.jsxs)(nH,{children:[(0,qt.jsx)(wH,{children:(0,qt.jsx)(Ff,{container:!0,spacing:2,children:(0,qt.jsxs)(Ff,{item:!0,xs:12,md:6,lg:5,xl:4,children:[(0,qt.jsxs)(op,{mb:2.5,children:[(0,qt.jsx)(o_,{htmlFor:"first_name",required:!0,sx:{mb:.75},children:e("rpm_Title")}),(0,qt.jsx)(tH,{fullWidth:!0,as:qj,id:"title",name:"title",size:"small",color:"primary",endAdornment:(0,qt.jsx)(tw,{position:"end",children:(0,qt.jsx)(sy,{title:e("message:rpm_TitleHelp"),placement:"top",children:(0,qt.jsx)(wh,{size:"small",children:(0,qt.jsx)(pM.A,{fontSize:"small"})})})})}),(0,qt.jsx)(dH,{name:"title",children:t=>(0,qt.jsx)(v_,{error:!0,children:e(t,{field:e("rpm_Title")})})})]}),(0,qt.jsxs)(op,{mb:2.5,children:[(0,qt.jsx)(o_,{htmlFor:"vital",sx:{mb:.75},children:e("rpm_Vital")}),(0,qt.jsxs)(tH,{as:G_,fullWidth:!0,size:"small",margin:"dense",id:"vital",name:"vital",endAdornment:(0,qt.jsx)(tw,{position:"end",sx:{position:"absolute",right:"22px"},children:(0,qt.jsx)(sy,{title:e("message:rpm_VitalHelp"),placement:"top",children:(0,qt.jsx)(wh,{size:"small",children:(0,qt.jsx)(pM.A,{fontSize:"small"})})})}),children:[(0,qt.jsx)(mf,{value:"BP",sx:{flexDirection:"column",alignItems:"flex-start"},children:e("rpm_bp")}),(0,qt.jsx)(mf,{value:"GLUCOSE",sx:{flexDirection:"column",alignItems:"flex-start"},children:"GLUCOSE"}),(0,qt.jsx)(mf,{value:"SPO2",sx:{flexDirection:"column",alignItems:"flex-start"},children:"SPO2"})]}),(0,qt.jsx)(dH,{name:"vital",children:t=>(0,qt.jsx)(v_,{error:!0,children:e(t,{field:e("rpm_Vital")})})})]}),(0,qt.jsxs)(op,{children:[(0,qt.jsx)(o_,{htmlFor:"description",sx:{mb:.75},children:e("rpm_Description")}),(0,qt.jsx)(tH,{fullWidth:!0,as:qj,id:"description",name:"description",color:"primary",size:"small",multiline:!0,rows:4,endAdornment:(0,qt.jsx)(tw,{position:"end",children:(0,qt.jsx)(sy,{title:e("message:rpm_DescriptionHelp"),placement:"top",children:(0,qt.jsx)(wh,{size:"small",children:(0,qt.jsx)(pM.A,{fontSize:"small"})})})})}),(0,qt.jsx)(dH,{name:"description",children:t=>(0,qt.jsx)(v_,{error:!0,children:e(t,{field:e("rpm_Description")})})})]})]})})}),(0,qt.jsx)(qH,{sx:{p:2},children:(0,qt.jsxs)(Ff,{container:!0,spacing:2,children:[(0,qt.jsx)(Ff,{item:!0,children:(0,qt.jsx)(xh,{color:"primary",variant:"outlined",onClick:()=>t(-1),children:e("rpm_Cancel")})}),(0,qt.jsx)(Ff,{item:!0,children:(0,qt.jsx)(xh,{color:"primary",disableElevation:!0,variant:"contained",type:"submit",children:e("rpm_Submit")})})]})})]})})},"note_formik")]})})})})};const Tye=function(){return(0,qt.jsx)(kye,{})};var Eye=n(67445);function Mye(e){var t,n,r,o,a,s,l,c,d,u,p,h,m,f,g,v;let{handleInitialValues:x}=e;const{t:y}=Vg(),[b,j]=We.useState([]),_=e=>{const t=[],n=Object.keys(null===e||void 0===e?void 0:e.when);return null===e||void 0===e||e.when[n[0]].forEach(r=>{let i=Object.keys(r);var o,a,s,l,c,d;"0"!==i[0]?i[0]&&t.push({name:null!==(o=r[i[0]])&&void 0!==o&&o[0]?null===(a=r[i[0]])||void 0===a?void 0:a[0]:null,value:null!==(s=r[i[0]])&&void 0!==s&&s[1]?null===(l=r[i[0]])||void 0===l?void 0:l[1]:null,op:i[0],between:n[0]}):t.push({name:null===e||void 0===e||null===(c=e.when[n[0]])||void 0===c?void 0:c[0],value:null===e||void 0===e||null===(d=e.when[n[0]])||void 0===d?void 0:d[1],op:n[0]?n[0]:null})}),t};return We.useEffect(()=>{cs(x)||(()=>{const e=[];null===x||void 0===x||x.forEach(t=>{e.push((0,i.A)((0,i.A)({},t),{},{data:_(t)}))}),j(e)})()},[x]),(0,qt.jsx)(op,{children:(0,qt.jsx)(Vw,{sx:{borderRadius:2},children:(0,qt.jsxs)(Bw,{children:[(0,qt.jsxs)(_S,{children:[(0,qt.jsxs)(cw,{sx:{"& .MuiTableCell-head":{border:1,borderColor:"#ddd",fontWeight:"600",bgcolor:"primary.theme.50",padding:.5}},children:[(0,qt.jsx)(gw,{align:"center",rowSpan:2,colSpan:2,children:y("rpm_Stages")}),(0,qt.jsx)(gw,{align:"center",colSpan:2,children:y("rpm_Systolic")}),(0,qt.jsx)(gw,{align:"center",colSpan:3,children:y("rpm_Diastolic")}),(0,qt.jsx)(gw,{align:"center",rowSpan:2,colSpan:2,children:y("rpm_BpRange(Sys/Dia)")})]}),(0,qt.jsx)(cw,{className:"inner_head",sx:{"& .MuiTableCell-head:first-of-type":{display:"none"},"& .MuiTableCell-head":{border:1,borderColor:"#ddd"},bgcolor:"primary.theme.50"},children:[{id:"stages",align:"left"},{id:"from1",label:"From",align:"left"},{id:"to1",label:"To",align:"left"},{id:"from2",label:"From",align:"left"},{id:"to2",label:"To",align:"left"}].map(e=>(0,qt.jsx)(gw,{align:"center",style:{top:57,minWidth:e.minWidth},colSpan:"1",children:y("rpm_".concat(e.label))},e.id))})]}),(0,qt.jsxs)(fS,{children:[null===b||void 0===b?void 0:b.map((e,t)=>{var n,r,i,o,a,s,l,c,d,u,p,h,m,f;return(0,qt.jsxs)(cw,{sx:{"& .MuiTableCell-body":{border:1,borderColor:"#ddd",padding:1}},children:[(0,qt.jsx)(gw,{align:"center",colSpan:"2",className:"tableColor ".concat(e.name),children:y("rpm_".concat(e.name))}),(0,qt.jsxs)(gw,{align:"center",colSpan:"1",children:[0===t&&b[t].data[0].value,!(0===t||t===b.length-1)&&e.data[0].value,t===b.length-1&&"-"]}),(0,qt.jsxs)(gw,{align:"center",colSpan:"1",children:[0===t?"-":!(t===b.length-1)&&(null===(n=b[t-1])||void 0===n||null===(r=n.data[0])||void 0===r?void 0:r.value)-1,t===b.length-1&&(null===e||void 0===e||null===(i=e.data[0])||void 0===i?void 0:i.value)]}),(0,qt.jsxs)(gw,{align:"center",colSpan:"1",children:[0===t&&b[t].data[1].value,!(0===t||t===b.length-1||3===t)&&e.data[1].value,(t===b.length-1||3===t)&&"-"]}),(0,qt.jsxs)(gw,{align:"center",colSpan:"2",children:[0===t?"-":!(t===b.length-1)&&(null===(o=b[t-1])||void 0===o||null===(a=o.data[1])||void 0===a?void 0:a.value)-1,t===b.length-1&&(null===e||void 0===e||null===(s=e.data[1])||void 0===s?void 0:s.value)]}),(0,qt.jsxs)(gw,{align:"center",colSpan:"2",children:[0===t&&"".concat(b[t].data[0].value," & Above"),!(0===t||t===b.length-1)&&"".concat(null===(l=b[t])||void 0===l||null===(c=l.data[0])||void 0===c?void 0:c.value,"\n                        -\n                        ").concat((null===(d=b[t-1])||void 0===d||null===(u=d.data[0])||void 0===u?void 0:u.value)-1),t===b.length-1&&"Below or ".concat(e.data[0].value)," / ",0===t&&"".concat(b[t].data[1].value," & Above"),!(0===t||t===b.length-1||3===t)&&"".concat(null===(p=b[t])||void 0===p||null===(h=p.data[1])||void 0===h?void 0:h.value,"\n                        -\n                        ").concat((null===(m=b[t-1])||void 0===m||null===(f=m.data[1])||void 0===f?void 0:f.value)-1),(t===b.length-1||3===t)&&"Below or ".concat(e.data[1].value)]})]},e.salience)}),!cs(b)&&(0,qt.jsxs)(cw,{sx:{"& .MuiTableCell-body":{border:1,borderColor:"#ddd",p:1}},children:[(0,qt.jsx)(gw,{align:"center",colSpan:"2",className:"tableColor normal",children:y("rpm_NormalPressure")}),(0,qt.jsx)(gw,{align:"center",colSpan:"1",children:(null===(t=b[(null===b||void 0===b?void 0:b.length)-1])||void 0===t||null===(n=t.data[0])||void 0===n?void 0:n.value)+1}),(0,qt.jsx)(gw,{align:"center",colSpan:"1",children:(null===(r=b[(null===b||void 0===b?void 0:b.length)-2])||void 0===r||null===(o=r.data[0])||void 0===o?void 0:o.value)-1}),(0,qt.jsx)(gw,{align:"center",colSpan:"1",children:(null===(a=b[(null===b||void 0===b?void 0:b.length)-1])||void 0===a||null===(s=a.data[1])||void 0===s?void 0:s.value)+1}),(0,qt.jsx)(gw,{align:"center",colSpan:"2",children:(null===(l=b[(null===b||void 0===b?void 0:b.length)-2])||void 0===l||null===(c=l.data[1])||void 0===c?void 0:c.value)-1}),(0,qt.jsxs)(gw,{align:"center",colSpan:"2",children:[(null===(d=b[(null===b||void 0===b?void 0:b.length)-1])||void 0===d||null===(u=d.data[0])||void 0===u?void 0:u.value)+1," "," - ",(null===(p=b[(null===b||void 0===b?void 0:b.length)-2])||void 0===p||null===(h=p.data[0])||void 0===h?void 0:h.value)-1," "," / ",(null===(m=b[(null===b||void 0===b?void 0:b.length)-1])||void 0===m||null===(f=m.data[1])||void 0===f?void 0:f.value)+1," "," - ",(null===(g=b[(null===b||void 0===b?void 0:b.length)-2])||void 0===g||null===(v=g.data[1])||void 0===v?void 0:v.value)-1]})]})]})]})})})}const Oye=(0,We.memo)(Mye);var Rye=n(17555),Pye=n(54469);const Dye=ep({defaultClassName:(0,ar.A)("MuiBox",["root"]).root,generateClassName:tp.A.generate});const Nye=function(e){let{tags:t,diastolic:n,setDiastolic:r,getPercentage:o,limitNumberWithinRange:a,nearestN:s,styles:l}=e;const{t:c}=Vg(),[d,u]=We.useState(["CheckLowBP"]),p=e=>{const t=e.currentTarget.attributes["data-id"].value;d.includes(t)?u(d.filter(e=>e!==t)):u(()=>[t])},h=(0,We.useRef)(null),m=(e,t)=>{e.stopPropagation(),document.body.style.cursor="ew-resize";const i=e.pageX,l=h.current.offsetWidth,c=e=>{e.stopPropagation();const c=(e.touches?e.touches[0].pageX:e.pageX)-i,d=n[t]+n[t+1],u=s(1,o(l,c)),p=n.slice(),h=p[t],m=a(h+u,0,d);if(p[t]=m,m<10)return!1;r(p)};window.addEventListener("pointermove",c),window.addEventListener("touchmove",c);const d=e=>{e.stopPropagation(),document.body.style.cursor="initial",window.removeEventListener("pointermove",c),window.removeEventListener("touchmove",c)};window.addEventListener("touchend",d),window.addEventListener("pointerup",d)},f=e=>{let{tag:t,width:n,onSystolicSliderSelect:r,noSliderButton:o,previousWidth:a,rangeIndex:s}=e;return(0,qt.jsx)(Dye,{className:"tag",style:l.tag,sx:{background:t.color,width:o?"30px":"20%"},onClick:p,"data-id":t.id,children:(0,qt.jsxs)(Dye,{children:[(0,qt.jsx)(Cf,{style:l.tagText,children:t.name}),(0,qt.jsx)(Cf,{style:(0,i.A)((0,i.A)({},l.tagText),{},{fontSize:12}),children:0===s||2===s?"Below or ".concat(n):5===s?" ".concat(n," & Above"):6===s?n:" ".concat(a+1," - ").concat(n)}),!o&&d.includes(t.id.toString())?(0,qt.jsx)(sy,{title:"Drag to adjust",children:(0,qt.jsxs)(Dye,{className:"slider-button",style:l.sliderButton,onPointerDown:r,children:[(0,qt.jsx)(Pye.A,{fontSize:"small",sx:{transform:"rotate(180deg)",position:"relative",left:"6px"}}),(0,qt.jsx)(Pye.A,{fontSize:"small",sx:{position:"relative",right:"6px"}})]})}):!o&&(0,qt.jsx)(sy,{title:"Click to unlock",children:(0,qt.jsx)(Dye,{className:"slider-button",style:l.sliderButton,children:(0,qt.jsx)(Rye.A,{fontSize:"small"})})})]})})};return(0,qt.jsxs)(qt.Fragment,{children:[(0,qt.jsx)(Dye,{ref:h,sx:{width:"100%",display:"flex",backgroundColor:"transparent",flexDirection:"row"},children:t.map((e,r)=>(0,qt.jsx)(We.Fragment,{children:(0,qt.jsx)(f,{width:n[r],noSliderButton:r===t.length-1,tag:e,onSystolicSliderSelect:e=>m(e,r),previousWidth:n[r-1],nextWidth:n[r+1],rangeIndex:r},r)},r))}),(0,qt.jsx)(Cf,{variant:"body1",fontWeight:600,sx:{mt:.5,mb:3},children:c("rpm_DiastolicRange")})]})};const Lye=function(e){let{tags:t,fastingRange:n,setFastingRange:r,getPercentage:o,limitNumberWithinRange:a,nearestN:s,styles:l}=e;const{t:c}=Vg(),[d,u]=We.useState(["Hypoglycemia"]),p=e=>{const t=e.currentTarget.attributes["data-id"].value;d.includes(t)?u(d.filter(e=>e!==t)):u(()=>[t])},h=(0,We.useRef)(null),m=(e,t)=>{e.stopPropagation(),document.body.style.cursor="ew-resize";const i=e.pageX,l=h.current.offsetWidth,c=e=>{e.stopPropagation();const c=(e.touches?e.touches[0].pageX:e.pageX)-i,d=n[t]+n[t+1],u=s(1,o(l,c)),p=n.slice(),h=p[t],m=a(h+u,0,d);if(p[t]=m,m<10)return!1;r(p)};window.addEventListener("pointermove",c),window.addEventListener("touchmove",c);const d=e=>{e.stopPropagation(),document.body.style.cursor="initial",window.removeEventListener("pointermove",c),window.removeEventListener("touchmove",c)};window.addEventListener("touchend",d),window.addEventListener("pointerup",d)},f=e=>{let{tag:t,width:n,onFastingRangeSelect:r,noSliderButton:o,previousWidth:a,rangeIndex:s}=e;return(0,qt.jsx)(Dye,{className:"tag",style:l.tag,sx:{background:t.color,width:o?"30px":"25%"},onClick:p,"data-id":t.id,children:(0,qt.jsxs)(Dye,{children:[(0,qt.jsx)(Cf,{style:l.tagText,children:t.name}),(0,qt.jsx)(Cf,{style:(0,i.A)((0,i.A)({},l.tagText),{},{fontSize:12}),children:0===s?"Below or ".concat(n):3===s?" ".concat(n," & Above"):" ".concat(a+1," - ").concat(n)}),!o&&d.includes(t.id.toString())?(0,qt.jsx)(sy,{title:"Drag to adjust",children:(0,qt.jsxs)(Dye,{className:"slider-button",style:l.sliderButton,onPointerDown:r,children:[(0,qt.jsx)(Pye.A,{fontSize:"small",sx:{transform:"rotate(180deg)",position:"relative",left:"6px"}}),(0,qt.jsx)(Pye.A,{fontSize:"small",sx:{position:"relative",right:"6px"}})]})}):!o&&(0,qt.jsx)(sy,{title:"Click to unlock",children:(0,qt.jsx)(Dye,{className:"slider-button",style:l.sliderButton,children:(0,qt.jsx)(Rye.A,{fontSize:"small"})})})]})})};return(0,qt.jsxs)(qt.Fragment,{children:[(0,qt.jsx)(Cf,{variant:"body1",fontWeight:600,sx:{mb:.5},children:c("rpm_fasting")}),(0,qt.jsx)(Dye,{ref:h,sx:{width:"100%",display:"flex",backgroundColor:"transparent",flexDirection:"row"},children:t.map((e,r)=>(0,qt.jsx)(We.Fragment,{children:(0,qt.jsx)(f,{width:n[r],noSliderButton:r===t.length-1,onFastingRangeSelect:e=>m(e,r),tag:e,previousWidth:n[r-1],nextWidth:n[r+1],rangeIndex:r},r)},r))})]})};const Iye=function(e){let{tags:t,ppRange:n,setPPRange:r,getPercentage:o,limitNumberWithinRange:a,nearestN:s,styles:l}=e;const{t:c}=Vg(),[d,u]=We.useState(["Hypoglycemia"]),p=e=>{const t=e.currentTarget.attributes["data-id"].value;d.includes(t)?u(d.filter(e=>e!==t)):u(()=>[t])},h=(0,We.useRef)(null),m=(e,t)=>{e.stopPropagation(),document.body.style.cursor="ew-resize";const i=e.pageX,l=h.current.offsetWidth,c=e=>{e.stopPropagation();const c=(e.touches?e.touches[0].pageX:e.pageX)-i,d=n[t]+n[t+1],u=s(1,o(l,c)),p=n.slice(),h=p[t],m=a(h+u,0,d);if(p[t]=m,m<10)return!1;r(p)};window.addEventListener("pointermove",c),window.addEventListener("touchmove",c);const d=e=>{e.stopPropagation(),document.body.style.cursor="initial",window.removeEventListener("pointermove",c),window.removeEventListener("touchmove",c)};window.addEventListener("touchend",d),window.addEventListener("pointerup",d)},f=e=>{let{tag:t,width:n,onPPRangeSelect:r,noSliderButton:o,previousWidth:a,rangeIndex:s}=e;return(0,qt.jsx)(Dye,{className:"tag",style:l.tag,sx:{background:t.color,width:o?"30px":"25%"},onClick:p,"data-id":t.id,children:(0,qt.jsxs)(Dye,{children:[(0,qt.jsx)(Cf,{style:l.tagText,children:t.name}),(0,qt.jsx)(Cf,{style:(0,i.A)((0,i.A)({},l.tagText),{},{fontSize:12}),children:0===s?"Below or ".concat(n):3===s?" ".concat(n," & Above"):" ".concat(a+1," - ").concat(n)}),!o&&d.includes(t.id.toString())?(0,qt.jsx)(sy,{title:"Drag to adjust",children:(0,qt.jsxs)(Dye,{className:"slider-button",style:l.sliderButton,onPointerDown:r,children:[(0,qt.jsx)(Pye.A,{fontSize:"small",sx:{transform:"rotate(180deg)",position:"relative",left:"6px"}}),(0,qt.jsx)(Pye.A,{fontSize:"small",sx:{position:"relative",right:"6px"}})]})}):!o&&(0,qt.jsx)(sy,{title:"Click to unlock",children:(0,qt.jsx)(Dye,{className:"slider-button",style:l.sliderButton,children:(0,qt.jsx)(Rye.A,{fontSize:"small"})})})]})})};return(0,qt.jsxs)(qt.Fragment,{children:[(0,qt.jsx)(Dye,{ref:h,sx:{width:"100%",display:"flex",backgroundColor:"transparent",flexDirection:"row"},children:t.map((e,r)=>(0,qt.jsx)(We.Fragment,{children:(0,qt.jsx)(f,{width:n[r],noSliderButton:r===t.length-1,onPPRangeSelect:e=>m(e,r),tag:e,previousWidth:n[r-1],nextWidth:n[r+1],rangeIndex:r},r)},r))}),(0,qt.jsx)(Cf,{variant:"body1",fontWeight:600,sx:{mt:.5,mb:3},children:c("rpm_nonfasting")})]})};const Fye=function(e){let{styles:t,fastingRange:n,setFastingRange:r,getPercentage:i,limitNumberWithinRange:o,nearestN:a,ppRange:s,setPPRange:l,glucoseTags:c,setGlucoseTags:d}=e;return(0,qt.jsxs)(qt.Fragment,{children:[(0,qt.jsx)(Lye,{tags:c,setTags:d,fastingRange:n,setFastingRange:r,getPercentage:i,limitNumberWithinRange:o,nearestN:a,styles:t}),(0,qt.jsx)(op,{my:.5}),(0,qt.jsx)(Iye,{tags:c,setTags:d,ppRange:s,setPPRange:l,getPercentage:i,limitNumberWithinRange:o,nearestN:a,styles:t})]})};const $ye=function(e){var t,n,r,o,a,s,l,c,d,u,p,h,m;let{handleInitialValues:f}=e;const{t:g}=Vg(),[v,x]=We.useState(null),y=e=>{const t=[],n=Object.keys(null===e||void 0===e?void 0:e.when);return null===e||void 0===e||e.when[n[0]].forEach(r=>{let i=Object.keys(r);var o,a,s,l,c,d;"0"!==i[0]?i[0]&&t.push({name:null!==(o=r[i[0]])&&void 0!==o&&o[0]?null===(a=r[i[0]])||void 0===a?void 0:a[0]:null,value:null!==(s=r[i[0]])&&void 0!==s&&s[1]?null===(l=r[i[0]])||void 0===l?void 0:l[1]:null,op:i[0],between:n[0]}):t.push({name:null===e||void 0===e||null===(c=e.when[n[0]])||void 0===c?void 0:c[0],value:null===e||void 0===e||null===(d=e.when[n[0]])||void 0===d?void 0:d[1],op:n[0]?n[0]:null})}),t};return We.useEffect(()=>{(()=>{const e=[];null===f||void 0===f||f.forEach(t=>{e.push((0,i.A)((0,i.A)({},t),{},{data:y(t)}))}),x(e)})()},[f]),(0,qt.jsx)(op,{children:(0,qt.jsx)(Vw,{sx:{borderRadius:2},children:(0,qt.jsxs)(Bw,{children:[(0,qt.jsx)(_S,{children:(0,qt.jsxs)(cw,{sx:{"& .MuiTableCell-head":{border:1,borderColor:"#ddd",fontWeight:"600",bgcolor:"primary.theme.50",padding:.5}},children:[(0,qt.jsx)(gw,{align:"center",rowSpan:2,colSpan:2,children:g("rpm_Stages")}),(0,qt.jsx)(gw,{align:"center",rowSpan:2,colSpan:2,children:g("rpm_Activity")}),(0,qt.jsx)(gw,{align:"center",colSpan:2,children:g("rpm_From")}),(0,qt.jsx)(gw,{align:"center",colSpan:2,children:g("rpm_To")}),(0,qt.jsx)(gw,{align:"center",colSpan:2,children:g("rpm_Range")})]})}),(0,qt.jsxs)(fS,{children:[(0,qt.jsxs)(qt.Fragment,{children:[(0,qt.jsxs)(cw,{sx:{"& .MuiTableCell-body":{border:1,borderColor:"#ddd",p:1}},children:[(0,qt.jsx)(gw,{align:"center",colSpan:"2",className:"tableColor normalGlucose",children:g("rpm_normalfasting")}),(0,qt.jsx)(gw,{align:"center",colSpan:"2",className:"tableColor fasting",children:(0,qt.jsx)(dM,{severity:"error",icon:!1,sx:e=>({py:0,px:1,display:"inline-flex",fontSize:e.spacing(1.5),"& .MuiAlert-message":{p:e.spacing(.5,0)},bgcolor:"customClr.fastingBg",color:"customClr.fastingText"}),children:(0,qt.jsx)("strong",{children:g("rpm_fasting")})})}),(0,qt.jsx)(gw,{align:"center",colSpan:"2",children:(null===v||void 0===v||null===(t=v[2])||void 0===t||null===(n=t.data[0])||void 0===n?void 0:n.value)+1}),(0,qt.jsx)(gw,{align:"center",colSpan:"2",children:(null===v||void 0===v||null===(r=v[1])||void 0===r||null===(o=r.data[0])||void 0===o?void 0:o.value)-1}),(0,qt.jsxs)(gw,{align:"center",colSpan:"2",children:[(null===v||void 0===v||null===(a=v[2])||void 0===a||null===(s=a.data[0])||void 0===s?void 0:s.value)+1," "," - ",(null===v||void 0===v||null===(l=v[1])||void 0===l||null===(c=l.data[0])||void 0===c?void 0:c.value)-1]})]}),(0,qt.jsxs)(cw,{sx:{"& .MuiTableCell-body":{border:1,borderColor:"#ddd",borderBottom:2,borderBottomColor:"#bbb",p:1}},children:[(0,qt.jsx)(gw,{align:"center",colSpan:"2",className:"tableColor normalGlucose",children:g("rpm_normalpp")}),(0,qt.jsx)(gw,{align:"center",colSpan:"2",className:"tableColor nonfasting",children:(0,qt.jsx)(dM,{icon:!1,sx:e=>({py:0,px:1,display:"inline-flex",fontSize:e.spacing(1.5),"& .MuiAlert-message":{p:e.spacing(.5,0)},bgcolor:"customClr.nonfastingBg",color:"customClr.nonfastingText"}),children:(0,qt.jsx)("strong",{children:g("rpm_nonfasting")})})}),(0,qt.jsx)(gw,{align:"center",colSpan:"2",children:(null===v||void 0===v||null===(d=v[5])||void 0===d?void 0:d.data[0].value)+1}),(0,qt.jsx)(gw,{align:"center",colSpan:"2",children:(null===v||void 0===v||null===(u=v[4])||void 0===u?void 0:u.data[0].value)-1}),(0,qt.jsxs)(gw,{align:"center",colSpan:"2",children:[(null===v||void 0===v||null===(p=v[5])||void 0===p?void 0:p.data[0].value)+1," "," - ",(null===v||void 0===v||null===(h=v[4])||void 0===h?void 0:h.data[0].value)-1]})]})]}),null===v||void 0===v||null===(m=v.slice(0,6))||void 0===m?void 0:m.map((e,t)=>{var n,r,i,o;return(0,qt.jsxs)(cw,{sx:{"& .MuiTableCell-body":{border:1,borderColor:"#ddd",p:1}},children:[(0,qt.jsx)(gw,{align:"center",colSpan:"2",className:"tableColor ".concat(e.name),children:g("rpm_".concat(e.name.toLowerCase()))}),(0,qt.jsx)(gw,{align:"center",colSpan:"2",className:"tableColor ".concat("eq"==e.data[(null===e||void 0===e||null===(n=e.data)||void 0===n?void 0:n.length)-1].op?"fasting":"nonfasting"),children:"eq"===e.data[(null===e||void 0===e||null===(r=e.data)||void 0===r?void 0:r.length)-1].op?(0,qt.jsx)(dM,{severity:"error",icon:!1,sx:e=>({py:0,px:1,display:"inline-flex",fontSize:e.spacing(1.5),"& .MuiAlert-message":{p:e.spacing(.5,0)},bgcolor:"customClr.fastingBg",color:"customClr.fastingText"}),children:(0,qt.jsx)("strong",{children:g("rpm_fasting")})}):(0,qt.jsx)(dM,{icon:!1,sx:e=>({py:0,px:1,display:"inline-flex",fontSize:e.spacing(1.5),"& .MuiAlert-message":{p:e.spacing(.5,0)},bgcolor:"customClr.nonfastingBg",color:"customClr.nonfastingText"}),children:(0,qt.jsx)("strong",{children:g("rpm_nonfasting")})})}),(0,qt.jsx)(gw,{align:"center",colSpan:"2",children:"HypoglycemiaFasting"==e.name||"HypoglycemiaPP"==e.name?"-":e.data[0].value}),(0,qt.jsx)(gw,{align:"center",colSpan:"2",children:0===t||3===t?"-":e.data[(null===e||void 0===e||null===(i=e.data)||void 0===i?void 0:i.length)-2].value}),(0,qt.jsxs)(gw,{align:"center",colSpan:"2",children:["HypoglycemiaFasting"==e.name||"HypoglycemiaPP"==e.name?"Below":e.data[0].value," ","-"," ","DiabetesFasting"==e.name||"DiabetesPP"==e.name?"Above":e.data[(null===e||void 0===e||null===(o=e.data)||void 0===o?void 0:o.length)-2].value]})]},e.salience)})]})]})})})};const Bye=function(e){let{tags:t,pulse:n,setPulse:r,getPercentage:o,limitNumberWithinRange:a,nearestN:s,styles:l}=e;const{t:c}=Vg(),[d,u]=We.useState(["LowPulse"]),p=e=>{const t=e.currentTarget.attributes["data-id"].value;d.includes(t)?u(d.filter(e=>e!==t)):u(()=>[t])},h=(0,We.useRef)(null),m=(e,t)=>{e.stopPropagation(),document.body.style.cursor="ew-resize";const i=e.pageX,l=h.current.offsetWidth,c=e=>{e.stopPropagation();const c=(e.touches?e.touches[0].pageX:e.pageX)-i,d=n[t]+n[t+1],u=s(1,o(l,c)),p=n.slice(),h=p[t],m=a(h+u,0,d);if(p[t]=m,m<10)return!1;r(p)};window.addEventListener("pointermove",c),window.addEventListener("touchmove",c);const d=e=>{e.stopPropagation(),document.body.style.cursor="initial",window.removeEventListener("pointermove",c),window.removeEventListener("touchmove",c)};window.addEventListener("touchend",d),window.addEventListener("pointerup",d)},f=e=>{let{tag:t,width:n,onPulseSliderSelect:r,noSliderButton:o,rangeIndex:a,previousWidth:s}=e;return(0,qt.jsx)(Dye,{className:"tag",style:l.tag,sx:{background:t.color,width:o?"30px":"33%"},onClick:p,"data-id":t.id,children:(0,qt.jsxs)(Dye,{children:[(0,qt.jsx)(Cf,{style:l.tagText,children:t.name}),(0,qt.jsx)(Cf,{style:(0,i.A)((0,i.A)({},l.tagText),{},{fontSize:12}),children:0===a?"Below or ".concat(n):1===a?" ".concat(s+1," - ").concat(n):" ".concat(n," & Above")}),!o&&d.includes(t.id.toString())?(0,qt.jsx)(sy,{title:"Drag to adjust",children:(0,qt.jsxs)(Dye,{className:"slider-button",style:l.sliderButton,onPointerDown:r,children:[(0,qt.jsx)(Pye.A,{fontSize:"small",sx:{transform:"rotate(180deg)",position:"relative",left:"6px"}}),(0,qt.jsx)(Pye.A,{fontSize:"small",sx:{position:"relative",right:"6px"}})]})}):!o&&(0,qt.jsx)(sy,{title:"Click to unlock",children:(0,qt.jsx)(Dye,{className:"slider-button",style:l.sliderButton,children:(0,qt.jsx)(Rye.A,{fontSize:"small"})})})]})})};return(0,qt.jsxs)(qt.Fragment,{children:[(0,qt.jsx)(Cf,{variant:"body1",fontWeight:600,sx:{mb:1.5},children:c("rpm_PulseRange")}),(0,qt.jsx)(Dye,{ref:h,sx:{width:"100%",display:"flex",backgroundColor:"transparent",flexDirection:"row"},children:t.map((e,r)=>(0,qt.jsx)(We.Fragment,{children:(0,qt.jsx)(f,{width:n[r],noSliderButton:r===t.length-1,tag:e,onPulseSliderSelect:e=>m(e,r),rangeIndex:r,nextWidth:n[r+1],previousWidth:n[r-1]},r)},r))})]})};const zye=function(e){let{handleInitialValues:t,pulse:n}=e;const{t:r}=Vg(),[o,a]=We.useState([]),s=e=>{const t=[],n=Object.keys(null===e||void 0===e?void 0:e.when);return null===e||void 0===e||e.when[n[0]].forEach(r=>{let i=Object.keys(r);var o,a,s,l,c,d;"0"!==i[0]?i[0]&&t.push({name:null!==(o=r[i[0]])&&void 0!==o&&o[0]?null===(a=r[i[0]])||void 0===a?void 0:a[0]:null,value:null!==(s=r[i[0]])&&void 0!==s&&s[1]?null===(l=r[i[0]])||void 0===l?void 0:l[1]:null,op:i[0],between:n[0]}):t.push({name:null===e||void 0===e||null===(c=e.when[n[0]])||void 0===c?void 0:c[0],value:null===e||void 0===e||null===(d=e.when[n[0]])||void 0===d?void 0:d[1],op:n[0]?n[0]:null})}),t};return We.useEffect(()=>{cs(t)||(()=>{const e=[];null===t||void 0===t||t.forEach(t=>{e.push((0,i.A)((0,i.A)({},t),{},{data:s(t)}))}),a(e)})()},[t]),(0,qt.jsx)(op,{children:(0,qt.jsx)(Vw,{sx:{borderRadius:2,mt:2},children:(0,qt.jsxs)(Bw,{children:[(0,qt.jsx)(_S,{children:(0,qt.jsxs)(cw,{sx:{"& .MuiTableCell-head":{border:1,borderColor:"#ddd",fontWeight:"600",bgcolor:"primary.theme.50",padding:.5}},children:[(0,qt.jsx)(gw,{align:"center",children:r("rpm_Stages")}),(0,qt.jsx)(gw,{align:"center",children:r("rpm_From")}),(0,qt.jsx)(gw,{align:"center",children:r("rpm_To")}),(0,qt.jsx)(gw,{align:"center",children:r("rpm_Range")})]})}),(0,qt.jsxs)(fS,{children:[null===o||void 0===o?void 0:o.map((e,t)=>(0,qt.jsxs)(cw,{sx:{"& .MuiTableCell-body":{border:1,borderColor:"#ddd",padding:1}},children:[(0,qt.jsx)(gw,{align:"center",className:"tableColor ".concat(e.name),children:r("rpm_".concat(e.name))}),(0,qt.jsxs)(gw,{align:"center",children:[0===t&&o[t].data[0].value,!(0===t||t===o.length-1)&&o[t+1].data[0].value+1,t==o.length-1&&"-"]}),(0,qt.jsx)(gw,{align:"center",children:0===t?"-":e.data[0].value}),(0,qt.jsxs)(gw,{align:"center",children:[0===t&&"".concat(o[t].data[0].value," & Above"),!(0===t||t===o.length-1)&&o[t+1].data[0].value+1+"-"+o[t].data[0].value,t==o.length-1&&"Below or ".concat(e.data[0].value)]})]},e.salience)),!cs(o)&&(0,qt.jsxs)(cw,{sx:{"& .MuiTableCell-body":{border:1,borderColor:"#ddd",p:1}},children:[(0,qt.jsx)(gw,{align:"center",className:"tableColor normal",children:r("rpm_NormalPulse")}),(0,qt.jsx)(gw,{align:"center",children:n[0]+1}),(0,qt.jsx)(gw,{align:"center",children:n[1]}),(0,qt.jsxs)(gw,{align:"center",children:[n[0]+1," - ",n[1]]})]})]})]})})})};const Hye=function(e){var t;let{openModal:n,onCloseModal:r}=e;const{t:i}=Vg();return(0,qt.jsxs)(cC,{fullWidth:!0,maxWidth:"sm",open:n.open,onClose:r,scroll:"paper",children:[(0,qt.jsx)(fC,{children:i("rpm_ErrorInSlider")}),(0,qt.jsxs)(bC,{children:[(0,qt.jsx)(Ff,{container:!0,spacing:2,children:(0,qt.jsx)(Ff,{item:!0,xs:12,children:(0,qt.jsx)(op,{sx:{p:2,borderRadius:1,border:"1px dashed #818181"},children:(0,qt.jsxs)(op,{mb:3,children:[(0,qt.jsx)(Cf,{variant:"body1",children:"Invalid range detected. Kindly review range selected for:"}),null===n||void 0===n||null===(t=n.data)||void 0===t?void 0:t.map((e,t)=>(0,qt.jsxs)(v_,{error:!0,children:["\u2022 ","".concat(e.name," -> ").concat(i("rpm_".concat(e.rule)))]},t))]})})})}),(0,qt.jsx)(op,{mt:2.5,children:(0,qt.jsx)(Ff,{container:!0,spacing:2,children:(0,qt.jsx)(Ff,{item:!0,children:(0,qt.jsx)(xh,{variant:"outlined",color:"error",disableElevation:!0,onClick:r,children:i("rpm_Cancel")})})})})]})]})};const Wye=function(e){let{tags:t,systolic:n,setSystolic:r,getPercentage:o,limitNumberWithinRange:a,nearestN:s,styles:l}=e;const{t:c}=Vg(),d=(0,We.useRef)(null),[u,p]=We.useState(["CheckLowBP"]),h=e=>{const t=e.currentTarget.attributes["data-id"].value;u.includes(t)?p(u.filter(e=>e!==t)):p(()=>[t])},m=(e,t)=>{e.stopPropagation(),document.body.style.cursor="ew-resize";const i=e.pageX,l=d.current.offsetWidth,c=e=>{e.stopPropagation();const c=(e.touches?e.touches[0].pageX:e.pageX)-i,d=n[t]+n[t+1],u=s(1,o(l,c)),p=n.slice(),h=p[t],m=a(h+u,0,d);if(p[t]=m,m<10)return!1;r(p)};window.addEventListener("pointermove",c),window.addEventListener("touchmove",c);const u=e=>{e.stopPropagation(),document.body.style.cursor="initial",window.removeEventListener("pointermove",c),window.removeEventListener("touchmove",c)};window.addEventListener("touchend",u),window.addEventListener("pointerup",u)},f=e=>{let{width:t,onSystolicSliderSelect:n,noSliderButton:r,tag:o,previousWidth:a,rangeIndex:s}=e;return(0,qt.jsx)(Dye,{className:"tag",style:l.tag,sx:{background:o.color,width:r?"30px":"20%"},onClick:h,"data-id":o.id,children:(0,qt.jsxs)(Dye,{children:[(0,qt.jsx)(Cf,{style:l.tagText,children:o.name}),(0,qt.jsx)(Cf,{style:(0,i.A)((0,i.A)({},l.tagText),{},{fontSize:12}),children:0===s?"Below or ".concat(t):5===s?" ".concat(t," & Above"):6===s?t:" ".concat(a+1," - ").concat(t)}),!r&&u.includes(o.id.toString())?(0,qt.jsx)(sy,{title:"Drag to adjust",children:(0,qt.jsxs)(Dye,{className:"slider-button",style:l.sliderButton,onPointerDown:n,children:[(0,qt.jsx)(Pye.A,{fontSize:"small",sx:{transform:"rotate(180deg)",position:"relative",left:"6px"}}),(0,qt.jsx)(Pye.A,{fontSize:"small",sx:{position:"relative",right:"6px"}})]})}):!r&&(0,qt.jsx)(sy,{title:"Click to unlock",children:(0,qt.jsx)(Dye,{className:"slider-button",style:l.sliderButton,children:(0,qt.jsx)(Rye.A,{fontSize:"small"})})})]})})};return(0,qt.jsxs)(qt.Fragment,{children:[(0,qt.jsx)(Cf,{variant:"body1",fontWeight:600,sx:{mb:.5},children:c("rpm_SystolicRange")}),(0,qt.jsx)(Dye,{ref:d,sx:{width:"100%",display:"flex",backgroundColor:"transparent",flexDirection:"row"},children:t.map((e,r)=>(0,qt.jsx)(We.Fragment,{children:(0,qt.jsx)(f,{width:n[r],previousWidth:n[r-1],nextWidth:n[r+1],noSliderButton:r===t.length-1,onSystolicSliderSelect:e=>m(e,r),tag:e,rangeIndex:r},r)},r))})]})};const Uye=function(e){var t,n,r,o,a,s,l,c,d,u,p,h,m,f,g,v,x,y;let{addNewRule:b,addNewRuleGlucose:j,patientData:_,program:C,addNewPulseRule:w}=e;const S=wt(uu),A=[{id:"CheckLowBP",name:"Low Blood Pressure",color:null===Qde||void 0===Qde||null===(t=Qde.palette)||void 0===t?void 0:t.amber[400]},{id:"NormalBP",name:"Normal Blood Pressure",color:null===Qde||void 0===Qde||null===(n=Qde.palette)||void 0===n?void 0:n.green[400]},{id:"ElevatedBloodPressure",name:"Elevated Blood Pressure",color:null===Qde||void 0===Qde||null===(r=Qde.palette)||void 0===r?void 0:r.orange[300]},{id:"Hypertension_Stage1",name:"Hypertension Stage 1",color:null===Qde||void 0===Qde||null===(o=Qde.palette)||void 0===o?void 0:o.orange[600]},{id:"Hypertensive_Stage2",name:"Hypertensive Stage 2",color:null===Qde||void 0===Qde||null===(a=Qde.palette)||void 0===a?void 0:a.red[400]},{id:"Hypertensive_Crisis",name:"Hypertensive Crisis",color:null===Qde||void 0===Qde||null===(s=Qde.palette)||void 0===s?void 0:s.red[600]},{id:"extra_space",name:"More Space",color:"white"}],k=[{id:"Bradycardia",name:"Bradycardia",color:null===Qde||void 0===Qde||null===(l=Qde.palette)||void 0===l?void 0:l.amber[400]},{id:"NormalPulse",name:"Normal pulse",color:null===Qde||void 0===Qde||null===(c=Qde.palette)||void 0===c?void 0:c.green[400]},{id:"Tachycardia",name:"Tachycardia",color:null===Qde||void 0===Qde||null===(d=Qde.palette)||void 0===d?void 0:d.red[400]},{id:"extra_space",name:"More Space",color:"white"}],T=[{id:"Hypoglycemia",name:"Hypoglycemia(Low)",color:null===Qde||void 0===Qde||null===(u=Qde.palette)||void 0===u?void 0:u.red[200]},{id:"Normal",name:"Normal",color:null===Qde||void 0===Qde||null===(p=Qde.palette)||void 0===p?void 0:p.green[300]},{id:"Pre-diabetes",name:"Pre-diabetes",color:null===Qde||void 0===Qde||null===(h=Qde.palette)||void 0===h?void 0:h.orange[300]},{id:"Diabetes",name:"Diabetes",color:null===Qde||void 0===Qde||null===(m=Qde.palette)||void 0===m?void 0:m.red[300]},{id:"extra_space",name:"More Space",color:"white"}],E=[{id:"Hypertensive_Crisis",name:"Hypertensive Crisis",color:null===Qde||void 0===Qde||null===(f=Qde.palette)||void 0===f?void 0:f.red[600],sys_range:[180,280],dia_range:[120,200]},{id:"Hypertensive_Stage2",name:"Hypertensive Stage 2",color:null===Qde||void 0===Qde||null===(g=Qde.palette)||void 0===g?void 0:g.red[400],sys_range:[140,179],dia_range:[90,119]},{id:"Hypertension_Stage1",name:"Hypertension Stage 1",color:null===Qde||void 0===Qde||null===(v=Qde.palette)||void 0===v?void 0:v.orange[600],sys_range:[130,139],dia_range:[80,89]},{id:"ElevatedBloodPressure",name:"Elevated Blood Pressure",color:null===Qde||void 0===Qde||null===(x=Qde.palette)||void 0===x?void 0:x.orange[300],sys_range:[120,129],dia_range:[0,79]},{id:"CheckLowBP",name:"Low Blood Pressure",color:null===Qde||void 0===Qde||null===(y=Qde.palette)||void 0===y?void 0:y.amber[400],sys_range:[0,90],dia_range:[0,60]}],{t:M}=Vg(),O=Nt(),[R,P]=(so(),(0,We.useState)([90,119,129,139,179,180,500])),[D,N]=(0,We.useState)([60,78,79,89,119,120,500]),[L,I]=(0,We.useState)([60,129,130,500]),[F,$]=(0,We.useState)(A),[B,z]=(0,We.useState)(k),[H,W]=(0,We.useState)([]),[U,V]=(0,We.useState)([]),[G,q]=(0,We.useState)([70,99,125,126,500]),[Y,Z]=(0,We.useState)([95,140,199,200,500]),[K,X]=(0,We.useState)(T),[Q,J]=(0,We.useState)([]),[ee,te]=(0,We.useState)(""),[ne,re]=(0,We.useState)(""),[ie,oe]=We.useState(E),[ae,se]=We.useState([]),[le,ce]=We.useState([]),[de,ue]=We.useState({open:!1,data:[]}),pe=e=>{ue((0,i.A)((0,i.A)({},de),{},{open:!de.open,data:e}))},he=(e,t)=>t/e*100,me=(e,t,n)=>Math.min(Math.max(e,t),n),fe=(e,t)=>Math.ceil(t/e)*e,ge={data_type:"bp",processing_mode:"REALTIME",data_batch_size:"",short_description:"",rule:[{name:"Hypertensive_Crisis",desc:"Hypertensive_CrisisDesc",salience:6,when:{or:[{gte:["Util.ToInt(Data.systolic)",R[5]]},{gte:["Util.ToInt(Data.diastolic)",D[5]]}]},then:[{call:["Alerts.Add",{const:"bp"},{const:"systolic"},{obj:"Data.systolic"},{const:"Hypertensive_Crisis"}]},{call:["Alerts.Add",{const:"bp"},{const:"diastolic"},{obj:"Data.diastolic"},{const:"Hypertensive_Crisis"}]},{call:["Complete"]}]},{name:"Hypertensive_Stage2",desc:"Hypertensive_Stage2Desc",salience:5,when:{or:[{gte:["Util.ToInt(Data.systolic)",R[3]+1]},{gte:["Util.ToInt(Data.diastolic)",D[3]+1]}]},then:[{call:["Alerts.Add",{const:"bp"},{const:"systolic"},{obj:"Data.systolic"},{const:"Hypertensive_Stage2"}]},{call:["Alerts.Add",{const:"bp"},{const:"diastolic"},{obj:"Data.diastolic"},{const:"Hypertensive_Stage2"}]},{call:["Complete"]}]},{name:"Hypertension_Stage1",desc:"Hypertension_Stage1Desc",salience:4,when:{or:[{gte:["Util.ToInt(Data.systolic)",R[2]+1]},{gte:["Util.ToInt(Data.diastolic)",D[2]+1]}]},then:[{call:["Alerts.Add",{const:"bp"},{const:"systolic"},{obj:"Data.systolic"},{const:"Hypertension_Stage1"}]},{call:["Alerts.Add",{const:"bp"},{const:"diastolic"},{obj:"Data.diastolic"},{const:"Hypertension_Stage1"}]},{call:["Complete"]}]},{name:"ElevatedBloodPressure",desc:"ElevatedBloodPressureDesc",salience:3,when:{and:[{gte:["Util.ToInt(Data.systolic)",R[1]+1]},{lte:["Util.ToInt(Data.diastolic)",D[2]]}]},then:[{call:["Alerts.Add",{const:"bp"},{const:"systolic"},{obj:"Data.systolic"},{const:"ElevatedBloodPressure"}]},{call:["Alerts.Add",{const:"bp"},{const:"diastolic"},{obj:"Data.diastolic"},{const:"ElevatedBloodPressure"}]},{call:["Complete"]}]},{name:"CheckLowBP",desc:"CheckLowBPDesc",salience:2,when:{or:[{lte:["Util.ToInt(Data.systolic)",R[0]]},{lte:["Util.ToInt(Data.diastolic)",D[0]]}]},then:[{call:["Alerts.Add",{const:"bp"},{const:"systolic"},{obj:"Data.systolic"},{const:"CheckLowBP"}]},{call:["Alerts.Add",{const:"bp"},{const:"diastolic"},{obj:"Data.diastolic"},{const:"CheckLowBP"}]},{call:["Complete"]}]}]},ve={data_type:"pulse",processing_mode:"",data_batch_size:"",short_description:"",rule:[{name:"Tachycardia",desc:"TachycardiaDesc",salience:2,when:{gte:["Util.ToInt(Data.pulse)",L[2]]},then:[{call:["Alerts.Add",{const:"pulse"},{const:"pulse"},{obj:"Data.pulse"},{const:"tachycardia"}]},{call:["Complete"]}]},{name:"Bradycardia",desc:"BradycardiaDesc",salience:1,when:{lte:["Util.ToInt(Data.pulse)",L[0]]},then:[{call:["Alerts.Add",{const:"pulse"},{const:"pulse"},{obj:"Data.pulse"},{const:"bradycardia"}]},{call:["Complete"]}]}]},xe={data_type:"glucose",processing_mode:"REALTIME",data_batch_size:"",short_description:"",rule:[{name:"DiabetesFasting",desc:"DiabetesFastingDesc",salience:8,when:{and:[{gte:["Util.ToInt(Data.glucose)",G[3]]},{eq:["Data.activityType",'"fasting"']}]},then:[{call:["Alerts.Add",{const:"glucose"},{obj:"Data.activity"},{obj:"Data.glucose"},{const:"diabetes"}]},{call:["Complete"]}]},{name:"PrediabetesFasting",desc:"PrediabetesFastingDesc",salience:7,when:{and:[{gte:["Util.ToInt(Data.glucose)",G[1]+1]},{lte:["Util.ToInt(Data.glucose)",G[2]]},{eq:["Data.activityType",'"fasting"']}]},then:[{call:["Alerts.Add",{const:"glucose"},{obj:"Data.activity"},{obj:"Data.glucose"},{const:"prediabetes"}]},{call:["Complete"]}]},{name:"HypoglycemiaFasting",desc:"HypoglycemiaFastingDesc",salience:6,when:{and:[{lte:["Util.ToInt(Data.glucose)",G[0]]},{eq:["Data.activityType",'"fasting"']}]},then:[{call:["Alerts.Add",{const:"glucose"},{obj:"Data.activity"},{obj:"Data.glucose"},{const:"hypoglycemia"}]},{call:["Complete"]}]},{name:"DiabetesPP",desc:"DiabetesDescPP",salience:5,when:{and:[{gte:["Util.ToInt(Data.glucose)",Y[3]]},{not:["Data.activityType",'"fasting"']}]},then:[{call:["Alerts.Add",{const:"glucose"},{obj:"Data.activity"},{obj:"Data.glucose"},{const:"diabetes"}]},{call:["Complete"]}]},{name:"PrediabetesPP",desc:"PrediabetesDescPP",salience:4,when:{and:[{gte:["Util.ToInt(Data.glucose)",Y[1]+1]},{lte:["Util.ToInt(Data.glucose)",Y[2]]},{not:["Data.activityType",'"fasting"']}]},then:[{call:["Alerts.Add",{const:"glucose"},{obj:"Data.activity"},{obj:"Data.glucose"},{const:"prediabetes"}]},{call:["Complete"]}]},{name:"HypoglycemiaPP",desc:"HypoglycemiaDescPP",salience:3,when:{and:[{lte:["Util.ToInt(Data.glucose)",Y[0]]},{not:["Data.activityType",'"fasting"']}]},then:[{call:["Alerts.Add",{const:"glucose"},{obj:"Data.activity"},{obj:"Data.glucose"},{const:"hypoglycemia"}]},{call:["Complete"]}]},{name:"NormalFasting",desc:"NormalFastingDesc",salience:2,when:{and:[{gte:["Util.ToInt(Data.glucose)",G[0]+1]},{lte:["Util.ToInt(Data.glucose)",G[2]-1]},{eq:["Data.activityType",'"fasting"']}]},then:[{call:["Complete"]}]},{name:"NormalPP",desc:"NormalPPDesc",salience:1,when:{and:[{gte:["Util.ToInt(Data.glucose)",Y[0]+1]},{lte:["Util.ToInt(Data.glucose)",Y[2]-1]},{not:["Data.activityType",'"fasting"']}]},then:[{call:["Complete"]}]}]},ye={tag:{height:55,paddingLeft:20,paddingRight:20,textAlign:"center",position:"relative",borderRightWidth:".1em",borderRightStyle:"solid",borderRightColor:"white",boxSizing:"border-box",borderLeftWidth:".1em",borderLeftStyle:"solid",borderLeftColor:"white",cursor:"pointer",borderRadius:"0",display:"flex",alignItems:"center",justifyContent:"center"},tagText:{fontSize:"0.675rem",color:"white",fontWeight:700,userSelect:"none",display:"block",overflow:"hidden"},sliderButton:{width:"2em",height:"2em",backgroundColor:"white",position:"absolute",borderRadius:"2em",right:"calc(-1.1em)",top:0,display:"flex",justifyContent:"center",alignItems:"center",bottom:0,margin:"auto",zIndex:10,cursor:"ew-resize",userSelect:"none"}},be=[{name:M("rpm_RPM"),url:ld.DOCTOR.PROGRAM},{name:null===C||void 0===C?void 0:C.display_name,url:"".concat(ld.DOCTOR.PROGRAM,"/").concat(null===C||void 0===C?void 0:C.code,"/patients")},{name:"".concat((null===_||void 0===_?void 0:_.first_name)||""," ").concat((null===_||void 0===_?void 0:_.last_name)||""),url:"".concat(ld.DOCTOR.PROGRAM,"/").concat(null===C||void 0===C?void 0:C.code,"/patients/").concat(null===_||void 0===_?void 0:_.id,"/dashboard")},{name:M("rpm_patientRules"),url:"".concat(ld.DOCTOR.PROGRAM,"/").concat(null===C||void 0===C?void 0:C.code,"/patients/").concat(null===_||void 0===_?void 0:_.id,"/rules")},{name:M("rpm_AddRule"),url:""}],je=()=>"bp"===ee?ge:"glucose"===ee?xe:ge;return We.useEffect(()=>{je()},[ee]),We.useEffect(()=>{"bp"===ee&&(W(ge.rule),V(ve.rule))},[ee,R,D,L]),We.useEffect(()=>{(()=>{let e=null===A||void 0===A?void 0:A.map(e=>e.id),t=null===k||void 0===k?void 0:k.map(e=>e.id),n=null===T||void 0===T?void 0:T.map(e=>e.id),r=[],i=[];R.forEach((t,n)=>{t+1>R[n+1]&&r.push({name:"Systolic",rule:e[n+1],value:[t+1,R[n+1]]})}),D.forEach((t,n)=>{t+1>D[n+1]&&r.push({name:"Diastolic",rule:e[n+1],value:[t+1,D[n+1]]})}),L.forEach((e,n)=>{e+1>L[n+1]&&r.push({name:"Pulse",rule:t[n+1],value:[e+1,L[n+1]]})}),G.forEach((e,t)=>{e+1>G[t+1]&&i.push({name:"Fasting",rule:n[t+1],value:[e+1,G[t+1]]})}),Y.forEach((e,t)=>{e+1>Y[t+1]&&i.push({name:"Non Fasting",rule:n[t+1],value:[e+1,Y[t+1]]})}),se(r),ce(i)})()},[R,D,L,G,Y]),We.useEffect(()=>{"glucose"===ee&&J(xe.rule)},[ee,G,Y]),We.useEffect(()=>{te("bp");const e={activeMenuItem:"rules",breadcrumb:be};cs(C)||cs(_)||O(NC(e))},[C,_]),(0,qt.jsxs)(qt.Fragment,{children:[(0,qt.jsx)(op,{sx:{width:"100%"},children:(0,qt.jsx)(Kz,{initialValues:je(),validationSchema:RU.addRule,onSubmit:async e=>{const t="".concat(e.short_description,"/").concat(sa()().valueOf()),n=[{name:"Hypertensive_Crisis",desc:"Hypertensive_CrisisDesc",salience:6,when:ws({or:[{gte:["Util.ToInt(Data[0].values.systolic)",R[5]]},{gte:["Util.ToInt(Data[0].values.diastolic)",D[5]]}]},"and","or",e.data_batch_size),then:[{call:["Alerts.Add",{const:"bp"},{const:"systolic"},{plus:Ss("systolic",e.data_batch_size)},{const:"Hypertensive_Crisis"}]},{call:["Alerts.Add",{const:"bp"},{const:"diastolic"},{plus:Ss("diastolic",e.data_batch_size)},{const:"Hypertensive_Crisis"}]},{call:["Complete"]}]},{name:"Hypertensive_Stage2",desc:"Hypertensive_Stage2Desc",salience:5,when:ws({or:[{gte:["Util.ToInt(Data[0].values.systolic)",R[3]+1]},{gte:["Util.ToInt(Data[0].values.diastolic)",D[3]+1]}]},"and","or",e.data_batch_size),then:[{call:["Alerts.Add",{const:"bp"},{const:"systolic"},{plus:Ss("systolic",e.data_batch_size)},{const:"Hypertensive_Stage2"}]},{call:["Alerts.Add",{const:"bp"},{const:"diastolic"},{plus:Ss("diastolic",e.data_batch_size)},{const:"Hypertensive_Stage2"}]},{call:["Complete"]}]},{name:"Hypertension_Stage1",desc:"Hypertension_Stage1Desc",salience:4,when:ws({or:[{gte:["Util.ToInt(Data[0].values.systolic)",R[2]+1]},{gte:["Util.ToInt(Data[0].values.diastolic)",D[2]+1]}]},"and","or",e.data_batch_size),then:[{call:["Alerts.Add",{const:"bp"},{const:"systolic"},{plus:Ss("systolic",e.data_batch_size)},{const:"Hypertension_Stage1"}]},{call:["Alerts.Add",{const:"bp"},{const:"diastolic"},{plus:Ss("diastolic",e.data_batch_size)},{const:"Hypertension_Stage1"}]},{call:["Complete"]}]},{name:"ElevatedBloodPressure",desc:"ElevatedBloodPressureDesc",salience:3,when:ws({and:[{gte:["Util.ToInt(Data[0].values.systolic)",R[1]+1]},{lte:["Util.ToInt(Data[0].values.diastolic)",D[2]]}]},"and","and",e.data_batch_size),then:[{call:["Alerts.Add",{const:"bp"},{const:"systolic"},{plus:Ss("systolic",e.data_batch_size)},{const:"ElevatedBloodPressure"}]},{call:["Alerts.Add",{const:"bp"},{const:"diastolic"},{plus:Ss("diastolic",e.data_batch_size)},{const:"ElevatedBloodPressure"}]},{call:["Complete"]}]},{name:"CheckLowBP",desc:"CheckLowBPDesc",salience:2,when:ws({or:[{lte:["Util.ToInt(Data[0].values.systolic)",R[0]]},{lte:["Util.ToInt(Data[0].values.diastolic)",D[0]]}]},"and","or",e.data_batch_size),then:[{call:["Alerts.Add",{const:"bp"},{const:"systolic"},{plus:Ss("systolic",e.data_batch_size)},{const:"CheckLowBP"}]},{call:["Alerts.Add",{const:"bp"},{const:"diastolic"},{plus:Ss("diastolic",e.data_batch_size)},{const:"CheckLowBP"}]},{call:["Complete"]}]}],r=[{name:"Tachycardia",desc:"TachycardiaDesc",salience:2,when:Ts({gte:["Util.ToInt(Data[0].values.pulse)",L[2]]},"or",e.data_batch_size),then:[{call:["Alerts.Add",{const:"pulse"},{const:"pulse"},{plus:Ss("pulse",e.data_batch_size)},{const:"tachycardia"}]},{call:["Complete"]}]},{name:"Bradycardia",desc:"BradycardiaDesc",salience:1,when:Ts({lte:["Util.ToInt(Data[0].values.pulse)",L[0]]},"or",e.data_batch_size),then:[{call:["Alerts.Add",{const:"pulse"},{const:"pulse"},{plus:Ss("pulse",e.data_batch_size)},{const:"bradycardia"}]},{call:["Complete"]}]}];"bp"===e.data_type&&(cs(ae)?(await b((0,i.A)((0,i.A)({},e),{},{short_description:t,rule:"BATCH"!==e.processing_mode?H:n})),await w((0,i.A)((0,i.A)({},e),{},{short_description:t,rule:"BATCH"!==e.processing_mode?U:r}))):pe(ae)),"glucose"===e.data_type&&(cs(le)?j((0,i.A)((0,i.A)({},e),{},{rule:Q})):pe(le))},enableReinitialize:!0,children:e=>{let{values:t}=e;return(0,qt.jsx)(qt.Fragment,{children:(0,qt.jsxs)(nH,{children:[(0,qt.jsx)(op,{sx:{mb:2.5},position:"relative",children:(0,qt.jsxs)(Ff,{container:!0,spacing:2,alignItems:"center",children:[(0,qt.jsxs)(Ff,{item:!0,xs:!0,children:[(0,qt.jsx)(op,{sx:{display:{xs:"none",sm:"block",md:"block"}},children:(0,qt.jsx)(Cf,{variant:"h6",component:"h6",children:M("rpm_AddNewRule")})}),(0,qt.jsx)(op,{sx:{display:{xs:"block",sm:"none",md:"none"}},position:"absolute",top:"-32px",bottom:"0",left:"40px",children:(0,qt.jsx)(Cf,{variant:"h6",component:"h6",children:M("rpm_AddNewRule")})})]}),(0,qt.jsx)(Ff,{item:!0,children:(0,qt.jsx)(IM,{loading:S,variant:"contained",color:"primary",disableElevation:!0,type:"submit",children:M("rpm_Save")})}),(0,qt.jsx)(Ff,{item:!0,children:(0,qt.jsx)(sy,{placement:"top",title:"Reset","aria-label":"Reset",children:(0,qt.jsx)(xh,{variant:"outlined",color:"primary",disableElevation:!0,onClick:()=>{P([90,119,129,139,179,180,500]),N([60,78,79,89,119,120,500]),q([70,99,125,126,500]),Z([95,140,199,200,500]),I([60,129,130,500]),$(A),z(k)},style:{minWidth:"40px"},className:"resetBackupButton",children:(0,qt.jsx)(Eye.A,{fontSize:"small"})})})})]})}),(0,qt.jsx)(yH,{variant:"outlined",children:(0,qt.jsxs)(wH,{sx:{p:2.5},children:[(0,qt.jsxs)(Ff,{container:!0,spacing:1,children:[(0,qt.jsx)(Ff,{item:!0,xs:12,md:3,children:(0,qt.jsxs)(op,{mb:1,children:[(0,qt.jsx)(o_,{htmlFor:"data_type",required:!0,sx:{mb:.75},children:M("rpm_VitalType")}),(0,qt.jsx)(tH,{fullWidth:!0,as:G_,id:"data_type",name:"data_type",size:"small",displayEmpty:!0,input:(0,qt.jsx)(qj,{}),onChange:e=>te(e.target.value),endAdornment:(0,qt.jsx)(tw,{position:"end",sx:{position:"absolute",right:"28px"},children:(0,qt.jsx)(sy,{title:M("message:rpm_VitalTypeHelp"),placement:"top",children:(0,qt.jsx)(wh,{size:"small",disableRipple:!0,sx:{p:0},children:(0,qt.jsx)(pM.A,{fontSize:"small"})})})}),children:null===Dd||void 0===Dd?void 0:Dd.map(e=>(0,qt.jsx)(mf,{value:e.value,children:M("rpm_".concat(e.name))},e.name))}),(0,qt.jsx)(dH,{name:"data_type",children:e=>(0,qt.jsx)(v_,{error:!0,children:M(e,{field:M("rpm_VitalType")})})})]})}),"glucose"!==t.data_type&&(0,qt.jsx)(Ff,{item:!0,xs:12,md:3,children:(0,qt.jsxs)(op,{mb:1,children:[(0,qt.jsx)(o_,{htmlFor:"processing_mode",required:!0,sx:{mb:.75},children:M("rpm_ProcessingMode")}),(0,qt.jsxs)(tH,{fullWidth:!0,as:G_,id:"processing_mode",name:"processing_mode",size:"small",displayEmpty:!0,input:(0,qt.jsx)(qj,{}),onChange:e=>re(e.target.value),renderValue:e=>e||"Select",endAdornment:(0,qt.jsx)(tw,{position:"end",sx:{position:"absolute",right:"28px"},children:(0,qt.jsx)(sy,{title:M("message:rpm_ProcessingModeHelp"),placement:"top",children:(0,qt.jsx)(wh,{size:"small",disableRipple:!0,sx:{p:0},children:(0,qt.jsx)(pM.A,{fontSize:"small"})})})}),children:[(0,qt.jsx)(mf,{value:"BATCH",disabled:!0,children:"BATCH"}),(0,qt.jsx)(mf,{value:"REALTIME",children:"REALTIME"})]}),(0,qt.jsx)(dH,{name:"processing_mode",children:e=>(0,qt.jsx)(v_,{error:!0,children:M(e,{field:M("rpm_ProcessingMode")})})})]})}),"BATCH"===t.processing_mode&&(0,qt.jsx)(Ff,{item:!0,xs:12,md:3,children:(0,qt.jsxs)(op,{mb:1,className:"hide_num_arrow",children:[(0,qt.jsx)(o_,{htmlFor:"data_batch_size",sx:{mb:.75},required:!0,children:M("rpm_BatchDataSize")}),(0,qt.jsx)(tH,{fullWidth:!0,as:qj,id:"data_batch_size",name:"data_batch_size",size:"small",type:"number",endAdornment:(0,qt.jsx)(tw,{position:"end",children:(0,qt.jsx)(sy,{title:M("message:rpm_BatchDataSizeHelp"),placement:"top",children:(0,qt.jsx)(wh,{size:"small",disableRipple:!0,sx:{p:0},children:(0,qt.jsx)(pM.A,{fontSize:"small"})})})})}),(0,qt.jsx)(dH,{name:"data_batch_size",children:e=>(0,qt.jsx)(v_,{error:!0,children:M(e,{field:M("rpm_BatchDataSize")})})})]})}),(0,qt.jsx)(Ff,{item:!0,xs:12,md:3,children:(0,qt.jsxs)(op,{mb:1,children:[(0,qt.jsx)(o_,{htmlFor:"short_description",required:!0,sx:{mb:.75},children:M("rpm_ShortDescription")}),(0,qt.jsx)(tH,{fullWidth:!0,as:qj,id:"short_description",name:"short_description",size:"small",endAdornment:(0,qt.jsx)(tw,{position:"end",children:(0,qt.jsx)(sy,{title:M("message:rpm_ShortDescriptionHelp"),placement:"top",children:(0,qt.jsx)(wh,{size:"small",disableRipple:!0,sx:{p:0},children:(0,qt.jsx)(pM.A,{fontSize:"small"})})})})}),(0,qt.jsx)(dH,{name:"short_description",children:e=>(0,qt.jsx)(v_,{error:!0,children:M(e,{field:M("rpm_ShortDescription")})})})]})})]}),"bp"===t.data_type&&(0,qt.jsxs)(Ff,{container:!0,spacing:.5,children:[(0,qt.jsx)(Ff,{item:!0,xs:12,children:(0,qt.jsx)(Wye,{tags:F,setTags:$,systolic:R,setSystolic:P,getPercentage:he,limitNumberWithinRange:me,nearestN:fe,styles:ye})}),(0,qt.jsx)(Ff,{item:!0,xs:12,children:(0,qt.jsx)(Nye,{tags:F,setTags:$,diastolic:D,setDiastolic:N,getPercentage:he,limitNumberWithinRange:me,nearestN:fe,styles:ye})}),(0,qt.jsx)(Ff,{item:!0,xs:12,children:(0,qt.jsx)(Oye,{handleInitialValues:H,systolic:R,diastolic:D})}),!1]}),"glucose"===t.data_type&&(0,qt.jsxs)(Ff,{container:!0,spacing:.5,children:[(0,qt.jsx)(Ff,{item:!0,xs:12,children:(0,qt.jsx)(Fye,{styles:ye,fastingRange:G,setFastingRange:q,ppRange:Y,setPPRange:Z,addNewRuleGlucose:j,getPercentage:he,limitNumberWithinRange:me,nearestN:fe,glucoseTags:K,setGlucoseTags:X})}),(0,qt.jsx)(Ff,{item:!0,xs:12,children:(0,qt.jsx)($ye,{handleInitialValues:Q})})]})]})}),"bp"===t.data_type&&(0,qt.jsx)(yH,{variant:"outlined",sx:{mt:2.5},children:(0,qt.jsx)(wH,{sx:{p:2.5},children:(0,qt.jsxs)(Ff,{container:!0,spacing:2,children:[(0,qt.jsx)(Ff,{item:!0,xs:12,md:7,children:(0,qt.jsx)(Bye,{tags:B,setTags:z,pulse:L,setPulse:I,getPercentage:he,limitNumberWithinRange:me,nearestN:fe,styles:ye})}),(0,qt.jsx)(Ff,{item:!0,xs:12,md:5,children:(0,qt.jsx)(zye,{handleInitialValues:U,pulse:L})})]})})})]})})}},"editor_formik")}),(0,qt.jsx)(Hye,{openModal:de,onCloseModal:()=>pe([])})]})};function Vye(e){let{addNewRule:t,addNewRuleGlucose:n,patientData:r,program:i,addNewPulseRule:o}=e;return(0,qt.jsx)(op,{sx:{width:"100%"},children:(0,qt.jsx)(Uye,{addNewRule:t,addNewRuleGlucose:n,patientData:r,program:i,addNewPulseRule:o})})}Vye.defaultProps={addNewRule:()=>{},addNewRuleGlucose:()=>{},addNewPulseRule:()=>{}};const Gye=Vye;const qye=function(e){let{patientData:t,program:n}=e;const r=Nt(),{t:o}=Vg(),a=so(),{enqueueSnackbar:s}=hi(),{patientId:l}=lo();return(0,qt.jsx)(Gye,{addNewRule:async e=>{const t=null===e||void 0===e?void 0:e.rule,c=(0,i.A)((0,i.A)({},e),{},{execution_engine:"JSON",rule:JSON.stringify(t)});try{await r(yl(null===n||void 0===n?void 0:n.code,l,c)),s(o("message:rpm_RuleCreatedSuccessfully"),{variant:"success"}),a(-1)}catch(d){const e=us(d,"response.data.code","");cs(e)?r(Zo({subTitle:"error:rpm_RuleCreatedFailed",severity:ud.ERROR})):r(Zo({subTitle:Vd(e,"error:rpm_err_rule_already_exist"),severity:ud.ERROR}))}},addNewRuleGlucose:async e=>{const t=null===e||void 0===e?void 0:e.rule,c=(0,i.A)((0,i.A)({},e),{},{execution_engine:"JSON",rule:JSON.stringify(t)});try{await r(yl(null===n||void 0===n?void 0:n.code,l,c)),s(o("message:rpm_RuleCreatedSuccessfully"),{variant:"success"}),a(-1)}catch(d){const e=us(d,"response.data.code","");cs(e)?r(Zo({subTitle:"error:rpm_RuleCreatedFailed",severity:ud.ERROR})):r(Zo({subTitle:Vd(e,"error:rpm_err_rule_already_exist"),severity:ud.ERROR}))}},patientData:t,program:n,addNewPulseRule:async e=>{const t=null===e||void 0===e?void 0:e.rule,a=(0,i.A)((0,i.A)({},e),{},{data_type:"bp.pulse",execution_engine:"JSON",rule:JSON.stringify(t)});try{await r(yl(null===n||void 0===n?void 0:n.code,l,a)),s(o("message:rpm_RuleCreatedSuccessfully"),{variant:"success"})}catch(c){const e=us(c,"response.data.code","");cs(e)?r(Zo({subTitle:"error:rpm_RuleCreatedFailed",severity:ud.ERROR})):r(Zo({subTitle:Vd(e,"error:rpm_err_rule_already_exist"),severity:ud.ERROR}))}}})};function Yye(e){if(null==e)throw new TypeError("Cannot destructure "+e)}function Zye(e){let{patientBpReport:t,getAlertClassName:n,vitalCheck:r,nodata:i}=e;const[o,a]=We.useState([]),[s,l]=We.useState(null);We.useEffect(()=>{if(t)if(cs(t))a([]);else if(null!==r&&void 0!==r&&r.bp)if(null!==r&&void 0!==r&&r.glucose)a((null===t||void 0===t?void 0:t.length)>0?d(t):[]);else{const e=null===t||void 0===t?void 0:t.filter(e=>"glucose"!==(null===e||void 0===e?void 0:e.name));a((null===e||void 0===e?void 0:e.length)>0?d(e):[])}else{const e=null===t||void 0===t?void 0:t.filter(e=>"bp"!==(null===e||void 0===e?void 0:e.name));a((null===e||void 0===e?void 0:e.length)>0?d(e):[])}},[r.bp,r.glucose,null===t||void 0===t?void 0:t.length]);const{t:c}=Vg(),d=e=>{if(e.length>0){var t;const n={};return e.forEach(e=>{const{ts:t,name:r,values:i,alerts:o}=e,a=sa()(t,"DD MMM YYYY hh:mm A"),s=a.format("DD MMM YYYY hh:mm A"),l=a.format("DD MMM");n[s]||(n[s]={name:l,date:s,alerts:[]}),"glucose"===r?"fasting"===i.activityType?(n[t].Fasting=i.glucose,n[t].Systolic=null,n[t].Diastolic=null,n[t].Pulse=null):(n[t].NonFasting=i.glucose,n[t].Systolic=null,n[t].Diastolic=null,n[t].Pulse=null):"bp"===r&&(n[t].Systolic=i.systolic,n[t].Diastolic=i.diastolic,n[t].Pulse=i.pulse),o&&(n[t].alerts=n[t].alerts.concat(o))}),null===(t=Object.values(n))||void 0===t?void 0:t.reverse()}return null===e||void 0===e?void 0:e.reverse()},u=e=>{var t;let r=null===Qde||void 0===Qde||null===(t=Qde.palette)||void 0===t?void 0:t.green[300];var i,o,a,s,l;"CheckLowBP"===n(e)&&(r=null===Qde||void 0===Qde||null===(i=Qde.palette)||void 0===i?void 0:i.orange[300]);"ElevatedBloodPressure"===n(e)&&(r=null===Qde||void 0===Qde||null===(o=Qde.palette)||void 0===o?void 0:o.orange[600]);"Hypertension_Stage1"===n(e)&&(r=null===Qde||void 0===Qde||null===(a=Qde.palette)||void 0===a?void 0:a.red[300]);"Hypertensive_Stage2"===n(e)&&(r=null===Qde||void 0===Qde||null===(s=Qde.palette)||void 0===s?void 0:s.red[500]);"Hypertensive_Crisis"===n(e)&&(r=null===Qde||void 0===Qde||null===(l=Qde.palette)||void 0===l?void 0:l.red[700]);return r},p=e=>{if(s){var t;let u=null===Qde||void 0===Qde||null===(t=Qde.palette)||void 0===t?void 0:t.grey[100];if("Pulse"===s){var r;u=null===Qde||void 0===Qde||null===(r=Qde.palette)||void 0===r?void 0:r.grey[100]}else{var i,o,a,l,c,d;if(n(e)===s&&"CheckLowBP"===s)u=null===Qde||void 0===Qde||null===(i=Qde.palette)||void 0===i?void 0:i.orange[300];if(n(e)===s&&"ElevatedBloodPressure"===s)u=null===Qde||void 0===Qde||null===(o=Qde.palette)||void 0===o?void 0:o.orange[600];if(n(e)===s&&"Hypertension_Stage1"===s)u=null===Qde||void 0===Qde||null===(a=Qde.palette)||void 0===a?void 0:a.red[300];if(n(e)===s&&"Hypertensive_Stage2"===s)u=null===Qde||void 0===Qde||null===(l=Qde.palette)||void 0===l?void 0:l.red[500];if(n(e)===s&&"Hypertensive_Crisis"===s)u=null===Qde||void 0===Qde||null===(c=Qde.palette)||void 0===c?void 0:c.red[700];if(!n(e)&&"Normal"===s)u=null===Qde||void 0===Qde||null===(d=Qde.palette)||void 0===d?void 0:d.green[300]}return u}return u(e)},h=(e,t)=>{var n;let r=null===Qde||void 0===Qde||null===(n=Qde.palette)||void 0===n?void 0:n.green[300],i=Rs(e);var o,a,l;return!t&&s&&"Pulse"!==s?null===Qde||void 0===Qde||null===(o=Qde.palette)||void 0===o?void 0:o.grey[300]:"tachycardia"===i?null===Qde||void 0===Qde||null===(a=Qde.palette)||void 0===a?void 0:a.red[300]:"bradycardia"===i?null===Qde||void 0===Qde||null===(l=Qde.palette)||void 0===l?void 0:l.orange[300]:r},m=e=>{var t;let n=null===Qde||void 0===Qde||null===(t=Qde.palette)||void 0===t?void 0:t.green[300];var r,i,o;"hypoglycemia"===Ms(e)&&(n=null===Qde||void 0===Qde||null===(r=Qde.palette)||void 0===r?void 0:r.red[200]);"prediabetes"===Ms(e)&&(n=null===Qde||void 0===Qde||null===(i=Qde.palette)||void 0===i?void 0:i.orange[300]);"diabetes"===Ms(e)&&(n=null===Qde||void 0===Qde||null===(o=Qde.palette)||void 0===o?void 0:o.red[300]);return n},f=e=>{var t;const{cx:n,cy:r,fill:i,payload:o}=e,a=null===o||void 0===o||null===(t=o.alerts)||void 0===t?void 0:t.findIndex(e=>"pulse"===(null===e||void 0===e?void 0:e.data_name));return null!==o&&void 0!==o&&o.pulse||-1!==a||null!==o&&void 0!==o&&o.Systolic||null!==o&&void 0!==o&&o.Diastolic?(null===o||void 0===o||null===(s=o.alerts)||void 0===s?void 0:s.length)>0?(0,qt.jsx)("svg",{x:n-6,y:r-6,width:12,height:12,fill:h(o),viewBox:"0 0 24 24",children:(0,qt.jsx)("path",{d:"M12 2C6.47 2 2 6.47 2 12s4.47 10 10 10 10-4.47 10-10S17.53 2 12 2z"})}):void 0:null;var s},g=e=>{let{active:t,payload:i}=e;if(t&&i&&i.length){var o,a,s,l,d;const e=i[0].payload,t=n(e),p=Rs(e),f=Ms(e);return(0,qt.jsxs)(op,{sx:{bgcolor:"#fff",border:"1px solid #ccc",p:1.5,width:250},children:[(0,qt.jsx)(Cf,{gutterBottom:!0,variant:"body2",children:"Date: ".concat(null===e||void 0===e?void 0:e.date)}),(null===e||void 0===e?void 0:e.Fasting)&&(0,qt.jsx)(Cf,{gutterBottom:!0,variant:"body2",fontWeight:600,children:"Fasting: ".concat(null===e||void 0===e?void 0:e.Fasting)}),(null===e||void 0===e?void 0:e.NonFasting)&&(0,qt.jsx)(Cf,{gutterBottom:!0,variant:"body2",fontWeight:600,children:"Non Fasting: ".concat(null===e||void 0===e?void 0:e.NonFasting)}),(null===e||void 0===e?void 0:e.Systolic)&&(0,qt.jsx)(Cf,{gutterBottom:!0,variant:"body2",fontWeight:600,children:"Systolic: ".concat(null===e||void 0===e?void 0:e.Systolic)}),(null===e||void 0===e?void 0:e.Diastolic)&&(0,qt.jsx)(Cf,{gutterBottom:!0,variant:"body2",fontWeight:600,children:"Diastolic: ".concat(null===e||void 0===e?void 0:e.Diastolic)}),(null===e||void 0===e?void 0:e.Pulse)&&(0,qt.jsx)(Cf,{gutterBottom:!0,variant:"body2",fontWeight:600,children:"Pulse: ".concat(null===e||void 0===e?void 0:e.Pulse)}),f?(0,qt.jsx)(Cf,{gutterBottom:!0,variant:"body2",fontWeight:600,color:m(null===(o=i[0])||void 0===o?void 0:o.payload),children:"Glucose Status: ".concat(c("rpm_".concat(null===e||void 0===e||null===(a=e.alerts[0])||void 0===a?void 0:a.text)))}):(0,qt.jsx)(Cf,{gutterBottom:!0,variant:"body2",fontWeight:600,color:m(null===(s=i[0])||void 0===s?void 0:s.payload),children:(null===r||void 0===r?void 0:r.glucose)&&"Glucose Status: ".concat(c("rpm_normal"))}),p?(0,qt.jsx)(Cf,{gutterBottom:!0,variant:"body2",fontWeight:600,color:h(null===(l=i[0])||void 0===l?void 0:l.payload,!0),children:"Pulse Status: ".concat(c("rpm_".concat(p)))}):(0,qt.jsx)(Cf,{gutterBottom:!0,variant:"body2",fontWeight:600,color:Qde.palette.green[500],children:(null===r||void 0===r?void 0:r.bp)&&"Pulse Status: ".concat(c("rpm_normal"))}),t?(0,qt.jsx)(Cf,{gutterBottom:!0,variant:"body2",fontWeight:600,color:u(null===(d=i[0])||void 0===d?void 0:d.payload),children:"BP Status: ".concat(c("rpm_".concat(t)))}):(0,qt.jsx)(Cf,{gutterBottom:!0,variant:"body2",fontWeight:600,color:Qde.palette.green[500],children:(null===r||void 0===r?void 0:r.bp)&&"BP Status: ".concat(c("rpm_normal"))})]})}return null},v=e=>{var t,n,i,o,a,c;let{payload:d}=e;const u=d.filter(e=>"Systolic"===e.value||"Diastolic"===e.value||"Low Blood Pressure"===e.value||"Elevated Blood Pressure"===e.value||"Hypertension Stage 1"===e.value||"Hypertensive Stage 2"===e.value||"Hypertensive Crisis"===e.value||"Normal"===e.value),p={"Low Blood Pressure":null===Qde||void 0===Qde||null===(t=Qde.palette)||void 0===t?void 0:t.orange[300],"Elevated Blood Pressure":null===Qde||void 0===Qde||null===(n=Qde.palette)||void 0===n?void 0:n.orange[600],"Hypertension Stage 1":null===Qde||void 0===Qde||null===(i=Qde.palette)||void 0===i?void 0:i.red[300],"Hypertensive Stage 2":null===Qde||void 0===Qde||null===(o=Qde.palette)||void 0===o?void 0:o.red[500],"Hypertensive Crisis":null===Qde||void 0===Qde||null===(a=Qde.palette)||void 0===a?void 0:a.red[700],Normal:null===Qde||void 0===Qde||null===(c=Qde.palette)||void 0===c?void 0:c.green[300]},h={"Low Blood Pressure":"CheckLowBP","Elevated Blood Pressure":"ElevatedBloodPressure","Hypertension Stage 1":"Hypertension_Stage1","Hypertensive Stage 2":"Hypertensive_Stage2","Hypertensive Crisis":"Hypertensive_Crisis",Normal:"Normal"},m=u.map(e=>(e.alias=h[e.value]||"Normal",e.color=((e,t)=>{var n;return t?t===h[e.value]?p[e.value]:null===Qde||void 0===Qde||null===(n=Qde.palette)||void 0===n?void 0:n.grey[300]:p[e.value]})(e,s),e)),f=d.filter(e=>"Pulse"===e.value),g=d.filter(e=>"Fasting"===e.value||"NonFasting"===e.value);return(0,qt.jsxs)("div",{style:{paddingLeft:40,marginLeft:"10px"},children:[(0,qt.jsxs)("div",{children:[(null===r||void 0===r?void 0:r.bp)&&(0,qt.jsx)("strong",{children:"Blood Pressure"}),(0,qt.jsx)("ul",{style:{listStyleType:"none",paddingLeft:0},children:m.map((e,t)=>{if("Systolic"!==e.value&&"Diastolic"!==e.value)return(0,qt.jsxs)("li",{style:{marginBottom:"8px",cursor:"pointer"},onClick:()=>{s===(null===e||void 0===e?void 0:e.alias)?l(null):l(e.alias)},children:[(0,qt.jsx)("span",{style:{display:"inline-block",width:"12px",height:"12px",backgroundColor:e.color,marginRight:"8px"}}),e.value]},"item-".concat(t))})})]}),(0,qt.jsxs)("div",{children:[(null===r||void 0===r?void 0:r.bp)&&(0,qt.jsx)("strong",{children:"Pulse"}),(0,qt.jsx)("ul",{style:{listStyleType:"none",paddingLeft:0},children:f.map((e,t)=>(0,qt.jsxs)("li",{style:{marginBottom:"8px",cursor:"pointer"},onClick:()=>{l("Pulse"===s?null:"Pulse")},children:[(0,qt.jsx)("span",{style:{display:"inline-block",width:"12px",height:"12px",backgroundColor:e.color,marginRight:"8px"}}),e.value]},"item-".concat(t)))})]}),(0,qt.jsxs)("div",{children:[(null===r||void 0===r?void 0:r.glucose)&&(0,qt.jsx)("strong",{children:"Glucose"}),(0,qt.jsx)("ul",{style:{listStyleType:"none",paddingLeft:0},children:g.map((e,t)=>(0,qt.jsxs)("li",{style:{marginBottom:"8px",cursor:"pointer"},onClick:()=>{s===e.value?l(null):l(e.value)},children:[(0,qt.jsx)("span",{style:{display:"inline-block",width:"12px",height:"12px",backgroundColor:e.color,marginRight:"8px"}}),e.value]},"item-".concat(t)))})]})]})};return(0,qt.jsx)(w2,{width:"100%",height:400,children:0===(null===o||void 0===o?void 0:o.length)?(0,qt.jsx)(op,{display:"flex",alignItems:"center",height:"100%",children:(0,qt.jsx)("img",{src:i,style:{display:"block",margin:"auto"}})}):(0,qt.jsxs)(tce,{data:o,children:[(0,qt.jsxs)(qt.Fragment,{children:[(0,qt.jsx)(Wle,{dataKey:"name"}),(0,qt.jsx)(ece,{label:{value:"Values",angle:"90",position:"insideLeft",dx:0,fontSize:"1rem"},domain:[0,400]})]}),(0,qt.jsx)(w6,{content:(0,qt.jsx)(g,{})}),(0,qt.jsx)(Q5,{content:(0,qt.jsx)(v,{}),layout:"vertical",align:"right",verticalAlign:"top",wrapperStyle:{width:300}}),(null===r||void 0===r?void 0:r.bp)&&(0,qt.jsxs)(qt.Fragment,{children:[(0,qt.jsx)(lle,{type:"monotone",dataKey:"Systolic",stroke:Qde.palette.error.main,strokeWidth:2,dot:!1,className:"removeLine"}),(0,qt.jsx)(lle,{type:"monotone",dataKey:"Diastolic",stroke:Qde.palette.error.main,strokeWidth:2,dot:!1,className:"removeLine"}),(0,qt.jsx)(lle,{type:"monotone",dataKey:"Low Blood Pressure",stroke:Qde.palette.orange[300],strokeWidth:2,dot:!1,className:"removeLine"}),(0,qt.jsx)(lle,{type:"monotone",dataKey:"Elevated Blood Pressure",stroke:Qde.palette.orange[600],strokeWidth:2,dot:!1,className:"removeLine"}),(0,qt.jsx)(lle,{type:"monotone",dataKey:"Hypertension Stage 1",stroke:Qde.palette.red[300],strokeWidth:2,dot:!1,className:"removeLine"}),(0,qt.jsx)(lle,{type:"monotone",dataKey:"Hypertensive Stage 2",stroke:Qde.palette.red[500],strokeWidth:2,dot:!1,className:"removeLine"}),(0,qt.jsx)(lle,{type:"monotone",dataKey:"Hypertensive Crisis",stroke:Qde.palette.red[700],strokeWidth:2,dot:!1,className:"removeLine"}),(0,qt.jsx)(lle,{type:"monotone",dataKey:"Normal",stroke:Qde.palette.green[300],strokeWidth:2,dot:!1,className:"removeLine"}),(0,qt.jsx)(lle,{type:"monotone",dataKey:"Pulse",stroke:"Pulse"!==s&&s?Qde.palette.grey[300]:Qde.palette.primary.light,strokeWidth:2,strokeDasharray:"4 10",dot:(0,qt.jsx)(f,{fill:Qde.palette.green[500],alertName:"pulse"}),connectNulls:!0})]}),(null===r||void 0===r?void 0:r.glucose)&&(0,qt.jsxs)(qt.Fragment,{children:[(0,qt.jsx)(lle,{type:"monotone",dataKey:"Fasting",stroke:"Fasting"!==s&&s?Qde.palette.grey[300]:Qde.palette.pink[800],strokeWidth:2,dot:!0,connectNulls:!0}),(0,qt.jsx)(lle,{type:"monotone",dataKey:"NonFasting",stroke:"NonFasting"!==s&&s?Qde.palette.grey[300]:Qde.palette.pink[900],strokeWidth:2,dot:!0,connectNulls:!0})]}),(null===r||void 0===r?void 0:r.bp)&&(0,qt.jsx)(Cce,{component:e=>{var t;let{formattedGraphicalItems:n}=e;const r=n[0],i=n[1];return null===r||void 0===r||null===(t=r.props)||void 0===t?void 0:t.points.map((e,t)=>{var n,o;const a=null===r||void 0===r||null===(n=r.props)||void 0===n?void 0:n.points[t],s=null===i||void 0===i||null===(o=i.props)||void 0===o?void 0:o.points[t],l=a.y-s.y;return a.y>0&&a.x>0&&l?(0,qt.jsx)(m2,{radius:8,width:10,height:-l-10,x:a.x-5,y:a.y+5,fill:p(null===e||void 0===e?void 0:e.payload)},t):(0,qt.jsx)(m2,{radius:0,width:0,height:0,x:0,y:0,fill:"transparent"},t)})}})]})})}Zye.defaultProps={patientBpReport:[],getAlertClassName:()=>{},vitalCheck:Uu().object};const Kye=Zye,Xye=e=>{let{medicinePercentage:t,patientBpReport:n,vitalCheck:r}=e;const[i,o]=We.useState([]),[a,s]=We.useState([]),[l,c]=We.useState(null);let d=[];if(!cs(t)){const e={};t.forEach(t=>{const n=sa()(t.date).format("DD MMM YYYY");e[n]||(e[n]={date:n,glucose:0,bp:0,others:0}),"glucose"===t.vital?e[n].glucose=t.adherence_percentage.toFixed(2):"bp"===t.vital?e[n].bp=t.adherence_percentage.toFixed(2):"others"===t.vital?e[n].others=t.adherence_percentage.toFixed(2):e[n].all=t.adherence_percentage.toFixed(2)}),Object.keys(e).forEach(t=>{d.push(e[t])})}(0,We.useEffect)(()=>{if(l){d=[];const e={};t.map(t=>{const n=sa()(t.date).format("DD MMM YYYY");e[n]||(e[n]={date:n,glucose:0,bp:0,others:0}),"glucose"===t.vital?e[n].glucose=t.adherence_percentage.toFixed(2):"bp"===t.vital?e[n].bp=t.adherence_percentage.toFixed(2):"others"===t.vital?e[n].others=t.adherence_percentage.toFixed(2):e[n].all=t.adherence_percentage.toFixed(2)}),Object.keys(e).forEach(t=>{d.push(e[t])})}},[l,t]);const u=()=>(0,qt.jsx)("div",{style:{paddingLeft:20},children:(0,qt.jsx)("ul",{style:{listStyleType:"none",paddingLeft:25},children:[{value:"0-25%",color:"#EE5962"},{value:"26-50%",color:"#F1AE5E"},{value:"51-75%",color:"#B4CE4C"},{value:"76-100%",color:"#81c784"}].map((e,t)=>(0,qt.jsxs)("li",{style:{marginBottom:"8px",cursor:"pointer"},onClick:()=>{l===e.value?c(null):c(e.value)},children:[(0,qt.jsx)("span",{style:{display:"inline-block",width:"12px",height:"12px",backgroundColor:l!==e.value&&l?Qde.palette.grey[300]:e.color,marginRight:"8px"}}),e.value]},"item-".concat(t)))})}),p=e=>e>=76&&(!l||"76-100%"===l)?"#81c784":e>=51&&e<=75&&(!l||"51-75%"===l)?"#B4CE4C":e>=26&&e<=50&&(!l||"26-50%"===l)?"#F1AE5E":e>=0&&e<=25&&(!l||"0-25%"===l)?"#EE5962":Qde.palette.grey[300];return We.useEffect(()=>{if(cs(n))s([]),o([]),d=[];else if(null!==r&&void 0!==r&&r.bp)if(null!==r&&void 0!==r&&r.glucose)s((null===n||void 0===n?void 0:n.length)>0?n:[]);else{const e=null===n||void 0===n?void 0:n.filter(e=>"glucose"!==(null===e||void 0===e?void 0:e.name));s(e)}else{const e=null===n||void 0===n?void 0:n.filter(e=>"bp"!==(null===e||void 0===e?void 0:e.name));s(e)}},[r.bp,r.glucose,n]),We.useEffect(()=>{var e,t;cs(a)||function(e,t){const n=sa()(e,"YYYY-MM-DD"),r=sa()(t,"YYYY-MM-DD"),i=[];for(;n.isSameOrBefore(r);){var a;let e=null===(a=d)||void 0===a?void 0:a.find(e=>sa()(null===e||void 0===e?void 0:e.date,"DD-MMM-YYYY").isSame(n,"day"));e?i.push(e):i.push({date:sa()(n).format("DD MMM YYYY"),glucose:0,bp:0,others:0,all:0}),n.add(1,"day")}o(i)}(sa()(null===(e=a[(null===a||void 0===a?void 0:a.length)-parseInt(1)])||void 0===e?void 0:e.ts,"DD-MMM-YYYY hh:mm A").format("YYYY-MM-DD"),sa()(null===(t=a[0])||void 0===t?void 0:t.ts,"DD-MMM-YYYY hh:mm A").format("YYYY-MM-DD"))},[a,t,l]),(0,qt.jsx)(w2,{width:"100%",height:400,children:(0,qt.jsxs)(Mce,{width:500,height:300,data:i,margin:{top:30,right:30,left:20,bottom:5},children:[(0,qt.jsx)(yce,{strokeDasharray:"3 3"}),(0,qt.jsx)(Wle,{dataKey:"date",height:100,interval:0,angle:-45,textAnchor:"end"}),(0,qt.jsx)(ece,{label:{value:"Medicine %",angle:"90",position:"insideLeft",dx:0,fontSize:"1rem"},domain:[0,100]}),i.length&&(0,qt.jsx)(w6,{}),(0,qt.jsx)(Q5,{content:(0,qt.jsx)(u,{}),layout:"vertical",align:"right",verticalAlign:"top",wrapperStyle:{paddingLeft:30,width:300}}),(0,qt.jsxs)(qie,{dataKey:"bp",name:"Blood Pressure",barSize:15,cursor:{fill:"transparent"},children:[i.map((e,t)=>(0,qt.jsx)(Cre,{fill:p(e.bp)},"cell-bp-".concat(t))),(0,qt.jsx)(Ire,{dataKey:"bp",position:"top",content:e=>{let{x:t,y:n,width:r,value:i}=e;return(0,qt.jsx)("text",{x:t+r/2,y:n-10,fill:p(i),textAnchor:"middle",children:i?"B":""})}})]}),(0,qt.jsxs)(qie,{dataKey:"glucose",name:"Glucose",barSize:15,cursor:{fill:"transparent"},children:[i.map((e,t)=>(0,qt.jsx)(Cre,{fill:p(e.glucose)},"cell-glucose-".concat(t))),(0,qt.jsx)(Ire,{dataKey:"glucose",position:"top",content:e=>{let{x:t,y:n,width:r,value:i}=e;return(0,qt.jsx)("text",{x:t+r/2,y:n-10,fill:p(i),textAnchor:"middle",children:i?"G":""})}})]}),(0,qt.jsxs)(qie,{dataKey:"others",name:"Others",barSize:15,cursor:{fill:"transparent"},children:[i.map((e,t)=>(0,qt.jsx)(Cre,{fill:p(e.others)},"cell-others-".concat(t))),(0,qt.jsx)(Ire,{dataKey:"others",position:"top",content:e=>{let{x:t,y:n,width:r,value:i}=e;return(0,qt.jsx)("text",{x:t+r/2,y:n-10,fill:p(i),textAnchor:"middle",children:i?"O":""})}})]}),(0,qt.jsx)(qie,{dataKey:"all",name:"All",barSize:15,cursor:{fill:"transparent"},children:i.map((e,t)=>(0,qt.jsx)(Cre,{fill:p(e.all)},"cell-all-".concat(t)))})]})})},Qye=e=>{let{patientData:t,program:n,stageAlertData:r,medicinePercentage:o,filterState:a,setFilterState:s,nodata:l,vitalCheck:c,handleCheckBox:d}=e;const u=Nt(),[p]=We.useState("AllStage"),h=[{name:_e("rpm_RPM"),url:ld.DOCTOR.PROGRAM},{name:null===n||void 0===n?void 0:n.display_name,url:"".concat(ld.DOCTOR.PROGRAM,"/").concat(null===n||void 0===n?void 0:n.code,"/patients")},{name:"".concat((null===t||void 0===t?void 0:t.first_name)||""," ").concat((null===t||void 0===t?void 0:t.last_name)||""),url:"".concat(ld.DOCTOR.PROGRAM,"/").concat(null===n||void 0===n?void 0:n.code,"/patients/").concat(null===t||void 0===t?void 0:t.id,"/dashboard")},{name:_e("rpm_AdherenceReport"),url:""}],m=e=>{switch(e){case"LowBloodPressure":{const e=null===r||void 0===r?void 0:r.filter(e=>"LowBloodPressure"===e.key);return e}case"NormalPressure":{const e=null===r||void 0===r?void 0:r.filter(e=>"NormalPressure"===e.key);return e}case"ElevatedBloodPressure":{const e=null===r||void 0===r?void 0:r.filter(e=>"ElevatedBloodPressure"===e.key);return e}case"HighBloodPressure":{const e=null===r||void 0===r?void 0:r.filter(e=>"HighBloodPressure"===e.key);return e}case"HighBloodPressureStage2":{const e=null===r||void 0===r?void 0:r.filter(e=>"HighBloodPressureStage2"===e.key);return e}case"HypertensiveCrisis":{const e=null===r||void 0===r?void 0:r.filter(e=>"HypertensiveCrisis"===e.key);return e}default:return r&&r}};We.useEffect(()=>{const e={breadcrumb:h};cs(n)||cs(t)||u(NC(e))},[n,t]);return(0,qt.jsxs)(op,{children:[(0,qt.jsx)(op,{sx:{width:"100%"},children:(0,qt.jsx)(Ff,{container:!0,children:(0,qt.jsx)(Ff,{item:!0,xs:12,md:!0,children:(0,qt.jsx)(op,{sx:{mb:1},position:"relative",children:(0,qt.jsx)(Ff,{container:!0,spacing:2,alignItems:"center",sx:{mb:2},children:(0,qt.jsx)(Ff,{item:!0,xs:!0,children:(0,qt.jsxs)(op,{sx:{mb:1},children:[(0,qt.jsx)(op,{sx:{display:{xs:"none",sm:"block"}},children:(0,qt.jsx)(Cf,{variant:"h5",component:"h5",children:_e("rpm_AdherenceReport")})}),(0,qt.jsx)(op,{sx:{display:{xs:"block",sm:"none",md:"none"}},position:"absolute",top:"-33px",left:"40px",children:(0,qt.jsx)(Cf,{variant:"h6",component:"h6",children:_e("rpm_AdherenceReport")})})]})})})})})})}),null!==n&&void 0!==n&&n.is_hospital?(0,qt.jsx)(op,{bgcolor:"white",children:(0,qt.jsx)(Kz,{initialValues:{vital:"",start_date:null,end_date:null},children:()=>(0,qt.jsx)(nH,{children:(0,qt.jsxs)(op,{sx:{width:"100%"},p:1,children:[(0,qt.jsxs)(Ff,{container:!0,spacing:2,alignItems:"center",className:"adherenceReport-tour-step0",children:[(0,qt.jsx)(Ff,{item:!0,md:8,xs:12,children:(0,qt.jsxs)(op,{display:"flex",alignItems:"center",ml:2,mb:3,className:"AdherenceGraph",children:[(0,qt.jsxs)(op,{bgcolor:"#E3E5EF",display:"flex",alignItems:"center",p:"3px 0 3px 6px ",borderRadius:2,mr:1,children:[(0,qt.jsx)(op,{component:"span",bgcolor:"white",mr:1,sx:{padding:"5px 8px",borderRadius:"8px"},display:"flex",height:"35px",width:"35px",alignItems:"center",children:(0,qt.jsx)(Kc,{})}),(0,qt.jsx)(wE,{sx:{flexDirection:"row-reverse",marginLeft:"10px",marginRight:"0"},label:"All",control:(0,qt.jsx)(Dw,{checked:null===c||void 0===c?void 0:c.all,onChange:()=>d("all"),color:"primary"}),disableRipple:!0})]}),(0,qt.jsxs)(op,{bgcolor:"#E3E5EF",display:"flex",alignItems:"center",p:"3px 0 3px 6px ",borderRadius:2,mr:1,children:[(0,qt.jsx)(op,{component:"span",bgcolor:"white",mr:1,sx:{padding:"5px 8px",borderRadius:"8px"},display:"flex",height:"35px",width:"35px",alignItems:"center",children:(0,qt.jsx)(Yc,{})}),(0,qt.jsx)(wE,{sx:{flexDirection:"row-reverse",marginLeft:"10px",marginRight:"0"},label:"Blood Pressure",control:(0,qt.jsx)(Dw,{checked:null===c||void 0===c?void 0:c.bp,onChange:()=>d("bp"),color:"primary"}),disableRipple:!0})]}),(0,qt.jsxs)(op,{bgcolor:"#E3E5EF",display:"flex",alignItems:"center",p:"3px 0 3px 6px ",borderRadius:2,mr:1,children:[(0,qt.jsx)(op,{component:"span",bgcolor:"white",mr:1,sx:{padding:"5px 8px",borderRadius:"8px"},display:"flex",height:"35px",width:"35px",alignItems:"center",children:(0,qt.jsx)(Zc,{})}),(0,qt.jsx)(wE,{sx:{flexDirection:"row-reverse",marginLeft:"10px",marginRight:"0"},label:"Glucose",control:(0,qt.jsx)(Dw,{checked:null===c||void 0===c?void 0:c.glucose,onChange:()=>d("glucose"),color:"primary"})})]})]})}),(0,qt.jsx)(Ff,{item:!0,md:4,className:"paddingTopNone",children:(0,qt.jsxs)(op,{display:"flex",alignItems:"center",className:"AdherenceGraphFilter",children:[(0,qt.jsx)(Cf,{color:"primary",fontWeight:600,sx:{fontSize:14},ml:1,children:_e("rpm_Duration")}),(0,qt.jsx)(op,{className:"DatepickerForm",sx:e=>({"& .MuiFormControl-root":{display:"flex"},"& .MuiFormLabel-root":{color:e.palette.grey[800]},"& .MuiFormLabel-root.MuiInputLabel-shrink":{transform:"translate(15px, -8px)",fontSize:12}}),mx:1,children:(0,qt.jsxs)(WM,{dateAdapter:DI,children:[(0,qt.jsx)(tH,{className:"AdherenceGraph",as:fD,size:"small",label:"From",name:"start_date",value:null===a||void 0===a?void 0:a.start_date,renderInput:e=>(0,qt.jsx)(Q_,(0,i.A)({},e)),maxDate:new Date,onChange:e=>{s(t=>{const n=sa()().diff(sa()(e),"days");return(0,i.A)((0,i.A)({},t),{},{start_date:sa()(e).startOf("day").valueOf(),end_date:n>=45?sa()(e).add(45,"days").endOf("day").valueOf():sa()().endOf("day").valueOf()})})}}),(0,qt.jsx)(op,{})]})}),(0,qt.jsx)(op,{className:"DatepickerForm",sx:e=>({"& .MuiFormControl-root":{display:"flex"},"& .MuiFormLabel-root":{color:e.palette.grey[800]},"& .MuiFormLabel-root.MuiInputLabel-shrink":{transform:"translate(15px, -8px)",fontSize:12}}),ml:1,children:(0,qt.jsx)(WM,{dateAdapter:DI,children:(0,qt.jsx)(tH,{className:"AdherenceGraph",as:fD,size:"small",label:"To",name:"end_date",value:null===a||void 0===a?void 0:a.end_date,renderInput:e=>(0,qt.jsx)(Q_,(0,i.A)({},e)),minDate:a.start_date?new Date(a.start_date):void 0,maxDate:sa()().diff(sa()(null===a||void 0===a?void 0:a.start_date),"days")>=45?sa()(null===a||void 0===a?void 0:a.start_date).add(45,"days").startOf("day").valueOf():new Date,onChange:e=>{s(t=>(0,i.A)((0,i.A)({},t),{},{end_date:sa()(e).endOf("day").valueOf()}))}})})})]})})]}),(0,qt.jsxs)(Ff,{container:!0,spacing:2,children:[(0,qt.jsx)(Ff,{item:!0,xs:12,md:12,lg:12,children:(0,qt.jsx)(op,{children:(0,qt.jsx)(Kye,{patientBpReport:m(p),getAlertClassName:Es,vitalCheck:c,nodata:l})})}),(0,qt.jsxs)(Ff,{item:!0,xs:12,md:12,lg:12,children:[(0,qt.jsx)(op,{children:(0,qt.jsx)(Xye,{medicinePercentage:o,patientBpReport:m(p),vitalCheck:c})}),(0,qt.jsx)(op,{textAlign:"end",children:(0,qt.jsx)(wE,{sx:{flexDirection:"row",marginLeft:"10px",marginRight:"0"},label:"See all medicine graph",control:(0,qt.jsx)(Dw,{checked:null===c||void 0===c?void 0:c.allMedicine,onChange:()=>d("allMedicine"),color:"primary"}),disableRipple:!0})})]})]})]})})})}):(0,qt.jsxs)(op,{py:6,bgcolor:"#fff",border:"1px solid rgba(0, 0, 0, 0.12)",borderRadius:"4px",children:[(0,qt.jsx)("img",{src:GC,alt:"No Data Found",style:{display:"block",margin:"auto",width:"100%",maxWidth:"300px",height:"auto"}}),(0,qt.jsx)(op,{px:2,color:"#3f51b5",mt:2,display:"flex",justifyContent:"center",textAlign:"center",children:_e("rpm_To_Explore_This")})]})]})},Jye=e=>{let{patientData:t,program:n}=e;const r=Nt(),{enqueueSnackbar:o}=hi(),[a,s]=We.useState(null),l=wt(bu),[c,d]=We.useState(null),[u,p]=We.useState(null),[h,m]=We.useState(null),[f,g]=We.useState([]),[v,x]=We.useState(""),y=!("true"===us(l,"user_principal.attributes.skip_tour[0]","")),[b,j]=We.useState((0,i.A)({},dd)),[_,C]=We.useState({vital:"",start_date:sa()().subtract(7,"days").startOf("day").valueOf(),end_date:sa()().endOf("day").valueOf()}),[w,S]=We.useState({all:!0,bp:!0,glucose:!0,allMedicine:!1}),A={print_report:"",filter_report:"course",from:null===_||void 0===_?void 0:_.start_date,to:null===_||void 0===_?void 0:_.end_date,page:1},k=async e=>{const n=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n=e.filter_report,r=e.from,i=e.to;return"day"===e.filter_report&&(n="day",r=sa()().startOf("day").valueOf(),i=sa()().valueOf(),"<"===t?(r=sa()(r).subtract(1,"days").startOf("day").valueOf(),i=sa()(i).subtract(1,"days").endOf("day").valueOf()):">"===t&&(r=sa()(r).add(1,"days").startOf("day").valueOf(),i=sa()(i).add(1,"days").endOf("day").valueOf())),"weekly"===e.filter_report&&(n="weekly",r=sa()().subtract(6,"days").startOf("day").valueOf(),i=sa()().valueOf(),"<"===t?(r=sa()(r).subtract(6,"days").startOf("day").valueOf(),i=sa()(i).subtract(6,"days").endOf("day").valueOf()):">"===t&&(r=sa()(r).add(6,"days").startOf("day").valueOf(),i=sa()(i).add(6,"days").endOf("day").valueOf())),"monthly"===e.filter_report&&(n="monthly",r=sa()().subtract(30,"days").startOf("day").valueOf(),i=sa()().valueOf(),"<"===t?(r=sa()(r).subtract(30,"days").startOf("day").valueOf(),i=sa()(i).subtract(30,"days").endOf("day").valueOf()):">"===t&&(r=sa()(r).add(30,"days").startOf("day").valueOf(),i=sa()(i).add(30,"days").endOf("day").valueOf())),"custom"===e.filter_report&&(n="custom",r=sa()(e.from).startOf("day").valueOf(),i=sa()(e.to).endOf("day").valueOf()),"all"===e.filter_report&&(n="all",r="",i=""),s({filter_report:n||(null===a||void 0===a?void 0:a.filter_report),from:r,to:i}),{filter_report:n,from:r,to:i}}(e);(async e=>{try{const{data:t}=await r(fl(e)),n=t||{},o=Object.assign({},(Yye(n),n));d(t),p(t),j(e=>(0,i.A)((0,i.A)({},e),{},{last_page:o.last_page,current_page:o.current_page,from:o.from,per_page:o.per_page,to:o.to,total:o.total}))}catch(t){o(t.message,{variant:"error"})}})({patient_id:null===t||void 0===t?void 0:t.id,desease:["bp","glucose"],duration:[n.from,n.to]})},T=async e=>{const i={patientId:null===t||void 0===t?void 0:t.id,programId:null===n||void 0===n?void 0:n.code,start:null===e||void 0===e?void 0:e.from,end:null===e||void 0===e?void 0:e.to},{data:o}=await r((e=>async t=>{t(na(!0));try{const t="".concat(ua.prescription,"/").concat(e.programId,"/").concat(e.patientId,"/adherence-report?start=").concat(null===e||void 0===e?void 0:e.start,"&end=").concat(null===e||void 0===e?void 0:e.end),n=await Iu(t,{});return oa()(n,"data",[]).forEach(e=>rl(e)),n}catch(n){return n}finally{t(na(!1))}})(i));if(null===w||void 0===w||!w.bp||null!==w&&void 0!==w&&w.glucose)if(null===w||void 0===w||!w.glucose||null!==w&&void 0!==w&&w.bp)m(o);else{const e=null===o||void 0===o?void 0:o.filter(e=>"glucose"===(null===e||void 0===e?void 0:e.vital)||"others"===(null===e||void 0===e?void 0:e.vital));m(e)}else{const e=null===o||void 0===o?void 0:o.filter(e=>"bp"===(null===e||void 0===e?void 0:e.vital)||"others"===(null===e||void 0===e?void 0:e.vital));m(e)}},E=async e=>{const i={patientId:null===t||void 0===t?void 0:t.id,programId:null===n||void 0===n?void 0:n.code,start:null===e||void 0===e?void 0:e.from,end:null===e||void 0===e?void 0:e.to},{data:o}=await r((e=>async t=>{t(na(!0));try{const t="".concat(ua.prescription,"/").concat(e.programId,"/").concat(e.patientId,"/adherence-report/all-vitals?start=").concat(null===e||void 0===e?void 0:e.start,"&end=").concat(null===e||void 0===e?void 0:e.end),n=await Iu(t,{});return oa()(n,"data",[]).forEach(e=>rl(e)),n}catch(n){return n}finally{t(na(!1))}})(i));g(o)};We.useEffect(()=>{cs(t)||(k(A),T(A),E(A))},[t,_,null===w||void 0===w?void 0:w.bp,null===w||void 0===w?void 0:w.glucose]),We.useEffect(()=>{if(!cs(t)&&!cs(n)){r(NC({activeMenuItem:"adherence-report"}))}},[t,n]);return(0,qt.jsxs)(op,{children:[(0,qt.jsx)(Qye,{program:n,patientData:t,stageAlertData:u,patientBpReport:c,pageDetails:b,medicinePercentage:null!==w&&void 0!==w&&w.allMedicine?f:h,filterState:_,setFilterState:C,nodata:GC,vitalCheck:w,handleCheckBox:e=>{"bp"==e?w.glucose&&S((0,i.A)((0,i.A)({},w),{},{bp:!w.bp,all:w.glucose&&!w.bp})):"all"==e?S({all:!0,glucose:!0,bp:!0}):"glucose"==e?w.bp&&S((0,i.A)((0,i.A)({},w),{},{glucose:!w.glucose,all:!w.glucose&&w.bp})):"allMedicine"==e&&S((0,i.A)((0,i.A)({},w),{},{allMedicine:!w.allMedicine}))}}),(0,qt.jsxs)(qt.Fragment,{children:[(0,qt.jsx)(zZ,{isTour:y,path:"adherenceReportTour",setRenderer:x}),(0,qt.jsx)("input",{type:"hidden",id:"rerenderer",value:v})]})]})},ebe=(e,t,n)=>async r=>{r(na(!0));const o=(0,i.A)({},n);try{const n="".concat(la.schedules,"/-/").concat(e||"","/").concat(t||"");return await $u(n,o)}finally{r(na(!1))}},tbe=(e,t,n)=>async r=>{r(na(!0));try{const r="".concat(la.schedules,"/-/").concat(e||"","?&page=").concat(t.current_page||"","&q=").concat(n.courseName||"","&vital=").concat(n.vital||"","&duration=").concat(n.duration||"","&perPage=").concat(t.per_page||"","&sortBy=").concat(t.sort_by||"","&sortOrder=").concat(t.sort_order||"");return await Iu(r,{})}finally{r(na(!1))}},nbe=(e,t)=>async n=>{n(na(!0));try{const n="".concat(la.schedules,"/-/").concat(e||"","/").concat(t||""),r=await Iu(n,{}),{data:i}=r;return function(e){if(null===(null===e||void 0===e?void 0:e.start_date)&&null===e.end_date)return!1;e.start_date=sa()(e.start_date).format("DD MMM YYYY hh:mm A"),e.end_date=sa()(e.end_date).format("DD MMM YYYY hh:mm A")}(i),i}finally{n(na(!1))}},rbe=e=>t=>{var n;const[r,o]=We.useState({}),a=Nt(),s=wt(cu);return We.useEffect(()=>{var e;s&&(async e=>{try{const{data:t}=await a(Xs(e));return await o(t),t}catch(t){console.log(t)}})(null===t||void 0===t||null===(e=t.activeProgram)||void 0===e?void 0:e.code)},[s,null===t||void 0===t||null===(n=t.activeProgram)||void 0===n?void 0:n.code]),(0,qt.jsx)(e,(0,i.A)({notifications:r},t))};const ibe=function(e){var t,n,r,i,o,a,s,l,c,d,u,p,h,m,f,g,v,x,y,b,j,_,C,w,S,A,k,T,E,M,O,R,P,D,N,L,I,F,$,B,z,H,W,U;let{schedule:V,activeProgram:G,patientData:q,notifications:Y}=e;const{t:Z}=Vg(),K=Nt(),X=so(),{scheduleId:Q,programId:J}=lo(),ee=[{name:Z("rpm_RPM"),url:ld.DOCTOR.PROGRAM},{name:null===G||void 0===G?void 0:G.display_name,url:"".concat(ld.DOCTOR.PROGRAM,"/").concat(null===G||void 0===G?void 0:G.code,"/patients")},{name:"".concat((null===q||void 0===q?void 0:q.first_name)||""," ").concat((null===q||void 0===q?void 0:q.last_name)||""),url:"".concat(ld.DOCTOR.PROGRAM,"/").concat(null===G||void 0===G?void 0:G.code,"/patients/").concat(null===q||void 0===q?void 0:q.id,"/dashboard")},{name:Z("rpm_patientCourses"),url:"".concat(ld.DOCTOR.PROGRAM,"/").concat(null===G||void 0===G?void 0:G.code,"/patients/").concat(null===q||void 0===q?void 0:q.id,"/courses")},{name:null!==V&&void 0!==V&&V.name?null===V||void 0===V?void 0:V.name:Z("rpm_ScheduleDetails"),url:""}],te=e=>{var t,n;const r=null===(t=e.repetition)||void 0===t||null===(n=t.split(" ")[5])||void 0===n?void 0:n.split(",");return"Weekly"==e.repeat_type?(0,qt.jsx)(qt.Fragment,{children:cs(V)?(0,qt.jsx)(lS,{width:100}):(0,qt.jsx)(Cf,{variant:"body1",fontWeight:"h6.fontWeight",component:"p",children:e?null===r||void 0===r?void 0:r.map(e=>(0,qt.jsx)(op,{component:"span",sx:e=>({mr:1,py:.5,px:1.5,color:e.palette.primary.theme[50],backgroundColor:e.palette.primary.theme[500],display:"inline-flex",fontSize:e.spacing(1.5),fontWeight:600,borderRadius:.5}),children:e.slice(0,2)},e)):"NA"})}):"Daily"==e.repeat_type?(0,qt.jsx)(qt.Fragment,{children:cs(V)?(0,qt.jsx)(lS,{width:100}):(0,qt.jsx)(Cf,{variant:"body1",fontWeight:"h6.fontWeight",component:"p",children:(0,qt.jsx)(op,{component:"span",sx:e=>({mr:1,py:.5,px:1.5,color:e.palette.primary.theme[50],backgroundColor:e.palette.primary.theme[500],display:"inline-flex",fontSize:e.spacing(1.5),fontWeight:600,borderRadius:.5}),children:"Daily"})})}):(0,qt.jsx)(qt.Fragment,{children:cs(V)?(0,qt.jsx)(lS,{width:100}):(0,qt.jsx)(Cf,{variant:"body1",fontWeight:"h6.fontWeight",component:"p",children:(0,qt.jsx)(op,{component:"span",sx:e=>({mr:1,py:.5,px:1.5,color:e.palette.primary.theme[50],backgroundColor:e.palette.primary.theme[500],display:"inline-flex",fontSize:e.spacing(1.5),fontWeight:600,borderRadius:.5}),children:"None"})})})};return We.useEffect(()=>{const e={breadcrumb:ee};cs(G)||cs(q)||cs(V)||K(NC(e))},[G,q,V]),(0,qt.jsxs)(op,{sx:{width:"100%"},children:[(0,qt.jsxs)(op,{sx:{mb:1.5},position:"relative",children:[(0,qt.jsx)(Ff,{container:!0,spacing:2,alignItems:"center",children:(0,qt.jsx)(Ff,{item:!0,xs:!0,children:(0,qt.jsxs)(op,{sx:{mb:1},children:[(0,qt.jsx)(op,{sx:{display:{xs:"none",sm:"block",md:"block"}},children:(0,qt.jsx)(Cf,{variant:"h6",component:"h6",children:Z("rpm_ScheduleDetails")})}),(0,qt.jsx)(op,{sx:{display:{xs:"block",sm:"none",md:"none"}},position:"absolute",top:"-33px",left:"40px",children:(0,qt.jsx)(Cf,{variant:"h6",component:"h6",children:Z("rpm_ScheduleDetails")})})]})})}),(0,qt.jsx)(Ff,{container:!0,spacing:2,mt:.05,children:(0,qt.jsx)(Ff,{item:!0,xs:!0,children:(0,qt.jsx)(yH,{variant:"outlined",children:(0,qt.jsxs)(wH,{sx:{p:2.5},children:[(0,qt.jsxs)(Ff,{container:!0,spacing:2.5,children:[(0,qt.jsx)(Ff,{item:!0,xs:12,md:4,lg:3,children:(0,qt.jsxs)(pE,{flexDirection:"column",gap:{xs:1,lg:2},children:[(0,qt.jsx)(Cf,{variant:"body1",component:"p",fontWeight:"h6.fontWeight",sx:{flex:.4},children:Z("rpm_ScheduleName")}),(0,qt.jsx)(op,{sx:{flex:.6},children:cs(V)?(0,qt.jsx)(lS,{}):(0,qt.jsx)(Cf,{variant:"body2",component:"p",color:"primary",children:null!==V&&void 0!==V&&V.name?null===V||void 0===V?void 0:V.name:"NA"})})]})}),(0,qt.jsx)(Ff,{item:!0,xs:12,md:4,lg:3,children:(0,qt.jsxs)(pE,{flexDirection:"column",gap:{xs:1,lg:2},children:[(0,qt.jsx)(Cf,{variant:"body1",component:"p",fontWeight:"h6.fontWeight",sx:{flex:.4},children:Z("rpm_Program")}),(0,qt.jsx)(op,{sx:{flex:.6},children:cs(V)?(0,qt.jsx)(lS,{}):(0,qt.jsx)(Cf,{variant:"body2",component:"p",color:"primary",children:null!==V&&void 0!==V&&V.program?null===V||void 0===V?void 0:V.program:"NA"})})]})}),(0,qt.jsx)(Ff,{item:!0,xs:12,md:4,lg:3,children:(0,qt.jsxs)(pE,{flexDirection:"column",gap:{xs:1,lg:2},children:[(0,qt.jsx)(Cf,{variant:"body1",component:"p",fontWeight:"h6.fontWeight",sx:{flex:.4},children:Z("rpm_VitalName")}),(0,qt.jsx)(op,{sx:{flex:.6},children:cs(V)?(0,qt.jsx)(lS,{}):(0,qt.jsx)(dM,{component:"span",icon:!1,severity:"info",sx:e=>({py:0,px:1,display:"inline-flex",fontSize:e.spacing(1.5),fontWeight:600,"& .MuiAlert-message":{p:e.spacing(.5,0)}}),children:null!==V&&void 0!==V&&V.vital_name?Z("rpm_".concat(V.vital_name)):"NA"})})]})}),(0,qt.jsx)(Ff,{item:!0,xs:12,md:4,lg:3,children:(0,qt.jsxs)(pE,{flexDirection:"column",gap:{xs:1,lg:2},children:[(0,qt.jsx)(Cf,{variant:"body1",component:"p",fontWeight:"h6.fontWeight",sx:{flex:.4},children:Z("rpm_Duration")}),(0,qt.jsx)(op,{sx:{flex:.6},children:cs(V)?(0,qt.jsx)(lS,{}):(0,qt.jsx)(Cf,{variant:"body2",component:"p",color:"primary",children:null!==V&&void 0!==V&&V.duration?(null===V||void 0===V?void 0:V.duration)+" (days)":"NA"})})]})})]}),!cs(V)&&null!==V&&void 0!==V&&V.non_compliance?(0,qt.jsxs)(Ff,{container:!0,spacing:2.5,mt:.05,children:[(0,qt.jsx)(Ff,{item:!0,xs:12,md:4,lg:3,children:(0,qt.jsxs)(pE,{flexDirection:"column",gap:{xs:1,lg:2},children:[(0,qt.jsx)(Cf,{variant:"body1",component:"p",fontWeight:"h6.fontWeight",sx:{flex:.4},children:Z("rpm_NonComplianceNotification")}),(0,qt.jsx)(op,{sx:{flex:.6},children:cs(null===V||void 0===V?void 0:V.non_compliance)?(0,qt.jsx)(lS,{}):null!==V&&void 0!==V&&null!==(t=V.non_compliance)&&void 0!==t&&t.notification_enabled?(0,qt.jsx)(dM,{component:"span",icon:!1,severity:"success",sx:e=>({py:0,px:1,display:"inline-flex",fontSize:e.spacing(1.5),fontWeight:600,"& .MuiAlert-message":{p:e.spacing(.5,0)}}),children:"Active"}):(0,qt.jsx)(dM,{component:"span",icon:!1,severity:"info",sx:e=>({py:0,px:1,display:"inline-flex",fontSize:e.spacing(1.5),fontWeight:600,"& .MuiAlert-message":{p:e.spacing(.5,0)}}),children:"Inactive"})})]})}),(0,qt.jsx)(Ff,{item:!0,xs:12,md:4,lg:3,children:(0,qt.jsxs)(pE,{flexDirection:"column",gap:{xs:1,lg:2},children:[(0,qt.jsx)(Cf,{variant:"body1",component:"p",fontWeight:"h6.fontWeight",sx:{flex:.4},children:Z("rpm_Title")}),(0,qt.jsx)(op,{sx:{flex:.6},children:cs(null===V||void 0===V?void 0:V.non_compliance)?(0,qt.jsx)(lS,{}):(0,qt.jsx)(Cf,{variant:"body2",component:"p",color:"primary",sx:{wordBreak:"break-all"},children:null!==V&&void 0!==V&&null!==(n=V.non_compliance)&&void 0!==n&&n.notification_title?null===V||void 0===V||null===(r=V.non_compliance)||void 0===r?void 0:r.notification_title:"NA"})})]})}),(0,qt.jsx)(Ff,{item:!0,xs:12,md:4,lg:3,children:(0,qt.jsxs)(pE,{flexDirection:"column",gap:{xs:1,lg:2},children:[(0,qt.jsx)(Cf,{variant:"body1",component:"p",fontWeight:"h6.fontWeight",sx:{flex:.4},children:Z("rpm_Description")}),(0,qt.jsx)(op,{sx:{flex:.6},children:cs(null===V||void 0===V?void 0:V.non_compliance)?(0,qt.jsx)(lS,{}):(0,qt.jsx)(Cf,{variant:"body2",component:"p",color:"primary",sx:{wordBreak:"break-all"},children:null!==V&&void 0!==V&&null!==(i=V.non_compliance)&&void 0!==i&&i.notification_text?null===V||void 0===V||null===(o=V.non_compliance)||void 0===o?void 0:o.notification_text:"NA"})})]})}),(0,qt.jsx)(Ff,{item:!0,xs:12,md:4,lg:3,children:(0,qt.jsxs)(pE,{flexDirection:"column",gap:{xs:1,lg:2},children:[(0,qt.jsx)(Cf,{variant:"body1",component:"p",fontWeight:"h6.fontWeight",sx:{flex:.4},children:Z("rpm_MaxStrikes")}),(0,qt.jsx)(op,{sx:{flex:.6},children:cs(null===V||void 0===V?void 0:V.non_compliance)?(0,qt.jsx)(lS,{}):(0,qt.jsx)(Cf,{variant:"body2",component:"p",color:"primary",children:null!==V&&void 0!==V&&null!==(a=V.non_compliance)&&void 0!==a&&a.max_strikes?null===V||void 0===V||null===(s=V.non_compliance)||void 0===s?void 0:s.max_strikes:"NA"})})]})})]}):null===(null===V||void 0===V?void 0:V.non_compliance)?(0,qt.jsx)(Ff,{container:!0,spacing:2.5,mt:.05,children:(0,qt.jsx)(Ff,{item:!0,xs:12,children:(0,qt.jsx)(yp,{variant:"outlined",sx:{px:2.5,py:4,display:"flex",height:"100%"},children:(0,qt.jsxs)(op,{alignSelf:"center",sx:{mx:"auto"},children:[(0,qt.jsx)(Cf,{variant:"h6",children:"Non Compliance Notification not set"}),(0,qt.jsx)(op,{sx:{mt:3,textAlign:"center"},children:(0,qt.jsx)(xh,{color:"primary",variant:"contained",disableElevation:!0,onClick:()=>X("".concat(ld.DOCTOR.PROGRAM,"/").concat(J,"/course/").concat(Q,"/edit")),children:Z("rpm_SetNow")})})]})})})}):(0,qt.jsxs)(Ff,{container:!0,spacing:2.5,mt:.05,children:[(0,qt.jsx)(Ff,{item:!0,xs:12,md:4,lg:3,children:(0,qt.jsx)(lS,{})}),(0,qt.jsx)(Ff,{item:!0,xs:12,md:4,lg:3,children:(0,qt.jsx)(lS,{})}),(0,qt.jsx)(Ff,{item:!0,xs:12,md:4,lg:3,children:(0,qt.jsx)(lS,{})}),(0,qt.jsx)(Ff,{item:!0,xs:12,md:4,lg:3,children:(0,qt.jsx)(lS,{})})]})]})})})})]}),(0,qt.jsx)(op,{sx:{mb:2.5},children:(0,qt.jsx)(Ff,{container:!0,spacing:2.5,mt:.05,children:cs(null===V||void 0===V||null===(l=V.mandate)||void 0===l?void 0:l.timing)?(0,qt.jsx)(Ff,{item:!0,xs:12,children:0===(null===V||void 0===V||null===(U=V.mandate)||void 0===U?void 0:U.timing.length)?(0,qt.jsx)(yp,{variant:"outlined",sx:{px:2.5,py:6,textAlign:"center"},children:(0,qt.jsx)(op,{display:"flex",alignItems:"center",children:(0,qt.jsx)("img",{src:GC,style:{display:"block",margin:"auto"}})})}):(0,qt.jsx)(Ff,{item:!0,xs:12,children:(0,qt.jsx)(op,{sx:{height:"350px"},children:(0,qt.jsx)(yp,{variant:"outlined",sx:{px:2.5,py:6,display:"flex",height:"100%"},children:(0,qt.jsx)(op,{alignSelf:"center",sx:{mx:"auto"},children:(0,qt.jsx)(MM,{color:"primary"})})})})})}):(0,qt.jsxs)(qt.Fragment,{children:[(0,qt.jsxs)(Ff,{item:!0,xs:12,md:6,children:[(0,qt.jsx)(op,{children:(0,qt.jsx)(Cf,{variant:"h5",gutterBottom:!0,component:"h5",children:Z("rpm_MandateDetails")})}),null===V||void 0===V||null===(c=V.mandate)||void 0===c||null===(d=c.timing)||void 0===d?void 0:d.map((e,t)=>((e,t)=>{var n,r,i;return(0,qt.jsx)(Ff,{item:!0,xs:12,children:(0,qt.jsxs)(yH,{variant:"outlined",sx:{height:"100%",mb:2.5},children:[(0,qt.jsx)(nW,{sx:{py:1.5,bgcolor:"primary.theme.50",alignItems:"flex-start"},title:(0,qt.jsxs)(Cf,{variant:"h6",component:"h6",children:["Mandate ",t+1]}),subheader:(0,qt.jsx)(qt.Fragment,{})}),(0,qt.jsxs)(wH,{sx:{p:2.5},children:[(0,qt.jsxs)(pE,{flexDirection:{xs:"column",lg:"row"},gap:{xs:1,lg:2},alignItems:{xs:"left",lg:"center"},sx:{mb:2},children:[(0,qt.jsxs)(Cf,{variant:"body2",component:"p",fontWeight:600,sx:{flex:.4},children:[Z("rpm_StartTime")," :"]}),(0,qt.jsx)(op,{sx:{flex:.6},children:(0,qt.jsx)(Cf,{variant:"body2",component:"p",children:ys(null===e||void 0===e?void 0:e.start_time,null===V||void 0===V||null===(n=V.mandate)||void 0===n||null===(r=n.reminder_notification)||void 0===r||null===(i=r.interval)||void 0===i?void 0:i.pre_reminder)})})]}),(0,qt.jsxs)(pE,{flexDirection:{xs:"column",lg:"row"},gap:{xs:1,lg:2},alignItems:{xs:"left",lg:"center"},sx:{mb:2},children:[(0,qt.jsxs)(Cf,{variant:"body2",component:"p",fontWeight:600,sx:{flex:.4},children:[Z("rpm_EndTime")," :"]}),(0,qt.jsx)(op,{sx:{flex:.6},children:(0,qt.jsx)(Cf,{variant:"body2",component:"p",children:ys(null===e||void 0===e?void 0:e.end_time)})})]}),(null===e||void 0===e?void 0:e.activity_type)&&(0,qt.jsxs)(qt.Fragment,{children:[(0,qt.jsxs)(pE,{flexDirection:{xs:"column",lg:"row"},gap:{xs:1,lg:2},alignItems:{xs:"left",lg:"center"},sx:{mb:2},children:[(0,qt.jsxs)(Cf,{variant:"body2",component:"p",fontWeight:600,sx:{flex:.4},children:[Z("rpm_ActivityType")," :"]}),(0,qt.jsx)(op,{sx:{flex:.6},children:(0,qt.jsx)(Cf,{variant:"body2",component:"p",children:Z("rpm_".concat(null===e||void 0===e?void 0:e.activity_type))})})]}),(0,qt.jsxs)(pE,{flexDirection:{xs:"column",lg:"row"},gap:{xs:1,lg:2},alignItems:{xs:"left",lg:"center"},sx:{mb:2},children:[(0,qt.jsxs)(Cf,{variant:"body2",component:"p",fontWeight:600,sx:{flex:.4},children:[Z("rpm_ActivityName")," :"]}),(0,qt.jsx)(op,{sx:{flex:.6},children:(0,qt.jsx)(Cf,{variant:"body2",component:"p",children:null===e||void 0===e?void 0:e.activity_name})})]})]}),(0,qt.jsxs)(pE,{flexDirection:{xs:"column",lg:"row"},gap:{xs:1,lg:2},alignItems:{xs:"left",lg:"center"},sx:{mb:2},children:[(0,qt.jsxs)(Cf,{variant:"body2",component:"p",fontWeight:600,sx:{flex:.4},children:[Z("rpm_Repetition")," :"]}),(0,qt.jsx)(op,{sx:{flex:.6},children:(0,qt.jsx)(op,{children:te(e)})})]})]})]})},null===e||void 0===e?void 0:e.id)})(e,t))]}),(0,qt.jsxs)(Ff,{item:!0,xs:12,md:6,children:[(0,qt.jsx)(Cf,{variant:"h5",gutterBottom:!0,component:"h5",children:Z("rpm_NotificationsDetails")}),(0,qt.jsx)(op,{mb:2.5,children:(0,qt.jsxs)(yH,{variant:"outlined",children:[(0,qt.jsx)(nW,{sx:{py:1.5,bgcolor:"primary.theme.50",alignItems:"flex-start"},title:(0,qt.jsx)(Cf,{variant:"h6",component:"h6",children:Z("rpm_ReminderNotificationText")})}),(0,qt.jsxs)(wH,{sx:{p:2.5},children:[(0,qt.jsxs)(pE,{flexDirection:{xs:"column",lg:"row"},gap:{xs:1,lg:2},sx:{mb:2},children:[(0,qt.jsxs)(Cf,{variant:"body2",component:"p",fontWeight:600,sx:{flex:.3},children:[Z("rpm_SendInEvery")," :"]}),(0,qt.jsx)(op,{sx:{flex:.7},children:(0,qt.jsx)(Cf,{variant:"body2",component:"p",sx:{wordBreak:"break-all"},children:null!==V&&void 0!==V&&null!==(u=V.mandate)&&void 0!==u&&null!==(p=u.reminder_notification)&&void 0!==p&&null!==(h=p.interval)&&void 0!==h&&h.every?(null===V||void 0===V||null===(m=V.mandate)||void 0===m||null===(f=m.reminder_notification)||void 0===f||null===(g=f.interval)||void 0===g?void 0:g.every)/60+"min":"NA"})})]}),(0,qt.jsxs)(pE,{flexDirection:{xs:"column",lg:"row"},gap:{xs:1,lg:2},sx:{mb:2},children:[(0,qt.jsxs)(Cf,{variant:"body2",component:"p",fontWeight:600,sx:{flex:.3},children:[Z("rpm_Repetition")," :"]}),(0,qt.jsx)(op,{sx:{flex:.7},children:(0,qt.jsx)(Cf,{variant:"body2",component:"p",sx:{wordBreak:"break-all"},children:null!==V&&void 0!==V&&null!==(v=V.mandate)&&void 0!==v&&null!==(x=v.reminder_notification)&&void 0!==x&&null!==(y=x.interval)&&void 0!==y&&y.stop_after?(e=>{var t,n,r,i,o,a,s,l,c;return null!==e&&void 0!==e&&null!==(t=e.mandate)&&void 0!==t&&null!==(n=t.reminder_notification)&&void 0!==n&&null!==(r=n.interval)&&void 0!==r&&r.pre_reminder?(null===e||void 0===e||null===(i=e.mandate)||void 0===i||null===(o=i.reminder_notification)||void 0===o||null===(a=o.interval)||void 0===a?void 0:a.stop_after)-parseInt(1):null===e||void 0===e||null===(s=e.mandate)||void 0===s||null===(l=s.reminder_notification)||void 0===l||null===(c=l.interval)||void 0===c?void 0:c.stop_after})(V):"NA"})})]}),(0,qt.jsxs)(pE,{flexDirection:{xs:"column",lg:"row"},gap:{xs:1,lg:2},sx:{mb:2},children:[(0,qt.jsxs)(Cf,{variant:"body2",component:"p",fontWeight:600,sx:{flex:.3},children:[Z("rpm_Title")," :"]}),(0,qt.jsx)(op,{sx:{flex:.7},children:(0,qt.jsx)(Cf,{variant:"body2",component:"p",sx:{wordBreak:"break-all"},children:null!==V&&void 0!==V&&null!==(b=V.mandate)&&void 0!==b&&null!==(j=b.reminder_notification)&&void 0!==j&&j.fallback_title?null===V||void 0===V||null===(_=V.mandate)||void 0===_||null===(C=_.reminder_notification)||void 0===C?void 0:C.fallback_title:"NA"})})]}),(0,qt.jsxs)(pE,{flexDirection:{xs:"column",lg:"row"},gap:{xs:1,lg:2},sx:{mb:2},children:[(0,qt.jsxs)(Cf,{variant:"body2",component:"p",fontWeight:600,sx:{flex:.3},children:[Z("rpm_Description")," :"]}),(0,qt.jsx)(op,{sx:{flex:.7},children:(0,qt.jsx)(Cf,{variant:"body2",component:"p",sx:{wordBreak:"break-all"},children:null!==V&&void 0!==V&&null!==(w=V.mandate)&&void 0!==w&&null!==(S=w.reminder_notification)&&void 0!==S&&S.fallback_text?null===V||void 0===V||null===(A=V.mandate)||void 0===A||null===(k=A.reminder_notification)||void 0===k?void 0:k.fallback_text:"NA"})})]}),(0,qt.jsxs)(pE,{flexDirection:{xs:"column",lg:"row"},gap:{xs:1,lg:2},sx:{mb:2},children:[(0,qt.jsxs)(Cf,{variant:"body2",component:"p",fontWeight:600,sx:{flex:.3},children:[Z("rpm_PreReminder")," :"]}),(0,qt.jsx)(op,{sx:{flex:.7},children:(0,qt.jsx)(Cf,{variant:"body2",component:"p",sx:{wordBreak:"break-all"},children:null!==V&&void 0!==V&&null!==(T=V.mandate)&&void 0!==T&&null!==(E=T.reminder_notification)&&void 0!==E&&null!==(M=E.interval)&&void 0!==M&&M.pre_reminder?(null===V||void 0===V||null===(O=V.mandate)||void 0===O||null===(R=O.reminder_notification)||void 0===R||null===(P=R.interval)||void 0===P?void 0:P.pre_reminder)/60+" min":"NA"})})]}),!(null!==Y&&void 0!==Y&&null!==(D=Y.push_notification)&&void 0!==D&&D.reading_reminder)&&(0,qt.jsx)(op,{children:(0,qt.jsxs)(Cf,{variant:"body1",component:"p",color:"red.700",gutterBottom:!0,fontSize:"14px",children:["(",Z("message:rpm_notificationSettingMessage"),")"]})})]})]})}),(0,qt.jsx)(op,{mb:2.5,children:(0,qt.jsxs)(yH,{variant:"outlined",children:[(0,qt.jsx)(nW,{sx:{py:1.5,bgcolor:"primary.theme.50",alignItems:"flex-start"},title:(0,qt.jsx)(Cf,{variant:"h6",component:"h6",children:Z("rpm_MissedReadingNotification")})}),(0,qt.jsxs)(wH,{sx:{p:2.5},children:[(0,qt.jsxs)(pE,{flexDirection:{xs:"column",lg:"row"},gap:{xs:1,lg:2},sx:{mb:2},children:[(0,qt.jsxs)(Cf,{variant:"body2",component:"p",fontWeight:600,sx:{flex:.3},children:[Z("rpm_Title")," :"]}),(0,qt.jsx)(op,{sx:{flex:.7},children:(0,qt.jsx)(Cf,{variant:"body2",component:"p",sx:{wordBreak:"break-all"},children:null!==V&&void 0!==V&&null!==(N=V.mandate)&&void 0!==N&&null!==(L=N.missed_reading_notification)&&void 0!==L&&L.notification_title?null===V||void 0===V||null===(I=V.mandate)||void 0===I||null===(F=I.missed_reading_notification)||void 0===F?void 0:F.notification_title:"NA"})})]}),(0,qt.jsxs)(pE,{flexDirection:{xs:"column",lg:"row"},gap:{xs:1,lg:2},sx:{mb:2},children:[(0,qt.jsxs)(Cf,{variant:"body2",component:"p",fontWeight:600,sx:{flex:.3},children:[Z("rpm_Description")," :"]}),(0,qt.jsx)(op,{sx:{flex:.7},children:(0,qt.jsx)(Cf,{variant:"body2",component:"p",sx:{wordBreak:"break-all"},children:null!==V&&void 0!==V&&null!==($=V.mandate)&&void 0!==$&&null!==(B=$.missed_reading_notification)&&void 0!==B&&B.notification_text?null===V||void 0===V||null===(z=V.mandate)||void 0===z||null===(H=z.missed_reading_notification)||void 0===H?void 0:H.notification_text:"NA"})})]}),!(null!==Y&&void 0!==Y&&null!==(W=Y.push_notification)&&void 0!==W&&W.missed_mandate)&&(0,qt.jsx)(op,{children:(0,qt.jsxs)(Cf,{variant:"body1",component:"p",color:"red.700",gutterBottom:!0,fontSize:"14px",children:["(",Z("message:rpm_notificationSettingMessage"),")"]})})]})]})})]})]})})})]})};const obe=rbe(function(e){var t;let{activeProgram:n,patientData:r,notifications:i}=e;const o=wt(cu),{programId:a,courseId:s}=lo(),l=Nt(),[c,d]=We.useState(null);return We.useEffect(()=>{o&&a&&s&&(async()=>{try{const e=await l(nbe(a,s));d(e)}catch(e){console.log(e)}})()},[o,a,s]),We.useEffect(()=>{l(NC({activeMenuItem:"schedule"}))},[]),cs(n)?(0,qt.jsx)(yp,{variant:"outlined",sx:{px:2.5,py:6,display:"flex",height:"320px"},children:(0,qt.jsx)(op,{alignSelf:"center",sx:{mx:"auto"},children:(0,qt.jsx)(MM,{color:"primary"})})}):(0,qt.jsx)(qt.Fragment,{children:null!==n&&void 0!==n&&null!==(t=n.permissions)&&void 0!==t&&t.showViewCourseBtn?(0,qt.jsx)(ibe,{schedule:c,activeProgram:n,patientData:r,notifications:i}):(0,qt.jsx)(LC,{})})});function abe(e){var t;let{scheduleList:n,order:r,orderBy:o,setOrder:a,setOrderBy:s,dataParameter:l,scheduleHead:c,checkState:d,onCheck:u,isSelection:p,nodata:h,fetchScheduleList:m,handleAttachSchedule:f,freeScheduleList:g,actionAttachSchedule:v,viewButton:x,createConsultationButton:y,deleteButton:b,errSchedule:j,setErrSchedule:_,setSearchSchedule:C,program:w,patientData:S,filterState:A,setFilterState:k,courseDate:T,setCourseDate:E,setHeadcells:M,settingModal:O,initialHeadcells:R,handleSettingModalToggle:P}=e;const{t:D}=Vg(),N=Nt(),L=[{name:D("rpm_RPM"),url:ld.DOCTOR.PROGRAM},{name:null===w||void 0===w?void 0:w.display_name,url:"".concat(ld.DOCTOR.PROGRAM,"/").concat(null===w||void 0===w?void 0:w.code,"/patients")},{name:"".concat((null===S||void 0===S?void 0:S.first_name)||""," ").concat((null===S||void 0===S?void 0:S.last_name)||""),url:"".concat(ld.DOCTOR.PROGRAM,"/").concat(null===w||void 0===w?void 0:w.code,"/patients/").concat(null===S||void 0===S?void 0:S.id,"/dashboard")},{name:D("rpm_patientCourses"),url:""}],[I,F]=We.useState(0),[$,B]=We.useState(1),[z,H]=(0,We.useState)(20);return We.useEffect(()=>{const e={breadcrumb:L};ta()(w)||ta()(S)||N(NC(e))},[w,S]),(0,qt.jsx)(op,{sx:{width:"100%"},position:"relative",children:(0,qt.jsx)(Ff,{container:!0,spacing:2.5,children:(0,qt.jsxs)(Ff,{item:!0,xs:12,children:[(0,qt.jsx)(op,{sx:{mb:2.5},children:(0,qt.jsxs)(Ff,{container:!0,spacing:2,children:[(0,qt.jsx)(Ff,{item:!0,xs:!0,sx:{display:{xs:"none",sm:"block",md:"block"}},children:(0,qt.jsx)(Cf,{variant:"h5",component:"h5",children:D("rpm_patientCourses")})}),(0,qt.jsx)(Ff,{item:!0,xs:!0,sx:{display:{xs:"block",sm:"none",md:"none"}},children:(0,qt.jsx)(op,{position:"absolute",top:"-29px",bottom:"0",left:"40px",children:(0,qt.jsx)(Cf,{variant:"h6",component:"h6",children:D("rpm_patientCourses")})})}),(0,qt.jsx)(Ff,{item:!0,xs:!0,children:(null===w||void 0===w?void 0:w.is_hospital)&&(0,qt.jsxs)(Ff,{container:!0,spacing:2,className:"patientCourses-tour-step1",children:[(0,qt.jsxs)(Ff,{item:!0,xs:12,md:6,children:[(0,qt.jsx)(op,{children:(0,qt.jsx)(aj,{fullWidth:!0,size:"small",margin:"dense",id:"course",name:"course",options:ta()(g)?[]:g,isOptionEqualToValue:(e,t)=>e.id===t.id,getOptionLabel:e=>null===e||void 0===e?void 0:e.name,renderOption:(e,t)=>(0,We.createElement)(op,(0,i.A)((0,i.A)({component:"li"},e),{},{key:t.id}),(0,qt.jsx)(op,{children:(0,qt.jsx)(Cf,{variant:"body1",component:"p",children:t.name})})),onChange:(e,t,n)=>{null!==t&&void 0!==t&&t.id&&(f(null===t||void 0===t?void 0:t.id,null===t||void 0===t?void 0:t.vital_name),_(!1)),"clear"===n&&(_(!0),C(""))},onInputChange:(e,t)=>{C(t||"")},renderInput:e=>(0,qt.jsx)(Q_,(0,i.A)((0,i.A)({},e),{},{placeholder:D("rpm_SearchSchedule")+"..."}))})}),j&&(0,qt.jsx)(v_,{error:!0,children:D("message:rpm_PleaseSelectCourse")})]}),(0,qt.jsx)(Ff,{item:!0,xs:12,md:6,children:(0,qt.jsxs)(op,{display:"flex",children:[(0,qt.jsx)(op,{sx:{"& .MuiOutlinedInput-input":{py:1.0625}},children:(0,qt.jsx)(WM,{dateAdapter:DI,children:(0,qt.jsx)(fD,{size:"small",id:T,name:T,value:T,onChange:e=>E(e),renderInput:e=>(0,qt.jsx)(Q_,(0,i.A)({},e)),minDate:new Date,inputFormat:"dd/MM/yyyy"})})}),(0,qt.jsx)(op,{ml:2,children:(0,qt.jsx)(xh,{variant:"contained",color:"primary",sx:{whiteSpace:"nowrap"},disableElevation:!0,onClick:v,children:D("rpm_AssignSchedule")})})]})})]})})]})}),null!==w&&void 0!==w&&w.is_hospital?(0,qt.jsxs)(qt.Fragment,{children:[(0,qt.jsx)(op,{bgcolor:"#fff",mt:2,py:.5,pl:.5,sx:{borderTopLeftRadius:"8px",borderTopRightRadius:"8px"},children:(0,qt.jsxs)(Ff,{container:!0,spacing:2,alignItems:"center",children:[(0,qt.jsx)(Ff,{item:!0,xs:!0,md:6,lg:4,children:(0,qt.jsxs)(op,{display:"flex",p:1,borderRadius:2,className:"patientCourses-tour-step0",children:[(0,qt.jsx)(Kz,{initialValues:{vital:"",start_date:null,end_date:null},children:(0,qt.jsxs)(tH,{as:G_,displayEmpty:!0,sx:{borderRadius:2,bgcolor:"white",color:A?"grey.900":"grey.400",mr:1},fullWidth:!0,name:"vital",value:A,onChange:e=>{k(e.target.value),m({filter:e.target.value})},variant:"outlined",size:"small",endAdornment:(0,qt.jsx)(tw,{position:"end",sx:{position:"absolute",right:"28px"},children:(0,qt.jsx)(sy,{title:D("message:rpm_VitalTypeNoteHelp"),placement:"top",children:(0,qt.jsx)(wh,{size:"small",disableRipple:!0,sx:{p:0},children:(0,qt.jsx)(pM.A,{fontSize:"small"})})})}),children:[(0,qt.jsx)(mf,{value:"",sx:{display:"none"},children:D("rpm_VitalType")}),Dd.map(e=>(0,qt.jsx)(mf,{value:e.value,children:D("rpm_".concat(e.name))},e.value))]})}),(0,qt.jsx)(xh,{variant:"text",disableElevation:!0,type:"reset",onClick:()=>{k(""),m({filter:""})},children:(0,qt.jsx)(J_.A,{})})]})}),(0,qt.jsx)(Ff,{item:!0,ml:"auto",children:(0,qt.jsx)(sy,{title:D("rpm_TableCellSetting"),children:(0,qt.jsx)(sv,{sx:{boxShadow:"none",width:32,height:32,minHeight:"auto",marginRight:"10px"},size:"small",color:"primary",onClick:P,children:(0,qt.jsx)(YC.A,{fontSize:"small",sx:{width:16,height:16}})})})})]})}),(0,qt.jsxs)(op,{children:[(0,qt.jsx)(UT,{order:r,orderBy:o,setOrder:a,setOrderBy:s,data:n,headCells:null===c||void 0===c?void 0:c.filter(e=>R.includes(e.id)),dataParameter:l,selected:d,setSelected:u,isSelection:p,noDataImage:h,fetchList:m,skeletonVrows:6,className:"theme_scroll",children:null===n||void 0===n||null===(t=n.slice(I*z,I*z+Number(z)))||void 0===t?void 0:t.map((e,t)=>{var n,r,i,o,a,s,l,c;return(0,qt.jsxs)(cw,{sx:{"&:last-child td, &:last-child th":{border:0}},children:[p&&(0,qt.jsx)(gw,{padding:"checkbox",children:(0,qt.jsx)(Dw,{onChange:u,checked:d.includes(null===e||void 0===e?void 0:e.schedule.id.toString()),name:null===e||void 0===e?void 0:e.schedule.id.toString(),color:"primary"})}),R.includes("title")&&(0,qt.jsx)(gw,{width:300,children:(0,qt.jsx)(Lo,{className:"linkClr",to:"".concat(null===e||void 0===e?void 0:e.schedule.id),children:null===e||void 0===e?void 0:e.schedule.name})}),R.includes("vital_name")&&(0,qt.jsxs)(gw,{children:[" ","bp"===e.schedule.vital_name&&(0,qt.jsxs)(Cf,{color:"customClr.bp",fontWeight:600,component:"span",fontSize:14,children:[" ",D("rpm_".concat(e.schedule.vital_name))]}),"glucose"===e.schedule.vital_name&&(0,qt.jsxs)(Cf,{color:"customClr.glucose",fontWeight:600,component:"span",fontSize:14,children:[" ",D("rpm_".concat(e.schedule.vital_name))]})]}),R.includes("start_date")&&(0,qt.jsx)(gw,{children:(null===e||void 0===e?void 0:e.start_date)&&sa()(e.start_date).format("DD MMM YYYY hh:mm A")}),R.includes("end_date")&&(0,qt.jsx)(gw,{children:(null===e||void 0===e?void 0:e.end_date)&&sa()(e.end_date).format("DD MMM YYYY hh:mm A")}),R.includes("status")&&(0,qt.jsx)(gw,{children:(0,qt.jsx)(dM,{component:"span",icon:!1,severity:Cs(null===e||void 0===e?void 0:e.status),sx:e=>({py:0,px:1,display:"inline-flex",fontSize:e.spacing(1.5),fontWeight:600,"& .MuiAlert-message":{p:e.spacing(.5,0)}}),children:null!==e&&void 0!==e&&e.status?D("rpm_".concat(null===e||void 0===e?void 0:e.status)):"NA"})}),R.includes("mandates")&&(0,qt.jsx)(gw,{children:null!==e&&void 0!==e&&null!==(n=e.schedule)&&void 0!==n&&null!==(r=n.mandate)&&void 0!==r&&null!==(i=r.timing)&&void 0!==i&&i.length?null===e||void 0===e||null===(o=e.schedule)||void 0===o||null===(a=o.mandate)||void 0===a||null===(s=a.timing)||void 0===s?void 0:s.length:0}),R.includes("action")&&(0,qt.jsxs)(gw,{children:[(null===w||void 0===w||null===(l=w.permissions)||void 0===l?void 0:l.showViewCourseBtn)&&x(null===e||void 0===e?void 0:e.schedule),"active"===(null===e||void 0===e?void 0:e.status)&&y(e),(null===w||void 0===w||null===(c=w.permissions)||void 0===c?void 0:c.showDeleteCourseBtn)&&b(e)]})]},(null===e||void 0===e?void 0:e.schedule.id)+t)})}),(0,qt.jsx)(TE,{open:O,allHeadCells:c,initialHeadcells:R,setHeadcells:M,onClose:P})]}),(0,qt.jsx)(op,{py:2,children:(0,qt.jsxs)(Ff,{container:!0,spacing:2,alignItems:"center",justifyContent:"center",children:[(0,qt.jsx)(Ff,{item:!0,sm:!0,children:(0,qt.jsx)(ZE,{count:Math.ceil((null===n||void 0===n?void 0:n.length)/z),page:$,shape:"rounded",color:"primary",onChange:function(e,t){B(t),F(t-1)}})}),(0,qt.jsx)(Ff,{item:!0,children:(0,qt.jsxs)(op,{sx:{display:"flex",alignItems:"center"},children:[(0,qt.jsx)(Cf,{component:"p",variant:"body1",sx:{mr:2},children:"Rows Per Page"}),(0,qt.jsx)(d_,{margin:"dense",children:(0,qt.jsx)(G_,{variant:"outlined",size:"small",value:z,onChange:e=>{H(parseInt(e.target.value,10)),F(0)},children:[10,20,30,50,100].map(e=>(0,qt.jsx)(mf,{value:e,children:e},e))})})]})})]})})]}):(0,qt.jsxs)(op,{py:6,bgcolor:"#fff",border:"1px solid rgba(0, 0, 0, 0.12)",borderRadius:"4px",children:[(0,qt.jsx)("img",{src:GC,alt:"No Data Found",style:{display:"block",margin:"auto",width:"100%",maxWidth:"300px",height:"auto"}}),(0,qt.jsx)(op,{px:2,color:"#3f51b5",mt:2,display:"flex",justifyContent:"center",textAlign:"center",children:D("rpm_To_Explore_This")})]})]})})})}abe.defaultProps={scheduleHead:[],order:"",orderBy:"",setOrder:()=>{},setOrderBy:()=>{},dataParameter:"",checkState:"",onCheck:()=>{},isSelection:"",nodata:"",scheduleList:[],otherDiseaseList:[],familyDiseaseList:[],fetchScheduleList:()=>{},editButton:()=>{},viewButton:()=>{},createConsultationButton:()=>{},deleteButton:()=>{},attachSchedule:{},handleAttachSchedule:()=>{},freeScheduleList:[],errSchedule:!1,setErrSchedule:()=>{},setSearchSchedule:()=>{},program:{},patientData:{},filterState:"",setFilterState:()=>{},courseDate:{},setCourseDate:()=>{},initialHeadcells:[],setHeadcells:()=>{},settingModal:!1,handleSettingModalToggle:()=>{}};const sbe=abe;var lbe=n(68864);const cbe=zT({drawerHeader:{display:"flex",alignItems:"center","& .MuiSvgIcon-root":{color:"#7986cb"}},filterContent:{minHeight:"190px",paddingBottom:"60px",paddingTop:"6px",maxHeight:"300px","& .MuiInputBase-root":{textAlign:"left"},"& .MuiInputLabel-root":{transform:"translate(14px, 9px) scale(1)"},"& .MuiInputLabel-shrink":{transform:"translate(14px, -9px) scale(0.75)"},"& .MuiFormControl-root":{margin:"0px 0 15px 0"},"& .MuiInputBase-root.MuiOutlinedInput-root":{height:"40px"}},applyFilterBtn:{width:"calc(100% - 77px)"},titles:{color:"#7986cb",fontSize:"14px !important",fontWeight:"600 !important",letterSpacing:"0.02em"},linkClr:{fontSize:"14px !important",color:"#0000EE"}});function dbe(e){let{scheduleList:t,scheduleHead:n,checkState:r,onCheck:o,isSelection:a,fetchScheduleList:s,handleAttachSchedule:l,freeScheduleList:c,actionAttachSchedule:d,viewButton:u,createConsultationButton:p,deleteButton:h,errSchedule:m,setErrSchedule:f,setSearchSchedule:g,program:v,patientData:x,filterState:y,setFilterState:b,courseDate:j,setCourseDate:_,setHeadcells:C,settingModal:w,initialHeadcells:S,handleSettingModalToggle:A,filterVariant:k}=e;const{t:T}=Vg(),E=Nt(),M=[{name:T("rpm_RPM"),url:ld.DOCTOR.PROGRAM},{name:null===v||void 0===v?void 0:v.display_name,url:"".concat(ld.DOCTOR.PROGRAM,"/").concat(null===v||void 0===v?void 0:v.code,"/patients")},{name:"".concat((null===x||void 0===x?void 0:x.first_name)||""," ").concat((null===x||void 0===x?void 0:x.last_name)||""),url:"".concat(ld.DOCTOR.PROGRAM,"/").concat(null===v||void 0===v?void 0:v.code,"/patients/").concat(null===x||void 0===x?void 0:x.id,"/dashboard")},{name:T("rpm_patientCourses"),url:""}],[O,R]=(0,We.useState)(!1),P=()=>R(!1),D=cbe(),[N,L]=We.useState(!1),I=()=>{L(e=>!e)};return We.useEffect(()=>{const e={breadcrumb:M};ta()(v)||ta()(x)||E(NC(e))},[v,x]),(0,qt.jsx)(op,{sx:{width:"100%"},position:"relative",children:(0,qt.jsx)(Ff,{container:!0,spacing:2.5,children:(0,qt.jsxs)(Ff,{item:!0,xs:12,children:[(0,qt.jsxs)(op,{sx:{mb:2.5},children:[(0,qt.jsx)(op,{position:"absolute",top:"-29px",left:"40px",children:(0,qt.jsx)(Cf,{variant:"h6",component:"h6",children:T("rpm_patientCourses")})}),null!==v&&void 0!==v&&v.is_hospital?(0,qt.jsxs)(qt.Fragment,{children:[(0,qt.jsxs)(op,{display:"flex",alignItems:"center",justifyContent:"space-between",children:[(0,qt.jsxs)(xh,{variant:k,onClick:I,children:[(0,qt.jsx)(lbe.A,{}),"Filters"]}),(0,qt.jsx)(xh,{variant:"contained",onClick:()=>R(!0),children:"+ Assign Course"})]}),(0,qt.jsx)(dg,{anchor:"right",open:O,onClose:P,children:(0,qt.jsxs)(op,{bgcolor:"white",width:"300px",sx:{borderTopLeftRadius:"8px",borderTopRightRadius:"8px"},children:[(0,qt.jsxs)(op,{display:"flex",justifyContent:"space-between",alignItems:"center",mb:2,bgcolor:"#f2f2fe",py:1,px:1.8,children:[(0,qt.jsx)(Cf,{variant:"h6",sx:{color:"#7986cb",fontSize:"16px",fontWeight:"600"},children:"Assign Course"}),(0,qt.jsx)(wh,{onClick:P,children:(0,qt.jsx)(J_.A,{})})]}),(0,qt.jsxs)(op,{pl:1.5,pr:1.5,children:[(0,qt.jsx)(aj,{fullWidth:!0,size:"small",margin:"dense",id:"course",name:"course",options:ta()(c)?[]:c,isOptionEqualToValue:(e,t)=>e.id===t.id,getOptionLabel:e=>null===e||void 0===e?void 0:e.name,renderOption:(e,t)=>(0,We.createElement)(op,(0,i.A)((0,i.A)({component:"li"},e),{},{key:t.id}),(0,qt.jsx)(op,{children:(0,qt.jsx)(Cf,{variant:"body1",component:"p",children:t.name})})),onChange:(e,t,n)=>{null!==t&&void 0!==t&&t.id&&(l(null===t||void 0===t?void 0:t.id,null===t||void 0===t?void 0:t.vital_name),f(!1)),"clear"===n&&(f(!0),g(""))},onInputChange:(e,t)=>{g(t||"")},renderInput:e=>(0,qt.jsx)(Q_,(0,i.A)((0,i.A)({},e),{},{placeholder:T("rpm_SearchSchedule")+"..."}))}),m&&(0,qt.jsx)(v_,{error:!0,children:T("message:rpm_PleaseSelectCourse")}),(0,qt.jsx)(op,{mt:1,mb:1,sx:{"& .MuiOutlinedInput-input":{py:1.0625}},children:(0,qt.jsx)(WM,{dateAdapter:DI,children:(0,qt.jsx)(fD,{size:"small",id:j,name:j,value:j,onChange:e=>_(e),renderInput:e=>(0,qt.jsx)(Q_,(0,i.A)({},e)),minDate:new Date,inputFormat:"dd/MM/yyyy"})})})," ",(0,qt.jsx)(xh,{variant:"contained",color:"primary",disableElevation:!0,onClick:d,sx:{width:"100%",marginTop:"15px"},children:T("rpm_AssignSchedule")})]})]})}),(0,qt.jsx)(dg,{anchor:"bottom",open:N,onClose:I,transitionDuration:500,PaperProps:{sx:{borderRadius:"16px 16px 0 0"}},children:(0,qt.jsxs)(op,{sx:{textAlign:"center"},children:[(0,qt.jsxs)(op,{display:"flex",alignItems:"center",justifyContent:"space-between",px:"20px",py:1,mb:2,bgcolor:"#f2f2fe",color:"#7986cb",children:[(0,qt.jsx)(Cf,{variant:"h6",component:"h6",sx:{display:"flex",alignItems:"center"},children:(0,qt.jsxs)(op,{className:D.drawerHeader,children:[(0,qt.jsx)(lbe.A,{sx:{marginRight:"7px"}}),(0,qt.jsx)(Cf,{color:"primary",variant:"h6",children:"Filters"})]})}),(0,qt.jsx)(wh,{onClick:I,children:(0,qt.jsx)(J_.A,{})})]}),(0,qt.jsxs)(op,{px:2.5,className:D.filterContent,sx:{display:"flex",flexDirection:"column"},children:[(0,qt.jsx)(Kz,{initialValues:{vital:"",start_date:null,end_date:null},children:(0,qt.jsxs)(tH,{as:G_,displayEmpty:!0,sx:{borderRadius:2,bgcolor:"white",color:y?"grey.900":"grey.400",mr:1},fullWidth:!0,name:"vital",value:y,onChange:e=>{b(e.target.value),s({filter:e.target.value})},variant:"outlined",size:"small",endAdornment:(0,qt.jsx)(tw,{position:"end",sx:{position:"absolute",right:"28px"},children:(0,qt.jsx)(sy,{title:T("message:rpm_VitalTypeNoteHelp"),placement:"top",children:(0,qt.jsx)(wh,{size:"small",disableRipple:!0,sx:{p:0},children:(0,qt.jsx)(pM.A,{fontSize:"small"})})})}),children:[(0,qt.jsx)(mf,{value:"",sx:{display:"none"},children:T("rpm_VitalType")}),Dd.map(e=>(0,qt.jsx)(mf,{value:e.value,children:T("rpm_".concat(e.name))},e.value))]})}),(0,qt.jsxs)(op,{py:.5,display:"flex",alignItems:"center",width:"100%",position:"fixed",bottom:"0",left:"0",pl:"20px",borderTop:"1px solid #efefef",children:[(0,qt.jsx)(xh,{className:D.applyFilterBtn,variant:"contained",disableElevation:!0,disabled:""===y,sx:{mt:1,mr:2,height:"40px"},onClick:()=>{I()},children:T("rpm_ApplyFilters")}),(0,qt.jsx)(xh,{variant:"outlined",disableElevation:!0,type:"reset",sx:{mt:1},style:{minWidth:"40px",minHeight:"40px"},className:"resetBackupButton",onClick:()=>{b(""),s({filter:""})},children:(0,qt.jsx)(Eye.A,{fontSize:"small"})})]})]})]})})]}):(0,qt.jsxs)(op,{py:6,bgcolor:"#fff",border:"1px solid rgba(0, 0, 0, 0.12)",borderRadius:"4px",children:[(0,qt.jsx)("img",{src:GC,alt:"No Data Found",style:{display:"block",margin:"auto",width:"100%",maxWidth:"300px",height:"auto"}}),(0,qt.jsx)(op,{px:2,color:"#3f51b5",mt:2,display:"flex",justifyContent:"center",textAlign:"center",children:T("rpm_To_Explore_This")})]})]}),(null===v||void 0===v?void 0:v.is_hospital)&&(0,qt.jsxs)(op,{children:[(0,qt.jsx)(op,{display:"flex",flexWrap:"wrap",gap:2,className:"theme_scroll",children:null===t||void 0===t?void 0:t.map((e,t)=>{var n,i,s,l,c;return(0,qt.jsxs)(yH,{sx:{width:"100%",boxShadow:2,marginBottom:"5px",borderLeft:"4px solid #868fcd",overflow:"auto"},children:[a&&(0,qt.jsx)(qH,{children:(0,qt.jsx)(Dw,{onChange:o,checked:r.includes(null===e||void 0===e?void 0:e.schedule.id.toString()),name:null===e||void 0===e?void 0:e.schedule.id.toString(),color:"primary"})}),(0,qt.jsxs)(wH,{children:[(0,qt.jsxs)(op,{display:"flex",justifyContent:"space-between",children:[(0,qt.jsxs)(op,{display:"flex",flexDirection:"column",sx:{width:"100%"},children:[(0,qt.jsx)(Cf,{variant:"body1",className:D.titles,fontWeight:600,children:T("rpm_Title")}),S.includes("title")&&(0,qt.jsx)(Cf,{variant:"span",children:(0,qt.jsx)(Lo,{className:D.linkClr,to:"".concat(null===e||void 0===e?void 0:e.schedule.id),children:null===e||void 0===e?void 0:e.schedule.name})})]}),(0,qt.jsx)(op,{className:D.alertBadge,children:S.includes("status")&&(0,qt.jsx)(dM,{icon:!1,severity:Cs(null===e||void 0===e?void 0:e.status),sx:e=>({display:"inline-flex",fontSize:e.spacing(1.5),fontWeight:600,"& .MuiAlert-message":{p:e.spacing(.5,0)}}),children:null!==e&&void 0!==e&&e.status?T("rpm_".concat(null===e||void 0===e?void 0:e.status)):"NA"})})]}),(0,qt.jsxs)(op,{display:"flex",children:[(0,qt.jsxs)(op,{display:"flex",flexDirection:"column",sx:{width:"100%",marginTop:"10px"},children:[(0,qt.jsx)(Cf,{variant:"body1",className:D.titles,fontWeight:600,children:T("rpm_Vitals")}),S.includes("vital_name")&&(0,qt.jsx)(Cf,{color:"bp"===e.schedule.vital_name?"customClr.bp":"customClr.glucose",fontWeight:600,fontSize:14,children:T("rpm_".concat(e.schedule.vital_name))})]}),(0,qt.jsx)(eg,{orientation:"vertical",variant:"middle",flexItem:!0,sx:{mx:"10px"}}),(0,qt.jsxs)(op,{display:"flex",flexDirection:"column",sx:{width:"100%",marginTop:"10px"},children:[(0,qt.jsx)(Cf,{variant:"body1",className:D.titles,fontWeight:600,children:T("rpm_Mandate")}),S.includes("mandates")&&(0,qt.jsx)(Cf,{children:(null===e||void 0===e||null===(n=e.schedule)||void 0===n||null===(i=n.mandate)||void 0===i||null===(s=i.timing)||void 0===s?void 0:s.length)||0})]})]}),(0,qt.jsxs)(op,{display:"flex",flexDirection:"column",sx:{width:"100%",marginTop:"10px"},children:[(0,qt.jsx)(Cf,{variant:"body1",className:D.titles,fontWeight:600,children:T("rpm_StartDate")}),S.includes("start_date")&&(0,qt.jsxs)(Cf,{color:"textSecondary",children:[" ",(null===e||void 0===e?void 0:e.start_date)&&sa()(e.start_date).format("DD MMM YYYY hh:mm A")]})]}),(0,qt.jsxs)(op,{display:"flex",flexDirection:"column",sx:{width:"100%",marginTop:"10px"},children:[(0,qt.jsx)(Cf,{variant:"body1",className:D.titles,fontWeight:600,children:T("rpm_EndDate")}),S.includes("end_date")&&(0,qt.jsx)(Cf,{color:"textSecondary",children:(null===e||void 0===e?void 0:e.end_date)&&sa()(e.end_date).format("DD MMM YYYY hh:mm A")})]})]}),(0,qt.jsx)(qH,{children:S.includes("action")&&(0,qt.jsxs)(qt.Fragment,{children:[(null===v||void 0===v||null===(l=v.permissions)||void 0===l?void 0:l.showViewCourseBtn)&&u(null===e||void 0===e?void 0:e.schedule),"active"===(null===e||void 0===e?void 0:e.status)&&p(e),(null===v||void 0===v||null===(c=v.permissions)||void 0===c?void 0:c.showDeleteCourseBtn)&&h(e)]})})]},(null===e||void 0===e?void 0:e.schedule.id)+t)})}),(0,qt.jsx)(TE,{open:w,allHeadCells:n,initialHeadcells:S,setHeadcells:C,onClose:A})]})]})})})}dbe.defaultProps={scheduleHead:[],order:"",orderBy:"",setOrder:()=>{},setOrderBy:()=>{},dataParameter:"",checkState:"",onCheck:()=>{},isSelection:"",nodata:"",scheduleList:[],otherDiseaseList:[],familyDiseaseList:[],fetchScheduleList:()=>{},editButton:()=>{},viewButton:()=>{},createConsultationButton:()=>{},deleteButton:()=>{},attachSchedule:{},handleAttachSchedule:()=>{},freeScheduleList:[],errSchedule:!1,setErrSchedule:()=>{},setSearchSchedule:()=>{},program:{},patientData:{},filterState:"",setFilterState:()=>{},courseDate:{},setCourseDate:()=>{},initialHeadcells:[],setHeadcells:()=>{},settingModal:!1,handleSettingModalToggle:()=>{}};const ube=dbe;const pbe=function(e){var t;let{program:n,patientData:r}=e;const o=window.innerWidth,a=Nt(),s=so(),{programId:l,patientId:c}=lo(),d=wt(bu),u=!("true"===us(d,"user_principal.attributes.skip_tour[0]","")),p=wt(cu),{t:h}=Vg(),{enqueueSnackbar:m}=hi(),[f,g]=(0,We.useState)("desc"),[v,x]=(0,We.useState)("created_at"),[y,b]=We.useState(""),[j,_]=We.useState(""),[C,w]=We.useState(""),[S,A]=We.useState(null),[k,T]=We.useState(null),[E,M]=(0,We.useState)([]),[O,R]=We.useState(null),[P,D]=We.useState(!1),[N,L]=We.useState(""),[I,F]=We.useState(new Date),[$,B]=We.useState(!1),[z,H]=We.useState(!1),[W,U]=We.useState({open:!1,data:{}}),V=e=>{U((0,i.A)((0,i.A)({},W),{},{open:!W.open,data:e}))},[G,q]=We.useState({open:!1,data:{}}),Y=e=>{q((0,i.A)((0,i.A)({},G),{},{open:!G.open,data:e}))},Z=(e,t)=>{R({value:e,vital:t})},[K,X]=We.useState(!1),[Q,J]=We.useState(cs($o.getScheduleHeadcells())?["title","vital_name","start_date","end_date","status","mandates","action"]:$o.getScheduleHeadcells()),ee=function(e){J(e),$o.setScheduleHeadcells(e)},te=()=>{X(!K)},ne=async()=>{O&&!P?"bp"==(null===O||void 0===O?void 0:O.vital)&&$||"glucose"==(null===O||void 0===O?void 0:O.vital)&&z?Y(null===O||void 0===O?void 0:O.value):await ae({programId:l,scheduleId:null===O||void 0===O?void 0:O.value,patientId:r.id},sa()(I).format("DD/MM/YYYY")!=sa()(new Date).format("DD/MM/YYYY")?sa()(I).startOf("day"):null):D(!0)},re=e=>{if(Array.isArray(e))return M(e.map(e=>e.toString()));const t=e.target.name;E.includes(t)?M(E.filter(e=>e!==t)):M(e=>[...e,t])},ie=async function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{q:y,filter:N};try{const{data:t}=await a(Sl({sort_by:v,sort_order:f,q:e.q,filter:[e.filter]},{patientId:r.id,programId:l}));A(t)}catch(t){m(t.message,{variant:"error"})}},oe=async()=>{const e={sort_by:v,sort_order:f,q:C};try{const{data:t}=await a(((e,t)=>async n=>{n(na(!0));try{const n="".concat(la.schedules,"/-/").concat(e||"","?&q=").concat(t.q,"&page=").concat(t.current_page||"","&perPage=").concat(t.per_page||"","&sortBy=").concat(t.sort_by||"","&sortOrder=").concat(t.sort_order||"");return await Iu(n,{})}finally{n(na(!1))}})(l,e)),{content:n}=t||{},r=null===n||void 0===n?void 0:n.filter(e=>!0!==(null===e||void 0===e?void 0:e.dummy));T(r)}catch(t){m(t.message,{variant:"error"})}},ae=async(e,t)=>{try{await a(((e,t)=>async n=>{n(na(!0));try{const n="".concat(la.schedules,"/-/").concat(e.programId,"/").concat(e.scheduleId,"/patient/").concat(e.patientId,"?startDate=").concat(sa()(t).valueOf()?sa()(t).valueOf():"");return await Iu(n,{})}finally{n(na(!1))}})(e,t)),G.open&&Y(),await ie(),m(h("message:rpm_AttachScheduleSuccess"),{variant:"success"})}catch(n){const e=us(n,"response.data.code","");cs(e)?a(Zo({subTitle:"error:rpm_CourseAttachFailed",severity:ud.ERROR})):a(Zo({subTitle:Vd(e,"error:rpm_CourseAttachFailed"),severity:ud.ERROR}))}},se=async e=>{const t=null===S||void 0===S?void 0:S.find(t=>t.id===e.scheduleId);try{t.active?m(h("message:rpm_ActiveCourseNotDelete"),{variant:"error"}):(await a((e=>async t=>{t(na(!0));try{const t="".concat(la.schedules,"/-/").concat(e.programId,"/").concat(e.scheduleId,"/patient/").concat(e.patientId);return await Bu(t,{})}finally{t(na(!1))}})(e)),U({open:!1,data:{}}),ie(),m(h("message:rpm_DeAttachScheduleSuccess"),{variant:"success"}))}catch(n){m(n.message,{variant:"error"})}},le=e=>(0,qt.jsx)(sy,{title:h("rpm_Edit"),children:(0,qt.jsx)(wh,{"data-id":e.id,color:"primary",onClick:()=>console.log(e),children:(0,qt.jsx)(fc,{fontSize:"small",sx:{width:16,height:16}})})}),ce=e=>(0,qt.jsx)(sy,{title:h("rpm_view"),children:(0,qt.jsx)(wh,{"data-id":e.id,color:"primary",onClick:()=>s("".concat(e.id)),children:(0,qt.jsx)(gc,{fontSize:"small",sx:{width:16,height:16}})})}),de=e=>(0,qt.jsx)(sy,{title:h("rpm_CreateConsultation"),children:(0,qt.jsx)(wh,{"data-id":e.id,color:"primary",onClick:()=>s("".concat(ld.DOCTOR.PROGRAM,"/").concat(l,"/patients/").concat(c,"/consultations/add-consultation"),{state:e}),children:(0,qt.jsx)(vc,{fontSize:"small",sx:{width:16,height:16}})})}),ue=e=>(0,qt.jsx)(sy,{title:h("rpm_Delete"),children:(0,qt.jsx)(wh,{"data-id":e.id,disabled:"upcoming"!==(null===e||void 0===e?void 0:e.status),color:"error",onClick:()=>V(e),children:(0,qt.jsx)(xc,{fontSize:"small",sx:{width:16,height:16}})})});We.useEffect(()=>{p&&r&&ie()},[p,r]),We.useEffect(()=>{p&&S&&(null!==S&&void 0!==S&&S.find(e=>{var t;return"active"===e.status&&"bp"===(null===e||void 0===e||null===(t=e.schedule)||void 0===t?void 0:t.vital_name)})&&B(!0),null!==S&&void 0!==S&&S.find(e=>{var t;return"active"===e.status&&"glucose"===(null===e||void 0===e||null===(t=e.schedule)||void 0===t?void 0:t.vital_name)})&&H(!0))},[p,S]),We.useEffect(()=>{p&&l&&oe()},[p,l,C]),We.useEffect(()=>{a(NC({activeMenuItem:"schedule"}))},[]);const pe=[{id:"title",label:h("rpm_Title"),isSort:!1,sortProperty:"title"},{id:"vital_name",label:h("rpm_Vitals"),isSort:!1,sortProperty:"vital_name"},{id:"start_date",label:h("rpm_StartDate"),isSort:!1,sortProperty:"start_date"},{id:"end_date",label:h("rpm_EndDate"),isSort:!1,sortProperty:"end_date"},{id:"status",label:h("rpm_Status"),isSort:!1,sortProperty:"status"},{id:"mandates",label:h("rpm_Mandates"),isSort:!1,sortProperty:"mandates"},{id:"action",label:h("rpm_Actions"),isSort:!1,sortProperty:"action"}];return cs(n)?(0,qt.jsx)(yp,{variant:"outlined",sx:{px:2.5,py:6,display:"flex",height:"320px"},children:(0,qt.jsx)(op,{alignSelf:"center",sx:{mx:"auto"},children:(0,qt.jsx)(MM,{color:"primary"})})}):(0,qt.jsxs)(qt.Fragment,{children:[null!==n&&void 0!==n&&null!==(t=n.permissions)&&void 0!==t&&t.showCourseList?o>=575?(0,qt.jsx)(sbe,{order:f,orderBy:v,setOrder:g,setOrderBy:x,searchText:y,setSearchText:b,dataParameter:"id",checkState:E,onCheck:re,isSelection:!1,nodata:GC,scheduleHead:pe,scheduleList:S,fetchScheduleList:ie,editButton:le,viewButton:ce,createConsultationButton:de,deleteButton:ue,attachSchedule:O,handleAttachSchedule:Z,freeScheduleList:k,actionAttachSchedule:ne,errSchedule:P,setErrSchedule:D,setSearchSchedule:w,program:n,patientData:r,filterState:N,setFilterState:L,courseDate:I,setCourseDate:F,setHeadcells:ee,settingModal:K,initialHeadcells:Q,handleSettingModalToggle:te}):(0,qt.jsx)(ube,{order:f,orderBy:v,setOrder:g,setOrderBy:x,searchText:y,setSearchText:b,dataParameter:"id",checkState:E,onCheck:re,isSelection:!1,nodata:GC,scheduleHead:pe,scheduleList:S,fetchScheduleList:ie,editButton:le,viewButton:ce,createConsultationButton:de,deleteButton:ue,attachSchedule:O,handleAttachSchedule:Z,freeScheduleList:k,actionAttachSchedule:ne,errSchedule:P,setErrSchedule:D,setSearchSchedule:w,program:n,patientData:r,filterState:N,setFilterState:L,courseDate:I,setCourseDate:F,setHeadcells:ee,settingModal:K,initialHeadcells:Q,handleSettingModalToggle:te}):(0,qt.jsx)(LC,{}),(0,qt.jsx)(qV,{openModal:W.open,onCloseModal:V,actionFunction:()=>se({programId:l,scheduleId:W.data.id,patientId:r.id}),dataName:"",options:{primaryText:h("message:rpm_DeleteCourse"),secondaryText:h("message:rpm_DeleteCourseBodyText"),btn:{primaryText:h("rpm_Delete"),secondaryText:h("rpm_Cancel"),primaryColor:"error",secondaryColor:"primary"},btnSwap:!0}}),(0,qt.jsx)(qV,{openModal:G.open,onCloseModal:Y,actionFunction:()=>ae({programId:l,scheduleId:null===O||void 0===O?void 0:O.value,patientId:r.id},sa()(I).format("DD/MM/YYYY")!=sa()(new Date).format("DD/MM/YYYY")?sa()(I).startOf("day"):null),dataName:"",options:{primaryText:h("message:rpm_AttachCourse"),secondaryText:h("message:rpm_AttachCourseText"),btn:{primaryText:h("rpm_Yes"),secondaryText:h("rpm_No"),primaryColor:"success",secondaryColor:"primary"},btnSwap:!0}}),(0,qt.jsx)(zZ,{isTour:u,path:"patientCoursesTour",setRenderer:_}),(0,qt.jsx)("input",{type:"hidden",id:"rerenderer",value:j})]})};const hbe=function(){return(0,qt.jsx)("div",{children:"OxyDashboard"})};const mbe=function(){return We.useEffect(()=>{console.log("OxyDashboardContainer")},[]),(0,qt.jsx)(hbe,{})};const fbe=n.p+"static/media/no_course_attached.b60bd29dc00c5b7590b606a343fd7200.svg";const gbe=["children","value","index"];function vbe(e){const{children:t,value:n,index:r}=e,o=Ko(e,gbe);return(0,qt.jsx)("div",(0,i.A)((0,i.A)({role:"tabpanel",hidden:n!==r,id:"simple-tabpanel-".concat(r),"aria-labelledby":"simple-tab-".concat(r)},o),{},{children:n===r&&t}))}function xbe(e){return{id:"simple-tab-".concat(e),"aria-controls":"simple-tabpanel-".concat(e)}}function ybe(e){var t;let{patientId:n,patientLastFrame:r,activeAlertCount:o,tabValue:a,handleChangeTabs:s,pageDetails:l,BpDashboardContainer:c,GlucoseDashboardContainer:d,patientData:u,program:p,bpVital:h,glucoseVital:m}=e;const{t:f}=Vg();r&&sa()(null===(t=r[0])||void 0===t?void 0:t.ts).format("DD MMM YYYY hh:mm A");return(0,qt.jsxs)(op,{sx:{width:"100%"},children:[!1,(0,qt.jsx)(Ff,{container:!0,spacing:2.5,alignItems:"center",children:(0,qt.jsx)(Ff,{item:!0,xs:!0,children:(0,qt.jsx)(Cf,{variant:"h5",component:"h5",sx:{display:{xs:"none",md:"block"}},children:f("rpm_medicalCharts")})})}),null!==a?(0,qt.jsxs)(qt.Fragment,{children:[(0,qt.jsxs)(Ff,{container:!0,spacing:2.5,alignItems:"center",children:[(0,qt.jsx)(Ff,{item:!0,xs:12,children:(0,qt.jsx)(op,{sx:{borderBottom:1,borderColor:"divider"},children:(0,qt.jsxs)(fV,{value:a,onChange:s,"aria-label":"basic tabs example",sx:{mt:1},children:[(0,qt.jsx)(zU,(0,i.A)((0,i.A)({label:f("rpm_bp")},xbe(0)),{},{disabled:0===(null===h||void 0===h?void 0:h.length),sx:{display:0===(null===h||void 0===h?void 0:h.length)?"none":"block"}})),(0,qt.jsx)(zU,(0,i.A)((0,i.A)({label:f("rpm_glucose")},xbe(1)),{},{disabled:0===(null===m||void 0===m?void 0:m.length),sx:{display:0===(null===m||void 0===m?void 0:m.length)?"none":"block"}}))]})})}),(0,qt.jsx)(Ff,{item:!0})]}),(null===h||void 0===h?void 0:h.length)>0&&(0,qt.jsx)(vbe,{value:a,index:0,children:(0,qt.jsx)(c,{patientLastFrame:r,patientId:n,patientData:u,program:p})}),(null===m||void 0===m?void 0:m.length)>0&&(0,qt.jsx)(vbe,{value:a,index:1,children:(0,qt.jsx)(d,{patientData:u,program:p})}),(0,qt.jsx)(vbe,{value:a,index:2,children:"BMI"}),(0,qt.jsx)(vbe,{value:a,index:3,children:"WEIGHT"}),(0,qt.jsx)(vbe,{value:a,index:4,children:(0,qt.jsx)(mbe,{})})]}):(0,qt.jsx)(yH,{sx:{mt:2},children:(0,qt.jsxs)(op,{py:6,children:[(0,qt.jsx)("img",{src:fbe,alt:"No Data Found",style:{display:"block",margin:"auto"},width:"200px"}),(0,qt.jsx)(Cf,{component:"h6",variant:"h6",textAlign:"center",sx:{color:"grey.500"},fontWeight:"500",children:f("rpm_NoCourseAttached")})]})})]})}ybe.defaultProps={patientId:"",patientLastFrame:[],activeAlertCount:[],tabValue:0,handleChangeTabs:()=>{},bpVital:[],glucoseVital:[]};const bbe=ybe;const jbe=function(){return(0,qt.jsxs)(Ff,{item:!0,xs:12,sm:!0,container:!0,spacing:2.5,children:[(0,qt.jsx)(Ff,{item:!0,children:(0,qt.jsxs)(op,{sx:{display:"flex",alignItems:"flex-start"},children:[(0,qt.jsx)(lS,{variant:"rounded",width:40,height:40,sx:{borderRadius:1}}),(0,qt.jsxs)(op,{sx:{flexGrow:1,ml:2},children:[(0,qt.jsx)(Cf,{variant:"body2",component:"p",fontWeight:500,children:(0,qt.jsx)(lS,{variant:"text",width:100})}),(0,qt.jsx)(Cf,{variant:"h6",component:"h6",children:(0,qt.jsx)(lS,{variant:"text",width:50})})]})]})}),(0,qt.jsx)(Ff,{item:!0,children:(0,qt.jsxs)(op,{sx:{display:"flex",alignItems:"flex-start"},children:[(0,qt.jsx)(lS,{variant:"rounded",width:40,height:40,sx:{borderRadius:1}}),(0,qt.jsxs)(op,{sx:{flexGrow:1,ml:2},children:[(0,qt.jsx)(Cf,{variant:"body2",component:"p",fontWeight:500,children:(0,qt.jsx)(lS,{variant:"text",width:100})}),(0,qt.jsx)(Ff,{container:!0,spacing:1,alignItems:"center",children:(0,qt.jsx)(Ff,{item:!0,children:(0,qt.jsx)(Cf,{variant:"h6",component:"h6",children:(0,qt.jsx)(lS,{variant:"text",width:50})})})})]})]})})]})};var _be=n(44448),Cbe=n(56658);const wbe=n.p+"static/media/active_alerts.7bc51e9739d3c5191b18a5fc62b95676.svg";n.p;const Sbe=n.p+"static/media/resolved_alerts.30784fed298dfef5516f5d999b670792.svg";function Abe(e){let{order:t,orderBy:n,setOrder:r,setOrderBy:i,alertData:o,headCellsItems:a,resolvedButton:s,fetchPatientAlerts:l,activeAlertsPageDetails:c,deleteAlertButton:d}=e;const{t:u}=Vg();return(0,qt.jsxs)(op,{sx:{"& .MuiPaper-root":{borderTopLeftRadius:0,borderTopRightRadius:0}},children:[(0,qt.jsx)(UT,{order:t,orderBy:n,setOrder:r,setOrderBy:i,data:o,headCells:a,noDataImage:GC,fetchList:l,skeletonVrows:6,stickyHeader:!0,scrollHeight:400,className:"theme_scroll",children:null===o||void 0===o?void 0:o.map(e=>{var t;return(0,qt.jsxs)(cw,{sx:{"&:last-child td, &:last-child th":{border:0}},children:[(0,qt.jsx)(gw,{children:(null===e||void 0===e||null===(t=e.alerts)||void 0===t?void 0:t.length)>0?null===e||void 0===e?void 0:e.alerts.map((t,n)=>{var r,i,o,a;return(0,qt.jsx)(op,{className:null===t||void 0===t?void 0:t.text,display:"inline-flex",mr:n===(null===e||void 0===e||null===(r=e.alerts)||void 0===r?void 0:r.length)-1?0:1,children:(0,qt.jsxs)(op,{component:"span",children:["bp systolic"===(null===t||void 0===t?void 0:t.data_name)&&"".concat(u("rpm_Sys"),": "),"bp diastolic"===(null===t||void 0===t?void 0:t.data_name)&&"".concat(u("rpm_Dia"),": "),"glucose"===(null===t||void 0===t||null===(i=t.data_name)||void 0===i||null===(o=i.split(" "))||void 0===o?void 0:o[0])&&"".concat(null===t||void 0===t||null===(a=t.data_name)||void 0===a?void 0:a.replace("glucose",""),": "),"pulse"===(null===t||void 0===t?void 0:t.data_name)&&"".concat(u("rpm_pulse"),": "),null===t||void 0===t?void 0:t.value]})},n)}):"NA"}),(0,qt.jsx)(gw,{children:null===e||void 0===e?void 0:e.alerts.map((e,t)=>(0,qt.jsx)(op,{children:0===t&&(0,qt.jsx)(op,{component:"span",children:u("rpm_".concat(null===e||void 0===e?void 0:e.text))})},t))}),(0,qt.jsx)(gw,{children:e.ts}),(0,qt.jsxs)(gw,{children:[s(e),d(e)]})]},e.id)})}),(0,qt.jsx)(KE,{pageDetails:c,fetchListFunction:l})]})}var kbe=n(94992),Tbe=n(54444);function Ebe(e){return(0,sr.Ay)("MuiToggleButton",e)}const Mbe=(0,ar.A)("MuiToggleButton",["root","disabled","selected","standard","primary","secondary","sizeSmall","sizeMedium","sizeLarge","fullWidth"]);const Obe=We.createContext({});const Rbe=We.createContext(void 0);function Pbe(e,t){return void 0!==t&&void 0!==e&&(Array.isArray(t)?t.indexOf(e)>=0:e===t)}const Dbe=["value"],Nbe=["children","className","color","disabled","disableFocusRipple","fullWidth","onChange","onClick","selected","size","value"],Lbe=(0,Vn.Ay)(sh,{name:"MuiToggleButton",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t["size".concat((0,pp.A)(n.size))]]}})(e=>{let t,{theme:n,ownerState:r}=e,i="standard"===r.color?n.palette.text.primary:n.palette[r.color].main;return n.vars&&(i="standard"===r.color?n.vars.palette.text.primary:n.vars.palette[r.color].main,t="standard"===r.color?n.vars.palette.text.primaryChannel:n.vars.palette[r.color].mainChannel),(0,Ft.A)({},n.typography.button,{borderRadius:(n.vars||n).shape.borderRadius,padding:11,border:"1px solid ".concat((n.vars||n).palette.divider),color:(n.vars||n).palette.action.active},r.fullWidth&&{width:"100%"},{["&.".concat(Mbe.disabled)]:{color:(n.vars||n).palette.action.disabled,border:"1px solid ".concat((n.vars||n).palette.action.disabledBackground)},"&:hover":{textDecoration:"none",backgroundColor:n.vars?"rgba(".concat(n.vars.palette.text.primaryChannel," / ").concat(n.vars.palette.action.hoverOpacity,")"):Qn(n.palette.text.primary,n.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}},["&.".concat(Mbe.selected)]:{color:i,backgroundColor:n.vars?"rgba(".concat(t," / ").concat(n.vars.palette.action.selectedOpacity,")"):Qn(i,n.palette.action.selectedOpacity),"&:hover":{backgroundColor:n.vars?"rgba(".concat(t," / calc(").concat(n.vars.palette.action.selectedOpacity," + ").concat(n.vars.palette.action.hoverOpacity,"))"):Qn(i,n.palette.action.selectedOpacity+n.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:n.vars?"rgba(".concat(t," / ").concat(n.vars.palette.action.selectedOpacity,")"):Qn(i,n.palette.action.selectedOpacity)}}}},"small"===r.size&&{padding:7,fontSize:n.typography.pxToRem(13)},"large"===r.size&&{padding:15,fontSize:n.typography.pxToRem(15)})}),Ibe=We.forwardRef(function(e,t){const n=We.useContext(Obe),{value:r}=n,i=(0,nn.A)(n,Dbe),o=We.useContext(Rbe),a=(0,Ap.A)((0,Ft.A)({},i,{selected:Pbe(e.value,r)}),e),s=(0,$t.b)({props:a,name:"MuiToggleButton"}),{children:l,className:c,color:d="standard",disabled:u=!1,disableFocusRipple:p=!1,fullWidth:h=!1,onChange:m,onClick:f,selected:g,size:v="medium",value:x}=s,y=(0,nn.A)(s,Nbe),b=(0,Ft.A)({},s,{color:d,disabled:u,disableFocusRipple:p,fullWidth:h,size:v}),j=(e=>{const{classes:t,fullWidth:n,selected:r,disabled:i,size:o,color:a}=e,s={root:["root",r&&"selected",i&&"disabled",n&&"fullWidth","size".concat((0,pp.A)(o)),a]};return(0,ir.A)(s,Ebe,t)})(b),_=o||"";return(0,qt.jsx)(Lbe,(0,Ft.A)({className:(0,nr.A)(i.className,j.root,c,_),disabled:u,focusRipple:!p,ref:t,onClick:e=>{f&&(f(e,x),e.defaultPrevented)||m&&m(e,x)},onChange:m,value:x,ownerState:b,"aria-pressed":g},y,{children:l}))}),Fbe=Ibe;function $be(e){return(0,sr.Ay)("MuiToggleButtonGroup",e)}const Bbe=(0,ar.A)("MuiToggleButtonGroup",["root","selected","horizontal","vertical","disabled","grouped","groupedHorizontal","groupedVertical","fullWidth","firstButton","lastButton","middleButton"]),zbe=["children","className","color","disabled","exclusive","fullWidth","onChange","orientation","size","value"],Hbe=(0,Vn.Ay)("div",{name:"MuiToggleButtonGroup",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[{["& .".concat(Bbe.grouped)]:t.grouped},{["& .".concat(Bbe.grouped)]:t["grouped".concat((0,pp.A)(n.orientation))]},{["& .".concat(Bbe.firstButton)]:t.firstButton},{["& .".concat(Bbe.lastButton)]:t.lastButton},{["& .".concat(Bbe.middleButton)]:t.middleButton},t.root,"vertical"===n.orientation&&t.vertical,n.fullWidth&&t.fullWidth]}})(e=>{let{ownerState:t,theme:n}=e;return(0,Ft.A)({display:"inline-flex",borderRadius:(n.vars||n).shape.borderRadius},"vertical"===t.orientation&&{flexDirection:"column"},t.fullWidth&&{width:"100%"},{["& .".concat(Bbe.grouped)]:(0,Ft.A)({},"horizontal"===t.orientation?{["&.".concat(Bbe.selected," + .").concat(Bbe.grouped,".").concat(Bbe.selected)]:{borderLeft:0,marginLeft:0}}:{["&.".concat(Bbe.selected," + .").concat(Bbe.grouped,".").concat(Bbe.selected)]:{borderTop:0,marginTop:0}})},"horizontal"===t.orientation?{["& .".concat(Bbe.firstButton,",& .").concat(Bbe.middleButton)]:{borderTopRightRadius:0,borderBottomRightRadius:0},["& .".concat(Bbe.lastButton,",& .").concat(Bbe.middleButton)]:{marginLeft:-1,borderLeft:"1px solid transparent",borderTopLeftRadius:0,borderBottomLeftRadius:0}}:{["& .".concat(Bbe.firstButton,",& .").concat(Bbe.middleButton)]:{borderBottomLeftRadius:0,borderBottomRightRadius:0},["& .".concat(Bbe.lastButton,",& .").concat(Bbe.middleButton)]:{marginTop:-1,borderTop:"1px solid transparent",borderTopLeftRadius:0,borderTopRightRadius:0}},"horizontal"===t.orientation?{["& .".concat(Bbe.lastButton,".").concat(Mbe.disabled,",& .").concat(Bbe.middleButton,".").concat(Mbe.disabled)]:{borderLeft:"1px solid transparent"}}:{["& .".concat(Bbe.lastButton,".").concat(Mbe.disabled,",& .").concat(Bbe.middleButton,".").concat(Mbe.disabled)]:{borderTop:"1px solid transparent"}})}),Wbe=We.forwardRef(function(e,t){const n=(0,$t.b)({props:e,name:"MuiToggleButtonGroup"}),{children:r,className:i,color:o="standard",disabled:a=!1,exclusive:s=!1,fullWidth:l=!1,onChange:c,orientation:d="horizontal",size:u="medium",value:p}=n,h=(0,nn.A)(n,zbe),m=(0,Ft.A)({},n,{disabled:a,fullWidth:l,orientation:d,size:u}),f=(e=>{const{classes:t,orientation:n,fullWidth:r,disabled:i}=e,o={root:["root","vertical"===n&&"vertical",r&&"fullWidth"],grouped:["grouped","grouped".concat((0,pp.A)(n)),i&&"disabled"],firstButton:["firstButton"],lastButton:["lastButton"],middleButton:["middleButton"]};return(0,ir.A)(o,$be,t)})(m),g=We.useCallback((e,t)=>{if(!c)return;const n=p&&p.indexOf(t);let r;p&&n>=0?(r=p.slice(),r.splice(n,1)):r=p?p.concat(t):[t],c(e,r)},[c,p]),v=We.useCallback((e,t)=>{c&&c(e,p===t?null:t)},[c,p]),x=We.useMemo(()=>({className:f.grouped,onChange:s?v:g,value:p,size:u,fullWidth:l,color:o,disabled:a}),[f.grouped,s,v,g,p,u,l,o,a]),y=function(e){return We.Children.toArray(e).filter(e=>We.isValidElement(e))}(r),b=y.length,j=e=>{const t=0===e,n=e===b-1;return t&&n?"":t?f.firstButton:n?f.lastButton:f.middleButton};return(0,qt.jsx)(Hbe,(0,Ft.A)({role:"group",className:(0,nr.A)(f.root,i),ref:t,ownerState:m},h,{children:(0,qt.jsx)(Obe.Provider,{value:x,children:y.map((e,t)=>(0,qt.jsx)(Rbe.Provider,{value:j(t),children:e},t))})}))}),Ube=Wbe;function Vbe(e){let{patientBpReport:t,nodata:n,checkState:r}=e;const{t:i}=Vg(),o=[];t.forEach(e=>{o.push({name:sa()(e.ts).format("DD MMM"),Systolic:e.values.systolic,Diastolic:e.values.diastolic,Pulse:e.values.pulse,amt:1.25*e.values.systolic,alerts:e.alerts,key:e.key,nbps:(null===e||void 0===e?void 0:e.values.systolic)>=90&&(null===e||void 0===e?void 0:e.values.systolic)<120?e.values.systolic:void 0,ebps:(null===e||void 0===e?void 0:e.values.systolic)>=120&&(null===e||void 0===e?void 0:e.values.systolic)<=129?e.values.systolic:void 0,hbps:(null===e||void 0===e?void 0:e.values.systolic)>=130&&(null===e||void 0===e?void 0:e.values.systolic)<=139?e.values.systolic:void 0,hbps2s:(null===e||void 0===e?void 0:e.values.systolic)>=140?e.values.systolic:void 0,hbpcs:(null===e||void 0===e?void 0:e.values.systolic)>=180?e.values.systolic:void 0,nbpd:(null===e||void 0===e?void 0:e.values.diastolic)>=60&&(null===e||void 0===e?void 0:e.values.diastolic)<80?e.values.diastolic:void 0,ebpd:(null===e||void 0===e?void 0:e.values.diastolic)<80?e.values.diastolic:void 0,hbpd:(null===e||void 0===e?void 0:e.values.diastolic)>=80&&(null===e||void 0===e?void 0:e.values.diastolic)<=90?e.values.diastolic:void 0,hbps2d:(null===e||void 0===e?void 0:e.values.diastolic)>=90?e.values.diastolic:void 0,hbpcd:(null===e||void 0===e?void 0:e.values.diastolic)>=120?e.values.diastolic:void 0})});const a=e=>{var t,n;const{cx:r,cy:i,fill:o,payload:a,alertName:s}=e;return(0,qt.jsx)("svg",{x:r-6,y:i-6,width:12,height:12,fill:(null===a||void 0===a||null===(t=a.alerts)||void 0===t?void 0:t.length)>0&&(null===(n=a.alerts)||void 0===n?void 0:n.findIndex(e=>e.data_name===s))>=0?Qde.palette.error.main:o,viewBox:"0 0 24 24",children:(0,qt.jsx)("path",{d:"M12 2C6.47 2 2 6.47 2 12s4.47 10 10 10 10-4.47 10-10S17.53 2 12 2z"})})},s=e=>{const{x:t,y:n,payload:r}=e;return(0,qt.jsx)("g",{transform:"translate(".concat(t,",").concat(n,")"),children:(0,qt.jsx)("text",{x:16,y:0,dy:16,textAnchor:"end",fill:"#666",transform:"rotate(0)",children:r.value})})},l=e=>{var t;let{active:n,payload:r}=e;const o=null===(t=r[0])||void 0===t?void 0:t.payload;if(n&&r&&null!==r&&void 0!==r&&r.length)return(0,qt.jsxs)(op,{sx:{bgcolor:"#fff",border:"1px solid #ccc",p:1.5,width:250},children:[(0,qt.jsx)(Cf,{gutterBottom:!0,variant:"body2",children:"Date: ".concat(null===o||void 0===o?void 0:o.name)}),(0,qt.jsx)(Cf,{color:Qde.palette.deepPurple[500],gutterBottom:!0,variant:"body2",children:"Systolic: ".concat(null===o||void 0===o?void 0:o.Systolic)}),(0,qt.jsx)(Cf,{color:Qde.palette.blue[500],gutterBottom:!0,variant:"body2",children:"Diastolic:  ".concat(null===o||void 0===o?void 0:o.Diastolic)}),(0,qt.jsx)(Cf,{gutterBottom:!0,variant:"body2",children:"Stage:  ".concat(i("rpm_".concat(null===o||void 0===o?void 0:o.key)))})]})},c=e=>{const{payload:t}=e;return(0,qt.jsx)(op,{component:"ul",className:"recharts-default-legend",sx:{p:0,m:0,textAlign:"center"},children:t.map((e,t)=>("Systolic"===e.dataKey||"Diastolic"===e.dataKey)&&(0,qt.jsxs)(op,{component:"li",className:"recharts-legend-item legend-item-".concat(t),sx:{display:"inline-block",marginRight:"10px"},children:[(0,qt.jsx)("svg",{className:"recharts-surface",width:"14",height:"14",viewBox:"0 0 32 32",version:"1.1",style:{display:"inline-block",verticalAlign:"middle",marginRight:"4px"},children:(0,qt.jsx)("path",{strokeWidth:"4",fill:"none",stroke:e.color,d:"M0,16h10.666666666666666 A5.333333333333333,5.333333333333333,0,1,1,21.333333333333332,16 H32M21.333333333333332,16 A5.333333333333333,5.333333333333333,0,1,1,10.666666666666666,16",className:"recharts-legend-icon"})}),(0,qt.jsx)(op,{component:"span",className:"recharts-legend-item-text",sx:{color:e.color},children:e.value})]},"item-".concat(t)))})};return(0,qt.jsx)(qt.Fragment,{children:(null===o||void 0===o?void 0:o.length)>0?(0,qt.jsx)(w2,{width:"100%",height:"100%",children:(0,qt.jsxs)(tce,{data:o.reverse(),children:[(0,qt.jsx)(Yoe,{y:120,label:"",stroke:Qde.palette.deepPurple[500],strokeDasharray:"3 3"}),(0,qt.jsx)(Yoe,{y:100,label:"",stroke:Qde.palette.blue[500],strokeDasharray:"3 3"}),!1,(0,qt.jsx)(Wle,{dataKey:"name",tick:(0,qt.jsx)(s,{})}),(0,qt.jsx)(ece,{dataKey:"amt",label:{value:"Sys / Dia  (mmHg)",angle:"-90",position:"center",dx:-20,fontSize:"0.8rem"}}),(0,qt.jsx)(w6,{content:(0,qt.jsx)(l,{})}),(0,qt.jsx)(Q5,{verticalAlign:"top",content:(0,qt.jsx)(c,{})}),r.includes("systolic")&&(0,qt.jsxs)(qt.Fragment,{children:[(0,qt.jsx)(lle,{strokeWidth:1,type:"monotone",dataKey:"Systolic",stroke:Qde.palette.deepPurple[300],dot:!1}),(0,qt.jsx)(lle,{strokeWidth:2,type:"monotone",dataKey:"nbps",stroke:Qde.palette.green[700],dot:!1}),(0,qt.jsx)(lle,{strokeWidth:2,type:"monotone",dataKey:"ebps",stroke:Qde.palette.amber[700],dot:!1}),(0,qt.jsx)(lle,{strokeWidth:2,type:"monotone",dataKey:"hbps",stroke:Qde.palette.orange[700],dot:!1}),(0,qt.jsx)(lle,{strokeWidth:2,type:"monotone",dataKey:"hbps2s",stroke:Qde.palette.red[400],dot:!1}),(0,qt.jsx)(lle,{strokeWidth:2,type:"monotone",dataKey:"hbpcs",stroke:Qde.palette.red[800],dot:!1})]}),r.includes("diastolic")&&(0,qt.jsxs)(qt.Fragment,{children:[(0,qt.jsx)(lle,{strokeWidth:1,type:"monotone",dataKey:"Diastolic",stroke:Qde.palette.blue[500],dot:!1,activeDot:(0,qt.jsx)(a,{alertName:"diastolic"})}),(0,qt.jsx)(lle,{strokeWidth:2,type:"monotone",dataKey:"nbpd",stroke:Qde.palette.green[700],dot:!1}),(0,qt.jsx)(lle,{strokeWidth:2,type:"monotone",dataKey:"ebpd",stroke:Qde.palette.amber[700],dot:!1}),(0,qt.jsx)(lle,{strokeWidth:2,type:"monotone",dataKey:"hbpd",stroke:Qde.palette.orange[700],dot:!1}),(0,qt.jsx)(lle,{strokeWidth:2,type:"monotone",dataKey:"hbps2d",stroke:Qde.palette.red[400],dot:!1}),(0,qt.jsx)(lle,{strokeWidth:2,type:"monotone",dataKey:"hbpcd",stroke:Qde.palette.red[800],dot:!1})]}),r.includes("pulse")&&(0,qt.jsx)(lle,{strokeWidth:1,type:"monotone",dataKey:"Pulse",stroke:Qde.palette.primary.main,dot:!1})]})}):(0,qt.jsx)(yp,{variant:"outlined",sx:{px:2.5,py:6},children:(0,qt.jsx)(op,{display:"flex",alignItems:"center",children:(0,qt.jsx)("img",{src:n,style:{display:"block",margin:"auto"}})})})})}Vbe.defaultProps={patientBpReport:[],checkState:[]};function Gbe(e){let{patientBpReport:t,getAlertClassName:n}=e;const{t:r}=Vg(),i=[];cs(t)||null===t||void 0===t||t.forEach(e=>{i.push({name:sa()(e.ts).format("DD MMM"),Systolic:e.values.systolic,Diastolic:e.values.diastolic,Pulse:e.values.pulse,amt:1.25*e.values.systolic,alerts:e.alerts,date:sa()(e.ts).format("DD MMM YYYY hh:mm A")})});const o=e=>{var t;let r=null===Qde||void 0===Qde||null===(t=Qde.palette)||void 0===t?void 0:t.green[300];var i,o,a,s,l;"CheckLowBP"===n(e)&&(r=null===Qde||void 0===Qde||null===(i=Qde.palette)||void 0===i?void 0:i.orange[300]);"ElevatedBloodPressure"===n(e)&&(r=null===Qde||void 0===Qde||null===(o=Qde.palette)||void 0===o?void 0:o.orange[600]);"Hypertension_Stage1"===n(e)&&(r=null===Qde||void 0===Qde||null===(a=Qde.palette)||void 0===a?void 0:a.red[300]);"Hypertensive_Stage2"===n(e)&&(r=null===Qde||void 0===Qde||null===(s=Qde.palette)||void 0===s?void 0:s.red[500]);"Hypertensive_Crisis"===n(e)&&(r=null===Qde||void 0===Qde||null===(l=Qde.palette)||void 0===l?void 0:l.red[700]);return r},a=e=>{var t,i;let{active:a,payload:s}=e;const l=null!==(t=s[0])&&void 0!==t&&t.payload?null===(i=s[0])||void 0===i?void 0:i.payload:{},c=n(l);var d;if(a&&s&&null!==s&&void 0!==s&&s.length)return(0,qt.jsxs)(op,{sx:{bgcolor:"#fff",border:"1px solid #ccc",p:1.5,width:250},children:[(0,qt.jsx)(Cf,{gutterBottom:!0,variant:"body2",children:"Date: ".concat(null===l||void 0===l?void 0:l.date)}),(0,qt.jsx)(Cf,{gutterBottom:!0,variant:"body2",fontWeight:600,children:"Systolic: ".concat(null===l||void 0===l?void 0:l.Systolic)}),(0,qt.jsx)(Cf,{gutterBottom:!0,variant:"body2",fontWeight:600,children:"Diastolic:  ".concat(null===l||void 0===l?void 0:l.Diastolic)}),c?(0,qt.jsx)(Cf,{gutterBottom:!0,variant:"body2",fontWeight:600,color:o(null===(d=s[0])||void 0===d?void 0:d.payload),children:"Status: ".concat(r("rpm_".concat(c)))}):(0,qt.jsx)(Cf,{gutterBottom:!0,variant:"body2",fontWeight:600,color:Qde.palette.green[500],children:"Status: ".concat(r("rpm_normal"))})]})};return(0,qt.jsx)(w2,{width:"100%",children:(0,qt.jsxs)(tce,{width:500,height:300,data:i.reverse(),children:[(0,qt.jsx)(Wle,{dataKey:"name"}),(0,qt.jsx)(ece,{dataKey:"amt",label:{value:"Sys / Dia  (mmHg)",angle:"-90",position:"center",dx:-20,fontSize:"0.8rem"}}),(0,qt.jsx)(w6,{content:(0,qt.jsx)(a,{})}),(0,qt.jsx)(lle,{type:"monotone",dataKey:"Systolic",stroke:Qde.palette.primary.main,strokeWidth:2,className:"removeLine",isAnimationActive:!1,dot:!1,activeDot:!1}),(0,qt.jsx)(lle,{type:"monotone",dataKey:"Diastolic",stroke:Qde.palette.primary.main,strokeWidth:2,className:"removeLine",isAnimationActive:!1,dot:!1,activeDot:!1}),(0,qt.jsx)(Cce,{component:e=>{var t;let{formattedGraphicalItems:n}=e;const r=n[0],i=n[1];return null===r||void 0===r||null===(t=r.props)||void 0===t?void 0:t.points.map((e,t)=>{var n,a;const s=null===r||void 0===r||null===(n=r.props)||void 0===n?void 0:n.points[t],l=null===i||void 0===i||null===(a=i.props)||void 0===a?void 0:a.points[t],c=s.y-l.y;return(0,qt.jsx)(m2,{radius:8,width:10,height:-c-10,x:s.x-5,y:s.y+5,fill:o(null===e||void 0===e?void 0:e.payload)},t)})}})]})})}Gbe.defaultProps={patientBpReport:[],getAlertClassName:()=>{}};const qbe=Gbe;const Ybe=function(e){let{row:t,name:n,checkState:r,onCheck:i,bpVitalData:o,handleSelectAllClick:a}=e;return(0,qt.jsx)(que,{row:!!t,children:null===o||void 0===o?void 0:o.map(e=>(0,qt.jsx)(wE,{control:(0,qt.jsx)(Dw,{name:e.id,checked:r.includes(e.id),onChange:i}),label:e.name},e.id))})};function Zbe(e){let{patientBpReport:t}=e;const n=e=>{let t=Rs(e);return"tachycardia"===t?"Tachycardia":"bradycardia"===t?"Bradycardia":"Normal"},r=[];null===t||void 0===t||t.forEach(e=>{r.push({name:sa()(e.ts).format("DD MMM"),Systolic:e.values.systolic,Diastolic:e.values.diastolic,Pulse:{value:e.values.pulse,status:n(e)},amt:1.75*e.values.pulse,alerts:e.alerts,date:sa()(e.ts).format("DD MMM YYYY hh:mm A")})});const i=e=>{var t;let n=null===Qde||void 0===Qde||null===(t=Qde.palette)||void 0===t?void 0:t.green[300],r=Rs(e);var i,o;return"tachycardia"===r?null===Qde||void 0===Qde||null===(i=Qde.palette)||void 0===i?void 0:i.red[300]:"bradycardia"===r?null===Qde||void 0===Qde||null===(o=Qde.palette)||void 0===o?void 0:o.orange[300]:n},o=e=>{const{cx:t,cy:n,payload:r}=e;return(0,qt.jsx)("svg",{x:t-4,y:n-4,width:8,height:8,fill:i(r),viewBox:"0 0 24 24",children:(0,qt.jsx)("path",{d:"M12 2C6.47 2 2 6.47 2 12s4.47 10 10 10 10-4.47 10-10S17.53 2 12 2z"})})},a=e=>{var t,n;let{active:r,payload:o}=e;const a=null!==(t=o[0])&&void 0!==t&&t.payload?null===(n=o[0])||void 0===n?void 0:n.payload:{};var s,l,c;if(r&&o&&null!==o&&void 0!==o&&o.length)return(0,qt.jsxs)(op,{sx:{bgcolor:"#fff",border:"1px solid #ccc",p:1.5,width:250},children:[(0,qt.jsx)(Cf,{gutterBottom:!0,variant:"body2",children:"Date: ".concat(null===a||void 0===a?void 0:a.date)}),(0,qt.jsx)(Cf,{gutterBottom:!0,variant:"body2",fontWeight:600,children:"Pulse:  ".concat(null===a||void 0===a||null===(s=a.Pulse)||void 0===s?void 0:s.value)}),(0,qt.jsx)(Cf,{gutterBottom:!0,variant:"body2",fontWeight:600,color:i(null===(l=o[0])||void 0===l?void 0:l.payload),children:"Status: ".concat(null===a||void 0===a||null===(c=a.Pulse)||void 0===c?void 0:c.status)})]})};return(0,qt.jsx)(w2,{width:"100%",children:(0,qt.jsxs)(tce,{width:500,height:300,data:r.reverse(),children:[(0,qt.jsx)(Wle,{dataKey:"name"}),(0,qt.jsx)(ece,{dataKey:"amt",label:{value:"Pulse (BPM)",angle:"-90",position:"center",dx:-20,fontSize:"0.8rem"}}),(0,qt.jsx)(w6,{content:(0,qt.jsx)(a,{})}),(0,qt.jsx)(lle,{type:"monotone",dataKey:"Pulse.value",stroke:Qde.palette.primary.main,strokeWidth:2,isAnimationActive:!1,dot:(0,qt.jsx)(o,{}),activeDot:(0,qt.jsx)(o,{})})]})})}Zbe.defaultProps={patientBpReport:[]};const Kbe=Zbe;function Xbe(e){let{stageAlertData:t,height:n,width:r}=e;const{t:i}=Vg(),[o,a]=We.useState([]),s=["CheckLowBP","ElevatedBloodPressure","Hypertension_Stage1","Hypertensive_Stage2","Hypertensive_Crisis","normal"],l=["CheckLowBP","ElevatedBloodPressure","Hypertension_Stage1","Hypertensive_Stage2","Hypertensive_Crisis",""],c=e=>{var t;let n=null===Qde||void 0===Qde||null===(t=Qde.palette)||void 0===t?void 0:t.green[300];var r,i,o,a,s;"CheckLowBP"===(null===e||void 0===e?void 0:e.id)&&(n=null===Qde||void 0===Qde||null===(r=Qde.palette)||void 0===r?void 0:r.orange[300]);"ElevatedBloodPressure"===(null===e||void 0===e?void 0:e.id)&&(n=null===Qde||void 0===Qde||null===(i=Qde.palette)||void 0===i?void 0:i.orange[600]);"Hypertension_Stage1"===(null===e||void 0===e?void 0:e.id)&&(n=null===Qde||void 0===Qde||null===(o=Qde.palette)||void 0===o?void 0:o.red[300]);"Hypertensive_Stage2"===(null===e||void 0===e?void 0:e.id)&&(n=null===Qde||void 0===Qde||null===(a=Qde.palette)||void 0===a?void 0:a.red[500]);"Hypertensive_Crisis"===(null===e||void 0===e?void 0:e.id)&&(n=null===Qde||void 0===Qde||null===(s=Qde.palette)||void 0===s?void 0:s.red[700]);return n},d=Math.PI/180,u=e=>{var t,n;let{active:r,payload:i}=e;const o=null!==(t=i[0])&&void 0!==t&&t.payload?null===(n=i[0])||void 0===n?void 0:n.payload:{};if(r&&i&&null!==i&&void 0!==i&&i.length)return(0,qt.jsxs)(op,{sx:{bgcolor:"#ffffff",border:"1px solid #cccccc",p:1.5,width:250},children:[(0,qt.jsx)(Cf,{gutterBottom:!0,variant:"body2",fontWeight:600,children:(0,qt.jsx)(op,{component:"span",color:"normal"!==(null===o||void 0===o?void 0:o.id)?c(null===o||void 0===o?void 0:o.payload):Qde.palette.green[500],children:null===o||void 0===o?void 0:o.name})}),(0,qt.jsx)(Cf,{gutterBottom:!0,variant:"body2",fontWeight:600,children:"Count:  ".concat(null===o||void 0===o?void 0:o.value)})]})};return We.useEffect(()=>{(()=>{let e=[],n=[];const r=null===t||void 0===t?void 0:t.map(e=>Es(e));null===l||void 0===l||l.forEach(e=>{const t=null===r||void 0===r?void 0:r.filter(t=>t===e);n.push({id:e||i("rpm_normal"),name:i(e?"rpm_".concat(e):"rpm_normal"),value:null===t||void 0===t?void 0:t.length})}),null===s||void 0===s||s.forEach(n=>{const r=null===t||void 0===t?void 0:t.filter(e=>{var t,r,i=null===e||void 0===e||null===(t=e.alerts)||void 0===t?void 0:t.find(e=>"systolic"==(null===e||void 0===e?void 0:e.data_name));return(null===e||void 0===e||null===(r=e.alerts)||void 0===r?void 0:r.length)&&(null===i||void 0===i?void 0:i.text)==n}),o=null===t||void 0===t?void 0:t.filter(function(e){var t,n;if(1===(null===e||void 0===e||null===(t=e.alerts)||void 0===t?void 0:t.length))return"pulse"===(null===e||void 0===e||null===(n=e.alerts[0])||void 0===n?void 0:n.data_name)}),a=null===t||void 0===t?void 0:t.filter(function(e){var t;if(void 0===(null===e||void 0===e||null===(t=e.alerts)||void 0===t?void 0:t.length))return!0});null!==r&&void 0!==r&&r.length&&e.push({id:n,name:i("rpm_".concat(n)),value:null===r||void 0===r?void 0:r.length}),"normal"===n&&(a.length||o.length)&&e.push({id:n,name:i("rpm_".concat(n)),value:(null===a||void 0===a?void 0:a.length)+(null===o||void 0===o?void 0:o.length)})}),a(n)})()},[t]),(0,qt.jsx)(w2,{width:"100%",height:"100%",children:(0,qt.jsxs)(Ode,{width:r||400,height:n||400,children:[(0,qt.jsx)(Mde,{data:o,cx:"50%",cy:"50%",innerRadius:r?r/4.5:70,outerRadius:n?n/2:150,paddingAngle:0,labelLine:!1,label:e=>{const{cx:t,cy:n,midAngle:r,innerRadius:i,outerRadius:o,percent:a}=e,s=i+.5*(o-i),l=t+s*Math.cos(-r*d),c=n+s*Math.sin(-r*d);return(0,qt.jsx)("text",{x:l,y:c,fill:"white",textAnchor:l>t?"start":"end",dominantBaseline:"central",children:0==a?null:"".concat((100*a).toFixed(0),"%")})},dataKey:"value",children:o.map((e,t)=>(0,qt.jsx)(Cre,{fill:c(e)},"cell-".concat(t)))}),(0,qt.jsx)(w6,{content:(0,qt.jsx)(u,{})})]})})}Xbe.defaultProps={stageAlertData:[]};const Qbe=Xbe;function Jbe(e){var t,n,r,i,o,a,s,l,c,d,u,p,h,m,f,g,v,x,y;let{order:b,orderBy:j,setOrder:_,setOrderBy:C,dataParameter:w,headCellsItems:S,checkState:A,onCheck:k,isSelection:T,nodata:E,pageDetails:M,fetchPatientBpReportList:O,getReadingColor:R,bpVitalData:P,handleSelectAllClick:D,readingCounts:N,stageAlertData:L,getStageStatus:I,patientLastFrame:F,deleteReadingButton:$}=e;const{t:B}=Vg(),[z,H]=We.useState("AllStage"),[W,U]=We.useState("trend"),V=e=>{switch(e){case"LowBloodPressure":{const e=null===L||void 0===L?void 0:L.filter(e=>"LowBloodPressure"===e.key);return e}case"NormalPressure":{const e=null===L||void 0===L?void 0:L.filter(e=>"NormalPressure"===e.key);return e}case"ElevatedBloodPressure":{const e=null===L||void 0===L?void 0:L.filter(e=>"ElevatedBloodPressure"===e.key);return e}case"HighBloodPressure":{const e=null===L||void 0===L?void 0:L.filter(e=>"HighBloodPressure"===e.key);return e}case"HighBloodPressureStage2":{const e=null===L||void 0===L?void 0:L.filter(e=>"HighBloodPressureStage2"===e.key);return e}case"HypertensiveCrisis":{const e=null===L||void 0===L?void 0:L.filter(e=>"HypertensiveCrisis"===e.key);return e}default:return L&&L}},G=[{value:"CheckLowBP",color:null===Qde||void 0===Qde||null===(t=Qde.palette)||void 0===t?void 0:t.orange[300],darkColor:null===Qde||void 0===Qde||null===(n=Qde.palette)||void 0===n?void 0:n.orange[700]},{value:"ElevatedBloodPressure",color:null===Qde||void 0===Qde||null===(r=Qde.palette)||void 0===r?void 0:r.orange[600],darkColor:null===Qde||void 0===Qde||null===(i=Qde.palette)||void 0===i?void 0:i.orange[900]},{value:"Hypertension_Stage1",color:null===Qde||void 0===Qde||null===(o=Qde.palette)||void 0===o?void 0:o.red[300],darkColor:null===Qde||void 0===Qde||null===(a=Qde.palette)||void 0===a?void 0:a.red[500]},{value:"Hypertensive_Stage2",color:null===Qde||void 0===Qde||null===(s=Qde.palette)||void 0===s?void 0:s.red[500],darkColor:null===Qde||void 0===Qde||null===(l=Qde.palette)||void 0===l?void 0:l.red[700]},{value:"Hypertensive_Crisis",color:null===Qde||void 0===Qde||null===(c=Qde.palette)||void 0===c?void 0:c.red[700],darkColor:null===Qde||void 0===Qde||null===(d=Qde.palette)||void 0===d?void 0:d.red[900]},{value:"normal",color:null===Qde||void 0===Qde||null===(u=Qde.palette)||void 0===u?void 0:u.green[300],darkColor:null===Qde||void 0===Qde||null===(p=Qde.palette)||void 0===p?void 0:p.green[700]}],q=e=>{let{legend:t}=e;return t.length>0&&(0,qt.jsx)(op,{textAlign:"right",children:(0,qt.jsx)(op,{component:"ul",p:0,m:0,display:"inline-flex",flexWrap:"wrap",children:null===G||void 0===G?void 0:G.map((e,t)=>(0,qt.jsxs)(Cf,{component:"li",fontSize:14,sx:{listStyle:"none",display:"flex",alignItems:"center",mr:1.5},children:[(0,qt.jsx)(kbe.A,{sx:{width:10,color:e.color}}),(0,qt.jsx)(op,{component:"span",ml:1,color:e.darkColor,children:B("rpm_".concat(e.value))})]},t))})})};return(0,qt.jsxs)(qt.Fragment,{children:[(0,qt.jsxs)(Ff,{container:!0,spacing:2.5,mt:.05,children:[(0,qt.jsxs)(Ff,{item:!0,xs:12,sx:{display:"none"},children:[(0,qt.jsx)(op,{pb:1.75,children:(0,qt.jsxs)(Ff,{container:!0,children:[(0,qt.jsx)(Ff,{item:!0,xs:!0,children:(0,qt.jsx)(Ybe,{row:!0,name:"vitals",onCheck:k,checkState:A,bpVitalData:P,handleSelectAllClick:D})}),cs(N)?(0,qt.jsx)(jbe,{}):(0,qt.jsxs)(Ff,{item:!0,xs:12,sm:!0,container:!0,spacing:2.5,justifyContent:"flex-end",children:[(0,qt.jsx)(Ff,{item:!0,children:(0,qt.jsxs)(op,{sx:{display:"flex",alignItems:"flex-start"},children:[(0,qt.jsx)(op,{sx:{display:"flex",p:1,bgcolor:"primary.theme.50",borderRadius:1},children:(0,qt.jsx)(wce.A,{sx:{color:"primary.theme.300"}})}),(0,qt.jsxs)(op,{sx:{flexGrow:1,ml:2},children:[(0,qt.jsx)(Cf,{variant:"body2",component:"p",fontWeight:500,children:B("rpm_TotalReadings")}),(0,qt.jsx)(Cf,{variant:"h6",component:"h6",children:null===N||void 0===N?void 0:N.totalCounts})]})]})}),(0,qt.jsx)(Ff,{item:!0,children:(0,qt.jsxs)(op,{sx:{display:"flex",alignItems:"flex-start"},children:[(0,qt.jsx)(op,{sx:{display:"flex",p:1,bgcolor:"primary.theme.50",borderRadius:1},children:(0,qt.jsx)(Tbe.A,{sx:{color:"primary.theme.300"}})}),(0,qt.jsxs)(op,{sx:{flexGrow:1,ml:2},children:[(0,qt.jsx)(Cf,{variant:"body2",component:"p",fontWeight:500,children:B("rpm_TotalAlerts")}),(0,qt.jsxs)(Ff,{container:!0,spacing:1,alignItems:"center",children:[(0,qt.jsx)(Ff,{item:!0,children:(0,qt.jsx)(Cf,{variant:"h6",component:"h6",children:null===N||void 0===N?void 0:N.totalAlerts})}),!1]})]})]})})]})]})}),(0,qt.jsx)(eg,{sx:{mx:-2}})]}),!1]}),(0,qt.jsxs)(Ff,{container:!0,spacing:2.5,mt:.05,children:[(0,qt.jsx)(Ff,{item:!0,xs:12,lg:7,children:(0,qt.jsx)(yH,{variant:"outlined",sx:{height:"100%"},children:(0,qt.jsxs)(wH,{sx:{height:"100%"},children:[!cs(L)&&(0,qt.jsxs)(qt.Fragment,{children:[(0,qt.jsxs)(Ff,{container:!0,spacing:1,children:[(0,qt.jsx)(Ff,{item:!0,xs:12,md:6,children:(0,qt.jsxs)(Ube,{exclusive:!0,size:"small",color:"primary",value:W,onChange:(e,t)=>{null!==t&&U(t)},sx:{mb:1.5,"& .MuiToggleButton-root":{px:2.25}},children:[(0,qt.jsx)(Fbe,{value:"trend",children:B("rpm_Trend")}),(0,qt.jsx)(Fbe,{value:"pie",children:B("rpm_Donut")})]})}),(0,qt.jsx)(Ff,{item:!0,xs:12,md:6,children:(0,qt.jsxs)(op,{sx:{display:"flex",alignItems:"center",flexWrap:"wrap",justifyContent:"flex-end"},children:[(0,qt.jsx)(Cf,{variant:"body2",children:B("rpm_LastReading")}),cs(F)?(0,qt.jsx)(lS,{sx:{ml:3},variant:"rounded",width:75}):(0,qt.jsxs)(op,{fontSize:"body2.fontSize",sx:{bgcolor:"primary.theme.50",px:1,py:.5,borderRadius:1,ml:3},children:[B("rpm_BP"),": ",null===(h=F[0])||void 0===h||null===(m=h.values)||void 0===m?void 0:m.systolic,"/",null===(f=F[0])||void 0===f||null===(g=f.values)||void 0===g?void 0:g.diastolic," | ",B("rpm_Pulse"),":"," ",null===(v=F[0])||void 0===v||null===(x=v.values)||void 0===x?void 0:x.pulse]})]})})]}),(0,qt.jsx)(Ff,{container:!0,spacing:1,justifyContent:"flex-end",mt:.05,children:(0,qt.jsx)(Ff,{item:!0,md:8,children:(0,qt.jsx)(q,{legend:G})})})]}),"trend"===W?(0,qt.jsx)(op,{sx:{height:"100%"},children:L?cs(L)?(0,qt.jsx)(op,{display:"flex",alignItems:"center",height:"100%",children:(0,qt.jsx)("img",{src:E,style:{display:"block",margin:"auto",maxWidth:"300px",width:"100%",height:"auto"}})}):(0,qt.jsxs)(qt.Fragment,{children:[!1,(0,qt.jsx)(op,{sx:{height:"300px"},children:(0,qt.jsx)(qbe,{patientBpReport:V(z),getAlertClassName:Es})}),(0,qt.jsx)(op,{sx:{height:"200px"},children:(0,qt.jsx)(Kbe,{patientBpReport:V(z)})})]}):(0,qt.jsx)(op,{width:"100%",height:"100%",alignSelf:"center",sx:{display:"flex"},children:(0,qt.jsx)(MM,{color:"primary",sx:{m:"auto"}})})}):(0,qt.jsx)(op,{sx:{height:"400px"},children:L?cs(L)?(0,qt.jsx)(op,{display:"flex",alignItems:"center",height:"100%",children:(0,qt.jsx)("img",{src:E,style:{display:"block",margin:"auto"}})}):(0,qt.jsx)(Qbe,{stageAlertData:L}):(0,qt.jsx)(op,{width:"100%",height:"100%",alignSelf:"center",sx:{display:"flex"},children:(0,qt.jsx)(MM,{color:"primary",sx:{m:"auto"}})})})]})})}),(0,qt.jsx)(Ff,{item:!0,xs:12,lg:5,children:(0,qt.jsx)(op,{children:(0,qt.jsx)(UT,{order:b,orderBy:j,setOrder:_,setOrderBy:C,data:V(z),headCells:S,dataParameter:w,selected:A,setSelected:k,isSelection:T,noDataImage:E,fetchList:O,pageDetails:M,skeletonVrows:6,stickyHeader:!0,scrollHeight:570,className:"theme_scroll",children:null===(y=V(z))||void 0===y?void 0:y.map(e=>{var t,n,r,i,o,a;return(0,qt.jsxs)(cw,{sx:{"&:last-child td, &:last-child th":{border:0}},children:[T&&(0,qt.jsx)(gw,{padding:"checkbox",children:(0,qt.jsx)(Dw,{onChange:k,checked:A.includes(e.id.toString()),name:e.id,color:"primary"})}),(0,qt.jsxs)(gw,{children:[e.ts,(0,qt.jsxs)(Cf,{variant:"caption",component:"p",children:["(",sa()(e.ts).fromNow(),")"]})]}),(0,qt.jsx)(gw,{children:e.values.systolic?(0,qt.jsx)(qt.Fragment,{children:(null===e||void 0===e||null===(t=e.alerts)||void 0===t?void 0:t.length)>0&&!cs(Es(e))?(0,qt.jsx)(op,{className:Es(e),display:"inline-flex",children:(0,qt.jsx)(op,{component:"span",children:e.values.systolic})}):(0,qt.jsx)(op,{className:"normal",display:"inline-flex",children:(0,qt.jsx)(op,{component:"span",children:e.values.systolic})})}):"NA"}),(0,qt.jsx)(gw,{children:e.values.diastolic?(0,qt.jsx)(qt.Fragment,{children:(null===e||void 0===e||null===(n=e.alerts)||void 0===n?void 0:n.length)>0&&!cs(Es(e))?(0,qt.jsx)(op,{className:Es(e),display:"inline-flex",children:(0,qt.jsx)(op,{component:"span",children:e.values.diastolic})}):(0,qt.jsx)(op,{className:"normal",display:"inline-flex",children:(0,qt.jsx)(op,{component:"span",children:e.values.diastolic})})}):"NA"}),(0,qt.jsx)(gw,{children:null!==e&&void 0!==e&&null!==(r=e.values)&&void 0!==r&&r.pulse?(0,qt.jsx)(qt.Fragment,{children:(null===e||void 0===e||null===(i=e.alerts)||void 0===i?void 0:i.length)>0&&Rs(e)?(0,qt.jsx)(op,{className:Rs(e),display:"inline-flex",children:(0,qt.jsx)(op,{component:"span",children:null===e||void 0===e||null===(o=e.values)||void 0===o?void 0:o.pulse})}):(0,qt.jsx)(op,{className:"normal",display:"inline-flex",children:(0,qt.jsx)(op,{component:"span",children:null===e||void 0===e||null===(a=e.values)||void 0===a?void 0:a.pulse})})}):"NA"}),(0,qt.jsx)(gw,{children:$(e)}),!1]},e.id)})})})})]})]})}Jbe.defaultProps={headCellsItems:[],pageDetails:{},order:"",orderBy:"",setOrder:()=>{},setOrderBy:()=>{},dataParameter:"",checkState:"",onCheck:()=>{},isSelection:"",nodata:"",patientBpReport:[],fetchPatientBpReportList:()=>{},fiterReportData:()=>{},filterInitialData:{},getReadingColor:()=>{},getStatus:()=>{},bpVitalData:[],handleSelectAllClick:()=>{},reportView:"chart",handleReportView:()=>{},stageAlertData:[],getStageStatus:()=>{},patientLastFrame:[],deleteReadingButton:()=>{}};const eje=Jbe;function tje(e){let{resolveAlertsPageDetails:t,resolveAlertCount:n,resolveAlertBpHeadCell:r,fetchResolvePatientAlerts:i}=e;const{t:o}=Vg();return(0,qt.jsxs)(op,{sx:{"& .MuiPaper-root":{borderTopLeftRadius:0,borderTopRightRadius:0}},children:[(0,qt.jsx)(UT,{noDataImage:GC,data:n,headCells:r,fetchList:i,skeletonVrows:6,stickyHeader:!0,scrollHeight:400,className:"theme_scroll",children:null===n||void 0===n?void 0:n.map(e=>{var t;return(0,qt.jsxs)(cw,{sx:{"&:last-child td, &:last-child th":{border:0}},children:[(0,qt.jsx)(gw,{sx:{textTransform:"capitalize","& > .name":{"&::after":{content:'"/"',mx:.5},":last-child":{"&::after":{display:"none"}}}},children:(null===e||void 0===e||null===(t=e.alerts)||void 0===t?void 0:t.length)>0?null===e||void 0===e?void 0:e.alerts.map((t,n)=>{var r,i,a,s;return(0,qt.jsx)(op,{className:null===t||void 0===t?void 0:t.text,display:"inline-flex",mr:n===(null===e||void 0===e||null===(r=e.alerts)||void 0===r?void 0:r.length)-1?0:1,children:(0,qt.jsxs)(op,{component:"span",children:["bp systolic"===(null===t||void 0===t?void 0:t.data_name)&&"".concat(o("rpm_Sys"),": "),"bp diastolic"===(null===t||void 0===t?void 0:t.data_name)&&"".concat(o("rpm_Dia"),": "),"glucose"===(null===t||void 0===t||null===(i=t.data_name)||void 0===i||null===(a=i.split(" "))||void 0===a?void 0:a[0])&&"".concat(null===t||void 0===t||null===(s=t.data_name)||void 0===s?void 0:s.replace("glucose",""),": "),"pulse"===(null===t||void 0===t?void 0:t.data_name)&&"".concat(o("rpm_pulse"),": "),null===t||void 0===t?void 0:t.value]})},n)}):"NA"}),(0,qt.jsx)(gw,{children:null===e||void 0===e?void 0:e.alerts.map((e,t)=>(0,qt.jsx)(op,{children:0===t&&(0,qt.jsx)(op,{component:"span",children:o("rpm_".concat(null===e||void 0===e?void 0:e.text))})},t))}),(0,qt.jsx)(gw,{width:"45%",sx:{whiteSpace:"normal"},children:(0,qt.jsx)(op,{sx:{wordBreak:"break-all"},children:e.follow_up?e.follow_up:"-"})}),(0,qt.jsx)(gw,{children:e.dismissed_at})]},e.id)})}),(0,qt.jsx)(KE,{pageDetails:t,fetchListFunction:i})]})}const nje=function(e){let{order:t,orderBy:n,setOrder:r,setOrderBy:o,dataParameter:a,checkState:s,onCheck:l,isSelection:c,nodata:d,pageDetails:u,activeAlertsPageDetails:p,resolveAlertsPageDetails:h,headCellsItemsBp:m,patientBpReport:f,fetchPatientBpReportList:g,fiterReportData:v,filterInitialData:x,activeAlertBpHeadCell:y,activeAlertCount:b,fetchPatientAlerts:j,resolveAlertCount:_,resolveAlertBpHeadCell:C,fetchResolvePatientAlerts:w,resolvedButton:S,getStatus:A,getReadingColor:k,bpVitalData:T,bpVitalData1:E,handleSelectAllClick:M,filterDate:O,handleDateFilter:R,readingCounts:P,stageAlertData:D,getStageStatus:N,alertStatic:L,userData:I,patientLastFrame:F,fetchBPAndAlertsList:$,deleteAlertButton:B,deleteReadingButton:z,patientData:H,program:W,patientMissedReading:U,activeCourse:V}=e;const[G,q]=We.useState(null),Y=Boolean(G),Z=e=>{q(e.currentTarget)},K=()=>{q(null)},{t:X}=Vg(),Q=so(),[J,ee]=We.useState(0),[te,ne]=We.useState("panel1"),[re,ie]=We.useState(!1),oe=e=>(t,n)=>{ne(!!n&&e)};return(0,qt.jsxs)(qt.Fragment,{children:[(0,qt.jsx)(op,{bgcolor:"#fff",p:1,sx:{borderRadius:"8px"},children:(0,qt.jsxs)(Ff,{container:!0,spacing:2.5,alignItems:"center",children:[b?(0,qt.jsxs)(qt.Fragment,{children:[(0,qt.jsx)(Ff,{item:!0,className:"patientDashboard-tour-step1",children:(0,qt.jsx)(qf,{className:"linkNoClr",color:"inherit",onClick:()=>{ne("panel2"),ee(1)},children:(0,qt.jsxs)(op,{sx:{display:"flex",alignItems:"flex-start"},children:[(0,qt.jsx)(op,{sx:{display:"flex",bgcolor:"primary.theme.50",borderRadius:1},children:(0,qt.jsx)("img",{src:Sbe,height:40})}),(0,qt.jsxs)(op,{sx:{flexGrow:1,ml:2},children:[(0,qt.jsx)(Cf,{variant:"body2",component:"p",fontWeight:500,children:X("rpm_ResolvedAlerts")}),(0,qt.jsx)(Cf,{variant:"h6",component:"h6",lineHeight:"1",sx:{mt:.5},children:null===L||void 0===L?void 0:L.resolveAlerts})]})]})})}),(0,qt.jsx)(Ff,{item:!0,className:"patientDashboard-tour-step2",children:(0,qt.jsx)(qf,{className:"linkNoClr",color:"inherit",onClick:()=>{ne("panel2"),ee(0)},children:(0,qt.jsxs)(op,{sx:{display:"flex",alignItems:"flex-start"},children:[(0,qt.jsx)(op,{sx:{display:"flex",bgcolor:"primary.theme.50",borderRadius:1},children:(0,qt.jsx)("img",{src:wbe,height:40})}),(0,qt.jsxs)(op,{sx:{flexGrow:1,ml:2},children:[(0,qt.jsx)(Cf,{variant:"body2",component:"p",fontWeight:500,children:X("rpm_ActiveAlerts")}),(0,qt.jsx)(Cf,{variant:"h6",component:"h6",lineHeight:"1",sx:{mt:.5},children:null===L||void 0===L?void 0:L.activeAlerts})]})]})})}),!1]}):(0,qt.jsx)(jbe,{}),(0,qt.jsx)(Ff,{item:!0,xs:!0,children:(0,qt.jsx)(Ff,{container:!0,spacing:2.5,justifyContent:"flex-end",alignItems:"center",children:(0,qt.jsx)(Ff,{item:!0,children:(0,qt.jsx)(Kz,{initialValues:x,onSubmit:$,enableReinitialize:!0,children:e=>{let{values:t,setFieldValue:n,resetForm:r}=e;return(0,qt.jsx)(qt.Fragment,{children:(0,qt.jsx)(nH,{children:(0,qt.jsxs)(Ff,{container:!0,spacing:2,alignItems:"center",justifyContent:"flex-end",children:[(0,qt.jsx)(Ff,{item:!0,className:"patientDashboard-tour-step4",children:(0,qt.jsxs)(Ff,{container:!0,spacing:1,alignItems:"center",sx:{borderRadius:"8px"},className:"ExtralightBG",p:.2,pb:.8,mt:0,pr:1,children:[(0,qt.jsx)(Ff,{item:!0,children:(0,qt.jsxs)(d_,{sx:{minWidth:120},size:"small",children:[(0,qt.jsx)(o_,{id:"filter_report",children:"Filter"}),(0,qt.jsxs)(tH,{as:G_,sx:{bgcolor:"#fff"},label:"Filter",labelId:"filter_report",id:"filter_report",name:"filter_report",onChange:e=>{n("filter_report",e.target.value),"custom"!==e.target.value&&$((0,i.A)((0,i.A)({},t),{},{filter_report:e.target.value}))},children:[(0,qt.jsx)(mf,{value:"day",children:"Day"}),(0,qt.jsx)(mf,{value:"weekly",children:"Weekly"}),(0,qt.jsx)(mf,{value:"monthly",children:"Monthly"}),(0,qt.jsx)(mf,{value:"course",children:"Course"}),(0,qt.jsx)(mf,{value:"custom",children:"Custom"})]}),(0,qt.jsx)(dH,{name:"filter_report",children:e=>(0,qt.jsx)(Cf,{component:"span",className:"error",variant:"body2",children:X(e,{field:X("rpm_FilterReport")})})})]})}),"custom"!==t.filter_report&&"course"!==O.filter_report&&(0,qt.jsx)(Ff,{item:!0,children:(0,qt.jsxs)(op,{sx:{bgcolor:"#fff",px:1,borderRadius:1},children:[(0,qt.jsx)(wh,{onClick:()=>R({value:"<",table:"trends"}),size:"small",children:(0,qt.jsx)(_be.A,{fontSize:"small"})}),(0,qt.jsxs)(Cf,{variant:"body2",component:"span",children:[sa()(O.from).format("DD MMM YYYY")," - ",sa()(O.to).format("DD MMM YYYY")]}),sa()().diff(sa()(O.to),"days")>0&&(0,qt.jsx)(wh,{onClick:()=>R({value:">",table:"trends"}),size:"small",children:(0,qt.jsx)(Cbe.A,{fontSize:"small"})})]})}),"course"===O.filter_report&&"custom"!==t.filter_report&&(0,qt.jsx)(Ff,{item:!0,children:(0,qt.jsx)(op,{sx:{bgcolor:"#fff",px:2,py:1,borderRadius:1},children:(0,qt.jsxs)(Cf,{variant:"body2",component:"span",children:[sa()(V.start_date).format("DD MMM YYYY")," - ",sa()(V.end_date).format("DD MMM YYYY")]})})}),"custom"==t.filter_report&&(0,qt.jsxs)(qt.Fragment,{children:[(0,qt.jsx)(Ff,{item:!0,children:(0,qt.jsx)(op,{sx:{width:"160px","& .MuiOutlinedInput-input":{py:1.0625},bgcolor:"#fff"},children:(0,qt.jsx)(WM,{dateAdapter:DI,children:(0,qt.jsx)(tH,{as:fD,size:"small",label:"From",id:"from",name:"from",inputFormat:"dd/MM/yyyy",value:t.from?new Date(parseInt(t.from,10)):null,onChange:e=>n("from",sa()(e).valueOf()),renderInput:e=>(0,qt.jsx)(Q_,(0,i.A)({},e)),maxDate:new Date})})})}),(0,qt.jsx)(Ff,{item:!0,children:(0,qt.jsx)(op,{sx:{width:"160px","& .MuiOutlinedInput-input":{py:1.0625},bgcolor:"#fff"},children:(0,qt.jsx)(WM,{dateAdapter:DI,children:(0,qt.jsx)(tH,{as:fD,size:"small",label:"To",id:"to",name:"to",inputFormat:"dd/MM/yyyy",value:t.to?new Date(parseInt(t.to,10)):null,onChange:e=>n("to",sa()(e).valueOf()),renderInput:e=>(0,qt.jsx)(Q_,(0,i.A)({},e)),maxDate:t.to?new Date:null,minDate:t.from})})})}),(0,qt.jsx)(Ff,{item:!0,children:(0,qt.jsx)(xh,{color:"primary",disableElevation:!0,variant:"contained",type:"submit",children:"Submit"})}),(0,qt.jsx)(Ff,{item:!0,children:(0,qt.jsx)(sy,{placement:"top","aria-label":"Reset Filter",title:"Reset Filter",children:(0,qt.jsx)(xh,{color:"primary",variant:"outlined",onClick:()=>{r(),$(x)},style:{minWidth:"40px"},className:"resetBackupButton",children:(0,qt.jsx)(Eye.A,{fontSize:"small"})})})})]})]})}),(0,qt.jsx)(Ff,{item:!0,className:"patientDashboard-tour-step3",children:(0,qt.jsxs)(d_,{sx:{minWidth:120},size:"small",children:[(0,qt.jsx)(xh,{variant:"contained",color:"primary",id:"basic-button","aria-controls":Y?"demo-customized-menu":void 0,"aria-haspopup":"true","aria-expanded":Y?"true":void 0,disableElevation:!0,onClick:Z,endIcon:(0,qt.jsx)(ab.A,{}),children:"Reports"}),(0,qt.jsxs)(tf,{id:"basic-menu",anchorEl:G,open:Y,onClose:K,MenuListProps:{"aria-labelledby":"basic-button"},children:[(0,qt.jsx)(mf,{onClick:()=>{K(),Q("".concat(ld.DOCTOR.PROGRAM,"/").concat(null===W||void 0===W?void 0:W.code,"/patients/").concat(null===H||void 0===H?void 0:H.id,"/bp/report"))},children:X("rpm_summarized")}),(0,qt.jsx)(mf,{onClick:()=>{K(),Q("".concat(ld.DOCTOR.PROGRAM,"/").concat(null===W||void 0===W?void 0:W.code,"/patients/").concat(null===H||void 0===H?void 0:H.id,"/bp/report/detailed"))},children:X("rpm_detailed")})]})]})})]})})})}},"filter_formik")})})})]})}),(0,qt.jsx)(Ff,{container:!0,spacing:2.5,mt:.01,children:(0,qt.jsx)(Ff,{item:!0,xs:12,children:(0,qt.jsx)(yH,{variant:"outlined",sx:{border:"none"},className:"medicalChartAccordian",children:(0,qt.jsxs)(CV,{expanded:"panel1"===te,onChange:oe("panel1"),children:[(0,qt.jsx)(LV,{expandIcon:(0,qt.jsx)(op,{sx:{lineHeight:"0",color:"primary.main"},children:(0,qt.jsx)(pv.A,{})}),sx:{bgcolor:"white","&.MuiAccordionSummary-root":{"&.Mui-expanded":{minHeight:48}},"& .MuiAccordionSummary-content":{"&.Mui-expanded":{my:1.5}}},children:(0,qt.jsx)(Cf,{variant:"h6",component:"h6",children:"Vital Trends"})}),(0,qt.jsx)(TV,{sx:{p:0},children:(0,qt.jsx)(wH,{sx:{pb:0},className:"patientDashboard-tour-step5",children:(0,qt.jsx)(eje,{order:t,orderBy:n,setOrder:r,setOrderBy:o,dataParameter:a,checkState:s,onCheck:l,isSelection:c,nodata:d,pageDetails:u,headCellsItems:m,patientBpReport:f,fetchPatientBpReportList:g,fiterReportData:v,filterInitialData:x,getReadingColor:k,getStatus:A,bpVitalData:T,bpVitalData1:E,handleSelectAllClick:M,reportView:re,handleReportView:()=>{ie(!re)},readingCounts:P,stageAlertData:D,getStageStatus:N,patientLastFrame:F,deleteReadingButton:z})})})]})})})}),(0,qt.jsx)(Ff,{container:!0,spacing:2.5,sx:{mt:.01},children:(0,qt.jsx)(Ff,{item:!0,xs:12,children:(0,qt.jsx)(yH,{variant:"outlined",sx:{border:"none"},className:"medicalChartAccordian patientDashboard-tour-step6",children:(0,qt.jsxs)(CV,{expanded:"panel2"===te,onChange:oe("panel2"),children:[(0,qt.jsx)(LV,{expandIcon:(0,qt.jsx)(op,{sx:{lineHeight:"0",color:"primary.main"},children:(0,qt.jsx)(pv.A,{})}),sx:{bgcolor:"white","&.MuiAccordionSummary-root":{"&.Mui-expanded":{minHeight:48}},"& .MuiAccordionSummary-content":{"&.Mui-expanded":{my:1.5}}},children:(0,qt.jsx)(Cf,{variant:"h6",component:"h6",children:"Alert Summary"})}),(0,qt.jsx)(TV,{sx:{p:0},children:(0,qt.jsxs)(wH,{sx:{pt:0,pb:0},children:[(0,qt.jsx)(op,{sx:{border:1,borderColor:"divider",borderRadius:1,borderBottom:"none",borderBottomLeftRadius:0,borderBottomRightRadius:0},children:(0,qt.jsx)(Ff,{container:!0,spacing:2,alignItems:"center",children:(0,qt.jsx)(Ff,{item:!0,xs:!0,children:(0,qt.jsxs)(fV,{value:J,onChange:(e,t)=>{ee(t)},variant:"scrollable",scrollButtons:"auto",children:[(0,qt.jsx)(zU,(0,i.A)((0,i.A)({label:X("rpm_ActiveAlerts")},HV(0)),{},{sx:{py:1.5}})),(0,qt.jsx)(zU,(0,i.A)((0,i.A)({label:X("rpm_ResolvedAlerts")},HV(1)),{},{sx:{py:1.5}}))]})})})}),(0,qt.jsx)(Ff,{container:!0,spacing:2,children:(0,qt.jsxs)(Ff,{item:!0,xs:12,children:[(0,qt.jsx)(zV,{value:J,index:0,children:(0,qt.jsx)(Abe,{order:t,orderBy:n,setOrder:r,setOrderBy:o,activeAlertsPageDetails:p,resolvedButton:S,alertData:b,headCellsItems:y,fetchPatientAlerts:()=>j((0,i.A)((0,i.A)({},O),{},{filter_report:""})),filterDate:O,userData:I,deleteAlertButton:B})}),(0,qt.jsx)(zV,{value:J,index:1,children:(0,qt.jsx)(tje,{resolveAlertsPageDetails:h,resolveAlertCount:_,resolveAlertBpHeadCell:C,fetchResolvePatientAlerts:()=>w((0,i.A)((0,i.A)({},O),{},{filter_report:""}))})})]})})]})})]})})})})]})};const rje=function(e){let{options:t,onCloseModal:n,actionFunction:r}=e;const{t:i}=Vg();return(0,qt.jsxs)(qt.Fragment,{children:[(0,qt.jsx)(Cf,{component:"p",variant:"h6",children:i("message:rpm_AlertResolvedBody")}),(0,qt.jsx)(Cf,{component:"p",variant:"body1"}),(0,qt.jsx)(Kz,{initialValues:{description:""},validationSchema:RU.resolveAlert,onSubmit:r,enableReinitialize:!0,children:()=>(0,qt.jsx)(qt.Fragment,{children:(0,qt.jsxs)(nH,{children:[(0,qt.jsxs)(op,{mt:2,children:[(0,qt.jsx)(o_,{htmlFor:"description",required:!0,sx:{mb:.75,fontWeight:600},children:i("rpm_FollowUpComment")}),(0,qt.jsx)(tH,{as:qj,fullWidth:!0,id:"description",name:"description",color:"primary",size:"small",multiline:!0,rows:4,endAdornment:(0,qt.jsx)(tw,{position:"end",children:(0,qt.jsx)(sy,{title:i("message:rpm_DescriptionHelp"),placement:"top",children:(0,qt.jsx)(wh,{size:"small",sx:{p:0},children:(0,qt.jsx)(pM.A,{fontSize:"small"})})})})}),(0,qt.jsx)(dH,{name:"description",children:e=>(0,qt.jsx)(v_,{error:!0,children:i(e,{field:i("rpm_Followupcomment")})})})]}),(0,qt.jsx)(op,{mt:2.5,children:(0,qt.jsxs)(Ff,{container:!0,spacing:2,direction:t.btnSwap?"row-reverse":"row",justifyContent:"start",children:[(0,qt.jsx)(Ff,{item:!0,children:(0,qt.jsx)(xh,{color:t.btn.primaryColor,disableElevation:!0,variant:"contained",type:"submit",children:t.btn.primaryText})}),(0,qt.jsx)(Ff,{item:!0,children:(0,qt.jsx)(xh,{color:t.btn.primaryColor,variant:"outlined",onClick:n,children:t.btn.secondaryText})})]})})]})})},"followup_formik")]})},ije=["content"],oje=["content"];const aje=function(e){let{patientId:t,patientLastFrame:n,patientData:r,program:o}=e;const a=wt(mu),s={print_report:"",filter_report:"course",from:null===a||void 0===a?void 0:a.start_date,to:null===a||void 0===a?void 0:a.end_date,page:1},l=[{id:"systolic",name:"Systolic"},{id:"diastolic",name:"Diastolic"},{id:"pulse",name:"Pulse"}],c=[{id:"minimum",name:"Minimum"},{id:"maximum",name:"Maximum"},{id:"average",name:"Average"}],d=Nt(),{t:u}=Vg(),{enqueueSnackbar:p}=hi(),h=wt(cu),[m,f]=We.useState(!0),[g,v]=We.useState("desc"),[x,y]=We.useState("ts"),[b,j]=We.useState(null),[_,C]=We.useState(null),[w,S]=We.useState(null),[A,k]=We.useState(null),[T,E]=We.useState(["systolic","diastolic","pulse"]),[M,O]=We.useState(null),[R,P]=We.useState(s),[D,N]=We.useState(null),[L,I]=We.useState(null),[F,$]=We.useState((0,i.A)({},dd)),[B,z]=We.useState((0,i.A)({},dd)),[H,W]=We.useState((0,i.A)({},dd)),[U,V]=We.useState({open:!1,data:{}}),[G,q]=We.useState({open:!1,data:{}}),[Y,Z]=We.useState({open:!1,data:{}}),[K,X]=We.useState(null),{schedule:Q}=wt(mu),J=null===Q||void 0===Q?void 0:Q.id,ee=null===a||void 0===a?void 0:a.id,te=e=>{V((0,i.A)((0,i.A)({},U),{},{open:!U.open,data:e}))},ne=e=>{q((0,i.A)((0,i.A)({},G),{},{open:!G.open,data:e}))},re=e=>{Z((0,i.A)((0,i.A)({},Y),{},{open:!Y.open,data:e}))},ie=e=>{if(Array.isArray(e))return E(e.map(e=>e.toString()));const t=e.target.name;T.includes(t)&&T.length>1?E(T.filter(e=>e!==t)):E(e=>e.includes(t)?[...e]:[...e,t])},oe=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n=e.filter_report,r=e.from,i=e.to;return"day"===e.filter_report&&(n="day",r=sa()().startOf("day").valueOf(),i=sa()().valueOf(),"<"===t?(r=sa()(r).subtract(1,"days").startOf("day").valueOf(),i=sa()(i).subtract(1,"days").endOf("day").valueOf()):">"===t&&(r=sa()(r).add(1,"days").startOf("day").valueOf(),i=sa()(i).add(1,"days").endOf("day").valueOf())),"weekly"===e.filter_report&&(n="weekly",r=sa()().subtract(6,"days").startOf("day").valueOf(),i=sa()().valueOf(),"<"===t?(r=sa()(r).subtract(6,"days").startOf("day").valueOf(),i=sa()(i).subtract(6,"days").endOf("day").valueOf()):">"===t&&(r=sa()(r).add(6,"days").startOf("day").valueOf(),i=sa()(i).add(6,"days").endOf("day").valueOf())),"monthly"===e.filter_report&&(n="monthly",r=sa()().subtract(30,"days").startOf("day").valueOf(),i=sa()().valueOf(),"<"===t?(r=sa()(r).subtract(30,"days").startOf("day").valueOf(),i=sa()(i).subtract(30,"days").endOf("day").valueOf()):">"===t&&(r=sa()(r).add(30,"days").startOf("day").valueOf(),i=sa()(i).add(30,"days").endOf("day").valueOf())),"custom"===e.filter_report&&(n="custom",r=sa()(e.from).startOf("day").valueOf(),i=sa()(e.to).endOf("day").valueOf()),"all"===e.filter_report&&(n="all",r="",i=""),P({filter_report:n||(null===R||void 0===R?void 0:R.filter_report),from:r,to:i}),{filter_report:n,from:r,to:i}},ae=async e=>{try{const{data:t}=await d(fl(e)),n=t||{},r=Object.assign({},(Yye(n),n));j(t),N(t),$(e=>(0,i.A)((0,i.A)({},e),{},{last_page:r.last_page,current_page:r.current_page,from:r.from,per_page:r.per_page,to:r.to,total:r.total}))}catch(t){p(t.message,{variant:"error"})}},se=async e=>{const n=oe(e),r={patient_id:t,desease:["bp"],duration:[n.from,n.to]};ae(r)},le=async e=>{try{const{data:n}=await d(vl(t,e)),r=n||{},{content:o}=r,a=Ko(r,ije);S(o),I(e=>(0,i.A)((0,i.A)({},e),{},{activeAlerts:null===a||void 0===a?void 0:a.total})),z(e=>(0,i.A)((0,i.A)({},e),{},{last_page:a.last_page,current_page:a.current_page,from:a.from,per_page:a.per_page,to:a.to,total:a.total}))}catch(n){p(n.message,{variant:"error"})}},ce=async e=>{const t=oe(e);let n=null===t||void 0===t?void 0:t.from,r=null===t||void 0===t?void 0:t.to;const o=(0,i.A)((0,i.A)({sort_by:x,sort_order:g},B),{},{vitalType:"bp",minTs:n,maxTs:r,current_page:null!==e&&void 0!==e&&e.page?null===e||void 0===e?void 0:e.page:null===B||void 0===B?void 0:B.current_page});le(o)},de=async e=>{try{const{data:n}=await d(vl(t,e)),r=n||{},{content:o}=r,a=Ko(r,oje);k(o),I(e=>(0,i.A)((0,i.A)({},e),{},{resolveAlerts:null===a||void 0===a?void 0:a.total})),W(e=>(0,i.A)((0,i.A)({},e),{},{last_page:a.last_page,current_page:a.current_page,from:a.from,per_page:a.per_page,to:a.to,total:a.total}))}catch(n){p(n.message,{variant:"error"})}},ue=async e=>{const t=oe(e);let n=null===t||void 0===t?void 0:t.from,r=null===t||void 0===t?void 0:t.to;const o=(0,i.A)((0,i.A)({},H),{},{vitalType:"bp",sort_by:x,sort_order:g,includeDismissed:!0,minTs:n,maxTs:r});de(o)},pe=e=>{se(e),ce(e),ue(e)};We.useEffect(()=>{const e={filterDate:{start_date:R.from,end_date:R.to,report:R.filter_report},complianceStatus:m?"NA":null!==K&&void 0!==K&&K.status?K.status:"COMPLIANT"};$o.setFilterDate(e.filterDate),d(NC(e))},[R,m]),We.useEffect(()=>{h&&async function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";try{const{data:n}=await d(wl({sort_by:"",sort_order:"",per_page:9999,q:e},t)),{content:r}=n||{};O(r)}catch(n){p(n.message,{variant:"error"})}}()},[h]),We.useEffect(()=>{t&&J&&(async()=>{try{const{data:e}=await d(ml(t,J,ee));X(e)}catch(e){console.log(e)}})()},[t,J,ee]),We.useEffect(()=>{f(!0),setTimeout(()=>{cs(a)||pe(s),f(!1)},2e3)},[a]);const he=[{id:"time",label:u("rpm_Time"),isSort:!1,sortProperty:"time"},{id:"systolic",label:u("rpm_Systolic"),isSort:!1,sortProperty:"systolic"},{id:"diastolic",label:u("rpm_Diastolic"),isSort:!1,sortProperty:"diastolic"},{id:"pulse",label:u("rpm_Pulse"),isSort:!1,sortProperty:"pulse"},{id:"action",label:u("rpm_Actions"),isSort:!1,sortProperty:"action"}],me=[{id:"reading",label:u("rpm_Readings"),isSort:!1,sortProperty:"value"},{id:"conditions",label:u("rpm_Conditions"),isSort:!1,sortProperty:"name"},{id:"time",label:u("rpm_Time"),isSort:!1,sortProperty:"time"},{id:"action",label:u("rpm_Actions"),isSort:!1,sortProperty:"action"}],fe=[{id:"vitals",label:u("rpm_Vitals"),isSort:!1,sortProperty:"name"},{id:"reading",label:u("rpm_Condition"),isSort:!1,sortProperty:"value"},{id:"msg",label:u("rpm_Message"),isSort:!1,sortProperty:"msg"},{id:"time",label:u("rpm_Time"),isSort:!1,sortProperty:"time"}],ge=[{id:"name",label:u("rpm_Name"),isSort:!1,sortProperty:"name"},{id:"minimum",label:u("rpm_Minimum"),isSort:!1,sortProperty:"minimum"},{id:"maximum",label:u("rpm_Maximum"),isSort:!1,sortProperty:"maximum"},{id:"average",label:u("rpm_Average"),isSort:!1,sortProperty:"average"}];return m?(0,qt.jsx)(jbe,{}):(0,qt.jsxs)(qt.Fragment,{children:[(0,qt.jsx)(nje,{order:g,orderBy:x,setOrder:v,setOrderBy:y,dataParameter:"id",checkState:T,onCheck:ie,isSelection:!1,nodata:GC,pageDetails:F,activeAlertsPageDetails:B,resolveAlertsPageDetails:H,headCellsItemsBp:he,patientLastFrame:n,patientBpReport:b,fetchPatientBpReportList:se,fiterReportData:()=>{},filterInitialData:s,activeAlertBpHeadCell:me,activeAlertCount:w,fetchPatientAlerts:ce,resolveAlertCount:A,resolveAlertBpHeadCell:fe,fetchResolvePatientAlerts:ue,resolvedButton:e=>{var t;return(0,qt.jsx)(xh,{size:"small",color:"primary","data-id":e.id,sx:{bgcolor:"primary.theme.50",fontSize:12,px:1.5,"&:hover":{backgroundColor:"primary.theme.50"}},onClick:()=>te(e),disabled:!(null!==o&&void 0!==o&&null!==(t=o.permissions)&&void 0!==t&&t.showDismissAlertPatientBtn),children:u("rpm_FollowUp")})},getStatus:e=>{var t;return(0,qt.jsx)(op,{children:null!==e&&void 0!==e&&null!==(t=e.alerts)&&void 0!==t&&t.length?(0,qt.jsx)(dM,{severity:"error",icon:!1,sx:e=>({py:0,px:1,display:"inline-flex",fontSize:e.spacing(1.5),"& .MuiAlert-message":{p:e.spacing(.5,0)}}),children:(0,qt.jsx)("strong",{children:"Alert"})}):(0,qt.jsx)(dM,{severity:"success",icon:!1,sx:e=>({py:0,px:1,display:"inline-flex",fontSize:e.spacing(1.5),"& .MuiAlert-message":{p:e.spacing(.5,0)}}),children:(0,qt.jsx)("strong",{children:"Normal"})})})},getReadingColor:e=>{var t,n;let r=null===Qde||void 0===Qde||null===(t=Qde.palette)||void 0===t?void 0:t.green[50],i=null===Qde||void 0===Qde||null===(n=Qde.palette)||void 0===n?void 0:n.green[900];var o,a,s,l;return e>=Number("100")?{bg:null===Qde||void 0===Qde||null===(o=Qde.palette)||void 0===o?void 0:o.red[100],text:null===Qde||void 0===Qde||null===(a=Qde.palette)||void 0===a?void 0:a.red[900]}:e<Number("60")?{bg:null===Qde||void 0===Qde||null===(s=Qde.palette)||void 0===s?void 0:s.orange[100],text:null===Qde||void 0===Qde||null===(l=Qde.palette)||void 0===l?void 0:l.orange[900]}:{bg:r,text:i}},bpVitalData:l,bpVitalData1:c,handleSelectAllClick:e=>{let t=[];if(e.target.checked){"vitals"===e.target.name&&(t=l),"average"===e.target.name&&(t=c);const n=t.map(e=>e.id);return void ie(n)}ie([])},headCellAverageReport:ge,averageReport:_,fetchAverageBpReport:async e=>{let n=e.from,r=e.to;"day"===e.filter_report&&(n=sa()().startOf("day").valueOf(),r=sa()().endOf("day").valueOf()),"weekly"===e.filter_report&&(n=sa()().subtract(6,"days").startOf("day").valueOf(),r=sa()().endOf("day").valueOf()),"monthly"===e.filter_report&&(n=sa()().subtract(30,"days").startOf("day").valueOf(),r=sa()().endOf("day").valueOf()),"custom"===e.filter_report&&(n=sa()(e.from).startOf("day").valueOf(),r=sa()(e.to).endOf("day").valueOf());try{const e={patient_id:t,desease:["bp"],duration:[n,r],vitals:["bp.systolic","bp.diastolic","bp.pulse"]},i=await d((e=>async t=>{t(na(!0));try{const t="".concat(ca.patients,"/").concat(e.patient_id,"/data/avg?dataNames=").concat(e.desease[0],"&start=").concat(e.duration[0],"&end=").concat(e.duration[1],"&vitalNames=").concat(e.vitals);return await Iu(t,{})}catch(n){return n}finally{t(na(!1))}})(e)),{aggregated_data_point:o}=i.data;let a=[];Object.keys(o).forEach(e=>{a.push({id:e,name:e,minimum:o[e].Min,maximum:o[e].Max,average:o[e].Average})}),C(a)}catch(i){console.log("fetchPatientBpReportList="+i)}},deviceList:M,filterDate:R,handleDateFilter:async e=>{let n=R.filter_report,r=R.from,o=R.to;"day"===R.filter_report&&(n="day","<"===e.value?(r=sa()(r).subtract(1,"days").startOf("day").valueOf(),o=sa()(o).subtract(1,"days").endOf("day").valueOf()):(r=sa()(r).add(1,"days").startOf("day").valueOf(),o=sa()(o).add(1,"days").endOf("day").valueOf())),"weekly"===R.filter_report&&(n="weekly","<"===e.value?(r=sa()(r).subtract(6,"days").startOf("day").valueOf(),o=sa()(o).subtract(6,"days").endOf("day").valueOf()):(r=sa()(r).add(6,"days").startOf("day").valueOf(),o=sa()(o).add(6,"days").endOf("day").valueOf())),"monthly"===R.filter_report&&(n="monthly","<"===e.value?(r=sa()(r).subtract(30,"days").startOf("day").valueOf(),o=sa()(o).subtract(30,"days").endOf("day").valueOf()):(r=sa()(r).add(30,"days").startOf("day").valueOf(),o=sa()(o).add(30,"days").endOf("day").valueOf())),P({filter_report:n,from:r,to:o});const a={patient_id:t,desease:["bp"],duration:[r,o]},s=(0,i.A)((0,i.A)({sort_by:x,sort_order:g},B),{},{vitalType:"bp",minTs:r,maxTs:o}),l=(0,i.A)((0,i.A)({},H),{},{vitalType:"bp",sort_by:x,sort_order:g,includeDismissed:!0,minTs:r,maxTs:o});ae(a),le(s),de(l)},readingCounts:{},stageAlertData:D,getStageStatus:e=>{var t,n,r;let i="",o="",a="",s="",l="";if(null===e||void 0===e||!e.alerts)return(0,qt.jsx)(dM,{severity:"success",icon:!1,sx:e=>({py:0,px:1,display:"inline-flex",fontSize:e.spacing(1.5),"& .MuiAlert-message":{p:e.spacing(.5,0)}}),children:(0,qt.jsx)("strong",{children:"Normal"})});const c=null===e||void 0===e||null===(t=e.alerts)||void 0===t?void 0:t.filter(t=>t.data_name===e.name||("systolic"===t.data_name||("diastolic"===t.data_name||("pulse"===t.data_name||void 0))));return(null===c||void 0===c?void 0:c.findIndex(e=>"systolic"===e.data_name))>=0&&(o=(0,qt.jsx)(dM,{severity:"error",icon:!1,sx:e=>({py:0,px:1,display:"inline-flex",fontSize:e.spacing(1.5),"& .MuiAlert-message":{p:e.spacing(.5,0)}}),children:(0,qt.jsx)("strong",{children:"High Systolic"})})),(null===c||void 0===c?void 0:c.findIndex(e=>"diastolic"===e.data_name))>=0&&(a=(0,qt.jsx)(dM,{severity:"error",icon:!1,sx:e=>({py:0,px:1,display:"inline-flex",fontSize:e.spacing(1.5),"& .MuiAlert-message":{p:e.spacing(.5,0)}}),children:(0,qt.jsx)("strong",{children:"High Diastolic"})})),(null===c||void 0===c?void 0:c.findIndex(e=>"pulse"===e.data_name))>=0&&(s=(0,qt.jsx)(dM,{severity:"error",icon:!1,sx:e=>({py:0,px:1,display:"inline-flex",fontSize:e.spacing(1.5),"& .MuiAlert-message":{p:e.spacing(.5,0)}}),children:(0,qt.jsx)("strong",{children:"High Pulse"})})),(null===c||void 0===c?void 0:c.findIndex(e=>"bp"===e.data_name))>=0&&(l=c.find(e=>"bp"===e.data_name)),i=(0,qt.jsxs)(qt.Fragment,{children:[o," ",a," ",s]}),null!==(n=l)&&void 0!==n&&n.text?null===(r=l)||void 0===r?void 0:r.text:i},alertStatic:L,userData:null===o||void 0===o?void 0:o.permissions,fetchBPAndAlertsList:pe,deleteAlertButton:e=>(0,qt.jsx)(sy,{title:u("rpm_Delete"),children:(0,qt.jsx)(wh,{"data-id":e.id,color:"error",onClick:()=>ne(e),children:(0,qt.jsx)(xc,{fontSize:"small",sx:{width:16,height:16}})})}),deleteReadingButton:e=>(0,qt.jsx)(sy,{title:u("rpm_Delete"),children:(0,qt.jsx)(wh,{"data-id":e.id,color:"error",onClick:()=>re(e),children:(0,qt.jsx)(xc,{fontSize:"small",sx:{width:16,height:16}})})}),patientData:r,program:o,patientMissedReading:K,activeCourse:a}),(0,qt.jsx)(qV,{openModal:U.open,onCloseModal:te,actionFunction:async e=>{const n={follow_up:e.description};try{await d(xl(t,U.data.id,n)),pe((0,i.A)((0,i.A)({},R),{},{filter_report:""})),V((0,i.A)((0,i.A)({},U),{},{open:!U.open})),p(u("message:rpm_ResolveAlertSuccess"),{variant:"success"})}catch(r){p(r.message,{variant:"error"})}},dataName:null,options:{primaryText:u("message:rpm_AlertResolvedTitle"),secondaryText:u("message:rpm_AlertResolvedBody"),descText:u("message:rpm_AlertResolvedSub"),btn:{primaryText:u("rpm_Confirm"),secondaryText:u("rpm_Cancel"),primaryColor:"primary",secondaryColor:"inherit"},btnSwap:!0},children:e=>(0,qt.jsx)(rje,(0,i.A)({},e))}),(0,qt.jsx)(qV,{openModal:G.open,onCloseModal:ne,actionFunction:async()=>{try{await d(Dl(t,G.data.id)),pe((0,i.A)((0,i.A)({},R),{},{filter_report:""})),q((0,i.A)((0,i.A)({},G),{},{open:!G.open})),p(u("message:rpm_DeleteAlertSuccess"),{variant:"success"})}catch(e){p(e.message,{variant:"error"})}},dataName:null,options:{primaryText:u("message:rpm_DeleteTitle"),secondaryText:u("message:rpm_DeleteAlertText"),descText:"",btn:{primaryText:u("rpm_Delete"),secondaryText:u("rpm_Cancel"),primaryColor:"error",secondaryColor:"primary"},btnSwap:!0}}),(0,qt.jsx)(qV,{openModal:Y.open,onCloseModal:re,actionFunction:async()=>{try{await d(Nl(t,Y.data.id)),pe((0,i.A)((0,i.A)({},R),{},{filter_report:""})),Z((0,i.A)((0,i.A)({},Y),{},{open:!Y.open})),p(u("message:rpm_DeleteReadingSuccess"),{variant:"success"})}catch(e){p(e.message,{variant:"error"})}},dataName:null,options:{primaryText:u("message:rpm_DeleteTitle"),secondaryText:u("message:rpm_DeleteReadingText"),descText:"",btn:{primaryText:u("rpm_Delete"),secondaryText:u("rpm_Cancel"),primaryColor:"error",secondaryColor:"primary"},btnSwap:!0}})]})};function sje(e){let{glucoseData:t,gridWidth:n,chartWidth:r,chartHeight:o,stage:a}=e;const{t:s}=Vg(),[l,c]=We.useState([]),[d,u]=We.useState([]),p=e=>{const t=[];return e.forEach(e=>{t.push((0,i.A)((0,i.A)({},e),{},{name:sa()(e.ts).format("DD MMM"),Glucose:e.values.glucose,amt:1.25*e.values.glucose,alerts:e.alerts,ts:sa()(e.ts).format("DD MMM YYYY hh:mm A")}))}),t.reverse()},h=e=>{var t,n,r,i,o,a,s;let l=null===Qde||void 0===Qde||null===(t=Qde.palette)||void 0===t?void 0:t.green[300];var c,d,u;null!==e&&void 0!==e&&null!==(n=e.alerts)&&void 0!==n&&n.length&&"hypoglycemia"===(null===e||void 0===e||null===(r=e.alerts[0])||void 0===r?void 0:r.text)&&(l=null===Qde||void 0===Qde||null===(c=Qde.palette)||void 0===c?void 0:c.red[200]);null!==e&&void 0!==e&&null!==(i=e.alerts)&&void 0!==i&&i.length&&"prediabetes"===(null===e||void 0===e||null===(o=e.alerts[0])||void 0===o?void 0:o.text)&&(l=null===Qde||void 0===Qde||null===(d=Qde.palette)||void 0===d?void 0:d.orange[300]);null!==e&&void 0!==e&&null!==(a=e.alerts)&&void 0!==a&&a.length&&"diabetes"===(null===e||void 0===e||null===(s=e.alerts[0])||void 0===s?void 0:s.text)&&(l=null===Qde||void 0===Qde||null===(u=Qde.palette)||void 0===u?void 0:u.red[300]);return l},m=e=>{var t,n;let{active:r,payload:i}=e;const o=null!==(t=i[0])&&void 0!==t&&t.payload?null===(n=i[0])||void 0===n?void 0:n.payload:{};var a,l,c,d,u;if(r&&i&&null!==i&&void 0!==i&&i.length)return(0,qt.jsxs)(op,{sx:{bgcolor:"#ffffff",border:"1px solid #cccccc",p:1.5,width:250},children:[(0,qt.jsx)(Cf,{gutterBottom:!0,variant:"body2",children:"Date: ".concat(null===o||void 0===o?void 0:o.ts)}),(0,qt.jsx)(Cf,{color:(null===o||void 0===o||null===(a=o.alerts)||void 0===a?void 0:a.length)>0?h(null===(l=i[0])||void 0===l?void 0:l.payload):Qde.palette.green[500],gutterBottom:!0,variant:"body2",fontWeight:600,children:"Glucose:  ".concat(null===o||void 0===o?void 0:o.Glucose)}),(0,qt.jsx)(Cf,{gutterBottom:!0,variant:"body2",children:"Event:  ".concat(null===o||void 0===o||null===(c=o.values)||void 0===c?void 0:c.activity)}),(null===o||void 0===o||null===(d=o.alerts)||void 0===d?void 0:d.length)>0?(0,qt.jsx)(Cf,{gutterBottom:!0,variant:"body2",fontWeight:600,children:"Status: ".concat(s("rpm_".concat(null===o||void 0===o||null===(u=o.alerts[0])||void 0===u?void 0:u.text)))}):(0,qt.jsx)(Cf,{gutterBottom:!0,variant:"body2",fontWeight:600,children:"Status: ".concat(s("rpm_NormalGlucose"))})]})},f=e=>{var t;const{cx:n,cy:r,fill:i,payload:o}=e;return(0,qt.jsx)("svg",{x:n-4,y:r-4,width:8,height:8,fill:(null===o||void 0===o||null===(t=o.alerts)||void 0===t?void 0:t.length)>0?h(o):i,viewBox:"0 0 24 24",children:(0,qt.jsx)("path",{d:"M12 2C6.47 2 2 6.47 2 12s4.47 10 10 10 10-4.47 10-10S17.53 2 12 2z"})})};return We.useEffect(()=>{cs(d)||(()=>{let e=[];d.forEach(n=>{e.push({id:n,data:null===t||void 0===t?void 0:t.filter(e=>e.values.activity===n)})}),c(e)})()},[d]),We.useEffect(()=>{cs(t)||u(Qd(t))},[t]),(0,qt.jsx)(Ff,{container:!0,spacing:2,mt:.05,children:"AllStage"===a?null===l||void 0===l?void 0:l.map(e=>e.data.length>0&&(0,qt.jsxs)(Ff,{item:!0,xs:12,md:n,children:[!cs(null===e||void 0===e?void 0:e.data)&&(0,qt.jsx)(Cf,{variant:"body1",fontWeight:600,textAlign:"center",children:null===e||void 0===e?void 0:e.id}),(0,qt.jsx)(op,{sx:{height:"".concat(o,"px")},children:(0,qt.jsx)(w2,{width:"100%",children:(0,qt.jsxs)(tce,{width:r,height:o,data:p(e.data),children:[(0,qt.jsx)(Wle,{dataKey:"name"}),(0,qt.jsx)(ece,{dataKey:"amt",label:{value:"Blood Glucose (in mg/dL)",angle:"-90",position:"center",dx:-30,fontSize:"0.7rem"}}),(0,qt.jsx)(w6,{content:(0,qt.jsx)(m,{})}),(0,qt.jsx)(lle,{type:"monotone",dataKey:"Glucose",stroke:Qde.palette.deepPurple[300],strokeWidth:2,isAnimationActive:!1,dot:(0,qt.jsx)(f,{fill:Qde.palette.green[500]}),activeDot:(0,qt.jsx)(f,{fill:Qde.palette.green[500]})})]})})})]},null===e||void 0===e?void 0:e.id)):null===l||void 0===l?void 0:l.map(e=>e.data.length>0&&(0,qt.jsxs)(Ff,{item:!0,xs:12,md:12,children:[!cs(null===e||void 0===e?void 0:e.data)&&(0,qt.jsx)(Cf,{variant:"body1",fontWeight:600,textAlign:"center",children:null===e||void 0===e?void 0:e.id}),(0,qt.jsx)(op,{sx:{height:"400px"},children:(0,qt.jsx)(w2,{width:"100%",children:(0,qt.jsxs)(tce,{width:800,height:400,data:p(e.data),children:[(0,qt.jsx)(Wle,{dataKey:"name"}),(0,qt.jsx)(ece,{dataKey:"amt",label:{value:"Blood Glucose (in mg/dL)",angle:"-90",position:"center",dx:-30,fontSize:"0.7rem"}}),(0,qt.jsx)(w6,{content:(0,qt.jsx)(m,{})}),(0,qt.jsx)(lle,{type:"monotone",dataKey:"Glucose",stroke:Qde.palette.deepPurple[300],strokeWidth:2,isAnimationActive:!1,dot:(0,qt.jsx)(f,{fill:Qde.palette.green[500]}),activeDot:(0,qt.jsx)(f,{fill:Qde.palette.green[500]})})]})})})]},null===e||void 0===e?void 0:e.id))})}sje.defaultProps={glucoseData:[]};const lje=sje;function cje(e){let{glucoseData:t,stage:n,height:r,width:i,report:o,filteredActivities:a}=e;const{t:s}=Vg(),[l,c]=We.useState([]),d=["diabetes","prediabetes","hypoglycemia","normal"],u=e=>{let t=[];return d.forEach(n=>{const r=e.filter(e=>{var t,r;return(null===e||void 0===e||null===(t=e.alerts)||void 0===t?void 0:t.length)&&(null===e||void 0===e||null===(r=e.alerts[0])||void 0===r?void 0:r.text)===n}),i=e.filter(e=>cs(null===e||void 0===e?void 0:e.alerts));r.length&&t.push({id:n,name:s("rpm_".concat(n)),value:r.length}),"normal"===n&&i.length&&t.push({id:n,name:s("rpm_".concat(n)),value:i.length})}),t},p=e=>{let t="";var n,r,i,o;"normal"===e.id&&(t=null===Qde||void 0===Qde||null===(n=Qde.palette)||void 0===n?void 0:n.green[300]);"hypoglycemia"===e.id&&(t=null===Qde||void 0===Qde||null===(r=Qde.palette)||void 0===r?void 0:r.red[200]);"prediabetes"===e.id&&(t=null===Qde||void 0===Qde||null===(i=Qde.palette)||void 0===i?void 0:i.orange[300]);"diabetes"===e.id&&(t=null===Qde||void 0===Qde||null===(o=Qde.palette)||void 0===o?void 0:o.red[300]);return t},h=Math.PI/180,m=e=>{const{cx:t,cy:n,midAngle:r,innerRadius:i,outerRadius:o,percent:a}=e,s=i+.4*(o-i),l=t+s*Math.cos(-r*h),c=n+s*Math.sin(-r*h);return(0,qt.jsx)("text",{x:l,y:c,fill:"white",textAnchor:l>t?"start":"middle",dominantBaseline:"central",children:0==a?null:"".concat((100*a).toFixed(0),"%")})},f=e=>{var t,n;let{active:r,payload:i}=e;const o=null!==(t=i[0])&&void 0!==t&&t.payload?null===(n=i[0])||void 0===n?void 0:n.payload:{};var a;if(r&&i&&null!==i&&void 0!==i&&i.length)return(0,qt.jsxs)(op,{sx:{bgcolor:"#ffffff",border:"1px solid #cccccc",p:1.5,width:250},children:[(0,qt.jsx)(Cf,{gutterBottom:!0,variant:"body2",fontWeight:600,children:(0,qt.jsx)(op,{component:"span",color:"normal"!==(null===o||void 0===o?void 0:o.id)?p(null===o||void 0===o?void 0:o.payload):Qde.palette.green[500],children:null===o||void 0===o?void 0:o.name})}),(0,qt.jsx)(Cf,{gutterBottom:!0,variant:"body2",fontWeight:600,children:"Count:  ".concat(null===o||void 0===o||null===(a=o.payload)||void 0===a?void 0:a.value)})]})};return We.useEffect(()=>{(()=>{let e=[];a.forEach(n=>{e.push({id:n,data:u(null===t||void 0===t?void 0:t.filter(e=>e.values.activity===n))})}),c(e)})()},[t]),(0,qt.jsx)(Ff,{container:!0,spacing:2,mt:.05,children:"AllStage"===n?null===l||void 0===l?void 0:l.map(e=>{var t;return(0,qt.jsxs)(Ff,{item:!0,xs:o?4:12,md:4,lg:o?4:6,xl:4,children:[!cs(null===e||void 0===e?void 0:e.data)&&(0,qt.jsx)(Cf,{variant:"body1",fontWeight:600,textAlign:"center",children:null===e||void 0===e?void 0:e.id}),(0,qt.jsx)(op,{sx:{height:r?"".concat(r,"px"):"200px"},children:(0,qt.jsxs)(Ode,{width:i||200,height:r||200,style:{margin:"auto"},children:[(0,qt.jsx)(Mde,{data:null===e||void 0===e?void 0:e.data,cx:"50%",cy:"50%",innerRadius:i?i/4.5:40,outerRadius:r?r/2:90,paddingAngle:0,labelLine:!1,label:m,dataKey:"value",children:null===e||void 0===e||null===(t=e.data)||void 0===t?void 0:t.map((e,t)=>(0,qt.jsx)(Cre,{fill:p(e)},"cell-".concat(t)))}),(0,qt.jsx)(w6,{content:(0,qt.jsx)(f,{}),wrapperStyle:{zIndex:99}})]})})]},null===e||void 0===e?void 0:e.id)}):null===l||void 0===l?void 0:l.map(e=>{var t;return e.data.length>0&&(0,qt.jsxs)(Ff,{item:!0,xs:12,children:[!cs(null===e||void 0===e?void 0:e.data)&&(0,qt.jsx)(Cf,{variant:"body1",fontWeight:600,textAlign:"center",children:null===e||void 0===e?void 0:e.id}),(0,qt.jsx)(op,{sx:{height:"400px"},children:(0,qt.jsxs)(Ode,{width:400,height:400,style:{margin:"auto"},children:[(0,qt.jsx)(Mde,{data:null===e||void 0===e?void 0:e.data,cx:"50%",cy:"50%",innerRadius:70,outerRadius:150,paddingAngle:0,labelLine:!1,label:m,dataKey:"value",children:null===e||void 0===e||null===(t=e.data)||void 0===t?void 0:t.map((e,t)=>(0,qt.jsx)(Cre,{fill:p(e)},"cell-".concat(t)))}),(0,qt.jsx)(w6,{content:(0,qt.jsx)(f,{}),wrapperStyle:{zIndex:99}})]})})]},null===e||void 0===e?void 0:e.id)})})}cje.defaultProps={glucoseData:[],filteredActivities:[]};const dje=cje;const uje=function(e){var t,n,r,i,o,a,s,l,c,d,u,p,h;let{glucoseData:m,readingHeadCell:f,deleteReadingButton:g,patientLastFrame:v}=e;const{t:x}=Vg(),[y,b]=We.useState("AllStage"),[j,_]=We.useState("trend"),[C,w]=We.useState([]),S=()=>{if(y===y){const e=null===m||void 0===m?void 0:m.filter(e=>{var t;return(null===e||void 0===e?void 0:e.values)&&(null===e||void 0===e||null===(t=e.values)||void 0===t?void 0:t.activity)===y}),t=null===m||void 0===m?void 0:m.filter(e=>cs(e));return"normal"===y?t:"AllStage"===y?m:e}},A=[{value:"Diabetes",color:null===Qde||void 0===Qde||null===(t=Qde.palette)||void 0===t?void 0:t.red[300],darkColor:null===Qde||void 0===Qde||null===(n=Qde.palette)||void 0===n?void 0:n.red[900]},{value:"Prediabetes",color:null===Qde||void 0===Qde||null===(r=Qde.palette)||void 0===r?void 0:r.orange[300],darkColor:null===Qde||void 0===Qde||null===(i=Qde.palette)||void 0===i?void 0:i.orange[900]},{value:"Normal",color:null===Qde||void 0===Qde||null===(o=Qde.palette)||void 0===o?void 0:o.green[300],darkColor:null===Qde||void 0===Qde||null===(a=Qde.palette)||void 0===a?void 0:a.green[500]},{value:"Hypoglycemia",color:null===Qde||void 0===Qde||null===(s=Qde.palette)||void 0===s?void 0:s.red[200],darkColor:null===Qde||void 0===Qde||null===(l=Qde.palette)||void 0===l?void 0:l.red[500]}],k=e=>{let{legend:t}=e;return t.length>0&&(0,qt.jsx)(op,{textAlign:"right",children:(0,qt.jsx)(op,{component:"ul",p:0,m:0,display:"inline-flex",flexWrap:"wrap",children:null===A||void 0===A?void 0:A.map((e,t)=>(0,qt.jsxs)(Cf,{component:"li",fontSize:14,sx:{listStyle:"none",display:"flex",alignItems:"center",mr:1.5},children:[(0,qt.jsx)(kbe.A,{sx:{width:10,color:e.color}}),(0,qt.jsx)(op,{component:"span",ml:1,color:e.darkColor,children:e.value})]},t))})})};return We.useEffect(()=>{cs(m)||w(Qd(m))},[m]),(0,qt.jsxs)(Ff,{container:!0,spacing:2.5,mt:.05,children:[(0,qt.jsx)(Ff,{item:!0,xs:12,lg:7,children:(0,qt.jsx)(yH,{variant:"outlined",sx:{height:"100%"},children:(0,qt.jsxs)(wH,{sx:{height:"100%"},children:[!cs(m)&&(0,qt.jsxs)(qt.Fragment,{children:[(0,qt.jsxs)(Ff,{container:!0,spacing:1,children:[(0,qt.jsx)(Ff,{item:!0,xs:!0,children:(0,qt.jsxs)(Ube,{exclusive:!0,size:"small",color:"primary",value:j,onChange:(e,t)=>{null!==t&&_(t)},sx:{"& .MuiToggleButton-root":{px:2.25}},children:[(0,qt.jsx)(Fbe,{value:"trend",children:x("rpm_Trend")}),(0,qt.jsx)(Fbe,{value:"pie",children:x("rpm_Donut")})]})}),(0,qt.jsx)(Ff,{item:!0,children:(0,qt.jsxs)(G_,{fullWidth:!0,size:"small",variant:"outlined",value:y,onChange:e=>{b(e.target.value)},children:[(0,qt.jsx)(mf,{value:"AllStage",children:"All Activities"}),C.map(e=>(0,qt.jsx)(mf,{value:e,children:e},e))]})}),(0,qt.jsx)(Ff,{item:!0,xs:12,children:(0,qt.jsxs)(op,{sx:{mb:1.5,display:"flex",alignItems:"center",flexWrap:"wrap",justifyContent:"flex-end"},children:[(0,qt.jsx)(Cf,{variant:"body2",children:x("rpm_LastReading")}),cs(v)?(0,qt.jsx)(lS,{sx:{ml:3},variant:"rounded",width:75}):(0,qt.jsxs)(op,{fontSize:"body2.fontSize",sx:{bgcolor:"primary.theme.50",px:1,py:.5,borderRadius:1,ml:3},children:[x("rpm_Glucose"),": ",null===(c=v[0])||void 0===c||null===(d=c.values)||void 0===d?void 0:d.glucose," |"," ",x("rpm_Activity"),": ",null===(u=v[0])||void 0===u||null===(p=u.values)||void 0===p?void 0:p.activity]})]})})]}),(0,qt.jsx)(k,{legend:A})]}),"trend"===j?(0,qt.jsx)(op,{sx:{height:"100%"},children:m?cs(m)?(0,qt.jsx)(op,{display:"flex",alignItems:"center",height:"100%",children:(0,qt.jsx)("img",{src:GC,style:{display:"block",margin:"auto"}})}):(0,qt.jsx)(op,{children:(0,qt.jsx)(lje,{glucoseData:S(),gridWidth:4,chartWidth:250,chartHeight:200,stage:y})}):(0,qt.jsx)(op,{width:"100%",height:"100%",alignSelf:"center",sx:{display:"flex"},children:(0,qt.jsx)(MM,{color:"primary",sx:{m:"auto"}})})}):(0,qt.jsx)(op,{children:m?cs(m)?(0,qt.jsx)(op,{display:"flex",alignItems:"center",height:"100%",children:(0,qt.jsx)("img",{src:GC,style:{display:"block",margin:"auto"}})}):(0,qt.jsx)(dje,{glucoseData:S(),stage:y,filteredActivities:C}):(0,qt.jsx)(op,{width:"100%",height:"100%",alignSelf:"center",sx:{display:"flex"},children:(0,qt.jsx)(MM,{color:"primary",sx:{m:"auto"}})})})]})})}),(0,qt.jsx)(Ff,{item:!0,xs:12,lg:5,children:(0,qt.jsx)(op,{children:(0,qt.jsx)(UT,{data:S(),headCells:f,noDataImage:GC,fetchList:()=>{},skeletonVrows:6,stickyHeader:!0,scrollHeight:568,className:"theme_scroll",children:null===(h=S())||void 0===h?void 0:h.map(e=>{var t;return(0,qt.jsxs)(cw,{sx:{"&:last-child td, &:last-child th":{border:0}},children:[(0,qt.jsxs)(gw,{children:[e.ts,(0,qt.jsxs)(Cf,{variant:"caption",component:"p",children:["(",sa()(e.ts).fromNow(),")"]})]}),(0,qt.jsx)(gw,{children:(null===e||void 0===e||null===(t=e.alerts)||void 0===t?void 0:t.length)>0?null===e||void 0===e?void 0:e.alerts.map((t,n)=>{var r;return(0,qt.jsx)(op,{className:null===t||void 0===t?void 0:t.text,display:"inline-flex",mr:n===(null===e||void 0===e||null===(r=e.alerts)||void 0===r?void 0:r.length)-1?0:1,children:(0,qt.jsx)(op,{component:"span",children:e.values.glucose})},n)}):(0,qt.jsx)(op,{className:"normal",display:"inline-flex",children:(0,qt.jsx)(op,{component:"span",children:e.values.glucose})})}),(0,qt.jsx)(gw,{children:e.values.activity?e.values.activity:"NA"}),(0,qt.jsx)(gw,{children:g(e)})]},e.id)})})})})]})};const pje=function(e){let{order:t,orderBy:n,setOrder:r,setOrderBy:o,alertHeadCellsItems:a,activeAlertsPageDetails:s,resolvedButton:l,fetchPatientAlerts:c,activeAlertCount:d,alertStatic:u,deleteAlertButton:p,userData:h,glucoseData:m,readingHeadCell:f,getReadingColor:g,filterDate:v,filterInitialData:x,handleDateFilter:y,fetchGlucoseAndAlertsList:b,resolveAlertsPageDetails:j,resolveAlertCount:_,resolveAlertBpHeadCell:C,fetchResolvePatientAlerts:w,deleteReadingButton:S,patientLastFrame:A,program:k,patientData:T,patientMissedReading:E}=e;const{t:M}=Vg(),O=so(),[R,P]=We.useState(0),[D,N]=We.useState("panel1"),[L,I]=We.useState("AllStage"),[F,$]=We.useState([]),[B,z]=We.useState(null),H=Boolean(B),W=e=>{z(e.currentTarget)},U=()=>{z(null)},V=e=>(t,n)=>{N(!!n&&e)};return We.useEffect(()=>{cs(m)||$(Qd(m))},[m]),(0,qt.jsxs)(qt.Fragment,{children:[(0,qt.jsx)(op,{bgcolor:"#fff",p:1,sx:{borderRadius:"8px"},children:(0,qt.jsxs)(Ff,{container:!0,spacing:2.5,alignItems:"center",children:[d?(0,qt.jsxs)(qt.Fragment,{children:[(0,qt.jsx)(Ff,{item:!0,children:(0,qt.jsx)(qf,{className:"linkNoClr",color:"inherit",onClick:()=>{N("panel2"),P(1)},children:(0,qt.jsxs)(op,{sx:{display:"flex",alignItems:"flex-start"},children:[(0,qt.jsx)(op,{sx:{display:"flex",bgcolor:"primary.theme.50",borderRadius:1},children:(0,qt.jsx)("img",{src:Sbe,height:40})}),(0,qt.jsxs)(op,{sx:{flexGrow:1,ml:2},children:[(0,qt.jsx)(Cf,{variant:"body2",component:"p",fontWeight:500,children:M("rpm_ResolvedAlerts")}),(0,qt.jsx)(Cf,{variant:"h6",component:"h6",lineHeight:"1",sx:{mt:.5},children:null===u||void 0===u?void 0:u.resolveAlerts})]})]})})}),(0,qt.jsx)(Ff,{item:!0,children:(0,qt.jsx)(qf,{className:"linkNoClr",color:"inherit",onClick:()=>{N("panel2"),P(0)},children:(0,qt.jsxs)(op,{sx:{display:"flex",alignItems:"flex-start"},children:[(0,qt.jsx)(op,{sx:{display:"flex",bgcolor:"primary.theme.50",borderRadius:1},children:(0,qt.jsx)("img",{src:wbe,height:40})}),(0,qt.jsxs)(op,{sx:{flexGrow:1,ml:2},children:[(0,qt.jsx)(Cf,{variant:"body2",component:"p",fontWeight:500,children:M("rpm_ActiveAlerts")}),(0,qt.jsx)(Cf,{variant:"h6",component:"h6",lineHeight:"1",sx:{mt:.5},children:null===u||void 0===u?void 0:u.activeAlerts})]})]})})}),!1]}):(0,qt.jsx)(jbe,{}),(0,qt.jsx)(Ff,{item:!0,xs:!0,children:(0,qt.jsx)(Ff,{container:!0,spacing:2.5,justifyContent:"flex-end",alignItems:"center",children:(0,qt.jsx)(Ff,{item:!0,children:(0,qt.jsx)(Kz,{initialValues:x,onSubmit:b,enableReinitialize:!0,children:e=>{let{values:t,setFieldValue:n,resetForm:r}=e;return(0,qt.jsx)(qt.Fragment,{children:(0,qt.jsx)(nH,{children:(0,qt.jsxs)(Ff,{container:!0,spacing:2,alignItems:"center",justifyContent:"flex-end",children:[(0,qt.jsx)(Ff,{item:!0,children:(0,qt.jsxs)(Ff,{container:!0,spacing:1,alignItems:"center",sx:{borderRadius:"8px"},className:"ExtralightBG",p:.2,pb:.8,pr:1,mt:0,children:[(0,qt.jsx)(Ff,{item:!0,children:(0,qt.jsxs)(d_,{sx:{minWidth:120},size:"small",children:[(0,qt.jsx)(o_,{id:"filter_report",children:"Filter"}),(0,qt.jsxs)(tH,{as:G_,sx:{bgcolor:"#fff"},label:"Filter",labelId:"filter_report",id:"filter_report",name:"filter_report",onChange:e=>{n("filter_report",e.target.value),"custom"!==e.target.value&&b((0,i.A)((0,i.A)({},t),{},{filter_report:e.target.value}))},children:[(0,qt.jsx)(mf,{value:"day",children:"Day"}),(0,qt.jsx)(mf,{value:"weekly",children:"Weekly"}),(0,qt.jsx)(mf,{value:"monthly",children:"Monthly"}),(0,qt.jsx)(mf,{value:"course",children:"Course"}),(0,qt.jsx)(mf,{value:"custom",children:"Custom"})]}),(0,qt.jsx)(dH,{name:"filter_report",children:e=>(0,qt.jsx)(Cf,{component:"span",className:"error",variant:"body2",children:M(e,{field:M("rpm_FilterReport")})})})]})}),"custom"==t.filter_report&&(0,qt.jsxs)(qt.Fragment,{children:[(0,qt.jsx)(Ff,{item:!0,children:(0,qt.jsx)(op,{sx:{width:"160px","& .MuiOutlinedInput-input":{py:1.0625},bgcolor:"#fff"},children:(0,qt.jsx)(WM,{dateAdapter:DI,children:(0,qt.jsx)(tH,{as:fD,size:"small",label:"From",id:"from",name:"from",inputFormat:"dd/MM/yyyy",value:t.from,onChange:e=>n("from",e),renderInput:e=>(0,qt.jsx)(Q_,(0,i.A)({},e)),maxDate:new Date})})})}),(0,qt.jsx)(Ff,{item:!0,children:(0,qt.jsx)(op,{sx:{width:"160px","& .MuiOutlinedInput-input":{py:1.0625},bgcolor:"#fff"},children:(0,qt.jsx)(WM,{dateAdapter:DI,children:(0,qt.jsx)(tH,{as:fD,size:"small",label:"To",id:"to",name:"to",inputFormat:"dd/MM/yyyy",value:t.to,onChange:e=>n("to",e),renderInput:e=>(0,qt.jsx)(Q_,(0,i.A)({},e)),maxDate:t.to?new Date:null})})})}),(0,qt.jsx)(Ff,{item:!0,children:(0,qt.jsx)(xh,{color:"primary",disableElevation:!0,variant:"contained",type:"submit",children:"Submit"})})," ",(0,qt.jsx)(Ff,{item:!0,children:(0,qt.jsx)(sy,{placement:"top","aria-label":"Reset Filter",title:"Reset Filter",children:(0,qt.jsx)(xh,{color:"primary",variant:"outlined",onClick:()=>{r(),b(x)},style:{minWidth:"40px"},className:"resetBackupButton",children:(0,qt.jsx)(Eye.A,{fontSize:"small"})})})})]}),"custom"!==t.filter_report&&"course"!==v.filter_report&&(0,qt.jsx)(Ff,{item:!0,children:(0,qt.jsxs)(op,{sx:{bgcolor:"#fff",px:1,borderRadius:1},children:[(0,qt.jsx)(wh,{onClick:()=>y({value:"<",table:"trends"}),size:"small",children:(0,qt.jsx)(_be.A,{fontSize:"small"})}),(0,qt.jsxs)(Cf,{variant:"body2",component:"span",children:[sa()(v.from).format("DD MMM YYYY")," - ",sa()(v.to).format("DD MMM YYYY")]}),sa()().diff(sa()(v.to),"days")>0&&(0,qt.jsx)(wh,{onClick:()=>y({value:">",table:"trends"}),size:"small",children:(0,qt.jsx)(Cbe.A,{fontSize:"small"})})]})}),"course"===v.filter_report&&"custom"!==t.filter_report&&(0,qt.jsx)(Ff,{item:!0,children:(0,qt.jsx)(op,{sx:{bgcolor:"#fff",px:2,py:1,borderRadius:1},children:(0,qt.jsxs)(Cf,{variant:"body2",component:"span",children:[sa()(v.from).format("DD MMM YYYY")," - ",sa()(v.to).format("DD MMM YYYY")]})})})]})}),(0,qt.jsx)(Ff,{item:!0,children:(0,qt.jsxs)(d_,{sx:{minWidth:120},size:"small",children:[(0,qt.jsx)(xh,{variant:"contained",color:"primary",id:"basic-button","aria-controls":H?"demo-customized-menu":void 0,"aria-haspopup":"true","aria-expanded":H?"true":void 0,disableElevation:!0,onClick:W,endIcon:(0,qt.jsx)(ab.A,{}),children:"Reports"}),(0,qt.jsxs)(tf,{id:"basic-menu",anchorEl:B,open:H,onClose:U,MenuListProps:{"aria-labelledby":"basic-button"},children:[(0,qt.jsx)(mf,{onClick:()=>{U(),O("".concat(ld.DOCTOR.PROGRAM,"/").concat(null===k||void 0===k?void 0:k.code,"/patients/").concat(null===T||void 0===T?void 0:T.id,"/glucose/report"))},children:M("rpm_summarized")}),(0,qt.jsx)(mf,{onClick:()=>{U(),O("".concat(ld.DOCTOR.PROGRAM,"/").concat(null===k||void 0===k?void 0:k.code,"/patients/").concat(null===T||void 0===T?void 0:T.id,"/glucose/report/detailed"))},children:M("rpm_detailed")})]})]})})]})})})}},"filter_formik")})})})]})}),(0,qt.jsx)(Ff,{container:!0,spacing:2.5,mt:.01,children:(0,qt.jsx)(Ff,{item:!0,xs:12,children:(0,qt.jsx)(yH,{variant:"outlined",sx:{border:"none"},children:(0,qt.jsxs)(CV,{expanded:"panel1"===D,onChange:V("panel1"),children:[(0,qt.jsx)(LV,{expandIcon:(0,qt.jsx)(op,{sx:{bgcolor:"primary.main",color:"white",display:"flex",borderRadius:1},children:(0,qt.jsx)(pv.A,{})}),sx:{bgcolor:"white","&.MuiAccordionSummary-root":{"&.Mui-expanded":{minHeight:48}},"& .MuiAccordionSummary-content":{"&.Mui-expanded":{my:1.5}}},children:(0,qt.jsx)(Cf,{variant:"h6",component:"h6",children:"Vital Trends"})}),(0,qt.jsx)(TV,{sx:{p:0},children:(0,qt.jsx)(wH,{sx:{pb:0},children:(0,qt.jsx)(uje,{glucoseData:m,readingHeadCell:f,getReadingColor:g,deleteReadingButton:S,patientLastFrame:A})})})]})})})}),(0,qt.jsx)(Ff,{container:!0,spacing:2.5,sx:{mt:.01},children:(0,qt.jsx)(Ff,{item:!0,xs:12,children:(0,qt.jsx)(yH,{variant:"outlined",sx:{border:"none"},children:(0,qt.jsxs)(CV,{expanded:"panel2"===D,onChange:V("panel2"),children:[(0,qt.jsx)(LV,{expandIcon:(0,qt.jsx)(op,{sx:{bgcolor:"primary.main",color:"white",display:"flex",borderRadius:1},children:(0,qt.jsx)(pv.A,{})}),sx:{bgcolor:"white","&.MuiAccordionSummary-root":{"&.Mui-expanded":{minHeight:48}},"& .MuiAccordionSummary-content":{"&.Mui-expanded":{my:1.5}}},children:(0,qt.jsx)(Cf,{variant:"h6",component:"h6",children:"Alert Summary"})}),(0,qt.jsx)(TV,{sx:{p:0},children:(0,qt.jsxs)(wH,{sx:{pt:0,pb:0},children:[(0,qt.jsx)(op,{sx:{border:1,borderColor:"divider",borderRadius:1,borderBottom:"none",borderBottomLeftRadius:0,borderBottomRightRadius:0},children:(0,qt.jsxs)(Ff,{container:!0,spacing:2,alignItems:"center",children:[(0,qt.jsx)(Ff,{item:!0,xs:!0,children:(0,qt.jsxs)(fV,{value:R,onChange:(e,t)=>{P(t)},variant:"scrollable",scrollButtons:"auto",children:[(0,qt.jsx)(zU,(0,i.A)((0,i.A)({label:M("rpm_ActiveAlerts")},HV(0)),{},{sx:{py:1.5}})),(0,qt.jsx)(zU,(0,i.A)((0,i.A)({label:M("rpm_ResolvedAlerts")},HV(1)),{},{sx:{py:1.5}}))]})}),(0,qt.jsx)(Ff,{item:!0,children:(0,qt.jsx)(op,{pr:2,children:(0,qt.jsxs)(G_,{fullWidth:!0,size:"small",variant:"outlined",value:L,onChange:e=>{I(e.target.value)},children:[(0,qt.jsx)(mf,{value:"AllStage",children:"All"}),null===F||void 0===F?void 0:F.map(e=>(0,qt.jsx)(mf,{value:e,children:e},e))]})})})]})}),(0,qt.jsx)(Ff,{container:!0,spacing:2,children:(0,qt.jsxs)(Ff,{item:!0,xs:12,children:[(0,qt.jsx)(zV,{value:R,index:0,children:(0,qt.jsx)(Abe,{order:t,orderBy:n,setOrder:r,setOrderBy:o,activeAlertsPageDetails:s,alertData:(()=>{if(L===L){const e=null===d||void 0===d?void 0:d.filter(e=>{var t,n;return(null===e||void 0===e||null===(t=e.alerts)||void 0===t?void 0:t.length)&&(null===e||void 0===e||null===(n=e.alerts[0])||void 0===n?void 0:n.data_name)==="glucose ".concat(L)}),t=null===d||void 0===d?void 0:d.filter(e=>cs(null===e||void 0===e?void 0:e.alerts));return"normal"===L?t:"AllStage"===L?d:e}})(),headCellsItems:a,fetchPatientAlerts:()=>c((0,i.A)((0,i.A)({},v),{},{filter_report:""})),filterDate:v,userData:h,resolvedButton:l,deleteAlertButton:p})}),(0,qt.jsx)(zV,{value:R,index:1,children:(0,qt.jsx)(tje,{resolveAlertsPageDetails:j,resolveAlertCount:(()=>{if(L===L){const e=null===_||void 0===_?void 0:_.filter(e=>{var t,n;return(null===e||void 0===e||null===(t=e.alerts)||void 0===t?void 0:t.length)&&(null===e||void 0===e||null===(n=e.alerts[0])||void 0===n?void 0:n.data_name)==="glucose ".concat(L)}),t=null===_||void 0===_?void 0:_.filter(e=>cs(null===e||void 0===e?void 0:e.alerts));return"normal"===L?t:"AllStage"===L?_:e}})(),resolveAlertBpHeadCell:C,fetchResolvePatientAlerts:()=>w((0,i.A)((0,i.A)({},v),{},{filter_report:""}))})})]})})]})})]})})})})]})},hje=["content"],mje=["content"];const fje=function(e){let{patientData:t,program:n}=e;const r=wt(gu),o={print_report:"",filter_report:"course",from:null===r||void 0===r?void 0:r.start_date,to:null===r||void 0===r?void 0:r.end_date,page:1},{schedule:a}=wt(gu),s=null===a||void 0===a?void 0:a.id,l=null===r||void 0===r?void 0:r.id,c=Nt(),{t:d}=Vg(),{patientId:u}=lo(),[p,h]=We.useState(!0),[m,f]=We.useState("desc"),[g,v]=We.useState("ts"),[x,y]=We.useState(null),[b,j]=We.useState(o),[_,C]=We.useState(null),[w,S]=We.useState(null),[A,k]=We.useState(null),[T,E]=We.useState(null),[M,O]=We.useState(null),[R,P]=We.useState((0,i.A)({},dd)),[D,N]=We.useState((0,i.A)({},dd)),[L,I]=We.useState({open:!1,data:{}}),[F,$]=We.useState({open:!1,data:{}}),[B,z]=We.useState({open:!1,data:{}}),H=e=>{I((0,i.A)((0,i.A)({},L),{},{open:!L.open,data:e}))},W=e=>{$((0,i.A)((0,i.A)({},F),{},{open:!F.open,data:e}))},U=e=>{z((0,i.A)((0,i.A)({},B),{},{open:!B.open,data:e}))},V=e=>{let t=e.filter_report,n=e.from,i=e.to;return"day"===e.filter_report&&(t="day",n=sa()().startOf("day").valueOf(),i=sa()().valueOf()),"weekly"===e.filter_report&&(t="weekly",n=sa()().subtract(6,"days").startOf("day").valueOf(),i=sa()().valueOf()),"monthly"===e.filter_report&&(t="monthly",n=sa()().subtract(30,"days").startOf("day").valueOf(),i=sa()().valueOf()),"course"===e.filter_report&&(t="course",n=null===r||void 0===r?void 0:r.start_date,i=null===r||void 0===r?void 0:r.end_date),"custom"===e.filter_report&&(t="custom",n=sa()(e.from).startOf("day").valueOf(),i=sa()(e.to).endOf("day").valueOf()),j({filter_report:t||(null===b||void 0===b?void 0:b.filter_report),from:n,to:i}),{filter_report:t,from:n,to:i}},G=async e=>{try{const{data:t}=await c(Ll(e));y(t)}catch(t){console.log(t)}},q=async e=>{try{const{data:t}=await c(((e,t)=>async n=>{n(na(!0));try{let n="".concat(ca.patients,"/").concat(e,"/alerts?dataName=").concat(t.vitalType||"","&page=").concat(t.current_page||"","&perPage=").concat(t.per_page||"","&sortBy=").concat(t.sort_by||"","&sortOrder=").concat(t.sort_order||"","&minTs=").concat(t.minTs||"","&maxTs=").concat(t.maxTs||"");t.includeDismissed&&(n+="&includeDismissed=".concat(t.includeDismissed,"&dataName=").concat(t.data_name||""));const r=await Iu(n,{});return oa()(r,"data.content",[]).forEach(e=>nl(e)),r}catch(r){return r}finally{n(na(!1))}})(u,e)),n=t||{},{content:r}=n,o=Ko(n,hje);C(r),k(e=>(0,i.A)((0,i.A)({},e),{},{activeAlerts:null===o||void 0===o?void 0:o.total})),P(e=>(0,i.A)((0,i.A)({},e),{},{last_page:o.last_page,current_page:o.current_page,from:o.from,per_page:o.per_page,to:o.to,total:o.total}))}catch(t){c(Zo({subTitle:t.message,severity:ud.ERROR}))}},Y=async e=>{const t=V(e);let n=null===t||void 0===t?void 0:t.from,r=null===t||void 0===t?void 0:t.to;const o=(0,i.A)((0,i.A)({sort_by:g,sort_order:m},R),{},{vitalType:"glucose",minTs:n,maxTs:r,current_page:null!==e&&void 0!==e&&e.page?null===e||void 0===e?void 0:e.page:null===R||void 0===R?void 0:R.current_page});q(o)},Z=async e=>{try{const{data:t}=await c(vl(u,e)),n=t||{},{content:r}=n,o=Ko(n,mje);S(r),k(e=>(0,i.A)((0,i.A)({},e),{},{resolveAlerts:null===o||void 0===o?void 0:o.total})),N(e=>(0,i.A)((0,i.A)({},e),{},{last_page:o.last_page,current_page:o.current_page,from:o.from,per_page:o.per_page,to:o.to,total:o.total}))}catch(t){c(Zo({subTitle:t.message,severity:ud.ERROR}))}},K=async e=>{const t=V(e);let n=null===t||void 0===t?void 0:t.from,r=null===t||void 0===t?void 0:t.to;const o=(0,i.A)((0,i.A)({},D),{},{sort_by:g,sort_order:m,vitalType:"glucose",includeDismissed:!0,minTs:n,maxTs:r});Z(o)},X=e=>{(e=>{const t=V(e),n={patient_id:u,disease:"glucose",duration:[t.from,t.to]};G(n)})(e),Y(e),K(e)};We.useEffect(()=>{h(!0),setTimeout(()=>{cs(r)||X(o),h(!1)},2e3)},[r]),We.useEffect(()=>{const e={filterDate:{start_date:b.from,end_date:b.to,report:b.filter_report},complianceStatus:p?"NA":null!==M&&void 0!==M&&M.status?M.status:"COMPLIANT"};$o.setFilterDate(e.filterDate),c(NC(e))},[b,p]),We.useEffect(()=>{u&&(async()=>{try{const{data:e}=await c(hl(u,"glucose"));E(e)}catch(e){console.log(e)}})()},[]),We.useEffect(()=>{u&&s&&(async()=>{try{const{data:e}=await c(ml(u,s,l));O(e)}catch(e){console.log(e)}})()},[u,s,l]);const Q=[{id:"time",label:d("rpm_Time"),isSort:!1,sortProperty:"time"},{id:"glucose",label:d("rpm_Glucose"),isSort:!1,sortProperty:"glucose"},{id:"event",label:d("rpm_Event"),isSort:!1,sortProperty:"event"},{id:"action",label:d("rpm_Actions"),isSort:!1,sortProperty:"action"}],J=[{id:"reading",label:d("rpm_Readings"),isSort:!1,sortProperty:"value"},{id:"condition",label:d("rpm_Conditions"),isSort:!1,sortProperty:"name"},{id:"time",label:d("rpm_Time"),isSort:!1,sortProperty:"time"},{id:"action",label:d("rpm_Actions"),isSort:!1,sortProperty:"action"}],ee=[{id:"activity",label:d("rpm_activity"),isSort:!1,sortProperty:"name"},{id:"reading",label:d("rpm_Condition"),isSort:!1,sortProperty:"value"},{id:"msg",label:d("rpm_Message"),isSort:!1,sortProperty:"msg"},{id:"time",label:d("rpm_Time"),isSort:!1,sortProperty:"time"}];return p?(0,qt.jsx)(jbe,{}):(0,qt.jsxs)(qt.Fragment,{children:[(0,qt.jsx)(pje,{order:m,orderBy:g,setOrder:f,setOrderBy:v,filterDate:b,filterInitialData:o,glucoseData:x,alertHeadCellsItems:J,readingHeadCell:Q,getReadingColor:e=>!cs(e.alerts),handleDateFilter:async e=>{let t=b.filter_report,n=b.from,r=b.to;"day"===b.filter_report&&(t="day","<"===e.value?(n=sa()(n).subtract(1,"days").startOf("day").valueOf(),r=sa()(r).subtract(1,"days").endOf("day").valueOf()):(n=sa()(n).add(1,"days").startOf("day").valueOf(),r=sa()(r).add(1,"days").endOf("day").valueOf())),"weekly"===b.filter_report&&(t="weekly","<"===e.value?(n=sa()(n).subtract(6,"days").startOf("day").valueOf(),r=sa()(r).subtract(6,"days").endOf("day").valueOf()):(n=sa()(n).add(6,"days").startOf("day").valueOf(),r=sa()(r).add(6,"days").endOf("day").valueOf())),"monthly"===b.filter_report&&(t="monthly","<"===e.value?(n=sa()(n).subtract(30,"days").startOf("day").valueOf(),r=sa()(r).subtract(30,"days").endOf("day").valueOf()):(n=sa()(n).add(30,"days").startOf("day").valueOf(),r=sa()(r).add(30,"days").endOf("day").valueOf())),j({filter_report:t,from:n,to:r});const o={patient_id:u,disease:"glucose",duration:[n,r]},a=(0,i.A)((0,i.A)({sort_by:g,sort_order:m},R),{},{vitalType:"glucose",minTs:n,maxTs:r}),s=(0,i.A)((0,i.A)({},D),{},{vitalType:"glucose",sort_by:g,sort_order:m,includeDismissed:!0,minTs:n,maxTs:r});G(o),q(a),Z(s)},fetchGlucoseAndAlertsList:X,fetchPatientAlerts:Y,activeAlertCount:_,alertStatic:A,activeAlertsPageDetails:R,resolvedButton:e=>{var t;return(0,qt.jsx)(xh,{size:"small",color:"primary","data-id":e.id,sx:{bgcolor:"primary.theme.50",fontSize:12,px:1.5,"&:hover":{backgroundColor:"primary.theme.50"}},onClick:()=>H(e),disabled:!(null!==n&&void 0!==n&&null!==(t=n.permissions)&&void 0!==t&&t.showDismissAlertPatientBtn),disableElevation:!0,children:d("rpm_FollowUp")})},deleteAlertButton:e=>(0,qt.jsx)(sy,{title:d("rpm_Delete"),children:(0,qt.jsx)(wh,{"data-id":e.id,color:"error",onClick:()=>W(e),children:(0,qt.jsx)(xc,{fontSize:"small",sx:{width:16,height:16}})})}),userData:null===n||void 0===n?void 0:n.permissions,resolveAlertsPageDetails:D,resolveAlertCount:w,resolveAlertBpHeadCell:ee,fetchResolvePatientAlerts:K,deleteReadingButton:e=>(0,qt.jsx)(sy,{title:d("rpm_Delete"),children:(0,qt.jsx)(wh,{"data-id":e.id,color:"error",onClick:()=>U(e),children:(0,qt.jsx)(xc,{fontSize:"small",sx:{width:16,height:16}})})}),patientLastFrame:T,patientData:t,program:n,patientMissedReading:M}),(0,qt.jsx)(qV,{openModal:L.open,onCloseModal:H,actionFunction:async e=>{const t={follow_up:e.description};try{await c(xl(u,L.data.id,t)),X((0,i.A)((0,i.A)({},b),{},{filter_report:""})),I((0,i.A)((0,i.A)({},L),{},{open:!L.open})),c(Zo({subTitle:d("message:rpm_ResolveAlertSuccess"),severity:ud.SUCCESS}))}catch(n){c(Zo({subTitle:n.message,severity:ud.ERROR}))}},dataName:null,options:{primaryText:d("message:rpm_AlertResolvedTitle"),secondaryText:d("message:rpm_AlertResolvedBody"),descText:d("message:rpm_AlertResolvedSub"),btn:{primaryText:d("rpm_Confirm"),secondaryText:d("rpm_Cancel"),primaryColor:"primary",secondaryColor:"inherit"},btnSwap:!0},children:e=>(0,qt.jsx)(rje,(0,i.A)({},e))}),(0,qt.jsx)(qV,{openModal:F.open,onCloseModal:W,actionFunction:async()=>{try{await c(Dl(u,F.data.id)),X((0,i.A)((0,i.A)({},b),{},{filter_report:""})),$((0,i.A)((0,i.A)({},F),{},{open:!F.open})),c(Zo({subTitle:d("message:rpm_DeleteAlertSuccess"),severity:ud.SUCCESS}))}catch(e){c(Zo({subTitle:e.message,severity:ud.ERROR}))}},dataName:null,options:{primaryText:d("message:rpm_DeleteTitle"),secondaryText:d("message:rpm_DeleteAlertText"),descText:"",btn:{primaryText:d("rpm_Delete"),secondaryText:d("rpm_Cancel"),primaryColor:"error",secondaryColor:"primary"},btnSwap:!0}}),(0,qt.jsx)(qV,{openModal:B.open,onCloseModal:U,actionFunction:async()=>{try{await c(Nl(u,B.data.id)),X((0,i.A)((0,i.A)({},b),{},{filter_report:""})),z((0,i.A)((0,i.A)({},B),{},{open:!B.open})),c(Zo({subTitle:d("message:rpm_DeleteReadingSuccess"),severity:ud.SUCCESS}))}catch(e){c(Zo({subTitle:e.message,severity:ud.ERROR}))}},dataName:null,options:{primaryText:d("message:rpm_DeleteTitle"),secondaryText:d("message:rpm_DeleteReadingText"),descText:"",btn:{primaryText:d("rpm_Delete"),secondaryText:d("rpm_Cancel"),primaryColor:"error",secondaryColor:"primary"},btnSwap:!0}})]})};const gje=function(e){let{patientData:t,program:n}=e;const{t:r}=Vg(),i=wt(bu),o=!("true"===us(i,"user_principal.attributes.skip_tour[0]","")),a=wt(xu),s=wt(yu),l=Nt(),c=wt(cu),{patientId:d}=lo(),[u,p]=We.useState(null),[h,m]=We.useState(null),[f,g]=We.useState(""),v=[{name:r("rpm_RPM"),url:ld.DOCTOR.PROGRAM},{name:null===n||void 0===n?void 0:n.display_name,url:"".concat(ld.DOCTOR.PROGRAM,"/").concat(null===n||void 0===n?void 0:n.code,"/patients")},{name:"".concat((null===t||void 0===t?void 0:t.first_name)||""," ").concat((null===t||void 0===t?void 0:t.last_name)||""),url:"".concat(ld.DOCTOR.PROGRAM,"/").concat(null===n||void 0===n?void 0:n.code,"/patients/").concat(null===t||void 0===t?void 0:t.id,"/dashboard")},{name:r("rpm_medicalCharts"),url:""}];return We.useEffect(()=>{const e={activeMenuItem:"dashboard",breadcrumb:v};cs(n)||cs(t)||l(NC(e))},[n,t]),We.useEffect(()=>{c&&d&&(async()=>{try{const{data:e}=await l(hl(d,"bp"));p(e)}catch(e){console.log("fetchPatientLastFrame="+e)}})()},[c]),We.useEffect(()=>{l($s({activeVitalTab:h}))},[h]),We.useEffect(()=>{cs(a)||m(0),cs(s)||m(1),cs(a)||cs(s)||m(0),0===(null===a||void 0===a?void 0:a.length)&&0===(null===s||void 0===s?void 0:s.length)&&m(null)},[s,a]),(0,qt.jsxs)(qt.Fragment,{children:[(0,qt.jsx)(bbe,{tabValue:h,patientId:d,handleChangeTabs:(e,t)=>{m(t)},patientLastFrame:u,BpDashboardContainer:aje,OxyDashboardContainer:mbe,GlucoseDashboardContainer:fje,patientData:t,program:n,bpVital:a,glucoseVital:s}),!cs(t)&&(0,qt.jsxs)(qt.Fragment,{children:[(0,qt.jsx)(zZ,{isTour:o,path:"patientDashboardTour",setRenderer:g}),(0,qt.jsx)("input",{type:"hidden",id:"rerenderer",value:f})]})]})};function vje(e){let{deviceList:t,order:n,orderBy:r,setOrder:o,setOrderBy:a,dataParameter:s,deviceHead:l,checkState:c,onCheck:d,isSelection:u,nodata:p,fetchDevicesList:h,pageDetails:m,handleAttachDevice:f,freeDeviceList:g,actionAttachDevice:v,deleteButton:x,errDevice:y,setErrDevice:b,setSearchDevice:j,patientData:_,program:C}=e;const{t:w}=Vg(),S=Nt(),A=so(),k=[{name:w("rpm_RPM"),url:ld.DOCTOR.PROGRAM},{name:null===C||void 0===C?void 0:C.display_name,url:"".concat(ld.DOCTOR.PROGRAM,"/").concat(null===C||void 0===C?void 0:C.code,"/patients")},{name:"".concat((null===_||void 0===_?void 0:_.first_name)||""," ").concat((null===_||void 0===_?void 0:_.last_name)||""),url:"".concat(ld.DOCTOR.PROGRAM,"/").concat(null===C||void 0===C?void 0:C.code,"/patients/").concat(null===_||void 0===_?void 0:_.id,"/dashboard")},{name:w("rpm_devices"),url:""}];return We.useEffect(()=>{const e={breadcrumb:k};ta()(C)||ta()(_)||S(NC(e))},[C,_]),(0,qt.jsx)(op,{sx:{width:"100%"},children:(0,qt.jsx)(Ff,{container:!0,spacing:2.5,children:(0,qt.jsxs)(Ff,{item:!0,xs:12,children:[(0,qt.jsx)(op,{sx:{mb:2.5},children:(0,qt.jsxs)(Ff,{container:!0,spacing:2,children:[(0,qt.jsx)(Ff,{item:!0,xs:!0,children:(0,qt.jsx)(Cf,{variant:"h5",component:"h5",children:w("rpm_Devices")})}),(0,qt.jsxs)(qt.Fragment,{children:[(0,qt.jsxs)(Ff,{item:!0,xs:12,md:3,children:[(0,qt.jsx)(op,{sx:{"& .MuiAutocomplete-root":{"& .MuiFormControl-root":{"& .MuiInputBase-root":{paddingRight:3.5}}}},children:(0,qt.jsx)(aj,{fullWidth:!0,size:"small",margin:"dense",id:"device",name:"device",loading:!ta()(g),options:ta()(g)?[]:g,isOptionEqualToValue:(e,t)=>e.id===t.id,getOptionLabel:e=>(null===e||void 0===e?void 0:e.display_name)+" ("+e.model_number+") "+(null===e||void 0===e?void 0:e.id),renderOption:(e,t)=>(0,qt.jsx)(op,(0,i.A)((0,i.A)({component:"li"},e),{},{children:(0,qt.jsxs)(op,{children:[(0,qt.jsx)(Cf,{variant:"body1",component:"p",children:t.display_name}),(0,qt.jsxs)(Cf,{variant:"caption",component:"p",children:["(","Modal: "+t.model_number+", Serial No.: "+t.serial_number,")"]})]})})),onChange:(e,t,n)=>{null!==t&&void 0!==t&&t.id&&(f(null===t||void 0===t?void 0:t.id),b(!1)),"clear"===n&&(b(!0),j(""))},onInputChange:(e,t)=>{t&&j(t)},renderInput:e=>(0,qt.jsx)(Q_,(0,i.A)((0,i.A)({},e),{},{placeholder:"Search Device..."}))})}),y&&(0,qt.jsx)(v_,{error:!0,children:w("message:rpm_PleaseSelectDevice")})]}),(0,qt.jsxs)(Ff,{item:!0,children:[(0,qt.jsx)(xh,{variant:"contained",color:"primary",disableElevation:!0,onClick:v,children:w("rpm_AssignDevice")}),(0,qt.jsx)(sy,{title:w("message:rpm_AssignDeviceRuleText"),children:(0,qt.jsx)(wh,{children:(0,qt.jsx)(eK.A,{fontSize:"small",sx:{width:16,height:16}})})})]}),(0,qt.jsx)(Ff,{item:!0,children:(0,qt.jsx)(xh,{variant:"outlined",color:"primary",onClick:()=>A(-1),children:w("rpm_Back")})})]})]})}),(0,qt.jsx)(op,{children:(0,qt.jsx)(UT,{order:n,orderBy:r,setOrder:o,setOrderBy:a,data:t,headCells:l,dataParameter:s,selected:c,setSelected:d,isSelection:u,noDataImage:p,fetchList:h,pageDetails:m,skeletonVrows:6,className:"theme_scroll",children:null===t||void 0===t?void 0:t.map(e=>(0,qt.jsxs)(cw,{sx:{"&:last-child td, &:last-child th":{border:0}},children:[u&&(0,qt.jsx)(gw,{padding:"checkbox",children:(0,qt.jsx)(Dw,{onChange:d,checked:c.includes(e.id.toString()),name:e.id.toString(),color:"primary"})}),(0,qt.jsx)(gw,{children:e.display_name}),(0,qt.jsx)(gw,{children:e.serial_number}),(0,qt.jsx)(gw,{children:e.model_number}),(0,qt.jsx)(gw,{children:e.last_activity?e.last_activity:"NA"}),(0,qt.jsx)(gw,{children:x(e)})]},e.id))})}),(0,qt.jsx)(KE,{pageDetails:m,fetchListFunction:h})]})})})}vje.defaultProps={deviceHead:[],pageDetails:{},order:"",orderBy:"",setOrder:()=>{},setOrderBy:()=>{},dataParameter:"",checkState:"",onCheck:()=>{},isSelection:"",nodata:"",deviceList:[],otherDiseaseList:[],familyDiseaseList:[],fetchDevicesList:()=>{},editButton:()=>{},viewButton:()=>{},deleteButton:()=>{},attachDevice:"",handleAttachDevice:()=>{},freeDeviceList:[],errDevice:!1,setErrDevice:()=>{},setSearchDevice:()=>{},program:{},patientData:{}};const xje=vje,yje=["content"];const bje=function(e){let{program:t,patientData:n}=e;const r=Nt(),{programId:o}=lo(),a=wt(cu),{t:s}=Vg(),{enqueueSnackbar:l}=hi(),[c,d]=(0,We.useState)("desc"),[u,p]=(0,We.useState)("updated_at"),[h,m]=We.useState(""),[f,g]=We.useState(""),[v,x]=We.useState(null),[y,b]=We.useState(null),[j,_]=(0,We.useState)([]),[C,w]=We.useState(null),[S,A]=We.useState(!1),[k,T]=(0,We.useState)((0,i.A)({},dd)),[E,M]=We.useState({open:!1,data:{}}),O=e=>{M((0,i.A)((0,i.A)({},E),{},{open:!E.open,data:e}))},R=async function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:h;try{const{data:t}=await r(wl((0,i.A)((0,i.A)({sort_by:u,sort_order:c},k),{},{q:e}),n.id)),o=t||{},{content:a}=o,s=Ko(o,yje);x(a),T(e=>(0,i.A)((0,i.A)({},e),{},{last_page:s.last_page,current_page:s.current_page,from:s.from,per_page:s.per_page,to:s.to,total:s.total}))}catch(t){l(t.message,{variant:"error"})}},P=async()=>{try{const{data:e}=await r(Cl({search:f},"UNASSOCIATED")),{content:t}=e||{};b(t)}catch(e){l(e.message,{variant:"error"})}},D=async(e,t)=>{try{await r(((e,t,n)=>async r=>{r(na(!0));try{const r="".concat(ca.patients,"/").concat(e,"/").concat(t,"/assign-device?deviceId=").concat(n),i=await Fu(r,{});return oa()(i,"data.content",[]).forEach(e=>il(e)),i}finally{r(na(!1))}})(o,e,t)),R(),P(),l(s("message:rpm_AttachDeviceSuccess"),{variant:"success"})}catch(n){l(n.message,{variant:"error"})}},N=async(e,t)=>{try{await r(((e,t,n)=>async r=>{r(na(!0));try{const r="".concat(ca.patients,"/").concat(e,"/").concat(t,"/un-assign-device?deviceId=").concat(n),i=await Bu(r,{});return oa()(i,"data.content",[]).forEach(e=>il(e)),i}finally{r(na(!1))}})(o,e,t)),M({open:!1,data:{}}),R(),P(),l(s("message:rpm_DeAttachDeviceSuccess"),{variant:"success"})}catch(n){l(n.message,{variant:"error"})}};We.useEffect(()=>{a&&n&&R()},[a,n]),We.useEffect(()=>{a&&P()},[a,f]),We.useEffect(()=>{r(NC({activeMenuItem:"devices"}))},[]);const L=[{id:"display_name",label:s("rpm_Name"),isSort:!0,sortProperty:"display_name"},{id:"serial_number",label:s("rpm_SerialNumber"),isSort:!0,sortProperty:"serial_number"},{id:"model_number",label:s("rpm_ModelNumber"),isSort:!0,sortProperty:"model_number"},{id:"last_activity",label:s("rpm_LastActivity"),isSort:!0,sortProperty:"last_activity"},{id:"action",label:s("rpm_Actions"),isSort:!1,sortProperty:"action"}];return(0,qt.jsxs)(qt.Fragment,{children:[(0,qt.jsx)(xje,{order:c,orderBy:u,setOrder:d,setOrderBy:p,searchText:h,setSearchText:m,dataParameter:"id",checkState:j,onCheck:e=>{if(Array.isArray(e))return _(e.map(e=>e.toString()));const t=e.target.name;j.includes(t)?_(j.filter(e=>e!==t)):_(e=>[...e,t])},isSelection:!1,nodata:GC,deviceHead:L,deviceList:v,fetchDevicesList:R,pageDetails:k,editButton:e=>(0,qt.jsx)(sy,{title:s("rpm_Edit"),children:(0,qt.jsx)(wh,{"data-id":e.id,color:"primary",onClick:()=>console.log(e),children:(0,qt.jsx)(fc,{fontSize:"small",sx:{width:16,height:16}})})}),viewButton:e=>(0,qt.jsx)(sy,{title:s("rpm_view"),children:(0,qt.jsx)(wh,{"data-id":e.id,color:"primary",onClick:()=>{},children:(0,qt.jsx)(gc,{fontSize:"small",sx:{width:16,height:16}})})}),deleteButton:e=>(0,qt.jsx)(sy,{title:s("rpm_Delete"),children:(0,qt.jsx)(wh,{"data-id":e.id,color:"error",onClick:()=>O(e),children:(0,qt.jsx)(xc,{fontSize:"small",sx:{width:16,height:16}})})}),attachDevice:C,handleAttachDevice:e=>{w(e)},freeDeviceList:y,actionAttachDevice:()=>{C&&!S?D(n.id,C):A(!0)},errDevice:S,setErrDevice:A,setSearchDevice:g,patientData:n,program:t}),(0,qt.jsx)(qV,{openModal:E.open,onCloseModal:O,actionFunction:()=>N(n.id,E.data.id),dataName:"",options:{primaryText:s("message:rpm_DeleteTitle"),secondaryText:s("message:rpm_DeleteBodyText"),btn:{primaryText:s("rpm_Delete"),secondaryText:s("rpm_Cancel"),primaryColor:"error",secondaryColor:"primary"},btnSwap:!0}})]})};var jje=n(10652),_je=n(71612),Cje=n(3156),wje=n(94329),Sje=n(36631),Aje=n(99604);function kje(e){let{allDiseaseList:t,familyDiseaseList:n,order:r,orderBy:o,setOrder:a,setOrderBy:s,dataParameter:l,familyDiseaseHead:c,checkState:d,onCheck:u,isSelection:p,nodata:h,fetchDiseaseList:m,pageDetails:f,editButton:g,closeButton:v,deleteButton:x,saveButton:y,fileUploadButton:b,downloadFile:j,fileModal:_,fileUploadIconButton:C,patientData:w,program:S}=e;const{t:A}=Vg(),k=Nt(),T=db(),E=(0,We.useRef)(null),M=(e,t,n)=>{const r=sa()(t).format("YYYY"),i=sa()(n).format("YYYY");return"CUSTOM"===e?"".concat(r," - ").concat(i):"PRESENT"===e?"".concat(r," - ").concat(e):void 0},O=[{name:A("rpm_RPM"),url:ld.DOCTOR.PROGRAM},{name:null===S||void 0===S?void 0:S.display_name,url:"".concat(ld.DOCTOR.PROGRAM,"/").concat(null===S||void 0===S?void 0:S.code,"/patients")},{name:"".concat((null===w||void 0===w?void 0:w.first_name)||""," ").concat((null===w||void 0===w?void 0:w.last_name)||""),url:"".concat(ld.DOCTOR.PROGRAM,"/").concat(null===S||void 0===S?void 0:S.code,"/patients/").concat(null===w||void 0===w?void 0:w.id,"/dashboard")},{name:A("rpm_FamilyMedicalHistory"),url:""}],R={diseaseList:null===n||void 0===n?void 0:n.map(e=>(0,i.A)((0,i.A)({},e),{},{duration:null===e||void 0===e?void 0:e.custom_duration}))},P=e=>{let{name:t,errors:n}=e;return(0,qt.jsxs)(op,{sx:{"& .MuiOutlinedInput-root":{background:"#ffffff"},"& .MuiOutlinedInput-input":{py:1.0625}},children:[(0,qt.jsx)(tH,{as:qj,fullWidth:!0,size:"small",id:t,name:t,variant:"outlined",placeholder:A("message:rpm_RemarkPlaceHolder"),endAdornment:(0,qt.jsx)(tw,{position:"end",children:(0,qt.jsx)(sy,{title:A("message:rpm_DiseaseRemarkHelp"),placement:"top",children:(0,qt.jsx)(wh,{size:"small",disableRipple:!0,sx:{p:0},children:(0,qt.jsx)(pM.A,{fontSize:"small"})})})})}),(0,qt.jsx)(dH,{name:t,children:e=>(0,qt.jsx)(v_,{error:!0,children:A(e,{field:A("rpm_Remark")})})}),(0,qt.jsx)(v_,{error:!0,children:n.remark})]})},D=e=>{let{name:n,diseaseName:r,setFieldValue:o,errors:a}=e;return(0,qt.jsxs)(op,{sx:{"& .MuiOutlinedInput-root":{background:"#ffffff"},"& .MuiOutlinedInput-input":{py:1.0625}},children:[(0,qt.jsx)(tH,{component:aj,fullWidth:!0,size:"small",id:n,name:n,variant:"outlined",value:r||null,options:t||[],filterOptions:(e,t)=>{const n=T(e,t),{inputValue:r}=t,i=e.some(e=>r===e.disease_name);return""===r||i||n.push({inputValue:r,disease_name:'Add "'.concat(r,'"')}),n},getOptionLabel:e=>"string"===typeof e?e:e.inputValue?e.inputValue:e.disease_name,renderOption:(e,t)=>(0,qt.jsx)(op,(0,i.A)((0,i.A)({component:"li"},e),{},{children:t.disease_name})),onChange:(e,t)=>{"string"===typeof t?o(n,t||""):t&&t.inputValue?o(n,t.inputValue?t.inputValue:""):o(n,null!==t&&void 0!==t&&t.disease_name?t.disease_name:"")},freeSolo:!0,renderInput:e=>(0,qt.jsx)(Q_,(0,i.A)((0,i.A)({},e),{},{placeholder:A("rpm_DiseaseName")}))}),(0,qt.jsx)(dH,{name:n,children:e=>(0,qt.jsx)(v_,{error:!0,children:A(e,{field:A("rpm_SelectDisease")})})}),(0,qt.jsx)(v_,{error:!0,children:A(a.disease_name,{field:A("rpm_DiseaseName")})})]})},N=e=>{let{name:t,data:n,setFieldValue:r,errors:o}=e;return(0,qt.jsx)(qt.Fragment,{children:"CUSTOM"===(null===n||void 0===n?void 0:n.duration_unit)||"PRESENT"===(null===n||void 0===n?void 0:n.duration_unit)?(0,qt.jsxs)(Ff,{container:!0,spacing:1,children:[(0,qt.jsx)(Ff,{item:!0,xs:5,children:(0,qt.jsxs)(op,{className:"pres_inputTab",sx:{"& .MuiOutlinedInput-input":{py:1.0625}},children:[(0,qt.jsx)(WM,{dateAdapter:DI,children:(0,qt.jsx)(tH,{as:fD,views:["year"],size:"small",label:"From",id:t.start_date,name:t.start_date,value:n.start_date,onChange:e=>r(t.start_date,e),renderInput:e=>(0,qt.jsx)(Q_,(0,i.A)((0,i.A)({},e),{},{onKeyDown:e=>{e.preventDefault()}})),maxDate:new Date})}),(0,qt.jsx)(v_,{error:!0,children:A(o.start_date,{field:A("rpm_From")})})]})}),(0,qt.jsxs)(Ff,{item:!0,xs:5,children:["CUSTOM"===(null===n||void 0===n?void 0:n.duration_unit)&&(0,qt.jsxs)(op,{className:"pres_inputTab",sx:{"& .MuiOutlinedInput-input":{py:1.0625}},children:[(0,qt.jsx)(WM,{dateAdapter:DI,children:(0,qt.jsx)(tH,{as:fD,views:["year"],size:"small",label:"To",id:t.end_date,name:t.end_date,value:n.end_date,onChange:e=>r(t.end_date,e),renderInput:e=>(0,qt.jsx)(Q_,(0,i.A)((0,i.A)({},e),{},{onKeyDown:e=>{e.preventDefault()}})),minDate:n.start_date?(()=>{const e=new Date(n.start_date),t=e.setFullYear(e.getFullYear()+1);return new Date(t)})(n.start_date):void 0,maxDate:new Date})}),(0,qt.jsx)(v_,{error:!0,children:A(o.end_date,{field:A("rpm_From")})})]}),"PRESENT"===(null===n||void 0===n?void 0:n.duration_unit)&&(0,qt.jsx)(op,{sx:{"& .MuiOutlinedInput-root":{background:"#ffffff"},"& .MuiOutlinedInput-input":{py:1.0625}},children:(0,qt.jsx)(tH,{as:G_,fullWidth:!0,size:"small",id:null===t||void 0===t?void 0:t.unit,name:null===t||void 0===t?void 0:t.unit,value:null===n||void 0===n?void 0:n.duration_unit,variant:"outlined",endAdornment:(0,qt.jsx)(tw,{position:"end",sx:{position:"absolute",right:"28px"},children:(0,qt.jsx)(sy,{title:A("message:rpm_DiseaseDurationHelp"),placement:"top",children:(0,qt.jsx)(wh,{size:"small",disableRipple:!0,sx:{p:0},children:(0,qt.jsx)(pM.A,{fontSize:"small"})})})}),children:null===Sd||void 0===Sd?void 0:Sd.map(e=>(0,qt.jsx)(mf,{value:e.value,children:A("rpm_".concat(e.name))},e.value))})})]}),(0,qt.jsx)(Ff,{item:!0,children:(0,qt.jsx)(sy,{title:A("rpm_Close"),children:(0,qt.jsx)(wh,{color:"error",onClick:()=>r(t.unit,""),children:(0,qt.jsx)(_je.A,{fontSize:"small",sx:{width:16,height:16}})})})})]}):(0,qt.jsxs)(Ff,{container:!0,spacing:1,children:[(0,qt.jsx)(Ff,{item:!0,xs:6,children:(0,qt.jsxs)(op,{className:"hide_num_arrow",sx:{"& .MuiOutlinedInput-root":{background:"#ffffff"},"& .MuiOutlinedInput-input":{py:1.0625}},children:[(0,qt.jsx)(tH,{as:qj,fullWidth:!0,size:"small",id:t.value,name:t.value,variant:"outlined",type:"number",placeholder:A("message:rpm_DurationValuePlaceHolder"),endAdornment:(0,qt.jsx)(tw,{position:"end",children:(0,qt.jsx)(sy,{title:A("message:rpm_DurationValueHelp"),placement:"top",children:(0,qt.jsx)(wh,{size:"small",disableRipple:!0,sx:{p:0},children:(0,qt.jsx)(pM.A,{fontSize:"small"})})})})}),(0,qt.jsx)(dH,{name:t.value,children:e=>(0,qt.jsx)(v_,{error:!0,children:A(e,{field:A("rpm_Duration")})})}),(0,qt.jsx)(v_,{error:!0,children:o.duration})]})}),(0,qt.jsx)(Ff,{item:!0,xs:6,children:(0,qt.jsxs)(op,{sx:{"& .MuiOutlinedInput-root":{background:"#ffffff"},"& .MuiOutlinedInput-input":{py:1.0625}},children:[(0,qt.jsx)(tH,{as:G_,fullWidth:!0,size:"small",id:null===t||void 0===t?void 0:t.unit,name:null===t||void 0===t?void 0:t.unit,value:null===n||void 0===n?void 0:n.duration_unit,variant:"outlined",endAdornment:(0,qt.jsx)(tw,{position:"end",sx:{position:"absolute",right:"28px"},children:(0,qt.jsx)(sy,{title:A("message:rpm_DiseaseDurationHelp"),placement:"top",children:(0,qt.jsx)(wh,{size:"small",disableRipple:!0,sx:{p:0},children:(0,qt.jsx)(pM.A,{fontSize:"small"})})})}),children:null===Sd||void 0===Sd?void 0:Sd.map(e=>(0,qt.jsx)(mf,{value:e.value,children:A("rpm_".concat(e.name))},e.value))}),(0,qt.jsx)(dH,{name:null===t||void 0===t?void 0:t.unit,children:e=>(0,qt.jsx)(v_,{error:!0,children:A(e,{field:A("rpm_Duration")})})})]})})]})})},L=e=>{let{name:t,errors:n}=e;return(0,qt.jsxs)(op,{sx:{"& .MuiOutlinedInput-root":{background:"#ffffff"},"& .MuiOutlinedInput-input":{py:1.0625}},children:[(0,qt.jsx)(tH,{as:G_,fullWidth:!0,size:"small",id:t,name:t,variant:"outlined",endAdornment:(0,qt.jsx)(tw,{position:"end",sx:{position:"absolute",right:"28px"},children:(0,qt.jsx)(sy,{title:A("message:rpm_DiseaseRelationHelp"),placement:"top",children:(0,qt.jsx)(wh,{size:"small",disableRipple:!0,sx:{p:0},children:(0,qt.jsx)(pM.A,{fontSize:"small"})})})}),children:null===Ed||void 0===Ed?void 0:Ed.map(e=>(0,qt.jsx)(mf,{value:e,children:A("rpm_".concat(e))},e))}),(0,qt.jsx)(dH,{name:t,children:e=>(0,qt.jsx)(v_,{error:!0,children:A(e,{field:A("rpm_Relation")})})}),(0,qt.jsx)(v_,{error:!0,children:A(null===n||void 0===n?void 0:n.relationship,{field:A("rpm_Relation")})})]})},I=e=>{var t,n,r,i;let{diseaseObj:o}=e;const[a,s]=We.useState(2),l=e=>{const t=null===e||void 0===e?void 0:e.split("/");return t[(null===t||void 0===t?void 0:t.length)-1]};return(0,qt.jsxs)(qt.Fragment,{children:[null===o||void 0===o||null===(t=o.files)||void 0===t||null===(n=t.slice(0,a))||void 0===n?void 0:n.map(e=>(0,qt.jsx)(Eb,{sx:{ml:1,mb:1},"data-id":e.id,icon:(0,qt.jsx)(Aje.A,{fontSize:"small"}),label:l(e.file_name),variant:"outlined",onDelete:()=>j(e),deleteIcon:(0,qt.jsx)(Sje.A,{color:"primary"})},e.id)),(null===o||void 0===o||null===(r=o.files)||void 0===r?void 0:r.length)>2&&(0,qt.jsx)(sy,{title:(null===o||void 0===o||null===(i=o.files)||void 0===i?void 0:i.length)===a?A("rpm_Less"):A("rpm_ShowMore"),children:(0,qt.jsx)(wh,{disableRipple:!0,size:"small",onClick:()=>{var e,t;a===(null===o||void 0===o||null===(e=o.files)||void 0===e?void 0:e.length)?s(2):s(null===o||void 0===o||null===(t=o.files)||void 0===t?void 0:t.length)},children:"..."})})]})},F=e=>{let{remark:t}=e;const[n,r]=We.useState(150);return(0,qt.jsxs)(qt.Fragment,{children:[null===t||void 0===t?void 0:t.substring(0,n),(null===t||void 0===t?void 0:t.length)>150&&(0,qt.jsx)(sy,{title:(null===t||void 0===t?void 0:t.length)===n?A("rpm_Less"):A("rpm_ShowMore"),children:(0,qt.jsx)(wh,{disableRipple:!0,size:"small",onClick:()=>{n===(null===t||void 0===t?void 0:t.length)?r(150):r(null===t||void 0===t?void 0:t.length)},children:"..."})})]})},$=()=>{var e,t,n,r,i,o,a;return!cs(null===_||void 0===_||null===(e=_.data)||void 0===e||null===(t=e.local_files)||void 0===t||null===(n=t.local)||void 0===n?void 0:n.files)&&(null===_||void 0===_||null===(r=_.data)||void 0===r||null===(i=r.local_files)||void 0===i||null===(o=i.local)||void 0===o||null===(a=o.files)||void 0===a?void 0:a.map((e,t)=>(0,qt.jsx)(Eb,{sx:{ml:1,mb:1},icon:(0,qt.jsx)(Aje.A,{fontSize:"small"}),label:null===e||void 0===e?void 0:e.name,variant:"outlined"},t)))};return We.useEffect(()=>{const e={breadcrumb:O};cs(S)||cs(w)||k(NC(e))},[S,w]),(0,qt.jsx)(qt.Fragment,{children:(0,qt.jsx)(op,{sx:{width:"100%"},position:"relative",children:(0,qt.jsx)(Ff,{container:!0,spacing:2.5,children:(0,qt.jsxs)(Ff,{item:!0,xs:12,children:[(0,qt.jsx)(Kz,{initialValues:cs(null===R||void 0===R?void 0:R.diseaseList)?{diseaseList:[]}:R,enableReinitialize:!0,children:e=>{var t,n;let{values:i,setFieldValue:j,setErrors:w,errors:k}=e;return(0,qt.jsxs)(qt.Fragment,{children:[(0,qt.jsx)(op,{sx:{mb:2.5},children:(0,qt.jsxs)(Ff,{container:!0,spacing:2,alignItems:"center",children:[(0,qt.jsxs)(Ff,{item:!0,xs:!0,children:[(0,qt.jsx)(op,{sx:{display:{xs:"block",sm:"none"}},position:"absolute",left:"40px",top:"-28px",children:(0,qt.jsx)(Cf,{variant:"h6",component:"h6",children:A("rpm_FamilyMedicalHistory")})}),(0,qt.jsx)(op,{sx:{display:{xs:"none",sm:"block"}},children:(0,qt.jsx)(Cf,{variant:"h5",component:"h5",children:A("rpm_FamilyMedicalHistory")})})]}),(0,qt.jsx)(Ff,{item:!0,sx:{display:"none"},children:(0,qt.jsx)(xh,{variant:"contained",color:"primary",disableElevation:!0,disabled:null===i||void 0===i||null===(t=i.diseaseList)||void 0===t||null===(n=t.find(e=>null===e||void 0===e?void 0:e.isEdit))||void 0===n?void 0:n.isEdit,onClick:()=>E.current.push({disease_name:"",duration:"",duration_unit:"",start_date:null,end_date:null,remark:"",reports:"",isEdit:!0}),children:A("rpm_AddDisease")})})]})}),(0,qt.jsx)(nH,{children:(0,qt.jsx)(op,{children:(0,qt.jsx)(UT,{order:r,orderBy:o,setOrder:a,setOrderBy:s,data:cs(null===i||void 0===i?void 0:i.diseaseList)?[{}]:null===i||void 0===i?void 0:i.diseaseList,headCells:c,dataParameter:l,selected:d,setSelected:u,isSelection:p,noDataImage:h,fetchList:m,pageDetails:f,skeletonVrows:6,className:"theme_scroll",children:(0,qt.jsx)(lH,{name:"diseaseList",children:e=>{var t,n,r,o,a;return E.current=e,(0,qt.jsx)(qt.Fragment,{children:cs(null===i||void 0===i?void 0:i.diseaseList)?(0,qt.jsx)(qt.Fragment,{children:(0,qt.jsx)(cw,{children:(0,qt.jsxs)(gw,{colSpan:6,style:{textAlign:"center"},children:[(0,qt.jsx)("img",{src:h,style:{display:"block",margin:"auto"}}),(null===S||void 0===S||null===(n=S.permissions)||void 0===n?void 0:n.showAddMedicalHistoryBtn)&&(0,qt.jsxs)(xh,{variant:"contained",color:"primary",disableElevation:!0,className:(null===S||void 0===S||null===(r=S.permissions)||void 0===r?void 0:r.showAddMedicalHistoryBtn)&&"fmedicalHistory-tour-step0",disabled:null===i||void 0===i||null===(o=i.diseaseList)||void 0===o||null===(a=o.find(e=>null===e||void 0===e?void 0:e.isEdit))||void 0===a?void 0:a.isEdit,onClick:()=>e.push({disease_name:"",duration:"",duration_unit:"",start_date:null,end_date:null,remark:"",reports:"",isEdit:!0}),children:[(0,qt.jsx)(jue.A,{}),A("rpm_AddNewDisease")]})]})})}):null===i||void 0===i||null===(t=i.diseaseList)||void 0===t?void 0:t.map((t,n)=>{var r,o,a,s,l,c,d,u,p;return(0,qt.jsxs)(We.Fragment,{children:[(0,qt.jsxs)(cw,{sx:{"&:last-child td, &:last-child th":{border:0}},children:[(0,qt.jsx)(gw,{sx:{minWidth:150},children:null!==t&&void 0!==t&&t.isEdit?(0,qt.jsx)(L,{name:"diseaseList.".concat(n,".relationship"),errors:k}):null!==t&&void 0!==t&&t.relationship?null===t||void 0===t?void 0:t.relationship:"NA"}),(0,qt.jsx)(gw,{sx:{minWidth:250},children:null!==t&&void 0!==t&&t.isEdit?(0,qt.jsx)(D,{diseaseName:t,name:"diseaseList.".concat(n,".disease_name"),setFieldValue:j,errors:k}):null===t||void 0===t?void 0:t.disease_name}),(0,qt.jsx)(gw,{sx:{minWidth:"CUSTOM"===(null===t||void 0===t?void 0:t.duration_unit)?350:250},children:null!==t&&void 0!==t&&t.isEdit?(0,qt.jsx)(N,{errors:k,data:t,setFieldValue:j,name:{value:"diseaseList.".concat(n,".duration"),unit:"diseaseList.".concat(n,".duration_unit"),start_date:"diseaseList.".concat(n,".start_date"),end_date:"diseaseList.".concat(n,".end_date")}}):(0,qt.jsx)(qt.Fragment,{children:t.custom_duration?t.custom_duration+" "+(null===t||void 0===t?void 0:t.duration_unit):M(t.duration_unit,null===t||void 0===t?void 0:t.start_date,t.end_date)})}),(0,qt.jsx)(gw,{sx:{minWidth:250,whiteSpace:"normal"},children:null!==t&&void 0!==t&&t.isEdit?(0,qt.jsx)(P,{name:"diseaseList.".concat(n,".remark"),errors:k}):null!==t&&void 0!==t&&t.remark?(0,qt.jsx)(F,{remark:null===t||void 0===t?void 0:t.remark}):"NA"}),(0,qt.jsx)(gw,{sx:{minWidth:250,whiteSpace:"normal"},children:null!==t&&void 0!==t&&t.isEdit?(0,qt.jsxs)(qt.Fragment,{children:[(0,qt.jsx)($,{}),cs(null===_||void 0===_||null===(r=_.data)||void 0===r||null===(o=r.local_files)||void 0===o||null===(a=o.local)||void 0===a?void 0:a.files)?b("diseaseList.".concat(n,".reports"),t):C("diseaseList.".concat(n,".reports"),t)]}):(0,qt.jsx)(I,{diseaseObj:t})}),(0,qt.jsx)(gw,{children:null!==t&&void 0!==t&&t.isEdit?(0,qt.jsxs)(qt.Fragment,{children:[y(t,{setErrors:w}),v(t,e.remove,n)]}):(0,qt.jsxs)(qt.Fragment,{children:[(null===S||void 0===S||null===(s=S.permissions)||void 0===s?void 0:s.showEditMedicalHistoryBtn)&&g(t),(null===S||void 0===S||null===(l=S.permissions)||void 0===l?void 0:l.showDeleteMedicalHistoryBtn)&&x(t)]})})]}),(null===S||void 0===S||null===(c=S.permissions)||void 0===c?void 0:c.showAddMedicalHistoryBtn)&&(null===i||void 0===i||null===(d=i.diseaseList)||void 0===d?void 0:d.length)-1===n&&(0,qt.jsx)(cw,{children:(0,qt.jsx)(gw,{colSpan:5,children:(0,qt.jsxs)(xh,{variant:"contained",color:"primary",disableElevation:!0,disabled:null===i||void 0===i||null===(u=i.diseaseList)||void 0===u||null===(p=u.find(e=>null===e||void 0===e?void 0:e.isEdit))||void 0===p?void 0:p.isEdit,onClick:()=>e.push({disease_name:"",duration:"",duration_unit:"",start_date:null,end_date:null,remark:"",reports:"",isEdit:!0}),children:[(0,qt.jsx)(jue.A,{}),A("rpm_AddNewDisease")]})})})]},n)})})}})})})})]})}},"addMedicalHistory_formik"),(0,qt.jsx)(op,{sx:e=>({pr:2,bgcolor:e.palette.common.white}),children:(0,qt.jsx)(KE,{pageDetails:f,fetchListFunction:m})})]})})})})}kje.defaultProps={allDiseaseList:[],familyDiseaseHead:[],pageDetails:{},order:"",orderBy:"",setOrder:()=>{},setOrderBy:()=>{},dataParameter:"",checkState:"",onCheck:()=>{},isSelection:"",nodata:"",familyDiseaseList:[],otherDiseaseList:[],fetchDiseaseList:()=>{},editButton:()=>{},viewButton:()=>{},deleteButton:()=>{},isEdit:!1,saveButton:()=>{},fileUploadButton:()=>{},editRow:[],closeButton:()=>{},otherHistory:{},downloadFile:()=>{},fileModal:{},fileUploadIconButton:()=>{},patientData:{},program:{}};const Tje=kje;var Eje=n(99641);function Mje(e){return(0,sr.Ay)("MuiAlertTitle",e)}(0,ar.A)("MuiAlertTitle",["root"]);const Oje=["className"],Rje=(0,Vn.Ay)(Cf,{name:"MuiAlertTitle",slot:"Root",overridesResolver:(e,t)=>t.root})(e=>{let{theme:t}=e;return{fontWeight:t.typography.fontWeightMedium,marginTop:-2}}),Pje=We.forwardRef(function(e,t){const n=(0,$t.b)({props:e,name:"MuiAlertTitle"}),{className:r}=n,i=(0,nn.A)(n,Oje),o=n,a=(e=>{const{classes:t}=e;return(0,ir.A)({root:["root"]},Mje,t)})(o);return(0,qt.jsx)(Rje,(0,Ft.A)({gutterBottom:!0,component:"div",ownerState:o,ref:t,className:(0,nr.A)(a.root,r)},i))}),Dje=Pje;const Nje=function(e){var t,n,r,i,o,a,s,l,c,d;let{openModal:u,onCloseModal:p,onFileUpload:h,onLocalFileDelete:m,fileModal:f,actionFunction:g,onCloudFilesDelete:v}=e;const{t:x}=Vg(),y=e=>{const t=null===e||void 0===e?void 0:e.split("/");return t[(null===t||void 0===t?void 0:t.length)-1]};return(0,qt.jsxs)(cC,{fullWidth:!0,maxWidth:"sm",open:u,onClose:p,scroll:"paper",children:[(0,qt.jsx)(fC,{children:x("rpm_AddReports")}),(0,qt.jsxs)(bC,{children:[(0,qt.jsxs)(Ff,{container:!0,spacing:2,children:[(0,qt.jsx)(Ff,{item:!0,xs:12,md:6,children:(0,qt.jsxs)(op,{sx:{p:2,py:6,borderRadius:1,textAlign:"center",border:"1px dashed #818181"},children:[(0,qt.jsxs)(op,{mb:3,children:[(0,qt.jsx)(Eje.A,{sx:{color:"grey.400",fontSize:"h3.fontSize"}}),(0,qt.jsx)(Cf,{variant:"body1",fontWeight:500,sx:{color:"grey.500"},children:x("rpm_AddReportsHere")})]}),(0,qt.jsx)(op,{children:(0,qt.jsx)("label",{htmlFor:"file",children:(0,qt.jsxs)(xh,{startIcon:(0,qt.jsx)(jje.A,{}),variant:"contained",color:"primary",component:"span",size:"large",disableElevation:!0,children:[(0,qt.jsx)("input",{multiple:!0,type:"file",id:"file",style:{display:"none"},autoFocus:!0,onChange:h}),x("rpm_ChooseFile")]})})})]})}),(0,qt.jsxs)(Ff,{item:!0,xs:12,md:6,children:[!cs(null===f||void 0===f||null===(t=f.data)||void 0===t?void 0:t.files)&&(0,qt.jsx)(qt.Fragment,{children:null===f||void 0===f||null===(n=f.data)||void 0===n||null===(r=n.files)||void 0===r?void 0:r.map((e,t)=>(0,qt.jsxs)(dM,{"data-index":t,"data-id":null===e||void 0===e?void 0:e.id,icon:(0,qt.jsx)(Aje.A,{fontSize:"large"}),onClose:()=>v(null===f||void 0===f?void 0:f.data,null===e||void 0===e?void 0:e.id,t),sx:{mb:1.5,color:"primary.theme.900",backgroundColor:"primary.theme.50","& .MuiAlert-icon":{color:"primary.main"}},children:[(0,qt.jsx)(Dje,{title:y(null===e||void 0===e?void 0:e.file_name),sx:{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:y(null===e||void 0===e?void 0:e.file_name)}),(0,qt.jsx)(op,{children:"Uploaded"})]},t))}),!cs(null===f||void 0===f||null===(i=f.data)||void 0===i||null===(o=i.local_files)||void 0===o||null===(a=o.local)||void 0===a?void 0:a.files)&&(0,qt.jsx)(eg,{sx:{mb:2}}),null===f||void 0===f||null===(s=f.data)||void 0===s||null===(l=s.local_files)||void 0===l||null===(c=l.local)||void 0===c||null===(d=c.files)||void 0===d?void 0:d.map((e,t)=>(0,qt.jsxs)(dM,{"data-index":t,"data-id":null===e||void 0===e?void 0:e.id,icon:(0,qt.jsx)(Aje.A,{fontSize:"large"}),onClose:()=>m(t),sx:{mb:1.5,color:"primary.theme.900",backgroundColor:"primary.theme.50","& .MuiAlert-icon":{color:"primary.main"}},children:[(0,qt.jsx)(Dje,{className:"text-clamp-1",children:null===e||void 0===e?void 0:e.name}),(0,qt.jsxs)("strong",{children:[Math.ceil((null===e||void 0===e?void 0:e.size)/1024),"KB"]})]},t))]})]}),(0,qt.jsx)(op,{mt:2.5,children:(0,qt.jsxs)(Ff,{container:!0,spacing:2,children:[(0,qt.jsx)(Ff,{item:!0,children:(0,qt.jsx)(xh,{variant:"outlined",color:"primary",disableElevation:!0,onClick:p,children:x("rpm_Cancel")})}),(0,qt.jsx)(Ff,{item:!0,children:(0,qt.jsx)(xh,{variant:"contained",color:"primary",disableElevation:!0,onClick:g,children:x("rpm_Submit")})})]})})]})]})},Lje=["children","onClose"];const Ije=function(e){var t,n,r,o,a,s,l,c,d,u;let{openModal:p,onCloseModal:h,onFileUpload:m,onLocalFileDelete:f,fileModal:g,actionFunction:v,onCloudFilesDelete:x}=e;const{t:y}=Vg(),b=e=>{const{children:t,onClose:n}=e,r=Ko(e,Lje);return(0,qt.jsxs)(fC,(0,i.A)((0,i.A)({sx:{m:0,p:2}},r),{},{className:"helloworld",children:[t,n?(0,qt.jsx)(wh,{"aria-label":"close",onClick:n,sx:{position:"absolute",right:8,top:5,color:e=>e.palette.grey[500]},children:(0,qt.jsx)(J_.A,{})}):null]}))},j=e=>{const t=null===e||void 0===e?void 0:e.split("/");return t[(null===t||void 0===t?void 0:t.length)-1]};return(0,qt.jsxs)(cC,{fullWidth:!0,maxWidth:"sm",open:p,onClose:h,scroll:"paper",children:[(0,qt.jsx)(b,{sx:{padding:"12px 16px",fontSize:"16px"},onClose:h,children:(0,qt.jsx)(fC,{sx:{fontSize:"16px",padding:"0"},children:y("rpm_AddReports")})}),(0,qt.jsxs)(bC,{sx:{padding:"20px 16px"},children:[(0,qt.jsx)(op,{sx:{py:1,textAlign:"center",border:"3px dashed #efefef",borderRadius:"4px"},children:(0,qt.jsxs)(op,{display:"flex",flexDirection:"column",alignItems:"center",children:[(0,qt.jsx)(jje.A,{sx:{color:"#5363bd",fontSize:"h3.fontSize"}}),(0,qt.jsx)("label",{htmlFor:"file",children:(0,qt.jsxs)(xh,{startIcon:(0,qt.jsx)(Jxe.A,{}),component:"span",size:"large",disableElevation:!0,children:[(0,qt.jsx)("input",{multiple:!0,type:"file",id:"file",style:{display:"none"},autoFocus:!0,onChange:m}),y("rpm_AddReportsHere")]})})]})}),(0,qt.jsxs)(op,{children:[!cs(null===g||void 0===g||null===(t=g.data)||void 0===t?void 0:t.files)&&(0,qt.jsx)(qt.Fragment,{children:null===g||void 0===g||null===(n=g.data)||void 0===n||null===(r=n.files)||void 0===r?void 0:r.map((e,t)=>(0,qt.jsxs)(dM,{"data-index":t,"data-id":null===e||void 0===e?void 0:e.id,icon:(0,qt.jsx)(Aje.A,{fontSize:"small"}),onClose:()=>x(null===g||void 0===g?void 0:g.data,null===e||void 0===e?void 0:e.id,t),sx:{mb:1.5,color:"primary.theme.900",backgroundColor:"primary.theme.50","& .MuiAlert-icon":{color:"primary.main"}},children:[(0,qt.jsx)(Dje,{title:j(null===e||void 0===e?void 0:e.file_name),sx:{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:j(null===e||void 0===e?void 0:e.file_name)}),(0,qt.jsx)(op,{children:"Uploaded"})]},t))}),!cs(null===g||void 0===g||null===(o=g.data)||void 0===o||null===(a=o.local_files)||void 0===a||null===(s=a.local)||void 0===s?void 0:s.files)&&(0,qt.jsx)(eg,{sx:{mb:.2}}),null===g||void 0===g||null===(l=g.data)||void 0===l||null===(c=l.local_files)||void 0===c||null===(d=c.local)||void 0===d||null===(u=d.files)||void 0===u?void 0:u.map((e,t)=>(0,qt.jsxs)(dM,{"data-index":t,"data-id":null===e||void 0===e?void 0:e.id,icon:(0,qt.jsx)(Aje.A,{fontSize:"small",sx:{marginRight:"0"}}),onClose:()=>f(t),sx:{mb:1.5,color:"primary.theme.900",backgroundColor:"primary.theme.50","& .MuiAlert-icon":{color:"primary.main"}},children:[(0,qt.jsx)(Dje,{sx:{fontSize:"12px"},children:null===e||void 0===e?void 0:e.name}),(0,qt.jsxs)("strong",{children:[Math.ceil((null===e||void 0===e?void 0:e.size)/1024),"KB"]})]},t))]}),(0,qt.jsxs)(op,{mt:2.5,children:[(0,qt.jsx)(xh,{variant:"contained",color:"primary",disableElevation:!0,onClick:v,sx:{marginRight:"8px"},children:y("rpm_Submit")}),(0,qt.jsx)(xh,{variant:"outlined",color:"primary",disableElevation:!0,onClick:h,children:y("rpm_Cancel")})]})]})]})};var Fje=n(56559);const $je=["children","onClose"],Bje=e=>{const{children:t,onClose:n}=e,r=Ko(e,$je);return(0,qt.jsxs)(fC,(0,i.A)((0,i.A)({sx:{m:0,p:2}},r),{},{className:"helloworld",children:[t,n?(0,qt.jsx)(wh,{"aria-label":"close",onClick:n,sx:{position:"absolute",right:8,top:5,color:e=>e.palette.grey[500]},children:(0,qt.jsx)(J_.A,{})}):null]}))};function zje(e){let{dataName:t,actionFunction:n,openModal:r,onCloseModal:i,options:o,children:a}=e;return(0,qt.jsx)(We.Fragment,{children:(0,qt.jsxs)(cC,{fullWidth:!0,maxWidth:"sm",open:r,onClose:i,children:[(0,qt.jsx)(Bje,{sx:{padding:"12px 16px",fontSize:"16px"},onClose:i,children:(0,qt.jsxs)(op,{display:"flex",children:[(0,qt.jsx)(Fje.A,{color:"error",sx:{marginRight:"5px",width:"16px"}}),o.primaryText,t&&(0,qt.jsx)(Cf,{component:"p",variant:"subtitle2",fontSize:"14px",children:"(".concat(t,")")})]})}),(0,qt.jsx)(eg,{}),(0,qt.jsx)(bC,{sx:{padding:"12px 16px"},children:a?a({dataName:t,actionFunction:n,openModal:r,onCloseModal:i,options:o}):(0,qt.jsxs)(qt.Fragment,{children:[(0,qt.jsxs)(qt.Fragment,{children:[(0,qt.jsx)(Cf,{component:"p",variant:"h6",fontSize:"14px",children:o.secondaryText}),o.descText&&(0,qt.jsx)(Cf,{component:"p",variant:"body1",fontSize:"14px",children:o.descText})]}),(0,qt.jsx)(op,{mt:2.5,children:(0,qt.jsxs)(op,{direction:o.btnSwap?"row-reverse":"row",children:[(0,qt.jsx)(xh,{color:o.btn.secondaryColor,variant:"outlined",onClick:i,children:o.btn.secondaryText})," ",(0,qt.jsx)(xh,{color:o.btn.primaryColor,disableElevation:!0,variant:"contained",onClick:n,children:o.btn.primaryText})]})})]})})]})})}function Hje(e){let{allDiseaseList:t,familyDiseaseList:n,editIcon:r,closeButtonMobile:o,deleteButtonIcon:a,saveButtonMobile:s,fileUploadButton:l,downloadFile:c,fileModal:d,fileUploadIconButton:u,patientData:p,program:h,nodata:m}=e;const f=zT({labelAnswers:{fontSize:"16px !important"},titles:{fontSize:"14px !important",color:"#7986cb",fontWeight:"600 !important",letterSpacing:"0.02em"},familyDiseasebutton:{"& .MuiButtonBase-root":{textAlign:"center",marginBottom:"16px",background:"#e8eaf6",padding:"5px 10px",boxShadow:"0px 2px 1px -1px rgba(0,0,0,0.2),0px 1px 1px 0px rgba(0,0,0,0.14),0px 1px 3px 0px rgba(0,0,0,0.12)",borderRadius:"4px",border:"1px solid #3f51b5",display:"flex",alignItems:"center",justifyContent:"center",width:"100%",marginTop:"10px"}}})(),{t:g}=Vg(),v=Nt(),x=db(),y=(0,We.useRef)(null),b=(e,t,n)=>{const r=sa()(t).format("YYYY"),i=sa()(n).format("YYYY");return"CUSTOM"===e?"".concat(r," - ").concat(i):"PRESENT"===e?"".concat(r," - ").concat(e):void 0},j=[{name:g("rpm_RPM"),url:ld.DOCTOR.PROGRAM},{name:null===h||void 0===h?void 0:h.display_name,url:"".concat(ld.DOCTOR.PROGRAM,"/").concat(null===h||void 0===h?void 0:h.code,"/patients")},{name:"".concat((null===p||void 0===p?void 0:p.first_name)||""," ").concat((null===p||void 0===p?void 0:p.last_name)||""),url:"".concat(ld.DOCTOR.PROGRAM,"/").concat(null===h||void 0===h?void 0:h.code,"/patients/").concat(null===p||void 0===p?void 0:p.id,"/dashboard")},{name:g("rpm_FamilyMedicalHistory"),url:""}],_={diseaseList:null===n||void 0===n?void 0:n.map(e=>(0,i.A)((0,i.A)({},e),{},{duration:null===e||void 0===e?void 0:e.custom_duration}))},C=e=>{let{name:t,errors:n}=e;return(0,qt.jsxs)(op,{sx:{"& .MuiOutlinedInput-root":{background:"#ffffff"},"& .MuiOutlinedInput-input":{py:1.0625},"& .MuiInputAdornment-root":{right:"15px !important"}},className:f.editHistoryColum,children:[(0,qt.jsx)(tH,{as:qj,fullWidth:!0,size:"small",id:t,name:t,variant:"outlined",placeholder:g("message:rpm_RemarkPlaceHolder"),endAdornment:(0,qt.jsx)(tw,{position:"end",children:(0,qt.jsx)(sy,{title:g("message:rpm_DiseaseRemarkHelp"),placement:"top",children:(0,qt.jsx)(wh,{size:"small",disableRipple:!0,className:"helpIconButton",children:(0,qt.jsx)(pM.A,{fontSize:"small"})})})})}),(0,qt.jsx)(dH,{name:t,children:e=>(0,qt.jsx)(v_,{error:!0,children:g(e,{field:g("rpm_Remark")})})}),(0,qt.jsx)(v_,{error:!0,children:n.remark})]})},w=e=>{let{name:n,diseaseName:r,setFieldValue:o,errors:a}=e;return(0,qt.jsxs)(op,{sx:{"& .MuiOutlinedInput-root":{background:"#ffffff"},"& .MuiOutlinedInput-input":{py:1.0625}},children:[(0,qt.jsx)(tH,{component:aj,fullWidth:!0,size:"small",id:n,name:n,variant:"outlined",value:r||null,options:t||[],filterOptions:(e,t)=>{const n=x(e,t),{inputValue:r}=t,i=e.some(e=>r===e.disease_name);return""===r||i||n.push({inputValue:r,disease_name:'Add "'.concat(r,'"')}),n},getOptionLabel:e=>"string"===typeof e?e:e.inputValue?e.inputValue:e.disease_name,renderOption:(e,t)=>(0,qt.jsx)(op,(0,i.A)((0,i.A)({component:"li"},e),{},{children:t.disease_name})),onChange:(e,t)=>{"string"===typeof t?o(n,t||""):t&&t.inputValue?o(n,t.inputValue?t.inputValue:""):o(n,null!==t&&void 0!==t&&t.disease_name?t.disease_name:"")},freeSolo:!0,renderInput:e=>(0,qt.jsx)(Q_,(0,i.A)((0,i.A)({},e),{},{placeholder:g("rpm_DiseaseName")}))}),(0,qt.jsx)(dH,{name:n,children:e=>(0,qt.jsx)(v_,{error:!0,children:g(e,{field:g("rpm_SelectDisease")})})}),(0,qt.jsx)(v_,{error:!0,children:g(a.disease_name,{field:g("rpm_DiseaseName")})})]})},S=e=>{let{name:t,data:n,setFieldValue:r,errors:o}=e;return(0,qt.jsx)(qt.Fragment,{children:"CUSTOM"===(null===n||void 0===n?void 0:n.duration_unit)||"PRESENT"===(null===n||void 0===n?void 0:n.duration_unit)?(0,qt.jsxs)(Ff,{container:!0,spacing:1,children:[(0,qt.jsx)(Ff,{item:!0,xs:5,children:(0,qt.jsxs)(op,{className:"pres_inputTab",sx:{"& .MuiOutlinedInput-input":{py:1.0625}},children:[(0,qt.jsx)(WM,{dateAdapter:DI,children:(0,qt.jsx)(tH,{as:fD,views:["year"],size:"small",label:"From",id:t.start_date,name:t.start_date,value:n.start_date,onChange:e=>r(t.start_date,e),renderInput:e=>(0,qt.jsx)(Q_,(0,i.A)((0,i.A)({},e),{},{onKeyDown:e=>{e.preventDefault()}})),maxDate:new Date})}),(0,qt.jsx)(v_,{error:!0,children:g(o.start_date,{field:g("rpm_From")})})]})}),(0,qt.jsxs)(Ff,{item:!0,xs:5,children:["CUSTOM"===(null===n||void 0===n?void 0:n.duration_unit)&&(0,qt.jsxs)(op,{className:"pres_inputTab",sx:{"& .MuiOutlinedInput-input":{py:1.0625}},children:[(0,qt.jsx)(WM,{dateAdapter:DI,children:(0,qt.jsx)(tH,{as:fD,views:["year"],size:"small",label:"To",id:t.end_date,name:t.end_date,value:n.end_date,onChange:e=>r(t.end_date,e),renderInput:e=>(0,qt.jsx)(Q_,(0,i.A)((0,i.A)({},e),{},{onKeyDown:e=>{e.preventDefault()}})),minDate:n.start_date?(()=>{const e=new Date(n.start_date),t=e.setFullYear(e.getFullYear()+1);return new Date(t)})(n.start_date):void 0,maxDate:new Date})}),(0,qt.jsx)(v_,{error:!0,children:g(o.end_date,{field:g("rpm_From")})})]}),"PRESENT"===(null===n||void 0===n?void 0:n.duration_unit)&&(0,qt.jsx)(op,{sx:{"& .MuiOutlinedInput-root":{background:"#ffffff"},"& .MuiOutlinedInput-input":{py:1.0625}},children:(0,qt.jsx)(tH,{as:G_,fullWidth:!0,size:"small",id:null===t||void 0===t?void 0:t.unit,name:null===t||void 0===t?void 0:t.unit,value:null===n||void 0===n?void 0:n.duration_unit,variant:"outlined",endAdornment:(0,qt.jsx)(tw,{position:"end",sx:{position:"absolute",right:"28px"},children:(0,qt.jsx)(sy,{title:g("message:rpm_DiseaseDurationHelp"),placement:"top",children:(0,qt.jsx)(wh,{size:"small",disableRipple:!0,sx:{p:0},children:(0,qt.jsx)(pM.A,{fontSize:"small"})})})}),children:null===Sd||void 0===Sd?void 0:Sd.map(e=>(0,qt.jsx)(mf,{value:e.value,children:g("rpm_".concat(e.name))},e.value))})})]}),(0,qt.jsx)(Ff,{item:!0,children:(0,qt.jsx)(sy,{title:g("rpm_Close"),children:(0,qt.jsx)(wh,{color:"error",onClick:()=>r(t.unit,""),children:(0,qt.jsx)(_je.A,{fontSize:"small",sx:{width:16,height:16}})})})})]}):(0,qt.jsxs)(Ff,{container:!0,spacing:1,children:[(0,qt.jsx)(Ff,{item:!0,xs:6,children:(0,qt.jsxs)(op,{className:"hide_num_arrow",sx:{"& .MuiOutlinedInput-root":{background:"#ffffff"},"& .MuiOutlinedInput-input":{py:1.0625}},children:[(0,qt.jsx)(tH,{as:qj,fullWidth:!0,size:"small",id:t.value,name:t.value,variant:"outlined",type:"number",placeholder:g("message:rpm_DurationValuePlaceHolder"),endAdornment:(0,qt.jsx)(tw,{position:"end",children:(0,qt.jsx)(sy,{title:g("message:rpm_DurationValueHelp"),placement:"top",children:(0,qt.jsx)(wh,{size:"small",disableRipple:!0,className:"helpIconButton",children:(0,qt.jsx)(pM.A,{fontSize:"small"})})})})}),(0,qt.jsx)(dH,{name:t.value,children:e=>(0,qt.jsx)(v_,{error:!0,children:g(e,{field:g("rpm_Duration")})})}),(0,qt.jsx)(v_,{error:!0,children:o.duration})]})}),(0,qt.jsx)(Ff,{item:!0,xs:6,children:(0,qt.jsxs)(op,{sx:{"& .MuiOutlinedInput-root":{background:"#ffffff"},"& .MuiOutlinedInput-input":{py:1.0625}},children:[(0,qt.jsx)(tH,{as:G_,fullWidth:!0,size:"small",id:null===t||void 0===t?void 0:t.unit,name:null===t||void 0===t?void 0:t.unit,value:null===n||void 0===n?void 0:n.duration_unit,variant:"outlined",endAdornment:(0,qt.jsx)(tw,{position:"end",sx:{position:"absolute",right:"28px"},children:(0,qt.jsx)(sy,{title:g("message:rpm_DiseaseDurationHelp"),placement:"top",children:(0,qt.jsx)(wh,{size:"small",disableRipple:!0,className:"helpIconButton",children:(0,qt.jsx)(pM.A,{fontSize:"small"})})})}),children:null===Sd||void 0===Sd?void 0:Sd.map(e=>(0,qt.jsx)(mf,{value:e.value,children:g("rpm_".concat(e.name))},e.value))}),(0,qt.jsx)(dH,{name:null===t||void 0===t?void 0:t.unit,children:e=>(0,qt.jsx)(v_,{error:!0,children:g(e,{field:g("rpm_Duration")})})})]})})]})})},A=e=>{let{name:t,errors:n}=e;return(0,qt.jsxs)(op,{sx:{"& .MuiOutlinedInput-root":{background:"#ffffff"},"& .MuiOutlinedInput-input":{py:1.0625}},children:[(0,qt.jsx)(tH,{as:G_,fullWidth:!0,size:"small",id:t,name:t,variant:"outlined",endAdornment:(0,qt.jsx)(tw,{position:"end",sx:{position:"absolute",right:"28px"},children:(0,qt.jsx)(sy,{title:g("message:rpm_DiseaseRelationHelp"),placement:"top",children:(0,qt.jsx)(wh,{size:"small",disableRipple:!0,className:"helpIconButton",children:(0,qt.jsx)(pM.A,{fontSize:"small"})})})}),children:null===Ed||void 0===Ed?void 0:Ed.map(e=>(0,qt.jsx)(mf,{value:e,children:g("rpm_".concat(e))},e))}),(0,qt.jsx)(dH,{name:t,children:e=>(0,qt.jsx)(v_,{error:!0,children:g(e,{field:g("rpm_Relation")})})}),(0,qt.jsx)(v_,{error:!0,children:g(null===n||void 0===n?void 0:n.relationship,{field:g("rpm_Relation")})})]})},k=e=>{var t,n,r,i;let{diseaseObj:o}=e;const[a,s]=We.useState(2),l=e=>{const t=null===e||void 0===e?void 0:e.split("/");return t[(null===t||void 0===t?void 0:t.length)-1]};return(0,qt.jsxs)(qt.Fragment,{children:[null===o||void 0===o||null===(t=o.files)||void 0===t||null===(n=t.slice(0,a))||void 0===n?void 0:n.map(e=>(0,qt.jsx)(Eb,{sx:{ml:1,mb:1},"data-id":e.id,icon:(0,qt.jsx)(Aje.A,{fontSize:"small"}),label:l(e.file_name),variant:"outlined",onDelete:()=>c(e),deleteIcon:(0,qt.jsx)(Sje.A,{color:"primary"})},e.id)),(null===o||void 0===o||null===(r=o.files)||void 0===r?void 0:r.length)>2&&(0,qt.jsx)(sy,{title:(null===o||void 0===o||null===(i=o.files)||void 0===i?void 0:i.length)===a?g("rpm_Less"):g("rpm_ShowMore"),children:(0,qt.jsx)(wh,{disableRipple:!0,size:"small",onClick:()=>{var e,t;a===(null===o||void 0===o||null===(e=o.files)||void 0===e?void 0:e.length)?s(2):s(null===o||void 0===o||null===(t=o.files)||void 0===t?void 0:t.length)},children:"..."})})]})},T=e=>{let{remark:t}=e;const[n,r]=We.useState(150);return(0,qt.jsxs)(qt.Fragment,{children:[null===t||void 0===t?void 0:t.substring(0,n),(null===t||void 0===t?void 0:t.length)>150&&(0,qt.jsx)(sy,{title:(null===t||void 0===t?void 0:t.length)===n?g("rpm_Less"):g("rpm_ShowMore"),children:(0,qt.jsx)(wh,{disableRipple:!0,size:"small",onClick:()=>{n===(null===t||void 0===t?void 0:t.length)?r(150):r(null===t||void 0===t?void 0:t.length)},children:"..."})})]})},E=()=>{var e,t,n,r,i,o,a;return!cs(null===d||void 0===d||null===(e=d.data)||void 0===e||null===(t=e.local_files)||void 0===t||null===(n=t.local)||void 0===n?void 0:n.files)&&(null===d||void 0===d||null===(r=d.data)||void 0===r||null===(i=r.local_files)||void 0===i||null===(o=i.local)||void 0===o||null===(a=o.files)||void 0===a?void 0:a.map((e,t)=>(0,qt.jsx)(Eb,{sx:{ml:1,mb:1},icon:(0,qt.jsx)(Aje.A,{fontSize:"small"}),label:null===e||void 0===e?void 0:e.name,variant:"outlined"},t)))};return We.useEffect(()=>{const e={breadcrumb:j};cs(h)||cs(p)||v(NC(e))},[h,p]),(0,qt.jsx)(qt.Fragment,{children:(0,qt.jsx)(op,{sx:{width:"100%"},position:"relative",children:(0,qt.jsx)(Ff,{container:!0,spacing:2.5,children:(0,qt.jsx)(Ff,{item:!0,xs:12,children:(0,qt.jsx)(Kz,{initialValues:cs(null===_||void 0===_?void 0:_.diseaseList)?{diseaseList:[]}:_,enableReinitialize:!0,children:e=>{let{values:t,setFieldValue:n,setErrors:i,errors:c}=e;return(0,qt.jsxs)(qt.Fragment,{children:[(0,qt.jsx)(op,{sx:{display:{xs:"block",sm:"none"}},position:"absolute",left:"35px",top:"-25px",children:(0,qt.jsx)(Cf,{variant:"h6",component:"h6",fontSize:16,children:g("rpm_FamilyMedicalHistory")})}),(0,qt.jsx)(op,{sx:{display:{xs:"none",sm:"block"}},children:(0,qt.jsx)(Cf,{variant:"h5",component:"h5",fontSize:16,children:g("rpm_FamilyMedicalHistory")})}),(0,qt.jsx)(nH,{children:(0,qt.jsx)(op,{children:(0,qt.jsx)(op,{children:(0,qt.jsx)(lH,{name:"diseaseList",children:e=>{var p,v,x,j,_,M;return y.current=e,(0,qt.jsx)(qt.Fragment,{children:cs(null===t||void 0===t?void 0:t.diseaseList)?(0,qt.jsxs)(op,{sx:{textAlign:"center",mt:2,bgcolor:"white",p:2,borderRadius:1},children:[(0,qt.jsxs)(op,{mb:2,children:[(0,qt.jsx)("img",{src:m,style:{display:"block",margin:"auto",maxWidth:"130px"}}),(0,qt.jsx)("span",{style:{fontSize:"12px",fontWeight:"600"},children:"No Records Found."})]}),(null===h||void 0===h||null===(p=h.permissions)||void 0===p?void 0:p.showAddMedicalHistoryBtn)&&(0,qt.jsxs)(xh,{variant:"contained",color:"primary",disableElevation:!0,disabled:null===t||void 0===t||null===(v=t.diseaseList)||void 0===v||null===(x=v.find(e=>null===e||void 0===e?void 0:e.isEdit))||void 0===x?void 0:x.isEdit,onClick:()=>e.push({disease_name:"",duration:"",duration_unit:"",start_date:null,end_date:null,remark:"",reports:"",isEdit:!0}),children:[(0,qt.jsx)(jue.A,{}),g("rpm_AddNewDisease")]})]}):(0,qt.jsxs)(qt.Fragment,{children:[(null===h||void 0===h||null===(j=h.permissions)||void 0===j?void 0:j.showAddMedicalHistoryBtn)&&(0,qt.jsx)(op,{className:f.familyDiseasebutton,children:(0,qt.jsxs)(xh,{color:"primary",disableElevation:!0,disabled:null===t||void 0===t||null===(_=t.diseaseList)||void 0===_?void 0:_.some(e=>null===e||void 0===e?void 0:e.isEdit),onClick:()=>e.unshift({disease_name:"",duration:"",duration_unit:"",start_date:null,end_date:null,remark:"",reports:"",isEdit:!0}),sx:{padding:"0",marginBottom:"10px"},children:[(0,qt.jsx)(jue.A,{}),g("rpm_AddNewDisease")]})}),null===t||void 0===t||null===(M=t.diseaseList)||void 0===M?void 0:M.map((t,p)=>{var m,v,x,y,j;return(0,qt.jsx)(We.Fragment,{children:(0,qt.jsxs)(yH,{sx:{marginBottom:"5px",borderLeft:"4px solid #868fcd",overflow:"auto"},children:[(0,qt.jsx)(nW,{sx:{paddingBottom:"0"},action:(0,qt.jsx)(op,{sx:{display:"flex",justifyContent:"space-between"},children:null!==t&&void 0!==t&&t.isEdit?(0,qt.jsx)(qt.Fragment,{children:(0,qt.jsxs)(op,{sx:{marginTop:null!==t&&void 0!==t&&t.isEdit?"27px":"0px",marginLeft:null!==t&&void 0!==t&&t.isEdit?"15px":"0px"},children:[s(t,{setErrors:i}),o(t,e.remove,p)]})}):(0,qt.jsxs)(qt.Fragment,{children:[(null===h||void 0===h||null===(m=h.permissions)||void 0===m?void 0:m.showEditMedicalHistoryBtn)&&r(t),(null===h||void 0===h||null===(v=h.permissions)||void 0===v?void 0:v.showDeleteMedicalHistoryBtn)&&a(t)]})}),title:(0,qt.jsxs)(op,{display:"flex",flexDirection:"column",sx:{width:"100%"},children:[(0,qt.jsx)(Cf,{variant:"body1",className:f.titles,fontWeight:600,children:g("Relationship")}),null!==t&&void 0!==t&&t.isEdit?(0,qt.jsx)(A,{name:"diseaseList.".concat(p,".relationship"),errors:c}):(0,qt.jsx)(Cf,{variant:"body2",className:f.labelAnswers,children:(null===t||void 0===t?void 0:t.relationship)||"NA"})]})}),(0,qt.jsxs)(wH,{sx:{paddingTop:null!==t&&void 0!==t&&t.isEdit?"8px":"16px"},children:[(0,qt.jsxs)(op,{display:"flex",alignItems:"baseline",sx:{display:null!==t&&void 0!==t&&t.isEdit?"block":"flex",marginBottom:null!==t&&void 0!==t&&t.isEdit?"10px":"8px"},children:[(0,qt.jsxs)(op,{sx:{display:"flex",flexDirection:"column",flex:"0 0 150px"},children:[(0,qt.jsx)(Cf,{variant:"subtitle1",className:f.titles,fontWeight:600,children:g("Disease Name")}),null!==t&&void 0!==t&&t.isEdit?(0,qt.jsx)(w,{diseaseName:t,name:"diseaseList.".concat(p,".disease_name"),setFieldValue:n,errors:c}):(0,qt.jsx)(Cf,{variant:"body2",fontSize:16,sx:{wordBreak:"break-all",whiteSpace:"pre-wrap"},children:(null===t||void 0===t?void 0:t.disease_name)||"NA"})]}),(0,qt.jsx)(eg,{orientation:"vertical",variant:"middle",flexItem:!0,sx:{margin:"10px",display:null!==t&&void 0!==t&&t.isEdit?"none":"block"}}),(0,qt.jsxs)(op,{sx:{display:"flex",flexDirection:"column",flex:"0 0 80px"},children:[(0,qt.jsx)(Cf,{variant:"subtitle1",className:f.titles,fontWeight:600,sx:{paddingTop:null!==t&&void 0!==t&&t.isEdit?"8px":"0px"},children:g("Duration")}),null!==t&&void 0!==t&&t.isEdit?(0,qt.jsx)(S,{errors:c,data:t,setFieldValue:n,name:{value:"diseaseList.".concat(p,".duration"),unit:"diseaseList.".concat(p,".duration_unit"),start_date:"diseaseList.".concat(p,".start_date"),end_date:"diseaseList.".concat(p,".end_date")}}):(0,qt.jsx)(Cf,{children:t.custom_duration?t.custom_duration+" "+(null===t||void 0===t?void 0:t.duration_unit):b(t.duration_unit,null===t||void 0===t?void 0:t.start_date,t.end_date)})]})]}),(0,qt.jsxs)(op,{mb:1,sx:{display:"flex",flexDirection:"column"},children:[(0,qt.jsx)(Cf,{variant:"subtitle1",className:f.titles,fontWeight:600,children:g("Remark")}),null!==t&&void 0!==t&&t.isEdit?(0,qt.jsx)(C,{name:"diseaseList.".concat(p,".remark"),errors:c}):(0,qt.jsx)(Cf,{variant:"body2",fontSize:16,children:null!==t&&void 0!==t&&t.remark?(0,qt.jsx)(T,{remark:null===t||void 0===t?void 0:t.remark}):"NA"})]}),(0,qt.jsxs)(op,{mt:1,sx:{display:"flex",flexDirection:"column"},children:[(0,qt.jsx)(Cf,{variant:"subtitle1",className:f.titles,fontWeight:600,sx:{paddingTop:null!==t&&void 0!==t&&t.isEdit?"8px":"0px"},children:g("Reports")}),null!==t&&void 0!==t&&t.isEdit?(0,qt.jsxs)(qt.Fragment,{children:[(0,qt.jsx)(E,{}),cs(null===d||void 0===d||null===(x=d.data)||void 0===x||null===(y=x.local_files)||void 0===y||null===(j=y.local)||void 0===j?void 0:j.files)?l("diseaseList.".concat(p,".reports"),t):u("diseaseList.".concat(p,".reports"),t)]}):cs(null===t||void 0===t?void 0:t.files)?(0,qt.jsx)(Cf,{children:"NA"}):(0,qt.jsx)(k,{diseaseObj:t})]})]})]})},p)})]})})}})})})})]})}},"addMedicalHistory_formik")})})})})}Hje.defaultProps={allDiseaseList:[],familyDiseaseHead:[],pageDetails:{},order:"",orderBy:"",setOrder:()=>{},setOrderBy:()=>{},dataParameter:"",checkState:"",onCheck:()=>{},isSelection:"",nodata:"",familyDiseaseList:[],otherDiseaseList:[],fetchDiseaseList:()=>{},editIcon:()=>{},viewButton:()=>{},deleteButtonIcon:()=>{},isEdit:!1,saveButtonMobile:()=>{},fileUploadButton:()=>{},editRow:[],closeButtonMobile:()=>{},otherHistory:{},downloadFile:()=>{},fileModal:{},fileUploadIconButton:()=>{},patientData:{},program:{}};const Wje=Hje;var Uje=n(38723),Vje=n(95382),Gje=n(10155),qje=n(3519);const Yje=["content"];const Zje=function(e){let{patientData:t,program:n}=e;const r=window.innerWidth,[o,a]=We.useState(""),s=Nt(),l=wt(bu),c=!("true"===us(l,"user_principal.attributes.skip_tour[0]","")),d=wt(cu),{t:u}=Vg(),{programId:p,patientId:h}=lo(),[m,f]=We.useState((0,i.A)({},{local:{files:[]},onCloud:{files:[]}})),[g,v]=(0,We.useState)("desc"),[x,y]=(0,We.useState)("updated_at"),[b,j]=We.useState(null),[_,C]=We.useState(null),[w,S]=(0,We.useState)([]),[A,k]=(0,We.useState)((0,i.A)({},dd)),[T,E]=We.useState({open:!1,data:{}}),[M,O]=We.useState({open:!1,data:{}}),R=e=>{O((0,i.A)((0,i.A)({},M),{},{open:!M.open,data:e}))},P=e=>{E((0,i.A)((0,i.A)({},T),{},{open:!T.open,data:(0,i.A)((0,i.A)({},e.disease),{},{local_files:m})}))},D=()=>{let e=(0,i.A)({},m);e.local.files.splice(0,e.local.files.length),f(e),E((0,i.A)((0,i.A)({},T),{},{open:!1}))},N=function(e){let t=(0,i.A)({},m);t.local.files.splice(e,1),f(t)},L=e=>{if(Array.isArray(e))return S(e.map(e=>e.toString()));const t=e.target.name;w.includes(t)?S(w.filter(e=>e!==t)):S(e=>[...e,t])},I=e=>{const t=null===_||void 0===_?void 0:_.map(t=>(0,i.A)((0,i.A)({},t),{},{isEdit:t.id===e.id}));C(t)},F=(e,t,n)=>{if(D(),e.id){const t=null===_||void 0===_?void 0:_.map(t=>(0,i.A)((0,i.A)({},t),{},{isEdit:t.id===e.id&&!1}));C(t)}else t(n)},$=async()=>{const e=(0,i.A)((0,i.A)({},A),{},{kind:"FAMILY"});try{const{data:t}=await s(Al(p,h,e)),n=t||{},{content:r}=n,o=Ko(n,Yje),a=r.filter(e=>"FAMILY"===e.kind);C(a),k(e=>(0,i.A)((0,i.A)({},e),{},{last_page:o.last_page,current_page:o.current_page,from:o.from,per_page:o.per_page,to:o.to,total:o.total}))}catch(t){console.log(t)}},B=async(e,t)=>{try{await s(Rl(p,h,e.id,t)),$(),function(e,t){var n;const r=null===e||void 0===e||null===(n=e.files)||void 0===n?void 0:n.filter(e=>(null===e||void 0===e?void 0:e.id)!==t);E((0,i.A)((0,i.A)({},T),{},{data:(0,i.A)((0,i.A)({},e),{},{files:r})}))}(e,t),s(Zo({subTitle:"message:rpm_FileDeletedSuccessfully",severity:ud.SUCCESS}))}catch(n){const e=us(n,"response.data.code","");cs(e)?s(Zo({subTitle:"error:rpm_FileDeleteFailed",severity:ud.ERROR})):s(Zo({subTitle:Vd(e,"error:rpm_FileDeleteFailed"),severity:ud.ERROR}))}},z=async e=>{try{await s(Pl(p,h,e)),s(Zo({subTitle:"message:rpm_DownloadFileSuccessfully",severity:ud.SUCCESS}))}catch(t){const e=us(t,"response.data.code","");cs(e)?s(Zo({subTitle:"error:rpm_DownloadFileFailed",severity:ud.ERROR})):s(Zo({subTitle:Vd(e,"error:rpm_DownloadFileFailed"),severity:ud.ERROR}))}},H=async(e,t)=>{var n,r;let{setErrors:i}=t,o=null===e||void 0===e?void 0:e.start_date,a=null===e||void 0===e?void 0:e.end_date;"CUSTOM"===(null===e||void 0===e?void 0:e.duration_unit)||"PRESENT"===(null===e||void 0===e?void 0:e.duration_unit)?(o=sa()(o).startOf("year").valueOf(),a=sa()(a).startOf("year").valueOf()):(a=sa()().valueOf(),o=sa()(a).subtract(null===e||void 0===e?void 0:e.duration,"".concat(null===e||void 0===e?void 0:e.duration_unit).toLowerCase()).valueOf());const l={disease_name:null===e||void 0===e?void 0:e.disease_name,start_date:o?sa()(o).format():null,end_date:a?sa()(a).format():null,remark:null===e||void 0===e?void 0:e.remark,duration_unit:null!==e&&void 0!==e&&e.duration_unit?null===e||void 0===e?void 0:e.duration_unit:"YEAR",custom_duration:"CUSTOM"===(null===e||void 0===e?void 0:e.duration_unit)||"PRESENT"===(null===e||void 0===e?void 0:e.duration_unit)?0:null===e||void 0===e?void 0:e.duration,kind:"FAMILY",relationship:null!==e&&void 0!==e&&e.relationship?null===e||void 0===e?void 0:e.relationship:"",upload:cs(null===T||void 0===T||null===(n=T.data)||void 0===n?void 0:n.local_files)?[]:null===T||void 0===T||null===(r=T.data)||void 0===r?void 0:r.local_files};RU.addNewDisease.validate(e,{abortEarly:!1}).then(async()=>{try{await s(kl(p,h,l)),$(),D(),s(Zo({subTitle:"message:rpm_DiseaseCreatedSuccessfully",severity:ud.SUCCESS}))}catch(e){const t=us(e,"response.data.code","");cs(t)?s(Zo({subTitle:"error:rpm_DiseaseCreatedFailed",severity:ud.ERROR})):s(Zo({subTitle:Vd(t,"error:rpm_DiseaseCreatedFailed"),severity:ud.ERROR}))}}).catch(e=>{const t=Array.from(e.inner||[]).reduce((e,t)=>(e[t.path]=t.message,e),{});i(t)})},W=async(e,t)=>{var n,r;let{setErrors:i}=t,o=null===e||void 0===e?void 0:e.start_date,a=null===e||void 0===e?void 0:e.end_date;"CUSTOM"===(null===e||void 0===e?void 0:e.duration_unit)||"PRESENT"===(null===e||void 0===e?void 0:e.duration_unit)?(o=sa()(o).startOf("year").valueOf(),a=sa()(a).startOf("year").valueOf()):(a=sa()().valueOf(),o=sa()(a).subtract(null===e||void 0===e?void 0:e.duration,"".concat(null===e||void 0===e?void 0:e.duration_unit).toLowerCase()).valueOf());const l={id:null===e||void 0===e?void 0:e.id,disease_name:null===e||void 0===e?void 0:e.disease_name,start_date:o?sa()(o).format():null,end_date:a?sa()(a).format():null,remark:null===e||void 0===e?void 0:e.remark,duration_unit:null===e||void 0===e?void 0:e.duration_unit,custom_duration:"CUSTOM"===(null===e||void 0===e?void 0:e.duration_unit)||"PRESENT"===(null===e||void 0===e?void 0:e.duration_unit)?0:null===e||void 0===e?void 0:e.duration,kind:null===e||void 0===e?void 0:e.kind,relationship:null!==e&&void 0!==e&&e.relationship?null===e||void 0===e?void 0:e.relationship:"",upload:cs(null===T||void 0===T||null===(n=T.data)||void 0===n?void 0:n.local_files)?[]:null===T||void 0===T||null===(r=T.data)||void 0===r?void 0:r.local_files};RU.editNewDisease.validate(e,{abortEarly:!1}).then(async()=>{try{await s(Tl(p,h,l)),$(),D(),s(Zo({subTitle:"message:rpm_DiseaseUpdateSuccessfully",severity:ud.SUCCESS}))}catch(e){const t=us(e,"response.data.code","");cs(t)?s(Zo({subTitle:"error:rpm_DiseaseUpdateFailed",severity:ud.ERROR})):s(Zo({subTitle:Vd(t,"error:rpm_DiseaseUpdateFailed"),severity:ud.ERROR}))}}).catch(e=>{const t=Array.from(e.inner||[]).reduce((e,t)=>(e[t.path]=t.message,e),{});i(t)})},U=async e=>{try{var t;await s(Ml(p,h,null===e||void 0===e||null===(t=e.data)||void 0===t?void 0:t.id)),$(),O((0,i.A)((0,i.A)({},M),{},{open:!M.open})),s(Zo({subTitle:"message:rpm_DiseaseDeleteSuccessfully",severity:ud.SUCCESS}))}catch(n){const e=us(n,"response.data.code","");cs(e)?s(Zo({subTitle:"error:rpm_DiseaseUpdateFailed",severity:ud.ERROR})):s(Zo({subTitle:Vd(e,"error:rpm_DiseaseDeleteFailed"),severity:ud.ERROR}))}},V=(e,t)=>(0,qt.jsx)(xh,{variant:"text",color:"primary",disableElevation:!0,onClick:()=>P({name:e,disease:t}),sx:{display:"inline-flex",backgroundColor:"grey.300",color:"grey.700",border:"1px dashed #616161",textAlign:"left",px:3},children:(0,qt.jsxs)(op,{sx:{display:"flex",alignItems:"center"},children:[(0,qt.jsx)(Cje.A,{fontSize:"small"}),(0,qt.jsxs)(op,{sx:{flex:1,pl:2},children:[(0,qt.jsx)(Cf,{variant:"body1",sx:{textTransform:"none"},children:u("rpm_UploadReport")}),(0,qt.jsx)(Cf,{variant:"caption",children:".PDF, .PNG, .JPEG"})]})]})}),G=(e,t)=>(0,qt.jsx)(sy,{title:u("rpm_UploadMore"),children:(0,qt.jsx)(wh,{"data-id":t.id,color:"primary",sx:{ml:1,mb:1},onClick:()=>P({name:e,disease:t}),children:(0,qt.jsx)(jje.A,{fontSize:"small",sx:{width:16,height:16}})})}),q=function(e){var t;const n=e.target.files;let r=(0,i.A)({},m.local),o=(null===r||void 0===r||null===(t=r.files)||void 0===t?void 0:t.map(e=>e.size))||[],a=0;n&&Array.from(n).forEach(e=>{var t;return cs(null===r||void 0===r||null===(t=r.files)||void 0===t?void 0:t.find(t=>t.name===e.name))?(a+=o.reduce((e,t)=>e+t,0),(null===e||void 0===e?void 0:e.size)>=5242880||a>=5242800?s(Zo({subTitle:"error:rpm_ImageSize",severity:ud.ERROR})):(e.url=URL.createObjectURL(e),void r.files.push(e))):s(Zo({subTitle:"error:rpm_SameFileName",severity:ud.ERROR}))}),f(e=>(0,i.A)((0,i.A)({},e),{},{local:r})),e.target.value=""},Y=e=>(0,qt.jsx)(sy,{title:u("rpm_view"),children:(0,qt.jsx)(wh,{"data-id":e.id,color:"primary",onClick:()=>{},children:(0,qt.jsx)(gc,{fontSize:"small",sx:{width:16,height:16}})})});We.useEffect(()=>{d&&($(),(async()=>{try{const{data:e}=Md,{content:t}=e||{};j(t)}catch(e){console.log(e)}})())},[d]),We.useEffect(()=>{s(NC({activeMenuItem:"patient_history"}))},[]);const Z=[{id:"relationship",label:u("rpm_Relationship")+"*",isSort:!1,sortProperty:"relationship"},{id:"disease",label:u("rpm_DiseaseName")+"*",isSort:!1,sortProperty:"disease"},{id:"duration",label:u("rpm_Duration"),isSort:!1,sortProperty:"duration"},{id:"remarks",label:u("rpm_Remarks"),isSort:!1,sortProperty:"remarks"},{id:"reports",label:u("rpm_AddReports"),isSort:!1,sortProperty:"reports"},{id:"action",label:u("rpm_Actions"),isSort:!1,sortProperty:"action"}];return(0,qt.jsxs)(qt.Fragment,{children:[r>=575?(0,qt.jsxs)(qt.Fragment,{children:[(0,qt.jsx)(Tje,{order:g,orderBy:x,setOrder:v,setOrderBy:y,dataParameter:"id",checkState:w,onCheck:L,isSelection:!1,nodata:GC,allDiseaseList:b,familyDiseaseHead:Z,familyDiseaseList:_,fetchDiseaseList:$,pageDetails:A,editButton:e=>(0,qt.jsx)(sy,{title:u("rpm_Edit"),children:(0,qt.jsx)(wh,{color:"primary",onClick:()=>I(e),children:(0,qt.jsx)(fc,{fontSize:"small",sx:{width:16,height:16}})})}),closeButton:(e,t,n)=>(0,qt.jsx)(sy,{title:u("rpm_Cancel"),children:(0,qt.jsx)(wh,{color:"error",onClick:()=>F(e,t,n),children:(0,qt.jsx)(_je.A,{fontSize:"small",sx:{width:16,height:16}})})}),viewButton:Y,deleteButton:e=>(0,qt.jsx)(wh,{"data-id":e.id,color:"error",onClick:()=>R(e),children:(0,qt.jsx)(xc,{fontSize:"small",sx:{width:16,height:16}})}),saveButton:(e,t)=>{let{setErrors:n}=t;return(0,qt.jsx)(sy,{title:u("rpm_Save"),children:(0,qt.jsx)(wh,{onClick:()=>e.id?W(e,{setErrors:n}):H(e,{setErrors:n}),color:"primary",children:(0,qt.jsx)(wje.A,{fontSize:"small"})})})},fileUploadButton:V,fileModal:T,downloadFile:z,fileUploadIconButton:G,patientData:t,program:n}),(0,qt.jsx)(Nje,{openModal:null===T||void 0===T?void 0:T.open,onCloseModal:D,actionFunction:P,onFileUpload:q,initialValues:m,onLocalFileDelete:N,fileModal:T,onCloudFilesDelete:B}),(0,qt.jsx)(qV,{openModal:M.open,onCloseModal:R,actionFunction:()=>U(M),dataName:"",options:{primaryText:u("message:rpm_DeleteTitle"),secondaryText:u("message:rpm_DeleteBodyText"),btn:{primaryText:u("rpm_Delete"),secondaryText:u("rpm_Cancel"),primaryColor:"error",secondaryColor:"primary"},btnSwap:!0}})]}):(0,qt.jsxs)(qt.Fragment,{children:[(0,qt.jsx)(Wje,{order:g,orderBy:x,setOrder:v,setOrderBy:y,dataParameter:"id",checkState:w,onCheck:L,isSelection:!1,nodata:GC,allDiseaseList:b,familyDiseaseHead:Z,familyDiseaseList:_,fetchDiseaseList:$,pageDetails:A,editIcon:e=>(0,qt.jsx)(sy,{title:u("rpm_Edit"),children:(0,qt.jsx)(wh,{color:"primary",onClick:()=>I(e),children:(0,qt.jsx)(qje.A,{fontSize:"small"})})}),closeButtonMobile:(e,t,n)=>(0,qt.jsx)(sy,{title:u("rpm_Cancel"),children:(0,qt.jsx)(wh,{color:"error",onClick:()=>F(e,t,n),sx:{marginLeft:"5px",background:"#d32f2f1a",padding:"5px"},children:(0,qt.jsx)(Gje.A,{})})}),viewButton:Y,deleteButtonIcon:e=>(0,qt.jsx)(wh,{"data-id":e.id,color:"error",onClick:()=>R(e),children:(0,qt.jsx)(Uje.A,{fontSize:"small",sx:{width:22,height:22}})}),saveButtonMobile:(e,t)=>{let{setErrors:n}=t;return(0,qt.jsx)(sy,{title:u("rpm_Save"),children:(0,qt.jsx)(wh,{onClick:()=>e.id?W(e,{setErrors:n}):H(e,{setErrors:n}),color:"primary",sx:{background:"#2c387e2b",padding:"5px"},children:(0,qt.jsx)(Vje.A,{})})})},fileUploadButton:V,fileModal:T,downloadFile:z,fileUploadIconButton:G,patientData:t,program:n}),(0,qt.jsx)(Ije,{openModal:null===T||void 0===T?void 0:T.open,onCloseModal:D,actionFunction:P,onFileUpload:q,initialValues:m,onLocalFileDelete:N,fileModal:T,onCloudFilesDelete:B}),(0,qt.jsx)(zje,{openModal:M.open,onCloseModal:R,actionFunction:()=>U(M),dataName:"",options:{primaryText:u("message:rpm_DeleteTitle"),secondaryText:u("message:rpm_DeleteBodyText"),btn:{primaryText:u("rpm_Delete"),secondaryText:u("rpm_Cancel"),primaryColor:"error",secondaryColor:"primary"},btnSwap:!0}})]}),(0,qt.jsx)(zZ,{isTour:c,path:"fmedicalHistoryTour",setRenderer:a}),(0,qt.jsx)("input",{type:"hidden",id:"rerenderer",value:o})]})};function Kje(e){return(0,sr.Ay)("MuiRadioGroup",e)}(0,ar.A)("MuiRadioGroup",["root","row","error"]);const Xje=We.createContext(void 0),Qje=["actions","children","className","defaultValue","name","onChange","value"],Jje=We.forwardRef(function(e,t){const{actions:n,children:r,className:i,defaultValue:o,name:a,onChange:s,value:l}=e,c=(0,nn.A)(e,Qje),d=We.useRef(null),u=(e=>{const{classes:t,row:n,error:r}=e,i={root:["root",n&&"row",r&&"error"]};return(0,ir.A)(i,Kje,t)})(e),[p,h]=(0,Yx.A)({controlled:l,default:o,name:"RadioGroup"});We.useImperativeHandle(n,()=>({focus:()=>{let e=d.current.querySelector("input:not(:disabled):checked");e||(e=d.current.querySelector("input:not(:disabled)")),e&&e.focus()}}),[]);const m=(0,Ln.A)(t,d),f=(0,qx.A)(a),g=We.useMemo(()=>({name:f,onChange(e){h(e.target.value),s&&s(e,e.target.value)},value:p}),[f,s,h,p]);return(0,qt.jsx)(Xje.Provider,{value:g,children:(0,qt.jsx)(que,(0,Ft.A)({role:"radiogroup",ref:m,className:(0,nr.A)(u.root,i)},c,{children:r}))})}),e_e=Jje,t_e=(0,Cy.A)((0,qt.jsx)("path",{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm0 18c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8z"}),"RadioButtonUnchecked"),n_e=(0,Cy.A)((0,qt.jsx)("path",{d:"M8.465 8.465C9.37 7.56 10.62 7 12 7C14.76 7 17 9.24 17 12C17 13.38 16.44 14.63 15.535 15.535C14.63 16.44 13.38 17 12 17C9.24 17 7 14.76 7 12C7 10.62 7.56 9.37 8.465 8.465Z"}),"RadioButtonChecked"),r_e=(0,Vn.Ay)("span",{name:"MuiRadioButtonIcon",shouldForwardProp:kp.A})({position:"relative",display:"flex"}),i_e=(0,Vn.Ay)(t_e,{name:"MuiRadioButtonIcon"})({transform:"scale(1)"}),o_e=(0,Vn.Ay)(n_e,{name:"MuiRadioButtonIcon"})(e=>{let{theme:t,ownerState:n}=e;return(0,Ft.A)({left:0,position:"absolute",transform:"scale(0)",transition:t.transitions.create("transform",{easing:t.transitions.easing.easeIn,duration:t.transitions.duration.shortest})},n.checked&&{transform:"scale(1)",transition:t.transitions.create("transform",{easing:t.transitions.easing.easeOut,duration:t.transitions.duration.shortest})})});const a_e=function(e){const{checked:t=!1,classes:n={},fontSize:r}=e,i=(0,Ft.A)({},e,{checked:t});return(0,qt.jsxs)(r_e,{className:n.root,ownerState:i,children:[(0,qt.jsx)(i_e,{fontSize:r,className:n.background,ownerState:i}),(0,qt.jsx)(o_e,{fontSize:r,className:n.dot,ownerState:i})]})};var s_e=n(6593);function l_e(e){return(0,sr.Ay)("MuiRadio",e)}const c_e=(0,ar.A)("MuiRadio",["root","checked","disabled","colorPrimary","colorSecondary","sizeSmall"]),d_e=["checked","checkedIcon","color","icon","name","onChange","size","className"],u_e=(0,Vn.Ay)(_w,{shouldForwardProp:e=>(0,kp.A)(e)||"classes"===e,name:"MuiRadio",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,"medium"!==n.size&&t["size".concat((0,pp.A)(n.size))],t["color".concat((0,pp.A)(n.color))]]}})(e=>{let{theme:t,ownerState:n}=e;return(0,Ft.A)({color:(t.vars||t).palette.text.secondary},!n.disableRipple&&{"&:hover":{backgroundColor:t.vars?"rgba(".concat("default"===n.color?t.vars.palette.action.activeChannel:t.vars.palette[n.color].mainChannel," / ").concat(t.vars.palette.action.hoverOpacity,")"):(0,hp.X4)("default"===n.color?t.palette.action.active:t.palette[n.color].main,t.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}}},"default"!==n.color&&{["&.".concat(c_e.checked)]:{color:(t.vars||t).palette[n.color].main}},{["&.".concat(c_e.disabled)]:{color:(t.vars||t).palette.action.disabled}})});const p_e=(0,qt.jsx)(a_e,{checked:!0}),h_e=(0,qt.jsx)(a_e,{}),m_e=We.forwardRef(function(e,t){var n,r;const i=(0,$t.b)({props:e,name:"MuiRadio"}),{checked:o,checkedIcon:a=p_e,color:s="primary",icon:l=h_e,name:c,onChange:d,size:u="medium",className:p}=i,h=(0,nn.A)(i,d_e),m=(0,Ft.A)({},i,{color:s,size:u}),f=(e=>{const{classes:t,color:n,size:r}=e,i={root:["root","color".concat((0,pp.A)(n)),"medium"!==r&&"size".concat((0,pp.A)(r))]};return(0,Ft.A)({},t,(0,ir.A)(i,l_e,t))})(m),g=We.useContext(Xje);let v=o;const x=(0,s_e.A)(d,g&&g.onChange);let y=c;return g&&("undefined"===typeof v&&(v=function(e,t){return"object"===typeof t&&null!==t?e===t:String(e)===String(t)}(g.value,i.value)),"undefined"===typeof y&&(y=g.name)),(0,qt.jsx)(u_e,(0,Ft.A)({type:"radio",icon:We.cloneElement(l,{fontSize:null!=(n=h_e.props.fontSize)?n:u}),checkedIcon:We.cloneElement(a,{fontSize:null!=(r=p_e.props.fontSize)?r:u}),ownerState:m,classes:f,name:y,checked:v,onChange:x,ref:t,className:(0,nr.A)(f.root,p)},h))}),f_e=m_e;function g_e(e){var t;let{allDiseaseList:n,personalDiseaseList:r,order:o,orderBy:a,setOrder:s,setOrderBy:l,dataParameter:c,personalDiseaseHead:d,checkState:u,onCheck:p,isSelection:h,nodata:m,fetchDiseaseList:f,pageDetails:g,editButton:v,closeButton:x,deleteButton:y,saveButton:b,fileUploadButton:j,filterOtherHistory:_,updateOtherHistory:C,omhEdit:w,handleOtherHistory:S,downloadFile:A,fileModal:k,fileUploadIconButton:T,patientData:E,program:M,handleCancel:O}=e;const{t:R}=Vg(),P=Nt(),D=so(),N=db(),L=(0,We.useRef)(null),I=(e,t,n)=>{const r=sa()(t).format("YYYY"),i=sa()(n).format("YYYY");return"CUSTOM"===e?"".concat(r," - ").concat(i):"PRESENT"===e?"".concat(r," - ").concat(e):void 0},F=[{name:R("rpm_RPM"),url:ld.DOCTOR.PROGRAM},{name:null===M||void 0===M?void 0:M.display_name,url:"".concat(ld.DOCTOR.PROGRAM,"/").concat(null===M||void 0===M?void 0:M.code,"/patients")},{name:"".concat((null===E||void 0===E?void 0:E.first_name)||""," ").concat((null===E||void 0===E?void 0:E.last_name)||""),url:"".concat(ld.DOCTOR.PROGRAM,"/").concat(null===M||void 0===M?void 0:M.code,"/patients/").concat(null===E||void 0===E?void 0:E.id,"/dashboard")},{name:R("rpm_medicalHistory"),url:""}],$={diseaseList:null===r||void 0===r?void 0:r.map(e=>(0,i.A)((0,i.A)({},e),{},{duration:null===e||void 0===e?void 0:e.custom_duration}))},B=e=>{let{name:t,errors:n}=e;return(0,qt.jsxs)(op,{sx:{"& .MuiOutlinedInput-root":{background:"#ffffff"},"& .MuiOutlinedInput-input":{py:1.0625}},children:[(0,qt.jsx)(tH,{as:qj,fullWidth:!0,size:"small",id:t,name:t,variant:"outlined",placeholder:R("message:rpm_RemarkPlaceHolder"),endAdornment:(0,qt.jsx)(tw,{position:"end",children:(0,qt.jsx)(sy,{title:R("message:rpm_DiseaseRemarkHelp"),placement:"top",children:(0,qt.jsx)(wh,{size:"small",disableRipple:!0,sx:{p:0},children:(0,qt.jsx)(pM.A,{fontSize:"small"})})})})}),(0,qt.jsx)(dH,{name:t,children:e=>(0,qt.jsx)(v_,{error:!0,children:R(e,{field:R("rpm_Remark")})})}),(0,qt.jsx)(v_,{error:!0,children:n.remark})]})},z=e=>{let{name:t,diseaseName:r,setFieldValue:o,errors:a}=e;return(0,qt.jsxs)(op,{sx:{"& .MuiOutlinedInput-root":{background:"#ffffff"},"& .MuiOutlinedInput-input":{py:1.0625}},children:[(0,qt.jsx)(tH,{component:aj,fullWidth:!0,size:"small",id:t,name:t,variant:"outlined",value:r||null,options:n||[],filterOptions:(e,t)=>{const n=N(e,t),{inputValue:r}=t,i=e.some(e=>r===e.disease_name);return""===r||i||n.push({inputValue:r,disease_name:'Add "'.concat(r,'"')}),n},getOptionLabel:e=>"string"===typeof e?e:e.inputValue?e.inputValue:e.disease_name,renderOption:(e,t)=>(0,qt.jsx)(op,(0,i.A)((0,i.A)({component:"li"},e),{},{children:t.disease_name})),onChange:(e,n)=>{"string"===typeof n?o(t,n||""):n&&n.inputValue?o(t,n.inputValue?n.inputValue:""):o(t,null!==n&&void 0!==n&&n.disease_name?n.disease_name:"")},freeSolo:!0,renderInput:e=>(0,qt.jsx)(Q_,(0,i.A)((0,i.A)({},e),{},{placeholder:R("rpm_DiseaseName")}))}),(0,qt.jsx)(dH,{name:t,children:e=>(0,qt.jsx)(v_,{error:!0,children:R(e,{field:R("rpm_SelectDisease")})})}),(0,qt.jsx)(v_,{error:!0,children:R(a.disease_name,{field:R("rpm_DiseaseName")})})]})},H=e=>{let{name:t,data:n,setFieldValue:r,errors:o}=e;return(0,qt.jsx)(qt.Fragment,{children:"CUSTOM"===(null===n||void 0===n?void 0:n.duration_unit)||"PRESENT"===(null===n||void 0===n?void 0:n.duration_unit)?(0,qt.jsxs)(Ff,{container:!0,spacing:1,children:[(0,qt.jsx)(Ff,{item:!0,xs:5,children:(0,qt.jsxs)(op,{className:"pres_inputTab",sx:{"& .MuiOutlinedInput-input":{py:1.0625}},children:[(0,qt.jsx)(WM,{dateAdapter:DI,children:(0,qt.jsx)(tH,{as:fD,views:["year"],size:"small",label:"From",id:t.start_date,name:t.start_date,value:n.start_date,onChange:e=>r(t.start_date,e),onPaste:e=>{e.preventDefault()},renderInput:e=>(0,qt.jsx)(Q_,(0,i.A)((0,i.A)({},e),{},{onKeyDown:e=>{e.preventDefault()}})),maxDate:new Date})}),(0,qt.jsx)(v_,{error:!0,children:R(o.start_date,{field:R("rpm_From")})})]})}),(0,qt.jsxs)(Ff,{item:!0,xs:5,children:["CUSTOM"===(null===n||void 0===n?void 0:n.duration_unit)&&(0,qt.jsxs)(op,{className:"pres_inputTab",sx:{"& .MuiOutlinedInput-input":{py:1.0625}},children:[(0,qt.jsx)(WM,{dateAdapter:DI,children:(0,qt.jsx)(tH,{as:fD,views:["year"],size:"small",label:"To",id:t.end_date,name:t.end_date,value:n.end_date,onChange:e=>r(t.end_date,e),onPaste:e=>{e.preventDefault()},renderInput:e=>(0,qt.jsx)(Q_,(0,i.A)((0,i.A)({},e),{},{onKeyDown:e=>{e.preventDefault()}})),minDate:n.start_date?(()=>{const e=new Date(n.start_date),t=e.setFullYear(e.getFullYear()+1);return new Date(t)})(n.start_date):void 0,maxDate:new Date})}),(0,qt.jsx)(v_,{error:!0,children:R(o.end_date,{field:R("rpm_To")})})]}),"PRESENT"===(null===n||void 0===n?void 0:n.duration_unit)&&(0,qt.jsx)(op,{sx:{"& .MuiOutlinedInput-root":{background:"#ffffff"},"& .MuiOutlinedInput-input":{py:1.0625}},children:(0,qt.jsx)(tH,{as:G_,fullWidth:!0,size:"small",id:null===t||void 0===t?void 0:t.unit,name:null===t||void 0===t?void 0:t.unit,value:null===n||void 0===n?void 0:n.duration_unit,variant:"outlined",endAdornment:(0,qt.jsx)(tw,{position:"end",sx:{position:"absolute",right:"28px"},children:(0,qt.jsx)(sy,{title:R("message:rpm_DiseaseDurationHelp"),placement:"top",children:(0,qt.jsx)(wh,{size:"small",disableRipple:!0,sx:{p:0},children:(0,qt.jsx)(pM.A,{fontSize:"small"})})})}),children:null===Sd||void 0===Sd?void 0:Sd.map(e=>(0,qt.jsx)(mf,{value:e.value,children:R("rpm_".concat(e.name))},e.value))})})]}),(0,qt.jsx)(Ff,{item:!0,children:(0,qt.jsx)(sy,{title:R("rpm_Close"),children:(0,qt.jsx)(wh,{color:"error",onClick:()=>r(t.unit,""),children:(0,qt.jsx)(_je.A,{fontSize:"small",sx:{width:16,height:16}})})})})]}):(0,qt.jsxs)(Ff,{container:!0,spacing:1,children:[(0,qt.jsx)(Ff,{item:!0,xs:6,children:(0,qt.jsxs)(op,{className:"hide_num_arrow",sx:{"& .MuiOutlinedInput-root":{background:"#ffffff"},"& .MuiOutlinedInput-input":{py:1.0625}},children:[(0,qt.jsx)(tH,{as:qj,fullWidth:!0,size:"small",id:t.value,name:t.value,variant:"outlined",type:"number",placeholder:R("message:rpm_DurationValuePlaceHolder"),endAdornment:(0,qt.jsx)(tw,{position:"end",children:(0,qt.jsx)(sy,{title:R("message:rpm_DurationValueHelp"),placement:"top",children:(0,qt.jsx)(wh,{size:"small",disableRipple:!0,sx:{p:0},children:(0,qt.jsx)(pM.A,{fontSize:"small"})})})})}),(0,qt.jsx)(dH,{name:t.value,children:e=>(0,qt.jsx)(v_,{error:!0,children:R(e,{field:R("rpm_Duration")})})}),(0,qt.jsx)(v_,{error:!0,children:o.duration})]})}),(0,qt.jsx)(Ff,{item:!0,xs:6,children:(0,qt.jsxs)(op,{sx:{"& .MuiOutlinedInput-root":{background:"#ffffff"},"& .MuiOutlinedInput-input":{py:1.0625}},children:[(0,qt.jsx)(tH,{as:G_,fullWidth:!0,size:"small",id:null===t||void 0===t?void 0:t.unit,name:null===t||void 0===t?void 0:t.unit,value:null===n||void 0===n?void 0:n.duration_unit,variant:"outlined",endAdornment:(0,qt.jsx)(tw,{position:"end",sx:{position:"absolute",right:"28px"},children:(0,qt.jsx)(sy,{title:R("message:rpm_DiseaseDurationHelp"),placement:"top",children:(0,qt.jsx)(wh,{size:"small",disableRipple:!0,sx:{p:0},children:(0,qt.jsx)(pM.A,{fontSize:"small"})})})}),children:null===Sd||void 0===Sd?void 0:Sd.map(e=>(0,qt.jsx)(mf,{value:e.value,children:R("rpm_".concat(e.name))},e.value))}),(0,qt.jsx)(dH,{name:null===t||void 0===t?void 0:t.unit,children:e=>(0,qt.jsx)(v_,{error:!0,children:R(e,{field:R("rpm_Duration")})})})]})})]})})},W=e=>{var t,n,r,i;let{diseaseObj:o}=e;const[a,s]=We.useState(2),l=e=>{const t=null===e||void 0===e?void 0:e.split("/");return t[(null===t||void 0===t?void 0:t.length)-1]};return(0,qt.jsxs)(qt.Fragment,{children:[null===o||void 0===o||null===(t=o.files)||void 0===t||null===(n=t.slice(0,a))||void 0===n?void 0:n.map(e=>(0,qt.jsx)(Eb,{sx:{ml:1,mb:1},"data-id":e.id,icon:(0,qt.jsx)(Aje.A,{fontSize:"small"}),label:l(e.file_name),variant:"outlined",onDelete:()=>A(e),deleteIcon:(0,qt.jsx)(Sje.A,{color:"primary"})},e.id)),(null===o||void 0===o||null===(r=o.files)||void 0===r?void 0:r.length)>2&&(0,qt.jsx)(sy,{title:(null===o||void 0===o||null===(i=o.files)||void 0===i?void 0:i.length)===a?R("rpm_Less"):R("rpm_ShowMore"),children:(0,qt.jsx)(wh,{disableRipple:!0,size:"small",onClick:()=>{var e,t;a===(null===o||void 0===o||null===(e=o.files)||void 0===e?void 0:e.length)?s(2):s(null===o||void 0===o||null===(t=o.files)||void 0===t?void 0:t.length)},children:"..."})})]})},U=e=>{let{remark:t}=e;const[n,r]=We.useState(150);return(0,qt.jsxs)(qt.Fragment,{children:[null===t||void 0===t?void 0:t.substring(0,n),(null===t||void 0===t?void 0:t.length)>150&&(0,qt.jsx)(sy,{title:(null===t||void 0===t?void 0:t.length)===n?R("rpm_Less"):R("rpm_ShowMore"),children:(0,qt.jsx)(wh,{disableRipple:!0,size:"small",onClick:()=>{n===(null===t||void 0===t?void 0:t.length)?r(150):r(null===t||void 0===t?void 0:t.length)},children:"..."})})]})},V=()=>{var e,t,n,r,i,o,a;return!cs(null===k||void 0===k||null===(e=k.data)||void 0===e||null===(t=e.local_files)||void 0===t||null===(n=t.local)||void 0===n?void 0:n.files)&&(null===k||void 0===k||null===(r=k.data)||void 0===r||null===(i=r.local_files)||void 0===i||null===(o=i.local)||void 0===o||null===(a=o.files)||void 0===a?void 0:a.map((e,t)=>(0,qt.jsx)(Eb,{sx:{ml:1,mb:1},icon:(0,qt.jsx)(Aje.A,{fontSize:"small"}),label:null===e||void 0===e?void 0:e.name,variant:"outlined"},t)))};return We.useEffect(()=>{const e={breadcrumb:F};cs(M)||cs(E)||P(NC(e))},[M,E]),(0,qt.jsx)(qt.Fragment,{children:(0,qt.jsx)(op,{sx:{width:"100%"},children:(0,qt.jsxs)(Ff,{container:!0,spacing:2.5,children:[(0,qt.jsxs)(Ff,{item:!0,xs:12,children:[(0,qt.jsx)(Kz,{initialValues:cs(null===$||void 0===$?void 0:$.diseaseList)?{diseaseList:[]}:$,enableReinitialize:!0,children:e=>{var t,n;let{values:r,setFieldValue:i,setErrors:_,errors:C}=e;return(0,qt.jsxs)(qt.Fragment,{children:[(0,qt.jsx)(op,{sx:{mb:2.5},position:"relative",children:(0,qt.jsxs)(Ff,{container:!0,spacing:2,alignItems:"center",children:[(0,qt.jsx)(Ff,{item:!0,xs:!0,sx:{display:{xs:"none",md:"block"}},children:(0,qt.jsx)(Cf,{variant:"h5",component:"h5",children:R("rpm_MedicalHistory")})}),(0,qt.jsx)(Ff,{item:!0,xs:!0,sx:{display:{xs:"block",md:"none"}},children:(0,qt.jsx)(op,{children:(0,qt.jsx)(Cf,{variant:"h6",component:"h6",children:R("rpm_MedicalHistory")})})}),(0,qt.jsx)(Ff,{item:!0,children:(null===M||void 0===M?void 0:M.is_hospital)&&(0,qt.jsx)(xh,{variant:"contained",color:"primary",disableElevation:!0,onClick:()=>D("family"),className:"medicalHistory-tour-step2",children:R("rpm_FamilyMedicalHistory")})}),(0,qt.jsx)(Ff,{item:!0,sx:{display:"none"},children:(0,qt.jsx)(xh,{variant:"contained",color:"primary",disableElevation:!0,disabled:null===r||void 0===r||null===(t=r.diseaseList)||void 0===t||null===(n=t.find(e=>null===e||void 0===e?void 0:e.isEdit))||void 0===n?void 0:n.isEdit,onClick:()=>L.current.push({disease_name:"",duration:"",duration_unit:"",start_date:null,end_date:null,remark:"",reports:"",isEdit:!0}),children:R("rpm_AddDisease")})})]})}),null!==M&&void 0!==M&&M.is_hospital?(0,qt.jsx)(nH,{children:(0,qt.jsx)(op,{children:(0,qt.jsx)(UT,{order:o,orderBy:a,setOrder:s,setOrderBy:l,data:cs(null===r||void 0===r?void 0:r.diseaseList)?[{}]:null===r||void 0===r?void 0:r.diseaseList,headCells:d,dataParameter:c,selected:u,setSelected:p,isSelection:h,noDataImage:m,fetchList:f,pageDetails:g,skeletonVrows:6,className:"theme_scroll",children:(0,qt.jsx)(lH,{name:"diseaseList",children:e=>{var t,n,o,a;return L.current=e,(0,qt.jsx)(qt.Fragment,{children:cs(null===r||void 0===r?void 0:r.diseaseList)?(0,qt.jsx)(qt.Fragment,{children:(0,qt.jsx)(cw,{children:(0,qt.jsxs)(gw,{colSpan:6,style:{textAlign:"center"},children:[(0,qt.jsx)("img",{src:m,style:{display:"block",margin:"auto"}}),(null===M||void 0===M||null===(n=M.permissions)||void 0===n?void 0:n.showAddMedicalHistoryBtn)&&(0,qt.jsxs)(xh,{className:"medicalHistory-tour-step0",variant:"contained",color:"primary",disableElevation:!0,disabled:null===r||void 0===r||null===(o=r.diseaseList)||void 0===o||null===(a=o.find(e=>null===e||void 0===e?void 0:e.isEdit))||void 0===a?void 0:a.isEdit,onClick:()=>e.push({disease_name:"",duration:"",duration_unit:"",start_date:null,end_date:null,remark:"",reports:"",isEdit:!0,relationship:"SELF"}),children:[(0,qt.jsx)(jue.A,{}),R("rpm_AddNewDisease")]})]})})}):null===r||void 0===r||null===(t=r.diseaseList)||void 0===t?void 0:t.map((t,n)=>{var o,a,s,l,c,d,u,p,h,m;return(0,qt.jsxs)(We.Fragment,{children:[(0,qt.jsxs)(cw,{sx:{"&:last-child td, &:last-child th":{border:0}},children:[(0,qt.jsx)(gw,{sx:{minWidth:250},children:null!==t&&void 0!==t&&t.isEdit?(0,qt.jsx)(z,{diseaseName:t,name:"diseaseList.".concat(n,".disease_name"),setFieldValue:i,errors:C}):null===t||void 0===t?void 0:t.disease_name}),(0,qt.jsx)(gw,{sx:{minWidth:"CUSTOM"===(null===t||void 0===t?void 0:t.duration_unit)?350:250},children:null!==t&&void 0!==t&&t.isEdit?(0,qt.jsx)(H,{errors:C,data:t,setFieldValue:i,name:{value:"diseaseList.".concat(n,".duration"),unit:"diseaseList.".concat(n,".duration_unit"),start_date:"diseaseList.".concat(n,".start_date"),end_date:"diseaseList.".concat(n,".end_date")}}):(0,qt.jsx)(qt.Fragment,{children:t.custom_duration?t.custom_duration+" "+(null===t||void 0===t?void 0:t.duration_unit):I(t.duration_unit,null===t||void 0===t?void 0:t.start_date,t.end_date)})}),(0,qt.jsx)(gw,{sx:{minWidth:250,whiteSpace:"normal"},children:null!==t&&void 0!==t&&t.isEdit?(0,qt.jsx)(B,{name:"diseaseList.".concat(n,".remark"),errors:C}):null!==t&&void 0!==t&&t.remark?(0,qt.jsx)(U,{remark:null===t||void 0===t?void 0:t.remark}):"NA"}),(0,qt.jsx)(gw,{sx:{maxWidth:"240px",whiteSpace:"normal"},children:null!==t&&void 0!==t&&t.isEdit?(0,qt.jsxs)(qt.Fragment,{children:[(0,qt.jsx)(V,{}),cs(null===k||void 0===k||null===(o=k.data)||void 0===o||null===(a=o.local_files)||void 0===a||null===(s=a.local)||void 0===s?void 0:s.files)?j("diseaseList.".concat(n,".reports"),t):T("diseaseList.".concat(n,".reports"),t)]}):(0,qt.jsx)(W,{diseaseObj:t})}),(0,qt.jsx)(gw,{children:(0,qt.jsx)(op,{className:"medicalHistory-tour-step3",children:null!==t&&void 0!==t&&t.isEdit?(0,qt.jsxs)(qt.Fragment,{children:[b(t,{setErrors:_}),x(t,e.remove,n)]}):(0,qt.jsxs)(qt.Fragment,{children:[(null===M||void 0===M||null===(l=M.permissions)||void 0===l?void 0:l.showEditMedicalHistoryBtn)&&v(t),(null===M||void 0===M||null===(c=M.permissions)||void 0===c?void 0:c.showDeleteMedicalHistoryBtn)&&y(t)]})})})]}),(null===M||void 0===M||null===(d=M.permissions)||void 0===d?void 0:d.showAddMedicalHistoryBtn)&&(null===r||void 0===r||null===(u=r.diseaseList)||void 0===u?void 0:u.length)-1===n&&(0,qt.jsx)(cw,{children:(0,qt.jsx)(gw,{colSpan:5,children:(0,qt.jsxs)(xh,{variant:"contained",color:"primary",disableElevation:!0,className:(null===M||void 0===M||null===(p=M.permissions)||void 0===p?void 0:p.showAddMedicalHistoryBtn)&&"medicalHistory-tour-step0",disabled:null===r||void 0===r||null===(h=r.diseaseList)||void 0===h||null===(m=h.find(e=>null===e||void 0===e?void 0:e.isEdit))||void 0===m?void 0:m.isEdit,onClick:()=>e.push({disease_name:"",duration:"",duration_unit:"",start_date:null,end_date:null,remark:"",reports:"",isEdit:!0,relationship:"SELF"}),children:[(0,qt.jsx)(jue.A,{}),R("rpm_AddNewDisease")]})})})]},n)})})}})})})}):(0,qt.jsxs)(op,{py:6,bgcolor:"#fff",border:"1px solid rgba(0, 0, 0, 0.12)",borderRadius:"4px",children:[(0,qt.jsx)("img",{src:GC,alt:"No Data Found",style:{display:"block",margin:"auto",width:"100%",maxWidth:"300px",height:"auto"}}),(0,qt.jsx)(op,{px:2,color:"#3f51b5",mt:2,display:"flex",justifyContent:"center",alignItems:"center",textAlign:"center",children:R("rpm_To_Explore_This")})]})]})}},"addMedicalHistory_formik"),(null===M||void 0===M?void 0:M.is_hospital)&&(0,qt.jsx)(op,{sx:e=>({pr:2,bgcolor:e.palette.common.white}),children:(0,qt.jsx)(KE,{pageDetails:g,fetchListFunction:f})})]}),(null===M||void 0===M?void 0:M.is_hospital)&&(0,qt.jsx)(Ff,{item:!0,xs:12,children:(0,qt.jsx)(op,{sx:e=>({p:2,bgcolor:e.palette.common.white}),children:(0,qt.jsxs)(op,{sx:{mb:2.5},position:"relative",children:[(0,qt.jsx)(Ff,{container:!0,spacing:2,alignItems:"center",children:(0,qt.jsx)(Ff,{item:!0,xs:!0,md:4,children:(0,qt.jsx)(Cf,{variant:"h5",component:"h5",children:R("rpm_OtherHealthIssues")})})}),null!==M&&void 0!==M&&null!==(t=M.permissions)&&void 0!==t&&t.showSocialHistoryList?(0,qt.jsx)(Kz,{initialValues:{other_histories:_},onSubmit:C,enableReinitialize:!0,children:e=>{var t;let{values:n,setFieldValue:r,resetForm:i}=e;return(0,qt.jsxs)(nH,{children:[(null===M||void 0===M||null===(t=M.permissions)||void 0===t?void 0:t.editSocialHistoryList)&&(0,qt.jsx)(Ff,{container:!0,spacing:2,justifyContent:"end",position:"absolute",top:"15px",children:w?(0,qt.jsxs)(qt.Fragment,{children:[(0,qt.jsx)(Ff,{item:!0,children:(0,qt.jsx)(xh,{variant:"outlined",color:"primary",disableElevation:!0,onClick:()=>O(i),children:R("rpm_Cancel")})}),(0,qt.jsx)(Ff,{item:!0,children:(0,qt.jsx)(xh,{variant:"contained",color:"primary",disableElevation:!0,type:"submit",children:R("rpm_Save")})})]}):(0,qt.jsx)(Ff,{item:!0,children:(0,qt.jsx)(xh,{variant:"outlined",color:"primary",disableElevation:!0,onClick:S,className:"medicalHistory-tour-step1",children:R("rpm_Edit")})})}),(0,qt.jsx)(lH,{name:"other_histories",children:()=>{var e;return(0,qt.jsx)(qt.Fragment,{children:null===n||void 0===n||null===(e=n.other_histories)||void 0===e?void 0:e.map((e,t)=>(0,qt.jsxs)(Ff,{container:!0,spacing:2,alignItems:"center",mt:.05,children:[(0,qt.jsx)(Ff,{item:!0,xs:!0,md:7,lg:5,children:(0,qt.jsxs)(op,{sx:{display:"flex",alignItems:"start"},children:[(0,qt.jsx)(kbe.A,{fontSize:"small",sx:{fontSize:8,mt:1,color:"grey.700"}}),(0,qt.jsx)(Cf,{variant:"body1",sx:{pl:.5},children:null===e||void 0===e?void 0:e.question})]})}),w?(0,qt.jsx)(qt.Fragment,{children:(0,qt.jsx)(Ff,{item:!0,children:(0,qt.jsxs)(tH,{row:!0,as:e_e,id:"other_histories.".concat(t,".answer"),name:"other_histories.".concat(t,".answer"),value:null===e||void 0===e?void 0:e.answer,onChange:e=>r("other_histories.".concat(t,".answer"),e.target.value),children:[(0,qt.jsx)(wE,{value:"Yes",control:(0,qt.jsx)(f_e,{}),label:"Yes"}),(0,qt.jsx)(wE,{value:"No",control:(0,qt.jsx)(f_e,{}),label:"No"})]})})}):(0,qt.jsx)(Ff,{item:!0,children:null===e||void 0===e?void 0:e.answer})]},t))})}})]})}}):(0,qt.jsx)(LC,{})]})})})]})})})}g_e.defaultProps={allDiseaseList:[],personalDiseaseHead:[],pageDetails:{},order:"",orderBy:"",setOrder:()=>{},setOrderBy:()=>{},dataParameter:"",checkState:"",onCheck:()=>{},isSelection:"",nodata:"",personalDiseaseList:[],otherDiseaseList:[],familyDiseaseList:[],fetchDiseaseList:()=>{},editButton:()=>{},viewButton:()=>{},deleteButton:()=>{},isEdit:!1,saveButton:()=>{},fileUploadButton:()=>{},editRow:[],closeButton:()=>{},filterOtherHistory:[],updateOtherHistory:()=>{},omhEdit:!1,handleOtherHistory:()=>{},downloadFile:()=>{},fileModal:{},fileUploadIconButton:()=>{},patientData:{},program:{},setFilterOtherHistory:()=>{},handleCancel:()=>{}};const v_e=g_e;var x_e=n(45604),y_e=n(37602),b_e=n(95540),j_e=n(76164);const __e=(0,Cy.A)((0,qt.jsx)("path",{d:"M6 3v6c0 2.97 2.16 5.43 5 5.91V19H8v2h8v-2h-3v-4.09c2.84-.48 5-2.94 5-5.91V3zm10 5H8V5h8z"}),"WineBar"),C_e=(0,Cy.A)((0,qt.jsx)("path",{d:"M2 16h15v3H2zm18.5 0H22v3h-1.5zM18 16h1.5v3H18zm.85-8.27c.62-.61 1-1.45 1-2.38C19.85 3.5 18.35 2 16.5 2v1.5c1.02 0 1.85.83 1.85 1.85S17.52 7.2 16.5 7.2v1.5c2.24 0 4 1.83 4 4.07V15H22v-2.24c0-2.22-1.28-4.14-3.15-5.03m-2.82 2.47H14.5c-1.02 0-1.85-.98-1.85-2s.83-1.75 1.85-1.75v-1.5c-1.85 0-3.35 1.5-3.35 3.35s1.5 3.35 3.35 3.35h1.53c1.05 0 1.97.74 1.97 2.05V15h1.5v-1.64c0-1.81-1.6-3.16-3.47-3.16"}),"SmokingRooms");function w_e(e){var t;let{allDiseaseList:n,personalDiseaseList:r,nodata:o,closeButtonMobile:a,mobileDeleteButton:s,editIcon:l,saveButtonMobile:c,fileUploadButton:d,filterOtherHistory:u,updateOtherHistory:p,omhEdit:h,handleOtherHistory:m,downloadFile:f,fileModal:g,fileUploadIconButton:v,patientData:x,program:y,handleCancel:b}=e;const j=zT({label:{fontSize:"14px !important",color:"#7986cb",fontWeight:"600 !important",letterSpacing:"0.02em"},subTitle:{fontSize:"16px",color:"#000000de"},shorttextOverflow:{textOverflow:"ellipsis",maxWidth:"170px",overflow:"hidden",whiteSpace:"nowrap",width:"100%"},downloadButton:{maxWidth:"260px",margin:"5px 0",background:"#3f51b517",border:"1px solid #3f51b517",flexDirection:"row-reverse","& .MuiChip-label":{paddingLeft:"5px"},"& .MuiChip-deleteIcon":{color:"#3f51b5b0"}},newDiseaseaccordian:{"& .MuiPaper-root":{borderRadius:"4px",background:"#e8eaf6"},"& .MuiButtonBase-root":{width:"100%",justifyContent:"flex-end",minHeight:"30px",flexDirection:"row-reverse","& .MuiTypography-caption":{width:"100%",textAlign:"center"}},"& .MuiAccordionSummary-content":{margin:"8px 0","& .MuiTypography-root":{fontWeight:"600",color:"#3f51b5"}},"& .MuiAccordionDetails-root":{background:"#ffffff"},"& .MuiAccordionSummary-expandIconWrapper":{background:"#3f51b5",borderRadius:"50px",height:"20px",width:"20px",marginRight:"10px","& .MuiSvgIcon-root":{color:"#ffffff",fontSize:"20px"}}},durationDataField:{"& .MuiSvgIcon-root":{width:"21px",height:"21px"}},diseaseNameField:{"& .MuiCardHeader-content":{width:"100%"}},labelHistory:{border:"1px solid #efefef",display:"flex",alignItems:"center",boxShadow:"0px 1px 2px 0px #cdcdcd",borderRadius:"40px",margin:"6px 3px","& .MuiButtonBase-root":{padding:"3px"}},successHistory:{background:"#e8eaf6",color:"#2c387e","& .MuiSvgIcon-root":{color:"#2c387e"}},errorHistory:{background:"#f5f5f5",color:"#a3a3a3","& .MuiSvgIcon-root":{color:"#a3a3a3"}},fieldWidth:{width:"140px"},diseaseButton:{fontSize:"16px",fontWeight:"600",padding:"0"},mainUploads:{"& .MuiChip-root":{maxWidth:"200px",marginBottom:"5px"}}})(),[_,C]=(0,We.useState)(!1),w=()=>{C(!_)},{t:S}=Vg(),A=Nt(),k=so(),T=db(),E=(0,We.useRef)(null),M=(e,t,n)=>{const r=sa()(t).format("YYYY"),i=sa()(n).format("YYYY");return"CUSTOM"===e?"".concat(r," - ").concat(i):"PRESENT"===e?"".concat(r," - ").concat(e):void 0},O=[{name:S("rpm_RPM"),url:ld.DOCTOR.PROGRAM},{name:null===y||void 0===y?void 0:y.display_name,url:"".concat(ld.DOCTOR.PROGRAM,"/").concat(null===y||void 0===y?void 0:y.code,"/patients")},{name:"".concat((null===x||void 0===x?void 0:x.first_name)||""," ").concat((null===x||void 0===x?void 0:x.last_name)||""),url:"".concat(ld.DOCTOR.PROGRAM,"/").concat(null===y||void 0===y?void 0:y.code,"/patients/").concat(null===x||void 0===x?void 0:x.id,"/dashboard")},{name:S("rpm_medicalHistory"),url:""}],R={diseaseList:null===r||void 0===r?void 0:r.map(e=>(0,i.A)((0,i.A)({},e),{},{duration:null===e||void 0===e?void 0:e.custom_duration}))},P=e=>{let{name:t,errors:n}=e;return(0,qt.jsxs)(op,{sx:{"& .MuiOutlinedInput-root":{background:"#ffffff"},"& .MuiOutlinedInput-input":{py:1.0625}},children:[(0,qt.jsx)(tH,{as:qj,fullWidth:!0,size:"small",id:t,name:t,variant:"outlined",placeholder:S("message:rpm_RemarkPlaceHolder"),endAdornment:(0,qt.jsx)(tw,{position:"end",children:(0,qt.jsx)(sy,{title:S("message:rpm_DiseaseRemarkHelp"),placement:"top",children:(0,qt.jsx)(wh,{size:"small",disableRipple:!0,className:"helpIconButton",children:(0,qt.jsx)(pM.A,{fontSize:"small"})})})})}),(0,qt.jsx)(dH,{name:t,children:e=>(0,qt.jsx)(v_,{error:!0,children:S(e,{field:S("rpm_Remark")})})}),(0,qt.jsx)(v_,{error:!0,children:n.remark})]})},D=e=>{let{name:t,diseaseName:r,setFieldValue:o,errors:a}=e;return(0,qt.jsxs)(op,{sx:{"& .MuiOutlinedInput-root":{background:"#ffffff"},"& .MuiOutlinedInput-input":{py:1.0625}},children:[(0,qt.jsx)(tH,{component:aj,fullWidth:!0,size:"small",id:t,name:t,variant:"outlined",value:r||null,options:n||[],filterOptions:(e,t)=>{const n=T(e,t),{inputValue:r}=t,i=e.some(e=>r===e.disease_name);return""===r||i||n.push({inputValue:r,disease_name:'Add "'.concat(r,'"')}),n},getOptionLabel:e=>"string"===typeof e?e:e.inputValue?e.inputValue:e.disease_name,renderOption:(e,t)=>(0,qt.jsx)(op,(0,i.A)((0,i.A)({component:"li"},e),{},{children:t.disease_name})),onChange:(e,n)=>{"string"===typeof n?o(t,n||""):n&&n.inputValue?o(t,n.inputValue?n.inputValue:""):o(t,null!==n&&void 0!==n&&n.disease_name?n.disease_name:"")},freeSolo:!0,renderInput:e=>(0,qt.jsx)(Q_,(0,i.A)((0,i.A)({},e),{},{placeholder:S("rpm_DiseaseName")}))}),(0,qt.jsx)(dH,{name:t,children:e=>(0,qt.jsx)(v_,{error:!0,children:S(e,{field:S("rpm_SelectDisease")})})}),(0,qt.jsx)(v_,{error:!0,children:S(a.disease_name,{field:S("rpm_DiseaseName")})})]})},N=e=>{let{name:t,data:n,setFieldValue:r,errors:o}=e;return(0,qt.jsx)(qt.Fragment,{children:"CUSTOM"===(null===n||void 0===n?void 0:n.duration_unit)||"PRESENT"===(null===n||void 0===n?void 0:n.duration_unit)?(0,qt.jsxs)(Ff,{container:!0,spacing:1,className:j.durationDataField,children:[(0,qt.jsx)(Ff,{item:!0,xs:5,children:(0,qt.jsxs)(op,{className:"pres_inputTab",sx:{"& .MuiOutlinedInput-input":{py:1.0625}},children:[(0,qt.jsx)(WM,{dateAdapter:DI,children:(0,qt.jsx)(tH,{as:fD,views:["year"],size:"small",id:t.start_date,name:t.start_date,value:n.start_date,onChange:e=>r(t.start_date,e),onPaste:e=>{e.preventDefault()},renderInput:e=>(0,qt.jsx)(Q_,(0,i.A)((0,i.A)({},e),{},{onKeyDown:e=>{e.preventDefault()}})),maxDate:new Date})}),(0,qt.jsx)(v_,{error:!0,children:S(o.start_date,{field:S("rpm_From")})})]})}),(0,qt.jsx)(Ff,{item:!0,xs:7,children:(0,qt.jsxs)(op,{display:"flex",alignItems:"center",children:[(0,qt.jsxs)(op,{children:["CUSTOM"===(null===n||void 0===n?void 0:n.duration_unit)&&(0,qt.jsxs)(op,{className:"pres_inputTab",sx:{"& .MuiOutlinedInput-input":{py:1.0625}},children:[(0,qt.jsx)(WM,{dateAdapter:DI,children:(0,qt.jsx)(tH,{as:fD,views:["year"],size:"small",id:t.end_date,name:t.end_date,value:n.end_date,onChange:e=>r(t.end_date,e),onPaste:e=>{e.preventDefault()},renderInput:e=>(0,qt.jsx)(Q_,(0,i.A)((0,i.A)({className:j.fieldWidth},e),{},{onKeyDown:e=>{e.preventDefault()}})),minDate:n.start_date?(()=>{const e=new Date(n.start_date),t=e.setFullYear(e.getFullYear()+1);return new Date(t)})(n.start_date):void 0,maxDate:new Date})}),(0,qt.jsx)(v_,{error:!0,children:S(o.end_date,{field:S("rpm_To")})})]}),"PRESENT"===(null===n||void 0===n?void 0:n.duration_unit)&&(0,qt.jsx)(op,{sx:{"& .MuiOutlinedInput-root":{background:"#ffffff"},"& .MuiOutlinedInput-input":{py:1.0625}},children:(0,qt.jsx)(tH,{as:G_,fullWidth:!0,size:"small",id:null===t||void 0===t?void 0:t.unit,name:null===t||void 0===t?void 0:t.unit,value:null===n||void 0===n?void 0:n.duration_unit,variant:"outlined",className:j.fieldWidth,endAdornment:(0,qt.jsx)(tw,{position:"end",sx:{position:"absolute",right:"28px"},children:(0,qt.jsx)(sy,{title:S("message:rpm_DiseaseDurationHelp"),placement:"top",children:(0,qt.jsx)(wh,{size:"small",disableRipple:!0,sx:{p:0},children:(0,qt.jsx)(pM.A,{fontSize:"small"})})})}),children:null===Sd||void 0===Sd?void 0:Sd.map(e=>(0,qt.jsx)(mf,{value:e.value,children:S("rpm_".concat(e.name))},e.value))})})]}),(0,qt.jsx)(op,{children:(0,qt.jsx)(wh,{color:"error",onClick:()=>r(t.unit,""),sx:{width:"max-content",justifyContent:"flex-start"},children:(0,qt.jsx)(_je.A,{fontSize:"small",sx:{width:18,height:18}})})})]})})]}):(0,qt.jsxs)(Ff,{container:!0,spacing:1,children:[(0,qt.jsx)(Ff,{item:!0,xs:6,children:(0,qt.jsxs)(op,{className:"hide_num_arrow",sx:{"& .MuiOutlinedInput-root":{background:"#ffffff"},"& .MuiOutlinedInput-input":{py:1.0625}},children:[(0,qt.jsx)(tH,{as:qj,fullWidth:!0,size:"small",id:t.value,name:t.value,variant:"outlined",type:"number",placeholder:S("message:rpm_DurationValuePlaceHolder"),endAdornment:(0,qt.jsx)(tw,{position:"end",children:(0,qt.jsx)(sy,{title:S("message:rpm_DurationValueHelp"),placement:"top",children:(0,qt.jsx)(wh,{size:"small",disableRipple:!0,className:"helpIconButton",children:(0,qt.jsx)(pM.A,{fontSize:"small"})})})})}),(0,qt.jsx)(dH,{name:t.value,children:e=>(0,qt.jsx)(v_,{error:!0,children:S(e,{field:S("rpm_Duration")})})}),(0,qt.jsx)(v_,{error:!0,children:o.duration})]})}),(0,qt.jsx)(Ff,{item:!0,xs:6,children:(0,qt.jsxs)(op,{sx:{"& .MuiOutlinedInput-root":{background:"#ffffff"},"& .MuiOutlinedInput-input":{py:1.0625}},children:[(0,qt.jsx)(tH,{as:G_,fullWidth:!0,size:"small",id:null===t||void 0===t?void 0:t.unit,name:null===t||void 0===t?void 0:t.unit,value:null===n||void 0===n?void 0:n.duration_unit,variant:"outlined",endAdornment:(0,qt.jsx)(tw,{position:"end",sx:{position:"absolute",right:"28px"},children:(0,qt.jsx)(sy,{title:S("message:rpm_DiseaseDurationHelp"),placement:"top",children:(0,qt.jsx)(wh,{size:"small",disableRipple:!0,className:"helpIconButton",children:(0,qt.jsx)(pM.A,{fontSize:"small"})})})}),children:null===Sd||void 0===Sd?void 0:Sd.map(e=>(0,qt.jsx)(mf,{value:e.value,children:S("rpm_".concat(e.name))},e.value))}),(0,qt.jsx)(dH,{name:null===t||void 0===t?void 0:t.unit,children:e=>(0,qt.jsx)(v_,{error:!0,children:S(e,{field:S("rpm_Duration")})})})]})})]})})},L=e=>{var t,n,r,i;let{diseaseObj:o}=e;const[a,s]=We.useState(2),l=e=>{const t=null===e||void 0===e?void 0:e.split("/");return t[(null===t||void 0===t?void 0:t.length)-1]};return(0,qt.jsxs)(qt.Fragment,{children:[null===o||void 0===o||null===(t=o.files)||void 0===t||null===(n=t.slice(0,a))||void 0===n?void 0:n.map(e=>(0,qt.jsx)(Eb,{"data-id":e.id,icon:(0,qt.jsx)(Aje.A,{fontSize:"small"}),label:l(e.file_name),variant:"outlined",onDelete:()=>f(e),deleteIcon:(0,qt.jsx)(Sje.A,{color:"primary"})},e.id)),(null===o||void 0===o||null===(r=o.files)||void 0===r?void 0:r.length)>2&&(0,qt.jsx)(sy,{title:(null===o||void 0===o||null===(i=o.files)||void 0===i?void 0:i.length)===a?S("rpm_Less"):S("rpm_ShowMore"),children:(0,qt.jsx)(wh,{disableRipple:!0,size:"small",onClick:()=>{var e,t;a===(null===o||void 0===o||null===(e=o.files)||void 0===e?void 0:e.length)?s(2):s(null===o||void 0===o||null===(t=o.files)||void 0===t?void 0:t.length)},children:"..."})})]})},I=e=>{let{remark:t}=e;const[n,r]=We.useState(150);return(0,qt.jsxs)(qt.Fragment,{children:[null===t||void 0===t?void 0:t.substring(0,n),(null===t||void 0===t?void 0:t.length)>150&&(0,qt.jsx)(sy,{title:(null===t||void 0===t?void 0:t.length)===n?S("rpm_Less"):S("rpm_ShowMore"),children:(0,qt.jsx)(wh,{disableRipple:!0,size:"small",onClick:()=>{n===(null===t||void 0===t?void 0:t.length)?r(150):r(null===t||void 0===t?void 0:t.length)},children:"..."})})]})},F=()=>{var e,t,n,r,i,o,a;return!cs(null===g||void 0===g||null===(e=g.data)||void 0===e||null===(t=e.local_files)||void 0===t||null===(n=t.local)||void 0===n?void 0:n.files)&&(null===g||void 0===g||null===(r=g.data)||void 0===r||null===(i=r.local_files)||void 0===i||null===(o=i.local)||void 0===o||null===(a=o.files)||void 0===a?void 0:a.map((e,t)=>(0,qt.jsx)(Eb,{className:"textIcon",sx:{mt:1},icon:(0,qt.jsx)(Aje.A,{fontSize:"small"}),label:null===e||void 0===e?void 0:e.name,variant:"outlined",deleteIcon:(0,qt.jsx)(Sje.A,{color:"primary"})},t)))};return We.useEffect(()=>{const e={breadcrumb:O};cs(y)||cs(x)||A(NC(e))},[y,x]),(0,qt.jsx)(qt.Fragment,{children:(0,qt.jsx)(op,{sx:{width:"100%"},children:(0,qt.jsx)(Ff,{container:!0,spacing:2.5,children:(0,qt.jsxs)(Ff,{item:!0,xs:12,children:[(0,qt.jsx)(Kz,{initialValues:cs(null===R||void 0===R?void 0:R.diseaseList)?{diseaseList:[]}:R,enableReinitialize:!0,children:e=>{var t,n;let{values:r,setFieldValue:i,setErrors:u,errors:p}=e;return(0,qt.jsxs)(qt.Fragment,{children:[(0,qt.jsx)(op,{position:"relative",children:(0,qt.jsx)(op,{position:"absolute",top:"-48px",left:"40px",sx:{display:{xs:"block",md:"none"}},children:(0,qt.jsx)(Cf,{variant:"h6",component:"h6",fontSize:16,children:S("rpm_MedicalHistory")})})}),(null===y||void 0===y?void 0:y.is_hospital)&&(0,qt.jsx)(op,{children:cs(null===r||void 0===r?void 0:r.diseaseList)?null:(0,qt.jsx)(Ff,{item:!0,children:(0,qt.jsxs)(xh,{fullWidth:!0,variant:"contained",color:"primary",disableElevation:!0,disabled:null===r||void 0===r||null===(t=r.diseaseList)||void 0===t||null===(n=t.find(e=>null===e||void 0===e?void 0:e.isEdit))||void 0===n?void 0:n.isEdit,onClick:()=>E.current.unshift({disease_name:"",duration:"",duration_unit:"",start_date:null,end_date:null,remark:"",reports:"",isEdit:!0,relationship:"SELF"}),children:[(0,qt.jsx)(Jxe.A,{}),S("rpm_AddDisease")]})})}),null!==y&&void 0!==y&&y.is_hospital?(0,qt.jsx)(nH,{children:(0,qt.jsx)(Ff,{container:!0,spacing:1,children:(0,qt.jsx)(lH,{name:"diseaseList",children:e=>{var t,n,h,m,f;return E.current=e,(0,qt.jsx)(qt.Fragment,{children:cs(null===r||void 0===r?void 0:r.diseaseList)?(0,qt.jsx)(Ff,{item:!0,xs:12,children:(0,qt.jsxs)(op,{textAlign:"center",children:[(null===y||void 0===y||null===(n=y.permissions)||void 0===n?void 0:n.showAddMedicalHistoryBtn)&&(0,qt.jsx)(qt.Fragment,{children:(0,qt.jsx)(op,{className:j.newDiseaseaccordian,mb:1,children:(0,qt.jsxs)(CV,{expanded:_,onChange:w,children:[(0,qt.jsx)(LV,{expandIcon:_?(0,qt.jsx)(j_e.A,{}):(0,qt.jsx)(Jxe.A,{}),"aria-controls":"panel1a-content",id:"panel1a-header",children:(0,qt.jsx)(xh,{className:j.diseaseButton,disableElevation:!0,disabled:null===r||void 0===r||null===(h=r.diseaseList)||void 0===h||null===(m=h.find(e=>null===e||void 0===e?void 0:e.isEdit))||void 0===m?void 0:m.isEdit,onClick:()=>e.push({disease_name:"",duration:"",duration_unit:"",start_date:null,end_date:null,remark:"",reports:"",isEdit:!0,relationship:"SELF"}),children:S("rpm_AddNewDisease")})}),(0,qt.jsx)(TV,{children:cs(null===r||void 0===r?void 0:r.diseaseList)?(0,qt.jsx)("div",{children:"No diseases found"}):null===r||void 0===r||null===(f=r.diseaseList)||void 0===f?void 0:f.map((e,t)=>{var n,r,o;return(0,qt.jsxs)(We.Fragment,{children:[(0,qt.jsxs)(op,{children:[(0,qt.jsxs)(o_,{htmlFor:"diseasename",className:j.label,sx:{mb:.5},children:[S("rpm_DiseaseName"),"*"]}),(0,qt.jsx)(D,{diseaseName:e,name:"diseaseList.".concat(t,".disease_name"),setFieldValue:i,errors:p}),e.name]}),(0,qt.jsxs)(op,{sx:{minWidth:"CUSTOM"===(null===e||void 0===e?void 0:e.duration_unit)?350:250},children:[(0,qt.jsx)(o_,{htmlFor:"diseasename",className:j.label,sx:{mb:.5,mt:1},children:S("rpm_Duration")}),(0,qt.jsx)(N,{errors:p,data:e,setFieldValue:i,name:{value:"diseaseList.".concat(t,".duration"),unit:"diseaseList.".concat(t,".duration_unit"),start_date:"diseaseList.".concat(t,".start_date"),end_date:"diseaseList.".concat(t,".end_date")}})]}),(0,qt.jsxs)(op,{children:[(0,qt.jsx)(o_,{htmlFor:"diseasename",className:j.label,sx:{mb:.5,mt:1},children:S("rpm_Remarks")}),(0,qt.jsx)(P,{name:"diseaseList.".concat(t,".remark"),errors:p})]}),(0,qt.jsxs)(op,{children:[(0,qt.jsx)(o_,{htmlFor:"diseasename",className:j.label,sx:{mb:.5,mt:1},children:S("rpm_UploadReports")}),(0,qt.jsxs)(qt.Fragment,{children:[(0,qt.jsx)(F,{}),cs(null===g||void 0===g||null===(n=g.data)||void 0===n||null===(r=n.local_files)||void 0===r||null===(o=r.local)||void 0===o?void 0:o.files)?d("diseaseList.".concat(t,".reports"),e):v("diseaseList.".concat(t,".reports"),e,{style:{display:"none"}})]})]}),(0,qt.jsxs)(op,{display:"flex",mt:1.5,children:[(0,qt.jsx)(xh,{variant:"outlined",color:"primary",sx:{mr:1},children:"Cancel"}),(0,qt.jsx)(xh,{variant:"contained",color:"primary",children:"Save"})]})]},t)})})]})})}),(0,qt.jsxs)(op,{bgcolor:"white",p:1,children:[(0,qt.jsx)("img",{src:o,style:{display:"block",margin:"auto",maxWidth:"80px"}}),(0,qt.jsx)("p",{style:{fontSize:"12px",fontWeight:"600",letterSpacing:"0.02em",margin:"0"},children:"No Disease found."})]})]})}):null===r||void 0===r||null===(t=r.diseaseList)||void 0===t?void 0:t.map((t,n)=>{var r,o,h,m,f;return(0,qt.jsx)(Ff,{item:!0,xs:12,children:(0,qt.jsxs)(yH,{sx:{marginTop:"15px",marginBottom:"5px",borderLeft:"4px solid #868fcd",overflow:"auto"},children:[(0,qt.jsx)(op,{className:jn("MuiCardHeader-action",{"newidth-class":null===t||void 0===t?void 0:t.isEdit}),children:(0,qt.jsx)(nW,{className:j.diseaseNameField,sx:{display:(null!==t&&void 0!==t&&t.isEdit,"flex"),paddingBottom:"0",flexDirection:null!==t&&void 0!==t&&t.isEdit?"row":"unset",width:"100%",maxWidth:null!==t&&void 0!==t&&t.isEdit?"340px":"100%"},action:(0,qt.jsx)(op,{sx:{alignItems:(null!==t&&void 0!==t&&t.isEdit,"center"),marginTop:null!==t&&void 0!==t&&t.isEdit?"25px":"0",marginLeft:null!==t&&void 0!==t&&t.isEdit?"13px":"0",display:"flex",justifyContent:(null!==t&&void 0!==t&&t.isEdit,"end")},children:null!==t&&void 0!==t&&t.isEdit?(0,qt.jsx)(qt.Fragment,{children:(0,qt.jsxs)(op,{mb:1.5,children:[c(t,{setErrors:u}),a(t,e.remove,n)]})}):(0,qt.jsxs)(qt.Fragment,{children:[(null===y||void 0===y||null===(r=y.permissions)||void 0===r?void 0:r.showEditMedicalHistoryBtn)&&l(t),(null===y||void 0===y||null===(o=y.permissions)||void 0===o?void 0:o.showDeleteMedicalHistoryBtn)&&s(t)]})}),title:(0,qt.jsxs)(op,{display:"flex",flexDirection:"column",sx:{width:"100%"},children:[(0,qt.jsxs)(Cf,{component:"span",variant:"body1",className:j.label,children:[S("rpm_DiseaseName"),"*"]}),null!==t&&void 0!==t&&t.isEdit?(0,qt.jsx)(D,{diseaseName:t,name:"diseaseList.".concat(n,".disease_name"),setFieldValue:i,errors:p,fullWidth:!0}):(0,qt.jsx)(Cf,{component:"span",variant:"body1",className:j.subTitle,children:null===t||void 0===t?void 0:t.disease_name})]})})}),(0,qt.jsxs)(wH,{children:[(0,qt.jsxs)(op,{sx:{justifyContent:"space-between"},children:[(0,qt.jsxs)(op,{display:"flex",flexDirection:"column",children:[(0,qt.jsx)(Cf,{variant:"body1",className:j.label,children:S("rpm_Remarks")}),null!==t&&void 0!==t&&t.isEdit?(0,qt.jsx)(P,{name:"diseaseList.".concat(n,".remark"),errors:p}):(0,qt.jsx)(Cf,{variant:"body1",className:"".concat(j.subTitle," shortext"),children:null!==t&&void 0!==t&&t.remark?(0,qt.jsx)(I,{remark:null===t||void 0===t?void 0:t.remark}):"NA"})]}),(0,qt.jsx)(eg,{orientation:"vertical",variant:"middle",flexItem:!0,sx:{mx:"10px"}}),(0,qt.jsxs)(op,{display:"flex",flexDirection:"column",children:[(0,qt.jsxs)(Cf,{variant:"body1",className:j.label,children:[S("rpm_Duration"),"*"]}),(0,qt.jsx)(Cf,{variant:"body1",className:j.subTitle,children:null!==t&&void 0!==t&&t.isEdit?(0,qt.jsx)(N,{errors:p,data:t,setFieldValue:i,name:{value:"diseaseList.".concat(n,".duration"),unit:"diseaseList.".concat(n,".duration_unit"),start_date:"diseaseList.".concat(n,".start_date"),end_date:"diseaseList.".concat(n,".end_date")}}):(0,qt.jsx)(Cf,{children:t.custom_duration?t.custom_duration+" "+(null===t||void 0===t?void 0:t.duration_unit):M(t.duration_unit,null===t||void 0===t?void 0:t.start_date,t.end_date)})})]})]}),(0,qt.jsxs)(op,{display:"flex",flexDirection:"column",pt:"16px",children:[null!==t&&void 0!==t&&t.isEdit?(0,qt.jsx)(qt.Fragment,{children:(0,qt.jsx)(Cf,{variant:"body1",className:j.label,children:S("rpm_UploadReports")})}):(0,qt.jsx)(qt.Fragment,{children:(0,qt.jsx)(Cf,{variant:"body1",className:j.label,children:S("rpm_ViewReports")})}),(0,qt.jsx)(op,{className:j.mainUploads,children:null!==t&&void 0!==t&&t.isEdit?(0,qt.jsxs)(qt.Fragment,{children:[(0,qt.jsx)(F,{}),cs(null===g||void 0===g||null===(h=g.data)||void 0===h||null===(m=h.local_files)||void 0===m||null===(f=m.local)||void 0===f?void 0:f.files)?d("diseaseList.".concat(n,".reports"),t):v("diseaseList.".concat(n,".reports"),t)]}):cs(null===t||void 0===t?void 0:t.files)?(0,qt.jsx)(Cf,{children:"NA"}):(0,qt.jsx)(L,{diseaseObj:t})})]})]})]})},n)})})}})})}):(0,qt.jsxs)(op,{py:6,bgcolor:"#fff",border:"1px solid rgba(0, 0, 0, 0.12)",borderRadius:"4px",children:[(0,qt.jsx)("img",{src:GC,alt:"No Data Found",style:{display:"block",margin:"auto",width:"100%",maxWidth:"300px",height:"auto"}}),(0,qt.jsx)(op,{px:2,color:"#3f51b5",mt:2,display:"flex",justifyContent:"center",children:S("rpm_To_Explore_This")})]})]})}},"addMedicalHistory_formik"),(0,qt.jsx)(op,{sx:e=>({borderRadius:1.5,bgcolor:e.palette.common.white,boxShadow:"0px 2px 1px -1px #00000033, 0px 1px 1px 0px rgba(0, 0, 0, 0.14), 0px 1px 3px 0px rgba(0, 0, 0, 0.12)"}),children:(0,qt.jsxs)(op,{sx:{mt:"8px",mb:"10px"},position:"relative",children:[(0,qt.jsx)(op,{bgcolor:"#e8eaf6",sx:{borderRadius:"4px 4px 0 0",padding:"8px 16px"},children:(0,qt.jsx)(Cf,{variant:"h6",component:"h6",sx:{fontSize:"18px",fontWeight:"600",color:"#3f51b5"},children:S("rpm_OtherHealthIssues")})}),(0,qt.jsx)(op,{p:1,children:null!==y&&void 0!==y&&null!==(t=y.permissions)&&void 0!==t&&t.showSocialHistoryList?(0,qt.jsx)(Kz,{initialValues:{other_histories:u},onSubmit:p,enableReinitialize:!0,children:e=>{var t;let{values:n,setFieldValue:r,resetForm:i}=e;return(0,qt.jsx)(nH,{children:(0,qt.jsxs)(Ff,{container:!0,spacing:2,children:[(0,qt.jsx)(Ff,{item:!0,xs:10,children:(0,qt.jsx)(lH,{name:"other_histories",children:()=>{var e;return(0,qt.jsx)(qt.Fragment,{children:null===n||void 0===n||null===(e=n.other_histories)||void 0===e?void 0:e.map((e,t)=>{const n={alcohol:{icon:(0,qt.jsx)(__e,{}),label:"Drinking Alcohol"},smoke:{icon:(0,qt.jsx)(C_e,{}),label:"Smoking Frequently"},caffeine:{icon:(0,qt.jsx)(x_e.A,{}),label:"Consuming Caffeine"},sedentary:{icon:(0,qt.jsx)(y_e.A,{}),label:"Sedentary Lifestyle"}},i=Object.keys(n).find(t=>e.question.toLowerCase().includes(t)),{icon:o,label:a}=n[i];return(0,qt.jsx)(op,{display:"flex",alignItems:"center",children:(0,qt.jsx)(op,{onClick:()=>{if(h){const n="Yes"===e.answer?"No":"Yes";r("other_histories.".concat(t,".answer"),n)}},className:"".concat(j.labelHistory," ").concat("Yes"===e.answer?j.successHistory:j.errorHistory," randomClass"),children:(0,qt.jsxs)(Cf,{variant:"body",sx:{paddingRight:"5px",fontSize:"12px",fontWeight:"500",display:"flex",alignItems:"center"},children:[(0,qt.jsx)(wh,{sx:{flex:"0 0 30px"},children:o}),(0,qt.jsx)("span",{children:a})]})})},t)})})}})}),(0,qt.jsx)(Ff,{item:!0,xs:2,children:(null===y||void 0===y||null===(t=y.permissions)||void 0===t?void 0:t.editSocialHistoryList)&&(0,qt.jsx)(Ff,{container:!0,spacing:2,justifyContent:"end",children:h?(0,qt.jsxs)(qt.Fragment,{children:[(0,qt.jsx)(Ff,{item:!0,children:(0,qt.jsx)(wh,{color:"error",disableElevation:!0,onClick:()=>b(i),sx:{background:"#d32f2f1a",padding:"5px"},children:(0,qt.jsx)(Gje.A,{})})}),(0,qt.jsx)(Ff,{item:!0,children:(0,qt.jsx)(wh,{color:"primary",disableElevation:!0,type:"submit",sx:{background:"#2c387e2b",padding:"5px"},children:(0,qt.jsx)(Vje.A,{})})})]}):(0,qt.jsx)(Ff,{item:!0,children:(0,qt.jsx)(wh,{color:"primary",disableElevation:!0,onClick:m,className:"medicalHistory-tour-step1",children:(0,qt.jsx)(b_e.A,{sx:{fontSize:"20px"}})})})})})]})})}}):(0,qt.jsx)(LC,{})})]})}),(0,qt.jsx)(op,{children:(0,qt.jsxs)(xh,{fullWidth:!0,variant:"contained",color:"primary",disableElevation:!0,onClick:()=>k("family"),className:"medicalHistory-tour-step2",sx:{marginRight:"10px",alignItems:"flex-start",whiteSpace:"nowrap"},children:[(0,qt.jsx)(Jxe.A,{}),"Add Family Medical History"]})})]})})})})}w_e.defaultProps={allDiseaseList:[],personalDiseaseHead:[],pageDetails:{},order:"",orderBy:"",setOrder:()=>{},setOrderBy:()=>{},dataParameter:"",checkState:"",onCheck:()=>{},isSelection:"",nodata:"",personalDiseaseList:[],otherDiseaseList:[],familyDiseaseList:[],fetchDiseaseList:()=>{},editIcon:()=>{},viewButton:()=>{},mobileDeleteButton:()=>{},isEdit:!1,saveButtonMobile:()=>{},fileUploadButton:()=>{},editRow:[],closeButtonMobile:()=>{},filterOtherHistory:[],updateOtherHistory:()=>{},omhEdit:!1,handleOtherHistory:()=>{},downloadFile:()=>{},fileModal:{},fileUploadIconButton:()=>{},patientData:{},program:{},setFilterOtherHistory:()=>{},handleCancel:()=>{}};const S_e=w_e,A_e=["content"];const k_e=function(e){var t;let{patientData:n,program:r}=e;const o=Nt(),a=window.innerWidth,s=wt(bu),l=!("true"===us(s,"user_principal.attributes.skip_tour[0]","")),c=wt(cu),{t:d}=Vg(),[u,p]=We.useState(""),{programId:h,patientId:m}=lo(),[f,g]=We.useState((0,i.A)({},{local:{files:[]},onCloud:{files:[]}})),[v,x]=(0,We.useState)("desc"),[y,b]=(0,We.useState)("updated_at"),[j,_]=We.useState(null),[C,w]=We.useState(null),[S,A]=We.useState(null),[k,T]=We.useState(null),[E,M]=We.useState(null),[O,R]=We.useState(!1),[P,D]=(0,We.useState)([]),[N,L]=(0,We.useState)((0,i.A)({},dd)),[I,F]=We.useState(null),[$,B]=We.useState({open:!1,data:{}}),[z,H]=We.useState({open:!1,data:{}}),W=e=>{H((0,i.A)((0,i.A)({},z),{},{open:!z.open,data:e}))},U=e=>{B((0,i.A)((0,i.A)({},$),{},{open:!$.open,data:(0,i.A)((0,i.A)({},e.disease),{},{local_files:f})}))},V=()=>{let e=(0,i.A)({},f);e.local.files.splice(0,e.local.files.length),g(e),B((0,i.A)((0,i.A)({},$),{},{open:!1}))},G=function(e){let t=(0,i.A)({},f);t.local.files.splice(e,1),g(t)},q=()=>{R(!O)},Y=e=>{R(!O),e({values:{other_histories:I}})},Z=e=>{if(Array.isArray(e))return D(e.map(e=>e.toString()));const t=e.target.name;P.includes(t)?D(P.filter(e=>e!==t)):D(e=>[...e,t])},K=e=>{const t=null===S||void 0===S?void 0:S.map(t=>(0,i.A)((0,i.A)({},t),{},{isEdit:t.id===e.id}));A(t)},X=(e,t,n)=>{if(V(),e.id){const t=null===S||void 0===S?void 0:S.map(t=>(0,i.A)((0,i.A)({},t),{},{isEdit:t.id===e.id&&!1}));A(t)}else t(n)},Q=async()=>{const e=(0,i.A)((0,i.A)({},N),{},{kind:"SELF"});try{const{data:t}=await o(Al(h,m,e)),n=t||{},{content:r}=n,a=Ko(n,A_e),s=r.filter(e=>"SELF"===e.kind),l=r.filter(e=>"OTHER"===e.kind),c=r.filter(e=>"FAMILY"===e.kind);A(s),T(l),M(c),L(e=>(0,i.A)((0,i.A)({},e),{},{last_page:a.last_page,current_page:a.current_page,from:a.from,per_page:a.per_page,to:a.to,total:a.total}))}catch(t){console.log(t)}},J=async()=>{try{const{data:e}=await o(Ol(h,m));_(e)}catch(e){console.log(e)}},ee=async e=>{const t=null===e||void 0===e?void 0:e.other_histories;try{await o(((e,t,n)=>async r=>{r(na(!0));try{const r="".concat(ua.medical,"/").concat(e,"/").concat(t,"/medical-question");return await Fu(r,n)}finally{r(na(!1))}})(h,m,t)),J(),q(),o(Zo({subTitle:"message:rpm_SocialHistoryUpdateSuccessfully",severity:ud.SUCCESS}))}catch(n){const e=us(n,"response.data.code","");cs(e)?o(Zo({subTitle:"error:rpm_SocialHistoryUpdateFailed",severity:ud.ERROR})):o(Zo({subTitle:Vd(e,"error:rpm_SocialHistoryUpdateFailed"),severity:ud.ERROR}))}},te=async(e,t)=>{try{await o(Rl(h,m,e.id,t)),Q(),function(e,t){var n;const r=null===e||void 0===e||null===(n=e.files)||void 0===n?void 0:n.filter(e=>(null===e||void 0===e?void 0:e.id)!==t);B((0,i.A)((0,i.A)({},$),{},{data:(0,i.A)((0,i.A)({},e),{},{files:r})}))}(e,t),o(Zo({subTitle:"message:rpm_FileDeletedSuccessfully",severity:ud.SUCCESS}))}catch(n){const e=us(n,"response.data.code","");cs(e)?o(Zo({subTitle:"error:rpm_FileDeleteFailed",severity:ud.ERROR})):o(Zo({subTitle:Vd(e,"error:rpm_FileDeleteFailed"),severity:ud.ERROR}))}},ne=async e=>{try{await o(Pl(h,m,e)),o(Zo({subTitle:"message:rpm_DownloadFileSuccessfully",severity:ud.SUCCESS}))}catch(t){const e=us(t,"response.data.code","");cs(e)?o(Zo({subTitle:"error:rpm_DownloadFileFailed",severity:ud.ERROR})):o(Zo({subTitle:Vd(e,"error:rpm_DownloadFileFailed"),severity:ud.ERROR}))}},re=async(e,t)=>{var n,r;let{setErrors:i}=t,a=null===e||void 0===e?void 0:e.start_date,s=null===e||void 0===e?void 0:e.end_date;"CUSTOM"===(null===e||void 0===e?void 0:e.duration_unit)||"PRESENT"===(null===e||void 0===e?void 0:e.duration_unit)?(a=sa()(a).startOf("year").valueOf(),s=sa()(s).startOf("year").valueOf()):(s=sa()().valueOf(),a=sa()(s).subtract(null===e||void 0===e?void 0:e.duration,"".concat(null===e||void 0===e?void 0:e.duration_unit).toLowerCase()).valueOf());const l={disease_name:null===e||void 0===e?void 0:e.disease_name,start_date:a?sa()(a).format():null,end_date:s?sa()(s).format():null,remark:null===e||void 0===e?void 0:e.remark,duration_unit:null!==e&&void 0!==e&&e.duration_unit?null===e||void 0===e?void 0:e.duration_unit:"YEAR",custom_duration:"CUSTOM"===(null===e||void 0===e?void 0:e.duration_unit)||"PRESENT"===(null===e||void 0===e?void 0:e.duration_unit)?0:null===e||void 0===e?void 0:e.duration,kind:"SELF",upload:cs(null===$||void 0===$||null===(n=$.data)||void 0===n?void 0:n.local_files)?[]:null===$||void 0===$||null===(r=$.data)||void 0===r?void 0:r.local_files};RU.addNewDisease.validate(e,{abortEarly:!1}).then(async()=>{try{await o(kl(h,m,l)),Q(),V(),o(Zo({subTitle:"message:rpm_DiseaseCreatedSuccessfully",severity:ud.SUCCESS}))}catch(e){const t=us(e,"response.data.code","");cs(t)?o(Zo({subTitle:"error:rpm_DiseaseCreatedFailed",severity:ud.ERROR})):o(Zo({subTitle:Vd(t,"error:rpm_DiseaseCreatedFailed"),severity:ud.ERROR}))}}).catch(e=>{const t=Array.from(e.inner||[]).reduce((e,t)=>(e[t.path]=t.message,e),{});i(t)})},ie=async(e,t)=>{var n,r;let{setErrors:i}=t,a=null===e||void 0===e?void 0:e.start_date,s=null===e||void 0===e?void 0:e.end_date;"CUSTOM"===(null===e||void 0===e?void 0:e.duration_unit)||"PRESENT"===(null===e||void 0===e?void 0:e.duration_unit)?(a=sa()(a).startOf("year").valueOf(),s=sa()(s).startOf("year").valueOf()):(s=sa()().valueOf(),a=sa()(s).subtract(null===e||void 0===e?void 0:e.duration,"".concat(null===e||void 0===e?void 0:e.duration_unit).toLowerCase()).valueOf());const l={id:null===e||void 0===e?void 0:e.id,disease_name:null===e||void 0===e?void 0:e.disease_name,start_date:a?sa()(a).format():null,end_date:s?sa()(s).format():null,remark:null===e||void 0===e?void 0:e.remark,duration_unit:null===e||void 0===e?void 0:e.duration_unit,custom_duration:"CUSTOM"===(null===e||void 0===e?void 0:e.duration_unit)||"PRESENT"===(null===e||void 0===e?void 0:e.duration_unit)?0:null===e||void 0===e?void 0:e.duration,kind:null===e||void 0===e?void 0:e.kind,upload:cs(null===$||void 0===$||null===(n=$.data)||void 0===n?void 0:n.local_files)?[]:null===$||void 0===$||null===(r=$.data)||void 0===r?void 0:r.local_files};RU.editNewDisease.validate(e,{abortEarly:!1}).then(async()=>{try{await o(Tl(h,m,l)),Q(),V(),o(Zo({subTitle:"message:rpm_DiseaseUpdateSuccessfully",severity:ud.SUCCESS}))}catch(e){const t=us(e,"response.data.code","");cs(t)?o(Zo({subTitle:"error:rpm_DiseaseUpdateFailed",severity:ud.ERROR})):o(Zo({subTitle:Vd(t,"error:rpm_DiseaseUpdateFailed"),severity:ud.ERROR}))}}).catch(e=>{const t=Array.from(e.inner||[]).reduce((e,t)=>(e[t.path]=t.message,e),{});i(t)})},oe=async e=>{try{var t;await o(Ml(h,m,null===e||void 0===e||null===(t=e.data)||void 0===t?void 0:t.id)),Q(),H((0,i.A)((0,i.A)({},z),{},{open:!z.open})),o(Zo({subTitle:"message:rpm_DiseaseDeleteSuccessfully",severity:ud.SUCCESS}))}catch(n){const e=us(n,"response.data.code","");cs(e)?o(Zo({subTitle:"error:rpm_DiseaseUpdateFailed",severity:ud.ERROR})):o(Zo({subTitle:Vd(e,"error:rpm_DiseaseDeleteFailed"),severity:ud.ERROR}))}},ae=(e,t)=>(0,qt.jsx)(qt.Fragment,{children:(0,qt.jsx)(xh,{variant:"text",color:"primary",disableElevation:!0,onClick:()=>U({name:e,disease:t}),sx:{display:"inline-flex",backgroundColor:"grey.300",color:"grey.700",border:"1px dashed #616161",textAlign:"left",px:3,width:"100%"},children:(0,qt.jsxs)(op,{sx:{display:"flex",alignItems:"center"},children:[(0,qt.jsx)(Cje.A,{fontSize:"small"}),(0,qt.jsxs)(op,{sx:{flex:1,pl:2},children:[(0,qt.jsx)(Cf,{variant:"body1",sx:{textTransform:"none"},children:d("rpm_UploadReport")}),(0,qt.jsx)(Cf,{variant:"caption",sx:{textAlign:"center",width:"100%"},children:".PDF, .PNG, .JPEG"})]})]})})}),se=(e,t)=>(0,qt.jsx)(sy,{title:d("rpm_UploadMore"),children:(0,qt.jsx)(wh,{"data-id":t.id,color:"primary",sx:{bgcolor:"primary.theme.50",ml:1,mb:0},onClick:()=>U({name:e,disease:t}),children:(0,qt.jsx)(jje.A,{fontSize:"small",sx:{width:16,height:16}})})}),le=function(e){const t=e.target.files;let n=(0,i.A)({},f.local);t&&Array.from(t).forEach(e=>{var t;return cs(null===n||void 0===n||null===(t=n.files)||void 0===t?void 0:t.find(t=>t.name===e.name))?(null===e||void 0===e?void 0:e.size)>=5242880?o(Zo({subTitle:"error:rpm_ImageSize",severity:ud.ERROR})):(e.url=URL.createObjectURL(e),void n.files.push(e)):o(Zo({subTitle:"error:rpm_SameFileName",severity:ud.ERROR}))}),g(e=>(0,i.A)((0,i.A)({},e),{},{local:n})),e.target.value=""},ce=e=>(0,qt.jsx)(sy,{title:d("rpm_view"),children:(0,qt.jsx)(wh,{"data-id":e.id,color:"primary",onClick:()=>{},children:(0,qt.jsx)(gc,{fontSize:"small",sx:{width:16,height:16}})})});We.useEffect(()=>{c&&(Q(),(async()=>{try{const{data:e}=Md,{content:t}=e||{};w(t)}catch(e){console.log(e)}})())},[c]),We.useEffect(()=>{c&&J()},[c]),We.useEffect(()=>{(()=>{let e=[];null===Rd||void 0===Rd||Rd.forEach((t,n)=>{var r;(null===t||void 0===t?void 0:t.question)===(null===j||void 0===j||null===(r=j.other_histories[n])||void 0===r?void 0:r.question)?null===e||void 0===e||e.push((0,i.A)({},null===j||void 0===j?void 0:j.other_histories[n])):null===e||void 0===e||e.push((0,i.A)({},t))}),F(e)})()},[j]),We.useEffect(()=>{o(NC({activeMenuItem:"patient_history"}))},[]);const de=[{id:"disease",label:d("rpm_DiseaseName")+"*",isSort:!1,sortProperty:"disease"},{id:"duration",label:d("rpm_Duration"),isSort:!1,sortProperty:"duration"},{id:"remarks",label:d("rpm_Remarks"),isSort:!1,sortProperty:"remarks"},{id:"reports",label:d("rpm_AddReports"),isSort:!1,sortProperty:"reports"},{id:"action",label:d("rpm_Actions"),isSort:!1,sortProperty:"action"}];return cs(r)?(0,qt.jsx)(yp,{variant:"outlined",sx:{px:2.5,py:6,display:"flex",height:"320px"},children:(0,qt.jsx)(op,{alignSelf:"center",sx:{mx:"auto"},children:(0,qt.jsx)(MM,{color:"primary"})})}):(0,qt.jsxs)(qt.Fragment,{children:[null!==r&&void 0!==r&&null!==(t=r.permissions)&&void 0!==t&&t.showMedicalHistoryList?a>=575?(0,qt.jsxs)(qt.Fragment,{children:[(0,qt.jsx)(v_e,{order:v,orderBy:y,setOrder:x,setOrderBy:b,dataParameter:"id",checkState:P,onCheck:Z,isSelection:!1,nodata:GC,allDiseaseList:C,personalDiseaseHead:de,otherDiseaseList:k,familyDiseaseList:E,personalDiseaseList:S,fetchDiseaseList:Q,pageDetails:N,editButton:e=>(0,qt.jsx)(sy,{title:d("rpm_Edit"),children:(0,qt.jsx)(wh,{color:"primary",onClick:()=>K(e),children:(0,qt.jsx)(fc,{fontSize:"small",sx:{width:16,height:16}})})}),closeButton:(e,t,n)=>(0,qt.jsx)(sy,{title:d("rpm_Cancel"),children:(0,qt.jsx)(wh,{color:"error",onClick:()=>X(e,t,n),children:(0,qt.jsx)(_je.A,{fontSize:"small",sx:{width:16,height:16}})})}),viewButton:ce,deleteButton:e=>(0,qt.jsx)(wh,{"data-id":e.id,color:"error",onClick:()=>W(e),children:(0,qt.jsx)(xc,{fontSize:"small",sx:{width:16,height:16}})}),saveButton:(e,t)=>{let{setErrors:n}=t;return(0,qt.jsx)(sy,{title:d("rpm_Save"),children:(0,qt.jsx)(wh,{onClick:()=>e.id?ie(e,{setErrors:n}):re(e,{setErrors:n}),color:"primary",children:(0,qt.jsx)(wje.A,{fontSize:"small"})})})},fileUploadButton:ae,filterOtherHistory:I,setFilterOtherHistory:F,updateOtherHistory:ee,omhEdit:O,handleOtherHistory:q,fileModal:$,downloadFile:ne,fileUploadIconButton:se,patientData:n,program:r,handleCancel:Y}),(0,qt.jsx)(qV,{openModal:z.open,onCloseModal:W,actionFunction:()=>oe(z),dataName:"",options:{primaryText:d("message:rpm_DeleteTitle"),secondaryText:d("message:rpm_DeleteBodyText"),btn:{primaryText:d("rpm_Delete"),secondaryText:d("rpm_Cancel"),primaryColor:"error",secondaryColor:"primary"},btnSwap:!0}}),(0,qt.jsx)(Nje,{openModal:null===$||void 0===$?void 0:$.open,onCloseModal:V,actionFunction:U,onFileUpload:le,initialValues:f,onLocalFileDelete:G,fileModal:$,onCloudFilesDelete:te})]}):(0,qt.jsxs)(qt.Fragment,{children:[(0,qt.jsx)(S_e,{order:v,orderBy:y,setOrder:x,setOrderBy:b,dataParameter:"id",checkState:P,onCheck:Z,isSelection:!1,nodata:GC,allDiseaseList:C,personalDiseaseHead:de,otherDiseaseList:k,familyDiseaseList:E,personalDiseaseList:S,fetchDiseaseList:Q,pageDetails:N,editIcon:e=>(0,qt.jsx)(sy,{title:d("rpm_Edit"),children:(0,qt.jsx)(wh,{color:"primary",onClick:()=>K(e),children:(0,qt.jsx)(qje.A,{fontSize:"small"})})}),closeButtonMobile:(e,t,n)=>(0,qt.jsx)(sy,{title:d("rpm_Cancel"),children:(0,qt.jsx)(wh,{color:"error",onClick:()=>X(e,t,n),variant:"outlined",sx:{marginLeft:"5px",background:"#d32f2f1a",padding:"5px"},children:(0,qt.jsx)(Gje.A,{})})}),viewButton:ce,mobileDeleteButton:e=>(0,qt.jsx)(wh,{"data-id":e.id,color:"error",onClick:()=>W(e),children:(0,qt.jsx)(Uje.A,{fontSize:"small",sx:{width:22,height:22}})}),saveButtonMobile:(e,t)=>{let{setErrors:n}=t;return(0,qt.jsx)(sy,{title:d("rpm_Save"),children:(0,qt.jsx)(wh,{onClick:()=>e.id?ie(e,{setErrors:n}):re(e,{setErrors:n}),color:"primary",sx:{background:"#2c387e2b",padding:"5px"},children:(0,qt.jsx)(Vje.A,{})})})},fileUploadButton:ae,filterOtherHistory:I,setFilterOtherHistory:F,updateOtherHistory:ee,omhEdit:O,handleOtherHistory:q,fileModal:$,downloadFile:ne,fileUploadIconButton:se,patientData:n,program:r,handleCancel:Y}),(0,qt.jsx)(zje,{openModal:z.open,onCloseModal:W,actionFunction:()=>oe(z),dataName:"",options:{primaryText:d("message:rpm_DeleteTitle"),secondaryText:d("message:rpm_DeleteBodyText"),btn:{primaryText:d("rpm_Delete"),secondaryText:d("rpm_Cancel"),primaryColor:"error",secondaryColor:"primary"},btnSwap:!0}}),(0,qt.jsx)(Ije,{openModal:null===$||void 0===$?void 0:$.open,onCloseModal:V,actionFunction:U,onFileUpload:le,initialValues:f,onLocalFileDelete:G,fileModal:$,onCloudFilesDelete:te})]}):(0,qt.jsx)(LC,{}),(0,qt.jsx)(zZ,{isTour:l,path:"medicalHistoryTour",setRenderer:p}),(0,qt.jsx)("input",{type:"hidden",id:"rerenderer",value:u})]})};var T_e=n(79167);function E_e(e){let{notesList:t,order:n,orderBy:r,setOrder:i,setOrderBy:o,dataParameter:a,notesHead:s,checkState:l,onCheck:c,isSelection:d,nodata:u,fetchNoteList:p,pageDetails:h,editButton:m,viewButton:f,deleteButton:g}=e;const{t:v}=Vg(),x=so(),{programId:y,patientId:b}=lo(),j=[{name:"Programs",url:"".concat(ld.DOCTOR.PROGRAM),icon:(0,qt.jsx)(tc,{width:14,height:14})},{name:"Patients",url:"".concat(ld.DOCTOR.PROGRAM,"/").concat(y,"/patients")},{name:"Notes",url:"".concat(ld.DOCTOR.PROGRAM,"/").concat(y,"/patients/").concat(b,"/notes")}],[_,C]=We.useState("Other");return(0,qt.jsx)(qt.Fragment,{children:(0,qt.jsx)(op,{sx:{width:"100%"},children:(0,qt.jsx)(Ff,{container:!0,spacing:2.5,children:(0,qt.jsxs)(Ff,{item:!0,xs:12,children:[(0,qt.jsxs)(op,{sx:{mb:2.5},children:[(0,qt.jsx)(Ff,{container:!0,spacing:2,alignItems:"center",sx:{mb:2},children:(0,qt.jsxs)(Ff,{item:!0,xs:!0,children:[(0,qt.jsx)(BH,{labels:j}),(0,qt.jsx)(Cf,{variant:"h5",component:"h5",sx:{pt:5},children:v("rpm_Notes")})]})}),(0,qt.jsxs)(op,{display:"inline-flex",children:[(0,qt.jsx)(Ff,{item:!0,children:(0,qt.jsx)(xh,{variant:"outlined",size:"small",disableElevation:!0,onClick:()=>x("prescription"),children:v("rpm_NotePrescription")})}),(0,qt.jsx)(Ff,{item:!0,ml:2,children:(0,qt.jsx)(xh,{variant:"outlined",size:"small",disableElevation:!0,onClick:()=>x("resolve-alerts"),children:v("rpm_NoteResolvedAlerts")})}),(0,qt.jsx)(Ff,{item:!0,children:(0,qt.jsx)(op,{sx:{display:"flex",alignItems:"center",marginLeft:"15px","& .MuiSelect-select":{p:.45}},children:(0,qt.jsxs)(G_,{sx:{maxWidth:200,color:"primary.theme.600",borderColor:"primary.theme.600"},fullWidth:!0,variant:"outlined",size:"small",value:_,onChange:e=>{C(e.target.value)},children:[(0,qt.jsx)(mf,{value:"Other",disabled:!0,children:"Other Notes"}),[{name:"consultation Notes",path:"consultation-note"},{name:"Summary Notes",path:"summary-note"},{name:"Admin Notes",path:"admin-note"}].map(e=>(0,qt.jsx)(mf,{value:e.name,onClick:()=>x(e.path),children:e.name},e.name))]})})})]})]}),(0,qt.jsx)(op,{children:(0,qt.jsx)(UT,{order:n,orderBy:r,setOrder:i,setOrderBy:o,data:t,headCells:s,dataParameter:a,selected:l,setSelected:c,isSelection:d,noDataImage:u,fetchList:p,pageDetails:h,skeletonVrows:6,className:"theme_scroll",children:null===t||void 0===t?void 0:t.map(e=>(0,qt.jsxs)(cw,{sx:{"&:last-child td, &:last-child th":{border:0}},children:[d&&(0,qt.jsx)(gw,{padding:"checkbox",children:(0,qt.jsx)(Dw,{onChange:c,checked:l.includes(e.id.toString()),name:e.id.toString(),color:"primary"})}),(0,qt.jsx)(gw,{children:e.snum}),(0,qt.jsx)(gw,{children:e.title}),(0,qt.jsx)(gw,{children:e.description}),(0,qt.jsx)(gw,{children:e.created_at}),(0,qt.jsx)(gw,{children:e.modified_at}),(0,qt.jsxs)(gw,{children:[(0,qt.jsx)(wh,{children:(0,qt.jsx)(T_e.A,{sx:{fontSize:"14px"}})}),m(e),!1,g(e)]})]},e.id))})}),(0,qt.jsx)(KE,{pageDetails:h,fetchListFunction:p})]})})})})}E_e.defaultProps={notesHead:[],pageDetails:{},order:"",orderBy:"",setOrder:()=>{},setOrderBy:()=>{},dataParameter:"",checkState:[],onCheck:()=>{},isSelection:!1,nodata:"",notesList:[],otherDiseaseList:[],familyDiseaseList:[],fetchNoteList:()=>{},editButton:()=>{},viewButton:()=>{},deleteButton:()=>{}};const M_e=E_e,O_e=["content"],R_e={data:{content:[{id:1,snum:"1",title:"Note 1",vital:"BP",description:"Heart problems",created_at:"12 Aug 2022 09:35 AM",modified_at:"12 Aug 2022 09:35 AM"},{id:2,snum:"2",title:"Note 2",vital:"GLUCOSE",description:"Leukemia problems",created_at:"12 Aug 2022 09:35 AM",modified_at:"12 Aug 2022 09:35 AM"},{id:3,snum:"3",title:"Note 3",vital:"SPO2",description:"Smoking problems",created_at:"12 Aug 2022 09:35 AM",modified_at:"12 Aug 2022 09:35 AM"}],from:1,last_page:1,per_page:20,to:3,total:3,current_page:1},statusOk:200};const P_e=function(){const e=Nt(),t=wt(cu),{t:n}=Vg(),[r,o]=(0,We.useState)("desc"),[a,s]=(0,We.useState)("updated_at"),[l,c]=We.useState(null),[d,u]=(0,We.useState)([]),[p,h]=(0,We.useState)((0,i.A)({},dd)),[m,f]=We.useState({open:!1,data:{}}),g=e=>{f((0,i.A)((0,i.A)({},m),{},{open:!m.open,data:e}))},v=async()=>{try{const{data:e}=R_e,t=e||{},{content:n}=t,r=Ko(t,O_e);c(n),h(e=>(0,i.A)((0,i.A)({},e),{},{last_page:r.last_page,current_page:r.current_page,from:r.from,per_page:r.per_page,to:r.to,total:r.total}))}catch(e){console.log(e)}};We.useEffect(()=>{t&&v()},[t]),We.useEffect(()=>{e(NC({activeMenuItem:"notes"}))},[]);const x=[{id:"vitaltype",label:n("rpm_VitalType"),isSort:!1,sortProperty:"vitaltype"},{id:"medication",label:n("rpm_Medication"),isSort:!1,sortProperty:"medication"},{id:"c",label:n("rpm_Frequency"),isSort:!1,sortProperty:"rpm_Frequency"},{id:"duration",label:n("rpm_Duration"),isSort:!1,sortProperty:"duration"},{id:"comments",label:n("rpm_Comments"),isSort:!1,sortProperty:"comments"},{id:"action",label:n("rpm_Actions"),isSort:!1,sortProperty:"action"}];return(0,qt.jsxs)(qt.Fragment,{children:[(0,qt.jsx)(M_e,{order:r,orderBy:a,setOrder:o,setOrderBy:s,dataParameter:"id",checkState:d,onCheck:e=>{if(Array.isArray(e))return u(e.map(e=>e.toString()));const t=e.target.name;d.includes(t)?u(d.filter(e=>e!==t)):u(e=>[...e,t])},isSelection:!1,nodata:GC,notesHead:x,notesList:l,fetchNoteList:v,pageDetails:p,editButton:e=>(0,qt.jsx)(sy,{title:n("rpm_Edit"),children:(0,qt.jsx)(wh,{"data-id":e.id,color:"primary",onClick:()=>console.log(e),children:(0,qt.jsx)(fc,{fontSize:"small",sx:{width:16,height:16}})})}),viewButton:e=>(0,qt.jsx)(sy,{title:n("rpm_view"),children:(0,qt.jsx)(wh,{"data-id":e.id,color:"primary",sx:{bgcolor:"primary.theme.50"},onClick:()=>{},children:(0,qt.jsx)(gc,{fontSize:"small",sx:{width:16,height:16}})})}),deleteButton:e=>(0,qt.jsx)(wh,{"data-id":e.id,color:"error",onClick:()=>g(e),children:(0,qt.jsx)(xc,{fontSize:"small",sx:{width:16,height:16}})})}),(0,qt.jsx)(qV,{openModal:m.open,onCloseModal:g,actionFunction:()=>console.log(m),dataName:m.data.title,options:{primaryText:n("message:rpm_DeleteTitle"),secondaryText:n("message:rpm_DeleteBodyText"),descText:n("message:rpm_DeleteSubText"),btn:{primaryText:n("rpm_Delete"),secondaryText:n("rpm_Cancel"),primaryColor:"error",secondaryColor:"primary"},btnSwap:!0}})]})};var D_e=n(21825),N_e=n(18527);const L_e=(0,Cy.A)((0,qt.jsx)("path",{d:"M15.5 14h-.79l-.28-.27C15.41 12.59 16 11.11 16 9.5 16 5.91 13.09 3 9.5 3S3 5.91 3 9.5 5.91 16 9.5 16c1.61 0 3.09-.59 4.23-1.57l.27.28v.79l5 4.99L20.49 19zm-6 0C7.01 14 5 11.99 5 9.5S7.01 5 9.5 5 14 7.01 14 9.5 11.99 14 9.5 14"}),"Search"),I_e=["form","field","label","nameKey","valueKey","InputProps","onClear","onValueChange","dependent","placeholder"],F_e=e=>{const{form:t,field:n,label:r,nameKey:o,valueKey:a,InputProps:s,onClear:l,onValueChange:c,dependent:d,placeholder:u}=e,p=Ko(e,I_e),{name:h}=n,m=(0,We.useRef)(null),[f,g]=(0,We.useState)([]),[v,x]=(0,We.useState)(!1),y=()=>{g([]),l(),t.setFieldValue(h,[])};return(0,We.useEffect)(()=>{ta()(t.values[h])&&!d||g(t.values[h]||[])},[t.values[h]]),(0,We.useEffect)(()=>{var e;const t=null===m||void 0===m||null===(e=m.current)||void 0===e?void 0:e.getElementsByClassName("MuiAutocomplete-clearIndicator")[0];if(t)return t.addEventListener("click",y),()=>{var e;const t=null===m||void 0===m||null===(e=m.current)||void 0===e?void 0:e.getElementsByClassName("MuiAutocomplete-clearIndicator")[0];t&&t.removeEventListener("click",y)}},[]),(0,qt.jsx)(aj,(0,i.A)((0,i.A)((0,i.A)({ref:m},e),n),{},{open:v,onInputChange:(e,t)=>{x(!!t)},multiple:!0,getOptionLabel:e=>e[o]||"",value:f,onChange:(e,n,r)=>{if(n&&n.inputValue){const e={[o]:n.inputValue,[a]:n.inputValue};g([...f,e]),t.setFieldValue(h,[...f,e])}else g(n||[]),t.setFieldValue(h,n||[]);"function"===typeof c&&c(e,n,r)},filterOptions:(e,t)=>{const n=e.filter(e=>e.name.toLowerCase().includes(t.inputValue.toLowerCase()));return""===t.inputValue||n.find(e=>e.name===t.inputValue)||n.push({name:t.inputValue,use_count:0}),n},renderOption:(e,t)=>(0,We.createElement)(op,(0,i.A)((0,i.A)({component:"li"},e),{},{key:t[a]}),(0,qt.jsx)(op,{children:(0,qt.jsx)(Cf,{variant:"body1",component:"p",children:t[o]})})),renderInput:e=>(0,qt.jsx)(Q_,(0,i.A)((0,i.A)((0,i.A)({variant:p.variant,label:r,placeholder:u},e),s),{},{InputProps:(0,i.A)((0,i.A)({},e.InputProps),{},{endAdornment:(0,qt.jsx)(tw,{position:"end",children:(0,qt.jsx)(L_e,{sx:{position:"absolute",right:"10px",top:"9px",color:e=>e.palette.grey[500]}})})})}))}))};F_e.defaultProps={form:{},label:"",placeholder:"",options:[],field:{},nameKey:"name",valueKey:"name",onKeyssDown:()=>{},onClear:()=>{},onValueChange:()=>{},dependent:!1};const $_e=F_e;function B_e(e,t){var n;const r=FM({props:e,name:t}),i=VM(),o=null!=(n=r.ampm)?n:i.is12HourCycleInCurrentLocale(),a=qM().openTimePickerDialogue;return(0,Ft.A)({ampm:o,openTo:"hours",views:["hours","minutes"],acceptRegex:o?/[\dapAP]/gi:/\d/gi,disableMaskedInput:!1,getOpenDialogAriaText:a,inputFormat:o?i.formats.fullTime12h:i.formats.fullTime24h},r,{components:(0,Ft.A)({OpenPickerIcon:aO},r.components)})}const z_e={emptyValue:null,parseInput:KM,getTodayValue:e=>e.date(),areValuesEqual:(e,t,n)=>e.isEqual(t,n),valueReducer:(e,t,n)=>t&&e.isValid(n)?e.mergeDateAndTime(t,n):n};function H_e(e){return(0,sr.Ay)("PrivatePickersToolbarText",e)}const W_e=(0,ar.A)("PrivatePickersToolbarText",["root","selected"]),U_e=["className","selected","value"],V_e=(0,Vn.Ay)(Cf,{name:"PrivatePickersToolbarText",slot:"Root",overridesResolver:(e,t)=>[t.root,{["&.".concat(W_e.selected)]:t.selected}]})(e=>{let{theme:t}=e;return{transition:t.transitions.create("color"),color:t.palette.text.secondary,["&.".concat(W_e.selected)]:{color:t.palette.text.primary}}}),G_e=We.forwardRef(function(e,t){const{className:n,value:r}=e,i=(0,nn.A)(e,U_e),o=(e=>{const{classes:t,selected:n}=e,r={root:["root",n&&"selected"]};return(0,ir.A)(r,H_e,t)})(e);return(0,qt.jsx)(V_e,(0,Ft.A)({ref:t,className:jn(n,o.root),component:"span"},i,{children:r}))}),q_e=["align","className","selected","typographyClassName","value","variant"],Y_e=(0,Vn.Ay)(xh,{name:"MuiPickersToolbarButton",slot:"Root",overridesResolver:(e,t)=>t.root})({padding:0,minWidth:16,textTransform:"none"}),Z_e=We.forwardRef(function(e,t){const n=FM({props:e,name:"MuiPickersToolbarButton"}),{align:r,className:i,selected:o,typographyClassName:a,value:s,variant:l}=n,c=(0,nn.A)(n,q_e),d=(e=>{const{classes:t}=e;return(0,ir.A)({root:["root"]},lO,t)})(n);return(0,qt.jsx)(Y_e,(0,Ft.A)({variant:"text",ref:t,className:jn(i,d.root)},c,{children:(0,qt.jsx)(G_e,{align:r,className:a,variant:l,value:s,selected:o})}))});function K_e(e){return(0,sr.Ay)("MuiTimePickerToolbar",e)}const X_e=(0,ar.A)("MuiTimePickerToolbar",["root","separator","hourMinuteLabel","hourMinuteLabelLandscape","hourMinuteLabelReverse","ampmSelection","ampmLandscape","ampmLabel"]),Q_e=["ampm","ampmInClock","parsedValue","isLandscape","isMobileKeyboardViewOpen","onChange","openView","setOpenView","toggleMobileKeyboardView","toolbarTitle","views","disabled","readOnly"],J_e=(0,Vn.Ay)(mO,{name:"MuiTimePickerToolbar",slot:"Root",overridesResolver:(e,t)=>t.root})({["& .".concat(cO.penIconButtonLandscape)]:{marginTop:"auto"}}),eCe=(0,Vn.Ay)(G_e,{name:"MuiTimePickerToolbar",slot:"Separator",overridesResolver:(e,t)=>t.separator})({outline:0,margin:"0 4px 0 2px",cursor:"default"}),tCe=(0,Vn.Ay)("div",{name:"MuiTimePickerToolbar",slot:"HourMinuteLabel",overridesResolver:(e,t)=>[{["&.".concat(X_e.hourMinuteLabelLandscape)]:t.hourMinuteLabelLandscape,["&.".concat(X_e.hourMinuteLabelReverse)]:t.hourMinuteLabelReverse},t.hourMinuteLabel]})(e=>{let{theme:t,ownerState:n}=e;return(0,Ft.A)({display:"flex",justifyContent:"flex-end",alignItems:"flex-end"},n.isLandscape&&{marginTop:"auto"},"rtl"===t.direction&&{flexDirection:"row-reverse"})}),nCe=(0,Vn.Ay)("div",{name:"MuiTimePickerToolbar",slot:"AmPmSelection",overridesResolver:(e,t)=>[{[".".concat(X_e.ampmLabel)]:t.ampmLabel},{["&.".concat(X_e.ampmLandscape)]:t.ampmLandscape},t.ampmSelection]})(e=>{let{ownerState:t}=e;return(0,Ft.A)({display:"flex",flexDirection:"column",marginRight:"auto",marginLeft:12},t.isLandscape&&{margin:"4px 0 auto",flexDirection:"row",justifyContent:"space-around",flexBasis:"100%"},{["& .".concat(X_e.ampmLabel)]:{fontSize:17}})});function rCe(e){const t=FM({props:e,name:"MuiTimePickerToolbar"}),{ampm:n,ampmInClock:r,parsedValue:i,isLandscape:o,isMobileKeyboardViewOpen:a,onChange:s,openView:l,setOpenView:c,toggleMobileKeyboardView:d,toolbarTitle:u,views:p,disabled:h,readOnly:m}=t,f=(0,nn.A)(t,Q_e),g=VM(),v=qM(),x=null!=u?u:v.timePickerDefaultToolbarTitle,y=In(),b=Boolean(n&&!r),{meridiemMode:j,handleMeridiemChange:_}=fR(i,n,s),C=t,w=(e=>{const{theme:t,isLandscape:n,classes:r}=e,i={root:["root"],separator:["separator"],hourMinuteLabel:["hourMinuteLabel",n&&"hourMinuteLabelLandscape","rtl"===t.direction&&"hourMinuteLabelReverse"],ampmSelection:["ampmSelection",n&&"ampmLandscape"],ampmLabel:["ampmLabel"]};return(0,ir.A)(i,K_e,r)})((0,Ft.A)({},C,{theme:y})),S=(0,qt.jsx)(eCe,{tabIndex:-1,value:":",variant:"h3",selected:!1,className:w.separator});return(0,qt.jsxs)(J_e,(0,Ft.A)({viewType:"clock",landscapeDirection:"row",toolbarTitle:x,isLandscape:o,isMobileKeyboardViewOpen:a,toggleMobileKeyboardView:d,ownerState:C,className:w.root},f,{children:[(0,qt.jsxs)(tCe,{className:w.hourMinuteLabel,ownerState:C,children:[wO(p,"hours")&&(0,qt.jsx)(Z_e,{tabIndex:-1,variant:"h3",onClick:()=>c("hours"),selected:"hours"===l,value:i?(e=>n?g.format(e,"hours12h"):g.format(e,"hours24h"))(i):"--"}),wO(p,["hours","minutes"])&&S,wO(p,"minutes")&&(0,qt.jsx)(Z_e,{tabIndex:-1,variant:"h3",onClick:()=>c("minutes"),selected:"minutes"===l,value:i?g.format(i,"minutes"):"--"}),wO(p,["minutes","seconds"])&&S,wO(p,"seconds")&&(0,qt.jsx)(Z_e,{variant:"h3",onClick:()=>c("seconds"),selected:"seconds"===l,value:i?g.format(i,"seconds"):"--"})]}),b&&(0,qt.jsxs)(nCe,{className:w.ampmSelection,ownerState:C,children:[(0,qt.jsx)(Z_e,{disableRipple:!0,variant:"subtitle2",selected:"am"===j,typographyClassName:w.ampmLabel,value:g.getMeridiemText("am"),onClick:m?void 0:()=>_("am"),disabled:h}),(0,qt.jsx)(Z_e,{disableRipple:!0,variant:"subtitle2",selected:"pm"===j,typographyClassName:w.ampmLabel,value:g.getMeridiemText("pm"),onClick:m?void 0:()=>_("pm"),disabled:h})]})]}))}const iCe=e=>{let{adapter:t,value:n,props:r}=e;const{minTime:i,maxTime:o,minutesStep:a,shouldDisableTime:s,disableIgnoringDatePartForTimeValidation:l}=r,c=t.utils.date(n),d=mR(l,t.utils);if(null===n)return null;switch(!0){case!t.utils.isValid(n):return"invalidDate";case Boolean(i&&d(i,c)):return"minTime";case Boolean(o&&d(c,o)):return"maxTime";case Boolean(s&&s(t.utils.getHours(c),"hours")):return"shouldDisableTime-hours";case Boolean(s&&s(t.utils.getMinutes(c),"minutes")):return"shouldDisableTime-minutes";case Boolean(s&&s(t.utils.getSeconds(c),"seconds")):return"shouldDisableTime-seconds";case Boolean(a&&t.utils.getMinutes(c)%a!==0):return"minutesStep";default:return null}},oCe=(e,t)=>e===t,aCe=e=>RR(e,iCe,oCe),sCe=["onChange","PaperProps","PopperProps","ToolbarComponent","TransitionComponent","value","components","componentsProps"],lCe=We.forwardRef(function(e,t){const n=B_e(e,"MuiDesktopTimePicker"),r=null!==aCe(n),{pickerProps:i,inputProps:o,wrapperProps:a}=rD(n,z_e),{PaperProps:s,PopperProps:l,ToolbarComponent:c=rCe,TransitionComponent:d,components:u,componentsProps:p}=n,h=(0,nn.A)(n,sCe),m=(0,Ft.A)({},o,h,{components:u,componentsProps:p,ref:t,validationError:r});return(0,qt.jsx)(OO,(0,Ft.A)({},a,{DateInputProps:m,KeyboardDateInputComponent:qP,PopperProps:l,PaperProps:s,TransitionComponent:d,components:u,componentsProps:p,children:(0,qt.jsx)(nD,(0,Ft.A)({},i,{autoFocus:!0,toolbarTitle:n.label||n.toolbarTitle,ToolbarComponent:c,DateInputProps:m,components:u,componentsProps:p},h))}))}),cCe=["ToolbarComponent","value","onChange","components","componentsProps"],dCe=We.forwardRef(function(e,t){const n=B_e(e,"MuiMobileTimePicker"),r=null!==aCe(n),{pickerProps:i,inputProps:o,wrapperProps:a}=rD(n,z_e),{ToolbarComponent:s=rCe,components:l,componentsProps:c}=n,d=(0,nn.A)(n,cCe),u=(0,Ft.A)({},o,d,{components:l,componentsProps:c,ref:t,validationError:r});return(0,qt.jsx)(dD,(0,Ft.A)({},d,a,{DateInputProps:u,PureDateInputComponent:uD,components:l,componentsProps:c,children:(0,qt.jsx)(nD,(0,Ft.A)({},i,{autoFocus:!0,toolbarTitle:n.label||n.toolbarTitle,ToolbarComponent:s,DateInputProps:u,components:l,componentsProps:c},d))}))}),uCe=["desktopModeMediaQuery","DialogProps","PopperProps","TransitionComponent"],pCe=We.forwardRef(function(e,t){const n=FM({props:e,name:"MuiTimePicker"}),{desktopModeMediaQuery:r="@media (pointer: fine)",DialogProps:i,PopperProps:o,TransitionComponent:a}=n,s=(0,nn.A)(n,uCe);return VC(r,{defaultMatches:!0})?(0,qt.jsx)(lCe,(0,Ft.A)({ref:t,PopperProps:o,TransitionComponent:a},s)):(0,qt.jsx)(dCe,(0,Ft.A)({ref:t,DialogProps:i},s))});function hCe(e){var t;let{open:n,setOpen:r,medicationList:o,setFieldValue:a,modalIndex:s,setFieldTouched:l}=e;const{defaultTenant:c}=$o.getUrl(),d=()=>{const e=o.timing.every(e=>null===(null===e||void 0===e?void 0:e.start_time)),t=o.timing.every(e=>null!==(null===e||void 0===e?void 0:e.start_time));if(o.repetition_kind===vd){null===o.timing[0].start_time&&ps(o.timing[0].interval)||null!==o.timing[0].start_time&&!ps(o.timing[0].interval)?r(!1):l("medicationList.".concat(s,".timing.",0,".interval"),!1)}else e||t?r(!1):l("medicationList.".concat(s,".timing"),!0)};return(0,qt.jsx)(We.Fragment,{children:(0,qt.jsxs)(cC,{fullWidth:!0,maxWidth:"xs",open:n,onClose:d,className:"custom-reminder-popup",children:[(0,qt.jsxs)(fC,{display:"flex",alignItems:"center",style:{background:"#efefef"},className:"reminderClock",children:[(0,qt.jsx)(Xc,{}),(0,qt.jsx)(Cf,{variant:"h6",fontWeight:600,sx:{fontSize:"18px",color:"black"},ml:2,children:"Set Medicine Reminders"}),(0,qt.jsx)(wh,{"aria-label":"close",onClick:d,sx:{position:"absolute",right:15,top:13},children:(0,qt.jsx)(J_.A,{})})]}),(0,qt.jsxs)(bC,{sx:{margin:"10px 35px"},className:"medicineReminder",children:[null===o||void 0===o||null===(t=o.timing)||void 0===t?void 0:t.map((e,t)=>(0,qt.jsxs)(op,{className:"boxContentIntervel",component:"form",sx:{display:"flex",flexDirection:"row",width:"100%",gap:"10px"},mb:1,mt:1,children:[(0,qt.jsx)(WM,{dateAdapter:DI,children:(0,qt.jsx)(pCe,{ampm:!1,minutesStep:"rpmsystem"===c?1:10,autoComplete:"off",renderInput:e=>(0,qt.jsx)(Q_,(0,i.A)((0,i.A)({fullWidth:!0},e),{},{inputProps:(0,i.A)((0,i.A)({},e.inputProps),{},{autoComplete:"off",placeholder:"Dose ".concat(t+1),readOnly:!0}),onKeyDown:e=>{8===(null===e||void 0===e?void 0:e.keyCode)||46===e.keyCode||e.preventDefault()}})),name:"medicationList.".concat(s,".timing.").concat(t,".start_time"),value:null===e||void 0===e?void 0:e.start_time,onChange:e=>a("medicationList.".concat(s,".timing.").concat(t,".start_time"),e)})}),(null===o||void 0===o?void 0:o.repetition_kind)===vd&&(0,qt.jsxs)(qt.Fragment,{children:[(0,qt.jsx)(Q_,{label:"Interval",fullWidth:!0,type:"number",onKeyDown:e=>Pd.includes(e.key)&&e.preventDefault(),name:"medicationList.".concat(s,".timing.").concat(t,".interval"),value:(null===e||void 0===e?void 0:e.interval)||null,onChange:e=>a("medicationList.".concat(s,".timing.").concat(t,".interval"),e.target.value)}),(0,qt.jsx)(dH,{name:"medicationList.".concat(s,".timing.").concat(t,".interval"),children:e=>(0,qt.jsx)(v_,{error:!0,children:_e(e,{field:_e("rpm_VitalType")})})})]})]},t)),(0,qt.jsx)(dH,{name:"medicationList.".concat(s,".timing"),children:e=>(0,qt.jsx)(v_,{error:!0,children:_e(e,{field:"rpm_vital"})})})]})]})})}hCe.defaultProps={open:!1,setOpen:()=>{},setFieldValue:()=>{},medicationList:{},modalIndex:0,setFieldTouched:()=>{}};const mCe=["children","onClose"],fCe=e=>{const{children:t,onClose:n}=e,r=Ko(e,mCe);return(0,qt.jsxs)(fC,(0,i.A)((0,i.A)({sx:{m:0,p:2}},r),{},{children:[t,n?(0,qt.jsx)(wh,{"aria-label":"close",onClick:n,sx:{position:"absolute",right:16,top:8,color:e=>e.palette.grey[500]},children:(0,qt.jsx)(J_.A,{})}):null]}))};function gCe(e){let{dataName:t,actionFunction:n,openModal:r,onCloseModal:i,options:o,children:a,showButton:s=!0}=e;return(0,qt.jsx)(We.Fragment,{children:(0,qt.jsxs)(cC,{fullWidth:!0,maxWidth:"sm",open:r,onClose:i,className:"custom-reminder-popup",children:[(0,qt.jsxs)(fCe,{sx:{px:3},onClose:i,children:[o.primaryText,t&&(0,qt.jsx)(Cf,{component:"p",variant:"subtitle2",children:"(".concat(t,")")})]}),(0,qt.jsx)(eg,{}),(0,qt.jsx)(bC,{sx:{px:3,py:2},children:a?a({dataName:t,actionFunction:n,openModal:r,onCloseModal:i,options:o}):(0,qt.jsxs)(qt.Fragment,{children:[(0,qt.jsxs)(qt.Fragment,{children:[(0,qt.jsx)(Cf,{component:"p",variant:"h6",children:o.secondaryText}),o.descText&&(0,qt.jsx)(Cf,{component:"p",variant:"body1",children:o.descText})]}),s?(0,qt.jsx)(op,{mt:2.5,children:(0,qt.jsxs)(Ff,{container:!0,spacing:2,direction:o.btnSwap?"row-reverse":"row",children:[(0,qt.jsx)(Ff,{item:!0,xs:o.btnSwap,children:(0,qt.jsx)(xh,{color:o.btn.secondaryColor,variant:"outlined",onClick:i,children:o.btn.secondaryText})}),(0,qt.jsx)(Ff,{item:!0,children:(0,qt.jsx)(xh,{color:o.btn.primaryColor,disableElevation:!0,variant:"contained",onClick:n,children:o.btn.primaryText})})]})}):null]})})]})})}const vCe=e=>{let{open:t,children:n,onClose:r,title:i,actionFunction:o,disableButton:a}=e;return(0,qt.jsxs)(cC,{open:t,onClose:r,fullWidth:!0,maxWidth:"sm",children:[(0,qt.jsxs)(fC,{sx:{m:0,p:2},children:[i,r?(0,qt.jsx)(wh,{"aria-label":"close",onClick:r,sx:{position:"absolute",right:8,top:8,color:e=>e.palette.grey[500]},children:(0,qt.jsx)(J_.A,{})}):null]}),(0,qt.jsx)(eg,{}),(0,qt.jsx)(bC,{children:n}),(0,qt.jsxs)(vE,{children:[(0,qt.jsx)(xh,{color:"primary",disableElevation:!0,variant:"outlined",onClick:r,style:{marginBottom:"10px"},children:"Cancel"}),(0,qt.jsx)(xh,{color:"primary",disableElevation:!0,variant:"contained",onClick:o,style:{marginBottom:"10px"},disabled:a,children:"Save"})]})]})},xCe=e=>{var t,n,r,o,a;let{notesHead:s,nodata:l,addNewPrescription:c,prescriptionData:d,editPrescription:u,templateModal:p,setTemplateModal:h,saveTemplate:m,allTemplates:f,template:g,setTemplate:v,getTemplateById:x,prescriptionId:y,openMedicineTimings:b,timingBox:j,setTimingBox:_,addTimings:C,imageBox:w,setImageBox:S,closeImageBox:A,handleConfirmModalToggle:k,rowDelete:T,setRowDelete:E,chips:M,handleComplaints:O,handleDiagnosis:R,notifications:P,medicineSuggestions:D,getMedicineData:N,state:L,newHeads:I,handleReminderConfirmModalToggle:F,reminderError:$}=e;const{t:B}=Vg(),{enqueueSnackbar:z}=hi(),H=so(),[W,U]=(0,We.useState)(null),[V,G]=(0,We.useState)(!1),[q,Y]=(0,We.useState)(!1),[Z,K]=(0,We.useState)(!1),[X,Q]=(0,We.useState)(!1),[J,ee]=(0,We.useState)(!1),[te,ne]=(0,We.useState)(s),re=q?null===M||void 0===M?void 0:M.complaints:null===M||void 0===M||null===(t=M.complaints)||void 0===t?void 0:t.slice(0,10),ie=Z?null===M||void 0===M?void 0:M.tests:null===M||void 0===M||null===(n=M.tests)||void 0===n?void 0:n.slice(0,10),oe=X?null===M||void 0===M?void 0:M.diagnosis:null===M||void 0===M||null===(r=M.diagnosis)||void 0===r?void 0:r.slice(0,10),[ae,se]=(0,We.useState)({vital:null!==L&&void 0!==L&&null!==(o=L.schedule)&&void 0!==o&&o.vital_name?null===L||void 0===L||null===(a=L.schedule)||void 0===a?void 0:a.vital_name:"others",templateName:"",complaints:[],complaintDetails:[],diagnosis:[],diagnosisDetails:[],tests:[],followUpDays:"",followUpDate:null,followUpReminder:!0,followUpReminderDate:null,followUpTime:null,daysDifference:null,medicationList:[{id:(0,N_e.v4)(),medicine:null,medicine_form:"",icon_type:"",dose:null,salt_composition:null,unit:null,color:"",image:"",start_date:sa()(new Date),end_date:null,days:null,repetition_kind:gd,timing:[],frequency:"",comments:"",showMore:!1}],advices:[]}),le=ds((e,t,n)=>{e({q:t,index:n})},500),ce=(0,We.useCallback)((e,t,n)=>{le(N,t,n)},[N]);We.useEffect(()=>{if(!cs(d)&&!cs(M)){var e;const t=null===(e=d.tests)||void 0===e?void 0:e.map(e=>{var t;return null===M||void 0===M||null===(t=M.tests)||void 0===t?void 0:t.find(t=>(null===t||void 0===t?void 0:t.name)===e)}).filter(e=>void 0!==e);se(e=>(0,i.A)((0,i.A)((0,i.A)({},e),d),{},{tests:t}))}},[d,M]),We.useEffect(()=>{cs(P)||se(e=>(0,i.A)((0,i.A)({},e),{},{followUpReminder:P.send_follow_up_reminder_flag,daysDifference:P.follow_up_day,followUpTime:Ds(P.follow_up_time,pd)}))},[P]);const de=()=>{const e=["form","saltComposition","shape","comments"],t=te.filter(t=>!e.includes(t.id));ne(t)};return(0,qt.jsxs)(op,{children:[(0,qt.jsx)(op,{sx:{width:"100%"},children:(0,qt.jsx)(Ff,{container:!0,children:(0,qt.jsx)(Ff,{item:!0,xs:12,children:(0,qt.jsx)(op,{sx:{mb:1},children:(0,qt.jsx)(Ff,{container:!0,spacing:2,alignItems:"center",sx:{mb:2},children:(0,qt.jsx)(Ff,{item:!0,xs:!0,children:(0,qt.jsx)(Cf,{variant:"h5",component:"h5",children:B("rpm_consultation")})})})})})})}),(0,qt.jsx)(Kz,{initialValues:(0,i.A)((0,i.A)({},ae),{},{buttonType:""}),validationSchema:RU.addPrescriptionNote,onSubmit:async(e,t)=>{let{setErrors:n}=t;if("template"===(null===e||void 0===e?void 0:e.buttonType))try{await RU.addPrescriptionNote.validate(e,{abortEarly:!1}),h(!0)}catch(r){const e={};r.inner.forEach(t=>{e[t.path]=t.message}),n(e)}else try{cs(y)?await c(e):await(cs(g)?u(e):c(e))}catch(r){console.log(r)}},enableReinitialize:!0,children:e=>{var t,n,r,o,a;let{values:c,setFieldValue:d,setFieldTouched:u,validateForm:y}=e;return(0,qt.jsx)(qt.Fragment,{children:(0,qt.jsxs)(nH,{children:[(0,qt.jsx)(op,{children:(0,qt.jsxs)(op,{display:"flex",sx:{alignItems:"center",justifyContent:"end"},children:[(0,qt.jsxs)(d_,{sx:{flexDirection:"row",alignItems:"center"},className:"vitalTypeWebTop",children:[(0,qt.jsxs)(e_,{id:"demo-row-radio-buttons-group-label",sx:{flex:"0 0 80px",fontWeight:"600",fontSize:"14px"},children:[B("rpm_VitalType"),":"]}),(0,qt.jsx)(tH,{name:"vital",className:"usualFonts",children:e=>{let{field:t}=e;return(0,qt.jsx)(e_e,(0,i.A)((0,i.A)({row:!0,"aria-labelledby":"demo-row-radio-buttons-group-label"},t),{},{children:null===Nd||void 0===Nd?void 0:Nd.map(e=>(0,qt.jsx)(wE,{sx:{"& .MuiFormControlLabel-label":{fontSize:"14px"}},value:e.value,control:(0,qt.jsx)(f_e,{}),label:B("rpm_".concat(e.name)),disabled:!cs(L)},e.key))}))}})]}),(0,qt.jsx)(op,{width:"100%",marginTop:"-15px",children:(0,qt.jsx)(dH,{name:"vital",children:e=>(0,qt.jsx)(v_,{error:!0,children:B(e,{field:B("rpm_VitalType")})})})})]})}),(0,qt.jsxs)(op,{position:"relative",children:[L?(0,qt.jsx)(op,{mb:2,children:(0,qt.jsx)(Ff,{container:!0,spacing:2,children:(0,qt.jsx)(Ff,{item:!0,md:12,children:(0,qt.jsxs)(op,{display:"flex",alignItems:"center",justifyContent:"start",children:[(0,qt.jsxs)(op,{mr:1,display:"flex",children:[(0,qt.jsx)(Cf,{pr:1,children:"Attached Course:"}),(0,qt.jsxs)(Cf,{fontWeight:600,children:[" ",null===L||void 0===L||null===(t=L.schedule)||void 0===t?void 0:t.name]})]}),(0,qt.jsxs)(op,{display:"flex",alignItems:"center",justifyContent:"start",children:["(",(0,qt.jsx)(op,{pr:1,children:null!==L&&void 0!==L&&L.start_date?sa()(null===L||void 0===L?void 0:L.start_date).format("DD MMM YYYY"):""}),(0,qt.jsx)(op,{children:"-"}),(0,qt.jsx)(op,{pl:1,children:null!==L&&void 0!==L&&L.end_date?sa()(null===L||void 0===L?void 0:L.end_date).format("DD MMM YYYY"):""}),")"]})]})})})}):"",(0,qt.jsxs)(yH,{variant:"outlined",sx:{mb:"20px"},className:"fieldSizing",children:[(0,qt.jsx)(nW,{title:(0,qt.jsx)(Ff,{container:!0,spacing:2,alignItems:"center",children:(0,qt.jsx)(Ff,{item:!0,xs:!0,children:(0,qt.jsx)(Cf,{variant:"h6",component:"h6",color:"customClr.bp",fontWeight:600,fontSize:16,children:B("rpm_Symptoms")})})}),sx:{py:1.5,bgcolor:"primary.theme.50"}}),(0,qt.jsxs)(wH,{sx:{py:2,":last-child":{pb:2}},className:"symptomsTypeWeb",children:[(0,qt.jsxs)(Ff,{container:!0,spacing:2,children:[(0,qt.jsxs)(Ff,{item:!0,xs:12,md:6,lg:6,pt:0,children:[(0,qt.jsx)(o_,{id:"checkbox-select-label",fontWeight:600,sx:{marginBottom:"8px",fontSize:"14px"},children:"Type"}),(0,qt.jsxs)(op,{display:"flex",children:[(0,qt.jsx)(d_,{fullWidth:!0,children:(0,qt.jsx)(tH,{name:"complaints",component:$_e,placeholder:"e.g. Fever, Cough",options:(null===M||void 0===M?void 0:M.complaints)||[],onValueChange:(e,t,n)=>{O(e,t,n,c,d)},variant:"outlined",margin:"normal",fullWidth:!0})}),!cs(null===c||void 0===c?void 0:c.complaints)&&(0,qt.jsx)(xh,{color:"primary",onClick:()=>G(!V),sx:{marginLeft:"5px",height:"38px"},children:B(V?"rpm_Collapse":"rpm_Expand")})]})]}),(0,qt.jsx)(Ff,{item:!0,xs:12,md:12,lg:12,pt:0,children:(0,qt.jsxs)(op,{display:"flex",alignItems:"baseline",children:[(0,qt.jsx)(o_,{id:"checkbox-select-label",fontWeight:600,sx:{fontSize:"14px",marginRight:"6px",flex:"0 0 60px"},children:"Related:"}),(0,qt.jsxs)(op,{sx:{flex:"1"},children:[" ",null===re||void 0===re?void 0:re.map((e,t)=>{var n;const r=null===c||void 0===c||null===(n=c.complaints)||void 0===n?void 0:n.some(t=>t.name===e.name);return(0,qt.jsx)(Eb,{label:e.name,style:{marginRight:"5px",marginBottom:"5px",backgroundColor:r?"rgba(0, 0, 0, 0.12)":"rgba(0, 0, 0, 0.05)"},onClick:t=>{O(t,[e],"selectOption",c,d)}},t)}),(0,qt.jsx)(xh,{sx:{fontWeight:"600",fontSize:"12px"},color:"primary",onClick:()=>Y(e=>!e),children:B(q?"rpm_ViewLess":"rpm_ViewAll")})]})]})})]}),V&&(null===c||void 0===c||null===(n=c.complaintDetails)||void 0===n?void 0:n.map((e,t)=>(0,qt.jsx)(op,{mt:2,children:(0,qt.jsxs)(Ff,{container:!0,spacing:2,children:[(0,qt.jsx)(Ff,{item:!0,md:3,children:(0,qt.jsxs)(op,{minWidth:150,sx:{whiteSpace:"normal"},children:[(0,qt.jsx)(o_,{id:"checkbox-select-label",fontWeight:600,sx:{marginBottom:"8px",fontSize:"14px"},children:"Type"}),(0,qt.jsx)(tH,{as:qj,fullWidth:!0,disabled:!0,size:"small",id:"complaintDetails.".concat(t,".name"),name:"complaintDetails.".concat(t,".name"),variant:"outlined"})]})}),(0,qt.jsxs)(Ff,{item:!0,md:3,children:[(0,qt.jsx)(o_,{id:"checkbox-select-label",fontWeight:600,sx:{marginBottom:"8px",fontSize:"14px"},children:"Severity"}),(0,qt.jsx)(op,{sx:{whiteSpace:"normal"},minWidth:130,children:(0,qt.jsx)(tH,{as:G_,fullWidth:!0,size:"small",id:"complaintDetails.".concat(t,".severity"),name:"complaintDetails.".concat(t,".severity"),variant:"outlined",fontSize:12,children:kd.map(e=>(0,qt.jsx)(mf,{value:e.value,children:"".concat(e.name)},e.value))})})]}),(0,qt.jsxs)(Ff,{item:!0,md:3,children:[(0,qt.jsx)(o_,{fontWeight:600,sx:{marginBottom:"8px",fontSize:"14px"},children:"Frequency"}),(0,qt.jsx)(op,{sx:{whiteSpace:"normal"},minWidth:130,children:(0,qt.jsx)(tH,{as:G_,fullWidth:!0,size:"small",id:"complaintDetails.".concat(t,".frequency"),name:"complaintDetails.".concat(t,".frequency"),variant:"outlined",children:Td.map(e=>(0,qt.jsx)(mf,{value:e.value,children:"".concat(e.name)},e.value))})})]}),(0,qt.jsx)(Ff,{item:!0,md:3,display:"flex",alignItems:"center",children:(0,qt.jsxs)(op,{width:"100%",children:[(0,qt.jsx)(o_,{fontWeight:600,sx:{marginBottom:"8px",fontSize:"14px"},children:"Duration"}),(0,qt.jsxs)(op,{display:"flex",children:[(0,qt.jsx)(tH,{as:qj,type:"number",size:"small",width:"100%",id:"complaintDetails.".concat(t,".duration"),name:"complaintDetails.".concat(t,".duration"),onWheel:e=>e.target.blur(),onKeyDown:e=>{Pd.includes(e.key)&&e.preventDefault()},variant:"outlined",style:{borderRight:"0",borderRadius:"8px 0 0 8px",width:"100%"}}),(0,qt.jsx)(tH,{as:G_,size:"small",fullWidth:!0,id:"complaintDetails.".concat(t,".duration_unit"),name:"complaintDetails.".concat(t,".duration_unit"),variant:"outlined",style:{borderLeft:"0",borderRadius:"0 8px 8px 0",width:"175px",background:"#f9f9ff"},className:"customListSelect",children:Ad.map(e=>(0,qt.jsx)(mf,{value:e.value,children:"".concat(e.name)},e.value))})]})]})})]})},t)))]})]}),(0,qt.jsxs)(yH,{variant:"outlined",sx:{mb:"20px"},children:[(0,qt.jsx)(nW,{title:(0,qt.jsx)(Ff,{container:!0,spacing:2,alignItems:"center",children:(0,qt.jsx)(Ff,{item:!0,xs:!0,children:(0,qt.jsx)(Cf,{variant:"h6",component:"h6",color:"customClr.bp",fontWeight:600,fontSize:16,children:B("rpm_diagnosis")})})}),sx:{py:1.5,bgcolor:"primary.theme.50"}}),(0,qt.jsxs)(wH,{sx:{py:2,":last-child":{pb:2}},className:"fieldSizing",children:[(0,qt.jsxs)(Ff,{container:!0,spacing:2,children:[(0,qt.jsxs)(Ff,{item:!0,xs:12,md:6,lg:6,pt:0,className:"DiagosisModule",children:[(0,qt.jsx)(o_,{id:"checkbox-select-label",fontWeight:600,sx:{marginBottom:"8px",fontSize:"14px"},children:"Type"}),(0,qt.jsxs)(op,{display:"flex",children:[(0,qt.jsx)(d_,{fullWidth:!0,children:(0,qt.jsx)(tH,{name:"diagnosis",component:$_e,placeholder:"e.g. Hypertension, Gastritis",options:(null===M||void 0===M?void 0:M.diagnosis)||[],onValueChange:(e,t,n)=>{R(e,t,n,c,d)},variant:"outlined",margin:"normal",fullWidth:!0})}),!cs(null===c||void 0===c?void 0:c.diagnosis)&&(0,qt.jsx)(xh,{color:"primary",onClick:()=>ee(!J),sx:{marginLeft:"5px",height:"38px"},children:B(J?"rpm_Collapse":"rpm_Expand")})]})]}),(0,qt.jsx)(Ff,{item:!0,xs:12,md:12,lg:12,pt:0,children:(0,qt.jsxs)(op,{display:"flex",alignItems:"baseline",children:[(0,qt.jsx)(o_,{id:"checkbox-select-label",fontWeight:600,sx:{fontSize:"14px",marginRight:"6px",flex:"0 0 60px"},children:"Related:"}),(0,qt.jsxs)(op,{className:"diagosisChipsWeb",sx:{flex:"1"},children:[null===oe||void 0===oe?void 0:oe.map((e,t)=>{var n;const r=null===c||void 0===c||null===(n=c.diagnosis)||void 0===n?void 0:n.some(t=>t.name===e.name);return(0,qt.jsx)(Eb,{label:e.name,style:{marginRight:"5px",marginBottom:"5px",backgroundColor:r?"rgba(0, 0, 0, 0.12)":"rgba(0, 0, 0, 0.05)"},onClick:t=>{R(t,[e],"selectOption",c,d)}},t)}),(0,qt.jsx)(xh,{sx:{fontWeight:"600",fontSize:"12px"},color:"primary",onClick:()=>Q(e=>!e),children:B(X?"rpm_ViewLess":"rpm_ViewAll")})]})]})})]}),J&&(null===c||void 0===c||null===(r=c.diagnosisDetails)||void 0===r?void 0:r.map((e,t)=>(0,qt.jsx)(op,{mt:3,children:(0,qt.jsxs)(Ff,{container:!0,spacing:2,children:[(0,qt.jsx)(Ff,{item:!0,md:6,children:(0,qt.jsxs)(op,{minWidth:150,sx:{whiteSpace:"normal"},children:[(0,qt.jsx)(o_,{id:"checkbox-select-label",fontWeight:600,sx:{marginBottom:"8px",fontSize:"14px"},children:"Type"}),(0,qt.jsx)(tH,{as:qj,fullWidth:!0,disabled:!0,size:"small",id:"diagnosisDetails.".concat(t,".name"),name:"diagnosisDetails.".concat(t,".name"),variant:"outlined"})]})}),(0,qt.jsx)(Ff,{item:!0,md:6,display:"flex",alignItems:"center",children:(0,qt.jsxs)(op,{width:"100%",children:[(0,qt.jsx)(o_,{fontWeight:600,sx:{marginBottom:"8px",fontSize:"14px"},children:"Duration"}),(0,qt.jsxs)(op,{display:"flex",children:[(0,qt.jsx)(tH,{as:qj,type:"number",size:"small",width:"100%",id:"diagnosisDetails.".concat(t,".duration"),name:"diagnosisDetails.".concat(t,".duration"),onWheel:e=>e.target.blur(),onKeyDown:e=>{Pd.includes(e.key)&&e.preventDefault()},variant:"outlined",style:{borderRight:"0",borderRadius:"8px 0 0 8px",width:"100%"}}),(0,qt.jsx)(tH,{as:G_,size:"small",fullWidth:!0,id:"diagnosisDetails.".concat(t,".duration_unit"),name:"diagnosisDetails.".concat(t,".duration_unit"),variant:"outlined",style:{borderLeft:"0",borderRadius:"0 8px 8px 0",width:"175px",background:"#f9f9ff"},className:"customListSelect",children:Ad.map(e=>(0,qt.jsx)(mf,{value:e.value,children:"".concat(e.name)},e.value))})]})]})})]})},t)))]})]}),(0,qt.jsxs)(yH,{variant:"outlined",sx:{mb:"20px"},children:[(0,qt.jsx)(nW,{title:(0,qt.jsxs)(Ff,{container:!0,spacing:2,alignItems:"center",children:[(0,qt.jsx)(Ff,{item:!0,md:8,sm:6,xs:!0,children:(0,qt.jsx)(Cf,{variant:"h6",component:"h6",color:"customClr.bp",fontWeight:600,fontSize:16,children:B("Rx")})}),(0,qt.jsx)(Ff,{item:!0,md:4,sm:6,xs:!0,children:(0,qt.jsx)(op,{display:"flex",gap:1,flexWrap:"wrap",alignItems:"center",justifyContent:"end",children:(0,qt.jsx)(aj,{disableClearable:!0,value:g,size:"small",onChange:(e,t,n)=>{null!==t&&void 0!==t&&t.id&&(x(null===t||void 0===t?void 0:t.id),v(t)),"clear"===n&&v(null)},options:f,getOptionLabel:e=>e.name,renderInput:e=>(0,qt.jsx)(Q_,(0,i.A)((0,i.A)({},e),{},{label:"Select Template",sx:{bgcolor:"white",minWidth:"200px",borderRadius:1}})),renderOption:(e,t)=>(0,qt.jsx)("li",(0,i.A)((0,i.A)({},e),{},{style:{borderRadius:1,display:"flex",justifyContent:"space-between"},children:t.name})),className:"borderRadius-2"})})})]}),sx:{py:1.5,bgcolor:"primary.theme.50"}}),(0,qt.jsxs)(wH,{sx:{py:2,":last-child":{pb:2}},children:[(0,qt.jsx)(op,{className:"pres_inputTab",children:(0,qt.jsx)(op,{display:"flex",children:(0,qt.jsx)(op,{display:"flex",sx:{flex:"1",overflowX:"auto"},children:(0,qt.jsxs)(UT,{data:cs(null===c||void 0===c?void 0:c.notesList)?[{}]:null===c||void 0===c?void 0:c.notesList,headCells:te,noDataImage:l,skeletonVrows:6,className:"theme_scroll",children:[(0,qt.jsx)(lH,{name:"medicationList",validateOnChange:!1,children:e=>{var t,n,r;return(0,qt.jsx)(qt.Fragment,{children:cs(null===c||void 0===c?void 0:c.medicationList)?(0,qt.jsxs)(qt.Fragment,{children:[(0,qt.jsx)(cw,{children:(0,qt.jsx)(gw,{colSpan:7,sx:{border:"none",paddingBottom:"0"},children:(0,qt.jsx)("img",{src:l,style:{display:"block",margin:"auto",maxWidth:"200px"}})})}),(0,qt.jsx)(cw,{children:(0,qt.jsxs)(gw,{colSpan:7,sx:{border:"none",paddingBottom:"30px"},align:"center",children:[(0,qt.jsx)(Cf,{}),(0,qt.jsx)(xh,{variant:"contained",color:"primary",disableElevation:!0,disabled:null===c||void 0===c||null===(n=c.medicationList)||void 0===n||null===(r=n.find(e=>null===e||void 0===e?void 0:e.isEdit))||void 0===r?void 0:r.isEdit,onClick:()=>e.push({id:(0,N_e.v4)(),medicine:null,medicine_form:"",icon_type:"",salt_composition:null,dose:null,unit:null,color:"",image:"",start_date:sa()(new Date),end_date:null,days:"",repetition_kind:gd,timing:[],frequency:"",comments:""}),children:B("rpm_AddNewConsultation")})]})})]}):null===c||void 0===c||null===(t=c.medicationList)||void 0===t?void 0:t.map((t,n)=>{var r,o,a;return(0,qt.jsxs)(We.Fragment,{children:[(0,qt.jsxs)(cw,{sx:{"&:last-child td, &:last-child th":{border:0}},className:(null===c||void 0===c?void 0:c.medicationList[n].showMore)&&"removeOrder",children:[(0,qt.jsx)(gw,{sx:{verticalAlign:"top"},children:(0,qt.jsxs)(op,{minWidth:150,sx:{whiteSpace:"normal"},children:[(0,qt.jsx)(aj,{freeSolo:!0,options:cs(D)?[]:D,id:"medicationList.".concat(n,".medicine"),name:"medicationList.".concat(n,".medicine"),value:(null===c||void 0===c||null===(r=c.medicationList[n])||void 0===r?void 0:r.medicine)||null,getOptionLabel:e=>(null===e||void 0===e?void 0:e.medicine)||"",isOptionEqualToValue:(e,t)=>e.id===t.id,onInputChange:(e,t)=>ce(e,t,n),onChange:async(e,t,r)=>{await d("medicationList.".concat(n,".medicine"),t),u("medicationList.".concat(n,".medicine"),!0),d("medicationList.".concat(n,".salt_composition"),null===t||void 0===t?void 0:t.salt_composition),d("medicationList.".concat(n,".medicine_form"),null===t||void 0===t?void 0:t.product_form),"clear"===r&&(d("medicationList.".concat(n,".salt_composition"),""),d("medicationList.".concat(n,".medicine_form"),""))},renderOption:(e,t)=>(0,We.createElement)(op,(0,i.A)((0,i.A)({component:"li"},e),{},{key:t.id}),(0,qt.jsx)(op,{children:(0,qt.jsx)(Cf,{variant:"body1",component:"p",children:null===t||void 0===t?void 0:t.medicine})})),renderInput:e=>(0,qt.jsx)(Q_,(0,i.A)((0,i.A)({},e),{},{fullWidth:!0,size:"small",variant:"outlined",placeholder:"Medicine",InputProps:(0,i.A)((0,i.A)({},e.InputProps),{},{endAdornment:(0,qt.jsxs)(tw,{position:"end",children:[(0,qt.jsx)(sy,{title:B("message:rpm_MedicineNameHelp"),placement:"top",children:(0,qt.jsx)(wh,{size:"small",disableRipple:!0,sx:{p:0},children:(0,qt.jsx)(pM.A,{fontSize:"small"})})}),e.InputProps.endAdornment]})})}))}),(0,qt.jsx)(dH,{name:"medicationList.".concat(n,".medicine"),children:e=>(0,qt.jsx)(v_,{error:!0,children:B(e,{field:B("rpm_MedicineName")})})})]})}),(0,qt.jsx)(gw,{sx:{verticalAlign:"top"},children:(0,qt.jsxs)(op,{minWidth:150,sx:{whiteSpace:"normal",verticalAlign:"top"},children:[(0,qt.jsx)(tH,{as:G_,size:"small",fullWidth:!0,id:"medicationList.".concat(n,".frequency"),name:"medicationList.".concat(n,".frequency"),onChange:e=>{d("medicationList",c.medicationList.map((t,r)=>n===r?(0,i.A)((0,i.A)({},t),{},{frequency:e.target.value,repetition_kind:e.target.value>4?vd:gd,timing:[...C(e.target.value)]}):t))},variant:"outlined",defaultValue:"",endAdornment:(0,qt.jsx)(tw,{position:"end",sx:{position:"absolute",right:"25px"},children:(0,qt.jsx)(sy,{title:B("message:rpm_FrequencyHelp"),placement:"top",children:(0,qt.jsx)(wh,{size:"small",disableRipple:!0,sx:{p:0},children:(0,qt.jsx)(pM.A,{fontSize:"small"})})})}),children:null===Ld||void 0===Ld?void 0:Ld.map(e=>(0,qt.jsx)(mf,{value:e.key,children:"".concat(e.text)},e.key))}),(0,qt.jsx)(dH,{name:"medicationList.".concat(n,".frequency"),children:e=>(0,qt.jsx)(v_,{error:!0,children:B(e,{field:B("rpm_Frequency")})})}),(0,qt.jsx)(op,{children:(0,qt.jsxs)(xh,{variant:"text",component:"label",disableFocusRipple:!0,disableRipple:!0,disabled:!c.medicationList[n].frequency||"0"===c.medicationList[n].frequency,onClick:()=>{U(n),b()},children:[(0,qt.jsx)(D_e.A,{fontSize:"small",sx:{width:16,height:16,mr:.5}}),B("setReminder")]})}),(0,qt.jsx)(op,{display:"flex",flexWrap:"wrap",children:(null===t||void 0===t?void 0:t.timing)&&(null===t||void 0===t?void 0:t.timing.map((e,t)=>(0,qt.jsx)(op,{pr:.5,pb:.5,children:(0,qt.jsx)(Cf,{style:(null===e||void 0===e?void 0:e.start_time)&&{backgroundColor:"#EDEDED",borderRadius:"20px",padding:"3px 8px",fontSize:"13px",color:"#6B7280"},children:null!==e&&void 0!==e&&e.start_time?sa()(e.start_time).format("hh:mm a"):""})},t)))})]})}),(0,qt.jsx)(gw,{sx:{verticalAlign:"top"},children:(0,qt.jsxs)(op,{minWidth:200,sx:{whiteSpace:"normal"},children:[(0,qt.jsx)(tH,{as:qj,fullWidth:!0,size:"small",type:"number",placeholder:"in days",id:"medicationList.".concat(n,".days"),name:"medicationList.".concat(n,".days"),variant:"outlined",value:c.medicationList[n].days||null,onWheel:e=>e.target.blur(),onKeyDown:e=>Pd.includes(e.key)&&e.preventDefault(),onChange:async e=>{const t=parseInt(e.target.value);await d("medicationList.".concat(n,".days"),t),u("medicationList.".concat(n,".days"),!0),d("medicationList.".concat(n,".end_date"),os(c.medicationList[n].start_date,t))},endAdornment:(0,qt.jsx)(tw,{position:"end",sx:{position:"absolute",right:"8px"},children:(0,qt.jsx)(sy,{title:B("message:rpm_MedicineDaysHelp"),placement:"top",children:(0,qt.jsx)(wh,{size:"small",disableRipple:!0,sx:{p:0},children:(0,qt.jsx)(pM.A,{fontSize:"small"})})})})}),(0,qt.jsx)(dH,{name:"medicationList.".concat(n,".days"),children:e=>(0,qt.jsx)(v_,{error:!0,children:B(e,{field:B("rpm_Days")})})})]})}),(0,qt.jsx)(gw,{sx:{verticalAlign:"top"},children:(0,qt.jsx)(WM,{dateAdapter:DI,children:(0,qt.jsxs)(op,{className:"DatepickerForm",sx:e=>({"& .MuiFormControl-root":{display:"flex"},"& .MuiFormLabel-root":{color:e.palette.grey[800]},"& .MuiOutlinedInput-input":{padding:"10px",fontSize:"14px"}}),mr:1,display:"flex",minWidth:370,width:"100%",children:[(0,qt.jsxs)(op,{width:"100%",children:[(0,qt.jsx)(tH,{as:fD,size:"small",label:"From",id:"medicationList.".concat(n,".start_date"),name:"medicationList.".concat(n,".start_date"),value:c.medicationList[n].start_date,inputFormat:"dd/MM/yyyy",onPaste:e=>{e.preventDefault()},onChange:e=>{d("medicationList.".concat(n,".start_date"),e);const t=is(e,c.medicationList[n].end_date);d("medicationList.".concat(n,".days"),t)},renderInput:e=>(0,qt.jsx)(Q_,(0,i.A)((0,i.A)({},e),{},{autoComplete:"off",onKeyDown:e=>{e.preventDefault()},sx:{width:"100%"}})),disablePast:!0}),(0,qt.jsx)(dH,{name:"medicationList.".concat(n,".start_date"),children:e=>(0,qt.jsx)(v_,{error:!0,children:B(e,{field:B("rpm_Date")})})})]}),(0,qt.jsx)(op,{}),(0,qt.jsx)(op,{display:"flex",alignItems:"center",pl:1,children:"-"}),(0,qt.jsx)(op,{className:"DatepickerForm",sx:e=>({"& .MuiFormControl-root":{display:"flex"},"& .MuiFormLabel-root":{color:e.palette.grey[800]}}),ml:1,width:"100%",children:(0,qt.jsx)(tH,{fullWidth:!0,as:fD,size:"small",label:"To",id:"medicationList.".concat(n,".end_date"),name:"medicationList.".concat(n,".end_date"),value:t.end_date,inputFormat:"dd/MM/yyyy",onPaste:e=>{e.preventDefault()},onChange:e=>{d("medicationList.".concat(n,".end_date"),e);const t=is(c.medicationList[n].start_date,e);d("medicationList.".concat(n,".days"),t)},renderInput:e=>(0,qt.jsx)(Q_,(0,i.A)((0,i.A)({},e),{},{autoComplete:"off",onKeyDown:e=>{e.preventDefault()},sx:{width:"100%"}})),minDate:t.start_date?t.start_date:new Date})})]})})}),(null===c||void 0===c?void 0:c.medicationList[n].showMore)&&(0,qt.jsxs)(qt.Fragment,{children:[(0,qt.jsx)(gw,{style:{verticalAlign:"top",minWidth:"150px"},children:(0,qt.jsx)(op,{sx:{whiteSpace:"normal"},children:(0,qt.jsx)(tH,{as:qj,fullWidth:!0,disabled:!0,size:"small",id:"medicationList.".concat(n,".medicine_form"),name:"medicationList.".concat(n,".medicine_form"),placeholder:"Form",variant:"outlined",endAdornment:(0,qt.jsx)(tw,{position:"end",children:(0,qt.jsx)(sy,{title:B("message:rpm_FormHelp"),placement:"top",children:(0,qt.jsx)(wh,{size:"small",disableRipple:!0,sx:{p:0},children:(0,qt.jsx)(pM.A,{fontSize:"small"})})})})})})}),(0,qt.jsx)(gw,{style:{verticalAlign:"top"},children:(0,qt.jsx)(tH,{sx:{minWidth:"400px"},as:qj,fullWidth:!0,disabled:!0,size:"small",id:"medicationList.".concat(n,".salt_composition"),name:"medicationList.".concat(n,".salt_composition"),placeholder:"Salt Composition",variant:"outlined",endAdornment:(0,qt.jsx)(tw,{position:"end",children:(0,qt.jsx)(sy,{title:B("message:rpm_CompositionHelp"),placement:"top",children:(0,qt.jsx)(wh,{size:"small",disableRipple:!0,sx:{p:0},children:(0,qt.jsx)(pM.A,{fontSize:"small"})})})})})}),(0,qt.jsx)(gw,{style:{verticalAlign:"top"},children:(0,qt.jsxs)(op,{children:[(0,qt.jsx)(op,{display:"flex",gap:2,sx:{height:"40px"},minWidth:150,children:(0,qt.jsxs)(tH,{as:G_,size:"small",displayEmpty:!0,fullWidth:!0,id:"medicationList.".concat(n,".icon_type"),name:"medicationList.".concat(n,".icon_type"),variant:"outlined",className:"shapeDropDown",endAdornment:(0,qt.jsx)(tw,{position:"end",sx:{position:"absolute",right:"28px"},children:(0,qt.jsx)(sy,{title:B("message:rpm_MedicineShapeIconHelp"),placement:"top",children:(0,qt.jsx)(wh,{size:"small",disableRipple:!0,sx:{p:0},children:(0,qt.jsx)(pM.A,{fontSize:"small"})})})}),children:[(0,qt.jsx)(mf,{value:"",sx:{display:"none",opacity:"0.6",color:"red"},children:(0,qt.jsx)("span",{style:{color:"#c6c6c6"},children:"Shape"})}),null===Fd||void 0===Fd?void 0:Fd.map(e=>(0,qt.jsx)(mf,{value:e.key,children:e.text},e.key))]})}),(0,qt.jsxs)(op,{children:[ps(null===t||void 0===t?void 0:t.image)?(0,qt.jsxs)(op,{className:"upload-input-text",children:[(0,qt.jsx)("input",{id:"medicationList.".concat(n,".image"),name:"medicationList.".concat(n,".image"),type:"file",onChange:e=>{d("medicationList.".concat(n,".image"),e.currentTarget.files[0])}}),(0,qt.jsxs)("label",{htmlFor:"contained-button-file",style:{display:"flex",paddingTop:"5px"},children:[(0,qt.jsx)(op,{textOverflow:"ellipsis",whiteSpace:"nowrap",overflow:"hidden",children:B("uploadImage")}),(0,qt.jsx)(op,{clone:!0,mr:1,color:"primary",children:(0,qt.jsx)(Cue,{width:22,height:22})})]})]}):(0,qt.jsxs)(op,{style:{display:"flex",paddingTop:"5px"},width:170,children:[(0,qt.jsx)(op,{textOverflow:"ellipsis",whiteSpace:"nowrap",style:{cursor:"pointer"},overflow:"hidden",onClick:()=>{const e=URL.createObjectURL(t.image);S({open:!0,data:e})},children:null===t||void 0===t||null===(o=t.image)||void 0===o?void 0:o.name}),(0,qt.jsx)(op,{mr:1,color:"primary",position:"relative",zIndex:2,children:(0,qt.jsx)(wh,{size:"small",color:"error","aria-label":"remove file",onClick:()=>{d("medicationList.".concat(n,".image"),"")},children:(0,qt.jsx)(xc,{width:22,height:22})})})]}),(0,qt.jsx)(dH,{name:"medicationList.".concat(n,".image"),children:e=>(0,qt.jsx)(v_,{error:!0,children:B(e,{field:B("rpm_image")})})})]})]})}),(0,qt.jsx)(gw,{style:{verticalAlign:"top"},children:(0,qt.jsxs)(op,{sx:{whiteSpace:"normal"},minWidth:300,children:[(0,qt.jsx)(tH,{as:qj,fullWidth:!0,multiline:!0,rows:3,size:"small",variant:"outlined",name:"medicationList.".concat(n,".comments"),placeholder:"Enter Comments",endAdornment:(0,qt.jsx)(tw,{position:"end",sx:{position:"absolute",right:"8px"},children:(0,qt.jsx)(sy,{title:B("message:rpm_CommentsHelp"),placement:"top",children:(0,qt.jsx)(wh,{size:"small",disableRipple:!0,sx:{p:0},children:(0,qt.jsx)(pM.A,{fontSize:"small"})})})})}),(0,qt.jsx)(dH,{name:"medicationList.".concat(n,".comments"),children:e=>(0,qt.jsx)(v_,{error:!0,children:B(e,{field:B("rpm_Comment")})})})]})})]}),(0,qt.jsxs)(gw,{sx:{textAlign:"center",verticalAlign:"top"},children:[(0,qt.jsx)(sy,{placement:"top-start",title:"Show more Fields",children:(0,qt.jsx)(wh,{color:"primary",sx:{fontSize:"12"},onClick:()=>{if(c.medicationList[n].showMore){let e=[...c.medicationList];e.splice(n,1),-1===(null===e||void 0===e?void 0:e.findIndex(e=>null===e||void 0===e?void 0:e.showMore))&&de(),d("medicationList.".concat(n,".showMore"),!1)}else(()=>{let e=s.slice(0,-1);ne([...e,...I])})(),d("medicationList.".concat(n,".showMore"),!0)},children:c.medicationList[n].showMore?(0,qt.jsx)(j_e.A,{}):(0,qt.jsx)(Jxe.A,{})})}),(0,qt.jsx)(wh,{color:"error",onClick:()=>{var t;null!==(t=c.medicationList[n].medicine)&&void 0!==t&&t.medicine?E((0,i.A)((0,i.A)({},T),{},{open:!T.open,data:()=>e.remove(n)})):e.remove(n);let r=[...c.medicationList];r.splice(n,1),-1===(null===r||void 0===r?void 0:r.findIndex(e=>null===e||void 0===e?void 0:e.showMore))&&de()},children:(0,qt.jsx)(xc,{fontSize:"small",sx:{width:16,height:16}})})]})]}),(null===c||void 0===c||null===(a=c.medicationList)||void 0===a?void 0:a.length)-1===n&&(0,qt.jsxs)(xh,{color:"primary",onClick:()=>{N(""),e.push({id:(0,N_e.v4)(),medicine:null,medicine_form:"",icon_type:"",salt_composition:null,dose:null,unit:null,color:"",image:"",start_date:sa()(new Date),end_date:null,days:"",repetition_kind:gd,timing:[],frequency:"",comments:""})},children:[(0,qt.jsx)(Zue,{fontSize:"small",sx:{width:18,height:18}}),B("rpm_AddMore")]})]},n)})})}}),(0,qt.jsx)(hCe,{open:j,setOpen:_,medicationList:null===c||void 0===c?void 0:c.medicationList[W],modalIndex:W,setFieldValue:d,setFieldTouched:u}),(0,qt.jsx)(_C,{open:w.open,imageUrl:w.data,onClose:A,imageWidthHeight:{width:"400",height:"400"}}),(0,qt.jsx)(qV,{openModal:T.open,onCloseModal:k,actionFunction:()=>{var e;T.data(),k(),1===(null===c||void 0===c||null===(e=c.medicationList)||void 0===e?void 0:e.length)&&v(null)},options:{primaryText:B("message:rpm_DeleteTitle"),secondaryText:B("message:rpm_DeleteBodyText"),btn:{primaryText:B("rpm_Delete"),secondaryText:B("rpm_Cancel"),primaryColor:"error",secondaryColor:"primary"},btnSwap:!0}})]})})})}),(0,qt.jsx)(op,{mt:3,justifyContent:"flex-end",display:"flex",gap:1,children:(0,qt.jsx)(xh,{color:"primary",disableElevation:!0,variant:"text",type:"submit",disabled:!(null!==c&&void 0!==c&&c.medicationList.length),onClick:()=>d("buttonType","template"),children:B("rpm_SaveAsTemplate")})})]})]}),(0,qt.jsxs)(yH,{variant:"outlined",sx:{mb:"20px"},children:[(0,qt.jsx)(nW,{title:(0,qt.jsx)(Ff,{container:!0,spacing:2,alignItems:"center",children:(0,qt.jsx)(Ff,{item:!0,xs:!0,children:(0,qt.jsx)(Cf,{variant:"h6",component:"h6",color:"customClr.bp",fontWeight:600,fontSize:16,placeholder:"Advice...",children:B("rpm_advice")})})}),sx:{py:1.5,bgcolor:"primary.theme.50"}}),(0,qt.jsxs)(wH,{sx:{py:2,":last-child":{pb:2}},children:[(0,qt.jsx)(op,{mb:2,children:null===M||void 0===M||null===(o=M.advices)||void 0===o?void 0:o.map((e,t)=>{var n,r;return(0,qt.jsx)(Eb,{className:"adviceChips",label:e.name,onClick:()=>{const t=null===c||void 0===c?void 0:c.advices;let n=[];n=null!==t&&void 0!==t&&t.includes(e.name)?t.filter(t=>t!==e.name):[...t,e.name],d("advices",n)},onDelete:null!==c&&void 0!==c&&null!==(n=c.advices)&&void 0!==n&&n.includes(e.name)?()=>{var t;return d("advices",null===c||void 0===c||null===(t=c.advices)||void 0===t?void 0:t.filter(t=>t!==e.name))}:void 0,style:{marginRight:"3px",marginBottom:"5px",backgroundColor:null!==c&&void 0!==c&&null!==(r=c.advices)&&void 0!==r&&r.includes(e.name)?"rgba(0, 0, 0, 0.12)":"rgba(0, 0, 0, 0.05)"}},t)})}),(0,qt.jsx)(tH,{component:Q_,multiline:!0,rows:4,variant:"outlined",id:"advices",name:"advices",fullWidth:!0,value:null===c||void 0===c||null===(a=c.advices)||void 0===a?void 0:a.join(", "),onChange:e=>{e.preventDefault();const t=e.target.value.split("|").map(e=>e);d("advices",t)}})]})]}),(0,qt.jsxs)(yH,{variant:"outlined",sx:{mb:"20px"},className:"fieldSizing",children:[(0,qt.jsx)(nW,{title:(0,qt.jsx)(Ff,{container:!0,spacing:2,alignItems:"center",children:(0,qt.jsx)(Ff,{item:!0,xs:!0,children:(0,qt.jsx)(Cf,{variant:"h6",component:"h6",color:"customClr.bp",fontWeight:600,fontSize:16,children:B("rpm_testrequest")})})}),sx:{py:1.5,bgcolor:"primary.theme.50"}}),(0,qt.jsx)(wH,{sx:{py:2,":last-child":{pb:2}},children:(0,qt.jsxs)(Ff,{container:!0,spacing:2,children:[(0,qt.jsxs)(Ff,{item:!0,md:6,className:"symptomsTypeWeb",children:[(0,qt.jsx)(o_,{id:"checkbox-select-label",fontWeight:600,sx:{marginBottom:"8px",fontSize:"14px"},children:"Type"}),(0,qt.jsx)(d_,{fullWidth:!0,children:(0,qt.jsx)(tH,{name:"tests",component:$_e,options:(null===M||void 0===M?void 0:M.tests)||[],variant:"outlined",placeholder:"Select Tests",margin:"normal",fullWidth:!0})})]}),(0,qt.jsx)(Ff,{item:!0,xs:12,md:12,lg:12,pt:0,children:(0,qt.jsxs)(op,{display:"flex",alignItems:"baseline",children:[(0,qt.jsx)(o_,{id:"checkbox-select-label",fontWeight:600,sx:{fontSize:"14px",marginRight:"6px",flex:"0 0 60px"},children:"Related:"}),(0,qt.jsxs)(op,{sx:{flex:"1"},children:[null===ie||void 0===ie?void 0:ie.map((e,t)=>{var n;const r=null===c||void 0===c||null===(n=c.tests)||void 0===n?void 0:n.some(t=>t.name===e.name);return(0,qt.jsx)(Eb,{className:"adviceChips",label:e.name,onClick:()=>{if(r)return!1;d("tests",[...c.tests,e])},style:{marginRight:"3px",marginBottom:"5px",backgroundColor:r?"rgba(0, 0, 0, 0.12)":"rgba(0, 0, 0, 0.05)"}},t)}),(0,qt.jsx)(xh,{sx:{fontWeight:"600",fontSize:"12px"},color:"primary",onClick:()=>K(e=>!e),children:B(Z?"rpm_ViewLess":"rpm_ViewAll")})]})]})})]})})]}),(0,qt.jsxs)(yH,{variant:"outlined",sx:{mb:"20px"},className:"fieldSizing",children:[(0,qt.jsx)(nW,{title:(0,qt.jsx)(Ff,{container:!0,spacing:2,alignItems:"center",children:(0,qt.jsx)(Ff,{item:!0,xs:!0,children:(0,qt.jsx)(Cf,{variant:"h6",component:"h6",color:"customClr.bp",fontWeight:600,fontSize:16,children:B("rpm_followUpDate")})})}),sx:{py:1.5,bgcolor:"primary.theme.50"}}),(0,qt.jsxs)(wH,{sx:{py:2,":last-child":{pb:2}},children:[(0,qt.jsx)(WM,{dateAdapter:DI,children:(0,qt.jsxs)(Ff,{container:!0,spacing:1,children:[(0,qt.jsx)(Ff,{item:!0,md:6,children:(0,qt.jsxs)(op,{className:"DatepickerForm",sx:e=>({"& .MuiFormControl-root":{display:"flex"},"& .MuiFormLabel-root":{color:e.palette.grey[800]}}),mr:1,children:[(0,qt.jsxs)(o_,{fontWeight:600,sx:{marginBottom:"8px",fontSize:"14px"},children:[B("rpm_Duration")," (in days)"]}),(0,qt.jsx)(tH,{as:qj,fullWidth:!0,size:"small",type:"number",onPaste:e=>e.preventDefault(),id:"followUpDays",name:"followUpDays",variant:"outlined",onWheel:e=>e.target.blur(),onKeyDown:e=>Pd.includes(e.key)&&e.preventDefault(),onChange:e=>{const t=parseInt(e.target.value);d("followUpDays",t);const n=os(sa()(new Date),t),r=sa()(n).add(1,"days");d("followUpDate",r.valueOf());const i=sa()(r).subtract(null===c||void 0===c?void 0:c.daysDifference,"days").startOf("day").valueOf();d("followUpReminderDate",i)},endAdornment:(0,qt.jsx)(tw,{position:"end",sx:{position:"absolute",right:"8px"},children:(0,qt.jsx)(sy,{title:B("message:rpm_MedicineDaysHelp"),placement:"top",children:(0,qt.jsx)(wh,{size:"small",disableRipple:!0,sx:{p:0},children:(0,qt.jsx)(pM.A,{fontSize:"small"})})})})}),(0,qt.jsx)(dH,{name:"followUpDays",children:e=>(0,qt.jsx)(v_,{error:!0,children:B(e,{field:B("rpm_Days")})})})]})}),(0,qt.jsx)(Ff,{item:!0,md:6,className:"symptomsTypeWeb",children:(0,qt.jsxs)(op,{className:"DatepickerForm",sx:e=>({"& .MuiFormControl-root":{display:"flex"},"& .MuiFormLabel-root":{color:e.palette.grey[800]},"& .MuiOutlinedInput-input":{}}),mr:1,children:[(0,qt.jsx)(o_,{fontWeight:600,sx:{marginBottom:"8px",fontSize:"14px"},children:"Date"}),(0,qt.jsx)(tH,{as:fD,size:"small",placeholder:"To",id:"followUpDate",name:"followUpDate",value:null===c||void 0===c?void 0:c.followUpDate,inputFormat:"dd/MM/yyyy",onPaste:e=>{e.preventDefault()},onChange:e=>{d("followUpDate",sa()(e).endOf("day").valueOf());const t=is(sa()(new Date),e)-parseInt(1);d("followUpDays",t);const n=sa()(e).subtract(null===c||void 0===c?void 0:c.daysDifference,"days").startOf("day").valueOf();d("followUpReminderDate",n)},renderInput:e=>(0,qt.jsx)(Q_,(0,i.A)((0,i.A)({},e),{},{autoComplete:"off",onKeyDown:e=>{e.preventDefault()}})),minDate:sa()(new Date).add(1,"days")})]})})]})}),(0,qt.jsx)(op,{mt:2,children:(null===c||void 0===c?void 0:c.followUpReminder)&&(0,qt.jsx)(wE,{control:(0,qt.jsx)(Dw,{defaultChecked:!0,disabled:!0}),label:"Send reminder and WhatsApp message to this patient on ".concat(null!==c&&void 0!==c&&c.followUpReminderDate?" ".concat(sa()(null===c||void 0===c?void 0:c.followUpReminderDate).format("DD/MM/YYYY")," at ").concat(null===c||void 0===c?void 0:c.followUpTime):"")})})]})]}),(0,qt.jsx)(vCe,{open:p,onClose:()=>h(!1),actionFunction:()=>m(c),title:B("rpm_SaveTemplate"),disableButton:null===c||void 0===c||!c.templateName,children:(0,qt.jsxs)(op,{mt:2,children:[(0,qt.jsx)(Cf,{variant:"body1",fontWeight:"h6.fontWeight",gutterBottom:!0,children:B("rpm_TemplateName")}),(0,qt.jsx)(tH,{as:qj,fullWidth:!0,size:"small",id:"templateName",name:"templateName",variant:"outlined",endAdornment:(0,qt.jsx)(tw,{position:"end",children:(0,qt.jsx)(sy,{title:B("message:rpm_MedicineNameHelp"),placement:"top",children:(0,qt.jsx)(wh,{size:"small",disableRipple:!0,sx:{p:0},children:(0,qt.jsx)(pM.A,{fontSize:"small"})})})})})]})})]}),(0,qt.jsx)(op,{children:(0,qt.jsxs)(op,{mb:3,display:"flex",gap:1,flexWrap:"wrap",children:[(0,qt.jsx)(xh,{variant:"outlined",color:"primary",onClick:()=>H(-1),sx:{marginRight:"10px"},children:B("rpm_Cancel")}),(0,qt.jsx)(xh,{color:"primary",disableElevation:!0,variant:"contained",type:"submit",disabled:!(null!==c&&void 0!==c&&c.medicationList.length),onClick:async()=>{d("buttonType","update");const e=await y();Object.keys(e).length&&z(B("message:rpm_FormikFieldError"),{variant:"error"})},children:B("rpm_Save")})]})})]})})}}),(0,qt.jsx)(gCe,{showButton:!1,openModal:$.open,onCloseModal:F,options:{primaryText:(0,qt.jsx)(qt.Fragment,{children:(0,qt.jsxs)(op,{display:"flex",alignItems:"center",children:[(0,qt.jsx)("span",{style:{background:"#3f51b5",color:"#ffffff",fontSize:"16px",fontWeight:"900",width:"20px",height:"20px",borderRadius:"50px",display:"flex",alignItems:"center",justifyContent:"center",marginRight:"15px"},children:"!"}),(0,qt.jsx)(Cf,{variant:"h2",component:"h2",sx:{fontSize:"18px",fontWeight:"700"},children:B("message:rpm_SaveTitle")})]})}),secondaryText:(0,qt.jsxs)(qt.Fragment,{children:[(0,qt.jsxs)(op,{display:"flex",alignItems:"center",children:[(0,qt.jsx)(Xc,{}),(0,qt.jsx)("p",{style:{margin:"0",display:"flex"},children:$.data.conflicts.map((e,t)=>(0,qt.jsx)("p",{style:{display:"flex",padding:"0 15px",fontWeight:"600",margin:"0"},children:e},t))})]}),(0,qt.jsx)("p",{style:{fontSize:"18px",color:e=>e.palette.grey[700]},children:"There are already scheduled medicine reminders for these times. Please check the time you have added."})]}),btn:{primaryText:B("rpm_Save"),secondaryText:B("rpm_Cancel"),primaryColor:"error",secondaryColor:"primary"},btnSwap:!0}})]})};xCe.defaultProps={order:"",orderBy:"",notesHead:[],checkState:[],onCheck:()=>{},isSelection:!1,nodata:"",pageDetails:{},fetchNoteList:()=>{},addNewPrescription:()=>{},editPrescription:()=>{},openMedicineTimings:()=>{},timingBox:!1,setTimingBox:()=>{},prescriptionData:{},templateModal:!1,setTemplateModal:()=>{},saveTemplate:()=>{},allTemplates:[],template:"",setTemplate:()=>{},getTemplateById:()=>{},deleteTemplate:()=>{},templateDelete:{},setTemplateDelete:()=>{},prescriptionId:"",addTimings:()=>{},imageBox:{},setImageBox:()=>{},closeImageBox:()=>{},rowDelete:{},setRowDelete:()=>{},handleConfirmModalToggle:()=>{},handleComplaints:()=>{},handleDiagnosis:()=>{},chips:{},notifications:{},medicineSuggestions:[],getMedicineData:()=>{},setMedicineSuggestions:()=>{},state:{},newHeads:[],handleReminderConfirmModalToggle:()=>{},setReminderError:()=>{},reminderError:{},fetchRxDocument:()=>{},programId:"",rxData:{},modifyRxData:()=>{},loading:!1};const yCe=xCe,bCe=(0,Cy.A)((0,qt.jsx)("path",{d:"M19 13H5v-2h14z"}),"Remove"),jCe=zT({selectTemplateLabel:{transform:"translate(14px, -4px) !important"}}),_Ce=e=>{let{open:t,children:n,onClose:r,title:i,actionFunction:o,disableButton:a}=e;return(0,qt.jsxs)(cC,{open:t,onClose:r,fullWidth:!0,maxWidth:"sm",children:[(0,qt.jsxs)(fC,{sx:{m:0,p:2},children:[i,r?(0,qt.jsx)(wh,{"aria-label":"close",onClick:r,sx:{position:"absolute",right:8,top:8,color:e=>e.palette.grey[500]},children:(0,qt.jsx)(J_.A,{})}):null]}),(0,qt.jsx)(eg,{}),(0,qt.jsx)(bC,{children:n}),(0,qt.jsxs)(vE,{children:[(0,qt.jsx)(xh,{color:"primary",disableElevation:!0,variant:"outlined",onClick:r,style:{marginBottom:"10px"},children:"Cancel"}),(0,qt.jsx)(xh,{color:"primary",disableElevation:!0,variant:"contained",onClick:o,style:{marginBottom:"10px"},disabled:a,children:"Save"})]})]})},CCe=e=>{var t,n,r,o,a;let{nodata:s,addNewPrescription:l,prescriptionData:c,editPrescription:d,templateModal:u,setTemplateModal:p,saveTemplate:h,allTemplates:m,template:f,setTemplate:g,getTemplateById:v,handleComplaints:x,handleDiagnosis:y,prescriptionId:b,chips:j,notifications:_,medicineSuggestions:C,getMedicineData:w}=e;const S=jCe(),A=so(),{state:k}=oo(),[T,E]=(0,We.useState)(!1),[M,O]=(0,We.useState)(null),[R,P]=(0,We.useState)({open:!1,data:""}),[D,N]=(0,We.useState)({open:!1,data:""}),[L,I]=(0,We.useState)(!1),[F,$]=(0,We.useState)(!1),[B,z]=(0,We.useState)(!1),[H,W]=(0,We.useState)(!1),[U,V]=(0,We.useState)(!1),G=F?null===j||void 0===j?void 0:j.complaints:null===j||void 0===j||null===(t=j.complaints)||void 0===t?void 0:t.slice(0,10),q=B?null===j||void 0===j?void 0:j.tests:null===j||void 0===j||null===(n=j.tests)||void 0===n?void 0:n.slice(0,10),Y=H?null===j||void 0===j?void 0:j.diagnosis:null===j||void 0===j||null===(r=j.diagnosis)||void 0===r?void 0:r.slice(0,10),Z=(0,We.useRef)(),K=()=>{N((0,i.A)((0,i.A)({},D),{},{open:!D.open,data:""}))},[X,Q]=(0,We.useState)(null),J=e=>(t,n)=>{Q(n?e:null)},[ee,te]=(0,We.useState)({vital:null!==k&&void 0!==k&&null!==(o=k.schedule)&&void 0!==o&&o.vital_name?null===k||void 0===k||null===(a=k.schedule)||void 0===a?void 0:a.vital_name:"others",templateName:"",complaints:[],complaintDetails:[],diagnosis:[],diagnosisDetails:[],tests:[],followUpDays:"",followUpDate:null,followUpReminder:!0,followUpReminderDate:null,followUpTime:null,medicationList:[{id:(0,N_e.v4)(),medicine:null,medicine_form:"",icon_type:"",salt_composition:null,dose:null,unit:null,color:"",image:"",start_date:sa()(new Date),end_date:null,days:null,repetition_kind:gd,timing:[],frequency:"",comments:""}],advices:[]}),ne=ds((e,t,n)=>{e({q:t,index:n})},500),re=(0,We.useCallback)((e,t,n)=>{ne(w,t,n)},[w]);We.useEffect(()=>{if(!cs(c)&&!cs(j)){var e;const t=null===(e=c.tests)||void 0===e?void 0:e.map(e=>{var t;return null===j||void 0===j||null===(t=j.tests)||void 0===t?void 0:t.find(t=>(null===t||void 0===t?void 0:t.name)===e)}).filter(e=>void 0!==e);te(e=>(0,i.A)((0,i.A)((0,i.A)({},e),c),{},{tests:t}))}},[c,j]),We.useEffect(()=>{cs(_)||te(e=>(0,i.A)((0,i.A)({},e),{},{followUpReminder:_.send_follow_up_reminder_flag,daysDifference:_.follow_up_day,followUpTime:Ds(_.follow_up_time,pd)}))},[_]);const ie=()=>{P({open:!1,data:""})},oe=e=>{let t=[],n=e>4?1:e;for(var r=0;r<n;r++)t.push({start_time:null,interval:null});return t};return(0,qt.jsxs)(op,{children:[(0,qt.jsx)(op,{sx:{width:"100%"},position:"relative",children:(0,qt.jsx)(Ff,{container:!0,children:(0,qt.jsx)(Ff,{item:!0,xs:12,children:(0,qt.jsx)(op,{position:"absolute",top:"-48px",bottom:"0",left:"40px",children:(0,qt.jsx)(Cf,{variant:"h6",component:"h6",children:_e("rpm_consultation")})})})})}),(0,qt.jsx)(Kz,{initialValues:(0,i.A)((0,i.A)({},ee),{},{buttonType:""}),validationSchema:RU.addPrescriptionNote,onSubmit:async(e,t)=>{let{setErrors:n}=t;if("template"===(null===e||void 0===e?void 0:e.buttonType))try{await RU.addPrescriptionNote.validate(e,{abortEarly:!1}),p(!0)}catch(r){const e={};r.inner.forEach(t=>{e[t.path]=t.message}),n(e)}else try{cs(b)?await l(e):await(cs(f)?d(e):l(e))}catch(r){console.log(r)}},enableReinitialize:!0,children:e=>{var t,n,r,o;let{values:a,setFieldValue:l,setFieldTouched:c}=e;return(0,qt.jsx)(qt.Fragment,{children:(0,qt.jsxs)(nH,{children:[(0,qt.jsxs)(op,{mb:1,width:"100%",className:"vitalTypeMobile",children:[(0,qt.jsxs)(d_,{display:"flex",sx:{flexDirection:"row",width:"100%",alignItems:"center"},children:[(0,qt.jsxs)(e_,{id:"demo-row-radio-buttons-group-label",sx:{flex:"0 0 70px",fontWeight:"600",fontSize:"12px",color:"#3f51b5"},children:[_e("rpm_VitalType"),":"]}),(0,qt.jsx)(tH,{name:"vital",children:e=>{let{field:t}=e;return(0,qt.jsx)(e_e,(0,i.A)((0,i.A)({row:!0,"aria-labelledby":"demo-row-radio-buttons-group-label"},t),{},{children:null===Nd||void 0===Nd?void 0:Nd.map(e=>(0,qt.jsx)(wE,{value:e.value,control:(0,qt.jsx)(f_e,{}),label:_e("rpm_".concat(e.name)),disabled:!cs(k)},e.value))}))}})]}),(0,qt.jsx)(dH,{name:"vital",children:e=>(0,qt.jsx)(v_,{error:!0,children:_e(e,{field:_e("rpm_VitalType")})})})]}),(0,qt.jsx)(op,{className:"mobileAccordian",mb:2,children:(0,qt.jsxs)(CV,{expanded:"panel1"===X,onChange:J("panel1"),children:[(0,qt.jsx)(LV,{expandIcon:"panel1"===X?(0,qt.jsx)(bCe,{sx:{backgroundColor:"#7F8BCB",height:"25px",width:"25px",marginRight:"10px",color:"white",borderRadius:"50px"}}):(0,qt.jsx)(Zue,{sx:{backgroundColor:"#7F8BCB",height:"25px",width:"25px",marginRight:"10px",color:"white",borderRadius:"50px"}}),"aria-controls":"panel1bh-content",id:"panel1bh-header",children:(0,qt.jsx)(Cf,{color:"customClr.bp",fontWeight:"700",fontSize:10,children:_e("rpm_Symptoms")})}),(0,qt.jsxs)(TV,{className:"symptomsBox",children:[(0,qt.jsxs)(Ff,{container:!0,spacing:2,children:[(0,qt.jsxs)(Ff,{item:!0,xs:12,position:"relative",children:[(0,qt.jsx)(o_,{id:"checkbox-select-label",fontWeight:600,sx:{marginBottom:"5px",fontSize:"10px"},className:"ShrinkLabel",children:"Type"}),(0,qt.jsx)(d_,{fullWidth:!0,children:(0,qt.jsx)(tH,{name:"complaints",component:$_e,placeholder:"e.g. Fever, Cough",options:(null===j||void 0===j?void 0:j.complaints)||[],onValueChange:(e,t,n)=>{x(e,t,n,a,l)},variant:"outlined",margin:"normal",fullWidth:!0})}),!cs(null===a||void 0===a?void 0:a.complaints)&&(0,qt.jsx)(xh,{color:"primary",onClick:()=>I(!L),sx:{fontSize:"10px",fontWeight:"700"},children:_e(L?"rpm_Collapse":"rpm_Expand")})]}),(0,qt.jsxs)(Ff,{item:!0,xs:12,md:6,lg:6,pt:0,className:"topExtraPadding",children:[(0,qt.jsx)(o_,{id:"checkbox-select-label",fontWeight:600,sx:{marginBottom:"5px",fontSize:"10px",marginTop:"10px",padding:"0 10px"},children:"Related:"}),(0,qt.jsxs)(op,{children:[null===G||void 0===G?void 0:G.map((e,t)=>{var n;const r=null===a||void 0===a||null===(n=a.complaints)||void 0===n?void 0:n.some(t=>t.name===e.name);return(0,qt.jsx)(Eb,{label:e.name,style:{marginRight:"3px",marginBottom:"3px",backgroundColor:r?"rgba(0, 0, 0, 0.12)":"rgba(0, 0, 0, 0.05)"},onClick:t=>{x(t,[e],"selectOption",a,l)}},t)}),(0,qt.jsx)(xh,{color:"primary",onClick:()=>$(e=>!e),sx:{fontSize:"10px",fontWeight:"700",padding:"0"},children:_e(F?"rpm_ViewLess":"rpm_ViewAll")})]})]})]}),L&&(null===a||void 0===a||null===(t=a.complaintDetails)||void 0===t?void 0:t.map((e,t)=>(0,qt.jsx)(op,{mt:1,className:"typeofSymptoms",children:(0,qt.jsxs)(Ff,{container:!0,spacing:2,children:[(0,qt.jsx)(Ff,{item:!0,xs:6,position:"relative",children:(0,qt.jsxs)(op,{sx:{whiteSpace:"normal"},children:[(0,qt.jsx)(o_,{id:"checkbox-select-label",fontWeight:600,sx:{marginBottom:"5px",fontSize:"10px"},className:"ShrinkLabel",children:"Type"}),(0,qt.jsxs)(op,{sx:{whiteSpace:"normal"},children:[" ",(0,qt.jsx)(tH,{as:qj,fullWidth:!0,disabled:!0,size:"small",id:"complaintDetails.".concat(t,".name"),name:"complaintDetails.".concat(t,".name"),variant:"outlined",className:"autoCompletePlaceholder"})]})]})}),(0,qt.jsxs)(Ff,{item:!0,xs:6,position:"relative",children:[(0,qt.jsx)(o_,{id:"checkbox-select-label",fontWeight:600,sx:{marginBottom:"5px",fontSize:"10px"},className:"ShrinkLabel",children:"Severity"}),(0,qt.jsx)(op,{sx:{whiteSpace:"normal"},children:(0,qt.jsx)(tH,{as:G_,fullWidth:!0,size:"small",id:"complaintDetails.".concat(t,".severity"),name:"complaintDetails.".concat(t,".severity"),variant:"outlined",className:"complaintDetailsSelect",children:kd.map(e=>(0,qt.jsx)(mf,{value:e.value,children:"".concat(e.name)},e.value))})})]}),(0,qt.jsxs)(Ff,{item:!0,xs:6,position:"relative",children:[(0,qt.jsx)(o_,{fontWeight:600,sx:{marginBottom:"5px",fontSize:"10px"},className:"ShrinkLabel",children:"Frequency"}),(0,qt.jsx)(op,{sx:{whiteSpace:"normal"},children:(0,qt.jsx)(tH,{as:G_,fullWidth:!0,size:"small",id:"complaintDetails.".concat(t,".frequency"),name:"complaintDetails.".concat(t,".frequency"),variant:"outlined",className:"complaintDetailsSelect",children:Td.map(e=>(0,qt.jsx)(mf,{value:e.value,children:"".concat(e.name)},e.value))})})]}),(0,qt.jsx)(Ff,{item:!0,xs:6,display:"flex",alignItems:"center",position:"relative",children:(0,qt.jsxs)(op,{width:"100%",children:[(0,qt.jsx)(o_,{fontWeight:600,sx:{marginBottom:"5px",fontSize:"10px"},className:"ShrinkLabel",children:"Duration"}),(0,qt.jsxs)(op,{display:"flex",height:"32px",children:[(0,qt.jsx)(tH,{as:qj,type:"number",size:"small",width:"100%",id:"complaintDetails.".concat(t,".duration"),name:"complaintDetails.".concat(t,".duration"),onWheel:e=>e.target.blur(),onKeyDown:e=>{Pd.includes(e.key)&&e.preventDefault()},variant:"outlined",style:{borderRight:"0",borderRadius:"8px 0 0 8px",width:"100%",fontSize:"10px"},className:"durationDays"}),(0,qt.jsx)(tH,{as:G_,size:"small",fullWidth:!0,id:"complaintDetails.".concat(t,".duration_unit"),name:"complaintDetails.".concat(t,".duration_unit"),variant:"outlined",style:{borderLeft:"0",borderRadius:"0 8px 8px 0",width:"140px",fontSize:"10px",backgroundColor:"rgb(115 128 194 / 21%)",color:"#000000       "},className:"customListSelect",children:Ad.map(e=>(0,qt.jsx)(mf,{value:e.value,children:"".concat(e.name)},e.value))})]})]})})]})},t)))]})]})}),(0,qt.jsx)(op,{className:"mobileAccordian",mb:2,children:(0,qt.jsxs)(CV,{expanded:"panel2"===X,onChange:J("panel2"),children:[(0,qt.jsx)(LV,{expandIcon:"panel2"===X?(0,qt.jsx)(bCe,{sx:{backgroundColor:"#7F8BCB",height:"25px",width:"25px",marginRight:"10px",color:"white",borderRadius:"50px"}}):(0,qt.jsx)(Zue,{sx:{backgroundColor:"#7F8BCB",height:"25px",width:"25px",marginRight:"10px",color:"white",borderRadius:"50px"}}),"aria-controls":"panel2bh-content",id:"panel2bh-header",children:(0,qt.jsx)(Cf,{color:"customClr.bp",fontWeight:"700",fontSize:10,children:_e("rpm_diagnosis")})}),(0,qt.jsxs)(TV,{children:[(0,qt.jsxs)(Ff,{container:!0,spacing:2,children:[(0,qt.jsxs)(Ff,{item:!0,xs:12,md:6,lg:6,pt:0,position:"relative",children:[(0,qt.jsx)(o_,{id:"checkbox-select-label",fontWeight:600,sx:{marginBottom:"8px"},className:"ShrinkLabel",children:"Type"}),(0,qt.jsx)(d_,{fullWidth:!0,children:(0,qt.jsx)(tH,{className:"DiagnosisFieldMobile",name:"diagnosis",component:$_e,placeholder:"e.g. Hypertension, Gastritis",options:(null===j||void 0===j?void 0:j.diagnosis)||[],onValueChange:(e,t,n)=>{y(e,t,n,a,l)},variant:"outlined",margin:"normal",fullWidth:!0})}),!cs(null===a||void 0===a?void 0:a.diagnosis)&&(0,qt.jsx)(xh,{color:"primary",onClick:()=>V(!U),sx:{fontSize:"10px",fontWeight:"700"},children:_e(U?"rpm_Collapse":"rpm_Expand")})]}),(0,qt.jsxs)(Ff,{item:!0,xs:12,md:6,lg:6,pt:0,children:[(0,qt.jsx)(o_,{id:"checkbox-select-label",fontWeight:600,sx:{marginBottom:"5px",fontSize:"10px",padding:"0 10px"},children:"Related:"}),null===Y||void 0===Y?void 0:Y.map((e,t)=>{var n;const r=null===a||void 0===a||null===(n=a.diagnosis)||void 0===n?void 0:n.some(t=>t.name===e.name);return(0,qt.jsx)(Eb,{label:e.name,style:{marginRight:"3px",marginBottom:"3px",backgroundColor:r?"rgba(0, 0, 0, 0.12)":"rgba(0, 0, 0, 0.05)"},onClick:t=>{y(t,[e],"selectOption",a,l)}},t)}),(0,qt.jsx)(xh,{color:"primary",onClick:()=>W(e=>!e),sx:{fontSize:"10px",fontWeight:"700",padding:"0"},children:_e(H?"rpm_ViewLess":"rpm_ViewAll")})]})]}),U&&(null===a||void 0===a||null===(n=a.diagnosisDetails)||void 0===n?void 0:n.map((e,t)=>(0,qt.jsx)(op,{mt:3,children:(0,qt.jsxs)(Ff,{container:!0,spacing:2,children:[(0,qt.jsx)(Ff,{item:!0,md:3,xs:6,position:"relative",children:(0,qt.jsxs)(op,{sx:{whiteSpace:"normal"},children:[(0,qt.jsx)(o_,{id:"checkbox-select-label",fontWeight:600,sx:{marginBottom:"8px",fontSize:"10px"},className:"ShrinkLabel",children:"Type"}),(0,qt.jsx)(tH,{as:qj,fullWidth:!0,disabled:!0,size:"small",id:"diagnosisDetails.".concat(t,".name"),name:"diagnosisDetails.".concat(t,".name"),variant:"outlined",sx:{fontSize:"10px"}})]})}),(0,qt.jsx)(Ff,{item:!0,md:3,xs:6,display:"flex",alignItems:"center",position:"relative",children:(0,qt.jsxs)(op,{width:"100%",children:[(0,qt.jsx)(o_,{fontWeight:600,sx:{marginBottom:"8px",fontSize:"10px"},className:"ShrinkLabel",children:"Duration"}),(0,qt.jsxs)(op,{display:"flex",height:"32px",children:[(0,qt.jsx)(tH,{as:qj,type:"number",size:"small",width:"100%",id:"diagnosisDetails.".concat(t,".duration"),name:"diagnosisDetails.".concat(t,".duration"),onWheel:e=>e.target.blur(),onKeyDown:e=>{Pd.includes(e.key)&&e.preventDefault()},variant:"outlined",style:{borderRight:"0",borderRadius:"8px 0 0 8px",width:"100%",fontSize:"10px"}}),(0,qt.jsx)(tH,{as:G_,size:"small",fullWidth:!0,id:"diagnosisDetails.".concat(t,".duration_unit"),name:"diagnosisDetails.".concat(t,".duration_unit"),variant:"outlined",style:{borderLeft:"0",borderRadius:"0 8px 8px 0",width:"175px"},className:"customListSelect",children:Ad.map(e=>(0,qt.jsx)(mf,{value:e.value,children:"".concat(e.name)},e.value))})]})]})})]})},t)))]})]})}),(0,qt.jsx)(op,{className:"mobileAccordian",mb:2,children:(0,qt.jsxs)(CV,{expanded:"panel3"===X,onChange:J("panel3"),children:[(0,qt.jsx)(LV,{expandIcon:"panel3"===X?(0,qt.jsx)(bCe,{sx:{backgroundColor:"#7F8BCB",height:"25px",width:"25px",marginRight:"10px",color:"white",borderRadius:"50px"}}):(0,qt.jsx)(Zue,{sx:{backgroundColor:"#7F8BCB",height:"25px",width:"25px",marginRight:"10px",color:"white",borderRadius:"50px"}}),"aria-controls":"panel3bh-content",id:"panel3bh-header",children:(0,qt.jsx)(Ff,{container:!0,alignItems:"center",justifyContent:"space-between",children:(0,qt.jsx)(Ff,{item:!0,md:2,children:(0,qt.jsx)(Cf,{color:"customClr.bp",fontWeight:"700",fontSize:10,children:_e("Rx")})})})}),(0,qt.jsx)(TV,{children:(0,qt.jsxs)(op,{className:"emptyRowDeclear",children:[(0,qt.jsx)(op,{position:"relative",width:"100%",children:(0,qt.jsxs)(op,{className:"selectTemplateBorder",sx:{margin:"4px 0",width:"100%"},children:[(0,qt.jsx)(Cf,{variant:"body1",component:"p",fontWeight:"h6.fontWeight",sx:{marginBottom:"5px",fontSize:"10px"},className:"ShrinkLabel ".concat(S.selectTemplateLabel),children:"Select Template"}),(0,qt.jsx)(aj,{fullWidth:!0,disableClearable:!0,value:f,size:"small",onChange:(e,t,n)=>{null!==t&&void 0!==t&&t.id&&(v(null===t||void 0===t?void 0:t.id),g(t)),"clear"===n&&g(null)},options:m,getOptionLabel:e=>e.name,renderInput:e=>(0,qt.jsx)(Q_,(0,i.A)((0,i.A)({fullWidth:!0,className:"medicateFormField ".concat(S.selectTemplateClass)},e),{},{sx:{bgcolor:"white",borderRadius:"10px",border:"0",fontSize:"12px"}})),renderOption:(e,t)=>(0,qt.jsx)("li",(0,i.A)((0,i.A)({},e),{},{style:{borderRadius:1,display:"flex",justifyContent:"space-between"},children:t.name}))})]})}),(0,qt.jsxs)(op,{className:"pres_inputTab",children:[(0,qt.jsx)(lH,{name:"medicationList",validateOnChange:!1,children:e=>{var t,n,r;return(0,qt.jsx)(qt.Fragment,{children:cs(null===a||void 0===a?void 0:a.medicationList)?(0,qt.jsxs)(qt.Fragment,{children:[(0,qt.jsx)(cw,{className:"emptyRow",children:(0,qt.jsx)(gw,{colSpan:7,sx:{border:"none",paddingBottom:"0"},children:(0,qt.jsx)("img",{src:s,style:{display:"block",margin:"auto",maxWidth:"100px"}})})}),(0,qt.jsx)(cw,{children:(0,qt.jsxs)(gw,{colSpan:7,sx:{border:"none",paddingBottom:"30px"},align:"center",children:[(0,qt.jsx)(Cf,{}),(0,qt.jsx)(xh,{sx:{fontSize:"10px"},variant:"contained",color:"primary",disableElevation:!0,disabled:null===a||void 0===a||null===(n=a.medicationList)||void 0===n||null===(r=n.find(e=>null===e||void 0===e?void 0:e.isEdit))||void 0===r?void 0:r.isEdit,onClick:()=>e.push({id:(0,N_e.v4)(),medicine:null,medicine_form:"",icon_type:"",salt_composition:null,dose:null,unit:null,color:"",image:"",start_date:sa()(new Date),end_date:null,days:"",repetition_kind:gd,timing:[],frequency:"",comments:""}),children:"Add New Consultation"})]})})]}):null===a||void 0===a||null===(t=a.medicationList)||void 0===t?void 0:t.map((t,n)=>{var r,o,s;return(0,qt.jsx)(op,{ref:Z,style:{marginBottom:"10px",marginTop:"15px"},className:"saveTemplateShow",children:(0,qt.jsxs)(Ff,{container:!0,spacing:2,children:[(0,qt.jsxs)(Ff,{item:!0,xs:6,position:"relative",children:[(0,qt.jsx)(Cf,{variant:"body1",component:"p",fontWeight:"h6.fontWeight",sx:{marginBottom:"5px",fontSize:"10px"},className:"ShrinkLabel",children:_e("rpm_Medication")}),(0,qt.jsxs)(op,{sx:{whiteSpace:"normal"},children:[(0,qt.jsx)(aj,{options:cs(C)?[]:C,id:"medicationList.".concat(n,".medicine"),name:"medicationList.".concat(n,".medicine"),value:(null===a||void 0===a||null===(r=a.medicationList[n])||void 0===r?void 0:r.medicine)||null,getOptionLabel:e=>(null===e||void 0===e?void 0:e.medicine)||"",isOptionEqualToValue:(e,t)=>e.id===t.id,onInputChange:(e,t)=>re(e,t,n),onChange:async(e,t,r)=>{await l("medicationList.".concat(n,".medicine"),t),c("medicationList.".concat(n,".medicine"),!0),l("medicationList.".concat(n,".salt_composition"),null===t||void 0===t?void 0:t.salt_composition),l("medicationList.".concat(n,".medicine_form"),null===t||void 0===t?void 0:t.medicine_form),"clear"===r&&(l("medicationList.".concat(n,".salt_composition"),""),l("medicationList.".concat(n,".medicine_form"),""))},renderOption:(e,t)=>(0,We.createElement)(op,(0,i.A)((0,i.A)({component:"li"},e),{},{key:t.id}),(0,qt.jsx)(op,{children:(0,qt.jsx)(Cf,{variant:"body1",component:"p",children:null===t||void 0===t?void 0:t.medicine})})),renderInput:e=>(0,qt.jsx)(Q_,(0,i.A)((0,i.A)({className:"medicateFormField"},e),{},{fullWidth:!0,size:"small",variant:"outlined",placeholder:"Medicine",InputProps:(0,i.A)((0,i.A)({},e.InputProps),{},{endAdornment:(0,qt.jsxs)(tw,{position:"end",children:[(0,qt.jsx)(sy,{title:_e("message:rpm_MedicineNameHelp"),placement:"top",children:(0,qt.jsx)(wh,{size:"small",disableRipple:!0,sx:{pr:1.8},className:"helpIconButton",children:(0,qt.jsx)(pM.A,{fontSize:"small"})})}),e.InputProps.endAdornment]})})}))}),(0,qt.jsx)(dH,{name:"medicationList.".concat(n,".medicine"),children:e=>(0,qt.jsx)(v_,{error:!0,children:_e(e,{field:_e("rpm_MedicineName")})})})]})]}),(0,qt.jsxs)(Ff,{item:!0,xs:6,position:"relative",children:[(0,qt.jsx)(Cf,{variant:"body1",component:"p",fontWeight:"h6.fontWeight",sx:{marginBottom:"5px",fontSize:"10px"},className:"ShrinkLabel",children:_e("rpm_Form")}),(0,qt.jsx)(op,{sx:{whiteSpace:"normal"},children:(0,qt.jsx)(tH,{sx:{fontSize:"10px"},as:qj,fullWidth:!0,disabled:!0,size:"small",id:"medicationList.".concat(n,".medicine_form"),name:"medicationList.".concat(n,".medicine_form"),placeholder:"Form",variant:"outlined",endAdornment:(0,qt.jsx)(tw,{position:"end",children:(0,qt.jsx)(sy,{title:_e("message:rpm_MedicineNameHelp"),placement:"top",children:(0,qt.jsx)(wh,{size:"small",disableRipple:!0,sx:{pr:0},className:"helpIconButton",children:(0,qt.jsx)(pM.A,{fontSize:"small"})})})})})})]}),(0,qt.jsx)(Ff,{item:!0,xs:12,children:(0,qt.jsxs)(op,{children:[(0,qt.jsxs)(op,{display:"flex",gap:1,children:[" ",(0,qt.jsx)(Ff,{container:!0,spacing:2,children:(0,qt.jsx)(Ff,{item:!0,xs:12,position:"relative",children:(0,qt.jsxs)(op,{children:[(0,qt.jsx)(Cf,{variant:"body1",component:"p",fontWeight:"h6.fontWeight",sx:{marginBottom:"5px",fontSize:"10px"},className:"ShrinkLabel",children:"Shape"}),(0,qt.jsx)(tH,{as:G_,size:"small",fullWidth:!0,id:"medicationList.".concat(n,".icon_type"),name:"medicationList.".concat(n,".icon_type"),variant:"outlined",className:"shapeDropDown",endAdornment:(0,qt.jsx)(tw,{position:"end",sx:{position:"absolute",right:"28px"},children:(0,qt.jsx)(sy,{title:_e("message:rpm_MedicineIconHelp"),placement:"top",children:(0,qt.jsx)(wh,{size:"small",disableRipple:!0,sx:{p:0},className:"helpIconButton",children:(0,qt.jsx)(pM.A,{fontSize:"small"})})})}),children:Fd.map(e=>(0,qt.jsx)(mf,{value:e.key,children:e.text},e.key))})]})})})]}),(0,qt.jsxs)(op,{sx:{height:"15px"},children:[ps(null===t||void 0===t?void 0:t.image)?(0,qt.jsxs)(op,{display:"flex",alignItems:"center",justifyContent:"flex-end",color:"customClr.bp",fontSize:"14px",children:[" ",(0,qt.jsxs)(op,{className:"upload-input-text",children:[(0,qt.jsx)("input",{id:"medicationList.".concat(n,".image"),name:"medicationList.".concat(n,".image"),type:"file",onChange:e=>{l("medicationList.".concat(n,".image"),e.currentTarget.files[0])}}),(0,qt.jsxs)("label",{htmlFor:"contained-button-file",style:{display:"flex",paddingTop:"5px"},children:[(0,qt.jsx)(op,{textOverflow:"ellipsis",whiteSpace:"nowrap",overflow:"hidden",children:_e("uploadImage")}),(0,qt.jsx)(op,{clone:!0,mr:1,color:"primary",children:(0,qt.jsx)(Cue,{width:22,height:22})})]})]})]}):(0,qt.jsxs)(op,{style:{display:"flex",paddingTop:"5px"},width:170,children:[(0,qt.jsx)(op,{textOverflow:"ellipsis",whiteSpace:"nowrap",style:{cursor:"pointer"},overflow:"hidden",onClick:()=>{const e=URL.createObjectURL(t.image);P({open:!0,data:e})},children:null===t||void 0===t||null===(o=t.image)||void 0===o?void 0:o.name}),(0,qt.jsx)(op,{mr:1,color:"primary",position:"relative",zIndex:2,children:(0,qt.jsx)(wh,{size:"small",color:"error","aria-label":"remove file",onClick:()=>{l("medicationList.".concat(n,".image"),"")},children:(0,qt.jsx)(xc,{width:22,height:22})})})]}),(0,qt.jsx)(dH,{name:"medicationList.".concat(n,".image"),children:e=>(0,qt.jsx)(v_,{error:!0,children:_e(e,{field:_e("rpm_image")})})})]})]})}),(0,qt.jsxs)(Ff,{item:!0,xs:12,pt:0,position:"relative",children:[(0,qt.jsx)(Cf,{variant:"body1",component:"p",fontWeight:"h6.fontWeight",sx:{marginBottom:"5px",fontSize:"10px"},className:"ShrinkLabel",children:_e("rpm_Composition")}),(0,qt.jsx)(op,{display:"flex",className:"customHeight",children:(0,qt.jsx)(tH,{sx:{fontSize:"10px"},as:qj,fullWidth:!0,disabled:!0,size:"small",id:"medicationList.".concat(n,".salt_composition"),name:"medicationList.".concat(n,".salt_composition"),placeholder:"Salt Composition",variant:"outlined",endAdornment:(0,qt.jsx)(tw,{position:"end",children:(0,qt.jsx)(sy,{title:_e("message:rpm_MedicineNameHelp"),placement:"top",children:(0,qt.jsx)(wh,{size:"small",disableRipple:!0,sx:{pr:1.8},className:"helpIconButton",children:(0,qt.jsx)(pM.A,{fontSize:"small"})})})})})})]}),(0,qt.jsxs)(Ff,{item:!0,xs:6,pt:0,position:"relative",children:[(0,qt.jsxs)(Cf,{variant:"body1",component:"p",fontWeight:"h6.fontWeight",sx:{marginBottom:"5px",fontSize:"10px"},className:"ShrinkLabel",children:[_e("rpm_Frequency"),(0,qt.jsx)(op,{component:"span",children:"*"})]}),(0,qt.jsxs)(op,{sx:{whiteSpace:"normal"},children:[(0,qt.jsx)(tH,{className:"complaintDetailsSelect",as:G_,size:"small",fullWidth:!0,id:"medicationList.".concat(n,".frequency"),name:"medicationList.".concat(n,".frequency"),onChange:e=>{l("medicationList",a.medicationList.map((t,r)=>n===r?(0,i.A)((0,i.A)({},t),{},{frequency:e.target.value,repetition_kind:e.target.value>4?vd:gd,timing:[...oe(e.target.value)]}):t))},variant:"outlined",defaultValue:"",endAdornment:(0,qt.jsx)(tw,{position:"end",sx:{position:"absolute",right:"25px"},children:(0,qt.jsx)(sy,{title:_e("message:rpm_FrequencyHelp"),placement:"top",children:(0,qt.jsx)(wh,{size:"small",disableRipple:!0,sx:{p:0},className:"helpIconButton",children:(0,qt.jsx)(pM.A,{fontSize:"small"})})})}),children:null===Ld||void 0===Ld?void 0:Ld.map(e=>(0,qt.jsx)(mf,{value:e.key,children:"".concat(e.text)},e.key))}),(0,qt.jsx)(dH,{name:"medicationList.".concat(n,".frequency"),children:e=>(0,qt.jsx)(v_,{error:!0,children:_e(e,{field:_e("rpm_Frequency")})})}),(0,qt.jsx)(op,{children:(0,qt.jsxs)(xh,{sx:{padding:"5px 0",fontSize:"10px"},variant:"text",component:"label",disableFocusRipple:!0,disableRipple:!0,disabled:!a.medicationList[n].frequency||"0"===a.medicationList[n].frequency,onClick:()=>{O(n),E(!T)},children:[(0,qt.jsx)(D_e.A,{fontSize:"small",sx:{width:14,height:14,mr:.5}}),_e("setReminder")]})}),(0,qt.jsx)(op,{display:"flex",flexWrap:"wrap",children:(null===t||void 0===t?void 0:t.timing)&&(null===t||void 0===t?void 0:t.timing.map((e,t)=>(0,qt.jsx)(op,{pr:.5,pb:.5,children:(0,qt.jsx)(Cf,{style:(null===e||void 0===e?void 0:e.start_time)&&{backgroundColor:"#EDEDED",borderRadius:"20px",padding:"3px 8px",fontSize:"10px",color:"#6B7280"},children:null!==e&&void 0!==e&&e.start_time?sa()(e.start_time).format("hh:mm a"):""})},t)))})]})]}),(0,qt.jsxs)(Ff,{item:!0,xs:6,pt:0,position:"relative",children:[(0,qt.jsxs)(Cf,{variant:"body1",component:"p",fontWeight:"h6.fontWeight",sx:{marginBottom:"5px",fontSize:"10px"},className:"ShrinkLabel",children:[_e("rpm_Days"),(0,qt.jsx)(op,{component:"span",children:"*"})]}),(0,qt.jsxs)(op,{sx:{whiteSpace:"normal"},children:[(0,qt.jsx)(tH,{className:"complaintDetailsSelect",as:qj,fullWidth:!0,size:"small",type:"number",id:"medicationList.".concat(n,".days"),name:"medicationList.".concat(n,".days"),variant:"outlined",onWheel:e=>e.target.blur(),onKeyDown:e=>(null===Pd||void 0===Pd?void 0:Pd.includes(e.key))&&e.preventDefault(),onChange:async e=>{const t=parseInt(e.target.value);await l("medicationList.".concat(n,".days"),t),c("medicationList.".concat(n,".days"),!0),l("medicationList.".concat(n,".end_date"),os(a.medicationList[n].start_date,t))},endAdornment:(0,qt.jsx)(tw,{position:"end",sx:{position:"absolute",right:"8px"},children:(0,qt.jsx)(sy,{title:_e("message:rpm_MedicineDaysHelp"),placement:"top",children:(0,qt.jsx)(wh,{size:"small",disableRipple:!0,sx:{p:0},className:"helpIconButton",children:(0,qt.jsx)(pM.A,{fontSize:"small"})})})})}),(0,qt.jsx)(dH,{name:"medicationList.".concat(n,".days"),children:e=>(0,qt.jsx)(v_,{error:!0,children:_e(e,{field:_e("rpm_Days")})})})]})]}),(0,qt.jsxs)(Ff,{item:!0,xs:12,className:"durationFieldLabels",children:[(0,qt.jsxs)(Cf,{variant:"body1",component:"p",fontWeight:"h6.fontWeight",sx:{marginBottom:"8px",fontSize:"10px"},children:[_e("rpm_Duration"),(0,qt.jsx)(op,{component:"span",children:"*"})]}),(0,qt.jsx)(WM,{dateAdapter:DI,children:(0,qt.jsxs)(op,{className:"DatepickerForm",sx:e=>({"& .MuiFormControl-root":{display:"flex"},"& .MuiFormLabel-root":{color:e.palette.grey[800]},"& .MuiOutlinedInput-input":{padding:"10px",fontSize:"10px"}}),mr:1,display:"flex",width:"100%",children:[(0,qt.jsx)(tH,{className:"MuiGridPadddingTop",as:fD,size:"small",label:"From",id:"medicationList.".concat(n,".start_date"),name:"medicationList.".concat(n,".start_date"),value:t.start_date,inputFormat:"dd/MM/yyyy",onPaste:e=>{e.preventDefault()},onChange:e=>{l("medicationList.".concat(n,".start_date"),e);const t=is(e,a.medicationList[n].end_date);l("medicationList.".concat(n,".days"),t)},renderInput:e=>(0,qt.jsx)(Q_,(0,i.A)((0,i.A)({},e),{},{autoComplete:"off",onKeyDown:e=>{e.preventDefault()}})),disablePast:!0}),(0,qt.jsx)(op,{}),(0,qt.jsx)(op,{display:"flex",alignItems:"center",pl:1,children:"-"}),(0,qt.jsx)(op,{className:"DatepickerForm",sx:e=>({"& .MuiFormControl-root":{display:"flex"},"& .MuiFormLabel-root":{color:e.palette.grey[800]}}),ml:1,width:"100%",children:(0,qt.jsx)(tH,{className:"MuiGridPadddingTop",width:"100%",as:fD,size:"small",label:"To",id:"medicationList.".concat(n,".end_date"),name:"medicationList.".concat(n,".end_date"),value:t.end_date,inputFormat:"dd/MM/yyyy",onPaste:e=>{e.preventDefault()},onChange:e=>{l("medicationList.".concat(n,".end_date"),e);const t=is(a.medicationList[n].start_date,e);l("medicationList.".concat(n,".days"),t)},renderInput:e=>(0,qt.jsx)(Q_,(0,i.A)((0,i.A)({},e),{},{autoComplete:"off",onKeyDown:e=>{e.preventDefault()}})),minDate:t.start_date?t.start_date:new Date})})]})})]}),(0,qt.jsxs)(Ff,{item:!0,xs:12,position:"relative",children:[(0,qt.jsx)(Cf,{variant:"body1",component:"p",fontWeight:"h6.fontWeight",sx:{marginBottom:"5px",fontSize:"10px"},className:"ShrinkLabel",children:_e("rpm_Comments")}),(0,qt.jsxs)(op,{sx:{whiteSpace:"normal"},className:"commentFieldMobile",children:[(0,qt.jsx)(tH,{as:qj,fullWidth:!0,multiline:!0,rows:3,size:"small",variant:"outlined",name:"medicationList.".concat(n,".comments"),placeholder:"Enter Comments",sx:{fontSize:"10px"},endAdornment:(0,qt.jsx)(tw,{position:"end",sx:{position:"absolute",right:"8px"},children:(0,qt.jsx)(sy,{title:_e("message:rpm_CommentsHelp"),placement:"top",children:(0,qt.jsx)(wh,{size:"small",disableRipple:!0,sx:{p:0},className:"helpIconButton",children:(0,qt.jsx)(pM.A,{fontSize:"small"})})})})}),(0,qt.jsx)(dH,{name:"medicationList.".concat(n,".comments"),children:e=>(0,qt.jsx)(v_,{error:!0,children:_e(e,{field:_e("rpm_Comment")})})})]})]}),(0,qt.jsx)(Ff,{item:!0,xs:12,children:(0,qt.jsxs)(op,{display:"flex",justifyContent:"space-between",children:[(0,qt.jsx)(wh,{color:"error",className:"lightDanger",onClick:()=>{a.medicationList[n].medicine?N((0,i.A)((0,i.A)({},D),{},{open:!D.open,data:()=>e.remove(n)})):e.remove(n)},children:(0,qt.jsx)(xc,{fontSize:"small",sx:{width:16,height:16}})}),(null===a||void 0===a||null===(s=a.medicationList)||void 0===s?void 0:s.length)-1===n&&(0,qt.jsx)(wh,{color:"primary",onClick:()=>{w(""),e.push({id:(0,N_e.v4)(),medicine:null,medicine_form:"",icon_type:"",salt_composition:null,dose:null,unit:null,color:"",image:"",start_date:sa()(new Date),end_date:null,days:"",repetition_kind:gd,timing:[],frequency:"",comments:""}),setTimeout(()=>{Z.current.lastChild.scrollIntoView({behavior:"smooth",block:"nearest"})},0)},children:(0,qt.jsx)(Zue,{fontSize:"small",sx:{width:18,height:18}})})]})})]})},n)})})}}),(0,qt.jsx)(hCe,{open:T,setOpen:E,medicationList:null===a||void 0===a?void 0:a.medicationList[M],modalIndex:M,setFieldValue:l,setFieldTouched:c}),(0,qt.jsx)(_C,{open:R.open,imageUrl:R.data,onClose:ie,imageWidthHeight:{width:"400",height:"400"}}),(0,qt.jsx)(qV,{openModal:D.open,onCloseModal:K,actionFunction:()=>{D.data(),K()},options:{primaryText:_e("message:rpm_DeleteTitle"),secondaryText:_e("message:rpm_DeleteBodyText"),btn:{primaryText:_e("rpm_Delete"),secondaryText:_e("rpm_Cancel"),primaryColor:"error",secondaryColor:"primary"},btnSwap:!0}}),(0,qt.jsx)(op,{mt:1,justifyContent:"flex-end",display:"flex",gap:1,children:(0,qt.jsx)(xh,{className:"saveTemplateHide",color:"primary",disableElevation:!0,variant:"text",type:"submit",disabled:!(null!==a&&void 0!==a&&a.medicationList.length),onClick:()=>l("buttonType","template"),sx:{fontSize:"10px"},children:_e("rpm_SaveAsTemplate")})})]}),(0,qt.jsx)(_Ce,{open:u,onClose:()=>p(!1),actionFunction:()=>h(a),title:_e("rpm_SaveTemplate"),disableButton:null===a||void 0===a||!a.templateName,children:(0,qt.jsxs)(op,{mt:2,children:[(0,qt.jsx)(Cf,{variant:"body1",fontWeight:"h6.fontWeight",gutterBottom:!0,children:_e("rpm_TemplateName")}),(0,qt.jsx)(tH,{as:qj,fullWidth:!0,size:"small",id:"templateName",name:"templateName",variant:"outlined",endAdornment:(0,qt.jsx)(tw,{position:"end",children:(0,qt.jsx)(sy,{title:_e("message:rpm_MedicineNameHelp"),placement:"top",children:(0,qt.jsx)(wh,{size:"small",disableRipple:!0,sx:{p:0},className:"helpIconButton",children:(0,qt.jsx)(pM.A,{fontSize:"small"})})})})})]})})]})})]})}),(0,qt.jsx)(op,{className:"mobileAccordian",mb:2,children:(0,qt.jsxs)(CV,{expanded:"panel4"===X,onChange:J("panel4"),children:[(0,qt.jsx)(LV,{expandIcon:"panel4"===X?(0,qt.jsx)(bCe,{sx:{backgroundColor:"#7F8BCB",height:"25px",width:"25px",marginRight:"10px",color:"white",borderRadius:"50px"}}):(0,qt.jsx)(Zue,{sx:{backgroundColor:"#7F8BCB",height:"25px",width:"25px",marginRight:"10px",color:"white",borderRadius:"50px"}}),"aria-controls":"panel4bh-content",id:"panel4bh-header",children:(0,qt.jsx)(Cf,{color:"customClr.bp",fontWeight:"700",fontSize:10,children:_e("rpm_advice")})}),(0,qt.jsxs)(TV,{children:[" ",(0,qt.jsx)(op,{mt:1,mb:1,sx:{whiteSpace:"nowrap",overflow:"auto"},children:null===j||void 0===j||null===(r=j.advices)||void 0===r?void 0:r.map((e,t)=>{var n,r;return(0,qt.jsx)(Eb,{className:"adviceChips",label:e.name,onClick:()=>{const t=a.advices;let n=[];n=null!==t&&void 0!==t&&t.includes(e.name)?t.filter(t=>t!==e.name):[...t,e.name],l("advices",n)},onDelete:null!==a&&void 0!==a&&null!==(n=a.advices)&&void 0!==n&&n.includes(e.name)?()=>l("advices",a.advices.filter(t=>t!==e.name)):void 0,style:{marginRight:"10px",marginBottom:"10px",backgroundColor:null!==a&&void 0!==a&&null!==(r=a.advices)&&void 0!==r&&r.includes(e.name)?"rgba(0, 0, 0, 0.12)":"rgba(0, 0, 0, 0.05)"}},t)})}),(0,qt.jsx)(tH,{className:"adviceChipsColum",component:Q_,multiline:!0,rows:4,variant:"outlined",id:"advices",name:"advices",fullWidth:!0,value:null===a||void 0===a||null===(o=a.advices)||void 0===o?void 0:o.join(", "),onChange:e=>{e.preventDefault();const t=e.target.value.split("|").map(e=>e);l("advices",t)}})]})]})}),(0,qt.jsx)(op,{className:"mobileAccordian",mb:2,position:"relative",children:(0,qt.jsxs)(CV,{expanded:"panel5"===X,onChange:J("panel5"),children:[(0,qt.jsx)(LV,{expandIcon:"panel5"===X?(0,qt.jsx)(bCe,{sx:{backgroundColor:"#7F8BCB",height:"25px",width:"25px",marginRight:"10px",color:"white",borderRadius:"50px"}}):(0,qt.jsx)(Zue,{sx:{backgroundColor:"#7F8BCB",height:"25px",width:"25px",marginRight:"10px",color:"white",borderRadius:"50px"}}),"aria-controls":"panel5bh-content",id:"panel5bh-header",children:(0,qt.jsx)(Cf,{color:"customClr.bp",fontWeight:"700",fontSize:10,children:_e("rpm_testrequest")})}),(0,qt.jsxs)(TV,{position:"relative",class:"paddingTopAccordian",children:[(0,qt.jsx)(o_,{id:"checkbox-select-label",fontWeight:600,sx:{marginBottom:"5px",fontSize:"10px"},className:"ShrinkLabel",children:"Type"}),(0,qt.jsx)(d_,{fullWidth:!0,className:"symptomsBox",children:(0,qt.jsx)(tH,{name:"tests",component:$_e,options:(null===j||void 0===j?void 0:j.tests)||[],variant:"outlined",placeholder:"Select Tests",margin:"normal",fullWidth:!0})}),(0,qt.jsxs)(op,{mt:1,className:"testRequired",children:[null===q||void 0===q?void 0:q.map((e,t)=>{var n;const r=null===a||void 0===a||null===(n=a.tests)||void 0===n?void 0:n.some(t=>t.name===e.name);return(0,qt.jsx)(Eb,{label:e.name,onClick:()=>{if(r)return!1;l("tests",[...a.tests,e])},style:{marginRight:"3px",marginBottom:"3px",backgroundColor:r?"rgba(0, 0, 0, 0.12)":"rgba(0, 0, 0, 0.05)"}},t)}),(0,qt.jsx)(xh,{color:"primary",onClick:()=>z(e=>!e),sx:{fontSize:"10px",fontWeight:"700",padding:"0"},children:_e(B?"rpm_ViewLess":"rpm_ViewAll")})]})]})]})}),(0,qt.jsx)(op,{className:"mobileAccordian",mb:1,children:(0,qt.jsxs)(CV,{expanded:"panel6"===X,onChange:J("panel6"),children:[(0,qt.jsx)(LV,{expandIcon:"panel6"===X?(0,qt.jsx)(bCe,{sx:{backgroundColor:"#7F8BCB",height:"25px",width:"25px",marginRight:"10px",color:"white",borderRadius:"50px"}}):(0,qt.jsx)(Zue,{sx:{backgroundColor:"#7F8BCB",height:"25px",width:"25px",marginRight:"10px",color:"white",borderRadius:"50px"}}),"aria-controls":"panel6bh-content",id:"panel6bh-header",children:(0,qt.jsx)(Cf,{color:"customClr.bp",fontWeight:"700",fontSize:10,children:_e("rpm_followUpDate")})}),(0,qt.jsx)(TV,{position:"relative",class:"paddingTopAccordian",children:(0,qt.jsx)(op,{display:"flex",alignItems:"center",className:"symptomsBox",children:(0,qt.jsxs)(WM,{dateAdapter:DI,children:[(0,qt.jsxs)(op,{className:"DatepickerForm",sx:e=>({"& .MuiFormControl-root":{display:"flex"},"& .MuiFormLabel-root":{color:e.palette.grey[800]}}),mr:1,width:"100%",children:[(0,qt.jsxs)(o_,{fontWeight:600,sx:{fontSize:"10px",marginBottom:"5px"},className:"ShrinkLabel",children:[_e("rpm_Duration")," (in days)"]}),(0,qt.jsx)(tH,{className:"complaintDetailsSelect",as:qj,fullWidth:!0,size:"small",type:"number",id:"followUpDays",name:"followUpDays",variant:"outlined",onWheel:e=>e.target.blur(),onKeyDown:e=>Pd.includes(e.key)&&e.preventDefault(),onChange:e=>{const t=parseInt(e.target.value);l("followUpDays",t);const n=os(sa()(new Date),t),r=sa()(n).add(1,"days");l("followUpDate",r.valueOf());const i=sa()(r).subtract(null===a||void 0===a?void 0:a.daysDifference,"days").startOf("day").valueOf();l("followUpReminderDate",i)},endAdornment:(0,qt.jsx)(tw,{position:"end",sx:{position:"absolute",right:"8px"},children:(0,qt.jsx)(sy,{title:_e("message:rpm_MedicineDaysHelp"),placement:"top",children:(0,qt.jsx)(wh,{size:"small",disableRipple:!0,sx:{p:0},className:"helpIconButton",children:(0,qt.jsx)(pM.A,{fontSize:"small"})})})})}),(0,qt.jsx)(dH,{name:"followUpDays",children:e=>(0,qt.jsx)(v_,{error:!0,children:_e(e,{field:_e("rpm_Days")})})})]}),(0,qt.jsxs)(op,{className:"DatepickerForm",sx:e=>({"& .MuiFormControl-root":{display:"flex"},"& .MuiFormLabel-root":{color:e.palette.grey[800]},"& .MuiOutlinedInput-input":{}}),mr:1,width:"100%",children:[(0,qt.jsx)(o_,{fontWeight:600,sx:{fontSize:"10px",marginBottom:"5px"},className:"ShrinkLabel",children:"Date"}),(0,qt.jsx)(tH,{as:fD,size:"small",placeholder:"To",id:"followUpDate",name:"followUpDate",inputFormat:"dd/MM/yyyy",className:"datePickerField",onPaste:e=>{e.preventDefault()},onChange:e=>{l("followUpDate",sa()(e).valueOf());const t=is(sa()(new Date),e)-parseInt(1);l("followUpDays",t);const n=sa()(e).subtract(null===a||void 0===a?void 0:a.daysDifference,"days").startOf("day").valueOf();l("followUpReminderDate",n)},renderInput:e=>(0,qt.jsx)(Q_,(0,i.A)((0,i.A)({},e),{},{autoComplete:"off",onKeyDown:e=>{e.preventDefault()}})),minDate:sa()(new Date).add(1,"days")})]})]})})})]})}),(0,qt.jsx)(op,{mb:2,className:"notifyFollowUp",children:(null===a||void 0===a?void 0:a.followUpReminder)&&(0,qt.jsx)(wE,{fontSize:10,control:(0,qt.jsx)(Dw,{defaultChecked:!0,disabled:!0}),label:"Send reminder and WhatsApp message to this patient on ".concat(null!==a&&void 0!==a&&a.followUpReminderDate?" ".concat(sa()(null===a||void 0===a?void 0:a.followUpReminderDate).format("DD/MM/YYYY")," at ").concat(null===a||void 0===a?void 0:a.followUpTime):"")})}),(0,qt.jsxs)(op,{children:[(0,qt.jsx)(xh,{color:"primary",disableElevation:!0,variant:"contained",type:"submit",disabled:!(null!==a&&void 0!==a&&a.medicationList.length),onClick:()=>l("buttonType","update"),sx:{marginRight:"10px"},children:_e("rpm_Save")}),(0,qt.jsx)(xh,{variant:"outlined",color:"primary",onClick:()=>A(-1),children:_e("rpm_Back")})]})]})})}})]})};CCe.defaultProps={order:"",orderBy:"",notesHead:[],checkState:[],onCheck:()=>{},isSelection:!1,nodata:"",pageDetails:{},fetchNoteList:()=>{},addNewPrescription:()=>{},editPrescription:()=>{},initialData:{},prescriptionData:{},templateModal:!1,setTemplateModal:()=>{},saveTemplate:()=>{},allTemplates:[],template:"",setTemplate:()=>{},getTemplateById:()=>{},deleteTemplate:()=>{},templateDelete:{},notifications:{},setTemplateDelete:()=>{},handleComplaints:()=>{},handleDiagnosis:()=>{},prescriptionId:"",medicineSuggestions:[],getMedicineData:()=>{},setMedicineSuggestions:()=>{}};const wCe=CCe,SCe=n.p+"static/media/add-notes.f11813b992fbd52b8549.png",ACe=e=>{let{patientData:t,program:n}=e;const r=Nt(),o=window.innerWidth,{programId:a,patientId:s,presId:l}=lo(),c=wt(cu),[d,u]=(0,We.useState)({}),[p,h]=We.useState({}),m=so(),[f,g]=(0,We.useState)(!1),[v,x]=(0,We.useState)([]),[y,b]=(0,We.useState)(null),[j,_]=(0,We.useState)(!1),[C,w]=(0,We.useState)({open:!1,data:""}),[S,A]=(0,We.useState)({open:!1,data:""}),[k,T]=(0,We.useState)({open:!1,data:{errorMessage:"",conflicts:[]}}),[E,M]=(0,We.useState)({}),[O,R]=We.useState(null),[P,D]=We.useState(""),{state:N}=oo(),L=[{name:_e("rpm_RPM"),url:ld.DOCTOR.PROGRAM},{name:null===n||void 0===n?void 0:n.display_name,url:"".concat(ld.DOCTOR.PROGRAM,"/").concat(null===n||void 0===n?void 0:n.code,"/patients")},{name:"".concat((null===t||void 0===t?void 0:t.first_name)||""," ").concat((null===t||void 0===t?void 0:t.last_name)||""),url:"".concat(ld.DOCTOR.PROGRAM,"/").concat(null===n||void 0===n?void 0:n.code,"/patients/").concat(null===t||void 0===t?void 0:t.id,"/dashboard")},{name:_e("rpm_consultation"),url:""}];We.useEffect(()=>{const e={breadcrumb:L};cs(n)||cs(t)||r(NC(e))},[n,t]);const I=[{id:"medication",label:_e("rpm_Medication")+"*",isSort:!1,sortProperty:"medication"},{id:"dosage",label:_e("rpm_Frequency")+"*",isSort:!1,sortProperty:"dosage"},{id:"days",label:_e("rpm_Days")+"*",isSort:!1,sortProperty:"days"},{id:"duration",label:_e("rpm_Duration")+"*",isSort:!1,sortProperty:"duration"},{id:"action",label:_e("rpm_Actions"),isSort:!1,sortProperty:"action"}],F=[{id:"form",label:_e("rpm_Form"),isSort:!1,sortProperty:"form"},{id:"saltComposition",label:_e("rpm_Composition"),isSort:!1,sortProperty:"saltComposition"},{id:"shape",label:_e("rpm_Shape"),isSort:!1,sortProperty:"shape"},{id:"comments",label:_e("rpm_Comments"),isSort:!1,sortProperty:"comments"},{id:"action",label:_e("rpm_Actions"),isSort:!1,sortProperty:"action"}],$=e=>{const t=e.match(/\[(.*?)\]/),n=(t?t[1].split(", "):[]).map(e=>Ds(e,pd));return n||[]},B=async e=>{var t,n,o,l;const c=(0,i.A)((0,i.A)({},e),{},{course:{id:(null===N||void 0===N?void 0:N.id)||null,tenant_id:(null===N||void 0===N||null===(t=N.schedule)||void 0===t?void 0:t.tenant_id)||null,program:(null===N||void 0===N||null===(n=N.schedule)||void 0===n?void 0:n.program)||null,name:(null===N||void 0===N||null===(o=N.schedule)||void 0===o?void 0:o.name)||null,vital_name:(null===N||void 0===N||null===(l=N.schedule)||void 0===l?void 0:l.vital_name)||null,start_date:(null===N||void 0===N?void 0:N.start_date)||null,end_date:(null===N||void 0===N?void 0:N.end_date)||null},program:a});try{await r(((e,t,n)=>async r=>{r(na(!0));const o=await Jl((0,i.A)((0,i.A)({},n),{},{course:null===n||void 0===n?void 0:n.course}));try{const n="".concat(ua.prescription,"/").concat(e,"/").concat(t);return await Fu(n,o)}finally{r(na(!1))}})(a,s,c)),r(Zo({subTitle:"message:rpm_PrescriptionCreatedSuccessfully",severity:ud.SUCCESS})),m("".concat(ld.DOCTOR.PROGRAM,"/").concat(a,"/patients/").concat(s,"/consultations"))}catch(d){const e=us(d,"response.data._embedded.errors[0]",{}).message||"",t=$(e);if(cs(t)){const e=us(d,"response.data.code","");cs(e)?r(Zo({subTitle:"error:rpm_PrescriptionCreatedFailed",severity:ud.ERROR})):r(Zo({subTitle:Vd(e,"error:rpm_err_medicine_start_date_cannot_be_after_end_date"),severity:ud.ERROR}))}else T({open:!0,data:{errorMessage:e,conflicts:t}})}},z=async e=>{try{await r(((e,t,n,r)=>async o=>{o(na(!0));const a=await Jl((0,i.A)((0,i.A)({},n),{},{course:null}));try{const n="".concat(ua.prescription,"/").concat(e,"/").concat(t,"/").concat(r);return await $u(n,a)}finally{o(na(!1))}})(a,s,e,l)),r(Zo({subTitle:"message:rpm_PrescriptionUpdateSuccessfully",severity:ud.SUCCESS})),m("".concat(ld.DOCTOR.PROGRAM,"/").concat(a,"/patients/").concat(s,"/consultations"))}catch(t){const e=us(t,"response.data._embedded.errors[0]",{}).message||"",n=$(e);if(cs(n)){const e=us(t,"response.data.code","");cs(e)?r(Zo({subTitle:"error:rpm_PrescriptionUpdateFailed",severity:ud.ERROR})):r(Zo({subTitle:Vd(e,"error:rpm_err_medicine_start_date_cannot_be_after_end_date"),severity:ud.ERROR}))}else T({open:!0,data:{errorMessage:e,conflicts:n}})}};function H(e){var t,n;const{vital:r,medications_list:o,intervals:a,start_date:s,end_date:l,id:c,created_by:d,name:u,days:p}=e,h=null===o||void 0===o?void 0:o.map(e=>{const t=function(e,t){if(e&&t){const n=atob(e),r=new Array(n.length);for(let e=0;e<n.length;e++)r[e]=n.charCodeAt(e);const i=new Uint8Array(r),o=new Blob([i],{type:"image/jpeg"});return new File([o],t,{type:"image/jpeg"})}return null}(e.image,"".concat(e.medicine,".jpg")),n=[],r=a.some(t=>{var n;return(null===(n=t.medicines)||void 0===n?void 0:n.includes(e.id))&&null===t.start_time});if(e.frequency>=1&&e.frequency<=4&&r)for(let i=0;i<e.frequency;i++)n.push({start_time:null,interval:null});else a.filter(t=>{var n;return null===(n=t.medicines)||void 0===n?void 0:n.includes(e.id)}).forEach(e=>{let{id:t,start_time:r,stop_after:i}=e;n.push({id:t,start_time:r?Ds(r,hd):null,interval:i})});return{id:e.id,medicine:{medicine:e.medicine,medicine_form:e.medicine_form,salt_composition:e.salt_composition,color:null,dose:null,icon_type:null,image:null,unit:null,id:e.id},medicine_form:e.medicine_form,salt_composition:e.salt_composition,icon_type:e.icon_type,dose:e.dose,unit:e.unit,color:e.color,image:t,start_date:sa()(new Date).valueOf(),days:u?p:null,end_date:u?os(sa()(new Date).valueOf(),p):null,repetition_kind:e.frequency>4?vd:gd,timing:n,frequency:e.frequency,comments:e.comments}});return(0,i.A)((0,i.A)({},e),{},{followUpDays:null,followUpDate:null,followUpReminder:null===e||void 0===e||null===(t=e.follow_up)||void 0===t||!t.send_reminder_flag||(null===e||void 0===e||null===(n=e.follow_up)||void 0===n?void 0:n.send_reminder_flag),followUpReminderDate:null,complaintDetails:null!==e&&void 0!==e&&e.complaints?null===e||void 0===e?void 0:e.complaints:[],diagnosisDetails:null!==e&&void 0!==e&&e.diagnosis?null===e||void 0===e?void 0:e.diagnosis:[],tests:null!==e&&void 0!==e&&e.tests?null===e||void 0===e?void 0:e.tests:[],vital:r,presId:c,pres_start_date:s,pres_end_date:l,created_by:d,medicationList:h})}const W=async function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{q:P,index:0};try{const{data:t}=await r(Yl({q:e.q}));(null===t||void 0===t?void 0:t.length)>0?R(t):R([{id:Math.random(),medicine:e.q,salt_composition:null,medicine_form:null,icon_type:null,image:null,color:null,dose:null,unit:null}])}catch(t){console.log(t)}},U=async e=>{try{await r(Zl(a,{values:e,flag:!1})),g(!1),r(Zo({subTitle:"message:rpm_TemplateCreatedSuccessfully",severity:ud.SUCCESS}))}catch(t){const e=us(t,"response.data.code","");cs(e)?r(Zo({subTitle:"error:rpm_TemplateCreatedFailed",severity:ud.ERROR})):r(Zo({subTitle:Vd(e,"error:rpm_err_template_name_already_exist"),severity:ud.ERROR}))}},V=async e=>{try{const{data:t}=await r(Kl(a,e)),n=await H(t);u(n)}catch(t){console.log(t)}},G=async()=>{try{const{data:e}=await r((e=>async t=>{try{const t="".concat(ua.template,"/").concat(e);return await Iu(t,{})}finally{t(na(!1))}})(a));x(e)}catch(e){console.log(e)}},q=(e,t,n,r,i)=>{if("selectOption"===n){const e=t.filter(e=>!r.complaints.some(t=>t.name===e.name));i("complaints",[...r.complaints,...e]);const n=e.map(e=>({name:null===e||void 0===e?void 0:e.name,severity:"",frequency:"",duration:"1",duration_unit:"DAY"}));i("complaintDetails",[...r.complaintDetails,...n])}else if("removeOption"==n){var o;const e=null===(o=r.complaints.find(e=>!t.includes(e)))||void 0===o?void 0:o.name;if(e){i("complaintDetails",r.complaintDetails.filter(t=>t.name!==e))}}else i("complaints",[]),i("complaintDetails",[])},Y=(e,t,n,r,i)=>{if("selectOption"===n){const e=t.filter(e=>{var t;return!(null!==r&&void 0!==r&&null!==(t=r.diagnosis)&&void 0!==t&&t.some(t=>t.name===e.name))});i("diagnosis",[...r.diagnosis,...e]);const n=null===e||void 0===e?void 0:e.map(e=>({name:null===e||void 0===e?void 0:e.name,duration:"1",duration_unit:"DAY"}));i("diagnosisDetails",[...r.diagnosisDetails,...n])}else if("removeOption"==n){var o;const e=null===(o=r.diagnosis.find(e=>!t.includes(e)))||void 0===o?void 0:o.name;if(e){i("diagnosisDetails",r.diagnosisDetails.filter(t=>t.name!==e))}}else i("diagnosis",[]),i("diagnosisDetails",[])};return We.useEffect(()=>{c&&!cs(l)&&(async()=>{try{const{data:e}=await r(ql(a,s,l)),t=await H(e);u(t)}catch(e){console.log(e)}})()},[l,c]),We.useEffect(()=>{c&&W()},[c,P]),We.useEffect(()=>{c&&n&&(G(),(async e=>{const{data:t}=await r(Gl(e));M(t[0])})(null===n||void 0===n?void 0:n.code),(async e=>{try{const{data:t}=await r(Xs(e));h(t)}catch(t){console.log(t)}})(null===n||void 0===n?void 0:n.code))},[c,n]),We.useEffect(()=>{r(NC({activeMenuItem:"consultations"}))},[]),(0,qt.jsx)("div",{children:o>=575?(0,qt.jsx)(yCe,{notesHead:I,addNewPrescription:B,editPrescription:z,nodata:SCe,prescriptionData:d,templateModal:f,setTemplateModal:g,saveTemplate:U,allTemplates:v,template:y,setTemplate:b,getTemplateById:V,prescriptionId:l,openMedicineTimings:()=>{_(!j)},setTimingBox:_,timingBox:j,addTimings:e=>{let t=[],n=e>4?1:e;for(var r=0;r<n;r++)t.push({start_time:null,interval:null});return t},imageBox:C,setImageBox:w,closeImageBox:()=>{w({open:!1,data:""})},handleConfirmModalToggle:()=>{A((0,i.A)((0,i.A)({},S),{},{open:!S.open,data:""}))},rowDelete:S,chips:E,handleComplaints:q,handleDiagnosis:Y,notifications:null===p||void 0===p?void 0:p.follow_up_notification,medicineSuggestions:O,getMedicineData:W,setMedicineSuggestions:R,setSearchText:D,state:N,newHeads:F,setRowDelete:A,setReminderError:T,reminderError:k,handleReminderConfirmModalToggle:()=>{T((0,i.A)((0,i.A)({},k),{},{open:!k.open,data:{errorMessage:"",conflicts:[]}}))}}):(0,qt.jsx)(wCe,{notesHead:I,addNewPrescription:B,editPrescription:z,nodata:SCe,prescriptionData:d,templateModal:f,setTemplateModal:g,saveTemplate:U,allTemplates:v,template:y,setTemplate:b,getTemplateById:V,prescriptionId:l,chips:E,handleComplaints:q,handleDiagnosis:Y,notifications:null===p||void 0===p?void 0:p.follow_up_notification,medicineSuggestions:O,getMedicineData:W,setMedicineSuggestions:R})})};var kCe=n(75824),TCe=n(92823),ECe=n.n(TCe);const MCe=function(e){let{fetchListFunction:t,filterState:n,setFilterState:r,pageDetails:o,setShowFilterColor:a}=e;const{t:s}=Vg();return(0,qt.jsx)(qt.Fragment,{children:(0,qt.jsx)(Kz,{initialValues:{vital:"",start_date:null,end_date:null},children:()=>(0,qt.jsx)(nH,{children:(0,qt.jsx)(op,{className:"WhiteBG prescription-tour-step0",sx:{borderRadius:"8px"},children:(0,qt.jsxs)(Ff,{container:!0,alignItems:"center",children:[(0,qt.jsx)(Ff,{item:!0,xs:12,md:12,lg:3,children:(0,qt.jsxs)(op,{p:1,py:.6,pr:.6,display:"flex",children:[(0,qt.jsxs)(d_,{sx:{display:"flex",alignItems:"center",width:"88%"},children:[(0,qt.jsx)(o_,{id:"vital",children:s("rpm_VitalType")}),(0,qt.jsx)(tH,{as:G_,sx:{borderRadius:2,bgcolor:"white"},fullWidth:!0,name:"vital",labelId:"vital",label:"vital type",variant:"outlined",size:"small",value:n.vital,onChange:e=>{r(t=>(0,i.A)((0,i.A)({},t),{},{vital:e.target.value}))},endAdornment:(0,qt.jsx)(tw,{position:"end",sx:{position:"absolute",right:"28px"},children:(0,qt.jsx)(sy,{title:s("message:rpm_VitalTypeNoteHelp"),placement:"top",children:(0,qt.jsx)(wh,{size:"small",disableRipple:!0,sx:{p:0},children:(0,qt.jsx)(pM.A,{fontSize:"small"})})})}),children:Nd.map(e=>(0,qt.jsx)(mf,{value:e.value,children:s("rpm_".concat(e.name))},e.value))})]}),(0,qt.jsx)(eg,{orientation:"vertical",flexItem:!0,sx:{ml:2}})]})}),(0,qt.jsxs)(Ff,{item:!0,xs:12,sm:12,md:12,lg:9,display:"flex",alignItems:"center",className:"consultaionFilterMobile",children:[(0,qt.jsxs)(Ff,{container:!0,alignItems:"center",spacing:1,lg:7,xs:12,children:[(0,qt.jsx)(Ff,{item:!0,xs:3,children:(0,qt.jsx)(Cf,{color:"primary",fontWeight:600,sx:{fontSize:12},ml:1,className:"responsiveFonts",children:s("rpm_Duration")})}),(0,qt.jsx)(Ff,{item:!0,xs:5,md:!0,className:"durationOnMobile",children:(0,qt.jsx)(op,{className:"DatepickerForm",sx:e=>({"& .MuiFormControl-root":{display:"flex"},"& .MuiFormLabel-root":{color:e.palette.grey[800]},"& .MuiFormLabel-root.MuiInputLabel-shrink":{transform:"translate(15px, -8px)",fontSize:12}}),children:(0,qt.jsxs)(WM,{dateAdapter:DI,children:[(0,qt.jsx)(tH,{as:fD,size:"small",label:"From",name:"start_date",value:n.start_date,renderInput:e=>(0,qt.jsx)(Q_,(0,i.A)({},e)),maxDate:new Date,onChange:e=>{r(t=>(0,i.A)((0,i.A)({},t),{},{start_date:e}))}}),(0,qt.jsx)(op,{})]})})}),(0,qt.jsx)(Ff,{item:!0,xs:4,md:!0,className:"durationOnMobile",children:(0,qt.jsx)(op,{className:"DatepickerForm",sx:e=>({"& .MuiFormControl-root":{display:"flex"},"& .MuiFormLabel-root":{color:e.palette.grey[800]},"& .MuiFormLabel-root.MuiInputLabel-shrink":{transform:"translate(15px, -8px)",fontSize:12}}),ml:1,children:(0,qt.jsx)(WM,{dateAdapter:DI,children:(0,qt.jsx)(tH,{as:fD,size:"small",label:"To",name:"end_date",value:n.end_date,renderInput:e=>(0,qt.jsx)(Q_,(0,i.A)({},e)),minDate:n.start_date?new Date(n.start_date):void 0,maxDate:new Date,onChange:e=>{r(t=>(0,i.A)((0,i.A)({},t),{},{end_date:e}))}})})})})]}),(0,qt.jsx)(Ff,{item:!0,xs:12,lg:5,children:(0,qt.jsxs)(op,{py:.5,display:"flex",alignItems:"center",children:[(0,qt.jsx)(xh,{variant:"contained",disableElevation:!0,sx:{ml:2,whiteSpace:"nowrap"},onClick:()=>{o.current_page=1,t(n),""===n.vital&&null===n.start_date&&null===n.start_date||a(!0)},children:s("rpm_ApplyFilters")}),(0,qt.jsx)(xh,{variant:"text",disableElevation:!0,onClick:()=>{o.current_page=1,r({vital:"",start_date:null,end_date:null}),t({vital:"",start_date:null,end_date:null}),a(!1)},type:"reset",children:(0,qt.jsx)(J_.A,{})})]})})]})]})})})})})};const OCe=function(e){let{handleToggleAddNote:t,showFilterColor:n}=e;const{t:r}=Vg();return(0,qt.jsx)(qt.Fragment,{children:(0,qt.jsxs)(op,{p:1,children:[(0,qt.jsx)(op,{display:"flex",alignItems:"center",mb:2,children:(0,qt.jsx)("img",{src:n?GC:SCe,style:{display:"block",margin:"auto",maxWidth:"200px"},className:"emptyNotesImage"})}),(0,qt.jsx)(op,{textAlign:"center",children:(0,qt.jsx)(Ff,{container:!0,children:(0,qt.jsx)(Ff,{item:!0,xs:12,children:!n&&(0,qt.jsxs)(xh,{className:"notes-tour-step3",variant:"contained",onClick:t,disableElevation:!0,children:[(0,qt.jsx)(jue.A,{}),r("rpm_AddNewNote")]})})})})]})})};function RCe(e){var t;let{editButton:n,deleteButton:r,viewButton:i,initialFormValues:o,addNewNote:a,showFilterColor:s,setShowFilterColor:l,fileUploadButton:c,fileModal:d,fileUploadIconButton:u,notesList:p,editableNoteId:h,downloadFile:m,setToggleAddNote:f,toggleAddNote:g,closeEditMode:v,editNote:x,fetchNoteList:y,pageDetails:b,filterState:j,setFilterState:_,onLocalFileDelete:C,onCloudFilesDelete:w,patientData:S,program:A,noteTypesDropdown:k}=e;const{t:T}=Vg(),E=Nt(),{programId:M,patientId:O}=lo(),R=so(),P=[{name:T("rpm_RPM"),url:ld.DOCTOR.PROGRAM},{name:null===A||void 0===A?void 0:A.display_name,url:"".concat(ld.DOCTOR.PROGRAM,"/").concat(null===A||void 0===A?void 0:A.code,"/patients")},{name:"".concat((null===S||void 0===S?void 0:S.first_name)||""," ").concat((null===S||void 0===S?void 0:S.last_name)||""),url:"".concat(ld.DOCTOR.PROGRAM,"/").concat(null===A||void 0===A?void 0:A.code,"/patients/").concat(null===S||void 0===S?void 0:S.id,"/dashboard")},{name:T("rpm_AdminNotes"),url:""}],D=["header","bold","italic","underline","strike","blockquote","size","color","list","bullet","indent","link"],N=We.useRef(null),L=We.useMemo(()=>({toolbar:{container:[["bold","italic","underline","strike"],[{size:[]},{color:[]}],[{list:"ordered"},{list:"bullet"},{indent:"-1"},{indent:"+1"},{align:[]}],["link","image","video"],["clean"]],history:{delay:500,maxStack:100,userOnly:!0}},clipboard:{matchVisual:!1}}),[]),I=e=>{const t=null===e||void 0===e?void 0:e.split("/");return t[(null===t||void 0===t?void 0:t.length)-1]},F=()=>{var e,t,n,r,i,o,a,s,l,c;return(0,qt.jsxs)(qt.Fragment,{children:[!cs(null===d||void 0===d||null===(e=d.data)||void 0===e||null===(t=e.local_files)||void 0===t||null===(n=t.local)||void 0===n?void 0:n.files)&&(null===d||void 0===d||null===(r=d.data)||void 0===r||null===(i=r.local_files)||void 0===i||null===(o=i.local)||void 0===o||null===(a=o.files)||void 0===a?void 0:a.map((e,t)=>(0,qt.jsx)(Eb,{sx:{p:1,mb:1},onDelete:()=>C(t),icon:(0,qt.jsx)(Aje.A,{fontSize:"small"}),label:null===e||void 0===e?void 0:e.name,variant:"string",className:"UplodeChip"},t))),!cs(null===d||void 0===d||null===(s=d.data)||void 0===s?void 0:s.files)&&(null===d||void 0===d||null===(l=d.data)||void 0===l||null===(c=l.files)||void 0===c?void 0:c.map((e,t)=>(0,qt.jsx)(Eb,{sx:{p:1,mb:1},onDelete:()=>w(null===d||void 0===d?void 0:d.data,null===e||void 0===e?void 0:e.id,t),icon:(0,qt.jsx)(Sje.A,{}),onClick:()=>{m({noteId:h,file:e})},label:I(null===e||void 0===e?void 0:e.file_name),variant:"string",className:"UplodeChip"},t)))]})},$=()=>{f(!g),h&&v()},B=e=>{var t,n,r;let{noteObj:i}=e;const[o,a]=We.useState(2);return(0,qt.jsxs)(qt.Fragment,{children:[null===i||void 0===i||null===(t=i.files)||void 0===t||null===(n=t.slice(0,o))||void 0===n?void 0:n.map(e=>(0,qt.jsx)(Eb,{sx:{color:"primary.theme.500",borderRadius:"0",textDecoration:"underline",height:"inherit"},"data-id":e.id,label:I(e.file_name),variant:"string",className:"attachment_btn",onClick:()=>{m({noteId:i.id,file:e})}},e.id)),(null===i||void 0===i||null===(r=i.files)||void 0===r?void 0:r.length)>=3&&(0,qt.jsx)(sy,{title:T("rpm_ShowMore"),children:(0,qt.jsx)(wh,{disableRipple:!0,size:"small",onClick:()=>{var e,t;o===(null===i||void 0===i||null===(e=i.files)||void 0===e?void 0:e.length)?a(2):a(null===i||void 0===i||null===(t=i.files)||void 0===t?void 0:t.length)},children:"..."})})]})};return We.useEffect(()=>{const e={breadcrumb:P};cs(A)||cs(S)||E(NC(e))},[A,S]),(0,qt.jsxs)(op,{children:[(0,qt.jsx)(op,{sx:{width:"100%"},children:(0,qt.jsxs)(Ff,{container:!0,children:[(0,qt.jsx)(Ff,{item:!0,xs:12,sm:6,md:6,children:(0,qt.jsxs)(op,{sx:{mb:1},position:"relative",children:[(0,qt.jsx)(op,{sx:{display:{xs:"none",sm:"block"}},children:(0,qt.jsx)(Cf,{variant:"h5",component:"h5",children:T("rpm_Notes")})}),(0,qt.jsx)(op,{sx:{display:{xs:"block",sm:"none"}},position:"absolute",top:"-48px",left:"40px",children:(0,qt.jsx)(Cf,{variant:"h6",component:"h6",children:T("rpm_Notes")})})]})}),(0,qt.jsx)(Ff,{item:!0,xs:12,sm:6,md:6,children:(0,qt.jsxs)(op,{display:"flex",flexWrap:"wrap",gap:1,mb:3,justifyContent:"end",children:[(0,qt.jsx)(xh,{variant:"outlined",size:"small",disableElevation:!0,onClick:()=>R("".concat(ld.DOCTOR.PROGRAM,"/").concat(M,"/patients/").concat(O,"/notes/resolve-alerts")),children:T("rpm_NoteResolvedAlerts")}),k.existingNoteTypes.map(e=>{if("PRESCRIPTION"!==e)return(0,qt.jsx)(qt.Fragment,{children:(0,qt.jsx)(xh,{variant:"ADMIN"===e?"contained":"outlined",size:"small",disableElevation:!0,onClick:()=>R("".concat(ld.DOCTOR.PROGRAM,"/").concat(M,"/patients/").concat(O,"/notes/").concat(e.toLowerCase(),"-note")),children:T("rpm_".concat(xs(e.toLowerCase()),"Notes"))})})}),!cs(k.nonExistingNoteTypes)&&(0,qt.jsx)(op,{sx:{display:"flex",alignItems:"center","& .MuiSelect-select":{p:.7}},className:"remove_selectborder",children:(0,qt.jsx)(d_,{sx:{display:"flex",alignItems:"center"},children:(0,qt.jsxs)(G_,{sx:k.nonExistingNoteTypes.includes("ADMIN")?{maxWidth:180,color:"white",backgroundColor:"primary.theme.500",borderColor:"primary.theme.500",borderRadius:"4px",pl:"5px",fontSize:"14px","& svg":{color:"#fff"}}:{maxWidth:180,color:"primary.theme.500",borderColor:"primary.theme.500",borderRadius:"4px",pl:"5px",fontSize:"14px"},fullWidth:!0,variant:"outlined",size:"small",value:k.nonExistingNoteTypes.includes("ADMIN")?"ADMIN":"additionalNotes",children:[(0,qt.jsx)(mf,{value:"additionalNotes",disabled:!0,sx:{display:"none"},children:T("rpm_AdditionalNotes")}),k.nonExistingNoteTypes.map(e=>{if("PRESCRIPTION"!==e)return(0,qt.jsx)(mf,{value:e,onClick:()=>R("".concat(ld.DOCTOR.PROGRAM,"/").concat(M,"/patients/").concat(O,"/notes/").concat(e.toLowerCase(),"-note")),children:T("rpm_".concat(xs(e.toLowerCase()),"Notes"))},e)})]})})})]})})]})}),(0,qt.jsx)(op,{bgcolor:"white",className:"UseNoteFilter",p:2,children:(0,qt.jsx)(Ff,{container:!0,spacing:2,alignItems:"center",children:(0,qt.jsx)(Ff,{item:!0,md:12,lg:9,xl:8,children:(0,qt.jsx)(MCe,{fetchListFunction:y,filterState:j,setFilterState:_,pageDetails:b,showFilterColor:s,setShowFilterColor:l})})})}),(0,qt.jsx)(eg,{}),(0,qt.jsxs)(op,{bgcolor:"white",p:2,children:[cs(p)&&!g&&(0,qt.jsx)(OCe,{handleToggleAddNote:$,showFilterColor:s}),!cs(p)&&(0,qt.jsx)(qt.Fragment,{children:(null===A||void 0===A||null===(t=A.permissions)||void 0===t?void 0:t.showCreateNoteList)&&(0,qt.jsx)(xh,{variant:"contained",disableElevation:!0,startIcon:(0,qt.jsx)(Jxe.A,{}),onClick:$,color:"primary",sx:{fontWeight:"600",marginBottom:"10px"},children:T("rpm_AddNewNote")})}),g&&(0,qt.jsx)(Kz,{initialValues:o,enableReinitialize:!0,validationSchema:RU.noteSchema,onSubmit:a,children:e=>{var t,n,r;let{values:i,setFieldValue:o}=e;return(0,qt.jsx)(nH,{children:(0,qt.jsxs)(Ff,{container:!0,className:"EditorPageNotes",spacing:2,mb:2,children:[(0,qt.jsxs)(Ff,{item:!0,xs:12,md:5,children:[(0,qt.jsxs)(d_,{sx:{display:"flex",alignItems:"center"},children:[(0,qt.jsx)(o_,{id:"vital",children:T("rpm_VitalType")}),(0,qt.jsx)(G_,{fullWidth:!0,variant:"outlined",size:"small",name:"vital",id:"vital",onChange:e=>{o("vital",e.target.value)},labelId:"vital",label:T("rpm_VitalType"),endAdornment:(0,qt.jsx)(tw,{position:"end",sx:{position:"absolute",right:"28px"},children:(0,qt.jsx)(sy,{title:T("message:rpm_VitalTypeNoteHelp"),placement:"top",children:(0,qt.jsx)(wh,{size:"small",disableRipple:!0,sx:{p:0},children:(0,qt.jsx)(pM.A,{fontSize:"small"})})})}),children:Nd.map(e=>(0,qt.jsx)(mf,{value:e.value,children:T("rpm_".concat(e.name))},e.value))})]}),(0,qt.jsx)(dH,{name:"vital",children:e=>(0,qt.jsx)(v_,{error:!0,children:T(e,{field:T("rpm_VitalType")})})})]}),(0,qt.jsxs)(Ff,{item:!0,xs:12,md:9,children:[(0,qt.jsxs)(op,{className:" text-editor",width:"100%",children:[(0,qt.jsx)(ECe(),{theme:"snow",modules:L,formats:D,value:null===i||void 0===i?void 0:i.description,onChange:e=>{o("description",e)},ref:N}),(0,qt.jsx)(dH,{name:"description",children:e=>(0,qt.jsx)(v_,{error:!0,children:T(e,{field:T("rpm_Note")})})})]}),(0,qt.jsxs)(op,{mt:2,children:[(0,qt.jsx)(xh,{disableElevation:!0,variant:"outlined",color:"primary",onClick:$,sx:{marginRight:"10px"},children:T("rpm_Cancel")})," ",(0,qt.jsx)(xh,{disableElevation:!0,variant:"contained",sx:{marginRight:2},type:"submit",children:T("rpm_Save")})]})]}),(0,qt.jsx)(Ff,{item:!0,xs:12,md:3,children:(0,qt.jsx)(op,{children:(0,qt.jsxs)(qt.Fragment,{children:[(0,qt.jsx)(F,{}),cs(null===d||void 0===d||null===(t=d.data)||void 0===t||null===(n=t.local_files)||void 0===n||null===(r=n.local)||void 0===r?void 0:r.files)?c("upload",{}):u("upload",{})]})})})]})})}}),p.map(e=>{var t,i;return(0,qt.jsx)(qt.Fragment,{children:h!==e.id?(0,qt.jsxs)(Ff,{container:!0,spacing:2,mb:2,children:[(0,qt.jsx)(Ff,{item:!0,xs:11,children:(0,qt.jsxs)(op,{sx:{bgcolor:"primary.theme.50",borderRadius:1,p:1},children:[(0,qt.jsx)(Cf,{variant:"body2",fontWeight:600,children:T("rpm_".concat(e.vital))}),(0,qt.jsx)(Cf,{variant:"body2",dangerouslySetInnerHTML:{__html:e.note},color:"inherit",sx:{wordBreak:"break-all"},className:"savemode"}),(0,qt.jsxs)(Cf,{variant:"body2",mb:.6,children:[(0,qt.jsxs)(op,{component:"span",fontWeight:600,sx:{verticalAlign:"middle"},children:[T("rpm_Attachment"),":\xa0"]}),(0,qt.jsx)(op,{component:"span",sx:{color:"primary.theme.500",fontWeight:"600",pl:"0"},children:(0,qt.jsx)(B,{noteObj:e})})]}),(0,qt.jsxs)(op,{sx:{display:"flex",alignItems:"center"},children:[(0,qt.jsxs)(Cf,{sx:{fontSize:"14px"},children:["Created by \xa0",(0,qt.jsx)(op,{component:"span",fontWeight:600,children:e.created_by}),"\xa0 on \xa0",(0,qt.jsx)(op,{component:"span",fontWeight:600,children:sa()(e.created_at).format("DD MMM YYYY hh:mm A")}),"\xa0\xa0"]}),(0,qt.jsxs)(Cf,{sx:{fontSize:"14px"},children:["Last Updated by \xa0",(0,qt.jsx)(op,{component:"span",fontWeight:600,children:e.updated_by||e.created_by}),"\xa0 on \xa0",(0,qt.jsx)(op,{component:"span",fontWeight:600,children:e.updated_at?sa()(e.updated_at).format("DD MMM YYYY hh:mm A"):sa()(e.created_at).format("DD MMM YYYY hh:mm A")})]})]})]})}),(0,qt.jsx)(Ff,{item:!0,xs:1,children:(0,qt.jsxs)(op,{sx:{margin:1},className:"BGbtnGrp",children:[(null===A||void 0===A||null===(t=A.permissions)||void 0===t?void 0:t.showEditNote)&&n(e),!1,(null===A||void 0===A||null===(i=A.permissions)||void 0===i?void 0:i.showDeleteList)&&r({id:e.id})]})})]}):(0,qt.jsx)(Kz,{initialValues:o,enableReinitialize:!0,onSubmit:x,validationSchema:RU.noteSchema,children:t=>{var n,r,i;let{values:o,setFieldValue:a}=t;return(0,qt.jsx)(nH,{children:(0,qt.jsx)(qt.Fragment,{children:(0,qt.jsxs)(Ff,{container:!0,spacing:2,className:"EditorPageNotes",mt:2,mb:2,children:[(0,qt.jsxs)(Ff,{item:!0,xs:12,md:5,children:[(0,qt.jsxs)(d_,{sx:{display:"flex",alignItems:"center"},children:[(0,qt.jsx)(o_,{id:"vital",children:T("rpm_VitalType")}),(0,qt.jsx)(G_,{fullWidth:!0,variant:"outlined",size:"small",name:"vital",id:"vital",value:o.vital,onChange:e=>{a("vital",e.target.value)},labelId:"vital",label:T("rpm_VitalType"),endAdornment:(0,qt.jsx)(tw,{position:"end",sx:{position:"absolute",right:"28px"},children:(0,qt.jsx)(sy,{title:T("message:rpm_VitalTypeNoteHelp"),placement:"top",children:(0,qt.jsx)(wh,{size:"small",disableRipple:!0,sx:{p:0},children:(0,qt.jsx)(pM.A,{fontSize:"small"})})})}),children:Nd.map(e=>(0,qt.jsx)(mf,{value:e.value,children:T("rpm_".concat(e.name))},e.value))})]}),(0,qt.jsx)(dH,{name:"vital",children:e=>(0,qt.jsx)(v_,{error:!0,children:T(e,{field:T("rpm_VitalType")})})})]}),(0,qt.jsxs)(Ff,{item:!0,xs:12,md:9,children:[(0,qt.jsxs)(op,{className:" text-editor",width:"100%",children:[(0,qt.jsx)(ECe(),{theme:"snow",modules:L,formats:D,value:o.description,onChange:e=>a("description",e),ref:N}),(0,qt.jsx)(dH,{name:"description",children:e=>(0,qt.jsx)(v_,{error:!0,children:T(e,{field:T("rpm_Note")})})})]}),(0,qt.jsxs)(op,{mt:2,children:[(0,qt.jsx)(xh,{disableElevation:!0,variant:"outlined",color:"primary",onClick:v,sx:{marginRight:"10px"},children:T("rpm_Cancel")})," ",(0,qt.jsx)(xh,{disableElevation:!0,variant:"contained",sx:{marginRight:2},type:"submit",children:T("rpm_Save")})]})]}),(0,qt.jsx)(Ff,{item:!0,xs:12,md:3,children:(0,qt.jsx)(op,{children:(0,qt.jsxs)(qt.Fragment,{children:[(0,qt.jsx)(F,{}),cs(null===d||void 0===d||null===(n=d.data)||void 0===n||null===(r=n.local_files)||void 0===r||null===(i=r.local)||void 0===i?void 0:i.files)?c("upload",e):u("upload",e)]})})})]})})})}})})}),(0,qt.jsx)(op,{sx:e=>({pr:2,bgcolor:e.palette.common.white}),children:(0,qt.jsx)(KE,{pageDetails:b,fetchListFunction:y})})]})]})}RCe.defaultProps={alertsHead:[],order:"",orderBy:"",dataParameter:"",checkState:[],isSelection:!1,nodata:"",alertsList:[],otherResolvedAlertList:[],resolvedAlertList:[],initialFormValues:{},addNewNote:()=>{},fileUploadButton:()=>{},fileModal:{},fileUploadIconButton:()=>{},notesList:[],editableNoteId:"",downloadFile:()=>{},setToggleAddNote:()=>{},toggleAddNote:!1,closeEditMode:()=>{},editNote:()=>{},fetchNoteList:()=>{},pageDetails:{},filterState:{},setFilterState:()=>{},onLocalFileDelete:()=>{},onCloudFilesDelete:()=>{},program:{},patientData:{},noteTypesDropdown:{},showFilterColor:{},setShowFilterColor:()=>{}};const PCe=RCe;var DCe=n(3);const NCe=zT({drawerHeader:{display:"flex",alignItems:"center","& .MuiSvgIcon-root":{color:"#7986cb"}},filterContent:{minHeight:"190px",paddingBottom:"60px",paddingTop:"6px",maxHeight:"400px","& .MuiInputBase-root":{textAlign:"left"},"& .MuiInputLabel-root":{transform:"translate(14px, 9px) scale(1)"},"& .MuiInputLabel-shrink":{transform:"translate(14px, -9px) scale(0.75)"},"& .MuiFormControl-root":{margin:"0px 0 15px 0"},"& .MuiInputBase-root.MuiOutlinedInput-root":{height:"40px"}},applyFilterBtn:{width:"calc(100% - 77px)"}});const LCe=function(e){let{fetchListFunction:t,filterState:n,setFilterState:r,pageDetails:o,setShowFilterColor:a,filterVariant:s,filterName:l,mobileFilterBG:c}=e;const{t:d}=Vg(),u=NCe(),[p,h]=We.useState(!1),m=()=>{h(e=>!e)};return(0,qt.jsx)(qt.Fragment,{children:(0,qt.jsx)(Kz,{initialValues:{vital:"",start_date:null,end_date:null},children:()=>(0,qt.jsx)(nH,{children:(0,qt.jsxs)(op,{className:c?"mobileFiterButton prescription-tour-step0":"WhiteBG prescription-tour-step0",sx:{borderRadius:"8px"},position:"relative",children:[(0,qt.jsxs)(xh,{variant:s,onClick:m,sx:{marginLeft:"10px"},children:[(0,qt.jsx)(lbe.A,{}),l]}),(0,qt.jsx)(dg,{anchor:"bottom",open:p,onClose:m,transitionDuration:500,PaperProps:{sx:{borderRadius:"16px 16px 0 0"}},children:(0,qt.jsxs)(op,{sx:{textAlign:"center"},children:[(0,qt.jsxs)(op,{display:"flex",alignItems:"center",justifyContent:"space-between",px:"20px",py:1,mb:2,bgcolor:"#f2f2fe",color:"#7986cb",children:[(0,qt.jsx)(Cf,{variant:"h6",component:"h6",sx:{display:"flex",alignItems:"center"},children:(0,qt.jsxs)(op,{className:u.drawerHeader,children:[(0,qt.jsx)(lbe.A,{sx:{marginRight:"7px"}}),(0,qt.jsx)(Cf,{color:"primary",variant:"h6",children:"Filters"})]})}),(0,qt.jsx)(wh,{onClick:m,children:(0,qt.jsx)(J_.A,{})})]}),(0,qt.jsxs)(op,{px:2.5,className:u.filterContent,sx:{display:"flex",flexDirection:"column"},children:[(0,qt.jsxs)(d_,{fullWidth:!0,children:[(0,qt.jsx)(o_,{id:"vital",children:d("rpm_VitalType")}),(0,qt.jsx)(tH,{as:G_,sx:{borderRadius:2,bgcolor:"white"},fullWidth:!0,name:"vital",labelId:"vital",label:"vital type",variant:"outlined",size:"small",value:n.vital,onChange:e=>{r(t=>(0,i.A)((0,i.A)({},t),{},{vital:e.target.value}))},endAdornment:(0,qt.jsx)(tw,{position:"end",sx:{position:"absolute",right:"28px"},children:(0,qt.jsx)(sy,{title:d("message:rpm_VitalTypeNoteHelp"),placement:"top",children:(0,qt.jsx)(wh,{size:"small",disableRipple:!0,sx:{p:0},children:(0,qt.jsx)(pM.A,{fontSize:"small"})})})}),children:Nd.map(e=>(0,qt.jsx)(mf,{value:e.value,children:d("rpm_".concat(e.name))},e.value))})]}),(0,qt.jsx)(Cf,{color:"primary",fontWeight:600,sx:{fontSize:14,marginBottom:"8px"},textAlign:"start",children:d("rpm_Duration")}),(0,qt.jsxs)(op,{display:"flex",alignItems:"baseline",justifyContent:"space-between",children:[(0,qt.jsx)(op,{className:"DatepickerForm",sx:e=>({"& .MuiFormControl-root":{display:"flex"},"& .MuiFormLabel-root":{color:e.palette.grey[800]},"& .MuiFormLabel-root.MuiInputLabel-shrink":{transform:"translate(15px, -8px)",fontSize:12}}),children:(0,qt.jsxs)(WM,{dateAdapter:DI,children:[(0,qt.jsx)(tH,{as:fD,size:"small",label:"From",name:"start_date",value:n.start_date,renderInput:e=>(0,qt.jsx)(Q_,(0,i.A)({},e)),maxDate:new Date,onChange:e=>{r(t=>(0,i.A)((0,i.A)({},t),{},{start_date:e}))}}),(0,qt.jsx)(op,{})]})}),(0,qt.jsx)(op,{mx:.9,children:"-"}),(0,qt.jsx)(op,{className:"DatepickerForm",sx:e=>({"& .MuiFormControl-root":{display:"flex"},"& .MuiFormLabel-root":{color:e.palette.grey[800]},"& .MuiFormLabel-root.MuiInputLabel-shrink":{transform:"translate(15px, -8px)",fontSize:12}}),children:(0,qt.jsx)(WM,{dateAdapter:DI,children:(0,qt.jsx)(tH,{as:fD,size:"small",label:"To",name:"end_date",value:n.end_date,renderInput:e=>(0,qt.jsx)(Q_,(0,i.A)({},e)),minDate:n.start_date?new Date(n.start_date):void 0,maxDate:new Date,onChange:e=>{r(t=>(0,i.A)((0,i.A)({},t),{},{end_date:e}))}})})})]}),(0,qt.jsxs)(op,{py:.5,display:"flex",alignItems:"center",width:"100%",position:"fixed",bottom:"0",left:"0",pl:"20px",borderTop:"1px solid #efefef",children:[(0,qt.jsx)(xh,{className:u.applyFilterBtn,variant:"contained",disableElevation:!0,disabled:""===n.vital&&null===n.start_date&&null===n.end_date,sx:{mt:1,mr:2,height:"40px"},onClick:()=>{o.current_page=1,t(n),""===n.vital&&null===n.start_date&&null===n.end_date||a(!0),m()},children:d("rpm_ApplyFilters")}),(0,qt.jsx)(xh,{variant:"outlined",disableElevation:!0,onClick:()=>{o.current_page=1,r({vital:"",start_date:null,end_date:null}),t({vital:"",start_date:null,end_date:null}),a(!1)},type:"reset",sx:{mt:1},style:{minWidth:"40px"},className:"resetBackupButton",children:(0,qt.jsx)(Eye.A,{fontSize:"small"})})]})]})]})})]})})})})},ICe=zT(()=>({filterSpace:{"& .MuiButtonBase-root":{padding:"3px 6px !Important",fontSize:"12px",svg:{height:"12px"}}},addnewBtn:{whiteSpace:"nowrap","& .MuiButton-startIcon":{marginRight:"0"}},titles:{fontSize:"14px !important",color:"#7986cb",fontWeight:"600 !important",letterSpacing:"0.02em"},attachment_btn:{backgroundColor:"transparent","& .MuiChip-label":{paddingLeft:"0"}}}));var FCe=n(21338);function $Ce(e){var t;let{MobileeditButton:n,MobiledeleteButton:r,viewButton:i,initialFormValues:o,addNewNote:a,showFilterColor:s,setShowFilterColor:l,MobilefileUploadButton:c,fileModal:d,fileUploadIconButton:u,notesList:p,editableNoteId:h,downloadFile:m,setToggleAddNote:f,toggleAddNote:g,closeEditMode:v,editNote:x,fetchNoteList:y,pageDetails:b,filterState:j,setFilterState:_,onLocalFileDelete:C,onCloudFilesDelete:w,patientData:S,program:A,noteTypesDropdown:k}=e;const T=ICe(),{t:E}=Vg(),M=Nt(),{programId:O,patientId:R}=lo(),P=so(),[D,N]=(0,We.useState)(!1),L=e=>()=>{N(e)},I=[{name:E("rpm_RPM"),url:ld.DOCTOR.PROGRAM},{name:null===A||void 0===A?void 0:A.display_name,url:"".concat(ld.DOCTOR.PROGRAM,"/").concat(null===A||void 0===A?void 0:A.code,"/patients")},{name:"".concat((null===S||void 0===S?void 0:S.first_name)||""," ").concat((null===S||void 0===S?void 0:S.last_name)||""),url:"".concat(ld.DOCTOR.PROGRAM,"/").concat(null===A||void 0===A?void 0:A.code,"/patients/").concat(null===S||void 0===S?void 0:S.id,"/dashboard")},{name:E("rpm_AdminNotes"),url:""}],F=["header","bold","italic","underline","strike","blockquote","size","color","list","bullet","indent","link"],$=We.useRef(null),B=We.useMemo(()=>({toolbar:{container:[["bold","italic","underline","strike"],[{size:[]},{color:[]}],[{list:"ordered"},{list:"bullet"},{indent:"-1"},{indent:"+1"},{align:[]}],["link","image","video"],["clean"]],history:{delay:500,maxStack:100,userOnly:!0}},clipboard:{matchVisual:!1}}),[]),z=e=>{const t=null===e||void 0===e?void 0:e.split("/");return t[(null===t||void 0===t?void 0:t.length)-1]},H=()=>{var e,t,n,r,i,o,a,s,l,c;return(0,qt.jsxs)(qt.Fragment,{children:[!cs(null===d||void 0===d||null===(e=d.data)||void 0===e||null===(t=e.local_files)||void 0===t||null===(n=t.local)||void 0===n?void 0:n.files)&&(null===d||void 0===d||null===(r=d.data)||void 0===r||null===(i=r.local_files)||void 0===i||null===(o=i.local)||void 0===o||null===(a=o.files)||void 0===a?void 0:a.map((e,t)=>(0,qt.jsx)(Eb,{sx:{p:1,mb:1},onDelete:()=>C(t),icon:(0,qt.jsx)(Aje.A,{fontSize:"small"}),label:null===e||void 0===e?void 0:e.name,variant:"string",className:"UplodeChip"},t))),!cs(null===d||void 0===d||null===(s=d.data)||void 0===s?void 0:s.files)&&(null===d||void 0===d||null===(l=d.data)||void 0===l||null===(c=l.files)||void 0===c?void 0:c.map((e,t)=>(0,qt.jsx)(Eb,{sx:{p:1,mb:1},onDelete:()=>w(null===d||void 0===d?void 0:d.data,null===e||void 0===e?void 0:e.id,t),icon:(0,qt.jsx)(Sje.A,{}),onClick:()=>{m({noteId:h,file:e})},label:z(null===e||void 0===e?void 0:e.file_name),variant:"string",className:"UplodeChip"},t)))]})},W=()=>{f(!g),h&&v()},U=e=>{var t,n,r;let{noteObj:i}=e;const[o,a]=We.useState(2);return(0,qt.jsxs)(qt.Fragment,{children:[null===i||void 0===i||null===(t=i.files)||void 0===t||null===(n=t.slice(0,o))||void 0===n?void 0:n.map(e=>(0,qt.jsx)(Eb,{sx:{color:"black",borderRadius:"0",textDecoration:"underline",height:"inherit",pl:"0 !important"},"data-id":e.id,label:z(e.file_name),variant:"string",className:T.attachment_btn,onClick:()=>{m({noteId:i.id,file:e})}},e.id)),(null===i||void 0===i||null===(r=i.files)||void 0===r?void 0:r.length)>=3&&(0,qt.jsx)(sy,{title:E("rpm_ShowMore"),children:(0,qt.jsx)(wh,{disableRipple:!0,size:"small",onClick:()=>{var e,t;o===(null===i||void 0===i||null===(e=i.files)||void 0===e?void 0:e.length)?a(2):a(null===i||void 0===i||null===(t=i.files)||void 0===t?void 0:t.length)},children:"..."})})]})};return We.useEffect(()=>{const e={breadcrumb:I};cs(A)||cs(S)||M(NC(e))},[A,S]),(0,qt.jsxs)(op,{children:[(0,qt.jsxs)(op,{sx:{width:"100%"},children:[(0,qt.jsxs)(op,{sx:{mb:1},position:"relative",children:[(0,qt.jsx)(op,{position:"absolute",top:"-45px",left:"40px",children:(0,qt.jsx)(Cf,{variant:"h6",component:"h6",fontSize:16,children:E("rpm_Notes")})}),(0,qt.jsx)(op,{position:"absolute",top:"-50px",right:"0px",children:(0,qt.jsx)(op,{children:(0,qt.jsx)(wh,{onClick:L(!0),sx:{background:"#e8eaf6",padding:"5px"},children:(0,qt.jsx)(DCe.A,{color:"primary",sx:{padding:"0"}})})})})]}),(0,qt.jsx)(dg,{anchor:"left",open:D,onClose:L(!1),children:(0,qt.jsxs)("div",{style:{width:230},children:[(0,qt.jsxs)("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between",background:"#f2f2fe",padding:"5px 10px"},children:[(0,qt.jsx)(Cf,{variant:"h6",sx:{color:"#7986cb",fontWeight:"600"},children:E("rpm_Notes")}),(0,qt.jsx)(wh,{onClick:L(!1),children:(0,qt.jsx)(J_.A,{})})]}),(0,qt.jsx)(op,{sx:{padding:"10px"},children:(0,qt.jsxs)(op,{display:"flex",flexWrap:"wrap",gap:1,mb:3,justifyContent:"end",children:[k.existingNoteTypes.map(e=>{if("PRESCRIPTION"!==e)return(0,qt.jsx)(qt.Fragment,{children:(0,qt.jsx)(xh,{fullWidth:!0,variant:"ADMIN"===e?"contained":"outlined",size:"small",disableElevation:!0,onClick:()=>P("".concat(ld.DOCTOR.PROGRAM,"/").concat(O,"/patients/").concat(R,"/notes/").concat(e.toLowerCase(),"-note")),children:E("rpm_".concat(xs(e.toLowerCase()),"Notes"))})})}),!cs(k.nonExistingNoteTypes)&&(0,qt.jsx)(op,{sx:{display:"flex",alignItems:"center","& .MuiSelect-select":{p:.7},width:"100%"},className:"remove_selectborder",children:(0,qt.jsx)(d_,{sx:{display:"flex",alignItems:"center",width:"100%"},children:(0,qt.jsxs)(G_,{sx:k.nonExistingNoteTypes.includes("ADMIN")?{color:"primary.theme.500",fontWeight:"500",borderColor:"primary.theme.500",borderRadius:"4px",pl:"5px",fontSize:"13px","& svg":{color:"#fff"}}:{maxWidth:180,color:"primary.theme.500",borderColor:"primary.theme.500",borderRadius:"4px",pl:"5px",fontSize:"14px"},fullWidth:!0,variant:"outlined",size:"small",value:k.nonExistingNoteTypes.includes("ADMIN")?"ADMIN":"additionalNotes",children:[(0,qt.jsx)(mf,{value:"additionalNotes",disabled:!0,sx:{display:"none"},children:E("rpm_AdditionalNotes")}),k.nonExistingNoteTypes.map(e=>{if("PRESCRIPTION"!==e)return(0,qt.jsx)(mf,{value:e,onClick:()=>P("".concat(ld.DOCTOR.PROGRAM,"/").concat(O,"/patients/").concat(R,"/notes/").concat(e.toLowerCase(),"-note")),children:E("rpm_".concat(xs(e.toLowerCase()),"Notes"))},e)})]})})}),(0,qt.jsx)(xh,{fullWidth:!0,variant:"outlined",size:"small",disableElevation:!0,onClick:()=>P("".concat(ld.DOCTOR.PROGRAM,"/").concat(O,"/patients/").concat(R,"/notes/resolve-alerts")),endIcon:(0,qt.jsx)(FCe.A,{sx:{color:"#3f51b5"}}),sx:{justifyContent:"space-between"},children:E("rpm_NoteResolvedAlerts")})]})})]})})]}),(0,qt.jsxs)(op,{display:"flex",alignItems:"center",justifyContent:"space-between",mb:1,children:[(0,qt.jsx)(op,{children:(0,qt.jsx)(LCe,{fetchListFunction:y,filterState:j,setFilterState:_,pageDetails:b,showFilterColor:s,setShowFilterColor:l,filterVariant:"text",filterName:"Filters",mobileFilterBG:!0})}),(0,qt.jsx)(op,{children:!cs(p)&&(0,qt.jsx)(qt.Fragment,{children:(null===A||void 0===A||null===(t=A.permissions)||void 0===t?void 0:t.showCreateNoteList)&&(0,qt.jsx)(xh,{variant:"contained",disableElevation:!0,startIcon:(0,qt.jsx)(Jxe.A,{}),onClick:W,color:"primary",sx:{fontWeight:"600",fontSize:"12px"},className:T.addnewBtn,children:E("rpm_AddNew")})})})]}),(0,qt.jsxs)(op,{children:[cs(p)&&!g&&(0,qt.jsx)(op,{bgcolor:"white",className:"noDataAddedField",children:(0,qt.jsx)(OCe,{handleToggleAddNote:W,showFilterColor:s})}),g&&(0,qt.jsx)(Kz,{initialValues:o,enableReinitialize:!0,validationSchema:RU.noteSchema,onSubmit:a,children:e=>{var t,n,r;let{values:i,setFieldValue:o}=e;return(0,qt.jsx)(nH,{children:(0,qt.jsxs)(op,{bgcolor:"white",sx:{padding:"16px",borderRadius:"8px",marginBottom:"8px",borderTop:"5px solid #3f51b5",borderBottom:"1px solid #3f51b5",borderLeft:"1px solid #3f51b5",borderRight:"1px solid #3f51b5"},children:[(0,qt.jsxs)(op,{className:"vitalEdits",children:[(0,qt.jsx)(Cf,{variant:"span",id:"vital",sx:{marginBottom:"5px"},children:E("rpm_VitalType")}),(0,qt.jsx)(d_,{sx:{display:"flex",alignItems:"center",marginTop:"5px"},children:(0,qt.jsx)(G_,{fullWidth:!0,variant:"outlined",size:"small",name:"vital",id:"vital",onChange:e=>{o("vital",e.target.value)},labelId:"vital",label:E("rpm_VitalType"),endAdornment:(0,qt.jsx)(tw,{position:"end",sx:{position:"absolute",right:"28px"},children:(0,qt.jsx)(sy,{title:E("message:rpm_VitalTypeNoteHelp"),placement:"top",children:(0,qt.jsx)(wh,{size:"small",disableRipple:!0,sx:{p:0},children:(0,qt.jsx)(pM.A,{fontSize:"small"})})})}),children:Nd.map(e=>(0,qt.jsx)(mf,{value:e.value,children:E("rpm_".concat(e.name))},e.value))})}),(0,qt.jsx)(dH,{name:"vital",children:e=>(0,qt.jsx)(v_,{error:!0,children:E(e,{field:E("rpm_VitalType")})})})," "]}),(0,qt.jsxs)(op,{mt:2,className:"text-editor quilldesign",width:"100%",children:[(0,qt.jsx)(ECe(),{theme:"snow",modules:B,formats:F,value:null===i||void 0===i?void 0:i.description,onChange:e=>{o("description",e)},ref:$}),(0,qt.jsx)(dH,{name:"description",children:e=>(0,qt.jsx)(v_,{error:!0,children:E(e,{field:E("rpm_Note")})})})]}),(0,qt.jsx)(op,{mt:2,children:(0,qt.jsx)(op,{mt:2,mb:2,width:"100%",sx:{margin:"auto",textAlign:"center"},children:(0,qt.jsxs)(qt.Fragment,{children:[(0,qt.jsx)(H,{}),cs(null===d||void 0===d||null===(t=d.data)||void 0===t||null===(n=t.local_files)||void 0===n||null===(r=n.local)||void 0===r?void 0:r.files)?c("upload",{}):u("upload",{})]})})}),(0,qt.jsxs)(op,{mt:2,display:"flex",children:[(0,qt.jsx)(xh,{disableElevation:!0,variant:"outlined",color:"primary",onClick:W,sx:{marginRight:"10px"},fullWidth:!0,children:E("rpm_Cancel")})," ",(0,qt.jsx)(xh,{disableElevation:!0,variant:"contained",type:"submit",fullWidth:!0,children:E("rpm_Save")})]})]})})}}),p.map(e=>{var t,i;return(0,qt.jsx)(qt.Fragment,{children:h!==e.id?(0,qt.jsxs)(qt.Fragment,{children:[(0,qt.jsx)(op,{sx:{bgcolor:"white",borderRadius:"8px"},children:(0,qt.jsxs)(op,{sx:{background:"#eaeaff",color:"#7986cb",fontWeight:"600",padding:"8px 16px",borderRadius:"8px 8px 0 0",display:"flex",alignItems:"center",justifyContent:"space-between"},children:[(0,qt.jsx)(Cf,{variant:"body2",fontWeight:600,children:E("rpm_".concat(e.vital))}),(0,qt.jsxs)(op,{className:T.actionButtons,children:[(null===A||void 0===A||null===(t=A.permissions)||void 0===t?void 0:t.showEditNote)&&n(e),!1,(null===A||void 0===A||null===(i=A.permissions)||void 0===i?void 0:i.showDeleteList)&&r({id:e.id})]})]})}),(0,qt.jsxs)(op,{sx:{bgcolor:"white",borderRadius:"0 0 8px 8px ",p:"8px 16px",mb:"10px"},children:[(0,qt.jsx)(op,{component:"span",fontWeight:600,sx:{verticalAlign:"middle"},className:T.titles,children:"Description:"}),(0,qt.jsx)(Cf,{variant:"body2",dangerouslySetInnerHTML:{__html:e.note},color:"inherit",sx:{wordBreak:"break-all",marginTop:"0"},className:"savemode"}),(0,qt.jsxs)(op,{component:"span",fontWeight:600,sx:{verticalAlign:"middle"},className:T.titles,children:[E("rpm_Attachment"),":"]}),(0,qt.jsx)(Cf,{variant:"body2",mb:.6,children:(0,qt.jsx)(op,{component:"span",sx:{color:"black",fontWeight:"600",pl:"0 !important"},className:"fileObjectName",children:(0,qt.jsx)(U,{noteObj:e})})}),(0,qt.jsx)(op,{component:"span",fontWeight:600,sx:{verticalAlign:"middle"},className:T.titles,children:"Created by:"}),(0,qt.jsx)(Cf,{variant:"body2",mb:.6,children:(0,qt.jsxs)(op,{component:"span",fontWeight:600,sx:{fontSize:"14px"},children:[e.created_by,(0,qt.jsx)("span",{style:{padding:"0 5px",fontWeight:"normal"},children:"on"}),sa()(e.created_at).format("DD MMM YYYY hh:mm A")]})}),(0,qt.jsx)(op,{component:"span",fontWeight:600,sx:{verticalAlign:"middle"},className:T.titles,children:"Last Updated by :"}),(0,qt.jsx)(Cf,{variant:"body2",mb:.6,children:(0,qt.jsxs)(op,{component:"span",fontWeight:600,sx:{fontSize:"14px"},children:[e.updated_by||e.created_by,(0,qt.jsx)("span",{style:{padding:"0 5px",fontWeight:"normal"},children:"on"}),e.updated_at?sa()(e.updated_at).format("DD MMM YYYY hh:mm A"):sa()(e.created_at).format("DD MMM YYYY hh:mm A")]})})]})]}):(0,qt.jsx)(Kz,{initialValues:o,enableReinitialize:!0,onSubmit:x,validationSchema:RU.noteSchema,children:t=>{var n,r,i;let{values:o,setFieldValue:a}=t;return(0,qt.jsx)(nH,{children:(0,qt.jsx)(qt.Fragment,{children:(0,qt.jsxs)(op,{bgcolor:"white",sx:{padding:"16px",borderRadius:"8px",marginBottom:"8px",borderTop:"5px solid #3f51b5",borderBottom:"1px solid #3f51b5",borderLeft:"1px solid #3f51b5",borderRight:"1px solid #3f51b5"},children:[(0,qt.jsxs)(op,{className:"vitalEdits",children:[(0,qt.jsx)(Cf,{variant:"span",id:"vital",sx:{marginBottom:"5px"},children:E("rpm_VitalType")}),(0,qt.jsx)(d_,{sx:{display:"flex",alignItems:"center",marginTop:"5px"},children:(0,qt.jsx)(G_,{fullWidth:!0,variant:"outlined",size:"small",name:"vital",id:"vital",value:o.vital,onChange:e=>{a("vital",e.target.value)},labelId:"vital",label:E("rpm_VitalType"),endAdornment:(0,qt.jsx)(tw,{position:"end",sx:{position:"absolute",right:"28px"},children:(0,qt.jsx)(sy,{title:E("message:rpm_VitalTypeNoteHelp"),placement:"top",children:(0,qt.jsx)(wh,{size:"small",disableRipple:!0,sx:{p:0},children:(0,qt.jsx)(pM.A,{fontSize:"small"})})})}),children:Nd.map(e=>(0,qt.jsx)(mf,{value:e.value,children:E("rpm_".concat(e.name))},e.value))})}),(0,qt.jsx)(dH,{name:"vital",children:e=>(0,qt.jsx)(v_,{error:!0,children:E(e,{field:E("rpm_VitalType")})})})]}),(0,qt.jsxs)(op,{mt:2,className:"text-editor quilldesign",width:"100%",children:[(0,qt.jsx)(ECe(),{theme:"snow",modules:B,formats:F,value:o.description,onChange:e=>a("description",e),ref:$}),(0,qt.jsx)(dH,{name:"description",children:e=>(0,qt.jsx)(v_,{error:!0,children:E(e,{field:E("rpm_Note")})})})]}),(0,qt.jsx)(op,{mt:2,children:(0,qt.jsx)(op,{mt:2,mb:2,width:"100%",sx:{margin:"auto",textAlign:"center"},children:(0,qt.jsxs)(qt.Fragment,{children:[(0,qt.jsx)(H,{}),cs(null===d||void 0===d||null===(n=d.data)||void 0===n||null===(r=n.local_files)||void 0===r||null===(i=r.local)||void 0===i?void 0:i.files)?c("upload",e):u("upload",e)]})})}),(0,qt.jsxs)(op,{mt:2,display:"flex",children:[(0,qt.jsx)(xh,{disableElevation:!0,variant:"outlined",color:"primary",onClick:v,sx:{marginRight:"10px"},fullWidth:!0,children:E("rpm_Cancel")})," ",(0,qt.jsx)(xh,{disableElevation:!0,variant:"contained",type:"submit",fullWidth:!0,children:E("rpm_Save")})]})]})})})}})})})]})]})}$Ce.defaultProps={alertsHead:[],order:"",orderBy:"",dataParameter:"",checkState:[],isSelection:!1,nodata:"",alertsList:[],otherResolvedAlertList:[],resolvedAlertList:[],initialFormValues:{},addNewNote:()=>{},MobilefileUploadButton:()=>{},fileModal:{},fileUploadIconButton:()=>{},notesList:[],editableNoteId:"",downloadFile:()=>{},setToggleAddNote:()=>{},toggleAddNote:!1,closeEditMode:()=>{},editNote:()=>{},fetchNoteList:()=>{},pageDetails:{},filterState:{},setFilterState:()=>{},onLocalFileDelete:()=>{},onCloudFilesDelete:()=>{},program:{},patientData:{},noteTypesDropdown:{},showFilterColor:{},setShowFilterColor:()=>{}};const BCe=$Ce;var zCe=n(44314);const HCe=["content"];const WCe=function(e){var t;let{patientData:n,program:r}=e;const o=window.innerWidth,a=Nt(),s=wt(cu),{t:l}=Vg(),[c,d]=(0,We.useState)("desc"),[u,p]=(0,We.useState)("updated_at"),[h,m]=We.useState(!1),[f,g]=(0,We.useState)([]),[v,x]=(0,We.useState)((0,i.A)({},dd)),[y,b]=We.useState({open:!1,data:{}}),[j,_]=We.useState({existingNoteTypes:[],nonExistingNoteTypes:[]}),C=e=>{b((0,i.A)((0,i.A)({},y),{},{open:!y.open,data:e}))},w=e=>{if(Array.isArray(e))return g(e.map(e=>e.toString()));const t=e.target.name;f.includes(t)?g(f.filter(e=>e!==t)):g(e=>[...e,t])},S=e=>(0,qt.jsx)(sy,{title:l("rpm_view"),children:(0,qt.jsx)(wh,{"data-id":e.id,color:"primary",onClick:()=>{},children:(0,qt.jsx)(gc,{fontSize:"small",sx:{width:16,height:16}})})}),A={local:{files:[]},onCloud:{files:[]}},{programId:k,patientId:T}=lo(),[E,M]=We.useState({open:!1,data:{}}),[O,R]=(0,We.useState)((0,i.A)({},A)),[P,D]=We.useState([]),[N,L]=We.useState(""),[I,F]=(0,We.useState)(!1),[$,B]=(0,We.useState)({description:"",vital:""}),[z,H]=We.useState({vital:"",start_date:null,end_date:null}),W=async function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:z;try{const t={sort_by:u,sort_order:c},{data:n}=await a(Il(k,T,{type:"ADMIN"},(0,i.A)((0,i.A)({},v),t),e)),r=n||{},{content:o}=r,s=Ko(r,HCe);D(o),x(e=>(0,i.A)((0,i.A)({},e),{},{last_page:s.last_page,current_page:s.current_page,from:s.from,per_page:s.per_page,to:s.to,total:s.total}))}catch(t){console.log(t)}},U=function(e){const t=e.target.files;let n=(0,i.A)({},O.local);t&&Array.from(t).forEach(e=>{var t;return cs(null===n||void 0===n||null===(t=n.files)||void 0===t?void 0:t.find(t=>t.name===e.name))?(null===e||void 0===e?void 0:e.size)>=5242880?a(Zo({subTitle:"error:rpm_ImageSize",severity:ud.ERROR})):(e.url=URL.createObjectURL(e),void n.files.push(e)):a(Zo({subTitle:"error:rpm_SameFileName",severity:ud.ERROR}))}),R(e=>(0,i.A)((0,i.A)({},e),{},{local:n})),M(e=>({open:!e.open,data:(0,i.A)((0,i.A)({},e.data),{},{local_files:(0,i.A)((0,i.A)({},O),{},{local:n})})})),e.target.value=""},V=function(e){let t=(0,i.A)({},O);t.local.files.splice(e,1),R(t)},G=async(e,t)=>{try{await a(Wl(k,T,{noteId:e.id,fileId:t,type:"ADMIN"})),W(),function(e,t){var n;const r=null===e||void 0===e||null===(n=e.files)||void 0===n?void 0:n.filter(e=>(null===e||void 0===e?void 0:e.id)!==t);M((0,i.A)((0,i.A)({},E),{},{data:(0,i.A)((0,i.A)({},e),{},{files:r})}))}(e,t),a(Zo({subTitle:"message:rpm_FileDeletedSuccessfully",severity:ud.SUCCESS}))}catch(n){const e=us(n,"response.data.code","");cs(e)?a(Zo({subTitle:"error:rpm_FileDeleteFailed",severity:ud.ERROR})):a(Zo({subTitle:Vd(e,"error:rpm_FileDeleteFailed"),severity:ud.ERROR}))}},q=()=>{let e=(0,i.A)({},O);e.local.files.splice(0,e.local.files.length),R(e),M({data:{},open:!1})},Y=async(e,t)=>{var n,r;let{setErrors:i}=t;const o={vital:null===e||void 0===e?void 0:e.vital,note:null===e||void 0===e?void 0:e.description,type:"ADMIN",upload:cs(null===E||void 0===E||null===(n=E.data)||void 0===n?void 0:n.local_files)?[]:null===E||void 0===E||null===(r=E.data)||void 0===r?void 0:r.local_files};try{if(await a(Fl(k,T,o)),v.current_page=1,W({vital:"",start_date:null,end_date:null}),F(!1),B({description:"",vital:""}),j.nonExistingNoteTypes.includes("ADMIN")){const{data:e}=await a(Ul(k,T));_({existingNoteTypes:e,nonExistingNoteTypes:_s(Jd,e)})}W(),q(),a(Zo({subTitle:"message:rpm_NoteCreatedSuccessfully",severity:ud.SUCCESS}))}catch(s){const e=us(s,"response.data.code","");cs(e)?a(Zo({subTitle:"error:rpm_NoteCreatedFailed",severity:ud.ERROR})):a(Zo({subTitle:Vd(e,"error:rpm_NoteCreatedFailed"),severity:ud.ERROR}))}},Z=async(e,t)=>{var n,r;let{setErrors:i}=t;const o={id:N,vital:null===e||void 0===e?void 0:e.vital,note:null===e||void 0===e?void 0:e.description,type:"ADMIN",upload:cs(null===E||void 0===E||null===(n=E.data)||void 0===n?void 0:n.local_files)?[]:null===E||void 0===E||null===(r=E.data)||void 0===r?void 0:r.local_files};try{await a(Bl(k,T,o)),X(),W(),q(),a(Zo({subTitle:"message:rpm_NoteUpdateSuccessfully",severity:ud.SUCCESS}))}catch(s){const e=us(s,"response.data.code","");cs(e)?a(Zo({subTitle:"error:rpm_NoteUpdateFailed",severity:ud.ERROR})):a(Zo({subTitle:Vd(e,"error:rpm_NoteUpdateFailed"),severity:ud.ERROR}))}},K=async e=>{try{var t;if(await a(zl(k,T,{noteId:null===e||void 0===e||null===(t=e.data)||void 0===t?void 0:t.id,type:"ADMIN"})),W(),b((0,i.A)((0,i.A)({},y),{},{open:!y.open})),1===P.length){const{data:e}=await a(Ul(k,T));_({existingNoteTypes:e,nonExistingNoteTypes:_s(Jd,e)})}a(Zo({subTitle:"message:rpm_NoteDeleteSuccessfully",severity:ud.SUCCESS}))}catch(n){const e=us(n,"response.data.code","");cs(e)?a(Zo({subTitle:"error:rpm_NoteUpdateFailed",severity:ud.ERROR})):a(Zo({subTitle:Vd(e,"error:rpm_NoteDeleteFailed"),severity:ud.ERROR}))}},X=()=>{L(""),B({description:"",vital:""}),M({open:!1,data:{}}),R((0,i.A)({},A))},Q=(e,t)=>(0,qt.jsx)("label",{htmlFor:"file",children:(0,qt.jsx)(sy,{title:l("rpm_UploadMore"),component:"span",children:(0,qt.jsxs)(wh,{"data-id":t.id,color:"primary",sx:{bgcolor:"primary.theme.50"},children:[(0,qt.jsx)("input",{multiple:!0,type:"file",id:"file",style:{display:"none"},autoFocus:!0,onChange:U}),(0,qt.jsx)(jje.A,{fontSize:"small",sx:{width:16,height:16}})]})})}),J=async e=>{let{noteId:t,file:n}=e;try{await a(Hl(k,T,{noteId:t,type:"ADMIN",fileData:n})),a(Zo({subTitle:"message:rpm_DownloadFileSuccessfully",severity:ud.SUCCESS}))}catch(r){const e=us(r,"response.data.code","");cs(e)?a(Zo({subTitle:"error:rpm_DownloadFileFailed",severity:ud.ERROR})):a(Zo({subTitle:Vd(e,"error:rpm_DownloadFileFailed"),severity:ud.ERROR}))}};return We.useEffect(()=>{s&&W(),cs(r)||cs(n)||(async()=>{const{data:e}=await a(Ul(k,T));_({existingNoteTypes:e,nonExistingNoteTypes:_s(Jd,e)})})()},[s,c,u,r,n]),We.useEffect(()=>{a(NC({activeMenuItem:"notes"}))},[]),cs(r)?(0,qt.jsx)(yp,{variant:"outlined",sx:{px:2.5,py:6,display:"flex",height:"320px"},children:(0,qt.jsx)(op,{alignSelf:"center",sx:{mx:"auto"},children:(0,qt.jsx)(MM,{color:"primary"})})}):(0,qt.jsx)(qt.Fragment,{children:null!==r&&void 0!==r&&null!==(t=r.permissions)&&void 0!==t&&t.showNoteList?o>=575?(0,qt.jsxs)(qt.Fragment,{children:[(0,qt.jsx)(PCe,{order:c,orderBy:u,setOrder:d,setOrderBy:p,dataParameter:"id",checkState:f,onCheck:w,isSelection:!1,nodata:SCe,showFilterColor:h,setShowFilterColor:m,notesList:P,fetchNoteList:W,pageDetails:v,editButton:e=>(0,qt.jsx)(sy,{title:l("rpm_Edit"),children:(0,qt.jsx)(wh,{"data-id":e.id,color:"primary",onClick:()=>{L(e.id),F(!1),B({description:e.note,vital:e.vital}),R((0,i.A)({},A)),M((0,i.A)((0,i.A)({},E),{},{data:(0,i.A)({},e)}))},children:(0,qt.jsx)(fc,{fontSize:"small",sx:{width:16,height:16}})})}),viewButton:S,deleteButton:e=>(0,qt.jsx)(wh,{"data-id":e.id,color:"error",onClick:()=>C(e),children:(0,qt.jsx)(xc,{fontSize:"small",sx:{width:16,height:16}})}),addNewNote:Y,editNote:Z,editableNoteId:N,closeEditMode:X,initialFormValues:$,toggleAddNote:I,setToggleAddNote:F,fileModal:E,fileUploadButton:()=>(0,qt.jsx)("label",{htmlFor:"file",children:(0,qt.jsxs)(xh,{variant:"contained",component:"span",size:"large",disableElevation:!0,sx:{display:"inline-flex",backgroundColor:"grey.300",color:"grey.700",border:"1px dashed #616161",textAlign:"left",px:3,"&:hover":{backgroundColor:"grey.300"}},children:[(0,qt.jsx)("input",{multiple:!0,type:"file",id:"file",style:{display:"none"},autoFocus:!0,onChange:U}),(0,qt.jsxs)(op,{sx:{display:"flex",alignItems:"center"},children:[(0,qt.jsx)(Cje.A,{fontSize:"small"}),(0,qt.jsxs)(op,{sx:{flex:1,pl:2},children:[(0,qt.jsx)(Cf,{variant:"body1",sx:{textTransform:"none"},children:l("rpm_UploadReport")}),(0,qt.jsx)(Cf,{variant:"caption",children:".PDF, .PNG, .JPEG"})]})]})]})}),fileUploadIconButton:Q,downloadFile:J,filterState:z,setFilterState:H,onLocalFileDelete:V,onCloudFilesDelete:G,patientData:n,program:r,noteTypesDropdown:j}),(0,qt.jsx)(qV,{openModal:y.open,onCloseModal:C,actionFunction:()=>K(y),dataName:y.data.title,options:{primaryText:l("message:rpm_DeleteTitle"),secondaryText:l("message:rpm_DeleteBodyText"),descText:l("message:rpm_DeleteSubText"),btn:{primaryText:l("rpm_Delete"),secondaryText:l("rpm_Cancel"),primaryColor:"error",secondaryColor:"primary"},btnSwap:!0}})]}):(0,qt.jsxs)(qt.Fragment,{children:[(0,qt.jsx)(BCe,{order:c,orderBy:u,setOrder:d,setOrderBy:p,dataParameter:"id",checkState:f,onCheck:w,isSelection:!1,nodata:SCe,showFilterColor:h,setShowFilterColor:m,notesList:P,fetchNoteList:W,pageDetails:v,MobileeditButton:e=>(0,qt.jsx)(sy,{title:l("rpm_Edit"),children:(0,qt.jsx)(wh,{"data-id":e.id,color:"primary",onClick:()=>{L(e.id),F(!1),B({description:e.note,vital:e.vital}),R((0,i.A)({},A)),M((0,i.A)((0,i.A)({},E),{},{data:(0,i.A)({},e)}))},sx:{padding:"0"},children:(0,qt.jsx)(kCe.A,{fontSize:"small",sx:{width:16,height:16}})})}),viewButton:S,MobiledeleteButton:e=>(0,qt.jsx)(wh,{"data-id":e.id,color:"error",onClick:()=>C(e),children:(0,qt.jsx)(zCe.A,{fontSize:"small",sx:{width:16,height:16}})}),addNewNote:Y,editNote:Z,editableNoteId:N,closeEditMode:X,initialFormValues:$,toggleAddNote:I,setToggleAddNote:F,fileModal:E,MobilefileUploadButton:()=>(0,qt.jsxs)("label",{htmlFor:"file",children:[(0,qt.jsxs)(xh,{variant:"contained",component:"span",size:"large",disableElevation:!0,sx:{display:"inline-flex",backgroundColor:"#eaeaff85",color:"grey.700",border:"1px dashed #9CA3AF",textAlign:"left",px:3,"&:hover":{backgroundColor:"grey.300"}},fullWidth:!0,children:[(0,qt.jsx)("input",{multiple:!0,type:"file",id:"file",style:{display:"none"},autoFocus:!0,onChange:U}),(0,qt.jsxs)(op,{sx:{display:"flex",alignItems:"center"},children:[(0,qt.jsx)(Cje.A,{fontSize:"small"}),(0,qt.jsx)(op,{sx:{flex:1,pl:2},children:(0,qt.jsx)(Cf,{variant:"body1",sx:{textTransform:"none"},fontSize:14,children:l("rpm_UploadReport")})})]})]}),(0,qt.jsx)(op,{textAlign:"center",fontStyle:"italic",children:(0,qt.jsx)(Cf,{variant:"caption",fontSize:8,children:".PDF, .PNG, .JPEG"})})]}),fileUploadIconButton:Q,downloadFile:J,filterState:z,setFilterState:H,onLocalFileDelete:V,onCloudFilesDelete:G,patientData:n,program:r,noteTypesDropdown:j}),(0,qt.jsx)(zje,{openModal:y.open,onCloseModal:C,actionFunction:()=>K(y),dataName:y.data.title,options:{primaryText:l("message:rpm_DeleteTitle"),secondaryText:l("message:rpm_DeleteBodyText"),btn:{primaryText:l("rpm_Delete"),secondaryText:l("rpm_Cancel"),primaryColor:"error",secondaryColor:"primary"},btnSwap:!0}})]}):(0,qt.jsx)(LC,{})})},UCe=(0,Vn.Ay)(gw)(()=>({["&.".concat(pw.head)]:{padding:"8px 16px",fontWeight:"600"}})),VCe=We.forwardRef((e,t)=>{var n,r,o,a,s,l,c,d,u,p,h,m,f,g,v,x,y,b,j,_,C,w,S,A,k,T,E,M,O,R,P,D,N,L,I;const{patientId:F}=lo(),{t:$}=Vg(),B=so(),z=Nt(),H=(null===e||void 0===e||null===(n=e.state)||void 0===n?void 0:n.doctor)||(null===e||void 0===e?void 0:e.doctor);let W=function(e){const{vital:t,medications_list:n,intervals:r,start_date:o,end_date:a,id:s,created_by:l,created_at:c}=e,d=null===n||void 0===n?void 0:n.map(e=>{const t=r.filter(t=>{var n;return null===(n=t.medicines)||void 0===n?void 0:n.includes(e.id)}).map(e=>{let{id:t,repetition_kind:n,start_time:r}=e;return{id:t,repetition_kind:n,start_time:r?Ds(r,pd):"",interval:null}});return{id:e.id,medicine:e.medicine,medicine_form:e.medicine_form,icon_type:e.icon_type,dose:e.dose,unit:e.unit,color:e.color,image:e.image,start_date:e.start_date,end_date:e.end_date,days:e.days,repetition_kind:gd,timing:t,frequency:e.frequency,comments:e.comments}});return(0,i.A)((0,i.A)({},e),{},{vital:t,presId:s,pres_start_date:o,pres_end_date:a,created_by:l,created_at:c,medicationList:d})}(null===e||void 0===e?void 0:e.state);const U=null===W||void 0===W||null===(r=W.advices)||void 0===r?void 0:r.join(", "),V=null===W||void 0===W||null===(o=W.tests)||void 0===o?void 0:o.join(", "),{years:G}=vs(null===(a=e.patientData)||void 0===a?void 0:a.birth_date),q=!!ps(null===W||void 0===W?void 0:W.diagnosis)||(null===W||void 0===W||null===(s=W.diagnosis)||void 0===s?void 0:s.every(e=>cs(null===e||void 0===e?void 0:e.name))),Y=!!ps(null===W||void 0===W?void 0:W.complaints)||(null===W||void 0===W||null===(l=W.complaints)||void 0===l?void 0:l.every(e=>cs(null===e||void 0===e?void 0:e.name))),Z=!!ps(null===W||void 0===W?void 0:W.advices)||(null===W||void 0===W||null===(c=W.advices)||void 0===c?void 0:c.every(e=>cs(e))),K=!!ps(null===W||void 0===W?void 0:W.tests)||(null===W||void 0===W||null===(d=W.tests)||void 0===d?void 0:d.every(e=>cs(e)));const X=[{name:$("rpm_RPM"),url:ld.DOCTOR.PROGRAM},{name:null===e||void 0===e||null===(u=e.program)||void 0===u?void 0:u.display_name,url:"".concat(ld.DOCTOR.PROGRAM,"/").concat(null===e||void 0===e||null===(p=e.program)||void 0===p?void 0:p.code,"/patients")},{name:"".concat((null===e||void 0===e||null===(h=e.patientData)||void 0===h?void 0:h.first_name)||""," ").concat((null===e||void 0===e||null===(m=e.patientData)||void 0===m?void 0:m.last_name)||""),url:"".concat(ld.DOCTOR.PROGRAM,"/").concat(null===e||void 0===e||null===(f=e.program)||void 0===f?void 0:f.code,"/patients/").concat(null===e||void 0===e||null===(g=e.patientData)||void 0===g?void 0:g.id,"/dashboard")},{name:$("rpm_consultation"),url:""}];return We.useEffect(()=>{const t={breadcrumb:X};cs(null===e||void 0===e?void 0:e.program)||cs(null===e||void 0===e?void 0:e.patientData)||z(NC(t))},[null===e||void 0===e?void 0:e.program,null===e||void 0===e?void 0:e.patientData]),(0,qt.jsx)(qt.Fragment,{children:(0,qt.jsxs)(op,{position:"relative",children:[(0,qt.jsx)(op,{sx:{display:{xs:"block",sm:"none"}},position:"absolute",left:"40px",top:"-50px",children:(0,qt.jsx)(Cf,{variant:"h6",component:"h6",children:"View Consultation"})}),(0,qt.jsxs)(op,{height:"100%",children:[(0,qt.jsx)(op,{sx:{wordBreak:"break-all",mx:"auto",flexDirection:"column",height:"100%",display:"flex"},border:1,bgcolor:"white",borderColor:"grey.400",ref:t,height:"100%",children:(0,qt.jsxs)(op,{className:"prescritionPaper",children:[(0,qt.jsx)(op,{bgcolor:"customClr.bp",p:2,children:(0,qt.jsxs)(Ff,{container:!0,spacing:2,children:[(0,qt.jsx)(Ff,{item:!0,sm:12,md:3,xs:12,children:(0,qt.jsxs)(op,{children:[(0,qt.jsxs)(Cf,{component:"h3",fontWeight:"bold",color:"white",children:["Dr. ",null===H||void 0===H?void 0:H.first_name," ",null===H||void 0===H?void 0:H.last_name]}),(0,qt.jsxs)(Cf,{component:"h4",fontWeight:"bold",color:"white",sx:{wordBreak:"break-word"},children:[" ",null===H||void 0===H||null===(v=H.attributes)||void 0===v?void 0:v.qualification]})]})}),(null===H||void 0===H||null===(x=H.attributes)||void 0===x?void 0:x.registration)&&(0,qt.jsx)(Ff,{item:!0,xs:12,sm:12,md:3,children:(0,qt.jsxs)(op,{children:[(0,qt.jsx)(Cf,{variant:"span",fontWeight:"400",color:"white",children:$("rpm_Registration")}),(0,qt.jsx)(Cf,{component:"h3",fontWeight:"bold",color:"white",sx:{wordBreak:"break-word"},children:null!==H&&void 0!==H&&null!==(y=H.attributes)&&void 0!==y&&y.registration?" ".concat(null===H||void 0===H||null===(b=H.attributes)||void 0===b?void 0:b.registration):""})]})}),(0,qt.jsx)(Ff,{item:!0,xs:12,sm:12,md:3,children:(0,qt.jsxs)(op,{children:[(0,qt.jsx)(Cf,{variant:"span",fontWeight:"400",color:"white",children:$("rpm_MobileNumber")}),(0,qt.jsx)(Cf,{component:"h3",fontWeight:"bold",color:"white",sx:{wordBreak:"break-word"},children:null!==H&&void 0!==H&&null!==(j=H.attributes)&&void 0!==j&&j.mobile?"".concat(null===H||void 0===H||null===(_=H.attributes)||void 0===_?void 0:_.mobile):""})]})}),(0,qt.jsx)(Ff,{item:!0,xs:12,sm:12,md:3,children:(0,qt.jsxs)(op,{children:[(0,qt.jsx)(Cf,{variant:"span",fontWeight:"400",color:"white",children:$("rpm_AddressInformation")}),(0,qt.jsxs)(Cf,{component:"h3",fontWeight:"bold",color:"white",sx:{wordBreak:"break-word"},children:[null===e||void 0===e||null===(C=e.program)||void 0===C?void 0:C.address,(null===e||void 0===e||null===(w=e.program)||void 0===w?void 0:w.address)&&","," ",null===e||void 0===e||null===(S=e.program)||void 0===S?void 0:S.city,",",null===e||void 0===e||null===(A=e.program)||void 0===A?void 0:A.state]})]})})]})}),(0,qt.jsxs)(Ff,{container:!0,spacing:1,p:2,children:[(0,qt.jsxs)(Ff,{item:!0,xs:12,md:6,children:[(0,qt.jsx)(op,{display:"flex",children:(0,qt.jsx)(Cf,{component:"h4",fontSize:16,sx:{flex:"1"},fontWeight:"bold",children:(null===e||void 0===e||null===(k=e.patientData)||void 0===k?void 0:k.first_name)+" "+(null===e||void 0===e||null===(T=e.patientData)||void 0===T?void 0:T.last_name)})}),(0,qt.jsx)(op,{display:"flex",children:(0,qt.jsxs)(Cf,{component:"span",fontSize:14,sx:{flex:"1"},children:[$("rpm_AgeYears",{count:G})," ",(null===e||void 0===e||null===(E=e.patientData)||void 0===E||null===(M=E.profile)||void 0===M?void 0:M.gender)&&"/"," ",null===e||void 0===e||null===(O=e.patientData)||void 0===O||null===(R=O.profile)||void 0===R?void 0:R.gender]})})]}),(0,qt.jsx)(Ff,{item:!0,xs:12,md:6,children:(0,qt.jsx)(op,{display:"flex",className:"viewMobileFont",children:(0,qt.jsx)(Cf,{component:"h4",fontSize:16,sx:{flex:"1",textAlign:"end"},fontWeight:"bold",children:"".concat(sa()(null===W||void 0===W?void 0:W.created_at).format("DD MMM YYYY"))})})})]}),(0,qt.jsx)(eg,{sx:{borderColor:"# C6C8CD",borderWidth:"1px",mt:"5px"}}),(0,qt.jsxs)(Ff,{container:!0,spacing:1,p:2,children:[!Y&&(0,qt.jsxs)(Ff,{item:!0,xs:12,md:6,children:[(0,qt.jsx)(op,{display:"flex",children:(0,qt.jsxs)(Cf,{component:"h4",fontSize:16,sx:{flex:"1"},fontWeight:"bold",children:[$("rpm_Symptoms"),":"]})}),(0,qt.jsx)(op,{display:"flex",sx:{wordBreak:"break-word"},children:cs(null===W||void 0===W?void 0:W.complaints)?"N/A":null===W||void 0===W||null===(P=W.complaints)||void 0===P?void 0:P.map(e=>null===e||void 0===e?void 0:e.name).join(", ")})]}),!q&&(0,qt.jsxs)(Ff,{item:!0,xs:12,md:6,children:[(0,qt.jsx)(op,{display:"flex",children:(0,qt.jsxs)(Cf,{component:"h4",fontSize:16,sx:{flex:"1",textAlign:"start"},fontWeight:"bold",children:[$("rpm_diagnosis"),":"]})}),(0,qt.jsx)(op,{display:"flex",alignItems:"center",justifyContent:"start",sx:{wordBreak:"break-word"},children:cs(null===W||void 0===W?void 0:W.diagnosis)?"N/A":null===W||void 0===W||null===(D=W.diagnosis)||void 0===D?void 0:D.map(e=>null===e||void 0===e?void 0:e.name).join(", ")})]})]}),(!Y||!q)&&(0,qt.jsx)(eg,{sx:{borderColor:"# C6C8CD",borderWidth:"1px",mt:"5px"}}),(0,qt.jsx)(op,{p:2,children:(0,qt.jsxs)(Ff,{container:!0,spacing:2,children:[(0,qt.jsx)(Ff,{item:!0,xs:12,children:(0,qt.jsx)(Cf,{variant:"span",fontWeight:"bold",children:"Rx"})}),(0,qt.jsx)(Ff,{item:!0,xs:12,pt:0,children:(0,qt.jsx)(Vw,{children:(0,qt.jsxs)(Bw,{"aria-label":"simple table",children:[(0,qt.jsx)(_S,{sx:{backgroundColor:"#F3F3F9"},children:(0,qt.jsxs)(cw,{children:[(0,qt.jsx)(UCe,{width:"120px",whiteSpace:"initial",children:(0,qt.jsx)(op,{children:$("rpm_MedicineName")})}),(0,qt.jsx)(UCe,{children:$("rpm_Dosage")}),(0,qt.jsx)(UCe,{children:$("rpm_Duration&Time")}),(0,qt.jsx)(UCe,{children:$("rpm_Comments")})]})}),(0,qt.jsx)(fS,{children:null===W||void 0===W||null===(N=W.medicationList)||void 0===N?void 0:N.map(e=>{var t;return(0,qt.jsxs)(cw,{sx:{"td, &:last-child th":{border:0,borderBottom:1,borderColor:"grey.400"},td:{padding:"8px 16px"}},children:[(0,qt.jsx)(gw,{sx:{whiteSpace:"normal",wordBreak:"break-word",width:"25%"},children:(0,qt.jsxs)(op,{whiteSpace:"initial",children:[e.medicine," ",cs(null===e||void 0===e?void 0:e.dose)||cs(null===e||void 0===e?void 0:e.unit)?"":"- "+e.dose+" "+e.unit]})}),(0,qt.jsx)(gw,{sx:{whiteSpace:"normal",wordBreak:"break-word",width:"20%"},children:(0,qt.jsx)(op,{whiteSpace:"initial",children:null===(t=Ld.find(t=>(null===e||void 0===e?void 0:e.frequency)===(null===t||void 0===t?void 0:t.key)))||void 0===t?void 0:t.text})}),(0,qt.jsx)(gw,{sx:{whiteSpace:"normal",wordBreak:"break-word",width:"25%"},children:(0,qt.jsxs)(op,{whiteSpace:"initial",children:[(0,qt.jsxs)("div",{children:[null===e||void 0===e?void 0:e.days," days"," ","(".concat(sa()(null===e||void 0===e?void 0:e.start_date).format("DD MMM")," - ").concat(sa()(null===e||void 0===e?void 0:e.end_date).format("DD MMM"),")")," "]}),e.timing.map((t,n)=>(0,qt.jsx)(We.Fragment,{children:(0,qt.jsxs)("span",{children:[t.start_time&&"Intervals"===(null===t||void 0===t?void 0:t.repetition_kind)?"From":""," ",t.start_time," ",t.start_time&&"Intervals"===(null===t||void 0===t?void 0:t.repetition_kind)?"onwards":"",n<e.timing.length-1&&", "]})},n))]})}),(0,qt.jsx)(gw,{sx:{whiteSpace:"normal",wordBreak:"break-word",width:"30%"},children:(0,qt.jsx)(op,{whiteSpace:"initial",children:e.comments||"NA"})})]},e.medicine)})})]})})})]})}),!Z&&(0,qt.jsxs)(qt.Fragment,{children:[(0,qt.jsxs)(op,{p:2,children:[(0,qt.jsx)(Cf,{variant:"span",fontWeight:"600",children:$("rpm_GeneralAdvice")}),cs(null===W||void 0===W?void 0:W.advices)?(0,qt.jsx)(Cf,{variant:"body1",fontSize:14,children:"N/A"}):(0,qt.jsx)(Cf,{variant:"body1",fontSize:14,children:U})]}),(0,qt.jsx)(eg,{sx:{borderColor:"# C6C8CD",borderWidth:"1px",mt:"5px"}})]}),!K&&(0,qt.jsxs)(op,{p:2,className:"testRequired",children:[(0,qt.jsx)(Cf,{variant:"span",fontWeight:"600",children:$("rpm_TestRequired")}),cs(null===W||void 0===W?void 0:W.tests)?(0,qt.jsx)(Cf,{variant:"body1",fontSize:14,children:"N/A"}):(0,qt.jsx)(Cf,{variant:"body1",fontSize:14,children:V})]}),(null===W||void 0===W||null===(L=W.follow_up)||void 0===L?void 0:L.date)&&(0,qt.jsxs)(qt.Fragment,{children:[(0,qt.jsx)(eg,{sx:{borderColor:"# C6C8CD",borderWidth:"1px",mt:"5px"}}),(0,qt.jsxs)(op,{p:2,children:[(0,qt.jsx)(Cf,{variant:"h5",fontWeight:"600",fontSize:16,children:$("rpm_NextFollowUpDate")}),(0,qt.jsx)(Cf,{variant:"span",fontWeight:"500",color:"grey.400",children:sa()(null===W||void 0===W||null===(I=W.follow_up)||void 0===I?void 0:I.date).format("DD/MM/YYYY")})]})]})]})}),(0,qt.jsxs)(op,{display:"flex",alignItems:"center",justifyContent:"start",mb:2,mt:2,children:[(0,qt.jsx)(xh,{variant:"outlined",type:"submit",disableElevation:!0,onClick:()=>B(-1),sx:{borderRadius:"4px",padding:"8px 16px"},children:$("rpm_Cancel")}),(0,qt.jsx)(xh,{variant:"contained",type:"submit",onClick:()=>{var t,n;B("/rpm/program/".concat(null===e||void 0===e||null===(t=e.program)||void 0===t?void 0:t.code,"/patients/").concat(null===e||void 0===e||null===(n=e.patientData)||void 0===n?void 0:n.id,"/consultations/edit-consultation/").concat(null===W||void 0===W?void 0:W.id))},disableElevation:!0,sx:{borderRadius:"4px",padding:"8px 16px",ml:2},children:$("rpm_Edit")}),(0,qt.jsx)(xh,{variant:"contained",type:"submit",onClick:()=>Xd(z,F,e.state.id),disableElevation:!0,sx:{borderRadius:"4px",padding:"8px 16px",ml:2},children:$("rpm_Print")})]})]})]})})});VCe.displayName="ViewConsultation";const GCe=VCe,qCe=zT(()=>({viewConsulation:{"& .MuiTypography-root":{fontSize:"12px",wordBreak:"break-word"}},labelFonts:{fontSize:"12px",color:"white"},MuiBoxPadding:{"& .MuiBox-root":{marginBottom:"5px"}},rxTemplate:{"& .MuiCardContent-root":{padding:"8px"},"& .MuiCardContent-root:last-child":{paddingBottom:"14px"}},textPrimary:{fontSize:"14px !important",color:"#3f51b5"},textSecondaryColor:{color:"#00000099",fontSize:"12px !important",marginLeft:"5px","& .MuiTypography-root":{fontSize:"12px !important"}},PrintIcon:{background:"#3f51b5 !important",padding:"8px !important",minWidth:"10px !important",marginLeft:"auto !important",borderRadius:"35px !important",boxShadow:"0px 0px 9px 0px #00000017 !important"}}));var YCe=n(63709);const ZCe=We.forwardRef((e,t)=>{var n,r,o,a,s,l,c,d,u,p,h,m,f,g,v,x,y,b,j,_,C,w,S,A,k,T,E,M,O,R,P,D,N,L,I;const F=qCe(),{patientId:$}=lo(),{t:B}=Vg(),z=so(),H=Nt(),W=(null===e||void 0===e||null===(n=e.state)||void 0===n?void 0:n.doctor)||(null===e||void 0===e?void 0:e.doctor);let U=function(e){const{vital:t,medications_list:n,intervals:r,start_date:o,end_date:a,id:s,created_by:l,created_at:c}=e,d=null===n||void 0===n?void 0:n.map(e=>{const t=r.filter(t=>{var n;return null===(n=t.medicines)||void 0===n?void 0:n.includes(e.id)}).map(e=>{let{id:t,repetition_kind:n,start_time:r}=e;return{id:t,repetition_kind:n,start_time:r?Ds(r,pd):"",interval:null}});return{id:e.id,medicine:e.medicine,medicine_form:e.medicine_form,icon_type:e.icon_type,dose:e.dose,unit:e.unit,color:e.color,image:e.image,start_date:e.start_date,end_date:e.end_date,days:e.days,repetition_kind:gd,timing:t,frequency:e.frequency,comments:e.comments}});return(0,i.A)((0,i.A)({},e),{},{vital:t,presId:s,pres_start_date:o,pres_end_date:a,created_by:l,created_at:c,medicationList:d})}(null===e||void 0===e?void 0:e.state);const V=null===U||void 0===U||null===(r=U.advices)||void 0===r?void 0:r.join(", "),G=null===U||void 0===U||null===(o=U.tests)||void 0===o?void 0:o.join(", "),{years:q}=vs(null===(a=e.patientData)||void 0===a?void 0:a.birth_date),Y=!!ps(null===U||void 0===U?void 0:U.diagnosis)||(null===U||void 0===U||null===(s=U.diagnosis)||void 0===s?void 0:s.every(e=>cs(null===e||void 0===e?void 0:e.name))),Z=!!ps(null===U||void 0===U?void 0:U.complaints)||(null===U||void 0===U||null===(l=U.complaints)||void 0===l?void 0:l.every(e=>cs(null===e||void 0===e?void 0:e.name))),K=!!ps(null===U||void 0===U?void 0:U.advices)||(null===U||void 0===U||null===(c=U.advices)||void 0===c?void 0:c.every(e=>cs(e))),X=!!ps(null===U||void 0===U?void 0:U.tests)||(null===U||void 0===U||null===(d=U.tests)||void 0===d?void 0:d.every(e=>cs(e)));const Q=[{name:B("rpm_RPM"),url:ld.DOCTOR.PROGRAM},{name:null===e||void 0===e||null===(u=e.program)||void 0===u?void 0:u.display_name,url:"".concat(ld.DOCTOR.PROGRAM,"/").concat(null===e||void 0===e||null===(p=e.program)||void 0===p?void 0:p.code,"/patients")},{name:"".concat((null===e||void 0===e||null===(h=e.patientData)||void 0===h?void 0:h.first_name)||""," ").concat((null===e||void 0===e||null===(m=e.patientData)||void 0===m?void 0:m.last_name)||""),url:"".concat(ld.DOCTOR.PROGRAM,"/").concat(null===e||void 0===e||null===(f=e.program)||void 0===f?void 0:f.code,"/patients/").concat(null===e||void 0===e||null===(g=e.patientData)||void 0===g?void 0:g.id,"/dashboard")},{name:B("rpm_consultation"),url:""}];return We.useEffect(()=>{const t={breadcrumb:Q};cs(null===e||void 0===e?void 0:e.program)||cs(null===e||void 0===e?void 0:e.patientData)||H(NC(t))},[null===e||void 0===e?void 0:e.program,null===e||void 0===e?void 0:e.patientData]),(0,qt.jsx)(qt.Fragment,{children:(0,qt.jsxs)(op,{position:"relative",children:[(0,qt.jsx)(op,{sx:{display:{xs:"block",sm:"none"}},position:"absolute",left:"38px",top:"-44px",children:(0,qt.jsx)(Cf,{variant:"h6",component:"h6",fontSize:16,children:"View Consultation"})}),(0,qt.jsxs)(op,{height:"100%",className:F.viewConsulation,children:[(0,qt.jsx)(op,{sx:{wordBreak:"break-all",mx:"auto",flexDirection:"column",height:"100%",display:"flex"},border:1,bgcolor:"white",borderColor:"grey.400",ref:t,height:"100%",children:(0,qt.jsxs)(op,{className:"prescritionPaper",children:[(0,qt.jsxs)(op,{bgcolor:"customClr.bp",p:2,className:F.MuiBoxPadding,children:[(0,qt.jsxs)(op,{children:[(0,qt.jsxs)(Cf,{component:"h1",fontWeight:"bold",color:"white",children:["Dr. ",null===W||void 0===W?void 0:W.first_name," ",null===W||void 0===W?void 0:W.last_name]}),(0,qt.jsx)("label",{className:F.labelFonts,children:null===W||void 0===W||null===(v=W.attributes)||void 0===v?void 0:v.qualification})]}),(0,qt.jsx)(op,{children:(null===W||void 0===W||null===(x=W.attributes)||void 0===x?void 0:x.registration)&&(0,qt.jsxs)(op,{children:[(0,qt.jsx)(Cf,{variant:"span",fontWeight:"400",color:"white",children:B("rpm_Registration")}),(0,qt.jsx)(Cf,{component:"h3",fontWeight:"bold",color:"white",sx:{wordBreak:"break-word"},children:null!==W&&void 0!==W&&null!==(y=W.attributes)&&void 0!==y&&y.registration?" ".concat(null===W||void 0===W||null===(b=W.attributes)||void 0===b?void 0:b.registration):""})]})}),(0,qt.jsxs)(op,{children:[(0,qt.jsx)(Cf,{variant:"span",fontWeight:"400",color:"white",children:B("rpm_MobileNumber")}),(0,qt.jsx)(Cf,{component:"h3",fontWeight:"bold",color:"white",sx:{wordBreak:"break-word"},children:null!==W&&void 0!==W&&null!==(j=W.attributes)&&void 0!==j&&j.mobile?"".concat(null===W||void 0===W||null===(_=W.attributes)||void 0===_?void 0:_.mobile):""})]}),(0,qt.jsxs)(op,{children:[(0,qt.jsx)(Cf,{variant:"span",fontWeight:"400",color:"white",children:B("rpm_AddressInformation")}),(0,qt.jsxs)(Cf,{component:"h3",fontWeight:"bold",color:"white",sx:{wordBreak:"break-word"},children:[null===e||void 0===e||null===(C=e.program)||void 0===C?void 0:C.address,(null===e||void 0===e||null===(w=e.program)||void 0===w?void 0:w.address)&&","," ",null===e||void 0===e||null===(S=e.program)||void 0===S?void 0:S.city,",",null===e||void 0===e||null===(A=e.program)||void 0===A?void 0:A.state]})]})]}),(0,qt.jsxs)(op,{sx:{padding:"8px 16px"},display:"flex",children:[(0,qt.jsxs)(op,{display:"flex",flexDirection:"column",sx:{flex:"1"},children:[(0,qt.jsx)(Cf,{component:"h4",fontWeight:"bold",sx:{wordBreak:"break-word"},children:(null===e||void 0===e||null===(k=e.patientData)||void 0===k?void 0:k.first_name)+" "+(null===e||void 0===e||null===(T=e.patientData)||void 0===T?void 0:T.last_name)}),(0,qt.jsxs)(Cf,{component:"span",children:[B("rpm_AgeYears",{count:q})," ",(null===e||void 0===e||null===(E=e.patientData)||void 0===E||null===(M=E.profile)||void 0===M?void 0:M.gender)&&"/"," ",null===e||void 0===e||null===(O=e.patientData)||void 0===O||null===(R=O.profile)||void 0===R?void 0:R.gender]})]}),(0,qt.jsx)(Cf,{component:"h4",sx:{textAlign:"end"},fontWeight:"bold",children:"".concat(sa()(null===U||void 0===U?void 0:U.created_at).format("DD MMM YYYY"))})]}),(0,qt.jsx)(eg,{sx:{borderColor:"# C6C8CD",borderWidth:"1px",mt:"5px"}}),(0,qt.jsxs)(Ff,{container:!0,spacing:1,p:2,children:[!Z&&(0,qt.jsxs)(Ff,{item:!0,xs:6,pr:.5,children:[(0,qt.jsx)(op,{display:"flex",children:(0,qt.jsxs)(Cf,{component:"h4",sx:{flex:"1"},fontWeight:"bold",children:[B("rpm_Symptoms"),":"]})}),(0,qt.jsx)(op,{display:"flex",sx:{wordBreak:"break-word"},children:(0,qt.jsx)(Cf,{component:"span",children:cs(null===U||void 0===U?void 0:U.complaints)?"N/A":null===U||void 0===U||null===(P=U.complaints)||void 0===P?void 0:P.map(e=>null===e||void 0===e?void 0:e.name).join(", ")})})]}),!Y&&(0,qt.jsxs)(Ff,{item:!0,xs:6,sx:{borderLeft:"1px solid #efefef",paddingLeft:"8px"},children:[(0,qt.jsx)(op,{display:"flex",children:(0,qt.jsxs)(Cf,{component:"h4",sx:{flex:"1",textAlign:"start"},fontWeight:"bold",children:[B("rpm_diagnosis"),":"]})}),(0,qt.jsx)(op,{display:"flex",alignItems:"center",justifyContent:"start",sx:{wordBreak:"break-word"},children:(0,qt.jsx)(Cf,{component:"span",children:cs(null===U||void 0===U?void 0:U.diagnosis)?"N/A":null===U||void 0===U||null===(D=U.diagnosis)||void 0===D?void 0:D.map(e=>null===e||void 0===e?void 0:e.name).join(", ")})})]})]}),(!Z||!Y)&&(0,qt.jsx)(eg,{sx:{borderColor:"# C6C8CD",borderWidth:"1px"}}),(0,qt.jsxs)(op,{sx:{padding:"8px 16px"},className:F.rxTemplate,children:[(0,qt.jsx)(Cf,{variant:"span",fontWeight:"bold",children:"Rx"}),null===U||void 0===U||null===(N=U.medicationList)||void 0===N?void 0:N.map(e=>{var t;return(0,qt.jsx)(yH,{sx:{mt:1,marginBottom:1,display:"flex",flexDirection:"column",borderLeft:"4px solid #3f51b5"},children:(0,qt.jsxs)(wH,{sx:{paddingBottom:"14px"},children:[(0,qt.jsxs)(op,{display:"flex",alignItems:"baseline",flexWrap:"wrap",children:[(0,qt.jsxs)(Cf,{fontWeight:"600",gutterBottom:!1,className:F.textPrimary,children:[e.medicine," ",cs(null===e||void 0===e?void 0:e.dose)||cs(null===e||void 0===e?void 0:e.unit)?"":"- "+e.dose+" "+e.unit]}),(0,qt.jsxs)(op,{display:"flex",alignItems:"center",className:F.textSecondaryColor,children:["(",(0,qt.jsx)(Cf,{variant:"body2",children:null===(t=Ld.find(t=>(null===e||void 0===e?void 0:e.frequency)===(null===t||void 0===t?void 0:t.key)))||void 0===t?void 0:t.text}),")"]})]}),(0,qt.jsxs)(op,{display:"flex",flexDirection:"column",mt:1,children:[(0,qt.jsx)(Cf,{variant:"body2",children:(0,qt.jsxs)("strong",{children:[B("rpm_Duration&Time"),": "]})}),(0,qt.jsxs)(op,{display:"flex",alignItems:"center",flexWrap:"wrap",children:[(0,qt.jsxs)(Cf,{variant:"body2",color:"textSecondary",children:[null===e||void 0===e?void 0:e.days," days"," ","(".concat(sa()(null===e||void 0===e?void 0:e.start_date).format("DD MMM")," - ").concat(sa()(null===e||void 0===e?void 0:e.end_date).format("DD MMM"),")")]}),(0,qt.jsx)(Cf,{sx:{margin:"0 3px"},children:","}),e.timing.map((t,n)=>(0,qt.jsxs)(Cf,{variant:"body2",color:"textSecondary",children:[t.start_time&&"Intervals"===(null===t||void 0===t?void 0:t.repetition_kind)?"From":""," ",t.start_time," ",t.start_time&&"Intervals"===(null===t||void 0===t?void 0:t.repetition_kind)?"onwards":"",n<e.timing.length-1&&", "]},n))]})]}),(0,qt.jsxs)(op,{display:"flex",flexDirection:"column",mt:1,children:[(0,qt.jsx)(Cf,{variant:"body2",children:(0,qt.jsxs)("strong",{children:[B("rpm_Comments"),": "]})}),(0,qt.jsx)(Cf,{variant:"body2",color:"textSecondary",children:e.comments||"NA"})]})]})},e.medicine)})]}),!K&&(0,qt.jsxs)(qt.Fragment,{children:[(0,qt.jsx)(eg,{sx:{borderColor:"# C6C8CD",borderWidth:"1px",mt:"5px",mb:"10px"}}),(0,qt.jsxs)(op,{sx:{padding:"0 8px 8px 16px"},children:[(0,qt.jsx)(Cf,{variant:"span",fontWeight:"700",children:B("rpm_GeneralAdvice")}),cs(null===U||void 0===U?void 0:U.advices)?(0,qt.jsx)(Cf,{variant:"body1",children:"N/A"}):(0,qt.jsx)(Cf,{variant:"body1",sx:{wordBreak:"break-word"},children:V})]})]}),!X&&(0,qt.jsxs)(qt.Fragment,{children:[(0,qt.jsx)(eg,{sx:{borderColor:"# C6C8CD",borderWidth:"1px",mt:"5px"}}),(0,qt.jsxs)(op,{sx:{padding:"8px 16px"},className:"testRequired",children:[(0,qt.jsx)(Cf,{variant:"span",fontWeight:"600",children:B("rpm_TestRequired")}),cs(null===U||void 0===U?void 0:U.tests)?(0,qt.jsx)(Cf,{variant:"body1",children:"N/A"}):(0,qt.jsx)(Cf,{variant:"body1",children:G})]})]}),(null===U||void 0===U||null===(L=U.follow_up)||void 0===L?void 0:L.date)&&(0,qt.jsxs)(qt.Fragment,{children:[(0,qt.jsx)(eg,{sx:{borderColor:"# C6C8CD",borderWidth:"1px",mt:"5px"}}),(0,qt.jsxs)(op,{sx:{padding:"8px 16px"},children:[(0,qt.jsx)(Cf,{variant:"h5",fontWeight:"700",fontSize:16,children:B("rpm_NextFollowUpDate")}),(0,qt.jsx)(Cf,{variant:"span",fontWeight:"500",color:"grey.400",children:sa()(null===U||void 0===U||null===(I=U.follow_up)||void 0===I?void 0:I.date).format("DD/MM/YYYY")})]})]})]})}),(0,qt.jsxs)(op,{display:"flex",alignItems:"center",justifyContent:"start",mb:2,mt:2,children:[(0,qt.jsx)(xh,{variant:"outlined",type:"submit",disableElevation:!0,onClick:()=>z(-1),children:B("rpm_Cancel")}),(0,qt.jsx)(xh,{variant:"contained",type:"submit",onClick:()=>{var t,n;z("/rpm/program/".concat(null===e||void 0===e||null===(t=e.program)||void 0===t?void 0:t.code,"/patients/").concat(null===e||void 0===e||null===(n=e.patientData)||void 0===n?void 0:n.id,"/consultations/edit-consultation/").concat(null===U||void 0===U?void 0:U.id))},disableElevation:!0,sx:{marginLeft:"10px"},children:B("rpm_Edit")}),(0,qt.jsx)(xh,{className:F.PrintIcon,variant:"contained",type:"submit",onClick:()=>Xd(H,$,e.state.id),disableElevation:!0,children:(0,qt.jsx)(YCe.A,{})})]})]})]})})});ZCe.displayName="ViewConsultation";const KCe=ZCe,XCe=e=>{let{patientData:t,program:n}=e;const r=window.innerWidth,o=Nt(),a=wt(cu),{programId:s,patientId:l,consultId:c}=lo(),[d,u]=We.useState([]),p=async(e,t,n)=>{try{const{data:r}=await o(ql(e,t,n)),a=await function(e){var t,n,r,o,a;const{vital:s,medications_list:l,intervals:c,start_date:d,end_date:u,id:p,created_by:h,name:m,days:f}=e,g=null===l||void 0===l?void 0:l.map(e=>{const t=function(e,t){if(e&&t){const n=atob(e),r=new Array(n.length);for(let e=0;e<n.length;e++)r[e]=n.charCodeAt(e);const i=new Uint8Array(r),o=new Blob([i],{type:"image/jpeg"});return new File([o],t,{type:"image/jpeg"})}return null}(e.image,"".concat(e.medicine,".jpg")),n=[],r=c.some(t=>{var n;return(null===(n=t.medicines)||void 0===n?void 0:n.includes(e.id))&&null===t.start_time});if(e.frequency>=1&&e.frequency<=4&&r)for(let i=0;i<e.frequency;i++)n.push({start_time:null,interval:null});else c.filter(t=>{var n;return null===(n=t.medicines)||void 0===n?void 0:n.includes(e.id)}).forEach(e=>{let{id:t,start_time:r,stop_after:i}=e;n.push({id:t,start_time:r?Ds(r,hd):null,interval:i})});return{id:e.id,medicine:e.medicine,medicine_form:e.medicine_form,icon_type:e.icon_type,dose:e.dose,unit:e.unit,color:e.color,image:t,start_date:sa()(new Date).valueOf(),days:m?f:null,end_date:m?os(sa()(new Date).valueOf(),f):null,repetition_kind:e.frequency>4?vd:gd,timing:n,frequency:e.frequency,comments:e.comments}});return(0,i.A)((0,i.A)({},e),{},{followUpDays:null===e||void 0===e||null===(t=e.follow_up)||void 0===t?void 0:t.days,followUpDate:null===e||void 0===e||null===(n=e.follow_up)||void 0===n?void 0:n.date,followUpReminder:null===e||void 0===e||null===(r=e.follow_up)||void 0===r?void 0:r.send_reminder_flag,followUpReminderDate:null===e||void 0===e||null===(o=e.follow_up)||void 0===o?void 0:o.follow_up_reminder_date,followUpTime:Ds(null===e||void 0===e||null===(a=e.follow_up)||void 0===a?void 0:a.reminder_time,hd),complaintDetails:null===e||void 0===e?void 0:e.complaints,vital:s,presId:p,pres_start_date:d,pres_end_date:u,created_by:h,medicationList:g})}(r),s=null!==a&&void 0!==a&&a.dummy?Wd:await(async e=>{try{const{data:t}=await o(Xg(e));return t}catch(t){console.log(t)}})(null===a||void 0===a?void 0:a.doctor_id);u((0,i.A)((0,i.A)({},a),{},{doctor:s}))}catch(r){console.log(r)}};return We.useEffect(()=>{if(!cs(t)&&!cs(n)){o(NC({activeMenuItem:"consultations"}))}},[t,n]),We.useEffect(()=>{!a||cs(t)||cs(n)||p(s,l,c)},[a,t,n]),(0,qt.jsx)("div",{children:r>=575?(0,qt.jsx)(GCe,{patientData:t,program:n,state:d}):(0,qt.jsx)(KCe,{patientData:t,program:n,state:d})})};function QCe(e){var t;let{editButton:n,deleteButton:r,viewButton:i,notesList:o,addNewNote:a,showFilterColor:s,setShowFilterColor:l,editNote:c,editableNoteId:d,closeEditMode:u,initialFormValues:p,toggleAddNote:h,setToggleAddNote:m,fileModal:f,fileUploadButton:g,fileUploadIconButton:v,downloadFile:x,fetchNoteList:y,pageDetails:b,filterState:j,setFilterState:_,onLocalFileDelete:C,onCloudFilesDelete:w,patientData:S,program:A,noteTypesDropdown:k}=e;const T=window.innerWidth,{t:E}=Vg(),M=Nt(),O=so(),{programId:R,patientId:P}=lo(),D=wt(bu),[N,L]=We.useState(""),I=!("true"===us(D,"user_principal.attributes.skip_tour[0]","")),F=We.useMemo(()=>({toolbar:{container:[["bold","italic","underline","strike"],[{size:[]},{color:[]}],[{list:"ordered"},{list:"bullet"},{indent:"-1"},{indent:"+1"},{align:[]}],["link","image","video"],["clean"]],history:{delay:500,maxStack:100,userOnly:!0}},clipboard:{matchVisual:!1}}),[]),$=We.useRef(null),B=[{name:E("rpm_RPM"),url:ld.DOCTOR.PROGRAM},{name:null===A||void 0===A?void 0:A.display_name,url:"".concat(ld.DOCTOR.PROGRAM,"/").concat(null===A||void 0===A?void 0:A.code,"/patients")},{name:"".concat((null===S||void 0===S?void 0:S.first_name)||""," ").concat((null===S||void 0===S?void 0:S.last_name)||""),url:"".concat(ld.DOCTOR.PROGRAM,"/").concat(null===A||void 0===A?void 0:A.code,"/patients/").concat(null===S||void 0===S?void 0:S.id,"/dashboard")},{name:E("rpm_DoctorNotes"),url:""}],z=["header","bold","italic","underline","strike","blockquote","size","color","list","bullet","indent","link"],H=()=>{m(!h),d&&u()},W=e=>{var t,n,r;let{noteObj:i}=e;const[o,a]=We.useState(2),s=e=>{const t=null===e||void 0===e?void 0:e.split("/");return t[(null===t||void 0===t?void 0:t.length)-1]};return(0,qt.jsxs)(qt.Fragment,{children:[null===i||void 0===i||null===(t=i.files)||void 0===t||null===(n=t.slice(0,o))||void 0===n?void 0:n.map(e=>(0,qt.jsx)(Eb,{sx:{color:"primary.theme.500",borderRadius:"0",textDecoration:"underline",height:"inherit"},"data-id":e.id,label:s(e.file_name),variant:"string",className:"attachment_btn",onClick:()=>{x({noteId:i.id,file:e})}},e.id)),(null===i||void 0===i||null===(r=i.files)||void 0===r?void 0:r.length)>=3&&(0,qt.jsx)(sy,{title:E("rpm_ShowMore"),children:(0,qt.jsx)(wh,{disableRipple:!0,size:"small",onClick:()=>{var e,t;o===(null===i||void 0===i||null===(e=i.files)||void 0===e?void 0:e.length)?a(2):a(null===i||void 0===i||null===(t=i.files)||void 0===t?void 0:t.length)},children:"..."})})]})},U=e=>{const t=null===e||void 0===e?void 0:e.split("/");return t[(null===t||void 0===t?void 0:t.length)-1]},V=()=>{var e,t,n,r,i,o,a,s,l,c;return(0,qt.jsxs)(qt.Fragment,{children:[!cs(null===f||void 0===f||null===(e=f.data)||void 0===e||null===(t=e.local_files)||void 0===t||null===(n=t.local)||void 0===n?void 0:n.files)&&(null===f||void 0===f||null===(r=f.data)||void 0===r||null===(i=r.local_files)||void 0===i||null===(o=i.local)||void 0===o||null===(a=o.files)||void 0===a?void 0:a.map((e,t)=>(0,qt.jsx)(Eb,{sx:{p:1,mb:1},onDelete:()=>C(t),icon:(0,qt.jsx)(Aje.A,{fontSize:"small"}),label:null===e||void 0===e?void 0:e.name,variant:"string",className:"UplodeChip"},t))),!cs(null===f||void 0===f||null===(s=f.data)||void 0===s?void 0:s.files)&&(null===f||void 0===f||null===(l=f.data)||void 0===l||null===(c=l.files)||void 0===c?void 0:c.map((e,t)=>(0,qt.jsx)(Eb,{sx:{p:1,mb:1},onDelete:()=>w(null===f||void 0===f?void 0:f.data,null===e||void 0===e?void 0:e.id,t),icon:(0,qt.jsx)(Sje.A,{}),onClick:()=>{x({noteId:d,file:e})},label:U(null===e||void 0===e?void 0:e.file_name),variant:"string",className:"UplodeChip"},t)))]})};return We.useEffect(()=>{const e={breadcrumb:B};cs(A)||cs(S)||M(NC(e))},[A,S]),(0,qt.jsxs)(op,{sx:{width:"100%"},children:[(0,qt.jsxs)(Ff,{container:!0,children:[(0,qt.jsx)(Ff,{item:!0,xs:12,md:6,children:(0,qt.jsxs)(op,{sx:{mb:1},position:"relative",children:[(0,qt.jsx)(op,{sx:{display:{xs:"none",sm:"block"}},children:(0,qt.jsx)(Cf,{variant:"h5",component:"h5",children:E("rpm_Notes")})}),(0,qt.jsx)(op,{sx:{display:{xs:"block",sm:"none"}},position:"absolute",top:"-48px",left:"40px",children:(0,qt.jsx)(Cf,{variant:"h6",component:"h6",children:E("rpm_Notes")})})]})}),(0,qt.jsx)(Ff,{item:!0,xs:12,md:6,children:(0,qt.jsxs)(op,{display:"flex",flexWrap:"wrap",gap:1,mb:3,justifyContent:"end",children:[(0,qt.jsx)(xh,{className:"notes-tour-step2",variant:"outlined",size:"small",disableElevation:!0,onClick:()=>O("".concat(ld.DOCTOR.PROGRAM,"/").concat(R,"/patients/").concat(P,"/notes/resolve-alerts")),children:E("rpm_NoteResolvedAlerts")}),k.existingNoteTypes.map(e=>{if("PRESCRIPTION"!==e)return(0,qt.jsx)(qt.Fragment,{children:(0,qt.jsx)(xh,{variant:"DOCTOR"===e?"contained":"outlined",size:"small",disableElevation:!0,onClick:()=>O("".concat(ld.DOCTOR.PROGRAM,"/").concat(R,"/patients/").concat(P,"/notes/").concat(e.toLowerCase(),"-note")),children:E("rpm_".concat(xs(e.toLowerCase()),"Notes"))})})}),!cs(k.nonExistingNoteTypes)&&(0,qt.jsx)(op,{sx:{display:"flex",alignItems:"center","& .MuiSelect-select":{p:.7}},className:"remove_selectborder",children:(0,qt.jsx)(d_,{sx:{display:"flex",alignItems:"center"},children:(0,qt.jsxs)(G_,{className:"notes-tour-step1",sx:k.nonExistingNoteTypes.includes("DOCTOR")?{maxWidth:180,color:"white",backgroundColor:"primary.theme.500",borderColor:"primary.theme.500",borderRadius:"4px",pl:"5px",fontSize:"14px","& svg":{color:"#fff"}}:{maxWidth:180,color:"primary.theme.500",borderColor:"primary.theme.500",backgroundColor:"transparent",borderRadius:"4px",pl:"5px",fontSize:"14px"},fullWidth:!0,variant:"outlined",size:"small",value:k.nonExistingNoteTypes.includes("DOCTOR")?"DOCTOR":"additionalNotes",children:[(0,qt.jsx)(mf,{value:"additionalNotes",disabled:!0,sx:{display:"none"},children:E("rpm_AdditionalNotes")}),k.nonExistingNoteTypes.map(e=>{if("PRESCRIPTION"!==e)return(0,qt.jsx)(mf,{value:e,onClick:()=>O("".concat(ld.DOCTOR.PROGRAM,"/").concat(R,"/patients/").concat(P,"/notes/").concat(e.toLowerCase(),"-note")),children:E("rpm_".concat(xs(e.toLowerCase()),"Notes"))},e)})]})})})]})})]}),(0,qt.jsx)(op,{bgcolor:"white",className:"UseNoteFilter",p:2,children:(0,qt.jsx)(Ff,{container:!0,spacing:2,alignItems:"center",children:(0,qt.jsx)(Ff,{item:!0,md:12,lg:9,xl:8,className:"notes-tour-step0",children:T>=575?(0,qt.jsx)(MCe,{fetchListFunction:y,filterState:j,setFilterState:_,pageDetails:b,showFilterColor:s,setShowFilterColor:l}):(0,qt.jsx)(LCe,{fetchListFunction:y,filterState:j,setFilterState:_,pageDetails:b,showFilterColor:s,setShowFilterColor:l,filterVariant:"contained",filterName:"Filters",mobileFilterBG:!1})})})}),(0,qt.jsx)(eg,{}),(0,qt.jsxs)(op,{bgcolor:"white",p:2,children:[cs(o)&&!h&&(0,qt.jsx)(OCe,{handleToggleAddNote:H,showFilterColor:s}),!cs(o)&&(0,qt.jsx)(qt.Fragment,{children:(null===A||void 0===A||null===(t=A.permissions)||void 0===t?void 0:t.showCreatePrescriptionNoteList_showCreateNoteList)&&(0,qt.jsx)(xh,{variant:"contained",disableElevation:!0,startIcon:(0,qt.jsx)(Jxe.A,{}),onClick:H,color:"primary",sx:{fontWeight:"600",marginBottom:"10px"},children:E("rpm_AddNewNote")})}),h&&(0,qt.jsx)(Kz,{initialValues:p,enableReinitialize:!0,validationSchema:RU.noteSchema,onSubmit:a,children:e=>{var t,n,r;let{values:i,setFieldValue:o}=e;return(0,qt.jsx)(nH,{children:(0,qt.jsxs)(Ff,{container:!0,className:"EditorPageNotes note-quill-contianer",spacing:2,mb:2,children:[(0,qt.jsxs)(Ff,{item:!0,xs:12,md:5,children:[(0,qt.jsxs)(d_,{sx:{display:"flex",alignItems:"center"},children:[(0,qt.jsx)(o_,{id:"vital",children:E("rpm_VitalType")}),(0,qt.jsx)(G_,{fullWidth:!0,variant:"outlined",size:"small",name:"vital",id:"vital",onChange:e=>{o("vital",e.target.value)},labelId:"vital",label:E("rpm_VitalType"),endAdornment:(0,qt.jsx)(tw,{position:"end",sx:{position:"absolute",right:"28px"},children:(0,qt.jsx)(sy,{title:E("message:rpm_VitalTypeNoteHelp"),placement:"top",children:(0,qt.jsx)(wh,{size:"small",disableRipple:!0,sx:{p:0},children:(0,qt.jsx)(pM.A,{fontSize:"small"})})})}),children:Nd.map(e=>(0,qt.jsx)(mf,{value:e.value,children:E("rpm_".concat(e.name))},e.value))})]}),(0,qt.jsx)(dH,{name:"vital",children:e=>(0,qt.jsx)(v_,{error:!0,children:E(e,{field:E("rpm_VitalType")})})})]}),(0,qt.jsxs)(Ff,{item:!0,xs:12,md:9,children:[(0,qt.jsxs)(op,{className:" text-editor",width:"100%",children:[(0,qt.jsx)(ECe(),{theme:"snow",modules:F,formats:z,value:null===i||void 0===i?void 0:i.description,onChange:e=>{o("description",e)},ref:$}),(0,qt.jsx)(dH,{name:"description",children:e=>(0,qt.jsx)(v_,{error:!0,children:E(e,{field:E("rpm_Note")})})})]}),(0,qt.jsxs)(op,{mt:2,children:[(0,qt.jsx)(xh,{disableElevation:!0,variant:"outlined",onClick:H,sx:{marginRight:1},children:E("rpm_Cancel")}),(0,qt.jsx)(xh,{variant:"contained",disableElevation:!0,type:"submit",children:E("rpm_Save")})," "]})]}),(0,qt.jsx)(Ff,{item:!0,xs:12,md:3,children:(0,qt.jsx)(op,{children:(0,qt.jsxs)(qt.Fragment,{children:[(0,qt.jsx)(V,{}),cs(null===f||void 0===f||null===(t=f.data)||void 0===t||null===(n=t.local_files)||void 0===n||null===(r=n.local)||void 0===r?void 0:r.files)?g("upload",{}):v("upload",{})]})})})]})})}}),o.map(e=>{var t,i;return(0,qt.jsx)(qt.Fragment,{children:d!==e.id?(0,qt.jsxs)(Ff,{container:!0,spacing:2,mb:2,children:[(0,qt.jsx)(Ff,{item:!0,xs:11,children:(0,qt.jsxs)(op,{sx:{bgcolor:"primary.theme.50",borderRadius:1,p:1},children:[(0,qt.jsx)(Cf,{variant:"body2",fontWeight:600,children:E("rpm_".concat(e.vital))}),(0,qt.jsx)(Cf,{variant:"body2",dangerouslySetInnerHTML:{__html:e.note},color:"inherit",sx:{wordBreak:"break-all"},className:"savemode"}),(0,qt.jsxs)(Cf,{variant:"body2",mb:.6,children:[(0,qt.jsxs)(op,{component:"span",fontWeight:600,sx:{verticalAlign:"middle"},children:[E("rpm_Attachment"),":\xa0"]}),(0,qt.jsx)(op,{component:"span",sx:{color:"primary.theme.500",fontWeight:"600",pl:"0"},children:(0,qt.jsx)(W,{noteObj:e})})]}),(0,qt.jsxs)(op,{sx:{display:"flex",alignItems:"center"},children:[(0,qt.jsxs)(Cf,{sx:{fontSize:"14px"},children:["Created by \xa0",(0,qt.jsx)(op,{component:"span",fontWeight:600,children:e.created_by}),"\xa0 on \xa0",(0,qt.jsx)(op,{component:"span",fontWeight:600,children:sa()(e.created_at).format("DD MMM YYYY hh:mm A")}),"\xa0\xa0"]}),(0,qt.jsxs)(Cf,{sx:{fontSize:"14px"},children:["Last Updated by \xa0",(0,qt.jsx)(op,{component:"span",fontWeight:600,children:e.updated_by||e.created_by}),"\xa0 on \xa0",(0,qt.jsx)(op,{component:"span",fontWeight:600,children:e.updated_at?sa()(e.updated_at).format("DD MMM YYYY hh:mm A"):sa()(e.created_at).format("DD MMM YYYY hh:mm A")})]})]})]})}),(0,qt.jsx)(Ff,{item:!0,xs:1,children:(0,qt.jsxs)(op,{sx:{margin:1},className:"BGbtnGrp",children:[(null===A||void 0===A||null===(t=A.permissions)||void 0===t?void 0:t.showEditPrescriptionNote_showEditNote)&&n(e),!1,(null===A||void 0===A||null===(i=A.permissions)||void 0===i?void 0:i.showDeletePrescriptionList_showDeleteList)&&r({id:e.id})]})})]}):(0,qt.jsx)(Kz,{initialValues:p,enableReinitialize:!0,onSubmit:c,validationSchema:RU.noteSchema,children:t=>{var n,r,i;let{values:o,setFieldValue:a}=t;return(0,qt.jsx)(nH,{children:(0,qt.jsxs)(Ff,{container:!0,spacing:2,className:"EditorPageNotes note-quill-contianer",mt:1,mb:2,children:[(0,qt.jsxs)(Ff,{item:!0,xs:12,md:5,children:[(0,qt.jsxs)(d_,{sx:{display:"flex",alignItems:"center"},children:[(0,qt.jsx)(o_,{id:"vital",children:E("rpm_VitalType")}),(0,qt.jsx)(G_,{fullWidth:!0,variant:"outlined",size:"small",name:"vital",id:"vital",value:o.vital,onChange:e=>{a("vital",e.target.value)},labelId:"vital",label:E("rpm_VitalType"),endAdornment:(0,qt.jsx)(tw,{position:"end",sx:{position:"absolute",right:"28px"},children:(0,qt.jsx)(sy,{title:E("message:rpm_VitalTypeNoteHelp"),placement:"top",children:(0,qt.jsx)(wh,{size:"small",disableRipple:!0,sx:{p:0},children:(0,qt.jsx)(pM.A,{fontSize:"small"})})})}),children:Nd.map(e=>(0,qt.jsx)(mf,{value:e.value,children:E("rpm_".concat(e.name))},e.value))})]}),(0,qt.jsx)(dH,{name:"vital",children:e=>(0,qt.jsx)(v_,{error:!0,children:E(e,{field:E("rpm_VitalType")})})})]}),(0,qt.jsxs)(Ff,{item:!0,xs:12,md:9,children:[(0,qt.jsxs)(op,{className:" text-editor",width:"100%",children:[(0,qt.jsx)(ECe(),{theme:"snow",modules:F,formats:z,value:o.description,onChange:e=>a("description",e),ref:$}),(0,qt.jsx)(dH,{name:"description",children:e=>(0,qt.jsx)(v_,{error:!0,children:E(e,{field:E("rpm_Note")})})})]}),(0,qt.jsxs)(op,{mt:2,children:[(0,qt.jsx)(xh,{disableElevation:!0,variant:"outlined",color:"primary",onClick:u,sx:{marginRight:"10px"},children:E("rpm_Cancel")}),(0,qt.jsx)(xh,{disableElevation:!0,variant:"contained",sx:{marginRight:2},type:"submit",children:E("rpm_Save")})]})]}),(0,qt.jsx)(Ff,{item:!0,xs:12,md:3,children:(0,qt.jsx)(op,{children:(0,qt.jsxs)(qt.Fragment,{children:[(0,qt.jsx)(V,{}),cs(null===f||void 0===f||null===(n=f.data)||void 0===n||null===(r=n.local_files)||void 0===r||null===(i=r.local)||void 0===i?void 0:i.files)?g("upload",e):v("upload",e)]})})})]})})}})})}),(0,qt.jsx)(op,{sx:e=>({pr:2,bgcolor:e.palette.common.white}),children:(0,qt.jsx)(KE,{pageDetails:b,fetchListFunction:y})})]}),(0,qt.jsxs)(qt.Fragment,{children:[(0,qt.jsx)(zZ,{isTour:I,path:"notesTour",setRenderer:L}),(0,qt.jsx)("input",{type:"hidden",id:"rerenderer",value:N})]})]})}QCe.defaultProps={alertsHead:[],order:"",orderBy:"",dataParameter:"",checkState:[],isSelection:!1,nodata:"",notesList:[],otherResolvedAlertList:[],resolvedAlertList:[],addNewNote:()=>{},editNote:()=>{},editableNoteId:"",closeEditMode:()=>{},initialFormValues:{},toggleAddNote:!1,setToggleAddNote:()=>{},showFilterColor:{},setShowFilterColor:()=>{},fileModal:{},fileUploadButton:()=>{},fileUploadIconButton:()=>{},downloadFile:()=>{},fetchNoteList:()=>{},pageDetails:{},filterState:{},setFilterState:()=>{},onLocalFileDelete:()=>{},onCloudFilesDelete:()=>{},program:{},patientData:{},noteTypesDropdown:{}};const JCe=QCe;function ewe(e){var t;let{MobileeditButton:n,MobiledeleteButton:r,viewButton:i,notesList:o,addNewNote:a,showFilterColor:s,setShowFilterColor:l,editNote:c,editableNoteId:d,closeEditMode:u,initialFormValues:p,toggleAddNote:h,setToggleAddNote:m,fileModal:f,MobilefileUploadButton:g,fileUploadIconButton:v,downloadFile:x,fetchNoteList:y,pageDetails:b,filterState:j,setFilterState:_,onLocalFileDelete:C,onCloudFilesDelete:w,patientData:S,program:A,noteTypesDropdown:k}=e;const T=ICe(),{t:E}=Vg(),M=Nt(),O=so(),{programId:R,patientId:P}=lo(),[D,N]=(0,We.useState)(!1),L=e=>()=>{N(e)},I=We.useMemo(()=>({toolbar:{container:[["bold","italic","underline","strike"],[{size:[]},{color:[]}],[{list:"ordered"},{list:"bullet"},{indent:"-1"},{indent:"+1"},{align:[]}],["link","image","video"],["clean"]],history:{delay:500,maxStack:100,userOnly:!0}},clipboard:{matchVisual:!1}}),[]),F=We.useRef(null),$=[{name:E("rpm_RPM"),url:ld.DOCTOR.PROGRAM},{name:null===A||void 0===A?void 0:A.display_name,url:"".concat(ld.DOCTOR.PROGRAM,"/").concat(null===A||void 0===A?void 0:A.code,"/patients")},{name:"".concat((null===S||void 0===S?void 0:S.first_name)||""," ").concat((null===S||void 0===S?void 0:S.last_name)||""),url:"".concat(ld.DOCTOR.PROGRAM,"/").concat(null===A||void 0===A?void 0:A.code,"/patients/").concat(null===S||void 0===S?void 0:S.id,"/dashboard")},{name:E("rpm_DoctorNotes"),url:""}],B=["header","bold","italic","underline","strike","blockquote","size","color","list","bullet","indent","link"],z=()=>{m(!h),d&&u()},H=e=>{var t,n,r;let{noteObj:i}=e;const[o,a]=We.useState(2),s=e=>{const t=null===e||void 0===e?void 0:e.split("/");return t[(null===t||void 0===t?void 0:t.length)-1]};return(0,qt.jsxs)(qt.Fragment,{children:[null===i||void 0===i||null===(t=i.files)||void 0===t||null===(n=t.slice(0,o))||void 0===n?void 0:n.map(e=>(0,qt.jsx)(Eb,{sx:{color:"black",borderRadius:"0",textDecoration:"underline",height:"inherit",pl:"0"},"data-id":e.id,label:s(e.file_name),variant:"string",className:T.attachment_btn,onClick:()=>{x({noteId:i.id,file:e})}},e.id)),(null===i||void 0===i||null===(r=i.files)||void 0===r?void 0:r.length)>=3&&(0,qt.jsx)(sy,{title:E("rpm_ShowMore"),children:(0,qt.jsx)(wh,{disableRipple:!0,size:"small",onClick:()=>{var e,t;o===(null===i||void 0===i||null===(e=i.files)||void 0===e?void 0:e.length)?a(2):a(null===i||void 0===i||null===(t=i.files)||void 0===t?void 0:t.length)},children:"..."})})]})},W=e=>{const t=null===e||void 0===e?void 0:e.split("/");return t[(null===t||void 0===t?void 0:t.length)-1]},U=()=>{var e,t,n,r,i,o,a,s,l,c;return(0,qt.jsxs)(qt.Fragment,{children:[!cs(null===f||void 0===f||null===(e=f.data)||void 0===e||null===(t=e.local_files)||void 0===t||null===(n=t.local)||void 0===n?void 0:n.files)&&(null===f||void 0===f||null===(r=f.data)||void 0===r||null===(i=r.local_files)||void 0===i||null===(o=i.local)||void 0===o||null===(a=o.files)||void 0===a?void 0:a.map((e,t)=>(0,qt.jsx)(Eb,{sx:{p:1,mb:1},onDelete:()=>C(t),icon:(0,qt.jsx)(Aje.A,{fontSize:"small"}),label:null===e||void 0===e?void 0:e.name,variant:"string",className:"UplodeChip"},t))),!cs(null===f||void 0===f||null===(s=f.data)||void 0===s?void 0:s.files)&&(null===f||void 0===f||null===(l=f.data)||void 0===l||null===(c=l.files)||void 0===c?void 0:c.map((e,t)=>(0,qt.jsx)(Eb,{sx:{p:1,mb:1},onDelete:()=>w(null===f||void 0===f?void 0:f.data,null===e||void 0===e?void 0:e.id,t),icon:(0,qt.jsx)(Sje.A,{}),onClick:()=>{x({noteId:d,file:e})},label:W(null===e||void 0===e?void 0:e.file_name),variant:"string",className:"UplodeChip"},t)))]})};return We.useEffect(()=>{const e={breadcrumb:$};cs(A)||cs(S)||M(NC(e))},[A,S]),(0,qt.jsxs)(op,{sx:{width:"100%"},position:"relative",children:[(0,qt.jsx)(op,{position:"absolute",top:"-45px",left:"40px",children:(0,qt.jsx)(Cf,{variant:"h6",component:"h6",fontSize:16,children:E("rpm_Notes")})}),(0,qt.jsx)(op,{position:"absolute",top:"-50px",right:"0px",children:(0,qt.jsx)(op,{children:(0,qt.jsx)(wh,{onClick:L(!0),sx:{background:"#e8eaf6",padding:"5px"},children:(0,qt.jsx)(DCe.A,{color:"primary",sx:{padding:"0"}})})})}),(0,qt.jsx)(dg,{anchor:"left",open:D,onClose:L(!1),children:(0,qt.jsxs)("div",{style:{width:230},children:[(0,qt.jsxs)("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between",background:"#f2f2fe",padding:"5px 10px"},children:[(0,qt.jsx)(Cf,{variant:"h6",sx:{color:"#7986cb",fontWeight:"600"},children:E("rpm_Notes")}),(0,qt.jsx)(wh,{onClick:L(!1),children:(0,qt.jsx)(J_.A,{})})]}),(0,qt.jsxs)(op,{sx:{padding:"10px"},children:[(0,qt.jsx)(op,{children:!cs(k.nonExistingNoteTypes)&&(0,qt.jsx)(op,{sx:{display:"flex",alignItems:"center","& .MuiSelect-select":{p:.7},width:"100%"},className:"remove_selectborder",children:(0,qt.jsx)(d_,{sx:{display:"flex",alignItems:"center",width:"100%"},children:(0,qt.jsxs)(G_,{sx:k.nonExistingNoteTypes.includes("DOCTOR")?{color:"primary.theme.500",fontWeight:"500",borderColor:"primary.theme.500",borderRadius:"4px",pl:"5px",mb:"10px",fontSize:"13px","& svg":{color:"#fff"}}:{maxWidth:180,color:"primary.theme.500",borderColor:"primary.theme.500",backgroundColor:"transparent",borderRadius:"4px",pl:"5px",fontSize:"14px"},fullWidth:!0,variant:"outlined",size:"small",value:k.nonExistingNoteTypes.includes("DOCTOR")?"DOCTOR":"additionalNotes",children:[(0,qt.jsx)(mf,{value:"additionalNotes",disabled:!0,sx:{display:"none"},children:E("rpm_AdditionalNotes")}),k.nonExistingNoteTypes.map(e=>{if("PRESCRIPTION"!==e)return(0,qt.jsx)(mf,{value:e,onClick:()=>O("".concat(ld.DOCTOR.PROGRAM,"/").concat(R,"/patients/").concat(P,"/notes/").concat(e.toLowerCase(),"-note")),children:E("rpm_".concat(xs(e.toLowerCase()),"Notes"))},e)})]})})})}),(0,qt.jsxs)(op,{children:[(0,qt.jsx)(xh,{variant:"outlined",size:"small",disableElevation:!0,fullWidth:!0,onClick:()=>O("".concat(ld.DOCTOR.PROGRAM,"/").concat(R,"/patients/").concat(P,"/notes/resolve-alerts")),endIcon:(0,qt.jsx)(FCe.A,{sx:{color:"#3f51b5"}}),sx:{justifyContent:"space-between"},children:E("rpm_NoteResolvedAlerts")}),k.existingNoteTypes.map(e=>{if("PRESCRIPTION"!==e)return(0,qt.jsx)(qt.Fragment,{children:(0,qt.jsx)(xh,{variant:"DOCTOR"===e?"contained":"outlined",size:"small",disableElevation:!0,fullWidth:!0,onClick:()=>O("".concat(ld.DOCTOR.PROGRAM,"/").concat(R,"/patients/").concat(P,"/notes/").concat(e.toLowerCase(),"-note")),children:E("rpm_".concat(xs(e.toLowerCase()),"Notes"))})})})]})]})]})}),(0,qt.jsxs)(op,{display:"flex",alignItems:"center",justifyContent:"space-between",mb:1,children:[(0,qt.jsx)(op,{children:(0,qt.jsx)(LCe,{fetchListFunction:y,filterState:j,setFilterState:_,pageDetails:b,showFilterColor:s,setShowFilterColor:l,filterVariant:"text",filterName:"Filters",mobileFilterBG:!0})}),(0,qt.jsx)(op,{children:!cs(o)&&(0,qt.jsx)(qt.Fragment,{children:(null===A||void 0===A||null===(t=A.permissions)||void 0===t?void 0:t.showCreatePrescriptionNoteList_showCreateNoteList)&&(0,qt.jsx)(xh,{variant:"contained",disableElevation:!0,startIcon:(0,qt.jsx)(Jxe.A,{}),onClick:z,color:"primary",sx:{fontWeight:"600",fontSize:"12px"},className:T.addnewBtn,children:E("rpm_AddNew")})})})]}),cs(o)&&!h&&(0,qt.jsx)(op,{bgcolor:"white",className:"noDataAddedField",children:(0,qt.jsx)(OCe,{handleToggleAddNote:z,showFilterColor:s})}),(0,qt.jsxs)(op,{children:[h&&(0,qt.jsx)(Kz,{initialValues:p,enableReinitialize:!0,validationSchema:RU.noteSchema,onSubmit:a,children:e=>{var t,n,r;let{values:i,setFieldValue:o}=e;return(0,qt.jsx)(nH,{children:(0,qt.jsxs)(op,{bgcolor:"white",sx:{padding:"16px",borderRadius:"8px",marginBottom:"8px",borderTop:"5px solid #3f51b5",borderBottom:"1px solid #3f51b5",borderLeft:"1px solid #3f51b5",borderRight:"1px solid #3f51b5"},children:[(0,qt.jsxs)(op,{className:"vitalEdits",children:[(0,qt.jsx)(Cf,{variant:"span",sx:{marginBottom:"5px"},children:"Vital Type"}),(0,qt.jsx)(d_,{sx:{display:"flex",alignItems:"center",marginTop:"5px"},children:(0,qt.jsx)(G_,{fullWidth:!0,variant:"outlined",size:"small",name:"vital",id:"vital",onChange:e=>{o("vital",e.target.value)},sx:{marginTop:"15px"},labelId:"vital",label:E("rpm_VitalType"),endAdornment:(0,qt.jsx)(tw,{position:"end",sx:{position:"absolute",right:"28px"},children:(0,qt.jsx)(sy,{title:E("message:rpm_VitalTypeNoteHelp"),placement:"top",children:(0,qt.jsx)(wh,{size:"small",disableRipple:!0,sx:{p:0},children:(0,qt.jsx)(pM.A,{fontSize:"small"})})})}),children:Nd.map(e=>(0,qt.jsx)(mf,{value:e.value,children:E("rpm_".concat(e.name))},e.value))})}),(0,qt.jsx)(dH,{name:"vital",children:e=>(0,qt.jsx)(v_,{error:!0,children:E(e,{field:E("rpm_VitalType")})})})]}),(0,qt.jsxs)(op,{mt:2,className:"text-editor quilldesign",width:"100%",children:[(0,qt.jsx)(ECe(),{theme:"snow",modules:I,formats:B,value:null===i||void 0===i?void 0:i.description,onChange:e=>{o("description",e)},ref:F}),(0,qt.jsx)(dH,{name:"description",children:e=>(0,qt.jsx)(v_,{error:!0,children:E(e,{field:E("rpm_Note")})})})]}),(0,qt.jsx)(op,{mt:2,children:(0,qt.jsx)(op,{mt:2,mb:2,width:"100%",sx:{margin:"auto",textAlign:"center"},children:(0,qt.jsxs)(qt.Fragment,{children:[(0,qt.jsx)(U,{}),cs(null===f||void 0===f||null===(t=f.data)||void 0===t||null===(n=t.local_files)||void 0===n||null===(r=n.local)||void 0===r?void 0:r.files)?g("upload",{}):v("upload",{})]})})}),(0,qt.jsxs)(op,{mt:2,display:"flex",children:[(0,qt.jsx)(xh,{disableElevation:!0,variant:"outlined",onClick:z,sx:{marginRight:1},fullWidth:!0,children:E("rpm_Cancel")}),(0,qt.jsx)(xh,{variant:"contained",disableElevation:!0,type:"submit",fullWidth:!0,children:E("rpm_Save")})," "]})]})})}}),o.map(e=>{var t,i;return(0,qt.jsx)(qt.Fragment,{children:d!==e.id?(0,qt.jsx)(qt.Fragment,{children:(0,qt.jsxs)(op,{sx:{bgcolor:"white",borderRadius:"8px",marginBottom:"10px"},children:[(0,qt.jsxs)(op,{sx:{background:"#eaeaff",color:"#7986cb",fontWeight:"600",padding:"8px 16px",borderRadius:"8px 8px 0 0",display:"flex",alignItems:"center",justifyContent:"space-between"},children:[(0,qt.jsx)(Cf,{variant:"body2",fontWeight:600,children:E("rpm_".concat(e.vital))}),(0,qt.jsxs)(op,{className:T.actionButtons,children:[(null===A||void 0===A||null===(t=A.permissions)||void 0===t?void 0:t.showEditPrescriptionNote_showEditNote)&&n(e),!1,(null===A||void 0===A||null===(i=A.permissions)||void 0===i?void 0:i.showDeletePrescriptionList_showDeleteList)&&r({id:e.id})]})]}),(0,qt.jsxs)(op,{sx:{padding:"8px 16px"},children:[(0,qt.jsx)(op,{component:"span",fontWeight:600,sx:{verticalAlign:"middle"},className:T.titles,children:"Description:"}),(0,qt.jsx)(Cf,{variant:"body2",dangerouslySetInnerHTML:{__html:e.note},color:"inherit",sx:{wordBreak:"break-word"},className:"savemode"}),(0,qt.jsxs)(op,{component:"span",fontWeight:600,sx:{verticalAlign:"middle"},className:T.titles,children:[E("rpm_Attachment"),":"]}),(0,qt.jsx)(Cf,{variant:"body2",mb:.6,children:(0,qt.jsx)(op,{component:"span",sx:{color:"black",fontWeight:"600",pl:"0 !important"},className:"fileObjectName",children:(0,qt.jsx)(H,{noteObj:e})})}),(0,qt.jsxs)(op,{children:[(0,qt.jsx)(op,{component:"span",fontWeight:600,sx:{verticalAlign:"middle"},className:T.titles,children:"Created by:"}),(0,qt.jsxs)(Cf,{sx:{fontSize:"14px",marginBottom:"5px"},children:[(0,qt.jsx)(op,{component:"span",fontWeight:600,children:e.created_by}),"\xa0 on \xa0",(0,qt.jsx)(op,{component:"span",fontWeight:600,children:sa()(e.created_at).format("DD MMM YYYY hh:mm A")}),"\xa0\xa0"]}),(0,qt.jsx)(op,{component:"span",fontWeight:600,sx:{verticalAlign:"middle"},className:T.titles,children:"Last Updated by:"}),(0,qt.jsxs)(Cf,{sx:{fontSize:"14px"},children:[(0,qt.jsx)(op,{component:"span",fontWeight:600,children:e.updated_by||e.created_by}),"\xa0 on \xa0",(0,qt.jsx)(op,{component:"span",fontWeight:600,children:e.updated_at?sa()(e.updated_at).format("DD MMM YYYY hh:mm A"):sa()(e.created_at).format("DD MMM YYYY hh:mm A")})]})]})]})]})}):(0,qt.jsx)(Kz,{initialValues:p,enableReinitialize:!0,onSubmit:c,validationSchema:RU.noteSchema,children:t=>{var n,r,i;let{values:o,setFieldValue:a}=t;return(0,qt.jsx)(nH,{children:(0,qt.jsxs)(op,{bgcolor:"white",sx:{padding:"16px",borderRadius:"8px",marginBottom:"8px",borderTop:"5px solid #3f51b5",borderBottom:"1px solid #3f51b5",borderLeft:"1px solid #3f51b5",borderRight:"1px solid #3f51b5"},children:[(0,qt.jsxs)(d_,{sx:{display:"flex",alignItems:"center",marginTop:"5px"},children:[(0,qt.jsx)(o_,{id:"vital",children:E("rpm_VitalType")}),(0,qt.jsx)(G_,{fullWidth:!0,variant:"outlined",size:"small",name:"vital",id:"vital",value:o.vital,onChange:e=>{a("vital",e.target.value)},labelId:"vital",label:E("rpm_VitalType"),endAdornment:(0,qt.jsx)(tw,{position:"end",sx:{position:"absolute",right:"28px"},children:(0,qt.jsx)(sy,{title:E("message:rpm_VitalTypeNoteHelp"),placement:"top",children:(0,qt.jsx)(wh,{size:"small",disableRipple:!0,sx:{p:0},children:(0,qt.jsx)(pM.A,{fontSize:"small"})})})}),children:Nd.map(e=>(0,qt.jsx)(mf,{value:e.value,children:E("rpm_".concat(e.name))},e.value))})]}),(0,qt.jsx)(dH,{name:"vital",children:e=>(0,qt.jsx)(v_,{error:!0,children:E(e,{field:E("rpm_VitalType")})})}),(0,qt.jsxs)(op,{mt:2,className:"text-editor quilldesign",width:"100%",children:[(0,qt.jsx)(ECe(),{theme:"snow",modules:I,formats:B,value:o.description,onChange:e=>a("description",e),ref:F}),(0,qt.jsx)(dH,{name:"description",children:e=>(0,qt.jsx)(v_,{error:!0,children:E(e,{field:E("rpm_Note")})})})]}),(0,qt.jsx)(op,{mt:2,children:(0,qt.jsx)(op,{mt:2,mb:2,width:"100%",sx:{margin:"auto",textAlign:"center"},children:(0,qt.jsxs)(qt.Fragment,{children:[(0,qt.jsx)(U,{}),cs(null===f||void 0===f||null===(n=f.data)||void 0===n||null===(r=n.local_files)||void 0===r||null===(i=r.local)||void 0===i?void 0:i.files)?g("upload",e):v("upload",e)]})})}),(0,qt.jsxs)(op,{mt:2,display:"flex",children:[(0,qt.jsx)(xh,{disableElevation:!0,variant:"outlined",color:"primary",onClick:u,sx:{marginRight:"10px"},fullWidth:!0,children:E("rpm_Cancel")}),(0,qt.jsx)(xh,{disableElevation:!0,variant:"contained",type:"submit",fullWidth:!0,children:E("rpm_Save")})]})]})})}})})})]})]})}ewe.defaultProps={alertsHead:[],order:"",orderBy:"",dataParameter:"",checkState:[],isSelection:!1,nodata:"",notesList:[],otherResolvedAlertList:[],resolvedAlertList:[],addNewNote:()=>{},editNote:()=>{},editableNoteId:"",closeEditMode:()=>{},initialFormValues:{},toggleAddNote:!1,setToggleAddNote:()=>{},showFilterColor:{},setShowFilterColor:()=>{},fileModal:{},MobilefileUploadButton:()=>{},fileUploadIconButton:()=>{},downloadFile:()=>{},fetchNoteList:()=>{},pageDetails:{},filterState:{},setFilterState:()=>{},onLocalFileDelete:()=>{},onCloudFilesDelete:()=>{},program:{},patientData:{},noteTypesDropdown:{}};const twe=ewe,nwe=["content"];const rwe=function(e){var t;let{patientData:n,program:r}=e;const o={local:{files:[]},onCloud:{files:[]}},a=window.innerWidth,s=Nt(),l=wt(cu),{t:c}=Vg(),{programId:d,patientId:u}=lo(),[p,h]=(0,We.useState)("desc"),[m,f]=(0,We.useState)("created_at"),[g,v]=(0,We.useState)((0,i.A)({},o)),[x,y]=(0,We.useState)({description:"",vital:""}),[b,j]=We.useState(!1),[_,C]=(0,We.useState)([]),[w,S]=(0,We.useState)(!1),[A,k]=We.useState([]),[T,E]=We.useState({open:!1,data:{}}),[M,O]=We.useState(""),[R,P]=(0,We.useState)((0,i.A)({},dd)),[D,N]=We.useState({vital:"",start_date:null,end_date:null}),[L,I]=We.useState({open:!1,data:{}}),[F,$]=We.useState({existingNoteTypes:[],nonExistingNoteTypes:[]}),B=e=>{I((0,i.A)((0,i.A)({},L),{},{open:!L.open,data:e}))},z=e=>{if(Array.isArray(e))return C(e.map(e=>e.toString()));const t=e.target.name;_.includes(t)?C(_.filter(e=>e!==t)):C(e=>[...e,t])},H=()=>{let e=(0,i.A)({},g);e.local.files.splice(0,e.local.files.length),v(e),E({data:{},open:!1})},W=async function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:D;try{const t={sort_by:m,sort_order:p},{data:n}=await s(Il(d,u,{type:"DOCTOR"},(0,i.A)((0,i.A)({},R),t),e)),r=n||{},{content:o}=r,a=Ko(r,nwe);k(o),P(e=>(0,i.A)((0,i.A)({},e),{},{last_page:a.last_page,current_page:a.current_page,from:a.from,per_page:a.per_page,to:a.to,total:a.total,sort_by:m,sort_order:p}))}catch(t){console.log(t)}},U=async(e,t)=>{var n,r;let{setErrors:i}=t;const o={vital:null===e||void 0===e?void 0:e.vital,note:null===e||void 0===e?void 0:e.description,type:"DOCTOR",upload:cs(null===T||void 0===T||null===(n=T.data)||void 0===n?void 0:n.local_files)?[]:null===T||void 0===T||null===(r=T.data)||void 0===r?void 0:r.local_files};try{if(await s(Fl(d,u,o)),R.current_page=1,W({vital:"",start_date:null,end_date:null}),S(!1),y({description:"",vital:""}),F.nonExistingNoteTypes.includes("DOCTOR")){const{data:e}=await s(Ul(d,u));$({existingNoteTypes:e,nonExistingNoteTypes:_s(Jd,e)})}W(),H(),s(Zo({subTitle:"message:rpm_NoteCreatedSuccessfully",severity:ud.SUCCESS}))}catch(a){const e=us(a,"response.data.code","");cs(e)?s(Zo({subTitle:"error:rpm_NoteCreatedFailed",severity:ud.ERROR})):s(Zo({subTitle:Vd(e,"error:rpm_NoteCreatedFailed"),severity:ud.ERROR}))}},V=async(e,t)=>{var n,r;let{setErrors:i}=t;const o={id:M,vital:null===e||void 0===e?void 0:e.vital,note:null===e||void 0===e?void 0:e.description,type:"DOCTOR",upload:cs(null===T||void 0===T||null===(n=T.data)||void 0===n?void 0:n.local_files)?[]:null===T||void 0===T||null===(r=T.data)||void 0===r?void 0:r.local_files};try{await s(Bl(d,u,o)),q(),W(),H(),s(Zo({subTitle:"message:rpm_NoteUpdateSuccessfully",severity:ud.SUCCESS}))}catch(a){const e=us(a,"response.data.code","");cs(e)?s(Zo({subTitle:"error:rpm_NoteUpdateFailed",severity:ud.ERROR})):s(Zo({subTitle:Vd(e,"error:rpm_NoteUpdateFailed"),severity:ud.ERROR}))}},G=async e=>{try{var t;if(await s(zl(d,u,{noteId:null===e||void 0===e||null===(t=e.data)||void 0===t?void 0:t.id,type:"DOCTOR"})),W(),I((0,i.A)((0,i.A)({},L),{},{open:!L.open})),1===A.length){const{data:e}=await s(Ul(d,u));$({existingNoteTypes:e,nonExistingNoteTypes:_s(Jd,e)})}s(Zo({subTitle:"message:rpm_NoteDeleteSuccessfully",severity:ud.SUCCESS}))}catch(n){const e=us(n,"response.data.code","");cs(e)?s(Zo({subTitle:"error:rpm_NoteUpdateFailed",severity:ud.ERROR})):s(Zo({subTitle:Vd(e,"error:rpm_NoteDeleteFailed"),severity:ud.ERROR}))}},q=()=>{O(""),y({description:"",vital:""}),E({open:!1,data:{}}),v((0,i.A)({},o))},Y=e=>(0,qt.jsx)(sy,{title:c("rpm_view"),children:(0,qt.jsx)(wh,{"data-id":e.id,color:"primary",onClick:()=>{},children:(0,qt.jsx)(gc,{fontSize:"small",sx:{width:16,height:16}})})}),Z=async e=>{let{noteId:t,file:n}=e;try{await s(Hl(d,u,{noteId:t,type:"DOCTOR",fileData:n})),s(Zo({subTitle:"message:rpm_DownloadFileSuccessfully",severity:ud.SUCCESS}))}catch(r){const e=us(r,"response.data.code","");cs(e)?s(Zo({subTitle:"error:rpm_DownloadFileFailed",severity:ud.ERROR})):s(Zo({subTitle:Vd(e,"error:rpm_DownloadFileFailed"),severity:ud.ERROR}))}},K=function(e){const t=e.target.files;let n=(0,i.A)({},g.local);t&&Array.from(t).forEach(e=>{var t;return cs(null===n||void 0===n||null===(t=n.files)||void 0===t?void 0:t.find(t=>t.name===e.name))?(null===e||void 0===e?void 0:e.size)>=5242880?s(Zo({subTitle:"error:rpm_ImageSize",severity:ud.ERROR})):(e.url=URL.createObjectURL(e),void n.files.push(e)):s(Zo({subTitle:"error:rpm_SameFileName",severity:ud.ERROR}))}),v(e=>(0,i.A)((0,i.A)({},e),{},{local:n})),E(e=>({open:!e.open,data:(0,i.A)((0,i.A)({},e.data),{},{local_files:(0,i.A)((0,i.A)({},g),{},{local:n})})})),e.target.value=""},X=(e,t)=>(0,qt.jsx)("label",{htmlFor:"file",children:(0,qt.jsx)(sy,{title:c("rpm_UploadMore"),component:"span",children:(0,qt.jsxs)(wh,{"data-id":t.id,color:"primary",sx:{bgcolor:"primary.theme.50"},children:[(0,qt.jsx)("input",{multiple:!0,type:"file",id:"file",style:{display:"none"},autoFocus:!0,onChange:K}),(0,qt.jsx)(jje.A,{fontSize:"small",sx:{width:16,height:16}})]})})}),Q=function(e){let t=(0,i.A)({},g);t.local.files.splice(e,1),v(t)},J=async(e,t)=>{try{await s(Wl(d,u,{noteId:e.id,fileId:t,type:"DOCTOR"})),W(),function(e,t){var n;const r=null===e||void 0===e||null===(n=e.files)||void 0===n?void 0:n.filter(e=>(null===e||void 0===e?void 0:e.id)!==t);E((0,i.A)((0,i.A)({},T),{},{data:(0,i.A)((0,i.A)({},e),{},{files:r})}))}(e,t),s(Zo({subTitle:"message:rpm_FileDeletedSuccessfully",severity:ud.SUCCESS}))}catch(n){const e=us(n,"response.data.code","");cs(e)?s(Zo({subTitle:"error:rpm_FileDeleteFailed",severity:ud.ERROR})):s(Zo({subTitle:Vd(e,"error:rpm_FileDeleteFailed"),severity:ud.ERROR}))}};return We.useEffect(()=>{l&&W(),cs(r)||cs(n)||(async()=>{const{data:e}=await s(Ul(d,u));$({existingNoteTypes:e,nonExistingNoteTypes:_s(Jd,e)})})()},[l,p,m,r,n]),We.useEffect(()=>{s(NC({activeMenuItem:"notes"}))},[]),cs(r)?(0,qt.jsx)(yp,{variant:"outlined",sx:{px:2.5,py:6,display:"flex",height:"320px"},children:(0,qt.jsx)(op,{alignSelf:"center",sx:{mx:"auto"},children:(0,qt.jsx)(MM,{color:"primary"})})}):(0,qt.jsx)(qt.Fragment,{children:null!==r&&void 0!==r&&null!==(t=r.permissions)&&void 0!==t&&t.showPrescriptionNoteList_showNoteList?a>=575?(0,qt.jsxs)(qt.Fragment,{children:[(0,qt.jsx)(JCe,{order:p,orderBy:m,setOrder:h,setOrderBy:f,dataParameter:"id",checkState:_,onCheck:z,isSelection:!1,nodata:SCe,showFilterColor:b,setShowFilterColor:j,notesList:A,fetchNoteList:W,pageDetails:R,editButton:e=>(0,qt.jsx)(sy,{title:c("rpm_Edit"),children:(0,qt.jsx)(wh,{"data-id":e.id,color:"primary",onClick:()=>{O(e.id),S(!1),y({description:e.note,vital:e.vital}),v((0,i.A)({},o)),E((0,i.A)((0,i.A)({},T),{},{data:(0,i.A)({},e)}))},children:(0,qt.jsx)(fc,{fontSize:"small",sx:{width:16,height:16}})})}),viewButton:Y,deleteButton:e=>(0,qt.jsx)(wh,{"data-id":e.id,color:"error",onClick:()=>B(e),children:(0,qt.jsx)(xc,{fontSize:"small",sx:{width:16,height:16}})}),addNewNote:U,editNote:V,editableNoteId:M,closeEditMode:q,initialFormValues:x,toggleAddNote:w,setToggleAddNote:S,fileModal:T,fileUploadButton:()=>(0,qt.jsx)("label",{htmlFor:"file",children:(0,qt.jsxs)(xh,{variant:"contained",component:"span",size:"large",disableElevation:!0,sx:{display:"inline-flex",backgroundColor:"grey.300",color:"grey.700",border:"1px dashed #9CA3AF",textAlign:"left",px:3,"&:hover":{backgroundColor:"grey.300"}},children:[(0,qt.jsx)("input",{multiple:!0,type:"file",id:"file",style:{display:"none"},autoFocus:!0,onChange:K}),(0,qt.jsxs)(op,{sx:{display:"flex",alignItems:"center"},children:[(0,qt.jsx)(Cje.A,{fontSize:"small"}),(0,qt.jsxs)(op,{sx:{flex:1,pl:2},children:[(0,qt.jsx)(Cf,{variant:"body1",sx:{textTransform:"none"},children:c("rpm_UploadReport")}),(0,qt.jsx)(Cf,{variant:"caption",children:".PDF, .PNG, .JPEG"})]})]})]})}),fileUploadIconButton:X,downloadFile:Z,filterState:D,setFilterState:N,onLocalFileDelete:Q,onCloudFilesDelete:J,patientData:n,program:r,noteTypesDropdown:F}),(0,qt.jsx)(qV,{openModal:L.open,onCloseModal:B,actionFunction:()=>G(L),dataName:L.data.title,options:{primaryText:c("message:rpm_DeleteTitle"),secondaryText:c("message:rpm_DeleteBodyText"),descText:c("message:rpm_DeleteSubText"),btn:{primaryText:c("rpm_Delete"),secondaryText:c("rpm_Cancel"),primaryColor:"error",secondaryColor:"primary"},btnSwap:!0}})]}):(0,qt.jsxs)(qt.Fragment,{children:[(0,qt.jsx)(twe,{order:p,orderBy:m,setOrder:h,setOrderBy:f,dataParameter:"id",checkState:_,onCheck:z,isSelection:!1,nodata:SCe,showFilterColor:b,setShowFilterColor:j,notesList:A,fetchNoteList:W,pageDetails:R,MobileeditButton:e=>(0,qt.jsx)(sy,{title:c("rpm_Edit"),children:(0,qt.jsx)(wh,{"data-id":e.id,color:"primary",onClick:()=>{O(e.id),S(!1),y({description:e.note,vital:e.vital}),v((0,i.A)({},o)),E((0,i.A)((0,i.A)({},T),{},{data:(0,i.A)({},e)}))},sx:{padding:"0"},children:(0,qt.jsx)(kCe.A,{fontSize:"small",sx:{width:16,height:16}})})}),viewButton:Y,MobiledeleteButton:e=>(0,qt.jsx)(wh,{"data-id":e.id,color:"error",onClick:()=>B(e),sx:{padding:"0",ml:"10px"},children:(0,qt.jsx)(zCe.A,{fontSize:"small",sx:{width:16,height:16}})}),addNewNote:U,editNote:V,editableNoteId:M,closeEditMode:q,initialFormValues:x,toggleAddNote:w,setToggleAddNote:S,fileModal:T,MobilefileUploadButton:()=>(0,qt.jsxs)("label",{htmlFor:"file",children:[(0,qt.jsxs)(xh,{variant:"contained",component:"span",size:"large",disableElevation:!0,sx:{display:"inline-flex",backgroundColor:"#eaeaff85",color:"grey.700",border:"1px dashed #9CA3AF",textAlign:"left",px:3,"&:hover":{backgroundColor:"grey.300"}},fullWidth:!0,children:[(0,qt.jsx)("input",{multiple:!0,type:"file",id:"file",style:{display:"none"},autoFocus:!0,onChange:K}),(0,qt.jsxs)(op,{sx:{display:"flex",alignItems:"center"},children:[(0,qt.jsx)(Cje.A,{fontSize:"small"}),(0,qt.jsx)(op,{sx:{flex:1,pl:2},children:(0,qt.jsx)(Cf,{variant:"body1",sx:{textTransform:"none"},fontSize:14,children:c("rpm_UploadReport")})})]})]}),(0,qt.jsx)(op,{textAlign:"center",fontStyle:"italic",children:(0,qt.jsx)(Cf,{variant:"caption",fontSize:8,children:".PDF, .PNG, .JPEG"})})]}),fileUploadIconButton:X,downloadFile:Z,filterState:D,setFilterState:N,onLocalFileDelete:Q,onCloudFilesDelete:J,patientData:n,program:r,noteTypesDropdown:F}),(0,qt.jsx)(zje,{openModal:L.open,onCloseModal:B,actionFunction:()=>G(L),dataName:L.data.title,options:{primaryText:c("message:rpm_DeleteTitle"),secondaryText:c("message:rpm_DeleteBodyText"),btn:{primaryText:c("rpm_Delete"),secondaryText:c("rpm_Cancel"),primaryColor:"error",secondaryColor:"primary"},btnSwap:!0}})]}):(0,qt.jsx)(LC,{})})},iwe=["children","onClose"],owe=e=>{const{children:t,onClose:n}=e,r=Ko(e,iwe);return(0,qt.jsxs)(fC,(0,i.A)((0,i.A)({sx:{m:0,p:2}},r),{},{children:[t,n?(0,qt.jsx)(wh,{"aria-label":"close",onClick:n,sx:{position:"absolute",right:8,top:8,color:e=>e.palette.grey[500]},children:(0,qt.jsx)(J_.A,{})}):null]}))},awe=[],swe=e=>{let{isModalOpen:t,toggleProgramModal:n}=e;return(0,qt.jsx)(cC,{fullWidth:!0,maxWidth:"sm",open:t,onClose:n,children:(0,qt.jsx)(Kz,{onSubmit:function(){},enableReinitialize:!0,children:()=>(0,qt.jsxs)(qt.Fragment,{children:[(0,qt.jsx)(owe,{sx:{px:4},onClose:n,children:_e("rpm_AddMedicine")}),(0,qt.jsx)(bC,{sx:{p:4,pt:2},dividers:!0,children:(0,qt.jsx)(nH,{children:(0,qt.jsxs)(Ff,{container:!0,spacing:2,children:[(0,qt.jsxs)(Ff,{item:!0,xs:12,children:[(0,qt.jsx)(Cf,{variant:"body1",component:"p",fontWeight:"h6.fontWeight",children:_e("rpm_Medication")}),(0,qt.jsx)(op,{sx:{whiteSpace:"normal"},children:(0,qt.jsx)(tH,{as:qj,fullWidth:!0,size:"small",variant:"outlined",endAdornment:(0,qt.jsx)(tw,{position:"end",children:(0,qt.jsx)(sy,{title:_e("message:rpm_MedicineNameHelp"),placement:"top",children:(0,qt.jsx)(wh,{size:"small",disableRipple:!0,sx:{p:0},children:(0,qt.jsx)(pM.A,{fontSize:"small"})})})})})})]}),(0,qt.jsxs)(Ff,{item:!0,xs:12,children:[(0,qt.jsx)(Cf,{variant:"body1",component:"p",fontWeight:"h6.fontWeight",children:_e("rpm_Form")}),(0,qt.jsx)(op,{sx:{whiteSpace:"normal"},children:(0,qt.jsx)(tH,{as:G_,fullWidth:!0,size:"small",variant:"outlined",endAdornment:(0,qt.jsx)(tw,{position:"end",sx:{position:"absolute",right:"28px"},children:(0,qt.jsx)(sy,{title:_e("message:rpm_MedicineFormHelp"),placement:"top",children:(0,qt.jsx)(wh,{size:"small",disableRipple:!0,sx:{p:0},children:(0,qt.jsx)(pM.A,{fontSize:"small"})})})}),children:Id.map(e=>(0,qt.jsx)(mf,{value:e.key,children:"".concat(e.text)},e.key))})})]}),(0,qt.jsxs)(Ff,{item:!0,xs:12,children:[(0,qt.jsx)(Cf,{variant:"body1",component:"p",fontWeight:"h6.fontWeight",children:_e("rpm_Shape&Color")}),(0,qt.jsxs)(op,{children:[(0,qt.jsxs)(op,{display:"flex",gap:1,children:[(0,qt.jsx)(tH,{as:G_,size:"small",fullWidth:!0,variant:"outlined",className:"shapeDropDown",endAdornment:(0,qt.jsx)(tw,{position:"end",sx:{position:"absolute",right:"28px"},children:(0,qt.jsx)(sy,{title:_e("message:rpm_MedicineIconHelp"),placement:"top",children:(0,qt.jsx)(wh,{size:"small",disableRipple:!0,sx:{p:0},children:(0,qt.jsx)(pM.A,{fontSize:"small"})})})})}),(0,qt.jsx)(tH,{as:G_,size:"small",fullWidth:!0,variant:"outlined",MenuProps:{className:"horizontalList"},children:Bd.map(e=>(0,qt.jsx)(mf,{value:e.color,children:(0,qt.jsx)(op,{display:"flex",gap:1,children:(0,qt.jsx)(Cf,{variant:"span",className:"circleIcon ".concat(e.color)})})},e.key))})]}),(0,qt.jsx)(op,{children:ps(null===awe||void 0===awe?void 0:awe.image)?(0,qt.jsxs)(op,{className:"upload-input-text",children:[(0,qt.jsx)("input",{type:"file"}),(0,qt.jsxs)("label",{htmlFor:"contained-button-file",style:{display:"flex",paddingTop:"5px"},children:[(0,qt.jsx)(op,{textOverflow:"ellipsis",whiteSpace:"nowrap",overflow:"hidden",children:_e("uploadImage")}),(0,qt.jsx)(op,{clone:!0,mr:1,color:"primary",children:(0,qt.jsx)(Cue,{width:22,height:22})})]})]}):(0,qt.jsxs)(op,{style:{display:"flex",paddingTop:"5px"},width:170,children:[(0,qt.jsx)(op,{textOverflow:"ellipsis",whiteSpace:"nowrap",style:{cursor:"pointer"},overflow:"hidden"}),(0,qt.jsx)(op,{mr:1,color:"primary",position:"relative",zIndex:2,children:(0,qt.jsx)(wh,{size:"small",color:"error","aria-label":"remove file",children:(0,qt.jsx)(xc,{width:22,height:22})})})]})})]})]}),(0,qt.jsxs)(Ff,{item:!0,xs:12,children:[(0,qt.jsx)(Cf,{variant:"body1",component:"p",fontWeight:"h6.fontWeight",children:_e("rpm_Strength")}),(0,qt.jsxs)(op,{display:"flex",children:[(0,qt.jsx)(tH,{as:qj,type:"number",size:"small",fullWidth:!0,onWheel:e=>e.target.blur(),onKeyDown:e=>{Pd.includes(e.key)&&e.preventDefault()},variant:"outlined",style:{borderRight:"0",borderRadius:"8px 0 0 8px"}}),(0,qt.jsx)(tH,{as:G_,size:"small",fullWidth:!0,variant:"outlined",style:{borderLeft:"0",borderRadius:"0 8px 8px 0"},className:"customListSelect",children:$d.map(e=>(0,qt.jsx)(mf,{value:e.key,children:"".concat(e.text)},e.key))})]})]}),(0,qt.jsxs)(Ff,{item:!0,xs:12,children:[(0,qt.jsxs)(Cf,{variant:"body1",component:"p",fontWeight:"h6.fontWeight",children:[_e("rpm_Frequency"),(0,qt.jsx)(op,{component:"span",children:"*"})]}),(0,qt.jsxs)(op,{sx:{whiteSpace:"normal"},children:[(0,qt.jsx)(tH,{as:G_,size:"small",fullWidth:!0,variant:"outlined",defaultValue:"",endAdornment:(0,qt.jsx)(tw,{position:"end",sx:{position:"absolute",right:"25px"},children:(0,qt.jsx)(sy,{title:_e("message:rpm_FrequencyHelp"),placement:"top",children:(0,qt.jsx)(wh,{size:"small",disableRipple:!0,sx:{p:0},children:(0,qt.jsx)(pM.A,{fontSize:"small"})})})}),children:null===Ld||void 0===Ld?void 0:Ld.map(e=>(0,qt.jsx)(mf,{value:e.key,children:"".concat(e.text)},e.key))}),(0,qt.jsx)(op,{children:(0,qt.jsxs)(xh,{variant:"text",component:"label",disableFocusRipple:!0,disableRipple:!0,sx:{p:"0"},children:[(0,qt.jsx)(D_e.A,{fontSize:"small",sx:{width:16,height:16,mr:.5}}),_e("setReminder")]})}),(0,qt.jsx)(op,{display:"flex",flexWrap:"wrap",children:(null===awe||void 0===awe?void 0:awe.timing)&&(null===awe||void 0===awe?void 0:awe.timing.map((e,t)=>(0,qt.jsx)(op,{pr:.5,pb:.5,children:(0,qt.jsx)(Cf,{style:(null===e||void 0===e?void 0:e.start_time)&&{backgroundColor:"#EDEDED",borderRadius:"20px",padding:"3px 8px",fontSize:"13px",color:"#6B7280"}})},t)))})]})]}),(0,qt.jsxs)(Ff,{item:!0,xs:12,children:[(0,qt.jsxs)(Cf,{variant:"body1",component:"p",fontWeight:"h6.fontWeight",children:[_e("rpm_Days"),(0,qt.jsx)(op,{component:"span",children:"*"})]}),(0,qt.jsx)(op,{sx:{whiteSpace:"normal"},children:(0,qt.jsx)(tH,{as:qj,fullWidth:!0,size:"small",type:"number",variant:"outlined",onWheel:e=>e.target.blur(),onKeyDown:e=>Pd.includes(e.key)&&e.preventDefault(),endAdornment:(0,qt.jsx)(tw,{position:"end",sx:{position:"absolute",right:"8px"},children:(0,qt.jsx)(sy,{title:_e("message:rpm_MedicineDaysHelp"),placement:"top",children:(0,qt.jsx)(wh,{size:"small",disableRipple:!0,sx:{p:0},children:(0,qt.jsx)(pM.A,{fontSize:"small"})})})})})})]}),(0,qt.jsxs)(Ff,{item:!0,xs:12,children:[(0,qt.jsxs)(Cf,{variant:"body1",component:"p",fontWeight:"h6.fontWeight",mb:.5,children:[_e("rpm_Duration"),(0,qt.jsx)(op,{component:"span",children:"*"})]}),(0,qt.jsx)(WM,{dateAdapter:DI,children:(0,qt.jsxs)(op,{className:"DatepickerForm",sx:e=>({"& .MuiFormControl-root":{display:"flex"},"& .MuiFormLabel-root":{color:e.palette.grey[800]},"& .MuiOutlinedInput-input":{padding:"10px",fontSize:"14px"}}),mr:1,display:"flex",children:[(0,qt.jsx)(tH,{as:fD,size:"small",label:"From",value:awe.start_date,inputFormat:"dd/MM/yyyy",onPaste:e=>{e.preventDefault()},renderInput:e=>(0,qt.jsx)(Q_,(0,i.A)((0,i.A)({},e),{},{autoComplete:"off",onKeyDown:e=>{e.preventDefault()}})),disablePast:!0}),(0,qt.jsx)(op,{}),(0,qt.jsx)(op,{display:"flex",alignItems:"center",pl:1,children:"-"}),(0,qt.jsx)(op,{className:"DatepickerForm",sx:e=>({"& .MuiFormControl-root":{display:"flex"},"& .MuiFormLabel-root":{color:e.palette.grey[800]}}),ml:1,children:(0,qt.jsx)(tH,{as:fD,size:"small",label:"To",value:awe.end_date,inputFormat:"dd/MM/yyyy",onPaste:e=>{e.preventDefault()},renderInput:e=>(0,qt.jsx)(Q_,(0,i.A)((0,i.A)({},e),{},{autoComplete:"off",onKeyDown:e=>{e.preventDefault()}})),minDate:awe.start_date?awe.start_date:new Date})})]})})]}),(0,qt.jsxs)(Ff,{item:!0,xs:12,children:[(0,qt.jsx)(Cf,{variant:"body1",component:"p",fontWeight:"h6.fontWeight",children:_e("rpm_Comments")}),(0,qt.jsx)(op,{sx:{whiteSpace:"normal"},children:(0,qt.jsx)(tH,{as:qj,fullWidth:!0,multiline:!0,rows:3,size:"small",variant:"outlined",placeholder:"Enter Comments",endAdornment:(0,qt.jsx)(tw,{position:"end",sx:{position:"absolute",right:"8px"},children:(0,qt.jsx)(sy,{title:_e("message:rpm_CommentsHelp"),placement:"top",children:(0,qt.jsx)(wh,{size:"small",disableRipple:!0,sx:{p:0},children:(0,qt.jsx)(pM.A,{fontSize:"small"})})})})})})]})]})})}),(0,qt.jsx)(vE,{sx:{py:3,px:4},children:(0,qt.jsxs)(op,{children:[(0,qt.jsx)(xh,{color:"primary",disableElevation:!0,variant:"contained",type:"submit",sx:{mr:2},children:_e("rpm_Submit")}),(0,qt.jsx)(xh,{variant:"outlined",color:"primary",children:_e("rpm_Cancel")})]})})]})},"program_formik")})};const lwe=function(){const e=[],[t,n]=(0,We.useState)(null),[r,o]=(0,We.useState)(!1),[a,s]=(0,We.useState)(!1),l=()=>{s(!a)};return(0,qt.jsxs)(qt.Fragment,{children:[(0,qt.jsx)(Kz,{enableReinitialize:!0,children:t=>{let{values:a,setFieldValue:s,setFieldTouched:c}=t;return(0,qt.jsx)(qt.Fragment,{children:(0,qt.jsx)(nH,{children:(0,qt.jsxs)(Ff,{container:!0,spacing:2,children:[(0,qt.jsxs)(Ff,{item:!0,xs:12,children:[(0,qt.jsx)(Cf,{variant:"body1",component:"p",fontWeight:"h6.fontWeight",children:_e("rpm_Medication")}),(0,qt.jsx)(op,{sx:{whiteSpace:"normal"},children:(0,qt.jsx)(tH,{as:qj,fullWidth:!0,size:"small",variant:"outlined",endAdornment:(0,qt.jsx)(tw,{position:"end",children:(0,qt.jsx)(sy,{title:_e("message:rpm_MedicineNameHelp"),placement:"top",children:(0,qt.jsx)(wh,{size:"small",disableRipple:!0,sx:{p:0},children:(0,qt.jsx)(pM.A,{fontSize:"small"})})})})})})]}),(0,qt.jsxs)(Ff,{item:!0,xs:12,children:[(0,qt.jsx)(Cf,{variant:"body1",component:"p",fontWeight:"h6.fontWeight",children:_e("rpm_Form")}),(0,qt.jsx)(op,{sx:{whiteSpace:"normal"},children:(0,qt.jsx)(tH,{as:G_,fullWidth:!0,size:"small",variant:"outlined",endAdornment:(0,qt.jsx)(tw,{position:"end",sx:{position:"absolute",right:"28px"},children:(0,qt.jsx)(sy,{title:_e("message:rpm_MedicineFormHelp"),placement:"top",children:(0,qt.jsx)(wh,{size:"small",disableRipple:!0,sx:{p:0},children:(0,qt.jsx)(pM.A,{fontSize:"small"})})})}),children:Id.map(e=>(0,qt.jsx)(mf,{value:e.key,children:"".concat(e.text)},e.key))})})]}),(0,qt.jsxs)(Ff,{item:!0,xs:12,children:[(0,qt.jsx)(Cf,{variant:"body1",component:"p",fontWeight:"h6.fontWeight",children:_e("rpm_Shape&Color")}),(0,qt.jsxs)(op,{children:[(0,qt.jsxs)(op,{display:"flex",gap:1,children:[(0,qt.jsx)(tH,{as:G_,size:"small",fullWidth:!0,variant:"outlined",className:"shapeDropDown",endAdornment:(0,qt.jsx)(tw,{position:"end",sx:{position:"absolute",right:"28px"},children:(0,qt.jsx)(sy,{title:_e("message:rpm_MedicineIconHelp"),placement:"top",children:(0,qt.jsx)(wh,{size:"small",disableRipple:!0,sx:{p:0},children:(0,qt.jsx)(pM.A,{fontSize:"small"})})})})}),(0,qt.jsx)(tH,{as:G_,size:"small",fullWidth:!0,variant:"outlined",MenuProps:{className:"horizontalList"},children:Bd.map(e=>(0,qt.jsx)(mf,{value:e.color,children:(0,qt.jsx)(op,{display:"flex",gap:1,children:(0,qt.jsx)(Cf,{variant:"span",className:"circleIcon ".concat(e.color)})})},e.key))})]}),(0,qt.jsx)(op,{children:ps(null===e||void 0===e?void 0:e.image)?(0,qt.jsxs)(op,{className:"upload-input-text",children:[(0,qt.jsx)("input",{type:"file"}),(0,qt.jsxs)("label",{htmlFor:"contained-button-file",style:{display:"flex",paddingTop:"5px"},children:[(0,qt.jsx)(op,{textOverflow:"ellipsis",whiteSpace:"nowrap",overflow:"hidden",children:_e("uploadImage")}),(0,qt.jsx)(op,{clone:!0,mr:1,color:"primary",children:(0,qt.jsx)(Cue,{width:22,height:22})})]})]}):(0,qt.jsxs)(op,{style:{display:"flex",paddingTop:"5px"},width:170,children:[(0,qt.jsx)(op,{textOverflow:"ellipsis",whiteSpace:"nowrap",style:{cursor:"pointer"},overflow:"hidden"}),(0,qt.jsx)(op,{mr:1,color:"primary",position:"relative",zIndex:2,children:(0,qt.jsx)(wh,{size:"small",color:"error","aria-label":"remove file",children:(0,qt.jsx)(xc,{width:22,height:22})})})]})})]})]}),(0,qt.jsxs)(Ff,{item:!0,xs:12,children:[(0,qt.jsx)(Cf,{variant:"body1",component:"p",fontWeight:"h6.fontWeight",children:_e("rpm_Strength")}),(0,qt.jsxs)(op,{display:"flex",children:[(0,qt.jsx)(tH,{as:qj,type:"number",size:"small",fullWidth:!0,onWheel:e=>e.target.blur(),onKeyDown:e=>{Pd.includes(e.key)&&e.preventDefault()},variant:"outlined",style:{borderRight:"0",borderRadius:"8px 0 0 8px"}}),(0,qt.jsx)(tH,{as:G_,size:"small",fullWidth:!0,variant:"outlined",style:{borderLeft:"0",borderRadius:"0 8px 8px 0"},className:"customListSelect",children:$d.map(e=>(0,qt.jsx)(mf,{value:e.key,children:"".concat(e.text)},e.key))})]})]}),(0,qt.jsxs)(Ff,{item:!0,xs:12,children:[(0,qt.jsxs)(Cf,{variant:"body1",component:"p",fontWeight:"h6.fontWeight",children:[_e("rpm_Frequency"),(0,qt.jsx)(op,{component:"span",children:"*"})]}),(0,qt.jsxs)(op,{sx:{whiteSpace:"normal"},children:[(0,qt.jsx)(tH,{as:G_,size:"small",fullWidth:!0,variant:"outlined",defaultValue:"",endAdornment:(0,qt.jsx)(tw,{position:"end",sx:{position:"absolute",right:"25px"},children:(0,qt.jsx)(sy,{title:_e("message:rpm_FrequencyHelp"),placement:"top",children:(0,qt.jsx)(wh,{size:"small",disableRipple:!0,sx:{p:0},children:(0,qt.jsx)(pM.A,{fontSize:"small"})})})}),children:null===Ld||void 0===Ld?void 0:Ld.map(e=>(0,qt.jsx)(mf,{value:e.key,children:"".concat(e.text)},e.key))}),(0,qt.jsx)(op,{children:(0,qt.jsxs)(xh,{variant:"text",component:"label",disableFocusRipple:!0,disableRipple:!0,onClick:()=>{n(),o(!r)},sx:{p:"0"},children:[(0,qt.jsx)(D_e.A,{fontSize:"small",sx:{width:16,height:16,mr:.5}}),_e("setReminder")]})}),(0,qt.jsx)(op,{display:"flex",flexWrap:"wrap",children:(null===e||void 0===e?void 0:e.timing)&&(null===e||void 0===e?void 0:e.timing.map((e,t)=>(0,qt.jsx)(op,{pr:.5,pb:.5,children:(0,qt.jsx)(Cf,{style:(null===e||void 0===e?void 0:e.start_time)&&{backgroundColor:"#EDEDED",borderRadius:"20px",padding:"3px 8px",fontSize:"13px",color:"#6B7280"}})},t)))})]})]}),(0,qt.jsxs)(Ff,{item:!0,xs:12,children:[(0,qt.jsxs)(Cf,{variant:"body1",component:"p",fontWeight:"h6.fontWeight",children:[_e("rpm_Days"),(0,qt.jsx)(op,{component:"span",children:"*"})]}),(0,qt.jsx)(op,{sx:{whiteSpace:"normal"},children:(0,qt.jsx)(tH,{as:qj,fullWidth:!0,size:"small",type:"number",variant:"outlined",onWheel:e=>e.target.blur(),onKeyDown:e=>Pd.includes(e.key)&&e.preventDefault(),endAdornment:(0,qt.jsx)(tw,{position:"end",sx:{position:"absolute",right:"8px"},children:(0,qt.jsx)(sy,{title:_e("message:rpm_MedicineDaysHelp"),placement:"top",children:(0,qt.jsx)(wh,{size:"small",disableRipple:!0,sx:{p:0},children:(0,qt.jsx)(pM.A,{fontSize:"small"})})})})})})]}),(0,qt.jsxs)(Ff,{item:!0,xs:12,children:[(0,qt.jsxs)(Cf,{variant:"body1",component:"p",fontWeight:"h6.fontWeight",mb:.5,children:[_e("rpm_Duration"),(0,qt.jsx)(op,{component:"span",children:"*"})]}),(0,qt.jsx)(WM,{dateAdapter:DI,children:(0,qt.jsxs)(op,{className:"DatepickerForm",sx:e=>({"& .MuiFormControl-root":{display:"flex"},"& .MuiFormLabel-root":{color:e.palette.grey[800]},"& .MuiOutlinedInput-input":{padding:"10px",fontSize:"14px"}}),mr:1,display:"flex",children:[(0,qt.jsx)(tH,{as:fD,size:"small",label:"From",value:e.start_date,inputFormat:"dd/MM/yyyy",onPaste:e=>{e.preventDefault()},renderInput:e=>(0,qt.jsx)(Q_,(0,i.A)((0,i.A)({},e),{},{autoComplete:"off",onKeyDown:e=>{e.preventDefault()}})),disablePast:!0}),(0,qt.jsx)(op,{}),(0,qt.jsx)(op,{display:"flex",alignItems:"center",pl:1,children:"-"}),(0,qt.jsx)(op,{className:"DatepickerForm",sx:e=>({"& .MuiFormControl-root":{display:"flex"},"& .MuiFormLabel-root":{color:e.palette.grey[800]}}),ml:1,children:(0,qt.jsx)(tH,{as:fD,size:"small",label:"To",value:e.end_date,inputFormat:"dd/MM/yyyy",onPaste:e=>{e.preventDefault()},renderInput:e=>(0,qt.jsx)(Q_,(0,i.A)((0,i.A)({},e),{},{autoComplete:"off",onKeyDown:e=>{e.preventDefault()}})),minDate:e.start_date?e.start_date:new Date})})]})})]}),(0,qt.jsxs)(Ff,{item:!0,xs:12,children:[(0,qt.jsx)(Cf,{variant:"body1",component:"p",fontWeight:"h6.fontWeight",children:_e("rpm_Comments")}),(0,qt.jsx)(op,{sx:{whiteSpace:"normal"},children:(0,qt.jsx)(tH,{as:qj,fullWidth:!0,multiline:!0,rows:3,size:"small",variant:"outlined",placeholder:"Enter Comments",endAdornment:(0,qt.jsx)(tw,{position:"end",sx:{position:"absolute",right:"8px"},children:(0,qt.jsx)(sy,{title:_e("message:rpm_CommentsHelp"),placement:"top",children:(0,qt.jsx)(wh,{size:"small",disableRipple:!0,sx:{p:0},children:(0,qt.jsx)(pM.A,{fontSize:"small"})})})})})})]}),(0,qt.jsx)(Ff,{item:!0,children:(0,qt.jsxs)(op,{children:[(0,qt.jsx)(xh,{color:"primary",disableElevation:!0,variant:"contained",type:"submit",sx:{mr:2},children:_e("rpm_savePrescription")}),(0,qt.jsx)(xh,{variant:"outlined",color:"primary",onClick:l,children:_e("rpm_AddMedicine")}),(0,qt.jsx)(wh,{color:"error",children:(0,qt.jsx)(xc,{fontSize:"small",sx:{width:16,height:16}})})]})})]})})})}}),(0,qt.jsx)(swe,{isModalOpen:a,toggleProgramModal:l})]})};const cwe=function(){return(0,qt.jsx)("div",{children:(0,qt.jsx)(lwe,{})})};function dwe(e){var t;let{editButton:n,deleteButton:r,viewButton:i,initialFormValues:o,addNewNote:a,showFilterColor:s,setShowFilterColor:l,fileUploadButton:c,fileModal:d,fileUploadIconButton:u,notesList:p,editableNoteId:h,downloadFile:m,setToggleAddNote:f,toggleAddNote:g,closeEditMode:v,editNote:x,fetchNoteList:y,pageDetails:b,filterState:j,setFilterState:_,onLocalFileDelete:C,onCloudFilesDelete:w,patientData:S,program:A,noteTypesDropdown:k}=e;const{t:T}=Vg(),E=Nt(),{programId:M,patientId:O}=lo(),R=so(),P=[{name:T("rpm_RPM"),url:ld.DOCTOR.PROGRAM},{name:null===A||void 0===A?void 0:A.display_name,url:"".concat(ld.DOCTOR.PROGRAM,"/").concat(null===A||void 0===A?void 0:A.code,"/patients")},{name:"".concat((null===S||void 0===S?void 0:S.first_name)||""," ").concat((null===S||void 0===S?void 0:S.last_name)||""),url:"".concat(ld.DOCTOR.PROGRAM,"/").concat(null===A||void 0===A?void 0:A.code,"/patients/").concat(null===S||void 0===S?void 0:S.id,"/dashboard")},{name:T("rpm_OtherNotes"),url:""}],D=["header","bold","italic","underline","strike","blockquote","size","color","list","bullet","indent","link"],N=We.useRef(null),L=We.useMemo(()=>({toolbar:{container:[["bold","italic","underline","strike"],[{size:[]},{color:[]}],[{list:"ordered"},{list:"bullet"},{indent:"-1"},{indent:"+1"},{align:[]}],["link","image","video"],["clean"]],history:{delay:500,maxStack:100,userOnly:!0}},clipboard:{matchVisual:!1}}),[]),I=e=>{const t=null===e||void 0===e?void 0:e.split("/");return t[(null===t||void 0===t?void 0:t.length)-1]},F=()=>{var e,t,n,r,i,o,a,s,l,c;return(0,qt.jsxs)(qt.Fragment,{children:[!cs(null===d||void 0===d||null===(e=d.data)||void 0===e||null===(t=e.local_files)||void 0===t||null===(n=t.local)||void 0===n?void 0:n.files)&&(null===d||void 0===d||null===(r=d.data)||void 0===r||null===(i=r.local_files)||void 0===i||null===(o=i.local)||void 0===o||null===(a=o.files)||void 0===a?void 0:a.map((e,t)=>(0,qt.jsx)(Eb,{sx:{ml:1,mb:1},onDelete:()=>C(t),icon:(0,qt.jsx)(Aje.A,{fontSize:"small"}),label:null===e||void 0===e?void 0:e.name,variant:"string",className:"UplodeChip"},t))),!cs(null===d||void 0===d||null===(s=d.data)||void 0===s?void 0:s.files)&&(null===d||void 0===d||null===(l=d.data)||void 0===l||null===(c=l.files)||void 0===c?void 0:c.map((e,t)=>(0,qt.jsx)(Eb,{sx:{ml:1,mb:1},onDelete:()=>w(null===d||void 0===d?void 0:d.data,null===e||void 0===e?void 0:e.id,t),icon:(0,qt.jsx)(Sje.A,{}),onClick:()=>{m({noteId:h,file:e})},label:I(null===e||void 0===e?void 0:e.file_name),variant:"string",className:"UplodeChip"},t)))]})},$=()=>{f(!g),h&&v()},B=e=>{var t,n,r;let{noteObj:i}=e;const[o,a]=We.useState(2);return(0,qt.jsxs)(qt.Fragment,{children:[null===i||void 0===i||null===(t=i.files)||void 0===t||null===(n=t.slice(0,o))||void 0===n?void 0:n.map(e=>(0,qt.jsx)(Eb,{sx:{color:"primary.theme.500",borderRadius:"0",textDecoration:"underline",height:"inherit"},"data-id":e.id,label:I(e.file_name),variant:"string",className:"attachment_btn",onClick:()=>{m({noteId:i.id,file:e})}},e.id)),(null===i||void 0===i||null===(r=i.files)||void 0===r?void 0:r.length)>=3&&(0,qt.jsx)(sy,{title:T("rpm_ShowMore"),children:(0,qt.jsx)(wh,{disableRipple:!0,size:"small",onClick:()=>{var e,t;o===(null===i||void 0===i||null===(e=i.files)||void 0===e?void 0:e.length)?a(2):a(null===i||void 0===i||null===(t=i.files)||void 0===t?void 0:t.length)},children:"..."})})]})};return We.useEffect(()=>{const e={breadcrumb:P};cs(A)||cs(S)||E(NC(e))},[A,S]),(0,qt.jsxs)(op,{children:[(0,qt.jsx)(op,{sx:{width:"100%"},children:(0,qt.jsxs)(Ff,{container:!0,children:[(0,qt.jsx)(Ff,{item:!0,xs:12,sm:6,children:(0,qt.jsxs)(op,{sx:{mb:1},position:"relative",children:[(0,qt.jsx)(op,{sx:{display:{xs:"none",sm:"block"}},children:(0,qt.jsx)(Cf,{variant:"h5",component:"h5",children:T("rpm_Notes")})}),(0,qt.jsx)(op,{sx:{display:{xs:"block",sm:"none"}},position:"absolute",top:"-48px",left:"40px",children:(0,qt.jsx)(Cf,{variant:"h6",component:"h6",children:T("rpm_Notes")})})]})}),(0,qt.jsx)(Ff,{item:!0,xs:12,md:6,children:(0,qt.jsxs)(op,{display:"flex",flexWrap:"wrap",gap:1,mb:3,justifyContent:"end",children:[(0,qt.jsx)(xh,{variant:"outlined",size:"small",disableElevation:!0,onClick:()=>R("".concat(ld.DOCTOR.PROGRAM,"/").concat(M,"/patients/").concat(O,"/notes/resolve-alerts")),children:T("rpm_NoteResolvedAlerts")}),k.existingNoteTypes.map(e=>{if("PRESCRIPTION"!==e)return(0,qt.jsx)(qt.Fragment,{children:(0,qt.jsx)(xh,{variant:"OTHER"===e?"contained":"outlined",size:"small",disableElevation:!0,onClick:()=>R("".concat(ld.DOCTOR.PROGRAM,"/").concat(M,"/patients/").concat(O,"/notes/").concat(e.toLowerCase(),"-note")),children:T("rpm_".concat(xs(e.toLowerCase()),"Notes"))})})}),!cs(k.nonExistingNoteTypes)&&(0,qt.jsx)(op,{sx:{display:"flex",alignItems:"center","& .MuiSelect-select":{p:.7}},className:"remove_selectborder",children:(0,qt.jsx)(d_,{sx:{display:"flex",alignItems:"center"},children:(0,qt.jsxs)(G_,{sx:k.nonExistingNoteTypes.includes("OTHER")?{maxWidth:180,color:"white",backgroundColor:"primary.theme.500",borderColor:"primary.theme.500",borderRadius:"4px",pl:"5px",fontSize:"14px","& svg":{color:"#fff"}}:{maxWidth:180,color:"primary.theme.500",borderColor:"primary.theme.500",borderRadius:"4px",pl:"5px",fontSize:"14px"},fullWidth:!0,variant:"outlined",size:"small",value:k.nonExistingNoteTypes.includes("OTHER")?"OTHER":"additionalNotes",children:[(0,qt.jsx)(mf,{value:"additionalNotes",disabled:!0,sx:{display:"none"},children:T("rpm_AdditionalNotes")}),k.nonExistingNoteTypes.map(e=>{if("PRESCRIPTION"!==e)return(0,qt.jsx)(mf,{value:e,onClick:()=>R("".concat(ld.DOCTOR.PROGRAM,"/").concat(M,"/patients/").concat(O,"/notes/").concat(e.toLowerCase(),"-note")),children:T("rpm_".concat(xs(e.toLowerCase()),"Notes"))},e)})]})})})]})})]})}),(0,qt.jsx)(op,{bgcolor:"white",className:"UseNoteFilter",p:2,children:(0,qt.jsx)(Ff,{container:!0,spacing:2,alignItems:"center",children:(0,qt.jsx)(Ff,{item:!0,md:12,lg:9,xl:8,children:(0,qt.jsx)(MCe,{fetchListFunction:y,pageDetails:b,filterState:j,setFilterState:_,showFilterColor:s,setShowFilterColor:l})})})}),(0,qt.jsx)(eg,{}),(0,qt.jsxs)(op,{bgcolor:"white",p:2,children:[cs(p)&&!g&&(0,qt.jsx)(OCe,{handleToggleAddNote:$,showFilterColor:s}),!cs(p)&&(0,qt.jsx)(qt.Fragment,{children:(null===A||void 0===A||null===(t=A.permissions)||void 0===t?void 0:t.showCreateNoteList)&&(0,qt.jsx)(xh,{variant:"contained",disableElevation:!0,startIcon:(0,qt.jsx)(Jxe.A,{}),onClick:$,color:"primary",sx:{fontWeight:"600",marginBottom:"8px"},children:T("rpm_AddNewNote")})}),g&&(0,qt.jsx)(Kz,{initialValues:o,enableReinitialize:!0,validationSchema:RU.noteSchema,onSubmit:a,children:e=>{var t,n,r;let{values:i,setFieldValue:o}=e;return(0,qt.jsx)(nH,{children:(0,qt.jsxs)(Ff,{container:!0,className:"EditorPageNotes",spacing:2,mb:2,children:[(0,qt.jsxs)(Ff,{item:!0,xs:12,md:5,children:[(0,qt.jsxs)(d_,{sx:{display:"flex",alignItems:"center"},children:[(0,qt.jsx)(o_,{id:"vital",children:T("rpm_VitalType")}),(0,qt.jsx)(G_,{fullWidth:!0,variant:"outlined",size:"small",name:"vital",id:"vital",onChange:e=>{o("vital",e.target.value)},labelId:"vital",label:T("rpm_VitalType"),endAdornment:(0,qt.jsx)(tw,{position:"end",sx:{position:"absolute",right:"28px"},children:(0,qt.jsx)(sy,{title:T("message:rpm_VitalTypeNoteHelp"),placement:"top",children:(0,qt.jsx)(wh,{size:"small",disableRipple:!0,sx:{p:0},children:(0,qt.jsx)(pM.A,{fontSize:"small"})})})}),children:Nd.map(e=>(0,qt.jsx)(mf,{value:e.value,children:T("rpm_".concat(e.name))},e.value))})]}),(0,qt.jsx)(dH,{name:"vital",children:e=>(0,qt.jsx)(v_,{error:!0,children:T(e,{field:T("rpm_VitalType")})})})]}),(0,qt.jsxs)(Ff,{item:!0,xs:12,md:9,children:[(0,qt.jsxs)(op,{className:" text-editor",width:"100%",children:[(0,qt.jsx)(ECe(),{theme:"snow",modules:L,formats:D,value:null===i||void 0===i?void 0:i.description,onChange:e=>{o("description",e)},ref:N}),(0,qt.jsx)(dH,{name:"description",children:e=>(0,qt.jsx)(v_,{error:!0,children:T(e,{field:T("rpm_Note")})})})]}),(0,qt.jsxs)(op,{mt:2,children:[(0,qt.jsx)(xh,{disableElevation:!0,variant:"outlined",color:"primary",onClick:$,sx:{marginRight:"10px"},children:T("rpm_Cancel")}),(0,qt.jsx)(xh,{disableElevation:!0,variant:"contained",sx:{marginRight:2},type:"submit",children:T("rpm_Save")})]})]}),(0,qt.jsx)(Ff,{item:!0,xs:12,md:3,children:(0,qt.jsx)(op,{children:(0,qt.jsxs)(qt.Fragment,{children:[(0,qt.jsx)(F,{}),cs(null===d||void 0===d||null===(t=d.data)||void 0===t||null===(n=t.local_files)||void 0===n||null===(r=n.local)||void 0===r?void 0:r.files)?c("upload",{}):u("upload",{})]})})})]})})}}),p.map(e=>{var t,i;return(0,qt.jsx)(qt.Fragment,{children:h!==e.id?(0,qt.jsxs)(Ff,{container:!0,spacing:2,mb:2,children:[(0,qt.jsx)(Ff,{item:!0,xs:11,children:(0,qt.jsxs)(op,{sx:{bgcolor:"primary.theme.50",borderRadius:1,p:1},children:[(0,qt.jsx)(Cf,{variant:"body2",fontWeight:600,children:T("rpm_".concat(e.vital))}),(0,qt.jsx)(Cf,{variant:"body2",dangerouslySetInnerHTML:{__html:e.note},color:"inherit",sx:{wordBreak:"break-all"},className:"savemode"}),(0,qt.jsxs)(Cf,{variant:"body2",mb:.6,children:[(0,qt.jsxs)(op,{component:"span",fontWeight:600,sx:{verticalAlign:"middle"},children:[T("rpm_Attachment"),":\xa0"]}),(0,qt.jsx)(op,{component:"span",sx:{color:"primary.theme.500",fontWeight:"600",pl:"0"},children:(0,qt.jsx)(B,{noteObj:e})})]}),(0,qt.jsxs)(op,{sx:{display:"flex",alignItems:"center"},children:[(0,qt.jsxs)(Cf,{sx:{fontSize:"14px"},children:["Created by \xa0",(0,qt.jsx)(op,{component:"span",fontWeight:600,children:e.created_by}),"\xa0 on \xa0",(0,qt.jsx)(op,{component:"span",fontWeight:600,children:sa()(e.created_at).format("DD MMM YYYY hh:mm A")}),"\xa0\xa0"]}),(0,qt.jsxs)(Cf,{sx:{fontSize:"14px"},children:["Last Updated by \xa0",(0,qt.jsx)(op,{component:"span",fontWeight:600,children:e.updated_by||e.created_by}),"\xa0 on \xa0",(0,qt.jsx)(op,{component:"span",fontWeight:600,children:e.updated_at?sa()(e.updated_at).format("DD MMM YYYY hh:mm A"):sa()(e.created_at).format("DD MMM YYYY hh:mm A")})]})]})]})}),(0,qt.jsx)(Ff,{item:!0,xs:1,children:(0,qt.jsxs)(op,{sx:{margin:1},className:"BGbtnGrp",children:[(null===A||void 0===A||null===(t=A.permissions)||void 0===t?void 0:t.showEditNote)&&n(e),!1,(null===A||void 0===A||null===(i=A.permissions)||void 0===i?void 0:i.showDeleteList)&&r({id:e.id})]})})]}):(0,qt.jsx)(Kz,{initialValues:o,enableReinitialize:!0,onSubmit:x,validationSchema:RU.noteSchema,children:t=>{var n,r,i;let{values:o,setFieldValue:a}=t;return(0,qt.jsx)(nH,{children:(0,qt.jsxs)(Ff,{container:!0,spacing:2,className:"EditorPageNotes",mt:1,mb:2,children:[(0,qt.jsxs)(Ff,{item:!0,xs:12,md:5,children:[(0,qt.jsxs)(d_,{sx:{display:"flex",alignItems:"center"},children:[(0,qt.jsx)(o_,{id:"vital",children:T("rpm_VitalType")}),(0,qt.jsx)(G_,{fullWidth:!0,variant:"outlined",size:"small",name:"vital",id:"vital",value:o.vital,onChange:e=>{a("vital",e.target.value)},labelId:"vital",label:T("rpm_VitalType"),endAdornment:(0,qt.jsx)(tw,{position:"end",sx:{position:"absolute",right:"28px"},children:(0,qt.jsx)(sy,{title:T("message:rpm_VitalTypeNoteHelp"),placement:"top",children:(0,qt.jsx)(wh,{size:"small",disableRipple:!0,sx:{p:0},children:(0,qt.jsx)(pM.A,{fontSize:"small"})})})}),children:Nd.map(e=>(0,qt.jsx)(mf,{value:e.value,children:T("rpm_".concat(e.name))},e.value))})]}),(0,qt.jsx)(dH,{name:"vital",children:e=>(0,qt.jsx)(v_,{error:!0,children:T(e,{field:T("rpm_VitalType")})})})]}),(0,qt.jsxs)(Ff,{item:!0,xs:12,md:9,children:[(0,qt.jsxs)(op,{className:" text-editor",width:"100%",children:[(0,qt.jsx)(ECe(),{theme:"snow",modules:L,formats:D,value:o.description,onChange:e=>a("description",e),ref:N}),(0,qt.jsx)(dH,{name:"description",children:e=>(0,qt.jsx)(v_,{error:!0,children:T(e,{field:T("rpm_Note")})})})]}),(0,qt.jsxs)(op,{mt:2,children:[(0,qt.jsx)(xh,{disableElevation:!0,variant:"outlined",color:"primary",onClick:v,children:T("rpm_Cancel")})," ",(0,qt.jsx)(xh,{disableElevation:!0,variant:"contained",sx:{marginRight:2},type:"submit",children:T("rpm_Save")})]})]}),(0,qt.jsx)(Ff,{item:!0,xs:12,md:3,children:(0,qt.jsx)(op,{children:(0,qt.jsxs)(qt.Fragment,{children:[(0,qt.jsx)(F,{}),cs(null===d||void 0===d||null===(n=d.data)||void 0===n||null===(r=n.local_files)||void 0===r||null===(i=r.local)||void 0===i?void 0:i.files)?c("upload",e):u("upload",e)]})})})]})})}})})}),(0,qt.jsx)(op,{sx:e=>({pr:2,bgcolor:e.palette.common.white}),children:(0,qt.jsx)(KE,{pageDetails:b,fetchListFunction:y})})]})]})}dwe.defaultProps={alertsHead:[],order:"",orderBy:"",dataParameter:"",checkState:[],isSelection:!1,nodata:"",alertsList:[],otherResolvedAlertList:[],resolvedAlertList:[],initialFormValues:{},addNewNote:()=>{},fileUploadButton:()=>{},fileModal:{},fileUploadIconButton:()=>{},notesList:[],editableNoteId:"",downloadFile:()=>{},setToggleAddNote:()=>{},toggleAddNote:!1,closeEditMode:()=>{},editNote:()=>{},fetchNoteList:()=>{},pageDetails:{},filterState:{},setFilterState:()=>{},onLocalFileDelete:()=>{},onCloudFilesDelete:()=>{},program:{},patientData:{},noteTypesDropdown:{},showFilterColor:{},setShowFilterColor:()=>{}};const uwe=dwe;function pwe(e){var t;let{MobileeditButton:n,MobiledeleteButton:r,viewButton:i,initialFormValues:o,addNewNote:a,showFilterColor:s,setShowFilterColor:l,MobilefileUploadButton:c,fileModal:d,fileUploadIconButton:u,notesList:p,editableNoteId:h,downloadFile:m,setToggleAddNote:f,toggleAddNote:g,closeEditMode:v,editNote:x,fetchNoteList:y,pageDetails:b,filterState:j,setFilterState:_,onLocalFileDelete:C,onCloudFilesDelete:w,patientData:S,program:A,noteTypesDropdown:k}=e;const T=ICe(),{t:E}=Vg(),M=Nt(),{programId:O,patientId:R}=lo(),P=so(),[D,N]=(0,We.useState)(!1),L=e=>()=>{N(e)},I=[{name:E("rpm_RPM"),url:ld.DOCTOR.PROGRAM},{name:null===A||void 0===A?void 0:A.display_name,url:"".concat(ld.DOCTOR.PROGRAM,"/").concat(null===A||void 0===A?void 0:A.code,"/patients")},{name:"".concat((null===S||void 0===S?void 0:S.first_name)||""," ").concat((null===S||void 0===S?void 0:S.last_name)||""),url:"".concat(ld.DOCTOR.PROGRAM,"/").concat(null===A||void 0===A?void 0:A.code,"/patients/").concat(null===S||void 0===S?void 0:S.id,"/dashboard")},{name:E("rpm_OtherNotes"),url:""}],F=["header","bold","italic","underline","strike","blockquote","size","color","list","bullet","indent","link"],$=We.useRef(null),B=We.useMemo(()=>({toolbar:{container:[["bold","italic","underline","strike"],[{size:[]},{color:[]}],[{list:"ordered"},{list:"bullet"},{indent:"-1"},{indent:"+1"},{align:[]}],["link","image","video"],["clean"]],history:{delay:500,maxStack:100,userOnly:!0}},clipboard:{matchVisual:!1}}),[]),z=e=>{const t=null===e||void 0===e?void 0:e.split("/");return t[(null===t||void 0===t?void 0:t.length)-1]},H=()=>{var e,t,n,r,i,o,a,s,l,c;return(0,qt.jsxs)(qt.Fragment,{children:[!cs(null===d||void 0===d||null===(e=d.data)||void 0===e||null===(t=e.local_files)||void 0===t||null===(n=t.local)||void 0===n?void 0:n.files)&&(null===d||void 0===d||null===(r=d.data)||void 0===r||null===(i=r.local_files)||void 0===i||null===(o=i.local)||void 0===o||null===(a=o.files)||void 0===a?void 0:a.map((e,t)=>(0,qt.jsx)(Eb,{sx:{ml:1,mb:1},onDelete:()=>C(t),icon:(0,qt.jsx)(Aje.A,{fontSize:"small"}),label:null===e||void 0===e?void 0:e.name,variant:"string",className:"UplodeChip"},t))),!cs(null===d||void 0===d||null===(s=d.data)||void 0===s?void 0:s.files)&&(null===d||void 0===d||null===(l=d.data)||void 0===l||null===(c=l.files)||void 0===c?void 0:c.map((e,t)=>(0,qt.jsx)(Eb,{sx:{ml:1,mb:1},onDelete:()=>w(null===d||void 0===d?void 0:d.data,null===e||void 0===e?void 0:e.id,t),icon:(0,qt.jsx)(Sje.A,{}),onClick:()=>{m({noteId:h,file:e})},label:z(null===e||void 0===e?void 0:e.file_name),variant:"string",className:"UplodeChip"},t)))]})},W=()=>{f(!g),h&&v()},U=e=>{var t,n,r;let{noteObj:i}=e;const[o,a]=We.useState(2);return(0,qt.jsxs)(qt.Fragment,{children:[null===i||void 0===i||null===(t=i.files)||void 0===t||null===(n=t.slice(0,o))||void 0===n?void 0:n.map(e=>(0,qt.jsx)(Eb,{sx:{color:"black",borderRadius:"0",textDecoration:"underline",height:"inherit",pl:"0 !important"},"data-id":e.id,label:z(e.file_name),variant:"string",className:T.attachment_btn,onClick:()=>{m({noteId:i.id,file:e})}},e.id)),(null===i||void 0===i||null===(r=i.files)||void 0===r?void 0:r.length)>=3&&(0,qt.jsx)(sy,{title:E("rpm_ShowMore"),children:(0,qt.jsx)(wh,{disableRipple:!0,size:"small",onClick:()=>{var e,t;o===(null===i||void 0===i||null===(e=i.files)||void 0===e?void 0:e.length)?a(2):a(null===i||void 0===i||null===(t=i.files)||void 0===t?void 0:t.length)},children:"..."})})]})};return We.useEffect(()=>{const e={breadcrumb:I};cs(A)||cs(S)||M(NC(e))},[A,S]),(0,qt.jsxs)(op,{children:[(0,qt.jsxs)(op,{sx:{width:"100%"},children:[(0,qt.jsxs)(op,{sx:{mb:1},position:"relative",children:[(0,qt.jsx)(op,{position:"absolute",top:"-45px",left:"40px",children:(0,qt.jsx)(Cf,{variant:"h6",component:"h6",fontSize:16,children:E("rpm_Notes")})}),(0,qt.jsx)(op,{position:"absolute",top:"-50px",right:"0px",children:(0,qt.jsx)(op,{children:(0,qt.jsx)(wh,{onClick:L(!0),sx:{background:"#e8eaf6",padding:"5px"},children:(0,qt.jsx)(DCe.A,{color:"primary",sx:{padding:"0"}})})})})]}),(0,qt.jsx)(dg,{anchor:"left",open:D,onClose:L(!1),children:(0,qt.jsxs)("div",{style:{width:230},children:[(0,qt.jsxs)("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between",background:"#f2f2fe",padding:"5px 10px"},children:[(0,qt.jsx)(Cf,{variant:"h6",sx:{color:"#7986cb",fontWeight:"600"},children:E("rpm_Notes")}),(0,qt.jsx)(wh,{onClick:L(!1),children:(0,qt.jsx)(J_.A,{})})]}),(0,qt.jsx)(op,{sx:{padding:"10px"},children:(0,qt.jsxs)(op,{display:"flex",flexWrap:"wrap",gap:1,mb:3,justifyContent:"end",children:[k.existingNoteTypes.map(e=>{if("PRESCRIPTION"!==e)return(0,qt.jsx)(qt.Fragment,{children:(0,qt.jsx)(xh,{fullWidth:!0,variant:"OTHER"===e?"contained":"outlined",size:"small",disableElevation:!0,onClick:()=>P("".concat(ld.DOCTOR.PROGRAM,"/").concat(O,"/patients/").concat(R,"/notes/").concat(e.toLowerCase(),"-note")),children:E("rpm_".concat(xs(e.toLowerCase()),"Notes"))})})}),!cs(k.nonExistingNoteTypes)&&(0,qt.jsx)(op,{sx:{display:"flex",alignItems:"center","& .MuiSelect-select":{p:.7},width:"100%"},className:"remove_selectborder",children:(0,qt.jsx)(d_,{sx:{display:"flex",alignItems:"center",width:"100%"},children:(0,qt.jsxs)(G_,{sx:k.nonExistingNoteTypes.includes("OTHER")?{color:"primary.theme.500",fontWeight:"500",borderColor:"primary.theme.500",borderRadius:"4px",pl:"5px",fontSize:"13px","& svg":{color:"#fff"}}:{maxWidth:180,color:"primary.theme.500",borderColor:"primary.theme.500",borderRadius:"4px",pl:"5px",fontSize:"14px"},fullWidth:!0,variant:"outlined",size:"small",value:k.nonExistingNoteTypes.includes("OTHER")?"OTHER":"additionalNotes",children:[(0,qt.jsx)(mf,{value:"additionalNotes",disabled:!0,sx:{display:"none"},children:E("rpm_AdditionalNotes")}),k.nonExistingNoteTypes.map(e=>{if("PRESCRIPTION"!==e)return(0,qt.jsx)(mf,{value:e,onClick:()=>P("".concat(ld.DOCTOR.PROGRAM,"/").concat(O,"/patients/").concat(R,"/notes/").concat(e.toLowerCase(),"-note")),children:E("rpm_".concat(xs(e.toLowerCase()),"Notes"))},e)})]})})}),(0,qt.jsx)(xh,{fullWidth:!0,variant:"outlined",size:"small",disableElevation:!0,onClick:()=>P("".concat(ld.DOCTOR.PROGRAM,"/").concat(O,"/patients/").concat(R,"/notes/resolve-alerts")),endIcon:(0,qt.jsx)(FCe.A,{sx:{color:"#3f51b5"}}),sx:{justifyContent:"space-between"},children:E("rpm_NoteResolvedAlerts")})]})})]})})]}),(0,qt.jsxs)(op,{display:"flex",alignItems:"center",justifyContent:"space-between",mb:1,children:[(0,qt.jsx)(op,{children:(0,qt.jsx)(LCe,{fetchListFunction:y,pageDetails:b,filterState:j,setFilterState:_,showFilterColor:s,setShowFilterColor:l,filterVariant:"text",filterName:"Filters",mobileFilterBG:!0})}),(0,qt.jsx)(op,{children:!cs(p)&&(0,qt.jsx)(qt.Fragment,{children:(null===A||void 0===A||null===(t=A.permissions)||void 0===t?void 0:t.showCreateNoteList)&&(0,qt.jsx)(xh,{variant:"contained",disableElevation:!0,startIcon:(0,qt.jsx)(Jxe.A,{}),onClick:W,color:"primary",sx:{fontWeight:"600",fontSize:"12px"},className:T.addnewBtn,children:E("rpm_AddNew")})})})]}),cs(p)&&!g&&(0,qt.jsx)(op,{bgcolor:"white",className:"noDataAddedField",children:(0,qt.jsx)(OCe,{handleToggleAddNote:W,showFilterColor:s})}),(0,qt.jsxs)(op,{children:[g&&(0,qt.jsx)(Kz,{initialValues:o,enableReinitialize:!0,validationSchema:RU.noteSchema,onSubmit:a,children:e=>{var t,n,r;let{values:i,setFieldValue:o}=e;return(0,qt.jsx)(nH,{children:(0,qt.jsxs)(op,{bgcolor:"white",sx:{padding:"16px",borderRadius:"8px",marginBottom:"8px",borderTop:"5px solid #3f51b5",borderBottom:"1px solid #3f51b5",borderLeft:"1px solid #3f51b5",borderRight:"1px solid #3f51b5"},children:[(0,qt.jsxs)(op,{className:"vitalEdits",children:[(0,qt.jsx)(Cf,{variant:"span",id:"vital",sx:{marginBottom:"5px"},children:E("rpm_VitalType")}),(0,qt.jsx)(d_,{sx:{display:"flex",alignItems:"center",marginTop:"5px"},children:(0,qt.jsx)(G_,{fullWidth:!0,variant:"outlined",size:"small",name:"vital",id:"vital",onChange:e=>{o("vital",e.target.value)},labelId:"vital",label:E("rpm_VitalType"),endAdornment:(0,qt.jsx)(tw,{position:"end",sx:{position:"absolute",right:"28px"},children:(0,qt.jsx)(sy,{title:E("message:rpm_VitalTypeNoteHelp"),placement:"top",children:(0,qt.jsx)(wh,{size:"small",disableRipple:!0,sx:{p:0},children:(0,qt.jsx)(pM.A,{fontSize:"small"})})})}),children:Nd.map(e=>(0,qt.jsx)(mf,{value:e.value,children:E("rpm_".concat(e.name))},e.value))})}),(0,qt.jsx)(dH,{name:"vital",children:e=>(0,qt.jsx)(v_,{error:!0,children:E(e,{field:E("rpm_VitalType")})})})]}),(0,qt.jsxs)(op,{mt:2,className:"text-editor quilldesign",width:"100%",mb:2,children:[(0,qt.jsx)(ECe(),{theme:"snow",modules:B,formats:F,value:null===i||void 0===i?void 0:i.description,onChange:e=>{o("description",e)},ref:$}),(0,qt.jsx)(dH,{name:"description",children:e=>(0,qt.jsx)(v_,{error:!0,children:E(e,{field:E("rpm_Note")})})})]}),(0,qt.jsx)(op,{mt:2,mb:2,width:"100%",sx:{margin:"auto"},children:(0,qt.jsxs)(qt.Fragment,{children:[(0,qt.jsx)(H,{}),cs(null===d||void 0===d||null===(t=d.data)||void 0===t||null===(n=t.local_files)||void 0===n||null===(r=n.local)||void 0===r?void 0:r.files)?c("upload",{}):u("upload",{})]})}),(0,qt.jsxs)(op,{mt:2,display:"flex",children:[(0,qt.jsx)(xh,{disableElevation:!0,variant:"outlined",color:"primary",onClick:W,sx:{marginRight:"10px"},fullWidth:!0,children:E("rpm_Cancel")}),(0,qt.jsx)(xh,{disableElevation:!0,variant:"contained",type:"submit",fullWidth:!0,children:E("rpm_Save")})]})]})})}}),p.map(e=>{var t,i;return(0,qt.jsx)(qt.Fragment,{children:h!==e.id?(0,qt.jsxs)(op,{sx:{bgcolor:"white",borderRadius:"8px"},children:[(0,qt.jsxs)(op,{sx:{background:"#eaeaff",color:"#7986cb",fontWeight:"600",padding:"8px 16px",borderRadius:"8px 8px 0 0",display:"flex",alignItems:"center",justifyContent:"space-between"},children:[(0,qt.jsx)(Cf,{variant:"body2",fontWeight:600,children:E("rpm_".concat(e.vital))}),(0,qt.jsxs)(op,{className:T.actionButtons,children:[(null===A||void 0===A||null===(t=A.permissions)||void 0===t?void 0:t.showEditNote)&&n(e),!1,(null===A||void 0===A||null===(i=A.permissions)||void 0===i?void 0:i.showDeleteList)&&r({id:e.id})]})]}),(0,qt.jsxs)(op,{sx:{p:"8px 16px",mb:"10px"},children:[(0,qt.jsx)(op,{component:"span",fontWeight:600,sx:{verticalAlign:"middle"},className:T.titles,children:"Description:"}),(0,qt.jsx)(Cf,{variant:"body2",dangerouslySetInnerHTML:{__html:e.note},color:"inherit",sx:{wordBreak:"break-all",marginTop:"0"},className:"savemode"}),(0,qt.jsxs)(op,{component:"span",fontWeight:600,sx:{verticalAlign:"middle"},className:T.titles,children:[E("rpm_Attachment"),":"]}),(0,qt.jsx)(Cf,{variant:"body2",mb:.6,children:(0,qt.jsx)(op,{component:"span",sx:{color:"black",fontWeight:"600",pl:"0 !important"},className:"fileObjectName",children:(0,qt.jsx)(U,{noteObj:e})})}),(0,qt.jsx)(op,{component:"span",fontWeight:600,sx:{verticalAlign:"middle"},className:T.titles,children:"Created by:"}),(0,qt.jsx)(Cf,{variant:"body2",mb:.6,children:(0,qt.jsxs)(op,{component:"span",fontWeight:600,sx:{fontSize:"14px"},children:[e.created_by,(0,qt.jsx)("span",{style:{padding:"0 5px",fontWeight:"normal"},children:"on"}),sa()(e.created_at).format("DD MMM YYYY hh:mm A")]})}),(0,qt.jsx)(op,{component:"span",fontWeight:600,sx:{verticalAlign:"middle"},className:T.titles,children:"Last Updated by :"}),(0,qt.jsx)(Cf,{variant:"body2",mb:.6,children:(0,qt.jsxs)(op,{component:"span",fontWeight:600,sx:{fontSize:"14px"},children:[e.updated_by||e.created_by,(0,qt.jsx)("span",{style:{padding:"0 5px",fontWeight:"normal"},children:"on"}),e.updated_at?sa()(e.updated_at).format("DD MMM YYYY hh:mm A"):sa()(e.created_at).format("DD MMM YYYY hh:mm A")]})})]})]}):(0,qt.jsx)(Kz,{initialValues:o,enableReinitialize:!0,onSubmit:x,validationSchema:RU.noteSchema,children:t=>{var n,r,i;let{values:o,setFieldValue:a}=t;return(0,qt.jsx)(nH,{children:(0,qt.jsxs)(op,{bgcolor:"white",sx:{padding:"16px",borderRadius:"8px",marginBottom:"8px",borderTop:"5px solid #3f51b5",borderBottom:"1px solid #3f51b5",borderLeft:"1px solid #3f51b5",borderRight:"1px solid #3f51b5"},children:[(0,qt.jsxs)(op,{className:"vitalEdits",children:[(0,qt.jsx)(Cf,{variant:"span",id:"vital",sx:{marginBottom:"5px"},children:E("rpm_VitalType")}),(0,qt.jsx)(d_,{sx:{display:"flex",alignItems:"center",marginTop:"5px"},children:(0,qt.jsx)(G_,{fullWidth:!0,variant:"outlined",size:"small",name:"vital",id:"vital",value:o.vital,onChange:e=>{a("vital",e.target.value)},labelId:"vital",label:E("rpm_VitalType"),endAdornment:(0,qt.jsx)(tw,{position:"end",sx:{position:"absolute",right:"28px"},children:(0,qt.jsx)(sy,{title:E("message:rpm_VitalTypeNoteHelp"),placement:"top",children:(0,qt.jsx)(wh,{size:"small",disableRipple:!0,sx:{p:0},children:(0,qt.jsx)(pM.A,{fontSize:"small"})})})}),children:Nd.map(e=>(0,qt.jsx)(mf,{value:e.value,children:E("rpm_".concat(e.name))},e.value))})}),(0,qt.jsx)(dH,{name:"vital",children:e=>(0,qt.jsx)(v_,{error:!0,children:E(e,{field:E("rpm_VitalType")})})})]}),(0,qt.jsxs)(op,{mt:2,className:"text-editor quilldesign",width:"100%",children:[(0,qt.jsx)(ECe(),{theme:"snow",modules:B,formats:F,value:o.description,onChange:e=>a("description",e),ref:$}),(0,qt.jsx)(dH,{name:"description",children:e=>(0,qt.jsx)(v_,{error:!0,children:E(e,{field:E("rpm_Note")})})})]}),(0,qt.jsx)(op,{mt:2,mb:2,width:"100%",sx:{margin:"auto"},children:(0,qt.jsxs)(qt.Fragment,{children:[(0,qt.jsx)(H,{}),cs(null===d||void 0===d||null===(n=d.data)||void 0===n||null===(r=n.local_files)||void 0===r||null===(i=r.local)||void 0===i?void 0:i.files)?c("upload",e):u("upload",e)]})}),(0,qt.jsxs)(op,{mt:2,display:"flex",children:[(0,qt.jsx)(xh,{disableElevation:!0,variant:"outlined",color:"primary",onClick:v,sx:{marginRight:"10px"},fullWidth:!0,children:E("rpm_Cancel")}),(0,qt.jsx)(xh,{disableElevation:!0,variant:"contained",type:"submit",fullWidth:!0,children:E("rpm_Save")})]})," "]})})}})})})]})]})}pwe.defaultProps={alertsHead:[],order:"",orderBy:"",dataParameter:"",checkState:[],isSelection:!1,nodata:"",alertsList:[],otherResolvedAlertList:[],resolvedAlertList:[],initialFormValues:{},addNewNote:()=>{},MobilefileUploadButton:()=>{},fileModal:{},fileUploadIconButton:()=>{},notesList:[],editableNoteId:"",downloadFile:()=>{},setToggleAddNote:()=>{},toggleAddNote:!1,closeEditMode:()=>{},editNote:()=>{},fetchNoteList:()=>{},pageDetails:{},filterState:{},setFilterState:()=>{},onLocalFileDelete:()=>{},onCloudFilesDelete:()=>{},program:{},patientData:{},noteTypesDropdown:{},showFilterColor:{},setShowFilterColor:()=>{}};const hwe=pwe,mwe=["content"];const fwe=function(e){var t;let{patientData:n,program:r}=e;const o=window.innerWidth,a=Nt(),s=wt(cu),{t:l}=Vg(),[c,d]=(0,We.useState)("desc"),[u,p]=(0,We.useState)("updated_at"),[h,m]=We.useState(!1),[f,g]=(0,We.useState)([]),[v,x]=(0,We.useState)((0,i.A)({},dd)),[y,b]=We.useState({vital:"",start_date:null,end_date:null}),[j,_]=We.useState({open:!1,data:{}}),C=e=>{_((0,i.A)((0,i.A)({},j),{},{open:!j.open,data:e}))},w=e=>{if(Array.isArray(e))return g(e.map(e=>e.toString()));const t=e.target.name;f.includes(t)?g(f.filter(e=>e!==t)):g(e=>[...e,t])},S=e=>(0,qt.jsx)(sy,{title:l("rpm_view"),children:(0,qt.jsx)(wh,{"data-id":e.id,color:"primary",onClick:()=>{},children:(0,qt.jsx)(gc,{fontSize:"small",sx:{width:16,height:16}})})}),A={local:{files:[]},onCloud:{files:[]}},{programId:k,patientId:T}=lo(),[E,M]=We.useState({open:!1,data:{}}),[O,R]=(0,We.useState)((0,i.A)({},A)),[P,D]=We.useState([]),[N,L]=We.useState(""),[I,F]=(0,We.useState)(!1),[$,B]=(0,We.useState)({description:"",vital:""}),[z,H]=We.useState({existingNoteTypes:[],nonExistingNoteTypes:[]}),W=async function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:y;try{const t={sort_by:u,sort_order:c},{data:n}=await a(Il(k,T,{type:"OTHER"},(0,i.A)((0,i.A)({},v),t),e)),r=n||{},{content:o}=r,s=Ko(r,mwe);D(o),x(e=>(0,i.A)((0,i.A)({},e),{},{last_page:s.last_page,current_page:s.current_page,from:s.from,per_page:s.per_page,to:s.to,total:s.total}))}catch(t){console.log(t)}},U=function(e){const t=e.target.files;let n=(0,i.A)({},O.local);t&&Array.from(t).forEach(e=>{var t;return cs(null===n||void 0===n||null===(t=n.files)||void 0===t?void 0:t.find(t=>t.name===e.name))?(null===e||void 0===e?void 0:e.size)>=5242880?a(Zo({subTitle:"error:rpm_ImageSize",severity:ud.ERROR})):(e.url=URL.createObjectURL(e),void n.files.push(e)):a(Zo({subTitle:"error:rpm_SameFileName",severity:ud.ERROR}))}),R(e=>(0,i.A)((0,i.A)({},e),{},{local:n})),M(e=>({open:!e.open,data:(0,i.A)((0,i.A)({},e.data),{},{local_files:(0,i.A)((0,i.A)({},O),{},{local:n})})})),e.target.value=""},V=function(e){let t=(0,i.A)({},O);t.local.files.splice(e,1),R(t)},G=async(e,t)=>{try{await a(Wl(k,T,{noteId:e.id,fileId:t,type:"OTHER"})),W(),function(e,t){var n;const r=null===e||void 0===e||null===(n=e.files)||void 0===n?void 0:n.filter(e=>(null===e||void 0===e?void 0:e.id)!==t);M((0,i.A)((0,i.A)({},E),{},{data:(0,i.A)((0,i.A)({},e),{},{files:r})}))}(e,t),a(Zo({subTitle:"message:rpm_FileDeletedSuccessfully",severity:ud.SUCCESS}))}catch(n){const e=us(n,"response.data.code","");cs(e)?a(Zo({subTitle:"error:rpm_FileDeleteFailed",severity:ud.ERROR})):a(Zo({subTitle:Vd(e,"error:rpm_FileDeleteFailed"),severity:ud.ERROR}))}},q=()=>{let e=(0,i.A)({},O);e.local.files.splice(0,e.local.files.length),R(e),M({data:{},open:!1})},Y=async(e,t)=>{var n,r;let{setErrors:i}=t;const o={vital:null===e||void 0===e?void 0:e.vital,note:null===e||void 0===e?void 0:e.description,type:"OTHER",upload:cs(null===E||void 0===E||null===(n=E.data)||void 0===n?void 0:n.local_files)?[]:null===E||void 0===E||null===(r=E.data)||void 0===r?void 0:r.local_files};try{if(await a(Fl(k,T,o)),v.current_page=1,W({vital:"",start_date:null,end_date:null}),F(!1),z.nonExistingNoteTypes.includes("OTHER")){const{data:e}=await a(Ul(k,T));H({existingNoteTypes:e,nonExistingNoteTypes:_s(Jd,e)})}W(),B({description:"",vital:""}),q(),a(Zo({subTitle:"message:rpm_NoteCreatedSuccessfully",severity:ud.SUCCESS}))}catch(s){const e=us(s,"response.data.code","");cs(e)?a(Zo({subTitle:"error:rpm_NoteCreatedFailed",severity:ud.ERROR})):a(Zo({subTitle:Vd(e,"error:rpm_NoteCreatedFailed"),severity:ud.ERROR}))}},Z=async(e,t)=>{var n,r;let{setErrors:i}=t;const o={id:N,vital:null===e||void 0===e?void 0:e.vital,note:null===e||void 0===e?void 0:e.description,type:"OTHER",upload:cs(null===E||void 0===E||null===(n=E.data)||void 0===n?void 0:n.local_files)?[]:null===E||void 0===E||null===(r=E.data)||void 0===r?void 0:r.local_files};try{await a(Bl(k,T,o)),X(),W(),q(),a(Zo({subTitle:"message:rpm_NoteUpdateSuccessfully",severity:ud.SUCCESS}))}catch(s){const e=us(s,"response.data.code","");cs(e)?a(Zo({subTitle:"error:rpm_NoteUpdateFailed",severity:ud.ERROR})):a(Zo({subTitle:Vd(e,"error:rpm_NoteUpdateFailed"),severity:ud.ERROR}))}},K=async e=>{try{var t;if(await a(zl(k,T,{noteId:null===e||void 0===e||null===(t=e.data)||void 0===t?void 0:t.id,type:"OTHER"})),W(),_((0,i.A)((0,i.A)({},j),{},{open:!j.open})),1===P.length){const{data:e}=await a(Ul(k,T));H({existingNoteTypes:e,nonExistingNoteTypes:_s(Jd,e)})}a(Zo({subTitle:"message:rpm_NoteDeleteSuccessfully",severity:ud.SUCCESS}))}catch(n){const e=us(n,"response.data.code","");cs(e)?a(Zo({subTitle:"error:rpm_NoteUpdateFailed",severity:ud.ERROR})):a(Zo({subTitle:Vd(e,"error:rpm_NoteDeleteFailed"),severity:ud.ERROR}))}},X=()=>{L(""),B({description:"",vital:""}),M({open:!1,data:{}}),R((0,i.A)({},A))},Q=(e,t)=>(0,qt.jsx)("label",{htmlFor:"file",children:(0,qt.jsx)(sy,{title:l("rpm_UploadMore"),component:"span",children:(0,qt.jsxs)(wh,{"data-id":t.id,color:"primary",sx:{bgcolor:"primary.theme.50"},children:[(0,qt.jsx)("input",{multiple:!0,type:"file",id:"file",style:{display:"none"},autoFocus:!0,onChange:U}),(0,qt.jsx)(jje.A,{fontSize:"small",sx:{width:16,height:16}})]})})}),J=async e=>{let{noteId:t,file:n}=e;try{await a(Hl(k,T,{noteId:t,type:"OTHER",fileData:n})),a(Zo({subTitle:"message:rpm_DownloadFileSuccessfully",severity:ud.SUCCESS}))}catch(r){const e=us(r,"response.data.code","");cs(e)?a(Zo({subTitle:"error:rpm_DownloadFileFailed",severity:ud.ERROR})):a(Zo({subTitle:Vd(e,"error:rpm_DownloadFileFailed"),severity:ud.ERROR}))}};return We.useEffect(()=>{s&&W(),cs(r)||cs(n)||(async()=>{const{data:e}=await a(Ul(k,T));H({existingNoteTypes:e,nonExistingNoteTypes:_s(Jd,e)})})()},[s,c,u,r,n]),We.useEffect(()=>{a(NC({activeMenuItem:"notes"}))},[]),cs(r)?(0,qt.jsx)(yp,{variant:"outlined",sx:{px:2.5,py:6,display:"flex",height:"320px"},children:(0,qt.jsx)(op,{alignSelf:"center",sx:{mx:"auto"},children:(0,qt.jsx)(MM,{color:"primary"})})}):(0,qt.jsx)(qt.Fragment,{children:null!==r&&void 0!==r&&null!==(t=r.permissions)&&void 0!==t&&t.showNoteList?o>=575?(0,qt.jsxs)(qt.Fragment,{children:[(0,qt.jsx)(uwe,{order:c,orderBy:u,setOrder:d,setOrderBy:p,dataParameter:"id",checkState:f,onCheck:w,isSelection:!1,nodata:SCe,showFilterColor:h,setShowFilterColor:m,notesList:P,fetchNoteList:W,pageDetails:v,editButton:e=>(0,qt.jsx)(sy,{title:l("rpm_Edit"),children:(0,qt.jsx)(wh,{"data-id":e.id,color:"primary",onClick:()=>{L(e.id),F(!1),B({description:e.note,vital:e.vital}),R((0,i.A)({},A)),M((0,i.A)((0,i.A)({},E),{},{data:(0,i.A)({},e)}))},children:(0,qt.jsx)(fc,{fontSize:"small",sx:{width:16,height:16}})})}),viewButton:S,deleteButton:e=>(0,qt.jsx)(wh,{"data-id":e.id,color:"error",onClick:()=>C(e),children:(0,qt.jsx)(xc,{fontSize:"small",sx:{width:16,height:16}})}),addNewNote:Y,editNote:Z,editableNoteId:N,closeEditMode:X,initialFormValues:$,toggleAddNote:I,setToggleAddNote:F,fileModal:E,fileUploadButton:()=>(0,qt.jsx)("label",{htmlFor:"file",children:(0,qt.jsxs)(xh,{variant:"contained",component:"span",size:"large",disableElevation:!0,sx:{display:"inline-flex",backgroundColor:"grey.300",color:"grey.700",border:"1px dashed #616161",textAlign:"left",px:3,"&:hover":{backgroundColor:"grey.300"}},children:[(0,qt.jsx)("input",{multiple:!0,type:"file",id:"file",style:{display:"none"},autoFocus:!0,onChange:U}),(0,qt.jsxs)(op,{sx:{display:"flex",alignItems:"center"},children:[(0,qt.jsx)(Cje.A,{fontSize:"small"}),(0,qt.jsxs)(op,{sx:{flex:1,pl:2},children:[(0,qt.jsx)(Cf,{variant:"body1",sx:{textTransform:"none"},children:l("rpm_UploadReport")}),(0,qt.jsx)(Cf,{variant:"caption",children:".PDF, .PNG, .JPEG"})]})]})]})}),fileUploadIconButton:Q,downloadFile:J,filterState:y,setFilterState:b,onLocalFileDelete:V,onCloudFilesDelete:G,patientData:n,program:r,noteTypesDropdown:z}),(0,qt.jsx)(qV,{openModal:j.open,onCloseModal:C,actionFunction:()=>K(j),dataName:j.data.title,options:{primaryText:l("message:rpm_DeleteTitle"),secondaryText:l("message:rpm_DeleteBodyText"),descText:l("message:rpm_DeleteSubText"),btn:{primaryText:l("rpm_Delete"),secondaryText:l("rpm_Cancel"),primaryColor:"error",secondaryColor:"primary"},btnSwap:!0}})]}):(0,qt.jsxs)(qt.Fragment,{children:[(0,qt.jsx)(hwe,{order:c,orderBy:u,setOrder:d,setOrderBy:p,dataParameter:"id",checkState:f,onCheck:w,isSelection:!1,nodata:SCe,showFilterColor:h,setShowFilterColor:m,notesList:P,fetchNoteList:W,pageDetails:v,MobileeditButton:e=>(0,qt.jsx)(sy,{title:l("rpm_Edit"),children:(0,qt.jsx)(wh,{"data-id":e.id,color:"primary",onClick:()=>{L(e.id),F(!1),B({description:e.note,vital:e.vital}),R((0,i.A)({},A)),M((0,i.A)((0,i.A)({},E),{},{data:(0,i.A)({},e)}))},sx:{padding:"0"},children:(0,qt.jsx)(kCe.A,{fontSize:"small",sx:{width:16,height:16}})})}),viewButton:S,MobiledeleteButton:e=>(0,qt.jsx)(wh,{"data-id":e.id,color:"error",onClick:()=>C(e),children:(0,qt.jsx)(zCe.A,{fontSize:"small",sx:{width:16,height:16}})}),addNewNote:Y,editNote:Z,editableNoteId:N,closeEditMode:X,initialFormValues:$,toggleAddNote:I,setToggleAddNote:F,fileModal:E,MobilefileUploadButton:()=>(0,qt.jsxs)("label",{htmlFor:"file",children:[(0,qt.jsxs)(xh,{variant:"contained",component:"span",size:"large",disableElevation:!0,sx:{display:"inline-flex",backgroundColor:"#eaeaff85",color:"grey.700",border:"1px dashed #9CA3AF",textAlign:"left",px:3,"&:hover":{backgroundColor:"grey.300"}},fullWidth:!0,children:[(0,qt.jsx)("input",{multiple:!0,type:"file",id:"file",style:{display:"none"},autoFocus:!0,onChange:U}),(0,qt.jsxs)(op,{sx:{display:"flex",alignItems:"center"},children:[(0,qt.jsx)(Cje.A,{fontSize:"small"}),(0,qt.jsx)(op,{sx:{flex:1,pl:2},children:(0,qt.jsx)(Cf,{variant:"body1",sx:{textTransform:"none"},fontSize:14,children:l("rpm_UploadReport")})})]})]}),(0,qt.jsx)(op,{textAlign:"center",fontStyle:"italic",children:(0,qt.jsx)(Cf,{variant:"caption",fontSize:8,children:".PDF, .PNG, .JPEG"})})]}),fileUploadIconButton:Q,downloadFile:J,filterState:y,setFilterState:b,onLocalFileDelete:V,onCloudFilesDelete:G,patientData:n,program:r,noteTypesDropdown:z}),(0,qt.jsx)(zje,{openModal:j.open,onCloseModal:C,actionFunction:()=>K(j),dataName:j.data.title,options:{primaryText:l("message:rpm_DeleteTitle"),secondaryText:l("message:rpm_DeleteBodyText"),btn:{primaryText:l("rpm_Delete"),secondaryText:l("rpm_Cancel"),primaryColor:"error",secondaryColor:"primary"},btnSwap:!0}})]}):(0,qt.jsx)(LC,{})})};const gwe=function(e){var t,n,r,i,o,a,s,l,c,d;let{openModal:u,onCloseModal:p,onFileUpload:h,onLocalFileDelete:m,fileModal:f,actionFunction:g,onCloudFilesDelete:v,onCloudFileDownload:x}=e;const{t:y}=Vg(),b=e=>{const t=null===e||void 0===e?void 0:e.split("/");return t[(null===t||void 0===t?void 0:t.length)-1]};return(0,qt.jsxs)(cC,{fullWidth:!0,maxWidth:"md",open:u,onClose:p,scroll:"paper",children:[(0,qt.jsx)(fC,{children:y("rpm_AddReports")}),(0,qt.jsxs)(bC,{children:[(0,qt.jsxs)(Ff,{container:!0,spacing:2,children:[(0,qt.jsx)(Ff,{item:!0,xs:12,md:6,children:(0,qt.jsxs)(op,{sx:{p:2,py:6,borderRadius:1,textAlign:"center",border:"1px dashed #818181"},children:[(0,qt.jsxs)(op,{mb:3,children:[(0,qt.jsx)(Eje.A,{sx:{color:"grey.400",fontSize:"h3.fontSize"}}),(0,qt.jsx)(Cf,{variant:"body1",fontWeight:500,sx:{color:"grey.500"},children:y("rpm_AddReportsHere")})]}),(0,qt.jsx)(op,{children:(0,qt.jsx)("label",{htmlFor:"file",children:(0,qt.jsxs)(xh,{startIcon:(0,qt.jsx)(jje.A,{}),variant:"contained",color:"primary",component:"span",size:"large",disableElevation:!0,children:[(0,qt.jsx)("input",{multiple:!0,type:"file",id:"file",style:{display:"none"},autoFocus:!0,onChange:h}),y("rpm_ChooseFile")]})})})]})}),(0,qt.jsxs)(Ff,{item:!0,xs:12,md:6,children:[!cs(null===f||void 0===f||null===(t=f.data)||void 0===t?void 0:t.files)&&(0,qt.jsx)(qt.Fragment,{children:null===f||void 0===f||null===(n=f.data)||void 0===n||null===(r=n.files)||void 0===r?void 0:r.map((e,t)=>(0,qt.jsxs)(dM,{"data-index":t,"data-id":null===e||void 0===e?void 0:e.id,icon:(0,qt.jsx)(Aje.A,{fontSize:"large"}),onClose:()=>v(null===f||void 0===f?void 0:f.data,null===e||void 0===e?void 0:e.id,t),sx:{mb:1.5,color:"primary.theme.900",backgroundColor:"primary.theme.50","& .MuiAlert-icon":{color:"primary.main"}},children:[(0,qt.jsx)(Dje,{title:b(null===e||void 0===e?void 0:e.file_name),sx:{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:b(null===e||void 0===e?void 0:e.file_name)}),(0,qt.jsx)(op,{children:"Uploaded"}),(0,qt.jsx)(wh,{onClick:()=>{var t;x({noteId:null===f||void 0===f||null===(t=f.data)||void 0===t?void 0:t.id,file:e})},children:(0,qt.jsx)(Sje.A,{color:"primary"})})]},t))}),!cs(null===f||void 0===f||null===(i=f.data)||void 0===i||null===(o=i.local_files)||void 0===o||null===(a=o.local)||void 0===a?void 0:a.files)&&(0,qt.jsx)(eg,{sx:{mb:2}}),null===f||void 0===f||null===(s=f.data)||void 0===s||null===(l=s.local_files)||void 0===l||null===(c=l.local)||void 0===c||null===(d=c.files)||void 0===d?void 0:d.map((e,t)=>(0,qt.jsxs)(dM,{"data-index":t,"data-id":null===e||void 0===e?void 0:e.id,icon:(0,qt.jsx)(Aje.A,{fontSize:"large"}),onClose:()=>m(t),sx:{mb:1.5,color:"primary.theme.900",backgroundColor:"primary.theme.50","& .MuiAlert-icon":{color:"primary.main"}},children:[(0,qt.jsx)(Dje,{children:null===e||void 0===e?void 0:e.name}),(0,qt.jsxs)("strong",{children:[Math.ceil((null===e||void 0===e?void 0:e.size)/1024),"KB"]})]},t))]})]}),(0,qt.jsx)(op,{mt:2.5,children:(0,qt.jsxs)(Ff,{container:!0,spacing:2,children:[(0,qt.jsx)(Ff,{item:!0,children:(0,qt.jsx)(xh,{variant:"outlined",color:"error",disableElevation:!0,onClick:p,children:y("rpm_Cancel")})}),(0,qt.jsx)(Ff,{item:!0,children:(0,qt.jsx)(xh,{variant:"contained",color:"primary",disableElevation:!0,onClick:()=>{g(null===f||void 0===f?void 0:f.data,{})},children:y("rpm_Submit")})})]})})]})]})};var vwe=n(93141);const xwe=["children","onClose"],ywe=e=>{const{children:t,onClose:n}=e,r=Ko(e,xwe);return(0,qt.jsxs)(fC,(0,i.A)((0,i.A)({sx:{m:0,p:2}},r),{},{children:[t,n?(0,qt.jsx)(wh,{"aria-label":"close",onClick:n,sx:{position:"absolute",right:8,top:8,color:e=>e.palette.grey[500]},children:(0,qt.jsx)(J_.A,{})}):null]}))};function bwe(e){let{order:t,orderBy:n,openModal:r,setOrderBy:o,onCloseModal:a,setOrder:s,prescriptionNotesModal:l,dataParameter:c,checkState:d,onCheck:u,isSelection:p,nodata:h,pageDetails:m,addNewNote:f}=e;const{t:g}=Vg(),v=wt(uu),x=e=>{let{name:t,data:n,setFieldValue:r}=e;return(0,qt.jsx)(qt.Fragment,{children:(0,qt.jsxs)(Ff,{container:!0,spacing:1,children:[(0,qt.jsx)(Ff,{item:!0,xs:6,children:(0,qt.jsx)(op,{sx:{"& .MuiOutlinedInput-input":{py:1.0625}},children:(0,qt.jsx)(WM,{dateAdapter:DI,children:(0,qt.jsx)(tH,{as:fD,size:"small",label:"From",id:t.start_date,name:t.start_date,value:n.start_date,onChange:e=>r(t.start_date,e),renderInput:e=>(0,qt.jsx)(Q_,(0,i.A)({},e)),minDate:new Date})})})}),(0,qt.jsx)(Ff,{item:!0,xs:6,children:(0,qt.jsx)(op,{sx:{"& .MuiOutlinedInput-input":{py:1.0625}},children:(0,qt.jsx)(WM,{dateAdapter:DI,children:(0,qt.jsx)(tH,{as:fD,size:"small",label:"To",id:t.end_date,name:t.end_date,value:n.end_date,onChange:e=>r(t.end_date,e),renderInput:e=>(0,qt.jsx)(Q_,(0,i.A)({},e)),minDate:n.start_date?n.start_date:new Date})})})})]})})};return(0,qt.jsx)(We.Fragment,{children:(0,qt.jsx)(cC,{fullWidth:!0,maxWidth:"lg",open:r.open,onClose:a,children:(0,qt.jsx)(Kz,{initialValues:{vital:"",note:"",medicationList:[{medication:"",frequency:"",comments:"",start_date:null,end_date:null}]},validationSchema:RU.addPrescriptionNote,onSubmit:f,enableReinitialize:!0,children:e=>{let{values:r,setFieldValue:i}=e;return(0,qt.jsx)(qt.Fragment,{children:(0,qt.jsxs)(nH,{children:[(0,qt.jsx)(ywe,{sx:{px:4},onClose:a,children:(0,qt.jsxs)(d_,{sx:{display:"flex",alignItems:"left"},children:[(0,qt.jsxs)(tH,{as:G_,sx:{borderRadius:2,bgcolor:"white",maxWidth:"150px"},fullWidth:!0,name:"vital",variant:"outlined",size:"small",displayEmpty:!0,endAdornment:(0,qt.jsx)(tw,{position:"end",sx:{position:"absolute",right:"28px"},children:(0,qt.jsx)(sy,{title:g("message:rpm_VitalTypeNoteHelp"),placement:"top",children:(0,qt.jsx)(wh,{size:"small",disableRipple:!0,sx:{p:0},children:(0,qt.jsx)(pM.A,{fontSize:"small"})})})}),children:[(0,qt.jsx)(mf,{value:"",disabled:!0,sx:{display:"none"},children:g("rpm_VitalType")}),null===Dd||void 0===Dd?void 0:Dd.map(e=>(0,qt.jsx)(mf,{value:e.value,children:g("rpm_".concat(e.name))},e.value))]}),(0,qt.jsx)(dH,{name:"vital",children:e=>(0,qt.jsx)(v_,{error:!0,children:g(e,{field:g("rpm_VitalType")})})})]})}),(0,qt.jsx)(bC,{sx:{p:4},dividers:!0,children:(0,qt.jsx)(Ff,{container:!0,spacing:2,direction:"column",children:(0,qt.jsx)(Ff,{item:!0,xs:12,md:6,children:(0,qt.jsxs)(qt.Fragment,{children:[(0,qt.jsx)(op,{className:"pres_inputTab",children:(0,qt.jsx)(UT,{order:t,orderBy:n,setOrder:s,setOrderBy:o,data:cs(null===r||void 0===r?void 0:r.medicationList)?[{}]:null===r||void 0===r?void 0:r.medicationList,headCells:l,dataParameter:c,selected:d,setSelected:u,isSelection:p,noDataImage:h,pageDetails:m,skeletonVrows:5,className:"theme_scroll",children:(0,qt.jsx)(lH,{name:"medicationList",validateOnChange:!1,children:e=>{var t,n,o;return(0,qt.jsx)(qt.Fragment,{children:cs(null===r||void 0===r?void 0:r.medicationList)?(0,qt.jsxs)(qt.Fragment,{children:[(0,qt.jsx)(cw,{children:(0,qt.jsx)(gw,{colSpan:7,sx:{border:"none",paddingBottom:"0"},children:(0,qt.jsx)("img",{src:h,style:{display:"block",margin:"auto",maxWidth:"200px"}})})}),(0,qt.jsx)(cw,{children:(0,qt.jsxs)(gw,{colSpan:7,sx:{border:"none",paddingBottom:"30px"},align:"center",children:[(0,qt.jsx)(Cf,{}),(0,qt.jsx)(xh,{variant:"contained",color:"primary",disableElevation:!0,disabled:null===r||void 0===r||null===(n=r.medicationList)||void 0===n||null===(o=n.find(e=>null===e||void 0===e?void 0:e.isEdit))||void 0===o?void 0:o.isEdit,onClick:()=>e.push({medication:"",frequency:"",start_date:null,end_date:null,comments:""}),children:g("rpm_AddNewNote")})]})})]}):null===r||void 0===r||null===(t=r.medicationList)||void 0===t?void 0:t.map((t,n)=>{var o;return(0,qt.jsxs)(We.Fragment,{children:[(0,qt.jsxs)(cw,{sx:{"&:last-child td, &:last-child th":{border:0}},children:[(0,qt.jsx)(gw,{sx:{minWidth:250,whiteSpace:"normal"},children:(0,qt.jsxs)(op,{children:[(0,qt.jsx)(tH,{as:qj,fullWidth:!0,name:"medicationList.".concat(n,".medication"),size:"small",variant:"outlined",placeholder:g("rpm_MedicationName"),endAdornment:(0,qt.jsx)(tw,{position:"end",sx:{position:"absolute",right:"8px"},children:(0,qt.jsx)(sy,{title:g("message:rpm_MedicationNameHelp"),placement:"top",children:(0,qt.jsx)(wh,{size:"small",disableRipple:!0,sx:{p:0},children:(0,qt.jsx)(pM.A,{fontSize:"small"})})})})}),(0,qt.jsx)(dH,{name:"medicationList.".concat(n,".medication"),children:e=>(0,qt.jsx)(v_,{error:!0,children:g(e,{field:g("rpm_Medication")})})})]})}),(0,qt.jsx)(gw,{children:(0,qt.jsxs)(d_,{sx:{minWidth:150,whiteSpace:"normal"},children:[(0,qt.jsx)(o_,{id:"medicationList.".concat(n,".frequency"),children:g("rpm_Frequency")}),(0,qt.jsx)(tH,{as:G_,fullWidth:!0,variant:"outlined",size:"small",name:"medicationList.".concat(n,".frequency"),labelId:"medicationList.".concat(n,".frequency"),label:g("rpm_Frequency"),onChange:e=>{i("medicationList.".concat(n,".frequency"),e.target.value)},endAdornment:(0,qt.jsx)(tw,{position:"end",sx:{position:"absolute",right:"28px"},children:(0,qt.jsx)(sy,{title:g("message:rpm_FrequencyTypeNoteHelp"),placement:"top",children:(0,qt.jsx)(wh,{size:"small",disableRipple:!0,sx:{p:0},children:(0,qt.jsx)(pM.A,{fontSize:"small"})})})}),children:Ld.map(e=>(0,qt.jsx)(mf,{value:e.key,children:"".concat(e.key,"/").concat(e.text)},e.key))}),(0,qt.jsx)(dH,{name:"medicationList.".concat(n,".frequency"),children:e=>(0,qt.jsx)(v_,{error:!0,children:g(e,{field:g("rpm_Frequency")})})})]})}),(0,qt.jsxs)(gw,{sx:{minWidth:"custom"===(null===t||void 0===t?void 0:t.duration_unit)?350:257},children:[(0,qt.jsx)(x,{data:t,setFieldValue:i,name:{value:"medicationList.".concat(n,".duration"),unit:"medicationList.".concat(n,".duration_unit"),start_date:"medicationList.".concat(n,".start_date"),end_date:"medicationList.".concat(n,".end_date")}}),(0,qt.jsx)(dH,{name:"medicationList.".concat(n,".start_date"),children:e=>(0,qt.jsx)(v_,{error:!0,children:g(e,{field:g("rpm_StartDate")})})}),(0,qt.jsx)(dH,{name:"medicationList.".concat(n,".end_date"),children:e=>(0,qt.jsx)(v_,{error:!0,children:g(e,{field:g("rpm_EndDate")})})})]}),(0,qt.jsxs)(gw,{sx:{minWidth:300,whiteSpace:"normal"},children:[(0,qt.jsx)(tH,{as:qj,fullWidth:!0,multiline:!0,rows:3,size:"small",variant:"outlined",name:"medicationList.".concat(n,".comments"),placeholder:g("message:rpm_commentsPlaceHolder"),endAdornment:(0,qt.jsx)(tw,{position:"end",sx:{position:"absolute",right:"8px"},children:(0,qt.jsx)(sy,{title:g("message:rpm_CommentsHelp"),placement:"top",children:(0,qt.jsx)(wh,{size:"small",disableRipple:!0,sx:{p:0},children:(0,qt.jsx)(pM.A,{fontSize:"small"})})})})}),(0,qt.jsx)(dH,{name:"medicationList.".concat(n,".comments"),children:e=>(0,qt.jsx)(v_,{error:!0,children:g(e,{field:g("rpm_Note")})})})]}),(0,qt.jsx)(gw,{className:"BGbtnGrp",children:(0,qt.jsx)(wh,{color:"error",onClick:()=>e.remove(n),className:"lightDanger",children:(0,qt.jsx)(xc,{fontSize:"small",sx:{width:16,height:16}})})})]}),(null===r||void 0===r||null===(o=r.medicationList)||void 0===o?void 0:o.length)-1===n&&(0,qt.jsx)(cw,{children:(0,qt.jsx)(gw,{colSpan:7,children:(0,qt.jsx)(xh,{variant:"text",color:"primary",disableElevation:!0,onClick:()=>e.push({medication:"",frequency:"",start_date:null,end_date:null,comments:""}),sx:{fontWeight:"bold"},children:g("rpm_AddNewMedication")})})})]},n)})})}})})}),(0,qt.jsx)(op,{sx:e=>({pr:2,bgcolor:e.palette.common.white})})]})})})}),(0,qt.jsx)(vE,{sx:{py:3,px:4},children:(0,qt.jsxs)(Ff,{container:!0,spacing:2,children:[(0,qt.jsx)(Ff,{item:!0,xs:!0}),(0,qt.jsx)(Ff,{item:!0,children:(0,qt.jsx)(xh,{color:"primary",variant:"outlined",onClick:a,children:g("rpm_Cancel")})}),(0,qt.jsx)(Ff,{item:!0,children:(0,qt.jsx)(IM,{loading:v,color:"primary",disableElevation:!0,variant:"contained",type:"submit",children:g("rpm_Save")})})]})})]})})}},"program_formik")})})}function jwe(e){var t,n,r,o;let{order:a,orderBy:s,setOrder:l,setOrderBy:c,prescriptionList:d,dataParameter:u,notesHead:p,checkState:h,onCheck:m,isSelection:f,nodata:g,showFilterColor:v,setShowFilterColor:x,fetchPrescriptionList:y,pageDetails:b,editButton:j,viewButton:_,prescriptionNotesModal:C,deleteButton:w,downloadFile:S,filterState:A,setFilterState:k,presModal:T,handlePresModalToggle:E,program:M,patientData:O,addNewNote:R,initialHeadcells:P,setHeadCells:D,settingModal:N,handleSettingModalToggle:L,doctor:I}=e;const F=window.innerWidth,{t:$}=Vg(),B=Nt(),{programId:z,patientId:H}=lo(),[W,U]=We.useState({}),V=so(),G=We.useRef(),[q,Y]=We.useState(0),[Z,K]=We.useState(1),[X,Q]=We.useState(20),[J,ee]=(0,We.useState)(!1),[te,ne]=(0,We.useState)(!1),re=()=>{ee(!J)},ie=function(e,t){K(t),Y(t-1)},oe=e=>{Q(parseInt(e.target.value,10)),Y(0)},ae=We.useCallback(()=>G.current,[G.current]),se=(0,vwe.useReactToPrint)({content:ae,onAfterPrint:()=>{U({})}}),le=!!ps(null===W||void 0===W?void 0:W.diagnosis)||(null===W||void 0===W||null===(t=W.diagnosis)||void 0===t?void 0:t.every(e=>cs(null===e||void 0===e?void 0:e.name))),ce=!!ps(null===W||void 0===W?void 0:W.complaints)||(null===W||void 0===W||null===(n=W.complaints)||void 0===n?void 0:n.every(e=>cs(null===e||void 0===e?void 0:e.name))),de=!!ps(null===W||void 0===W?void 0:W.advices)||(null===W||void 0===W||null===(r=W.advices)||void 0===r?void 0:r.every(e=>cs(e))),ue=!!ps(null===W||void 0===W?void 0:W.tests)||(null===W||void 0===W||null===(o=W.tests)||void 0===o?void 0:o.every(e=>cs(e))),pe=[{name:$("rpm_RPM"),url:ld.DOCTOR.PROGRAM},{name:null===M||void 0===M?void 0:M.display_name,url:"".concat(ld.DOCTOR.PROGRAM,"/").concat(null===M||void 0===M?void 0:M.code,"/patients")},{name:"".concat((null===O||void 0===O?void 0:O.first_name)||""," ").concat((null===O||void 0===O?void 0:O.last_name)||""),url:"".concat(ld.DOCTOR.PROGRAM,"/").concat(null===M||void 0===M?void 0:M.code,"/patients/").concat(null===O||void 0===O?void 0:O.id,"/dashboard")},{name:$("rpm_consultation"),url:""}],he=(e,t)=>{const n=sa().unix(e/1e3),r=sa().unix(t/1e3),i=r.diff(n,"year"),o=r.diff(n,"months"),a=r.diff(n,"days"),s=r.diff(n,"year");n.add(s,"years");const l=r.diff(n,"months");n.add(l,"months");const c=r.diff(n,"days");return s&&l?o:s?i:l?o:c?a:s&&l&&c?(s?"".concat(s," years "):"")+(l?"".concat(l," months "):"")+(c?"".concat(c," days"):""):void 0},me=(e,t)=>{const n=sa().unix(e/1e3),r=sa().unix(t/1e3),i=r.diff(n,"year");n.add(i,"years");const o=r.diff(n,"months");n.add(o,"months");const a=r.diff(n,"days");return i&&o?"m":i?"y":o?"m":a?"d":void 0},fe={prescriptionList:null===d||void 0===d?void 0:d.map(e=>(0,i.A)((0,i.A)({},e),{},{duration:he(null===e||void 0===e?void 0:e.start_date,null===e||void 0===e?void 0:e.end_date),duration_unit:me(null===e||void 0===e?void 0:e.start_date,null===e||void 0===e?void 0:e.end_date),startDate:sa()(e.start_date).format("DD MMM YYYY"),endDate:sa()(e.end_date).format("DD MMM YYYY")}))};return We.useEffect(()=>{const e={breadcrumb:pe};cs(M)||cs(O)||B(NC(e))},[M,O]),We.useEffect(()=>{cs(W.id)||se()},[W.id]),(0,qt.jsxs)(qt.Fragment,{children:[(0,qt.jsxs)(op,{children:[(0,qt.jsx)(op,{sx:{width:"100%"},position:"relative",children:(0,qt.jsxs)(Ff,{container:!0,children:[(0,qt.jsx)(Ff,{item:!0,xs:12,md:6,children:(0,qt.jsxs)(op,{children:[(0,qt.jsx)(op,{sx:{display:{xs:"none",sm:"block"}},children:(0,qt.jsx)(Cf,{variant:"h5",component:"h5",className:"headingInMobile",children:$("rpm_consultation")})}),(0,qt.jsx)(op,{sx:{display:{xs:"block",sm:"none"}},position:"absolute",top:"-48px",bottom:"0",left:"40px",children:(0,qt.jsx)(Cf,{variant:"h6",component:"h6",className:"headingInMobile",children:$("rpm_consultation")})})]})}),(0,qt.jsx)(Ff,{item:!0,xs:12,md:6,children:(0,qt.jsx)(op,{mb:3,textAlign:"right",className:"addConsultationBtn",children:(0,qt.jsxs)(xh,{className:"prescription-tour-step1",onClick:()=>V("".concat(ld.DOCTOR.PROGRAM,"/").concat(z,"/patients/").concat(H,"/consultations/add-consultation")),variant:"contained",disableElevation:!0,style:{marginRight:"5px"},children:[(0,qt.jsx)(jue.A,{}),(0,qt.jsx)(op,{className:"responsiveHidden",children:$("rpm_AddConsultation")})]})})})]})}),(0,qt.jsx)(op,{bgcolor:"white",className:"UseNoteFilter",pt:1,pb:1,children:(0,qt.jsxs)(Ff,{container:!0,spacing:2,alignItems:"center",children:[(0,qt.jsx)(Ff,{item:!0,lg:9,xl:8,children:F>=575?(0,qt.jsx)(MCe,{onApply:re,fetchListFunction:y,filterState:A,setFilterState:k,pageDetails:b,showFilterColor:v,setShowFilterColor:x}):(0,qt.jsx)(LCe,{onApply:re,fetchListFunction:y,filterState:A,setFilterState:k,pageDetails:b,showFilterColor:v,setShowFilterColor:x,filterVariant:"contained",filterName:"Filters",mobileFilterBG:!1})}),(0,qt.jsx)(Ff,{item:!0,ml:"auto",children:(0,qt.jsx)(op,{textAlign:"right",children:(0,qt.jsx)(sy,{title:$("rpm_TableCellSetting"),children:(0,qt.jsx)(sv,{sx:{boxShadow:"none",width:32,height:32,minHeight:"auto",marginRight:"10px"},size:"small",color:"primary",onClick:L,children:(0,qt.jsx)(YC.A,{onClick:()=>{ne(!te)},disabled:!J,fontSize:"small",sx:{width:16,height:16}})})})})})]})}),(0,qt.jsx)(Kz,{initialValues:cs(null===fe||void 0===fe?void 0:fe.prescriptionList)?{prescriptionList:[]}:fe,validationSchema:RU.addPrescriptionNote,enableReinitialize:!0,children:e=>{var t,n,r;let{values:i}=e;return(0,qt.jsxs)(qt.Fragment,{children:[(0,qt.jsxs)(nH,{children:[(0,qt.jsx)(op,{className:"pres_inputTab",children:(0,qt.jsx)(UT,{order:a,orderBy:s,setOrder:l,setOrderBy:c,data:cs(null===i||void 0===i?void 0:i.prescriptionList)?[{}]:null===i||void 0===i?void 0:i.prescriptionList,headCells:p.filter(e=>P.includes(e.id)),dataParameter:u,selected:h,setSelected:m,isSelection:f,noDataImage:g,pageDetails:b,skeletonVrows:6,className:"theme_scroll",children:cs(null===i||void 0===i?void 0:i.prescriptionList)?(0,qt.jsx)(qt.Fragment,{children:(0,qt.jsx)(cw,{children:(0,qt.jsx)(gw,{colSpan:7,sx:{border:"none",p:2},children:(0,qt.jsx)("img",{src:g,style:{display:"block",margin:"auto",maxWidth:"200px"}})})})}):null===i||void 0===i||null===(t=i.prescriptionList)||void 0===t||null===(n=t.slice(q*X,q*X+Number(X)))||void 0===n?void 0:n.map((e,t)=>{var n;return(0,qt.jsx)(We.Fragment,{children:(0,qt.jsxs)(cw,{sx:{"&:last-child td, &:last-child th":{border:0}},children:[P.includes("duration")&&(0,qt.jsx)(gw,{children:sa()(e.created_at).format("DD MMM YYYY")}),P.includes("vitaltype")&&(0,qt.jsxs)(gw,{sx:{minWidth:170,whiteSpace:"normal"},children:[" ","bp"===(null===e||void 0===e?void 0:e.vital)&&(0,qt.jsxs)(Cf,{color:"#3F51B5",fontWeight:600,component:"span",fontSize:14,children:[" ",$("rpm_".concat(null===e||void 0===e?void 0:e.vital))]}),"glucose"===(null===e||void 0===e?void 0:e.vital)&&(0,qt.jsxs)(Cf,{color:"customClr.glucose",fontWeight:600,component:"span",fontSize:14,children:[" ",$("rpm_".concat(null===e||void 0===e?void 0:e.vital))]}),"others"===e.vital&&(0,qt.jsxs)(Cf,{color:"grey",fontWeight:600,component:"span",fontSize:14,children:[" ",$("rpm_Others")]})," "]}),P.includes("prescriptionID")&&(0,qt.jsx)(gw,{children:null===e||void 0===e?void 0:e.id}),P.includes("prescription_duration")&&(0,qt.jsxs)(gw,{children:[sa()(null===e||void 0===e?void 0:e.start_date).format("DD MMM YYYY")," -"," ",sa()(null===e||void 0===e?void 0:e.end_date).format("DD MMM YYYY")]}),P.includes("createdBy")&&(0,qt.jsx)(gw,{children:null===e||void 0===e?void 0:e.created_by}),P.includes("status")&&(0,qt.jsx)(gw,{children:e.status?(0,qt.jsx)(dM,{severity:"success",icon:!1,sx:e=>({py:0,px:1,display:"inline-flex",fontSize:e.spacing(1.5),"& .MuiAlert-message":{p:e.spacing(.5,0)}}),children:(0,qt.jsx)("strong",{children:"Active"})}):(0,qt.jsx)(dM,{severity:"error",icon:!1,sx:e=>({py:0,px:1,display:"inline-flex",fontSize:e.spacing(1.5),"& .MuiAlert-message":{p:e.spacing(.5,0)}}),children:(0,qt.jsx)("strong",{children:"Inactive"})})}),P.includes("action")&&(0,qt.jsx)(gw,{className:"BGbtnGrp",children:(0,qt.jsx)(op,{className:"prescription-tour-step2",children:(0,qt.jsxs)(qt.Fragment,{children:[_(e),j(e),(0,qt.jsx)(sy,{title:$("rpm_print"),children:(0,qt.jsx)(wh,{color:"primary",onClick:()=>Xd(B,H,null===e||void 0===e?void 0:e.id),children:(0,qt.jsx)(YCe.A,{fontSize:"small",sx:{width:16,height:16}})})}),(null===M||void 0===M||null===(n=M.permissions)||void 0===n?void 0:n.showDeletePrescriptionList_showDeleteList)&&w(e)]})})})]})},t)})})}),(0,qt.jsx)(op,{py:2,children:(0,qt.jsxs)(Ff,{container:!0,spacing:2,alignItems:"center",justifyContent:"center",children:[(0,qt.jsx)(Ff,{item:!0,sm:!0,children:(0,qt.jsx)(ZE,{count:Math.ceil((null===i||void 0===i||null===(r=i.prescriptionList)||void 0===r?void 0:r.length)/X),page:Z,shape:"rounded",color:"primary",onChange:ie})}),(0,qt.jsx)(Ff,{item:!0,children:(0,qt.jsxs)(op,{sx:{display:"flex",alignItems:"center"},children:[(0,qt.jsx)(Cf,{component:"p",variant:"body1",sx:{mr:2},children:"Rows Per Page"}),(0,qt.jsx)(d_,{margin:"dense",children:(0,qt.jsx)(G_,{variant:"outlined",size:"small",value:X,onChange:oe,children:[10,20,30,50,100].map(e=>(0,qt.jsx)(mf,{value:e,children:e},e))})})]})})]})})]}),(0,qt.jsx)(op,{sx:e=>({pr:2,bgcolor:e.palette.common.white}),children:(0,qt.jsx)(KE,{pageDetails:b,fetchListFunction:y})})]})}})]}),(0,qt.jsx)(bwe,{openModal:T,onCloseModal:E,order:a,orderBy:s,setOrderBy:c,addNewProgram:()=>{},editProgram:()=>{},filterState:A,setFilterState:k,setOrder:l,notesHead:p,prescriptionNotesModal:C,dataParameter:u,checkState:h,onCheck:m,isSelection:f,nodata:g,pageDetails:b,deleteButton:w,fetchPrescriptionList:y,prescriptionList:d,addNewNote:R}),(0,qt.jsxs)("div",{style:{display:"none"},children:[(0,qt.jsx)(Aye,{ref:G,patientData:O,program:M,details:W,doctor:I,isAdvices:!de,isComplaints:!ce,isTests:!ue,isDiagnosis:!le}),(0,qt.jsx)(TE,{open:N,allHeadCells:p,initialHeadcells:P,setHeadcells:D,onClose:L})]})]})}bwe.defaultProps={filterState:{},setFilterState:()=>{},order:"",orderBy:"",prescriptionNotesModal:[],dataParameter:"",checkState:[],onCheck:()=>{},isSelection:!1,nodata:"",pageDetails:{},deleteButton:()=>{},fetchNoteList:()=>{},medicationList:[],addNewNote:()=>{}},jwe.defaultProps={notesHead:[],prescriptionNotesModal:[],pageDetails:{},order:"",orderBy:"",dataParameter:"",checkState:[],onCheck:()=>{},isSelection:!1,nodata:"",prescriptionList:[],othernotesList:[],familynotesList:[],fetchPrescriptionList:()=>{},editButton:()=>{},viewButton:()=>{},PrintButton:()=>{},VisibilityIcon:()=>{},deleteButton:()=>{},fileModal:{},fileUploadButton:()=>{},fileUploadIconButton:()=>{},downloadFile:()=>{},saveButton:()=>{},closeButton:()=>{},filterState:{},setFilterState:()=>{},program:{},patientData:{},addNewNote:()=>{},noteTypesDropdown:{},showFilterColor:{},setShowFilterColor:()=>{},initialHeadcells:[],setHeadCells:()=>{},settingModal:!1,handleSettingModalToggle:()=>{},doctor:{},setDoctor:()=>{},fetchDoctor:()=>{}};const _we=jwe;function Cwe(e){var t,n,r,o;let{order:a,orderBy:s,setOrder:l,setOrderBy:c,prescriptionList:d,dataParameter:u,notesHead:p,checkState:h,onCheck:m,isSelection:f,nodata:g,showFilterColor:v,setShowFilterColor:x,fetchPrescriptionList:y,pageDetails:b,editMobileButton:j,viewMobileButton:_,prescriptionNotesModal:C,deleteMobileButton:w,downloadFile:S,filterState:A,setFilterState:k,presModal:T,handlePresModalToggle:E,program:M,patientData:O,addNewNote:R,initialHeadcells:P,setHeadCells:D,settingModal:N,handleSettingModalToggle:L,doctor:I}=e;const F=zT({titles:{fontSize:"14px !important",color:"#7986cb",fontWeight:"600 !important",letterSpacing:"0.02em"},actionGrp:{"& .MuiButtonBase-root":{padding:"10px 5px !important"}}}),[$,B]=We.useState(null),z=e=>{const t=e.currentTarget.attributes["data-id"].value;B((0,i.A)((0,i.A)({},$),{},{[t]:e.currentTarget}))},H=()=>{B(null)},W=open?"simple-popover":void 0,U=F(),{t:V}=Vg(),G=Nt(),{programId:q,patientId:Y}=lo(),[Z,K]=We.useState({}),X=so(),Q=We.useRef(),[J,ee]=(0,We.useState)(!1),te=We.useCallback(()=>Q.current,[Q.current]),ne=(0,vwe.useReactToPrint)({content:te,onAfterPrint:()=>{K({})}}),re=!!ps(null===Z||void 0===Z?void 0:Z.diagnosis)||(null===Z||void 0===Z||null===(t=Z.diagnosis)||void 0===t?void 0:t.every(e=>cs(null===e||void 0===e?void 0:e.name))),ie=!!ps(null===Z||void 0===Z?void 0:Z.complaints)||(null===Z||void 0===Z||null===(n=Z.complaints)||void 0===n?void 0:n.every(e=>cs(null===e||void 0===e?void 0:e.name))),oe=!!ps(null===Z||void 0===Z?void 0:Z.advices)||(null===Z||void 0===Z||null===(r=Z.advices)||void 0===r?void 0:r.every(e=>cs(e))),ae=!!ps(null===Z||void 0===Z?void 0:Z.tests)||(null===Z||void 0===Z||null===(o=Z.tests)||void 0===o?void 0:o.every(e=>cs(e))),se=[{name:V("rpm_RPM"),url:ld.DOCTOR.PROGRAM},{name:null===M||void 0===M?void 0:M.display_name,url:"".concat(ld.DOCTOR.PROGRAM,"/").concat(null===M||void 0===M?void 0:M.code,"/patients")},{name:"".concat((null===O||void 0===O?void 0:O.first_name)||""," ").concat((null===O||void 0===O?void 0:O.last_name)||""),url:"".concat(ld.DOCTOR.PROGRAM,"/").concat(null===M||void 0===M?void 0:M.code,"/patients/").concat(null===O||void 0===O?void 0:O.id,"/dashboard")},{name:V("rpm_consultation"),url:""}],le=(e,t)=>{const n=sa().unix(e/1e3),r=sa().unix(t/1e3),i=r.diff(n,"year"),o=r.diff(n,"months"),a=r.diff(n,"days"),s=r.diff(n,"year");n.add(s,"years");const l=r.diff(n,"months");n.add(l,"months");const c=r.diff(n,"days");return s&&l?o:s?i:l?o:c?a:s&&l&&c?(s?"".concat(s," years "):"")+(l?"".concat(l," months "):"")+(c?"".concat(c," days"):""):void 0},ce=(e,t)=>{const n=sa().unix(e/1e3),r=sa().unix(t/1e3),i=r.diff(n,"year");n.add(i,"years");const o=r.diff(n,"months");n.add(o,"months");const a=r.diff(n,"days");return i&&o?"m":i?"y":o?"m":a?"d":void 0},de={prescriptionList:null===d||void 0===d?void 0:d.map(e=>(0,i.A)((0,i.A)({},e),{},{duration:le(null===e||void 0===e?void 0:e.start_date,null===e||void 0===e?void 0:e.end_date),duration_unit:ce(null===e||void 0===e?void 0:e.start_date,null===e||void 0===e?void 0:e.end_date),startDate:sa()(e.start_date).format("DD MMM YYYY"),endDate:sa()(e.end_date).format("DD MMM YYYY")}))};return We.useEffect(()=>{const e={breadcrumb:se};cs(M)||cs(O)||G(NC(e))},[M,O]),We.useEffect(()=>{cs(Z.id)||ne()},[Z.id]),(0,qt.jsxs)(qt.Fragment,{children:[(0,qt.jsxs)(op,{children:[(0,qt.jsx)(op,{sx:{width:"100%"},position:"relative",children:(0,qt.jsx)(Ff,{container:!0,children:(0,qt.jsx)(Ff,{item:!0,xs:12,md:6,children:(0,qt.jsx)(op,{children:(0,qt.jsx)(op,{sx:{display:{xs:"block",sm:"none"}},position:"absolute",top:"-48px",bottom:"0",left:"40px",children:(0,qt.jsx)(Cf,{variant:"h6",component:"h6",className:"headingInMobile",children:V("rpm_consultation")})})})})})}),(0,qt.jsxs)(op,{mb:1,textAlign:"right",className:"addConsultationBtn",display:"flex",alignItems:"center",justifyContent:"space-between",children:[(0,qt.jsx)(LCe,{onApply:()=>{ee(!J)},fetchListFunction:y,filterState:A,setFilterState:k,pageDetails:b,showFilterColor:v,setShowFilterColor:x,filterVariant:"text",filterName:"Filters",mobileFilterBG:!0}),(0,qt.jsxs)(xh,{className:"prescription-tour-step1",onClick:()=>X("".concat(ld.DOCTOR.PROGRAM,"/").concat(q,"/patients/").concat(Y,"/consultations/add-consultation")),variant:"contained",disableElevation:!0,style:{marginRight:"5px"},children:[(0,qt.jsx)(jue.A,{}),V("rpm_AddConsultation")]})]}),(0,qt.jsx)(Kz,{initialValues:cs(null===de||void 0===de?void 0:de.prescriptionList)?{prescriptionList:[]}:de,validationSchema:RU.addPrescriptionNote,enableReinitialize:!0,children:e=>{var t;let{values:n}=e;return(0,qt.jsx)(qt.Fragment,{children:(0,qt.jsx)(nH,{children:(0,qt.jsx)(op,{className:"pres_inputTab",children:cs(null===n||void 0===n?void 0:n.prescriptionList)?(0,qt.jsxs)("div",{style:{textAlign:"center",padding:"20px"},children:[(0,qt.jsx)("img",{src:g,alt:"No Data",style:{maxWidth:"200px",margin:"auto"}}),(0,qt.jsx)(Cf,{variant:"body2",children:V("rpm_EmptyNotesText")})]}):(0,qt.jsx)(Ff,{container:!0,spacing:2,children:null===n||void 0===n||null===(t=n.prescriptionList)||void 0===t?void 0:t.map((e,t)=>{var n;return(0,qt.jsx)(Ff,{item:!0,xs:12,sm:6,md:4,children:(0,qt.jsxs)(yH,{sx:{marginBottom:"5px",borderLeft:"4px solid #868fcd",overflow:"auto"},children:[(0,qt.jsx)(nW,{sx:{paddingBottom:"0"},action:(0,qt.jsx)(op,{sx:{display:"flex",justifyContent:"space-between"},children:(0,qt.jsxs)(op,{display:"flex",children:[(0,qt.jsx)(op,{item:!0,children:P.includes("status")&&(0,qt.jsx)(dM,{severity:e.status?"success":"error",icon:!1,sx:e=>({py:0,px:1,display:"inline-flex",fontSize:e.spacing(1.5),"& .MuiAlert-message":{p:e.spacing(.5,0)}}),children:(0,qt.jsx)("strong",{children:e.status?"Active":"Inactive"})})}),(0,qt.jsxs)(op,{sx:{display:"flex",justifyContent:"center",alignItems:"center",flexDirection:"column"},children:[(0,qt.jsx)(sy,{placement:"top",title:"Actions",children:(0,qt.jsx)(wh,{"data-id":e.id,onClick:z,style:{padding:"0 10px 0 10px"},children:(0,qt.jsx)(up.A,{})})}),(0,qt.jsx)(Vm,{id:W,open:null===$||void 0===$?void 0:$[e.id],anchorEl:null===$||void 0===$?void 0:$[e.id],onClose:H,anchorOrigin:{vertical:"bottom",horizontal:"center"},transformOrigin:{vertical:"top",horizontal:"center"},PaperProps:{sx:{backgroundColor:"transparent",boxShadow:"none"}},children:P.includes("action")&&(0,qt.jsxs)(op,{className:U.actionGrp,sx:{display:"flex",flexDirection:"column"},children:[_(e),j(e),(0,qt.jsx)(sy,{title:V("rpm_print"),children:(0,qt.jsx)(wh,{color:"primary",onClick:()=>Xd(G,Y,null===e||void 0===e?void 0:e.id),sx:{background:"#3f51b529",height:"28px",marginTop:"5px",marginBottom:"5px"},children:(0,qt.jsx)(YCe.A,{fontSize:"small",sx:{width:16,height:16}})})}),(null===M||void 0===M||null===(n=M.permissions)||void 0===n?void 0:n.showDeletePrescriptionList_showDeleteList)&&w(e)]})})]})]})}),title:(0,qt.jsxs)(op,{display:"flex",flexDirection:"column",sx:{width:"100%"},children:[(0,qt.jsx)(Cf,{variant:"body1",className:U.titles,fontWeight:600,children:V("rpm_Vitals")}),P.includes("vitaltype")&&(0,qt.jsx)(Cf,{sx:{minWidth:170,whiteSpace:"normal",fontWeight:600,fontSize:"14px"},color:"bp"===(null===e||void 0===e?void 0:e.vital)?"#000000DE":"glucose"===(null===e||void 0===e?void 0:e.vital)?"customClr.glucose":"grey",children:"bp"===(null===e||void 0===e?void 0:e.vital)||"glucose"===(null===e||void 0===e?void 0:e.vital)?V("rpm_".concat(null===e||void 0===e?void 0:e.vital)):V("rpm_Others")})]})}),(0,qt.jsxs)(wH,{sx:{paddingTop:"8px"},children:[(0,qt.jsxs)(op,{display:"flex",flexDirection:"column",sx:{width:"100%"},children:[(0,qt.jsx)(Cf,{variant:"body1",className:U.titles,fontWeight:600,children:V("rpm_consultationID")}),P.includes("prescriptionID")&&(0,qt.jsx)(Cf,{variant:"body2",children:null===e||void 0===e?void 0:e.id})]}),(0,qt.jsxs)(op,{display:"flex",flexDirection:"column",sx:{width:"100%"},pt:1,mt:.5,children:[(0,qt.jsx)(Cf,{variant:"body1",className:U.titles,fontWeight:600,children:V("rpm_consultationDuration")}),P.includes("prescription_duration")&&(0,qt.jsxs)(Cf,{variant:"body2",children:[sa()(null===e||void 0===e?void 0:e.start_date).format("DD MMM YYYY")," -"," ",sa()(null===e||void 0===e?void 0:e.end_date).format("DD MMM YYYY")]})]}),(0,qt.jsxs)(op,{display:"flex",pt:1,mt:.5,children:[(0,qt.jsxs)(op,{display:"flex",flexDirection:"column",sx:{width:"100%"},children:[(0,qt.jsx)(Cf,{variant:"body1",className:U.titles,fontWeight:600,children:V("rpm_Created_By")}),P.includes("createdBy")&&(0,qt.jsx)(Cf,{variant:"body2",children:null!==e&&void 0!==e&&e.created_by?e.created_by:"NA"})]}),(0,qt.jsx)(eg,{orientation:"vertical",variant:"middle",flexItem:!0,sx:{mx:"10px",mb:"0"}}),(0,qt.jsxs)(op,{display:"flex",flexDirection:"column",sx:{width:"100%"},pl:1,children:[(0,qt.jsx)(Cf,{variant:"body1",className:U.titles,fontWeight:600,children:V("rpm_Date")}),P.includes("duration")&&(0,qt.jsx)(Cf,{variant:"body2",color:"textSecondary",children:sa()(e.created_at).format("DD MMM YYYY")})]})]})]})]})},t)})})})})})}})]}),(0,qt.jsx)(bwe,{openModal:T,onCloseModal:E,order:a,orderBy:s,setOrderBy:c,addNewProgram:()=>{},editProgram:()=>{},filterState:A,setFilterState:k,setOrder:l,notesHead:p,prescriptionNotesModal:C,dataParameter:u,checkState:h,onCheck:m,isSelection:f,nodata:g,pageDetails:b,deleteButton:w,fetchPrescriptionList:y,prescriptionList:d,addNewNote:R}),(0,qt.jsxs)("div",{style:{display:"none"},children:[(0,qt.jsx)(Aye,{ref:Q,patientData:O,program:M,details:Z,doctor:I,isAdvices:!oe,isComplaints:!ie,isTests:!ae,isDiagnosis:!re}),(0,qt.jsx)(TE,{open:N,allHeadCells:p,initialHeadcells:P,setHeadcells:D,onClose:L})]})]})}Cwe.defaultProps={notesHead:[],prescriptionNotesModal:[],pageDetails:{},order:"",orderBy:"",dataParameter:"",checkState:[],onCheck:()=>{},isSelection:!1,nodata:"",prescriptionList:[],othernotesList:[],familynotesList:[],fetchPrescriptionList:()=>{},editMobileButton:()=>{},viewMobileButton:()=>{},PrintMobileButton:()=>{},VisibilityIcon:()=>{},deleteMobileButton:()=>{},fileModal:{},fileUploadButton:()=>{},fileUploadIconButton:()=>{},downloadFile:()=>{},saveButton:()=>{},closeButton:()=>{},filterState:{},setFilterState:()=>{},program:{},patientData:{},addNewNote:()=>{},noteTypesDropdown:{},showFilterColor:{},setShowFilterColor:()=>{},initialHeadcells:[],setHeadCells:()=>{},settingModal:!1,handleSettingModalToggle:()=>{},doctor:{},setDoctor:()=>{},fetchDoctor:()=>{}};const wwe=Cwe,Swe=(0,Cy.A)((0,qt.jsx)("path",{d:"M12 4.5C7 4.5 2.73 7.61 1 12c1.73 4.39 6 7.5 11 7.5s9.27-3.11 11-7.5c-1.73-4.39-6-7.5-11-7.5M12 17c-2.76 0-5-2.24-5-5s2.24-5 5-5 5 2.24 5 5-2.24 5-5 5m0-8c-1.66 0-3 1.34-3 3s1.34 3 3 3 3-1.34 3-3-1.34-3-3-3"}),"RemoveRedEye");const Awe=function(e){var t;let{patientData:n,program:r}=e;const o=window.innerWidth,a=Nt(),s=wt(bu),[l,c]=We.useState({}),d=!("true"===us(s,"user_principal.attributes.skip_tour[0]","")),u=wt(cu),{t:p}=Vg(),{programId:h,patientId:m}=lo(),[f,g]=We.useState([]),[v,x]=We.useState({vital:"",start_date:null,end_date:null}),[y,b]=We.useState(!1),[j,_]=We.useState("desc"),[C,w]=We.useState("created_at"),[S,A]=We.useState((0,i.A)({},{local:{files:[]},onCloud:{files:[]}})),[k,T]=We.useState({open:!1,data:{}}),[E,M]=(0,We.useState)([]),[O,R]=We.useState({open:!1,data:{}}),[P,D]=We.useState({open:!1,data:{}}),[N,L]=We.useState(""),[I,F]=We.useState({existingNoteTypes:[],nonExistingNoteTypes:[]}),$=so(),B=e=>{R((0,i.A)((0,i.A)({},O),{},{open:!O.open,data:e}))},[z,H]=We.useState(!1),[W,U]=We.useState(cs($o.getHeadCellsPrescription())?["duration","vitaltype","prescriptionID","prescription_duration","createdBy","status","action"]:$o.getHeadCellsPrescription()),V=function(e){U(e),$o.setHeadCellsPrescription(e)},G=e=>{D((0,i.A)((0,i.A)({},P),{},{open:!P.open,data:e}))},q=e=>{if(Array.isArray(e))return M(e.map(e=>e.toString()));const t=e.target.name;E.includes(t)?M(E.filter(e=>e!==t)):M(e=>[...e,t])},Y=async function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:v;try{const t={sort_by:C,sort_order:j},{data:n}=await a(Vl(h,m,(0,i.A)({},t),e));g(n)}catch(t){console.log(t)}},Z=async e=>{try{const{data:t}=await a(Xg(e));return t}catch(t){console.log(t)}},K=e=>{T((0,i.A)((0,i.A)({},k),{},{open:!k.open,data:(0,i.A)((0,i.A)({},e.note),{},{local_files:S})}))},X=(e,t)=>(0,qt.jsx)(wh,{p:0,onClick:()=>K({name:e,note:t}),className:"lightBlue",children:(0,qt.jsx)(T_e.A,{sx:{fontSize:"14px"}})}),Q=(e,t)=>(0,qt.jsx)(sy,{title:p("rpm_UploadMore"),children:(0,qt.jsx)(wh,{"data-id":t.id,color:"primary",sx:{bgcolor:"primary.theme.50"},onClick:()=>K({name:e,note:t}),children:(0,qt.jsx)(jje.A,{fontSize:"small",sx:{width:16,height:16}})})}),J=async e=>{let{noteId:t,file:n}=e;try{await a(Hl(h,m,{noteId:t,type:"PRESCRIPTION",fileData:n})),a(Zo({subTitle:"message:rpm_DownloadFileSuccessfully",severity:ud.SUCCESS}))}catch(r){const e=us(r,"response.data.code","");cs(e)?a(Zo({subTitle:"error:rpm_DownloadFileFailed",severity:ud.ERROR})):a(Zo({subTitle:Vd(e,"error:rpm_DownloadFileFailed"),severity:ud.ERROR}))}},ee=async e=>{const t=(0,i.A)((0,i.A)({},e),{},{type:"PRESCRIPTION"});try{await a(Fl(h,m,t)),Y({vital:"",start_date:null,end_date:null}),ie(),B(),a(Zo({subTitle:"message:rpm_NoteCreatedSuccessfully",severity:ud.SUCCESS}))}catch(n){const e=us(n,"response.data.code","");cs(e)?a(Zo({subTitle:"error:rpm_NoteCreatedFailed",severity:ud.ERROR})):a(Zo({subTitle:Vd(e,"error:rpm_NoteCreatedFailed"),severity:ud.ERROR}))}},te=async(e,t)=>{let{validateForm:n,setTouched:r}=t,i=null===e||void 0===e?void 0:e.start_date,o=null===e||void 0===e?void 0:e.end_date,s={};if("function"===typeof n&&(s=await n(),r(s)),cs(s)){var l,c;const t={id:null===e||void 0===e?void 0:e.id,vital:null===e||void 0===e?void 0:e.vital,medication:null===e||void 0===e?void 0:e.medication,frequency:null===e||void 0===e?void 0:e.frequency,start_date:i?sa()(i).valueOf():null,end_date:o?sa()(o).valueOf():null,note:null===e||void 0===e?void 0:e.note,type:"PRESCRIPTION",upload:cs(null===k||void 0===k||null===(l=k.data)||void 0===l?void 0:l.local_files)?[]:null===k||void 0===k||null===(c=k.data)||void 0===c?void 0:c.local_files};try{await a(Bl(h,m,t)),Y(),ie(),a(Zo({subTitle:"message:rpm_NoteUpdateSuccessfully",severity:ud.SUCCESS}))}catch(d){const e=us(d,"response.data.code","");cs(e)?a(Zo({subTitle:"error:rpm_NoteUpdateFailed",severity:ud.ERROR})):a(Zo({subTitle:Vd(e,"error:rpm_NoteUpdateFailed"),severity:ud.ERROR}))}}},ne=async e=>{try{var t;await a(((e,t,n)=>async r=>{r(na(!0));try{const r="".concat(ua.prescription,"/").concat(e,"/").concat(t,"/").concat(n.presId);return await Bu(r,{})}finally{r(na(!1))}})(h,m,{presId:null===e||void 0===e||null===(t=e.data)||void 0===t?void 0:t.id})),Y(),D((0,i.A)((0,i.A)({},P),{},{open:!P.open})),a(Zo({subTitle:"message:rpm_PrescriptionDeleteSuccessfully",severity:ud.SUCCESS}))}catch(n){const e=us(n,"response.data.code","");cs(e)?a(Zo({subTitle:"error:rpm_PrescriptionDeleteFailed",severity:ud.ERROR})):a(Zo({subTitle:Vd(e,"error:rpm_PrescriptionDeleteFailed"),severity:ud.ERROR}))}},re=(e,t)=>{let{validateForm:n,setTouched:r}=t;return(0,qt.jsx)(sy,{title:p("rpm_Save"),children:(0,qt.jsx)(wh,{className:"lightBlue",onClick:()=>e.id?te(e,{validateForm:n,setTouched:r}):ee(e),color:"primary",children:(0,qt.jsx)(wje.A,{fontSize:"small"})})})},ie=()=>{let e=(0,i.A)({},S);e.local.files.splice(0,e.local.files.length),A(e),T((0,i.A)((0,i.A)({},k),{},{open:!1}))},oe=(e,t,n)=>(0,qt.jsx)(sy,{title:p("rpm_Cancel"),children:(0,qt.jsx)(wh,{color:"error",onClick:()=>((e,t,n)=>{if(ie(),e.id){const t=null===f||void 0===f?void 0:f.map(t=>(0,i.A)((0,i.A)({},t),{},{isEdit:t.id===e.id&&!1}));g(t)}else t(n)})(e,t,n),className:"lightDanger",children:(0,qt.jsx)(_je.A,{fontSize:"small",sx:{width:16,height:16}})})}),ae=()=>{H(!z)};We.useEffect(()=>{u&&Y(),cs(r)||cs(n)||(async()=>{const{data:e}=await a(Ul(h,m));F({existingNoteTypes:e,nonExistingNoteTypes:_s(Jd,e)})})()},[u,j,C,r,n]),We.useEffect(()=>{a(NC({activeMenuItem:"consultations"}))},[]);const se=[{id:"medication",label:p("rpm_Medication"),isSort:!1,sortProperty:"medication"},{id:"dosage",label:p("rpm_Dosage"),isSort:!1,sortProperty:"rpm_Dosage"},{id:"duration",label:p("rpm_Duration"),isSort:!1,sortProperty:"duration"},{id:"comments",label:p("rpm_Comments"),isSort:!1,sortProperty:"comments"},{id:"action",label:p("rpm_Actions"),isSort:!1,sortProperty:"action"}],le=[{id:"duration",label:p("rpm_Date"),isSort:!1,sortProperty:"duration"},{id:"vitaltype",label:p("rpm_Vitals"),isSort:!1,sortProperty:"vitaltype"},{id:"prescriptionID",label:p("rpm_consultationID"),isSort:!1,sortProperty:"prescriptionID"},{id:"prescription_duration",label:p("rpm_consultationDuration"),isSort:!1,sortProperty:"prescriptionDuration"},{id:"createdBy",label:p("rpm_Created_By"),isSort:!1,sortProperty:"createdBy"},{id:"status",label:p("rpm_Status"),isSort:!1,sortProperty:"status"},{id:"action",label:p("rpm_Actions"),isSort:!1,sortProperty:"action"}];return cs(r)?(0,qt.jsx)(yp,{variant:"outlined",sx:{px:2.5,py:6,display:"flex",height:"320px"},children:(0,qt.jsx)(op,{alignSelf:"center",sx:{mx:"auto"},children:(0,qt.jsx)(MM,{color:"primary"})})}):(0,qt.jsxs)(qt.Fragment,{children:[null!==r&&void 0!==r&&null!==(t=r.permissions)&&void 0!==t&&t.showConsultationList?o>=575?(0,qt.jsx)(_we,{order:j,orderBy:C,setOrder:_,setOrderBy:w,dataParameter:"id",checkState:E,onCheck:q,isSelection:!1,nodata:GC,notesHead:le,initialHeadcells:W,setHeadCells:V,prescriptionNotesModal:se,prescriptionList:f,fetchPrescriptionList:Y,fileModal:k,editButton:e=>(0,qt.jsx)(sy,{title:p("rpm_Edit"),children:(0,qt.jsx)(wh,{color:"primary",disabled:!!e.dummy,onClick:()=>{$("edit-consultation/".concat(null===e||void 0===e?void 0:e.id))},children:(0,qt.jsx)(fc,{fontSize:"small",sx:{width:16,height:16}})})}),viewButton:e=>(0,qt.jsx)(sy,{title:p("rpm_view"),children:(0,qt.jsx)(wh,{"data-id":e.id,color:"primary",onClick:async()=>{$("".concat(null===e||void 0===e?void 0:e.id),{state:l})},children:(0,qt.jsx)(gc,{fontSize:"small",sx:{width:16,height:16}})})}),PrintButton:e=>(0,qt.jsx)(sy,{title:p("rpm_print"),children:(0,qt.jsx)(wh,{"data-id":e.id,color:"primary",onClick:()=>{},children:(0,qt.jsx)(YCe.A,{fontSize:"small",sx:{width:16,height:16}})})}),doctor:l,setDoctor:c,fetchDoctor:Z,deleteButton:e=>(0,qt.jsx)(wh,{"data-id":e.id,color:"error",onClick:()=>G(e),children:(0,qt.jsx)(xc,{fontSize:"small",sx:{width:16,height:16}})}),fileUploadButton:X,fileUploadIconButton:Q,downloadFile:J,saveButton:re,closeButton:oe,showFilterColor:y,setShowFilterColor:b,filterState:v,setFilterState:x,presModal:O,handlePresModalToggle:B,patientData:n,program:r,addNewNote:ee,noteTypesDropdown:I,settingModal:z,handleSettingModalToggle:ae}):(0,qt.jsx)(wwe,{order:j,orderBy:C,setOrder:_,setOrderBy:w,dataParameter:"id",checkState:E,onCheck:q,isSelection:!1,nodata:GC,notesHead:le,initialHeadcells:W,setHeadCells:V,prescriptionNotesModal:se,prescriptionList:f,fetchPrescriptionList:Y,fileModal:k,editMobileButton:e=>(0,qt.jsx)(sy,{title:p("rpm_Edit"),children:(0,qt.jsx)(wh,{color:"primary",disabled:!!e.dummy,onClick:()=>{$("edit-consultation/".concat(null===e||void 0===e?void 0:e.id))},sx:{background:"#3f51b529",height:"28px",marginTop:"5px"},children:(0,qt.jsx)(kCe.A,{fontSize:"small",sx:{width:16,height:16}})})}),viewMobileButton:e=>(0,qt.jsx)(sy,{title:p("rpm_view"),children:(0,qt.jsx)(wh,{"data-id":e.id,color:"primary",onClick:async()=>{$("".concat(null===e||void 0===e?void 0:e.id),{state:l})},sx:{background:"#3f51b529",height:"28px",marginTop:"5px"},children:(0,qt.jsx)(Swe,{fontSize:"small",sx:{width:16,height:16}})})}),PrintMobileButton:e=>(0,qt.jsx)(sy,{title:p("rpm_print"),children:(0,qt.jsx)(wh,{"data-id":e.id,color:"primary",onClick:()=>{},sx:{background:"#3f51b529",height:"28px",marginTop:"5px"},children:(0,qt.jsx)(YCe.A,{fontSize:"small",sx:{width:16,height:16}})})}),doctor:l,setDoctor:c,fetchDoctor:Z,deleteMobileButton:e=>(0,qt.jsx)(wh,{"data-id":e.id,color:"error",onClick:()=>G(e),disableFocusRipple:!0,disableTouchRipple:!0,sx:{background:"#ff00001c",height:"28px"},children:(0,qt.jsx)(Uje.A,{fontSize:"small",sx:{width:16,height:16}})}),fileUploadButton:X,fileUploadIconButton:Q,downloadFile:J,saveButton:re,closeButton:oe,showFilterColor:y,setShowFilterColor:b,filterState:v,setFilterState:x,presModal:O,handlePresModalToggle:B,patientData:n,program:r,addNewNote:ee,noteTypesDropdown:I,settingModal:z,handleSettingModalToggle:ae}):(0,qt.jsx)(LC,{}),(0,qt.jsx)(gwe,{openModal:null===k||void 0===k?void 0:k.open,onCloseModal:ie,actionFunction:te,onFileUpload:function(e){const t=e.target.files;let n=(0,i.A)({},S.local);t&&Array.from(t).forEach(e=>{var t;return cs(null===n||void 0===n||null===(t=n.files)||void 0===t?void 0:t.find(t=>t.name===e.name))?(null===e||void 0===e?void 0:e.size)>=5242880?a(Zo({subTitle:"error:rpm_ImageSize",severity:ud.ERROR})):(e.url=URL.createObjectURL(e),void n.files.push(e)):a(Zo({subTitle:"error:rpm_SameFileName",severity:ud.ERROR}))}),A(e=>(0,i.A)((0,i.A)({},e),{},{local:n})),e.target.value=""},initialValues:S,onLocalFileDelete:function(e){let t=(0,i.A)({},S);t.local.files.splice(e,1),A(t)},fileModal:k,onCloudFilesDelete:async(e,t)=>{try{await a(Wl(h,m,{noteId:e.id,fileId:t,type:"PRESCRIPTION"})),Y(),function(e,t){var n;const r=null===e||void 0===e||null===(n=e.files)||void 0===n?void 0:n.filter(e=>(null===e||void 0===e?void 0:e.id)!==t);T((0,i.A)((0,i.A)({},k),{},{data:(0,i.A)((0,i.A)({},e),{},{files:r})}))}(e,t),a(Zo({subTitle:"message:rpm_FileDeletedSuccessfully",severity:ud.SUCCESS}))}catch(n){const e=us(n,"response.data.code","");cs(e)?a(Zo({subTitle:"error:rpm_FileDeleteFailed",severity:ud.ERROR})):a(Zo({subTitle:Vd(e,"error:rpm_FileDeleteFailed"),severity:ud.ERROR}))}},onCloudFileDownload:J}),(0,qt.jsx)(qV,{openModal:P.open,onCloseModal:G,actionFunction:()=>ne(P),dataName:P.data.disease_name,options:{primaryText:p("message:rpm_DeleteTitle"),secondaryText:p("message:rpm_DeleteBodyText"),descText:p("message:rpm_DeleteSubText"),btn:{primaryText:p("rpm_Delete"),secondaryText:p("rpm_Cancel"),primaryColor:"error",secondaryColor:"primary"},btnSwap:!0}}),(0,qt.jsx)(zZ,{isTour:d,path:"prescriptionTour",setRenderer:L}),(0,qt.jsx)("input",{type:"hidden",id:"rerenderer",value:N})]})};function kwe(e){let{alertsList:t,order:n,orderBy:r,setOrder:i,setOrderBy:o,dataParameter:a,alertsHead:s,checkState:l,onCheck:c,isSelection:d,nodata:u,fetchResolvePatientAlerts:p,pageDetails:h,filterState:m,setFilterState:f,patientData:g,program:v,noteTypesDropdown:x,showFilterColor:y,setShowFilterColor:b,setHeadcells:j,settingModal:_,initialHeadcells:C,handleSettingModalToggle:w}=e;const{t:S}=Vg(),A=Nt(),k=so(),{programId:T,patientId:E}=lo(),M=[{name:S("rpm_RPM"),url:ld.DOCTOR.PROGRAM},{name:null===v||void 0===v?void 0:v.display_name,url:"".concat(ld.DOCTOR.PROGRAM,"/").concat(null===v||void 0===v?void 0:v.code,"/patients")},{name:"".concat((null===g||void 0===g?void 0:g.first_name)||""," ").concat((null===g||void 0===g?void 0:g.last_name)||""),url:"".concat(ld.DOCTOR.PROGRAM,"/").concat(null===v||void 0===v?void 0:v.code,"/patients/").concat(null===g||void 0===g?void 0:g.id,"/dashboard")},{name:S("rpm_NoteResolvedAlerts"),url:""}];return We.useEffect(()=>{const e={breadcrumb:M};cs(v)||cs(g)||A(NC(e))},[v,g]),(0,qt.jsxs)(op,{children:[(0,qt.jsx)(op,{sx:{width:"100%"},children:(0,qt.jsxs)(Ff,{container:!0,children:[(0,qt.jsx)(Ff,{item:!0,xs:12,md:6,children:(0,qt.jsxs)(op,{sx:{mb:1},position:"relative",children:[(0,qt.jsx)(op,{sx:{display:{xs:"none",sm:"block"}},children:(0,qt.jsx)(Cf,{variant:"h5",component:"h5",children:S("rpm_Notes")})}),(0,qt.jsx)(op,{sx:{display:{xs:"block",sm:"none"}},position:"absolute",top:"-48px",left:"40px",children:(0,qt.jsx)(Cf,{variant:"h6",component:"h6",children:S("rpm_Notes")})})]})}),(0,qt.jsx)(Ff,{item:!0,xs:12,md:6,children:(0,qt.jsxs)(op,{display:"flex",flexWrap:"wrap",gap:1,mb:3,justifyContent:"end",alignItems:"center",children:[(0,qt.jsx)(xh,{variant:"contained",size:"small",disableElevation:!0,onClick:()=>k("".concat(ld.DOCTOR.PROGRAM,"/").concat(T,"/patients/").concat(E,"/notes/resolve-alerts")),children:S("rpm_NoteResolvedAlerts")}),x.existingNoteTypes.map(e=>{if("PRESCRIPTION"!==e)return(0,qt.jsx)(qt.Fragment,{children:(0,qt.jsx)(xh,{variant:"outlined",size:"small",disableElevation:!0,onClick:()=>k("".concat(ld.DOCTOR.PROGRAM,"/").concat(T,"/patients/").concat(E,"/notes/").concat(e.toLowerCase(),"-note")),children:S("rpm_".concat(xs(e.toLowerCase()),"Notes"))})})}),!cs(x.nonExistingNoteTypes)&&(0,qt.jsx)(op,{sx:{display:"flex",alignItems:"center","& .MuiSelect-select":{p:.7}},className:"remove_selectborder",children:(0,qt.jsx)(d_,{sx:{display:"flex",alignItems:"center"},children:(0,qt.jsxs)(G_,{sx:{maxWidth:180,color:"primary.theme.500",borderColor:"primary.theme.500",borderRadius:"4px",pl:"5px",fontSize:"14px"},fullWidth:!0,variant:"outlined",size:"small",defaultValue:"additionalNotes",children:[(0,qt.jsx)(mf,{value:"additionalNotes",disabled:!0,sx:{display:"none"},children:S("rpm_AdditionalNotes")}),x.nonExistingNoteTypes.map(e=>{if("PRESCRIPTION"!==e)return(0,qt.jsx)(mf,{value:e,onClick:()=>k("".concat(ld.DOCTOR.PROGRAM,"/").concat(T,"/patients/").concat(E,"/notes/").concat(e.toLowerCase(),"-note")),children:S("rpm_".concat(xs(e.toLowerCase()),"Notes"))},e)})]})})})]})})]})}),(0,qt.jsx)(op,{bgcolor:"white",className:"UseNoteFilter",p:2,children:(0,qt.jsxs)(Ff,{container:!0,spacing:2,alignItems:"center",children:[(0,qt.jsx)(Ff,{item:!0,md:12,lg:9,xl:8,children:(0,qt.jsx)(MCe,{fetchListFunction:p,pageDetails:h,filterState:m,setFilterState:f,showFilterColor:y,setShowFilterColor:b})}),(0,qt.jsx)(Ff,{item:!0,ml:"auto",children:(0,qt.jsx)(sy,{title:S("rpm_TableCellSetting"),children:(0,qt.jsx)(sv,{sx:{boxShadow:"none",width:32,height:32,minHeight:"auto"},size:"small",color:"primary",onClick:w,children:(0,qt.jsx)(YC.A,{fontSize:"small",sx:{width:16,height:16}})})})})]})}),(0,qt.jsx)(UT,{order:n,orderBy:r,setOrder:i,setOrderBy:o,data:t,headCells:null===s||void 0===s?void 0:s.filter(e=>C.includes(e.id)),dataParameter:a,selected:l,setSelected:c,isSelection:d,noDataImage:u,fetchList:p,skeletonVrows:6,className:"theme_scroll",children:null===t||void 0===t?void 0:t.map(e=>{var t,n;return(0,qt.jsxs)(cw,{sx:{"&:last-child td, &:last-child th":{border:0}},children:[C.includes("vital")&&(0,qt.jsxs)(gw,{children:[(null===e||void 0===e||null===(t=e.alerts)||void 0===t?void 0:t.length)>0?null===e||void 0===e?void 0:e.alerts.map((e,t)=>(0,qt.jsx)(op,{component:"span",display:"inline-flex",mr:1,children:(0,qt.jsxs)(op,{component:"span",children:["bp systolic"===(null===e||void 0===e?void 0:e.data_name)&&(0,qt.jsxs)(Cf,{color:"customClr.bp",fontWeight:600,component:"span",fontSize:14,children:[" ",S("rpm_BloodPressure")]}),"bp diastolic"===(null===e||void 0===e?void 0:e.data_name)&&"","pulse"===(null===e||void 0===e?void 0:e.data_name)&&(0,qt.jsxs)(Cf,{color:"customClr.pulse",fontWeight:600,component:"span",fontSize:14,children:[" ",S("rpm_Pulse")]}),"glucose"===(null===e||void 0===e?void 0:e.data_name.split(" ")[0])&&(0,qt.jsxs)(Cf,{color:"customClr.glucose",fontWeight:600,component:"span",fontSize:14,children:[" ",S("rpm_Glucose")]})]})},t)):"NA"," "]}),C.includes("reading")&&(0,qt.jsx)(gw,{children:(0,qt.jsx)(dM,{component:"span",icon:!1,sx:e=>({bgcolor:e.palette.primary.theme[50],color:e.palette.primary.main,py:0,px:1,display:"inline-flex",fontSize:e.spacing(1.5),fontWeight:600,"& .MuiAlert-message":{p:e.spacing(.5,0)},textTransform:"capitalize"}),children:(null===e||void 0===e||null===(n=e.alerts)||void 0===n?void 0:n.length)>0?null===e||void 0===e?void 0:e.alerts.map((e,t)=>(0,qt.jsx)(op,{component:"span",display:"inline-flex",mr:1,children:(0,qt.jsxs)(op,{component:"span",children:["bp systolic"===(null===e||void 0===e?void 0:e.data_name)&&"Sys: ","bp diastolic"===(null===e||void 0===e?void 0:e.data_name)&&"Dia: ","pulse"===(null===e||void 0===e?void 0:e.data_name)&&"Pulse: ",null===e||void 0===e?void 0:e.value]})},t)):"NA"})}),C.includes("description")&&(0,qt.jsx)(gw,{children:null===e||void 0===e?void 0:e.alerts.map((e,t)=>(0,qt.jsx)(op,{children:(0,qt.jsx)(op,{component:"span",children:0===t&&(0,qt.jsx)(op,{component:"span",children:S("rpm_".concat(null===e||void 0===e?void 0:e.text))})})},t))}),C.includes("created_time")&&(0,qt.jsx)(gw,{children:e.ts}),C.includes("modified_message")&&(0,qt.jsx)(gw,{sx:{whiteSpace:"normal"},children:e.follow_up})]},e.id)})}),(0,qt.jsx)(KE,{pageDetails:h,fetchListFunction:p}),(0,qt.jsx)(TE,{open:_,allHeadCells:s,initialHeadcells:C,setHeadcells:j,onClose:w})]})}kwe.defaultProps={alertsHead:[],pageDetails:{},order:"",orderBy:"",setOrder:()=>{},setOrderBy:()=>{},dataParameter:"",checkState:[],onCheck:()=>{},isSelection:!1,nodata:"",alertsList:[],otherResolvedAlertList:[],resolvedAlertList:[],fetchResolvePatientAlerts:()=>{},editButton:()=>{},viewButton:()=>{},deleteButton:()=>{},filterState:{},setFilterState:()=>{},program:{},patientData:{},noteTypesDropdown:{},showFilterColor:{},setShowFilterColor:()=>{},initialHeadcells:Uu().array,setHeadcells:Uu().func,settingModal:Uu().bool,handleSettingModalToggle:Uu().func};var Twe=n(19778);function Ewe(e){let{alertsList:t,fetchResolvePatientAlerts:n,pageDetails:r,filterState:i,setFilterState:o,patientData:a,program:s,noteTypesDropdown:l,showFilterColor:c,setShowFilterColor:d,initialHeadcells:u}=e;const p=ICe(),{t:h}=Vg(),m=Nt(),f=so(),{programId:g,patientId:v}=lo(),[x,y]=(0,We.useState)(!1),b=e=>()=>{y(e)},j=[{name:h("rpm_RPM"),url:ld.DOCTOR.PROGRAM},{name:null===s||void 0===s?void 0:s.display_name,url:"".concat(ld.DOCTOR.PROGRAM,"/").concat(null===s||void 0===s?void 0:s.code,"/patients")},{name:"".concat((null===a||void 0===a?void 0:a.first_name)||""," ").concat((null===a||void 0===a?void 0:a.last_name)||""),url:"".concat(ld.DOCTOR.PROGRAM,"/").concat(null===s||void 0===s?void 0:s.code,"/patients/").concat(null===a||void 0===a?void 0:a.id,"/dashboard")},{name:h("rpm_NoteResolvedAlerts"),url:""}];return We.useEffect(()=>{const e={breadcrumb:j};cs(s)||cs(a)||m(NC(e))},[s,a]),(0,qt.jsxs)(op,{children:[(0,qt.jsxs)(op,{sx:{width:"100%"},children:[(0,qt.jsxs)(op,{sx:{mb:1},position:"relative",children:[(0,qt.jsx)(op,{position:"absolute",top:"-45px",left:"40px",children:(0,qt.jsx)(Cf,{variant:"h6",component:"h6",fontSize:16,children:h("rpm_Notes")})}),(0,qt.jsx)(op,{position:"absolute",top:"-50px",right:"0px",children:(0,qt.jsx)(op,{children:(0,qt.jsx)(wh,{onClick:b(!0),sx:{background:"#e8eaf6",padding:"5px"},children:(0,qt.jsx)(DCe.A,{color:"primary",sx:{padding:"0"}})})})})]}),(0,qt.jsx)(dg,{anchor:"left",open:x,onClose:b(!1),children:(0,qt.jsxs)("div",{style:{width:230},children:[(0,qt.jsxs)("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between",background:"#f2f2fe",padding:"5px 10px"},children:[(0,qt.jsx)(Cf,{variant:"h6",sx:{color:"#7986cb",fontWeight:"600"},children:h("rpm_Notes")}),(0,qt.jsx)(wh,{onClick:b(!1),children:(0,qt.jsx)(J_.A,{})})]}),(0,qt.jsx)(op,{sx:{padding:"10px"},children:(0,qt.jsxs)(op,{display:"flex",flexWrap:"wrap",gap:1,mb:3,justifyContent:"end",alignItems:"center",children:[l.existingNoteTypes.map(e=>{if("PRESCRIPTION"!==e)return(0,qt.jsx)(qt.Fragment,{children:(0,qt.jsx)(xh,{variant:"outlined",size:"small",disableElevation:!0,onClick:()=>f("".concat(ld.DOCTOR.PROGRAM,"/").concat(g,"/patients/").concat(v,"/notes/").concat(e.toLowerCase(),"-note")),children:h("rpm_".concat(xs(e.toLowerCase()),"Notes"))})})}),!cs(l.nonExistingNoteTypes)&&(0,qt.jsx)(op,{sx:{display:"flex",alignItems:"center","& .MuiSelect-select":{p:.7},width:"100%"},className:"remove_selectborder",children:(0,qt.jsx)(d_,{sx:{display:"flex",alignItems:"center",width:"100%"},children:(0,qt.jsxs)(G_,{sx:{color:"primary.theme.500",borderColor:"primary.theme.500",borderRadius:"4px",pl:"5px",fontSize:"13px",fontWeight:"600",width:"100%"},fullWidth:!0,variant:"outlined",size:"small",defaultValue:"additionalNotes",children:[(0,qt.jsx)(mf,{value:"additionalNotes",disabled:!0,sx:{display:"none"},children:h("rpm_AdditionalNotes")}),l.nonExistingNoteTypes.map(e=>{if("PRESCRIPTION"!==e)return(0,qt.jsx)(mf,{value:e,onClick:()=>f("".concat(ld.DOCTOR.PROGRAM,"/").concat(g,"/patients/").concat(v,"/notes/").concat(e.toLowerCase(),"-note")),children:h("rpm_".concat(xs(e.toLowerCase()),"Notes"))},e)})]})})}),(0,qt.jsx)(xh,{fullWidth:!0,variant:"outlined",size:"small",disableElevation:!0,onClick:()=>f("".concat(ld.DOCTOR.PROGRAM,"/").concat(g,"/patients/").concat(v,"/notes/resolve-alerts")),endIcon:(0,qt.jsx)(FCe.A,{sx:{color:"#3f51b5"}}),sx:{justifyContent:"space-between"},children:h("rpm_NoteResolvedAlerts")})]})})]})})]}),(0,qt.jsx)(LCe,{fetchListFunction:n,pageDetails:r,filterState:i,setFilterState:o,showFilterColor:c,setShowFilterColor:d,filterVariant:"text",filterName:"Filters",mobileFilterBG:!0}),null===t||void 0===t?void 0:t.map(e=>{var t,n;return(0,qt.jsxs)(yH,{className:"theme_scroll",sx:{mt:1,mb:2},children:[(0,qt.jsx)(op,{mb:1,sx:{padding:"10px 16px",background:"#e8eaf6",color:"#3f51b5"},display:"flex",alignItems:"center",children:(0,qt.jsxs)(Cf,{fontSize:14,fontWeight:600,sx:{display:"flex",alignItems:"center"},children:[(0,qt.jsx)(Twe.A,{sx:{color:"green !important",fontSize:"16px",marginRight:"5px"}}),"Resolved Alerts"]})}),(0,qt.jsx)(wH,{sx:{padding:"0 16px 16px"},children:(0,qt.jsxs)(op,{display:"flex",flexDirection:"column",gap:1,children:[(0,qt.jsxs)(op,{display:"flex",flexDirection:"column",sx:{width:"100%"},children:[(0,qt.jsx)(Cf,{variant:"body1",className:p.titles,fontWeight:600,children:"Vitals:"}),u.includes("vital")&&(0,qt.jsx)(op,{display:"flex",alignItems:"center",children:(null===e||void 0===e||null===(t=e.alerts)||void 0===t?void 0:t.length)>0?null===e||void 0===e?void 0:e.alerts.map((e,t)=>(0,qt.jsxs)(op,{component:"span",display:"inline-flex",mr:1,children:["bp systolic"===(null===e||void 0===e?void 0:e.data_name)&&(0,qt.jsx)(Cf,{color:"customClr.bp",fontWeight:600,component:"span",fontSize:14,children:h("rpm_BloodPressure")}),"pulse"===(null===e||void 0===e?void 0:e.data_name)&&(0,qt.jsx)(Cf,{color:"customClr.pulse",fontWeight:600,component:"span",fontSize:14,children:h("rpm_Pulse")}),"glucose"===(null===e||void 0===e?void 0:e.data_name.split(" ")[0])&&(0,qt.jsx)(Cf,{color:"customClr.glucose",fontWeight:600,component:"span",fontSize:14,children:h("rpm_Glucose")})]},t)):"NA"})]}),(0,qt.jsxs)(op,{display:"flex",flexDirection:"column",sx:{width:"100%"},children:[(0,qt.jsx)(Cf,{variant:"body1",className:p.titles,fontWeight:600,children:"Readings:"}),u.includes("reading")&&(0,qt.jsx)(dM,{icon:!1,sx:e=>({bgcolor:e.palette.primary.theme[50],color:e.palette.primary.main,py:0,px:1,display:"inline-flex",fontSize:e.spacing(1.5),fontWeight:600,textTransform:"capitalize",width:"fit-content"}),children:(null===e||void 0===e||null===(n=e.alerts)||void 0===n?void 0:n.length)>0?null===e||void 0===e?void 0:e.alerts.map((e,t)=>(0,qt.jsxs)(op,{component:"span",display:"inline-flex",mr:1,children:["bp systolic"===(null===e||void 0===e?void 0:e.data_name)&&"Sys: ","bp diastolic"===(null===e||void 0===e?void 0:e.data_name)&&"Dia: ","pulse"===(null===e||void 0===e?void 0:e.data_name)&&"Pulse: ",null===e||void 0===e?void 0:e.value]},t)):"NA"})]}),(0,qt.jsxs)(op,{display:"flex",flexDirection:"column",sx:{width:"100%"},children:[(0,qt.jsx)(Cf,{variant:"body1",className:p.titles,fontWeight:600,children:"Description:"}),u.includes("description")&&(0,qt.jsx)(op,{children:null===e||void 0===e?void 0:e.alerts.map((e,t)=>(0,qt.jsx)(op,{children:0===t&&(0,qt.jsx)(Cf,{fontSize:14,fontWeight:500,color:"textSecondary",children:h("rpm_".concat(null===e||void 0===e?void 0:e.text))})},t))})]}),(0,qt.jsxs)(op,{display:"flex",flexDirection:"column",sx:{width:"100%"},children:[(0,qt.jsx)(Cf,{variant:"body1",className:p.titles,fontWeight:600,children:"Date & Time:"}),u.includes("created_time")&&(0,qt.jsx)(Cf,{variant:"body2",color:"textSecondary",fontSize:14,fontWeight:500,children:e.ts})]}),(0,qt.jsxs)(op,{display:"flex",flexDirection:"column",sx:{width:"100%"},children:[(0,qt.jsx)(Cf,{variant:"body1",className:p.titles,fontWeight:600,children:"Follow Up Message:"}),u.includes("modified_message")&&(0,qt.jsx)(Cf,{variant:"body2",color:"textSecondary",sx:{whiteSpace:"normal"},fontSize:14,fontWeight:500,children:e.follow_up})]})]})})]},e.id)})]})}Ewe.defaultProps={alertsHead:[],pageDetails:{},order:"",orderBy:"",setOrder:()=>{},setOrderBy:()=>{},dataParameter:"",checkState:[],onCheck:()=>{},isSelection:!1,nodata:"",alertsList:[],otherResolvedAlertList:[],resolvedAlertList:[],fetchResolvePatientAlerts:()=>{},editButton:()=>{},viewButton:()=>{},deleteButton:()=>{},filterState:{},setFilterState:()=>{},program:{},patientData:{},noteTypesDropdown:{},showFilterColor:{},setShowFilterColor:()=>{},initialHeadcells:Uu().array,setHeadcells:Uu().func,settingModal:Uu().bool,handleSettingModalToggle:Uu().func};const Mwe=["content"];const Owe=function(e){let{patientData:t,program:n}=e;const r=window.innerWidth,o=Nt(),a=wt(cu),{t:s}=Vg(),l=wt(bu),c=!("true"===us(l,"user_principal.attributes.skip_tour[0]","")),{enqueueSnackbar:d}=hi(),{programId:u,patientId:p}=lo(),[h,m]=(0,We.useState)("desc"),[f,g]=(0,We.useState)("ts"),[v,x]=We.useState(null),[y,b]=(0,We.useState)([]),[j,_]=We.useState(!1),[C,w]=We.useState(""),[S,A]=We.useState(null),[k,T]=We.useState((0,i.A)({},dd)),[E,M]=We.useState({vital:"",start_date:null,end_date:null}),[O,R]=(0,We.useState)((0,i.A)({},dd)),[P,D]=We.useState({open:!1,data:{}}),[N,L]=We.useState({existingNoteTypes:[],nonExistingNoteTypes:[]}),[I,F]=We.useState(!1),[$,B]=We.useState(cs($o.getResolvedAlertsHeadcells())?["vital","reading","description","created_time","modified_message"]:$o.getResolvedAlertsHeadcells()),z=function(e){B(e),$o.setResolvedAlertsHeadcells(e)},H=()=>{F(!I)},W=e=>{D((0,i.A)((0,i.A)({},P),{},{open:!P.open,data:e}))},U=e=>{if(Array.isArray(e))return b(e.map(e=>e.toString()));const t=e.target.name;y.includes(t)?b(y.filter(e=>e!==t)):b(e=>[...e,t])},V=e=>(0,qt.jsx)(sy,{title:s("rpm_Edit"),children:(0,qt.jsx)(wh,{"data-id":e.id,color:"primary",children:(0,qt.jsx)(fc,{fontSize:"small",sx:{width:16,height:16}})})}),G=e=>(0,qt.jsx)(sy,{title:s("rpm_view"),children:(0,qt.jsx)(wh,{"data-id":e.id,color:"primary",onClick:()=>{},children:(0,qt.jsx)(gc,{fontSize:"small",sx:{width:16,height:16}})})}),q=e=>(0,qt.jsx)(wh,{"data-id":e.id,color:"error",onClick:()=>W(e),children:(0,qt.jsx)(xc,{fontSize:"small",sx:{width:16,height:16}})}),Y=async function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:E;(async e=>{try{const{data:t}=await o(vl(p,e)),n=t||{},{content:r}=n,a=Ko(n,Mwe);x(r),A(e=>(0,i.A)((0,i.A)({},e),{},{resolveAlerts:null===a||void 0===a?void 0:a.total})),T(e=>(0,i.A)((0,i.A)({},e),{},{last_page:a.last_page,current_page:a.current_page,from:a.from,per_page:a.per_page,to:a.to,total:a.total}))}catch(t){d(t.message,{variant:"error"})}})((0,i.A)((0,i.A)({},k),{},{sort_by:f,sort_order:h,includeDismissed:!0,vitalType:e.vital,minTs:sa()(e.start_date).valueOf(),maxTs:sa()(e.end_date).valueOf()}))};We.useEffect(()=>{a&&Y(),cs(n)||cs(t)||(async()=>{const{data:e}=await o(Ul(u,p));L({existingNoteTypes:e,nonExistingNoteTypes:_s(Jd,e)})})()},[a,n,t]),We.useEffect(()=>{o(NC({activeMenuItem:"notes"}))},[]);const Z=[{id:"vital",label:s("rpm_Vitals"),isSort:!1,sortProperty:"vital"},{id:"reading",label:s("rpm_Readings"),isSort:!1,sortProperty:"reading"},{id:"description",label:s("rpm_Description"),isSort:!1,sortProperty:"description"},{id:"created_time",label:s("rpm_DateTime"),isSort:!1,sortProperty:"created_time"},{id:"modified_message",label:s("rpm_AlertMessage"),isSort:!1,sortProperty:"modified_message"}];return(0,qt.jsxs)(qt.Fragment,{children:[r>=575?(0,qt.jsxs)(qt.Fragment,{children:[(0,qt.jsx)(kwe,{order:h,orderBy:f,setOrder:m,setOrderBy:g,dataParameter:"id",checkState:y,onCheck:U,isSelection:!1,nodata:SCe,showFilterColor:j,setShowFilterColor:_,alertsHead:Z,alertsList:v,fetchResolvePatientAlerts:Y,pageDetails:O,editButton:V,viewButton:G,deleteButton:q,filterState:E,setFilterState:M,patientData:t,program:n,noteTypesDropdown:N,setHeadcells:z,settingModal:I,initialHeadcells:$,handleSettingModalToggle:H}),(0,qt.jsx)(qV,{openModal:P.open,onCloseModal:W,actionFunction:()=>console.log(P),dataName:P.data.title,options:{primaryText:s("message:rpm_DeleteTitle"),secondaryText:s("message:rpm_DeleteBodyText"),descText:s("message:rpm_DeleteSubText"),btn:{primaryText:s("rpm_Delete"),secondaryText:s("rpm_Cancel"),primaryColor:"error",secondaryColor:"primary"},btnSwap:!0}})]}):(0,qt.jsxs)(qt.Fragment,{children:[(0,qt.jsx)(Ewe,{order:h,orderBy:f,setOrder:m,setOrderBy:g,dataParameter:"id",checkState:y,onCheck:U,isSelection:!1,nodata:SCe,showFilterColor:j,setShowFilterColor:_,alertsHead:Z,alertsList:v,fetchResolvePatientAlerts:Y,pageDetails:O,editButton:V,viewButton:G,deleteButton:q,filterState:E,setFilterState:M,patientData:t,program:n,noteTypesDropdown:N,setHeadcells:z,settingModal:I,initialHeadcells:$,handleSettingModalToggle:H}),(0,qt.jsx)(zje,{openModal:P.open,onCloseModal:W,actionFunction:()=>console.log(P),dataName:P.data.title,options:{primaryText:s("message:rpm_DeleteTitle"),secondaryText:s("message:rpm_DeleteBodyText"),btn:{primaryText:s("rpm_Delete"),secondaryText:s("rpm_Cancel"),primaryColor:"error",secondaryColor:"primary"},btnSwap:!0}})]}),(0,qt.jsx)(zZ,{isTour:c,path:"notesTour",setRenderer:w}),(0,qt.jsx)("input",{type:"hidden",id:"rerenderer",value:C})]})};function Rwe(e){var t;let{editButton:n,deleteButton:r,viewButton:i,initialFormValues:o,addNewNote:a,fileUploadButton:s,fileModal:l,fileUploadIconButton:c,notesList:d,editableNoteId:u,downloadFile:p,setToggleAddNote:h,toggleAddNote:m,closeEditMode:f,editNote:g,fetchNoteList:v,pageDetails:x,filterState:y,setFilterState:b,onLocalFileDelete:j,onCloudFilesDelete:_,patientData:C,program:w,noteTypesDropdown:S,showFilterColor:A,setShowFilterColor:k}=e;const{t:T}=Vg(),E=Nt(),M=so(),{programId:O,patientId:R}=lo(),P=We.useMemo(()=>({toolbar:{container:[["bold","italic","underline","strike"],[{size:[]},{color:[]}],[{list:"ordered"},{list:"bullet"},{indent:"-1"},{indent:"+1"},{align:[]}],["link","image","video"],["clean"]],history:{delay:500,maxStack:100,userOnly:!0}},clipboard:{matchVisual:!1}}),[]),D=We.useRef(null),N=[{name:T("rpm_RPM"),url:ld.DOCTOR.PROGRAM},{name:null===w||void 0===w?void 0:w.display_name,url:"".concat(ld.DOCTOR.PROGRAM,"/").concat(null===w||void 0===w?void 0:w.code,"/patients")},{name:"".concat((null===C||void 0===C?void 0:C.first_name)||""," ").concat((null===C||void 0===C?void 0:C.last_name)||""),url:"".concat(ld.DOCTOR.PROGRAM,"/").concat(null===w||void 0===w?void 0:w.code,"/patients/").concat(null===C||void 0===C?void 0:C.id,"/dashboard")},{name:T("rpm_SummaryNotes"),url:""}],L=["header","bold","italic","underline","strike","blockquote","size","color","list","bullet","indent","link"],I=()=>{h(!m),u&&f()},F=()=>{var e,t,n,r,i,o,a,s,c,d;return(0,qt.jsxs)(qt.Fragment,{children:[!cs(null===l||void 0===l||null===(e=l.data)||void 0===e||null===(t=e.local_files)||void 0===t||null===(n=t.local)||void 0===n?void 0:n.files)&&(null===l||void 0===l||null===(r=l.data)||void 0===r||null===(i=r.local_files)||void 0===i||null===(o=i.local)||void 0===o||null===(a=o.files)||void 0===a?void 0:a.map((e,t)=>(0,qt.jsx)(Eb,{sx:{ml:1,mb:1},onDelete:()=>j(t),icon:(0,qt.jsx)(Aje.A,{fontSize:"small"}),label:null===e||void 0===e?void 0:e.name,variant:"string",className:"UplodeChip"},t))),!cs(null===l||void 0===l||null===(s=l.data)||void 0===s?void 0:s.files)&&(null===l||void 0===l||null===(c=l.data)||void 0===c||null===(d=c.files)||void 0===d?void 0:d.map((e,t)=>(0,qt.jsx)(Eb,{sx:{p:1,mb:1},onDelete:()=>_(null===l||void 0===l?void 0:l.data,null===e||void 0===e?void 0:e.id,t),icon:(0,qt.jsx)(Sje.A,{}),onClick:()=>{p({noteId:u,file:e})},label:$(null===e||void 0===e?void 0:e.file_name),variant:"string",className:"UplodeChip"},t)))]})},$=e=>{const t=null===e||void 0===e?void 0:e.split("/");return t[(null===t||void 0===t?void 0:t.length)-1]},B=e=>{var t,n,r;let{noteObj:i}=e;const[o,a]=We.useState(2);return(0,qt.jsxs)(qt.Fragment,{children:[null===i||void 0===i||null===(t=i.files)||void 0===t||null===(n=t.slice(0,o))||void 0===n?void 0:n.map(e=>(0,qt.jsx)(Eb,{sx:{color:"primary.theme.500",borderRadius:"0",textDecoration:"underline",height:"inherit"},"data-id":e.id,label:$(e.file_name),variant:"string",className:"attachment_btn",onClick:()=>{p({noteId:i.id,file:e})}},e.id)),(null===i||void 0===i||null===(r=i.files)||void 0===r?void 0:r.length)>=3&&(0,qt.jsx)(sy,{title:T("rpm_ShowMore"),children:(0,qt.jsx)(wh,{disableRipple:!0,size:"small",onClick:()=>{var e,t;o===(null===i||void 0===i||null===(e=i.files)||void 0===e?void 0:e.length)?a(2):a(null===i||void 0===i||null===(t=i.files)||void 0===t?void 0:t.length)},children:"..."})})]})};return We.useEffect(()=>{const e={breadcrumb:N};cs(w)||cs(C)||E(NC(e))},[w,C]),(0,qt.jsxs)(op,{children:[(0,qt.jsx)(op,{sx:{width:"100%"},children:(0,qt.jsxs)(Ff,{container:!0,children:[(0,qt.jsx)(Ff,{item:!0,xs:12,sm:6,children:(0,qt.jsxs)(op,{sx:{mb:1},position:"relative",children:[(0,qt.jsx)(op,{sx:{display:{xs:"none",sm:"block"}},children:(0,qt.jsx)(Cf,{variant:"h5",component:"h5",children:T("rpm_Notes")})}),(0,qt.jsx)(op,{sx:{display:{xs:"block",sm:"none"}},position:"absolute",top:"-48px",left:"40px",children:(0,qt.jsx)(Cf,{variant:"h6",component:"h6",children:T("rpm_Notes")})})]})}),(0,qt.jsx)(Ff,{item:!0,xs:12,sm:6,children:(0,qt.jsxs)(op,{display:"flex",flexWrap:"wrap",gap:1,mb:3,justifyContent:"end",children:[(0,qt.jsx)(xh,{variant:"outlined",size:"small",disableElevation:!0,onClick:()=>M("".concat(ld.DOCTOR.PROGRAM,"/").concat(O,"/patients/").concat(R,"/notes/resolve-alerts")),children:T("rpm_NoteResolvedAlerts")}),S.existingNoteTypes.map(e=>{if("PRESCRIPTION"!==e)return(0,qt.jsx)(qt.Fragment,{children:(0,qt.jsx)(xh,{variant:"SUMMARY"===e?"contained":"outlined",size:"small",disableElevation:!0,onClick:()=>M("".concat(ld.DOCTOR.PROGRAM,"/").concat(O,"/patients/").concat(R,"/notes/").concat(e.toLowerCase(),"-note")),children:T("rpm_".concat(xs(e.toLowerCase()),"Notes"))})})}),!cs(S.nonExistingNoteTypes)&&(0,qt.jsx)(op,{sx:{display:"flex",alignItems:"center","& .MuiSelect-select":{p:.7}},className:"remove_selectborder",children:(0,qt.jsx)(d_,{sx:{display:"flex",alignItems:"center"},children:(0,qt.jsxs)(G_,{sx:S.nonExistingNoteTypes.includes("SUMMARY")?{maxWidth:180,color:"white",backgroundColor:"primary.theme.500",borderColor:"primary.theme.500",borderRadius:"4px",pl:"5px",fontSize:"14px","& svg":{color:"#fff"}}:{maxWidth:180,color:"primary.theme.500",borderColor:"primary.theme.500",borderRadius:"4px",pl:"5px",fontSize:"14px"},fullWidth:!0,variant:"outlined",size:"small",value:S.nonExistingNoteTypes.includes("SUMMARY")?"SUMMARY":"additionalNotes",children:[(0,qt.jsx)(mf,{value:"additionalNotes",disabled:!0,sx:{display:"none"},children:T("rpm_AdditionalNotes")}),S.nonExistingNoteTypes.map(e=>{if("PRESCRIPTION"!==e)return(0,qt.jsx)(mf,{value:e,onClick:()=>M("".concat(ld.DOCTOR.PROGRAM,"/").concat(O,"/patients/").concat(R,"/notes/").concat(e.toLowerCase(),"-note")),children:T("rpm_".concat(xs(e.toLowerCase()),"Notes"))},e)})]})})})]})})]})}),(0,qt.jsx)(op,{bgcolor:"white",className:"UseNoteFilter",p:2,children:(0,qt.jsx)(Ff,{container:!0,spacing:2,alignItems:"center",children:(0,qt.jsx)(Ff,{item:!0,md:12,lg:9,xl:8,children:(0,qt.jsx)(MCe,{fetchListFunction:v,pageDetails:x,filterState:y,setFilterState:b,showFilterColor:A,setShowFilterColor:k})})})}),(0,qt.jsx)(eg,{}),(0,qt.jsxs)(op,{bgcolor:"white",p:2,children:[cs(d)&&!m&&(0,qt.jsx)(OCe,{handleToggleAddNote:I,showFilterColor:A}),!cs(d)&&(0,qt.jsx)(qt.Fragment,{children:(null===w||void 0===w||null===(t=w.permissions)||void 0===t?void 0:t.showCreateNoteList)&&(0,qt.jsx)(xh,{variant:"contained",disableElevation:!0,startIcon:(0,qt.jsx)(Jxe.A,{}),onClick:I,color:"primary",sx:{fontWeight:"600",marginBottom:"8px"},children:T("rpm_AddNewNote")})}),m&&(0,qt.jsx)(Kz,{initialValues:o,enableReinitialize:!0,validationSchema:RU.summaryNoteSchema,onSubmit:a,children:e=>{var t,n,r;let{values:i,setFieldValue:o}=e;return(0,qt.jsx)(nH,{children:(0,qt.jsxs)(Ff,{container:!0,className:"EditorPageNotes",spacing:2,mb:2,children:[(0,qt.jsxs)(Ff,{item:!0,xs:12,md:5,children:[(0,qt.jsxs)(d_,{sx:{display:"flex",alignItems:"center"},children:[(0,qt.jsx)(o_,{id:"vital",children:T("rpm_VitalType")}),(0,qt.jsx)(G_,{fullWidth:!0,variant:"outlined",size:"small",name:"vital",id:"vital",onChange:e=>{o("vital",e.target.value)},labelId:"vital",label:T("rpm_VitalType"),endAdornment:(0,qt.jsx)(tw,{position:"end",sx:{position:"absolute",right:"28px"},children:(0,qt.jsx)(sy,{title:T("message:rpm_VitalTypeNoteHelp"),placement:"top",children:(0,qt.jsx)(wh,{size:"small",disableRipple:!0,sx:{p:0},children:(0,qt.jsx)(pM.A,{fontSize:"small"})})})}),children:Nd.map(e=>(0,qt.jsx)(mf,{value:e.value,children:T("rpm_".concat(e.name))},e.value))})]}),(0,qt.jsx)(dH,{name:"vital",children:e=>(0,qt.jsx)(v_,{error:!0,children:T(e,{field:T("rpm_VitalType")})})})]}),(0,qt.jsxs)(Ff,{item:!0,xs:12,md:9,children:[(0,qt.jsxs)(op,{className:" text-editor",width:"100%",children:[(0,qt.jsx)(ECe(),{theme:"snow",modules:P,formats:L,value:null===i||void 0===i?void 0:i.description,onChange:e=>{o("description",e)},ref:D}),(0,qt.jsx)(dH,{name:"description",children:e=>(0,qt.jsx)(v_,{error:!0,children:T(e,{field:T("rpm_Note")})})})]}),(0,qt.jsxs)(op,{mt:2,children:[(0,qt.jsx)(xh,{disableElevation:!0,variant:"outlined",color:"primary",onClick:I,sx:{marginRight:"10px"},children:T("rpm_Cancel")})," ",(0,qt.jsx)(xh,{disableElevation:!0,variant:"contained",sx:{marginRight:2},type:"submit",children:T("rpm_Save")})]})]}),(0,qt.jsx)(Ff,{item:!0,xs:12,md:3,children:(0,qt.jsx)(op,{children:(0,qt.jsxs)(qt.Fragment,{children:[(0,qt.jsx)(F,{}),cs(null===l||void 0===l||null===(t=l.data)||void 0===t||null===(n=t.local_files)||void 0===n||null===(r=n.local)||void 0===r?void 0:r.files)?s("upload",{}):c("upload",{})]})})})]})})}}),d.map(e=>{var t,i;return(0,qt.jsx)(qt.Fragment,{children:u!==e.id?(0,qt.jsxs)(Ff,{container:!0,spacing:2,mb:2,children:[(0,qt.jsx)(Ff,{item:!0,xs:11,children:(0,qt.jsxs)(op,{sx:{bgcolor:"primary.theme.50",borderRadius:1,p:1},children:[(0,qt.jsx)(Cf,{variant:"body2",fontWeight:600,children:T("rpm_".concat(e.vital))}),(0,qt.jsx)(Cf,{variant:"body2",dangerouslySetInnerHTML:{__html:e.note},color:"inherit",sx:{wordBreak:"break-all"},className:"savemode"}),(0,qt.jsxs)(Cf,{variant:"body2",mb:.6,children:[(0,qt.jsxs)(op,{component:"span",fontWeight:600,sx:{verticalAlign:"middle"},children:[T("rpm_Attachment"),":\xa0"]}),(0,qt.jsx)(op,{component:"span",sx:{color:"primary.theme.500",fontWeight:"600",pl:"0"},children:(0,qt.jsx)(B,{noteObj:e})})]}),(0,qt.jsxs)(op,{sx:{display:"flex",alignItems:"center"},children:[(0,qt.jsxs)(Cf,{sx:{fontSize:"14px"},children:["Created by \xa0",(0,qt.jsx)(op,{component:"span",fontWeight:600,children:e.created_by}),"\xa0 on \xa0",(0,qt.jsx)(op,{component:"span",fontWeight:600,children:sa()(e.created_at).format("DD MMM YYYY hh:mm A")}),"\xa0\xa0"]}),(0,qt.jsxs)(Cf,{sx:{fontSize:"14px"},children:["Last Updated by \xa0",(0,qt.jsx)(op,{component:"span",fontWeight:600,children:e.updated_by||e.created_by}),"\xa0 on \xa0",(0,qt.jsx)(op,{component:"span",fontWeight:600,children:e.updated_at?sa()(e.updated_at).format("DD MMM YYYY hh:mm A"):sa()(e.created_at).format("DD MMM YYYY hh:mm A")})]})]})]})}),(0,qt.jsx)(Ff,{item:!0,xs:1,children:(0,qt.jsxs)(op,{sx:{margin:1},className:"BGbtnGrp",children:[(null===w||void 0===w||null===(t=w.permissions)||void 0===t?void 0:t.showEditNote)&&n(e),!1,(null===w||void 0===w||null===(i=w.permissions)||void 0===i?void 0:i.showDeleteList)&&r({id:e.id})]})})]}):(0,qt.jsx)(Kz,{initialValues:o,enableReinitialize:!0,onSubmit:g,validationSchema:RU.summaryNoteSchema,children:t=>{var n,r,i;let{values:o,setFieldValue:a}=t;return(0,qt.jsx)(nH,{children:(0,qt.jsxs)(Ff,{container:!0,spacing:2,className:"EditorPageNotes",mt:2,mb:2,children:[(0,qt.jsxs)(Ff,{item:!0,xs:12,md:5,children:[(0,qt.jsxs)(d_,{sx:{display:"flex",alignItems:"center"},children:[(0,qt.jsx)(o_,{id:"vital",children:T("rpm_VitalType")}),(0,qt.jsx)(G_,{fullWidth:!0,variant:"outlined",size:"small",name:"vital",id:"vital",value:o.vital,onChange:e=>{a("vital",e.target.value)},labelId:"vital",label:T("rpm_VitalType"),endAdornment:(0,qt.jsx)(tw,{position:"end",sx:{position:"absolute",right:"28px"},children:(0,qt.jsx)(sy,{title:T("message:rpm_VitalTypeNoteHelp"),placement:"top",children:(0,qt.jsx)(wh,{size:"small",disableRipple:!0,sx:{p:0},children:(0,qt.jsx)(pM.A,{fontSize:"small"})})})}),children:Nd.map(e=>(0,qt.jsx)(mf,{value:e.value,children:T("rpm_".concat(e.name))},e.value))})]}),(0,qt.jsx)(dH,{name:"vital",children:e=>(0,qt.jsx)(v_,{error:!0,children:T(e,{field:T("rpm_VitalType")})})})]}),(0,qt.jsxs)(Ff,{item:!0,xs:12,md:9,children:[(0,qt.jsxs)(op,{className:" text-editor",width:"100%",children:[(0,qt.jsx)(ECe(),{theme:"snow",modules:P,formats:L,value:o.description,onChange:e=>a("description",e),ref:D}),(0,qt.jsx)(dH,{name:"description",children:e=>(0,qt.jsx)(v_,{error:!0,children:T(e,{field:T("rpm_Note")})})})]}),(0,qt.jsxs)(op,{mt:2,children:[(0,qt.jsx)(xh,{disableElevation:!0,variant:"outlined",color:"primary",onClick:f,sx:{marginRight:"10px"},children:T("rpm_Cancel")})," ",(0,qt.jsx)(xh,{disableElevation:!0,variant:"contained",sx:{marginRight:2},type:"submit",children:T("rpm_Save")})]})]}),(0,qt.jsx)(Ff,{item:!0,xs:12,md:3,children:(0,qt.jsx)(op,{children:(0,qt.jsxs)(qt.Fragment,{children:[(0,qt.jsx)(F,{}),cs(null===l||void 0===l||null===(n=l.data)||void 0===n||null===(r=n.local_files)||void 0===r||null===(i=r.local)||void 0===i?void 0:i.files)?s("upload",e):c("upload",e)]})})})]})})}})})}),(0,qt.jsx)(op,{sx:e=>({pr:2,bgcolor:e.palette.common.white}),children:(0,qt.jsx)(KE,{pageDetails:x,fetchListFunction:v})})]})]})}Rwe.defaultProps={alertsHead:[],pageDetails:{},order:"",orderBy:"",dataParameter:"",checkState:[],isSelection:!1,nodata:"",alertsList:[],otherResolvedAlertList:[],resolvedAlertList:[],initialFormValues:{},addNewNote:()=>{},fileUploadButton:()=>{},fileModal:{},fileUploadIconButton:()=>{},notesList:[],editableNoteId:"",downloadFile:()=>{},setToggleAddNote:()=>{},toggleAddNote:!1,closeEditMode:()=>{},editNote:()=>{},fetchNoteList:()=>{},filterState:{},setFilterState:()=>{},onLocalFileDelete:()=>{},onCloudFilesDelete:()=>{},program:{},patientData:{},noteTypesDropdown:{},showFilterColor:{},setShowFilterColor:()=>{}};const Pwe=Rwe;function Dwe(e){var t;let{MobileeditButton:n,MobiledeleteButton:r,viewButton:i,initialFormValues:o,addNewNote:a,MobliefileUploadButton:s,fileModal:l,fileUploadIconButton:c,notesList:d,editableNoteId:u,downloadFile:p,setToggleAddNote:h,toggleAddNote:m,closeEditMode:f,editNote:g,fetchNoteList:v,pageDetails:x,filterState:y,setFilterState:b,onLocalFileDelete:j,onCloudFilesDelete:_,patientData:C,program:w,noteTypesDropdown:S,showFilterColor:A,setShowFilterColor:k}=e;const T=ICe(),{t:E}=Vg(),M=Nt(),O=so(),{programId:R,patientId:P}=lo(),D=We.useMemo(()=>({toolbar:{container:[["bold","italic","underline","strike"],[{size:[]},{color:[]}],[{list:"ordered"},{list:"bullet"},{indent:"-1"},{indent:"+1"},{align:[]}],["link","image","video"],["clean"]],history:{delay:500,maxStack:100,userOnly:!0}},clipboard:{matchVisual:!1}}),[]),N=We.useRef(null),[L,I]=(0,We.useState)(!1),F=e=>()=>{I(e)},$=[{name:E("rpm_RPM"),url:ld.DOCTOR.PROGRAM},{name:null===w||void 0===w?void 0:w.display_name,url:"".concat(ld.DOCTOR.PROGRAM,"/").concat(null===w||void 0===w?void 0:w.code,"/patients")},{name:"".concat((null===C||void 0===C?void 0:C.first_name)||""," ").concat((null===C||void 0===C?void 0:C.last_name)||""),url:"".concat(ld.DOCTOR.PROGRAM,"/").concat(null===w||void 0===w?void 0:w.code,"/patients/").concat(null===C||void 0===C?void 0:C.id,"/dashboard")},{name:E("rpm_SummaryNotes"),url:""}],B=["header","bold","italic","underline","strike","blockquote","size","color","list","bullet","indent","link"],z=()=>{h(!m),u&&f()},H=()=>{var e,t,n,r,i,o,a,s,c,d;return(0,qt.jsxs)(qt.Fragment,{children:[!cs(null===l||void 0===l||null===(e=l.data)||void 0===e||null===(t=e.local_files)||void 0===t||null===(n=t.local)||void 0===n?void 0:n.files)&&(null===l||void 0===l||null===(r=l.data)||void 0===r||null===(i=r.local_files)||void 0===i||null===(o=i.local)||void 0===o||null===(a=o.files)||void 0===a?void 0:a.map((e,t)=>(0,qt.jsx)(Eb,{sx:{ml:1,mb:1},onDelete:()=>j(t),icon:(0,qt.jsx)(Aje.A,{fontSize:"small"}),label:null===e||void 0===e?void 0:e.name,variant:"string",className:"UplodeChip"},t))),!cs(null===l||void 0===l||null===(s=l.data)||void 0===s?void 0:s.files)&&(null===l||void 0===l||null===(c=l.data)||void 0===c||null===(d=c.files)||void 0===d?void 0:d.map((e,t)=>(0,qt.jsx)(Eb,{sx:{p:1,mb:1},onDelete:()=>_(null===l||void 0===l?void 0:l.data,null===e||void 0===e?void 0:e.id,t),icon:(0,qt.jsx)(Sje.A,{}),onClick:()=>{p({noteId:u,file:e})},label:W(null===e||void 0===e?void 0:e.file_name),variant:"string",className:"UplodeChip"},t)))]})},W=e=>{const t=null===e||void 0===e?void 0:e.split("/");return t[(null===t||void 0===t?void 0:t.length)-1]},U=e=>{var t,n,r;let{noteObj:i}=e;const[o,a]=We.useState(2);return(0,qt.jsxs)(qt.Fragment,{children:[null===i||void 0===i||null===(t=i.files)||void 0===t||null===(n=t.slice(0,o))||void 0===n?void 0:n.map(e=>(0,qt.jsx)(Eb,{sx:{color:"black",borderRadius:"0",textDecoration:"underline",height:"inherit",pl:"0 !important"},"data-id":e.id,label:W(e.file_name),variant:"string",className:T.attachment_btn,onClick:()=>{p({noteId:i.id,file:e})}},e.id)),(null===i||void 0===i||null===(r=i.files)||void 0===r?void 0:r.length)>=3&&(0,qt.jsx)(sy,{title:E("rpm_ShowMore"),children:(0,qt.jsx)(wh,{disableRipple:!0,size:"small",onClick:()=>{var e,t;o===(null===i||void 0===i||null===(e=i.files)||void 0===e?void 0:e.length)?a(2):a(null===i||void 0===i||null===(t=i.files)||void 0===t?void 0:t.length)},children:"..."})})]})};return We.useEffect(()=>{const e={breadcrumb:$};cs(w)||cs(C)||M(NC(e))},[w,C]),(0,qt.jsxs)(op,{children:[(0,qt.jsxs)(op,{sx:{width:"100%"},children:[(0,qt.jsxs)(op,{sx:{mb:1},position:"relative",children:[(0,qt.jsx)(op,{position:"absolute",top:"-45px",left:"40px",children:(0,qt.jsx)(Cf,{variant:"h6",component:"h6",fontSize:16,children:E("rpm_Notes")})}),(0,qt.jsx)(op,{position:"absolute",top:"-50px",right:"0px",children:(0,qt.jsx)(op,{children:(0,qt.jsx)(wh,{onClick:F(!0),sx:{background:"#e8eaf6",padding:"5px"},children:(0,qt.jsx)(DCe.A,{color:"primary",sx:{padding:"0"}})})})})]}),(0,qt.jsx)(dg,{anchor:"left",open:L,onClose:F(!1),children:(0,qt.jsxs)("div",{style:{width:230},children:[(0,qt.jsxs)("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between",background:"#f2f2fe",padding:"5px 10px"},children:[(0,qt.jsx)(Cf,{variant:"h6",sx:{color:"#7986cb",fontWeight:"600"},children:E("rpm_Notes")}),(0,qt.jsx)(wh,{onClick:F(!1),children:(0,qt.jsx)(J_.A,{})})]}),(0,qt.jsx)(op,{sx:{padding:"10px"},children:(0,qt.jsxs)(op,{display:"flex",flexWrap:"wrap",gap:1,mb:3,justifyContent:"end",children:[S.existingNoteTypes.map(e=>{if("PRESCRIPTION"!==e)return(0,qt.jsx)(qt.Fragment,{children:(0,qt.jsx)(xh,{fullWidth:!0,variant:"SUMMARY"===e?"contained":"outlined",size:"small",disableElevation:!0,onClick:()=>O("".concat(ld.DOCTOR.PROGRAM,"/").concat(R,"/patients/").concat(P,"/notes/").concat(e.toLowerCase(),"-note")),children:E("rpm_".concat(xs(e.toLowerCase()),"Notes"))})})}),!cs(S.nonExistingNoteTypes)&&(0,qt.jsx)(op,{sx:{display:"flex",alignItems:"center","& .MuiSelect-select":{p:.7},width:"100%"},className:"remove_selectborder",children:(0,qt.jsx)(d_,{sx:{display:"flex",alignItems:"center",width:"100%"},children:(0,qt.jsxs)(G_,{sx:S.nonExistingNoteTypes.includes("SUMMARY")?{color:"primary.theme.500",fontWeight:"500",borderColor:"primary.theme.500",borderRadius:"4px",pl:"5px",fontSize:"13px","& svg":{color:"#fff"}}:{maxWidth:180,color:"primary.theme.500",borderColor:"primary.theme.500",borderRadius:"4px",pl:"5px",fontSize:"14px"},fullWidth:!0,variant:"outlined",size:"small",value:S.nonExistingNoteTypes.includes("SUMMARY")?"SUMMARY":"additionalNotes",children:[(0,qt.jsx)(mf,{value:"additionalNotes",disabled:!0,sx:{display:"none"},children:E("rpm_AdditionalNotes")}),S.nonExistingNoteTypes.map(e=>{if("PRESCRIPTION"!==e)return(0,qt.jsx)(mf,{value:e,onClick:()=>O("".concat(ld.DOCTOR.PROGRAM,"/").concat(R,"/patients/").concat(P,"/notes/").concat(e.toLowerCase(),"-note")),children:E("rpm_".concat(xs(e.toLowerCase()),"Notes"))},e)})]})})}),(0,qt.jsx)(xh,{fullWidth:!0,variant:"outlined",size:"small",disableElevation:!0,onClick:()=>O("".concat(ld.DOCTOR.PROGRAM,"/").concat(R,"/patients/").concat(P,"/notes/resolve-alerts")),endIcon:(0,qt.jsx)(FCe.A,{sx:{color:"#3f51b5"}}),sx:{justifyContent:"space-between"},children:E("rpm_NoteResolvedAlerts")})]})})]})})]}),(0,qt.jsxs)(op,{display:"flex",alignItems:"center",justifyContent:"space-between",mb:1,children:[(0,qt.jsx)(op,{children:(0,qt.jsx)(LCe,{fetchListFunction:v,pageDetails:x,filterState:y,setFilterState:b,showFilterColor:A,setShowFilterColor:k,filterVariant:"text",filterName:"Filters",mobileFilterBG:!0})}),(0,qt.jsx)(op,{children:!cs(d)&&(0,qt.jsx)(qt.Fragment,{children:(null===w||void 0===w||null===(t=w.permissions)||void 0===t?void 0:t.showCreateNoteList)&&(0,qt.jsx)(xh,{variant:"contained",disableElevation:!0,startIcon:(0,qt.jsx)(Jxe.A,{}),onClick:z,color:"primary",sx:{fontWeight:"600",fontSize:"12px"},children:E("rpm_AddNew")})})})]}),(0,qt.jsxs)(op,{children:[cs(d)&&!m&&(0,qt.jsx)(op,{bgcolor:"white",className:"noDataAddedField",children:(0,qt.jsx)(OCe,{handleToggleAddNote:z,showFilterColor:A})}),m&&(0,qt.jsx)(Kz,{initialValues:o,enableReinitialize:!0,validationSchema:RU.summaryNoteSchema,onSubmit:a,children:e=>{var t,n,r;let{values:i,setFieldValue:o}=e;return(0,qt.jsx)(nH,{children:(0,qt.jsxs)(op,{bgcolor:"white",sx:{padding:"16px",borderRadius:"8px",marginBottom:"8px",borderTop:"5px solid #3f51b5",borderBottom:"1px solid #3f51b5",borderLeft:"1px solid #3f51b5",borderRight:"1px solid #3f51b5"},children:[(0,qt.jsxs)(op,{className:"vitalEdits",children:[(0,qt.jsx)(Cf,{variant:"span",id:"vital",sx:{marginBottom:"5px"},fontSize:14,children:E("rpm_VitalType")}),(0,qt.jsx)(d_,{sx:{display:"flex",alignItems:"center",marginTop:"5px"},children:(0,qt.jsx)(G_,{fullWidth:!0,variant:"outlined",size:"small",name:"vital",id:"vital",onChange:e=>{o("vital",e.target.value)},labelId:"vital",label:E("rpm_VitalType"),endAdornment:(0,qt.jsx)(tw,{position:"end",sx:{position:"absolute",right:"28px"},children:(0,qt.jsx)(sy,{title:E("message:rpm_VitalTypeNoteHelp"),placement:"top",children:(0,qt.jsx)(wh,{size:"small",disableRipple:!0,sx:{p:0},children:(0,qt.jsx)(pM.A,{fontSize:"small"})})})}),children:Nd.map(e=>(0,qt.jsx)(mf,{value:e.value,children:E("rpm_".concat(e.name))},e.value))})}),(0,qt.jsx)(dH,{name:"vital",children:e=>(0,qt.jsx)(v_,{error:!0,children:E(e,{field:E("rpm_VitalType")})})})]}),(0,qt.jsxs)(op,{mt:2,className:"text-editor quilldesign",width:"100%",mb:2,children:[(0,qt.jsx)(ECe(),{theme:"snow",modules:D,formats:B,value:null===i||void 0===i?void 0:i.description,onChange:e=>{o("description",e)},ref:N}),(0,qt.jsx)(dH,{name:"description",children:e=>(0,qt.jsx)(v_,{error:!0,children:E(e,{field:E("rpm_Note")})})})]}),(0,qt.jsx)(op,{mt:2,mb:2,width:"100%",sx:{margin:"auto",textAlign:"center"},children:(0,qt.jsxs)(qt.Fragment,{children:[(0,qt.jsx)(H,{}),cs(null===l||void 0===l||null===(t=l.data)||void 0===t||null===(n=t.local_files)||void 0===n||null===(r=n.local)||void 0===r?void 0:r.files)?s("upload",{}):c("upload",{})]})}),(0,qt.jsxs)(op,{mt:2,display:"flex",children:[(0,qt.jsx)(xh,{fullWidth:!0,disableElevation:!0,variant:"outlined",color:"primary",onClick:z,sx:{marginRight:"10px"},children:E("rpm_Cancel")}),(0,qt.jsx)(xh,{fullWidth:!0,disableElevation:!0,variant:"contained",type:"submit",children:E("rpm_Save")})]})]})})}}),d.map(e=>{var t,i;return(0,qt.jsx)(qt.Fragment,{children:u!==e.id?(0,qt.jsxs)(qt.Fragment,{children:[(0,qt.jsx)(op,{sx:{bgcolor:"white",borderRadius:"8px"},children:(0,qt.jsxs)(op,{sx:{background:"#eaeaff",color:"#7986cb",fontWeight:"600",padding:"8px 16px",borderRadius:"8px 8px 0 0",display:"flex",alignItems:"center",justifyContent:"space-between"},children:[(0,qt.jsx)(Cf,{variant:"body2",fontWeight:600,children:E("rpm_".concat(e.vital))}),(0,qt.jsxs)(op,{className:T.actionButtons,children:[(null===w||void 0===w||null===(t=w.permissions)||void 0===t?void 0:t.showEditNote)&&n(e),!1,(null===w||void 0===w||null===(i=w.permissions)||void 0===i?void 0:i.showDeleteList)&&r({id:e.id})]})]})}),(0,qt.jsxs)(op,{sx:{bgcolor:"white",borderRadius:"0 0 8px 8px ",p:"8px 16px",mb:"10px"},children:[(0,qt.jsx)(op,{component:"span",fontWeight:600,sx:{verticalAlign:"middle"},className:T.titles,children:"Description:"}),(0,qt.jsx)(Cf,{variant:"body2",dangerouslySetInnerHTML:{__html:e.note},color:"inherit",sx:{wordBreak:"break-all",marginTop:"0"},className:"savemode"}),(0,qt.jsxs)(op,{component:"span",fontWeight:600,sx:{verticalAlign:"middle"},className:T.titles,children:[E("rpm_Attachment"),":"]}),(0,qt.jsx)(Cf,{variant:"body2",mb:.6,children:(0,qt.jsx)(op,{component:"span",sx:{color:"black",fontWeight:"600",pl:"0 !important"},className:"fileObjectName",children:(0,qt.jsx)(U,{noteObj:e})})}),(0,qt.jsx)(op,{component:"span",fontWeight:600,sx:{verticalAlign:"middle"},className:T.titles,children:"Created by:"}),(0,qt.jsx)(Cf,{variant:"body2",mb:.6,children:(0,qt.jsxs)(op,{component:"span",fontWeight:600,sx:{fontSize:"14px"},children:[e.created_by,(0,qt.jsx)("span",{style:{padding:"0 5px",fontWeight:"normal"},children:"on"}),sa()(e.created_at).format("DD MMM YYYY hh:mm A")]})}),(0,qt.jsx)(op,{component:"span",fontWeight:600,sx:{verticalAlign:"middle"},className:T.titles,children:"Last Updated by :"}),(0,qt.jsx)(Cf,{variant:"body2",mb:.6,children:(0,qt.jsxs)(op,{component:"span",fontWeight:600,sx:{fontSize:"14px"},children:[e.updated_by||e.created_by,(0,qt.jsx)("span",{style:{padding:"0 5px",fontWeight:"normal"},children:"on"}),e.updated_at?sa()(e.updated_at).format("DD MMM YYYY hh:mm A"):sa()(e.created_at).format("DD MMM YYYY hh:mm A")]})})]})]}):(0,qt.jsx)(Kz,{initialValues:o,enableReinitialize:!0,onSubmit:g,validationSchema:RU.summaryNoteSchema,children:t=>{var n,r,i;let{values:o,setFieldValue:a}=t;return(0,qt.jsx)(nH,{children:(0,qt.jsxs)(op,{bgcolor:"white",sx:{padding:"16px",borderRadius:"8px",marginBottom:"8px",borderTop:"5px solid #3f51b5",borderBottom:"1px solid #3f51b5",borderLeft:"1px solid #3f51b5",borderRight:"1px solid #3f51b5"},children:[(0,qt.jsxs)(op,{className:"vitalEdits",children:[(0,qt.jsx)(Cf,{variant:"span",id:"vital",sx:{marginBottom:"5px"},fontSize:14,children:E("rpm_VitalType")}),(0,qt.jsx)(d_,{sx:{display:"flex",alignItems:"center",marginTop:"5px"},children:(0,qt.jsx)(G_,{fullWidth:!0,variant:"outlined",size:"small",name:"vital",id:"vital",value:o.vital,onChange:e=>{a("vital",e.target.value)},labelId:"vital",label:E("rpm_VitalType"),endAdornment:(0,qt.jsx)(tw,{position:"end",sx:{position:"absolute",right:"28px"},children:(0,qt.jsx)(sy,{title:E("message:rpm_VitalTypeNoteHelp"),placement:"top",children:(0,qt.jsx)(wh,{size:"small",disableRipple:!0,sx:{p:0},children:(0,qt.jsx)(pM.A,{fontSize:"small"})})})}),children:Nd.map(e=>(0,qt.jsx)(mf,{value:e.value,children:E("rpm_".concat(e.name))},e.value))})}),(0,qt.jsx)(dH,{name:"vital",children:e=>(0,qt.jsx)(v_,{error:!0,children:E(e,{field:E("rpm_VitalType")})})})]}),(0,qt.jsxs)(op,{mt:2,className:"text-editor quilldesign",width:"100%",mb:2,children:[(0,qt.jsx)(ECe(),{theme:"snow",modules:D,formats:B,value:o.description,onChange:e=>a("description",e),ref:N}),(0,qt.jsx)(dH,{name:"description",children:e=>(0,qt.jsx)(v_,{error:!0,children:E(e,{field:E("rpm_Note")})})})]}),(0,qt.jsx)(op,{children:(0,qt.jsx)(op,{mt:2,mb:2,width:"100%",sx:{margin:"auto",textAlign:"center"},children:(0,qt.jsxs)(qt.Fragment,{children:[(0,qt.jsx)(H,{}),cs(null===l||void 0===l||null===(n=l.data)||void 0===n||null===(r=n.local_files)||void 0===r||null===(i=r.local)||void 0===i?void 0:i.files)?s("upload",e):c("upload",e)]})})}),(0,qt.jsxs)(op,{mt:2,display:"flex",children:[(0,qt.jsx)(xh,{fullWidth:!0,disableElevation:!0,variant:"outlined",color:"primary",onClick:f,sx:{marginRight:"10px"},children:E("rpm_Cancel")}),(0,qt.jsx)(xh,{fullWidth:!0,disableElevation:!0,variant:"contained",type:"submit",children:E("rpm_Save")})]})]})})}})})})]})]})}Dwe.defaultProps={alertsHead:[],pageDetails:{},order:"",orderBy:"",dataParameter:"",checkState:[],isSelection:!1,nodata:"",alertsList:[],otherResolvedAlertList:[],resolvedAlertList:[],initialFormValues:{},addNewNote:()=>{},MobliefileUploadButton:()=>{},fileModal:{},fileUploadIconButton:()=>{},notesList:[],editableNoteId:"",downloadFile:()=>{},setToggleAddNote:()=>{},toggleAddNote:!1,closeEditMode:()=>{},editNote:()=>{},fetchNoteList:()=>{},filterState:{},setFilterState:()=>{},onLocalFileDelete:()=>{},onCloudFilesDelete:()=>{},program:{},patientData:{},noteTypesDropdown:{},showFilterColor:{},setShowFilterColor:()=>{}};const Nwe=Dwe,Lwe=["content"];const Iwe=function(e){var t;let{patientData:n,program:r}=e;const o={local:{files:[]},onCloud:{files:[]}},a=window.innerWidth,s=Nt(),l=wt(cu),{t:c}=Vg(),{programId:d,patientId:u}=lo(),[p,h]=(0,We.useState)("desc"),[m,f]=(0,We.useState)("updated_at"),[g,v]=(0,We.useState)(!1),[x,y]=(0,We.useState)({description:"",vital:""}),[b,j]=We.useState([]),[_,C]=We.useState({open:!1,data:{}}),[w,S]=(0,We.useState)([]),[A,k]=We.useState(""),[T,E]=(0,We.useState)((0,i.A)({},o)),[M,O]=We.useState(!1),[R,P]=(0,We.useState)((0,i.A)({},dd)),[D,N]=We.useState({vital:"",start_date:null,end_date:null}),[L,I]=We.useState({open:!1,data:{}}),[F,$]=We.useState({open:!1,data:{}}),[B,z]=We.useState({existingNoteTypes:[],nonExistingNoteTypes:[]}),H=e=>{I((0,i.A)((0,i.A)({},L),{},{open:!L.open,data:e}))},W=e=>{$((0,i.A)((0,i.A)({},F),{},{open:!F.open,data:e}))},U=e=>{if(Array.isArray(e))return S(e.map(e=>e.toString()));const t=e.target.name;w.includes(t)?S(w.filter(e=>e!==t)):S(e=>[...e,t])},V=()=>{let e=(0,i.A)({},T);e.local.files.splice(0,e.local.files.length),E(e),C({data:{},open:!1})},G=async e=>{var t,n;const r={vital:null===e||void 0===e?void 0:e.vital,note:null===e||void 0===e?void 0:e.description,type:"SUMMARY",upload:cs(null===_||void 0===_||null===(t=_.data)||void 0===t?void 0:t.local_files)?[]:null===_||void 0===_||null===(n=_.data)||void 0===n?void 0:n.local_files};try{if(await s(Fl(d,u,r)),R.current_page=1,Z({vital:"",start_date:null,end_date:null}),v(!1),y({description:"",vital:""}),B.nonExistingNoteTypes.includes("SUMMARY")){const{data:e}=await s(Ul(d,u));z({existingNoteTypes:e,nonExistingNoteTypes:_s(Jd,e)})}Z(),V(),s(Zo({subTitle:"message:rpm_NoteCreatedSuccessfully",severity:ud.SUCCESS}))}catch(i){const e=us(i,"response.data.code","");cs(e)?s(Zo({subTitle:"error:rpm_NoteCreatedFailed",severity:ud.ERROR})):s(Zo({subTitle:Vd(e,"error:rpm_NoteCreatedFailed"),severity:ud.ERROR}))}},q=async e=>{var t,n;const r={id:A,vital:null===e||void 0===e?void 0:e.vital,note:null===e||void 0===e?void 0:e.description,type:"SUMMARY",upload:cs(null===_||void 0===_||null===(t=_.data)||void 0===t?void 0:t.local_files)?[]:null===_||void 0===_||null===(n=_.data)||void 0===n?void 0:n.local_files};try{await s(Bl(d,u,r)),K(),Z(),V(),s(Zo({subTitle:"message:rpm_NoteUpdateSuccessfully",severity:ud.SUCCESS}))}catch(i){const e=us(i,"response.data.code","");cs(e)?s(Zo({subTitle:"error:rpm_NoteUpdateFailed",severity:ud.ERROR})):s(Zo({subTitle:Vd(e,"error:rpm_NoteUpdateFailed"),severity:ud.ERROR}))}},Y=async e=>{try{var t;if(await s(zl(d,u,{noteId:null===e||void 0===e||null===(t=e.data)||void 0===t?void 0:t.id,type:"SUMMARY"})),Z(),I((0,i.A)((0,i.A)({},L),{},{open:!L.open})),$((0,i.A)((0,i.A)({},F),{},{open:!F.open})),1===b.length){const{data:e}=await s(Ul(d,u));z({existingNoteTypes:e,nonExistingNoteTypes:_s(Jd,e)})}s(Zo({subTitle:"message:rpm_NoteDeleteSuccessfully",severity:ud.SUCCESS}))}catch(n){const e=us(n,"response.data.code","");cs(e)?s(Zo({subTitle:"error:rpm_NoteUpdateFailed",severity:ud.ERROR})):s(Zo({subTitle:Vd(e,"error:rpm_NoteDeleteFailed"),severity:ud.ERROR}))}},Z=async function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:D;try{const t={sort_by:m,sort_order:p},{data:n}=await s(Il(d,u,{type:"SUMMARY"},(0,i.A)((0,i.A)({},R),t),e)),r=n||{},{content:o}=r,a=Ko(r,Lwe);j(o),P(e=>(0,i.A)((0,i.A)({},e),{},{last_page:a.last_page,current_page:a.current_page,from:a.from,per_page:a.per_page,to:a.to,total:a.total}))}catch(t){console.log(t)}},K=()=>{k(""),y({description:"",vital:""}),C({open:!1,data:{}}),E((0,i.A)({},o))},X=(e,t)=>(0,qt.jsx)("label",{htmlFor:"file",children:(0,qt.jsx)(sy,{title:c("rpm_UploadMore"),component:"span",children:(0,qt.jsxs)(wh,{"data-id":t.id,color:"primary",sx:{bgcolor:"primary.theme.50"},children:[(0,qt.jsx)("input",{multiple:!0,type:"file",id:"file",style:{display:"none"},autoFocus:!0,onChange:ee}),(0,qt.jsx)(jje.A,{fontSize:"small",sx:{width:16,height:16}})]})})}),Q=async e=>{let{noteId:t,file:n}=e;try{await s(Hl(d,u,{noteId:t,type:"SUMMARY",fileData:n})),s(Zo({subTitle:"message:rpm_DownloadFileSuccessfully",severity:ud.SUCCESS}))}catch(r){const e=us(r,"response.data.code","");cs(e)?s(Zo({subTitle:"error:rpm_DownloadFileFailed",severity:ud.ERROR})):s(Zo({subTitle:Vd(e,"error:rpm_DownloadFileFailed"),severity:ud.ERROR}))}},J=e=>(0,qt.jsx)(sy,{title:c("rpm_view"),children:(0,qt.jsx)(wh,{"data-id":e.id,color:"primary",onClick:()=>{},children:(0,qt.jsx)(gc,{fontSize:"small",sx:{width:16,height:16}})})}),ee=function(e){const t=e.target.files;let n=(0,i.A)({},T.local);t&&Array.from(t).forEach(e=>{var t;return cs(null===n||void 0===n||null===(t=n.files)||void 0===t?void 0:t.find(t=>t.name===e.name))?(null===e||void 0===e?void 0:e.size)>=5242880?s(Zo({subTitle:"error:rpm_ImageSize",severity:ud.ERROR})):(e.url=URL.createObjectURL(e),void n.files.push(e)):s(Zo({subTitle:"error:rpm_SameFileName",severity:ud.ERROR}))}),E(e=>(0,i.A)((0,i.A)({},e),{},{local:n})),C(e=>({open:!e.open,data:(0,i.A)((0,i.A)({},e.data),{},{local_files:(0,i.A)((0,i.A)({},T),{},{local:n})})})),e.target.value=""},te=function(e){let t=(0,i.A)({},T);t.local.files.splice(e,1),E(t)},ne=async(e,t)=>{try{await s(Wl(d,u,{noteId:e.id,fileId:t,type:"SUMMARY"})),Z(),function(e,t){var n;const r=null===e||void 0===e||null===(n=e.files)||void 0===n?void 0:n.filter(e=>(null===e||void 0===e?void 0:e.id)!==t);C((0,i.A)((0,i.A)({},_),{},{data:(0,i.A)((0,i.A)({},e),{},{files:r})}))}(e,t),s(Zo({subTitle:"message:rpm_FileDeletedSuccessfully",severity:ud.SUCCESS}))}catch(n){const e=us(n,"response.data.code","");cs(e)?s(Zo({subTitle:"error:rpm_FileDeleteFailed",severity:ud.ERROR})):s(Zo({subTitle:Vd(e,"error:rpm_FileDeleteFailed"),severity:ud.ERROR}))}};return We.useEffect(()=>{l&&Z(),cs(r)||cs(n)||(async()=>{const{data:e}=await s(Ul(d,u));z({existingNoteTypes:e,nonExistingNoteTypes:_s(Jd,e)})})()},[l,p,m,r,n]),We.useEffect(()=>{s(NC({activeMenuItem:"notes"}))},[]),cs(r)?(0,qt.jsx)(yp,{variant:"outlined",sx:{px:2.5,py:6,display:"flex",height:"320px"},children:(0,qt.jsx)(op,{alignSelf:"center",sx:{mx:"auto"},children:(0,qt.jsx)(MM,{color:"primary"})})}):(0,qt.jsxs)(qt.Fragment,{children:[null!==r&&void 0!==r&&null!==(t=r.permissions)&&void 0!==t&&t.showNoteList?a>=575?(0,qt.jsx)(Pwe,{order:p,orderBy:m,setOrder:h,setOrderBy:f,dataParameter:"id",checkState:w,onCheck:U,isSelection:!1,nodata:SCe,notesList:b,showFilterColor:M,setShowFilterColor:O,fetchNoteList:Z,pageDetails:R,editButton:e=>(0,qt.jsx)(sy,{title:c("rpm_Edit"),children:(0,qt.jsx)(wh,{"data-id":e.id,color:"primary",onClick:()=>{k(e.id),v(!1),y({description:e.note,vital:e.vital}),E((0,i.A)({},o)),C((0,i.A)((0,i.A)({},_),{},{data:(0,i.A)({},e)}))},children:(0,qt.jsx)(fc,{fontSize:"small",sx:{width:16,height:16}})})}),viewButton:J,deleteButton:e=>(0,qt.jsx)(wh,{"data-id":e.id,color:"error",onClick:()=>H(e),children:(0,qt.jsx)(xc,{fontSize:"small",sx:{width:16,height:16}})}),addNewNote:G,editNote:q,editableNoteId:A,closeEditMode:K,initialFormValues:x,toggleAddNote:g,setToggleAddNote:v,fileModal:_,fileUploadButton:()=>(0,qt.jsx)("label",{htmlFor:"file",children:(0,qt.jsxs)(xh,{variant:"contained",component:"span",size:"large",disableElevation:!0,sx:{display:"inline-flex",backgroundColor:"grey.300",color:"grey.700",border:"1px dashed #616161",textAlign:"left",px:3,"&:hover":{backgroundColor:"grey.300"}},children:[(0,qt.jsx)("input",{multiple:!0,type:"file",id:"file",style:{display:"none"},autoFocus:!0,onChange:ee}),(0,qt.jsxs)(op,{sx:{display:"flex",alignItems:"center"},children:[(0,qt.jsx)(Cje.A,{fontSize:"small"}),(0,qt.jsxs)(op,{sx:{flex:1,pl:2},children:[(0,qt.jsx)(Cf,{variant:"body1",sx:{textTransform:"none"},children:c("rpm_UploadReport")}),(0,qt.jsx)(Cf,{variant:"caption",children:".PDF, .PNG, .JPEG"})]})]})]})}),fileUploadIconButton:X,downloadFile:Q,filterState:D,setFilterState:N,onLocalFileDelete:te,onCloudFilesDelete:ne,patientData:n,program:r,noteTypesDropdown:B}):(0,qt.jsx)(qt.Fragment,{children:(0,qt.jsx)(Nwe,{order:p,orderBy:m,setOrder:h,setOrderBy:f,dataParameter:"id",checkState:w,onCheck:U,isSelection:!1,nodata:SCe,notesList:b,showFilterColor:M,setShowFilterColor:O,fetchNoteList:Z,pageDetails:R,MobileeditButton:e=>(0,qt.jsx)(sy,{title:c("rpm_Edit"),children:(0,qt.jsx)(wh,{"data-id":e.id,color:"primary",onClick:()=>{k(e.id),v(!1),y({description:e.note,vital:e.vital}),E((0,i.A)({},o)),C((0,i.A)((0,i.A)({},_),{},{data:(0,i.A)({},e)}))},sx:{padding:"0"},children:(0,qt.jsx)(kCe.A,{fontSize:"small",sx:{width:16,height:16}})})}),viewButton:J,MobiledeleteButton:e=>(0,qt.jsx)(wh,{"data-id":e.id,color:"error",onClick:()=>W(e),children:(0,qt.jsx)(zCe.A,{fontSize:"small",sx:{width:16,height:16}})}),addNewNote:G,editNote:q,editableNoteId:A,closeEditMode:K,initialFormValues:x,toggleAddNote:g,setToggleAddNote:v,fileModal:_,MobliefileUploadButton:()=>(0,qt.jsxs)("label",{htmlFor:"file",children:[(0,qt.jsxs)(xh,{variant:"contained",component:"span",size:"large",disableElevation:!0,sx:{display:"inline-flex",backgroundColor:"#eaeaff85",color:"grey.700",border:"1px dashed #9CA3AF",textAlign:"left",px:3,"&:hover":{backgroundColor:"grey.300"}},fullWidth:!0,children:[(0,qt.jsx)("input",{multiple:!0,type:"file",id:"file",style:{display:"none"},autoFocus:!0,onChange:ee}),(0,qt.jsxs)(op,{sx:{display:"flex",alignItems:"center"},children:[(0,qt.jsx)(Cje.A,{fontSize:"small"}),(0,qt.jsx)(op,{sx:{flex:1,pl:2},children:(0,qt.jsx)(Cf,{variant:"body1",sx:{textTransform:"none"},fontSize:14,children:c("rpm_UploadReport")})})]})]}),(0,qt.jsx)(op,{textAlign:"center",fontStyle:"italic",children:(0,qt.jsx)(Cf,{variant:"caption",fontSize:8,children:".PDF, .PNG, .JPEG"})})]}),fileUploadIconButton:X,downloadFile:Q,filterState:D,setFilterState:N,onLocalFileDelete:te,onCloudFilesDelete:ne,patientData:n,program:r,noteTypesDropdown:B})}):(0,qt.jsx)(LC,{}),a>=575?(0,qt.jsx)(qV,{openModal:L.open,onCloseModal:H,actionFunction:()=>Y(L),dataName:L.data.title,options:{primaryText:c("message:rpm_DeleteTitle"),secondaryText:c("message:rpm_DeleteBodyText"),descText:c("message:rpm_DeleteSubText"),btn:{primaryText:c("rpm_Delete"),secondaryText:c("rpm_Cancel"),primaryColor:"error",secondaryColor:"primary"},btnSwap:!0}}):(0,qt.jsx)(zje,{openModal:F.open,onCloseModal:W,actionFunction:()=>Y(F),dataName:F.data.title,options:{primaryText:c("message:rpm_DeleteTitle"),secondaryText:c("message:rpm_DeleteBodyText"),btn:{primaryText:c("rpm_Delete"),secondaryText:c("rpm_Cancel"),primaryColor:"error",secondaryColor:"primary"}}})]})};const Fwe=function(e){let{initialState:t,formData:n,handleEditMode:r,updatePatientDetails:o,countries:a,fetchStates:s,states:l}=e;const{t:c}=Vg(),[d,u]=We.useState(null),p=window.innerWidth;return(0,qt.jsx)(op,{sx:{width:"100%"},children:(0,qt.jsx)(Kz,{initialValues:hs(t,n),validationSchema:RU.personalDetail,onSubmit:d?()=>{}:o,enableReinitialize:!0,children:e=>{let{values:t,setFieldValue:n,handleSubmit:o,setFieldTouched:d}=e;return(0,qt.jsx)(qt.Fragment,{children:(0,qt.jsxs)(yH,{sx:{bgcolor:"transparent",boxShadow:"none"},children:[(0,qt.jsx)(nW,{sx:{px:0,pt:0,pb:2.5},title:(0,qt.jsxs)(Ff,{container:!0,spacing:2,alignItems:"center",children:[(0,qt.jsx)(Ff,{item:!0,xs:!0,children:(0,qt.jsx)(Cf,{variant:"h5",component:"h5",children:c("rpm_PatientInfo")})}),(0,qt.jsx)(Ff,{item:!0,children:(0,qt.jsx)(xh,{variant:"contained",color:"primary",disableElevation:!0,onClick:o,children:c("rpm_Update")})}),(0,qt.jsx)(Ff,{item:!0,children:(0,qt.jsx)(xh,{variant:"outlined",color:"primary",onClick:r,children:c("rpm_Cancel")})})]})}),(0,qt.jsx)(wH,{sx:{bgcolor:"white",border:"1px solid #e5e5e5"},children:(0,qt.jsx)(nH,{children:(0,qt.jsxs)(Ff,{container:!0,spacing:3,children:[(0,qt.jsx)(Ff,{item:!0,xs:12,md:!0,children:(0,qt.jsxs)(Ff,{container:!0,spacing:3,children:[(0,qt.jsx)(Ff,{item:!0,xs:12,md:6,lg:6,children:(0,qt.jsxs)(pE,{flexDirection:"column",children:[(0,qt.jsxs)(Cf,{variant:"body2",component:"p",color:"primary",fontWeight:"h6.fontWeight",sx:{flex:.4},pb:1,children:[c("rpm_FirstName"),(0,qt.jsx)(op,{component:"span",children:"*"})]}),(0,qt.jsxs)(op,{sx:{flex:.6},children:[(0,qt.jsx)(tH,{as:qj,fullWidth:!0,size:"small",id:"first_name",name:"first_name",variant:"outlined",endAdornment:(0,qt.jsx)(tw,{position:"end",children:(0,qt.jsx)(sy,{title:c("message:rpm_FirstNameHelp"),placement:"top",children:(0,qt.jsx)(wh,{size:"small",disableRipple:!0,sx:{p:0},children:(0,qt.jsx)(pM.A,{fontSize:"small"})})})})}),(0,qt.jsx)(dH,{name:"first_name",children:e=>(0,qt.jsx)(v_,{error:!0,children:c(e,{field:c("rpm_FirstName")})})})]})]})}),(0,qt.jsx)(Ff,{item:!0,xs:12,md:6,lg:6,children:(0,qt.jsxs)(pE,{flexDirection:"column",children:[(0,qt.jsxs)(Cf,{variant:"body2",component:"p",color:"primary",fontWeight:"h6.fontWeight",sx:{flex:.4},pb:1,children:[c("rpm_LastName"),(0,qt.jsx)(op,{component:"span",children:"*"})]}),(0,qt.jsxs)(op,{sx:{flex:.6},children:[(0,qt.jsx)(tH,{as:qj,fullWidth:!0,size:"small",id:"last_name",name:"last_name",variant:"outlined",endAdornment:(0,qt.jsx)(tw,{position:"end",children:(0,qt.jsx)(sy,{title:c("message:rpm_LastNameHelp"),placement:"top",children:(0,qt.jsx)(wh,{size:"small",disableRipple:!0,sx:{p:0},children:(0,qt.jsx)(pM.A,{fontSize:"small"})})})})}),(0,qt.jsx)(dH,{name:"last_name",children:e=>(0,qt.jsx)(v_,{error:!0,children:c(e,{field:c("rpm_LastName")})})})]})]})}),(0,qt.jsx)(Ff,{item:!0,xs:12,md:6,lg:6,children:(0,qt.jsxs)(pE,{flexDirection:"column",children:[(0,qt.jsx)(Cf,{variant:"body2",component:"p",color:"primary",fontWeight:"h6.fontWeight",sx:{flex:.4},pb:1,children:c("rpm_DOB")}),(0,qt.jsxs)(op,{sx:{flex:.6},children:[(0,qt.jsx)(op,{sx:{"& .MuiOutlinedInput-input":{py:1.0625}},children:(0,qt.jsx)(WM,{dateAdapter:DI,children:(0,qt.jsx)(tH,{as:fD,size:"small",id:"birth_date",name:"birth_date",value:t.birth_date||null,renderInput:e=>(0,qt.jsx)(Q_,(0,i.A)({fullWidth:!0},e)),maxDate:new Date,inputFormat:"dd/MM/yyyy",defaultCalendarMonth:gs(18,11,31),onError:e=>u(e),onChange:e=>{var t;n("age",null===(t=Ns(e))||void 0===t?void 0:t.toString()),n("birth_date",e),d("age",!0)}})})}),(0,qt.jsx)(dH,{name:"birth_date",children:e=>(0,qt.jsx)(v_,{error:!0,children:c(e,{field:c("rpm_DOB")})})})]})]})}),(0,qt.jsx)(Ff,{item:!0,xs:12,md:6,lg:6,children:(0,qt.jsxs)(pE,{flexDirection:"column",children:[(0,qt.jsxs)(Cf,{variant:"body2",component:"p",color:"primary",fontWeight:"h6.fontWeight",sx:{flex:.4},pb:1,children:[c("rpm_Age"),(0,qt.jsx)(op,{component:"span",children:"*"})]}),(0,qt.jsxs)(op,{sx:{flex:.6},children:[(0,qt.jsx)(tH,{as:qj,fullWidth:!0,size:"small",id:"age",name:"age",variant:"outlined",onChange:async e=>{if(await n("age",e.target.value),e.target.value>0){let r=sa()(t.birth_date);r.isValid()||(r=sa()().month(0).date(1)),n("birth_date",sa()().month(sa()(r).get("months")).date(sa()(r).get("date")).subtract(e.target.value,"years").valueOf()),await d("birth_date",!0)}else await n("birth_date",sa()().valueOf())},endAdornment:(0,qt.jsx)(tw,{position:"end",children:(0,qt.jsx)(sy,{title:c("message:rpm_AgeHelp"),placement:"top",children:(0,qt.jsx)(wh,{size:"small",disableRipple:!0,sx:{p:0},children:(0,qt.jsx)(pM.A,{fontSize:"small"})})})})}),(0,qt.jsx)(dH,{name:"age",children:e=>(0,qt.jsx)(v_,{error:!0,children:c(e,{field:c("rpm_Age")})})})]})]})}),(0,qt.jsx)(Ff,{item:!0,xs:12,md:6,lg:6,children:(0,qt.jsxs)(pE,{flexDirection:"column",children:[(0,qt.jsx)(Cf,{variant:"body2",component:"p",color:"primary",fontWeight:"h6.fontWeight",sx:{flex:.4},pb:1,children:c("rpm_Gender")}),(0,qt.jsxs)(op,{sx:{flex:.6},children:[(0,qt.jsxs)(tH,{as:G_,fullWidth:!0,size:"small",id:"gender",name:"gender",variant:"outlined",endAdornment:(0,qt.jsx)(tw,{position:"end",sx:{position:"absolute",right:"28px"},children:(0,qt.jsx)(sy,{title:c("message:rpm_GenderHelp"),placement:"top",children:(0,qt.jsx)(wh,{size:"small",disableRipple:!0,sx:{p:0},children:(0,qt.jsx)(pM.A,{fontSize:"small"})})})}),children:[(0,qt.jsx)(mf,{value:"Male",children:"Male"}),(0,qt.jsx)(mf,{value:"Female",children:"Female"}),(0,qt.jsx)(mf,{value:"Other",children:"Other"})]}),(0,qt.jsx)(dH,{name:"state",children:e=>(0,qt.jsx)(v_,{error:!0,children:c(e,{field:c("rpm_Gender")})})})]})]})}),(0,qt.jsx)(Ff,{item:!0,xs:12,md:6,lg:6,children:(0,qt.jsxs)(pE,{flexDirection:"column",children:[(0,qt.jsx)(Cf,{variant:"body2",component:"p",color:"primary",fontWeight:"h6.fontWeight",sx:{flex:.4},pb:1,children:c("rpm_Email")}),(0,qt.jsxs)(op,{sx:{flex:.6},children:[(0,qt.jsx)(tH,{as:qj,fullWidth:!0,size:"small",id:"email",name:"email",variant:"outlined",disabled:!0,endAdornment:(0,qt.jsx)(tw,{position:"end",children:(0,qt.jsx)(sy,{title:c("message:rpm_EmailHelp"),placement:"top",children:(0,qt.jsx)(wh,{size:"small",disableRipple:!0,sx:{p:0},children:(0,qt.jsx)(pM.A,{fontSize:"small"})})})})}),(0,qt.jsx)(dH,{name:"email",children:e=>(0,qt.jsx)(v_,{error:!0,children:c(e,{field:c("rpm_Email")})})})]})]})}),(0,qt.jsx)(Ff,{item:!0,xs:12,md:6,lg:6,children:(0,qt.jsxs)(pE,{flexDirection:"column",children:[(0,qt.jsx)(Cf,{variant:"body2",component:"p",color:"primary",fontWeight:"h6.fontWeight",sx:{flex:.4},pb:1,children:c("rpm_CountryCode")}),(0,qt.jsxs)(op,{sx:{flex:.6},children:[(0,qt.jsxs)(op,{className:"autocomplete",sx:{position:"relative"},children:[(0,qt.jsx)(tH,{component:KK,size:"small",optionId:"phoneCode",name:"country_code",options:a,browserAutocomplete:!1,valueKey:"phoneCode",nameKey:"phoneCode",variant:"outlined",margin:"normal",fullWidth:!0}),(0,qt.jsx)(sy,{title:c("message:rpm_CountryCodeHelp"),placement:"top",children:(0,qt.jsx)(wh,{size:"small",sx:{position:"absolute",right:"0.675rem",top:"0.25rem"},children:(0,qt.jsx)(pM.A,{fontSize:"small"})})})]}),(0,qt.jsx)(dH,{name:"country_code",children:e=>(0,qt.jsx)(v_,{error:!0,children:c(e,{field:c("rpm_CountryCode")})})})]})]})}),(0,qt.jsx)(Ff,{item:!0,xs:12,md:6,lg:6,children:(0,qt.jsxs)(pE,{flexDirection:"column",children:[(0,qt.jsx)(Cf,{variant:"body2",component:"p",color:"primary",fontWeight:"h6.fontWeight",sx:{flex:.4},pb:1,children:c("rpm_Mobile")}),(0,qt.jsxs)(op,{sx:{flex:.6},children:[(0,qt.jsx)(tH,{as:qj,fullWidth:!0,size:"small",id:"mobile",name:"mobile",variant:"outlined",endAdornment:(0,qt.jsx)(tw,{position:"end",children:(0,qt.jsx)(sy,{title:c("message:rpm_MobileHelp"),placement:"top",children:(0,qt.jsx)(wh,{size:"small",disableRipple:!0,sx:{p:0},children:(0,qt.jsx)(pM.A,{fontSize:"small"})})})})}),(0,qt.jsx)(dH,{name:"mobile",children:e=>(0,qt.jsx)(v_,{error:!0,children:c(e,{field:c("rpm_Mobile")})})})]})]})}),(0,qt.jsx)(Ff,{item:!0,xs:12,md:6,lg:6,children:(0,qt.jsxs)(pE,{flexDirection:"column",children:[(0,qt.jsx)(Cf,{variant:"body2",component:"p",color:"primary",fontWeight:"h6.fontWeight",sx:{flex:.4},pb:1,children:c("rpm_MaritalStatus")}),(0,qt.jsxs)(op,{sx:{flex:.6},children:[(0,qt.jsxs)(tH,{as:G_,fullWidth:!0,size:"small",id:"marital_status",name:"marital_status",variant:"outlined",endAdornment:(0,qt.jsx)(tw,{position:"end",sx:{position:"absolute",right:"28px"},children:(0,qt.jsx)(sy,{title:c("message:rpm_MaritalStatusHelp"),placement:"top",children:(0,qt.jsx)(wh,{size:"small",disableRipple:!0,sx:{p:0},children:(0,qt.jsx)(pM.A,{fontSize:"small"})})})}),children:[(0,qt.jsx)(mf,{value:"Married",children:"Married"}),(0,qt.jsx)(mf,{value:"Single",children:"Single"}),(0,qt.jsx)(mf,{value:"Other",children:"Other"})]}),(0,qt.jsx)(dH,{name:"state",children:e=>(0,qt.jsx)(v_,{error:!0,children:c(e,{field:c("rpm_MaritalStatus")})})})]})]})}),(0,qt.jsx)(Ff,{item:!0,xs:12,md:6,lg:6,children:(0,qt.jsxs)(pE,{flexDirection:"column",children:[(0,qt.jsx)(Cf,{variant:"body2",component:"p",color:"primary",fontWeight:"h6.fontWeight",sx:{flex:.4},pb:1,children:c("rpm_Parent")}),(0,qt.jsxs)(op,{sx:{flex:.6},children:[(0,qt.jsx)(tH,{as:qj,fullWidth:!0,size:"small",id:"parent",name:"parent",variant:"outlined",endAdornment:(0,qt.jsx)(tw,{position:"end",children:(0,qt.jsx)(sy,{title:c("message:rpm_ParentHelp"),placement:"top",children:(0,qt.jsx)(wh,{size:"small",disableRipple:!0,sx:{p:0},children:(0,qt.jsx)(pM.A,{fontSize:"small"})})})})}),(0,qt.jsx)(dH,{name:"parent",children:e=>(0,qt.jsx)(v_,{error:!0,children:c(e,{field:c("rpm_Parent")})})})]})]})}),(0,qt.jsx)(Ff,{item:!0,xs:12,md:6,lg:6,children:(0,qt.jsxs)(pE,{flexDirection:"column",children:[(0,qt.jsx)(Cf,{variant:"body2",component:"p",color:"primary",fontWeight:"h6.fontWeight",sx:{flex:.4},pb:1,children:c("rpm_BloodGroup")}),(0,qt.jsxs)(op,{sx:{flex:.6},children:[(0,qt.jsxs)(tH,{as:G_,fullWidth:!0,size:"small",id:"blood_group",name:"blood_group",variant:"outlined",endAdornment:(0,qt.jsx)(tw,{position:"end",sx:{position:"absolute",right:"28px"},children:(0,qt.jsx)(sy,{title:c("message:rpm_BloodGroupHelp"),placement:"top",children:(0,qt.jsx)(wh,{size:"small",disableRipple:!0,sx:{p:0},children:(0,qt.jsx)(pM.A,{fontSize:"small"})})})}),children:[(0,qt.jsx)(mf,{value:"Select",disabled:!0,sx:{display:"none"},children:"Select"}),wd.map(e=>(0,qt.jsx)(mf,{value:e.value,children:e.label},e.id))]}),(0,qt.jsx)(dH,{name:"blood_group",children:e=>(0,qt.jsx)(v_,{error:!0,children:c(e,{field:c("rpm_BloodGroup")})})})]})]})}),(0,qt.jsx)(Ff,{item:!0,xs:12,md:6,lg:6,children:(0,qt.jsxs)(pE,{flexDirection:"column",children:[(0,qt.jsx)(Cf,{variant:"body2",component:"p",color:"primary",fontWeight:"h6.fontWeight",sx:{flex:.4},pb:1,children:c("rpm_Height")}),(0,qt.jsxs)(op,{sx:{flex:.6},children:[(0,qt.jsxs)(op,{display:"flex",children:[(0,qt.jsx)(tH,{as:G_,fullWidth:!0,size:"small",id:"height_feet",name:"height_feet",variant:"outlined",endAdornment:(0,qt.jsx)(tw,{position:"end",sx:{position:"absolute",right:"28px"},children:(0,qt.jsx)(sy,{title:c("message:rpm_HeightFeetHelp"),placement:"top",children:(0,qt.jsx)(wh,{size:"small",disableRipple:!0,sx:{p:0},children:(0,qt.jsx)(pM.A,{fontSize:"small"})})})}),children:[...Array(10).keys()].map(e=>e+1).map(e=>(0,qt.jsx)(mf,{value:e,children:e},e))}),(0,qt.jsx)(op,{p:.5}),(0,qt.jsx)(tH,{as:G_,fullWidth:!0,size:"small",id:"height_inches",name:"height_inches",variant:"outlined",endAdornment:(0,qt.jsx)(tw,{position:"end",sx:{position:"absolute",right:"28px"},children:(0,qt.jsx)(sy,{title:c("message:rpm_HeightInchesHelp"),placement:"top",children:(0,qt.jsx)(wh,{size:"small",disableRipple:!0,sx:{p:0},children:(0,qt.jsx)(pM.A,{fontSize:"small"})})})}),children:[...Array(12).keys()].map(e=>e).map(e=>(0,qt.jsx)(mf,{value:e,children:e},e))})]}),(0,qt.jsx)(dH,{name:"height_inches",children:e=>(0,qt.jsx)(v_,{error:!0,children:c(e,{field:c("rpm_Height")})})})]})]})}),(0,qt.jsx)(Ff,{item:!0,xs:12,md:6,lg:6,children:(0,qt.jsxs)(pE,{flexDirection:"column",children:[(0,qt.jsx)(Cf,{variant:"body2",component:"p",color:"primary",fontWeight:"h6.fontWeight",sx:{flex:.4},pb:1,children:c("rpm_Weight")}),(0,qt.jsxs)(op,{sx:{flex:.6},children:[(0,qt.jsx)(tH,{as:qj,fullWidth:!0,size:"small",id:"weight",name:"weight",variant:"outlined",endAdornment:(0,qt.jsx)(tw,{position:"end",children:(0,qt.jsx)(sy,{title:c("message:rpm_WeightHelp"),placement:"top",children:(0,qt.jsx)(wh,{size:"small",disableRipple:!0,sx:{p:0},children:(0,qt.jsx)(pM.A,{fontSize:"small"})})})})}),(0,qt.jsx)(dH,{name:"weight",children:e=>(0,qt.jsx)(v_,{error:!0,children:c(e,{field:c("rpm_Weight")})})})]})]})})]})}),(0,qt.jsx)(Ff,{item:!0,xs:p<900&&12,children:(0,qt.jsx)(eg,{orientation:p<900?"horizontal":"vertical",variant:"middle"})}),(0,qt.jsx)(Ff,{item:!0,xs:12,md:!0,children:(0,qt.jsxs)(Ff,{container:!0,spacing:3,children:[(0,qt.jsx)(Ff,{item:!0,xs:12,md:12,lg:12,children:(0,qt.jsxs)(pE,{flexDirection:"column",children:[(0,qt.jsx)(Cf,{variant:"body2",component:"p",color:"primary",fontWeight:"h6.fontWeight",sx:{flex:.4},pb:1,children:c("rpm_Address1")}),(0,qt.jsxs)(op,{sx:{flex:.6},children:[(0,qt.jsx)(tH,{as:qj,fullWidth:!0,size:"small",id:"adr_address1",name:"adr_address1",variant:"outlined",multiline:!0,rows:3,endAdornment:(0,qt.jsx)(tw,{position:"end",children:(0,qt.jsx)(sy,{title:c("message:rpm_Address1Help"),placement:"top",children:(0,qt.jsx)(wh,{size:"small",disableRipple:!0,sx:{p:0},children:(0,qt.jsx)(pM.A,{fontSize:"small"})})})})}),(0,qt.jsx)(dH,{name:"adr_address1",children:e=>(0,qt.jsx)(v_,{error:!0,children:c(e,{field:c("rpm_Address1")})})})]})]})}),(0,qt.jsx)(Ff,{item:!0,xs:12,md:12,lg:12,children:(0,qt.jsxs)(pE,{flexDirection:"column",children:[(0,qt.jsx)(Cf,{variant:"body2",component:"p",color:"primary",fontWeight:"h6.fontWeight",sx:{flex:.4},pb:1,children:c("rpm_Address2")}),(0,qt.jsxs)(op,{sx:{flex:.6},children:[(0,qt.jsx)(tH,{as:qj,fullWidth:!0,size:"small",id:"adr_address2",name:"adr_address2",variant:"outlined",multiline:!0,rows:3,endAdornment:(0,qt.jsx)(tw,{position:"end",children:(0,qt.jsx)(sy,{title:c("message:rpm_Address1Help"),placement:"top",children:(0,qt.jsx)(wh,{size:"small",disableRipple:!0,sx:{p:0},children:(0,qt.jsx)(pM.A,{fontSize:"small"})})})})}),(0,qt.jsx)(dH,{name:"adr_address2",children:e=>(0,qt.jsx)(v_,{error:!0,children:c(e,{field:c("rpm_Address2")})})})]})]})}),(0,qt.jsx)(Ff,{item:!0,xs:12,md:6,lg:6,children:(0,qt.jsxs)(pE,{flexDirection:"column",children:[(0,qt.jsx)(Cf,{variant:"body2",component:"p",color:"primary",fontWeight:"h6.fontWeight",sx:{flex:.4},pb:1,children:c("rpm_Country")}),(0,qt.jsxs)(op,{sx:{flex:.6},children:[(0,qt.jsxs)(op,{className:"autocomplete",sx:{position:"relative"},children:[(0,qt.jsx)(tH,{component:KK,size:"small",id:"country",optionId:"isoCode",name:"adr_country_name",options:a,browserAutocomplete:!1,valueKey:"isoCode",nameKey:"name",onValueChange:(e,t)=>{n("adr_state_name",""),s(t)},variant:"outlined",margin:"normal",fullWidth:!0}),(0,qt.jsx)(sy,{title:c("message:rpm_ProgramCountryHelp"),placement:"top",children:(0,qt.jsx)(wh,{size:"small",sx:{position:"absolute",right:"0.675rem",top:"0.25rem"},children:(0,qt.jsx)(pM.A,{fontSize:"small"})})})]}),(0,qt.jsx)(dH,{name:"country",children:e=>(0,qt.jsx)(v_,{error:!0,children:c(e,{field:c("rpm_ProgramCountry")})})})]})]})}),(0,qt.jsx)(Ff,{item:!0,xs:12,md:6,lg:6,children:(0,qt.jsxs)(pE,{flexDirection:"column",children:[(0,qt.jsx)(Cf,{variant:"body2",component:"p",color:"primary",fontWeight:"h6.fontWeight",sx:{flex:.4},pb:1,children:c("rpm_State")}),(0,qt.jsxs)(op,{sx:{flex:.6},children:[(0,qt.jsxs)(op,{className:"autocomplete",sx:{position:"relative"},children:[(0,qt.jsx)(tH,{component:KK,size:"small",id:"state",optionId:"isoCode",name:"adr_state_name",options:l,browserAutocomplete:!1,valueKey:"isoCode",nameKey:"name",dependent:!0,variant:"outlined",margin:"normal",fullWidth:!0}),(0,qt.jsx)(sy,{title:c("message:rpm_ProgramStateHelp"),placement:"top",children:(0,qt.jsx)(wh,{size:"small",sx:{position:"absolute",right:"0.675rem",top:"0.25rem"},children:(0,qt.jsx)(pM.A,{fontSize:"small"})})})]}),(0,qt.jsx)(dH,{name:"state",children:e=>(0,qt.jsx)(v_,{error:!0,children:c(e,{field:c("rpm_ProgramState")})})})]})]})}),(0,qt.jsx)(Ff,{item:!0,xs:12,md:6,lg:6,children:(0,qt.jsxs)(pE,{flexDirection:"column",children:[(0,qt.jsx)(Cf,{variant:"body2",component:"p",color:"primary",fontWeight:"h6.fontWeight",sx:{flex:.4},pb:1,children:c("rpm_City")}),(0,qt.jsxs)(op,{sx:{flex:.6},children:[(0,qt.jsx)(tH,{as:qj,fullWidth:!0,size:"small",id:"adr_city",name:"adr_city",variant:"outlined",endAdornment:(0,qt.jsx)(tw,{position:"end",children:(0,qt.jsx)(sy,{title:c("message:rpm_CityHelp"),placement:"top",children:(0,qt.jsx)(wh,{size:"small",disableRipple:!0,sx:{p:0},children:(0,qt.jsx)(pM.A,{fontSize:"small"})})})})}),(0,qt.jsx)(dH,{name:"adr_city",children:e=>(0,qt.jsx)(v_,{error:!0,children:c(e,{field:c("rpm_City")})})})]})]})}),(0,qt.jsx)(Ff,{item:!0,xs:12,md:6,lg:6,children:(0,qt.jsxs)(pE,{flexDirection:"column",children:[(0,qt.jsx)(Cf,{variant:"body2",component:"p",color:"primary",fontWeight:"h6.fontWeight",sx:{flex:.4},pb:1,children:c("rpm_Pin")}),(0,qt.jsxs)(op,{sx:{flex:.6},children:[(0,qt.jsx)(tH,{as:qj,fullWidth:!0,size:"small",id:"adr_zipcode",name:"adr_zipcode",variant:"outlined",endAdornment:(0,qt.jsx)(tw,{position:"end",children:(0,qt.jsx)(sy,{title:c("message:rpm_ZipCodeHelp"),placement:"top",children:(0,qt.jsx)(wh,{size:"small",disableRipple:!0,sx:{p:0},children:(0,qt.jsx)(pM.A,{fontSize:"small"})})})})}),(0,qt.jsx)(dH,{name:"adr_zipcode",children:e=>(0,qt.jsx)(v_,{error:!0,children:c(e,{field:c("rpm_State")})})})]})]})})]})})]})})})]})})}},"patient_formik")})};const $we=function(e){var t,n,r,i,o,a,s,l,c,d,u,p,h,m,f,g,v,x,y,b,j,_,C,w,S,A,k;let{userData:T,patientData:E,years:M,handleEditMode:O,countries:R,states:P}=e;const{t:D}=Vg(),N=window.innerWidth;return(0,qt.jsxs)(qt.Fragment,{children:[(0,qt.jsx)(op,{mb:2.5,children:(0,qt.jsxs)(Ff,{container:!0,spacing:2,alignItems:"center",children:[(0,qt.jsx)(Ff,{item:!0,xs:!0,children:(0,qt.jsxs)(op,{sx:{mb:1},position:"relative",children:[(0,qt.jsx)(op,{sx:{display:{xs:"none",sm:"block",md:"block"}},children:(0,qt.jsx)(Cf,{variant:"h5",component:"h5",children:D("rpm_PatientInfo")})}),(0,qt.jsx)(op,{sx:{display:{xs:"block",sm:"none",md:"none"}},position:"absolute",top:"-63px",bottom:"0",left:"40px",children:(0,qt.jsx)(Cf,{variant:"h6",component:"h6",children:D("rpm_PatientInfo")})})]})}),(null===T||void 0===T?void 0:T.showUpdatePatientProfile)&&(0,qt.jsx)(Ff,{item:!0,children:(0,qt.jsx)(xh,{className:(null===T||void 0===T?void 0:T.showUpdatePatientProfile)&&"pd-tour-step0",variant:"contained",color:"primary",disableElevation:!0,onClick:O,disabled:!(null===E||void 0===E||!E.dummy),children:D("rpm_Edit")})})]})}),(0,qt.jsx)(op,{sx:{width:"100%"},children:(0,qt.jsx)(yH,{variant:"outlined",children:(0,qt.jsx)(wH,{children:(0,qt.jsxs)(Ff,{container:!0,spacing:3,children:[(0,qt.jsx)(Ff,{item:!0,xs:12,md:!0,children:(0,qt.jsxs)(Ff,{container:!0,spacing:3,children:[(0,qt.jsx)(Ff,{item:!0,xs:12,md:6,lg:6,children:(0,qt.jsxs)(pE,{flexDirection:"column",children:[(0,qt.jsx)(Cf,{variant:"body2",fontWeight:"h6.fontWeight",sx:{flex:.4},color:"primary",pb:.3,children:D("rpm_FirstName")}),(0,qt.jsx)(op,{sx:{flex:.6,bgcolor:"grey.50",p:1,py:1.5,borderRadius:"8px"},children:ta()(E)?(0,qt.jsx)(lS,{}):(0,qt.jsx)(Cf,{variant:"body1",fontWeight:"h6.fontWeight",component:"p",children:null===E||void 0===E?void 0:E.first_name})})]})}),(0,qt.jsx)(Ff,{item:!0,xs:12,md:6,lg:6,children:(0,qt.jsxs)(pE,{flexDirection:"column",children:[(0,qt.jsx)(Cf,{variant:"body2",component:"p",fontWeight:"h6.fontWeight",sx:{flex:.4},color:"primary",pb:.3,children:D("rpm_LastName")}),(0,qt.jsx)(op,{sx:{flex:.6,bgcolor:"grey.50",p:1,py:1.5,borderRadius:"8px"},children:ta()(E)?(0,qt.jsx)(lS,{}):(0,qt.jsx)(Cf,{variant:"body1",fontWeight:"h6.fontWeight",component:"p",children:null===E||void 0===E?void 0:E.last_name})})]})}),(0,qt.jsx)(Ff,{item:!0,xs:12,md:6,lg:6,children:(0,qt.jsxs)(pE,{flexDirection:"column",children:[(0,qt.jsx)(Cf,{variant:"body2",component:"p",fontWeight:"h6.fontWeight",sx:{flex:.4},color:"primary",pb:.3,children:D("rpm_DOB")}),(0,qt.jsx)(op,{sx:{flex:.6,bgcolor:"grey.50",p:1,py:1.5,borderRadius:"8px"},children:ta()(E)?(0,qt.jsx)(lS,{}):(0,qt.jsx)(Cf,{variant:"body1",fontWeight:"h6.fontWeight",component:"p",children:null!==E&&void 0!==E&&E.birth_date?ms(null===E||void 0===E?void 0:E.birth_date,"DD/MM/YYYY"):"NA"})})]})}),(0,qt.jsx)(Ff,{item:!0,xs:12,md:6,lg:6,children:(0,qt.jsxs)(pE,{flexDirection:"column",children:[(0,qt.jsx)(Cf,{variant:"body2",component:"p",fontWeight:"h6.fontWeight",sx:{flex:.4},color:"primary",pb:.3,children:D("rpm_Gender")}),(0,qt.jsx)(op,{sx:{flex:.6,bgcolor:"grey.50",p:1,py:1.5,borderRadius:"8px"},children:ta()(E)?(0,qt.jsx)(lS,{}):(0,qt.jsx)(Cf,{variant:"body1",fontWeight:"h6.fontWeight",component:"p",children:null!==E&&void 0!==E&&null!==(t=E.profile)&&void 0!==t&&t.gender?null===E||void 0===E||null===(n=E.profile)||void 0===n?void 0:n.gender:"NA"})})]})}),(0,qt.jsx)(Ff,{item:!0,xs:12,md:6,lg:6,children:(0,qt.jsxs)(pE,{flexDirection:"column",children:[(0,qt.jsx)(Cf,{variant:"body2",component:"p",fontWeight:"h6.fontWeight",sx:{flex:.4},color:"primary",pb:.3,children:D("rpm_Email")}),(0,qt.jsx)(op,{sx:{flex:.6,bgcolor:"grey.50",p:1,py:1.5,borderRadius:"8px"},children:ta()(E)?(0,qt.jsx)(lS,{}):(0,qt.jsx)(Cf,{variant:"body1",fontWeight:"h6.fontWeight",component:"p",noWrap:!0,children:null!==E&&void 0!==E&&E.email?null===E||void 0===E?void 0:E.email:"NA"})})]})}),(0,qt.jsx)(Ff,{item:!0,xs:12,md:6,lg:6,children:(0,qt.jsxs)(pE,{flexDirection:"column",children:[(0,qt.jsx)(Cf,{variant:"body2",component:"p",fontWeight:"h6.fontWeight",sx:{flex:.4},color:"primary",pb:.3,children:D("rpm_CountryCode")}),(0,qt.jsx)(op,{sx:{flex:.6,bgcolor:"grey.50",p:1,py:1.5,borderRadius:"8px"},children:ta()(E)?(0,qt.jsx)(lS,{}):(0,qt.jsx)(Cf,{variant:"body1",fontWeight:"h6.fontWeight",component:"p",children:null!==E&&void 0!==E&&E.mobile?"+".concat(null===(r=cJ(null===E||void 0===E?void 0:E.mobile))||void 0===r?void 0:r.countryCallingCode):"NA"})})]})}),(0,qt.jsx)(Ff,{item:!0,xs:12,md:6,lg:6,children:(0,qt.jsxs)(pE,{flexDirection:"column",children:[(0,qt.jsx)(Cf,{variant:"body2",component:"p",fontWeight:"h6.fontWeight",sx:{flex:.4},color:"primary",pb:.3,children:D("rpm_Mobile")}),(0,qt.jsx)(op,{sx:{flex:.6,bgcolor:"grey.50",p:1,py:1.5,borderRadius:"8px"},children:ta()(E)?(0,qt.jsx)(lS,{}):(0,qt.jsx)(Cf,{variant:"body1",fontWeight:"h6.fontWeight",component:"p",children:null!==E&&void 0!==E&&E.mobile?null===(i=cJ(null===E||void 0===E?void 0:E.mobile))||void 0===i?void 0:i.nationalNumber:"NA"})})]})}),(0,qt.jsx)(Ff,{item:!0,xs:12,md:6,lg:6,children:(0,qt.jsxs)(pE,{flexDirection:"column",children:[(0,qt.jsx)(Cf,{variant:"body2",component:"p",fontWeight:"h6.fontWeight",sx:{flex:.4},color:"primary",pb:.3,children:D("rpm_Age")}),(0,qt.jsx)(op,{sx:{flex:.6,bgcolor:"grey.50",p:1,py:1.5,borderRadius:"8px"},children:ta()(E)?(0,qt.jsx)(lS,{}):(0,qt.jsx)(Cf,{variant:"body1",fontWeight:"h6.fontWeight",component:"p",children:null!==E&&void 0!==E&&E.birth_date?"".concat(M,"yr"):"NA"})})]})}),(0,qt.jsx)(Ff,{item:!0,xs:12,md:6,lg:6,children:(0,qt.jsxs)(pE,{flexDirection:"column",children:[(0,qt.jsx)(Cf,{variant:"body2",component:"p",fontWeight:"h6.fontWeight",sx:{flex:.4},color:"primary",pb:.3,children:D("rpm_MaritalStatus")}),(0,qt.jsx)(op,{sx:{flex:.6,bgcolor:"grey.50",p:1,py:1.5,borderRadius:"8px"},children:ta()(E)?(0,qt.jsx)(lS,{}):(0,qt.jsx)(Cf,{variant:"body1",fontWeight:"h6.fontWeight",component:"p",children:null!==E&&void 0!==E&&null!==(o=E.profile)&&void 0!==o&&o.marital_status?null===E||void 0===E||null===(a=E.profile)||void 0===a?void 0:a.marital_status:"NA"})})]})}),(0,qt.jsx)(Ff,{item:!0,xs:12,md:6,lg:6,children:(0,qt.jsxs)(pE,{flexDirection:"column",children:[(0,qt.jsx)(Cf,{variant:"body2",component:"p",fontWeight:"h6.fontWeight",sx:{flex:.4},color:"primary",pb:.3,children:D("rpm_Parent")}),(0,qt.jsx)(op,{sx:{flex:.6,bgcolor:"grey.50",p:1,py:1.5,borderRadius:"8px"},children:ta()(E)?(0,qt.jsx)(lS,{}):(0,qt.jsx)(Cf,{variant:"body1",fontWeight:"h6.fontWeight",component:"p",children:null!==E&&void 0!==E&&null!==(s=E.profile)&&void 0!==s&&s.parent?null===E||void 0===E||null===(l=E.profile)||void 0===l?void 0:l.parent:"NA"})})]})}),(0,qt.jsx)(Ff,{item:!0,xs:12,md:6,lg:6,children:(0,qt.jsxs)(pE,{flexDirection:"column",children:[(0,qt.jsx)(Cf,{variant:"body2",component:"p",fontWeight:"h6.fontWeight",sx:{flex:.4},color:"primary",pb:.3,children:D("rpm_BloodGroup")}),(0,qt.jsx)(op,{sx:{flex:.6,bgcolor:"grey.50",p:1,py:1.5,borderRadius:"8px"},children:ta()(E)?(0,qt.jsx)(lS,{}):(0,qt.jsx)(Cf,{variant:"body1",fontWeight:"h6.fontWeight",component:"p",children:null!==E&&void 0!==E&&null!==(c=E.profile)&&void 0!==c&&c.blood_group?null===E||void 0===E||null===(d=E.profile)||void 0===d?void 0:d.blood_group:"NA"})})]})}),(0,qt.jsx)(Ff,{item:!0,xs:12,md:6,lg:6,children:(0,qt.jsxs)(pE,{flexDirection:"column",children:[(0,qt.jsx)(Cf,{variant:"body2",component:"p",fontWeight:"h6.fontWeight",sx:{flex:.4},color:"primary",pb:.3,children:D("rpm_Height")}),(0,qt.jsx)(op,{sx:{flex:.6,bgcolor:"grey.50",p:1,py:1.5,borderRadius:"8px"},children:ta()(E)?(0,qt.jsx)(lS,{}):(0,qt.jsx)(Cf,{variant:"body1",fontWeight:"h6.fontWeight",component:"p",children:null!==E&&void 0!==E&&null!==(u=E.patient_health_profile)&&void 0!==u&&u.height?(null===E||void 0===E||null===(p=E.patient_health_profile)||void 0===p||null===(h=p.height)||void 0===h?void 0:h.split(".")[0])+"''"+(null===E||void 0===E||null===(m=E.patient_health_profile)||void 0===m||null===(f=m.height)||void 0===f?void 0:f.split(".")[1])+" ft.":"NA"})})]})}),(0,qt.jsx)(Ff,{item:!0,xs:12,md:6,lg:6,children:(0,qt.jsxs)(pE,{flexDirection:"column",children:[(0,qt.jsx)(Cf,{variant:"body2",component:"p",fontWeight:"h6.fontWeight",sx:{flex:.4},color:"primary",pb:.3,children:D("rpm_Weight")}),(0,qt.jsx)(op,{sx:{flex:.6,bgcolor:"grey.50",p:1,py:1.5,borderRadius:"8px"},children:ta()(E)?(0,qt.jsx)(lS,{}):(0,qt.jsx)(Cf,{variant:"body1",fontWeight:"h6.fontWeight",component:"p",children:null!==E&&void 0!==E&&null!==(g=E.patient_health_profile)&&void 0!==g&&g.weight?null===E||void 0===E||null===(v=E.patient_health_profile)||void 0===v?void 0:v.weight:"NA"})})]})})]})}),(0,qt.jsx)(Ff,{item:!0,xs:N<900&&12,children:(0,qt.jsx)(eg,{orientation:N<900?"horizontal":"vertical",variant:"middle"})}),(0,qt.jsx)(Ff,{item:!0,xs:12,md:!0,children:(0,qt.jsxs)(Ff,{container:!0,spacing:3,children:[(0,qt.jsx)(Ff,{item:!0,xs:12,md:12,lg:12,children:(0,qt.jsxs)(pE,{flexDirection:"column",children:[(0,qt.jsx)(Cf,{variant:"body2",component:"p",fontWeight:"h6.fontWeight",sx:{flex:.4},color:"primary",pb:.3,children:D("rpm_Address1")}),(0,qt.jsx)(op,{sx:{flex:.6,bgcolor:"grey.50",p:1,py:1.5,borderRadius:"8px"},children:ta()(E)?(0,qt.jsx)(lS,{}):(0,qt.jsx)(Cf,{variant:"body1",fontWeight:"h6.fontWeight",component:"p",children:null!==E&&void 0!==E&&null!==(x=E.profile)&&void 0!==x&&x.adr_address1?null===E||void 0===E||null===(y=E.profile)||void 0===y?void 0:y.adr_address1:"NA"})})]})}),(0,qt.jsx)(Ff,{item:!0,xs:12,md:12,lg:12,children:(0,qt.jsxs)(pE,{flexDirection:"column",children:[(0,qt.jsx)(Cf,{variant:"body2",component:"p",fontWeight:"h6.fontWeight",sx:{flex:.4},color:"primary",pb:.3,children:D("rpm_Address2")}),(0,qt.jsx)(op,{sx:{flex:.6,bgcolor:"grey.50",p:1,py:1.5,borderRadius:"8px"},children:ta()(E)?(0,qt.jsx)(lS,{}):(0,qt.jsx)(Cf,{variant:"body1",fontWeight:"h6.fontWeight",component:"p",children:null!==E&&void 0!==E&&null!==(b=E.profile)&&void 0!==b&&b.adr_address2?null===E||void 0===E||null===(j=E.profile)||void 0===j?void 0:j.adr_address2:"NA"})})]})}),(0,qt.jsx)(Ff,{item:!0,xs:12,md:6,lg:6,children:(0,qt.jsxs)(pE,{flexDirection:"column",children:[(0,qt.jsx)(Cf,{variant:"body2",component:"p",fontWeight:"h6.fontWeight",sx:{flex:.4},color:"primary",pb:.3,children:D("rpm_Country")}),(0,qt.jsx)(op,{sx:{flex:.6,bgcolor:"grey.50",p:1,py:1.5,borderRadius:"8px"},children:ta()(E)?(0,qt.jsx)(lS,{}):(0,qt.jsx)(Cf,{variant:"body1",fontWeight:"h6.fontWeight",component:"p",children:null===R||void 0===R||null===(_=R.find(e=>{var t;return(null===e||void 0===e?void 0:e.isoCode)===(null===E||void 0===E||null===(t=E.profile)||void 0===t?void 0:t.adr_country_name)}))||void 0===_?void 0:_.name})})]})}),(0,qt.jsx)(Ff,{item:!0,xs:12,md:6,lg:6,children:(0,qt.jsxs)(pE,{flexDirection:"column",children:[(0,qt.jsx)(Cf,{variant:"body2",component:"p",fontWeight:"h6.fontWeight",sx:{flex:.4},color:"primary",pb:.3,children:D("rpm_State")}),(0,qt.jsx)(op,{sx:{flex:.6,bgcolor:"grey.50",p:1,py:1.5,borderRadius:"8px"},children:ta()(E)?(0,qt.jsx)(lS,{}):(0,qt.jsx)(Cf,{variant:"body1",fontWeight:"h6.fontWeight",component:"p",children:null===P||void 0===P||null===(C=P.find(e=>{var t;return(null===e||void 0===e?void 0:e.isoCode)===(null===E||void 0===E||null===(t=E.profile)||void 0===t?void 0:t.adr_state_name)}))||void 0===C?void 0:C.name})})]})}),(0,qt.jsx)(Ff,{item:!0,xs:12,md:6,lg:6,children:(0,qt.jsxs)(pE,{flexDirection:"column",children:[(0,qt.jsx)(Cf,{variant:"body2",component:"p",fontWeight:"h6.fontWeight",sx:{flex:.4},color:"primary",pb:.3,children:D("rpm_City")}),(0,qt.jsx)(op,{sx:{flex:.6,bgcolor:"grey.50",p:1,py:1.5,borderRadius:"8px"},children:ta()(E)?(0,qt.jsx)(lS,{}):(0,qt.jsx)(Cf,{variant:"body1",fontWeight:"h6.fontWeight",component:"p",children:null!==E&&void 0!==E&&null!==(w=E.profile)&&void 0!==w&&w.adr_city?null===E||void 0===E||null===(S=E.profile)||void 0===S?void 0:S.adr_city:"NA"})})]})}),(0,qt.jsx)(Ff,{item:!0,xs:12,md:6,lg:6,children:(0,qt.jsxs)(pE,{flexDirection:"column",children:[(0,qt.jsx)(Cf,{variant:"body2",component:"p",fontWeight:"h6.fontWeight",sx:{flex:.4},color:"primary",pb:.3,children:D("rpm_Pin")}),(0,qt.jsx)(op,{sx:{flex:.6,bgcolor:"grey.50",p:1,py:1.5,borderRadius:"8px"},children:ta()(E)?(0,qt.jsx)(lS,{}):(0,qt.jsx)(Cf,{variant:"body1",fontWeight:"h6.fontWeight",component:"p",children:null!==E&&void 0!==E&&null!==(A=E.profile)&&void 0!==A&&A.adr_zipcode?null===E||void 0===E||null===(k=E.profile)||void 0===k?void 0:k.adr_zipcode:"NA"})})]})})]})})]})})})})]})};const Bwe=function(e){let{initialState:t,formData:n,handleEditMode:r,updatePatientDetails:o,countries:a,fetchStates:s,states:l}=e;const{t:c}=Vg(),[d,u]=We.useState(null),p=window.innerWidth;return(0,qt.jsx)(op,{sx:{width:"100%"},children:(0,qt.jsx)(Kz,{initialValues:hs(t,n),validationSchema:RU.personalDetail,onSubmit:d?()=>{}:o,enableReinitialize:!0,children:e=>{let{values:t,setFieldValue:n,handleSubmit:o,setFieldTouched:d}=e;return(0,qt.jsxs)(qt.Fragment,{children:[(0,qt.jsx)(op,{sx:{width:"100%"},position:"relative",children:(0,qt.jsx)(Ff,{container:!0,children:(0,qt.jsx)(Ff,{item:!0,xs:12,md:6,children:(0,qt.jsx)(op,{children:(0,qt.jsx)(op,{sx:{display:{xs:"block",sm:"none"}},position:"absolute",top:"-48px",bottom:"0",left:"40px",children:(0,qt.jsx)(Cf,{variant:"h6",component:"h6",className:"headingInMobile",children:c("rpm_PatientInfo")})})})})})}),(0,qt.jsx)(yH,{sx:{bgcolor:"transparent",boxShadow:"none"},position:"relative",children:(0,qt.jsxs)(wH,{sx:{bgcolor:"white",border:"1px solid #e5e5e5"},children:[(0,qt.jsx)(nH,{children:(0,qt.jsxs)(Ff,{container:!0,spacing:3,children:[(0,qt.jsx)(Ff,{item:!0,xs:12,md:!0,children:(0,qt.jsxs)(Ff,{container:!0,spacing:3,children:[(0,qt.jsx)(Ff,{item:!0,xs:12,md:6,lg:6,children:(0,qt.jsxs)(pE,{flexDirection:"column",children:[(0,qt.jsxs)(Cf,{variant:"body2",component:"p",color:"primary",fontWeight:"h6.fontWeight",sx:{flex:.4},pb:1,children:[c("rpm_FirstName"),(0,qt.jsx)(op,{component:"span",children:"*"})]}),(0,qt.jsxs)(op,{sx:{flex:.6},children:[(0,qt.jsx)(tH,{as:qj,fullWidth:!0,size:"small",id:"first_name",name:"first_name",variant:"outlined",endAdornment:(0,qt.jsx)(tw,{position:"end",children:(0,qt.jsx)(sy,{title:c("message:rpm_FirstNameHelp"),placement:"top",children:(0,qt.jsx)(wh,{size:"small",disableRipple:!0,sx:{p:0},children:(0,qt.jsx)(pM.A,{fontSize:"small"})})})})}),(0,qt.jsx)(dH,{name:"first_name",children:e=>(0,qt.jsx)(v_,{error:!0,children:c(e,{field:c("rpm_FirstName")})})})]})]})}),(0,qt.jsx)(Ff,{item:!0,xs:12,md:6,lg:6,children:(0,qt.jsxs)(pE,{flexDirection:"column",children:[(0,qt.jsxs)(Cf,{variant:"body2",component:"p",color:"primary",fontWeight:"h6.fontWeight",sx:{flex:.4},pb:1,children:[c("rpm_LastName"),(0,qt.jsx)(op,{component:"span",children:"*"})]}),(0,qt.jsxs)(op,{sx:{flex:.6},children:[(0,qt.jsx)(tH,{as:qj,fullWidth:!0,size:"small",id:"last_name",name:"last_name",variant:"outlined",endAdornment:(0,qt.jsx)(tw,{position:"end",children:(0,qt.jsx)(sy,{title:c("message:rpm_LastNameHelp"),placement:"top",children:(0,qt.jsx)(wh,{size:"small",disableRipple:!0,sx:{p:0},children:(0,qt.jsx)(pM.A,{fontSize:"small"})})})})}),(0,qt.jsx)(dH,{name:"last_name",children:e=>(0,qt.jsx)(v_,{error:!0,children:c(e,{field:c("rpm_LastName")})})})]})]})}),(0,qt.jsx)(Ff,{item:!0,xs:12,md:6,lg:6,children:(0,qt.jsxs)(pE,{flexDirection:"column",children:[(0,qt.jsx)(Cf,{variant:"body2",component:"p",color:"primary",fontWeight:"h6.fontWeight",sx:{flex:.4},pb:1,children:c("rpm_DOB")}),(0,qt.jsxs)(op,{sx:{flex:.6},children:[(0,qt.jsx)(op,{sx:{"& .MuiOutlinedInput-input":{py:1.0625}},children:(0,qt.jsx)(WM,{dateAdapter:DI,children:(0,qt.jsx)(tH,{as:fD,size:"small",id:"birth_date",name:"birth_date",value:t.birth_date||null,renderInput:e=>(0,qt.jsx)(Q_,(0,i.A)({fullWidth:!0},e)),maxDate:new Date,inputFormat:"dd/MM/yyyy",defaultCalendarMonth:gs(18,11,31),onError:e=>u(e),onChange:e=>{var t;n("age",null===(t=Ns(e))||void 0===t?void 0:t.toString()),n("birth_date",e),d("age",!0)}})})}),(0,qt.jsx)(dH,{name:"birth_date",children:e=>(0,qt.jsx)(v_,{error:!0,children:c(e,{field:c("rpm_DOB")})})})]})]})}),(0,qt.jsx)(Ff,{item:!0,xs:12,md:6,lg:6,children:(0,qt.jsxs)(pE,{flexDirection:"column",children:[(0,qt.jsxs)(Cf,{variant:"body2",component:"p",color:"primary",fontWeight:"h6.fontWeight",sx:{flex:.4},pb:1,children:[c("rpm_Age"),(0,qt.jsx)(op,{component:"span",children:"*"})]}),(0,qt.jsxs)(op,{sx:{flex:.6},children:[(0,qt.jsx)(tH,{as:qj,fullWidth:!0,size:"small",id:"age",name:"age",variant:"outlined",onChange:async e=>{await n("age",e.target.value),e.target.value>0?(n("birth_date",sa()().month(sa()(t.birth_date).get("months")).date(sa()(t.birth_date).get("date")).subtract(e.target.value,"years").valueOf()),await d("birth_date",!0)):await n("birth_date",sa()().valueOf())},endAdornment:(0,qt.jsx)(tw,{position:"end",children:(0,qt.jsx)(sy,{title:c("message:rpm_FirstNameHelp"),placement:"top",children:(0,qt.jsx)(wh,{size:"small",disableRipple:!0,sx:{p:0},children:(0,qt.jsx)(pM.A,{fontSize:"small"})})})})}),(0,qt.jsx)(dH,{name:"age",children:e=>(0,qt.jsx)(v_,{error:!0,children:c(e,{field:c("rpm_Age")})})})]})]})}),(0,qt.jsx)(Ff,{item:!0,xs:12,md:6,lg:6,children:(0,qt.jsxs)(pE,{flexDirection:"column",children:[(0,qt.jsx)(Cf,{variant:"body2",component:"p",color:"primary",fontWeight:"h6.fontWeight",sx:{flex:.4},pb:1,children:c("rpm_Gender")}),(0,qt.jsxs)(op,{sx:{flex:.6},children:[(0,qt.jsxs)(tH,{as:G_,fullWidth:!0,size:"small",id:"gender",name:"gender",variant:"outlined",endAdornment:(0,qt.jsx)(tw,{position:"end",sx:{position:"absolute",right:"28px"},children:(0,qt.jsx)(sy,{title:c("message:rpm_GenderHelp"),placement:"top",children:(0,qt.jsx)(wh,{size:"small",disableRipple:!0,sx:{p:0},children:(0,qt.jsx)(pM.A,{fontSize:"small"})})})}),children:[(0,qt.jsx)(mf,{value:"Male",children:"Male"}),(0,qt.jsx)(mf,{value:"Female",children:"Female"}),(0,qt.jsx)(mf,{value:"Other",children:"Other"})]}),(0,qt.jsx)(dH,{name:"state",children:e=>(0,qt.jsx)(v_,{error:!0,children:c(e,{field:c("rpm_Gender")})})})]})]})}),(0,qt.jsx)(Ff,{item:!0,xs:12,md:6,lg:6,children:(0,qt.jsxs)(pE,{flexDirection:"column",children:[(0,qt.jsx)(Cf,{variant:"body2",component:"p",color:"primary",fontWeight:"h6.fontWeight",sx:{flex:.4},pb:1,children:c("rpm_Email")}),(0,qt.jsxs)(op,{sx:{flex:.6},children:[(0,qt.jsx)(tH,{as:qj,fullWidth:!0,size:"small",id:"email",name:"email",variant:"outlined",disabled:!0,endAdornment:(0,qt.jsx)(tw,{position:"end",children:(0,qt.jsx)(sy,{title:c("message:rpm_EmailHelp"),placement:"top",children:(0,qt.jsx)(wh,{size:"small",disableRipple:!0,sx:{p:0},children:(0,qt.jsx)(pM.A,{fontSize:"small"})})})})}),(0,qt.jsx)(dH,{name:"email",children:e=>(0,qt.jsx)(v_,{error:!0,children:c(e,{field:c("rpm_Email")})})})]})]})}),(0,qt.jsx)(Ff,{item:!0,xs:12,md:6,lg:6,children:(0,qt.jsxs)(pE,{flexDirection:"column",children:[(0,qt.jsx)(Cf,{variant:"body2",component:"p",color:"primary",fontWeight:"h6.fontWeight",sx:{flex:.4},pb:1,children:c("rpm_Mobile")}),(0,qt.jsxs)(op,{sx:{flex:.6},children:[(0,qt.jsx)(tH,{as:qj,fullWidth:!0,size:"small",id:"mobile",name:"mobile",variant:"outlined",endAdornment:(0,qt.jsx)(tw,{position:"end",children:(0,qt.jsx)(sy,{title:c("message:rpm_MobileHelp"),placement:"top",children:(0,qt.jsx)(wh,{size:"small",disableRipple:!0,sx:{p:0},children:(0,qt.jsx)(pM.A,{fontSize:"small"})})})})}),(0,qt.jsx)(dH,{name:"mobile",children:e=>(0,qt.jsx)(v_,{error:!0,children:c(e,{field:c("rpm_Mobile")})})})]})]})}),(0,qt.jsx)(Ff,{item:!0,xs:12,md:6,lg:6,children:(0,qt.jsxs)(pE,{flexDirection:"column",children:[(0,qt.jsx)(Cf,{variant:"body2",component:"p",color:"primary",fontWeight:"h6.fontWeight",sx:{flex:.4},pb:1,children:c("rpm_MaritalStatus")}),(0,qt.jsxs)(op,{sx:{flex:.6},children:[(0,qt.jsxs)(tH,{as:G_,fullWidth:!0,size:"small",id:"marital_status",name:"marital_status",variant:"outlined",endAdornment:(0,qt.jsx)(tw,{position:"end",sx:{position:"absolute",right:"28px"},children:(0,qt.jsx)(sy,{title:c("message:rpm_MaritalStatusHelp"),placement:"top",children:(0,qt.jsx)(wh,{size:"small",disableRipple:!0,sx:{p:0},children:(0,qt.jsx)(pM.A,{fontSize:"small"})})})}),children:[(0,qt.jsx)(mf,{value:"Married",children:"Married"}),(0,qt.jsx)(mf,{value:"Single",children:"Single"}),(0,qt.jsx)(mf,{value:"Other",children:"Other"})]}),(0,qt.jsx)(dH,{name:"state",children:e=>(0,qt.jsx)(v_,{error:!0,children:c(e,{field:c("rpm_MaritalStatus")})})})]})]})}),(0,qt.jsx)(Ff,{item:!0,xs:12,md:6,lg:6,children:(0,qt.jsxs)(pE,{flexDirection:"column",children:[(0,qt.jsx)(Cf,{variant:"body2",component:"p",color:"primary",fontWeight:"h6.fontWeight",sx:{flex:.4},pb:1,children:c("rpm_Parent")}),(0,qt.jsxs)(op,{sx:{flex:.6},children:[(0,qt.jsx)(tH,{as:qj,fullWidth:!0,size:"small",id:"parent",name:"parent",variant:"outlined",endAdornment:(0,qt.jsx)(tw,{position:"end",children:(0,qt.jsx)(sy,{title:c("message:rpm_ParentHelp"),placement:"top",children:(0,qt.jsx)(wh,{size:"small",disableRipple:!0,sx:{p:0},children:(0,qt.jsx)(pM.A,{fontSize:"small"})})})})}),(0,qt.jsx)(dH,{name:"parent",children:e=>(0,qt.jsx)(v_,{error:!0,children:c(e,{field:c("rpm_Parent")})})})]})]})}),(0,qt.jsx)(Ff,{item:!0,xs:12,md:6,lg:6,children:(0,qt.jsxs)(pE,{flexDirection:"column",children:[(0,qt.jsx)(Cf,{variant:"body2",component:"p",color:"primary",fontWeight:"h6.fontWeight",sx:{flex:.4},pb:1,children:c("rpm_BloodGroup")}),(0,qt.jsxs)(op,{sx:{flex:.6},children:[(0,qt.jsxs)(tH,{as:G_,fullWidth:!0,size:"small",id:"blood_group",name:"blood_group",variant:"outlined",endAdornment:(0,qt.jsx)(tw,{position:"end",sx:{position:"absolute",right:"28px"},children:(0,qt.jsx)(sy,{title:c("message:rpm_BloodGroupHelp"),placement:"top",children:(0,qt.jsx)(wh,{size:"small",disableRipple:!0,sx:{p:0},children:(0,qt.jsx)(pM.A,{fontSize:"small"})})})}),children:[(0,qt.jsx)(mf,{value:"Select",disabled:!0,sx:{display:"none"},children:"Select"}),wd.map(e=>(0,qt.jsx)(mf,{value:e.value,children:e.label},e.id))]}),(0,qt.jsx)(dH,{name:"blood_group",children:e=>(0,qt.jsx)(v_,{error:!0,children:c(e,{field:c("rpm_BloodGroup")})})})]})]})}),(0,qt.jsx)(Ff,{item:!0,xs:12,md:6,lg:6,children:(0,qt.jsxs)(pE,{flexDirection:"column",children:[(0,qt.jsx)(Cf,{variant:"body2",component:"p",color:"primary",fontWeight:"h6.fontWeight",sx:{flex:.4},pb:1,children:c("rpm_Height")}),(0,qt.jsxs)(op,{sx:{flex:.6},children:[(0,qt.jsxs)(op,{display:"flex",children:[(0,qt.jsx)(tH,{as:G_,fullWidth:!0,size:"small",id:"height_feet",name:"height_feet",variant:"outlined",endAdornment:(0,qt.jsx)(tw,{position:"end",sx:{position:"absolute",right:"28px"},children:(0,qt.jsx)(sy,{title:c("message:rpm_HeightFeetHelp"),placement:"top",children:(0,qt.jsx)(wh,{size:"small",disableRipple:!0,sx:{p:0},children:(0,qt.jsx)(pM.A,{fontSize:"small"})})})}),children:[...Array(10).keys()].map(e=>e+1).map(e=>(0,qt.jsx)(mf,{value:e,children:e},e))}),(0,qt.jsx)(op,{p:.5}),(0,qt.jsx)(tH,{as:G_,fullWidth:!0,size:"small",id:"height_inches",name:"height_inches",variant:"outlined",endAdornment:(0,qt.jsx)(tw,{position:"end",sx:{position:"absolute",right:"28px"},children:(0,qt.jsx)(sy,{title:c("message:rpm_HeightInchesHelp"),placement:"top",children:(0,qt.jsx)(wh,{size:"small",disableRipple:!0,sx:{p:0},children:(0,qt.jsx)(pM.A,{fontSize:"small"})})})}),children:[...Array(12).keys()].map(e=>e).map(e=>(0,qt.jsx)(mf,{value:e,children:e},e))})]}),(0,qt.jsx)(dH,{name:"height_inches",children:e=>(0,qt.jsx)(v_,{error:!0,children:c(e,{field:c("rpm_Height")})})})]})]})}),(0,qt.jsx)(Ff,{item:!0,xs:12,md:6,lg:6,children:(0,qt.jsxs)(pE,{flexDirection:"column",children:[(0,qt.jsx)(Cf,{variant:"body2",component:"p",color:"primary",fontWeight:"h6.fontWeight",sx:{flex:.4},pb:1,children:c("rpm_Weight")}),(0,qt.jsxs)(op,{sx:{flex:.6},children:[(0,qt.jsx)(tH,{as:qj,fullWidth:!0,size:"small",id:"weight",name:"weight",variant:"outlined",endAdornment:(0,qt.jsx)(tw,{position:"end",children:(0,qt.jsx)(sy,{title:c("message:rpm_WeightHelp"),placement:"top",children:(0,qt.jsx)(wh,{size:"small",disableRipple:!0,sx:{p:0},children:(0,qt.jsx)(pM.A,{fontSize:"small"})})})})}),(0,qt.jsx)(dH,{name:"weight",children:e=>(0,qt.jsx)(v_,{error:!0,children:c(e,{field:c("rpm_Weight")})})})]})]})})]})}),(0,qt.jsx)(Ff,{item:!0,xs:p<900&&12,children:(0,qt.jsx)(eg,{orientation:p<900?"horizontal":"vertical",variant:"middle"})}),(0,qt.jsx)(Ff,{item:!0,xs:12,md:!0,children:(0,qt.jsxs)(Ff,{container:!0,spacing:3,children:[(0,qt.jsx)(Ff,{item:!0,xs:12,md:12,lg:12,children:(0,qt.jsxs)(pE,{flexDirection:"column",children:[(0,qt.jsx)(Cf,{variant:"body2",component:"p",color:"primary",fontWeight:"h6.fontWeight",sx:{flex:.4},pb:1,children:c("rpm_Address1")}),(0,qt.jsxs)(op,{sx:{flex:.6},children:[(0,qt.jsx)(tH,{as:qj,fullWidth:!0,size:"small",id:"adr_address1",name:"adr_address1",variant:"outlined",multiline:!0,rows:3,endAdornment:(0,qt.jsx)(tw,{position:"end",children:(0,qt.jsx)(sy,{title:c("message:rpm_Address1Help"),placement:"top",children:(0,qt.jsx)(wh,{size:"small",disableRipple:!0,sx:{p:0},children:(0,qt.jsx)(pM.A,{fontSize:"small"})})})})}),(0,qt.jsx)(dH,{name:"adr_address1",children:e=>(0,qt.jsx)(v_,{error:!0,children:c(e,{field:c("rpm_Address1")})})})]})]})}),(0,qt.jsx)(Ff,{item:!0,xs:12,md:12,lg:12,children:(0,qt.jsxs)(pE,{flexDirection:"column",children:[(0,qt.jsx)(Cf,{variant:"body2",component:"p",color:"primary",fontWeight:"h6.fontWeight",sx:{flex:.4},pb:1,children:c("rpm_Address2")}),(0,qt.jsxs)(op,{sx:{flex:.6},children:[(0,qt.jsx)(tH,{as:qj,fullWidth:!0,size:"small",id:"adr_address2",name:"adr_address2",variant:"outlined",multiline:!0,rows:3,endAdornment:(0,qt.jsx)(tw,{position:"end",children:(0,qt.jsx)(sy,{title:c("message:rpm_Address1Help"),placement:"top",children:(0,qt.jsx)(wh,{size:"small",disableRipple:!0,sx:{p:0},children:(0,qt.jsx)(pM.A,{fontSize:"small"})})})})}),(0,qt.jsx)(dH,{name:"adr_address2",children:e=>(0,qt.jsx)(v_,{error:!0,children:c(e,{field:c("rpm_Address2")})})})]})]})}),(0,qt.jsx)(Ff,{item:!0,xs:12,md:6,lg:6,children:(0,qt.jsxs)(pE,{flexDirection:"column",children:[(0,qt.jsx)(Cf,{variant:"body2",component:"p",color:"primary",fontWeight:"h6.fontWeight",sx:{flex:.4},pb:1,children:c("rpm_Country")}),(0,qt.jsxs)(op,{sx:{flex:.6},children:[(0,qt.jsxs)(op,{className:"autocomplete",sx:{position:"relative"},children:[(0,qt.jsx)(tH,{component:KK,size:"small",id:"country",optionId:"isoCode",name:"adr_country_name",options:a,browserAutocomplete:!1,valueKey:"isoCode",nameKey:"name",onValueChange:(e,t)=>{n("adr_state_name",""),s(t)},variant:"outlined",margin:"normal",fullWidth:!0}),(0,qt.jsx)(sy,{title:c("message:rpm_ProgramCountryHelp"),placement:"top",children:(0,qt.jsx)(wh,{size:"small",sx:{position:"absolute",right:"0.675rem",top:"0.25rem"},children:(0,qt.jsx)(pM.A,{fontSize:"small"})})})]}),(0,qt.jsx)(dH,{name:"country",children:e=>(0,qt.jsx)(v_,{error:!0,children:c(e,{field:c("rpm_ProgramCountry")})})})]})]})}),(0,qt.jsx)(Ff,{item:!0,xs:12,md:6,lg:6,children:(0,qt.jsxs)(pE,{flexDirection:"column",children:[(0,qt.jsx)(Cf,{variant:"body2",component:"p",color:"primary",fontWeight:"h6.fontWeight",sx:{flex:.4},pb:1,children:c("rpm_State")}),(0,qt.jsxs)(op,{sx:{flex:.6},children:[(0,qt.jsxs)(op,{className:"autocomplete",sx:{position:"relative"},children:[(0,qt.jsx)(tH,{component:KK,size:"small",id:"state",optionId:"isoCode",name:"adr_state_name",options:l,browserAutocomplete:!1,valueKey:"isoCode",nameKey:"name",dependent:!0,variant:"outlined",margin:"normal",fullWidth:!0}),(0,qt.jsx)(sy,{title:c("message:rpm_ProgramStateHelp"),placement:"top",children:(0,qt.jsx)(wh,{size:"small",sx:{position:"absolute",right:"0.675rem",top:"0.25rem"},children:(0,qt.jsx)(pM.A,{fontSize:"small"})})})]}),(0,qt.jsx)(dH,{name:"state",children:e=>(0,qt.jsx)(v_,{error:!0,children:c(e,{field:c("rpm_ProgramState")})})})]})]})}),(0,qt.jsx)(Ff,{item:!0,xs:12,md:6,lg:6,children:(0,qt.jsxs)(pE,{flexDirection:"column",children:[(0,qt.jsx)(Cf,{variant:"body2",component:"p",color:"primary",fontWeight:"h6.fontWeight",sx:{flex:.4},pb:1,children:c("rpm_City")}),(0,qt.jsxs)(op,{sx:{flex:.6},children:[(0,qt.jsx)(tH,{as:qj,fullWidth:!0,size:"small",id:"adr_city",name:"adr_city",variant:"outlined",endAdornment:(0,qt.jsx)(tw,{position:"end",children:(0,qt.jsx)(sy,{title:c("message:rpm_CityHelp"),placement:"top",children:(0,qt.jsx)(wh,{size:"small",disableRipple:!0,sx:{p:0},children:(0,qt.jsx)(pM.A,{fontSize:"small"})})})})}),(0,qt.jsx)(dH,{name:"adr_city",children:e=>(0,qt.jsx)(v_,{error:!0,children:c(e,{field:c("rpm_City")})})})]})]})}),(0,qt.jsx)(Ff,{item:!0,xs:12,md:6,lg:6,children:(0,qt.jsxs)(pE,{flexDirection:"column",children:[(0,qt.jsx)(Cf,{variant:"body2",component:"p",color:"primary",fontWeight:"h6.fontWeight",sx:{flex:.4},pb:1,children:c("rpm_Pin")}),(0,qt.jsxs)(op,{sx:{flex:.6},children:[(0,qt.jsx)(tH,{as:qj,fullWidth:!0,size:"small",id:"adr_zipcode",name:"adr_zipcode",variant:"outlined",endAdornment:(0,qt.jsx)(tw,{position:"end",children:(0,qt.jsx)(sy,{title:c("message:rpm_ZipCodeHelp"),placement:"top",children:(0,qt.jsx)(wh,{size:"small",disableRipple:!0,sx:{p:0},children:(0,qt.jsx)(pM.A,{fontSize:"small"})})})})}),(0,qt.jsx)(dH,{name:"adr_zipcode",children:e=>(0,qt.jsx)(v_,{error:!0,children:c(e,{field:c("rpm_State")})})})]})]})})]})})]})}),(0,qt.jsxs)(op,{mt:2,children:[(0,qt.jsx)(xh,{variant:"contained",color:"primary",disableElevation:!0,onClick:o,sx:{marginRight:"5px"},children:c("rpm_Update")}),(0,qt.jsx)(xh,{variant:"outlined",color:"primary",onClick:r,children:c("rpm_Cancel")})]})]})})]})}},"patient_formik")})};const zwe=function(e){let{userData:t,initialState:n,formData:r,patientData:i,isEditMode:o,handleEditMode:a,updatePatientDetails:s,program:l,countries:c,fetchStates:d,states:u}=e;const p=window.innerWidth,{t:h}=Vg(),m=Nt(),f=Ns(null===i||void 0===i?void 0:i.birth_date),g=[{name:h("rpm_RPM"),url:ld.DOCTOR.PROGRAM},{name:null===l||void 0===l?void 0:l.display_name,url:"".concat(ld.DOCTOR.PROGRAM,"/").concat(null===l||void 0===l?void 0:l.code,"/patients")},{name:"".concat((null===i||void 0===i?void 0:i.first_name)||""," ").concat((null===i||void 0===i?void 0:i.last_name)||""),url:"".concat(ld.DOCTOR.PROGRAM,"/").concat(null===l||void 0===l?void 0:l.code,"/patients/").concat(null===i||void 0===i?void 0:i.id,"/dashboard")},{name:h("rpm_personalDetails"),url:""}];return We.useEffect(()=>{const e={breadcrumb:g};cs(l)||cs(i)||m(NC(e))},[l,i]),(0,qt.jsx)(op,{sx:{width:"100%"},children:(0,qt.jsx)(Ff,{container:!0,spacing:2,children:(0,qt.jsx)(Ff,{item:!0,xs:12,md:12,lg:12,children:o?(0,qt.jsx)(qt.Fragment,{children:p>=575?(0,qt.jsx)(Fwe,{initialState:n,formData:r,handleEditMode:a,updatePatientDetails:s,patientData:i,program:l,countries:c,fetchStates:d,states:u}):(0,qt.jsx)(Bwe,{initialState:n,formData:r,handleEditMode:a,updatePatientDetails:s,patientData:i,program:l,countries:c,fetchStates:d,states:u})}):(0,qt.jsx)($we,{userData:t,years:f,patientData:i,handleEditMode:a,program:l,countries:c,states:u})})})})},Hwe={first_name:"",last_name:"",email:"",mobile:"",gender:"",birth_date:"",age:"",parent:"",marital_status:"",adr_address1:"",adr_address2:"",adr_country_name:"",adr_state_name:"",adr_city:"",adr_zipcode:"",blood_group:"",height_feet:"",height_inches:"",weight:"",profileImage:"",sound:"",language:"",country_code:""};const Wwe=function(e){var t,n,r,o,a,s,l,c,d,u,p,h,m,f,g,v,x,y,b,j,_,C,w,S,A,k,T,E,M,O,R,P,D;let{userData:N,patientData:L,fetchOnePatientDetail:I,program:F}=e;const $=wt(cu),{programId:B}=lo(),{t:z}=Vg(),H=Nt(),W=wt(bu),U=!("true"===us(W,"user_principal.attributes.skip_tour[0]","")),{enqueueSnackbar:V}=hi(),[G,q]=We.useState(!1),[Y,Z]=We.useState([]),[K,X]=We.useState([]),[Q,J]=We.useState(""),ee=()=>{q(!G)},te={first_name:null!==L&&void 0!==L&&L.first_name?null===L||void 0===L?void 0:L.first_name:"",last_name:null!==L&&void 0!==L&&L.last_name?null===L||void 0===L?void 0:L.last_name:"",email:null!==L&&void 0!==L&&L.email?null===L||void 0===L?void 0:L.email:"",mobile:null!==L&&void 0!==L&&L.mobile?null===(t=cJ(null===L||void 0===L?void 0:L.mobile))||void 0===t?void 0:t.nationalNumber:"",birth_date:null!==L&&void 0!==L&&L.birth_date?null===L||void 0===L?void 0:L.birth_date:null,age:Ns(null===L||void 0===L?void 0:L.birth_date),gender:null!==L&&void 0!==L&&null!==(n=L.profile)&&void 0!==n&&n.gender?null===L||void 0===L||null===(r=L.profile)||void 0===r?void 0:r.gender:"",marital_status:null!==L&&void 0!==L&&null!==(o=L.profile)&&void 0!==o&&o.marital_status?null===L||void 0===L||null===(a=L.profile)||void 0===a?void 0:a.marital_status:"",parent:null!==L&&void 0!==L&&null!==(s=L.profile)&&void 0!==s&&s.parent?null===L||void 0===L||null===(l=L.profile)||void 0===l?void 0:l.parent:"",adr_address1:null!==L&&void 0!==L&&null!==(c=L.profile)&&void 0!==c&&c.adr_address1?null===L||void 0===L||null===(d=L.profile)||void 0===d?void 0:d.adr_address1:"",adr_address2:null!==L&&void 0!==L&&null!==(u=L.profile)&&void 0!==u&&u.adr_address2?null===L||void 0===L||null===(p=L.profile)||void 0===p?void 0:p.adr_address2:"",adr_country_name:null!==L&&void 0!==L&&null!==(h=L.profile)&&void 0!==h&&h.adr_country_name?null===L||void 0===L||null===(m=L.profile)||void 0===m?void 0:m.adr_country_name:"",adr_state_name:null!==L&&void 0!==L&&null!==(f=L.profile)&&void 0!==f&&f.adr_state_name?null===L||void 0===L||null===(g=L.profile)||void 0===g?void 0:g.adr_state_name:"",adr_city:null!==L&&void 0!==L&&null!==(v=L.profile)&&void 0!==v&&v.adr_city?null===L||void 0===L||null===(x=L.profile)||void 0===x?void 0:x.adr_city:"",adr_zipcode:null!==L&&void 0!==L&&null!==(y=L.profile)&&void 0!==y&&y.adr_zipcode?null===L||void 0===L||null===(b=L.profile)||void 0===b?void 0:b.adr_zipcode:"",blood_group:null!==L&&void 0!==L&&null!==(j=L.profile)&&void 0!==j&&j.blood_group?null===L||void 0===L||null===(_=L.profile)||void 0===_?void 0:_.blood_group:"",height_feet:null!==L&&void 0!==L&&null!==(C=L.patient_health_profile)&&void 0!==C&&C.height?null===L||void 0===L||null===(w=L.patient_health_profile)||void 0===w||null===(S=w.height)||void 0===S?void 0:S.split(".")[0]:"",height_inches:null!==L&&void 0!==L&&null!==(A=L.patient_health_profile)&&void 0!==A&&A.height?null===L||void 0===L||null===(k=L.patient_health_profile)||void 0===k||null===(T=k.height)||void 0===T?void 0:T.split(".")[1]:"",weight:null!==L&&void 0!==L&&null!==(E=L.patient_health_profile)&&void 0!==E&&E.weight?null===L||void 0===L||null===(M=L.patient_health_profile)||void 0===M?void 0:M.weight:"",profileImage:null===L||void 0===L||null===(O=L.profile)||void 0===O?void 0:O.profileImage,sound:null===L||void 0===L||null===(R=L.profile)||void 0===R?void 0:R.sound,language:null===L||void 0===L||null===(P=L.profile)||void 0===P?void 0:P.language,country_code:null!==L&&void 0!==L&&L.mobile?"+".concat(null===(D=cJ(null===L||void 0===L?void 0:L.mobile))||void 0===D?void 0:D.countryCallingCode):""},ne=async function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{q:""};await H(pue(e,"RPM",e=>{let{countries:t}=e;Z(t.content)},()=>{}))},re=async function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{q:""};await H(hue(e,t,"RPM",e=>{let{states:t}=e;X(t.content)},()=>{}))};return We.useEffect(()=>{H(NC({activeMenuItem:"personal_detail"}))},[]),We.useEffect(()=>{$&&L&&(ne(),(null===te||void 0===te?void 0:te.adr_country_name)&&re(null===te||void 0===te?void 0:te.adr_country_name))},[$,L]),(0,qt.jsxs)(qt.Fragment,{children:[(0,qt.jsx)(zwe,{userData:N,initialState:Hwe,formData:te,patientData:L,isEditMode:G,handleEditMode:ee,updatePatientDetails:async e=>{const t={first_name:e.first_name,last_name:e.last_name,birth_date:e.birth_date,age:e.age,profile:{adr_address1:e.adr_address1,adr_country_name:e.adr_country_name,adr_address2:e.adr_address2,adr_state_name:e.adr_state_name,adr_city:e.adr_city,adr_zipcode:e.adr_zipcode,parent:e.parent,gender:e.gender,marital_status:e.marital_status,blood_group:e.blood_group,profileImage:e.profileImage,sound:e.sound,language:e.language},mobile:"".concat(e.country_code).concat(e.mobile),height:"".concat(e.height_feet,".").concat(e.height_inches),weight:e.weight};try{await H(((e,t,n)=>async r=>{r(na(!0));const o=(0,i.A)({},n);try{const n="".concat(ca.patients,"/").concat(e,"/").concat(t);return await $u(n,o)}finally{r(na(!1))}})(B,L.id,t)),V(z("message:rpm_PatientUpdateSuccessfully"),{variant:"success"}),ee(),I()}catch(n){V(n.message,{variant:"error"})}},program:F,fetchCountries:ne,countries:Y,fetchStates:re,states:K}),(0,qt.jsx)(zZ,{isTour:U,path:"personalDetailsTour",setRenderer:J}),(0,qt.jsx)("input",{type:"hidden",id:"rerenderer",value:Q})]})};var Uwe=n(51720),Vwe=n(12521);const Gwe=function(){const e=wt(uu);return(0,qt.jsx)(yp,{variant:"outlined",sx:{px:2.5,py:6,width:"100%",height:"100%",mx:"auto",bgcolor:"rgba(255,255,255,0.5)",position:"absolute",margin:"auto",top:0,bottom:0,left:0,right:0,zIndex:99,display:e?"flex":"none"},children:(0,qt.jsx)(op,{alignSelf:"center",sx:{mx:"auto"},children:(0,qt.jsx)(MM,{color:"primary"})})})};const qwe=function(e){var t,n,r,i,o,a,s,l,c,d,u,p,h,m,f,g,v,x,y,b,j,_,C,w,S,A;let{patientData:k,program:T,headCellsItems:E,glucoseReading:M,activeCourse:O,countries:R,states:P,selfDisease:D,familyDisease:N,alertPercent:L,patientMissedReading:I,filterDate:F}=e;const{t:$}=Vg(),B=so(),z=Nt(),[H,W]=We.useState([]),{years:U}=vs(null===k||void 0===k?void 0:k.birth_date),V=We.useRef(),G=(0,vwe.useReactToPrint)({content:()=>V.current,documentTitle:"".concat(null===T||void 0===T?void 0:T.code,"_").concat(null===k||void 0===k?void 0:k.first_name,"_report_").concat(null!==O&&void 0!==O&&null!==(t=O.schedule)&&void 0!==t&&t.vital_name?null===O||void 0===O||null===(n=O.schedule)||void 0===n?void 0:n.vital_name:"NA")}),q=(null===T||void 0===T?void 0:T.image)instanceof File?URL.createObjectURL(null===T||void 0===T?void 0:T.image):null===T||void 0===T?void 0:T.image,Y=(e,t,n)=>{const r=sa()(t).format("YYYY"),i=sa()(n).format("YYYY");return"CUSTOM"===e?"".concat(r," - ").concat(i):"PRESENT"===e?"".concat(r," - ").concat(e):void 0},Z=[{value:"Diabetes",color:null===Qde||void 0===Qde||null===(r=Qde.palette)||void 0===r?void 0:r.red[300],darkColor:null===Qde||void 0===Qde||null===(i=Qde.palette)||void 0===i?void 0:i.red[900]},{value:"Prediabetes",color:null===Qde||void 0===Qde||null===(o=Qde.palette)||void 0===o?void 0:o.orange[300],darkColor:null===Qde||void 0===Qde||null===(a=Qde.palette)||void 0===a?void 0:a.orange[900]},{value:"Normal",color:null===Qde||void 0===Qde||null===(s=Qde.palette)||void 0===s?void 0:s.green[300],darkColor:null===Qde||void 0===Qde||null===(l=Qde.palette)||void 0===l?void 0:l.green[500]},{value:"Hypoglycemia",color:null===Qde||void 0===Qde||null===(c=Qde.palette)||void 0===c?void 0:c.red[200],darkColor:null===Qde||void 0===Qde||null===(d=Qde.palette)||void 0===d?void 0:d.red[500]}],K=e=>{let{legend:t}=e;return t.length>0&&(0,qt.jsx)(op,{textAlign:"left",children:(0,qt.jsx)(op,{component:"ul",p:0,m:0,display:"flex",flexWrap:"wrap",children:null===Z||void 0===Z?void 0:Z.map((e,t)=>(0,qt.jsxs)(Cf,{component:"li",fontSize:12,alignItems:"center",sx:{listStyle:"none",display:"flex",alignItems:"center",mr:1.5},children:[(0,qt.jsx)(kbe.A,{sx:{width:8,color:e.color}}),(0,qt.jsx)(op,{component:"span",ml:1,color:e.darkColor,children:e.value})]},t))})})};return We.useEffect(()=>{cs(M)||W(Qd(M))},[M]),(0,qt.jsxs)(qt.Fragment,{children:[(0,qt.jsx)("style",{children:H.length>6&&"@page {size: auto; margin: 8mm 2mm 8mm 2mm; }"}),(0,qt.jsx)(Gwe,{}),(0,qt.jsxs)(op,{sx:{maxWidth:700,mx:"auto"},children:[(0,qt.jsx)(op,{px:2,children:(0,qt.jsxs)(Ff,{container:!0,spacing:2,justifyContent:"center",children:[(0,qt.jsx)(Ff,{item:!0,children:(0,qt.jsx)(xh,{variant:"outlined",disableRipple:!0,onClick:()=>B(-1),children:$("rpm_Cancel")})}),(0,qt.jsx)(Ff,{item:!0,children:(0,qt.jsx)(xh,{variant:"contained",color:"primary",disableElevation:!0,onClick:G,children:$("rpm_Print")})}),(0,qt.jsx)(Ff,{item:!0,children:"course"==(null===F||void 0===F?void 0:F.report)?(0,qt.jsx)(xh,{variant:"contained",color:"primary",disableElevation:!0,onClick:()=>{var e;return Zd(z,null===k||void 0===k?void 0:k.id,null===O||void 0===O?void 0:O.id,"glucose",null===F||void 0===F?void 0:F.start_date,null===F||void 0===F?void 0:F.end_date,null===T||void 0===T?void 0:T.code,null===O||void 0===O||null===(e=O.schedule)||void 0===e?void 0:e.id)},children:$("rpm_Download")}):(0,qt.jsx)(xh,{variant:"contained",color:"primary",disableElevation:!0,onClick:()=>Zd(z,null===k||void 0===k?void 0:k.id,null===O||void 0===O?void 0:O.id,"glucose",null===F||void 0===F?void 0:F.start_date,null===F||void 0===F?void 0:F.end_date,"",""),children:$("rpm_Download")})})]})}),(0,qt.jsx)(Vw,{ref:V,sx:{p:2},children:(0,qt.jsx)(Bw,{size:"small",sx:{bgcolor:"white",border:"1px solid",borderColor:"grey.500"},children:(0,qt.jsxs)(fS,{sx:{"& tr td":{borderBottom:0,whiteSpace:"normal",py:.275}},children:[(0,qt.jsxs)(cw,{children:[(0,qt.jsx)(gw,{sx:{borderRight:"1px solid",borderColor:"grey.500"},children:(0,qt.jsxs)(op,{sx:{display:"flex",alignItems:"flex-start"},children:[cs(q)?(0,qt.jsx)(Uwe.A,{sx:{color:"primary.theme.500",fontSize:60}}):(0,qt.jsx)(op,{sx:{p:1,display:"flex",borderRadius:1,bgcolor:"primary.theme.50",flexGrow:.4,justifyContent:"center"},children:(0,qt.jsx)("img",{src:q,width:100,height:100})}),(0,qt.jsxs)(op,{sx:{flexGrow:.6,ml:2},children:[(0,qt.jsx)(Cf,{variant:"h6",component:"h6",fontWeight:500,children:cs(T)?(0,qt.jsx)(lS,{}):null!==T&&void 0!==T&&T.display_name?null===T||void 0===T?void 0:T.display_name:"NA"}),(0,qt.jsxs)(Cf,{variant:"body2",component:"p",sx:{mt:.5},children:[cs(T)?(0,qt.jsx)(lS,{width:50,sx:{display:"inline-block"}}):null!==T&&void 0!==T&&T.city?(null===T||void 0===T?void 0:T.city)+", ":"NA",cs(P)?(0,qt.jsx)(lS,{width:50,sx:{display:"inline-block",ml:1}}):null!==P&&void 0!==P&&P.name?null===P||void 0===P?void 0:P.name:"NA"]}),(0,qt.jsx)(Cf,{variant:"body2",component:"p",sx:{mt:.5},children:cs(R)?(0,qt.jsx)(lS,{width:50}):null!==R&&void 0!==R&&R.name?null===R||void 0===R?void 0:R.name:"NA"})]})]})}),(0,qt.jsxs)(gw,{width:"40%",children:[(0,qt.jsxs)(pE,{flexDirection:"row",mb:.25,children:[(0,qt.jsx)(Cf,{variant:"body2",fontWeight:"h6.fontWeight",sx:{flex:1},color:"primary",children:$("rpm_PatientName")}),(0,qt.jsx)(op,{children:cs(k)?(0,qt.jsx)(lS,{width:50}):(0,qt.jsx)(Cf,{variant:"body2",fontWeight:"h6.fontWeight",component:"p",children:(null===k||void 0===k?void 0:k.first_name)+" "+(null===k||void 0===k?void 0:k.last_name)})})]}),(0,qt.jsxs)(pE,{flexDirection:"row",mb:.25,children:[(0,qt.jsx)(Cf,{variant:"body2",fontWeight:"h6.fontWeight",sx:{flex:1},color:"primary",children:$("rpm_AgeGender")}),(0,qt.jsx)(op,{children:cs(k)?(0,qt.jsx)(lS,{width:50}):(0,qt.jsxs)(Cf,{variant:"body2",fontWeight:"h6.fontWeight",component:"p",children:[null!==k&&void 0!==k&&k.birth_date?"".concat(U,"yrs"):"NA",null!==k&&void 0!==k&&null!==(u=k.profile)&&void 0!==u&&u.gender?", ".concat(null===k||void 0===k||null===(p=k.profile)||void 0===p?void 0:p.gender):""]})})]}),(0,qt.jsxs)(pE,{flexDirection:"row",mb:.25,children:[(0,qt.jsx)(Cf,{variant:"body2",component:"p",fontWeight:"h6.fontWeight",sx:{flex:1},color:"primary",children:$("rpm_Mobile")}),(0,qt.jsx)(op,{children:cs(k)?(0,qt.jsx)(lS,{width:50}):(0,qt.jsx)(Cf,{variant:"body2",fontWeight:"h6.fontWeight",component:"p",children:null!==k&&void 0!==k&&k.mobile?null===k||void 0===k?void 0:k.mobile:"NA"})})]}),(0,qt.jsxs)(pE,{flexDirection:"row",mb:.25,children:[(0,qt.jsx)(Cf,{variant:"body2",component:"p",fontWeight:"h6.fontWeight",sx:{flex:1},color:"primary",children:$("rpm_VitalStats")}),(0,qt.jsx)(op,{children:cs(k)?(0,qt.jsx)(lS,{width:50}):(0,qt.jsxs)(Cf,{variant:"body2",fontWeight:"h6.fontWeight",component:"p",children:[null!==k&&void 0!==k&&null!==(h=k.patient_health_profile)&&void 0!==h&&null!==(m=h.height)&&void 0!==m&&m.split(".")[0]?(null===k||void 0===k||null===(f=k.patient_health_profile)||void 0===f||null===(g=f.height)||void 0===g?void 0:g.split(".")[0])+"''"+(null===k||void 0===k||null===(v=k.patient_health_profile)||void 0===v||null===(x=v.height)||void 0===x?void 0:x.split(".")[1])+" ft.":"NA"," "," / ",null!==k&&void 0!==k&&null!==(y=k.patient_health_profile)&&void 0!==y&&y.weight?(null===k||void 0===k||null===(b=k.patient_health_profile)||void 0===b?void 0:b.weight)+"kg":"NA"]})})]}),(0,qt.jsxs)(pE,{flexDirection:"row",mb:.25,children:[(0,qt.jsx)(Cf,{variant:"body2",component:"p",fontWeight:"h6.fontWeight",sx:{flex:1},color:"primary",children:$("rpm_BMI")}),(0,qt.jsx)(op,{children:cs(k)?(0,qt.jsx)(lS,{width:50}):(0,qt.jsx)(Cf,{variant:"body2",fontWeight:"h6.fontWeight",component:"p",children:null!==k&&void 0!==k&&null!==(j=k.patient_health_profile)&&void 0!==j&&j.weight?Ps(null===k||void 0===k||null===(_=k.patient_health_profile)||void 0===_?void 0:_.height,null===k||void 0===k||null===(C=k.patient_health_profile)||void 0===C?void 0:C.weight):"NA"})})]})]})]}),(0,qt.jsx)(cw,{sx:{borderTop:"1px solid",borderColor:"grey.500"},children:(0,qt.jsx)(gw,{colSpan:2,sx:{p:0},children:(0,qt.jsx)(Bw,{size:"small",children:(0,qt.jsx)(fS,{children:(0,qt.jsxs)(cw,{children:[(0,qt.jsxs)(gw,{width:"45%",sx:{borderRight:"1px solid",borderColor:"grey.500",verticalAlign:"top"},children:[(0,qt.jsx)(Cf,{variant:"body1",component:"h6",fontWeight:500,fontSize:14,sx:{position:"relative",mb:1,"&::after":{content:'""',position:"absolute",bottom:-5,left:0,height:"2px",width:"60px",bgcolor:"grey.700"}},children:$("rpm_MedicalHistory")}),(0,qt.jsxs)(op,{minHeight:92,children:[(0,qt.jsxs)(pE,{flexDirection:"row",mb:.5,children:[(0,qt.jsx)(Cf,{variant:"body2",fontWeight:"h6.fontWeight",sx:{flex:1},color:"primary",children:$("rpm_Condition")}),(0,qt.jsx)(Cf,{variant:"body2",fontWeight:"h6.fontWeight",sx:{flex:1},color:"primary",children:$("rpm_Duration")})]}),null===D||void 0===D||null===(w=D.slice(0,3))||void 0===w?void 0:w.map(e=>(0,qt.jsxs)(pE,{flexDirection:"row",mb:.5,children:[(0,qt.jsx)(Cf,{variant:"body2",fontWeight:"h6.fontWeight",sx:{flex:1},children:null===e||void 0===e?void 0:e.disease_name}),(0,qt.jsx)(op,{sx:{flex:1},children:(0,qt.jsx)(Cf,{variant:"body2",fontWeight:"h6.fontWeight",component:"p",children:e.custom_duration?e.custom_duration+" "+(null===e||void 0===e?void 0:e.duration_unit):Y(e.duration_unit,null===e||void 0===e?void 0:e.start_date,e.end_date)})})]},e.id))]})]}),(0,qt.jsxs)(gw,{sx:{verticalAlign:"top"},children:[(0,qt.jsx)(Cf,{variant:"body1",component:"h6",fontWeight:500,fontSize:14,sx:{position:"relative",mb:1,"&::after":{content:'""',position:"absolute",bottom:-5,left:0,height:"2px",width:"60px",bgcolor:"grey.700"}},children:$("rpm_FamilyMedicalHistory")}),(0,qt.jsxs)(op,{minHeight:92,children:[(0,qt.jsxs)(pE,{flexDirection:"row",mb:.5,children:[(0,qt.jsx)(Cf,{variant:"body2",fontWeight:"h6.fontWeight",sx:{flex:1},color:"primary",children:$("rpm_Relation")}),(0,qt.jsx)(Cf,{variant:"body2",fontWeight:"h6.fontWeight",sx:{flex:1},color:"primary",children:$("rpm_Condition")}),(0,qt.jsx)(Cf,{variant:"body2",fontWeight:"h6.fontWeight",sx:{flex:1},color:"primary",children:$("rpm_Duration")})]}),null===N||void 0===N||null===(S=N.slice(0,3))||void 0===S?void 0:S.map(e=>(0,qt.jsxs)(pE,{flexDirection:"row",mb:.5,children:[(0,qt.jsx)(Cf,{variant:"body2",fontWeight:"h6.fontWeight",sx:{flex:1},children:e.relationship}),(0,qt.jsx)(Cf,{variant:"body2",fontWeight:"h6.fontWeight",sx:{flex:1},children:e.disease_name?e.disease_name:"NA"}),(0,qt.jsx)(op,{sx:{flex:1},children:(0,qt.jsx)(Cf,{variant:"body2",fontWeight:"h6.fontWeight",component:"p",children:e.custom_duration?e.custom_duration+" "+(null===e||void 0===e?void 0:e.duration_unit):Y(e.duration_unit,null===e||void 0===e?void 0:e.start_date,e.end_date)})})]},e.id))]})]})]})})})})}),(0,qt.jsx)(cw,{sx:{borderTop:"1px solid",borderColor:"grey.500"},children:(0,qt.jsx)(gw,{colSpan:2,sx:{bgcolor:"primary.theme.300"},children:(0,qt.jsx)(Cf,{variant:"body1",component:"h6",fontWeight:500,textAlign:"center",color:"white",py:.75,children:"course"===(null===F||void 0===F?void 0:F.report)?"".concat($("rpm_COURSE")," : ").concat(cs(O)?"...":null===O||void 0===O||null===(A=O.schedule)||void 0===A?void 0:A.name,"                   \n                        (").concat(sa()(null===F||void 0===F?void 0:F.start_date).format("DD MMM YYYY")," to ").concat(sa()(null===F||void 0===F?void 0:F.end_date).format("DD MMM YYYY"),")"):"".concat($("rpm_Duration")," :                 \n                      (").concat(sa()(null===F||void 0===F?void 0:F.start_date).format("DD MMM YYYY")," to ").concat(sa()(null===F||void 0===F?void 0:F.end_date).format("DD MMM YYYY"),")")})})}),(0,qt.jsxs)(cw,{sx:{borderTop:"1px solid",borderColor:"grey.500"},colSpan:2,children:[(0,qt.jsx)(gw,{children:(0,qt.jsxs)(op,{display:"flex",justifyContent:"space-between",children:["course"===(null===F||void 0===F?void 0:F.report)&&(0,qt.jsxs)(op,{sx:{display:"flex",alignItems:"flex-start",mt:2,mr:1.5},children:[(0,qt.jsx)(op,{sx:{display:"flex",p:1,bgcolor:"orange.50",borderRadius:1},children:(0,qt.jsx)(Vwe.A,{sx:{color:"orange.500"}})}),(0,qt.jsxs)(op,{sx:{flexGrow:1,ml:2},children:[(0,qt.jsx)(Cf,{variant:"body2",component:"p",fontWeight:500,children:$("rpm_Status")}),(0,qt.jsx)(Cf,{variant:"h6",component:"h6",lineHeight:"1",children:cs(I)?"NA":(0,qt.jsx)(qt.Fragment,{children:"NON_COMPLIANT"==(null===I||void 0===I?void 0:I.status)?(0,qt.jsx)(op,{component:"span",sx:e=>({py:.25,px:1,color:e.palette.red[900],backgroundColor:e.palette.red[100],display:"inline-flex",fontSize:e.spacing(1.5),borderRadius:.5,fontWeight:600}),children:"NON-COMPLIANT"}):(0,qt.jsx)(op,{component:"span",sx:e=>({py:.25,px:1,color:e.palette.green[900],backgroundColor:e.palette.green[100],display:"inline-flex",fontSize:e.spacing(1.25),borderRadius:.5,fontWeight:600}),children:"COMPLIANT"})})})]})]}),(0,qt.jsxs)(op,{sx:{display:"flex",alignItems:"flex-start",mt:2},children:[(0,qt.jsx)(op,{sx:{display:"flex",p:1,bgcolor:"red.50",borderRadius:1},children:(0,qt.jsx)(Tbe.A,{sx:{color:"red.500"}})}),(0,qt.jsxs)(op,{sx:{flexGrow:1,ml:2},children:[(0,qt.jsx)(Cf,{variant:"body2",component:"p",fontWeight:500,children:$("rpm_ReadingAlerts")}),(0,qt.jsx)(Cf,{variant:"h6",component:"h6",lineHeight:"1",sx:{mt:.5},children:L?"".concat(L,"%"):"NA"})]})]})]})}),(0,qt.jsx)(gw,{children:(0,qt.jsx)(op,{sx:{display:"flex",alignItems:"flex-start",mt:2,mr:1.5},children:(0,qt.jsx)(K,{legend:Z})})})]}),(0,qt.jsx)(cw,{children:(0,qt.jsx)(gw,{colSpan:2,sx:{p:0},children:(0,qt.jsx)(Bw,{size:"small",sx:{maxWidth:"100%"},children:(0,qt.jsx)(fS,{children:(0,qt.jsx)(cw,{children:(0,qt.jsx)(gw,{sx:{fontSize:12,"& p":{fontSize:12}},children:cs(M)?(0,qt.jsx)(op,{height:"100%",children:(0,qt.jsx)("img",{src:GC,style:{display:"block",margin:"auto",maxWidth:"100%",maxHeight:180}})}):(0,qt.jsx)(lje,{glucoseData:M,gridWidth:4,chartWidth:200,chartHeight:125,stage:"AllStage"})})})})})})}),(0,qt.jsx)(cw,{sx:{borderTop:"1px solid",borderColor:"grey.500"},children:(0,qt.jsx)(gw,{colSpan:2,sx:{p:0},children:(0,qt.jsx)(Bw,{size:"small",sx:{maxWidth:"100%"},children:(0,qt.jsx)(fS,{children:(0,qt.jsxs)(cw,{children:[(0,qt.jsxs)(gw,{sx:{width:"50%",pr:0},children:[(0,qt.jsx)(Cf,{variant:"body1",component:"h6",fontWeight:500,fontSize:14,sx:{position:"relative",mb:2,"&::after":{content:'""',position:"absolute",bottom:-5,left:0,height:"2px",width:"60px",bgcolor:"grey.700"}},children:$("rpm_RecentReadings")}),M?(0,qt.jsx)(op,{sx:{"& .MuiTableContainer-root":{border:"none"},"& .MuiTableCell-root":{p:.25,fontSize:12,"& div":{py:.375,px:.75,lineHeight:1}},"& img":{maxHeight:200}},children:(0,qt.jsx)(UT,{data:M,headCells:E,noDataImage:GC,skeletonVrows:6,stickyHeader:!0,scrollHeight:500,className:"theme_scroll",children:null===M||void 0===M?void 0:M.slice(0,10).map(e=>{var t,n;return(0,qt.jsxs)(cw,{sx:{"&:last-child td, &:last-child th":{border:0}},children:[(0,qt.jsx)(gw,{children:e.ts}),(0,qt.jsx)(gw,{children:e.values.glucose?(0,qt.jsx)(qt.Fragment,{children:(null===e||void 0===e||null===(t=e.alerts)||void 0===t?void 0:t.length)>0?(0,qt.jsx)(op,{className:null===e||void 0===e||null===(n=e.alerts[0])||void 0===n?void 0:n.text,display:"inline-flex",width:30,justifyContent:"center",children:(0,qt.jsx)(op,{component:"span",children:e.values.glucose})}):(0,qt.jsx)(op,{className:"normal",display:"inline-flex",width:30,justifyContent:"center",children:(0,qt.jsx)(op,{component:"span",children:e.values.glucose})})}):"NA"}),(0,qt.jsx)(gw,{children:e.values.activity?e.values.activity:"NA"})]},e.id)})})}):(0,qt.jsx)(op,{height:"100%",children:(0,qt.jsx)("img",{src:GC,style:{display:"block",margin:"auto",maxWidth:"100%",maxHeight:180}})})]}),(0,qt.jsxs)(gw,{sx:{width:"50%",verticalAlign:"top"},children:[(0,qt.jsx)(Cf,{variant:"body1",component:"h6",fontWeight:500,fontSize:14,sx:{position:"relative",mb:2,"&::after":{content:'""',position:"absolute",bottom:-5,left:0,height:"2px",width:"60px",bgcolor:"grey.700"}},children:$("rpm_DoctorNotes")}),[1,2,3,4,5,6].map(e=>(0,qt.jsx)(op,{mb:.5,sx:{borderBottom:"1px solid #616161",height:30}},e)),(0,qt.jsx)(Cf,{variant:"body2",textAlign:"right",mt:2,fontWeight:500,sx:{fontStyle:"italic"},children:$("rpm_Signature")})]})]})})})})}),(0,qt.jsx)(cw,{sx:{borderTop:"1px solid",borderColor:"grey.500"},children:(0,qt.jsx)(gw,{colSpan:2,children:(0,qt.jsxs)(Ff,{container:!0,spacing:2,alignItems:"center",children:[(0,qt.jsx)(Ff,{item:!0,xs:!0,children:(0,qt.jsxs)(Cf,{variant:"body2",fontWeight:500,fontSize:10,sx:{fontStyle:"italic",color:"grey.600",textAlign:"justify"},children:[(0,qt.jsx)(op,{component:"span",fontWeight:600,children:"DISCLAIMER:"})," ","THIS WEBSITE DOES NOT PROVIDE MEDICAL ADVICE. The information, including but not limited to, text, graphics, images, and other material contained on this website is for informational purposes only. No material on this site is intended to be a substitute for a qualified medical professional. All analysis are subject to clinical interpretation by a qualified medical professional."]})}),(0,qt.jsx)(Ff,{item:!0,children:(0,qt.jsx)("img",{src:cv,height:30})})]})})})]})})})]})]})};const Ywe=function(e){let{patientData:t,program:n}=e;const r=$o.getPatientDefaultCourseGlucose("course_glucose"),i=$o.getFilterDate("filterDate"),o=Nt(),{t:a}=Vg(),[s,l]=We.useState(null),[c,d]=We.useState({}),[u,p]=We.useState({}),[h,m]=We.useState(null),[f,g]=We.useState(null),[v,x]=We.useState(null),[y,b]=We.useState(null);We.useEffect(()=>{if(!cs(t)&&!cs(n)){o(NC({activeMenuItem:"report"}))}},[t,n]),We.useEffect(()=>{cs(t)||cs(n)||cs(r)||((async()=>{const e={patient_id:null===t||void 0===t?void 0:t.id,disease:"glucose",duration:[null===i||void 0===i?void 0:i.start_date,null===i||void 0===i?void 0:i.end_date]};try{const{data:t}=await o(Ll(e));if(l(t),!cs(t)){const e=null===t||void 0===t?void 0:t.filter(e=>e.alerts),n=Math.round(100*e.length/t.length);x(n)}}catch(n){o(Zo({subTitle:n.message,severity:ud.ERROR}))}})(),(async e=>{await o(uue({perPage:"10000",countryCode:e.country},"RPM",t=>{var n,r;let{countries:i,states:o}=t;const a=null===i||void 0===i||null===(n=i.content)||void 0===n?void 0:n.find(t=>t.isoCode===e.country),s=null===o||void 0===o||null===(r=o.content)||void 0===r?void 0:r.find(t=>t.isoCode===e.state);d(a),p(s)},()=>{}))})(n),(async()=>{const e={kind:"SELF"};try{const{data:r}=await o(Al(null===n||void 0===n?void 0:n.id,null===t||void 0===t?void 0:t.id,e)),{content:i}=r||{};m(i)}catch(r){console.log(r)}})(),(async()=>{const e={kind:"FAMILY"};try{const{data:r}=await o(Al(null===n||void 0===n?void 0:n.id,null===t||void 0===t?void 0:t.id,e)),{content:i}=r||{};g(i)}catch(r){console.log(r)}})(),(async()=>{try{var e;const{data:n}=await o(ml(null===t||void 0===t?void 0:t.id,null===r||void 0===r||null===(e=r.schedule)||void 0===e?void 0:e.id,null===r||void 0===r?void 0:r.id));!cs(n)&&b(n)}catch(n){console.log("fetchPatientMissedReading="+n)}})())},[t,n]);const j=[{id:"time",label:a("rpm_Time"),isSort:!1,sortProperty:"time"},{id:"glucose",label:a("rpm_Glucose"),isSort:!1,sortProperty:"glucose"},{id:"event",label:a("rpm_Event"),isSort:!1,sortProperty:"event"}];return(0,qt.jsx)(qt.Fragment,{children:(0,qt.jsx)(qwe,{program:n,patientData:t,headCellsItems:j,glucoseReading:s,activeCourse:r,states:u,countries:c,selfDisease:h,familyDisease:f,alertPercent:v,patientMissedReading:y,filterDate:i})})};function Zwe(e){let{glucoseData:t,stage:n,height:r,width:i,report:o}=e;const{t:a}=Vg(),[s,l]=We.useState([]),[c,d]=We.useState([]),u=["diabetes","prediabetes","hypoglycemia","normal"],p=e=>{let t=[];return u.forEach(n=>{const r=e.filter(e=>{var t,r;return(null===e||void 0===e||null===(t=e.alerts)||void 0===t?void 0:t.length)&&(null===e||void 0===e||null===(r=e.alerts[0])||void 0===r?void 0:r.text)===n}),i=e.filter(e=>cs(null===e||void 0===e?void 0:e.alerts));r.length&&t.push({id:n,name:a("rpm_".concat(n)),value:r.length}),"normal"===n&&i.length&&t.push({id:n,name:a("rpm_".concat(n)),value:i.length})}),t},h=e=>{let t="";var n,r,i,o;"normal"===e.id&&(t=null===Qde||void 0===Qde||null===(n=Qde.palette)||void 0===n?void 0:n.green[300]);"hypoglycemia"===e.id&&(t=null===Qde||void 0===Qde||null===(r=Qde.palette)||void 0===r?void 0:r.red[200]);"prediabetes"===e.id&&(t=null===Qde||void 0===Qde||null===(i=Qde.palette)||void 0===i?void 0:i.orange[300]);"diabetes"===e.id&&(t=null===Qde||void 0===Qde||null===(o=Qde.palette)||void 0===o?void 0:o.red[300]);return t},m=Math.PI/180,f=e=>{const{cx:t,cy:n,midAngle:r,innerRadius:i,outerRadius:o,percent:a}=e,s=i+.4*(o-i),l=t+s*Math.cos(-r*m),c=n+s*Math.sin(-r*m);return(0,qt.jsx)("text",{x:l,y:c,fill:"white",textAnchor:l>t?"start":"middle",dominantBaseline:"central",children:0==a?null:"".concat((100*a).toFixed(0),"%")})},g=e=>{var t,n;let{active:r,payload:i}=e;const o=null!==(t=i[0])&&void 0!==t&&t.payload?null===(n=i[0])||void 0===n?void 0:n.payload:{};var a;if(r&&i&&null!==i&&void 0!==i&&i.length)return(0,qt.jsxs)(op,{sx:{bgcolor:"#ffffff",border:"1px solid #cccccc",p:1.5,width:250},children:[(0,qt.jsx)(Cf,{gutterBottom:!0,variant:"body2",fontWeight:600,children:(0,qt.jsx)(op,{component:"span",color:"normal"!==(null===o||void 0===o?void 0:o.id)?h(null===o||void 0===o?void 0:o.payload):Qde.palette.green[500],children:null===o||void 0===o?void 0:o.name})}),(0,qt.jsx)(Cf,{gutterBottom:!0,variant:"body2",fontWeight:600,children:"Count:  ".concat(null===o||void 0===o||null===(a=o.payload)||void 0===a?void 0:a.value)})]})};return We.useEffect(()=>{cs(c)||(()=>{let e=[];c.forEach(n=>{e.push({id:n,data:p(null===t||void 0===t?void 0:t.filter(e=>e.values.activity===n))})}),l(e)})()},[c]),We.useEffect(()=>{cs(t)||d(Qd(t))},[t]),(0,qt.jsx)(Ff,{container:!0,spacing:2,mt:.05,children:"AllStage"===n?null===s||void 0===s?void 0:s.map(e=>{var t;return(0,qt.jsxs)(Ff,{item:!0,xs:o?4:12,md:4,lg:o?4:6,xl:4,children:[!cs(null===e||void 0===e?void 0:e.data)&&(0,qt.jsx)(Cf,{variant:"body1",fontWeight:600,textAlign:"center",children:null===e||void 0===e?void 0:e.id}),(0,qt.jsx)(op,{sx:{height:r?"".concat(r,"px"):"200px"},children:(0,qt.jsxs)(Ode,{width:i||200,height:r||200,style:{margin:"auto"},children:[(0,qt.jsx)(Mde,{data:null===e||void 0===e?void 0:e.data,cx:"50%",cy:"50%",innerRadius:i?i/4.5:40,outerRadius:r?r/2:90,paddingAngle:0,labelLine:!1,label:f,dataKey:"value",children:null===e||void 0===e||null===(t=e.data)||void 0===t?void 0:t.map((e,t)=>(0,qt.jsx)(Cre,{fill:h(e)},"cell-".concat(t)))}),(0,qt.jsx)(w6,{content:(0,qt.jsx)(g,{}),wrapperStyle:{zIndex:99}})]})})]},null===e||void 0===e?void 0:e.id)}):null===s||void 0===s?void 0:s.map(e=>{var t;return e.data.length>0&&(0,qt.jsxs)(Ff,{item:!0,xs:12,children:[!cs(null===e||void 0===e?void 0:e.data)&&(0,qt.jsx)(Cf,{variant:"body1",fontWeight:600,textAlign:"center",children:null===e||void 0===e?void 0:e.id}),(0,qt.jsx)(op,{sx:{height:"400px"},children:(0,qt.jsxs)(Ode,{width:400,height:400,style:{margin:"auto"},children:[(0,qt.jsx)(Mde,{data:null===e||void 0===e?void 0:e.data,cx:"50%",cy:"50%",innerRadius:70,outerRadius:150,paddingAngle:0,labelLine:!1,label:f,dataKey:"value",children:null===e||void 0===e||null===(t=e.data)||void 0===t?void 0:t.map((e,t)=>(0,qt.jsx)(Cre,{fill:h(e)},"cell-".concat(t)))}),(0,qt.jsx)(w6,{content:(0,qt.jsx)(g,{}),wrapperStyle:{zIndex:99}})]})})]},null===e||void 0===e?void 0:e.id)})})}Zwe.defaultProps={glucoseData:[]};const Kwe=Zwe;const Xwe=function(e){var t,n,r,i,o,a,s,l,c,d,u,p,h,m,f,g,v,x,y,b,j,_,C,w,S,A,k,T,E,M;let{patientData:O,program:R,headCellsItems:P,patientGlucoseReport:D,activeGlucoseCourse:N,countries:L,states:I,selfDisease:F,familyDisease:$,alertPercent:B,socialHistory:z,personalDiseaseHead:H,notesList:W,prescribedHead:U,consultNotesList:V,consultationHead:G,patientMissedReading:q,filterDate:Y}=e;const Z=Nt(),{t:K}=Vg(),X=so(),{years:Q}=vs(null===O||void 0===O?void 0:O.birth_date),J=We.useRef(),ee=(0,vwe.useReactToPrint)({content:()=>J.current,documentTitle:"".concat(null===R||void 0===R?void 0:R.code,"_").concat(null===O||void 0===O?void 0:O.first_name,"_report_").concat(null!==N&&void 0!==N&&null!==(t=N.schedule)&&void 0!==t&&t.vital_name?null===N||void 0===N||null===(n=N.schedule)||void 0===n?void 0:n.vital_name:"NA")}),te=(null===R||void 0===R?void 0:R.image)instanceof File?URL.createObjectURL(null===R||void 0===R?void 0:R.image):null===R||void 0===R?void 0:R.image,ne=[{value:"Diabetes",color:null===Qde||void 0===Qde||null===(r=Qde.palette)||void 0===r?void 0:r.red[300],darkColor:null===Qde||void 0===Qde||null===(i=Qde.palette)||void 0===i?void 0:i.red[900]},{value:"Prediabetes",color:null===Qde||void 0===Qde||null===(o=Qde.palette)||void 0===o?void 0:o.orange[300],darkColor:null===Qde||void 0===Qde||null===(a=Qde.palette)||void 0===a?void 0:a.orange[900]},{value:"Normal",color:null===Qde||void 0===Qde||null===(s=Qde.palette)||void 0===s?void 0:s.green[300],darkColor:null===Qde||void 0===Qde||null===(l=Qde.palette)||void 0===l?void 0:l.green[500]},{value:"Hypoglycemia",color:null===Qde||void 0===Qde||null===(c=Qde.palette)||void 0===c?void 0:c.red[200],darkColor:null===Qde||void 0===Qde||null===(d=Qde.palette)||void 0===d?void 0:d.red[500]}],re=e=>{let{legend:t}=e;return t.length>0&&(0,qt.jsx)(op,{textAlign:"left",children:(0,qt.jsx)(op,{component:"ul",p:0,m:0,display:"flex",flexWrap:"wrap",children:null===ne||void 0===ne?void 0:ne.map((e,t)=>(0,qt.jsxs)(Cf,{component:"li",fontSize:14,sx:{listStyle:"none",display:"flex",alignItems:"center",mr:1.5},children:[(0,qt.jsx)(kbe.A,{sx:{width:10,color:e.color}}),(0,qt.jsx)(op,{component:"span",ml:1,color:e.darkColor,children:e.value})]},t))})})},ie=(e,t,n)=>{const r=sa()(t).format("YYYY"),i=sa()(n).format("YYYY");return"CUSTOM"===e?"".concat(r," - ").concat(i):"PRESENT"===e?"".concat(r," - ").concat(e):"NA"};return(0,qt.jsxs)(qt.Fragment,{children:[(0,qt.jsx)("style",{children:"@page {size: auto; margin: 8mm 2mm 8mm 2mm; }"}),(0,qt.jsx)(Gwe,{}),(0,qt.jsxs)(op,{sx:{maxWidth:700,mx:"auto"},children:[(0,qt.jsx)(op,{px:2,children:(0,qt.jsxs)(Ff,{container:!0,spacing:2,justifyContent:"center",children:[(0,qt.jsx)(Ff,{item:!0,children:(0,qt.jsx)(xh,{variant:"outlined",disableRipple:!0,onClick:()=>X(-1),children:K("rpm_Cancel")})}),(0,qt.jsx)(Ff,{item:!0,children:(0,qt.jsx)(xh,{variant:"contained",color:"primary",disableElevation:!0,onClick:ee,children:K("rpm_Print")})}),(0,qt.jsx)(Ff,{item:!0,children:"course"==(null===Y||void 0===Y?void 0:Y.report)?(0,qt.jsx)(xh,{variant:"contained",color:"primary",disableElevation:!0,onClick:()=>{var e;return Kd(Z,null===O||void 0===O?void 0:O.id,null===N||void 0===N?void 0:N.id,"glucose",null===Y||void 0===Y?void 0:Y.start_date,null===Y||void 0===Y?void 0:Y.end_date,null===R||void 0===R?void 0:R.code,null===N||void 0===N||null===(e=N.schedule)||void 0===e?void 0:e.id)},children:K("rpm_Download")}):(0,qt.jsx)(xh,{variant:"contained",color:"primary",disableElevation:!0,onClick:()=>Kd(Z,null===O||void 0===O?void 0:O.id,null===N||void 0===N?void 0:N.id,"glucose",null===Y||void 0===Y?void 0:Y.start_date,null===Y||void 0===Y?void 0:Y.end_date,"",""),children:K("rpm_Download")})})]})}),(0,qt.jsx)(Vw,{ref:J,sx:{p:2},children:(0,qt.jsx)(Bw,{size:"small",sx:{bgcolor:"white",border:"1px solid",borderColor:"grey.500"},children:(0,qt.jsxs)(fS,{sx:{"& tr td":{borderBottom:0,whiteSpace:"normal",py:.375}},children:[(0,qt.jsxs)(cw,{children:[(0,qt.jsx)(gw,{sx:{borderRight:"1px solid",borderColor:"grey.500"},children:(0,qt.jsxs)(op,{sx:{display:"flex",alignItems:"flex-start"},children:[cs(te)?(0,qt.jsx)(Uwe.A,{sx:{color:"primary.theme.500",fontSize:60}}):(0,qt.jsx)(op,{sx:{display:"flex",borderRadius:1,bgcolor:"primary.theme.50",flexGrow:.4,justifyContent:"center"},children:(0,qt.jsx)("img",{src:te,width:100,height:100})}),(0,qt.jsxs)(op,{sx:{flexGrow:.6,ml:2},children:[(0,qt.jsx)(Cf,{variant:"h6",component:"h6",fontWeight:500,children:cs(R)?(0,qt.jsx)(lS,{}):null!==R&&void 0!==R&&R.display_name?null===R||void 0===R?void 0:R.display_name:"NA"}),(0,qt.jsxs)(Cf,{variant:"body2",component:"p",sx:{mt:.5},children:[cs(R)?(0,qt.jsx)(lS,{width:50,sx:{display:"inline-block"}}):null!==R&&void 0!==R&&R.city?(null===R||void 0===R?void 0:R.city)+", ":"NA",cs(I)?(0,qt.jsx)(lS,{width:50,sx:{display:"inline-block",ml:1}}):null!==I&&void 0!==I&&I.name?null===I||void 0===I?void 0:I.name:"NA"]}),(0,qt.jsx)(Cf,{variant:"body2",component:"p",sx:{mt:.5},children:cs(L)?(0,qt.jsx)(lS,{width:50}):null!==L&&void 0!==L&&L.name?null===L||void 0===L?void 0:L.name:"NA"})]})]})}),(0,qt.jsxs)(gw,{width:"40%",children:[(0,qt.jsxs)(pE,{flexDirection:"row",mb:.25,children:[(0,qt.jsx)(Cf,{variant:"body2",fontWeight:"h6.fontWeight",sx:{flex:1},color:"primary",children:K("rpm_PatientName")}),(0,qt.jsx)(op,{children:cs(O)?(0,qt.jsx)(lS,{width:50}):(0,qt.jsx)(Cf,{variant:"body2",fontWeight:"h6.fontWeight",component:"p",children:(null===O||void 0===O?void 0:O.first_name)+" "+(null===O||void 0===O?void 0:O.last_name)})})]}),(0,qt.jsxs)(pE,{flexDirection:"row",mb:.25,children:[(0,qt.jsx)(Cf,{variant:"body2",fontWeight:"h6.fontWeight",sx:{flex:1},color:"primary",children:K("rpm_AgeGender")}),(0,qt.jsx)(op,{children:cs(O)?(0,qt.jsx)(lS,{width:50}):(0,qt.jsxs)(Cf,{variant:"body2",fontWeight:"h6.fontWeight",component:"p",children:[null!==O&&void 0!==O&&O.birth_date?"".concat(Q,"yrs"):"NA",null!==O&&void 0!==O&&null!==(u=O.profile)&&void 0!==u&&u.gender?", ".concat(null===O||void 0===O||null===(p=O.profile)||void 0===p?void 0:p.gender):""]})})]}),(0,qt.jsxs)(pE,{flexDirection:"row",mb:.25,children:[(0,qt.jsx)(Cf,{variant:"body2",component:"p",fontWeight:"h6.fontWeight",sx:{flex:1},color:"primary",children:K("rpm_Mobile")}),(0,qt.jsx)(op,{children:cs(O)?(0,qt.jsx)(lS,{width:50}):(0,qt.jsx)(Cf,{variant:"body2",fontWeight:"h6.fontWeight",component:"p",children:null!==O&&void 0!==O&&O.mobile?null===O||void 0===O?void 0:O.mobile:"NA"})})]}),(0,qt.jsxs)(pE,{flexDirection:"row",mb:.25,children:[(0,qt.jsx)(Cf,{variant:"body2",component:"p",fontWeight:"h6.fontWeight",sx:{flex:1},color:"primary",children:K("rpm_VitalStats")}),(0,qt.jsx)(op,{children:cs(O)?(0,qt.jsx)(lS,{width:50}):(0,qt.jsxs)(Cf,{variant:"body2",fontWeight:"h6.fontWeight",component:"p",children:[null!==O&&void 0!==O&&null!==(h=O.patient_health_profile)&&void 0!==h&&null!==(m=h.height)&&void 0!==m&&m.split(".")[0]?(null===O||void 0===O||null===(f=O.patient_health_profile)||void 0===f||null===(g=f.height)||void 0===g?void 0:g.split(".")[0])+"''"+(null===O||void 0===O||null===(v=O.patient_health_profile)||void 0===v||null===(x=v.height)||void 0===x?void 0:x.split(".")[1])+" ft.":"NA"," "," / ",null!==O&&void 0!==O&&null!==(y=O.patient_health_profile)&&void 0!==y&&y.weight?(null===O||void 0===O||null===(b=O.patient_health_profile)||void 0===b?void 0:b.weight)+"kg":"NA"]})})]}),(0,qt.jsxs)(pE,{flexDirection:"row",mb:.25,children:[(0,qt.jsx)(Cf,{variant:"body2",component:"p",fontWeight:"h6.fontWeight",sx:{flex:1},color:"primary",children:K("rpm_BMI")}),(0,qt.jsx)(op,{children:cs(O)?(0,qt.jsx)(lS,{width:50}):(0,qt.jsx)(Cf,{variant:"body2",fontWeight:"h6.fontWeight",component:"p",children:null!==O&&void 0!==O&&null!==(j=O.patient_health_profile)&&void 0!==j&&j.weight?Ps(null===O||void 0===O||null===(_=O.patient_health_profile)||void 0===_?void 0:_.height,null===O||void 0===O||null===(C=O.patient_health_profile)||void 0===C?void 0:C.weight):"NA"})})]})]})]}),(0,qt.jsx)(cw,{sx:{borderTop:"1px solid",borderColor:"grey.500"},children:(0,qt.jsx)(gw,{colSpan:2,sx:{bgcolor:"primary.theme.300"},children:(0,qt.jsx)(Cf,{variant:"body1",component:"h6",fontWeight:500,textAlign:"center",color:"white",py:.75,children:"course"===(null===Y||void 0===Y?void 0:Y.report)?"".concat(K("rpm_COURSE")," : ").concat(cs(N)?"...":null===N||void 0===N||null===(w=N.schedule)||void 0===w?void 0:w.name,"                   \n                        (").concat(sa()(null===Y||void 0===Y?void 0:Y.start_date).format("DD MMM YYYY")," to ").concat(sa()(null===Y||void 0===Y?void 0:Y.end_date).format("DD MMM YYYY"),")"):"".concat(K("rpm_Duration")," :                 \n                      (").concat(sa()(null===Y||void 0===Y?void 0:Y.start_date).format("DD MMM YYYY")," to ").concat(sa()(null===Y||void 0===Y?void 0:Y.end_date).format("DD MMM YYYY"),")")})})}),(0,qt.jsxs)(cw,{sx:{borderTop:"1px solid",borderColor:"grey.500"},colSpan:2,children:[(0,qt.jsx)(gw,{children:(0,qt.jsxs)(op,{display:"flex",justifyContent:"space-between",children:["course"===(null===Y||void 0===Y?void 0:Y.report)&&(0,qt.jsxs)(op,{sx:{display:"flex",alignItems:"flex-start",mt:2,mr:1.5},children:[(0,qt.jsx)(op,{sx:{display:"flex",p:1,bgcolor:"orange.50",borderRadius:1},children:(0,qt.jsx)(Vwe.A,{sx:{color:"orange.500"}})}),(0,qt.jsxs)(op,{sx:{flexGrow:1,ml:2},children:[(0,qt.jsx)(Cf,{variant:"body2",component:"p",fontWeight:500,children:K("rpm_Status")}),(0,qt.jsx)(Cf,{variant:"h6",component:"h6",lineHeight:"1",children:cs(q)?"NA":(0,qt.jsx)(qt.Fragment,{children:"NON_COMPLIANT"==(null===q||void 0===q?void 0:q.status)?(0,qt.jsx)(op,{component:"span",sx:e=>({py:.25,px:1,color:e.palette.red[900],backgroundColor:e.palette.red[100],display:"inline-flex",fontSize:e.spacing(1.5),borderRadius:.5,fontWeight:600}),children:"NON-COMPLIANT"}):(0,qt.jsx)(op,{component:"span",sx:e=>({py:.25,px:1,color:e.palette.green[900],backgroundColor:e.palette.green[100],display:"inline-flex",fontSize:e.spacing(1.25),borderRadius:.5,fontWeight:600}),children:"COMPLIANT"})})})]})]}),(0,qt.jsxs)(op,{sx:{display:"flex",alignItems:"flex-start",mt:2},children:[(0,qt.jsx)(op,{sx:{display:"flex",p:1,bgcolor:"red.50",borderRadius:1},children:(0,qt.jsx)(Tbe.A,{sx:{color:"red.500"}})}),(0,qt.jsxs)(op,{sx:{flexGrow:1,ml:2},children:[(0,qt.jsx)(Cf,{variant:"body2",component:"p",fontWeight:500,children:K("rpm_ReadingAlerts")}),(0,qt.jsx)(Cf,{variant:"h6",component:"h6",lineHeight:"1",sx:{mt:.5},children:B?"".concat(B,"%"):"NA"})]})]})]})}),(0,qt.jsx)(gw,{children:(0,qt.jsx)(op,{sx:{display:"flex",alignItems:"flex-start",mt:2,mr:1.5},children:(0,qt.jsx)(re,{legend:ne})})})]}),(0,qt.jsx)(cw,{children:(0,qt.jsx)(gw,{colSpan:2,sx:{p:0},children:(0,qt.jsx)(Bw,{size:"small",sx:{maxWidth:"100%"},children:(0,qt.jsx)(fS,{children:(0,qt.jsx)(cw,{children:(0,qt.jsx)(gw,{children:cs(D)?(0,qt.jsx)(op,{height:"100%",children:(0,qt.jsx)("img",{src:GC,style:{display:"block",margin:"auto",maxWidth:"100%",maxHeight:180}})}):(0,qt.jsx)(lje,{glucoseData:D,gridWidth:4,chartWidth:300,chartHeight:150,stage:"AllStage"})})})})})})}),(0,qt.jsx)(cw,{sx:{borderTop:"1px solid",borderColor:"grey.500"},children:(0,qt.jsx)(gw,{colSpan:2,sx:{p:0},children:(0,qt.jsx)(Bw,{size:"small",sx:{maxWidth:"100%"},children:(0,qt.jsx)(fS,{children:(0,qt.jsx)(cw,{children:(0,qt.jsx)(gw,{sx:{"& .MuiGrid-root>.MuiGrid-item":{pt:1,"& .MuiTypography-root":{fontSize:14},"& text":{fontSize:10}}},children:cs(D)?(0,qt.jsx)(op,{height:"100%",children:(0,qt.jsx)("img",{src:GC,style:{display:"block",margin:"auto",maxWidth:"100%",maxHeight:180}})}):(0,qt.jsx)(Kwe,{stage:"AllStage",glucoseData:D,height:95,width:95,report:!0})})})})})})}),(0,qt.jsx)(cw,{sx:{borderTop:"1px solid",borderColor:"grey.500"},children:(0,qt.jsx)(gw,{colSpan:2,sx:{bgcolor:"primary.theme.300"},children:(0,qt.jsx)(Cf,{variant:"body1",component:"h6",fontWeight:500,textAlign:"center",color:"white",py:.75,children:K("rpm_InstrumentReadings")})})}),(0,qt.jsx)(cw,{sx:{borderTop:"1px solid",borderColor:"grey.500"},children:(0,qt.jsx)(gw,{colSpan:2,sx:{p:0},children:(0,qt.jsx)(Bw,{size:"small",sx:{maxWidth:"100%"},children:(0,qt.jsx)(fS,{children:(0,qt.jsx)(cw,{children:(0,qt.jsx)(gw,{children:D?(0,qt.jsx)(op,{sx:{"& .MuiTableContainer-root":{border:"none"},"& .MuiTableCell-root":{p:.25,fontSize:12,"& div":{py:.375,px:.75,lineHeight:1}},"& img":{maxHeight:200}},children:(0,qt.jsx)(UT,{data:D,headCells:P,noDataImage:GC,skeletonVrows:6,stickyHeader:!0,className:"theme_scroll",children:null===D||void 0===D?void 0:D.map(e=>{var t,n;return(0,qt.jsxs)(cw,{sx:{"&:last-child td, &:last-child th":{border:0}},children:[(0,qt.jsx)(gw,{children:e.ts}),(0,qt.jsx)(gw,{children:e.values.glucose?(0,qt.jsx)(qt.Fragment,{children:(null===e||void 0===e||null===(t=e.alerts)||void 0===t?void 0:t.length)>0?(0,qt.jsx)(op,{className:null===e||void 0===e||null===(n=e.alerts[0])||void 0===n?void 0:n.text,display:"inline-flex",width:30,justifyContent:"center",children:(0,qt.jsx)(op,{component:"span",children:e.values.glucose})}):(0,qt.jsx)(op,{className:"normal",display:"inline-flex",width:30,justifyContent:"center",children:(0,qt.jsx)(op,{component:"span",children:e.values.glucose})})}):"NA"}),(0,qt.jsx)(gw,{children:e.values.activity?e.values.activity:"NA"}),(0,qt.jsx)(gw,{children:e.alerts?K("rpm_".concat(e.alerts[0].text)):"Normal"})]},e.id)})})}):(0,qt.jsx)(op,{height:"100%",children:(0,qt.jsx)("img",{src:GC,style:{display:"block",margin:"auto",maxWidth:"100%",maxHeight:180}})})})})})})})}),(0,qt.jsx)(cw,{sx:{borderTop:"1px solid",borderColor:"grey.500"},children:(0,qt.jsx)(gw,{colSpan:2,sx:{bgcolor:"primary.theme.300"},children:(0,qt.jsx)(Cf,{variant:"body1",component:"h6",fontWeight:500,textAlign:"center",color:"white",py:.75,children:K("rpm_MedicalHistory")})})}),(0,qt.jsx)(cw,{sx:{borderTop:"1px solid",borderColor:"grey.500"},children:(0,qt.jsx)(gw,{colSpan:2,sx:{p:0},children:(0,qt.jsx)(Bw,{size:"small",children:(0,qt.jsxs)(fS,{children:[(0,qt.jsx)(cw,{children:(0,qt.jsx)(gw,{sx:{verticalAlign:"top"},children:(0,qt.jsx)(op,{children:F?(0,qt.jsx)(op,{sx:{"& .MuiTableContainer-root":{border:"none"},"& .MuiTableCell-root":{p:.25,fontSize:12,"& div":{py:.375,px:.75,lineHeight:1}},"& img":{maxHeight:200}},children:(0,qt.jsx)(UT,{data:F,headCells:H,noDataImage:GC,skeletonVrows:6,stickyHeader:!0,children:null===F||void 0===F?void 0:F.map(e=>(0,qt.jsxs)(cw,{sx:{"&:last-child td, &:last-child th":{border:0}},children:[(0,qt.jsx)(gw,{width:"25%",children:e.disease_name}),(0,qt.jsx)(gw,{width:"25%",children:e.custom_duration?e.custom_duration+" "+(null===e||void 0===e?void 0:e.duration_unit):ie(e.duration_unit,null===e||void 0===e?void 0:e.start_date,e.end_date)}),(0,qt.jsx)(gw,{children:e.remark?e.remark:"NA"})]},e.id))})}):(0,qt.jsx)(op,{height:"100%",children:(0,qt.jsx)("img",{src:GC,style:{display:"block",margin:"auto",maxWidth:"100%",maxHeight:180}})})})})}),(0,qt.jsx)(cw,{sx:{borderTop:"1px solid",borderColor:"grey.500"},children:(0,qt.jsx)(gw,{colSpan:2,sx:{bgcolor:"primary.theme.300"},children:(0,qt.jsx)(Cf,{variant:"body1",component:"h6",fontWeight:500,textAlign:"center",color:"white",py:.75,children:K("rpm_FamilyMedicalHistory")})})}),(0,qt.jsx)(cw,{sx:{borderTop:"1px solid",borderColor:"grey.500"},children:(0,qt.jsx)(gw,{colSpan:2,sx:{p:0},children:(0,qt.jsx)(Bw,{size:"small",children:(0,qt.jsx)(fS,{children:(0,qt.jsx)(cw,{children:(0,qt.jsx)(gw,{sx:{verticalAlign:"top"},children:(0,qt.jsx)(op,{py:.75,children:$?(0,qt.jsx)(op,{sx:{"& .MuiTableContainer-root":{border:"none"},"& .MuiTableCell-root":{p:.25,fontSize:12,"& div":{py:.375,px:.75,lineHeight:1}},"& img":{maxHeight:200}},children:(0,qt.jsx)(UT,{data:$,headCells:H,noDataImage:GC,skeletonVrows:6,stickyHeader:!0,children:null===$||void 0===$?void 0:$.map(e=>(0,qt.jsxs)(cw,{sx:{"&:last-child td, &:last-child th":{border:0}},children:[(0,qt.jsx)(gw,{width:"25%",children:e.disease_name}),(0,qt.jsx)(gw,{width:"25%",children:e.custom_duration?e.custom_duration+" "+(null===e||void 0===e?void 0:e.duration_unit):ie(e.duration_unit,null===e||void 0===e?void 0:e.start_date,e.end_date)}),(0,qt.jsx)(gw,{children:e.remark?e.remark:"NA"})]},e.id))})}):(0,qt.jsx)(op,{height:"100%",children:(0,qt.jsx)("img",{src:GC,style:{display:"block",margin:"auto",maxWidth:"100%",maxHeight:180}})})})})})})})})}),(0,qt.jsx)(cw,{sx:{borderTop:"1px solid",borderColor:"grey.500"},children:(0,qt.jsx)(gw,{colSpan:2,sx:{bgcolor:"primary.theme.300"},children:(0,qt.jsx)(Cf,{variant:"body1",component:"h6",fontWeight:500,textAlign:"center",color:"white",py:.75,children:K("rpm_OtherHealthIssues")})})}),(0,qt.jsx)(op,{p:2,children:null===z||void 0===z||null===(S=z.other_histories)||void 0===S?void 0:S.map((e,t)=>(0,qt.jsxs)(Ff,{container:!0,spacing:.75,alignItems:"center",mt:.05,children:[(0,qt.jsx)(Ff,{item:!0,xs:!0,children:(0,qt.jsx)(op,{sx:{display:"flex",alignItems:"start"},children:(0,qt.jsx)(Cf,{variant:"body2",fontWeight:"h6.fontWeight",sx:{pl:.5},children:t+1+". "+(null===e||void 0===e?void 0:e.question)})})}),(0,qt.jsx)(Ff,{item:!0,children:(0,qt.jsx)(Cf,{variant:"body2",fontWeight:"h6.fontWeight",children:null===e||void 0===e?void 0:e.answer})})]},t))})]})})})}),(0,qt.jsx)(cw,{sx:{borderTop:"1px solid",borderColor:"grey.500"},children:(0,qt.jsx)(gw,{colSpan:2,sx:{bgcolor:"primary.theme.300"},children:(0,qt.jsx)(Cf,{variant:"body1",component:"h6",fontWeight:500,textAlign:"center",color:"white",py:.75,children:K("rpm_PrescribedMedications")})})}),(0,qt.jsx)(cw,{sx:{borderTop:"1px solid",borderColor:"grey.500"},children:(0,qt.jsx)(gw,{colSpan:2,sx:{p:0},children:(0,qt.jsx)(Bw,{size:"small",children:(0,qt.jsxs)(fS,{children:[(0,qt.jsx)(cw,{children:(0,qt.jsxs)(gw,{children:[(0,qt.jsxs)(Ff,{container:!0,spacing:2,mb:2,children:[!cs(null===W||void 0===W?void 0:W.symptomsList)&&(0,qt.jsxs)(Ff,{item:!0,md:6,children:[(0,qt.jsx)(Cf,{component:"h6",fontSize:14,fontWeight:800,children:"Symptoms"}),(0,qt.jsx)(op,{component:"span"}),cs(null===W||void 0===W?void 0:W.symptomsList)?"N/A":null===W||void 0===W||null===(A=W.symptomsList)||void 0===A?void 0:A.map(e=>e).join(", ")]}),!cs(null===W||void 0===W?void 0:W.diagnosisList)&&(0,qt.jsxs)(Ff,{item:!0,md:6,children:[(0,qt.jsx)(Cf,{component:"h6",fontSize:14,fontWeight:800,children:"Diagnosis"}),(0,qt.jsx)(op,{component:"span"}),cs(null===W||void 0===W?void 0:W.diagnosisList)?"N/A":null===W||void 0===W||null===(k=W.diagnosisList)||void 0===k?void 0:k.map(e=>e).join(", ")]}),!cs(null===W||void 0===W?void 0:W.advicesList)&&(0,qt.jsxs)(Ff,{item:!0,md:6,children:[(0,qt.jsx)(Cf,{component:"h6",fontSize:14,fontWeight:800,children:"Advices"}),(0,qt.jsx)(op,{component:"span"}),cs(null===W||void 0===W?void 0:W.advicesList)?"N/A":null===W||void 0===W||null===(T=W.advicesList)||void 0===T?void 0:T.map(e=>e).join(", ")]}),!cs(null===W||void 0===W?void 0:W.testsList)&&(0,qt.jsxs)(Ff,{item:!0,md:6,children:[(0,qt.jsx)(Cf,{component:"h6",fontSize:14,fontWeight:800,children:"Tests"}),(0,qt.jsx)(op,{component:"span"}),cs(null===W||void 0===W?void 0:W.testsList)?"N/A":null===W||void 0===W||null===(E=W.testsList)||void 0===E?void 0:E.map(e=>e).join(", ")]})]}),(0,qt.jsx)(op,{children:null!==W&&void 0!==W&&W.presList?(0,qt.jsx)(op,{sx:{"& .MuiTableContainer-root":{border:"none"},"& .MuiTableCell-root":{p:.25,fontSize:12,"& div":{py:.375,px:.75,lineHeight:1}},"& img":{maxHeight:200}},children:(0,qt.jsx)(UT,{data:null===W||void 0===W?void 0:W.presList,headCells:U,noDataImage:GC,skeletonVrows:6,stickyHeader:!0,children:null===W||void 0===W||null===(M=W.presList)||void 0===M?void 0:M.map(e=>{var t;return(0,qt.jsxs)(cw,{sx:{"&:last-child td, &:last-child th":{border:0}},children:[(0,qt.jsxs)(gw,{children:[null!==e&&void 0!==e&&e.medicine?null===e||void 0===e?void 0:e.medicine:"NA"," ",(null===e||void 0===e?void 0:e.dose)&&(null===e||void 0===e?void 0:e.dose)+(null===e||void 0===e?void 0:e.unit)]}),(0,qt.jsx)(gw,{children:null===Ld||void 0===Ld||null===(t=Ld.find(t=>(null===e||void 0===e?void 0:e.frequency)===(null===t||void 0===t?void 0:t.key)))||void 0===t?void 0:t.text}),(0,qt.jsx)(gw,{children:"".concat(sa()(null===e||void 0===e?void 0:e.start_date).format("DD MMM")," - ").concat(sa()(null===e||void 0===e?void 0:e.end_date).format("DD MMM"))}),(0,qt.jsx)(gw,{children:null!==e&&void 0!==e&&e.comments?e.comments:"NA"})]},e.id)})})}):(0,qt.jsx)(op,{height:"100%",children:(0,qt.jsx)("img",{src:GC,style:{display:"block",margin:"auto",maxWidth:"100%",maxHeight:180}})})})]})}),(0,qt.jsx)(cw,{sx:{borderTop:"1px solid",borderColor:"grey.500"},children:(0,qt.jsx)(gw,{colSpan:2,sx:{bgcolor:"primary.theme.300"},children:(0,qt.jsx)(Cf,{variant:"body1",component:"h6",fontWeight:500,textAlign:"center",color:"white",py:.75,children:K("rpm_DoctorNotes")})})}),(0,qt.jsx)(op,{children:V?(0,qt.jsx)(op,{sx:{"& .MuiTableContainer-root":{border:"none"},"& .MuiTableCell-root":{p:.25,fontSize:12,"& div":{py:.375,px:.75,lineHeight:1}},"& img":{maxHeight:200}},children:(0,qt.jsx)(UT,{data:V,headCells:G,noDataImage:GC,skeletonVrows:6,stickyHeader:!0,children:null===V||void 0===V?void 0:V.map(e=>(0,qt.jsxs)(cw,{sx:{"&:last-child td, &:last-child th":{border:0}},children:[(0,qt.jsx)(gw,{width:"22%",children:e.created_at?sa()(e.created_at).format("DD MMM YYYY hh:mm A"):"NA"}),(0,qt.jsx)(gw,{width:"20%",children:e.created_by}),(0,qt.jsx)(gw,{sx:{wordBreak:"break-all","& p>p":{fontSize:12,m:0}},children:(0,qt.jsx)(Cf,{variant:"body2",dangerouslySetInnerHTML:{__html:e.note},color:"inherit"})})]},e.id))})}):(0,qt.jsx)(op,{height:"100%",children:(0,qt.jsx)("img",{src:GC,style:{display:"block",margin:"auto",maxWidth:"100%",maxHeight:180}})})})]})})})}),(0,qt.jsx)(cw,{sx:{borderTop:"1px solid",borderColor:"grey.500"},children:(0,qt.jsx)(gw,{colSpan:2,children:(0,qt.jsxs)(Ff,{container:!0,spacing:2,alignItems:"center",children:[(0,qt.jsx)(Ff,{item:!0,xs:!0,children:(0,qt.jsxs)(Cf,{variant:"body2",fontWeight:500,fontSize:10,sx:{fontStyle:"italic",color:"grey.600",textAlign:"justify"},children:[(0,qt.jsx)(op,{component:"span",fontWeight:600,children:"DISCLAIMER:"})," ","THIS WEBSITE DOES NOT PROVIDE MEDICAL ADVICE. The information, including but not limited to, text, graphics, images, and other material contained on this website is for informational purposes only. No material on this site is intended to be a substitute for a qualified medical professional. All analysis are subject to clinical interpretation by a qualified medical professional."]})}),(0,qt.jsx)(Ff,{item:!0,children:(0,qt.jsx)("img",{src:cv,height:30})})]})})})]})})})]})]})},Qwe=["vital","medications_list","intervals"];const Jwe=function(e){let{patientData:t,program:n}=e;const r=$o.getPatientDefaultCourseGlucose("course_glucose"),o=$o.getFilterDate("filterDate"),a=Nt(),{t:s}=Vg(),[l,c]=We.useState(null),[d,u]=We.useState({}),[p,h]=We.useState({}),[m,f]=We.useState(null),[g,v]=We.useState(null),[x,y]=We.useState(null),[b,j]=We.useState(null),[_,C]=We.useState(null),[w,S]=We.useState(null),[A,k]=We.useState(null),T=e=>null===e||void 0===e?void 0:e.map(e=>{const{vital:t,medications_list:n,intervals:r}=e,o=Ko(e,Qwe),a=null===n||void 0===n?void 0:n.map(e=>{const t=r.filter(t=>{var n;return null===t||void 0===t||null===(n=t.medicines)||void 0===n?void 0:n.includes(e.id)}).map(e=>{let{id:t,repetition_kind:n,start_time:r}=e;return{id:t,repetition_kind:n,start_time:r?Ds(r,pd):"N/A",interval:null}}).map(e=>{let{start_time:t,interval:n}=e;return{start_time:t,interval:n}});return{id:e.id,medicine:e.medicine,medicine_form:e.medicine_form,icon_type:e.icon_type||"",dose:e.dose,unit:e.unit,color:e.color,image:e.image||"",start_date:e.start_date,end_date:e.end_date,days:e.days,repetition_kind:gd,timing:t,frequency:e.frequency,comments:e.comments}});return(0,i.A)({vital:t,note:"",medicationList:a},o)});We.useEffect(()=>{if(!cs(t)&&!cs(n)){a(NC({activeMenuItem:"report"}))}},[t,n]),We.useEffect(()=>{cs(t)||cs(n)||cs(r)||((async()=>{const e={patient_id:null===t||void 0===t?void 0:t.id,disease:"glucose",duration:[null===o||void 0===o?void 0:o.start_date,null===o||void 0===o?void 0:o.end_date]};try{const{data:t}=await a(Ll(e));if(c(t),!cs(t)){const e=null===t||void 0===t?void 0:t.filter(e=>e.alerts),n=Math.round(100*e.length/t.length);y(n)}}catch(n){a(Zo({subTitle:n.message,severity:ud.ERROR}))}})(),(async e=>{await a(uue({perPage:"10000",countryCode:e.country},"RPM",t=>{var n,r;let{countries:i,states:o}=t;const a=null===i||void 0===i||null===(n=i.content)||void 0===n?void 0:n.find(t=>t.isoCode===e.country),s=null===o||void 0===o||null===(r=o.content)||void 0===r?void 0:r.find(t=>t.isoCode===e.state);u(a),h(s)},()=>{}))})(n),(async()=>{const e={kind:"SELF"};try{const{data:r}=await a(Al(null===n||void 0===n?void 0:n.id,null===t||void 0===t?void 0:t.id,e)),{content:i}=r||{};f(i)}catch(r){console.log(r)}})(),(async()=>{const e={kind:"FAMILY"};try{const{data:r}=await a(Al(null===n||void 0===n?void 0:n.id,null===t||void 0===t?void 0:t.id,e)),{content:i}=r||{};v(i)}catch(r){console.log(r)}})(),(async()=>{try{const{data:e}=await a(Ol(null===n||void 0===n?void 0:n.id,null===t||void 0===t?void 0:t.id));j(e)}catch(e){console.log(e)}})(),(async()=>{try{const e={sort_by:"created_at",sort_order:"desc"},{data:r}=await a(Vl(null===n||void 0===n?void 0:n.id,null===t||void 0===t?void 0:t.id,(0,i.A)({},e),{start_date:null===o||void 0===o?void 0:o.start_date,end_date:null===o||void 0===o?void 0:o.end_date})),s=T(r),l=[],c=[],d=[],u=[],p=[];s&&Array.isArray(s)&&s.forEach(e=>{const t=null===e||void 0===e?void 0:e.medicationList,n=null===e||void 0===e?void 0:e.complaints,r=null===e||void 0===e?void 0:e.advices,i=null===e||void 0===e?void 0:e.diagnosis,o=null===e||void 0===e?void 0:e.tests;t&&Array.isArray(t)&&l.push(...t),n&&Array.isArray(n)&&c.push(...n),r&&Array.isArray(r)&&d.push(...r),i&&Array.isArray(i)&&p.push(...i),o&&Array.isArray(o)&&u.push(...o)}),C({presList:l,symptomsList:Os(c,"name"),advicesList:[...new Set(d)],testsList:[...new Set(u)],diagnosisList:Os(p,"name")})}catch(e){console.log(e)}})(),(async()=>{try{const e={sort_by:"created_at",sort_order:"desc"},{data:r}=await a(Il(null===n||void 0===n?void 0:n.id,null===t||void 0===t?void 0:t.id,{type:"DOCTOR"},(0,i.A)({per_page:999},e),{start_date:null===o||void 0===o?void 0:o.start_date,end_date:null===o||void 0===o?void 0:o.end_date})),{content:s}=r||{},l=null===s||void 0===s?void 0:s.filter(e=>"glucose"===e.vital);S(l)}catch(e){console.log(e)}})(),(async()=>{try{var e;const{data:n}=await a(ml(null===t||void 0===t?void 0:t.id,null===r||void 0===r||null===(e=r.schedule)||void 0===e?void 0:e.id,null===r||void 0===r?void 0:r.id));!cs(n)&&k(n)}catch(n){console.log("fetchPatientMissedReading="+n)}})())},[t,n]);const E=[{id:"time",label:s("rpm_Time"),isSort:!1,sortProperty:"time"},{id:"glucose",label:s("rpm_Glucose"),isSort:!1,sortProperty:"glucose"},{id:"event",label:s("rpm_Event"),isSort:!1,sortProperty:"event"},{id:"condition",label:s("rpm_Condition"),isSort:!1,sortProperty:"condition"}],M=[{id:"disease",label:s("rpm_DiseaseName"),isSort:!1,sortProperty:"disease"},{id:"duration",label:s("rpm_Duration"),isSort:!1,sortProperty:"duration"},{id:"remarks",label:s("rpm_Remarks"),isSort:!1,sortProperty:"remarks"}],O=[{id:"medicine",label:s("rpm_Medicine"),isSort:!1,sortProperty:"medicine"},{id:"frequency",label:s("rpm_Frequency"),isSort:!1,sortProperty:"frequency"},{id:"duration",label:s("rpm_Duration"),isSort:!1,sortProperty:"duration"},{id:"comments",label:s("rpm_Comments"),isSort:!1,sortProperty:"comments"}],R=[{id:"date",label:s("rpm_Date"),isSort:!1,sortProperty:"date"},{id:"advised_by",label:s("rpm_AdvisedBy"),isSort:!1,sortProperty:"advised_by"},{id:"comments",label:s("rpm_Comments"),isSort:!1,sortProperty:"comments"}];return(0,qt.jsx)(qt.Fragment,{children:(0,qt.jsx)(Xwe,{program:n,patientData:t,headCellsItems:E,patientGlucoseReport:l,activeGlucoseCourse:r,states:p,countries:d,selfDisease:m,familyDisease:g,alertPercent:x,socialHistory:b,personalDiseaseHead:M,notesList:_,prescribedHead:O,consultNotesList:w,consultationHead:R,patientMissedReading:A,filterDate:o})})};const eSe=function(e){var t,n,r,i,o,a,s,l,c,d,u,p,h,m,f,g,v,x,y,b,j,_,C,w,S,A,k,T,E,M;let{patientData:O,program:R,headCellsItems:P,patientBpReport:D,activeCourse:N,countries:L,states:I,selfDisease:F,familyDisease:$,alertPercent:B,patientMissedReading:z,filterDate:H}=e;const W=Nt(),{t:U}=Vg(),V=so(),{years:G}=vs(null===O||void 0===O?void 0:O.birth_date),q=We.useRef(),Y=(0,vwe.useReactToPrint)({content:()=>q.current,documentTitle:"".concat(null===R||void 0===R?void 0:R.code,"_").concat(null===O||void 0===O?void 0:O.first_name,"_report_").concat(null!==N&&void 0!==N&&null!==(t=N.schedule)&&void 0!==t&&t.vital_name?null===N||void 0===N||null===(n=N.schedule)||void 0===n?void 0:n.vital_name:"NA")}),Z=(null===R||void 0===R?void 0:R.image)instanceof File?URL.createObjectURL(null===R||void 0===R?void 0:R.image):null===R||void 0===R?void 0:R.image,K=(e,t,n)=>{const r=sa()(t).format("YYYY"),i=sa()(n).format("YYYY");return"CUSTOM"===e?"".concat(r," - ").concat(i):"PRESENT"===e?"".concat(r," - ").concat(e):void 0},X=(e,t)=>{var n;const r=null===e||void 0===e||null===(n=e.alerts)||void 0===n?void 0:n.find(e=>e.data_name===t);return{reading:(0,qt.jsx)(qt.Fragment,{children:cs(r)?(0,qt.jsx)(op,{className:"normal",display:"inline-flex",width:30,justifyContent:"center",children:(0,qt.jsx)(op,{component:"span",children:e.values[t]})}):(0,qt.jsx)(op,{className:null===r||void 0===r?void 0:r.text,display:"inline-flex",width:30,justifyContent:"center",children:(0,qt.jsx)(op,{component:"span",children:e.values[t]})})}),stage:cs(r)?"Normal":U("rpm_".concat(null===r||void 0===r?void 0:r.text))}},Q=[{value:"CheckLowBP",color:null===Qde||void 0===Qde||null===(r=Qde.palette)||void 0===r?void 0:r.orange[300],darkColor:null===Qde||void 0===Qde||null===(i=Qde.palette)||void 0===i?void 0:i.orange[700]},{value:"ElevatedBloodPressure",color:null===Qde||void 0===Qde||null===(o=Qde.palette)||void 0===o?void 0:o.orange[600],darkColor:null===Qde||void 0===Qde||null===(a=Qde.palette)||void 0===a?void 0:a.orange[900]},{value:"Hypertension_Stage1",color:null===Qde||void 0===Qde||null===(s=Qde.palette)||void 0===s?void 0:s.red[300],darkColor:null===Qde||void 0===Qde||null===(l=Qde.palette)||void 0===l?void 0:l.red[500]},{value:"Hypertensive_Stage2",color:null===Qde||void 0===Qde||null===(c=Qde.palette)||void 0===c?void 0:c.red[500],darkColor:null===Qde||void 0===Qde||null===(d=Qde.palette)||void 0===d?void 0:d.red[700]},{value:"Hypertensive_Crisis",color:null===Qde||void 0===Qde||null===(u=Qde.palette)||void 0===u?void 0:u.red[700],darkColor:null===Qde||void 0===Qde||null===(p=Qde.palette)||void 0===p?void 0:p.red[900]},{value:"normal",color:null===Qde||void 0===Qde||null===(h=Qde.palette)||void 0===h?void 0:h.green[300],darkColor:null===Qde||void 0===Qde||null===(m=Qde.palette)||void 0===m?void 0:m.green[700]}],J=e=>{let{legend:t}=e;return t.length>0&&(0,qt.jsx)(op,{textAlign:"center",children:(0,qt.jsx)(op,{component:"ul",p:0,m:0,children:null===Q||void 0===Q?void 0:Q.map((e,t)=>(0,qt.jsxs)(op,{component:"li",fontSize:12,display:"inline-flex",alignItems:"center",sx:{listStyle:"none",mr:1,lineHeight:1},children:[(0,qt.jsx)(kbe.A,{sx:{width:8,height:8,color:e.color}}),(0,qt.jsx)(op,{component:"span",ml:1,color:e.darkColor,children:U("rpm_".concat(e.value))})]},t))})})};return(0,qt.jsxs)(qt.Fragment,{children:[(0,qt.jsx)(Gwe,{}),(0,qt.jsxs)(op,{sx:{maxWidth:700,mx:"auto"},children:[(0,qt.jsx)(op,{px:2,children:(0,qt.jsxs)(Ff,{container:!0,spacing:2,justifyContent:"center",children:[(0,qt.jsx)(Ff,{item:!0,children:(0,qt.jsx)(xh,{variant:"outlined",disableRipple:!0,onClick:()=>V(-1),children:U("rpm_Cancel")})}),(0,qt.jsx)(Ff,{item:!0,children:(0,qt.jsx)(xh,{variant:"contained",color:"primary",disableElevation:!0,onClick:Y,children:U("rpm_Print")})}),(0,qt.jsx)(Ff,{item:!0,children:"course"==(null===H||void 0===H?void 0:H.report)?(0,qt.jsx)(xh,{variant:"contained",color:"primary",disableElevation:!0,onClick:()=>{var e;return Zd(W,null===O||void 0===O?void 0:O.id,null===N||void 0===N?void 0:N.id,"bp",null===H||void 0===H?void 0:H.start_date,null===H||void 0===H?void 0:H.end_date,null===R||void 0===R?void 0:R.code,null===N||void 0===N||null===(e=N.schedule)||void 0===e?void 0:e.id)},children:U("rpm_Download")}):(0,qt.jsx)(xh,{variant:"contained",color:"primary",disableElevation:!0,onClick:()=>Zd(W,null===O||void 0===O?void 0:O.id,null===N||void 0===N?void 0:N.id,"bp",null===H||void 0===H?void 0:H.start_date,null===H||void 0===H?void 0:H.end_date,"",""),children:U("rpm_Download")})})]})}),(0,qt.jsx)(Vw,{ref:q,sx:{p:2,overflowX:"inherit"},children:(0,qt.jsx)(Bw,{size:"small",sx:{bgcolor:"white",border:"1px solid",borderColor:"grey.500"},children:(0,qt.jsxs)(fS,{sx:{"& tr td":{borderBottom:0,whiteSpace:"normal",py:.275}},children:[(0,qt.jsxs)(cw,{children:[(0,qt.jsx)(gw,{sx:{borderRight:"1px solid",borderColor:"grey.500"},children:(0,qt.jsxs)(op,{sx:{display:"flex",alignItems:"flex-start"},children:[cs(Z)?(0,qt.jsx)(Uwe.A,{sx:{color:"primary.theme.500",fontSize:60}}):(0,qt.jsx)(op,{sx:{p:.5,display:"flex",borderRadius:1,border:"2px solid #ebebeb",flexGrow:.1,justifyContent:"center"},children:(0,qt.jsx)("img",{src:Z,width:80,height:80})}),(0,qt.jsxs)(op,{sx:{flexGrow:.6,ml:2},children:[(0,qt.jsx)(Cf,{variant:"h6",component:"h6",fontWeight:500,children:cs(R)?(0,qt.jsx)(lS,{}):null!==R&&void 0!==R&&R.display_name?null===R||void 0===R?void 0:R.display_name:"NA"}),(0,qt.jsxs)(Cf,{variant:"body2",component:"p",sx:{mt:.5},children:[cs(R)?(0,qt.jsx)(lS,{width:50,sx:{display:"inline-block"}}):null!==R&&void 0!==R&&R.city?(null===R||void 0===R?void 0:R.city)+", ":"NA",cs(I)?(0,qt.jsx)(lS,{width:50,sx:{display:"inline-block",ml:1}}):null!==I&&void 0!==I&&I.name?null===I||void 0===I?void 0:I.name:"NA"]}),(0,qt.jsx)(Cf,{variant:"body2",component:"p",sx:{mt:.5},children:cs(L)?(0,qt.jsx)(lS,{width:50}):null!==L&&void 0!==L&&L.name?null===L||void 0===L?void 0:L.name:"NA"})]})]})}),(0,qt.jsxs)(gw,{width:"40%",p:.5,children:[(0,qt.jsxs)(pE,{flexDirection:"row",mb:.25,children:[(0,qt.jsx)(Cf,{variant:"body2",fontWeight:"h6.fontWeight",sx:{flex:1},color:"primary",children:U("rpm_PatientName")}),(0,qt.jsx)(op,{children:cs(O)?(0,qt.jsx)(lS,{width:50}):(0,qt.jsx)(Cf,{variant:"body2",fontWeight:"h6.fontWeight",component:"p",children:(null===O||void 0===O?void 0:O.first_name)+" "+(null===O||void 0===O?void 0:O.last_name)})})]}),(0,qt.jsxs)(pE,{flexDirection:"row",mb:.25,children:[(0,qt.jsx)(Cf,{variant:"body2",fontWeight:"h6.fontWeight",sx:{flex:1},color:"primary",children:U("rpm_AgeGender")}),(0,qt.jsx)(op,{children:cs(O)?(0,qt.jsx)(lS,{width:50}):(0,qt.jsxs)(Cf,{variant:"body2",fontWeight:"h6.fontWeight",component:"p",children:[null!==O&&void 0!==O&&O.birth_date?"".concat(G,"yrs"):"NA",null!==O&&void 0!==O&&null!==(f=O.profile)&&void 0!==f&&f.gender?", ".concat(null===O||void 0===O||null===(g=O.profile)||void 0===g?void 0:g.gender):""]})})]}),(0,qt.jsxs)(pE,{flexDirection:"row",mb:.25,children:[(0,qt.jsx)(Cf,{variant:"body2",component:"p",fontWeight:"h6.fontWeight",sx:{flex:1},color:"primary",children:U("rpm_Mobile")}),(0,qt.jsx)(op,{children:cs(O)?(0,qt.jsx)(lS,{width:50}):(0,qt.jsx)(Cf,{variant:"body2",fontWeight:"h6.fontWeight",component:"p",children:null!==O&&void 0!==O&&O.mobile?null===O||void 0===O?void 0:O.mobile:"NA"})})]}),(0,qt.jsxs)(pE,{flexDirection:"row",mb:.25,children:[(0,qt.jsx)(Cf,{variant:"body2",component:"p",fontWeight:"h6.fontWeight",sx:{flex:1},color:"primary",children:U("rpm_VitalStats")}),(0,qt.jsx)(op,{children:cs(O)?(0,qt.jsx)(lS,{width:50}):(0,qt.jsxs)(Cf,{variant:"body2",fontWeight:"h6.fontWeight",component:"p",children:[null!==O&&void 0!==O&&null!==(v=O.patient_health_profile)&&void 0!==v&&null!==(x=v.height)&&void 0!==x&&x.split(".")[0]?(null===O||void 0===O||null===(y=O.patient_health_profile)||void 0===y||null===(b=y.height)||void 0===b?void 0:b.split(".")[0])+"''"+(null===O||void 0===O||null===(j=O.patient_health_profile)||void 0===j||null===(_=j.height)||void 0===_?void 0:_.split(".")[1])+" ft.":"NA"," "," / ",null!==O&&void 0!==O&&null!==(C=O.patient_health_profile)&&void 0!==C&&C.weight?(null===O||void 0===O||null===(w=O.patient_health_profile)||void 0===w?void 0:w.weight)+"kg":"NA"]})})]}),(0,qt.jsxs)(pE,{flexDirection:"row",mb:.25,children:[(0,qt.jsx)(Cf,{variant:"body2",component:"p",fontWeight:"h6.fontWeight",sx:{flex:1},color:"primary",children:U("rpm_BMI")}),(0,qt.jsx)(op,{children:cs(O)?(0,qt.jsx)(lS,{width:50}):(0,qt.jsx)(Cf,{variant:"body2",fontWeight:"h6.fontWeight",component:"p",children:null!==O&&void 0!==O&&null!==(S=O.patient_health_profile)&&void 0!==S&&S.weight?Ps(null===O||void 0===O||null===(A=O.patient_health_profile)||void 0===A?void 0:A.height,null===O||void 0===O||null===(k=O.patient_health_profile)||void 0===k?void 0:k.weight):"NA"})})]})]})]}),(0,qt.jsx)(cw,{sx:{borderTop:"1px solid",borderColor:"grey.500"},children:(0,qt.jsx)(gw,{colSpan:2,sx:{p:0},children:(0,qt.jsx)(Bw,{size:"small",children:(0,qt.jsx)(fS,{children:(0,qt.jsxs)(cw,{children:[(0,qt.jsxs)(gw,{width:"45%",sx:{borderRight:"1px solid",borderColor:"grey.500",verticalAlign:"top"},children:[(0,qt.jsx)(Cf,{variant:"body1",component:"h6",fontWeight:500,fontSize:14,sx:{position:"relative",mb:2,"&::after":{content:'""',position:"absolute",bottom:-5,left:0,height:"2px",width:"60px",bgcolor:"grey.700"}},children:U("rpm_MedicalHistory")}),(0,qt.jsxs)(op,{minHeight:92,children:[(0,qt.jsxs)(pE,{flexDirection:"row",mb:.5,sx:{background:"#f9f9ff",color:"7986cb"},children:[(0,qt.jsx)(Cf,{variant:"body2",fontWeight:"h6.fontWeight",sx:{flex:1},color:"primary",children:U("rpm_Condition")}),(0,qt.jsx)(Cf,{variant:"body2",fontWeight:"h6.fontWeight",sx:{flex:1},color:"primary",children:U("rpm_Duration")})]}),null===F||void 0===F||null===(T=F.slice(0,3))||void 0===T?void 0:T.map(e=>(0,qt.jsxs)(pE,{flexDirection:"row",mb:.5,children:[(0,qt.jsx)(Cf,{variant:"body2",fontWeight:"h6.fontWeight",sx:{flex:1},children:null===e||void 0===e?void 0:e.disease_name}),(0,qt.jsx)(op,{sx:{flex:1},children:(0,qt.jsx)(Cf,{variant:"body2",fontWeight:"h6.fontWeight",component:"p",children:e.custom_duration?e.custom_duration+" "+(null===e||void 0===e?void 0:e.duration_unit):K(e.duration_unit,null===e||void 0===e?void 0:e.start_date,e.end_date)})})]},e.id))]})]}),(0,qt.jsxs)(gw,{sx:{verticalAlign:"top"},children:[(0,qt.jsx)(Cf,{variant:"body1",component:"h6",fontWeight:500,fontSize:14,sx:{position:"relative",mb:2,"&::after":{content:'""',position:"absolute",bottom:-5,left:0,height:"2px",width:"60px",bgcolor:"grey.700"}},children:U("rpm_FamilyMedicalHistory")}),(0,qt.jsxs)(op,{minHeight:92,children:[(0,qt.jsxs)(pE,{flexDirection:"row",mb:.5,sx:{background:"#f9f9ff",color:"7986cb"},children:[(0,qt.jsx)(Cf,{variant:"body2",fontWeight:"h6.fontWeight",sx:{flex:1},color:"primary",children:U("rpm_Relation")}),(0,qt.jsx)(Cf,{variant:"body2",fontWeight:"h6.fontWeight",sx:{flex:1},color:"primary",children:U("rpm_Condition")}),(0,qt.jsx)(Cf,{variant:"body2",fontWeight:"h6.fontWeight",sx:{flex:1},color:"primary",children:U("rpm_Duration")})]}),null===$||void 0===$||null===(E=$.slice(0,3))||void 0===E?void 0:E.map(e=>(0,qt.jsxs)(pE,{flexDirection:"row",mb:.5,children:[(0,qt.jsx)(Cf,{variant:"body2",fontWeight:"h6.fontWeight",sx:{flex:1},children:e.relationship}),(0,qt.jsx)(Cf,{variant:"body2",fontWeight:"h6.fontWeight",sx:{flex:1},children:e.disease_name?e.disease_name:"NA"}),(0,qt.jsx)(op,{sx:{flex:1},children:(0,qt.jsx)(Cf,{variant:"body2",fontWeight:"h6.fontWeight",component:"p",children:e.custom_duration?e.custom_duration+" "+(null===e||void 0===e?void 0:e.duration_unit):K(e.duration_unit,null===e||void 0===e?void 0:e.start_date,e.end_date)})})]},e.id))]})]})]})})})})}),(0,qt.jsx)(cw,{sx:{borderTop:"1px solid",borderColor:"grey.500"},children:(0,qt.jsx)(gw,{colSpan:2,sx:{bgcolor:"primary.theme.300"},children:(0,qt.jsx)(Cf,{variant:"body1",component:"h6",fontWeight:500,textAlign:"center",color:"white",py:.5,children:"course"===(null===H||void 0===H?void 0:H.report)?"".concat(U("rpm_COURSE")," : ").concat(cs(N)?"...":null===N||void 0===N||null===(M=N.schedule)||void 0===M?void 0:M.name,"                   \n                        (").concat(sa()(null===H||void 0===H?void 0:H.start_date).format("DD MMM YYYY")," to ").concat(sa()(null===H||void 0===H?void 0:H.end_date).format("DD MMM YYYY"),")"):"".concat(U("rpm_Duration")," :              \n                      (").concat(sa()(null===H||void 0===H?void 0:H.start_date).format("DD MMM YYYY")," to ").concat(sa()(null===H||void 0===H?void 0:H.end_date).format("DD MMM YYYY"),")")})})}),(0,qt.jsx)(cw,{sx:{borderTop:"1px solid",borderColor:"grey.500"},children:(0,qt.jsx)(gw,{colSpan:2,sx:{p:0},children:(0,qt.jsx)(Bw,{size:"small",sx:{maxWidth:"100%"},children:(0,qt.jsxs)(fS,{children:[(0,qt.jsxs)(cw,{children:[(0,qt.jsxs)(gw,{sx:{width:"60%",fontSize:12},children:[cs(D)?(0,qt.jsx)(op,{height:"100%",children:(0,qt.jsx)("img",{src:GC,style:{display:"block",margin:"auto",maxWidth:"100%",maxHeight:180}})}):(0,qt.jsx)(op,{height:180,children:(0,qt.jsx)(qbe,{patientBpReport:D,getAlertClassName:Es})}),cs(D)?(0,qt.jsx)(op,{height:"100%",children:(0,qt.jsx)("img",{src:GC,style:{display:"block",margin:"auto",maxWidth:"100%",maxHeight:180}})}):(0,qt.jsx)(op,{sx:{height:"180px"},children:(0,qt.jsx)(Kbe,{patientBpReport:D})})]}),(0,qt.jsxs)(gw,{sx:{width:"40%"},children:[cs(D)?(0,qt.jsx)(op,{height:"100%",children:(0,qt.jsx)("img",{src:GC,style:{display:"block",margin:"auto",maxWidth:"100%",maxHeight:180}})}):(0,qt.jsx)(op,{sx:{height:"200px"},children:(0,qt.jsx)(Qbe,{stageAlertData:D,height:200,width:200})}),(0,qt.jsxs)(op,{display:"inline-block",children:["course"===(null===H||void 0===H?void 0:H.report)&&(0,qt.jsxs)(op,{sx:{display:"flex",alignItems:"flex-start",mt:2},children:[(0,qt.jsx)(op,{sx:{display:"flex",p:1,bgcolor:"orange.50",borderRadius:1},children:(0,qt.jsx)(Vwe.A,{sx:{color:"orange.500"}})}),(0,qt.jsxs)(op,{sx:{flexGrow:1,ml:2},children:[(0,qt.jsx)(Cf,{variant:"body2",component:"p",fontWeight:500,children:U("rpm_Status")}),"NON_COMPLIANT"==(null===z||void 0===z?void 0:z.status)?(0,qt.jsx)(op,{component:"span",sx:e=>({py:.25,px:1,color:e.palette.red[900],backgroundColor:e.palette.red[100],display:"inline-flex",fontSize:e.spacing(1.5),borderRadius:.5,fontWeight:600}),children:"NON-COMPLIANT"}):(0,qt.jsx)(op,{component:"span",sx:e=>({py:.25,px:1,color:e.palette.green[900],backgroundColor:e.palette.green[100],display:"inline-flex",fontSize:e.spacing(1.25),borderRadius:.5,fontWeight:600}),children:"COMPLIANT"})]})]}),(0,qt.jsxs)(op,{sx:{display:"flex",alignItems:"flex-start",mt:2},children:[(0,qt.jsx)(op,{sx:{display:"flex",p:1,bgcolor:"red.50",borderRadius:1},children:(0,qt.jsx)(Tbe.A,{sx:{color:"red.500"}})}),(0,qt.jsxs)(op,{sx:{flexGrow:1,ml:2},children:[(0,qt.jsx)(Cf,{variant:"body2",component:"p",fontWeight:500,children:U("rpm_ReadingAlerts")}),(0,qt.jsx)(Cf,{variant:"h6",component:"h6",lineHeight:"1",sx:{mt:.5},children:B?"".concat(B,"%"):"NA"})]})]})]})]})]}),(0,qt.jsx)(cw,{children:(0,qt.jsx)(gw,{colSpan:"2",children:(0,qt.jsx)(op,{maxWidth:550,m:"auto",children:(0,qt.jsx)(J,{legend:Q})})})})]})})})}),(0,qt.jsx)(cw,{sx:{borderTop:"1px solid",borderColor:"grey.500"},children:(0,qt.jsx)(gw,{colSpan:2,sx:{p:0},children:(0,qt.jsx)(Bw,{size:"small",sx:{maxWidth:"100%"},children:(0,qt.jsx)(fS,{children:(0,qt.jsxs)(cw,{children:[(0,qt.jsxs)(gw,{sx:{width:"50%"},children:[(0,qt.jsx)(Cf,{variant:"body1",component:"h6",fontWeight:500,fontSize:14,sx:{position:"relative",mb:2,"&::after":{content:'""',position:"absolute",bottom:-5,left:0,height:"2px",width:"60px",bgcolor:"grey.700"}},children:U("rpm_RecentReadings")}),D?(0,qt.jsx)(op,{sx:{"& .MuiTableContainer-root":{border:"none"},"& .MuiTableCell-root":{p:.25,fontSize:12,"& div":{py:.375,px:.75,lineHeight:1}},"& img":{maxHeight:200}},children:(0,qt.jsx)(UT,{data:D,headCells:P,noDataImage:GC,skeletonVrows:6,stickyHeader:!0,scrollHeight:500,className:"theme_scroll",children:null===D||void 0===D?void 0:D.slice(0,10).map(e=>{var t;return(0,qt.jsxs)(cw,{sx:{"&:last-child td, &:last-child th":{border:0}},children:[(0,qt.jsx)(gw,{children:e.ts}),(0,qt.jsx)(gw,{children:e.values.systolic?X(e,"systolic").reading:"NA"}),(0,qt.jsx)(gw,{children:e.values.diastolic?X(e,"diastolic").reading:"NA"}),(0,qt.jsx)(gw,{children:e.values.pulse?null===(t=X(e,"pulse"))||void 0===t?void 0:t.reading:"NA"})]},e.id)})})}):(0,qt.jsx)(op,{height:"100%",children:(0,qt.jsx)("img",{src:GC,style:{display:"block",margin:"auto",maxWidth:"100%",maxHeight:180}})})]}),(0,qt.jsxs)(gw,{sx:{width:"50%",verticalAlign:"top"},children:[(0,qt.jsx)(Cf,{variant:"body1",component:"h6",fontWeight:500,fontSize:14,sx:{position:"relative",mb:2,"&::after":{content:'""',position:"absolute",bottom:-5,left:0,height:"2px",width:"60px",bgcolor:"grey.700"}},children:U("rpm_DoctorNotes")}),[1,2,3,4,5,6].map(e=>(0,qt.jsx)(op,{mb:.5,sx:{borderBottom:"1px solid #616161",height:30}},e)),(0,qt.jsx)(Cf,{variant:"body2",textAlign:"right",mt:2,fontWeight:500,sx:{fontStyle:"italic"},children:U("rpm_Signature")})]})]})})})})}),(0,qt.jsx)(cw,{sx:{borderTop:"1px solid",borderColor:"grey.500"},children:(0,qt.jsx)(gw,{colSpan:2,children:(0,qt.jsxs)(Ff,{container:!0,spacing:2,alignItems:"center",children:[(0,qt.jsx)(Ff,{item:!0,xs:!0,children:(0,qt.jsxs)(Cf,{variant:"body2",fontWeight:500,fontSize:10,sx:{fontStyle:"italic",color:"grey.600",textAlign:"justify"},children:[(0,qt.jsx)(op,{component:"span",fontWeight:600,children:"DISCLAIMER:"})," ","THIS WEBSITE DOES NOT PROVIDE MEDICAL ADVICE. The information, including but not limited to, text, graphics, images, and other material contained on this website is for informational purposes only. No material on this site is intended to be a substitute for a qualified medical professional. All analysis are subject to clinical interpretation by a qualified medical professional."]})}),(0,qt.jsx)(Ff,{item:!0,children:(0,qt.jsx)("img",{src:cv,height:30})})]})})})]})})})]})]})};const tSe=function(e){let{patientData:t,program:n}=e;const r=$o.getPatientDefaultCourse("course"),i=$o.getFilterDate("filterDate"),o=Nt(),{t:a}=Vg(),[s,l]=We.useState(null),[c,d]=We.useState({}),[u,p]=We.useState({}),[h,m]=We.useState(null),[f,g]=We.useState(null),[v,x]=We.useState(null),[y,b]=We.useState(null),j=async()=>{const e={patient_id:null===t||void 0===t?void 0:t.id,desease:["bp"],duration:[null===i||void 0===i?void 0:i.start_date,null===i||void 0===i?void 0:i.end_date]};try{const{data:t}=await o(fl(e));if(l(t),!cs(t)){const e=null===t||void 0===t?void 0:t.filter(e=>{if(e.alerts){const t=e.alerts.find(e=>"pulse"!==e.data_name);if(!cs(t))return!0}}),n=Math.round(100*e.length/t.length);x(n)}}catch(n){o(Zo({subTitle:n.message,severity:ud.ERROR}))}},_=async e=>{await o(uue({perPage:"10000",countryCode:e.country},"RPM",t=>{var n,r;let{countries:i,states:o}=t;const a=null===i||void 0===i||null===(n=i.content)||void 0===n?void 0:n.find(t=>t.isoCode===e.country),s=null===o||void 0===o||null===(r=o.content)||void 0===r?void 0:r.find(t=>t.isoCode===e.state);d(a),p(s)},()=>{}))},C=async()=>{const e={kind:"SELF"};try{const{data:r}=await o(Al(null===n||void 0===n?void 0:n.id,null===t||void 0===t?void 0:t.id,e)),{content:i}=r||{};m(i)}catch(r){console.log(r)}},w=async()=>{const e={kind:"FAMILY"};try{const{data:r}=await o(Al(null===n||void 0===n?void 0:n.id,null===t||void 0===t?void 0:t.id,e)),{content:i}=r||{};g(i)}catch(r){console.log(r)}},S=async()=>{try{var e;const{data:n}=await o(ml(null===t||void 0===t?void 0:t.id,null===r||void 0===r||null===(e=r.schedule)||void 0===e?void 0:e.id,null===r||void 0===r?void 0:r.id));!cs(n)&&b(n)}catch(n){console.log("fetchPatientMissedReading="+n)}};We.useEffect(()=>{if(!cs(t)&&!cs(n)){o(NC({activeMenuItem:"report"}))}},[t,n]),We.useEffect(()=>{cs(t)||cs(n)||cs(r)||(j(),_(n),C(),w(),S()),cs(t)||cs(n)||cs(i)||(j(),_(n),C(),w(),S())},[t,n]);const A=[{id:"time",label:a("rpm_Time"),isSort:!1,sortProperty:"time"},{id:"systolic",label:a("rpm_Systolic"),isSort:!1,sortProperty:"systolic"},{id:"diastolic",label:a("rpm_Diastolic"),isSort:!1,sortProperty:"diastolic"},{id:"pulse",label:a("rpm_Pulse"),isSort:!1,sortProperty:"pulse"}];return(0,qt.jsx)(qt.Fragment,{children:(0,qt.jsx)(eSe,{program:n,patientData:t,headCellsItems:A,patientBpReport:s,activeCourse:r,states:u,countries:c,selfDisease:h,familyDisease:f,alertPercent:v,patientMissedReading:y,filterDate:i})})};const nSe=function(e){var t,n,r,i,o,a,s,l,c,d,u,p,h,m,f,g,v,x,y,b,j,_,C,w,S,A,k,T,E,M,O,R,P,D;let{patientData:N,program:L,headCellsItems:I,patientBpReport:F,activeCourse:$,countries:B,states:z,selfDisease:H,familyDisease:W,alertPercent:U,socialHistory:V,personalDiseaseHead:G,familyDiseaseHead:q,notesList:Y,prescribedHead:Z,consultNotesList:K,consultationHead:X,patientMissedReading:Q,filterDate:J}=e;const ee=Nt(),{t:te}=Vg(),ne=so(),{years:re}=vs(null===N||void 0===N?void 0:N.birth_date),ie=We.useRef(),oe=(0,vwe.useReactToPrint)({content:()=>ie.current,documentTitle:"".concat(null===L||void 0===L?void 0:L.code,"_").concat(null===N||void 0===N?void 0:N.first_name,"_report_").concat(null!==$&&void 0!==$&&null!==(t=$.schedule)&&void 0!==t&&t.vital_name?null===$||void 0===$||null===(n=$.schedule)||void 0===n?void 0:n.vital_name:"NA")}),ae=(null===L||void 0===L?void 0:L.image)instanceof File?URL.createObjectURL(null===L||void 0===L?void 0:L.image):null===L||void 0===L?void 0:L.image,se=(e,t,n)=>{const r=sa()(t).format("YYYY"),i=sa()(n).format("YYYY");return"CUSTOM"===e?"".concat(r," - ").concat(i):"PRESENT"===e?"".concat(r," - ").concat(e):"NA"},le=(e,t)=>{const n=Es(e);return{reading:(0,qt.jsx)(qt.Fragment,{children:n?(0,qt.jsx)(op,{className:Es(e),display:"inline-flex",width:30,justifyContent:"center",children:(0,qt.jsx)(op,{component:"span",children:e.values[t]})}):(0,qt.jsx)(op,{className:"normal",display:"inline-flex",width:30,justifyContent:"center",children:(0,qt.jsx)(op,{component:"span",children:e.values[t]})})}),stage:n?te("rpm_".concat(Es(e))):"Normal"}},ce=(e,t)=>{const n=Rs(e);return{reading:(0,qt.jsx)(qt.Fragment,{children:n?(0,qt.jsx)(op,{className:Rs(e),display:"inline-flex",width:30,justifyContent:"center",children:(0,qt.jsx)(op,{component:"span",children:e.values[t]})}):(0,qt.jsx)(op,{className:"normal",display:"inline-flex",width:30,justifyContent:"center",children:(0,qt.jsx)(op,{component:"span",children:e.values[t]})})}),stage:n?te("rpm_".concat(Rs(e))):"Normal"}},de=[{value:"CheckLowBP",color:null===Qde||void 0===Qde||null===(r=Qde.palette)||void 0===r?void 0:r.orange[300],darkColor:null===Qde||void 0===Qde||null===(i=Qde.palette)||void 0===i?void 0:i.orange[700]},{value:"ElevatedBloodPressure",color:null===Qde||void 0===Qde||null===(o=Qde.palette)||void 0===o?void 0:o.orange[600],darkColor:null===Qde||void 0===Qde||null===(a=Qde.palette)||void 0===a?void 0:a.orange[900]},{value:"Hypertension_Stage1",color:null===Qde||void 0===Qde||null===(s=Qde.palette)||void 0===s?void 0:s.red[300],darkColor:null===Qde||void 0===Qde||null===(l=Qde.palette)||void 0===l?void 0:l.red[500]},{value:"Hypertensive_Stage2",color:null===Qde||void 0===Qde||null===(c=Qde.palette)||void 0===c?void 0:c.red[500],darkColor:null===Qde||void 0===Qde||null===(d=Qde.palette)||void 0===d?void 0:d.red[700]},{value:"Hypertensive_Crisis",color:null===Qde||void 0===Qde||null===(u=Qde.palette)||void 0===u?void 0:u.red[700],darkColor:null===Qde||void 0===Qde||null===(p=Qde.palette)||void 0===p?void 0:p.red[900]},{value:"normal",color:null===Qde||void 0===Qde||null===(h=Qde.palette)||void 0===h?void 0:h.green[300],darkColor:null===Qde||void 0===Qde||null===(m=Qde.palette)||void 0===m?void 0:m.green[700]}],ue=e=>{let{legend:t}=e;return t.length>0&&(0,qt.jsx)(op,{textAlign:"center",children:(0,qt.jsx)(op,{component:"ul",p:0,m:0,children:null===de||void 0===de?void 0:de.map((e,t)=>(0,qt.jsxs)(op,{component:"li",fontSize:14,display:"inline-flex",sx:{listStyle:"none",mr:1,mb:.5,lineHeight:1},children:[(0,qt.jsx)(kbe.A,{sx:{width:10,height:10,color:e.color}}),(0,qt.jsx)(op,{component:"span",ml:1,color:e.darkColor,children:te("rpm_".concat(e.value))})]},t))})})};return(0,qt.jsxs)(qt.Fragment,{children:[(0,qt.jsx)("style",{children:"@page {size: auto; margin: 4mm 2mm 4mm 2mm; }"}),(0,qt.jsx)(Gwe,{}),(0,qt.jsxs)(op,{className:"detailed_report",sx:{maxWidth:700,mx:"auto"},children:[(0,qt.jsx)(op,{px:2,children:(0,qt.jsxs)(Ff,{container:!0,spacing:2,justifyContent:"center",children:[(0,qt.jsx)(Ff,{item:!0,children:(0,qt.jsx)(xh,{variant:"outlined",disableRipple:!0,onClick:()=>ne(-1),children:te("rpm_Cancel")})}),(0,qt.jsx)(Ff,{item:!0,children:(0,qt.jsx)(xh,{variant:"contained",color:"primary",disableElevation:!0,onClick:oe,children:te("rpm_Print")})}),(0,qt.jsx)(Ff,{item:!0,children:"course"==(null===J||void 0===J?void 0:J.report)?(0,qt.jsx)(xh,{variant:"contained",color:"primary",disableElevation:!0,onClick:()=>{var e;return Kd(ee,null===N||void 0===N?void 0:N.id,null===$||void 0===$?void 0:$.id,"bp",null===J||void 0===J?void 0:J.start_date,null===J||void 0===J?void 0:J.end_date,null===L||void 0===L?void 0:L.code,null===$||void 0===$||null===(e=$.schedule)||void 0===e?void 0:e.id)},children:te("rpm_Download")}):(0,qt.jsx)(xh,{variant:"contained",color:"primary",disableElevation:!0,onClick:()=>Kd(ee,null===N||void 0===N?void 0:N.id,null===$||void 0===$?void 0:$.id,"bp",null===J||void 0===J?void 0:J.start_date,null===J||void 0===J?void 0:J.end_date,"",""),children:te("rpm_Download")})})]})}),(0,qt.jsx)(Vw,{ref:ie,sx:{p:2},children:(0,qt.jsx)(Bw,{size:"small",sx:{bgcolor:"white",border:"1px solid",borderColor:"grey.500"},children:(0,qt.jsxs)(fS,{sx:{"& tr td":{borderBottom:0,whiteSpace:"normal",py:.375}},children:[(0,qt.jsxs)(cw,{children:[(0,qt.jsx)(gw,{sx:{borderRight:"1px solid",borderColor:"grey.500"},children:(0,qt.jsxs)(op,{sx:{display:"flex",alignItems:"flex-start"},children:[cs(ae)?(0,qt.jsx)(Uwe.A,{sx:{color:"primary.theme.500",fontSize:60}}):(0,qt.jsx)(op,{sx:{p:1,display:"flex",borderRadius:1,bgcolor:"primary.theme.50",flexGrow:.4,justifyContent:"center"},children:(0,qt.jsx)("img",{src:ae,width:100,height:100})}),(0,qt.jsxs)(op,{sx:{flexGrow:.6,ml:2},children:[(0,qt.jsx)(Cf,{variant:"h6",component:"h6",fontWeight:500,children:cs(L)?(0,qt.jsx)(lS,{}):null!==L&&void 0!==L&&L.display_name?null===L||void 0===L?void 0:L.display_name:"NA"}),(0,qt.jsxs)(Cf,{variant:"body2",component:"p",sx:{mt:.5},children:[cs(L)?(0,qt.jsx)(lS,{width:50,sx:{display:"inline-block"}}):null!==L&&void 0!==L&&L.city?(null===L||void 0===L?void 0:L.city)+", ":"NA",cs(z)?(0,qt.jsx)(lS,{width:50,sx:{display:"inline-block",ml:1}}):null!==z&&void 0!==z&&z.name?null===z||void 0===z?void 0:z.name:"NA"]}),(0,qt.jsx)(Cf,{variant:"body2",component:"p",sx:{mt:.5},children:cs(B)?(0,qt.jsx)(lS,{width:50}):null!==B&&void 0!==B&&B.name?null===B||void 0===B?void 0:B.name:"NA"})]})]})}),(0,qt.jsxs)(gw,{width:"40%",children:[(0,qt.jsxs)(pE,{flexDirection:"row",mb:.25,children:[(0,qt.jsx)(Cf,{variant:"body2",fontWeight:"h6.fontWeight",sx:{flex:1},color:"primary",children:te("rpm_PatientName")}),(0,qt.jsx)(op,{children:cs(N)?(0,qt.jsx)(lS,{width:50}):(0,qt.jsx)(Cf,{variant:"body2",fontWeight:"h6.fontWeight",component:"p",children:(null===N||void 0===N?void 0:N.first_name)+" "+(null===N||void 0===N?void 0:N.last_name)})})]}),(0,qt.jsxs)(pE,{flexDirection:"row",mb:.25,children:[(0,qt.jsx)(Cf,{variant:"body2",fontWeight:"h6.fontWeight",sx:{flex:1},color:"primary",children:te("rpm_AgeGender")}),(0,qt.jsx)(op,{children:cs(N)?(0,qt.jsx)(lS,{width:50}):(0,qt.jsxs)(Cf,{variant:"body2",fontWeight:"h6.fontWeight",component:"p",children:[null!==N&&void 0!==N&&N.birth_date?"".concat(re,"yrs"):"NA",null!==N&&void 0!==N&&null!==(f=N.profile)&&void 0!==f&&f.gender?", ".concat(null===N||void 0===N||null===(g=N.profile)||void 0===g?void 0:g.gender):""]})})]}),(0,qt.jsxs)(pE,{flexDirection:"row",mb:.25,children:[(0,qt.jsx)(Cf,{variant:"body2",component:"p",fontWeight:"h6.fontWeight",sx:{flex:1},color:"primary",children:te("rpm_Mobile")}),(0,qt.jsx)(op,{children:cs(N)?(0,qt.jsx)(lS,{width:50}):(0,qt.jsx)(Cf,{variant:"body2",fontWeight:"h6.fontWeight",component:"p",children:null!==N&&void 0!==N&&N.mobile?null===N||void 0===N?void 0:N.mobile:"NA"})})]}),(0,qt.jsxs)(pE,{flexDirection:"row",mb:.25,children:[(0,qt.jsx)(Cf,{variant:"body2",component:"p",fontWeight:"h6.fontWeight",sx:{flex:1},color:"primary",children:te("rpm_VitalStats")}),(0,qt.jsx)(op,{children:cs(N)?(0,qt.jsx)(lS,{width:50}):(0,qt.jsxs)(Cf,{variant:"body2",fontWeight:"h6.fontWeight",component:"p",children:[null!==N&&void 0!==N&&null!==(v=N.patient_health_profile)&&void 0!==v&&null!==(x=v.height)&&void 0!==x&&x.split(".")[0]?(null===N||void 0===N||null===(y=N.patient_health_profile)||void 0===y||null===(b=y.height)||void 0===b?void 0:b.split(".")[0])+"''"+(null===N||void 0===N||null===(j=N.patient_health_profile)||void 0===j||null===(_=j.height)||void 0===_?void 0:_.split(".")[1])+" ft.":"NA"," "," / ",null!==N&&void 0!==N&&null!==(C=N.patient_health_profile)&&void 0!==C&&C.weight?(null===N||void 0===N||null===(w=N.patient_health_profile)||void 0===w?void 0:w.weight)+"kg":"NA"]})})]}),(0,qt.jsxs)(pE,{flexDirection:"row",mb:.25,children:[(0,qt.jsx)(Cf,{variant:"body2",component:"p",fontWeight:"h6.fontWeight",sx:{flex:1},color:"primary",children:te("rpm_BMI")}),(0,qt.jsx)(op,{children:cs(N)?(0,qt.jsx)(lS,{width:50}):(0,qt.jsx)(Cf,{variant:"body2",fontWeight:"h6.fontWeight",component:"p",children:null!==N&&void 0!==N&&null!==(S=N.patient_health_profile)&&void 0!==S&&S.weight?Ps(null===N||void 0===N||null===(A=N.patient_health_profile)||void 0===A?void 0:A.height,null===N||void 0===N||null===(k=N.patient_health_profile)||void 0===k?void 0:k.weight):"NA"})})]})]})]}),(0,qt.jsx)(cw,{sx:{borderTop:"1px solid",borderColor:"grey.500"},children:(0,qt.jsx)(gw,{colSpan:2,sx:{bgcolor:"primary.theme.300"},children:(0,qt.jsx)(Cf,{variant:"body1",component:"h6",fontWeight:500,textAlign:"center",color:"white",py:.75,children:"course"===(null===J||void 0===J?void 0:J.report)?"".concat(te("rpm_COURSE")," : ").concat(cs($)?"...":null===$||void 0===$||null===(T=$.schedule)||void 0===T?void 0:T.name,"                   \n                        (").concat(sa()(null===J||void 0===J?void 0:J.start_date).format("DD MMM YYYY")," to ").concat(sa()(null===J||void 0===J?void 0:J.end_date).format("DD MMM YYYY"),")"):"".concat(te("rpm_Duration")," :                 \n                      (").concat(sa()(null===J||void 0===J?void 0:J.start_date).format("DD MMM YYYY")," to ").concat(sa()(null===J||void 0===J?void 0:J.end_date).format("DD MMM YYYY"),")")})})}),(0,qt.jsx)(cw,{sx:{borderTop:"1px solid",borderColor:"grey.500"},children:(0,qt.jsx)(gw,{colSpan:2,sx:{p:0},children:(0,qt.jsx)(Bw,{size:"small",sx:{maxWidth:"100%"},children:(0,qt.jsxs)(fS,{children:[(0,qt.jsxs)(cw,{children:[(0,qt.jsxs)(gw,{sx:{width:"60%"},children:[cs(F)?(0,qt.jsx)(op,{height:"100%",children:(0,qt.jsx)("img",{src:GC,style:{display:"block",margin:"auto",maxWidth:"100%",maxHeight:180}})}):(0,qt.jsx)(op,{height:200,children:(0,qt.jsx)(qbe,{patientBpReport:F,getAlertClassName:Es})}),cs(F)?(0,qt.jsx)(op,{height:"100%",children:(0,qt.jsx)("img",{src:GC,style:{display:"block",margin:"auto",maxWidth:"100%",maxHeight:180}})}):(0,qt.jsx)(op,{sx:{height:"200px"},children:(0,qt.jsx)(Kbe,{patientBpReport:F})})]}),(0,qt.jsxs)(gw,{sx:{width:"40%"},children:[cs(F)?(0,qt.jsx)(op,{height:"100%",children:(0,qt.jsx)("img",{src:GC,style:{display:"block",margin:"auto",maxWidth:"100%",maxHeight:180}})}):(0,qt.jsx)(op,{sx:{height:"200px"},children:(0,qt.jsx)(Qbe,{stageAlertData:F,height:200,width:200})}),(0,qt.jsxs)(op,{display:"inline-block",children:["course"===(null===J||void 0===J?void 0:J.report)&&(0,qt.jsxs)(op,{sx:{display:"flex",alignItems:"flex-start",mt:2},children:[(0,qt.jsx)(op,{sx:{display:"flex",p:1,bgcolor:"orange.50",borderRadius:1},children:(0,qt.jsx)(Vwe.A,{sx:{color:"orange.500"}})}),(0,qt.jsxs)(op,{sx:{flexGrow:1,ml:2},children:[(0,qt.jsx)(Cf,{variant:"body2",component:"p",fontWeight:500,children:te("rpm_Status")}),"NON_COMPLIANT"==(null===Q||void 0===Q?void 0:Q.status)?(0,qt.jsx)(op,{component:"span",sx:e=>({py:.25,px:1,color:e.palette.red[900],backgroundColor:e.palette.red[100],display:"inline-flex",fontSize:e.spacing(1.5),borderRadius:.5,fontWeight:600}),children:"NON-COMPLIANT"}):(0,qt.jsx)(op,{component:"span",sx:e=>({py:.25,px:1,color:e.palette.green[900],backgroundColor:e.palette.green[100],display:"inline-flex",fontSize:e.spacing(1.25),borderRadius:.5,fontWeight:600}),children:"COMPLIANT"})]})]}),(0,qt.jsxs)(op,{sx:{display:"flex",alignItems:"flex-start",mt:2},children:[(0,qt.jsx)(op,{sx:{display:"flex",p:1,bgcolor:"red.50",borderRadius:1},children:(0,qt.jsx)(Tbe.A,{sx:{color:"red.500"}})}),(0,qt.jsxs)(op,{sx:{flexGrow:1,ml:2},children:[(0,qt.jsx)(Cf,{variant:"body2",component:"p",fontWeight:500,children:te("rpm_ReadingAlerts")}),(0,qt.jsx)(Cf,{variant:"h6",component:"h6",lineHeight:"1",sx:{mt:.5},children:U?"".concat(U,"%"):"NA"})]})]})]})]})]}),(0,qt.jsx)(cw,{children:(0,qt.jsx)(gw,{colSpan:"2",children:(0,qt.jsx)(op,{maxWidth:550,m:"auto",children:(0,qt.jsx)(ue,{legend:de})})})})]})})})}),(0,qt.jsx)(cw,{sx:{borderTop:"1px solid",borderColor:"grey.500"},children:(0,qt.jsx)(gw,{colSpan:2,sx:{bgcolor:"primary.theme.300"},children:(0,qt.jsx)(Cf,{variant:"body1",component:"h6",fontWeight:500,textAlign:"center",color:"white",py:.75,children:te("rpm_InstrumentReadings")})})}),(0,qt.jsx)(cw,{sx:{borderTop:"1px solid",borderColor:"grey.500"},children:(0,qt.jsx)(gw,{colSpan:2,sx:{p:0},children:(0,qt.jsx)(Bw,{size:"small",sx:{maxWidth:"100%"},children:(0,qt.jsx)(fS,{children:(0,qt.jsx)(cw,{children:(0,qt.jsx)(gw,{children:F?(0,qt.jsx)(op,{sx:{"& .MuiTableContainer-root":{border:"none"},"& .MuiTableCell-root":{p:.25,fontSize:12,"& div":{py:.375,px:.75,lineHeight:1}},"& img":{maxHeight:200}},children:(0,qt.jsx)(UT,{data:F,headCells:I,noDataImage:GC,skeletonVrows:6,stickyHeader:!0,className:"theme_scroll",children:null===F||void 0===F?void 0:F.map(e=>{var t,n,r,i,o;return(0,qt.jsxs)(cw,{sx:{"&:last-child td, &:last-child th":{border:0}},children:[(0,qt.jsx)(gw,{children:e.ts}),(0,qt.jsx)(gw,{children:e.values.systolic?null===(t=le(e,"systolic"))||void 0===t?void 0:t.reading:"NA"}),(0,qt.jsx)(gw,{children:e.values.diastolic?null===(n=le(e,"diastolic"))||void 0===n?void 0:n.reading:"NA"}),(0,qt.jsx)(gw,{children:null===(r=le(e,"systolic"))||void 0===r?void 0:r.stage}),(0,qt.jsx)(gw,{children:e.values.pulse?null===(i=ce(e,"pulse"))||void 0===i?void 0:i.reading:"NA"}),(0,qt.jsx)(gw,{children:null===(o=ce(e,"pulse"))||void 0===o?void 0:o.stage})]},e.id)})})}):(0,qt.jsx)(op,{height:"100%",children:(0,qt.jsx)("img",{src:GC,style:{display:"block",margin:"auto",maxWidth:"100%",maxHeight:180}})})})})})})})}),(0,qt.jsx)(cw,{sx:{borderTop:"1px solid",borderColor:"grey.500"},children:(0,qt.jsx)(gw,{colSpan:2,sx:{bgcolor:"primary.theme.300"},children:(0,qt.jsx)(Cf,{variant:"body1",component:"h6",fontWeight:500,textAlign:"center",color:"white",py:.75,children:te("rpm_MedicalHistory")})})}),(0,qt.jsx)(cw,{sx:{borderTop:"1px solid",borderColor:"grey.500"},children:(0,qt.jsx)(gw,{colSpan:2,sx:{p:0},children:(0,qt.jsx)(Bw,{size:"small",children:(0,qt.jsxs)(fS,{children:[(0,qt.jsx)(cw,{children:(0,qt.jsx)(gw,{sx:{verticalAlign:"top"},children:(0,qt.jsx)(op,{children:H?(0,qt.jsx)(op,{sx:{"& .MuiTableContainer-root":{border:"none"},"& .MuiTableCell-root":{p:.25,fontSize:12,"& div":{py:.375,px:.75,lineHeight:1}},"& img":{maxHeight:200}},children:(0,qt.jsx)(UT,{data:H,headCells:G,noDataImage:GC,skeletonVrows:6,stickyHeader:!0,children:null===H||void 0===H?void 0:H.map(e=>(0,qt.jsxs)(cw,{sx:{"&:last-child td, &:last-child th":{border:0}},children:[(0,qt.jsx)(gw,{width:"25%",children:e.disease_name}),(0,qt.jsx)(gw,{width:"25%",children:e.custom_duration?e.custom_duration+" "+(null===e||void 0===e?void 0:e.duration_unit):se(e.duration_unit,null===e||void 0===e?void 0:e.start_date,e.end_date)}),(0,qt.jsx)(gw,{children:e.remark?e.remark:"NA"})]},e.id))})}):(0,qt.jsx)(op,{height:"100%",children:(0,qt.jsx)("img",{src:GC,style:{display:"block",margin:"auto",maxWidth:"100%",maxHeight:180}})})})})}),(0,qt.jsx)(cw,{sx:{borderTop:"1px solid",borderColor:"grey.500"},children:(0,qt.jsx)(gw,{colSpan:2,sx:{bgcolor:"primary.theme.300"},children:(0,qt.jsx)(Cf,{variant:"body1",component:"h6",fontWeight:500,textAlign:"center",color:"white",py:.75,children:te("rpm_FamilyMedicalHistory")})})}),(0,qt.jsx)(cw,{sx:{borderTop:"1px solid",borderColor:"grey.500"},children:(0,qt.jsx)(gw,{colSpan:2,sx:{p:0},children:(0,qt.jsx)(op,{children:W?(0,qt.jsx)(op,{sx:{"& .MuiTableContainer-root":{border:"none"},"& .MuiTableCell-root":{p:.25,fontSize:12,"& div":{py:.375,px:.75,lineHeight:1}},"& img":{maxHeight:200}},children:(0,qt.jsx)(UT,{data:W,headCells:q,noDataImage:GC,skeletonVrows:6,stickyHeader:!0,children:null===W||void 0===W?void 0:W.map(e=>(0,qt.jsxs)(cw,{sx:{"&:last-child td, &:last-child th":{border:0}},children:[(0,qt.jsx)(gw,{width:"25%",children:e.relationship}),(0,qt.jsx)(gw,{width:"25%",children:e.disease_name}),(0,qt.jsx)(gw,{width:"25%",children:e.custom_duration?e.custom_duration+" "+(null===e||void 0===e?void 0:e.duration_unit):se(e.duration_unit,null===e||void 0===e?void 0:e.start_date,e.end_date)}),(0,qt.jsx)(gw,{children:e.remark?e.remark:"NA"})]},e.id))})}):(0,qt.jsx)(op,{height:"100%",children:(0,qt.jsx)("img",{src:GC,style:{display:"block",margin:"auto",maxWidth:"100%",maxHeight:180}})})})})}),(0,qt.jsx)(cw,{sx:{borderTop:"1px solid",borderColor:"grey.500"},children:(0,qt.jsx)(gw,{colSpan:2,sx:{bgcolor:"primary.theme.300"},children:(0,qt.jsx)(Cf,{variant:"body1",component:"h6",fontWeight:500,textAlign:"center",color:"white",py:.75,children:te("rpm_OtherHealthIssues")})})}),(0,qt.jsx)(cw,{sx:{borderTop:"1px solid",borderColor:"grey.500"},children:(0,qt.jsx)(gw,{colSpan:2,children:(0,qt.jsx)(op,{children:V?(0,qt.jsxs)(op,{sx:{"& .MuiTableContainer-root":{border:"none"},"& .MuiTableCell-root":{p:.25,fontSize:12,"& div":{py:.375,px:.75,lineHeight:1}},"& img":{maxHeight:200}},children:[" ",null===V||void 0===V||null===(E=V.other_histories)||void 0===E?void 0:E.map((e,t)=>(0,qt.jsxs)(Ff,{container:!0,spacing:.75,alignItems:"center",mt:.05,children:[(0,qt.jsx)(Ff,{item:!0,xs:!0,children:(0,qt.jsx)(op,{sx:{display:"flex",alignItems:"start"},children:(0,qt.jsx)(Cf,{variant:"body2",fontWeight:"h6.fontWeight",sx:{pl:.5},children:t+1+". "+(null===e||void 0===e?void 0:e.question)})})}),(0,qt.jsx)(Ff,{item:!0,children:(0,qt.jsx)(Cf,{variant:"body2",fontWeight:"h6.fontWeight",children:null===e||void 0===e?void 0:e.answer})})]},t))]}):(0,qt.jsx)(op,{height:"100%",children:(0,qt.jsx)("img",{src:GC,style:{display:"block",margin:"auto",maxWidth:"100%",maxHeight:180}})})})})})]})})})}),(0,qt.jsx)(cw,{sx:{borderTop:"1px solid",borderColor:"grey.500"},children:(0,qt.jsx)(gw,{colSpan:2,sx:{bgcolor:"primary.theme.300"},children:(0,qt.jsx)(Cf,{variant:"body1",component:"h6",fontWeight:500,textAlign:"center",color:"white",py:.75,children:te("rpm_PrescribedMedications")})})}),(0,qt.jsx)(cw,{sx:{borderTop:"1px solid",borderColor:"grey.500"},children:(0,qt.jsx)(gw,{colSpan:2,sx:{p:0},children:(0,qt.jsx)(Bw,{size:"small",children:(0,qt.jsxs)(fS,{children:[(0,qt.jsx)(cw,{children:(0,qt.jsxs)(gw,{children:[(0,qt.jsxs)(Ff,{container:!0,spacing:2,mb:2,children:[!cs(null===Y||void 0===Y?void 0:Y.symptomsList)&&(0,qt.jsxs)(Ff,{item:!0,md:6,children:[(0,qt.jsx)(Cf,{component:"h6",fontSize:14,fontWeight:800,children:"Symptoms"}),(0,qt.jsx)(op,{component:"span"}),cs(null===Y||void 0===Y?void 0:Y.symptomsList)?"N/A":null===Y||void 0===Y||null===(M=Y.symptomsList)||void 0===M?void 0:M.map(e=>e).join(", ")]}),!cs(null===Y||void 0===Y?void 0:Y.diagnosisList)&&(0,qt.jsxs)(Ff,{item:!0,md:6,children:[(0,qt.jsx)(Cf,{component:"h6",fontSize:14,fontWeight:800,children:"Diagnosis"}),(0,qt.jsx)(op,{component:"span"}),cs(null===Y||void 0===Y?void 0:Y.diagnosisList)?"N/A":null===Y||void 0===Y||null===(O=Y.diagnosisList)||void 0===O?void 0:O.map(e=>e).join(", ")]}),!cs(null===Y||void 0===Y?void 0:Y.advicesList)&&(0,qt.jsxs)(Ff,{item:!0,md:6,children:[(0,qt.jsx)(Cf,{component:"h6",fontSize:14,fontWeight:800,children:"Advices"}),(0,qt.jsx)(op,{component:"span"}),cs(null===Y||void 0===Y?void 0:Y.advicesList)?"N/A":null===Y||void 0===Y||null===(R=Y.advicesList)||void 0===R?void 0:R.map(e=>e).join(", ")]}),!cs(null===Y||void 0===Y?void 0:Y.testsList)&&(0,qt.jsxs)(Ff,{item:!0,md:6,children:[(0,qt.jsx)(Cf,{component:"h6",fontSize:14,fontWeight:800,children:"Tests"}),(0,qt.jsx)(op,{component:"span"}),cs(null===Y||void 0===Y?void 0:Y.testsList)?"N/A":null===Y||void 0===Y||null===(P=Y.testsList)||void 0===P?void 0:P.map(e=>e).join(", ")]})]}),(0,qt.jsx)(op,{children:null!==Y&&void 0!==Y&&Y.presList?(0,qt.jsx)(op,{sx:{"& .MuiTableContainer-root":{border:"none"},"& .MuiTableCell-root":{p:.25,fontSize:12,"& div":{py:.375,px:.75,lineHeight:1}},"& img":{maxHeight:200}},children:(0,qt.jsx)(UT,{data:null===Y||void 0===Y?void 0:Y.presList,headCells:Z,noDataImage:GC,skeletonVrows:6,stickyHeader:!0,children:null===Y||void 0===Y||null===(D=Y.presList)||void 0===D?void 0:D.map((e,t)=>{var n;return(0,qt.jsxs)(cw,{sx:{"&:last-child td, &:last-child th":{border:0}},children:[(0,qt.jsxs)(gw,{children:[e.medicine?e.medicine:"NA"," ",(null===e||void 0===e?void 0:e.dose)&&e.dose+e.unit]}),(0,qt.jsx)(gw,{children:null===Ld||void 0===Ld||null===(n=Ld.find(t=>e.frequency===t.key))||void 0===n?void 0:n.text}),(0,qt.jsx)(gw,{children:"".concat(sa()(e.start_date).format("DD MMM YYYY")," - ").concat(sa()(e.end_date).format("DD MMM YYYY"))}),(0,qt.jsx)(gw,{children:e.comments?e.comments:"NA"})]},e.id+t)})})}):(0,qt.jsx)(op,{height:"100%",children:(0,qt.jsx)("img",{src:GC,style:{display:"block",margin:"auto",maxWidth:"100%",maxHeight:180}})})})]})}),(0,qt.jsx)(cw,{sx:{borderTop:"1px solid",borderColor:"grey.500"},children:(0,qt.jsx)(gw,{colSpan:2,sx:{bgcolor:"primary.theme.300"},children:(0,qt.jsx)(Cf,{variant:"body1",component:"h6",fontWeight:500,textAlign:"center",color:"white",py:.75,children:te("rpm_DoctorNotes")})})}),(0,qt.jsx)(cw,{sx:{borderTop:"1px solid",borderColor:"grey.500"},children:(0,qt.jsx)(gw,{colSpan:2,sx:{p:0},children:(0,qt.jsx)(op,{children:K?(0,qt.jsx)(op,{sx:{"& .MuiTableContainer-root":{border:"none"},"& .MuiTableCell-root":{p:.25,fontSize:12,"& div":{py:.375,px:.75,lineHeight:1}},"& img":{maxHeight:200}},children:(0,qt.jsx)(UT,{data:K,headCells:X,noDataImage:GC,skeletonVrows:6,stickyHeader:!0,children:null===K||void 0===K?void 0:K.map(e=>(0,qt.jsxs)(cw,{sx:{"&:last-child td, &:last-child th":{border:0}},children:[(0,qt.jsx)(gw,{width:"22%",children:e.created_at?sa()(e.created_at).format("DD MMM YYYY hh:mm A"):"NA"}),(0,qt.jsx)(gw,{width:"20%",children:e.created_by}),(0,qt.jsx)(gw,{sx:{wordBreak:"break-all","& p>p":{fontSize:12,m:0}},children:(0,qt.jsx)(Cf,{variant:"body2",dangerouslySetInnerHTML:{__html:e.note},color:"inherit"})})]},e.id))})}):(0,qt.jsx)(op,{height:"100%",children:(0,qt.jsx)("img",{src:GC,style:{display:"block",margin:"auto",maxWidth:"100%",maxHeight:180}})})})})})]})})})}),(0,qt.jsx)(cw,{sx:{borderTop:"1px solid",borderColor:"grey.500"},children:(0,qt.jsx)(gw,{colSpan:2,children:(0,qt.jsxs)(Ff,{container:!0,spacing:2,alignItems:"center",children:[(0,qt.jsx)(Ff,{item:!0,xs:!0,children:(0,qt.jsxs)(Cf,{variant:"body2",fontWeight:500,fontSize:10,sx:{fontStyle:"italic",color:"grey.600",textAlign:"justify"},children:[(0,qt.jsx)(op,{component:"span",fontWeight:600,children:"DISCLAIMER:"})," ","THIS WEBSITE DOES NOT PROVIDE MEDICAL ADVICE. The information, including but not limited to, text, graphics, images, and other material contained on this website is for informational purposes only. No material on this site is intended to be a substitute for a qualified medical professional. All analysis are subject to clinical interpretation by a qualified medical professional."]})}),(0,qt.jsx)(Ff,{item:!0,children:(0,qt.jsx)("img",{src:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAOgAAAAwCAMAAAAsGsYIAAAAhFBMVEUAAAAsPIcrO4gsPYktPoktPoosPYgsPoctPYcsPogwQIAtPYkrOogqPYcsPoksPokgQIAtPYgwQI8uPossPokqQIUtPoguPoctPon////l5/CwttNHVpiWnsQ6SpDLz+JhbqeJkr3y8/ijqst8hrVHVpe9w9uwt9PY2+lUYp97h7Vveq5rQ2OOAAAAGHRSTlMAQCC/3++fgGCQEHAwYM+vEFAQf4AwsIDyeEDWAAAFcklEQVRo3uWa2YKjIBBFFQRF7SydWcAkGrNOT////437hbQSs8yDM/clRGU5VFGFJE4t4t6S8w9osWLyphgnzsRFPDlKLHImLXDeVOBMWeM5JZuy9wbyDglnuprrIOlu92E1qTNdMWCcMpUdjseNhfS7M1lpnInKq8Lm9HHM1+fL7ivohNMpII4VJ/SZHP5N0HVS8243x7Qq7VRuAyWBzym5TlZiGb9uJxMvA1/wQsIf2eyi3uOFVtCs/thu1uuaNPk1BPouZvUF7pjiZchyXxg/IDYfkcd9WYnYQPNfMk03NehmU6LuB0Ed0e/MpLw0/2sp3lvdqsJHgKaq4NRBj2o9CPreDoJ+7Ye8FpT5nAKVjAK1uq7M8s51K/BE7YbXqItLV7uPby/etHlVy+3EsngMqGMF3ZwrDy5AP8vCQSXDURfO64XmyLxX704ZVh/6ewpU5hVgAVp9KPVpAYXzwoIr7IdfuUbNmbV7DLWBQpe0A/2t1FraQOG8LRopo2Tk/B1QfGXPgF6yLNtJuTmWHiyPFWdyXBc6Z+f81AcKZ6JwG0TcxdLn3A+u7EsI6R5wS8WLskjislzeciMuAmKShVf9EWTySHARuXeA5kqprISsEmjF2UaiXaLU5QTQ61Y7KwZaUHTnbQ6cBWZWZFcOwfEG5Ttu06IIAQow1xiEKzxknXAsaLpvyMB5SNq080upJO3Nmkx7T1143av5QkhNlOg9ecOgYq5lkR5QooEGNRGeH7tGt41JwflLddG4+HrRQKFIc17Rva+SWUXP554+ivfGwr2gmJUGlvaAxrJ1ZbddrpyjjzGgpkk/ivL2rBQSbHEv7QFFJFw6pIv8C6/zvoBhFAQEg6Be3H2JAPrdPCPw2tVKXW3l0hGgMCk4D0oDXXeTAFAzx7DQ66aea3vguCal40AZQSpkAHVNtwzqutQ1JzsYBwqTnpKCUyZjQEEiPcQkuBuc2x0FGuBGVYUaoJG2yBmLMNlMa5hat4Awac15kCZoEY326LN3mcKIM6xExFo6BtQzqkQGKGYjrnolXYYRM4bHbmzqYdKTvJS4JuhnUd4OgTocgQ8R48d1sg1HgPrGMdbPDnRZPt2U2Ztx8k4lJEaCykMZa3Olko0OWtt4LftBEU3lW2dhjBk8yztAufR4EMIPvwXCQ7TqRDiTumYa6Hcb6KY0XFKuxgZ0U2m7V/vcdpSCXQPMAVCnm4bRoCRE9DHE/FBbMw0mjUJtYfqD45TQWiWX1nhJSV0r36XyFiiGSa9BvfYCu5VHUakX1NMxF7S56CLuugB9s4J+qLy0YwcqTdld1wTluD+re8bb5QOgbMYjOC1albxij0CHLGwBldm2NOidoMQ8xeewG0ZbVZybe90Y1SygA6MWxhvbEk2haAM9HZTaPQrK9SGwEK7brh/Ru3P1b4O+DfVJza8cxR92UHlWe/kUKKKs2QHFHfcr6PImqP2sD9x4R7KDrlV2N6gLUFjwOrgG7Q4GBwQr0Ln3glLQGC9GqEPsoIeHQYEWmQuLY8lS/blYfgF9exAUm0MYO7KD7tT5WVDsvcFTbdZN3429h0ERi1a143avsVon1A4qs+R5UNIw8NghK9adUMIQAf418Rgo+vQDX0u2Rqi2g36o9FlQkGLb1neDjQb1+zfYEGvaMsYTWEFlnqP8GCgWCnL6V1Lmx8+AOsLYGBrHhRzHv7bfN44ojvshOAYoRMSs7k7EZi7yvXY39w4XI8wCOnCC6nJWUdIobCEYwSR4ZOCnfSh97Kd9ct1ySFyCWYXC4nJvDTyNJohjEXFj0pTMukRQ0ud548WdCYv+J3+/uecPVf/JX8fYmzNxvfsjUJmYtN+2it0bikNn2voD08d65R09KnQAAAAASUVORK5CYII=",height:30})})]})})})]})})})]})]})},rSe=["vital","medications_list","intervals"];const iSe=function(e){let{patientData:t,program:n}=e;const r=$o.getPatientDefaultCourse("course"),o=$o.getFilterDate("filterDate"),a=Nt(),{t:s}=Vg(),[l,c]=We.useState(null),[d,u]=We.useState({}),[p,h]=We.useState({}),[m,f]=We.useState(null),[g,v]=We.useState(null),[x,y]=We.useState(null),[b,j]=We.useState(null),[_,C]=We.useState(null),[w,S]=We.useState(null),[A,k]=We.useState(null),T=async()=>{const e={patient_id:null===t||void 0===t?void 0:t.id,desease:["bp"],duration:[null===o||void 0===o?void 0:o.start_date,null===o||void 0===o?void 0:o.end_date]};try{const{data:t}=await a(fl(e));if(c(t),!cs(t)){const e=null===t||void 0===t?void 0:t.filter(e=>{if(e.alerts){const t=e.alerts.find(e=>"pulse"!==e.data_name);if(!cs(t))return!0}}),n=Math.round(100*e.length/t.length);y(n)}}catch(n){a(Zo({subTitle:n.message,severity:ud.ERROR}))}},E=async e=>{await a(uue({perPage:"10000",countryCode:e.country},"RPM",t=>{var n,r;let{countries:i,states:o}=t;const a=null===i||void 0===i||null===(n=i.content)||void 0===n?void 0:n.find(t=>t.isoCode===e.country),s=null===o||void 0===o||null===(r=o.content)||void 0===r?void 0:r.find(t=>t.isoCode===e.state);u(a),h(s)},()=>{}))},M=async()=>{const e={kind:"SELF"};try{const{data:r}=await a(Al(null===n||void 0===n?void 0:n.id,null===t||void 0===t?void 0:t.id,e)),{content:i}=r||{};f(i)}catch(r){console.log(r)}},O=async()=>{const e={kind:"FAMILY"};try{const{data:r}=await a(Al(null===n||void 0===n?void 0:n.id,null===t||void 0===t?void 0:t.id,e)),{content:i}=r||{};v(i)}catch(r){console.log(r)}},R=async()=>{try{const{data:e}=await a(Ol(null===n||void 0===n?void 0:n.id,null===t||void 0===t?void 0:t.id));j(e)}catch(e){console.log(e)}},P=async()=>{try{const e={sort_by:"created_at",sort_order:"desc"},{data:r}=await a(Vl(null===n||void 0===n?void 0:n.id,null===t||void 0===t?void 0:t.id,(0,i.A)({},e),{start_date:null===o||void 0===o?void 0:o.start_date,end_date:null===o||void 0===o?void 0:o.end_date})),s=D(r),l=[],c=[],d=[],u=[],p=[];s&&Array.isArray(s)&&s.forEach(e=>{const t=null===e||void 0===e?void 0:e.medicationList,n=null===e||void 0===e?void 0:e.complaints,r=null===e||void 0===e?void 0:e.advices,i=null===e||void 0===e?void 0:e.diagnosis,o=null===e||void 0===e?void 0:e.tests;t&&Array.isArray(t)&&l.push(...t),n&&Array.isArray(n)&&c.push(...n),r&&Array.isArray(r)&&d.push(...r),i&&Array.isArray(i)&&p.push(...i),o&&Array.isArray(o)&&u.push(...o)}),C({presList:l,symptomsList:Os(c,"name"),advicesList:[...new Set(d)],testsList:[...new Set(u)],diagnosisList:Os(p,"name")})}catch(e){console.log(e)}},D=e=>null===e||void 0===e?void 0:e.map(e=>{const{vital:t,medications_list:n,intervals:r}=e,o=Ko(e,rSe),a=null===n||void 0===n?void 0:n.map(e=>{const t=r.filter(t=>{var n;return null===t||void 0===t||null===(n=t.medicines)||void 0===n?void 0:n.includes(e.id)}).map(e=>{let{id:t,repetition_kind:n,start_time:r}=e;return{id:t,repetition_kind:n,start_time:r?Ds(r,pd):"N/A",interval:null}}).map(e=>{let{start_time:t,interval:n}=e;return{start_time:t,interval:n}});return{id:e.id,medicine:e.medicine,medicine_form:e.medicine_form,icon_type:e.icon_type||"",dose:e.dose,unit:e.unit,color:e.color,image:e.image||"",start_date:e.start_date,end_date:e.end_date,days:e.days,repetition_kind:gd,timing:t,frequency:e.frequency,comments:e.comments}});return(0,i.A)({vital:t,note:"",medicationList:a},o)}),N=async()=>{try{const e={sort_by:"created_at",sort_order:"desc"},{data:r}=await a(Il(null===n||void 0===n?void 0:n.id,null===t||void 0===t?void 0:t.id,{type:"DOCTOR"},(0,i.A)({per_page:999},e),{start_date:null===o||void 0===o?void 0:o.start_date,end_date:null===o||void 0===o?void 0:o.end_date})),{content:s}=r||{},l=s.filter(e=>"bp"===e.vital);S(l)}catch(e){console.log(e)}},L=async()=>{try{var e;const{data:n}=await a(ml(null===t||void 0===t?void 0:t.id,null===r||void 0===r||null===(e=r.schedule)||void 0===e?void 0:e.id,null===r||void 0===r?void 0:r.id));!cs(n)&&k(n)}catch(n){console.log("fetchPatientMissedReading="+n)}};We.useEffect(()=>{if(!cs(t)&&!cs(n)){a(NC({activeMenuItem:"report"}))}},[t,n]),We.useEffect(()=>{cs(t)||cs(n)||cs(r)||(T(),E(n),M(),O(),R(),P(),N(),L()),cs(t)||cs(n)||cs(o)||(T(),E(n),M(),O(),R(),P(),N(),L())},[t,n]);const I=[{id:"time",label:s("rpm_Time"),isSort:!1,sortProperty:"time"},{id:"systolic",label:s("rpm_Systolic"),isSort:!1,sortProperty:"systolic"},{id:"diastolic",label:s("rpm_Diastolic"),isSort:!1,sortProperty:"diastolic"},{id:"condition",label:s("rpm_Condition"),isSort:!1,sortProperty:"condition"},{id:"pulse",label:s("rpm_Pulse"),isSort:!1,sortProperty:"pulse"},{id:"condition",label:s("rpm_Condition"),isSort:!1,sortProperty:"condition"}],F=[{id:"disease",label:s("rpm_DiseaseName"),isSort:!1,sortProperty:"disease"},{id:"duration",label:s("rpm_Duration"),isSort:!1,sortProperty:"duration"},{id:"remarks",label:s("rpm_Remarks"),isSort:!1,sortProperty:"remarks"}],$=[{id:"medicine",label:s("rpm_Medicine"),isSort:!1,sortProperty:"medicine"},{id:"frequency",label:s("rpm_Frequency"),isSort:!1,sortProperty:"frequency"},{id:"duration",label:s("rpm_Duration"),isSort:!1,sortProperty:"duration"},{id:"comments",label:s("rpm_Comments"),isSort:!1,sortProperty:"comments"}],B=[{id:"date",label:s("rpm_Date"),isSort:!1,sortProperty:"date"},{id:"advised_by",label:s("rpm_AdvisedBy"),isSort:!1,sortProperty:"advised_by"},{id:"comments",label:s("rpm_Comments"),isSort:!1,sortProperty:"comments"}],z=[{id:"relation",label:s("rpm_Relation"),isSort:!1,sortProperty:"relation"},{id:"disease",label:s("rpm_DiseaseName"),isSort:!1,sortProperty:"disease"},{id:"duration",label:s("rpm_Duration"),isSort:!1,sortProperty:"duration"},{id:"remarks",label:s("rpm_Remarks"),isSort:!1,sortProperty:"remarks"}];return(0,qt.jsx)(qt.Fragment,{children:(0,qt.jsx)(nSe,{program:n,patientData:t,headCellsItems:I,patientBpReport:l,activeCourse:r,states:p,countries:d,selfDisease:m,familyDisease:g,alertPercent:x,socialHistory:b,personalDiseaseHead:F,familyDiseaseHead:z,notesList:_,prescribedHead:$,consultNotesList:w,consultationHead:B,patientMissedReading:A,filterDate:o})})};function oSe(e){var t,n;let{ruleList:r,ruleProgList:i,order:o,orderBy:a,setOrder:s,setOrderBy:l,dataParameter:c,rulesHeadCell:d,checkState:u,onCheck:p,isSelection:h,nodata:m,fetchRuleList:f,pageDetails:g,viewButton:v,deleteButton:x,patientData:y,program:b,setHeadcells:j,settingModal:_,initialHeadcells:C,handleSettingModalToggle:w,handleStatus:S,handleDefaultRule:A,isRuleActive:k,isGlucoseRuleActive:T,handleDefaultModalToggle:E}=e;const{t:M}=Vg(),O=Nt(),R=so(),P=[{name:M("rpm_RPM"),url:ld.DOCTOR.PROGRAM},{name:null===b||void 0===b?void 0:b.display_name,url:"".concat(ld.DOCTOR.PROGRAM,"/").concat(null===b||void 0===b?void 0:b.code,"/patients")},{name:"".concat((null===y||void 0===y?void 0:y.first_name)||""," ").concat((null===y||void 0===y?void 0:y.last_name)||""),url:"".concat(ld.DOCTOR.PROGRAM,"/").concat(null===b||void 0===b?void 0:b.code,"/patients/").concat(null===y||void 0===y?void 0:y.id,"/dashboard")},{name:M("rpm_patientRules"),url:""}];return We.useEffect(()=>{const e={breadcrumb:P};cs(b)||cs(y)||O(NC(e))},[b,y]),(0,qt.jsx)(op,{sx:{width:"100%"},position:"relative",children:(0,qt.jsxs)(Ff,{container:!0,spacing:2.5,children:[(0,qt.jsxs)(Ff,{item:!0,xs:12,children:[(0,qt.jsx)(op,{sx:{mb:2.5},children:(0,qt.jsxs)(Ff,{container:!0,spacing:2,alignItems:"center",children:[(0,qt.jsxs)(Ff,{item:!0,xs:12,sm:!0,children:[(0,qt.jsx)(op,{sx:{display:{xs:"none",sm:"block",md:"block"}},children:(0,qt.jsx)(Cf,{variant:"h5",component:"h5",children:M("rpm_Rules")})}),(0,qt.jsx)(op,{sx:{display:{xs:"block",sm:"none",md:"none"}},position:"absolute",top:"-29px",left:"40px",children:(0,qt.jsx)(Cf,{variant:"h6",component:"h6",children:M("rpm_Rules")})}),k&&T?"":(0,qt.jsxs)(op,{display:"flex",gap:.5,pt:.5,children:[(0,qt.jsx)(Cf,{component:"span",sx:{color:"grey.400"},children:(0,qt.jsx)(_ue,{sx:{fontSize:"14px"}})}),(0,qt.jsx)(Cf,{sx:{color:"grey.600",fontSize:"14px"},children:"Program-level rules will auto-apply to this patient as the patient does not have any personalized rule"}),(0,qt.jsx)(Cf,{sx:{fontSize:"14px"},children:(0,qt.jsx)(Lo,{to:"/rpm/program/".concat(null===b||void 0===b?void 0:b.code,"/rules"),children:"View program level rules"})})]})]}),(null===b||void 0===b||null===(t=b.permissions)||void 0===t?void 0:t.showAddPatientRuleBtn)&&(0,qt.jsx)(Ff,{item:!0,children:(0,qt.jsxs)(xh,{variant:"contained",color:"primary",disableElevation:!0,onClick:()=>R("add"),className:(null===b||void 0===b||null===(n=b.permissions)||void 0===n?void 0:n.showAddPatientRuleBtn)&&"patientrules-tour-step0",children:[(0,qt.jsx)(jue.A,{}),(0,qt.jsx)(Cf,{component:"span",className:"hideOnMobile",children:M("rpm_AddRule")})]})}),(0,qt.jsx)(Ff,{item:!0,children:(0,qt.jsx)(sy,{title:M("rpm_TableCellSetting"),className:"",children:(0,qt.jsx)(sv,{sx:{boxShadow:"none",width:32,height:32,minHeight:"auto"},size:"small",color:"primary",onClick:w,children:(0,qt.jsx)(YC.A,{fontSize:"small",sx:{width:16,height:16}})})})})]})}),(0,qt.jsxs)(op,{children:[(0,qt.jsx)(UT,{order:o,orderBy:a,setOrder:s,setOrderBy:l,data:r,headCells:null===d||void 0===d?void 0:d.filter(e=>C.includes(e.id)),dataParameter:c,selected:u,setSelected:p,isSelection:h,noDataImage:m,fetchList:f,pageDetails:g,skeletonVrows:6,className:"theme_scroll",children:null===r||void 0===r?void 0:r.filter(e=>"bp.pulse"!==e.data_type).map(e=>{var t,n;const r=e.short_description.split("/");return(0,qt.jsxs)(cw,{hover:!0,selected:u.includes(e.id.toString()),sx:{"&:last-child td, &:last-child th":{border:0}},className:"patientrules-tour-step1",children:[h&&(0,qt.jsx)(gw,{padding:"checkbox",children:(0,qt.jsx)(Dw,{onChange:p,checked:u.includes(e.id.toString()),name:e.id.toString(),color:"primary"})}),C.includes("vital_type")&&(0,qt.jsxs)(gw,{children:["bp"===e.data_type&&(0,qt.jsx)(Lo,{className:"linkClr",to:e.id,children:(0,qt.jsxs)(Cf,{color:"customClr.bp",fontWeight:600,component:"span",fontSize:14,children:[" ",M("rpm_".concat(e.data_type))]})}),"glucose"===e.data_type&&(0,qt.jsx)(Lo,{className:"linkClr",to:e.id,children:(0,qt.jsxs)(Cf,{color:"customClr.glucose",fontWeight:600,component:"span",fontSize:14,sx:{textDecoration:"underline"},children:[" ",M("rpm_".concat(e.data_type))]})}),"bp.pulse"===e.data_type&&(0,qt.jsx)(Lo,{className:"linkClr",to:e.id,children:(0,qt.jsxs)(Cf,{color:"customClr.pulse",fontWeight:600,component:"span",fontSize:14,sx:{textDecoration:"underline"},children:[" ",M("rpm_".concat(e.data_type))]})})]}),C.includes("processing_mode")&&(0,qt.jsx)(gw,{children:e.processing_mode}),C.includes("batch_size")&&(0,qt.jsx)(gw,{children:e.data_batch_size?e.data_batch_size:"NA"}),C.includes("short_description")&&(0,qt.jsx)(gw,{children:r[0]}),C.includes("status")&&(0,qt.jsx)(gw,{children:(0,qt.jsx)(dye,{checked:!ps(null===e||void 0===e?void 0:e.status)&&(null===e||void 0===e?void 0:e.status),onChange:t=>S(t,e),disabled:!1===(null===e||void 0===e?void 0:e.default_rule)&&!0,inputProps:{"aria-label":"controlled"}})}),C.includes("defaultRule")&&(0,qt.jsx)(gw,{children:(0,qt.jsx)(d_,{margin:"dense",children:(0,qt.jsxs)(G_,{variant:"outlined",size:"small",value:null!==(null===e||void 0===e?void 0:e.default_rule)&&(null===e||void 0===e?void 0:e.default_rule),onChange:t=>{t.target.value&&k&&"bp"===e.data_type||t.target.value&&T&&"glucose"===e.data_type?E(t,e):A({e:t,row:e})},children:[(0,qt.jsx)(mf,{value:!0,children:"Yes"}),(0,qt.jsx)(mf,{value:!1,children:"No"})]})})}),C.includes("updated_at")&&(0,qt.jsx)(gw,{children:sa()(e.created_at).format("DD MMM YYYY hh:mm A")}),C.includes("action")&&(0,qt.jsxs)(gw,{children:[(null===b||void 0===b||null===(t=b.permissions)||void 0===t?void 0:t.showViewPatientRuleBtn)&&v(e),(null===b||void 0===b||null===(n=b.permissions)||void 0===n?void 0:n.showDeletePatientRuleBtn)&&x(e)]})]},e.id)})}),(0,qt.jsx)(KE,{pageDetails:g,fetchListFunction:f})]}),!1]}),(0,qt.jsx)(TE,{open:_,allHeadCells:d,initialHeadcells:C,setHeadcells:j,onClose:w})]})})}oSe.defaultProps={rulesHeadCell:[],pageDetails:{},order:"",orderBy:"",setOrder:()=>{},setOrderBy:()=>{},dataParameter:"",checkState:"",onCheck:()=>{},isSelection:"",nodata:"",ruleProgList:[],ruleList:[],fetchRuleList:()=>{},viewButton:()=>{},deleteButton:()=>{},patientData:{},program:{},initialHeadcells:[],setHeadcells:()=>{},settingModal:!1,handleSettingModalToggle:()=>{},handleDefaultModalToggle:()=>{},handleStatus:()=>{},handleDefaultRule:()=>{},isRuleActive:!1,isGlucoseRuleActive:!1};const aSe=oSe,sSe=["content"],lSe=["content"];const cSe=function(e){var t;let{program:n,patientData:r}=e;const o=Nt(),a=so(),s=wt(bu),l=!("true"===us(s,"user_principal.attributes.skip_tour[0]","")),c=wt(cu),d=VC(JA().breakpoints.down("sm")),{t:u}=Vg(),{enqueueSnackbar:p}=hi(),{patientId:h}=lo(),[m,f]=(0,We.useState)("desc"),[g,v]=(0,We.useState)("updated_at"),[x,y]=We.useState(null),[b,j]=We.useState(null),[_,C]=(0,We.useState)([]),[w,S]=We.useState(""),[A,k]=We.useState(""),[T,E]=(0,We.useState)((0,i.A)({},dd)),M=null===x||void 0===x?void 0:x.some(e=>"bp"===e.data_type&&(null===e||void 0===e?void 0:e.default_rule)&&(null===e||void 0===e?void 0:e.status)),O=null===x||void 0===x?void 0:x.some(e=>"glucose"===e.data_type&&e.data_type&&(null===e||void 0===e?void 0:e.default_rule)&&(null===e||void 0===e?void 0:e.status)),[R,P]=We.useState({open:!1,data:{}}),[D,N]=We.useState({open:!1,data:{}}),L=d?["vital_type","action"]:["vital_type","processing_mode","batch_size","short_description","updated_at","status","defaultRule","action"],[I,F]=We.useState(!1),[$,B]=We.useState(cs($o.getPatientRulesHeadcells())?L:$o.getPatientRulesHeadcells()),z=async e=>{let{e:t,row:r}=e;const a=x.map(e=>{if(e.id===r.id){const s={programId:null===n||void 0===n?void 0:n.code,patientId:h,ruleId:r.id,status:t.target.value,defaultRule:t.target.value};if(("glucose"===r.data_type||"bp"===r.data_type)&&(o(bl(s)).then(()=>{window.location.reload()}).catch(e=>{console.error("Error:",e)}),"bp"===r.data_type)){var a;const e=null===(a=x.find(e=>"bp.pulse"===e.data_type&&e.short_description===r.short_description))||void 0===a?void 0:a.id;e&&o(bl((0,i.A)((0,i.A)({},s),{},{ruleId:e}))).then(()=>{window.location.reload()}).catch(e=>{console.error("Error:",e)})}return(0,i.A)((0,i.A)({},e),{},{default_rule:t.target.value,status:t.target.value})}return e});y(a)},H=function(e){B(e),$o.setPatientRulesHeadcells(e)},W=e=>{P((0,i.A)((0,i.A)({},R),{},{open:!R.open,data:e}))},U=(e,t)=>{N((0,i.A)((0,i.A)({},D),{},{open:!D.open,data:{e:e,row:t}}))},V=async function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:w;try{const{data:t}=await o(gl(null===n||void 0===n?void 0:n.code,h,(0,i.A)((0,i.A)({sort_by:g,sort_order:m},T),{},{q:e}))),r=t||{},{content:a}=r,s=Ko(r,sSe);y(a),E(e=>(0,i.A)((0,i.A)({},e),{},{last_page:s.last_page,current_page:s.current_page,from:s.from,per_page:s.per_page,to:s.to,total:s.total}))}catch(t){p(t.message,{variant:"error"})}};We.useEffect(()=>{H(L)},[d]),We.useEffect(()=>{c&&h&&!cs(n)&&V()},[c,h,n]),We.useEffect(()=>{c&&!cs(n)&&async function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:w;try{const{data:t}=await o(Vs(null===n||void 0===n?void 0:n.code,(0,i.A)((0,i.A)({sort_by:g,sort_order:m},T),{},{q:e}))),r=t||{},{content:a}=r,s=Ko(r,lSe);j(a),E(e=>(0,i.A)((0,i.A)({},e),{},{last_page:s.last_page,current_page:s.current_page,from:s.from,per_page:s.per_page,to:s.to,total:s.total}))}catch(t){p(t.message,{variant:"error"})}}()},[c,n]),We.useEffect(()=>{o(NC({activeMenuItem:"rules"}))},[]);const G=[{id:"vital_type",label:u("rpm_Vitals"),isSort:!0,sortProperty:"vital_type"},{id:"processing_mode",label:u("rpm_ProcessingMode"),isSort:!1,sortProperty:"processing_mode"},{id:"batch_size",label:u("rpm_BatchSize"),isSort:!1,sortProperty:"batch_size"},{id:"short_description",label:u("rpm_ShortDescription"),isSort:!1,sortProperty:"short_description"},{id:"status",label:u("rpm_Status"),isSort:!1,sortProperty:"status"},{id:"defaultRule",label:u("rpm_DefaultRule"),isSort:!1,sortProperty:"defaultRule"},{id:"updated_at",label:u("rpm_DateModified"),isSort:!1,sortProperty:"updated_at"},{id:"action",label:u("rpm_Actions"),isSort:!1,sortProperty:"action"}];return cs(n)?(0,qt.jsx)(yp,{variant:"outlined",sx:{px:2.5,py:6,display:"flex",height:"320px"},children:(0,qt.jsx)(op,{alignSelf:"center",sx:{mx:"auto"},children:(0,qt.jsx)(MM,{color:"primary"})})}):(0,qt.jsxs)(qt.Fragment,{children:[null!==n&&void 0!==n&&null!==(t=n.permissions)&&void 0!==t&&t.showPatientRuleList?(0,qt.jsx)(aSe,{order:m,orderBy:g,setOrder:f,setOrderBy:v,searchText:w,setSearchText:S,dataParameter:"id",checkState:_,onCheck:e=>{if(Array.isArray(e))return C(e.map(e=>e.toString()));const t=e.target.name;_.includes(t)?C(_.filter(e=>e!==t)):C(e=>[...e,t])},isSelection:!1,nodata:GC,rulesHeadCell:G,ruleList:x,ruleProgList:b,fetchRuleList:V,pageDetails:T,editButton:e=>(0,qt.jsx)(sy,{title:u("rpm_Edit"),children:(0,qt.jsx)(wh,{"data-id":e.id,color:"primary",onClick:()=>console.log(e),children:(0,qt.jsx)(fc,{fontSize:"small",sx:{width:16,height:16}})})}),viewButton:e=>(0,qt.jsx)(sy,{title:u("rpm_view"),children:(0,qt.jsx)(wh,{"data-id":e.id,color:"primary",onClick:()=>a(e.id),children:(0,qt.jsx)(gc,{fontSize:"small",sx:{width:16,height:16}})})}),deleteButton:e=>(0,qt.jsx)(wh,{"data-id":e.id,color:"error",onClick:()=>W(e),children:(0,qt.jsx)(xc,{fontSize:"small",sx:{width:16,height:16}})}),patientData:r,program:n,setHeadcells:H,settingModal:I,initialHeadcells:$,handleSettingModalToggle:()=>{F(!I)},handleStatus:async(e,t)=>{const r=null===x||void 0===x?void 0:x.map(r=>{if(r.id===t.id){const s={programId:null===n||void 0===n?void 0:n.code,patientId:h,ruleId:t.id,status:e.target.checked,defaultRule:null===t||void 0===t?void 0:t.default_rule};if(("glucose"===t.data_type||"bp"===t.data_type)&&(o(bl(s)).then(()=>{window.location.reload()}).catch(e=>{console.error("Error:",e)}),"bp"===t.data_type)){var a;const e=null===(a=x.find(e=>"bp.pulse"===e.data_type&&e.short_description===t.short_description))||void 0===a?void 0:a.id;e&&o(bl((0,i.A)((0,i.A)({},s),{},{ruleId:e}))).then(()=>{window.location.reload()}).catch(e=>{console.error("Error:",e)})}return(0,i.A)((0,i.A)({},r),{},{status:e.target.checked})}return r});y(r)},handleDefaultRule:z,isRuleActive:M,isGlucoseRuleActive:O,handleDefaultModalToggle:U}):(0,qt.jsx)(LC,{}),(0,qt.jsx)(qV,{openModal:R.open,onCloseModal:W,actionFunction:()=>(async(e,t,n)=>{const r={programId:e,patientId:t,ruleId:null===n||void 0===n?void 0:n.id,data_type:null===n||void 0===n?void 0:n.data_type};try{if(("glucose"===n.data_type||"bp"===n.data_type)&&(await o(jl(r)),"bp"===n.data_type)){const e=null===x||void 0===x?void 0:x.find(e=>"bp.pulse"===(null===e||void 0===e?void 0:e.data_type)&&e.short_description===n.short_description);e&&await o(jl((0,i.A)((0,i.A)({},r),{},{ruleId:null===e||void 0===e?void 0:e.id,data_type:null===e||void 0===e?void 0:e.data_type})))}V(),P((0,i.A)((0,i.A)({},R),{},{open:!R.open})),p(u("message:rpm_DeleteRuleSuccess"),{variant:"success"})}catch(a){p(a.message,{variant:"error"})}})(null===n||void 0===n?void 0:n.code,h,R.data),dataName:"",options:{primaryText:u("message:rpm_DeleteTitle"),secondaryText:u("message:rpm_DeleteBodyText"),btn:{primaryText:u("rpm_Delete"),secondaryText:u("rpm_Cancel"),primaryColor:"error",secondaryColor:"primary"},btnSwap:!0}}),(0,qt.jsx)(qV,{openModal:D.open,onCloseModal:U,actionFunction:()=>z(null===D||void 0===D?void 0:D.data),dataName:"",options:{primaryText:u("message:rpm_DefaultRuleTitle"),secondaryText:u("message:rpm_DefautRuleBodyText"),btn:{primaryText:u("rpm_Yes"),secondaryText:u("rpm_No"),primaryColor:"success",secondaryColor:"primary"},btnSwap:!0}}),(0,qt.jsx)(zZ,{isTour:l,path:"patientRulesTour",setRenderer:k}),(0,qt.jsx)("input",{type:"hidden",id:"rerenderer",value:A})]})};var dSe=n(87884);function uSe(e){let{exRuleArr:t,ruleData:n,addNewRule:r,patientData:o,program:a,pulseExRuleArr:s}=e;const{t:l}=Vg(),c=Nt(),d=null===n||void 0===n?void 0:n.short_description.split("/"),u={data_type:null!==n&&void 0!==n&&n.data_type?null===n||void 0===n?void 0:n.data_type:"",processing_mode:null!==n&&void 0!==n&&n.processing_mode?null===n||void 0===n?void 0:n.processing_mode:"",data_batch_size:null!==n&&void 0!==n&&n.data_batch_size?null===n||void 0===n?void 0:n.data_batch_size:"",short_description:null!==n&&void 0!==n&&n.short_description?d[0]:"",rule:null!==n&&void 0!==n&&n.rule?null===n||void 0===n?void 0:n.rule:""},p=((()=>{let e=[];null===t||void 0===t||t.forEach(t=>{e.push((0,i.A)((0,i.A)({},t),{},{name:t.name,desc:t.desc,when:{cond:t.data,between:t.data.map(e=>e.between)[0]||""}}))})})(),[{name:l("rpm_RPM"),url:ld.DOCTOR.PROGRAM},{name:null===a||void 0===a?void 0:a.display_name,url:"".concat(ld.DOCTOR.PROGRAM,"/").concat(null===a||void 0===a?void 0:a.code,"/patients")},{name:"".concat((null===o||void 0===o?void 0:o.first_name)||""," ").concat((null===o||void 0===o?void 0:o.last_name)||""),url:"".concat(ld.DOCTOR.PROGRAM,"/").concat(null===a||void 0===a?void 0:a.code,"/patients/").concat(null===o||void 0===o?void 0:o.id,"/dashboard")},{name:l("rpm_patientRules"),url:"".concat(ld.DOCTOR.PROGRAM,"/").concat(null===a||void 0===a?void 0:a.code,"/patients/").concat(null===o||void 0===o?void 0:o.id,"/rules")},{name:ta()(n)?l("rpm_AddRule"):l("rpm_".concat(n.data_type)),url:""}]),h=[{id:"stage",align:"left"},{id:"from1",label:"From",align:"left"},{id:"to1",label:"To",align:"left"},{id:"from2",label:"From",align:"left",format:e=>e.toLocaleString("en-US")},{id:"to2",label:"To",align:"left",format:e=>e.toLocaleString("en-US")}];return We.useEffect(()=>{const e={breadcrumb:p};ta()(a)||ta()(o)||ta()(n)||c(NC(e))},[a,o,n]),(0,qt.jsxs)(op,{sx:{width:"100%"},position:"relative",children:[(0,qt.jsx)(Ff,{container:!0,spacing:2,children:(0,qt.jsx)(Ff,{item:!0,xs:12,md:12,lg:12,children:(0,qt.jsx)(Kz,{initialValues:ta()(n)?{data_type:"",processing_mode:"",data_batch_size:"",short_description:"",rule:'rule HighSystolic_Stage3 salience 5 {\n      when\n          Util.ToInt(Data.systolic) >= 180\n      then\n          Alerts.Add("bp", "systolic", Data.systolic, "High blood pressure\n   (Hypertensive Crisis)");\n          Retract("HighSystolic_Stage3");\n\n  }\n\n  rule HighDiastolic_Stage3 salience 5 {\n      when\n          Util.ToInt(Data.diastoruleData\n            ruleDatalic) >= 120\n      then\n          Alerts.Add("bp", "diastolic", Data.diastolic, "High blood\n  pressure (Hypertensive Crisis)");\n          Retract("HighDiastolic_Stage3");\n  }\n\n  rule HighSystolic_Stage2 salience 4 {\n      when\n          Util.ToInt(Data.systolic) >= 140 && Util.ToInt(Data.systolic) <= 179\n      then\n          Alerts.Add("bp", "systolic", Data.systolic, "High blood pressure\n   (Hypertension Stage 2)");\n          Retract("HighSystolic_Stage2");\n  }\n\n  rule HighDiastolic_Stage2 salience 4 {\n      when\n          Util.ToInt(Data.diastolic) >= 90 && Util.ToInt(Data.diastolic) <= 119\n      then\n          Alerts.Add("bp", "diastolic", Data.diastolic, "High blood\n  pressure (Hypertension Stage 2)");\n          Retract("HighDiastolic_Stage2");\n  }\n\n  rule HighSystolic {\n      when\n          Util.ToInt(Data.systolic) >= 130 &&\n  Util.ToInt(Data.systolic) <= 139\n      then\n          Alerts.Add("bp", "systolic", Data.systolic, "High blood pressure\n   (Hypertension Stage 1)");\n         Retract("HighSystolic");\n  }\n\n  rule HighDiastolic {\n      when\n          Util.ToInt(Data.diastolic) >= 80 &&\n  Util.ToInt(Data.diastolic) <= 89\n      then\n          Alerts.Add("bp", "diastolic", Data.diastolic, "High blood\n  pressure (Hypertension Stage 1)");\n          Retract("HighDiastolic");\n  }\n\n  rule ElevatedBloodPressure {\n      when\n          Util.ToInt(Data.systolic) >= 120 &&\n  Util.ToInt(Data.systolic) <= 129 &&\n  Util.ToInt(Data.diastolic) < 80\n      then\n          Alerts.Add("bp", "systolic", Data.systolic, "Elevated blood\n  pressure");\n          Complete();\n  }\n\n  rule CheckLowBP salience 1 {\n      when\n          Util.ToInt(Data.systolic) < 90 &&\n  Util.ToInt(Data.diastolic) < 60\n      then\n          Alerts.Add("bp", "systolic", Data.systolic, "Low blood\n  pressure");\n          Alerts.Add("bp", "diastolic", Data.diastolic, "Low blood\n  pressure");\n          Complete();\n  }'}:u,validationSchema:RU.addRule,onSubmit:r,enableReinitialize:!0,children:e=>{var r,i,o,a,c,d,u,p,m,f,g,v,x,y,b,j,_,C,w,S;let{values:A}=e;return(0,qt.jsx)(qt.Fragment,{children:(0,qt.jsx)(nH,{children:(0,qt.jsxs)(yH,{variant:"outlined",children:[(0,qt.jsx)(nW,{title:(0,qt.jsxs)(Ff,{container:!0,spacing:2,alignItems:"center",children:[(0,qt.jsxs)(Ff,{item:!0,xs:!0,children:[(0,qt.jsx)(op,{sx:{display:{xs:"block",sm:"none"}},position:"absolute",left:"40px",top:"-33px",children:(0,qt.jsx)(Cf,{variant:"h6",component:"h6",sx:{marginBottom:"0"},children:ta()(n)?l("rpm_AddNewRule"):l("rpm_ViewRule")})}),(0,qt.jsx)(op,{sx:{display:{xs:"none",sm:"block"}},children:(0,qt.jsx)(Cf,{variant:"h5",gutterBottom:!0,component:"h5",sx:{marginBottom:"0"},children:ta()(n)?l("rpm_AddNewRule"):l("rpm_ViewRule")})})]}),ta()(n)&&(0,qt.jsx)(qt.Fragment,{children:(0,qt.jsx)(Ff,{item:!0,children:(0,qt.jsx)(xh,{type:"submit",variant:"contained",color:"primary",disableElevation:!0,children:l("rpm_Save")})})})]}),sx:{py:1.5,bgcolor:"primary.theme.50"}}),(0,qt.jsx)(wH,{children:(0,qt.jsxs)(Ff,{container:!0,spacing:2,children:[(0,qt.jsx)(Ff,{item:!0,xs:12,md:3,children:(0,qt.jsxs)(op,{mb:2,children:[(0,qt.jsx)(o_,{htmlFor:"data_type",required:!0,sx:{mb:.75},children:l("rpm_VitalType")}),(0,qt.jsxs)(tH,{fullWidth:!0,as:G_,id:"data_type",name:"data_type",size:"small",displayEmpty:!0,disabled:!ta()(n),input:(0,qt.jsx)(qj,{}),endAdornment:(0,qt.jsx)(tw,{position:"end",sx:{position:"absolute",right:"28px"},children:(0,qt.jsx)(sy,{title:l("message:rpm_VitalTypeHelp"),placement:"top",children:(0,qt.jsx)(wh,{size:"small",disableRipple:!0,sx:{p:0},children:(0,qt.jsx)(pM.A,{fontSize:"small"})})})}),children:[null===Dd||void 0===Dd?void 0:Dd.map(e=>(0,qt.jsx)(mf,{value:e.value,children:l("rpm_".concat(e.name))},e.name)),(0,qt.jsx)(mf,{value:"bp.pulse",children:l("rpm_bp")})]}),(0,qt.jsx)(dH,{name:"data_type",children:e=>(0,qt.jsx)(v_,{error:!0,children:l(e,{field:l("rpm_VitalType")})})})]})}),(0,qt.jsx)(Ff,{item:!0,xs:12,md:3,children:(0,qt.jsxs)(op,{mb:2,children:[(0,qt.jsx)(o_,{htmlFor:"processing_mode",required:!0,sx:{mb:.75},children:l("rpm_ProcessingMode")}),(0,qt.jsxs)(tH,{fullWidth:!0,as:G_,id:"processing_mode",name:"processing_mode",size:"small",displayEmpty:!0,disabled:!ta()(n),input:(0,qt.jsx)(qj,{}),renderValue:e=>e||"Select",endAdornment:(0,qt.jsx)(tw,{position:"end",sx:{position:"absolute",right:"28px"},children:(0,qt.jsx)(sy,{title:l("message:rpm_ProcessingModeHelp"),placement:"top",children:(0,qt.jsx)(wh,{size:"small",disableRipple:!0,sx:{p:0},children:(0,qt.jsx)(pM.A,{fontSize:"small"})})})}),children:[(0,qt.jsx)(mf,{value:"BATCH",children:"BATCH"}),(0,qt.jsx)(mf,{value:"REALTIME",children:"REALTIME"})]}),(0,qt.jsx)(dH,{name:"processing_mode",children:e=>(0,qt.jsx)(v_,{error:!0,children:l(e,{field:l("rpm_ProcessingMode")})})})]})}),"BATCH"===A.processing_mode&&(0,qt.jsx)(Ff,{item:!0,xs:12,md:3,children:(0,qt.jsxs)(op,{mb:2,children:[(0,qt.jsx)(o_,{htmlFor:"data_batch_size",sx:{mb:.75},children:l("rpm_BatchDataSize")}),(0,qt.jsx)(tH,{fullWidth:!0,as:qj,id:"data_batch_size",name:"data_batch_size",size:"small",disabled:!ta()(n)}),(0,qt.jsx)(dH,{name:"data_batch_size",children:e=>(0,qt.jsx)(v_,{error:!0,children:l(e,{field:l("rpm_BatchDataSize")})})})]})}),(0,qt.jsx)(Ff,{item:!0,xs:12,md:3,children:(0,qt.jsxs)(op,{mb:2,children:[(0,qt.jsx)(o_,{htmlFor:"short_description",required:!0,sx:{mb:.75},children:l("rpm_ShortDescription")}),(0,qt.jsx)(tH,{fullWidth:!0,as:qj,id:"short_description",name:"short_description",size:"small",disabled:!ta()(n),endAdornment:(0,qt.jsx)(tw,{position:"end",children:(0,qt.jsx)(sy,{title:l("message:rpm_ShortDescriptionHelp"),placement:"top",children:(0,qt.jsx)(wh,{size:"small",disableRipple:!0,sx:{p:0},children:(0,qt.jsx)(pM.A,{fontSize:"small"})})})})}),(0,qt.jsx)(dH,{name:"short_description",children:e=>(0,qt.jsx)(v_,{error:!0,children:l(e,{field:l("rpm_ShortDescription")})})})]})}),"bp"===A.data_type&&(0,qt.jsx)(Ff,{item:!0,xs:12,children:(0,qt.jsxs)(op,{mb:2,children:[(0,qt.jsx)(op,{sx:{fontWeight:700},children:l("rpm_BloodPressureRule")}),(0,qt.jsx)(Vw,{sx:{borderRadius:2,mt:2},children:(0,qt.jsxs)(Bw,{children:[(0,qt.jsxs)(_S,{children:[(0,qt.jsxs)(cw,{sx:{"& .MuiTableCell-head":{border:1,borderColor:"#ddd",fontWeight:"600",bgcolor:"primary.theme.50",padding:.5}},children:[(0,qt.jsx)(gw,{align:"center",rowSpan:2,colSpan:2,children:l("rpm_Stages")}),(0,qt.jsx)(gw,{align:"center",colSpan:2,children:l("rpm_Systolic")}),(0,qt.jsx)(gw,{align:"center",colSpan:3,children:l("rpm_Diastolic")}),(0,qt.jsx)(gw,{align:"center",rowSpan:2,colSpan:2,children:l("rpm_BpRange(Sys/Dia)")})]}),(0,qt.jsx)(cw,{className:"inner_head",sx:{"& .MuiTableCell-head:first-of-type":{display:"none"},"& .MuiTableCell-head":{border:1,borderColor:"#ddd"},bgcolor:"primary.theme.50"},children:h.map(e=>(0,qt.jsx)(gw,{align:"center",style:{top:57,minWidth:e.minWidth},colSpan:"1",children:e.label},e.id))})]}),(0,qt.jsxs)(fS,{children:[null===t||void 0===t?void 0:t.map((e,n)=>{var r,i,o,a,s,c,d,u,p,h,m,f,g,v;return(0,qt.jsxs)(cw,{sx:{"& .MuiTableCell-body":{border:1,borderColor:"#ddd",padding:1}},children:[(0,qt.jsx)(gw,{align:"center",colSpan:"2",className:"tableColor ".concat(e.name),children:l("rpm_".concat(e.name))}),(0,qt.jsxs)(gw,{align:"center",colSpan:"1",children:[0===n&&t[n].data[0].value,!(0===n||n===t.length-1)&&e.data[0].value,n===t.length-1&&"-"]}),(0,qt.jsxs)(gw,{align:"center",colSpan:"1",children:[0===n?"-":!(n===t.length-1)&&(null===(r=t[n-1])||void 0===r||null===(i=r.data[0])||void 0===i?void 0:i.value)-1,n===t.length-1&&(null===e||void 0===e||null===(o=e.data[0])||void 0===o?void 0:o.value)]}),(0,qt.jsxs)(gw,{align:"center",colSpan:"1",children:[0===n&&t[n].data[1].value,!(0===n||n===t.length-1||3===n)&&e.data[1].value,(n===t.length-1||3===n)&&"-"]}),(0,qt.jsxs)(gw,{align:"center",colSpan:"2",children:[0===n?"-":!(n===t.length-1)&&(null===(a=t[n-1])||void 0===a||null===(s=a.data[1])||void 0===s?void 0:s.value)-1,n===t.length-1&&(null===e||void 0===e||null===(c=e.data[1])||void 0===c?void 0:c.value)]}),(0,qt.jsxs)(gw,{align:"center",colSpan:"2",children:[0===n&&"".concat(t[n].data[0].value," & Above"),!(0===n||n===t.length-1)&&"".concat(null===(d=t[n])||void 0===d||null===(u=d.data[0])||void 0===u?void 0:u.value,"\n                        -\n                        ").concat((null===(p=t[n-1])||void 0===p||null===(h=p.data[0])||void 0===h?void 0:h.value)-1),n===t.length-1&&"Below or ".concat(e.data[0].value)," / ",0===n&&"".concat(t[n].data[1].value," & Above"),!(0===n||n===t.length-1||3===n)&&"".concat(null===(m=t[n])||void 0===m||null===(f=m.data[1])||void 0===f?void 0:f.value,"\n                        -\n                        ").concat((null===(g=t[n-1])||void 0===g||null===(v=g.data[1])||void 0===v?void 0:v.value)-1),(n===t.length-1||3===n)&&"Below or ".concat(e.data[1].value)]})]},e.salience)}),!ta()(t)&&(0,qt.jsxs)(cw,{sx:{"& .MuiTableCell-body":{border:1,borderColor:"#ddd",p:1}},children:[(0,qt.jsx)(gw,{align:"center",colSpan:"2",className:"tableColor normal",children:l("rpm_NormalPressure")}),(0,qt.jsx)(gw,{align:"center",colSpan:"1",children:(null===(r=t[(null===t||void 0===t?void 0:t.length)-1])||void 0===r||null===(i=r.data[0])||void 0===i?void 0:i.value)+1}),(0,qt.jsx)(gw,{align:"center",colSpan:"1",children:(null===(o=t[(null===t||void 0===t?void 0:t.length)-2])||void 0===o||null===(a=o.data[0])||void 0===a?void 0:a.value)-1}),(0,qt.jsx)(gw,{align:"center",colSpan:"1",children:(null===(c=t[(null===t||void 0===t?void 0:t.length)-1])||void 0===c||null===(d=c.data[1])||void 0===d?void 0:d.value)+1}),(0,qt.jsx)(gw,{align:"center",colSpan:"2",children:(null===(u=t[(null===t||void 0===t?void 0:t.length)-2])||void 0===u||null===(p=u.data[1])||void 0===p?void 0:p.value)-1}),(0,qt.jsxs)(gw,{align:"center",colSpan:"2",children:[(null===(m=t[(null===t||void 0===t?void 0:t.length)-1])||void 0===m||null===(f=m.data[0])||void 0===f?void 0:f.value)+1," "," - ",(null===(g=t[(null===t||void 0===t?void 0:t.length)-2])||void 0===g||null===(v=g.data[0])||void 0===v?void 0:v.value)-1," "," / ",(null===(x=t[(null===t||void 0===t?void 0:t.length)-1])||void 0===x||null===(y=x.data[1])||void 0===y?void 0:y.value)+1," "," - ",(null===(b=t[(null===t||void 0===t?void 0:t.length)-2])||void 0===b||null===(j=b.data[1])||void 0===j?void 0:j.value)-1]})]})]})]})})]})}),"bp"===A.data_type&&(0,qt.jsx)(Ff,{item:!0,xs:12,md:6,children:(0,qt.jsxs)(op,{children:[(0,qt.jsx)(op,{sx:{fontWeight:700},children:l("rpm_PulseRule")}),(0,qt.jsx)(Vw,{sx:{borderRadius:2,mt:2},children:(0,qt.jsxs)(Bw,{children:[(0,qt.jsx)(_S,{children:(0,qt.jsxs)(cw,{sx:{"& .MuiTableCell-head":{border:1,borderColor:"#ddd",fontWeight:"600",bgcolor:"primary.theme.50",padding:"6px"}},children:[(0,qt.jsx)(gw,{align:"center",children:l("rpm_Stages")}),(0,qt.jsx)(gw,{align:"center",children:l("rpm_From")}),(0,qt.jsx)(gw,{align:"center",children:l("rpm_To")}),(0,qt.jsx)(gw,{align:"center",children:l("rpm_Range")})]})}),(0,qt.jsxs)(fS,{children:[null===s||void 0===s?void 0:s.map((e,t)=>{var n,r,i,o;return(0,qt.jsxs)(cw,{sx:{"& .MuiTableCell-body":{border:1,borderColor:"#ddd",p:1}},children:[(0,qt.jsx)(gw,{align:"center",className:"tableColor ".concat(e.name),children:l("rpm_".concat(e.name))}),(0,qt.jsx)(gw,{align:"center",children:t==s.length-1?"-":e.data[0].value}),(0,qt.jsx)(gw,{align:"center",children:0===t?"-":t!==s.length-1?(null===(n=s[t-1])||void 0===n||null===(r=n.data)||void 0===r?void 0:r[0].value)-1:s[1].data[0].value}),(0,qt.jsxs)(gw,{align:"center",children:[t==s.length-1?"Below or ":e.data[0].value,!(0===t||1===t)&&"-",0===t?" & Above":t!==s.length-1?(null===(i=s[t-1])||void 0===i||null===(o=i.data)||void 0===o?void 0:o[0].value)-1:s[1].data[0].value]})]},e.salience)}),!ta()(s)&&(0,qt.jsxs)(cw,{sx:{"& .MuiTableCell-body":{border:1,borderColor:"#ddd",p:1}},children:[(0,qt.jsx)(gw,{align:"center",className:"tableColor normal",children:l("rpm_NormalPulse")}),(0,qt.jsx)(gw,{align:"center",children:(null===(_=s[1])||void 0===_?void 0:_.data[0].value)+1}),(0,qt.jsx)(gw,{align:"center",children:(null===(C=s[0])||void 0===C?void 0:C.data[0].value)-1}),(0,qt.jsxs)(gw,{align:"center",children:[(null===(w=s[1])||void 0===w?void 0:w.data[0].value)+1," -"," ",(null===(S=s[0])||void 0===S?void 0:S.data[0].value)-1]})]})]})]})})]})})]})})]})})})}},"editor_formik")})}),!1]})}uSe.defaultProps={addNewRule:()=>{},ruleData:{},rulesHeadCell:[],patientData:{},program:{},glucoseRuleData:{},pulseExRuleArr:[],glucoseExRuleArr:[]};const pSe=uSe;function hSe(e){let{glucoseRuleData:t,addNewRule:n,patientData:r,program:o,glucoseExRuleArr:a}=e;const{t:s}=Vg(),l=Nt(),c={data_type:null!==t&&void 0!==t&&t.data_type?null===t||void 0===t?void 0:t.data_type:"",processing_mode:null!==t&&void 0!==t&&t.processing_mode?null===t||void 0===t?void 0:t.processing_mode:"",data_batch_size:null!==t&&void 0!==t&&t.data_batch_size?null===t||void 0===t?void 0:t.data_batch_size:"",short_description:null!==t&&void 0!==t&&t.short_description?null===t||void 0===t?void 0:t.short_description:"",rule:null!==t&&void 0!==t&&t.rule?null===t||void 0===t?void 0:t.rule:""},d=((()=>{let e=[];null===a||void 0===a||a.forEach(t=>{e.push((0,i.A)((0,i.A)({},t),{},{name:t.name,desc:t.desc,when:{cond:t.data,between:t.data.map(e=>e.between)[0]||""}}))})})(),[{name:s("rpm_RPM"),url:ld.DOCTOR.PROGRAM},{name:null===o||void 0===o?void 0:o.display_name,url:"".concat(ld.DOCTOR.PROGRAM,"/").concat(null===o||void 0===o?void 0:o.code,"/patients")},{name:"".concat((null===r||void 0===r?void 0:r.first_name)||""," ").concat((null===r||void 0===r?void 0:r.last_name)||""),url:"".concat(ld.DOCTOR.PROGRAM,"/").concat(null===o||void 0===o?void 0:o.code,"/patients/").concat(null===r||void 0===r?void 0:r.id,"/dashboard")},{name:s("rpm_patientRules"),url:"".concat(ld.DOCTOR.PROGRAM,"/").concat(null===o||void 0===o?void 0:o.code,"/patients/").concat(null===r||void 0===r?void 0:r.id,"/rules")},{name:ta()(t)?s("rpm_AddRule"):s("rpm_".concat(t.data_type)),url:""}]);return We.useEffect(()=>{const e={breadcrumb:d};ta()(o)||ta()(r)||ta()(t)||l(NC(e))},[o,r,t]),(0,qt.jsxs)(op,{sx:{width:"100%"},position:"relative",children:[(0,qt.jsx)(Ff,{container:!0,spacing:2,children:(0,qt.jsx)(Ff,{item:!0,xs:12,md:12,lg:12,children:(0,qt.jsx)(Kz,{initialValues:ta()(t)?{data_type:"",processing_mode:"",data_batch_size:"",short_description:"",rule:'rule HighSystolic_Stage3 salience 5 {\n      when\n          Util.ToInt(Data.systolic) >= 180\n      then\n          Alerts.Add("bp", "systolic", Data.systolic, "High blood pressure\n   (Hypertensive Crisis)");\n          Retract("HighSystolic_Stage3");\n\n  }\n\n  rule HighDiastolic_Stage3 salience 5 {\n      when\n          Util.ToInt(Data.diastoruleData\n            ruleDatalic) >= 120\n      then\n          Alerts.Add("bp", "diastolic", Data.diastolic, "High blood\n  pressure (Hypertensive Crisis)");\n          Retract("HighDiastolic_Stage3");\n  }\n\n  rule HighSystolic_Stage2 salience 4 {\n      when\n          Util.ToInt(Data.systolic) >= 140 && Util.ToInt(Data.systolic) <= 179\n      then\n          Alerts.Add("bp", "systolic", Data.systolic, "High blood pressure\n   (Hypertension Stage 2)");\n          Retract("HighSystolic_Stage2");\n  }\n\n  rule HighDiastolic_Stage2 salience 4 {\n      when\n          Util.ToInt(Data.diastolic) >= 90 && Util.ToInt(Data.diastolic) <= 119\n      then\n          Alerts.Add("bp", "diastolic", Data.diastolic, "High blood\n  pressure (Hypertension Stage 2)");\n          Retract("HighDiastolic_Stage2");\n  }\n\n  rule HighSystolic {\n      when\n          Util.ToInt(Data.systolic) >= 130 &&\n  Util.ToInt(Data.systolic) <= 139\n      then\n          Alerts.Add("bp", "systolic", Data.systolic, "High blood pressure\n   (Hypertension Stage 1)");\n         Retract("HighSystolic");\n  }\n\n  rule HighDiastolic {\n      when\n          Util.ToInt(Data.diastolic) >= 80 &&\n  Util.ToInt(Data.diastolic) <= 89\n      then\n          Alerts.Add("bp", "diastolic", Data.diastolic, "High blood\n  pressure (Hypertension Stage 1)");\n          Retract("HighDiastolic");\n  }\n\n  rule ElevatedBloodPressure {\n      when\n          Util.ToInt(Data.systolic) >= 120 &&\n  Util.ToInt(Data.systolic) <= 129 &&\n  Util.ToInt(Data.diastolic) < 80\n      then\n          Alerts.Add("bp", "systolic", Data.systolic, "Elevated blood\n  pressure");\n          Complete();\n  }\n\n  rule CheckLowBP salience 1 {\n      when\n          Util.ToInt(Data.systolic) < 90 &&\n  Util.ToInt(Data.diastolic) < 60\n      then\n          Alerts.Add("bp", "systolic", Data.systolic, "Low blood\n  pressure");\n          Alerts.Add("bp", "diastolic", Data.diastolic, "Low blood\n  pressure");\n          Complete();\n  }'}:c,validationSchema:RU.addRule,onSubmit:n,enableReinitialize:!0,children:e=>{var n,r,i,o,l,c,d,u,p;let{values:h}=e;return(0,qt.jsx)(qt.Fragment,{children:(0,qt.jsx)(nH,{children:(0,qt.jsxs)(yH,{variant:"outlined",children:[(0,qt.jsx)(nW,{title:(0,qt.jsxs)(Ff,{container:!0,spacing:2,alignItems:"center",children:[(0,qt.jsxs)(Ff,{item:!0,xs:!0,children:[(0,qt.jsx)(op,{sx:{display:{xs:"block",sm:"none"}},position:"absolute",left:"40px",top:"-33px",children:(0,qt.jsx)(Cf,{variant:"h6",gutterBottom:!0,component:"h6",sx:{marginBottom:"0"},children:ta()(t)?s("rpm_AddNewRule"):s("rpm_ViewRule")})}),(0,qt.jsx)(op,{sx:{display:{xs:"none",sm:"block"}},children:(0,qt.jsx)(Cf,{variant:"h5",gutterBottom:!0,component:"h5",sx:{marginBottom:"0"},children:ta()(t)?s("rpm_AddNewRule"):s("rpm_ViewRule")})})]}),ta()(t)&&(0,qt.jsx)(qt.Fragment,{children:(0,qt.jsx)(Ff,{item:!0,children:(0,qt.jsx)(xh,{type:"submit",variant:"contained",color:"primary",disableElevation:!0,children:s("rpm_Save")})})})]}),sx:{py:1.5,bgcolor:"primary.theme.50"}}),(0,qt.jsx)(wH,{children:(0,qt.jsxs)(Ff,{container:!0,spacing:2,children:[(0,qt.jsx)(Ff,{item:!0,xs:12,md:4,children:(0,qt.jsxs)(op,{mb:2,children:[(0,qt.jsx)(o_,{htmlFor:"data_type",required:!0,sx:{mb:.75},children:s("rpm_VitalType")}),(0,qt.jsxs)(tH,{fullWidth:!0,as:G_,id:"data_type",name:"data_type",size:"small",displayEmpty:!0,disabled:!ta()(t),input:(0,qt.jsx)(qj,{}),endAdornment:(0,qt.jsx)(tw,{position:"end",sx:{position:"absolute",right:"28px"},children:(0,qt.jsx)(sy,{title:s("message:rpm_VitalTypeHelp"),placement:"top",children:(0,qt.jsx)(wh,{size:"small",disableRipple:!0,sx:{p:0},children:(0,qt.jsx)(pM.A,{fontSize:"small"})})})}),children:[null===Dd||void 0===Dd?void 0:Dd.map(e=>(0,qt.jsx)(mf,{value:e.value,children:s("rpm_".concat(e.name))},e.name)),(0,qt.jsx)(mf,{value:"bp.pulse",children:s("rpm_bp")})]}),(0,qt.jsx)(dH,{name:"data_type",children:e=>(0,qt.jsx)(v_,{error:!0,children:s(e,{field:s("rpm_VitalType")})})})]})}),(0,qt.jsx)(Ff,{item:!0,xs:12,md:4,children:(0,qt.jsxs)(op,{mb:2,children:[(0,qt.jsx)(o_,{htmlFor:"short_description",required:!0,sx:{mb:.75},children:s("rpm_ShortDescription")}),(0,qt.jsx)(tH,{fullWidth:!0,as:qj,id:"short_description",name:"short_description",size:"small",disabled:!ta()(t),endAdornment:(0,qt.jsx)(tw,{position:"end",children:(0,qt.jsx)(sy,{title:s("message:rpm_ShortDescriptionHelp"),placement:"top",children:(0,qt.jsx)(wh,{size:"small",disableRipple:!0,sx:{p:0},children:(0,qt.jsx)(pM.A,{fontSize:"small"})})})})}),(0,qt.jsx)(dH,{name:"short_description",children:e=>(0,qt.jsx)(v_,{error:!0,children:s(e,{field:s("rpm_ShortDescription")})})})]})}),"glucose"==h.data_type&&(0,qt.jsx)(Ff,{item:!0,xs:12,md:12,children:(0,qt.jsx)(op,{mb:2,children:(0,qt.jsx)(qt.Fragment,{children:(0,qt.jsx)(Vw,{sx:{borderRadius:2},children:(0,qt.jsxs)(Bw,{children:[(0,qt.jsx)(_S,{children:(0,qt.jsxs)(cw,{sx:{"& .MuiTableCell-head":{border:1,borderColor:"#ddd",fontWeight:"600",bgcolor:"primary.theme.50",padding:.5}},children:[(0,qt.jsx)(gw,{align:"center",rowSpan:2,colSpan:2,children:s("rpm_Stages")}),(0,qt.jsx)(gw,{align:"center",rowSpan:2,colSpan:2,children:s("rpm_Activity")}),(0,qt.jsx)(gw,{align:"center",colSpan:2,children:s("rpm_From")}),(0,qt.jsx)(gw,{align:"center",colSpan:2,children:s("rpm_To")}),(0,qt.jsx)(gw,{align:"center",colSpan:2,children:s("rpm_Range")})]})}),(0,qt.jsxs)(fS,{children:["glucose"===h.data_type&&(0,qt.jsxs)(qt.Fragment,{children:[(0,qt.jsxs)(cw,{sx:{"& .MuiTableCell-body":{border:1,borderColor:"#ddd",p:1}},children:[(0,qt.jsx)(gw,{align:"center",colSpan:"2",className:"tableColor normalGlucose",children:s("rpm_normal")}),(0,qt.jsx)(gw,{align:"center",colSpan:"2",className:"tableColor fasting",children:(0,qt.jsx)(dM,{icon:!1,sx:e=>({py:0,px:1,display:"inline-flex",fontSize:e.spacing(1.5),"& .MuiAlert-message":{p:e.spacing(.5,0)},bgcolor:"customClr.fastingBg",color:"customClr.fastingText"}),children:(0,qt.jsx)("strong",{children:s("rpm_fasting")})})}),(0,qt.jsx)(gw,{align:"center",colSpan:"2",children:(null===(n=a[2])||void 0===n?void 0:n.data[0].value)+1}),(0,qt.jsx)(gw,{align:"center",colSpan:"2",children:(null===(r=a[1])||void 0===r?void 0:r.data[0].value)-1}),(0,qt.jsxs)(gw,{align:"center",colSpan:"2",children:[(null===(i=a[2])||void 0===i?void 0:i.data[0].value)+1," - ",(null===(o=a[1])||void 0===o?void 0:o.data[0].value)-1]})]}),(0,qt.jsxs)(cw,{sx:{"& .MuiTableCell-body":{border:1,borderColor:"#ddd",borderBottom:2,borderBottomColor:"#bbb",p:.5}},children:[(0,qt.jsx)(gw,{align:"center",colSpan:"2",className:"tableColor normalGlucose",children:s("rpm_normal")}),(0,qt.jsx)(gw,{align:"center",colSpan:"2",className:"tableColor nonfasting",children:(0,qt.jsx)(dM,{severity:"error",icon:!1,sx:e=>({py:0,px:1,display:"inline-flex",fontSize:e.spacing(1.5),"& .MuiAlert-message":{p:e.spacing(.5,0)},bgcolor:"customClr.nonfastingBg",color:"customClr.nonfastingText"}),children:(0,qt.jsx)("strong",{children:s("rpm_nonfasting")})})}),(0,qt.jsx)(gw,{align:"center",colSpan:"2",children:(null===(l=a[5])||void 0===l?void 0:l.data[0].value)+1}),(0,qt.jsx)(gw,{align:"center",colSpan:"2",children:(null===(c=a[4])||void 0===c?void 0:c.data[0].value)-1}),(0,qt.jsxs)(gw,{align:"center",colSpan:"2",children:[(null===(d=a[5])||void 0===d?void 0:d.data[0].value)+1," - ",(null===(u=a[4])||void 0===u?void 0:u.data[0].value)-1]})]})]}),null===a||void 0===a||null===(p=a.slice(0,6))||void 0===p?void 0:p.map((e,t)=>{var n,r,i,o,l,c,d,u,p,h,m,f;return(0,qt.jsxs)(cw,{sx:{"& .MuiTableCell-body":{border:1,borderColor:"#ddd",p:1}},children:[(0,qt.jsx)(gw,{align:"center",colSpan:"2",className:"tableColor ".concat(e.name),children:s("rpm_".concat(e.name.toLowerCase()))}),(0,qt.jsx)(gw,{align:"center",colSpan:"2",className:"tableColor ".concat("eq"==e.data[(null===e||void 0===e||null===(n=e.data)||void 0===n?void 0:n.length)-1].op?"fasting":"nonfasting"),children:"eq"==e.data[(null===e||void 0===e||null===(r=e.data)||void 0===r?void 0:r.length)-1].op?(0,qt.jsx)(dM,{icon:!1,sx:e=>({py:0,px:1,display:"inline-flex",fontSize:e.spacing(1.5),"& .MuiAlert-message":{p:e.spacing(.5,0)},bgcolor:"customClr.fastingBg",color:"customClr.fastingText"}),children:(0,qt.jsx)("strong",{children:s("rpm_fasting")})}):(0,qt.jsx)(dM,{severity:"error",icon:!1,sx:e=>({py:0,px:1,display:"inline-flex",fontSize:e.spacing(1.5),"& .MuiAlert-message":{p:e.spacing(.5,0)},bgcolor:"customClr.nonfastingBg",color:"customClr.nonfastingText"}),children:(0,qt.jsx)("strong",{children:s("rpm_nonfasting")})})}),(0,qt.jsx)(gw,{align:"center",colSpan:"2",children:"HypoglycemiaFasting"==e.name||"HypoglycemiaPP"==e.name?"-":e.data[0].value}),(0,qt.jsx)(gw,{align:"center",colSpan:"2",children:"DiabetesFasting"==e.name||"DiabetesPP"===e.name?"-":2===t?(null===(i=a[a.length-2])||void 0===i?void 0:i.data[0].value)-1:5===t?(null===(o=a[a.length-1])||void 0===o?void 0:o.data[0].value)-1:6===t?(null===(l=a[t-5])||void 0===l?void 0:l.data[0].value)-1:7===t?(null===(c=a[t-3])||void 0===c?void 0:c.data[0].value)-1:(null===(d=a[t-1])||void 0===d?void 0:d.data[0].value)-1}),(0,qt.jsxs)(gw,{align:"center",colSpan:"2",children:["HypoglycemiaFasting"==e.name||"HypoglycemiaPP"==e.name?"Below or ":e.data[0].value,"HypoglycemiaFasting"==e.name||"HypoglycemiaPP"==e.name||"DiabetesFasting"==e.name||"DiabetesPP"==e.name?"  ":" - ","DiabetesFasting"==e.name||"DiabetesPP"===e.name?" & Above":2===t?(null===(u=a[a.length-2])||void 0===u?void 0:u.data[0].value)-1:5===t?(null===(p=a[a.length-1])||void 0===p?void 0:p.data[0].value)-1:6===t?(null===(h=a[t-5])||void 0===h?void 0:h.data[0].value)-1:7===t?(null===(m=a[t-3])||void 0===m?void 0:m.data[0].value)-1:(null===(f=a[t-1])||void 0===f?void 0:f.data[0].value)-1]})]},e.salience)})]})]})})})})})]})})]})})})}},"editor_formik")})}),!1]})}hSe.defaultProps={addNewRule:()=>{},glucoseRuleData:{},rulesHeadCell:[],patientData:{},program:{},glucoseExRuleArr:[]};const mSe=hSe;function fSe(e){let{ruleData:t,rulesHeadCell:n,patientData:r,program:o,pulseRuleData:a,glucoseRuleData:s}=e;const l=Nt(),[c,d]=We.useState(null),[u,p]=We.useState(null),[h,m]=We.useState(null),[f,g]=We.useState(null),[v,x]=We.useState(null),[y,b]=We.useState(null),j=e=>{const t=zd.find(t=>t.text===e);return null===t||void 0===t?void 0:t.sign},_=e=>{const t=[],n=Object.keys(null===e||void 0===e?void 0:e.when);return null===e||void 0===e||e.when[n[0]].forEach(r=>{let i=Object.keys(r);var o,a,s,l,c,d;"0"!==i[0]?i[0]&&t.push({name:null!==(o=r[i[0]])&&void 0!==o&&o[0]?null===(a=r[i[0]])||void 0===a?void 0:a[0]:null,value:null!==(s=r[i[0]])&&void 0!==s&&s[1]?null===(l=r[i[0]])||void 0===l?void 0:l[1]:null,op:i[0],between:n[0]}):t.push({name:null===e||void 0===e||null===(c=e.when[n[0]])||void 0===c?void 0:c[0],value:null===e||void 0===e||null===(d=e.when[n[0]])||void 0===d?void 0:d[1],op:n[0]?n[0]:null})}),t},C=e=>{var t;return(0,qt.jsx)(qt.Fragment,{children:(0,qt.jsx)(Ff,{container:!0,spacing:1.5,sx:{"& .sign":{"& span:last-child":{display:"none"}}},children:null===e||void 0===e||null===(t=e.data)||void 0===t?void 0:t.map((t,n)=>{var r;return(0,qt.jsxs)(Ff,{item:!0,className:(null===e||void 0===e||null===(r=e.data)||void 0===r?void 0:r.length)-1===n?"sign":"",children:[(0,qt.jsx)(op,{component:"span",children:null===t||void 0===t?void 0:t.name})," ",(0,qt.jsx)(op,{component:"span",children:j(null===t||void 0===t?void 0:t.op)})," ",(0,qt.jsx)(op,{component:"span",children:null===t||void 0===t?void 0:t.value})," ",(0,qt.jsx)(op,{component:"span",children:j(null===t||void 0===t?void 0:t.between)})]},n)})})})};return We.useEffect(()=>{if(!ta()(t))if("BATCH"===(null===t||void 0===t?void 0:t.processing_mode)){var e;let n=[];null===(e=JSON.parse(null===t||void 0===t?void 0:t.rule))||void 0===e||e.forEach(e=>{n.push((0,i.A)((0,i.A)({},e),{},{when:e.when.and[0]}))}),d(n)}else d(JSON.parse(null===t||void 0===t?void 0:t.rule))},[t]),We.useEffect(()=>{ta()(a)||p(JSON.parse(null===a||void 0===a?void 0:a.rule))},[a]),We.useEffect(()=>{ta()(s)||m(JSON.parse(null===s||void 0===s?void 0:s.rule))},[s]),We.useEffect(()=>{(async()=>{const e=[];await(null===c||void 0===c?void 0:c.forEach(t=>{e.push((0,i.A)((0,i.A)({},t),{},{data:_(t)}))})),g(e)})()},[c]),We.useEffect(()=>{(async()=>{const e=[];await(null===h||void 0===h?void 0:h.forEach(t=>{e.push((0,i.A)((0,i.A)({},t),{},{data:_(t)}))})),x(e)})()},[h]),We.useEffect(()=>{(async()=>{const e=[];await(null===u||void 0===u?void 0:u.forEach(t=>{e.push((0,i.A)((0,i.A)({},t),{},{data:_(t)}))})),b(e)})()},[u]),We.useEffect(()=>{j()},[f]),We.useEffect(()=>{l(NC({activeMenuItem:"rules"}))},[]),(0,qt.jsxs)(op,{sx:{width:"100%"},children:[!ta()(f)&&(0,qt.jsx)(pSe,{exRuleArr:f,glucoseExRuleArr:v,ruleData:t,glucoseRuleData:s,rulesHeadCell:n,getVitalsValue:C,patientData:r,program:o,pulseRuleData:a,pulseExRuleArr:y}),!ta()(v)&&(0,qt.jsx)(mSe,{glucoseExRuleArr:v,glucoseRuleData:s,rulesHeadCell:n,getVitalsValue:C,patientData:r,program:o})]})}fSe.defaultProps={addNewRule:()=>{},ruleData:{},rulesHeadCell:[],patientData:{},program:{},pulseRuleData:{},glucoseRuleData:{}};const gSe=fSe;const vSe=function(e){let{patientData:t,program:n}=e;const r=Nt(),i=wt(cu),{t:o}=Vg(),{patientId:a,ruleId:s}=lo(),[l,c]=We.useState(null),[d,u]=We.useState(null),[p,h]=We.useState(null),[m,f]=We.useState(null),g=async e=>{try{const{data:t}=await r(gl(null===n||void 0===n?void 0:n.code,a,{per_page:999})),{content:i}=t||{},o=null===i||void 0===i?void 0:i.find(t=>"bp.pulse"===t.data_type&&t.processing_mode===e);h(o)}catch(t){r(Zo({subTitle:t.message,severity:ud.ERROR}))}},v=[{id:"level",label:o("rpm_Level"),isSort:!1,sortProperty:"level"},{id:"condition",label:o("rpm_Condition"),isSort:!1,sortProperty:"condition"},{id:"description",label:o("rpm_Description"),isSort:!1,sortProperty:"description"}];return We.useEffect(()=>{cs(p)||cs(n)||(async()=>{const{data:e}=await r(_l(null===n||void 0===n?void 0:n.code,a,p.id));f(e)})()},[p]),We.useEffect(()=>{i&&s&&!cs(n)&&(async()=>{try{const{data:e}=await r(_l(null===n||void 0===n?void 0:n.code,a,s));"bp"==e.data_type&&(c(e),g(null===e||void 0===e?void 0:e.processing_mode)),"glucose"==e.data_type&&u(e)}catch(e){r(Zo({subTitle:e.message,severity:ud.ERROR}))}})()},[i,s,n]),(0,qt.jsx)(gSe,{ruleData:l,glucoseRuleData:d,rulesHeadCell:v,patientData:t,program:n,pulseRuleData:m})};const xSe=function(){var e,t,n,r;const o=Nt(),a=wt(cu),s=wt(vu),l=wt(hu),c=wt(du),{userData:d}=(0,We.useContext)(lv),u=lo(),p=location.search,[h,m]=We.useState(null),[f,g]=We.useState(null),[v,x]=We.useState(null),y=wt(ju),[b,j]=We.useState(null),[_,C]=We.useState(null),w=async()=>{const{data:e}=await o(pl(null===h||void 0===h?void 0:h.code,null===u||void 0===u?void 0:u.patientId));g(e)},S=(e,t)=>t.active-e.active;return We.useEffect(()=>{!a||cs(y)||cs(u)||((async()=>{const e=y.find(e=>e.code===u.programId);if(e.image){const t=await ks(e.image,"".concat(e.display_name,".jpg")),n=URL.createObjectURL(t);m((0,i.A)((0,i.A)({},e),{},{image:n}))}else m(e)})(),(async()=>{try{const{data:e}=await o(Sl({per_page:999},{patientId:null===u||void 0===u?void 0:u.patientId,programId:null===u||void 0===u?void 0:u.programId}));x(null===e||void 0===e?void 0:e.sort(S))}catch(e){console.log(e.message)}})())},[a,y]),We.useEffect(()=>{a&&!cs(h)&&w()},[a,h]),We.useEffect(()=>{const e={sideBar:Yd(null===c||void 0===c?void 0:c.activeMenuItem),headerBar:Yd(null===c||void 0===c?void 0:c.activeMenuItem),isBreadcrumb:Yd(null===c||void 0===c?void 0:c.activeMenuItem),listItems:FC(d).concat([...BC(null===h||void 0===h?void 0:h.permissions,h),...$C(null===h||void 0===h?void 0:h.permissions,f,u,p,h)]),heading:{name:null===h||void 0===h?void 0:h.display_name,city:null===h||void 0===h?void 0:h.city}};o(NC(e))},[h,f,null===c||void 0===c?void 0:c.activeMenuItem]),We.useEffect(()=>{const e={vitals:{bp:{course:null===v||void 0===v?void 0:v.filter(e=>"bp"===e.schedule.vital_name)},glucose:{course:null===v||void 0===v?void 0:v.filter(e=>"glucose"===e.schedule.vital_name)}}};o($s(e))},[v]),We.useEffect(()=>{cs(s)||(()=>{var e,t,n,r;0===(null===s||void 0===s?void 0:s.activeVitalTab)&&j(null===s||void 0===s||null===(e=s.vitals)||void 0===e||null===(t=e.bp)||void 0===t?void 0:t.course),1===(null===s||void 0===s?void 0:s.activeVitalTab)&&C(null===s||void 0===s||null===(n=s.vitals)||void 0===n||null===(r=n.glucose)||void 0===r?void 0:r.course)})()},[s]),(0,qt.jsxs)(qt.Fragment,{children:[(null===c||void 0===c?void 0:c.isBreadcrumb)&&(0,qt.jsx)(op,{mb:2.5,children:(0,qt.jsx)(BH,{labels:l})}),"dashboard"===(null===c||void 0===c?void 0:c.activeMenuItem)&&(0,qt.jsx)(Cye,{patientData:f,scheduleList:b,scheduleGlucoseList:_}),(0,qt.jsxs)(ko,{children:[(0,qt.jsx)(So,{path:"/dashboard",element:cs(h)||null!==h&&void 0!==h&&null!==(e=h.permissions)&&void 0!==e&&e.showViewPatientBtn?(0,qt.jsx)(gje,{patientData:f,program:h}):(0,qt.jsx)(LC,{})}),(0,qt.jsx)(So,{path:"/details",element:cs(h)||null!==h&&void 0!==h&&null!==(t=h.permissions)&&void 0!==t&&t.showViewPatientBtn?(0,qt.jsx)(Wwe,{userData:null===h||void 0===h?void 0:h.permissions,patientData:f,fetchOnePatientDetail:w,program:h}):(0,qt.jsx)(LC,{})}),(0,qt.jsx)(So,{path:"/history",element:(0,qt.jsx)(k_e,{patientData:f,program:h})}),(0,qt.jsx)(So,{path:"/history/family",element:(0,qt.jsx)(Zje,{patientData:f,program:h})}),(0,qt.jsx)(So,{path:"/adherence-report",element:(0,qt.jsx)(Jye,{patientData:f,program:h})}),(0,qt.jsx)(So,{path:"/notes",element:cs(h)||null!==(n=h.permissions)&&void 0!==n&&n.showUpdatePatientConfig?(0,qt.jsx)(P_e,{patientData:f,program:h}):(0,qt.jsx)(LC,{})}),(0,qt.jsx)(So,{path:"/notes/add",element:(0,qt.jsx)(Tye,{patientData:f,program:h})}),(0,qt.jsx)(So,{path:"/rules",element:(0,qt.jsx)(cSe,{patientData:f,program:h})}),(0,qt.jsx)(So,{path:"/rules/:ruleId",element:(0,qt.jsx)(vSe,{patientData:f,program:h})}),(0,qt.jsx)(So,{path:"/rules/add",element:(0,qt.jsx)(qye,{patientData:f,program:h})}),(0,qt.jsx)(So,{path:"/devices",element:cs(h)||null!==(r=h.permissions)&&void 0!==r&&r.showUpdatePatientConfig?(0,qt.jsx)(bje,{patientData:f,program:h}):(0,qt.jsx)(LC,{})}),(0,qt.jsx)(So,{path:"/courses",element:(0,qt.jsx)(pbe,{patientData:f,program:h})}),(0,qt.jsx)(So,{path:"/courses/:courseId",element:(0,qt.jsx)(obe,{patientData:f,activeProgram:h})}),(0,qt.jsx)(So,{path:"/consultations",element:(0,qt.jsx)(Awe,{patientData:f,program:h})}),(0,qt.jsx)(So,{path:"/mprescription",element:(0,qt.jsx)(cwe,{patientData:f,program:h})}),(0,qt.jsx)(So,{path:"/consultations/add-consultation",element:(0,qt.jsx)(ACe,{patientData:f,program:h})}),(0,qt.jsx)(So,{path:"/consultations/edit-consultation/:presId",element:(0,qt.jsx)(ACe,{patientData:f,program:h})}),(0,qt.jsx)(So,{path:"/notes/resolve-alerts",element:(0,qt.jsx)(Owe,{patientData:f,program:h})}),(0,qt.jsx)(So,{path:"/notes/admin-note",element:(0,qt.jsx)(WCe,{patientData:f,program:h})}),(0,qt.jsx)(So,{path:"/notes/summary-note",element:(0,qt.jsx)(Iwe,{patientData:f,program:h})}),(0,qt.jsx)(So,{path:"/notes/doctor-note",element:(0,qt.jsx)(rwe,{patientData:f,program:h})}),(0,qt.jsx)(So,{path:"/notes/other-note",element:(0,qt.jsx)(fwe,{patientData:f,program:h})}),(0,qt.jsx)(So,{path:"/consultations/print-prescription",element:(0,qt.jsx)(Aye,{patientData:f,program:h})}),(0,qt.jsx)(So,{path:"/consultations/:consultId",element:(0,qt.jsx)(XCe,{patientData:f,program:h})}),(0,qt.jsx)(So,{path:"/bp/report",element:(0,qt.jsx)(tSe,{patientData:f,program:h})}),(0,qt.jsx)(So,{path:"/glucose/report",element:(0,qt.jsx)(Ywe,{patientData:f,program:h})}),(0,qt.jsx)(So,{path:"/bp/report/detailed",element:(0,qt.jsx)(iSe,{patientData:f,program:h})}),(0,qt.jsx)(So,{path:"/glucose/report/detailed",element:(0,qt.jsx)(Jwe,{patientData:f,program:h})})]})]})};const ySe=function(e){let{fetchListFunction:t,filterState:n,setFilterState:r,pageDetails:o,setShowFilterColor:a}=e;const{t:s}=Vg();return(0,qt.jsx)(qt.Fragment,{children:(0,qt.jsx)(Kz,{initialValues:{vital:"",duration:"",templateName:""},enableReinitialize:!0,children:()=>(0,qt.jsx)(nH,{children:(0,qt.jsx)(op,{className:"WhiteBG template-tour-step0",sx:{borderRadius:"8px",padding:"0 5px"},children:(0,qt.jsxs)(Ff,{container:!0,alignItems:"center",children:[(0,qt.jsx)(Ff,{item:!0,xs:6,sm:6,md:3,lg:3,children:(0,qt.jsx)(op,{marginLeft:1,py:.6,pr:1,display:"flex",alignItems:"center",width:"100%",children:(0,qt.jsx)(op,{className:"smallWebFont",width:"100%",pr:1,children:(0,qt.jsx)(tH,{as:qj,fullWidth:!0,size:"small",variant:"outlined",name:"templateName",value:n.templateName,placeholder:s("message:rpm_SearchTital"),onChange:e=>{r(t=>(0,i.A)((0,i.A)({},t),{},{templateName:e.target.value}))},endAdornment:(0,qt.jsx)(tw,{position:"end",sx:{position:"absolute",right:"8px"},children:(0,qt.jsx)(sy,{title:s("message:rpm_SearchTemplateFilterBar"),placement:"top",children:(0,qt.jsx)(wh,{size:"small",disableRipple:!0,sx:{p:0},children:(0,qt.jsx)(pM.A,{fontSize:"small"})})})}),sx:{bgcolor:"white"}})})})}),(0,qt.jsx)(Ff,{item:!0,xs:6,sm:6,md:3,lg:3,className:"break-450-scrn smallWebFont",width:"100%",children:(0,qt.jsxs)(d_,{sx:{display:"flex",alignItems:"center"},fullWidth:!0,children:[(0,qt.jsx)(o_,{id:"vital",sx:{top:"-6px",fontSize:"15px"},children:s("rpm_VitalType")}),(0,qt.jsx)(tH,{as:G_,sx:{borderRadius:2,bgcolor:"white"},fullWidth:!0,name:"vital",labelId:"vital",label:"vital type",variant:"outlined",size:"small",value:n.vital,onChange:e=>{r(t=>(0,i.A)((0,i.A)({},t),{},{vital:e.target.value}))},endAdornment:(0,qt.jsx)(tw,{position:"end",sx:{position:"absolute",right:"28px"},children:(0,qt.jsx)(sy,{title:s("message:rpm_VitalTypeNoteHelp"),placement:"top",children:(0,qt.jsx)(wh,{size:"small",disableRipple:!0,sx:{p:0},children:(0,qt.jsx)(pM.A,{fontSize:"small"})})})}),children:Nd.map(e=>(0,qt.jsx)(mf,{value:e.value,children:s("rpm_".concat(e.name))},e.value))})]})}),(0,qt.jsx)(Ff,{item:!0,md:6,lg:6,sm:12,children:(0,qt.jsxs)(Ff,{container:!0,alignItems:"center",spacing:1,children:[(0,qt.jsx)(Ff,{item:!0,children:(0,qt.jsx)(Cf,{color:"primary",fontWeight:600,sx:{fontSize:14},ml:1,children:s("rpm_Duration")})}),(0,qt.jsx)(Ff,{item:!0,md:!0,children:(0,qt.jsx)(tH,{as:qj,type:"number",fullWidth:!0,size:"small",variant:"outlined",name:"duration",value:n.duration,placeholder:s("message:rpm_InDays"),sx:{bgcolor:"white"},onChange:e=>{r(t=>(0,i.A)((0,i.A)({},t),{},{duration:e.target.value}))},endAdornment:(0,qt.jsx)(tw,{position:"end",sx:{position:"absolute",right:"8px"},children:(0,qt.jsx)(sy,{title:s("message:rpm_TemplateDurationHelp"),placement:"top",children:(0,qt.jsx)(wh,{size:"small",disableRipple:!0,sx:{p:0},children:(0,qt.jsx)(pM.A,{fontSize:"small"})})})})})}),(0,qt.jsx)(Ff,{item:!0,children:(0,qt.jsxs)(op,{py:.5,children:[(0,qt.jsx)(xh,{variant:"contained",disableElevation:!0,sx:{ml:2},onClick:()=>{o.current_page=1,t(n),""===n.vital&&null===n.duration&&null===n.templateName||a(!0)},children:s("rpm_ApplyFilters")}),(0,qt.jsx)(xh,{variant:"text",disableElevation:!0,onClick:()=>{o.current_page=1,r({vital:"",duration:"",templateName:""}),t({vital:"",duration:"",templateName:""}),a(!1)},type:"reset",children:(0,qt.jsx)(J_.A,{})})]})})]})})]})})})})})};function bSe(e){var t;let{order:n,orderBy:r,setOrder:i,setOrderBy:o,dataParameter:a,checkState:s,onCheck:l,isSelection:c,nodata:d,templateHeads:u,showFilterColor:p,setShowFilterColor:h,pageDetails:m,downloadFile:f,filterState:g,setFilterState:v,activeProgram:x,initialHeadcells:y,setHeadCells:b,settingModal:j,handleSettingModalToggle:_,allTemplates:C,deleteTemplate:w,templateDelete:S,setTemplateDelete:A,getAllTemplates:k}=e;const{t:T}=Vg(),E=Nt(),[M,O]=We.useState(0),[R,P]=We.useState(1),[D,N]=We.useState(20),L=so(),I=[{name:T("rpm_RPM"),url:ld.DOCTOR.PROGRAM},{name:null===x||void 0===x?void 0:x.display_name,url:"".concat(ld.DOCTOR.PROGRAM,"/").concat(null===x||void 0===x?void 0:x.code,"/patients")},{name:T("rpm_RxTemplates"),url:""}];We.useEffect(()=>{const e={breadcrumb:I};cs(x)||E(NC(e))},[x]);We.useEffect(()=>{const e={breadcrumb:I};cs(x)||E(NC(e))},[x]);const F=e=>(0,qt.jsx)(sy,{title:T("rpm_Edit"),children:(0,qt.jsx)(wh,{color:"primary","data-id":e.id,onClick:()=>{L("edit-template/".concat(null===e||void 0===e?void 0:e.id))},children:(0,qt.jsx)(fc,{fontSize:"small",sx:{width:16,height:16}})})}),$=e=>(0,qt.jsx)(sy,{title:T("rpm_view"),children:(0,qt.jsx)(wh,{"data-id":e.id,color:"primary",onClick:()=>{L("".concat(null===e||void 0===e?void 0:e.id))},children:(0,qt.jsx)(gc,{fontSize:"small",sx:{width:16,height:16}})})}),B=e=>(0,qt.jsx)(wh,{"data-id":e.id,color:"error",onClick:()=>{A({open:!0,data:null===e||void 0===e?void 0:e.id})},children:(0,qt.jsx)(xc,{fontSize:"small",sx:{width:16,height:16}})});return(0,qt.jsxs)(qt.Fragment,{children:[(0,qt.jsxs)(op,{children:[(0,qt.jsxs)(op,{sx:{width:"100%"},children:[(0,qt.jsx)(op,{mb:2.5,children:(0,qt.jsx)(BH,{labels:I})}),(0,qt.jsxs)(Ff,{container:!0,children:[(0,qt.jsx)(Ff,{item:!0,xs:6,md:6,children:(0,qt.jsx)(op,{sx:{mb:1},children:(0,qt.jsx)(Cf,{variant:"h5",component:"h5",children:T("rpm_RxTemplates")})})}),(0,qt.jsx)(Ff,{item:!0,xs:6,md:6,children:(0,qt.jsx)(op,{mb:3,textAlign:"right",children:(0,qt.jsxs)(xh,{onClick:()=>L("add-template"),variant:"contained",disableElevation:!0,style:{marginRight:"10px"},className:"template-tour-step1",children:[(0,qt.jsx)(jue.A,{}),(0,qt.jsx)(Cf,{component:"span",className:"hideOnMobile",children:T("rpm_Addtemplate")})]})})})]})]}),(0,qt.jsx)(op,{bgcolor:"white",p:1,children:(0,qt.jsxs)(Ff,{container:!0,spacing:2,sx:{alignItems:{xs:"flex-start",md:"center"}},children:[(0,qt.jsx)(Ff,{item:!0,sm:10,xs:10,children:(0,qt.jsx)(ySe,{fetchListFunction:k,filterState:g,setFilterState:v,pageDetails:m,showFilterColor:p,setShowFilterColor:h})}),(0,qt.jsx)(Ff,{item:!0,ml:"auto",sm:2,xs:2,children:(0,qt.jsx)(op,{pt:.5,textAlign:"end",children:(0,qt.jsx)(sy,{title:T("rpm_TableCellSetting"),children:(0,qt.jsx)(sv,{sx:{boxShadow:"none",width:32,height:32,minHeight:"auto"},size:"small",color:"primary",onClick:_,children:(0,qt.jsx)(YC.A,{fontSize:"small",sx:{width:16,height:16}})})})})})]})}),(0,qt.jsxs)(op,{children:[(0,qt.jsx)(UT,{order:n,orderBy:r,setOrder:i,setOrderBy:o,data:cs(C)?[]:C,headCells:u.filter(e=>y.includes(e.id)),dataParameter:a,selected:s,setSelected:l,isSelection:c,noDataImage:d,pageDetails:m,skeletonVrows:6,className:"theme_scroll",children:null===C||void 0===C||null===(t=C.slice(M*D,M*D+Number(D)))||void 0===t?void 0:t.map((e,t)=>(0,qt.jsxs)(cw,{sx:{"&:last-child td, &:last-child th":{border:0}},children:[y.includes("template")&&(0,qt.jsx)(gw,{width:300,children:(0,qt.jsx)(Lo,{className:"linkClr",to:"".concat(null===e||void 0===e?void 0:e.id),children:null===e||void 0===e?void 0:e.name})}),y.includes("vitaltype")&&(0,qt.jsxs)(gw,{children:[" ","bp"===e.vital&&(0,qt.jsxs)(Cf,{color:"customClr.bp",fontWeight:600,component:"span",fontSize:14,children:[" ",T("rpm_".concat(e.vital))]}),"glucose"===e.vital&&(0,qt.jsxs)(Cf,{color:"customClr.glucose",fontWeight:600,component:"span",fontSize:14,children:[" ",T("rpm_".concat(e.vital))]}),"others"===e.vital&&(0,qt.jsxs)(Cf,{color:"grey",fontWeight:600,component:"span",fontSize:14,children:[" ",T("rpm_Others")]})]}),y.includes("duration")&&(0,qt.jsx)(gw,{children:(null===e||void 0===e?void 0:e.days)||"NA"}),y.includes("updatedOn")&&(0,qt.jsx)(gw,{children:null!==e&&void 0!==e&&e.updated_at?sa()(null===e||void 0===e?void 0:e.updated_at).format(fd):"NA"}),y.includes("templateId")&&(0,qt.jsx)(gw,{children:null===e||void 0===e?void 0:e.id}),y.includes("createdBy")&&(0,qt.jsx)(gw,{children:(null===e||void 0===e?void 0:e.created_by)||"-"}),y.includes("action")&&(0,qt.jsxs)(gw,{children:[$(e),F(e),B(e)]})]},(null===e||void 0===e?void 0:e.id)+t))}),(0,qt.jsx)(qV,{openModal:S.open,onCloseModal:()=>A({open:!1,data:""}),actionFunction:()=>{w(null===S||void 0===S?void 0:S.data)},options:{primaryText:T("message:rpm_DeleteTitle"),secondaryText:T("message:rpm_DeleteBodyText"),btn:{primaryText:T("rpm_Delete"),secondaryText:T("rpm_Cancel"),primaryColor:"error",secondaryColor:"primary"},btnSwap:!0}})]}),(0,qt.jsx)("div",{style:{display:"none"},children:(0,qt.jsx)(TE,{open:j,allHeadCells:u,initialHeadcells:y,setHeadcells:b,onClose:_})})]}),(0,qt.jsx)(op,{py:2,children:(0,qt.jsxs)(Ff,{container:!0,spacing:2,alignItems:"center",justifyContent:"center",children:[(0,qt.jsx)(Ff,{item:!0,sm:!0,children:(0,qt.jsx)(ZE,{count:Math.ceil((null===C||void 0===C?void 0:C.length)/D),page:R,shape:"rounded",color:"primary",onChange:function(e,t){P(t),O(t-1)}})}),(0,qt.jsx)(Ff,{item:!0,children:(0,qt.jsxs)(op,{sx:{display:"flex",alignItems:"center"},children:[(0,qt.jsx)(Cf,{component:"p",variant:"body1",sx:{mr:2},children:"Rows Per Page"}),(0,qt.jsx)(d_,{margin:"dense",children:(0,qt.jsx)(G_,{variant:"outlined",size:"small",value:D,onChange:e=>{N(parseInt(e.target.value,10)),O(0)},children:[10,20,30,50,100].map(e=>(0,qt.jsx)(mf,{value:e,children:e},e))})})]})})]})})]})}bSe.defaultProps={templateHeads:[],prescriptionNotesModal:[],pageDetails:{},order:"",orderBy:"",dataParameter:"",checkState:[],onCheck:()=>{},isSelection:!1,nodata:"",othernotesList:[],familynotesList:[],getAllTemplates:()=>{},editButton:()=>{},viewButton:()=>{},PrintButton:()=>{},VisibilityIcon:()=>{},deleteButton:()=>{},fileModal:{},fileUploadButton:()=>{},fileUploadIconButton:()=>{},downloadFile:()=>{},saveButton:()=>{},closeButton:()=>{},filterState:{},setFilterState:()=>{},activeProgram:{},program:{},patientData:{},addNewNote:()=>{},noteTypesDropdown:{},showFilterColor:{},setShowFilterColor:()=>{},initialHeadcells:[],setHeadCells:()=>{},settingModal:!1,handleSettingModalToggle:()=>{},allTemplates:[],deleteTemplate:()=>{},templateDelete:{},setTemplateDelete:()=>{}};const jSe=bSe;function _Se(e){var t;let{order:n,orderBy:r,setOrder:i,setOrderBy:o,dataParameter:a,checkState:s,onCheck:l,isSelection:c,nodata:d,templateHeads:u,showFilterColor:p,setShowFilterColor:h,pageDetails:m,downloadFile:f,filterState:g,setFilterState:v,activeProgram:x,initialHeadcells:y,setHeadCells:b,settingModal:j,handleSettingModalToggle:_,allTemplates:C,deleteTemplate:w,templateDelete:S,setTemplateDelete:A,getAllTemplates:k}=e;const{t:T}=Vg(),E=Nt(),[M,O]=We.useState(0),[R,P]=We.useState(1),[D,N]=We.useState(20),L=so(),I=[{name:T("rpm_RPM"),url:ld.DOCTOR.PROGRAM},{name:null===x||void 0===x?void 0:x.display_name,url:"".concat(ld.DOCTOR.PROGRAM,"/").concat(null===x||void 0===x?void 0:x.code,"/patients")},{name:T("rpm_RxTemplates"),url:""}];We.useEffect(()=>{const e={breadcrumb:I};cs(x)||E(NC(e))},[x]);We.useEffect(()=>{const e={breadcrumb:I};cs(x)||E(NC(e))},[x]);const F=e=>(0,qt.jsx)(sy,{title:T("rpm_Edit"),children:(0,qt.jsx)(wh,{color:"primary","data-id":e.id,onClick:()=>{L("edit-template/".concat(null===e||void 0===e?void 0:e.id))},children:(0,qt.jsx)(fc,{fontSize:"small",sx:{width:16,height:16}})})}),$=e=>(0,qt.jsx)(sy,{title:T("rpm_view"),children:(0,qt.jsx)(wh,{"data-id":e.id,color:"primary",onClick:()=>{L("".concat(null===e||void 0===e?void 0:e.id))},children:(0,qt.jsx)(gc,{fontSize:"small",sx:{width:16,height:16}})})}),B=e=>(0,qt.jsx)(wh,{"data-id":e.id,color:"error",onClick:()=>{A({open:!0,data:null===e||void 0===e?void 0:e.id})},children:(0,qt.jsx)(xc,{fontSize:"small",sx:{width:16,height:16}})});return(0,qt.jsxs)(qt.Fragment,{children:[(0,qt.jsxs)(op,{children:[(0,qt.jsxs)(op,{sx:{width:"100%"},children:[(0,qt.jsxs)(op,{mb:2.5,display:"flex",alignItems:"center",children:[(0,qt.jsx)(BH,{labels:I}),(0,qt.jsx)(Cf,{variant:"h6",component:"h6",sx:{marginBottom:"0"},children:T("rpm_RxTemplates")})]}),(0,qt.jsx)(Ff,{container:!0,children:(0,qt.jsx)(Ff,{item:!0,children:(0,qt.jsx)(op,{mb:3,textAlign:"right",children:(0,qt.jsxs)(xh,{onClick:()=>L("add-template"),variant:"contained",disableElevation:!0,style:{marginRight:"10px"},className:"template-tour-step1",children:[(0,qt.jsx)(jue.A,{}),(0,qt.jsx)(Cf,{component:"span",className:"hideOnMobile",children:T("rpm_Addtemplate")})]})})})})]}),(0,qt.jsx)(op,{bgcolor:"white",p:1,children:(0,qt.jsxs)(Ff,{container:!0,spacing:2,sx:{alignItems:{xs:"flex-start",md:"center"}},children:[(0,qt.jsx)(Ff,{item:!0,lg:11,xl:8,md:12,sm:10,xs:10,children:(0,qt.jsx)(ySe,{fetchListFunction:k,filterState:g,setFilterState:v,pageDetails:m,showFilterColor:p,setShowFilterColor:h})}),(0,qt.jsx)(Ff,{item:!0,ml:"auto",sm:2,xs:2,children:(0,qt.jsx)(op,{pt:.5,textAlign:"end",children:(0,qt.jsx)(sy,{title:T("rpm_TableCellSetting"),children:(0,qt.jsx)(sv,{sx:{boxShadow:"none",width:32,height:32,minHeight:"auto"},size:"small",color:"primary",onClick:_,children:(0,qt.jsx)(YC.A,{fontSize:"small",sx:{width:16,height:16}})})})})})]})}),(0,qt.jsxs)(op,{children:[(0,qt.jsx)(UT,{order:n,orderBy:r,setOrder:i,setOrderBy:o,data:cs(C)?[]:C,headCells:u.filter(e=>y.includes(e.id)),dataParameter:a,selected:s,setSelected:l,isSelection:c,noDataImage:d,pageDetails:m,skeletonVrows:6,className:"theme_scroll",children:null===C||void 0===C||null===(t=C.slice(M*D,M*D+Number(D)))||void 0===t?void 0:t.map((e,t)=>(0,qt.jsxs)(cw,{sx:{"&:last-child td, &:last-child th":{border:0}},children:[y.includes("template")&&(0,qt.jsx)(gw,{width:300,children:(0,qt.jsx)(Lo,{className:"linkClr",to:"".concat(null===e||void 0===e?void 0:e.id),children:null===e||void 0===e?void 0:e.name})}),y.includes("vitaltype")&&(0,qt.jsxs)(gw,{children:[" ","bp"===e.vital&&(0,qt.jsxs)(Cf,{color:"customClr.bp",fontWeight:600,component:"span",fontSize:14,children:[" ",T("rpm_".concat(e.vital))]}),"glucose"===e.vital&&(0,qt.jsxs)(Cf,{color:"customClr.glucose",fontWeight:600,component:"span",fontSize:14,children:[" ",T("rpm_".concat(e.vital))]}),"others"===e.vital&&(0,qt.jsxs)(Cf,{color:"grey",fontWeight:600,component:"span",fontSize:14,children:[" ",T("rpm_Others")]})]}),y.includes("duration")&&(0,qt.jsx)(gw,{children:(null===e||void 0===e?void 0:e.days)||"NA"}),y.includes("updatedOn")&&(0,qt.jsx)(gw,{children:null!==e&&void 0!==e&&e.updated_at?sa()(null===e||void 0===e?void 0:e.updated_at).format(fd):"NA"}),y.includes("templateId")&&(0,qt.jsx)(gw,{children:null===e||void 0===e?void 0:e.id}),y.includes("createdBy")&&(0,qt.jsx)(gw,{children:(null===e||void 0===e?void 0:e.created_by)||"-"}),y.includes("action")&&(0,qt.jsxs)(gw,{children:[$(e),F(e),B(e)]})]},(null===e||void 0===e?void 0:e.id)+t))}),(0,qt.jsx)(qV,{openModal:S.open,onCloseModal:()=>A({open:!1,data:""}),actionFunction:()=>{w(null===S||void 0===S?void 0:S.data)},options:{primaryText:T("message:rpm_DeleteTitle"),secondaryText:T("message:rpm_DeleteBodyText"),btn:{primaryText:T("rpm_Delete"),secondaryText:T("rpm_Cancel"),primaryColor:"error",secondaryColor:"primary"},btnSwap:!0}})]}),(0,qt.jsx)("div",{style:{display:"none"},children:(0,qt.jsx)(TE,{open:j,allHeadCells:u,initialHeadcells:y,setHeadcells:b,onClose:_})})]}),(0,qt.jsx)(op,{py:2,children:(0,qt.jsxs)(Ff,{container:!0,spacing:2,alignItems:"center",justifyContent:"center",children:[(0,qt.jsx)(Ff,{item:!0,sm:!0,children:(0,qt.jsx)(ZE,{count:Math.ceil((null===C||void 0===C?void 0:C.length)/D),page:R,shape:"rounded",color:"primary",onChange:function(e,t){P(t),O(t-1)}})}),(0,qt.jsx)(Ff,{item:!0,children:(0,qt.jsxs)(op,{sx:{display:"flex",alignItems:"center"},children:[(0,qt.jsx)(Cf,{component:"p",variant:"body1",sx:{mr:2},children:"Rows Per Page"}),(0,qt.jsx)(d_,{margin:"dense",children:(0,qt.jsx)(G_,{variant:"outlined",size:"small",value:D,onChange:e=>{N(parseInt(e.target.value,10)),O(0)},children:[10,20,30,50,100].map(e=>(0,qt.jsx)(mf,{value:e,children:e},e))})})]})})]})})]})}_Se.defaultProps={templateHeads:[],prescriptionNotesModal:[],pageDetails:{},order:"",orderBy:"",dataParameter:"",checkState:[],onCheck:()=>{},isSelection:!1,nodata:"",othernotesList:[],familynotesList:[],getAllTemplates:()=>{},editButton:()=>{},viewButton:()=>{},PrintButton:()=>{},VisibilityIcon:()=>{},deleteButton:()=>{},fileModal:{},fileUploadButton:()=>{},fileUploadIconButton:()=>{},downloadFile:()=>{},saveButton:()=>{},closeButton:()=>{},filterState:{},setFilterState:()=>{},activeProgram:{},program:{},patientData:{},addNewNote:()=>{},noteTypesDropdown:{},showFilterColor:{},setShowFilterColor:()=>{},initialHeadcells:[],setHeadCells:()=>{},settingModal:!1,handleSettingModalToggle:()=>{},allTemplates:[],deleteTemplate:()=>{},templateDelete:{},setTemplateDelete:()=>{}};const CSe=_Se,wSe=e=>{let{activeProgram:t}=e;const n=window.innerWidth,r=wt(cu),{programId:o}=lo(),a=Nt(),s=VC(JA().breakpoints.down("sm")),l=wt(bu),c=!("true"===us(l,"user_principal.attributes.skip_tour[0]","")),[d,u]=We.useState(""),[p,h]=(0,We.useState)([]),[m,f]=(0,We.useState)({open:!1,data:""}),[g,v]=We.useState({vital:"",duration:"",templateName:""}),[x,y]=We.useState(!1);We.useEffect(()=>{a(NC({activeMenuItem:"prescription_template"}))},[]);const b=s?["template","action"]:["template","vitaltype","duration","updatedOn","templateId","createdBy","action"],[j,_]=We.useState(!1),[C,w]=We.useState(cs($o.getHeadCellsTemplates())?b:$o.getHeadCellsTemplates()),S=function(e){w(e),$o.setHeadCellsTemplates(e)},A=()=>{_(!j)},k=async function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:g;try{const{data:t}=await a(((e,t)=>async n=>{try{const n="".concat(ua.template,"/").concat(e,"/program?vital=").concat(null===t||void 0===t?void 0:t.vital,"&days=").concat(null===t||void 0===t?void 0:t.duration,"&name=").concat(null===t||void 0===t?void 0:t.templateName);return await Iu(n,{})}finally{n(na(!1))}})(o,e));h(t)}catch(t){console.log(t)}},T=async e=>{try{await a(((e,t)=>async n=>{try{const n="".concat(ua.template,"/").concat(e,"/").concat(t);return await Bu(n,{})}finally{n(na(!1))}})(o,e)),k(),f((0,i.A)((0,i.A)({},m),{},{open:!1})),a(Zo({subTitle:"message:rpm_TemplateDeleteSuccessfully",severity:ud.SUCCESS}))}catch(t){const e=us(t,"response.data.code","");cs(e)?a(Zo({subTitle:"error:rpm_TemplateDeleteFailed",severity:ud.ERROR})):a(Zo({subTitle:Vd(e,"error:rpm_TemplateDeleteFailed"),severity:ud.ERROR}))}};(0,We.useEffect)(()=>{S(b)},[s]),(0,We.useEffect)(()=>{r&&k()},[r]);const E=[{id:"template",label:_e("rpm_TemplateName"),isSort:!1,sortProperty:"template"},{id:"vitaltype",label:_e("rpm_Vital"),isSort:!1,sortProperty:"vitaltype"},{id:"duration",label:_e("rpm_Duration"),isSort:!1,sortProperty:"duration"},{id:"updatedOn",label:_e("rpm_UpdatedOn"),isSort:!1,sortProperty:"updatedOn"},{id:"templateId",label:_e("rpm_TemplateId"),isSort:!1,sortProperty:"templateId"},{id:"createdBy",label:_e("rpm_Created_By"),isSort:!1,sortProperty:"createdBy"},{id:"action",label:_e("rpm_Actions"),isSort:!1,sortProperty:"action"}];return(0,qt.jsxs)("div",{children:[n>=575?(0,qt.jsx)(jSe,{templateHeads:E,initialHeadcells:C,activeProgram:t,setHeadCells:S,settingModal:j,handleSettingModalToggle:A,allTemplates:p,deleteTemplate:T,templateDelete:m,setTemplateDelete:f,getAllTemplates:k,showFilterColor:x,setShowFilterColor:y,filterState:g,setFilterState:v}):(0,qt.jsx)(CSe,{templateHeads:E,initialHeadcells:C,activeProgram:t,setHeadCells:S,settingModal:j,handleSettingModalToggle:A,allTemplates:p,deleteTemplate:T,templateDelete:m,setTemplateDelete:f,getAllTemplates:k,showFilterColor:x,setShowFilterColor:y,filterState:g,setFilterState:v}),(0,qt.jsx)(zZ,{isTour:c,path:"prescriptionTemplateTour",setRenderer:u}),(0,qt.jsx)("input",{type:"hidden",id:"rerenderer",value:d})]})},SSe=e=>{let{open:t,children:n,onClose:r,title:i,actionFunction:o,disableButton:a}=e;return(0,qt.jsxs)(cC,{open:t,onClose:r,fullWidth:!0,maxWidth:"sm",children:[(0,qt.jsxs)(fC,{sx:{m:0,p:2},children:[i,r?(0,qt.jsx)(wh,{"aria-label":"close",onClick:r,sx:{position:"absolute",right:8,top:14,color:e=>e.palette.grey[500]},children:(0,qt.jsx)(J_.A,{})}):null]}),(0,qt.jsx)(eg,{}),(0,qt.jsx)(bC,{children:n}),(0,qt.jsx)(vE,{children:(0,qt.jsxs)(op,{display:"flex",alignContent:"center",justifyContent:"start",width:"100%",pl:2.5,children:[(0,qt.jsx)(xh,{color:"primary",disableElevation:!0,variant:"outlined",onClick:r,style:{marginBottom:"10px",marginRight:"10px"},children:"Cancel"}),(0,qt.jsx)(xh,{color:"primary",disableElevation:!0,variant:"contained",onClick:o,style:{marginBottom:"10px"},disabled:a,children:"Save"})]})})]})},ASe=e=>{let{notesHead:t,nodata:n,addNewPrescription:r,templateData:o,editPrescription:a,templateModal:s,setTemplateModal:l,saveTemplate:c,editTemplate:d,isEdit:u,template:p,prescriptionId:h,activeProgram:m,medicineSuggestions:f,getMedicineData:g}=e;const v=Nt(),[x,y]=(0,We.useState)(!1),[b,j]=(0,We.useState)(null),[_,C]=(0,We.useState)({open:!1,data:""}),[w,S]=(0,We.useState)({open:!1,data:""}),A=()=>{S((0,i.A)((0,i.A)({},w),{},{open:!w.open,data:""}))},k=ds((e,t,n)=>{e({q:t,index:n})},500),T=(0,We.useCallback)((e,t,n)=>{k(g,t,n)},[g]),[E,M]=(0,We.useState)({vital:"",templateName:"",buttonType:"",medicationList:[{id:(0,N_e.v4)(),medicine:null,medicine_form:"",icon_type:"",dose:null,salt_composition:null,unit:null,color:"",image:"",start_date:sa()(new Date).valueOf(),end_date:null,days:null,repetition_kind:gd,timing:[],frequency:"",comments:""}]}),O=[{name:_e("rpm_RPM"),url:ld.DOCTOR.PROGRAM},{name:null===m||void 0===m?void 0:m.display_name,url:"".concat(ld.DOCTOR.PROGRAM,"/").concat(null===m||void 0===m?void 0:m.code,"/patients")},{name:_e("rpm_RxTemplates"),url:""}];We.useEffect(()=>{const e={breadcrumb:O};cs(m)||v(NC(e))},[m]),We.useEffect(()=>{cs(o)||M(o)},[o]);const R=()=>{C({open:!1,data:""})},P=e=>{let t=[],n=e>4?1:e;for(var r=0;r<n;r++)t.push({start_time:null,interval:null});return t};return(0,qt.jsxs)(op,{children:[(0,qt.jsxs)(op,{sx:{width:"100%"},children:[(0,qt.jsx)(op,{mb:2.5,children:(0,qt.jsx)(BH,{labels:O})}),(0,qt.jsx)(Ff,{container:!0,children:(0,qt.jsx)(Ff,{item:!0,xs:12,children:(0,qt.jsx)(op,{sx:{mb:1},children:(0,qt.jsx)(Ff,{container:!0,spacing:2,alignItems:"center",sx:{mb:2},children:(0,qt.jsx)(Ff,{item:!0,xs:!0,children:(0,qt.jsx)(Cf,{variant:"h5",component:"h5",children:_e("rpm_RxTemplates")})})})})})})]}),(0,qt.jsx)(Kz,{initialValues:E,validationSchema:RU.addPrescriptionNote,onSubmit:async(e,t)=>{let{setErrors:n}=t;if("template"===(null===e||void 0===e?void 0:e.buttonType))try{await RU.addPrescriptionNote.validate(e,{abortEarly:!1}),l(!0)}catch(i){const e={};i.inner.forEach(t=>{e[t.path]=t.message}),n(e)}else try{cs(h)?await r(e):await(cs(p)?a(e):r(e))}catch(i){console.log(i)}},enableReinitialize:!0,children:e=>{let{values:r,setFieldValue:o,setFieldTouched:a}=e;return(0,qt.jsx)(qt.Fragment,{children:(0,qt.jsxs)(nH,{children:[(0,qt.jsxs)(Ff,{container:!0,justifyContent:"space-between",children:[(0,qt.jsx)(Ff,{item:!0,children:(0,qt.jsxs)(op,{mb:2,children:[(0,qt.jsxs)(d_,{sx:{flexDirection:"row",alignItems:"center"},className:"vitalTypeWebTop",children:[(0,qt.jsxs)(e_,{id:"demo-row-radio-buttons-group-label",sx:{flex:"0 0 80px",fontWeight:"600",fontSize:"14px"},children:[_e("rpm_VitalType"),":"]}),(0,qt.jsx)(tH,{name:"vital",className:"usualFonts",children:e=>{let{field:t}=e;return(0,qt.jsx)(e_e,(0,i.A)((0,i.A)({row:!0,"aria-labelledby":"demo-row-radio-buttons-group-label"},t),{},{children:null===Nd||void 0===Nd?void 0:Nd.map(e=>(0,qt.jsx)(wE,{sx:{"& .MuiFormControlLabel-label":{fontSize:"14px"}},value:e.value,control:(0,qt.jsx)(f_e,{}),label:_e("rpm_".concat(e.name))},e.key))}))}})]}),(0,qt.jsx)(op,{width:"100%",children:(0,qt.jsx)(dH,{name:"vital",children:e=>(0,qt.jsx)(v_,{error:!0,children:_e(e,{field:_e("rpm_VitalType")})})})})]})}),(0,qt.jsx)(Ff,{item:!0,children:(0,qt.jsx)(op,{mb:2,display:"flex",gap:1,flexWrap:"wrap",children:(0,qt.jsx)(xh,{color:"primary",disableElevation:!0,variant:"contained",type:"submit",disabled:!(null!==r&&void 0!==r&&r.medicationList.length),onClick:()=>o("buttonType","template"),children:_e("rpm_SaveAsTemplate")})})})]}),(0,qt.jsx)(op,{className:"pres_inputTab",children:(0,qt.jsxs)(UT,{data:cs(null===r||void 0===r?void 0:r.notesList)?[{}]:null===r||void 0===r?void 0:r.notesList,headCells:t,noDataImage:n,skeletonVrows:6,className:"theme_scroll",children:[(0,qt.jsx)(lH,{name:"medicationList",validateOnChange:!1,children:e=>{var t,s,l;return(0,qt.jsx)(qt.Fragment,{children:cs(null===r||void 0===r?void 0:r.medicationList)?(0,qt.jsxs)(qt.Fragment,{children:[(0,qt.jsx)(cw,{children:(0,qt.jsx)(gw,{colSpan:7,sx:{border:"none",paddingBottom:"0"},children:(0,qt.jsx)("img",{src:n,style:{display:"block",margin:"auto",maxWidth:"200px"}})})}),(0,qt.jsx)(cw,{children:(0,qt.jsxs)(gw,{colSpan:7,sx:{border:"none",paddingBottom:"30px"},align:"center",children:[(0,qt.jsx)(Cf,{}),(0,qt.jsx)(xh,{variant:"contained",color:"primary",disableElevation:!0,disabled:null===r||void 0===r||null===(s=r.medicationList)||void 0===s||null===(l=s.find(e=>null===e||void 0===e?void 0:e.isEdit))||void 0===l?void 0:l.isEdit,onClick:()=>e.push({id:(0,N_e.v4)(),medicine:null,medicine_form:"",icon_type:"",dose:null,unit:null,color:"",image:"",start_date:sa()(new Date),end_date:null,days:"",repetition_kind:gd,timing:[],frequency:"",comments:""}),children:_e("rpm_AddNewTemplate")})]})})]}):null===r||void 0===r||null===(t=r.medicationList)||void 0===t?void 0:t.map((t,n)=>{var s,l,c;return(0,qt.jsx)(We.Fragment,{children:(0,qt.jsxs)(cw,{sx:{"&:last-child td, &:last-child th":{border:0}},children:[(0,qt.jsx)(gw,{sx:{verticalAlign:"top"},children:(0,qt.jsxs)(op,{minWidth:150,sx:{whiteSpace:"normal"},children:[(0,qt.jsx)(aj,{freeSolo:!0,options:cs(f)?[]:f,id:"medicationList.".concat(n,".medicine"),name:"medicationList.".concat(n,".medicine"),value:(null===r||void 0===r||null===(s=r.medicationList[n])||void 0===s?void 0:s.medicine)||null,getOptionLabel:e=>(null===e||void 0===e?void 0:e.medicine)||"",isOptionEqualToValue:(e,t)=>e.id===t.id,onInputChange:(e,t)=>T(e,t,n),onChange:async(e,t,r)=>{await o("medicationList.".concat(n,".medicine"),t),a("medicationList.".concat(n,".medicine"),!0),o("medicationList.".concat(n,".salt_composition"),null===t||void 0===t?void 0:t.salt_composition),o("medicationList.".concat(n,".medicine_form"),null===t||void 0===t?void 0:t.product_form),"clear"===r&&(o("medicationList.".concat(n,".salt_composition"),""),o("medicationList.".concat(n,".medicine_form"),""))},renderOption:(e,t)=>(0,We.createElement)(op,(0,i.A)((0,i.A)({component:"li"},e),{},{key:t.id}),(0,qt.jsx)(op,{children:(0,qt.jsx)(Cf,{variant:"body1",component:"p",children:null===t||void 0===t?void 0:t.medicine})})),renderInput:e=>(0,qt.jsx)(Q_,(0,i.A)((0,i.A)({},e),{},{fullWidth:!0,size:"small",variant:"outlined",placeholder:"Medicine",InputProps:(0,i.A)((0,i.A)({},e.InputProps),{},{endAdornment:(0,qt.jsxs)(tw,{position:"end",children:[(0,qt.jsx)(sy,{title:_e("message:rpm_MedicineNameHelp"),placement:"top",children:(0,qt.jsx)(wh,{size:"small",disableRipple:!0,sx:{p:0},children:(0,qt.jsx)(pM.A,{fontSize:"small"})})}),e.InputProps.endAdornment]})})}))}),(0,qt.jsx)(dH,{name:"medicationList.".concat(n,".medicine"),children:e=>(0,qt.jsx)(v_,{error:!0,children:_e(e,{field:_e("rpm_MedicineName")})})})]})}),(0,qt.jsx)(gw,{sx:{verticalAlign:"top"},children:(0,qt.jsx)(op,{sx:{whiteSpace:"normal"},minWidth:130,children:(0,qt.jsx)(tH,{as:qj,fullWidth:!0,disabled:!0,size:"small",id:"medicationList.".concat(n,".medicine_form"),name:"medicationList.".concat(n,".medicine_form"),placeholder:"Form",variant:"outlined",endAdornment:(0,qt.jsx)(tw,{position:"end",children:(0,qt.jsx)(sy,{title:_e("message:rpm_FormHelp"),placement:"top",children:(0,qt.jsx)(wh,{size:"small",disableRipple:!0,sx:{p:0},children:(0,qt.jsx)(pM.A,{fontSize:"small"})})})})})})}),(0,qt.jsx)(gw,{sx:{verticalAlign:"top"},children:(0,qt.jsx)(tH,{as:qj,fullWidth:!0,disabled:!0,size:"small",id:"medicationList.".concat(n,".salt_composition"),name:"medicationList.".concat(n,".salt_composition"),placeholder:"Salt Composition",variant:"outlined",endAdornment:(0,qt.jsx)(tw,{position:"end",children:(0,qt.jsx)(sy,{title:_e("message:rpm_CompositionHelp"),placement:"top",children:(0,qt.jsx)(wh,{size:"small",disableRipple:!0,sx:{p:0},children:(0,qt.jsx)(pM.A,{fontSize:"small"})})})})})}),(0,qt.jsx)(gw,{sx:{verticalAlign:"top"},children:(0,qt.jsxs)(op,{minWidth:170,children:[(0,qt.jsx)(op,{display:"flex",gap:1,children:(0,qt.jsxs)(tH,{as:G_,size:"small",fullWidth:!0,id:"medicationList.".concat(n,".icon_type"),name:"medicationList.".concat(n,".icon_type"),variant:"outlined",className:"shapeDropDown",endAdornment:(0,qt.jsx)(tw,{position:"end",sx:{position:"absolute",right:"28px"},children:(0,qt.jsx)(sy,{title:_e("message:rpm_MedicineShapeIconHelp"),placement:"top",children:(0,qt.jsx)(wh,{size:"small",disableRipple:!0,sx:{p:0},children:(0,qt.jsx)(pM.A,{fontSize:"small"})})})}),children:[(0,qt.jsx)(mf,{value:"",sx:{display:"none",opacity:"0.6",color:"red"},children:(0,qt.jsx)("span",{style:{color:"#c6c6c6"},children:"Shape"})}),null===Fd||void 0===Fd?void 0:Fd.map(e=>(0,qt.jsx)(mf,{value:e.key,children:e.text},e.key))]})}),(0,qt.jsxs)(op,{children:[ps(null===t||void 0===t?void 0:t.image)?(0,qt.jsxs)(op,{className:"upload-input-text",children:[(0,qt.jsx)("input",{id:"medicationList.".concat(n,".image"),name:"medicationList.".concat(n,".image"),type:"file",onChange:e=>{o("medicationList.".concat(n,".image"),e.currentTarget.files[0])}}),(0,qt.jsxs)("label",{htmlFor:"contained-button-file",style:{display:"flex",paddingTop:"5px"},children:[(0,qt.jsx)(op,{textOverflow:"ellipsis",whiteSpace:"nowrap",overflow:"hidden",children:_e("uploadImage")}),(0,qt.jsx)(op,{clone:!0,mr:1,color:"primary",children:(0,qt.jsx)(Cue,{width:22,height:22})})]})]}):(0,qt.jsxs)(op,{style:{display:"flex",paddingTop:"5px"},width:170,children:[(0,qt.jsx)(op,{textOverflow:"ellipsis",whiteSpace:"nowrap",style:{cursor:"pointer"},overflow:"hidden",onClick:()=>{const e=URL.createObjectURL(t.image);C({open:!0,data:e})},children:null===t||void 0===t||null===(l=t.image)||void 0===l?void 0:l.name}),(0,qt.jsx)(op,{mr:1,color:"primary",position:"relative",zIndex:2,children:(0,qt.jsx)(wh,{size:"small",color:"error","aria-label":"remove file",onClick:()=>{o("medicationList.".concat(n,".image"),"")},children:(0,qt.jsx)(xc,{width:22,height:22})})})]}),(0,qt.jsx)(dH,{name:"medicationList.".concat(n,".image"),children:e=>(0,qt.jsx)(v_,{error:!0,children:_e(e,{field:_e("rpm_image")})})})]})]})}),(0,qt.jsx)(gw,{sx:{verticalAlign:"top"},children:(0,qt.jsxs)(op,{minWidth:150,sx:{whiteSpace:"normal"},children:[(0,qt.jsx)(tH,{as:G_,size:"small",fullWidth:!0,id:"medicationList.".concat(n,".frequency"),name:"medicationList.".concat(n,".frequency"),onChange:e=>{o("medicationList",r.medicationList.map((t,r)=>n===r?(0,i.A)((0,i.A)({},t),{},{frequency:e.target.value,repetition_kind:e.target.value>4?vd:gd,timing:[...P(e.target.value)]}):t))},variant:"outlined",defaultValue:"",endAdornment:(0,qt.jsx)(tw,{position:"end",sx:{position:"absolute",right:"25px"},children:(0,qt.jsx)(sy,{title:_e("message:rpm_FrequencyHelp"),placement:"top",children:(0,qt.jsx)(wh,{size:"small",disableRipple:!0,sx:{p:0},children:(0,qt.jsx)(pM.A,{fontSize:"small"})})})}),children:null===Ld||void 0===Ld?void 0:Ld.map(e=>(0,qt.jsx)(mf,{value:e.key,children:"".concat(e.text)},e.key))}),(0,qt.jsx)(dH,{name:"medicationList.".concat(n,".frequency"),children:e=>(0,qt.jsx)(v_,{error:!0,children:_e(e,{field:_e("rpm_Frequency")})})}),(0,qt.jsx)(op,{children:(0,qt.jsxs)(xh,{variant:"text",component:"label",disableFocusRipple:!0,disableRipple:!0,disabled:!r.medicationList[n].frequency||"0"===r.medicationList[n].frequency,onClick:()=>{j(n),y(!x)},children:[(0,qt.jsx)(D_e.A,{fontSize:"small",sx:{width:16,height:16,mr:.5}}),_e("setReminder")]})}),(0,qt.jsx)(op,{display:"flex",flexWrap:"wrap",children:(null===t||void 0===t?void 0:t.timing)&&(null===t||void 0===t?void 0:t.timing.map((e,t)=>(0,qt.jsx)(op,{pr:.5,pb:.5,children:(0,qt.jsx)(Cf,{style:(null===e||void 0===e?void 0:e.start_time)&&{backgroundColor:"#EDEDED",borderRadius:"20px",padding:"3px 8px",fontSize:"13px",color:"#6B7280"},children:null!==e&&void 0!==e&&e.start_time?sa()(e.start_time).format("hh:mm a"):""})},t)))})]})}),(0,qt.jsx)(gw,{sx:{verticalAlign:"top"},children:(0,qt.jsxs)(op,{minWidth:80,sx:{whiteSpace:"normal"},children:[(0,qt.jsx)(tH,{as:qj,fullWidth:!0,size:"small",type:"number",id:"medicationList.".concat(n,".days"),name:"medicationList.".concat(n,".days"),variant:"outlined",onWheel:e=>e.target.blur(),onKeyDown:e=>Pd.includes(e.key)&&e.preventDefault(),onChange:async e=>{const t=parseInt(e.target.value);await o("medicationList.".concat(n,".days"),t),await a("medicationList.".concat(n,".days"),!0),o("medicationList.".concat(n,".end_date"),os(r.medicationList[n].start_date,t))},endAdornment:(0,qt.jsx)(tw,{position:"end",sx:{position:"absolute",right:"8px"},children:(0,qt.jsx)(sy,{title:_e("message:rpm_MedicineDaysHelp"),placement:"top",children:(0,qt.jsx)(wh,{size:"small",disableRipple:!0,sx:{p:0},children:(0,qt.jsx)(pM.A,{fontSize:"small"})})})})}),(0,qt.jsx)(dH,{name:"medicationList.".concat(n,".days"),children:e=>(0,qt.jsx)(v_,{error:!0,children:_e(e,{field:_e("rpm_Days")})})})]})}),(0,qt.jsx)(gw,{sx:{verticalAlign:"top"},children:(0,qt.jsxs)(op,{minWidth:250,sx:{whiteSpace:"normal"},children:[(0,qt.jsx)(tH,{as:qj,fullWidth:!0,multiline:!0,rows:3,size:"small",variant:"outlined",name:"medicationList.".concat(n,".comments"),placeholder:"Enter Comments",endAdornment:(0,qt.jsx)(tw,{position:"end",sx:{position:"absolute",right:"8px"},children:(0,qt.jsx)(sy,{title:_e("message:rpm_CommentsHelp"),placement:"top",children:(0,qt.jsx)(wh,{size:"small",disableRipple:!0,sx:{p:0},children:(0,qt.jsx)(pM.A,{fontSize:"small"})})})})}),(0,qt.jsx)(dH,{name:"medicationList.".concat(n,".comments"),children:e=>(0,qt.jsx)(v_,{error:!0,children:_e(e,{field:_e("rpm_Comment")})})})]})}),(0,qt.jsxs)(gw,{sx:{verticalAlign:"top"},children:[(0,qt.jsx)(wh,{color:"error",onClick:()=>{r.medicationList[n].medicine?S((0,i.A)((0,i.A)({},w),{},{open:!w.open,data:()=>e.remove(n)})):e.remove(n)},children:(0,qt.jsx)(xc,{fontSize:"small",sx:{width:16,height:16}})}),(null===r||void 0===r||null===(c=r.medicationList)||void 0===c?void 0:c.length)-1===n&&(0,qt.jsx)(wh,{color:"primary",onClick:()=>{g(""),e.push({id:(0,N_e.v4)(),medicine:null,medicine_form:"",icon_type:"",salt_composition:null,dose:null,unit:null,color:"",image:"",start_date:sa()(new Date),end_date:null,days:"",repetition_kind:gd,timing:[],frequency:"",comments:""})},children:(0,qt.jsx)(Zue,{fontSize:"small",sx:{width:18,height:18}})})]})]})},n)})})}}),(0,qt.jsx)(hCe,{open:x,setOpen:y,medicationList:null===r||void 0===r?void 0:r.medicationList[b],modalIndex:b,setFieldValue:o,setFieldTouched:a}),(0,qt.jsx)(_C,{open:_.open,imageUrl:_.data,onClose:R,imageWidthHeight:{width:"400",height:"400"}}),(0,qt.jsx)(qV,{openModal:w.open,onCloseModal:A,actionFunction:()=>{w.data(),A()},options:{primaryText:_e("message:rpm_DeleteTitle"),secondaryText:_e("message:rpm_DeleteBodyText"),btn:{primaryText:_e("rpm_Delete"),secondaryText:_e("rpm_Cancel"),primaryColor:"error",secondaryColor:"primary"},btnSwap:!0}})]})}),(0,qt.jsx)(SSe,{open:s,onClose:()=>l(!1),actionFunction:()=>{u?d(r):c(r)},title:_e("rpm_SaveTemplate"),disableButton:null===r||void 0===r||!r.templateName,children:(0,qt.jsxs)(op,{mt:2,children:[(0,qt.jsx)(Cf,{variant:"body1",fontWeight:"h6.fontWeight",gutterBottom:!0,children:_e("rpm_TemplateName")}),(0,qt.jsx)(tH,{as:qj,fullWidth:!0,size:"small",id:"templateName",name:"templateName",variant:"outlined",defaultValue:(null===r||void 0===r?void 0:r.template_name)||"",onChange:e=>o("templateName",e.target.value),endAdornment:(0,qt.jsx)(tw,{position:"end",children:(0,qt.jsx)(sy,{title:_e("message:rpm_MedicineNameHelp"),placement:"top",children:(0,qt.jsx)(wh,{size:"small",disableRipple:!0,sx:{p:0},children:(0,qt.jsx)(pM.A,{fontSize:"small"})})})})})]})})]})})}})]})};ASe.defaultProps={order:"",orderBy:"",notesHead:[],checkState:[],onCheck:()=>{},isSelection:!1,nodata:"",pageDetails:{},fetchNoteList:()=>{},addNewPrescription:()=>{},editPrescription:()=>{},initialData:{},templateData:{},templateModal:!1,setTemplateModal:()=>{},saveTemplate:()=>{},activeProgram:{},editTemplate:()=>{},allTemplates:[],template:"",setTemplate:()=>{},getTemplateById:()=>{},deleteTemplate:()=>{},templateDelete:{},setTemplateDelete:()=>{},prescriptionId:"",isEdit:!1,medicineSuggestions:[],getMedicineData:()=>{}};const kSe=ASe,TSe=e=>{let{open:t,children:n,onClose:r,title:i,actionFunction:o,disableButton:a}=e;return(0,qt.jsxs)(cC,{open:t,onClose:r,fullWidth:!0,maxWidth:"sm",children:[(0,qt.jsxs)(fC,{sx:{m:0,p:2},children:[i,r?(0,qt.jsx)(wh,{"aria-label":"close",onClick:r,sx:{position:"absolute",right:8,top:8,color:e=>e.palette.grey[500]},children:(0,qt.jsx)(J_.A,{})}):null]}),(0,qt.jsx)(eg,{}),(0,qt.jsx)(bC,{children:n}),(0,qt.jsxs)(vE,{children:[(0,qt.jsx)(xh,{color:"primary",disableElevation:!0,variant:"outlined",onClick:r,style:{marginBottom:"10px"},children:"Cancel"}),(0,qt.jsx)(xh,{color:"primary",disableElevation:!0,variant:"contained",onClick:o,style:{marginBottom:"10px"},disabled:a,children:"Save"})]})]})},ESe=e=>{let{nodata:t,addNewPrescription:n,templateData:r,editPrescription:o,templateModal:a,setTemplateModal:s,saveTemplate:l,editTemplate:c,isEdit:d,template:u,prescriptionId:p,activeProgram:h,medicineSuggestions:m,getMedicineData:f}=e;const g=so(),v=Nt(),[x,y]=(0,We.useState)(!1),[b,j]=(0,We.useState)(null),[_,C]=(0,We.useState)({open:!1,data:""}),[w,S]=(0,We.useState)({open:!1,data:""}),A=(0,We.useRef)(),k=()=>{S((0,i.A)((0,i.A)({},w),{},{open:!w.open,data:""}))},T=ds((e,t,n)=>{e({q:t,index:n})},500),E=(0,We.useCallback)((e,t,n)=>{T(f,t,n)},[f]),[M,O]=(0,We.useState)({vital:"",templateName:"",buttonType:"",medicationList:[{id:(0,N_e.v4)(),medicine:null,medicine_form:"",icon_type:"",dose:null,salt_composition:null,unit:null,color:"",image:"",start_date:sa()(new Date).valueOf(),end_date:null,days:null,repetition_kind:gd,timing:[],frequency:"",comments:""}]}),R=[{name:_e("rpm_RPM"),url:ld.DOCTOR.PROGRAM},{name:null===h||void 0===h?void 0:h.display_name,url:"".concat(ld.DOCTOR.PROGRAM,"/").concat(null===h||void 0===h?void 0:h.code,"/patients")},{name:_e("rpm_PrescriptionTemplate"),url:""}];We.useEffect(()=>{const e={breadcrumb:R};cs(h)||v(NC(e))},[h]),We.useEffect(()=>{cs(r)||O(r)},[r]);const P=()=>{C({open:!1,data:""})},D=e=>{let t=[],n=e>4?1:e;for(var r=0;r<n;r++)t.push({start_time:null,interval:null});return t};return(0,qt.jsxs)(op,{children:[(0,qt.jsx)(op,{sx:{width:"100%"},children:(0,qt.jsxs)(op,{mb:2.5,display:"flex",children:[(0,qt.jsx)(BH,{labels:R}),(0,qt.jsx)(Cf,{variant:"h6",component:"h6",children:_e("rpm_PrescriptionTemplate")})]})}),(0,qt.jsx)(Kz,{initialValues:M,validationSchema:RU.addPrescriptionNote,onSubmit:async(e,t)=>{let{setErrors:r}=t;if("template"===(null===e||void 0===e?void 0:e.buttonType))try{await RU.addPrescriptionNote.validate(e,{abortEarly:!1}),s(!0)}catch(i){const e={};i.inner.forEach(t=>{e[t.path]=t.message}),r(e)}else try{cs(p)?await n(e):await(cs(u)?o(e):n(e))}catch(i){console.log(i)}},enableReinitialize:!0,children:e=>{let{values:n,setFieldValue:r,setFieldTouched:o}=e;return(0,qt.jsx)(qt.Fragment,{children:(0,qt.jsxs)(nH,{children:[(0,qt.jsxs)(Ff,{container:!0,justifyContent:"space-between",children:[(0,qt.jsx)(Ff,{item:!0,children:(0,qt.jsx)(op,{mb:4,children:(0,qt.jsxs)(d_,{children:[(0,qt.jsxs)(tH,{as:G_,sx:{borderRadius:2,bgcolor:"white",minWidth:"180px"},fullWidth:!0,name:"vital",variant:"outlined",size:"small",displayEmpty:!0,endAdornment:(0,qt.jsx)(tw,{position:"end",sx:{position:"absolute",right:"28px"},children:(0,qt.jsx)(sy,{title:_e("message:rpm_VitalTypeNoteHelp"),placement:"top",children:(0,qt.jsx)(wh,{size:"small",disableRipple:!0,sx:{p:0,pl:2},children:(0,qt.jsx)(pM.A,{fontSize:"small"})})})}),children:[(0,qt.jsx)(mf,{value:"",disabled:!0,sx:{display:"none"},children:_e("rpm_VitalType")}),null===Nd||void 0===Nd?void 0:Nd.map(e=>(0,qt.jsx)(mf,{value:e.value,children:_e("rpm_".concat(e.name))},e.value))]}),(0,qt.jsx)(dH,{name:"vital",children:e=>(0,qt.jsx)(v_,{error:!0,children:_e(e,{field:_e("rpm_VitalType")})})})]})})}),(0,qt.jsx)(Ff,{item:!0,children:(0,qt.jsxs)(op,{mb:3,display:"flex",gap:1,flexWrap:"wrap",children:[(0,qt.jsx)(xh,{color:"primary",disableElevation:!0,variant:"contained",type:"submit",disabled:!(null!==n&&void 0!==n&&n.medicationList.length),onClick:()=>r("buttonType","template"),children:_e("rpm_SaveAsTemplate")}),(0,qt.jsx)(xh,{variant:"outlined",color:"primary",onClick:()=>g(-1),children:_e("rpm_Back")})]})})]}),(0,qt.jsxs)(op,{className:"pres_inputTab",children:[(0,qt.jsx)(lH,{name:"medicationList",validateOnChange:!1,children:e=>{var a,s,l;return(0,qt.jsx)(qt.Fragment,{children:cs(null===n||void 0===n?void 0:n.medicationList)?(0,qt.jsxs)(qt.Fragment,{children:[(0,qt.jsx)(cw,{children:(0,qt.jsx)(gw,{colSpan:7,sx:{border:"none",paddingBottom:"0"},children:(0,qt.jsx)("img",{src:t,style:{display:"block",margin:"auto",maxWidth:"200px"}})})}),(0,qt.jsx)(cw,{children:(0,qt.jsxs)(gw,{colSpan:7,sx:{border:"none",paddingBottom:"30px"},align:"center",children:[(0,qt.jsx)(Cf,{}),(0,qt.jsx)(xh,{variant:"contained",color:"primary",disableElevation:!0,disabled:null===n||void 0===n||null===(s=n.medicationList)||void 0===s||null===(l=s.find(e=>null===e||void 0===e?void 0:e.isEdit))||void 0===l?void 0:l.isEdit,onClick:()=>e.push({id:(0,N_e.v4)(),medicine:"",medicine_form:"",icon_type:"",dose:null,unit:null,color:"",image:"",start_date:sa()(new Date),end_date:null,days:"",repetition_kind:gd,timing:[],frequency:"",comments:""}),children:_e("rpm_AddNewTemplate")})]})})]}):null===n||void 0===n||null===(a=n.medicationList)||void 0===a?void 0:a.map((t,a)=>{var s,l,c;return(0,qt.jsx)(yH,{ref:A,style:{marginBottom:"20px"},children:(0,qt.jsx)(wH,{children:(0,qt.jsxs)(Ff,{container:!0,spacing:2,children:[(0,qt.jsxs)(Ff,{item:!0,xs:12,children:[(0,qt.jsx)(Cf,{variant:"body1",component:"p",fontWeight:"h6.fontWeight",children:_e("rpm_Medication")}),(0,qt.jsxs)(op,{sx:{whiteSpace:"normal"},children:[(0,qt.jsx)(aj,{freeSolo:!0,options:cs(m)?[]:m,id:"medicationList.".concat(a,".medicine"),name:"medicationList.".concat(a,".medicine"),value:(null===n||void 0===n||null===(s=n.medicationList[a])||void 0===s?void 0:s.medicine)||null,getOptionLabel:e=>(null===e||void 0===e?void 0:e.medicine)||"",isOptionEqualToValue:(e,t)=>e.id===t.id,onInputChange:(e,t)=>E(e,t,a),onChange:async(e,t,n)=>{await r("medicationList.".concat(a,".medicine"),t),o("medicationList.".concat(a,".medicine"),!0),r("medicationList.".concat(a,".salt_composition"),null===t||void 0===t?void 0:t.salt_composition),r("medicationList.".concat(a,".medicine_form"),null===t||void 0===t?void 0:t.medicine_form),"clear"===n&&(r("medicationList.".concat(a,".salt_composition"),""),r("medicationList.".concat(a,".medicine_form"),""))},renderOption:(e,t)=>(0,We.createElement)(op,(0,i.A)((0,i.A)({component:"li"},e),{},{key:t.id}),(0,qt.jsx)(op,{children:(0,qt.jsx)(Cf,{variant:"body1",component:"p",children:null===t||void 0===t?void 0:t.medicine})})),renderInput:e=>(0,qt.jsx)(Q_,(0,i.A)((0,i.A)({},e),{},{fullWidth:!0,size:"small",variant:"outlined",placeholder:"Medicine",InputProps:(0,i.A)((0,i.A)({},e.InputProps),{},{endAdornment:(0,qt.jsxs)(tw,{position:"end",children:[(0,qt.jsx)(sy,{title:_e("message:rpm_MedicineNameHelp"),placement:"top",children:(0,qt.jsx)(wh,{size:"small",disableRipple:!0,sx:{p:0},children:(0,qt.jsx)(pM.A,{fontSize:"small"})})}),e.InputProps.endAdornment]})})}))}),(0,qt.jsx)(dH,{name:"medicationList.".concat(a,".medicine"),children:e=>(0,qt.jsx)(v_,{error:!0,children:_e(e,{field:_e("rpm_MedicineName")})})})]})]}),(0,qt.jsxs)(Ff,{item:!0,xs:12,children:[(0,qt.jsx)(Cf,{variant:"body1",component:"p",fontWeight:"h6.fontWeight",children:_e("rpm_Form")}),(0,qt.jsx)(op,{sx:{whiteSpace:"normal"},children:(0,qt.jsx)(tH,{as:qj,fullWidth:!0,disabled:!0,size:"small",id:"medicationList.".concat(a,".medicine_form"),name:"medicationList.".concat(a,".medicine_form"),placeholder:"Form",variant:"outlined",endAdornment:(0,qt.jsx)(tw,{position:"end",children:(0,qt.jsx)(sy,{title:_e("message:rpm_MedicineNameHelp"),placement:"top",children:(0,qt.jsx)(wh,{size:"small",disableRipple:!0,sx:{p:0},children:(0,qt.jsx)(pM.A,{fontSize:"small"})})})})})})]}),(0,qt.jsx)(Ff,{item:!0,xs:12,children:(0,qt.jsxs)(Cf,{variant:"body1",component:"p",fontWeight:"h6.fontWeight",children:[" ",_e("rpm_Composition"),(0,qt.jsx)(op,{display:"flex",className:"customHeight",children:(0,qt.jsx)(tH,{as:qj,fullWidth:!0,disabled:!0,size:"small",id:"medicationList.".concat(a,".salt_composition"),name:"medicationList.".concat(a,".salt_composition"),placeholder:"Salt Composition",variant:"outlined",endAdornment:(0,qt.jsx)(tw,{position:"end",children:(0,qt.jsx)(sy,{title:_e("message:rpm_MedicineNameHelp"),placement:"top",children:(0,qt.jsx)(wh,{size:"small",disableRipple:!0,sx:{p:0},children:(0,qt.jsx)(pM.A,{fontSize:"small"})})})})})})]})}),(0,qt.jsxs)(Ff,{item:!0,xs:12,children:[(0,qt.jsx)(Cf,{variant:"body1",component:"p",fontWeight:"h6.fontWeight",children:_e("rpm_Shape")}),(0,qt.jsxs)(op,{children:[(0,qt.jsx)(op,{display:"flex",gap:1,children:(0,qt.jsx)(tH,{as:G_,size:"small",fullWidth:!0,id:"medicationList.".concat(a,".icon_type"),name:"medicationList.".concat(a,".icon_type"),variant:"outlined",className:"shapeDropDown",endAdornment:(0,qt.jsx)(tw,{position:"end",sx:{position:"absolute",right:"28px"},children:(0,qt.jsx)(sy,{title:_e("message:rpm_MedicineIconHelp"),placement:"top",children:(0,qt.jsx)(wh,{size:"small",disableRipple:!0,sx:{p:0},children:(0,qt.jsx)(pM.A,{fontSize:"small"})})})}),children:Fd.map(e=>(0,qt.jsx)(mf,{value:e.key,children:e.text},e.key))})}),(0,qt.jsxs)(op,{children:[ps(null===t||void 0===t?void 0:t.image)?(0,qt.jsxs)(op,{className:"upload-input-text",children:[(0,qt.jsx)("input",{id:"medicationList.".concat(a,".image"),name:"medicationList.".concat(a,".image"),type:"file",onChange:e=>{r("medicationList.".concat(a,".image"),e.currentTarget.files[0])}}),(0,qt.jsxs)("label",{htmlFor:"contained-button-file",style:{display:"flex",paddingTop:"5px"},children:[(0,qt.jsx)(op,{textOverflow:"ellipsis",whiteSpace:"nowrap",overflow:"hidden",children:_e("uploadImage")}),(0,qt.jsx)(op,{clone:!0,mr:1,color:"primary",children:(0,qt.jsx)(Cue,{width:22,height:22})})]})]}):(0,qt.jsxs)(op,{style:{display:"flex",paddingTop:"5px"},width:170,children:[(0,qt.jsx)(op,{textOverflow:"ellipsis",whiteSpace:"nowrap",style:{cursor:"pointer"},overflow:"hidden",onClick:()=>{const e=URL.createObjectURL(t.image);C({open:!0,data:e})},children:null===t||void 0===t||null===(l=t.image)||void 0===l?void 0:l.name}),(0,qt.jsx)(op,{mr:1,color:"primary",position:"relative",zIndex:2,children:(0,qt.jsx)(wh,{size:"small",color:"error","aria-label":"remove file",onClick:()=>{r("medicationList.".concat(a,".image"),"")},children:(0,qt.jsx)(xc,{width:22,height:22})})})]}),(0,qt.jsx)(dH,{name:"medicationList.".concat(a,".image"),children:e=>(0,qt.jsx)(v_,{error:!0,children:_e(e,{field:_e("rpm_image")})})})]})]})]}),(0,qt.jsxs)(Ff,{item:!0,xs:12,children:[(0,qt.jsxs)(Cf,{variant:"body1",component:"p",fontWeight:"h6.fontWeight",children:[_e("rpm_Frequency"),(0,qt.jsx)(op,{component:"span",children:"*"})]}),(0,qt.jsxs)(op,{sx:{whiteSpace:"normal"},children:[(0,qt.jsx)(tH,{as:G_,size:"small",fullWidth:!0,id:"medicationList.".concat(a,".frequency"),name:"medicationList.".concat(a,".frequency"),onChange:e=>{r("medicationList",n.medicationList.map((t,n)=>a===n?(0,i.A)((0,i.A)({},t),{},{frequency:e.target.value,repetition_kind:e.target.value>4?vd:gd,timing:[...D(e.target.value)]}):t))},variant:"outlined",defaultValue:"",endAdornment:(0,qt.jsx)(tw,{position:"end",sx:{position:"absolute",right:"25px"},children:(0,qt.jsx)(sy,{title:_e("message:rpm_FrequencyHelp"),placement:"top",children:(0,qt.jsx)(wh,{size:"small",disableRipple:!0,sx:{p:0},children:(0,qt.jsx)(pM.A,{fontSize:"small"})})})}),children:null===Ld||void 0===Ld?void 0:Ld.map(e=>(0,qt.jsx)(mf,{value:e.key,children:"".concat(e.text)},e.key))}),(0,qt.jsx)(dH,{name:"medicationList.".concat(a,".frequency"),children:e=>(0,qt.jsx)(v_,{error:!0,children:_e(e,{field:_e("rpm_Frequency")})})}),(0,qt.jsx)(op,{children:(0,qt.jsxs)(xh,{variant:"text",component:"label",disableFocusRipple:!0,disableRipple:!0,disabled:!n.medicationList[a].frequency||"0"===n.medicationList[a].frequency,onClick:()=>{j(a),y(!x)},children:[(0,qt.jsx)(D_e.A,{fontSize:"small",sx:{width:16,height:16,mr:.5}}),_e("setReminder")]})}),(0,qt.jsx)(op,{display:"flex",flexWrap:"wrap",children:(null===t||void 0===t?void 0:t.timing)&&(null===t||void 0===t?void 0:t.timing.map((e,t)=>(0,qt.jsx)(op,{pr:.5,pb:.5,children:(0,qt.jsx)(Cf,{style:(null===e||void 0===e?void 0:e.start_time)&&{backgroundColor:"#EDEDED",borderRadius:"20px",padding:"3px 8px",fontSize:"13px",color:"#6B7280"},children:null!==e&&void 0!==e&&e.start_time?sa()(e.start_time).format("hh:mm a"):""})},t)))})]})]}),(0,qt.jsxs)(Ff,{item:!0,xs:12,children:[(0,qt.jsxs)(Cf,{variant:"body1",component:"p",fontWeight:"h6.fontWeight",children:[_e("rpm_Days"),(0,qt.jsx)(op,{component:"span",children:"*"})]}),(0,qt.jsxs)(op,{sx:{whiteSpace:"normal"},children:[(0,qt.jsx)(tH,{as:qj,fullWidth:!0,size:"small",type:"number",id:"medicationList.".concat(a,".days"),name:"medicationList.".concat(a,".days"),variant:"outlined",onWheel:e=>e.target.blur(),onKeyDown:e=>Pd.includes(e.key)&&e.preventDefault(),onChange:async e=>{const t=parseInt(e.target.value);await r("medicationList.".concat(a,".days"),t),o("medicationList.".concat(a,".days"),!0),r("medicationList.".concat(a,".end_date"),os(n.medicationList[a].start_date,t))},endAdornment:(0,qt.jsx)(tw,{position:"end",sx:{position:"absolute",right:"8px"},children:(0,qt.jsx)(sy,{title:_e("message:rpm_MedicineDaysHelp"),placement:"top",children:(0,qt.jsx)(wh,{size:"small",disableRipple:!0,sx:{p:0},children:(0,qt.jsx)(pM.A,{fontSize:"small"})})})})}),(0,qt.jsx)(dH,{name:"medicationList.".concat(a,".days"),children:e=>(0,qt.jsx)(v_,{error:!0,children:_e(e,{field:_e("rpm_Days")})})})]})]}),(0,qt.jsxs)(Ff,{item:!0,xs:12,children:[(0,qt.jsx)(Cf,{variant:"body1",component:"p",fontWeight:"h6.fontWeight",children:_e("rpm_Comments")}),(0,qt.jsxs)(op,{sx:{whiteSpace:"normal"},children:[(0,qt.jsx)(tH,{as:qj,fullWidth:!0,multiline:!0,rows:3,size:"small",variant:"outlined",name:"medicationList.".concat(a,".comments"),placeholder:"Enter Comments",endAdornment:(0,qt.jsx)(tw,{position:"end",sx:{position:"absolute",right:"8px"},children:(0,qt.jsx)(sy,{title:_e("message:rpm_CommentsHelp"),placement:"top",children:(0,qt.jsx)(wh,{size:"small",disableRipple:!0,sx:{p:0},children:(0,qt.jsx)(pM.A,{fontSize:"small"})})})})}),(0,qt.jsx)(dH,{name:"medicationList.".concat(a,".comments"),children:e=>(0,qt.jsx)(v_,{error:!0,children:_e(e,{field:_e("rpm_Comment")})})})]})]}),(0,qt.jsx)(Ff,{item:!0,xs:12,children:(0,qt.jsxs)(op,{display:"flex",justifyContent:"space-between",children:[(0,qt.jsx)(wh,{color:"error",className:"lightDanger",onClick:()=>{n.medicationList[a].medicine?S((0,i.A)((0,i.A)({},w),{},{open:!w.open,data:()=>e.remove(a)})):e.remove(a)},children:(0,qt.jsx)(xc,{fontSize:"small",sx:{width:16,height:16}})}),(null===n||void 0===n||null===(c=n.medicationList)||void 0===c?void 0:c.length)-1===a&&(0,qt.jsx)(wh,{color:"primary",onClick:()=>{f(""),e.push({id:(0,N_e.v4)(),medicine:"",medicine_form:"",icon_type:"",salt_composition:null,dose:null,unit:null,color:"",image:"",start_date:sa()(new Date),end_date:null,days:"",repetition_kind:gd,timing:[],frequency:"",comments:""}),setTimeout(()=>{A.current.lastChild.scrollIntoView({behavior:"smooth",block:"nearest"})},0)},children:(0,qt.jsx)(Zue,{fontSize:"small",sx:{width:18,height:18}})})]})})]})})},a)})})}}),(0,qt.jsx)(hCe,{open:x,setOpen:y,medicationList:null===n||void 0===n?void 0:n.medicationList[b],modalIndex:b,setFieldValue:r,setFieldTouched:o}),(0,qt.jsx)(_C,{open:_.open,imageUrl:_.data,onClose:P,imageWidthHeight:{width:"400",height:"400"}}),(0,qt.jsx)(qV,{openModal:w.open,onCloseModal:k,actionFunction:()=>{w.data(),k()},options:{primaryText:_e("message:rpm_DeleteTitle"),secondaryText:_e("message:rpm_DeleteBodyText"),btn:{primaryText:_e("rpm_Delete"),secondaryText:_e("rpm_Cancel"),primaryColor:"error",secondaryColor:"primary"},btnSwap:!0}})]}),(0,qt.jsx)(TSe,{open:a,onClose:()=>s(!1),actionFunction:()=>{d?c(n):l(n)},title:_e("rpm_SaveTemplate"),disableButton:null===n||void 0===n||!n.templateName,children:(0,qt.jsxs)(op,{mt:2,children:[(0,qt.jsx)(Cf,{variant:"body1",fontWeight:"h6.fontWeight",gutterBottom:!0,children:_e("rpm_TemplateName")}),(0,qt.jsx)(tH,{as:qj,fullWidth:!0,size:"small",id:"templateName",name:"templateName",variant:"outlined",defaultValue:(null===n||void 0===n?void 0:n.template_name)||"",onChange:e=>r("templateName",e.target.value),endAdornment:(0,qt.jsx)(tw,{position:"end",children:(0,qt.jsx)(sy,{title:_e("message:rpm_MedicineNameHelp"),placement:"top",children:(0,qt.jsx)(wh,{size:"small",disableRipple:!0,sx:{p:0},children:(0,qt.jsx)(pM.A,{fontSize:"small"})})})})})]})})]})})}})]})};ESe.defaultProps={order:"",orderBy:"",notesHead:[],checkState:[],onCheck:()=>{},isSelection:!1,nodata:"",pageDetails:{},fetchNoteList:()=>{},addNewPrescription:()=>{},editPrescription:()=>{},initialData:{},templateData:{},templateModal:!1,setTemplateModal:()=>{},saveTemplate:()=>{},activeProgram:{},editTemplate:()=>{},allTemplates:[],template:"",setTemplate:()=>{},getTemplateById:()=>{},deleteTemplate:()=>{},templateDelete:{},setTemplateDelete:()=>{},prescriptionId:"",isEdit:!1,medicineSuggestions:[],getMedicineData:()=>{}};const MSe=ESe,OSe=e=>{let{activeProgram:t}=e;const n=Nt(),r=window.innerWidth,{programId:o,templateId:a}=lo(),s=wt(cu),[l,c]=(0,We.useState)({}),d=so(),[u,p]=(0,We.useState)(!1),[h,m]=(0,We.useState)(null),[f,g]=We.useState(null),[v,x]=We.useState(""),y=!!a,b=[{id:"medication",label:_e("rpm_Medication")+"*",isSort:!1,sortProperty:"medication"},{id:"form",label:_e("rpm_Form"),isSort:!1,sortProperty:"form"},{id:"saltComposition",label:_e("rpm_Composition"),isSort:!1,sortProperty:"saltComposition"},{id:"shape",label:_e("rpm_Shape"),isSort:!1,sortProperty:"shape"},{id:"dosage",label:_e("rpm_Frequency")+"*",isSort:!1,sortProperty:"dosage"},{id:"days",label:_e("rpm_Days")+"*",isSort:!1,sortProperty:"days"},{id:"comments",label:_e("rpm_Comments"),isSort:!1,sortProperty:"comments"},{id:"action",label:_e("rpm_Actions"),isSort:!1,sortProperty:"action"}];function j(e){const{vital:t,medications_list:n,intervals:r,start_date:i,end_date:o,id:a,created_by:s,name:l,days:c}=e,d=null===n||void 0===n?void 0:n.map(e=>{const t=function(e,t){if(e&&t){const n=atob(e),r=new Array(n.length);for(let e=0;e<n.length;e++)r[e]=n.charCodeAt(e);const i=new Uint8Array(r),o=new Blob([i],{type:"image/jpeg"});return new File([o],t,{type:"image/jpeg"})}return null}(e.image,"".concat(e.medicine,".jpg")),n=[],o=r.some(t=>{var n;return(null===(n=t.medicines)||void 0===n?void 0:n.includes(e.id))&&null===t.start_time});if(e.frequency>=1&&e.frequency<=4&&o)for(let r=0;r<e.frequency;r++)n.push({start_time:null,interval:null});else r.filter(t=>{var n;return null===(n=t.medicines)||void 0===n?void 0:n.includes(e.id)}).forEach(e=>{let{id:t,start_time:r,stop_after:i}=e;n.push({id:t,start_time:r?Ds(r,hd):null,interval:i})});return{id:e.id,medicine:{medicine:e.medicine,medicine_form:e.medicine_form||e.product_form,salt_composition:e.salt_composition,color:null,dose:null,icon_type:null,image:null,unit:null,id:e.id},medicine_form:e.medicine_form||e.product_form,salt_composition:e.salt_composition,icon_type:e.icon_type,dose:e.dose,unit:e.unit,color:e.color,image:t,start_date:sa()(new Date).valueOf(),days:e.days,end_date:l?os(i,c):null,repetition_kind:e.frequency>4?vd:gd,timing:n,frequency:e.frequency,comments:e.comments}});return{vital:t,presId:a,templateName:l,das:c,pres_start_date:i,pres_end_date:o,created_by:s,medicationList:d}}const _=async e=>{try{await n(Zl(o,{values:e,flag:!0})),p(!1),n(Zo({subTitle:"message:rpm_TemplateCreatedSuccessfully",severity:ud.SUCCESS})),d("".concat(ld.DOCTOR.PROGRAM,"/").concat(o,"/templates"))}catch(t){const e=us(t,"response.data.code","");cs(e)?n(Zo({subTitle:"error:rpm_TemplateCreatedFailed",severity:ud.ERROR})):n(Zo({subTitle:Vd(e,"error:rpm_err_template_name_already_exist"),severity:ud.ERROR}))}},C=async e=>{try{await n(((e,t,n)=>async r=>{r(na(!0));const o=await Jl(null===n||void 0===n?void 0:n.values),a=(0,i.A)((0,i.A)({},o),{},{auto_generate_flag:null===n||void 0===n?void 0:n.flag});try{const n="".concat(ua.template,"/").concat(e,"/").concat(t);return await $u(n,a)}finally{r(na(!1))}})(o,a,{values:e,flag:!0})),p(!1),n(Zo({subTitle:"message:rpm_TemplateUpdatedSuccessfully",severity:ud.SUCCESS})),d("".concat(ld.DOCTOR.PROGRAM,"/").concat(o,"/templates"))}catch(t){const e=us(t,"response.data.code","");cs(e)?n(Zo({subTitle:"error:rpm_TemplateCreatedFailed",severity:ud.ERROR})):n(Zo({subTitle:Vd(e,"error:rpm_err_template_name_already_exist"),severity:ud.ERROR}))}},w=async e=>{try{const{data:t}=await n(Kl(o,e)),r=await j(t);c(r)}catch(t){console.log(t)}},S=async function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{q:v,index:0};try{const{data:t}=await n(Yl({q:e.q}));(null===t||void 0===t?void 0:t.length)>0?g(t):g([{id:Math.random(),medicine:e.q,salt_composition:null,medicine_form:null,icon_type:null,image:null,color:null,dose:null,unit:null}])}catch(t){console.log(t)}};return We.useEffect(()=>{s&&!cs(a)&&w(a)},[s,a]),We.useEffect(()=>{n(NC({activeMenuItem:"prescription_template"}))},[]),(0,qt.jsx)("div",{children:r>=575?(0,qt.jsx)(kSe,{notesHead:b,nodata:SCe,templateData:l,templateModal:u,setTemplateModal:p,saveTemplate:_,editTemplate:C,template:h,setTemplate:m,getTemplateById:w,isEdit:y,activeProgram:t,medicineSuggestions:f,getMedicineData:S,setMedicineSuggestions:g,setSearchText:x}):(0,qt.jsx)(MSe,{notesHead:b,nodata:SCe,templateData:l,templateModal:u,setTemplateModal:p,saveTemplate:_,editTemplate:C,template:h,setTemplate:m,getTemplateById:w,isEdit:y,activeProgram:t,medicineSuggestions:f,getMedicineData:S,setMedicineSuggestions:g,setSearchText:x})})};const RSe=function(e){let{fetchListFunction:t,filterState:n,setFilterState:r,pageDetails:o,scheduleOptions:a,fetchScheduleListOptions:s}=e;const{t:l}=Vg(),[c,d]=We.useState(null),[u,p]=We.useState(""),[h,m]=We.useState(!1);return We.useEffect(()=>{s()},[c]),(0,qt.jsx)(qt.Fragment,{children:(0,qt.jsx)(Kz,{initialValues:{courseName:"",vital:"",duration:""},children:e=>{let{setFieldValue:f,resetForm:g}=e;return(0,qt.jsx)(nH,{children:(0,qt.jsx)(op,{sx:{borderRadius:"8px"},py:.2,pl:1,className:"course_filter WhiteBG",children:(0,qt.jsxs)(Ff,{container:!0,spacing:2,alignItems:"center",children:[(0,qt.jsx)(Ff,{item:!0,md:!0,sm:6,xs:6,children:(0,qt.jsx)(op,{py:.2,display:"flex",alignItems:"center",children:(0,qt.jsx)(aj,{size:"small",id:"courseName",fullWidth:!0,options:a||[],getOptionLabel:e=>(null===e||void 0===e?void 0:e.name)||"",isOptionEqualToValue:(e,t)=>e.id===t.id,value:c,inputValue:u,open:h&&u.length>0,onInputChange:(e,t)=>{p(t),m(!0),t&&s((0,i.A)((0,i.A)({},n),{},{courseName:t}))},onChange:(e,t)=>{d(t),f("courseName",t?t.name:""),r((0,i.A)((0,i.A)({},n),{},{courseName:t?t.name:""})),m(!1),s((0,i.A)((0,i.A)({},n),{},{courseName:t?t.name:""}))},renderOption:(e,t)=>(0,We.createElement)(op,(0,i.A)((0,i.A)({component:"li"},e),{},{key:t.id}),(0,qt.jsx)(op,{children:(0,qt.jsx)(Cf,{variant:"body1",component:"p",children:t.name})})),renderInput:e=>(0,qt.jsx)(Q_,(0,i.A)((0,i.A)({},e),{},{placeholder:l("rpm_SearchSchedule")+"...",variant:"outlined",fullWidth:!0,className:"iconRemove smallWebFont"}))})})}),(0,qt.jsx)(Ff,{item:!0,md:!0,sm:5,xs:5,children:(0,qt.jsx)(op,{className:"smallWebFont",children:(0,qt.jsxs)(tH,{as:G_,displayEmpty:!0,sx:{borderRadius:2,bgcolor:"white",color:n.vital?"grey.900":"grey.400"},fullWidth:!0,name:"vital",value:n.vital,onChange:e=>{r(t=>(0,i.A)((0,i.A)({},t),{},{vital:e.target.value}))},variant:"outlined",size:"small",endAdornment:(0,qt.jsx)(tw,{position:"end",sx:{position:"absolute",right:"28px"},children:(0,qt.jsx)(sy,{title:l("message:rpm_VitalTypeNoteHelp"),placement:"top",children:(0,qt.jsx)(wh,{size:"small",disableRipple:!0,sx:{p:0},children:(0,qt.jsx)(pM.A,{fontSize:"small"})})})}),children:[(0,qt.jsx)(mf,{value:"",sx:{display:"none"},children:l("rpm_VitalType")}),Dd.map(e=>(0,qt.jsx)(mf,{value:e.value,children:l("rpm_".concat(e.name))},e.value))]})})}),(0,qt.jsx)(eg,{orientation:"vertical",flexItem:!0,sx:{ml:2,mt:2}}),(0,qt.jsx)(Ff,{item:!0,md:6,children:(0,qt.jsxs)(Ff,{container:!0,alignItems:"center",spacing:2,children:[(0,qt.jsx)(Ff,{item:!0,children:(0,qt.jsx)(Cf,{color:"primary",fontWeight:600,sx:{fontSize:14},children:l("rpm_Duration")})}),(0,qt.jsx)(Ff,{item:!0,xs:!0,className:"hide_num_arrow",children:(0,qt.jsx)(tH,{as:qj,type:"number",fullWidth:!0,size:"small",variant:"outlined",name:"duration",value:n.duration,placeholder:l("message:rpm_InDays"),sx:{bgcolor:"white"},onChange:e=>{r(t=>(0,i.A)((0,i.A)({},t),{},{duration:e.target.value}))},endAdornment:(0,qt.jsx)(tw,{position:"end",sx:{position:"absolute",right:"8px"},children:(0,qt.jsx)(sy,{title:l("message:rpm_NumericDurationHelp"),placement:"top",children:(0,qt.jsx)(wh,{size:"small",disableRipple:!0,sx:{p:0},children:(0,qt.jsx)(pM.A,{fontSize:"small"})})})})})}),(0,qt.jsxs)(Ff,{item:!0,children:[(0,qt.jsx)(xh,{variant:"contained",disableElevation:!0,onClick:()=>{o.current_page=1,t(n)},children:l("rpm_ApplyFilters")}),(0,qt.jsx)(xh,{variant:"text",disableElevation:!0,type:"reset",onClick:()=>{g(),o.current_page=1,d(null),p(""),m(!1),t({courseName:"",vital:"",duration:""}),r({courseName:"",vital:"",duration:""})},children:(0,qt.jsx)(J_.A,{})})]})]})})]})})})}})})};function PSe(e){var t,n;let{schedule:r,order:i,orderBy:o,setOrder:a,setOrderBy:s,dataParameter:l,scheduleHead:c,checkState:d,onCheck:u,isSelection:p,nodata:h,fetchScheduleList:m,pageDetails:f,viewButton:g,editButton:v,deleteButton:x,activeProgram:y,filterState:b,setFilterState:j,showFilterColor:_,setShowFilterColor:C,setHeadcells:w,settingModal:S,initialHeadcells:A,handleSettingModalToggle:k,scheduleOptions:T,setScheduleOptions:E,fetchScheduleListOptions:M}=e;const{t:O}=Vg(),R=so(),P=[{name:O("rpm_RPM"),url:ld.DOCTOR.PROGRAM},{name:null===y||void 0===y?void 0:y.display_name,url:"".concat(ld.DOCTOR.PROGRAM,"/").concat(null===y||void 0===y?void 0:y.code,"/patients")},{name:O("rpm_Schedules"),url:""}];return(0,qt.jsxs)(op,{sx:{width:"100%"},children:[(0,qt.jsx)(op,{mb:2.5,children:(0,qt.jsx)(BH,{labels:P})}),(0,qt.jsx)(op,{sx:{mb:2.5},children:(0,qt.jsxs)(Ff,{container:!0,spacing:2,alignItems:"center",children:[(0,qt.jsx)(Ff,{item:!0,xs:!0,children:(0,qt.jsx)(Cf,{variant:"h5",gutterBottom:!0,component:"h5",children:O("rpm_Schedules")})}),(null===y||void 0===y||null===(t=y.permissions)||void 0===t?void 0:t.showAddCourseBtn)&&(null===y||void 0===y?void 0:y.is_hospital)&&(0,qt.jsx)(Ff,{item:!0,children:(0,qt.jsxs)(xh,{variant:"contained",color:"primary",disableElevation:!0,onClick:()=>R("add"),className:(null===y||void 0===y||null===(n=y.permissions)||void 0===n?void 0:n.showAddCourseBtn)&&"schedule-tour-step2",children:[(0,qt.jsx)(jue.A,{}),(0,qt.jsx)(Cf,{component:"span",className:"hideOnMobile",children:O("rpm_AddNewSchedule")})]})})]})}),null!==y&&void 0!==y&&y.is_hospital?(0,qt.jsxs)(qt.Fragment,{children:[(0,qt.jsx)(op,{p:1,bgcolor:"#fff",sx:{borderTopLeftRadius:"8px",borderTopRightRadius:"8px"},children:(0,qt.jsxs)(Ff,{container:!0,children:[(0,qt.jsx)(Ff,{item:!0,xs:!0,md:12,lg:10,xl:9,className:"schedule-tour-step0",children:(0,qt.jsx)(RSe,{fetchListFunction:m,filterState:b,setFilterState:j,pageDetails:f,showFilterColor:_,setShowFilterColor:C,scheduleOptions:T,setScheduleOptions:E,fetchScheduleListOptions:M})}),(0,qt.jsx)(Ff,{item:!0,ml:"auto",children:(0,qt.jsx)(op,{pt:.5,children:(0,qt.jsx)(sy,{title:O("rpm_TableCellSetting"),children:(0,qt.jsx)(sv,{sx:{boxShadow:"none",width:32,height:32,minHeight:"auto"},size:"small",color:"primary",onClick:k,children:(0,qt.jsx)(YC.A,{fontSize:"small",sx:{width:16,height:16}})})})})})]})}),(0,qt.jsx)(Ff,{container:!0,spacing:2.5,children:(0,qt.jsxs)(Ff,{item:!0,xs:12,children:[(0,qt.jsx)(op,{children:(0,qt.jsx)(UT,{order:i,orderBy:o,setOrder:a,setOrderBy:s,data:r,headCells:null===c||void 0===c?void 0:c.filter(e=>A.includes(e.id)),dataParameter:l,selected:d,setSelected:u,isSelection:p,noDataImage:h,fetchList:m,pageDetails:f,skeletonVrows:6,className:"theme_scroll",children:null===r||void 0===r?void 0:r.map(e=>{var t,n,r,i,o,a,s;return(0,qt.jsxs)(cw,{sx:{"&:last-child td, &:last-child th":{border:0}},children:[p&&(0,qt.jsx)(gw,{padding:"checkbox",children:(0,qt.jsx)(Dw,{onChange:u,checked:d.includes(e.code),name:e.code,color:"primary"})}),A.includes("title")&&(0,qt.jsx)(gw,{width:300,children:(0,qt.jsx)(Lo,{className:"linkClr",to:e.id,children:(0,qt.jsxs)(op,{display:"flex",alignItems:"center",children:[(0,qt.jsx)(Lo,{className:"linkClr",to:"".concat(null===e||void 0===e?void 0:e.id,"/patients"),children:e.name}),(null===e||void 0===e?void 0:e.def)&&(0,qt.jsx)(op,{ml:1.5,mt:1,children:(0,qt.jsx)("img",{src:Mue,height:20,width:20})})]})})}),A.includes("vital_name")&&(0,qt.jsxs)(gw,{width:300,children:["bp"===e.vital_name&&(0,qt.jsxs)(Cf,{color:"customClr.bp",fontWeight:600,component:"span",fontSize:14,children:[" ",O("rpm_".concat(e.vital_name))]}),"glucose"===e.vital_name&&(0,qt.jsxs)(Cf,{color:"customClr.glucose",fontWeight:600,component:"span",fontSize:14,children:[" ",O("rpm_".concat(e.vital_name))]})]}),A.includes("duration")&&(0,qt.jsx)(gw,{width:300,children:e.duration}),A.includes("patients_enrolled")&&(0,qt.jsx)(gw,{width:300,children:e.total_patient_attached}),A.includes("mandates")&&(0,qt.jsx)(gw,{children:null!==e&&void 0!==e&&null!==(t=e.mandate)&&void 0!==t&&null!==(n=t.timing)&&void 0!==n&&n.length?null===e||void 0===e||null===(r=e.mandate)||void 0===r||null===(i=r.timing)||void 0===i?void 0:i.length:0}),A.includes("action")&&(0,qt.jsxs)(gw,{children:[(null===y||void 0===y||null===(o=y.permissions)||void 0===o?void 0:o.showEditCourseBtn)&&v(e),(null===y||void 0===y||null===(a=y.permissions)||void 0===a?void 0:a.showViewCourseBtn)&&g(e),(null===y||void 0===y||null===(s=y.permissions)||void 0===s?void 0:s.showDeleteCourseBtn)&&x(e)]})]},e.id)})})}),(0,qt.jsx)(KE,{pageDetails:f,fetchListFunction:m}),(0,qt.jsx)(TE,{open:S,allHeadCells:c,initialHeadcells:A,setHeadcells:w,onClose:k})]})})]}):(0,qt.jsxs)(op,{py:6,bgcolor:"#fff",border:"1px solid rgba(0, 0, 0, 0.12)",borderRadius:"4px",children:[(0,qt.jsx)("img",{src:GC,alt:"No Data Found",style:{display:"block",margin:"auto",width:"100%",maxWidth:"300px",height:"auto"}}),(0,qt.jsx)(op,{px:2,color:"#3f51b5",mt:2,display:"flex",justifyContent:"center",textAlign:"center",children:O("rpm_To_Explore_This")})]})]})}PSe.defaultProps={scheduleHead:[],pageDetails:{},order:"",orderBy:"",setOrder:()=>{},setOrderBy:()=>{},dataParameter:"",checkState:"",onCheck:()=>{},isSelection:"",nodata:"",schedule:[],fetchScheduleList:()=>{},editButton:()=>{},viewButton:()=>{},deleteButton:()=>{},addNewProgram:()=>{},editProgram:()=>{},activeProgram:{},filterState:{},setFilterState:()=>{},showFilterColor:{},setShowFilterColor:()=>{},initialHeadcells:[],setHeadcells:()=>{},settingModal:!1,handleSettingModalToggle:()=>{},scheduleOptions:[],setScheduleOptions:()=>{},fetchScheduleListOptions:()=>{}};const DSe=PSe;function NSe(e){var t,n;let{schedule:r,order:i,orderBy:o,setOrder:a,setOrderBy:s,dataParameter:l,scheduleHead:c,checkState:d,onCheck:u,isSelection:p,nodata:h,fetchScheduleList:m,pageDetails:f,viewButton:g,editButton:v,deleteButton:x,activeProgram:y,filterState:b,setFilterState:j,showFilterColor:_,setShowFilterColor:C,setHeadcells:w,settingModal:S,initialHeadcells:A,handleSettingModalToggle:k,scheduleOptions:T,setScheduleOptions:E,fetchScheduleListOptions:M}=e;const{t:O}=Vg(),R=so(),P=[{name:O("rpm_RPM"),url:ld.DOCTOR.PROGRAM},{name:null===y||void 0===y?void 0:y.display_name,url:"".concat(ld.DOCTOR.PROGRAM,"/").concat(null===y||void 0===y?void 0:y.code,"/patients")},{name:O("rpm_Schedules"),url:""}];return(0,qt.jsxs)(op,{sx:{width:"100%"},children:[(0,qt.jsxs)(op,{mb:2.5,display:"flex",alignItems:"center",children:[(0,qt.jsx)(BH,{labels:P}),(0,qt.jsx)(Cf,{variant:"h6",gutterBottom:!0,component:"h6",sx:{marginBottom:"0"},children:O("rpm_Schedules")})]}),(0,qt.jsx)(op,{sx:{mb:2.5},children:(0,qt.jsx)(Ff,{container:!0,spacing:2,alignItems:"center",children:(null===y||void 0===y||null===(t=y.permissions)||void 0===t?void 0:t.showAddCourseBtn)&&(null===y||void 0===y?void 0:y.is_hospital)&&(0,qt.jsx)(Ff,{item:!0,children:(0,qt.jsxs)(xh,{variant:"contained",color:"primary",disableElevation:!0,onClick:()=>R("add"),className:(null===y||void 0===y||null===(n=y.permissions)||void 0===n?void 0:n.showAddCourseBtn)&&"schedule-tour-step2",children:[(0,qt.jsx)(jue.A,{}),(0,qt.jsx)(Cf,{component:"span",className:"hideOnMobile",children:O("rpm_AddNewSchedule")})]})})})}),null!==y&&void 0!==y&&y.is_hospital?(0,qt.jsxs)(qt.Fragment,{children:[" ",(0,qt.jsx)(op,{p:1,bgcolor:"#fff",sx:{borderTopLeftRadius:"8px",borderTopRightRadius:"8px"},children:(0,qt.jsxs)(Ff,{container:!0,children:[(0,qt.jsx)(Ff,{item:!0,xs:!0,md:12,lg:10,xl:9,className:"schedule-tour-step0",children:(0,qt.jsx)(RSe,{fetchListFunction:m,filterState:b,setFilterState:j,pageDetails:f,showFilterColor:_,setShowFilterColor:C,scheduleOptions:T,setScheduleOptions:E,fetchScheduleListOptions:M})}),(0,qt.jsx)(Ff,{item:!0,ml:"auto",children:(0,qt.jsx)(op,{pt:.5,children:(0,qt.jsx)(sy,{title:O("rpm_TableCellSetting"),children:(0,qt.jsx)(sv,{sx:{boxShadow:"none",width:32,height:32,minHeight:"auto"},size:"small",color:"primary",onClick:k,children:(0,qt.jsx)(YC.A,{fontSize:"small",sx:{width:16,height:16}})})})})})]})}),(0,qt.jsx)(Ff,{container:!0,spacing:2.5,children:(0,qt.jsxs)(Ff,{item:!0,xs:12,children:[(0,qt.jsx)(op,{children:(0,qt.jsx)(UT,{order:i,orderBy:o,setOrder:a,setOrderBy:s,data:r,headCells:null===c||void 0===c?void 0:c.filter(e=>A.includes(e.id)),dataParameter:l,selected:d,setSelected:u,isSelection:p,noDataImage:h,fetchList:m,pageDetails:f,skeletonVrows:6,className:"theme_scroll",children:null===r||void 0===r?void 0:r.map(e=>{var t,n,r,i,o,a,s;return(0,qt.jsxs)(cw,{sx:{"&:last-child td, &:last-child th":{border:0}},children:[p&&(0,qt.jsx)(gw,{padding:"checkbox",children:(0,qt.jsx)(Dw,{onChange:u,checked:d.includes(e.code),name:e.code,color:"primary"})}),A.includes("title")&&(0,qt.jsx)(gw,{width:300,children:(0,qt.jsx)(Lo,{className:"linkClr",to:e.id,children:e.name})}),A.includes("vital_name")&&(0,qt.jsxs)(gw,{width:300,children:["bp"===e.vital_name&&(0,qt.jsxs)(Cf,{color:"customClr.bp",fontWeight:600,component:"span",fontSize:14,children:[" ",O("rpm_".concat(e.vital_name))]}),"glucose"===e.vital_name&&(0,qt.jsxs)(Cf,{color:"customClr.glucose",fontWeight:600,component:"span",fontSize:14,children:[" ",O("rpm_".concat(e.vital_name))]})]}),A.includes("duration")&&(0,qt.jsx)(gw,{width:300,children:e.duration}),A.includes("patients_enrolled")&&(0,qt.jsx)(gw,{width:300,children:e.total_patient_attached}),A.includes("mandates")&&(0,qt.jsx)(gw,{children:null!==e&&void 0!==e&&null!==(t=e.mandate)&&void 0!==t&&null!==(n=t.timing)&&void 0!==n&&n.length?null===e||void 0===e||null===(r=e.mandate)||void 0===r||null===(i=r.timing)||void 0===i?void 0:i.length:0}),A.includes("action")&&(0,qt.jsxs)(gw,{children:[(null===y||void 0===y||null===(o=y.permissions)||void 0===o?void 0:o.showEditCourseBtn)&&v(e),(null===y||void 0===y||null===(a=y.permissions)||void 0===a?void 0:a.showViewCourseBtn)&&g(e),(null===y||void 0===y||null===(s=y.permissions)||void 0===s?void 0:s.showDeleteCourseBtn)&&x(e)]})]},e.id)})})}),(0,qt.jsx)(KE,{pageDetails:f,fetchListFunction:m}),(0,qt.jsx)(TE,{open:S,allHeadCells:c,initialHeadcells:A,setHeadcells:w,onClose:k})]})})," "]}):(0,qt.jsxs)(op,{py:6,bgcolor:"#fff",border:"1px solid rgba(0, 0, 0, 0.12)",borderRadius:"4px",children:[(0,qt.jsx)("img",{src:GC,alt:"No Data Found",style:{display:"block",margin:"auto",width:"100%",maxWidth:"300px",height:"auto"}}),(0,qt.jsx)(op,{px:2,color:"#3f51b5",mt:2,display:"flex",justifyContent:"center",children:O("rpm_To_Explore_This")})]})]})}NSe.defaultProps={scheduleHead:[],pageDetails:{},order:"",orderBy:"",setOrder:()=>{},setOrderBy:()=>{},dataParameter:"",checkState:"",onCheck:()=>{},isSelection:"",nodata:"",schedule:[],fetchScheduleList:()=>{},editButton:()=>{},viewButton:()=>{},deleteButton:()=>{},addNewProgram:()=>{},editProgram:()=>{},activeProgram:{},filterState:{},setFilterState:()=>{},showFilterColor:{},setShowFilterColor:()=>{},initialHeadcells:[],setHeadcells:()=>{},settingModal:!1,handleSettingModalToggle:()=>{},scheduleOptions:[],setScheduleOptions:()=>{},fetchScheduleListOptions:()=>{}};const LSe=NSe,ISe=["content"];const FSe=function(e){var t;let{activeProgram:n}=e;const r=window.innerWidth,o=wt(cu),{programId:a}=lo(),s=VC(JA().breakpoints.down("sm")),l=Nt(),c=so(),{t:d}=Vg(),u="code",p=wt(bu),h=!("true"===us(p,"user_principal.attributes.skip_tour[0]","")),[m,f]=We.useState(""),[g,v]=(0,We.useState)("desc"),[x,y]=(0,We.useState)("created_at"),[b,j]=(0,We.useState)([]),[_,C]=(0,We.useState)(null),[w,S]=(0,We.useState)(null),[A,k]=We.useState((0,i.A)({},dd)),[T,E]=We.useState({courseName:"",vital:"",duration:""}),[M,O]=We.useState(!1),[R,P]=We.useState({open:!1,data:{}}),D=e=>{P((0,i.A)((0,i.A)({},R),{},{open:!R.open,data:e}))},N=s?["title","vital_name","action"]:["title","vital_name","duration","patients_enrolled","mandates","action"],[L,I]=We.useState(!1),[F,$]=We.useState(cs($o.getProgramScheduleHeadcells())?N:$o.getProgramScheduleHeadcells()),B=function(e){$(e),$o.setProgramScheduleHeadcells(e)},z=()=>{I(!L)},H=e=>{if(Array.isArray(e))return j(e.map(e=>e));const t=e.target.name;b.includes(t)?j(b.filter(e=>e!==t)):j(e=>[...e,t])},W=async function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:T;const t=(0,i.A)({sort_by:x,sort_order:g},A);try{const{data:n}=await l(tbe(a,t,e)),r=n||{},{content:o}=r,s=Ko(r,ISe);C(o),k(e=>(0,i.A)((0,i.A)({},e),{},{last_page:s.last_page,current_page:s.current_page,from:s.from,per_page:s.per_page,to:s.to,total:s.total}))}catch(n){console.log(n)}},U=async function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:T;const t=(0,i.A)((0,i.A)({sort_by:x,sort_order:g},A),{},{current_page:1,per_page:999});try{const{data:n}=await l(tbe(a,t,e)),{content:r}=n||{};S(r)}catch(n){console.log(n)}},V=async e=>{const t=(0,i.A)({},e);try{await l(ebe(t)),l(Zo({subTitle:"message:rpm_ProgramUpdatedSuccessfully",severity:ud.SUCCESS})),W()}catch(n){l(Zo({subTitle:n.message,severity:ud.ERROR}))}},G=async(e,t)=>{try{await l(((e,t)=>async n=>{n(na(!0));try{const n="".concat(la.schedules,"/-/").concat(e||"","/").concat(t||"");return await Bu(n,{})}finally{n(na(!1))}})(e,t)),W(),P({open:!1,data:{}}),l(Zo({subTitle:"message:rpm_DeleteScheduleSuccess",severity:ud.SUCCESS}))}catch(n){l(Zo({subTitle:n.message,severity:ud.ERROR}))}},q=e=>(0,qt.jsx)(sy,{title:0!==(null===e||void 0===e?void 0:e.total_patient_attached)?d("rpm_alreadyAttachedCourseEdit"):d("rpm_Edit"),children:(0,qt.jsx)("span",{children:(0,qt.jsx)(wh,{"data-id":e.id,disabled:0!==(null===e||void 0===e?void 0:e.total_patient_attached)&&!0,color:"primary",onClick:()=>c("".concat(e.id,"/edit")),children:(0,qt.jsx)(fc,{fontSize:"small",sx:{width:16,height:16}})})})}),Y=e=>(0,qt.jsx)(sy,{title:d("rpm_view"),children:(0,qt.jsx)(wh,{"data-id":e.id,color:"primary",onClick:()=>c("".concat(e.id)),children:(0,qt.jsx)(gc,{fontSize:"small",sx:{width:16,height:16}})})}),Z=e=>(0,qt.jsx)(sy,{title:0!==(null===e||void 0===e?void 0:e.total_patient_attached)?d("rpm_alreadyAttachedCourseDelete"):d("rpm_Delete"),children:(0,qt.jsx)("span",{children:(0,qt.jsx)(wh,{"data-id":e.id,color:"error",disabled:0!==(null===e||void 0===e?void 0:e.total_patient_attached)&&!0,onClick:()=>D(e),children:(0,qt.jsx)(xc,{fontSize:"small",sx:{width:16,height:16}})})})});We.useEffect(()=>{B(N)},[s]),We.useEffect(()=>{o&&a&&null!==n&&void 0!==n&&n.is_hospital&&W()},[o,a,null===n||void 0===n?void 0:n.is_hospital]),We.useEffect(()=>{l(NC({activeMenuItem:"schedule_program"}))},[n]);const K=[{id:"title",label:d("rpm_Title"),isSort:!1,sortProperty:"title"},{id:"vital_name",label:d("rpm_Vitals"),isSort:!1,sortProperty:"vital_name"},{id:"duration",label:d("rpm_Duration"),isSort:!1,sortProperty:"duration"},{id:"patients_enrolled",label:d("rpm_PatientsEnrolled"),isSort:!1,sortProperty:"patients_enrolled"},{id:"mandates",label:d("rpm_Mandates"),isSort:!1,sortProperty:"mandates"},{id:"action",label:d("rpm_Actions"),isSort:!1,sortProperty:"action"}];return cs(n)?(0,qt.jsx)(yp,{variant:"outlined",sx:{px:2.5,py:6,display:"flex",height:"320px"},children:(0,qt.jsx)(op,{alignSelf:"center",sx:{mx:"auto"},children:(0,qt.jsx)(MM,{color:"primary"})})}):(0,qt.jsxs)(qt.Fragment,{children:[null!==n&&void 0!==n&&null!==(t=n.permissions)&&void 0!==t&&t.showCourseList?r>=575?(0,qt.jsx)(DSe,{order:g,orderBy:x,setOrder:v,setOrderBy:y,dataParameter:u,checkState:b,onCheck:H,isSelection:!1,nodata:GC,scheduleHead:K,schedule:_,fetchScheduleList:W,pageDetails:A,editButton:q,viewButton:Y,deleteButton:Z,editSchedule:V,activeProgram:n,filterState:T,setFilterState:E,showFilterColor:M,setShowFilterColor:O,setHeadcells:B,settingModal:L,initialHeadcells:F,handleSettingModalToggle:z,scheduleOptions:w,setScheduleOptions:S,fetchScheduleListOptions:U}):(0,qt.jsx)(LSe,{order:g,orderBy:x,setOrder:v,setOrderBy:y,dataParameter:u,checkState:b,onCheck:H,isSelection:!1,nodata:GC,scheduleHead:K,schedule:_,fetchScheduleList:W,pageDetails:A,editButton:q,viewButton:Y,deleteButton:Z,editSchedule:V,activeProgram:n,filterState:T,setFilterState:E,showFilterColor:M,setShowFilterColor:O,setHeadcells:B,settingModal:L,initialHeadcells:F,handleSettingModalToggle:z,scheduleOptions:w,setScheduleOptions:S,fetchScheduleListOptions:U}):(0,qt.jsx)(LC,{}),(0,qt.jsx)(qV,{openModal:R.open,onCloseModal:D,actionFunction:()=>{var e;return G(a,null===R||void 0===R||null===(e=R.data)||void 0===e?void 0:e.id)},dataName:"",options:{primaryText:d("message:rpm_DeleteCourse"),secondaryText:d("message:rpm_DeleteCourseBodyText"),btn:{primaryText:d("rpm_Delete"),secondaryText:d("rpm_Cancel"),primaryColor:"error",secondaryColor:"primary"},btnSwap:!0}}),(0,qt.jsx)(zZ,{isTour:h,path:"programCoursesTour",setRenderer:f}),(0,qt.jsx)("input",{type:"hidden",id:"rerenderer",value:m})]})},$Se=["initialWidth","width"],BSe=["xs","sm","md","lg","xl"],zSe=function(e,t){return!(arguments.length>2&&void 0!==arguments[2])||arguments[2]?BSe.indexOf(e)<=BSe.indexOf(t):BSe.indexOf(e)<BSe.indexOf(t)},HSe=function(e,t){return arguments.length>2&&void 0!==arguments[2]&&arguments[2]?BSe.indexOf(t)<=BSe.indexOf(e):BSe.indexOf(t)<BSe.indexOf(e)},WSe=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return t=>{const{withTheme:n=!1,noSSR:r=!1,initialWidth:i}=e;return function(e){const o=In(),a=e.theme||o,s=zC({theme:a,name:"MuiWithWidth",props:e}),{initialWidth:l,width:c}=s,d=(0,nn.A)(s,$Se),[u,p]=We.useState(!1);(0,Uh.A)(()=>{p(!0)},[]);const h=a.breakpoints.keys.slice().reverse().reduce((e,t)=>{const n=VC(a.breakpoints.up(t));return!e&&n?t:e},null),m=(0,Ft.A)({width:c||(u||r?h:void 0)||l||i},n?{theme:a}:{},d);return void 0===m.width?null:(0,qt.jsx)(t,(0,Ft.A)({},m))}}};const USe=WSe()(function(e){const{children:t,only:n,width:r}=e,i=In();let o=!0;if(n)if(Array.isArray(n))for(let a=0;a<n.length;a+=1){if(r===n[a]){o=!1;break}}else n&&r===n&&(o=!1);if(o)for(let a=0;a<i.breakpoints.keys.length;a+=1){const t=i.breakpoints.keys[a],n=e["".concat(t,"Up")],s=e["".concat(t,"Down")];if(n&&zSe(t,r)||s&&HSe(t,r)){o=!1;break}}return o?(0,qt.jsx)(We.Fragment,{children:t}):null});function VSe(e){return(0,sr.Ay)("PrivateHiddenCss",e)}(0,ar.A)("PrivateHiddenCss",["root","xlDown","xlUp","onlyXl","lgDown","lgUp","onlyLg","mdDown","mdUp","onlyMd","smDown","smUp","onlySm","xsDown","xsUp","onlyXs"]);const GSe=["children","className","only"],qSe=(0,Vn.Ay)("div",{name:"PrivateHiddenCss",slot:"Root"})(e=>{let{theme:t,ownerState:n}=e;const r={display:"none"};return(0,Ft.A)({},n.breakpoints.map(e=>{let{breakpoint:n,dir:i}=e;return"only"===i?{[t.breakpoints.only(n)]:r}:"up"===i?{[t.breakpoints.up(n)]:r}:{[t.breakpoints.down(n)]:r}}).reduce((e,t)=>(Object.keys(t).forEach(n=>{e[n]=t[n]}),e),{}))});const YSe=function(e){const{children:t,className:n,only:r}=e,i=(0,nn.A)(e,GSe),o=In(),a=[];for(let c=0;c<o.breakpoints.keys.length;c+=1){const e=o.breakpoints.keys[c],t=i["".concat(e,"Up")],n=i["".concat(e,"Down")];t&&a.push({breakpoint:e,dir:"up"}),n&&a.push({breakpoint:e,dir:"down"})}if(r){(Array.isArray(r)?r:[r]).forEach(e=>{a.push({breakpoint:e,dir:"only"})})}const s=(0,Ft.A)({},e,{breakpoints:a}),l=(e=>{const{classes:t,breakpoints:n}=e,r={root:["root",...n.map(e=>{let{breakpoint:t,dir:n}=e;return"only"===n?"".concat(n).concat((0,pp.A)(t)):"".concat(t).concat((0,pp.A)(n))})]};return(0,ir.A)(r,VSe,t)})(s);return(0,qt.jsx)(qSe,{className:(0,nr.A)(l.root,n),ownerState:s,children:t})},ZSe=["implementation","lgDown","lgUp","mdDown","mdUp","smDown","smUp","xlDown","xlUp","xsDown","xsUp"];const KSe=function(e){const{implementation:t="js",lgDown:n=!1,lgUp:r=!1,mdDown:i=!1,mdUp:o=!1,smDown:a=!1,smUp:s=!1,xlDown:l=!1,xlUp:c=!1,xsDown:d=!1,xsUp:u=!1}=e,p=(0,nn.A)(e,ZSe);return"js"===t?(0,qt.jsx)(USe,(0,Ft.A)({lgDown:n,lgUp:r,mdDown:i,mdUp:o,smDown:a,smUp:s,xlDown:l,xlUp:c,xsDown:d,xsUp:u},p)):(0,qt.jsx)(YSe,(0,Ft.A)({lgDown:n,lgUp:r,mdDown:i,mdUp:o,smDown:a,smUp:s,xlDown:l,xlUp:c,xsDown:d,xsUp:u},p))};const XSe=function(e){var t,n,r,i,o,a,s,l,c,d,u,p,h,m,f,g,v,x,y,b,j,_,C,w,S,A,k,T,E,M,O,R,P,D,N,L,I,F,$,B,z,H,W,U;let{schedule:V,activeProgram:G,notifications:q}=e;const{t:Y}=Vg(),Z=so(),{scheduleId:K,programId:X}=lo(),Q=e=>{var t,n;const r=null===(t=e.repetition)||void 0===t||null===(n=t.split(" ")[5])||void 0===n?void 0:n.split(",");return"Weekly"==e.repeat_type?(0,qt.jsx)(qt.Fragment,{children:cs(V)?(0,qt.jsx)(lS,{width:100}):(0,qt.jsx)(Cf,{variant:"body1",fontWeight:"h6.fontWeight",component:"p",children:e?null===r||void 0===r?void 0:r.map(e=>(0,qt.jsx)(op,{component:"span",sx:e=>({mr:1,py:.5,px:1.5,color:e.palette.primary.theme[50],backgroundColor:e.palette.primary.theme[500],display:"inline-flex",fontSize:e.spacing(1.5),fontWeight:600,borderRadius:.5}),children:e.slice(0,2)},e)):"NA"})}):"Daily"==e.repeat_type?(0,qt.jsx)(qt.Fragment,{children:cs(V)?(0,qt.jsx)(lS,{width:100}):(0,qt.jsx)(Cf,{variant:"body1",fontWeight:"h6.fontWeight",component:"p",children:(0,qt.jsx)(op,{component:"span",sx:e=>({mr:1,py:.5,px:1.5,color:e.palette.primary.theme[50],backgroundColor:e.palette.primary.theme[500],display:"inline-flex",fontSize:e.spacing(1.5),fontWeight:600,borderRadius:.5}),children:"Daily"})})}):(0,qt.jsx)(qt.Fragment,{children:cs(V)?(0,qt.jsx)(lS,{width:100}):(0,qt.jsx)(Cf,{variant:"body1",fontWeight:"h6.fontWeight",component:"p",children:(0,qt.jsx)(op,{component:"span",sx:e=>({mr:1,py:.5,px:1.5,color:e.palette.primary.theme[50],backgroundColor:e.palette.primary.theme[500],display:"inline-flex",fontSize:e.spacing(1.5),fontWeight:600,borderRadius:.5}),children:"None"})})})},J=[{name:Y("rpm_RPM"),url:ld.DOCTOR.PROGRAM},{name:null===G||void 0===G?void 0:G.display_name,url:"".concat(ld.DOCTOR.PROGRAM,"/").concat(null===G||void 0===G?void 0:G.code,"/patients")},{name:Y("rpm_Schedules"),url:"".concat(ld.DOCTOR.PROGRAM,"/").concat(null===G||void 0===G?void 0:G.code,"/course")},{name:null===V||void 0===V?void 0:V.name,url:""}];return(0,qt.jsxs)(op,{sx:{width:"100%"},children:[(0,qt.jsxs)(op,{mb:2.5,display:"flex",children:[(0,qt.jsx)(BH,{labels:J}),(0,qt.jsx)(KSe,{smUp:!0,children:(0,qt.jsx)(Cf,{variant:"h6",component:"h6",children:Y("rpm_ScheduleDetails")})})]}),(0,qt.jsx)(KSe,{smDown:!0,children:(0,qt.jsx)(Ff,{container:!0,children:(0,qt.jsx)(Ff,{item:!0,xs:12,md:!0,children:(0,qt.jsx)(Cf,{variant:"h6",component:"h6",children:Y("rpm_ScheduleDetails")})})})}),(0,qt.jsx)(op,{sx:{mb:1.5},children:(0,qt.jsx)(Ff,{container:!0,spacing:2,mt:.05,children:(0,qt.jsx)(Ff,{item:!0,xs:!0,children:(0,qt.jsx)(yH,{variant:"outlined",children:(0,qt.jsxs)(wH,{sx:{p:2.5},children:[(0,qt.jsxs)(Ff,{container:!0,spacing:2.5,children:[(0,qt.jsx)(Ff,{item:!0,xs:12,md:4,lg:3,children:(0,qt.jsxs)(pE,{flexDirection:"column",gap:{xs:1,lg:2},children:[(0,qt.jsxs)(op,{display:"flex",alignItems:"center",children:[(0,qt.jsx)(Cf,{variant:"body1",component:"p",fontWeight:"h6.fontWeight",children:Y("rpm_ScheduleName")}),(null===V||void 0===V?void 0:V.def)&&(0,qt.jsx)(dM,{component:"span",icon:!1,severity:"info",sx:e=>({py:0,px:1,display:"inline-flex",fontSize:e.spacing(1.5),fontWeight:600,ml:1,"& .MuiAlert-message":{p:e.spacing(.5,0)}}),children:"Default"})]}),(0,qt.jsx)(op,{sx:{flex:.6},children:cs(V)?(0,qt.jsx)(lS,{}):(0,qt.jsx)(Cf,{variant:"body2",component:"p",color:"primary",children:null!==V&&void 0!==V&&V.name?null===V||void 0===V?void 0:V.name:"NA"})})]})}),(0,qt.jsx)(Ff,{item:!0,xs:12,md:4,lg:3,children:(0,qt.jsxs)(pE,{flexDirection:"column",gap:{xs:1,lg:2},children:[(0,qt.jsx)(Cf,{variant:"body1",component:"p",fontWeight:"h6.fontWeight",sx:{flex:.4},children:Y("rpm_Program")}),(0,qt.jsx)(op,{sx:{flex:.6},children:cs(V)?(0,qt.jsx)(lS,{}):(0,qt.jsx)(Cf,{variant:"body2",component:"p",color:"primary",children:null!==V&&void 0!==V&&V.program?null===V||void 0===V?void 0:V.program:"NA"})})]})}),(0,qt.jsx)(Ff,{item:!0,xs:12,md:4,lg:3,children:(0,qt.jsxs)(pE,{flexDirection:"column",gap:{xs:1,lg:2},children:[(0,qt.jsx)(Cf,{variant:"body1",component:"p",fontWeight:"h6.fontWeight",sx:{flex:.4},children:Y("rpm_VitalName")}),(0,qt.jsx)(op,{sx:{flex:.6},children:cs(V)?(0,qt.jsx)(lS,{}):(0,qt.jsx)(dM,{component:"span",icon:!1,severity:"info",sx:e=>({py:0,px:1,display:"inline-flex",fontSize:e.spacing(1.5),fontWeight:600,"& .MuiAlert-message":{p:e.spacing(.5,0)}}),children:null!==V&&void 0!==V&&V.vital_name?Y("rpm_".concat(V.vital_name)):"NA"})})]})}),(0,qt.jsx)(Ff,{item:!0,xs:12,md:4,lg:3,children:(0,qt.jsxs)(pE,{flexDirection:"column",gap:{xs:1,lg:2},children:[(0,qt.jsx)(Cf,{variant:"body1",component:"p",fontWeight:"h6.fontWeight",sx:{flex:.4},children:Y("rpm_Duration")}),(0,qt.jsx)(op,{sx:{flex:.6},children:cs(V)?(0,qt.jsx)(lS,{}):(0,qt.jsx)(Cf,{variant:"body2",component:"p",color:"primary",children:null!==V&&void 0!==V&&V.duration?(null===V||void 0===V?void 0:V.duration)+" (days)":"NA"})})]})})]}),!cs(V)&&null!==V&&void 0!==V&&V.non_compliance?(0,qt.jsxs)(Ff,{container:!0,spacing:2.5,mt:.05,children:[(0,qt.jsx)(Ff,{item:!0,xs:12,md:4,lg:3,children:(0,qt.jsxs)(pE,{flexDirection:"column",gap:{xs:1,lg:2},children:[(0,qt.jsx)(Cf,{variant:"body1",component:"p",fontWeight:"h6.fontWeight",sx:{flex:.4},children:Y("rpm_NonComplianceNotification")}),(0,qt.jsx)(op,{sx:{flex:.6},children:cs(null===V||void 0===V?void 0:V.non_compliance)?(0,qt.jsx)(lS,{}):null!==V&&void 0!==V&&null!==(t=V.non_compliance)&&void 0!==t&&t.notification_enabled?(0,qt.jsx)(dM,{component:"span",icon:!1,severity:"success",sx:e=>({py:0,px:1,display:"inline-flex",fontSize:e.spacing(1.5),fontWeight:600,"& .MuiAlert-message":{p:e.spacing(.5,0)}}),children:"Active"}):(0,qt.jsx)(dM,{component:"span",icon:!1,severity:"info",sx:e=>({py:0,px:1,display:"inline-flex",fontSize:e.spacing(1.5),fontWeight:600,"& .MuiAlert-message":{p:e.spacing(.5,0)}}),children:"Inactive"})})]})}),(0,qt.jsx)(Ff,{item:!0,xs:12,md:4,lg:3,children:(0,qt.jsxs)(pE,{flexDirection:"column",gap:{xs:1,lg:2},children:[(0,qt.jsx)(Cf,{variant:"body1",component:"p",fontWeight:"h6.fontWeight",sx:{flex:.4},children:Y("rpm_Title")}),(0,qt.jsx)(op,{sx:{flex:.6},children:cs(null===V||void 0===V?void 0:V.non_compliance)?(0,qt.jsx)(lS,{}):(0,qt.jsx)(Cf,{variant:"body2",component:"p",color:"primary",sx:{wordBreak:"break-all"},children:null!==V&&void 0!==V&&null!==(n=V.non_compliance)&&void 0!==n&&n.notification_title?null===V||void 0===V||null===(r=V.non_compliance)||void 0===r?void 0:r.notification_title:"NA"})})]})}),(0,qt.jsx)(Ff,{item:!0,xs:12,md:4,lg:3,children:(0,qt.jsxs)(pE,{flexDirection:"column",gap:{xs:1,lg:2},children:[(0,qt.jsx)(Cf,{variant:"body1",component:"p",fontWeight:"h6.fontWeight",sx:{flex:.4},children:Y("rpm_Description")}),(0,qt.jsx)(op,{sx:{flex:.6},children:cs(null===V||void 0===V?void 0:V.non_compliance)?(0,qt.jsx)(lS,{}):(0,qt.jsx)(Cf,{variant:"body2",component:"p",color:"primary",sx:{wordBreak:"break-all"},children:null!==V&&void 0!==V&&null!==(i=V.non_compliance)&&void 0!==i&&i.notification_text?null===V||void 0===V||null===(o=V.non_compliance)||void 0===o?void 0:o.notification_text:"NA"})})]})}),(0,qt.jsx)(Ff,{item:!0,xs:12,md:4,lg:3,children:(0,qt.jsxs)(pE,{flexDirection:"column",gap:{xs:1,lg:2},children:[(0,qt.jsx)(Cf,{variant:"body1",component:"p",fontWeight:"h6.fontWeight",sx:{flex:.4},children:Y("rpm_MaxStrikes")}),(0,qt.jsx)(op,{sx:{flex:.6},children:cs(null===V||void 0===V?void 0:V.non_compliance)?(0,qt.jsx)(lS,{}):(0,qt.jsx)(Cf,{variant:"body2",component:"p",color:"primary",children:null!==V&&void 0!==V&&null!==(a=V.non_compliance)&&void 0!==a&&a.max_strikes?null===V||void 0===V||null===(s=V.non_compliance)||void 0===s?void 0:s.max_strikes:"NA"})})]})})]}):null===(null===V||void 0===V?void 0:V.non_compliance)?(0,qt.jsx)(Ff,{container:!0,spacing:2.5,mt:.05,children:(0,qt.jsx)(Ff,{item:!0,xs:12,children:(0,qt.jsx)(yp,{variant:"outlined",sx:{px:2.5,py:4,display:"flex",height:"100%"},children:(0,qt.jsxs)(op,{alignSelf:"center",sx:{mx:"auto"},children:[(0,qt.jsx)(Cf,{variant:"h6",children:"Non Compliance Notification not set"}),(0,qt.jsx)(op,{sx:{mt:3,textAlign:"center"},children:(0,qt.jsx)(xh,{color:"primary",variant:"contained",disableElevation:!0,onClick:()=>Z("".concat(ld.DOCTOR.PROGRAM,"/").concat(X,"/course/").concat(K,"/edit")),children:Y("rpm_SetNow")})})]})})})}):(0,qt.jsxs)(Ff,{container:!0,spacing:2.5,mt:.05,children:[(0,qt.jsx)(Ff,{item:!0,xs:12,md:4,lg:3,children:(0,qt.jsx)(lS,{})}),(0,qt.jsx)(Ff,{item:!0,xs:12,md:4,lg:3,children:(0,qt.jsx)(lS,{})}),(0,qt.jsx)(Ff,{item:!0,xs:12,md:4,lg:3,children:(0,qt.jsx)(lS,{})}),(0,qt.jsx)(Ff,{item:!0,xs:12,md:4,lg:3,children:(0,qt.jsx)(lS,{})})]})]})})})})}),(0,qt.jsx)(op,{sx:{mb:2.5},children:(0,qt.jsx)(Ff,{container:!0,spacing:2.5,mt:.05,children:cs(null===V||void 0===V||null===(l=V.mandate)||void 0===l?void 0:l.timing)?(0,qt.jsx)(Ff,{item:!0,xs:12,children:0===(null===V||void 0===V||null===(U=V.mandate)||void 0===U?void 0:U.timing.length)?(0,qt.jsx)(yp,{variant:"outlined",sx:{px:2.5,py:6,textAlign:"center"},children:(0,qt.jsx)(op,{display:"flex",alignItems:"center",children:(0,qt.jsx)("img",{src:GC,style:{display:"block",margin:"auto"}})})}):(0,qt.jsx)(Ff,{item:!0,xs:12,children:(0,qt.jsx)(op,{sx:{height:"350px"},children:(0,qt.jsx)(yp,{variant:"outlined",sx:{px:2.5,py:6,display:"flex",height:"100%"},children:(0,qt.jsx)(op,{alignSelf:"center",sx:{mx:"auto"},children:(0,qt.jsx)(MM,{color:"primary"})})})})})}):(0,qt.jsxs)(qt.Fragment,{children:[(0,qt.jsxs)(Ff,{item:!0,xs:12,md:6,p:2.5,pr:0,children:[(0,qt.jsx)(op,{children:(0,qt.jsx)(Cf,{variant:"h5",gutterBottom:!0,component:"h5",children:Y("rpm_MandateDetails")})}),null===V||void 0===V||null===(c=V.mandate)||void 0===c||null===(d=c.timing)||void 0===d?void 0:d.map((e,t)=>((e,t)=>{var n,r,i;return(0,qt.jsx)(Ff,{item:!0,xs:12,children:(0,qt.jsxs)(yH,{variant:"outlined",sx:{height:"100%",mb:2.5},children:[(0,qt.jsx)(nW,{sx:{py:1.5,bgcolor:"primary.theme.50",alignItems:"flex-start"},title:(0,qt.jsxs)(Cf,{variant:"h6",component:"h6",children:["Mandate ",t+1]}),subheader:(0,qt.jsx)(qt.Fragment,{})}),(0,qt.jsxs)(wH,{sx:{p:2.5},children:[(0,qt.jsxs)(pE,{flexDirection:{xs:"column",lg:"row"},gap:{xs:1,lg:2},alignItems:{xs:"left",lg:"center"},sx:{mb:2},children:[(0,qt.jsxs)(Cf,{variant:"body2",component:"p",fontWeight:600,sx:{flex:.4},children:[Y("rpm_StartTime")," :"]}),(0,qt.jsx)(op,{sx:{flex:.6},children:(0,qt.jsx)(Cf,{variant:"body2",component:"p",children:ys(null===e||void 0===e?void 0:e.start_time,null===V||void 0===V||null===(n=V.mandate)||void 0===n||null===(r=n.reminder_notification)||void 0===r||null===(i=r.interval)||void 0===i?void 0:i.pre_reminder)})})]}),(0,qt.jsxs)(pE,{flexDirection:{xs:"column",lg:"row"},gap:{xs:1,lg:2},alignItems:{xs:"left",lg:"center"},sx:{mb:2},children:[(0,qt.jsxs)(Cf,{variant:"body2",component:"p",fontWeight:600,sx:{flex:.4},children:[Y("rpm_EndTime")," :"]}),(0,qt.jsx)(op,{sx:{flex:.6},children:(0,qt.jsx)(Cf,{variant:"body2",component:"p",children:ys(null===e||void 0===e?void 0:e.end_time)})})]}),(null===e||void 0===e?void 0:e.activity_type)&&(0,qt.jsxs)(qt.Fragment,{children:[(0,qt.jsxs)(pE,{flexDirection:{xs:"column",lg:"row"},gap:{xs:1,lg:2},alignItems:{xs:"left",lg:"center"},sx:{mb:2},children:[(0,qt.jsxs)(Cf,{variant:"body2",component:"p",fontWeight:600,sx:{flex:.4},children:[Y("rpm_ActivityType")," :"]}),(0,qt.jsx)(op,{sx:{flex:.6},children:(0,qt.jsx)(Cf,{variant:"body2",component:"p",children:Y("rpm_".concat(null===e||void 0===e?void 0:e.activity_type))})})]}),(0,qt.jsxs)(pE,{flexDirection:{xs:"column",lg:"row"},gap:{xs:1,lg:2},alignItems:{xs:"left",lg:"center"},sx:{mb:2},children:[(0,qt.jsxs)(Cf,{variant:"body2",component:"p",fontWeight:600,sx:{flex:.4},children:[Y("rpm_ActivityName")," :"]}),(0,qt.jsx)(op,{sx:{flex:.6},children:(0,qt.jsx)(Cf,{variant:"body2",component:"p",children:null===e||void 0===e?void 0:e.activity_name})})]})]}),(0,qt.jsxs)(pE,{flexDirection:{xs:"column",lg:"row"},gap:{xs:1,lg:2},alignItems:{xs:"left",lg:"center"},sx:{mb:2},children:[(0,qt.jsxs)(Cf,{variant:"body2",component:"p",fontWeight:600,sx:{flex:.4},children:[Y("rpm_Repetition")," :"]}),(0,qt.jsx)(op,{sx:{flex:.6},children:(0,qt.jsx)(op,{children:Q(e)})})]})]})]})},null===e||void 0===e?void 0:e.id)})(e,t))]}),(0,qt.jsxs)(Ff,{item:!0,xs:12,md:6,children:[(0,qt.jsx)(Cf,{variant:"h5",gutterBottom:!0,component:"h5",children:Y("rpm_NotificationsDetails")}),(0,qt.jsx)(op,{mb:2.5,children:(0,qt.jsxs)(yH,{variant:"outlined",mb:2,children:[(0,qt.jsx)(nW,{sx:{py:1.5,bgcolor:"primary.theme.50",alignItems:"flex-start"},title:(0,qt.jsx)(Cf,{variant:"h6",component:"h6",children:Y("rpm_ReminderNotificationText")})}),(0,qt.jsxs)(wH,{sx:{p:2.5},children:[(0,qt.jsxs)(pE,{flexDirection:{xs:"column",lg:"row"},gap:{xs:1,lg:2},sx:{mb:2},children:[(0,qt.jsxs)(Cf,{variant:"body2",component:"p",fontWeight:600,sx:{flex:.3},children:[Y("rpm_SendInEvery")," :"]}),(0,qt.jsx)(op,{sx:{flex:.7},children:(0,qt.jsx)(Cf,{variant:"body2",component:"p",sx:{wordBreak:"break-all"},children:null!==V&&void 0!==V&&null!==(u=V.mandate)&&void 0!==u&&null!==(p=u.reminder_notification)&&void 0!==p&&null!==(h=p.interval)&&void 0!==h&&h.every?(null===V||void 0===V||null===(m=V.mandate)||void 0===m||null===(f=m.reminder_notification)||void 0===f||null===(g=f.interval)||void 0===g?void 0:g.every)/60+" min":"NA"})})]}),(0,qt.jsxs)(pE,{flexDirection:{xs:"column",lg:"row"},gap:{xs:1,lg:2},sx:{mb:2},children:[(0,qt.jsxs)(Cf,{variant:"body2",component:"p",fontWeight:600,sx:{flex:.3},children:[Y("rpm_Repetition")," :"]}),(0,qt.jsx)(op,{sx:{flex:.7},children:(0,qt.jsx)(Cf,{variant:"body2",component:"p",sx:{wordBreak:"break-all"},children:null!==V&&void 0!==V&&null!==(v=V.mandate)&&void 0!==v&&null!==(x=v.reminder_notification)&&void 0!==x&&null!==(y=x.interval)&&void 0!==y&&y.stop_after?(e=>{var t,n,r,i,o,a,s,l,c;return null!==e&&void 0!==e&&null!==(t=e.mandate)&&void 0!==t&&null!==(n=t.reminder_notification)&&void 0!==n&&null!==(r=n.interval)&&void 0!==r&&r.pre_reminder?(null===e||void 0===e||null===(i=e.mandate)||void 0===i||null===(o=i.reminder_notification)||void 0===o||null===(a=o.interval)||void 0===a?void 0:a.stop_after)-parseInt(1):null===e||void 0===e||null===(s=e.mandate)||void 0===s||null===(l=s.reminder_notification)||void 0===l||null===(c=l.interval)||void 0===c?void 0:c.stop_after})(V):"NA"})})]}),(0,qt.jsxs)(pE,{flexDirection:{xs:"column",lg:"row"},gap:{xs:1,lg:2},sx:{mb:2},children:[(0,qt.jsxs)(Cf,{variant:"body2",component:"p",fontWeight:600,sx:{flex:.3},children:[Y("rpm_Title")," :"]}),(0,qt.jsx)(op,{sx:{flex:.7},children:(0,qt.jsx)(Cf,{variant:"body2",component:"p",sx:{wordBreak:"break-all"},children:null!==V&&void 0!==V&&null!==(b=V.mandate)&&void 0!==b&&null!==(j=b.reminder_notification)&&void 0!==j&&j.fallback_title?null===V||void 0===V||null===(_=V.mandate)||void 0===_||null===(C=_.reminder_notification)||void 0===C?void 0:C.fallback_title:"NA"})})]}),(0,qt.jsxs)(pE,{flexDirection:{xs:"column",lg:"row"},gap:{xs:1,lg:2},sx:{mb:2},children:[(0,qt.jsxs)(Cf,{variant:"body2",component:"p",fontWeight:600,sx:{flex:.3},children:[Y("rpm_Description")," :"]}),(0,qt.jsx)(op,{sx:{flex:.7},children:(0,qt.jsx)(Cf,{variant:"body2",component:"p",sx:{wordBreak:"break-all"},children:null!==V&&void 0!==V&&null!==(w=V.mandate)&&void 0!==w&&null!==(S=w.reminder_notification)&&void 0!==S&&S.fallback_text?null===V||void 0===V||null===(A=V.mandate)||void 0===A||null===(k=A.reminder_notification)||void 0===k?void 0:k.fallback_text:"NA"})})]}),(0,qt.jsxs)(pE,{flexDirection:{xs:"column",lg:"row"},gap:{xs:1,lg:2},sx:{mb:2},children:[(0,qt.jsxs)(Cf,{variant:"body2",component:"p",fontWeight:600,sx:{flex:.3},children:[Y("rpm_PreReminder")," :"]}),(0,qt.jsx)(op,{sx:{flex:.7},children:(0,qt.jsx)(Cf,{variant:"body2",component:"p",sx:{wordBreak:"break-all"},children:null!==V&&void 0!==V&&null!==(T=V.mandate)&&void 0!==T&&null!==(E=T.reminder_notification)&&void 0!==E&&null!==(M=E.interval)&&void 0!==M&&M.pre_reminder?(null===V||void 0===V||null===(O=V.mandate)||void 0===O||null===(R=O.reminder_notification)||void 0===R||null===(P=R.interval)||void 0===P?void 0:P.pre_reminder)/60+" min":"NA"})})]}),!(null!==q&&void 0!==q&&null!==(D=q.push_notification)&&void 0!==D&&D.reading_reminder)&&(0,qt.jsx)(op,{children:(0,qt.jsxs)(Cf,{variant:"body1",component:"p",color:"red.700",gutterBottom:!0,fontSize:"14px",children:["(",Y("message:rpm_notificationSettingMessage"),")"]})})]})]})}),(0,qt.jsx)(op,{mb:2.5,children:(0,qt.jsxs)(yH,{variant:"outlined",children:[(0,qt.jsx)(nW,{sx:{py:1.5,bgcolor:"primary.theme.50",alignItems:"flex-start"},title:(0,qt.jsx)(Cf,{variant:"h6",component:"h6",children:Y("rpm_MissedReadingNotification")})}),(0,qt.jsxs)(wH,{sx:{p:2.5},children:[(0,qt.jsxs)(pE,{flexDirection:{xs:"column",lg:"row"},gap:{xs:1,lg:2},sx:{mb:2},children:[(0,qt.jsxs)(Cf,{variant:"body2",component:"p",fontWeight:600,sx:{flex:.3},children:[Y("rpm_Title")," :"]}),(0,qt.jsx)(op,{sx:{flex:.7},children:(0,qt.jsx)(Cf,{variant:"body2",component:"p",sx:{wordBreak:"break-all"},children:null!==V&&void 0!==V&&null!==(N=V.mandate)&&void 0!==N&&null!==(L=N.missed_reading_notification)&&void 0!==L&&L.notification_title?null===V||void 0===V||null===(I=V.mandate)||void 0===I||null===(F=I.missed_reading_notification)||void 0===F?void 0:F.notification_title:"NA"})})]}),(0,qt.jsxs)(pE,{flexDirection:{xs:"column",lg:"row"},gap:{xs:1,lg:2},sx:{mb:2},children:[(0,qt.jsxs)(Cf,{variant:"body2",component:"p",fontWeight:600,sx:{flex:.3},children:[Y("rpm_Description")," :"]}),(0,qt.jsx)(op,{sx:{flex:.7},children:(0,qt.jsx)(Cf,{variant:"body2",component:"p",sx:{wordBreak:"break-all"},children:null!==V&&void 0!==V&&null!==($=V.mandate)&&void 0!==$&&null!==(B=$.missed_reading_notification)&&void 0!==B&&B.notification_text?null===V||void 0===V||null===(z=V.mandate)||void 0===z||null===(H=z.missed_reading_notification)||void 0===H?void 0:H.notification_text:"NA"})})]}),!(null!==q&&void 0!==q&&null!==(W=q.push_notification)&&void 0!==W&&W.missed_mandate)&&(0,qt.jsx)(op,{children:(0,qt.jsxs)(Cf,{variant:"body1",component:"p",color:"red.700",gutterBottom:!0,fontSize:"14px",children:["(",Y("message:rpm_notificationSettingMessage"),")"]})})]})]})})]})]})})})]})};const QSe=rbe(function(e){var t;let{activeProgram:n,notifications:r}=e;const o=wt(cu),{programId:a,scheduleId:s}=lo(),l=Nt(),{t:c}=Vg(),[d,u]=We.useState(null),[p,h]=We.useState({open:!1,data:{}}),m=e=>{h((0,i.A)((0,i.A)({},p),{},{open:!p.open,data:e}))},f=async()=>{try{const e=await l(nbe(a,s));u(e)}catch(e){console.log(e)}},g=async(e,t,n)=>{try{await l(((e,t,n)=>async r=>{r(na(!0));try{const r="".concat(la.schedules,"/-/").concat(e||"","/").concat(t||"","/").concat(n||"");return await Bu(r,{})}finally{r(na(!1))}})(e,t,n)),f(),h({}),l(Zo({subTitle:"message:rpm_DeleteMandateSuccess",severity:ud.SUCCESS}))}catch(r){l(Zo({subTitle:r.message,severity:ud.ERROR}))}};return We.useEffect(()=>{o&&a&&s&&f()},[o,a,s]),We.useEffect(()=>{l(NC({activeMenuItem:"schedule_program"}))},[n]),(0,qt.jsxs)(qt.Fragment,{children:[(0,qt.jsx)(XSe,{schedule:d,deleteButton:e=>(0,qt.jsx)(sy,{title:c("rpm_Delete"),children:(0,qt.jsx)(wh,{"data-id":e.id,color:"error",onClick:()=>m(e),children:(0,qt.jsx)(xc,{fontSize:"small",sx:{width:16,height:16}})})}),activeProgram:n,notifications:r}),(0,qt.jsx)(qV,{openModal:null===p||void 0===p?void 0:p.open,onCloseModal:m,actionFunction:()=>{var e;return g(a,s,null===p||void 0===p||null===(e=p.data)||void 0===e?void 0:e.id)},dataName:null===p||void 0===p||null===(t=p.data)||void 0===t?void 0:t.name,options:{primaryText:c("message:rpm_DeleteTitle"),secondaryText:c("message:rpm_DeleteBodyText"),descText:c("message:rpm_DeleteSubText"),btn:{primaryText:c("rpm_Delete"),secondaryText:c("rpm_Cancel"),primaryColor:"error",secondaryColor:"primary"},btnSwap:!0}})]})});function JSe(){return(0,qt.jsxs)(op,{sx:{width:"100%"},children:[(0,qt.jsx)(op,{mb:2.5,children:(0,qt.jsx)(lS,{width:250})}),(0,qt.jsx)(Ff,{container:!0,spacing:2,children:(0,qt.jsx)(Ff,{item:!0,xs:12,children:(0,qt.jsxs)(yH,{variant:"outlined",children:[(0,qt.jsx)(nW,{sx:{py:1.5,bgcolor:"primary.theme.50"},title:(0,qt.jsx)(qt.Fragment,{children:(0,qt.jsxs)(Ff,{container:!0,spacing:2,alignItems:"center",children:[(0,qt.jsx)(Ff,{item:!0,xs:!0,children:(0,qt.jsx)(Cf,{variant:"h6",component:"h6",children:(0,qt.jsx)(lS,{width:100})})}),(0,qt.jsx)(Ff,{item:!0,children:(0,qt.jsx)(lS,{variant:"rounded",width:64,height:30,sx:{borderRadius:1}})})]})})}),(0,qt.jsx)(wH,{sx:{py:4,":last-child":{pb:4}},children:(0,qt.jsxs)(op,{sx:{maxWidth:"768px"},children:[(0,qt.jsxs)(Ff,{container:!0,spacing:2,children:[(0,qt.jsx)(Ff,{item:!0,xs:12,md:12,children:(0,qt.jsxs)(op,{mb:2.5,children:[(0,qt.jsx)(Cf,{variant:"body1",component:"p",fontWeight:"h6.fontWeight",gutterBottom:!0,children:(0,qt.jsx)(lS,{width:100})}),(0,qt.jsx)(lS,{height:48})]})}),(0,qt.jsx)(Ff,{item:!0,xs:12,md:6,children:(0,qt.jsxs)(op,{mb:2.5,sx:{"& .MuiOutlinedInput-input":{py:1.0625}},children:[(0,qt.jsx)(Cf,{variant:"body1",component:"p",fontWeight:"h6.fontWeight",gutterBottom:!0,children:(0,qt.jsx)(lS,{width:100})}),(0,qt.jsx)(lS,{height:48})]})}),(0,qt.jsx)(Ff,{item:!0,xs:12,md:6,children:(0,qt.jsxs)(op,{mb:2.5,sx:{"& .MuiOutlinedInput-input":{py:1.0625}},children:[(0,qt.jsx)(Cf,{variant:"body1",component:"p",fontWeight:"h6.fontWeight",gutterBottom:!0,children:(0,qt.jsx)(lS,{width:100})}),(0,qt.jsx)(lS,{height:48})]})}),(0,qt.jsx)(Ff,{item:!0,xs:12,md:12,children:(0,qt.jsx)(lS,{width:"40%"})})]}),(0,qt.jsx)(op,{p:2,pt:3,mt:2.5,mb:3,bgcolor:"primary.theme.50",borderRadius:1,position:"relative",children:(0,qt.jsxs)(Ff,{container:!0,spacing:2,children:[(0,qt.jsx)(Ff,{item:!0,xs:12,md:6,children:(0,qt.jsxs)(op,{sx:{"& .MuiOutlinedInput-root":{background:"#ffffff"},"& .MuiOutlinedInput-input":{py:1.0625}},children:[(0,qt.jsx)(Cf,{variant:"body1",component:"p",fontWeight:"h6.fontWeight",gutterBottom:!0,children:(0,qt.jsx)(lS,{width:100})}),(0,qt.jsx)(lS,{height:48})]})}),(0,qt.jsx)(Ff,{item:!0,xs:12,md:6,children:(0,qt.jsxs)(op,{sx:{"& .MuiOutlinedInput-root":{background:"#ffffff"},"& .MuiOutlinedInput-input":{py:1.0625}},children:[(0,qt.jsx)(Cf,{variant:"body1",component:"p",fontWeight:"h6.fontWeight",gutterBottom:!0,children:(0,qt.jsx)(lS,{width:100})}),(0,qt.jsx)(lS,{height:48})]})}),(0,qt.jsx)(Ff,{item:!0,xs:12,md:12,children:(0,qt.jsxs)(op,{sx:{"& .MuiOutlinedInput-root":{background:"#ffffff"},"& .MuiOutlinedInput-input":{py:1.0625}},children:[(0,qt.jsx)(Cf,{variant:"body1",component:"p",fontWeight:"h6.fontWeight",gutterBottom:!0,children:(0,qt.jsx)(lS,{width:100})}),(0,qt.jsx)(lS,{height:148})]})})]})}),(0,qt.jsxs)(Ff,{container:!0,spacing:2,mt:.05,children:[(0,qt.jsx)(Ff,{item:!0,children:(0,qt.jsx)(lS,{variant:"rounded",width:64,height:30,sx:{borderRadius:1}})}),(0,qt.jsx)(Ff,{item:!0,children:(0,qt.jsx)(lS,{variant:"rounded",width:64,height:30,sx:{borderRadius:1}})})]})]})})]})})})]})}const eAe=function(e){var t,n,r,o,a,s,l,c,d,u,p,h,m,f,g,v,x,y,b,j,_,C,w,S,A,k,T,E,M,O,R,P,D,N,L,I,F,$,B,z,H,W,U;let{edit:V,scheduleData:G,addNewSchedule:q,editSchedule:Y,activeProgram:Z,convertCronToArr:K,notifications:X,setSelectedVital:Q}=e;const{t:J}=Vg(),ee=wt(uu),te=so(),{scheduleId:ne}=lo(),[re,ie]=We.useState(null),oe={name:(null===G||void 0===G?void 0:G.name)||"",duration:(null===G||void 0===G?void 0:G.duration)||"",vital_name:(null===G||void 0===G?void 0:G.vital_name)||"",enable:(null===G||void 0===G||null===(t=G.non_compliance)||void 0===t?void 0:t.enabled)||!1,max_strikes:(null===G||void 0===G||null===(n=G.non_compliance)||void 0===n?void 0:n.max_strikes)||"",notification_text:(null===G||void 0===G||null===(r=G.non_compliance)||void 0===r?void 0:r.notification_text)||"",notification_title:(null===G||void 0===G||null===(o=G.non_compliance)||void 0===o?void 0:o.notification_title)||"",notification_enabled:(null===G||void 0===G||null===(a=G.non_compliance)||void 0===a?void 0:a.notification_enabled)||!1,mandate:((e,t)=>{let n=null===e||void 0===e?void 0:e.map(e=>({start_time:bs(null===e||void 0===e?void 0:e.start_time).add(t,"seconds"),end_time:bs(null===e||void 0===e?void 0:e.end_time),repetition:K(null===e||void 0===e?void 0:e.repetition),repeat:e.repeat_type,activity_name:e.activity_name,activity_type:e.activity_type}));return n})(null===G||void 0===G||null===(s=G.mandate)||void 0===s?void 0:s.timing,null===G||void 0===G||null===(l=G.mandate)||void 0===l||null===(c=l.reminder_notification)||void 0===c||null===(d=c.interval)||void 0===d?void 0:d.pre_reminder),reading_reminder_title:null===G||void 0===G||null===(u=G.mandate)||void 0===u||null===(p=u.reminder_notification)||void 0===p?void 0:p.fallback_title,reading_reminder_time:null!==G&&void 0!==G&&null!==(h=G.mandate)&&void 0!==h&&null!==(m=h.reminder_notification)&&void 0!==m&&null!==(f=m.interval)&&void 0!==f&&f.every?(null===G||void 0===G||null===(g=G.mandate)||void 0===g||null===(v=g.reminder_notification)||void 0===v||null===(x=v.interval)||void 0===x?void 0:x.every)/60:"",reading_reminder_repetition:null!==G&&void 0!==G&&null!==(y=G.mandate)&&void 0!==y&&null!==(b=y.reminder_notification)&&void 0!==b&&null!==(j=b.interval)&&void 0!==j&&j.pre_reminder?(null===G||void 0===G||null===(_=G.mandate)||void 0===_||null===(C=_.reminder_notification)||void 0===C||null===(w=C.interval)||void 0===w?void 0:w.stop_after)-parseInt(1):null===G||void 0===G||null===(S=G.mandate)||void 0===S||null===(A=S.reminder_notification)||void 0===A||null===(k=A.interval)||void 0===k?void 0:k.stop_after,reading_reminder_msg:null===G||void 0===G||null===(T=G.mandate)||void 0===T||null===(E=T.reminder_notification)||void 0===E?void 0:E.fallback_text,reading_reminder_enabled:!cs(null===G||void 0===G||null===(M=G.mandate)||void 0===M?void 0:M.reminder_notification),missed_reminder_title:null===G||void 0===G||null===(O=G.mandate)||void 0===O||null===(R=O.missed_reading_notification)||void 0===R?void 0:R.notification_title,missed_reminder_msg:null===G||void 0===G||null===(P=G.mandate)||void 0===P||null===(D=P.missed_reading_notification)||void 0===D?void 0:D.notification_text,missed_reminder_enabled:!cs(null===G||void 0===G||null===(N=G.mandate)||void 0===N?void 0:N.missed_reading_notification),missed_reminder_notification_enabled:!1,repeat:"*"!==(null===G||void 0===G||null===(L=G.mandate)||void 0===L||null===(I=L.repetition)||void 0===I||null===(F=I.split(" ")[5])||void 0===F?void 0:F.split(",")[0])?"weekly":"daily",pre_reminder_enabled:!(null===G||void 0===G||null===($=G.mandate)||void 0===$||null===(B=$.reminder_notification)||void 0===B||null===(z=B.interval)||void 0===z||!z.pre_reminder),pre_reminder:(null===G||void 0===G||null===(H=G.mandate)||void 0===H||null===(W=H.reminder_notification)||void 0===W||null===(U=W.interval)||void 0===U?void 0:U.every)/60,def:(null===G||void 0===G?void 0:G.def)||!1},ae=()=>(0,qt.jsxs)(qt.Fragment,{children:[(0,qt.jsx)(op,{sx:{position:"absolute",top:"-14px",background:"#ffffff",padding:"0 6px",zIndex:"1",display:"none"},children:(0,qt.jsxs)(Cf,{variant:"body1",children:["Non Compliance",(0,qt.jsx)(op,{component:"span",children:"*"})]})}),(0,qt.jsxs)(Ff,{container:!0,spacing:2,children:[(0,qt.jsx)(Ff,{item:!0,xs:12,md:6,children:(0,qt.jsxs)(op,{sx:{"& .MuiOutlinedInput-root":{background:"#ffffff"},"& .MuiOutlinedInput-input":{py:1.0625}},children:[(0,qt.jsxs)(Cf,{variant:"body1",component:"p",fontWeight:"h6.fontWeight",gutterBottom:!0,children:[J("rpm_MaxStrike"),(0,qt.jsx)(op,{component:"span",children:"*"})]}),(0,qt.jsxs)(tH,{as:G_,fullWidth:!0,size:"small",id:"max_strikes",name:"max_strikes",variant:"outlined",endAdornment:(0,qt.jsx)(tw,{position:"end",sx:{position:"absolute",right:"28px"},children:(0,qt.jsx)(sy,{title:J("message:rpm_MaxStrikeHelp"),placement:"top",children:(0,qt.jsx)(wh,{size:"small",disableRipple:!0,sx:{p:0},children:(0,qt.jsx)(pM.A,{fontSize:"small"})})})}),children:[(0,qt.jsx)(mf,{value:1,children:"1"}),(0,qt.jsx)(mf,{value:2,children:"2"}),(0,qt.jsx)(mf,{value:3,children:"3"}),(0,qt.jsx)(mf,{value:4,children:"4"})]}),(0,qt.jsx)(dH,{name:"max_strikes",children:e=>(0,qt.jsx)(v_,{error:!0,children:J(e,{field:J("rpm_NoOfMandate")})})})]})}),(0,qt.jsx)(Ff,{item:!0,xs:12,md:6,children:(0,qt.jsxs)(op,{sx:{"& .MuiOutlinedInput-root":{background:"#ffffff"},"& .MuiOutlinedInput-input":{py:1.0625}},children:[(0,qt.jsxs)(Cf,{variant:"body1",component:"p",fontWeight:"h6.fontWeight",gutterBottom:!0,children:[J("rpm_Title"),(0,qt.jsx)(op,{component:"span",children:"*"})]}),(0,qt.jsx)(tH,{as:qj,fullWidth:!0,size:"small",id:"notification_title",name:"notification_title",variant:"outlined",endAdornment:(0,qt.jsx)(tw,{position:"end",children:(0,qt.jsx)(sy,{title:J("message:rpm_NotificationTitleHelp"),placement:"top",children:(0,qt.jsx)(wh,{size:"small",disableRipple:!0,sx:{p:0},children:(0,qt.jsx)(pM.A,{fontSize:"small"})})})})}),(0,qt.jsx)(dH,{name:"notification_title",children:e=>(0,qt.jsx)(v_,{error:!0,children:J(e,{field:J("rpm_Title")})})})]})}),(0,qt.jsx)(Ff,{item:!0,xs:12,md:12,children:(0,qt.jsxs)(op,{sx:{"& .MuiOutlinedInput-root":{background:"#ffffff"},"& .MuiOutlinedInput-input":{py:1.0625}},children:[(0,qt.jsxs)(Cf,{variant:"body1",component:"p",fontWeight:"h6.fontWeight",gutterBottom:!0,children:[J("rpm_Description"),(0,qt.jsx)(op,{component:"span",children:"*"})]}),(0,qt.jsx)(tH,{as:qj,fullWidth:!0,size:"small",id:"notification_text",name:"notification_text",variant:"outlined",multiline:!0,rows:3,endAdornment:(0,qt.jsx)(tw,{position:"end",children:(0,qt.jsx)(sy,{title:J("message:rpm_NotificationDescriptionHelp"),placement:"top",children:(0,qt.jsx)(wh,{size:"small",disableRipple:!0,sx:{p:0},children:(0,qt.jsx)(pM.A,{fontSize:"small"})})})})}),(0,qt.jsx)(dH,{name:"notification_text",children:e=>(0,qt.jsx)(v_,{error:!0,children:J(e,{field:J("rpm_Description")})})})]})})]})]}),se=()=>(0,qt.jsxs)(qt.Fragment,{children:[(0,qt.jsx)(op,{sx:{position:"absolute",top:"-14px",background:"#ffffff",padding:"0 6px",zIndex:"1",display:"none"},children:(0,qt.jsxs)(Cf,{variant:"body1",children:[J("rpm_ReadingReminder"),(0,qt.jsx)(op,{component:"span",children:"*"})]})}),(0,qt.jsxs)(Ff,{container:!0,spacing:2,children:[(0,qt.jsx)(Ff,{item:!0,xs:12,md:12,children:(0,qt.jsxs)(op,{sx:{"& .MuiOutlinedInput-root":{background:"#ffffff"},"& .MuiOutlinedInput-input":{py:1.0625}},children:[(0,qt.jsxs)(Cf,{variant:"body1",component:"p",fontWeight:"h6.fontWeight",gutterBottom:!0,children:[J("rpm_Title"),(0,qt.jsx)(op,{component:"span",children:"*"})]}),(0,qt.jsx)(tH,{as:qj,fullWidth:!0,size:"small",id:"reading_reminder_title",name:"reading_reminder_title",variant:"outlined",endAdornment:(0,qt.jsx)(tw,{position:"end",children:(0,qt.jsx)(sy,{title:J("message:rpm_ReadingReminderTitle"),placement:"top",children:(0,qt.jsx)(wh,{size:"small",disableRipple:!0,sx:{p:0},children:(0,qt.jsx)(pM.A,{fontSize:"small"})})})})}),(0,qt.jsx)(dH,{name:"reading_reminder_title",children:e=>(0,qt.jsx)(v_,{error:!0,children:J(e,{field:J("rpm_Title")})})})]})}),(0,qt.jsx)(Ff,{item:!0,xs:12,md:6,children:(0,qt.jsxs)(op,{sx:{"& .MuiOutlinedInput-root":{background:"#ffffff"},"& .MuiOutlinedInput-input":{py:1.0625}},children:[(0,qt.jsxs)(Cf,{variant:"body1",component:"p",fontWeight:"h6.fontWeight",gutterBottom:!0,children:[J("rpm_SendInEveryMin"),(0,qt.jsx)(op,{component:"span",children:"*"})]}),(0,qt.jsxs)(tH,{as:G_,fullWidth:!0,size:"small",id:"reading_reminder_time",name:"reading_reminder_time",variant:"outlined",endAdornment:(0,qt.jsx)(tw,{position:"end",sx:{position:"absolute",right:"28px"},children:(0,qt.jsx)(sy,{title:J("message:rpm_ReadingReminderEveryMinHelp"),placement:"top",children:(0,qt.jsx)(wh,{size:"small",disableRipple:!0,sx:{p:0},children:(0,qt.jsx)(pM.A,{fontSize:"small"})})})}),children:[[1,2,3,4,5,6].map(e=>(0,qt.jsxs)(mf,{value:5*e,children:[5*e," min"]},e)),(0,qt.jsx)(mf,{value:45,children:"45 min"}),(0,qt.jsx)(mf,{value:60,children:"60 min"})]}),(0,qt.jsx)(dH,{name:"reading_reminder_time",children:e=>(0,qt.jsx)(v_,{error:!0,children:J(e,{field:J("rpm_ReadingReminderTime")})})})]})}),(0,qt.jsx)(Ff,{item:!0,xs:12,md:6,children:(0,qt.jsxs)(op,{sx:{"& .MuiOutlinedInput-root":{background:"#ffffff"},"& .MuiOutlinedInput-input":{py:1.0625}},children:[(0,qt.jsxs)(Cf,{variant:"body1",component:"p",fontWeight:"h6.fontWeight",gutterBottom:!0,children:[J("rpm_Repetition"),(0,qt.jsx)(op,{component:"span",children:"*"})]}),(0,qt.jsx)(tH,{as:G_,fullWidth:!0,size:"small",id:"reading_reminder_repetition",name:"reading_reminder_repetition",variant:"outlined",endAdornment:(0,qt.jsx)(tw,{position:"end",sx:{position:"absolute",right:"28px"},children:(0,qt.jsx)(sy,{title:J("message:rpm_ReadingReminderRepetitionHelp"),placement:"top",children:(0,qt.jsx)(wh,{size:"small",disableRipple:!0,sx:{p:0},children:(0,qt.jsx)(pM.A,{fontSize:"small"})})})}),children:[1,2,3,4,5,6,7,8,9,10].map(e=>(0,qt.jsx)(mf,{value:e,children:e},e))}),(0,qt.jsx)(dH,{name:"reading_reminder_repetition",children:e=>(0,qt.jsx)(v_,{error:!0,children:J(e,{field:J("rpm_ReadingReminderTime")})})})]})}),(0,qt.jsx)(Ff,{item:!0,xs:12,md:12,children:(0,qt.jsxs)(op,{sx:{"& .MuiOutlinedInput-root":{background:"#ffffff"},"& .MuiOutlinedInput-input":{py:1.0625}},children:[(0,qt.jsxs)(Cf,{variant:"body1",component:"p",fontWeight:"h6.fontWeight",gutterBottom:!0,children:[J("rpm_Description"),(0,qt.jsx)(op,{component:"span",children:"*"})]}),(0,qt.jsx)(tH,{as:qj,fullWidth:!0,size:"small",id:"reading_reminder_msg",name:"reading_reminder_msg",variant:"outlined",multiline:!0,rows:3,endAdornment:(0,qt.jsx)(tw,{position:"end",children:(0,qt.jsx)(sy,{title:J("message:rpm_ReadingReminderMsgHelp"),placement:"top",children:(0,qt.jsx)(wh,{size:"small",disableRipple:!0,sx:{p:0},children:(0,qt.jsx)(pM.A,{fontSize:"small"})})})})}),(0,qt.jsx)(dH,{name:"reading_reminder_msg",children:e=>(0,qt.jsx)(v_,{error:!0,children:J(e,{field:J("rpm_ReadingReminderMsg")})})})]})})]})]}),le=()=>{var e;return(0,qt.jsxs)(qt.Fragment,{children:[(0,qt.jsx)(op,{sx:{position:"absolute",top:"-14px",background:"#ffffff",padding:"0 6px",zIndex:"1",display:"none"},children:(0,qt.jsxs)(Cf,{variant:"body1",children:[J("rpm_MissedReading"),(0,qt.jsx)(op,{component:"span",children:"*"})]})}),(0,qt.jsxs)(Ff,{container:!0,spacing:2,children:[(0,qt.jsx)(Ff,{item:!0,xs:12,md:12,children:(0,qt.jsxs)(op,{sx:{"& .MuiOutlinedInput-root":{background:"#ffffff"},"& .MuiOutlinedInput-input":{py:1.0625}},children:[(0,qt.jsxs)(Cf,{variant:"body1",component:"p",fontWeight:"h6.fontWeight",gutterBottom:!0,children:[J("rpm_Title"),(0,qt.jsx)(op,{component:"span",children:"*"})]}),(0,qt.jsx)(tH,{as:qj,fullWidth:!0,size:"small",id:"missed_reminder_title",name:"missed_reminder_title",variant:"outlined",endAdornment:(0,qt.jsx)(tw,{position:"end",children:(0,qt.jsx)(sy,{title:J("message:rpm_MissedReadingTitleHelp"),placement:"top",children:(0,qt.jsx)(wh,{size:"small",disableRipple:!0,sx:{p:0},children:(0,qt.jsx)(pM.A,{fontSize:"small"})})})})}),(0,qt.jsx)(dH,{name:"missed_reminder_title",children:e=>(0,qt.jsx)(v_,{error:!0,children:J(e,{field:J("rpm_Title")})})})]})}),(0,qt.jsxs)(Ff,{item:!0,xs:12,md:12,children:[(0,qt.jsxs)(op,{sx:{"& .MuiOutlinedInput-root":{background:"#ffffff"},"& .MuiOutlinedInput-input":{py:1.0625}},children:[(0,qt.jsxs)(Cf,{variant:"body1",component:"p",fontWeight:"h6.fontWeight",gutterBottom:!0,children:[J("rpm_Description"),(0,qt.jsx)(op,{component:"span",children:"*"})]}),(0,qt.jsx)(tH,{as:qj,fullWidth:!0,size:"small",id:"missed_reminder_msg",name:"missed_reminder_msg",variant:"outlined",multiline:!0,rows:3,endAdornment:(0,qt.jsx)(tw,{position:"end",children:(0,qt.jsx)(sy,{title:J("message:rpm_MissedReadingMsgHelp"),placement:"top",children:(0,qt.jsx)(wh,{size:"small",disableRipple:!0,sx:{p:0},children:(0,qt.jsx)(pM.A,{fontSize:"small"})})})})}),(0,qt.jsx)(dH,{name:"missed_reminder_msg",children:e=>(0,qt.jsx)(v_,{error:!0,children:J(e,{field:J("rpm_Description")})})})]}),!(null!==X&&void 0!==X&&null!==(e=X.push_notification)&&void 0!==e&&e.missed_mandate)&&(0,qt.jsx)(op,{mt:2,children:(0,qt.jsxs)(Cf,{variant:"body1",component:"p",color:"red.700",gutterBottom:!0,fontSize:"14px",children:["(",J("message:rpm_notificationSettingMessage"),")"]})})]})]})]})},ce=[{name:J("rpm_RPM"),url:ld.DOCTOR.PROGRAM},{name:null===Z||void 0===Z?void 0:Z.display_name,url:"".concat(ld.DOCTOR.PROGRAM,"/").concat(null===Z||void 0===Z?void 0:Z.code,"/patients")},{name:J("rpm_Schedules"),url:"".concat(ld.DOCTOR.PROGRAM,"/").concat(null===Z||void 0===Z?void 0:Z.code,"/course")},{name:cs(G)?J("rpm_AddNew"):J("rpm_Edit"),url:""}];return V&&cs(G)?(0,qt.jsx)(JSe,{}):(0,qt.jsxs)(op,{sx:{width:"100%"},children:[(0,qt.jsxs)(op,{mb:2.5,display:"flex",children:[(0,qt.jsx)(BH,{labels:ce}),(0,qt.jsx)(op,{sx:{display:{xs:"block",sm:"block",md:"none"}},children:(0,qt.jsx)(Cf,{variant:"h6",component:"h6",children:cs(G)?J("rpm_CreateNewSchedule"):J("rpm_EditSchedule")})})]}),(0,qt.jsx)(Ff,{container:!0,spacing:2,children:(0,qt.jsx)(Ff,{item:!0,xs:12,children:(0,qt.jsx)(Kz,{initialValues:cs(G)?{name:"",duration:"",vital_name:"",enable:!0,max_strikes:"",notification_text:"",notification_title:"",notification_enabled:!1,mandate:[{start_time:null,end_time:null,activity_name:null,activity_type:null,repeat:"Daily",repetition:[]}],reading_reminder_title:"",reading_reminder_time:"",reading_reminder_repetition:"",reading_reminder_msg:"",missed_reminder_title:"",missed_reminder_time:"",missed_reminder_msg:"",reading_reminder_enabled:!1,missed_reminder_enabled:!1,missed_reminder_notification_enabled:!1,repeat:"daily",repetition:"0 0 0 ? * * *",pre_reminder_enabled:!1,pre_reminder:0,def:!1}:oe,validationSchema:RU.addNewSchedule,onSubmit:ne?Y:q,enableReinitialize:!0,children:e=>{var t,n;let{values:r,setFieldValue:o}=e;return(0,qt.jsx)(qt.Fragment,{children:(0,qt.jsx)(nH,{children:(0,qt.jsxs)(yH,{variant:"outlined",children:[(0,qt.jsx)(nW,{sx:{py:1.5,bgcolor:"primary.theme.50"},title:(0,qt.jsx)(qt.Fragment,{children:(0,qt.jsxs)(Ff,{container:!0,spacing:2,alignItems:"center",children:[(0,qt.jsx)(Ff,{item:!0,xs:!0,children:(0,qt.jsx)(op,{sx:{display:{xs:"none",sm:"none",md:"block"}},children:(0,qt.jsxs)(Cf,{variant:"h6",component:"h6",children:[cs(G)?J("rpm_CreateNewSchedule"):J("rpm_EditSchedule")," "]})})}),(0,qt.jsx)(Ff,{item:!0,children:(0,qt.jsx)(xh,{color:"primary",variant:"outlined",onClick:()=>te(-1),children:J("rpm_Cancel")})}),(0,qt.jsx)(Ff,{item:!0,children:(0,qt.jsx)(IM,{loading:ee,color:"primary",disableElevation:!0,variant:"contained",type:"submit",children:J("rpm_Save")})})]})})}),(0,qt.jsx)(wH,{sx:{py:4,":last-child":{pb:4}},children:(0,qt.jsxs)(Ff,{container:!0,spacing:2,children:[(0,qt.jsx)(Ff,{item:!0,xs:12,lg:12,children:(0,qt.jsxs)(Ff,{container:!0,spacing:2,children:[(0,qt.jsx)(Ff,{item:!0,xs:12,md:4,children:(0,qt.jsxs)(op,{mb:2.5,children:[(0,qt.jsxs)(Cf,{variant:"body1",component:"p",fontWeight:"h6.fontWeight",gutterBottom:!0,children:[J("rpm_ScheduleTitle"),(0,qt.jsx)(op,{component:"span",children:"*"})]}),(0,qt.jsx)(tH,{fullWidth:!0,as:qj,id:"name",name:"name",size:"small",color:"primary",endAdornment:(0,qt.jsx)(tw,{position:"end",children:(0,qt.jsx)(sy,{title:J("message:rpm_ScheduleTitleHelp"),placement:"top",children:(0,qt.jsx)(wh,{size:"small",children:(0,qt.jsx)(pM.A,{fontSize:"small"})})})})}),(0,qt.jsx)(dH,{name:"name",children:e=>(0,qt.jsx)(v_,{error:!0,children:J(e,{field:J("rpm_ScheduleTitle")})})})]})}),(0,qt.jsx)(Ff,{item:!0,xs:12,md:4,children:(0,qt.jsxs)(op,{mb:2.5,className:"hide_num_arrow",sx:{"& .MuiOutlinedInput-input":{py:1.0625}},children:[(0,qt.jsxs)(Cf,{variant:"body1",component:"p",fontWeight:"h6.fontWeight",gutterBottom:!0,children:[J("rpm_VitalName"),(0,qt.jsx)(op,{component:"span",children:"*"})]}),(0,qt.jsx)(tH,{fullWidth:!0,as:G_,id:"vital_name",name:"vital_name",size:"small",color:"primary",disabled:!cs(G),endAdornment:(0,qt.jsx)(tw,{position:"end",sx:{position:"absolute",right:"28px"},children:(0,qt.jsx)(sy,{title:J("message:rpm_VitalNameHelp"),placement:"top",children:(0,qt.jsx)(wh,{size:"small",children:(0,qt.jsx)(pM.A,{fontSize:"small"})})})}),onChange:e=>{const{value:t}=e.target;o("vital_name",t),Q(t)},children:null===Dd||void 0===Dd?void 0:Dd.map(e=>(0,qt.jsx)(mf,{value:e.value,children:J("rpm_".concat(e.name))},e.name))}),(0,qt.jsx)(dH,{name:"vital_name",children:e=>(0,qt.jsx)(v_,{error:!0,children:J(e,{field:J("rpm_VitalName")})})})]})}),(0,qt.jsx)(Ff,{item:!0,xs:12,md:4,children:(0,qt.jsxs)(op,{mb:2.5,className:"hide_num_arrow",sx:{"& .MuiOutlinedInput-input":{py:1.0625}},children:[(0,qt.jsxs)(Cf,{variant:"body1",component:"p",fontWeight:"h6.fontWeight",gutterBottom:!0,children:[J("rpm_DurationOfCourse"),(0,qt.jsx)(op,{component:"span",children:"*"})]}),(0,qt.jsx)(tH,{fullWidth:!0,as:qj,id:"duration",name:"duration",size:"small",color:"primary",type:"number",endAdornment:(0,qt.jsx)(tw,{position:"end",children:(0,qt.jsx)(sy,{title:J("message:rpm_DurationHelp"),placement:"top",children:(0,qt.jsx)(wh,{size:"small",children:(0,qt.jsx)(pM.A,{fontSize:"small"})})})})}),(0,qt.jsx)(dH,{name:"duration",children:e=>(0,qt.jsx)(v_,{error:!0,children:J(e,{field:J("rpm_Duration")})})})]})})]})}),(0,qt.jsxs)(Ff,{item:!0,xs:12,lg:7,xl:6,children:[(0,qt.jsx)(Cf,{variant:"body1",fontWeight:600,children:J("rpm_MandateSetting")}),(0,qt.jsx)(op,{p:2,pt:3,mt:2.5,bgcolor:"primary.theme.50",borderRadius:1,position:"relative",sx:{"& .MuiGrid-container:last-child":{border:"none"}},children:(0,qt.jsx)(lH,{name:"mandate",children:e=>{var t;let{push:n,remove:a}=e;return(0,qt.jsx)(qt.Fragment,{children:null===r||void 0===r||null===(t=r.mandate)||void 0===t?void 0:t.map((e,t)=>(0,qt.jsxs)(Ff,{container:!0,spacing:1.5,mt:0===t?null:.05,pb:2,sx:{borderBottom:"1px solid #c5c5c5"},children:["glucose"==r.vital_name&&(0,qt.jsxs)(qt.Fragment,{children:[(0,qt.jsx)(Ff,{item:!0,xs:12,sm:6,xl:3,children:(0,qt.jsxs)(op,{sx:{"& .MuiOutlinedInput-root":{background:"#ffffff"},"& .MuiOutlinedInput-input":{py:1.0625}},children:[(0,qt.jsxs)(Cf,{variant:"body1",component:"p",fontWeight:"h6.fontWeight",gutterBottom:!0,children:[J("rpm_Activity"),(0,qt.jsx)(op,{component:"span",children:"*"}),(0,qt.jsx)(sy,{title:J("message:rpm_ActivityNameHelp"),placement:"top",children:(0,qt.jsx)(wh,{size:"small",disableRipple:!0,sx:{p:0},children:(0,qt.jsx)(pM.A,{fontSize:"small"})})})]}),(0,qt.jsx)(tH,{as:qj,fullWidth:!0,size:"small",id:"mandate.".concat(t,".activity_name"),name:"mandate.".concat(t,".activity_name")}),(0,qt.jsx)(dH,{name:"mandate.".concat(t,".activity_name"),children:e=>(0,qt.jsx)(v_,{error:!0,children:J(e,{field:J("error:rpm_ActivityName")})})})]})}),(0,qt.jsx)(Ff,{item:!0,xs:12,sm:6,xl:3,children:(0,qt.jsxs)(op,{sx:{"& .MuiOutlinedInput-root":{background:"#ffffff"},"& .MuiOutlinedInput-input":{py:1.0625}},children:[(0,qt.jsxs)(Cf,{variant:"body1",component:"p",fontWeight:"h6.fontWeight",gutterBottom:!0,children:["".concat(J("rpm_ActivityType")),(0,qt.jsx)(op,{component:"span",children:"*"}),(0,qt.jsx)(sy,{title:J("message:rpm_ActivityTypeHelp"),placement:"top",children:(0,qt.jsx)(wh,{size:"small",disableRipple:!0,sx:{p:0},children:(0,qt.jsx)(pM.A,{fontSize:"small"})})})]}),(0,qt.jsxs)(tH,{as:G_,fullWidth:!0,size:"small",id:"mandate.".concat(t,".activity_type"),name:"mandate.".concat(t,".activity_type"),variant:"outlined",sx:{"&.MuiOutlinedInput-root":{bgcolor:"white"}},children:[(0,qt.jsx)(mf,{value:"fasting",children:J("rpm_fasting")}),(0,qt.jsx)(mf,{value:"nonfasting",children:J("rpm_nonFasting")})]}),(0,qt.jsx)(dH,{name:"mandate.".concat(t,".activity_type"),children:e=>(0,qt.jsx)(v_,{error:!0,children:J(e,{field:J("error:rpm_ActivityType")})})})]})})]}),(0,qt.jsx)(Ff,{item:!0,xs:12,sm:6,xl:"glucose"!==r.vital_name?6:3,children:(0,qt.jsxs)(op,{sx:{"& .MuiOutlinedInput-root":{background:"#ffffff"},"& .MuiOutlinedInput-input":{py:1.0625}},children:[(0,qt.jsxs)(Cf,{variant:"body1",component:"p",fontWeight:"h6.fontWeight",gutterBottom:!0,children:[J("rpm_StartTime"),(0,qt.jsx)(op,{component:"span",children:"*"}),(0,qt.jsx)(sy,{title:J("message:rpm_MandateStartTimeHelp"),placement:"top",children:(0,qt.jsx)(wh,{size:"small",disableRipple:!0,sx:{p:0},children:(0,qt.jsx)(pM.A,{fontSize:"small"})})})]}),(0,qt.jsx)(WM,{dateAdapter:DI,children:(0,qt.jsx)(tH,{as:pCe,ampm:!1,size:"small",id:"mandate.".concat(t,".start_time"),name:"mandate.".concat(t,".start_time"),value:null===e||void 0===e?void 0:e.start_time,onChange:e=>o("mandate.".concat(t,".start_time"),e),renderInput:e=>(0,qt.jsx)(Q_,(0,i.A)((0,i.A)({fullWidth:!0},e),{},{id:"startMandate-".concat(t)})),maxTime:e.end_time?new Date(e.end_time):void 0,onError:e=>{if(e)ie((0,i.A)((0,i.A)({},re),{},{["mandate_".concat(t,"_start_time")]:e}));else{let e=re||{};e["mandate_".concat(t,"_start_time")]&&(delete e["mandate_".concat(t,"_start_time")],ie(e))}}})}),re&&"invalidDate"===re["mandate_".concat(t,"_start_time")]&&(0,qt.jsx)(v_,{error:!0,children:J("error:rpm_invalidDateErr")}),(0,qt.jsx)(dH,{name:"mandate.".concat(t,".start_time"),children:e=>(0,qt.jsx)(v_,{error:!0,children:J(e,{field:J("rpm_StartTime")})})})]})}),(0,qt.jsxs)(Ff,{item:!0,xs:12,sm:6,xl:"glucose"!==r.vital_name?6:3,display:"flex",justifyContent:"space-between",children:[(0,qt.jsxs)(op,{sx:{"& .MuiOutlinedInput-root":{background:"#ffffff"},"& .MuiOutlinedInput-input":{py:1.0625}},width:"100%",children:[(0,qt.jsxs)(Cf,{variant:"body1",component:"p",fontWeight:"h6.fontWeight",gutterBottom:!0,children:[J("rpm_EndTime"),(0,qt.jsx)(op,{component:"span",children:"*"}),(0,qt.jsx)(sy,{title:J("message:rpm_MandateEndTimeHelp"),placement:"top",children:(0,qt.jsx)(wh,{size:"small",disableRipple:!0,sx:{p:0},children:(0,qt.jsx)(pM.A,{fontSize:"small"})})})]}),(0,qt.jsx)(WM,{dateAdapter:DI,children:(0,qt.jsx)(tH,{as:pCe,ampm:!1,size:"small",id:"mandate.".concat(t,".end_time"),name:"mandate.".concat(t,".end_time"),value:null===e||void 0===e?void 0:e.end_time,onChange:e=>o("mandate.".concat(t,".end_time"),e),renderInput:e=>(0,qt.jsx)(Q_,(0,i.A)((0,i.A)({fullWidth:!0},e),{},{id:"endMandate-".concat(t)})),minTime:e.start_time?new Date(e.start_time):void 0,onError:e=>{if(e)ie((0,i.A)((0,i.A)({},re),{},{["mandate_".concat(t,"_end_time")]:e}));else{let e=re||{};e["mandate_".concat(t,"_end_time")]&&(delete e["mandate_".concat(t,"_end_time")],ie(e))}}})}),re&&"invalidDate"===re["mandate_".concat(t,"_end_time")]&&(0,qt.jsx)(v_,{error:!0,children:J("error:rpm_invalidDateErr")}),re&&"minTime"===re["mandate_".concat(t,"_end_time")]&&(0,qt.jsx)(v_,{error:!0,children:J("error:rpm_minMaxTimeErr")}),(0,qt.jsx)(dH,{name:"mandate.".concat(t,".end_time"),children:e=>(0,qt.jsx)(v_,{error:!0,children:J(e,{field:J("rpm_EndTime")})})})]}),(null===r||void 0===r?void 0:r.mandate.length)>1&&(0,qt.jsx)(op,{children:(0,qt.jsx)(wh,{size:"small",sx:{mt:{xs:0,sm:4}},color:"error",onClick:()=>((e,t)=>{let n=(0,i.A)({},re)||{};n["mandate_".concat(e,"_start_time")]&&(delete n["mandate_".concat(e,"_start_time")],ie(n)),n["mandate_".concat(e,"_end_time")]&&(delete n["mandate_".concat(e,"_end_time")],ie(n)),t(e)})(t,a),id:"courseMandateDeleteIcon",children:(0,qt.jsx)(dSe.A,{fontSize:"small",sx:{width:16,height:16}})})})]}),r.mandate.length-1===t&&!1,(0,qt.jsxs)(Ff,{item:!0,xs:12,md:12,sm:!0,children:[(0,qt.jsx)(op,{children:(0,qt.jsxs)(Ff,{container:!0,spacing:.5,children:[(0,qt.jsx)(Ff,{item:!0,children:(0,qt.jsxs)(op,{minWidth:"150px",children:[(0,qt.jsx)(Cf,{variant:"body1",component:"p",fontWeight:"h6.fontWeight",gutterBottom:!0,children:J("rpm_Repeat")}),(0,qt.jsxs)(tH,{as:G_,fullWidth:!0,size:"small",id:"mandate.".concat(t,".repeat"),name:"mandate.".concat(t,".repeat"),variant:"outlined",sx:{"&.MuiOutlinedInput-root":{bgcolor:"white"}},endAdornment:(0,qt.jsx)(tw,{position:"end",sx:{position:"absolute",right:"28px"},children:(0,qt.jsx)(sy,{title:J("message:rpm_RepeatCourseHelp"),placement:"top",children:(0,qt.jsx)(wh,{size:"small",disableRipple:!0,sx:{p:0},children:(0,qt.jsx)(pM.A,{fontSize:"small"})})})}),children:[(0,qt.jsx)(mf,{value:"Daily",children:"Daily"}),(0,qt.jsx)(mf,{value:"Weekly",children:"Weekly"}),(0,qt.jsx)(mf,{value:"None",children:"Does not repeat"})]})]})}),Od.map((e,n)=>{var i;return(0,qt.jsx)(qt.Fragment,{children:"Weekly"===r.mandate[t].repeat&&(0,qt.jsx)(Ff,{item:!0,mt:4,sx:{"& .MuiCheckbox-root":{p:0}},children:(0,qt.jsx)(tH,{as:Dw,"data-id":e,checked:null===(i=r.mandate[t].repetition)||void 0===i?void 0:i.includes("".concat(n+1)),"data-day":t,name:"mandate.".concat(t,".repetition"),value:n+1,icon:(0,qt.jsx)(xh,{color:"primary",size:"small",variant:"outlined",children:e.name}),checkedIcon:(0,qt.jsx)(xh,{color:"primary",size:"small",variant:"contained",children:e.name}),sx:{"& .MuiButton-root":{minWidth:"auto"}}})},e.value)})})]})}),r.mandate.length-1===t&&(0,qt.jsx)(op,{textAlign:"right",sx:{mt:.5},children:(0,qt.jsx)(xh,{size:"small",color:"primary",onClick:()=>n({start_time:null,end_time:null,activity_name:null,activity_type:null,repeat:"Daily",repetition:[]}),id:"addNewButton",children:J("rpm_AddNew")})})]})]},t))})}})})]}),(0,qt.jsxs)(Ff,{item:!0,xs:12,lg:5,xl:6,children:[(0,qt.jsx)(Cf,{variant:"body1",fontWeight:600,children:J("rpm_NotificationsSetting")}),(0,qt.jsx)(mr,{in:r.enable,children:(0,qt.jsxs)(op,{p:2,pt:3,mt:2.5,mb:3,bgcolor:"primary.theme.50",borderRadius:1,position:"relative",children:[(0,qt.jsx)(ae,{}),(0,qt.jsx)(wE,{disabled:!0,sx:{mt:2},label:"Enable Non-Compliance Notification",control:(0,qt.jsx)(tH,{as:Dw,type:"checkbox",id:"notification_enabled",name:"notification_enabled"})}),!(null!==X&&void 0!==X&&null!==(t=X.push_notification)&&void 0!==t&&t.non_compliant_user)&&(0,qt.jsx)(op,{mt:2,children:(0,qt.jsxs)(Cf,{variant:"body1",component:"p",color:"red.700",gutterBottom:!0,fontSize:"14px",children:["(",J("message:rpm_notificationSettingMessage"),")"]})})]})}),(0,qt.jsxs)(que,{children:[(0,qt.jsx)(wE,{label:J("rpm_ReminderNotificationText"),control:(0,qt.jsx)(tH,{as:Dw,type:"checkbox",id:"reading_reminder_enabled",name:"reading_reminder_enabled"})}),(0,qt.jsx)(mr,{in:r.reading_reminder_enabled,children:(0,qt.jsxs)(op,{p:2,pt:3,mt:2.5,mb:3,bgcolor:"primary.theme.50",borderRadius:1,position:"relative",children:[(0,qt.jsx)(se,{}),(0,qt.jsxs)(op,{mt:2,children:[(0,qt.jsx)(wE,{label:J("rpm_SendPreReminder"),control:(0,qt.jsx)(tH,{as:Dw,type:"checkbox",id:"pre_reminder_enabled",name:"pre_reminder_enabled"})}),(null===r||void 0===r?void 0:r.pre_reminder_enabled)&&(0,qt.jsx)(v_,{children:J("preReminder_helpText")})]}),!(null!==X&&void 0!==X&&null!==(n=X.push_notification)&&void 0!==n&&n.reading_reminder)&&(0,qt.jsx)(op,{children:(0,qt.jsxs)(Cf,{variant:"body1",component:"p",color:"red.700",gutterBottom:!0,fontSize:"14px",children:["(",J("message:rpm_notificationSettingMessage"),")"]})})]})}),(0,qt.jsx)(wE,{label:J("rpm_MissedReading"),control:(0,qt.jsx)(tH,{as:Dw,type:"checkbox",id:"missed_reminder_enabled",name:"missed_reminder_enabled"})}),(0,qt.jsx)(mr,{in:r.missed_reminder_enabled,children:(0,qt.jsx)(op,{p:2,pt:3,mt:2.5,mb:3,bgcolor:"primary.theme.50",borderRadius:1,position:"relative",children:(0,qt.jsx)(le,{})})}),(0,qt.jsx)(wE,{label:J("rpm_defaultProgram"),control:(0,qt.jsx)(tH,{as:Dw,checked:r.def,type:"checkbox",id:"default_mbile_program",name:"default_mbile_program",onChange:()=>o("def",!r.def)})})]})]})]})})]})})})}},"addSchedule_formik")})})]})};var tAe=n(67395);const nAe=function(e){let{handleResetStep:t}=e;const{t:n}=Vg(),r=so();return(0,qt.jsx)(op,{sx:{py:10,px:2,mt:4,textAlign:"center",background:"#ffffff"},children:(0,qt.jsx)(Ff,{container:!0,justifyContent:"center",children:(0,qt.jsxs)(Ff,{item:!0,xs:12,md:7,lg:6,children:[(0,qt.jsx)(op,{mb:2,children:(0,qt.jsx)(Ny,{sx:{bgcolor:"lightGreen.100",width:160,height:160,mx:"auto"},children:(0,qt.jsx)(tAe.A,{sx:{fontSize:72},color:"success"})})}),(0,qt.jsx)(Cf,{component:"h3",variant:"h6",color:"success.main",children:"Course with mandate created successfully."}),(0,qt.jsx)(xh,{color:"primary",variant:"outlined",sx:{mt:2.5,mr:2.5},onClick:()=>r(-1),children:n("rpm_Back")}),(0,qt.jsx)(xh,{color:"primary",variant:"contained",disableElevation:!0,sx:{mt:2.5},onClick:t,children:n("rpm_CreateAnotherSchedule")})]})})})};const rAe=function(e){let{activeStep:t,handleNextStep:n,handleBackStep:r,handleResetStep:o,addNewSchedule:a,addNewMandate:s,editSchedule:l,edit:c,scheduleData:d,activeProgram:u,checkState:p,cronExp:h,handleCheckDay:m,convertCronToArr:f,notifications:g,showConfirmModal:v,toggleConfirmModal:x,onContinue:y,defaultCourseName:b}=e;const{t:j}=Vg(),[_,C]=(0,We.useState)("");return(0,qt.jsx)("div",{children:1===t?(0,qt.jsx)(nAe,{handleResetStep:o}):(0,qt.jsxs)(We.Fragment,{children:[(w=t,S={activeStep:t,handleNextStep:n,handleBackStep:r,handleResetStep:o,addNewSchedule:a,addNewMandate:s,editSchedule:l,edit:c,scheduleData:d,activeProgram:u,checkState:p,cronExp:h,handleCheckDay:m,convertCronToArr:f,notifications:g},0===w?(0,qt.jsx)(eAe,(0,i.A)({setSelectedVital:C},S)):0),(0,qt.jsx)(qV,{openModal:v,onCloseModal:x,actionFunction:()=>y(),options:{primaryText:j("message:rpm_confirmation"),secondaryText:j("message:rpm_defaultProgramConfirm",{program:null===b||void 0===b?void 0:b[(null===d||void 0===d?void 0:d.vital_name)||_]}),btn:{primaryText:j("rpm_continue"),secondaryText:j("rpm_Cancel"),primaryColor:"error",secondaryColor:"primary"},btnSwap:!0}})]})});var w,S};const iAe=rbe(function(e){let{activeProgram:t,notifications:n}=e;const r=Nt(),o=so(),a=wt(cu),{edit:s,type:l,scheduleId:c,programId:d}=lo(),[u,p]=We.useState(0),[h,m]=We.useState(null),[f,g]=We.useState(null),[v,x]=We.useState([]),[y,b]=We.useState(""),[j,_]=We.useState(!1),[C,w]=We.useState(null),S=()=>{p(e=>e+1)},A=async(e,t)=>{let n=await(null===e||void 0===e?void 0:e.map(e=>({start_time:sa()(null===e||void 0===e?void 0:e.start_time).subtract(t,"seconds").utc().format("HH:mm"),end_time:sa()(null===e||void 0===e?void 0:e.end_time).utc().format("HH:mm"),repetition:k(e),activity_name:e.activity_name,activity_type:e.activity_type,repeat_type:e.repeat})));return n},k=e=>{let t=[];const n=e.repetition.sort((e,t)=>e-t);if(null===n||void 0===n||n.forEach(e=>{"1"===e&&t.push("SUN"),"2"===e&&t.push("MON"),"3"===e&&t.push("TUE"),"4"===e&&t.push("WED"),"5"===e&&t.push("THU"),"6"===e&&t.push("FRI"),"7"===e&&t.push("SAT")}),"Weekly"!=e.repeat||cs(t))return"Daily"==e.repeat?"0 0 0 ? * * *":null;{const e=null===t||void 0===t?void 0:t.join(",");return"0 0 0 ? * ".concat(e," *")}},T=async e=>{var t;let n=null===e||void 0===e||null===(t=e.mandate)||void 0===t?void 0:t.map(e=>({start_time:sa()(null===e||void 0===e?void 0:e.start_time),end_time:sa()(null===e||void 0===e?void 0:e.end_time)})),a=[];a=null===n||void 0===n?void 0:n.map(e=>{const t=sa().duration(e.end_time.diff(e.start_time));return parseInt(t.asSeconds())});const s=e=>e>=600&&e<=10800,l={name:null===e||void 0===e?void 0:e.name,duration:null===e||void 0===e?void 0:e.duration,def:e.def,vital_name:null===e||void 0===e?void 0:e.vital_name,non_compliance:{enabled:null===e||void 0===e?void 0:e.enable,max_strikes:null===e||void 0===e?void 0:e.max_strikes,notification_enabled:null===e||void 0===e?void 0:e.notification_enabled,notification_title:null===e||void 0===e?void 0:e.notification_title,notification_text:null===e||void 0===e?void 0:e.notification_text},mandate_parameters:{timing:await A(null===e||void 0===e?void 0:e.mandate,e.pre_reminder_enabled?60*(null===e||void 0===e?void 0:e.reading_reminder_time):0),reminder_notification:e.reading_reminder_enabled?{notification_enabled:e.reading_reminder_notification_enabled,fallback_text:e.reading_reminder_msg,fallback_title:e.reading_reminder_title,interval:{pre_reminder:e.pre_reminder_enabled?60*(null===e||void 0===e?void 0:e.reading_reminder_time):0,every:60*e.reading_reminder_time,stop_after:e.pre_reminder_enabled?e.reading_reminder_repetition+parseInt(1):e.reading_reminder_repetition}}:null,missed_reading_notification:e.missed_reminder_enabled?{notification_title:e.missed_reminder_title,notification_text:e.missed_reminder_msg}:null}};try{if(a.every(s)){const{data:e}=await r(((e,t)=>async n=>{n(na(!0));const r=(0,i.A)({},t);try{const t="".concat(la.schedules,"/-/").concat(e||"");return await Fu(t,r)}finally{n(na(!1))}})(d,l));m(e),o(-1),r(Zo({subTitle:"message:rpm_ScheduleCreatedSuccessfully",severity:ud.SUCCESS}))}else r(Zo({subTitle:"error:rpm_SameTimeErr",severity:ud.ERROR}))}catch(c){const e=us(c,"response.data.code","");cs(e)?r(Zo({subTitle:"error:rpm_ScheduleCreatedFailed",severity:ud.ERROR})):r(Zo({subTitle:Vd(e,"error:rpm_ScheduleCreatedFailed"),severity:ud.ERROR}))}},E=async e=>{var t;let n=null===e||void 0===e||null===(t=e.mandate)||void 0===t?void 0:t.map(e=>({start_time:sa()(null===e||void 0===e?void 0:e.start_time),end_time:sa()(null===e||void 0===e?void 0:e.end_time)})),i=[];i=null===n||void 0===n?void 0:n.map(e=>{const t=sa().duration(e.end_time.diff(e.start_time));return parseInt(t.asSeconds())});const a=e=>e>=600&&e<=10800,s={name:null===e||void 0===e?void 0:e.name,duration:null===e||void 0===e?void 0:e.duration,def:e.def,vital_name:null===e||void 0===e?void 0:e.vital_name,non_compliance:{enabled:null===e||void 0===e?void 0:e.enable,max_strikes:null===e||void 0===e?void 0:e.max_strikes,notification_enabled:null===e||void 0===e?void 0:e.notification_enabled,notification_title:null===e||void 0===e?void 0:e.notification_title,notification_text:null===e||void 0===e?void 0:e.notification_text},mandate_parameters:{timing:await A(null===e||void 0===e?void 0:e.mandate,e.pre_reminder_enabled?60*e.reading_reminder_time:0),reminder_notification:e.reading_reminder_enabled?{fallback_title:e.reading_reminder_title,fallback_text:e.reading_reminder_msg,interval:{pre_reminder:e.pre_reminder_enabled?60*(null===e||void 0===e?void 0:e.reading_reminder_time):0,every:60*e.reading_reminder_time,stop_after:e.pre_reminder_enabled?e.reading_reminder_repetition+parseInt(1):e.reading_reminder_repetition}}:null,missed_reading_notification:e.missed_reminder_enabled?{notification_title:e.missed_reminder_title,notification_text:e.missed_reminder_msg}:null}};try{if(i.every(a)){const{data:e}=await r(ebe(d,c,s));m(e),o(-1),r(Zo({subTitle:"message:rpm_ScheduleUpdatedSuccessfully",severity:ud.SUCCESS}))}else r(Zo({subTitle:"error:rpm_SameTimeErr",severity:ud.ERROR}))}catch(l){const e=us(l,"response.data.code","");cs(e)?r(Zo({subTitle:"error:rpm_ScheduleUpdateFailed",severity:ud.ERROR})):r(Zo({subTitle:Vd(e,"error:rpm_ScheduleUpdateFailed"),severity:ud.ERROR}))}},M=async(e,t,n)=>{const i=await r((e=>async t=>{t(na(!0));try{const t="".concat(la.schedules,"/-/").concat(e,"/default-courses");return await Iu(t,{})}finally{t(na(!1))}})(d));Object.keys(i.data).length>0&&(null===f||void 0===f||!f.def)&&i.data[(null===f||void 0===f?void 0:f.vital_name)||(null===e||void 0===e?void 0:e.vital_name)]&&(null===f||void 0===f?void 0:f.name)!==i.data[(null===f||void 0===f?void 0:f.vital_name)||(null===e||void 0===e?void 0:e.vital_name)]&&e.def?(b(i.data),w({setErrors:t,values:e}),_(!0)):"addType"===n?T(e):E(e)};return We.useEffect(()=>{c&&l&&p(1)},[l,c]),We.useEffect(()=>{a&&d&&c&&s&&(async()=>{try{const e=await r(nbe(d,c));g(e)}catch(e){console.log(e)}})()},[a,d,c,s]),We.useEffect(()=>{r(NC({activeMenuItem:"schedule_program"}))},[t]),(0,qt.jsx)(rAe,{activeStep:u,handleNextStep:S,handleBackStep:()=>{p(e=>e-1)},handleResetStep:()=>{p(0)},addNewSchedule:(e,t)=>M(e,t,"addType"),addNewMandate:async(e,t)=>{let{setErrors:n}=t;const a=sa()(e.start_time),s=sa()(e.end_time),l=sa().duration(s.diff(a)),u=Math.ceil(l.asSeconds()),p={start_time:sa()(e.start_time).utc().format("HH:mm"),end_time:sa()(e.end_time).utc().format("HH:mm"),reminder_notification:e.reading_reminder_enabled?{notification_enabled:e.reading_reminder_notification_enabled,fallback_text:e.reading_reminder_msg,fallback_title:e.reading_reminder_title,interval:{every:60*e.reading_reminder_time,stop_after:e.reading_reminder_repetition}}:null,missed_reading_notification:e.missed_reminder_enabled?{notification_title:e.missed_reminder_title,notification_text:e.missed_reminder_msg}:null},m=c||(null===h||void 0===h?void 0:h.id);try{u>3599?(await r(((e,t,n)=>async r=>{r(na(!0));const o=(0,i.A)({},n);try{const n="".concat(la.schedules,"/-/").concat(e||"","/").concat(t||"");return await Fu(n,o)}finally{r(na(!1))}})(d,m,p)),c?o(-1):S(),r(Zo({subTitle:"message:rpm_MandateCreatedSuccessfully",severity:ud.SUCCESS}))):r(Zo({subTitle:"error:rpm_SameTimeErr",severity:ud.ERROR}))}catch(f){const e=us(f,"response.data.field_errors",{}),t=us(f,"response.data.code","");cs(e)?cs(t)?r(Zo({subTitle:"error:rpm_TimeOverlappingConflict",severity:ud.ERROR})):r(Zo({subTitle:Vd(t,"error:rpm_TimeOverlappingConflict"),severity:ud.ERROR})):n(Ud(e))}},editSchedule:e=>M(e,{},"editType"),scheduleRes:h,edit:s,scheduleData:f,activeProgram:t,checkState:v,handleCheckDay:e=>{if(Array.isArray(e))return x(e.map(e=>e.toString()));let t=e;v.includes(t)?x(v.filter(e=>e!==t).sort((e,t)=>e-t)):x(e=>e.includes(t)?[...e]:[...e,t].sort((e,t)=>e-t))},convertCronToArr:e=>{var t;const n=[],r=null===e||void 0===e||null===(t=e.split(" ")[5])||void 0===t?void 0:t.split(",");return null===r||void 0===r||r.forEach(e=>{"SUN"===e&&n.push("1"),"MON"===e&&n.push("2"),"TUE"===e&&n.push("3"),"WED"===e&&n.push("4"),"THU"===e&&n.push("5"),"FRI"===e&&n.push("6"),"SAT"===e&&n.push("7")}),n},notifications:n,showConfirmModal:j,toggleConfirmModal:()=>{_(!1)},onContinue:()=>E(C.values,(C.setErrors,C.resetForm)),defaultCourseName:y})});function oAe(){return(0,qt.jsx)(qt.Fragment,{children:(0,qt.jsx)(yp,{elevation:0,sx:{p:2.5},children:(0,qt.jsxs)(op,{sx:{display:"flex",alignItems:"center"},children:[(0,qt.jsx)(op,{sx:{display:"flex"},children:(0,qt.jsx)(lS,{width:51,height:51,variant:"rectangular",sx:{borderRadius:1}})}),(0,qt.jsxs)(op,{sx:{flexGrow:1,ml:{xs:1.5,lg:2.5}},children:[(0,qt.jsx)(Cf,{variant:"h6",component:"h6",children:(0,qt.jsx)(lS,{width:100})}),(0,qt.jsx)(Cf,{variant:"body1",component:"p",children:(0,qt.jsx)(lS,{})})]})]})})})}const aAe=e=>{const{cx:t,cy:n,fill:r,innerRadius:i,outerRadius:o,startAngle:a,endAngle:s,pieData:l,label:c}=e,d=null===l||void 0===l?void 0:l.reduce((e,t)=>e+t.value,0);return(0,qt.jsxs)("g",{children:[(0,qt.jsxs)("text",{x:t,y:n,dy:8,textAnchor:"middle",style:{fontWeight:600},children:[(0,qt.jsx)("tspan",{x:t,y:n-15,children:d||"NA"}),(0,qt.jsx)("tspan",{x:t,y:n+15,children:c})]}),(0,qt.jsx)(aie,{cx:t,cy:n,innerRadius:i,outerRadius:o,startAngle:a,endAngle:s,fill:r})]})};function sAe(e){let{pieData:t}=e;const n=["#363D9A","#B25C00"],[r,i]=We.useState(0),o=Math.PI/180;return(0,qt.jsx)(w2,{width:"100%",height:"100%",children:(0,qt.jsxs)(Ode,{width:200,height:200,children:[(0,qt.jsx)(Mde,{data:t,cx:"50%",cy:"50%",innerRadius:60,labelLine:!1,label:e=>{let{cx:t,cy:n,midAngle:r,innerRadius:i,outerRadius:a,percent:s}=e;const l=i+.4*(a-i),c=t+l*Math.cos(-r*o),d=n+l*Math.sin(-r*o);return(0,qt.jsx)("text",{x:c,y:d,fill:"white",textAnchor:c>t?"start":"middle",dominantBaseline:"central",children:"".concat((100*s).toFixed(0),"%")})},fill:"#8884d8",dataKey:"value",stroke:"none",isAnimationActive:!1,activeIndex:r,activeShape:(0,qt.jsx)(aAe,{pieData:t,label:"Active Courses"}),onClick:e=>(e=>{i(e)})(e.index),children:null===t||void 0===t?void 0:t.map((e,t)=>(0,qt.jsx)(Cre,{fill:n[t%n.length],index:t},"cell-".concat(t)))}),(0,qt.jsx)(w6,{}),(0,qt.jsx)(Q5,{})]})})}function lAe(e){let{bpAlertCount:t}=e;const n=[{name:"Resolved",value:null===t||void 0===t?void 0:t.bpResolvedCounts},{name:"Active",value:null===t||void 0===t?void 0:t.bpActiveCounts}],r=["#0FAB0F","#D32F2F"],i=Math.PI/180;return(0,qt.jsx)(w2,{width:"100%",height:"100%",children:(0,qt.jsxs)(Ode,{width:200,height:200,children:[(0,qt.jsx)(Mde,{data:n,cx:"50%",cy:"50%",labelLine:!1,label:e=>{let{cx:t,cy:n,midAngle:r,innerRadius:o,outerRadius:a,percent:s}=e;const l=o+.17*(a-o),c=t+l*Math.cos(-r*i),d=n+l*Math.sin(-r*i);return(0,qt.jsx)("text",{x:c,y:d,fill:"white",textAnchor:c>t?"start":"end",dominantBaseline:"central",children:"".concat((100*s).toFixed(0),"%")})},innerRadius:60,fill:"#8884d8",dataKey:"value",stroke:"none",isAnimationActive:!1,activeIndex:0,activeShape:(0,qt.jsx)(aAe,{pieData:n,label:"Alerts"}),children:n.map((e,t)=>(0,qt.jsx)(Cre,{fill:r[t%r.length]},"cell-".concat(t)))}),(0,qt.jsx)(w6,{}),(0,qt.jsx)(Q5,{})]})})}function cAe(e){let{glucoseAlertCount:t}=e;const n=[{name:"Resolved",value:null===t||void 0===t?void 0:t.glucoseResolvedCounts},{name:"Active",value:null===t||void 0===t?void 0:t.glucoseActiveCounts}],r=["#0FAB0F","#D32F2F"],i=Math.PI/180;return(0,qt.jsx)(w2,{width:"100%",height:"100%",children:(0,qt.jsxs)(Ode,{width:200,height:200,children:[(0,qt.jsx)(Mde,{data:n,cx:"50%",cy:"50%",labelLine:!1,label:e=>{let{cx:t,cy:n,midAngle:r,innerRadius:o,outerRadius:a,percent:s}=e;const l=o+.17*(a-o),c=t+l*Math.cos(-r*i),d=n+l*Math.sin(-r*i);return(0,qt.jsx)("text",{x:c,y:d,fill:"white",textAnchor:c>t?"start":"end",dominantBaseline:"central",children:"".concat((100*s).toFixed(0),"%")})},innerRadius:60,fill:"#8884d8",dataKey:"value",stroke:"none",isAnimationActive:!1,activeIndex:0,activeShape:(0,qt.jsx)(aAe,{pieData:n,label:"Alerts"}),children:n.map((e,t)=>(0,qt.jsx)(Cre,{fill:r[t%r.length]},"cell-".concat(t)))}),(0,qt.jsx)(w6,{}),(0,qt.jsx)(Q5,{})]})})}function dAe(e){let{activeProgram:t,order:n,orderBy:r,setOrder:o,setOrderBy:a,dataParameter:s,headCellsItemCourse:l,checkState:c,onCheck:d,isSelection:u,nodata:p,fetchPopulationList:h,pageDetails:m,headCellsItems:f,patientList:g,fetchPatientList:v,patientCount:x,patientVitals:y,schedule:b,fetchScheduleList:j,filterState:_,setFilterState:C,highlightedDays:w,handleConfirmModalToggle:S,bpAlertCount:A,glucoseAlertCount:k,searchText:T,setSearchText:E,patientCourseCell:M,fetchPatientCourseLastDate:O,countCompliant:R,countNonCompliant:P}=e;const{t:D}=Vg(),[N,L]=We.useState(new Date);return(0,qt.jsx)(op,{sx:{width:"100%"},children:(0,qt.jsxs)(Ff,{container:!0,spacing:2.5,children:[(0,qt.jsx)(Ff,{item:!0,xs:12,md:12,xl:12,style:{display:"flex",justifyContent:"flex-end"}}),(0,qt.jsxs)(Ff,{item:!0,xs:12,md:12,xl:7,children:[null!==t&&void 0!==t&&t.is_hospital?(0,qt.jsxs)(op,{className:"dashboard-tour-step0",children:[(0,qt.jsxs)(Ff,{container:!0,spacing:2.5,children:[(0,qt.jsx)(Ff,{item:!0,xs:12,md:6,lg:4,children:null!==x&&void 0!==x&&x.allCount||0===(null===x||void 0===x?void 0:x.allCount)?(0,qt.jsx)(yp,{component:Lo,elevation:0,to:"/rpm/program/".concat(null===t||void 0===t?void 0:t.code,"/patients?query=all"),sx:{p:2.5,bgcolor:"primary.theme.50",cursor:"pointer",height:"100%",display:"flex",alignItems:"center",textDecoration:"none"},children:(0,qt.jsxs)(op,{sx:{display:"flex",alignItems:"center"},children:[(0,qt.jsx)(op,{sx:{p:1,display:"flex",bgcolor:"primary.theme.100",color:"primary.theme.500",borderRadius:1,"& svg":{width:35,height:35}},children:(0,qt.jsx)(uc,{})}),(0,qt.jsxs)(op,{sx:{flexGrow:1,ml:{xs:1.5,lg:2}},children:[(0,qt.jsx)(Cf,{variant:"h5",component:"h5",fontWeight:600,children:null===x||void 0===x?void 0:x.allCount}),(0,qt.jsx)(Cf,{variant:"body1",component:"p",fontWeight:500,children:D("rpm_ALLPatients")})]})]})}):(0,qt.jsx)(oAe,{})}),(0,qt.jsx)(Ff,{item:!0,xs:12,md:6,lg:4,children:R>=0?(0,qt.jsx)(yp,{component:Lo,elevation:0,to:"/rpm/program/".concat(null===t||void 0===t?void 0:t.code,"/patientstatus?query=compliant"),sx:{p:2.5,bgcolor:"green.50",height:"100%",display:"flex",alignItems:"center",textDecoration:"none"},children:(0,qt.jsxs)(op,{sx:{display:"flex",alignItems:"center"},children:[(0,qt.jsx)(op,{sx:{p:1,display:"flex",bgcolor:"green.100",color:"green.700",borderRadius:1,"& svg":{width:35,height:35}},children:(0,qt.jsx)(pc,{})}),(0,qt.jsxs)(op,{sx:{flexGrow:1,ml:{xs:1.5,lg:2}},children:[(0,qt.jsx)(Cf,{variant:"h5",component:"h5",fontWeight:600,children:R}),(0,qt.jsx)(Cf,{variant:"body1",component:"p",fontWeight:500,children:D("rpm_Compliant")})]})]})}):(0,qt.jsx)(oAe,{})}),(0,qt.jsx)(Ff,{item:!0,xs:12,md:6,lg:4,children:P>=0?(0,qt.jsx)(yp,{component:Lo,elevation:0,to:"/rpm/program/".concat(null===t||void 0===t?void 0:t.code,"/patientstatus?query=noncompliant"),sx:{p:2.5,bgcolor:"red.50",height:"100%",display:"flex",alignItems:"center",textDecoration:"none"},children:(0,qt.jsxs)(op,{sx:{display:"flex",alignItems:"center"},children:[(0,qt.jsx)(op,{sx:{p:1,display:"flex",bgcolor:"red.100",color:"red.700",borderRadius:1,"& svg":{width:35,height:35}},children:(0,qt.jsx)(hc,{})}),(0,qt.jsxs)(op,{sx:{flexGrow:1,ml:{xs:1.5,lg:2}},children:[(0,qt.jsx)(Cf,{variant:"h5",component:"h5",fontWeight:600,children:P}),(0,qt.jsx)(Cf,{variant:"body1",component:"p",fontWeight:500,children:D("rpm_NonCompliant")})]})]})}):(0,qt.jsx)(oAe,{})})]}),(0,qt.jsxs)(Ff,{container:!0,spacing:2.5,sx:{mt:.01},children:[(0,qt.jsx)(Ff,{item:!0,xs:12,md:6,lg:4,children:(0,qt.jsxs)(yp,{variant:"outlined",children:[(0,qt.jsx)(op,{sx:{px:2.5,py:1.5,bgcolor:"transparent",borderBottom:"1px solid rgba(0, 0, 0, 0.12)"},children:(0,qt.jsx)(Ff,{container:!0,spacing:2,alignItems:"center",children:(0,qt.jsx)(Ff,{item:!0,xs:12,sm:!0,children:(0,qt.jsx)(Cf,{variant:"h6",component:"span",fontWeight:600,fontSize:18,children:D("rpm_Vitals")})})})}),(0,qt.jsx)(op,{sx:{p:0,fontSize:"14px"},children:(0,qt.jsx)(op,{sx:{height:"315px",paddingBottom:"8px"},children:null!==y&&void 0!==y&&y.vitalChartData?(0,Jo.isEmpty)(null===y||void 0===y?void 0:y.vitalChartData)?(0,qt.jsx)(op,{display:"flex",alignItems:"center",height:"100%",children:(0,qt.jsx)("img",{src:p,style:{display:"block",margin:"auto",maxWidth:"100%",maxHeight:"180px"}})}):(0,qt.jsx)(sAe,{pieData:y.vitalChartData}):(0,qt.jsx)(op,{width:"100%",height:"100%",alignSelf:"center",sx:{display:"flex"},children:(0,qt.jsx)(MM,{color:"primary",sx:{m:"auto"}})})})})]})}),(0,qt.jsx)(Ff,{item:!0,xs:12,md:6,lg:4,children:(0,qt.jsxs)(yp,{variant:"outlined",children:[(0,qt.jsx)(op,{sx:{px:2.5,py:1.5,bgcolor:"transparent",borderBottom:"1px solid rgba(0, 0, 0, 0.12)"},children:(0,qt.jsx)(Ff,{container:!0,spacing:2,alignItems:"center",children:(0,qt.jsxs)(Ff,{item:!0,xs:12,sm:!0,children:[(0,qt.jsx)(Cf,{variant:"h6",component:"span",fontWeight:600,fontSize:18,children:D("rpm_Alerts")})," ",(0,qt.jsxs)(Cf,{variant:"body2",component:"span",children:["(",D("rpm_bp"),")"]})]})})}),(0,qt.jsx)(op,{sx:{p:0,fontSize:"14px"},children:(0,qt.jsx)(op,{sx:{height:"315px",paddingBottom:"8px"},children:A?(0,Jo.isEmpty)(A)?(0,qt.jsx)(op,{display:"flex",alignItems:"center",height:"100%",children:(0,qt.jsx)("img",{src:p,style:{display:"block",margin:"auto",maxWidth:"100%",maxHeight:"180px"}})}):(0,qt.jsx)(lAe,{bpAlertCount:A}):(0,qt.jsx)(op,{width:"100%",height:"100%",alignSelf:"center",sx:{display:"flex"},children:(0,qt.jsx)(MM,{color:"primary",sx:{m:"auto"}})})})})]})}),(0,qt.jsx)(Ff,{item:!0,xs:12,md:6,lg:4,children:(0,qt.jsxs)(yp,{variant:"outlined",children:[(0,qt.jsx)(op,{sx:{px:2.5,py:1.5,bgcolor:"transparent",borderBottom:"1px solid rgba(0, 0, 0, 0.12)"},children:(0,qt.jsx)(Ff,{container:!0,spacing:2,alignItems:"center",children:(0,qt.jsxs)(Ff,{item:!0,xs:12,sm:!0,children:[(0,qt.jsx)(Cf,{variant:"h6",component:"span",fontWeight:600,fontSize:18,children:D("rpm_Alerts")})," ",(0,qt.jsxs)(Cf,{variant:"body2",component:"span",children:["(",D("rpm_glucose"),")"]})]})})}),(0,qt.jsx)(op,{sx:{p:0,fontSize:"14px"},children:(0,qt.jsx)(op,{sx:{height:"315px",paddingBottom:"8px"},children:k?(0,Jo.isEmpty)(k)?(0,qt.jsx)(op,{display:"flex",alignItems:"center",height:"100%",children:(0,qt.jsx)("img",{src:p,style:{display:"block",margin:"auto",maxWidth:"100%",maxHeight:"180px"}})}):(0,qt.jsx)(cAe,{glucoseAlertCount:k}):(0,qt.jsx)(op,{width:"100%",height:"100%",alignSelf:"center",sx:{display:"flex"},children:(0,qt.jsx)(MM,{color:"primary",sx:{m:"auto"}})})})})]})})]})]}):(0,qt.jsx)(Ff,{item:!0,xs:12,children:(0,qt.jsxs)(op,{py:6,bgcolor:"#fff",border:"1px solid rgba(0, 0, 0, 0.12)",borderRadius:"4px",height:"486px",children:[(0,qt.jsx)("img",{src:GC,style:{display:"block",margin:"auto",width:"100%",maxWidth:"300px",height:"auto"},alt:"No Data Found"}),(0,qt.jsx)(op,{px:2,color:"#3f51b5",mt:2,display:"flex",justifyContent:"center",textAlign:"center",children:D("rpm_To_Explore_This")})]})}),(0,qt.jsxs)(Ff,{container:!0,spacing:2.5,sx:{mt:.01},children:[!1,(null===t||void 0===t?void 0:t.is_hospital)&&(0,qt.jsx)(Ff,{item:!0,xs:!0,md:12,lg:12,children:(0,qt.jsxs)(yp,{sx:{height:{xs:"auto",sm:"486px"}},variant:"outlined",className:"dashboard-tour-step2",children:[(0,qt.jsx)(op,{sx:{px:2.5,py:1.5,bgcolor:"transparent",borderBottom:"1px solid rgba(0, 0, 0, 0.12)"},children:(0,qt.jsxs)(Ff,{container:!0,spacing:2,alignItems:"center",children:[(0,qt.jsx)(Ff,{item:!0,children:(0,qt.jsx)(Cf,{variant:"h6",component:"span",fontWeight:600,fontSize:18,children:D("rpm_ALLCourses")})}),(0,qt.jsx)(Ff,{item:!0,sm:!0,children:(0,qt.jsx)(Kz,{initialValues:{courseName:""},children:()=>(0,qt.jsx)(nH,{children:(0,qt.jsx)(op,{sx:{borderRadius:"8px",display:"flex",justifyContent:"end"},className:"course_filter",children:(0,qt.jsx)(op,{py:.2,maxWidth:"300px",children:(0,qt.jsx)(tH,{as:qj,fullWidth:!0,variant:"outlined",name:"courseName",value:_.courseName,placeholder:D("message:rpm_SearchTital"),onChange:e=>{C(t=>(0,i.A)((0,i.A)({},t),{},{courseName:e.target.value}))},endAdornment:(0,qt.jsxs)(tw,{position:"end",children:[_.courseName&&(0,qt.jsx)(sy,{title:D("rpm_Reset"),placement:"top",children:(0,qt.jsx)(wh,{size:"small",onClick:()=>{m.current_page=1,C({courseName:""}),j({courseName:""})},children:(0,qt.jsx)(J_.A,{})})}),(0,qt.jsx)(sy,{title:D("rpm_Search"),placement:"top",children:(0,qt.jsx)(wh,{type:"submit",size:"small",onClick:()=>{m.current_page=1,j(_)},children:(0,qt.jsx)(qC.A,{})})})]}),sx:{bgcolor:"white"}})})})})})})]})}),(0,qt.jsxs)(op,{sx:{p:2.5},height:"100%",className:"tabelHeight",children:[(0,qt.jsx)(UT,{order:n,orderBy:r,setOrder:o,setOrderBy:a,data:b,headCells:l,dataParameter:s,selected:c,setSelected:d,isSelection:u,noDataImage:p,fetchList:h,pageDetails:m,className:"theme_scroll",children:null===b||void 0===b?void 0:b.slice(0,4).map(e=>{var n,r;return(0,qt.jsxs)(cw,{children:[(0,qt.jsx)(gw,{children:(0,qt.jsx)(Lo,{className:"linkClr",to:"/rpm/program/".concat(null===t||void 0===t?void 0:t.code,"/course/").concat(e.id),children:null===e||void 0===e?void 0:e.name})}),(0,qt.jsx)(gw,{children:null===e||void 0===e||null===(n=e.mandate)||void 0===n||null===(r=n.timing)||void 0===r?void 0:r.length}),(0,qt.jsx)(gw,{children:D("rpm_".concat(null===e||void 0===e?void 0:e.vital_name))}),(0,qt.jsx)(gw,{children:null===e||void 0===e?void 0:e.duration}),(0,qt.jsx)(gw,{children:null===e||void 0===e?void 0:e.total_patient_attached})]},e.id)})}),(0,qt.jsx)(op,{display:"flex",justifyContent:"end",mt:.4,children:(0,qt.jsx)(Lo,{className:"linkClr",to:"/rpm/program/".concat(null===t||void 0===t?void 0:t.code,"/course"),children:"See All"})})]})]})})]})]}),(0,qt.jsx)(Ff,{item:!0,xs:12,md:12,xl:5,children:(0,qt.jsxs)(yp,{sx:{height:{xs:"auto",sm:"486px"}},variant:"outlined",className:"dashboard-tour-step1",children:[(0,qt.jsx)(op,{sx:{px:2.5,py:1.5,bgcolor:"transparent",borderBottom:"1px solid rgba(0, 0, 0, 0.12)"},children:(0,qt.jsxs)(Ff,{container:!0,spacing:2,alignItems:"center",children:[(0,qt.jsx)(Ff,{item:!0,children:(0,qt.jsx)(Cf,{variant:"h6",component:"span",fontWeight:600,fontSize:18,children:D("rpm_ALLPatients")})}),(0,qt.jsx)(Ff,{item:!0,sm:!0,className:"course_filter",sx:{"& .MuiOutlinedInput-root":{bgcolor:"white"},display:"flex",justifyContent:"end"},children:(0,qt.jsx)(op,{maxWidth:"300px",children:(0,qt.jsx)(WZ,{fetchListFunction:v,searchText:T,setSearchText:E,pageDetails:m,placeHolder:D("rpm_SearchByName"),searchInField:!0})})})]})}),(0,qt.jsxs)(op,{sx:{p:2.5},height:"100%",className:"tabelHeight",children:[(0,qt.jsx)(UT,{order:n,orderBy:r,setOrder:o,setOrderBy:a,data:g,headCells:f,dataParameter:s,selected:c,setSelected:d,isSelection:u,noDataImage:p,fetchList:v,pageDetails:m,skeletonVrows:6,stickyHeader:!0,scrollHeight:500,className:"theme_scroll",children:(g||[]).map(e=>(0,qt.jsxs)(cw,{hover:!0,selected:c.includes(e.id.toString()),children:[(0,qt.jsx)(gw,{children:null!==t&&void 0!==t&&t.is_hospital?(0,qt.jsx)(Lo,{className:"linkClr",to:"/rpm/program/".concat(null===t||void 0===t?void 0:t.code,"/patients/").concat(e.id,"/dashboard"),children:e.first_name+" "+e.last_name}):(0,qt.jsx)(Lo,{className:"linkClr",to:"/rpm/program/".concat(null===t||void 0===t?void 0:t.code,"/patients/").concat(e.id,"/history"),children:e.first_name+" "+e.last_name})}),M(e)]},e.id))}),(0,qt.jsx)(op,{display:"flex",justifyContent:"end",mt:.4,children:(0,qt.jsx)(Lo,{className:"linkClr",to:"/rpm/program/".concat(null===t||void 0===t?void 0:t.code,"/patients"),children:"See All"})})]})]})})]})})}sAe.defaultProps={pieData:[]},lAe.defaultProps={data:[],bpAlertCount:{}},cAe.defaultProps={data:[],glucoseAlertCount:{}},dAe.defaultProps={headCellsItemsPopCond:[],headCellsItemsOxy:[],pageDetails:{},order:"",orderBy:"",setOrder:()=>{},setOrderBy:()=>{},dataParameter:"",checkState:"",onCheck:()=>{},isSelection:"",nodata:"",headCellsItems:[],patientList:{},fetchPopulationList:()=>{},fetchPatientList:()=>{},patientCount:{},patientVitals:{},schedule:[],fetchScheduleList:()=>{},filterState:{},setFilterState:()=>{},activeProgram:{},highlightedDays:[],handleConfirmModalToggle:()=>{},bpAlertCount:{},glucoseAlertCount:{},searchText:()=>{},setSearchText:()=>{},patientCourseCell:()=>{},fetchPatientCourseLastDate:()=>{},getCsv:()=>{},countCompliant:0,countNonCompliant:0};const uAe=dAe,pAe=["children","onClose"],hAe=e=>{const{children:t,onClose:n}=e,r=Ko(e,pAe);return(0,qt.jsxs)(fC,(0,i.A)((0,i.A)({sx:{m:0,p:2}},r),{},{children:[t,n?(0,qt.jsx)(wh,{"aria-label":"close",onClick:n,sx:{position:"absolute",right:8,top:8,color:e=>e.palette.grey[500]},children:(0,qt.jsx)(J_.A,{})}):null]}))};const mAe=function(e){let{options:t,date:n,openModal:r,onCloseModal:i,PatientListCompo:o}=e;return(0,qt.jsxs)(cC,{fullWidth:!0,maxWidth:"md",open:r,onClose:i,scroll:"paper",children:[(0,qt.jsxs)(hAe,{sx:{px:4},onClose:i,children:[t.primaryText,(null===n||void 0===n?void 0:n.data)&&(0,qt.jsx)(Cf,{component:"p",variant:"subtitle2",children:sa()(null===n||void 0===n?void 0:n.data).format("DD MMM YYYY")})]}),(0,qt.jsx)(eg,{}),(0,qt.jsx)(bC,{children:(0,qt.jsx)(Ff,{container:!0,spacing:2,children:(0,qt.jsx)(Ff,{item:!0,xs:!0,children:(0,qt.jsx)(op,{mb:3,children:(0,qt.jsx)(o,{})})})})})]})},fAe=["content"],gAe=["content"];function vAe(e){let{activeProgram:t}=e;const n=Nt(),r=wt(cu),o=wt(bu),{enqueueSnackbar:a}=hi(),s=!("true"===us(o,"user_principal.attributes.skip_tour[0]","")),{t:l}=Vg(),[c,d]=We.useState(""),[u,p]=(0,We.useState)("desc"),[h,m]=(0,We.useState)("updated_at"),[f,g]=We.useState(null),[v,x]=(0,We.useState)({}),[y,b]=(0,We.useState)({}),[j,_]=(0,We.useState)([]),[C,w]=(0,We.useState)(null),[S,A]=(0,We.useState)([]),[k,T]=(0,We.useState)([]),[E,M]=(0,We.useState)((0,i.A)({},dd)),[O,R]=We.useState({courseName:"",vital:"",duration:""}),[P,D]=We.useState({open:!1,data:{}}),[N,L]=We.useState(null),[I,F]=We.useState(null),[$,B]=We.useState(""),[z,H]=We.useState(0),[W,U]=We.useState(0),V=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};D((0,i.A)((0,i.A)({},P),{},{open:!P.open,data:e}))},G=e=>{if(Array.isArray(e))return _(e.map(e=>e.toString()));const t=e.target.name;j.includes(t)?_(j.filter(e=>e!==t)):_(e=>[...e,t])},q=e=>e?(0,qt.jsx)(dM,{severity:"error",icon:!1,sx:e=>({py:0,px:1,display:"inline-flex",fontSize:e.spacing(1.5),"& .MuiAlert-message":{p:e.spacing(.5,0)}}),children:(0,qt.jsx)("strong",{children:l("rpm_".concat(e))})}):(0,qt.jsx)(dM,{severity:"success",icon:!1,sx:e=>({py:0,px:1,display:"inline-flex",fontSize:e.spacing(1.5),"& .MuiAlert-message":{p:e.spacing(.5,0)}}),children:(0,qt.jsx)("strong",{children:"Compliant"})}),Y=[{id:"patient_name",label:l("rpm_PatientName"),isSort:!1,sortProperty:"first_name"},{id:"course",label:l("rpm_Courses"),isSort:!1,sortProperty:"course"},{id:"vital",label:l("rpm_Vital"),isSort:!1,sortProperty:"vital"},{id:"status",label:l("rpm_Status"),isSort:!1,sortProperty:"status"}],Z=[...Y,{id:"dob",label:l("rpm_DOB"),isSort:!0,sortProperty:"dob"},{id:"mobile",label:l("rpm_Mobile"),isSort:!0,sortProperty:"mobile"}],K=[{id:"course",label:l("rpm_Schedule"),isSort:!1,sortProperty:"course"},{id:"mandates",label:l("rpm_Mandates"),isSort:!1,sortProperty:"course"},{id:"vital",label:l("rpm_Vital"),isSort:!1,sortProperty:"vital"},{id:"duration",label:l("rpm_Duration"),isSort:!1,sortProperty:"duration"},{id:"patient",label:l("rpm_PatientsEnrolled"),isSort:!1,sortProperty:"patient"}],X=e=>{var t,n,r;return(0,qt.jsxs)(We.Fragment,{children:[(0,qt.jsx)(gw,{children:cs(null===e||void 0===e?void 0:e.course_name)?"NA":null===e||void 0===e||null===(t=e.course_name)||void 0===t?void 0:t.map((t,n)=>(0,qt.jsx)(Cf,{variant:"body2",mt:n===(null===e||void 0===e?void 0:e.course_status.length)-1&&.5,children:t},n))}),(0,qt.jsx)(gw,{children:cs(null===e||void 0===e?void 0:e.course_vital)?"NA":null===e||void 0===e||null===(n=e.course_vital)||void 0===n?void 0:n.map((t,n)=>(0,qt.jsx)(Cf,{variant:"body2",mt:n===(null===e||void 0===e?void 0:e.course_status.length)-1&&.5,children:l("rpm_".concat(t))},n))}),(0,qt.jsx)(gw,{children:cs(null===e||void 0===e?void 0:e.course_status)?"NA":null===e||void 0===e||null===(r=e.course_status)||void 0===r?void 0:r.map((t,n)=>(0,qt.jsx)(op,{mt:n===(null===e||void 0===e?void 0:e.course_status.length)-1&&.5,children:q(t)},n))})]})},Q=async e=>{try{const{data:r}=await n(al((0,i.A)((0,i.A)({sort_by:h,sort_order:u},E),{},{filterState:{patientName:e},program_code:null===t||void 0===t?void 0:t.code}))),o=r||{},{content:a}=o,s=Ko(o,fAe),l=e=>{const t=null===a||void 0===a?void 0:a.map(t=>(0,i.A)((0,i.A)({},t),{},{course_info:cs(e[t.id])?[]:e[t.id]})),n=null===t||void 0===t?void 0:t.map(e=>(0,i.A)((0,i.A)({},e),{},{course_name:e.course_info.map(e=>e.course_name),course_vital:e.course_info.map(e=>e.vital_name),course_status:e.course_info.map(e=>e.status)}));g(n)};await ee(a,l),M(e=>(0,i.A)((0,i.A)({},e),{},{last_page:s.last_page,current_page:s.current_page,from:s.from,per_page:s.per_page,to:s.to,total:s.total}))}catch(r){console.log(r)}},J=async e=>{try{const{data:r}=await n(((e,t)=>async n=>{n(na(!0));try{const n="".concat(la.program,"/").concat(e,"/alerts?vital=").concat(t);return await Iu(n,{})}catch(r){return r}finally{n(na(!1))}})(null===t||void 0===t?void 0:t.code,e));if("bp"===e){const e=r.all_alerts_count||r.all_resolved_alerts_count?{bpAlertCounts:r.all_alerts_count,bpResolvedCounts:r.all_resolved_alerts_count,bpActiveCounts:r.all_active_alerts_count}:{};L(e)}if("glucose"===e){const e=r.all_alerts_count||r.all_resolved_alerts_count?{glucoseAlertCounts:r.all_alerts_count,glucoseResolvedCounts:r.all_resolved_alerts_count,glucoseActiveCounts:r.all_active_alerts_count}:{};F(e)}}catch(r){console.log(r)}},ee=async(e,r)=>{const i=null===e||void 0===e?void 0:e.map(e=>e.id);try{const{data:e}=await n(ul({patientIds:i,programCode:null===t||void 0===t?void 0:t.code})),o=Object.keys(e).map(t=>{if(!cs(e[t]))return{id:t,vital:e[t].map(e=>e.vital_name),course:e[t].map(e=>e.course_name),status:e[t].map(e=>e.status)}}),a=o.filter(e=>{var t;return null===(t=e.vital)||void 0===t?void 0:t.includes("bp")}).length,s=o.filter(e=>{var t;return null===(t=e.vital)||void 0===t?void 0:t.includes("glucose")}).length,c={vitalChartData:a||s?[{name:l("rpm_BloodPressure"),value:a},{name:l("rpm_BloodGlucose"),value:s}]:[]};b(c),r(e)}catch(o){console.log(o)}},te=async function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:O;const r=(0,i.A)({sort_by:h,sort_order:u},E);try{const{data:o}=await n(tbe(null===t||void 0===t?void 0:t.code,r,e)),a=o||{},{content:s}=a,l=Ko(a,gAe);w(s),M(e=>(0,i.A)((0,i.A)({},e),{},{last_page:l.last_page,current_page:l.current_page,from:l.from,per_page:l.per_page,to:l.to,total:l.total}))}catch(o){console.log(o)}},ne=async e=>{const r={status:e,programId:null===t||void 0===t?void 0:t.code};try{const{data:t}=await n(dl(r));if("compliant"===e){var i;const e=null===(i=Object.keys(t))||void 0===i?void 0:i.length;U(e)}else{var o;const e=null===(o=Object.keys(t))||void 0===o?void 0:o.length;H(e)}}catch(a){console.log(a)}},re=async function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const r=cs(e)?sa()().startOf("month").valueOf():e.start_date,i=cs(e)?sa()().endOf("month").valueOf():e.end_date;try{var o;const{data:e}=await n(((e,t,n)=>async r=>{r(na(!0));try{const r="".concat(la.schedules,"/-/").concat(e,"/expiring-patient-course?startDate=").concat(t,"&endDate=").concat(n);return await Iu(r)}finally{r(na(!1))}})(null===t||void 0===t?void 0:t.code,r,i)),a=null===(o=e||[])||void 0===o?void 0:o.map(e=>{if(null!==e.end_date)return sa()(e.end_date).format("DD/MM/YYYY")}).filter(e=>void 0!==e),s=[...new Set(a)];A(s)}catch(a){console.log(a)}};We.useEffect(()=>{n(NC({activeMenuItem:"prog_dashboard"}))},[t]),We.useEffect(()=>{r&&!cs(t)&&(Q(),(async()=>{try{const{data:e}=await n(al({per_page:99999,program_code:null===t||void 0===t?void 0:t.code})),{content:r}=e||{},i=null===r||void 0===r?void 0:r.filter(e=>{var t;return null===e||void 0===e||null===(t=e.flags)||void 0===t?void 0:t.includes("ACTIVE_ALERTS")}),o=null===r||void 0===r?void 0:r.filter(e=>{var t;return!(null!==e&&void 0!==e&&null!==(t=e.flags)&&void 0!==t&&t.includes("NON_COMPLIANT"))}),a=null===r||void 0===r?void 0:r.filter(e=>{var t;return null===e||void 0===e||null===(t=e.flags)||void 0===t?void 0:t.includes("NON_COMPLIANT")});x({allCount:null===r||void 0===r?void 0:r.length,activeCount:null===o||void 0===o?void 0:o.length,alertCount:null===i||void 0===i?void 0:i.length,nonActiveCount:null===a||void 0===a?void 0:a.length})}catch(e){console.log(e)}})(),te(),J("bp"),J("glucose"),re())},[r,t]),We.useEffect(()=>{r&&!cs(t)&&(ne("compliant"),ne("non-compliant"))},[r,t]),We.useEffect(()=>{P.open&&(async()=>{const e=await([{id:1,name:"a"},{id:2,name:"b"}]);T(e)})()},[P]);return(0,qt.jsxs)(qt.Fragment,{children:[(0,qt.jsx)(uAe,{activeProgram:t,order:u,orderBy:h,setOrder:p,setOrderBy:m,dataParameter:"id",checkState:j,onCheck:G,isSelection:!1,nodata:GC,pageDetails:E,patientList:f,headCellsItems:Y,headCellsItemCourse:K,fetchPatientList:Q,getNonComplaints:q,patientCount:v,patientVitals:y,schedule:C,filterState:O,setFilterState:R,fetchScheduleList:te,highlightedDays:S,handleConfirmModalToggle:V,bpAlertCount:N,glucoseAlertCount:I,searchText:$,setSearchText:B,patientCourseCell:X,fetchPatientCourseLastDate:re,countCompliant:W,countNonCompliant:z,getCsv:async()=>{await n(async e=>{try{const e="".concat(ua.medical,"/medicine-info/download-csv"),{data:t}=await Iu(e);return void window.open(t)}finally{e(na(!1))}}),a(l("message:rpm_downloadStart"),{variant:"success"})}}),(0,qt.jsx)(mAe,{date:P,openModal:null===P||void 0===P?void 0:P.open,onCloseModal:V,PatientListCompo:()=>null===f?(0,qt.jsx)(SS,{}):(0,qt.jsx)(op,{children:(0,qt.jsx)(UT,{order:u,orderBy:h,setOrder:p,setOrderBy:m,data:f,headCells:Z,dataParameter:"id",selected:j,setSelected:G,isSelection:!1,noDataImage:GC,fetchList:Q,pageDetails:E,skeletonVrows:6,stickyHeader:!0,scrollHeight:710,className:"theme_scroll",children:(f||[]).map(e=>(0,qt.jsxs)(cw,{hover:!0,selected:j.includes(e.id.toString()),sx:{"&:last-child td, &:last-child th":{border:0}},children:[(0,qt.jsx)(gw,{children:(0,qt.jsx)(Lo,{className:"linkClr",to:"/rpm/program/".concat(null===t||void 0===t?void 0:t.code,"/patients/").concat(e.id,"/dashboard"),children:e.first_name+" "+e.last_name})}),X(e),(0,qt.jsx)(gw,{children:e.birth_date}),(0,qt.jsx)(gw,{children:e.mobile})]},e.id))})}),options:{primaryText:"Showing Data of Date"}}),!cs(o)&&(0,qt.jsxs)(qt.Fragment,{children:[(0,qt.jsx)(zZ,{isTour:s,path:"programDashboardTour",setRenderer:d}),(0,qt.jsx)("input",{type:"hidden",id:"rerenderer",value:c})]})]})}vAe.defaultProps={activeProgram:{}};const xAe=vAe,yAe=e=>{let{userData:t,activeProgram:n,order:r,orderBy:i,setOrder:o,setOrderBy:a,headCellsItems:s,initialHeadcells:l,dataParameter:c,checkState:d,onCheck:u,isSelection:p,nodata:h,viewButton:m,patientList:f,patientCourseCell:g,getPatientList:v}=e;const{t:x}=Vg(),y=so(),b=[{name:x("rpm_RPM"),url:ld.DOCTOR.PROGRAM},{name:null===n||void 0===n?void 0:n.display_name,url:""}];return(0,qt.jsxs)(qt.Fragment,{children:[(0,qt.jsxs)(op,{sx:{width:"100%"},children:[(0,qt.jsx)(op,{mb:2.5,children:(0,qt.jsx)(BH,{labels:b})}),(0,qt.jsx)(op,{sx:{mb:2.5},children:(0,qt.jsxs)(Ff,{container:!0,spacing:2,alignItems:"center",children:[(0,qt.jsx)(Ff,{item:!0,xs:!0,children:(0,qt.jsx)(Cf,{variant:"h5",gutterBottom:!0,component:"h5",children:x("rpm_Patients")})}),(0,qt.jsx)(Ff,{item:!0,children:(0,qt.jsx)(xh,{variant:"contained",disableElevation:!0,color:"primary",onClick:()=>y("/rpm/program/".concat(n.code,"/patients")),children:x("rpm_AllPatients")})})]})})]}),(0,qt.jsx)(Ff,{container:!0,spacing:2.5,children:(0,qt.jsx)(Ff,{item:!0,xs:12,children:(0,qt.jsx)(op,{children:(0,qt.jsx)(UT,{order:r,orderBy:i,setOrder:o,setOrderBy:a,data:f,headCells:null===s||void 0===s?void 0:s.filter(e=>l.includes(e.id)),dataParameter:c,selected:d,setSelected:u,isSelection:p,noDataImage:h,fetchList:v,skeletonVrows:6,className:"theme_scroll",children:Array.isArray(f)&&(null===f||void 0===f?void 0:f.map(e=>{const{years:r}=vs(null===e||void 0===e?void 0:e.birth_date);return(0,qt.jsxs)(cw,{sx:{"&:last-child td, &:last-child th":{border:0}},children:[(null===l||void 0===l?void 0:l.includes("patient_name"))&&(0,qt.jsx)(gw,{children:(0,qt.jsx)(Lo,{className:"linkClr",to:"/rpm/program/".concat(n.code,"/patients/").concat(e.patient_id,"/dashboard"),children:e.first_name+" "+e.last_name})}),l.includes("email")&&(0,qt.jsxs)(gw,{width:300,children:[" ",(0,qt.jsx)(Lo,{to:"mailto:".concat(e.email),children:e.email})]}),l.includes("age")&&(0,qt.jsxs)(gw,{width:300,children:[" ",r||"NA"]}),l.includes("mobile_no")&&(0,qt.jsx)(gw,{children:(null===e||void 0===e?void 0:e.mobile)||"NA"}),g(e),(0,qt.jsx)(gw,{children:(null===t||void 0===t?void 0:t.showViewPatientBtn)&&m(e)})]},null===e||void 0===e?void 0:e.patient_id)}))})})})})]})},bAe=e=>{let{activeProgram:t}=e;const{t:n}=Vg(),r=Nt(),i=so(),o=wt(cu),[a,s]=We.useState(null),{query:l}=js(),[c,d]=(0,We.useState)("desc"),[u,p]=(0,We.useState)("created_at"),[h,m]=(0,We.useState)([]),f=[{id:"patient_name",label:n("rpm_PatientName"),isSort:!0,sortProperty:"first_name"},{id:"email",label:n("rpm_Email"),isSort:!0,sortProperty:"email"},{id:"age",label:n("rpm_Age"),isSort:!0,sortProperty:"dob"},{id:"mobile_no",label:n("rpm_MobileNumber"),isSort:!0,sortProperty:"mobile_no"},{id:"courses",label:n("rpm_Schedules"),isSort:!0,sortProperty:"courses"},{id:"vital",label:n("rpm_Vitals"),isSort:!0,sortProperty:"vital"},{id:"compliance",label:n("rpm_Status"),isSort:!0,sortProperty:"compliance"},{id:"actions",label:n("rpm_Actions"),isSort:!1,sortProperty:"actions"}],[g,v]=We.useState(cs($o.getHeadCellsPatient())?["patient_name","email","age","mobile_no","courses","vital","compliance","actions"]:$o.getHeadCellsPatient()),x=async e=>{const n={status:e,programId:null===t||void 0===t?void 0:t.code};try{const{data:e}=await r(dl(n)),t=[];Object.keys(e).forEach(n=>{const r=e[n];t.push(r)});const i=(e=>{const t=new Map,n=e=>{if(e&&e.patient_id){const{patient_id:n,schedules:r,non_compliance_info:i}=e;t.has(n)||t.set(n,{patient_id:n,first_name:e.first_name,last_name:e.last_name,mobile:e.mobile,birth_date:e.birth_date,email:e.email,schedule_name:[],schedule_vital:[],schedule_status:[]});const o=(null===r||void 0===r?void 0:r.name)||"NA",a=(null===r||void 0===r?void 0:r.vital)||"NA",s=(null===i||void 0===i?void 0:i.status)||"NA",l=t.get(n);l.schedule_name.push(o),l.schedule_vital.push(a),l.schedule_status.push(s)}};return e.forEach(e=>{Array.isArray(e)?e.forEach(e=>{n(e)}):n(e)}),Array.from(t.values())})(t);s(i)}catch(i){console.log(i)}},y=e=>"NON_COMPLIANT"===e?(0,qt.jsx)(dM,{severity:"error",icon:!1,sx:e=>({py:0,px:1,display:"inline-flex",fontSize:e.spacing(1.5),"& .MuiAlert-message":{p:e.spacing(.5,0)}}),children:(0,qt.jsx)("strong",{children:n("rpm_".concat(e))})}):(0,qt.jsx)(dM,{severity:"success",icon:!1,sx:e=>({py:0,px:1,display:"inline-flex",fontSize:e.spacing(1.5),"& .MuiAlert-message":{p:e.spacing(.5,0)}}),children:(0,qt.jsx)("strong",{children:n("rpm_Compliant")})});return We.useEffect(()=>{r(NC({activeMenuItem:"all_patients"}))},[t]),We.useEffect(()=>{o&&!cs(t)&&x(l)},[o,t]),(0,qt.jsx)(qt.Fragment,{children:(0,qt.jsx)(yAe,{userData:null===t||void 0===t?void 0:t.permissions,headCellsItems:f,setHeadcells:function(e){v(e),$o.setHeadCellsPatient(e)},initialHeadcells:g,activeProgram:t,order:c,orderBy:u,setOrder:d,setOrderBy:p,dataParameter:"id",checkState:h,onCheck:e=>{if(Array.isArray(e))return m(e.map(e=>e));const t=e.target.name;h.includes(t)?m(h.filter(e=>e!==t)):m(e=>[...e,t])},isSelection:!1,nodata:GC,viewButton:e=>(0,qt.jsx)(sy,{title:n("rpm_view"),children:(0,qt.jsx)(wh,{"data-id":e.patient_id,color:"primary",onClick:()=>i("/rpm/program/".concat(t.code,"/patients/").concat(e.patient_id,"/dashboard")),children:(0,qt.jsx)(gc,{fontSize:"small",sx:{width:16,height:16}})})}),patientList:a,patientCourseCell:e=>{var t,r,i;return(0,qt.jsxs)(We.Fragment,{children:[g.includes("courses")&&(0,qt.jsx)(gw,{children:cs(null===e||void 0===e?void 0:e.schedule_name)?"NA":null===e||void 0===e||null===(t=e.schedule_name)||void 0===t?void 0:t.map((t,n)=>(0,qt.jsx)(Cf,{variant:"body2",mt:n===(null===e||void 0===e?void 0:e.schedule_name.length)-1&&.5,children:t},n))}),g.includes("vital")&&(0,qt.jsx)(gw,{children:cs(null===e||void 0===e?void 0:e.schedule_vital)?"NA":null===e||void 0===e||null===(r=e.schedule_vital)||void 0===r?void 0:r.map((t,r)=>(0,qt.jsx)(Cf,{variant:"body2",mt:r===(null===e||void 0===e?void 0:e.schedule_vital.length)-1&&.5,children:n("rpm_".concat(t))},r))}),g.includes("compliance")&&(0,qt.jsx)(gw,{children:cs(null===e||void 0===e?void 0:e.schedule_status)?"NA":null===e||void 0===e||null===(i=e.schedule_status)||void 0===i?void 0:i.map((t,n)=>(0,qt.jsx)(op,{mt:n===(null===e||void 0===e?void 0:e.schedule_status.length)-1&&.5,children:y(t)},n))})]})},getPatientList:x})})};function jAe(e){var t,n,r,i,o,a,s,l,c;let{activeProgram:d,addNotifications:u,notifications:p}=e;const{t:h}=Vg(),m=[{name:h("rpm_RPM"),url:ld.DOCTOR.PROGRAM},{name:null===d||void 0===d?void 0:d.display_name,url:"".concat(ld.DOCTOR.PROGRAM,"/").concat(null===d||void 0===d?void 0:d.code,"/patients")},{name:h("rpm_Notifications"),url:""}],f={otp_notifications:!0,email_reading_reminder:!1,email_missed_mandate:!1,email_non_compliant_user:!1,push_reading_reminder:null===p||void 0===p||null===(t=p.push_notification)||void 0===t?void 0:t.reading_reminder,push_missed_mandate:null===p||void 0===p||null===(n=p.push_notification)||void 0===n?void 0:n.missed_mandate,push_non_compliant_user:!1,course:null===p||void 0===p||null===(r=p.push_notification)||void 0===r?void 0:r.course,prescriptions:!(null===d||void 0===d||!d.is_hospital)&&(null===p||void 0===p||null===(i=p.push_notification)||void 0===i?void 0:i.prescriptions),medical_history:null===p||void 0===p||null===(o=p.push_notification)||void 0===o?void 0:o.medical_history,rule:!(null===d||void 0===d||!d.is_hospital)&&(null===p||void 0===p||null===(a=p.push_notification)||void 0===a?void 0:a.rule),profile:null===p||void 0===p||null===(s=p.push_notification)||void 0===s?void 0:s.profile,notes:!(null===d||void 0===d||!d.is_hospital)&&(null===p||void 0===p||null===(l=p.push_notification)||void 0===l?void 0:l.notes),welcome_message:null===p||void 0===p||null===(c=p.whatsapp_notification)||void 0===c?void 0:c.welcome_message};return(0,qt.jsxs)(qt.Fragment,{children:[(0,qt.jsx)(Dye,{mb:2.5,children:(0,qt.jsx)(BH,{labels:m})}),(0,qt.jsx)(yH,{variant:"outlined",children:(0,qt.jsx)(Kz,{initialValues:f,onSubmit:u,enableReinitialize:!0,children:e=>{let{values:t}=e;return(0,qt.jsx)(qt.Fragment,{children:(0,qt.jsxs)(nH,{children:[(0,qt.jsx)(nW,{sx:{py:1.5,bgcolor:"primary.theme.50"},title:(0,qt.jsx)(qt.Fragment,{children:(0,qt.jsx)(Dye,{children:(0,qt.jsxs)(Ff,{container:!0,spacing:2,alignItems:"center",children:[(0,qt.jsx)(Ff,{item:!0,xs:!0,children:(0,qt.jsx)(Cf,{variant:"h6",gutterBottom:!0,fontWeight:500,m:0,children:h("rpm_Notifications")})}),(0,qt.jsx)(Ff,{item:!0,children:(0,qt.jsx)(xh,{variant:"contained",color:"primary",disableElevation:!0,type:"submit",children:h("rpm_Save")})})]})})})}),(0,qt.jsxs)(wH,{sx:{py:0},children:[(0,qt.jsxs)(Ff,{container:!0,spacing:2,py:2,children:[(0,qt.jsx)(Ff,{item:!0,xs:4,children:(0,qt.jsx)(Cf,{fontWeight:600,children:h("rpm_SMSNotifications")})}),(0,qt.jsxs)(Ff,{item:!0,xs:8,children:[(0,qt.jsx)(wE,{required:!0,control:(0,qt.jsx)(tH,{as:Dw,type:"checkbox",disabled:t.otp_notifications,id:"otp_notifications",name:"otp_notifications"}),label:h("rpm_OTPLogin"),sx:{"& .MuiFormControlLabel-label":{fontWeight:"600"}}}),(0,qt.jsx)(Cf,{pl:3.5,pb:1,children:h("rpm_OTPLoginDescription")})]})]}),(0,qt.jsx)(eg,{}),(0,qt.jsxs)(Ff,{container:!0,spacing:2,py:2,children:[(0,qt.jsx)(Ff,{item:!0,xs:4,children:(0,qt.jsx)(Cf,{fontWeight:600,children:h("rpm_EmailNotifications")})}),(0,qt.jsxs)(Ff,{item:!0,xs:8,children:[(0,qt.jsx)(wE,{required:!0,control:(0,qt.jsx)(tH,{as:Dw,disabled:!0,type:"checkbox",id:"email_reading_reminder",name:"email_reading_reminder"}),label:h("rpm_ReadingReminder"),sx:{"& .MuiFormControlLabel-label":{fontWeight:"600"}}}),(0,qt.jsx)(Cf,{pl:3.5,pb:1,children:h("rpm_EmailReadingReminderDescription")}),(0,qt.jsx)(wE,{required:!0,control:(0,qt.jsx)(tH,{as:Dw,disabled:!0,type:"checkbox",id:"email_missed_mandate",name:"email_missed_mandate"}),label:h("rpm_MissedMandate"),sx:{"& .MuiFormControlLabel-label":{fontWeight:"600"}}}),(0,qt.jsx)(Cf,{pl:3.5,pb:1,children:h("rpm_EmailMissedMandateDescription")}),(0,qt.jsx)(wE,{required:!0,control:(0,qt.jsx)(tH,{as:Dw,disabled:!0,type:"checkbox",id:"email_non_compliant_user",name:"email_non_compliant_user"}),label:h("rpm_NonCompliantUser"),sx:{"& .MuiFormControlLabel-label":{fontWeight:"600"}}}),(0,qt.jsx)(Cf,{pl:3.5,pb:1,children:h("rpm_EmailNonCompliantUserDescription")})]})]}),(0,qt.jsx)(eg,{}),(0,qt.jsxs)(Ff,{container:!0,spacing:2,py:2,children:[(0,qt.jsx)(Ff,{item:!0,xs:4,children:(0,qt.jsx)(Cf,{fontWeight:600,children:h("rpm_PushNotifications")})}),(0,qt.jsxs)(Ff,{item:!0,xs:8,children:[(0,qt.jsx)(wE,{required:!0,control:(0,qt.jsx)(tH,{as:Dw,type:"checkbox",id:"push_reading_reminder",name:"push_reading_reminder"}),label:h("rpm_ReadingReminder"),sx:{"& .MuiFormControlLabel-label":{fontWeight:"600"}}}),(0,qt.jsx)(Cf,{pl:3.5,pb:1,children:h("rpm_PushReadingReminderDescription")}),(0,qt.jsx)(wE,{required:!0,control:(0,qt.jsx)(tH,{as:Dw,type:"checkbox",id:"push_missed_mandate",name:"push_missed_mandate"}),label:h("rpm_MissedMandate"),sx:{"& .MuiFormControlLabel-label":{fontWeight:"600"}}}),(0,qt.jsx)(Cf,{pl:3.5,pb:1,children:h("rpm_PushMissedMandateDescription")}),(0,qt.jsx)(wE,{required:!0,control:(0,qt.jsx)(tH,{as:Dw,disabled:!0,type:"checkbox",id:"push_non_compliant_user",name:"push_non_compliant_user"}),label:h("rpm_NonCompliantUser"),sx:{"& .MuiFormControlLabel-label":{fontWeight:"600"}}}),(0,qt.jsx)(Cf,{pl:3.5,pb:1,children:h("rpm_PushNonCompliantUserDescription")}),(0,qt.jsx)(wE,{required:!0,control:(0,qt.jsx)(tH,{as:Dw,type:"checkbox",id:"course",name:"course"}),label:h("rpm_Schedule"),sx:{"& .MuiFormControlLabel-label":{fontWeight:"600"}}}),(0,qt.jsx)(Cf,{pl:3.5,pb:1,children:h("rpm_ScheduleDescription")}),(null===d||void 0===d?void 0:d.is_hospital)&&(0,qt.jsxs)(qt.Fragment,{children:[(0,qt.jsx)(wE,{required:!0,control:(0,qt.jsx)(tH,{as:Dw,type:"checkbox",id:"prescriptions",name:"prescriptions"}),label:h("rpm_prescription"),sx:{"& .MuiFormControlLabel-label":{fontWeight:"600"}}}),(0,qt.jsx)(Cf,{pl:3.5,pb:1,children:h("rpm_PrescriptionDescription")})]}),(0,qt.jsx)(wE,{required:!0,control:(0,qt.jsx)(tH,{as:Dw,type:"checkbox",id:"medical_history",name:"medical_history"}),label:h("rpm_MedicalHistory"),sx:{"& .MuiFormControlLabel-label":{fontWeight:"600"}}}),(0,qt.jsx)(Cf,{pl:3.5,pb:1,children:h("rpm_MedicalHistoryDescription")}),(0,qt.jsx)(wE,{required:!0,control:(0,qt.jsx)(tH,{as:Dw,type:"checkbox",id:"profile",name:"profile"}),label:h("rpm_Profile"),sx:{"& .MuiFormControlLabel-label":{fontWeight:"600"}}}),(0,qt.jsx)(Cf,{pl:3.5,pb:1,children:h("rpm_ProfileDescription")}),(null===d||void 0===d?void 0:d.is_hospital)&&(0,qt.jsxs)(qt.Fragment,{children:[(0,qt.jsx)(wE,{required:!0,control:(0,qt.jsx)(tH,{as:Dw,type:"checkbox",id:"rule",name:"rule"}),label:h("rpm_Rule"),sx:{"& .MuiFormControlLabel-label":{fontWeight:"600"}}}),(0,qt.jsx)(Cf,{pl:3.5,pb:1,children:h("rpm_RuleDescription")}),(0,qt.jsx)(wE,{required:!0,control:(0,qt.jsx)(tH,{as:Dw,type:"checkbox",id:"notes",name:"notes"}),label:h("rpm_Notes"),sx:{"& .MuiFormControlLabel-label":{fontWeight:"600"}}}),(0,qt.jsx)(Cf,{pl:3.5,pb:1,children:h("rpm_NotesDescription")})]})]})]}),(0,qt.jsx)(eg,{}),(0,qt.jsxs)(Ff,{container:!0,spacing:2,py:2,children:[(0,qt.jsx)(Ff,{item:!0,xs:4,children:(0,qt.jsx)(Cf,{fontWeight:600,children:h("rpm_WhatsappNotifications")})}),(0,qt.jsxs)(Ff,{item:!0,xs:8,children:[(0,qt.jsx)(wE,{required:!0,control:(0,qt.jsx)(tH,{as:Dw,type:"checkbox",id:"welcome_message",name:"welcome_message"}),label:h("rpm_WhatsappNotifications"),sx:{"& .MuiFormControlLabel-label":{fontWeight:"600"}}}),(0,qt.jsx)(Cf,{pl:3.5,pb:1,children:h("rpm_WhatsappDescription")})]})]})]})]})})}},"email_notifications")})]})}function _Ae(e){var t,n,r,i,o,a,s,l,c;let{activeProgram:d,addNotifications:u,notifications:p}=e;const{t:h}=Vg(),m=[{name:h("rpm_RPM"),url:ld.DOCTOR.PROGRAM},{name:null===d||void 0===d?void 0:d.display_name,url:"".concat(ld.DOCTOR.PROGRAM,"/").concat(null===d||void 0===d?void 0:d.code,"/patients")},{name:h("rpm_Notifications"),url:""}],f={otp_notifications:!0,email_reading_reminder:!1,email_missed_mandate:!1,email_non_compliant_user:!1,push_reading_reminder:null===p||void 0===p||null===(t=p.push_notification)||void 0===t?void 0:t.reading_reminder,push_missed_mandate:null===p||void 0===p||null===(n=p.push_notification)||void 0===n?void 0:n.missed_mandate,push_non_compliant_user:!1,course:null===p||void 0===p||null===(r=p.push_notification)||void 0===r?void 0:r.course,prescriptions:null===p||void 0===p||null===(i=p.push_notification)||void 0===i?void 0:i.prescriptions,medical_history:null===p||void 0===p||null===(o=p.push_notification)||void 0===o?void 0:o.medical_history,rule:null===p||void 0===p||null===(a=p.push_notification)||void 0===a?void 0:a.rule,profile:null===p||void 0===p||null===(s=p.push_notification)||void 0===s?void 0:s.profile,notes:null===p||void 0===p||null===(l=p.push_notification)||void 0===l?void 0:l.notes,welcome_message:null===p||void 0===p||null===(c=p.whatsapp_notification)||void 0===c?void 0:c.welcome_message};return(0,qt.jsxs)(qt.Fragment,{children:[(0,qt.jsxs)(Dye,{mb:2.5,display:"flex",alignItems:"center",children:[(0,qt.jsx)(BH,{labels:m}),(0,qt.jsx)(Cf,{variant:"h6",gutterBottom:!0,fontWeight:500,m:0,children:h("rpm_Notifications")})]}),(0,qt.jsx)(yH,{variant:"outlined",children:(0,qt.jsx)(Kz,{initialValues:f,onSubmit:u,enableReinitialize:!0,children:e=>{let{values:t}=e;return(0,qt.jsx)(qt.Fragment,{children:(0,qt.jsxs)(nH,{children:[(0,qt.jsx)(nW,{sx:{py:1.5,bgcolor:"primary.theme.50",textAlign:"end"},title:(0,qt.jsx)(qt.Fragment,{children:(0,qt.jsx)(xh,{variant:"contained",color:"primary",disableElevation:!0,type:"submit",children:h("rpm_Save")})})}),(0,qt.jsxs)(wH,{sx:{py:0},children:[(0,qt.jsxs)(Ff,{container:!0,spacing:2,py:2,children:[(0,qt.jsx)(Ff,{item:!0,xs:"auto",sm:4,children:(0,qt.jsx)(Cf,{fontWeight:600,children:h("rpm_SMSNotifications")})}),(0,qt.jsxs)(Ff,{item:!0,xs:12,sm:8,children:[(0,qt.jsx)(wE,{required:!0,control:(0,qt.jsx)(tH,{as:Dw,type:"checkbox",disabled:t.otp_notifications,id:"otp_notifications",name:"otp_notifications"}),label:h("rpm_OTPLogin"),sx:{"& .MuiFormControlLabel-label":{fontWeight:"600"}}}),(0,qt.jsx)(Cf,{pl:3.5,pb:1,children:h("rpm_OTPLoginDescription")})]})]}),(0,qt.jsx)(eg,{}),(0,qt.jsxs)(Ff,{container:!0,spacing:2,py:2,children:[(0,qt.jsx)(Ff,{item:!0,xs:"auto",sm:4,children:(0,qt.jsx)(Cf,{fontWeight:600,children:h("rpm_EmailNotifications")})}),(0,qt.jsxs)(Ff,{item:!0,xs:12,sm:8,children:[(0,qt.jsx)(wE,{required:!0,control:(0,qt.jsx)(tH,{as:Dw,disabled:!0,type:"checkbox",id:"email_reading_reminder",name:"email_reading_reminder"}),label:h("rpm_ReadingReminder"),sx:{"& .MuiFormControlLabel-label":{fontWeight:"600"}}}),(0,qt.jsx)(Cf,{pl:3.5,pb:1,children:h("rpm_EmailReadingReminderDescription")}),(0,qt.jsx)(wE,{required:!0,control:(0,qt.jsx)(tH,{as:Dw,disabled:!0,type:"checkbox",id:"email_missed_mandate",name:"email_missed_mandate"}),label:h("rpm_MissedMandate"),sx:{"& .MuiFormControlLabel-label":{fontWeight:"600"}}}),(0,qt.jsx)(Cf,{pl:3.5,pb:1,children:h("rpm_EmailMissedMandateDescription")}),(0,qt.jsx)(wE,{required:!0,control:(0,qt.jsx)(tH,{as:Dw,disabled:!0,type:"checkbox",id:"email_non_compliant_user",name:"email_non_compliant_user"}),label:h("rpm_NonCompliantUser"),sx:{"& .MuiFormControlLabel-label":{fontWeight:"600"}}}),(0,qt.jsx)(Cf,{pl:3.5,pb:1,children:h("rpm_EmailNonCompliantUserDescription")})]})]}),(0,qt.jsx)(eg,{}),(0,qt.jsxs)(Ff,{container:!0,spacing:2,py:2,children:[(0,qt.jsx)(Ff,{item:!0,xs:"auto",sm:4,children:(0,qt.jsx)(Cf,{fontWeight:600,children:h("rpm_PushNotifications")})}),(0,qt.jsxs)(Ff,{item:!0,xs:12,sm:8,children:[(0,qt.jsx)(wE,{required:!0,control:(0,qt.jsx)(tH,{as:Dw,type:"checkbox",id:"push_reading_reminder",name:"push_reading_reminder"}),label:h("rpm_ReadingReminder"),sx:{"& .MuiFormControlLabel-label":{fontWeight:"600"}}}),(0,qt.jsx)(Cf,{pl:3.5,pb:1,children:h("rpm_PushReadingReminderDescription")}),(0,qt.jsx)(wE,{required:!0,control:(0,qt.jsx)(tH,{as:Dw,type:"checkbox",id:"push_missed_mandate",name:"push_missed_mandate"}),label:h("rpm_MissedMandate"),sx:{"& .MuiFormControlLabel-label":{fontWeight:"600"}}}),(0,qt.jsx)(Cf,{pl:3.5,pb:1,children:h("rpm_PushMissedMandateDescription")}),(0,qt.jsx)(wE,{required:!0,control:(0,qt.jsx)(tH,{as:Dw,disabled:!0,type:"checkbox",id:"push_non_compliant_user",name:"push_non_compliant_user"}),label:h("rpm_NonCompliantUser"),sx:{"& .MuiFormControlLabel-label":{fontWeight:"600"}}}),(0,qt.jsx)(Cf,{pl:3.5,pb:1,children:h("rpm_PushNonCompliantUserDescription")}),(0,qt.jsx)(wE,{required:!0,control:(0,qt.jsx)(tH,{as:Dw,type:"checkbox",id:"course",name:"course"}),label:h("rpm_Schedule"),sx:{"& .MuiFormControlLabel-label":{fontWeight:"600"}}}),(0,qt.jsx)(Cf,{pl:3.5,pb:1,children:h("rpm_ScheduleDescription")}),(0,qt.jsx)(wE,{required:!0,control:(0,qt.jsx)(tH,{as:Dw,type:"checkbox",id:"prescriptions",name:"prescriptions"}),label:h("rpm_prescription"),sx:{"& .MuiFormControlLabel-label":{fontWeight:"600"}}}),(0,qt.jsx)(Cf,{pl:3.5,pb:1,children:h("rpm_PrescriptionDescription")}),(0,qt.jsx)(wE,{required:!0,control:(0,qt.jsx)(tH,{as:Dw,type:"checkbox",id:"medical_history",name:"medical_history"}),label:h("rpm_MedicalHistory"),sx:{"& .MuiFormControlLabel-label":{fontWeight:"600"}}}),(0,qt.jsx)(Cf,{pl:3.5,pb:1,children:h("rpm_MedicalHistoryDescription")}),(0,qt.jsx)(wE,{required:!0,control:(0,qt.jsx)(tH,{as:Dw,type:"checkbox",id:"profile",name:"profile"}),label:h("rpm_Profile"),sx:{"& .MuiFormControlLabel-label":{fontWeight:"600"}}}),(0,qt.jsx)(Cf,{pl:3.5,pb:1,children:h("rpm_ProfileDescription")}),(0,qt.jsx)(wE,{required:!0,control:(0,qt.jsx)(tH,{as:Dw,type:"checkbox",id:"rule",name:"rule"}),label:h("rpm_Rule"),sx:{"& .MuiFormControlLabel-label":{fontWeight:"600"}}}),(0,qt.jsx)(Cf,{pl:3.5,pb:1,children:h("rpm_RuleDescription")}),(0,qt.jsx)(wE,{required:!0,control:(0,qt.jsx)(tH,{as:Dw,type:"checkbox",id:"notes",name:"notes"}),label:h("rpm_Notes"),sx:{"& .MuiFormControlLabel-label":{fontWeight:"600"}}}),(0,qt.jsx)(Cf,{pl:3.5,pb:1,children:h("rpm_NotesDescription")})]})]}),(0,qt.jsx)(eg,{}),(0,qt.jsxs)(Ff,{container:!0,spacing:2,py:2,children:[(0,qt.jsx)(Ff,{item:!0,xs:"auto",sm:4,children:(0,qt.jsx)(Cf,{fontWeight:600,children:h("rpm_WhatsappNotifications")})}),(0,qt.jsxs)(Ff,{item:!0,xs:12,sm:8,children:[(0,qt.jsx)(wE,{required:!0,control:(0,qt.jsx)(tH,{as:Dw,type:"checkbox",id:"welcome_message",name:"welcome_message"}),label:h("rpm_WhatsappNotifications"),sx:{"& .MuiFormControlLabel-label":{fontWeight:"600"}}}),(0,qt.jsx)(Cf,{pl:3.5,pb:1,children:h("rpm_WhatsappDescription")})]})]})]})]})})}},"email_notifications")})]})}jAe.defaultProps={activeProgram:{},notifications:{},addNotifications:()=>{}},_Ae.defaultProps={activeProgram:{},notifications:{},addNotifications:()=>{}};const CAe=e=>{let{activeProgram:t}=e;const n=window.innerWidth,r=Nt(),[i,o]=We.useState({}),a=wt(cu),s=async()=>{try{const{data:e}=await r(Xs(null===t||void 0===t?void 0:t.code));o(e)}catch(e){console.log(e)}},l=async e=>{const n={email_notification:{reading_reminder:e.email_reading_reminder,missed_mandate:e.email_missed_mandate,non_compliant_user:e.email_non_compliant_user},push_notification:{reading_reminder:e.push_reading_reminder,missed_mandate:e.push_missed_mandate,non_compliant_user:e.push_non_compliant_user,course:e.course,prescriptions:e.prescriptions,medical_history:e.medical_history,rule:e.rule,profile:e.profile,notes:e.notes},whatsapp_notification:{welcome_message:e.welcome_message}};try{await r(Ks(null===t||void 0===t?void 0:t.code,n)),s(),r(Zo({subTitle:"message:rpm_SettingsSavedSuccessfully",severity:ud.SUCCESS}))}catch(i){console.log(i)}};return We.useEffect(()=>{a&&t&&s()},[a,t]),We.useEffect(()=>{r(NC({activeMenuItem:"notifications"}))},[]),(0,qt.jsx)("div",{children:n>=575?(0,qt.jsx)(jAe,{activeProgram:t,addNotifications:l,notifications:i}):(0,qt.jsx)(_Ae,{activeProgram:t,addNotifications:l,notifications:i})})},wAe=e=>{let{fetchListFunction:t,filterState:n,setFilterState:r,pageDetails:o,setShowFilterColor:a}=e;const{t:s}=Vg();return(0,qt.jsx)(qt.Fragment,{children:(0,qt.jsx)(Kz,{initialValues:{start_date:null,end_date:null,patientName:""},enableReinitialize:!0,children:()=>(0,qt.jsx)(nH,{children:(0,qt.jsx)(op,{className:"WhiteBG prescription-tour-step0",sx:{borderRadius:"8px"},children:(0,qt.jsxs)(Ff,{container:!0,alignItems:"center",spacing:1,className:"patients-tour-step2",children:[(0,qt.jsx)(Ff,{item:!0,md:3,lg:3,className:"smallWebFont",children:(0,qt.jsx)(tH,{as:qj,fullWidth:!0,size:"small",variant:"outlined",name:"patientName",value:n.patientName,placeholder:s("message:rpm_SearchName"),onChange:e=>{r(t=>(0,i.A)((0,i.A)({},t),{},{patientName:e.target.value}))},endAdornment:(0,qt.jsx)(tw,{position:"end",sx:{position:"absolute",right:"8px"},children:(0,qt.jsx)(sy,{title:s("message:rpm_SearchProgramFilterBar"),placement:"top",children:(0,qt.jsx)(wh,{size:"small",disableRipple:!0,sx:{p:0}})})}),sx:{bgcolor:"white",paddingRight:"0"}})}),(0,qt.jsx)(Ff,{item:!0,md:6,lg:6,children:(0,qt.jsxs)(op,{display:"flex",alignItems:"center",className:"followUpfilter",children:[(0,qt.jsx)(op,{className:"DatepickerForm",sx:e=>({"& .MuiFormControl-root":{display:"flex"},"& .MuiFormLabel-root":{color:e.palette.grey[800],fontSize:12,transform:"translate(14px, 11px)"},"& .MuiFormLabel-root.MuiInputLabel-shrink":{transform:"translate(15px, -8px)",fontSize:12}}),mx:1,children:(0,qt.jsx)(WM,{dateAdapter:DI,children:(0,qt.jsx)(tH,{as:fD,size:"small",label:"From",name:"start_date",value:n.start_date,renderInput:e=>(0,qt.jsx)(Q_,(0,i.A)({},e)),minDate:new Date,onChange:e=>{r(t=>(0,i.A)((0,i.A)({},t),{},{start_date:e}))}})})}),(0,qt.jsx)(op,{className:"DatepickerForm",sx:e=>({"& .MuiFormControl-root":{display:"flex"},"& .MuiFormLabel-root":{color:e.palette.grey[800],fontSize:12,transform:"translate(14px, 11px)"},"& .MuiFormLabel-root.MuiInputLabel-shrink":{transform:"translate(15px, -8px)",fontSize:12}}),ml:1,children:(0,qt.jsx)(WM,{dateAdapter:DI,children:(0,qt.jsx)(tH,{as:fD,size:"small",label:"To",name:"end_date",value:n.end_date,renderInput:e=>(0,qt.jsx)(Q_,(0,i.A)({},e)),minDate:null!==n&&void 0!==n&&n.start_date?null===n||void 0===n?void 0:n.start_date:new Date,onChange:e=>{r(t=>(0,i.A)((0,i.A)({},t),{},{end_date:e}))}})})})]})}),(0,qt.jsx)(Ff,{item:!0,md:3,lg:3,children:(0,qt.jsxs)(op,{py:.5,sx:{whiteSpace:"nowrap"},children:[(0,qt.jsx)(xh,{variant:"contained",disableElevation:!0,sx:{ml:2},onClick:()=>{o.current_page=1,t(n),null===n.start_date&&null===n.start_date&&""===n.patientName||a(!0)},children:s("rpm_ApplyFilters")}),(0,qt.jsx)(xh,{variant:"text",disableElevation:!0,onClick:()=>{o.current_page=1,r({event_id:"",start_date:null,end_date:null,patientName:"",username:"",service_code:"",program:null,description:""}),t({event_id:"",start_date:null,end_date:null,patientName:"",username:"",service_code:"",program:null,description:""}),a(!1)},type:"reset",children:(0,qt.jsx)(J_.A,{})})]})})]})})})})})},SAe=e=>{let{activeProgram:t,getFollowUps:n,pageDetails:r,order:i,orderBy:o,checkState:a,isSelection:s,nodata:l,followups:c,dataParameter:d,initialHeadcells:u,onCheck:p,followUpHead:h,setHeadcells:m,setOrder:f,settingModal:g,handleSettingModalToggle:v,setOrderBy:x,filterState:y,setFilterState:b,showFilterColor:j,setShowFilterColor:_,viewButton:C}=e;const{t:w}=Vg(),S=Nt(),A=lo(),[k,T]=We.useState(!1),E=[{name:w("rpm_RPM"),url:ld.DOCTOR.PROGRAM},{name:null===t||void 0===t?void 0:t.display_name,url:"".concat(ld.DOCTOR.PROGRAM,"/").concat(null===t||void 0===t?void 0:t.code,"/patients")},{name:w("rpm_FollowUp"),url:""}];return We.useEffect(()=>{const e={breadcrumb:E};cs(t)||S(NC(e))},[t]),(0,qt.jsxs)(qt.Fragment,{children:[(0,qt.jsxs)(op,{children:[(0,qt.jsxs)(op,{sx:{width:"100%"},children:[(0,qt.jsx)(op,{mb:2.5,children:(0,qt.jsx)(BH,{labels:E})}),(0,qt.jsx)(Ff,{container:!0,spacing:2,alignItems:"center",sx:{mb:2},children:(0,qt.jsx)(Ff,{item:!0,sx:{paddingTop:"0"},children:(0,qt.jsx)(Cf,{variant:"h5",component:"h5",children:w("rpm_FollowUp")})})})]}),(0,qt.jsx)(op,{bgcolor:"white",p:2,children:(0,qt.jsxs)(Ff,{container:!0,spacing:2,sx:{alignItems:{lg:"center",sm:"flex-start"}},children:[(0,qt.jsx)(Ff,{item:!0,lg:11,xl:8,md:12,sm:10,xs:10,className:"followUp-tour-step0",children:(0,qt.jsx)(wAe,{onApply:()=>{T(!k)},fetchListFunction:n,filterState:y,setFilterState:b,pageDetails:r,showFilterColor:j,setShowFilterColor:_})}),(0,qt.jsx)(Ff,{item:!0,ml:"auto",sm:2,xs:2,children:(0,qt.jsx)(op,{pt:.5,textAlign:"end",children:(0,qt.jsx)(sy,{title:w("rpm_TableCellSetting"),children:(0,qt.jsx)(sv,{sx:{boxShadow:"none",width:32,height:32,minHeight:"auto"},size:"small",color:"primary",onClick:v,children:(0,qt.jsx)(YC.A,{fontSize:"small",sx:{width:16,height:16}})})})})})]})}),(0,qt.jsx)(UT,{order:i,orderBy:o,setOrder:f,setOrderBy:x,data:cs(c)?[]:c,headCells:null===h||void 0===h?void 0:h.filter(e=>null===u||void 0===u?void 0:u.includes(e.id)),dataParameter:d,selected:a,setSelected:p,isSelection:s,noDataImage:l,fetchList:n,pageDetails:r,skeletonVrows:6,className:"theme_scroll",children:null===c||void 0===c?void 0:c.map(e=>{var t,n,r,i,o,l,c,d;const h=null===e||void 0===e||null===(t=e.patient)||void 0===t||null===(n=t.program)||void 0===n?void 0:n.find(e=>A.programId===e);return(0,qt.jsxs)(cw,{className:"followUp-tour-step1",children:[s&&(0,qt.jsx)(gw,{padding:"checkbox",children:(0,qt.jsx)(Dw,{onChange:p,checked:a.includes(e.consultation_id),name:e.consultation_id,color:"primary"})}),u.includes("patient")&&(0,qt.jsx)(gw,{children:(0,qt.jsx)(Lo,{to:"/rpm/program/".concat(h,"/patients/").concat(null===e||void 0===e||null===(r=e.patient)||void 0===r?void 0:r.id,"/dashboard"),children:(null===e||void 0===e||null===(i=e.patient)||void 0===i?void 0:i.first_name)+" "+(null===e||void 0===e||null===(o=e.patient)||void 0===o?void 0:o.last_name)})}),u.includes("mobile")&&(0,qt.jsx)(gw,{children:null===e||void 0===e||null===(l=e.patient)||void 0===l?void 0:l.mobile}),u.includes("date")&&(0,qt.jsx)(gw,{children:ps(null===e||void 0===e||null===(c=e.follow_up)||void 0===c?void 0:c.date)?"NA":sa()(null===e||void 0===e||null===(d=e.follow_up)||void 0===d?void 0:d.date).format("DD-MM-YYYY")}),u.includes("consultation_start_date")&&(0,qt.jsx)(gw,{children:ps(null===e||void 0===e?void 0:e.consultation_start_date)?"NA":sa()(null===e||void 0===e?void 0:e.consultation_start_date).format("DD-MM-YYYY")}),u.includes("consultation_end_date")&&(0,qt.jsx)(gw,{children:ps(null===e||void 0===e?void 0:e.consultation_end_date)?"NA":sa()(null===e||void 0===e?void 0:e.consultation_end_date).format("DD-MM-YYYY")}),u.includes("status")&&(0,qt.jsx)(gw,{children:e.status?(0,qt.jsx)(dM,{severity:"success",icon:!1,sx:e=>({py:0,px:1,display:"inline-flex",fontSize:e.spacing(1.5),"& .MuiAlert-message":{p:e.spacing(.5,0)}}),children:(0,qt.jsx)("strong",{children:"Active"})}):(0,qt.jsx)(dM,{severity:"error",icon:!1,sx:e=>({py:0,px:1,display:"inline-flex",fontSize:e.spacing(1.5),"& .MuiAlert-message":{p:e.spacing(.5,0)}}),children:(0,qt.jsx)("strong",{children:"Inactive"})})}),u.includes("action")&&(0,qt.jsx)(gw,{children:(0,qt.jsx)(op,{className:"program-tour-step1",width:"fit-content",children:C(e)})})]},e.consultation_id)})})]}),(0,qt.jsx)(KE,{pageDetails:r,fetchListFunction:n}),(0,qt.jsx)(TE,{open:g,allHeadCells:h,initialHeadcells:u,setHeadcells:m,onClose:v})]})},AAe=e=>{let{activeProgram:t,getFollowUps:n,pageDetails:r,order:i,orderBy:o,checkState:a,isSelection:s,nodata:l,followups:c,dataParameter:d,initialHeadcells:u,onCheck:p,followUpHead:h,setHeadcells:m,setOrder:f,settingModal:g,handleSettingModalToggle:v,setOrderBy:x,filterState:y,setFilterState:b,showFilterColor:j,setShowFilterColor:_,viewButton:C}=e;const{t:w}=Vg(),S=Nt(),[A,k]=We.useState(!1),T=[{name:w("rpm_RPM"),url:ld.DOCTOR.PROGRAM},{name:null===t||void 0===t?void 0:t.display_name,url:"".concat(ld.DOCTOR.PROGRAM,"/").concat(null===t||void 0===t?void 0:t.code,"/patients")},{name:w("rpm_FollowUp"),url:""}];return We.useEffect(()=>{const e={breadcrumb:T};cs(t)||S(NC(e))},[t]),(0,qt.jsxs)(qt.Fragment,{children:[(0,qt.jsxs)(op,{children:[(0,qt.jsxs)(op,{sx:{width:"100%"},children:[(0,qt.jsxs)(op,{mb:2.5,display:"flex",children:[(0,qt.jsx)(BH,{labels:T}),(0,qt.jsx)(op,{sx:{display:{xs:"block",sm:"block",md:"none"}},children:(0,qt.jsx)(Cf,{variant:"h6",component:"h6",sx:{marginBottom:"0"},children:w("rpm_FollowUp")})})]}),(0,qt.jsx)(Ff,{container:!0,spacing:2,alignItems:"center",sx:{mb:2},children:(0,qt.jsx)(Ff,{item:!0,sx:{paddingTop:"0",display:{xs:"none",sm:"none",md:"block"}},children:(0,qt.jsx)(Cf,{variant:"h5",component:"h5",children:w("rpm_FollowUp")})})})]}),(0,qt.jsx)(op,{bgcolor:"white",p:2,children:(0,qt.jsxs)(Ff,{container:!0,spacing:2,sx:{alignItems:{lg:"center",sm:"flex-start"}},children:[(0,qt.jsx)(Ff,{item:!0,lg:11,xl:8,md:12,sm:10,xs:10,children:(0,qt.jsx)(wAe,{onApply:()=>{k(!A)},fetchListFunction:n,filterState:y,setFilterState:b,pageDetails:r,showFilterColor:j,setShowFilterColor:_})}),(0,qt.jsx)(Ff,{item:!0,ml:"auto",sm:2,xs:2,children:(0,qt.jsx)(op,{pt:.5,textAlign:"end",children:(0,qt.jsx)(sy,{title:w("rpm_TableCellSetting"),children:(0,qt.jsx)(sv,{sx:{boxShadow:"none",width:32,height:32,minHeight:"auto"},size:"small",color:"primary",onClick:v,children:(0,qt.jsx)(YC.A,{fontSize:"small",sx:{width:16,height:16}})})})})})]})}),(0,qt.jsx)(UT,{order:i,orderBy:o,setOrder:f,setOrderBy:x,data:cs(c)?[]:c,headCells:null===h||void 0===h?void 0:h.filter(e=>null===u||void 0===u?void 0:u.includes(e.id)),dataParameter:d,selected:a,setSelected:p,isSelection:s,noDataImage:l,fetchList:n,pageDetails:r,skeletonVrows:6,className:"theme_scroll",children:null===c||void 0===c?void 0:c.map(e=>{var t,n,r,i,o,l,c;return(0,qt.jsxs)(cw,{className:"program-tour-step0",children:[s&&(0,qt.jsx)(gw,{padding:"checkbox",children:(0,qt.jsx)(Dw,{onChange:p,checked:a.includes(e.consultation_id),name:e.consultation_id,color:"primary"})}),u.includes("patient")&&(0,qt.jsx)(gw,{children:(0,qt.jsx)(Lo,{to:"/rpm/program/".concat(null===(t=e.patient)||void 0===t?void 0:t.program,"/patients/").concat(null===e||void 0===e||null===(n=e.patient)||void 0===n?void 0:n.id,"/dashboard"),children:(null===e||void 0===e||null===(r=e.patient)||void 0===r?void 0:r.first_name)+" "+(null===e||void 0===e||null===(i=e.patient)||void 0===i?void 0:i.last_name)})}),u.includes("mobile")&&(0,qt.jsx)(gw,{children:null===e||void 0===e||null===(o=e.patient)||void 0===o?void 0:o.mobile}),u.includes("date")&&(0,qt.jsx)(gw,{children:ps(null===e||void 0===e||null===(l=e.follow_up)||void 0===l?void 0:l.date)?"NA":sa()(null===e||void 0===e||null===(c=e.follow_up)||void 0===c?void 0:c.date).format("DD-MM-YYYY")}),u.includes("consultation_start_date")&&(0,qt.jsx)(gw,{children:ps(null===e||void 0===e?void 0:e.consultation_start_date)?"NA":sa()(null===e||void 0===e?void 0:e.consultation_start_date).format("DD-MM-YYYY")}),u.includes("consultation_end_date")&&(0,qt.jsx)(gw,{children:ps(null===e||void 0===e?void 0:e.consultation_end_date)?"NA":sa()(null===e||void 0===e?void 0:e.consultation_end_date).format("DD-MM-YYYY")}),u.includes("status")&&(0,qt.jsx)(gw,{children:e.status?(0,qt.jsx)(dM,{severity:"success",icon:!1,sx:e=>({py:0,px:1,display:"inline-flex",fontSize:e.spacing(1.5),"& .MuiAlert-message":{p:e.spacing(.5,0)}}),children:(0,qt.jsx)("strong",{children:"Active"})}):(0,qt.jsx)(dM,{severity:"error",icon:!1,sx:e=>({py:0,px:1,display:"inline-flex",fontSize:e.spacing(1.5),"& .MuiAlert-message":{p:e.spacing(.5,0)}}),children:(0,qt.jsx)("strong",{children:"Inactive"})})}),u.includes("action")&&(0,qt.jsx)(gw,{children:(0,qt.jsx)(op,{className:"program-tour-step1",width:"fit-content",children:C(e)})})]},e.consultation_id)})})]}),(0,qt.jsx)(KE,{pageDetails:r,fetchListFunction:n}),(0,qt.jsx)(TE,{open:g,allHeadCells:h,initialHeadcells:u,setHeadcells:m,onClose:v})]})},kAe=["content"],TAe=e=>{let{activeProgram:t}=e;const n=window.innerWidth,r=Nt(),o=wt(bu),a=VC(JA().breakpoints.down("sm")),{t:s}=Vg(),l=wt(cu),c=wt(ju),d=so(),[u,p]=We.useState(""),h=!("true"===us(o,"user_principal.attributes.skip_tour[0]","")),[m,f]=We.useState(!1),[g,v]=We.useState([]),[x,y]=We.useState(!1),[b,j]=We.useState([]),[_,C]=We.useState("desc"),[w,S]=We.useState("event_time"),[A,k]=We.useState({start_date:null,end_date:null,patientName:""}),[T,E]=We.useState((0,i.A)({},dd)),{programId:M}=lo(),[O,R]=We.useState(!1),P=a?["patient","action"]:["patient","mobile","date","consultation_start_date","consultation_end_date","status","action"],[D,N]=We.useState(cs($o.getFollowupCell())?P:$o.getFollowupCell()),L=function(e){N(e),$o.setFollowupCell(e)},I=[{id:"patient",label:s("rpm_Patient"),isSort:!1,sortProperty:"patient"},{id:"mobile",label:s("rpm_Mobile"),isSort:!1,sortProperty:"mobile"},{id:"date",label:s("rpm_FollowUpDate"),isSort:!1,sortProperty:"date"},{id:"consultation_start_date",label:s("rpm_StartDate"),isSort:!1,sortProperty:"consultation_start_date"},{id:"consultation_end_date",label:s("rpm_EndDate"),isSort:!1,sortProperty:"consultation_end_date"},{id:"status",label:s("rpm_Status"),isSort:!1,sortProperty:"status"},{id:"action",label:s("rpm_Actions"),isSort:!1,sortProperty:"action"}],F=e=>{var t,n;const r=null===e||void 0===e||null===(t=e.patient)||void 0===t||null===(n=t.program)||void 0===n?void 0:n.find(e=>M===e);return(0,qt.jsx)(sy,{title:s("rpm_ViewConsultation"),children:(0,qt.jsx)(wh,{"data-id":e.id,color:"primary",onClick:()=>{var t;return d("/rpm/program/".concat(r,"/patients/").concat(null===e||void 0===e||null===(t=e.patient)||void 0===t?void 0:t.id,"/consultations/").concat(null===e||void 0===e?void 0:e.consultation_id))},children:(0,qt.jsx)(gc,{fontSize:"small",sx:{width:16,height:16}})})})},$=()=>{y(!x)},B=async function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:A;const t=(0,i.A)({sort_by:w,sort_order:_},T);try{const n=await r(((e,t,n)=>async r=>{r(na(!0));try{const r="".concat(ua.medical,"/").concat(n||"","/followUp-report?&start=").concat(null!==t&&void 0!==t&&t.start_date?sa()(t.start_date).startOf("day").valueOf():"","&end=").concat(null!==t&&void 0!==t&&t.end_date?sa()(t.end_date).endOf("day").valueOf():"","&patient=").concat((null===t||void 0===t?void 0:t.patientName)||"","&page=").concat(e.current_page||"","&perPage=").concat(e.per_page||"");return await Iu(r,{})}catch(i){return i}finally{r(na(!1))}})(t,e,M)),{data:o}=n||{},a=o||{},{content:s}=a,l=Ko(a,kAe);j(s),E(e=>(0,i.A)((0,i.A)({},e),{},{last_page:null===l||void 0===l?void 0:l.last_page,current_page:null===l||void 0===l?void 0:l.current_page,from:null===l||void 0===l?void 0:l.from,per_page:null===l||void 0===l?void 0:l.per_page,to:null===l||void 0===l?void 0:l.to,total:null===l||void 0===l?void 0:l.total}))}catch(n){console.log(n)}},z=e=>{if(Array.isArray(e))return v(e.map(e=>e.toString()));const t=e.target.name;g.includes(t)?v(g.filter(e=>e!==t)):v(e=>[...e,t])};return We.useEffect(()=>{L(P)},[a]),We.useEffect(()=>{r(NC({activeMenuItem:"followup"}))},[]),We.useEffect(()=>{l&&B()},[l]),(0,qt.jsxs)("div",{children:[n>=575?(0,qt.jsx)(SAe,{activeProgram:t,getFollowUps:B,order:_,orderBy:w,allPrograms:c,followups:b,initialHeadcells:D,followUpHead:I,setHeadcells:L,setOrder:C,setOrderBy:S,filterState:A,setFilterState:k,showFilterColor:O,setShowFilterColor:R,pageDetails:T,isSelection:!1,handleSettingModalToggle:$,dataParameter:"id",checkState:g,onCheck:z,nodata:SCe,detailsTab:m,setDetailsTab:f,settingModal:x,viewButton:F}):(0,qt.jsx)(AAe,{activeProgram:t,getFollowUps:B,order:_,orderBy:w,allPrograms:c,followups:b,initialHeadcells:D,followUpHead:I,setHeadcells:L,setOrder:C,setOrderBy:S,filterState:A,setFilterState:k,showFilterColor:O,setShowFilterColor:R,pageDetails:T,isSelection:!1,handleSettingModalToggle:$,dataParameter:"id",checkState:g,onCheck:z,nodata:SCe,detailsTab:m,setDetailsTab:f,settingModal:x,viewButton:F}),(0,qt.jsxs)(qt.Fragment,{children:[(0,qt.jsx)(zZ,{isTour:h,path:"followUpTour",setRenderer:p}),(0,qt.jsx)("input",{type:"hidden",id:"rerenderer",value:u})]})]})},EAe=["children","onClose"],MAe=e=>{const{children:t,onClose:n}=e,r=Ko(e,EAe);return(0,qt.jsxs)(fC,(0,i.A)((0,i.A)({sx:{m:0,p:2}},r),{},{children:[t,n?(0,qt.jsx)(wh,{"aria-label":"close",onClick:n,sx:{position:"absolute",right:8,top:8,color:e=>e.palette.grey[500]},children:(0,qt.jsx)(J_.A,{})}):null]}))};function OAe(e){let{openModal:t,onCloseModal:n,addNewPatient:r,states:o,countries:a,fetchStates:s}=e;const{t:l}=Vg(),c=wt(uu),[d,u]=We.useState(null);return(0,qt.jsx)(We.Fragment,{children:(0,qt.jsx)(cC,{fullWidth:!0,maxWidth:"sm",open:t,onClose:n,children:(0,qt.jsx)(Kz,{initialValues:{first_name:"",last_name:"",email:"",birth_date:null,age:"",mobile:"",device:"",observer:"",gender:"",country:"",country_code:"+91",state:"",city:"",address:""},validationSchema:RU.addNewPatient,onSubmit:d?()=>{}:r,enableReinitialize:!0,children:e=>{let{values:t,setFieldValue:r,setFieldTouched:d}=e;return(0,qt.jsx)(qt.Fragment,{children:(0,qt.jsxs)(nH,{children:[(0,qt.jsx)(MAe,{sx:{px:4},onClose:n,children:l("rpm_AddNewPatient")}),(0,qt.jsx)(bC,{sx:{p:4},dividers:!0,children:(0,qt.jsxs)(Ff,{container:!0,spacing:2,children:[(0,qt.jsx)(Ff,{item:!0,xs:12,md:6,children:(0,qt.jsxs)(op,{mb:.5,children:[(0,qt.jsx)(o_,{htmlFor:"first_name",required:!0,sx:{mb:.75},children:l("rpm_FirstName")}),(0,qt.jsx)(tH,{fullWidth:!0,as:qj,id:"first_name",name:"first_name",size:"small",color:"primary",endAdornment:(0,qt.jsx)(tw,{position:"end",children:(0,qt.jsx)(sy,{title:l("message:rpm_FirstNameHelp"),placement:"top",children:(0,qt.jsx)(wh,{size:"small",children:(0,qt.jsx)(pM.A,{fontSize:"small"})})})})}),(0,qt.jsx)(dH,{name:"first_name",children:e=>(0,qt.jsx)(v_,{error:!0,children:l(e,{field:l("rpm_FirstName")})})})]})}),(0,qt.jsx)(Ff,{item:!0,xs:12,md:6,children:(0,qt.jsxs)(op,{mb:.5,children:[(0,qt.jsx)(o_,{htmlFor:"last_name",required:!0,sx:{mb:.75},children:l("rpm_LastName")}),(0,qt.jsx)(tH,{fullWidth:!0,as:qj,id:"last_name",name:"last_name",color:"primary",size:"small",endAdornment:(0,qt.jsx)(tw,{position:"end",children:(0,qt.jsx)(sy,{title:l("message:rpm_LastNameHelp"),placement:"top",children:(0,qt.jsx)(wh,{size:"small",children:(0,qt.jsx)(pM.A,{fontSize:"small"})})})})}),(0,qt.jsx)(dH,{name:"last_name",children:e=>(0,qt.jsx)(v_,{error:!0,children:l(e,{field:l("rpm_LastName")})})})]})}),(0,qt.jsxs)(Ff,{item:!0,xs:12,md:6,children:[(0,qt.jsx)(o_,{htmlFor:"mobile",required:!0,sx:{mb:.75},children:l("rpm_CountryCode")}),(0,qt.jsxs)(op,{className:"autocomplete",sx:{position:"relative"},children:[(0,qt.jsx)(tH,{component:KK,size:"small",optionId:"phoneCode",name:"country_code",options:a,browserAutocomplete:!1,valueKey:"phoneCode",nameKey:"phoneCode",variant:"outlined",margin:"normal",fullWidth:!0}),(0,qt.jsx)(sy,{title:l("message:rpm_CountryCodeHelp"),placement:"top",children:(0,qt.jsx)(wh,{size:"small",sx:{position:"absolute",right:"0.875rem",top:"0.25rem"},children:(0,qt.jsx)(pM.A,{fontSize:"small"})})})]}),(0,qt.jsx)(dH,{name:"country_code",children:e=>(0,qt.jsx)(v_,{error:!0,children:l(e,{field:l("rpm_CountryCode")})})})]}),(0,qt.jsx)(Ff,{item:!0,xs:12,md:6,sx:{flexDirection:"row"},children:(0,qt.jsxs)(op,{mb:.5,children:[(0,qt.jsx)(o_,{htmlFor:"mobile",required:!0,sx:{mb:.75},children:l("rpm_Mobile")}),(0,qt.jsx)(tH,{fullWidth:!0,as:qj,id:"mobile",name:"mobile",color:"primary",size:"small",endAdornment:(0,qt.jsx)(tw,{position:"end",children:(0,qt.jsx)(sy,{title:l("message:rpm_MobileHelp"),placement:"top",children:(0,qt.jsx)(wh,{size:"small",children:(0,qt.jsx)(pM.A,{fontSize:"small"})})})})}),(0,qt.jsx)(dH,{name:"mobile",children:e=>(0,qt.jsx)(v_,{error:!0,children:l(e,{field:l("rpm_Mobile")})})})]})}),(0,qt.jsx)(Ff,{item:!0,xs:12,md:6,children:(0,qt.jsxs)(op,{mb:.5,children:[(0,qt.jsx)(o_,{htmlFor:"age",required:!0,sx:{mb:.75},children:l("rpm_Age")}),(0,qt.jsx)(tH,{fullWidth:!0,as:qj,id:"age",name:"age",color:"primary",size:"small",onChange:async e=>{const n=parseInt(e.target.value,10);if(isNaN(n)||""===e.target.value.trim())return await r("age",e.target.value),void await r("birth_date",new Date);if(await r("age",n),n>0){let e=sa()(t.birth_date);e.isValid()||(e=sa()().month(0).date(1)),await r("birth_date",sa()().month(e.month()).date(e.date()).subtract(n,"years").valueOf()),await d("birth_date",!0)}},endAdornment:(0,qt.jsx)(tw,{position:"end",children:(0,qt.jsx)(sy,{title:l("message:rpm_AgeHelp"),placement:"top",children:(0,qt.jsx)(wh,{size:"small",children:(0,qt.jsx)(pM.A,{fontSize:"small"})})})})}),(0,qt.jsx)(dH,{name:"age",children:e=>(0,qt.jsx)(v_,{error:!0,children:l(e,{field:l("rpm_Age")})})})]})}),(0,qt.jsx)(Ff,{item:!0,xs:12,md:6,children:(0,qt.jsxs)(op,{mb:.5,children:[(0,qt.jsxs)(o_,{sx:{display:"flex",alignItems:"center"},htmlFor:"birth_date",children:[l("rpm_DOB"),(0,qt.jsx)(op,{marginLeft:"2px",display:"flex",marginTop:"-0.8px",children:(0,qt.jsx)(sy,{title:l("message:rpm_DOBHelp"),placement:"top",children:(0,qt.jsx)(pM.A,{sx:{width:"18px",height:"18px"}})})})]}),(0,qt.jsx)(op,{mt:.5,sx:{"& .MuiFormControl-root":{width:"100%"}},children:(0,qt.jsx)(WM,{dateAdapter:DI,children:(0,qt.jsx)(tH,{fullWidth:!0,as:fD,size:"small",id:"birth_date",name:"birth_date",maxDate:new Date,value:t.birth_date,onChange:e=>{var t;r("age",null===(t=Ns(e))||void 0===t?void 0:t.toString()),r("birth_date",e),d("age",!0)},renderInput:e=>(0,qt.jsx)(Q_,(0,i.A)((0,i.A)({},e),{},{size:"small"})),inputFormat:"dd/MM/yyyy",defaultCalendarMonth:gs(18,11,31),onError:e=>u(e)})})}),(0,qt.jsx)(dH,{name:"birth_date",children:e=>(0,qt.jsx)(v_,{error:!0,children:l(e,{field:l("rpm_DOB")})})})]})}),(0,qt.jsx)(Ff,{item:!0,xs:12,md:6,children:(0,qt.jsxs)(op,{mb:.5,children:[(0,qt.jsx)(o_,{htmlFor:"email",sx:{mb:.75},children:l("rpm_Email")}),(0,qt.jsx)(tH,{type:"email",fullWidth:!0,as:qj,id:"email",name:"email",color:"primary",size:"small",endAdornment:(0,qt.jsx)(tw,{position:"end",children:(0,qt.jsx)(sy,{title:l("message:rpm_EmailHelp"),placement:"top",children:(0,qt.jsx)(wh,{size:"small",children:(0,qt.jsx)(pM.A,{fontSize:"small"})})})})}),(0,qt.jsx)(dH,{name:"email",children:e=>(0,qt.jsx)(v_,{error:!0,children:l(e,{field:l("rpm_Email")})})})]})}),(0,qt.jsxs)(Ff,{item:!0,xs:12,md:6,children:[(0,qt.jsx)(o_,{htmlFor:"gender",sx:{mb:.75},children:l("rpm_Gender")}),(0,qt.jsx)(tH,{as:G_,fullWidth:!0,size:"small",id:"gender",name:"gender",variant:"outlined",endAdornment:(0,qt.jsx)(tw,{position:"end",sx:{position:"absolute",right:"28px"},children:(0,qt.jsx)(sy,{title:l("message:rpm_GenderHelp"),placement:"top",children:(0,qt.jsx)(wh,{size:"small",disableRipple:!0,sx:{p:0},children:(0,qt.jsx)(pM.A,{fontSize:"small"})})})}),children:Object.values(jd).map(e=>(0,qt.jsx)(mf,{value:e,children:l("rpm_".concat(e))},e))})]}),(0,qt.jsx)(Ff,{item:!0,xs:12,md:6,children:(0,qt.jsxs)(op,{mb:.5,children:[(0,qt.jsx)(o_,{htmlFor:"address",sx:{mb:.75},children:l("rpm_Address")}),(0,qt.jsx)(tH,{fullWidth:!0,as:qj,id:"address",name:"address",color:"primary",size:"small",endAdornment:(0,qt.jsx)(tw,{position:"end",children:(0,qt.jsx)(sy,{title:l("message:rpm_AddressHelp"),placement:"top",children:(0,qt.jsx)(wh,{size:"small",children:(0,qt.jsx)(pM.A,{fontSize:"small"})})})})})]})}),(0,qt.jsx)(Ff,{item:!0,xs:12,md:6,children:(0,qt.jsxs)(op,{mb:.5,children:[(0,qt.jsx)(o_,{htmlFor:"country",required:!0,sx:{mb:.75},children:l("rpm_ProgramCountry")}),(0,qt.jsxs)(op,{className:"autocomplete",sx:{position:"relative"},children:[(0,qt.jsx)(tH,{component:KK,size:"small",id:"country",optionId:"isoCode",name:"country",options:a,browserAutocomplete:!1,valueKey:"isoCode",nameKey:"name",onValueChange:(e,t)=>{r("state",""),s(t||"IN")},variant:"outlined",margin:"normal",fullWidth:!0}),(0,qt.jsx)(sy,{title:l("message:rpm_PatientCountryHelp"),placement:"top",children:(0,qt.jsx)(wh,{size:"small",sx:{position:"absolute",right:"0.875rem",top:"0.25rem"},children:(0,qt.jsx)(pM.A,{fontSize:"small"})})})]}),(0,qt.jsx)(dH,{name:"country",children:e=>(0,qt.jsx)(v_,{error:!0,children:l(e,{field:l("rpm_ProgramCountry")})})})]})}),(0,qt.jsx)(Ff,{item:!0,xs:12,md:6,children:(0,qt.jsxs)(op,{mb:.5,children:[(0,qt.jsx)(o_,{htmlFor:"state",required:!0,sx:{mb:.75},children:l("rpm_ProgramState")}),(0,qt.jsxs)(op,{className:"autocomplete",sx:{position:"relative"},children:[(0,qt.jsx)(tH,{component:KK,size:"small",id:"state",optionId:"isoCode",name:"state",options:o,valueKey:"isoCode",nameKey:"name",dependent:!0,variant:"outlined",margin:"normal",fullWidth:!0}),(0,qt.jsx)(sy,{title:l("message:rpm_PatientStateHelp"),placement:"top",children:(0,qt.jsx)(wh,{size:"small",sx:{position:"absolute",right:"0.875rem",top:"0.25rem"},children:(0,qt.jsx)(pM.A,{fontSize:"small"})})})]}),(0,qt.jsx)(dH,{name:"state",children:e=>(0,qt.jsx)(v_,{error:!0,children:l(e,{field:l("rpm_ProgramState")})})})]})}),(0,qt.jsx)(Ff,{item:!0,xs:12,md:6,children:(0,qt.jsxs)(op,{mb:.5,children:[(0,qt.jsx)(o_,{htmlFor:"city",required:!0,sx:{mb:.75},children:l("rpm_ProgramCity")}),(0,qt.jsx)(tH,{fullWidth:!0,as:qj,id:"city",name:"city",color:"primary",size:"small",endAdornment:(0,qt.jsx)(tw,{position:"end",children:(0,qt.jsx)(sy,{title:l("message:rpm_ProgramCityHelp"),placement:"top",children:(0,qt.jsx)(wh,{size:"small",children:(0,qt.jsx)(pM.A,{fontSize:"small"})})})})}),(0,qt.jsx)(dH,{name:"city",children:e=>(0,qt.jsx)(v_,{error:!0,children:l(e,{field:l("rpm_ProgramCity")})})})]})}),(0,qt.jsx)(Ff,{item:!0,xs:12,children:(0,qt.jsxs)(op,{mb:.5,children:[(0,qt.jsx)(o_,{htmlFor:"observer",sx:{mb:.75},children:l("rpm_Observer")}),(0,qt.jsx)(tH,{fullWidth:!0,as:qj,id:"observer",name:"observer",color:"primary",size:"small",endAdornment:(0,qt.jsx)(tw,{position:"end",children:(0,qt.jsx)(sy,{title:l("message:rpm_ObserverHelp"),placement:"top",children:(0,qt.jsx)(wh,{size:"small",children:(0,qt.jsx)(pM.A,{fontSize:"small"})})})})}),(0,qt.jsx)(dH,{name:"observer",children:e=>(0,qt.jsx)(v_,{error:!0,children:l(e,{field:l("rpm_Observer")})})})]})})]})}),(0,qt.jsx)(vE,{sx:{py:3,px:4},children:(0,qt.jsxs)(Ff,{container:!0,spacing:2,children:[(0,qt.jsx)(Ff,{item:!0,xs:!0}),(0,qt.jsx)(Ff,{item:!0,children:(0,qt.jsx)(xh,{color:"primary",variant:"outlined",onClick:n,children:l("rpm_Cancel")})}),(0,qt.jsx)(Ff,{item:!0,children:(0,qt.jsx)(IM,{loading:c,color:"primary",disableElevation:!0,variant:"contained",type:"submit",children:l("rpm_Submit")})})]})})]})})}},"patient_formik")})})}function RAe(){return(0,qt.jsx)(qt.Fragment,{children:(0,qt.jsxs)(yH,{variant:"outlined",sx:{height:"100%"},children:[(0,qt.jsx)(nW,{avatar:(0,qt.jsx)(Ny,{"aria-label":"Avatar",children:(0,qt.jsx)(lS,{width:40,height:40,variant:"circular"})}),action:(0,qt.jsx)(lS,{}),title:(0,qt.jsx)(Cf,{variant:"h6",component:"h6",sx:{width:"60px"},children:(0,qt.jsx)(lS,{})}),subheader:(0,qt.jsxs)(qt.Fragment,{children:[(0,qt.jsx)(Cf,{variant:"body1",component:"p",gutterBottom:!0,sx:{width:"100px"},children:(0,qt.jsx)(lS,{})}),(0,qt.jsx)(Cf,{variant:"body2",component:"p",gutterBottom:!0,children:(0,qt.jsx)(lS,{})})]}),sx:{py:1.5,bgcolor:"primary.theme.50"}}),(0,qt.jsxs)(wH,{children:[(0,qt.jsxs)(pE,{flexDirection:{xs:"column",lg:"row"},gap:{xs:1,lg:2},alignItems:{xs:"left",lg:"center"},sx:{mb:2},children:[(0,qt.jsx)(Cf,{variant:"body2",component:"p",fontWeight:600,sx:{flex:.4},children:(0,qt.jsx)(lS,{})}),(0,qt.jsx)(op,{sx:{flex:.6},children:(0,qt.jsx)(Cf,{variant:"body2",component:"p",children:(0,qt.jsx)(lS,{})})})]}),(0,qt.jsxs)(pE,{flexDirection:{xs:"column",lg:"row"},gap:{xs:1,lg:2},alignItems:{xs:"left",lg:"center"},sx:{mb:2},children:[(0,qt.jsx)(Cf,{variant:"body2",component:"p",fontWeight:600,sx:{flex:.4},children:(0,qt.jsx)(lS,{})}),(0,qt.jsx)(op,{sx:{flex:.6},children:(0,qt.jsx)(lS,{})})]}),(0,qt.jsxs)(op,{children:[(0,qt.jsxs)(pE,{flexDirection:{xs:"column",lg:"row"},gap:{xs:1,lg:2},alignItems:{xs:"left",lg:"center"},sx:{mb:2},children:[(0,qt.jsx)(Cf,{variant:"body2",component:"p",fontWeight:600,sx:{flex:.4},children:(0,qt.jsx)(lS,{})}),(0,qt.jsx)(op,{sx:{flex:.6},children:(0,qt.jsx)(Cf,{variant:"body1",component:"p",children:(0,qt.jsx)(lS,{})})})]}),(0,qt.jsxs)(pE,{flexDirection:{xs:"column",lg:"row"},gap:{xs:1,lg:2},alignItems:{xs:"left",lg:"center"},sx:{mb:2},children:[(0,qt.jsx)(Cf,{variant:"body2",component:"p",fontWeight:600,sx:{flex:.4},children:(0,qt.jsx)(lS,{})}),(0,qt.jsx)(op,{sx:{flex:.6},children:(0,qt.jsx)(Cf,{variant:"body1",component:"p",children:(0,qt.jsx)(lS,{})})})]}),(0,qt.jsxs)(pE,{flexDirection:{xs:"column",lg:"row"},gap:{xs:1,lg:2},alignItems:{xs:"left",lg:"center"},sx:{mb:2},children:[(0,qt.jsx)(Cf,{variant:"body2",component:"p",fontWeight:600,sx:{flex:.4},children:(0,qt.jsx)(lS,{})}),(0,qt.jsx)(op,{sx:{flex:.6},children:(0,qt.jsx)(Cf,{variant:"body1",component:"p",children:(0,qt.jsx)(lS,{})})})]}),(0,qt.jsxs)(pE,{flexDirection:{xs:"column",lg:"row"},gap:{xs:1,lg:2},alignItems:{xs:"left",lg:"center"},children:[(0,qt.jsx)(Cf,{variant:"body2",component:"p",fontWeight:600,sx:{flex:.4},children:(0,qt.jsx)(lS,{})}),(0,qt.jsx)(op,{sx:{flex:.6},children:(0,qt.jsx)(Cf,{variant:"body1",component:"p",children:(0,qt.jsx)(lS,{})})})]})]})]})]})})}const PAe=function(e){let{nodata:t,patientList:n,fetchPatientList:r,pageDetails:i,moreOptions:o,getFlags:a,getNonCompliants:s,getReadingColor:l,patientVitals:c}=e;const{t:d}=Vg();return null===n?[1,2,3,4].map(e=>(0,qt.jsx)(Ff,{item:!0,md:4,lg:3,children:(0,qt.jsx)(RAe,{})},e)):(0,qt.jsx)(qt.Fragment,{children:(null===n||void 0===n?void 0:n.length)>0?(0,qt.jsxs)(qt.Fragment,{children:[null===n||void 0===n?void 0:n.map(e=>{var t;return(0,qt.jsx)(Ff,{item:!0,md:4,lg:4,className:"customGrid",children:(0,qt.jsxs)(yH,{variant:"outlined",sx:{height:"100%"},children:[(0,qt.jsx)(nW,{avatar:(0,qt.jsx)(Ny,{sx:{bgcolor:"secondary.main"},"aria-label":"recipe",children:e.first_name.charAt(0).toLocaleUpperCase()}),action:o(e),title:(0,qt.jsx)(Cf,{variant:"h6",component:"h6",children:e.first_name+" "+e.last_name}),subheader:(0,qt.jsxs)(qt.Fragment,{children:[(0,qt.jsxs)(Cf,{variant:"body2",component:"p",gutterBottom:!0,children:[d("rpm_Mobile"),": ",e.mobile]}),s(e)]}),sx:{py:1.5,bgcolor:"primary.theme.50",alignItems:"flex-start"}}),(0,qt.jsxs)(wH,{children:[(0,qt.jsxs)(pE,{flexDirection:{xs:"column",lg:"row"},gap:{xs:1,lg:2},alignItems:{xs:"left",lg:"center"},sx:{mb:2},children:[(0,qt.jsxs)(Cf,{variant:"body2",component:"p",fontWeight:600,sx:{flex:.5},children:[d("rpm_DateOfBirth")," :"]}),(0,qt.jsx)(op,{sx:{flex:.5},children:(0,qt.jsx)(Cf,{variant:"body2",component:"p",children:e.birth_date})})]}),(0,qt.jsxs)(pE,{flexDirection:{xs:"column",lg:"row"},gap:{xs:1,lg:2},alignItems:{xs:"left",lg:"center"},sx:{mb:2},children:[(0,qt.jsxs)(Cf,{variant:"body2",component:"p",fontWeight:600,sx:{flex:.5},children:[d("rpm_Flags")," :"]}),(0,qt.jsx)(op,{sx:{flex:.5},children:a(e)})]}),e.last_vital_frames.length?null===(t=e.last_vital_frames)||void 0===t?void 0:t.map(t=>{var n,r,i,o,a,s,u;return(0,qt.jsxs)(op,{children:[(0,qt.jsxs)(pE,{flexDirection:{xs:"column",lg:"row"},gap:{xs:1,lg:2},alignItems:{xs:"left",lg:"center"},sx:{mb:2},children:[(0,qt.jsxs)(Cf,{variant:"body2",component:"p",fontWeight:600,sx:{flex:.5},children:[d("rpm_Systolic")," :"]}),(0,qt.jsx)(op,{sx:{flex:.5},children:(0,qt.jsx)(dM,{component:"span",icon:!1,severity:l(t,"systolic")?"error":"success",sx:e=>({py:0,px:1,display:"inline-flex",fontSize:e.spacing(1.5),fontWeight:600,"& .MuiAlert-message":{p:e.spacing(.5,0)}}),children:null!==t&&void 0!==t&&null!==(n=t.values)&&void 0!==n&&n.systolic?null===t||void 0===t||null===(r=t.values)||void 0===r?void 0:r.systolic:"-"})})]}),(0,qt.jsxs)(pE,{flexDirection:{xs:"column",lg:"row"},gap:{xs:1,lg:2},alignItems:{xs:"left",lg:"center"},sx:{mb:2},children:[(0,qt.jsxs)(Cf,{variant:"body2",component:"p",fontWeight:600,sx:{flex:.5},children:[d("rpm_Diastolic")," :"]}),(0,qt.jsx)(op,{sx:{flex:.5},children:(0,qt.jsx)(dM,{component:"span",icon:!1,severity:l(t,"diastolic")?"error":"success",sx:e=>({py:0,px:1,display:"inline-flex",fontSize:e.spacing(1.5),fontWeight:600,"& .MuiAlert-message":{p:e.spacing(.5,0)}}),children:null!==t&&void 0!==t&&null!==(i=t.values)&&void 0!==i&&i.diastolic?null===t||void 0===t||null===(o=t.values)||void 0===o?void 0:o.diastolic:"-"})})]}),(0,qt.jsxs)(pE,{flexDirection:{xs:"column",lg:"row"},gap:{xs:1,lg:2},alignItems:{xs:"left",lg:"center"},sx:{mb:2},children:[(0,qt.jsxs)(Cf,{variant:"body2",component:"p",fontWeight:600,sx:{flex:.5},children:[d("rpm_Pulse")," :"]}),(0,qt.jsx)(op,{sx:{flex:.5},children:(0,qt.jsx)(dM,{component:"span",icon:!1,severity:l(t,"pulse")?"error":"success",sx:e=>({py:0,px:1,display:"inline-flex",fontSize:e.spacing(1.5),fontWeight:600,"& .MuiAlert-message":{p:e.spacing(.5,0)}}),children:null!==t&&void 0!==t&&null!==(a=t.values)&&void 0!==a&&a.pulse?null===t||void 0===t||null===(s=t.values)||void 0===s?void 0:s.pulse:"-"})})]}),(0,qt.jsxs)(pE,{flexDirection:{xs:"column",lg:"row"},gap:{xs:1,lg:2},alignItems:{xs:"left",lg:"center"},sx:{mb:2},children:[(0,qt.jsxs)(Cf,{variant:"body2",component:"p",fontWeight:600,sx:{flex:.5},children:[d("rpm_Vitals")," :"]}),(0,qt.jsx)(op,{sx:{flex:.5},children:(0,qt.jsx)(op,{sx:{flex:.5},children:(0,qt.jsx)(Cf,{variant:"body2",component:"p",children:c(e)})})})]}),(0,qt.jsxs)(pE,{flexDirection:{xs:"column",lg:"row"},gap:{xs:1,lg:2},alignItems:{xs:"left",lg:"center"},children:[(0,qt.jsxs)(Cf,{variant:"body2",component:"p",fontWeight:600,sx:{flex:.5},children:[d("rpm_RecordedOn")," :"]}),(0,qt.jsx)(op,{sx:{flex:.5},children:(0,qt.jsx)(Cf,{variant:"body2",component:"p",children:ta()(null===e||void 0===e?void 0:e.last_vital_frames)?"NA":null===e||void 0===e||null===(u=e.last_vital_frames[0])||void 0===u?void 0:u.ts})})]})]},e.id)}):(0,qt.jsx)(op,{sx:{height:"100px",display:"flex",alignItems:"center",justifyContent:"center"},children:(0,qt.jsx)(Cf,{variant:"body1",component:"p",fontWeight:600,children:"No Last Records"})})]})]})},e.id)}),(0,qt.jsx)(Ff,{item:!0,xs:12,children:(0,qt.jsx)(KE,{pageDetails:i,fetchListFunction:r})})]}):(0,qt.jsx)(Ff,{item:!0,xs:12,children:(0,qt.jsx)(yp,{variant:"outlined",sx:{px:2.5,py:6},children:(0,qt.jsx)(op,{display:"flex",alignItems:"center",children:(0,qt.jsx)("img",{src:t,style:{display:"block",margin:"auto"}})})})})})};const DAe=function(e){let{userData:t,patientList:n,order:r,orderBy:i,setOrder:o,setOrderBy:a,dataParameter:s,initialHeadcells:l,headCellsItems:c,checkState:d,onCheck:u,isSelection:p,nodata:h,fetchPatientList:m,pageDetails:f,viewButton:g,deleteButton:v,moreOptions:x,activeProgram:y,patientCourseCell:b}=e;return(0,qt.jsxs)(Ff,{item:!0,xs:12,children:[(0,qt.jsx)(op,{children:(0,qt.jsx)(UT,{order:r,orderBy:i,setOrder:o,setOrderBy:a,data:n,headCells:c.filter(e=>l.includes(e.id)),dataParameter:s,selected:d,setSelected:u,isSelection:p,noDataImage:h,fetchList:m,pageDetails:f,skeletonVrows:6,className:"theme_scroll",children:(n||[]).map(e=>{const{years:n}=vs(null===e||void 0===e?void 0:e.birth_date);return(0,qt.jsxs)(cw,{hover:!0,selected:d.includes(e.id.toString()),sx:{"&:last-child td, &:last-child th":{border:0}},children:[p&&(0,qt.jsx)(gw,{padding:"checkbox",children:(0,qt.jsx)(Dw,{onChange:u,checked:d.includes(e.id.toString()),name:e.id,color:"primary"})}),l.includes("patient_name")&&(0,qt.jsx)(gw,{children:null!==y&&void 0!==y&&y.is_hospital?(0,qt.jsx)(Lo,{className:"linkClr",to:"".concat(e.id,"/dashboard"),children:e.first_name+" "+e.last_name}):(0,qt.jsx)(Lo,{className:"linkClr",to:"".concat(e.id,"/history"),children:e.first_name+" "+e.last_name})}),l.includes("email")&&(0,qt.jsx)(gw,{children:(0,qt.jsx)(Lo,{to:"mailto:".concat(e.email),children:e.email})}),l.includes("created_at")&&(0,qt.jsx)(gw,{children:e.created_at.toLocaleString()}),l.includes("age")&&(0,qt.jsx)(gw,{children:n}),l.includes("mobile_no")&&(0,qt.jsx)(gw,{children:e.mobile}),l.includes("providers")&&(0,qt.jsx)(gw,{children:(0,qt.jsx)(Lo,{className:"linkClr",to:"/rpm/program/".concat(null===y||void 0===y?void 0:y.code,"/providers/").concat(null===e||void 0===e?void 0:e.id),children:"Click Here"})}),b(e),l.includes("actions")&&(0,qt.jsx)(gw,{children:(0,qt.jsxs)(op,{className:"patients-tour-step3",width:"fit-content",children:[(null===t||void 0===t?void 0:t.showViewPatientBtn)&&g(e),!1,x(e)]})})]},e.id)})})}),(0,qt.jsx)(KE,{pageDetails:f,fetchListFunction:m})]})},NAe=["children","onClose"],LAe=e=>{const{children:t,onClose:n}=e,r=Ko(e,NAe);return(0,qt.jsxs)(fC,(0,i.A)((0,i.A)({sx:{paddingY:"13px",fontWeight:600}},r),{},{children:[t,n?(0,qt.jsx)(wh,{"aria-label":"close",onClick:n,sx:{position:"absolute",right:16,top:8,color:e=>e.palette.grey[500]},children:(0,qt.jsx)(J_.A,{})}):null]}))},IAe=e=>{var t;let{openModal:n,onCloseModal:r,order:o,orderBy:a,setOrder:s,setOrderBy:l,initialHeadcells:c,checkState:d,onCheck:u,nodata:p,fetchAllPatients:h,allPatients:m,isSelection:f,dataParameter:g,newHeadCellsItems:v,newFilterState:x,setNewFilterState:y,newPageDetails:b,addButton:j,setAllPatients:_}=e;const{t:C}=Vg(),w=()=>{b.current_page=1,cs(x.patientName)||h({patientName:x.patientName})},S=()=>{b.current_page=1,y({patientName:"",userMoBile:""}),_([])};return(0,qt.jsx)(We.Fragment,{children:(0,qt.jsxs)(cC,{fullWidth:!0,maxWidth:"md",open:n,onClose:()=>{S(),r()},children:[(0,qt.jsx)(LAe,{onClose:()=>{S(),r()},children:C("rpm_AllUsersList")}),(0,qt.jsx)(bC,{sx:{padding:"24px"},dividers:!0,children:(0,qt.jsxs)(Ff,{container:!0,alignItems:"center",width:"100%",children:[(0,qt.jsx)(Ff,{item:!0,xs:12,children:(0,qt.jsxs)(op,{display:{xs:"block",sm:"flex"},justifyContent:"space-between",alignItems:"center",width:"100%",textAlign:{xs:"center",sm:"unset"},children:[(0,qt.jsx)(op,{mb:{xs:1,sm:0},children:(0,qt.jsx)(op,{fontSize:"16px",color:"#111827",fontWeight:500,children:C("rpm_PleaseProvideMoblieNumber")})}),(0,qt.jsxs)(op,{py:.2,display:"flex",alignItems:"center",gap:1,children:[(0,qt.jsx)(qj,{sx:{flex:1,padding:"2px 14px 2px 0px",width:"310px"},fullWidth:!0,size:"small",placeholder:C("rpm_Enter_Mobile_Number_to_Search"),value:null===x||void 0===x?void 0:x.patientName,onChange:e=>{const t=e.target.value.replace(/[^0-9+]/g,"");y((0,i.A)((0,i.A)({},x),{},{patientName:t}))},onKeyPress:e=>{var t;"Enter"===e.key&&(null===x||void 0===x||null===(t=x.patientName)||void 0===t?void 0:t.replace(/\D/g,"").length)>=6&&w()},inputProps:{maxLength:20},endAdornment:(0,qt.jsxs)(tw,{position:"end",children:[!cs(null===x||void 0===x?void 0:x.patientName)&&(0,qt.jsx)(J_.A,{sx:{cursor:"pointer"},type:"reset",fontSize:"small",onClick:S}),(0,qt.jsx)(sy,{title:C("message:rpm_SearchUserNumber"),placement:"top",children:(0,qt.jsx)(wh,{size:"small",children:(0,qt.jsx)(pM.A,{fontSize:"small"})})})]})}),(0,qt.jsx)(xh,{variant:"contained",onClick:w,disabled:!(null!==x&&void 0!==x&&x.patientName)||(null===x||void 0===x||null===(t=x.patientName)||void 0===t?void 0:t.replace(/\D/g,"").length)<6,sx:{borderRadius:"22px",minWidth:"0px",padding:"12px 12px"},children:(0,qt.jsx)(Jc,{})})]})]})}),(0,qt.jsx)(Ff,{item:!0,xs:12,children:(0,qt.jsx)(op,{mt:3,children:(0,qt.jsx)(UT,{order:o,orderBy:a,setOrder:s,setOrderBy:l,data:m,headCells:v.filter(e=>c.includes(e.id)),dataParameter:g,selected:d,setSelected:u,isSelection:f,noDataImage:p,fetchList:h,newPageDetails:b,skeletonVrows:6,className:"theme_scroll all-user-list",stickyHeader:!0,scrollHeight:"400px",children:null===m||void 0===m?void 0:m.map(e=>(0,qt.jsxs)(cw,{hover:!0,selected:d.includes(null===e||void 0===e?void 0:e.id.toString()),sx:{"&:last-child td, &:last-child th":{border:0}},children:[c.includes("patient_name")&&(0,qt.jsx)(gw,{children:Is(null===e||void 0===e?void 0:e.first_name)+" "+Is(null===e||void 0===e?void 0:e.last_name)}),c.includes("email")&&(0,qt.jsx)(gw,{children:Ls(null===e||void 0===e?void 0:e.email)}),c.includes("mobile_no")&&(0,qt.jsx)(gw,{children:null===e||void 0===e?void 0:e.mobile}),c.includes("actions")&&(0,qt.jsx)(gw,{children:j(e)})]},null===e||void 0===e?void 0:e.id))})})})]})})]})})};function FAe(e){var t,n,r,i;let{userData:o,activeProgram:a,devicesList:s,patientList:l,order:c,orderBy:d,setOrder:u,setOrderBy:p,dataParameter:h,initialHeadcells:m,headCellsItems:f,setHeadcells:g,checkState:v,onCheck:x,isSelection:y,nodata:b,fetchPatientList:j,pageDetails:_,viewButton:C,deleteButton:w,multiDeletePatient:S,moreOptions:A,moreMenu:k,openFilter:T,patientModalOpen:E,viewMode:M,settingModal:O,handlePatientModalToggle:R,handleSettingModalToggle:P,getStatus:D,getNonCompliants:N,getFlags:L,getReadings:I,getReadingColor:F,addNewPatient:$,setSearchDevice:B,getPatientVitals:z,filterState:H,setFilterState:W,patientCourseCell:U,states:V,countries:G,fetchStates:q,patientSuggestions:Y,fetchPatientListSuggestions:Z,fetchAllPatients:K,handleViewPatientModalToggle:X,patientViewModalOpen:Q,allPatients:J,setAllPatients:ee,newHeadCellsItems:te,fetchAllPatientsListSuggestions:ne,allpatientSuggestions:re,addButton:ie,newFilterState:oe,setNewFilterState:ae,newPageDetails:se}=e;const{t:le}=Vg(),ce=[{name:le("rpm_RPM"),url:ld.DOCTOR.PROGRAM},{name:null===a||void 0===a?void 0:a.display_name,url:""}];return(0,qt.jsxs)(op,{sx:{width:"100%"},children:[(0,qt.jsx)(op,{mb:2.5,children:(0,qt.jsx)(BH,{labels:ce})}),(0,qt.jsx)(op,{sx:{mb:2.5},children:(0,qt.jsxs)(Ff,{container:!0,spacing:2,alignItems:"center",children:[(0,qt.jsx)(Ff,{item:!0,xs:!0,children:(0,qt.jsx)(Cf,{variant:"h5",gutterBottom:!0,component:"h5",sx:{marginBottom:"0"},children:le("rpm_Patients")})}),(null===a||void 0===a||null===(t=a.permissions)||void 0===t?void 0:t.showAllPatientListText)&&(0,qt.jsx)(Ff,{item:!0,children:(0,qt.jsx)(Lo,{onClick:X,className:(null===a||void 0===a||null===(n=a.permissions)||void 0===n?void 0:n.showAllPatientListText)&&"patients-tour-step2",children:(0,qt.jsx)(Cf,{color:"customClr.bp",fontWeight:500,component:"span",fontSize:14,children:le("rpm_ViewAllPatient")})})}),(null===a||void 0===a||null===(r=a.permissions)||void 0===r?void 0:r.showAddPatientBtn)&&(0,qt.jsx)(Ff,{item:!0,children:(0,qt.jsxs)(xh,{variant:"contained",color:"primary",disableElevation:!0,onClick:R,className:(null===a||void 0===a||null===(i=a.permissions)||void 0===i?void 0:i.showAddPatientBtn)&&"patients-tour-step1",children:[(0,qt.jsx)(jue.A,{}),(0,qt.jsx)(Cf,{component:"span",className:"hideOnMobile",children:le("rpm_AddPatient")})]})})]})}),(0,qt.jsxs)(Ff,{container:!0,children:[(0,qt.jsx)(Ff,{item:!0,xs:12,children:(0,qt.jsx)(mr,{in:T,children:(0,qt.jsx)(yp,{elevation:0,sx:{p:1},children:(0,qt.jsxs)(Ff,{container:!0,alignItems:"center",spacing:2,children:[(0,qt.jsx)(Ff,{item:!0,lg:7,md:9,xs:10,sm:10,children:(0,qt.jsx)(Lue,{pageDetails:_,fetchListFunction:j,filterState:H,setFilterState:W,patientSuggestions:Y,fetchPatientListSuggestions:Z,placeholder:"Search by name or phone number"})}),(0,qt.jsxs)(Ff,{container:!0,item:!0,lg:5,md:3,sm:2,xs:2,justifyContent:"flex-end",children:["list"===M&&(0,qt.jsx)(Ff,{item:!0,children:(0,qt.jsx)(sy,{title:le("rpm_TableCellSetting"),children:(0,qt.jsx)(sv,{sx:{boxShadow:"none",width:32,height:32,minHeight:"auto"},size:"small",color:"primary",onClick:P,children:(0,qt.jsx)(YC.A,{fontSize:"small",sx:{width:16,height:16}})})})}),v.length>0&&(0,qt.jsx)(Ff,{item:!0,children:(0,qt.jsx)(sy,{title:le("rpm_Delete"),children:(0,qt.jsx)(wh,{color:"error",sx:{bgcolor:"red.50"},onClick:()=>S(v,{}),children:(0,qt.jsx)(xc,{fontSize:"small",sx:{width:16,height:16}})})})})]})]})})})}),"grid"===M?(0,qt.jsx)(PAe,{userData:o,nodata:b,patientList:l,fetchPatientList:j,pageDetails:_,moreOptions:A,getStatus:D,getFlags:L,getReadingColor:F,getNonCompliants:N,getPatientVitals:z}):m.length>0&&(0,qt.jsx)(DAe,{userData:o,patientList:l,order:c,orderBy:d,setOrder:u,setOrderBy:p,dataParameter:h,initialHeadcells:m,headCellsItems:f,checkState:v,onCheck:x,isSelection:y,nodata:b,fetchPatientList:j,pageDetails:_,viewButton:C,deleteButton:w,moreOptions:A,getStatus:D,getNonCompliants:N,getFlags:L,getReadings:I,getPatientVitals:z,patientCourseCell:U,activeProgram:a})]}),k,(0,qt.jsx)(IAe,{activeProgram:a,openModal:Q,onCloseModal:X,fetchAllPatients:K,order:c,orderBy:d,setOrder:u,setOrderBy:p,dataParameter:h,initialHeadcells:m,onCheck:x,nodata:b,allPatients:J,headCellsItems:f,checkState:v,newHeadCellsItems:te,newFilterState:oe,setNewFilterState:ae,fetchAllPatientsListSuggestions:ne,allpatientSuggestions:re,addButton:ie,newPageDetails:se,setAllPatients:ee}),(0,qt.jsx)(OAe,{activeProgram:a,openModal:E,onCloseModal:R,addNewPatient:$,devicesList:s,setSearchDevice:B,states:V,countries:G,fetchStates:q}),(0,qt.jsx)(TE,{open:O,allHeadCells:f,initialHeadcells:m,setHeadcells:g,onClose:P})]})}FAe.defaultProps={headCellsItems:[],initialHeadcells:[],setHeadcells:()=>{},pageDetails:{},order:"",orderBy:"",setOrder:()=>{},setOrderBy:()=>{},dataParameter:"",checkState:"",onCheck:()=>{},isSelection:"",nodata:"",patientList:[],devicesList:[],fetchPatientList:()=>{},editButton:()=>{},viewButton:()=>{},deleteButton:()=>{},multiDeletePatient:()=>{},patientCount:{},flag:"",programList:[],setSearchDevice:()=>{},getNonCompliants:()=>{},getPatientVitals:()=>{},getPatientActiveCourse:()=>{},showFilterColor:"",setShowFilterColor:()=>{},filterState:{},setFilterState:()=>{},fetchProgramScheduleList:()=>{},patientCourseCell:()=>{},programSchedule:[],states:[],countries:[],fetchStates:()=>{},patientSuggestions:[],fetchPatientListSuggestions:()=>{},fetchAllPatients:()=>{},handleViewPatientModalToggle:()=>{},allPatients:[],fetchAllPatientsListSuggestions:()=>{},allpatientSuggestions:[],addButton:()=>{},newFilterState:{},setNewFilterState:()=>{},setAllPatients:()=>{},newPageDetails:{}};const $Ae=FAe;var BAe=n(71723);const zAe=["children","onClose"],HAe=e=>{const{children:t,onClose:n}=e,r=Ko(e,zAe);return(0,qt.jsxs)(fC,(0,i.A)((0,i.A)({sx:{m:0,p:2}},r),{},{children:[t,n?(0,qt.jsx)(wh,{"aria-label":"close",onClick:n,sx:{position:"absolute",right:8,top:8,color:e=>e.palette.grey[500]},children:(0,qt.jsx)(J_.A,{})}):null]}))};function WAe(e){let{disabledButton:t,openModal:n,onCloseModal:r,patientInfo:o,activeProgram:a,allPrograms:s,setTransferProgram:l,transferPatient:c,setSearchProgram:d}=e;const{t:u}=Vg(),p=wt(uu);return(0,qt.jsx)(We.Fragment,{children:(0,qt.jsxs)(cC,{fullWidth:!0,maxWidth:"sm",open:n,onClose:r,children:[(0,qt.jsx)(HAe,{sx:{px:4},onClose:r,children:u("rpm_TransferProgram")+" "+"(".concat(null===o||void 0===o?void 0:o.first_name,"  ").concat(null===o||void 0===o?void 0:o.last_name,")")}),(0,qt.jsx)(bC,{sx:{p:4},dividers:!0,children:(0,qt.jsxs)(Ff,{container:!0,spacing:2,children:[(0,qt.jsxs)(Ff,{item:!0,sm:12,md:5,children:[(0,qt.jsx)(o_,{htmlFor:"program",sx:{mb:.75},children:"Current Program"}),null===a||void 0===a?void 0:a.display_name]}),(0,qt.jsx)(Ff,{item:!0,sm:12,md:1,children:(0,qt.jsx)(op,{mt:4,children:(0,qt.jsx)(BAe.A,{})})}),(0,qt.jsxs)(Ff,{item:!0,sm:12,md:6,children:[(0,qt.jsx)(o_,{htmlFor:"first_name",sx:{mb:.75},children:"Transfer To"}),(0,qt.jsx)(op,{children:(0,qt.jsx)(aj,{fullWidth:!0,size:"small",margin:"dense",id:"course",name:"course",options:cs(s)?[]:s.filter(e=>(null===e||void 0===e?void 0:e.code)!==(null===a||void 0===a?void 0:a.code)),isOptionEqualToValue:(e,t)=>e.id===t.id,getOptionLabel:e=>null===e||void 0===e?void 0:e.display_name,renderOption:(e,t)=>(0,We.createElement)(op,(0,i.A)((0,i.A)({component:"li"},e),{},{key:t.code}),(0,qt.jsx)(op,{children:(0,qt.jsx)(Cf,{variant:"body1",component:"p",children:t.display_name})})),onChange:(e,t)=>{l(null===t||void 0===t?void 0:t.code)},onInputChange:(e,t)=>{d(t?{programName:t}:{programName:""})},renderInput:e=>(0,qt.jsx)(Q_,(0,i.A)((0,i.A)({},e),{},{placeholder:u("rpm_SearchProgram")+"..."}))})})]})]})}),(0,qt.jsx)(vE,{sx:{py:3,px:4},children:(0,qt.jsxs)(Ff,{container:!0,spacing:2,children:[(0,qt.jsx)(Ff,{item:!0,xs:!0}),(0,qt.jsx)(Ff,{item:!0,children:(0,qt.jsx)(xh,{color:"primary",variant:"outlined",onClick:r,children:u("rpm_Cancel")})}),(0,qt.jsx)(Ff,{item:!0,children:(0,qt.jsx)(IM,{loading:p,color:"primary",disableElevation:!0,variant:"contained",type:"submit",disabled:t,onClick:()=>c(o),children:u("rpm_Transfer")})})]})})]})})}function UAe(e){var t,n,r,i;let{userData:o,activeProgram:a,devicesList:s,patientList:l,order:c,orderBy:d,setOrder:u,setOrderBy:p,dataParameter:h,initialHeadcells:m,headCellsItems:f,setHeadcells:g,checkState:v,onCheck:x,isSelection:y,nodata:b,fetchPatientList:j,pageDetails:_,viewButton:C,deleteButton:w,multiDeletePatient:S,moreOptions:A,moreMenu:k,openFilter:T,patientModalOpen:E,viewMode:M,settingModal:O,handlePatientModalToggle:R,handleSettingModalToggle:P,getStatus:D,getNonCompliants:N,getFlags:L,getReadings:I,getReadingColor:F,addNewPatient:$,setSearchDevice:B,getPatientVitals:z,filterState:H,setFilterState:W,patientCourseCell:U,states:V,countries:G,fetchStates:q,patientSuggestions:Y,fetchPatientListSuggestions:Z,fetchAllPatients:K,handleViewPatientModalToggle:X,patientViewModalOpen:Q,allPatients:J,newHeadCellsItems:ee,fetchAllPatientsListSuggestions:te,allpatientSuggestions:ne,addButton:re,newFilterState:ie,setNewFilterState:oe,newPageDetails:ae}=e;const{t:se}=Vg(),le=[{name:se("rpm_RPM"),url:ld.DOCTOR.PROGRAM},{name:null===a||void 0===a?void 0:a.display_name,url:""}];return(0,qt.jsxs)(op,{sx:{width:"100%"},children:[(0,qt.jsxs)(op,{mb:2.5,display:"flex",alignItems:"center",children:[(0,qt.jsx)(BH,{labels:le}),(0,qt.jsx)(Cf,{variant:"h6",gutterBottom:!0,component:"h6",sx:{marginBottom:"0"},children:se("rpm_Patients")})]}),(0,qt.jsx)(op,{sx:{mb:2.5},children:(0,qt.jsxs)(Ff,{container:!0,spacing:2,alignItems:"center",children:[(null===a||void 0===a||null===(t=a.permissions)||void 0===t?void 0:t.showAllPatientListText)&&(0,qt.jsx)(Ff,{item:!0,children:(0,qt.jsx)(Lo,{onClick:X,className:(null===a||void 0===a||null===(n=a.permissions)||void 0===n?void 0:n.showAllPatientListText)&&"patients-tour-step1",children:(0,qt.jsx)(Cf,{color:"customClr.bp",fontWeight:500,component:"span",fontSize:14,children:se("rpm_ViewAllPatient")})})}),(null===a||void 0===a||null===(r=a.permissions)||void 0===r?void 0:r.showAddPatientBtn)&&(0,qt.jsx)(Ff,{item:!0,children:(0,qt.jsxs)(xh,{variant:"contained",color:"primary",disableElevation:!0,onClick:R,className:(null===a||void 0===a||null===(i=a.permissions)||void 0===i?void 0:i.showAddPatientBtn)&&"patients-tour-step1",children:[(0,qt.jsx)(jue.A,{}),(0,qt.jsx)(Cf,{component:"span",className:"hideOnMobile",children:se("rpm_AddPatient")})]})})]})}),(0,qt.jsxs)(Ff,{container:!0,children:[(0,qt.jsx)(Ff,{item:!0,xs:12,children:(0,qt.jsx)(mr,{in:T,children:(0,qt.jsx)(yp,{elevation:0,sx:{p:1},children:(0,qt.jsxs)(Ff,{container:!0,alignItems:"center",spacing:2,children:[(0,qt.jsx)(Ff,{item:!0,lg:7,md:9,xs:10,sm:10,className:"patients-tour-step0",children:(0,qt.jsx)(Lue,{pageDetails:_,fetchListFunction:j,filterState:H,setFilterState:W,patientSuggestions:Y,fetchPatientListSuggestions:Z,placeholder:"Search by name or phone number"})}),(0,qt.jsxs)(Ff,{container:!0,item:!0,lg:5,md:3,sm:2,xs:2,justifyContent:"flex-end",children:["list"===M&&(0,qt.jsx)(Ff,{item:!0,children:(0,qt.jsx)(sy,{title:se("rpm_TableCellSetting"),children:(0,qt.jsx)(sv,{sx:{boxShadow:"none",width:32,height:32,minHeight:"auto"},size:"small",color:"primary",onClick:P,children:(0,qt.jsx)(YC.A,{fontSize:"small",sx:{width:16,height:16}})})})}),v.length>0&&(0,qt.jsx)(Ff,{item:!0,children:(0,qt.jsx)(sy,{title:se("rpm_Delete"),children:(0,qt.jsx)(wh,{color:"error",sx:{bgcolor:"red.50"},onClick:()=>S(v,{}),children:(0,qt.jsx)(xc,{fontSize:"small",sx:{width:16,height:16}})})})})]})]})})})}),"grid"===M?(0,qt.jsx)(PAe,{userData:o,nodata:b,patientList:l,fetchPatientList:j,pageDetails:_,moreOptions:A,getStatus:D,getFlags:L,getReadingColor:F,getNonCompliants:N,getPatientVitals:z}):m.length>0&&(0,qt.jsx)(DAe,{userData:o,patientList:l,order:c,orderBy:d,setOrder:u,setOrderBy:p,dataParameter:h,initialHeadcells:m,headCellsItems:f,checkState:v,onCheck:x,isSelection:y,nodata:b,fetchPatientList:j,pageDetails:_,viewButton:C,deleteButton:w,moreOptions:A,getStatus:D,getNonCompliants:N,getFlags:L,getReadings:I,getPatientVitals:z,patientCourseCell:U})]}),k,(0,qt.jsx)(IAe,{activeProgram:a,openModal:Q,onCloseModal:X,fetchAllPatients:K,order:c,orderBy:d,setOrder:u,setOrderBy:p,dataParameter:h,initialHeadcells:m,onCheck:x,nodata:b,allPatients:J,headCellsItems:f,checkState:v,newHeadCellsItems:ee,newFilterState:ie,setNewFilterState:oe,fetchAllPatientsListSuggestions:te,allpatientSuggestions:ne,addButton:re,newPageDetails:ae}),(0,qt.jsx)(OAe,{activeProgram:a,openModal:E,onCloseModal:R,addNewPatient:$,devicesList:s,setSearchDevice:B,states:V,countries:G,fetchStates:q}),(0,qt.jsx)(TE,{open:O,allHeadCells:f,initialHeadcells:m,setHeadcells:g,onClose:P})]})}UAe.defaultProps={headCellsItems:[],initialHeadcells:[],setHeadcells:()=>{},pageDetails:{},order:"",orderBy:"",setOrder:()=>{},setOrderBy:()=>{},dataParameter:"",checkState:"",onCheck:()=>{},isSelection:"",nodata:"",patientList:[],devicesList:[],fetchPatientList:()=>{},editButton:()=>{},viewButton:()=>{},deleteButton:()=>{},multiDeletePatient:()=>{},patientCount:{},flag:"",programList:[],setSearchDevice:()=>{},getNonCompliants:()=>{},getPatientVitals:()=>{},getPatientActiveCourse:()=>{},showFilterColor:"",setShowFilterColor:()=>{},filterState:{},setFilterState:()=>{},fetchProgramScheduleList:()=>{},patientCourseCell:()=>{},programSchedule:[],states:[],countries:[],fetchStates:()=>{},patientSuggestions:[],fetchPatientListSuggestions:()=>{},fetchAllPatients:()=>{},handleViewPatientModalToggle:()=>{},allPatients:[],fetchAllPatientsListSuggestions:()=>{},allpatientSuggestions:[],addButton:()=>{},newFilterState:{},setNewFilterState:()=>{},newPageDetails:{}};const VAe=UAe,GAe=["content"],qAe=["content"],YAe=["content"];const ZAe=function(e){var t,n,r,o,a,s,l,c,d;let{activeProgram:u}=e;const p=window.innerWidth,h=Nt(),m=wt(cu),f=wt(bu),g=!("true"===us(f,"user_principal.attributes.skip_tour[0]","")),{t:v}=Vg(),x=so(),{enqueueSnackbar:y}=hi(),{programList:b}=(0,We.useContext)(DC),{programId:j}=lo(),{query:_}=js(),C=We.useRef([]),w=We.useRef(null),[S,A]=(0,We.useState)("desc"),[k,T]=(0,We.useState)("created_at"),[E,M]=We.useState(null),[O,R]=We.useState(null),[P,D]=We.useState(null),[N,L]=We.useState(null),[I,F]=(0,We.useState)([]),[$,B]=We.useState(""),[z,H]=We.useState(!1),W=Boolean(N),[U,V]=(0,We.useState)((0,i.A)({},dd)),[G,q]=(0,We.useState)((0,i.A)({},dd)),[Y,Z]=We.useState(null),[K,X]=(0,We.useState)({}),[Q,J]=We.useState({open:!1,data:{}}),ee=$o.getPatientTableView(),te=ee.patientTableView?ee.patientTableView:"list",[ne,re]=We.useState(!0),[ie,oe]=We.useState(!1),[ae,se]=We.useState(!1),[le,ce]=We.useState(te),[de,ue]=We.useState(!1),[pe,he]=We.useState([]),[me,fe]=We.useState("ALL"),[ge,ve]=We.useState(""),[xe,ye]=We.useState(!1),[be,je]=(0,We.useState)([]),[_e,Ce]=(0,We.useState)([]),[we,Se]=We.useState({patientName:""}),[Ae,ke]=We.useState({patientName:"",userMobile:""}),[Te,Ee]=We.useState([]),[Me,Oe]=We.useState([]),[Re,Pe]=We.useState(null),[De,Ne]=We.useState({programName:""}),Le=VC(JA().breakpoints.down("sm")),Ie=Le?["patient_name","email","actions"]:["patient_name","email","created_at","age","mobile_no","providers","courses","vital","compliance","actions"],Fe=async function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{q:""};await h(hue(e,t,"RPM",e=>{let{states:t}=e;je(t.content)},()=>{}))},$e=[{id:"patient_name",label:v("rpm_UserName"),isSort:!0,sortProperty:"first_name"},{id:"email",label:v("rpm_Email"),isSort:!0,sortProperty:"email"},{id:"mobile_no",label:v("rpm_MobileNumber"),isSort:!0,sortProperty:"mobile_no"},{id:"actions",label:v("rpm_Actions"),isSort:!1,sortProperty:"actions"}],Be=[{id:"patient_name",label:v("rpm_PatientName"),isSort:!0,sortProperty:"first_name"},{id:"email",label:v("rpm_Email"),isSort:!0,sortProperty:"email"},{id:"created_at",label:v("rpm_CreatedAt"),isSort:!0,sortProperty:"created_at"},{id:"age",label:v("rpm_Age"),isSort:!0,sortProperty:"dob"},{id:"mobile_no",label:v("rpm_MobileNumber"),isSort:!0,sortProperty:"mobile_no"},{id:"providers",label:v("rpm_Providers"),isSort:!0,sortProperty:"providers"},{id:"courses",label:v("rpm_Schedules"),isSort:!0,sortProperty:"courses"},{id:"vital",label:v("rpm_Vitals"),isSort:!0,sortProperty:"vital"},{id:"compliance",label:v("rpm_Status"),isSort:!0,sortProperty:"compliance"},{id:"actions",label:v("rpm_Actions"),isSort:!1,sortProperty:"actions"}],ze=(e,t)=>{U.current_page=1,Je("",t),null!==t&&fe(t)},He=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(Q.open)C.current=[],J((0,i.A)((0,i.A)({},Q),{},{open:!Q.open}));else{const n=Array.isArray(e)?[...e]:[t.id];C.current=n,w.current=null===t||void 0===t?void 0:t.tenantId,J((0,i.A)((0,i.A)({},Q),{},{open:!Q.open,data:t}))}},Ue=()=>{H(!z)},[Ve,Ge]=We.useState(ta()($o.getHeadCellsPatient())?Ie:$o.getHeadCellsPatient()),qe=function(e){Ge(e),$o.setHeadCellsPatient(e)},Ye=e=>{if(Array.isArray(e))return F(e.map(e=>e.toString()));const t=e.target.name;I.includes(t)?F(I.filter(e=>e!==t)):F(e=>[...e,t])},Ze=e=>{const t=e.currentTarget.attributes["data-id"].value,n=e.currentTarget.attributes["data-name"].value,r=e.currentTarget.attributes["data-lname"].value,i=e.currentTarget.attributes["data-tenant"].value;L({id:t,first_name:n,last_name:r,tenantId:i,position:e.currentTarget})},Ke=()=>{L({})},Xe=e=>e?(0,qt.jsx)(dM,{severity:"error",icon:!1,sx:e=>({py:0,px:1,display:"inline-flex",fontSize:e.spacing(1.5),"& .MuiAlert-message":{p:e.spacing(.5,0)}}),children:(0,qt.jsx)("strong",{children:v("rpm_".concat(e))})}):(0,qt.jsx)(dM,{severity:"success",icon:!1,sx:e=>({py:0,px:1,display:"inline-flex",fontSize:e.spacing(1.5),"& .MuiAlert-message":{p:e.spacing(.5,0)}}),children:(0,qt.jsx)("strong",{children:v("rpm_Compliant")})}),Qe=e=>{var t,n,r;return(0,qt.jsxs)(We.Fragment,{children:[Ve.includes("courses")&&(0,qt.jsx)(gw,{children:ta()(null===e||void 0===e?void 0:e.course_name)?"NA":null===e||void 0===e||null===(t=e.course_name)||void 0===t?void 0:t.map((t,n)=>(0,qt.jsx)(Cf,{variant:"body2",mt:n===(null===e||void 0===e?void 0:e.course_status.length)-1&&.5,children:t},n))}),Ve.includes("vital")&&(0,qt.jsx)(gw,{children:ta()(null===e||void 0===e?void 0:e.course_vital)?"NA":null===e||void 0===e||null===(n=e.course_vital)||void 0===n?void 0:n.map((t,n)=>(0,qt.jsx)(Cf,{variant:"body2",mt:n===(null===e||void 0===e?void 0:e.course_status.length)-1&&.5,children:v("rpm_".concat(t))},n))}),Ve.includes("compliance")&&(0,qt.jsx)(gw,{children:ta()(null===e||void 0===e?void 0:e.course_status)?"NA":null===e||void 0===e||null===(r=e.course_status)||void 0===r?void 0:r.map((t,n)=>(0,qt.jsx)(op,{mt:n===(null===e||void 0===e?void 0:e.course_status.length)-1&&.5,children:Xe(t)},n))})]})},Je=async e=>{try{const{data:t}=await h(al((0,i.A)((0,i.A)({sort_by:k,sort_order:S},U),{},{filterState:e,program_code:null===u||void 0===u?void 0:u.code}))),n=t||{},{content:r}=n,o=Ko(n,GAe),a=e=>{const t=null===r||void 0===r?void 0:r.map(t=>(0,i.A)((0,i.A)({},t),{},{course_info:ta()(e[t.id])?[]:e[t.id]})),n=null===t||void 0===t?void 0:t.map(e=>(0,i.A)((0,i.A)({},e),{},{course_name:e.course_info.map(e=>e.course_name),course_vital:e.course_info.map(e=>e.vital_name),course_status:e.course_info.map(e=>e.status)}));M(n)};await it(r,a),V(e=>(0,i.A)((0,i.A)({},e),{},{last_page:o.last_page,current_page:o.current_page,from:o.from,per_page:o.per_page,to:o.to,total:o.total}))}catch(t){console.log(t)}},et=async e=>{if(null!==e&&void 0!==e&&e.patientName){if(null!==e&&void 0!==e&&e.patientName.trim())try{const{data:t}=await h(al((0,i.A)((0,i.A)({sort_by:k,sort_order:S,filterState:e,program_code:null===u||void 0===u?void 0:u.code},U),{},{current_page:1}))),{content:n}=t||{};R(n)}catch(t){console.log(t)}}else R([]),Je()},tt=async e=>{const t=(0,i.A)((0,i.A)({sort_by:k,sort_order:S},G),{},{newFilterState:e,program_code:null===u||void 0===u?void 0:u.code});try{const{data:e}=await h(sl(j,t)),n=e||{},{content:r}=n,o=Ko(n,qAe);Oe(r),q(e=>(0,i.A)((0,i.A)({},e),{},{last_page:o.last_page,current_page:o.current_page,from:o.from,per_page:o.per_page,to:o.to,total:o.total}))}catch(n){console.log(n)}},nt=async e=>{const t=(0,i.A)((0,i.A)({sort_by:k,sort_order:S,newFilterState:e,program_code:null===u||void 0===u?void 0:u.code},G),{},{current_page:1});if(e.patientName){if(null!==e&&void 0!==e&&e.patientName.trim())try{const{data:e}=await h(sl(j,t)),{content:n}=e||{};Z(n)}catch(n){console.log(n)}}else Z([]),tt()},rt=async e=>{try{await h(((e,t)=>async n=>{n(na(!0));try{const n="".concat(ca.patients,"/").concat(e,"/").concat(t,"/notify");return await Fu(n,{})}finally{n(na(!1))}})(j,e)),h(Zo({subTitle:"message:rpm_PatientRequestedSuccessfully",severity:ud.SUCCESS}))}catch(t){const e=us(t,"response.data.code","");ta()(e)?h(Zo({subTitle:"error:rpm_PatientAlreadyExisted",severity:ud.ERROR})):h(Zo({subTitle:Vd(e,"error:rpm_PatientAlreadyExisted"),severity:ud.ERROR})),console.log(t)}},it=async(e,t)=>{const n=null===e||void 0===e?void 0:e.map(e=>e.id);try{const{data:e}=await h(ul({patientIds:n,programCode:null===u||void 0===u?void 0:u.code}));X(e),t(e)}catch(r){console.log(r)}},ot=()=>{ie?(Ce([]),je([]),oe(!ie)):st()},at=()=>{se(!ae)},st=async()=>{await h(uue(U,"RPM",e=>{let{countries:t,states:n}=e;Ce(t.content),je(n.content),oe(!ie)},()=>{}))},lt=()=>{ue(!de)},ct=()=>{re(!ne)},dt=e=>{"list"===e?(ce("list"),$o.setPatientTableView((0,i.A)((0,i.A)({},ee),{},{patientTableView:"list"}))):(ce("grid"),$o.setPatientTableView((0,i.A)((0,i.A)({},ee),{},{patientTableView:"grid"})))},ut=e=>{const t=e.flags.includes("ACTIVE"),n=e.flags.includes("PASSIVE");return t?(0,qt.jsx)(dM,{severity:"success",icon:!1,sx:e=>({py:0,px:1,display:"inline-flex",fontSize:e.spacing(1.5),"& .MuiAlert-message":{p:e.spacing(.5,0)}}),children:(0,qt.jsx)("strong",{children:"Active"})}):n?(0,qt.jsx)(dM,{severity:"error",icon:!1,sx:e=>({py:0,px:1,display:"inline-flex",fontSize:e.spacing(1.5),"& .MuiAlert-message":{p:e.spacing(.5,0)}}),children:(0,qt.jsx)("strong",{children:"Inactive"})}):void 0},pt=e=>(0,qt.jsx)(qt.Fragment,{children:null===e.flags?"NA":(0,qt.jsx)(pE,{direction:"row",spacing:1,children:(e=>{let t=[];return e.includes("ACTIVE_ALERTS")||e.includes("PASSIVE")||t.push("Normal"),e.includes("ACTIVE_ALERTS")&&t.push("Alert"),e.includes("PASSIVE")&&t.push(""),(0,qt.jsx)(qt.Fragment,{children:t.map(e=>{return e?(0,qt.jsx)(dM,{severity:(t=e,"Alert"===t?"error":"Normal"===t?"info":void 0),icon:!1,sx:e=>({py:0,px:1,display:"inline-flex",fontSize:e.spacing(1.5),"& .MuiAlert-message":{p:e.spacing(.5,0)}}),children:(0,qt.jsx)("strong",{children:e})},e):"NA";var t})})})(e.flags)})}),ht=(e,t)=>{var n;return(null===(n=e.alerts)||void 0===n?void 0:n.findIndex(e=>e.data_name===t))>=0},mt=e=>{var t;return(0,qt.jsx)(qt.Fragment,{children:e.last_vital_frames.length?null===(t=e.last_vital_frames)||void 0===t?void 0:t.map(t=>{var n;return(0,qt.jsxs)(op,{children:[(0,qt.jsxs)(op,{children:[(0,qt.jsx)(dM,{component:"span",icon:!1,severity:ht(t,"systolic")?"error":"success",sx:e=>({py:0,px:1,display:"inline-flex",fontSize:e.spacing(1.5),fontWeight:600,"& .MuiAlert-message":{p:e.spacing(.5,0)}}),children:t.values.systolic?t.values.systolic:"-"}),"/",(0,qt.jsx)(dM,{component:"span",icon:!1,severity:ht(t,"diastolic")?"error":"success",sx:e=>({py:0,px:1,display:"inline-flex",fontSize:e.spacing(1.5),fontWeight:600,"& .MuiAlert-message":{p:e.spacing(.5,0)}}),children:t.values.diastolic?t.values.diastolic:"-"}),"/",(0,qt.jsx)(dM,{component:"span",icon:!1,severity:ht(t,"pulse")?"error":"success",sx:e=>({py:0,px:1,display:"inline-flex",fontSize:e.spacing(1.5),fontWeight:600,"& .MuiAlert-message":{p:e.spacing(.5,0)}}),children:t.values.pulse?t.values.pulse:"-"})]}),(0,qt.jsxs)(Cf,{component:"p",variant:"caption",children:["Time: ",ta()(null===e||void 0===e?void 0:e.last_vital_frames)?"NA":null===e||void 0===e||null===(n=e.last_vital_frames[0])||void 0===n?void 0:n.ts]})]},e.id)}):"NA"})},ft=async(e,t)=>{let{setErrors:n}=t;const r=(0,i.A)((0,i.A)({},e),{},{profile:{gender:null!==e&&void 0!==e&&e.gender?null===e||void 0===e?void 0:e.gender:"",adr_country_name:null!==e&&void 0!==e&&e.country?null===e||void 0===e?void 0:e.country:"",adr_state_name:null!==e&&void 0!==e&&e.state?null===e||void 0===e?void 0:e.state:"",adr_city:null!==e&&void 0!==e&&e.city?null===e||void 0===e?void 0:e.city:"",adr_address1:null!==e&&void 0!==e&&e.address?null===e||void 0===e?void 0:e.address:""},mobile:null!==e&&void 0!==e&&e.mobile?"".concat(null===e||void 0===e?void 0:e.country_code).concat(null===e||void 0===e?void 0:e.mobile):""});try{const{data:e}=await h(ol(null===u||void 0===u?void 0:u.code,r));h(Zo({subTitle:"message:rpm_PatientCreatedSuccessfully",severity:ud.SUCCESS})),x("".concat(null===e||void 0===e?void 0:e.id,"/courses")),Je(),oe(!1)}catch(o){const e=us(o,"response.data.field_errors",{}),t=us(o,"response.data.code","");ta()(e)?ta()(t)?h(Zo({subTitle:"error:rpm_patient_not_created",severity:ud.ERROR})):h(Zo({subTitle:Vd(t,"error:rpm_err_mobile_number_already_exist"),severity:ud.ERROR})):n(Ud(e))}},gt=e=>(0,qt.jsx)(xh,{variant:"outlined","data-id":e.id,color:"primary",sx:{borderRadius:"20px"},onClick:()=>{rt(null===e||void 0===e?void 0:e.id)},children:v("rpm_AddToProgram")}),vt=e=>(0,qt.jsx)(sy,{title:v("rpm_Edit"),children:(0,qt.jsx)(wh,{"data-id":e.id,color:"primary",onClick:()=>console.log(e),children:(0,qt.jsx)(fc,{fontSize:"small",sx:{width:16,height:16}})})}),xt=e=>(0,qt.jsx)(sy,{title:v("rpm_view"),children:(0,qt.jsx)(wh,{"data-id":e.id,color:"primary",onClick:()=>x("".concat(e.id,"/dashboard")),children:(0,qt.jsx)(gc,{fontSize:"small",sx:{width:16,height:16}})})}),yt=e=>(0,qt.jsx)(wh,{"data-id":e.id,color:"error",disabled:!0,children:(0,qt.jsx)(xc,{fontSize:"small",sx:{width:16,height:16}})}),bt=e=>{var t;return(0,qt.jsx)(sy,{title:v("rpm_MoreOption"),children:(0,qt.jsx)(wh,{"data-id":e.id,"data-name":e.first_name,"data-lname":e.last_name,"data-tenant":e.tenant_id,onClick:Ze,size:"small","aria-controls":W?"account-menu":void 0,"aria-haspopup":"true","aria-expanded":W?"true":void 0,color:"primary",disabled:!(null!==u&&void 0!==u&&null!==(t=u.permissions)&&void 0!==t&&t.showViewPatientBtn),children:(0,qt.jsx)(up.A,{})})})},jt=(0,qt.jsxs)(tf,{id:"account-menu",anchorEl:ta()(N)?null:N.position,open:!ta()(N),onClose:Ke,PaperProps:{elevation:0,sx:{overflow:"visible",filter:"drop-shadow(0px 2px 8px rgba(0,0,0,0.32))",mt:1.5,width:"200px","& .MuiAvatar-root":{width:32,height:32,ml:-.5,mr:1},"&:before":{content:'""',display:"block",position:"absolute",top:0,right:14,width:10,height:10,bgcolor:"background.paper",transform:"translateY(-50%) rotate(45deg)",zIndex:0},"& .MuiMenuItem-root":{fontSize:"0.875rem",py:1.5}}},transformOrigin:{horizontal:"right",vertical:"top"},anchorOrigin:{horizontal:"right",vertical:"bottom"},children:[(null===u||void 0===u||null===(t=u.permissions)||void 0===t?void 0:t.showViewPatientBtn)&&(_t=N,(0,qt.jsxs)(mf,{sx:{fontWeight:"500"},onClick:()=>x("".concat(_t.id,"/dashboard")),children:[(0,qt.jsx)(gv,{children:(0,qt.jsx)(oc,{fontSize:"small",color:"primary"})}),v("rpm_medicalCharts")]})),(null===u||void 0===u||null===(n=u.permissions)||void 0===n?void 0:n.showMedicalHistoryList)&&(e=>(0,qt.jsxs)(mf,{sx:{fontWeight:"500"},onClick:()=>x("".concat(e.id,"/history")),children:[(0,qt.jsx)(gv,{children:(0,qt.jsx)(ac,{fontSize:"small",color:"primary"})}),v("rpm_medicalHistory")]}))(N),(null===u||void 0===u||null===(r=u.permissions)||void 0===r?void 0:r.showCourseList)&&(e=>(0,qt.jsxs)(mf,{sx:{fontWeight:"500"},onClick:()=>x("".concat(e.id,"/courses")),children:[(0,qt.jsx)(gv,{children:(0,qt.jsx)(rc,{fontSize:"small",color:"primary"})}),v("rpm_patientCourses")]}))(N),(null===u||void 0===u||null===(o=u.permissions)||void 0===o?void 0:o.showPatientRuleList)&&(e=>(0,qt.jsxs)(mf,{sx:{fontWeight:"500"},onClick:()=>x("".concat(e.id,"/rules")),children:[(0,qt.jsx)(gv,{children:(0,qt.jsx)(cc,{fontSize:"small",color:"primary"})}),v("rpm_patientRules")]}))(N),(null===u||void 0===u||null===(a=u.permissions)||void 0===a?void 0:a.showPrescriptionNoteList_showNoteList)&&(e=>(0,qt.jsxs)(mf,{sx:{fontWeight:"500"},onClick:()=>x("".concat(e.id,"/notes/doctor-note")),children:[(0,qt.jsx)(gv,{children:(0,qt.jsx)(lc,{fontSize:"small",color:"primary"})}),v("rpm_Notes")]}))(N),(null===u||void 0===u||null===(s=u.permissions)||void 0===s?void 0:s.showViewPatientBtn)&&(e=>(0,qt.jsxs)(mf,{sx:{fontWeight:"500"},onClick:()=>x("".concat(e.id,"/details")),children:[(0,qt.jsx)(gv,{children:(0,qt.jsx)(sc,{fontSize:"small",color:"primary"})}),v("rpm_personalDetails")]}))(N),(null===u||void 0===u||null===(l=u.permissions)||void 0===l?void 0:l.isAdmin)&&(0,qt.jsxs)(mf,{sx:{fontWeight:"500"},onClick:()=>H(!z),children:[(0,qt.jsx)(gv,{sx:{pl:"5px"},children:(0,qt.jsx)(Ic,{fontSize:"small",color:"primary"})}),v("rpm_TransferProgram")]}),(null===u||void 0===u||null===(c=u.permissions)||void 0===c?void 0:c.showDeletePatientBtn)&&(e=>(0,qt.jsxs)(mf,{sx:{fontWeight:"500",color:"error.main"},onClick:t=>He(t,e),children:[(0,qt.jsx)(gv,{sx:{pl:"5px",color:"error.main"},children:(0,qt.jsx)(xc,{fontSize:"small",color:"error.main"})}),v("rpm_Delete")]}))(N)]});var _t;const Ct=async function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:we;const t=(0,i.A)({sort_by:k,sort_order:S},U);try{const{data:n}=await h(tbe(null===u||void 0===u?void 0:u.code,t,e)),r=n||{},{content:o}=r,a=Ko(r,YAe);he(o),V(e=>(0,i.A)((0,i.A)({},e),{},{last_page:a.last_page,current_page:a.current_page,from:a.from,per_page:a.per_page,to:a.to,total:a.total}))}catch(n){console.log(n)}};return We.useEffect(()=>{qe(Ie)},[Le]),We.useEffect(()=>{!m||ta()(u)||_||Je()},[m,S,k,u]),We.useEffect(()=>{!m||ta()(u)||_||(async()=>{try{const{data:e}=await h(Ws((0,i.A)((0,i.A)({},U),{},{current_page:1}),De)),{content:t}=e;Ee(t)}catch(e){console.log(e)}})()},[m,S,k,u,De]),We.useEffect(()=>{m&&!ta()(u)&&"all"===_&&ze(0,"ALL"),m&&!ta()(u)&&"compliant"===_&&ze(0,"COMPLIANT"),m&&!ta()(u)&&"noncompliant"===_&&ze(0,"NON_COMPLIANT")},[m,u]),We.useEffect(()=>{m&&(async()=>{const e={search:ge};try{const{data:t}=await h(Cl(e,"UNASSOCIATED")),{content:n}=t||{};D(n)}catch(t){console.log(t)}})()},[m,ge]),We.useEffect(()=>{m&&!ta()(u)&&Ct()},[m,u]),We.useEffect(()=>{h(NC({activeMenuItem:"all_patients"}))},[u]),ta()(u)?(0,qt.jsx)(yp,{variant:"outlined",sx:{px:2.5,py:6,display:"flex",height:"320px"},children:(0,qt.jsx)(op,{alignSelf:"center",sx:{mx:"auto"},children:(0,qt.jsx)(MM,{color:"primary"})})}):(0,qt.jsxs)(qt.Fragment,{children:[ta()(u)||null!==u&&void 0!==u&&null!==(d=u.permissions)&&void 0!==d&&d.showPatientList?p>=575?(0,qt.jsx)($Ae,{userData:null===u||void 0===u?void 0:u.permissions,programList:b,activeProgram:u,devicesList:P,patientList:E,order:S,orderBy:k,setOrder:A,setOrderBy:T,initialHeadcells:Ve,setHeadcells:qe,headCellsItems:Be,dataParameter:"id",checkState:I,onCheck:Ye,isSelection:!1,nodata:GC,fetchPatientList:Je,pageDetails:U,editButton:vt,viewButton:xt,deleteButton:yt,multiDeletePatient:He,moreOptions:bt,moreMenu:jt,patientModalOpen:ie,settingModal:de,openFilter:ne,viewMode:le,handlePatientModalToggle:ot,handleViewPatientModalToggle:at,handleSettingModalToggle:lt,handleOpenFilter:ct,handleViewMode:dt,getStatus:ut,getFlags:pt,getReadingColor:ht,getReadings:mt,addNewPatient:ft,flag:me,handleAlignment:ze,setSearchDevice:ve,showFilterColor:xe,setShowFilterColor:ye,filterState:we,setFilterState:Se,programSchedule:pe,fetchProgramScheduleList:Ct,patientCourseCell:Qe,patientAllVitals:K,states:be,countries:_e,fetchStates:Fe,fetchPatientListSuggestions:et,patientSuggestions:O,fetchAllPatients:tt,patientViewModalOpen:ae,allPatients:Me,setAllPatients:Oe,newHeadCellsItems:$e,fetchAllPatientsListSuggestions:nt,allpatientSuggestions:Y,newFilterState:Ae,setNewFilterState:ke,newPageDetails:G,addButton:gt,sendAddPatientNotification:rt}):(0,qt.jsx)(VAe,{userData:null===u||void 0===u?void 0:u.permissions,programList:b,activeProgram:u,devicesList:P,patientList:E,order:S,orderBy:k,setOrder:A,setOrderBy:T,initialHeadcells:Ve,setHeadcells:qe,headCellsItems:Be,dataParameter:"id",checkState:I,onCheck:Ye,isSelection:!1,nodata:GC,fetchPatientList:Je,pageDetails:U,editButton:vt,viewButton:xt,deleteButton:yt,multiDeletePatient:He,moreOptions:bt,moreMenu:jt,patientModalOpen:ie,settingModal:de,openFilter:ne,viewMode:le,handlePatientModalToggle:ot,handleViewPatientModalToggle:at,handleSettingModalToggle:lt,handleOpenFilter:ct,handleViewMode:dt,getStatus:ut,getFlags:pt,getReadingColor:ht,getReadings:mt,addNewPatient:ft,flag:me,handleAlignment:ze,setSearchDevice:ve,showFilterColor:xe,setShowFilterColor:ye,filterState:we,setFilterState:Se,programSchedule:pe,fetchProgramScheduleList:Ct,patientCourseCell:Qe,patientAllVitals:K,states:be,countries:_e,fetchStates:Fe,fetchPatientListSuggestions:et,patientSuggestions:O,fetchAllPatients:tt,patientViewModalOpen:ae,allPatients:Me,newHeadCellsItems:$e,fetchAllPatientsListSuggestions:nt,allpatientSuggestions:Y,newFilterState:Ae,setNewFilterState:ke,newPageDetails:G,addButton:gt,sendAddPatientNotification:rt}):(0,qt.jsx)(LC,{}),(0,qt.jsx)(qV,{openModal:Q.open,onCloseModal:He,actionFunction:async()=>{try{await h(function(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[];return async r=>{if(!ta()(t)){r(na(!0));try{await Promise.all(t.map(t=>Bu("".concat(ca.patients,"/").concat(e,"/").concat(t,"/delete?tenantId=").concat(n))))}finally{r(na(!1))}}}}(null===u||void 0===u?void 0:u.code,C.current,w.current)),F([]),Je(),Ke(),J((0,i.A)((0,i.A)({},Q),{},{open:!Q.open})),y(v("message:rpm_DeletePatientSuccess"),{variant:"success"})}catch(e){y(e.message,{variant:"error"})}},dataName:"",options:{primaryText:v("message:rpm_DeleteTitle"),secondaryText:v("message:rpm_DeleteBodyText"),btn:{primaryText:v("rpm_Delete"),secondaryText:v("rpm_Cancel"),primaryColor:"error",secondaryColor:"primary"},btnSwap:!0}}),(0,qt.jsx)(WAe,{openModal:z,onCloseModal:Ue,patientInfo:N,activeProgram:u,allPrograms:Te,setTransferProgram:Pe,transferPatient:async e=>{try{await h(Xl(u,Re,e)),h(Zo({subTitle:"message:rpm_PatientTransferedSuccessfully",severity:ud.SUCCESS})),Ue(),Ke(),Je()}catch(t){const e=us(t,"response.data.code","");ta()(e)?h(Zo({subTitle:"error:rpm_PatientTransferFailed",severity:ud.ERROR})):h(Zo({subTitle:Vd(e,"error:rpm_PatientTransferFailed"),severity:ud.ERROR}))}},disabledButton:!Re,setSearchProgram:Ne}),(0,qt.jsx)(zZ,{isTour:g,path:"allPatientsTour",setRenderer:B}),(0,qt.jsx)("input",{type:"hidden",id:"rerenderer",value:$})]})};function KAe(e){var t;let{order:n,orderBy:r,setOrder:i,setOrderBy:o,dataParameter:a,tempDetailsHeadCells:s,checkState:l,onCheck:c,isSelection:d,nodata:u,fetchRuleList:p,pageDetails:h,activeProgram:m,setHeadcells:f,settingModal:g,initialHeadcells:v,handleSettingModalToggle:x,templateDetails:y}=e;const{t:b}=Vg(),j=[{name:b("rpm_RPM"),url:ld.DOCTOR.PROGRAM},{name:null===m||void 0===m?void 0:m.display_name,url:"".concat(ld.DOCTOR.PROGRAM,"/").concat(null===m||void 0===m?void 0:m.code,"/patients")},{name:b("rpm_RxTemplates"),url:"".concat(ld.DOCTOR.PROGRAM,"/").concat(null===m||void 0===m?void 0:m.code,"/templates")},{name:null===y||void 0===y?void 0:y.template_name,url:""}];return(0,qt.jsxs)(op,{sx:{width:"100%"},children:[(0,qt.jsx)(op,{mb:2.5,children:(0,qt.jsx)(BH,{labels:j})}),(0,qt.jsx)(Ff,{container:!0,spacing:2.5,children:(0,qt.jsxs)(Ff,{item:!0,xs:12,children:[(0,qt.jsxs)(op,{sx:{mb:2.5},children:[(0,qt.jsxs)(Ff,{container:!0,spacing:2,alignItems:"center",children:[(0,qt.jsx)(Ff,{item:!0,xs:!0,children:(0,qt.jsx)(Cf,{variant:"h5",component:"h5",children:b("rpm_TemplateDetails")})}),(0,qt.jsx)(Ff,{item:!0,children:(0,qt.jsx)(sy,{title:b("rpm_TableCellSetting"),children:(0,qt.jsx)(sv,{sx:{boxShadow:"none",width:32,height:32,minHeight:"auto"},size:"small",color:"primary",onClick:x,children:(0,qt.jsx)(YC.A,{fontSize:"small",sx:{width:16,height:16}})})})})]}),(0,qt.jsx)(Ff,{container:!0,spacing:2,mt:.05,children:(0,qt.jsx)(Ff,{item:!0,xs:!0,children:(0,qt.jsx)(yH,{variant:"outlined",children:(0,qt.jsx)(wH,{sx:{p:2.5},children:(0,qt.jsxs)(Ff,{container:!0,spacing:2.5,children:[(0,qt.jsx)(Ff,{item:!0,xs:12,md:4,lg:3,children:(0,qt.jsxs)(pE,{flexDirection:"column",gap:{xs:1,lg:2},children:[(0,qt.jsx)(Cf,{variant:"body1",component:"p",fontWeight:"h6.fontWeight",sx:{flex:.4},children:b("rpm_templateName")}),(0,qt.jsx)(op,{sx:{flex:.6},children:cs(y)?(0,qt.jsx)(lS,{}):(0,qt.jsx)(Cf,{variant:"body2",component:"p",color:"primary",children:null!==y&&void 0!==y&&y.template_name?null===y||void 0===y?void 0:y.template_name:"NA"})})]})}),(0,qt.jsx)(Ff,{item:!0,xs:12,md:4,lg:3,children:(0,qt.jsxs)(pE,{flexDirection:"column",gap:{xs:1,lg:2},children:[(0,qt.jsx)(Cf,{variant:"body1",component:"p",fontWeight:"h6.fontWeight",sx:{flex:.4},children:b("rpm_templateId")}),(0,qt.jsx)(op,{sx:{flex:.6},children:cs(y)?(0,qt.jsx)(lS,{}):(0,qt.jsx)(Cf,{variant:"body2",component:"p",color:"primary",children:null!==y&&void 0!==y&&y.tempId?null===y||void 0===y?void 0:y.tempId:"NA"})})]})}),(0,qt.jsx)(Ff,{item:!0,xs:12,md:4,lg:3,children:(0,qt.jsxs)(pE,{flexDirection:"column",gap:{xs:1,lg:2},children:[(0,qt.jsx)(Cf,{variant:"body1",component:"p",fontWeight:"h6.fontWeight",sx:{flex:.4},children:b("rpm_VitalName")}),(0,qt.jsx)(op,{sx:{flex:.6},children:cs(y)?(0,qt.jsx)(lS,{}):(0,qt.jsx)(dM,{component:"span",icon:!1,severity:"info",sx:e=>({py:0,px:1,display:"inline-flex",fontSize:e.spacing(1.5),fontWeight:600,"& .MuiAlert-message":{p:e.spacing(.5,0)}}),children:null!==y&&void 0!==y&&y.vital?b("rpm_".concat(y.vital)):"NA"})})]})}),(0,qt.jsx)(Ff,{item:!0,xs:12,md:4,lg:3,children:(0,qt.jsxs)(pE,{flexDirection:"column",gap:{xs:1,lg:2},children:[(0,qt.jsx)(Cf,{variant:"body1",component:"p",fontWeight:"h6.fontWeight",sx:{flex:.4},children:b("rpm_Duration")}),(0,qt.jsx)(op,{sx:{flex:.6},children:cs(y)?(0,qt.jsx)(lS,{}):(0,qt.jsx)(Cf,{variant:"body2",component:"p",color:"primary",children:null!==y&&void 0!==y&&y.days?(null===y||void 0===y?void 0:y.days)+" days":"NA"})})]})})]})})})})})]}),(0,qt.jsxs)(op,{children:[(0,qt.jsx)(UT,{order:n,orderBy:r,setOrder:i,setOrderBy:o,data:cs(y.medicationList)?[{}]:null===y||void 0===y?void 0:y.medicationList,headCells:null===s||void 0===s?void 0:s.filter(e=>v.includes(e.id)),dataParameter:a,selected:l,setSelected:c,isSelection:d,noDataImage:u,fetchList:p,pageDetails:h,skeletonVrows:6,className:"theme_scroll",children:null===y||void 0===y||null===(t=y.medicationList)||void 0===t?void 0:t.map(e=>{var t,n;return(0,qt.jsxs)(cw,{hover:!0,selected:l.includes(e.id.toString()),sx:{"&:last-child td, &:last-child th":{border:0}},children:[d&&(0,qt.jsx)(gw,{padding:"checkbox",children:(0,qt.jsx)(Dw,{onChange:c,checked:l.includes(e.id.toString()),name:e.id.toString(),color:"primary"})}),v.includes("medication")&&(0,qt.jsx)(gw,{children:null===e||void 0===e?void 0:e.medicine}),v.includes("form")&&(0,qt.jsx)(gw,{children:(null===e||void 0===e?void 0:e.medicine_form)||"NA"}),v.includes("shape")&&(0,qt.jsx)(gw,{children:(null===(t=Fd.find(t=>(null===e||void 0===e?void 0:e.icon_type)===(null===t||void 0===t?void 0:t.key)))||void 0===t?void 0:t.text)||"NA"}),v.includes("dosage")&&(0,qt.jsx)(gw,{children:null===(n=Ld.find(t=>(null===e||void 0===e?void 0:e.frequency)===(null===t||void 0===t?void 0:t.key)))||void 0===n?void 0:n.text}),v.includes("days")&&(0,qt.jsx)(gw,{children:null===e||void 0===e?void 0:e.days}),v.includes("comments")&&(0,qt.jsx)(gw,{children:(null===e||void 0===e?void 0:e.comments)||"NA"})]},e.id)})}),(0,qt.jsx)(KE,{pageDetails:h,fetchListFunction:p}),(0,qt.jsx)(TE,{open:g,allHeadCells:s,initialHeadcells:v,setHeadcells:f,onClose:x})]})]})})]})}KAe.defaultProps={userData:{},tempDetailsHeadCells:[],pageDetails:{},order:"",orderBy:"",setOrder:()=>{},setOrderBy:()=>{},dataParameter:"",checkState:[],onCheck:()=>{},isSelection:!1,nodata:"",templateDetails:{},fetchRuleList:()=>{},activeProgram:{},initialHeadcells:[],setHeadcells:()=>{},settingModal:!1,handleSettingModalToggle:()=>{}};const XAe=KAe,QAe=e=>{let{activeProgram:t}=e;const{programId:n,templateId:r}=lo(),i=Nt(),o=wt(cu),[a,s]=(0,We.useState)({}),[l,c]=We.useState(!1),[d,u]=We.useState(cs($o.getTemplateDetailsHeadcells())?["medication","form","shape","dosage","days","comments"]:$o.getTemplateDetailsHeadcells()),p=async()=>{try{const{data:e}=await i(Kl(n,r)),t=await function(e){const{vital:t,medications_list:n,intervals:r,id:i,created_by:o,name:a,days:s}=e,l=null===n||void 0===n?void 0:n.map(e=>{const t=function(e,t){if(e&&t){const n=atob(e),r=new Array(n.length);for(let e=0;e<n.length;e++)r[e]=n.charCodeAt(e);const i=new Uint8Array(r),o=new Blob([i],{type:"image/jpeg"});return new File([o],t,{type:"image/jpeg"})}return null}(e.image,"".concat(e.medicine,".jpg")),n=[],i=r.some(t=>{var n;return(null===(n=t.medicines)||void 0===n?void 0:n.includes(e.id))&&null===t.start_time});if(e.frequency>=1&&e.frequency<=4&&i)for(let r=0;r<e.frequency;r++)n.push({start_time:null,interval:null});else r.filter(t=>{var n;return null===(n=t.medicines)||void 0===n?void 0:n.includes(e.id)}).forEach(e=>{let{id:t,start_time:r,stop_after:i}=e;n.push({id:t,start_time:r?Ds(r,hd):null,interval:i})});return{id:e.id,medicine:e.medicine,medicine_form:e.medicine_form,icon_type:e.icon_type,dose:e.dose,unit:e.unit,color:e.color,image:t,start_date:sa()(new Date).startOf("day").valueOf(),end_date:null,days:e.days,repetition_kind:e.frequency>4?vd:gd,timing:n,frequency:e.frequency,comments:e.comments}});return{vital:t,tempId:i,created_by:o,template_name:a,days:s,medicationList:l}}(e);s(t)}catch(e){console.log(e)}};const h=[{id:"medication",label:_e("rpm_Medication"),isSort:!1,sortProperty:"medication"},{id:"form",label:_e("rpm_Form"),isSort:!1,sortProperty:"form"},{id:"shape",label:_e("rpm_Shape&Color"),isSort:!1,sortProperty:"shape"},{id:"dosage",label:_e("rpm_Frequency"),isSort:!1,sortProperty:"dosage"},{id:"days",label:_e("rpm_Days"),isSort:!1,sortProperty:"days"},{id:"comments",label:_e("rpm_Comments"),isSort:!1,sortProperty:"comments"}];return We.useEffect(()=>{o&&p()},[o]),We.useEffect(()=>{i(NC({activeMenuItem:"prescription_template"}))},[]),(0,qt.jsx)("div",{children:(0,qt.jsx)(XAe,{templateDetails:a,isSelection:!1,nodata:GC,activeProgram:t,tempDetailsHeadCells:h,setHeadcells:function(e){u(e),$o.setTemplateDetailsHeadcells(e)},settingModal:l,initialHeadcells:d,handleSettingModalToggle:()=>{c(!l)}})})},JAe=e=>{let{chips:t,activeProgram:n,getChips:r}=e;const{t:i}=Vg(),o=so(),a=Nt(),[s,l]=We.useState(null===t||void 0===t?void 0:t.complaints),[c,d]=We.useState(null===t||void 0===t?void 0:t.advices),[u,p]=We.useState(null===t||void 0===t?void 0:t.diagnosis),[h,m]=We.useState(null===t||void 0===t?void 0:t.tests),[f,g]=We.useState(!1),[v,x]=We.useState(!1),[y,b]=We.useState(!1),[j,_]=We.useState(!1),C=f?s:null===s||void 0===s?void 0:s.slice(0,10),w=j?h:null===h||void 0===h?void 0:h.slice(0,10),S=v?u:null===u||void 0===u?void 0:u.slice(0,10),A=y?c:null===c||void 0===c?void 0:c.slice(0,10),k=(e,t,n)=>{t(null===n||void 0===n?void 0:n.filter(t=>(null===t||void 0===t?void 0:t.name)!==(null===e||void 0===e?void 0:e.name)))},T=(e,t,n,r,i,o)=>{if("selectOption"===r){const t=null===n||void 0===n?void 0:n.filter(t=>{var n;return!(null!==i&&void 0!==i&&null!==(n=i[e])&&void 0!==n&&n.some(e=>e===t))}),r=[...i[e],...t];o(e,r)}else if("removeOption"==r){var a,s;const t=null===i||void 0===i||null===(a=i[e])||void 0===a||null===(s=a.find(e=>!n.includes(e)))||void 0===s?void 0:s.name;if(t){var l;const n=null===i||void 0===i||null===(l=i["".concat(e,"Details")])||void 0===l?void 0:l.filter(e=>e.name!==t);o("".concat(e,"Details"),n)}}else o(e,[]),o("".concat(e,"Details"),[])};return(0,qt.jsx)(Kz,{onSubmit:async e=>{const t=(e,t)=>{const n=new Map;return null===e||void 0===e||e.concat(t).forEach(e=>{n.set(JSON.stringify(e),e)}),Array.from(n.values())},i={allComplaints:cs(null===e||void 0===e?void 0:e.complaints)?s:t(s,e.complaints),allDiagnosis:cs(null===e||void 0===e?void 0:e.diagnosis)?u:t(u,e.diagnosis),allAdvices:cs(null===e||void 0===e?void 0:e.advices)?c:t(c,e.advices),allTests:cs(null===e||void 0===e?void 0:e.tests)?h:t(h,e.tests)};await a(((e,t)=>async n=>{const r=$o.getAccessToken(),i={program:e,tenant_id:null===r||void 0===r?void 0:r.accountId,complaints:null===t||void 0===t?void 0:t.allComplaints,diagnosis:null===t||void 0===t?void 0:t.allDiagnosis,advice:null===t||void 0===t?void 0:t.allAdvices,tests:null===t||void 0===t?void 0:t.allTests};n(na(!0));try{const e="".concat(ua.medical,"/program/consultation-info");return await Fu(e,i)}finally{n(na(!1))}})(null===n||void 0===n?void 0:n.code,i)),a(Zo({subTitle:"message:rpm_SettingsSavedSuccessfully",severity:ud.SUCCESS})),r()},initialValues:{complaints:[],diagnosis:[],tests:[],advices:[]},children:e=>{let{values:t,setFieldValue:n}=e;return(0,qt.jsxs)(nH,{children:[(0,qt.jsxs)(yH,{variant:"outlined",sx:{mb:"20px"},className:"fieldSizing",children:[(0,qt.jsx)(nW,{title:(0,qt.jsx)(Ff,{container:!0,spacing:2,alignItems:"center",children:(0,qt.jsx)(Ff,{item:!0,xs:!0,children:(0,qt.jsx)(Cf,{variant:"h6",component:"h6",color:"customClr.bp",fontWeight:600,fontSize:16,children:i("rpm_Symptoms")})})}),sx:{py:1.5,bgcolor:"primary.theme.50"}}),(0,qt.jsx)(wH,{sx:{py:2,":last-child":{pb:4},border:"1px solid #efefef",borderRadius:"0 0 6px 6px"},className:"symptomsTypeWeb",children:(0,qt.jsxs)(Ff,{container:!0,spacing:2,children:[(0,qt.jsx)(Ff,{item:!0,xs:12,md:6,lg:6,pt:0,children:(0,qt.jsx)(d_,{fullWidth:!0,children:(0,qt.jsx)(tH,{name:"complaints",component:$_e,placeholder:"Type for more",options:s||[],onValueChange:(e,r,i)=>{T("complaints",0,r,i,t,n)},variant:"outlined",margin:"normal",fullWidth:!0})})}),(0,qt.jsx)(Ff,{item:!0,xs:12,md:12,lg:12,pt:0,children:(0,qt.jsxs)(op,{display:"flex",alignItems:"baseline",children:[" ",(0,qt.jsx)(o_,{id:"checkbox-select-label",fontWeight:600,sx:{fontSize:"12px",flex:"0 0 60px"},children:"Related:"}),(0,qt.jsxs)(op,{sx:{flex:"1"},children:[null===C||void 0===C?void 0:C.map((e,n)=>{var r;const i=null===t||void 0===t||null===(r=t.complaints)||void 0===r?void 0:r.some(t=>t.name===e.name);return(0,qt.jsx)(Eb,{label:e.name,style:{marginRight:"3px",marginBottom:"3px",backgroundColor:i?"rgba(0, 0, 0, 0.12)":"rgba(0, 0, 0, 0.05)"},onDelete:()=>k(e,l,s)},n)}),(0,qt.jsx)(xh,{sx:{fontWeight:"600"},color:"primary",onClick:()=>g(e=>!e),children:i(f?"rpm_ViewLess":"rpm_ViewAll")})]})]})})]})})]}),(0,qt.jsxs)(yH,{variant:"outlined",sx:{mb:"20px"},className:"fieldSizing",children:[(0,qt.jsx)(nW,{title:(0,qt.jsx)(Ff,{container:!0,spacing:2,alignItems:"center",children:(0,qt.jsx)(Ff,{item:!0,xs:!0,children:(0,qt.jsx)(Cf,{variant:"h6",component:"h6",color:"customClr.bp",fontWeight:600,fontSize:16,children:i("rpm_Diagnosis")})})}),sx:{py:1.5,bgcolor:"primary.theme.50"}}),(0,qt.jsx)(wH,{sx:{py:2,":last-child":{pb:4},border:"1px solid #efefef",borderRadius:"0 0 6px 6px"},className:"symptomsTypeWeb",children:(0,qt.jsxs)(Ff,{container:!0,spacing:2,children:[(0,qt.jsx)(Ff,{item:!0,xs:12,md:6,lg:6,pt:0,children:(0,qt.jsx)(d_,{fullWidth:!0,children:(0,qt.jsx)(tH,{name:"diagnosis",component:$_e,placeholder:"Type for more",options:u||[],onValueChange:(e,r,i)=>{T("diagnosis",0,r,i,t,n)},variant:"outlined",margin:"normal",fullWidth:!0})})}),(0,qt.jsx)(Ff,{item:!0,xs:12,md:12,lg:12,pt:0,children:(0,qt.jsxs)(op,{display:"flex",alignItems:"baseline",children:[" ",(0,qt.jsx)(o_,{id:"checkbox-select-label",fontWeight:600,sx:{fontSize:"12px",flex:"0 0 60px"},children:"Related:"}),(0,qt.jsxs)(op,{sx:{flex:"1"},children:[null===S||void 0===S?void 0:S.map((e,n)=>{var r;const i=null===t||void 0===t||null===(r=t.diagnosis)||void 0===r?void 0:r.some(t=>t.name===e.name);return(0,qt.jsx)(Eb,{label:e.name,style:{marginRight:"3px",marginBottom:"3px",backgroundColor:i?"rgba(0, 0, 0, 0.12)":"rgba(0, 0, 0, 0.05)"},onDelete:()=>k(e,p,u)},n)}),(0,qt.jsx)(xh,{sx:{fontWeight:"600"},color:"primary",onClick:()=>x(e=>!e),children:i(v?"rpm_ViewLess":"rpm_ViewAll")})]})]})})]})})]}),(0,qt.jsxs)(yH,{variant:"outlined",sx:{mb:"20px"},children:[(0,qt.jsx)(nW,{title:(0,qt.jsx)(Ff,{container:!0,spacing:2,alignItems:"center",children:(0,qt.jsx)(Ff,{item:!0,xs:!0,children:(0,qt.jsx)(Cf,{variant:"h6",component:"h6",color:"customClr.bp",fontWeight:600,placeholder:"Advice...",fontSize:16,children:i("rpm_advice")})})}),sx:{py:1.5,bgcolor:"primary.theme.50"}}),(0,qt.jsx)(wH,{sx:{py:2,":last-child":{pb:4},border:"1px solid #efefef",borderRadius:"0 0 6px 6px"},className:"symptomsTypeWeb",children:(0,qt.jsxs)(Ff,{container:!0,spacing:2,children:[(0,qt.jsx)(Ff,{item:!0,xs:12,md:6,lg:6,pt:0,children:(0,qt.jsx)(d_,{fullWidth:!0,children:(0,qt.jsx)(tH,{name:"advices",component:$_e,placeholder:"Type for more",options:c||[],onValueChange:(e,r,i)=>{T("advices",0,r,i,t,n)},variant:"outlined",margin:"normal",fullWidth:!0})})}),(0,qt.jsx)(Ff,{item:!0,xs:12,md:12,lg:12,pt:0,children:(0,qt.jsxs)(op,{display:"flex",alignItems:"baseline",children:[(0,qt.jsx)(o_,{id:"checkbox-select-label",fontWeight:600,sx:{fontSize:"12px",flex:"0 0 60px"},children:"Related:"}),(0,qt.jsxs)(op,{sx:{flex:"1"},children:[null===A||void 0===A?void 0:A.map((e,n)=>{var r;const i=null===t||void 0===t||null===(r=t.advices)||void 0===r?void 0:r.some(t=>t.name===e.name);return(0,qt.jsx)(Eb,{label:e.name,style:{marginRight:"3px",marginBottom:"3px",backgroundColor:i?"rgba(0, 0, 0, 0.12)":"rgba(0, 0, 0, 0.05)"},onDelete:()=>k(e,d,c)},n)}),(0,qt.jsx)(xh,{sx:{fontWeight:"600"},color:"primary",onClick:()=>b(e=>!e),children:i(y?"rpm_ViewLess":"rpm_ViewAll")})]})]})})]})})]}),(0,qt.jsxs)(yH,{variant:"outlined",sx:{mb:"20px"},className:"fieldSizing",children:[(0,qt.jsx)(nW,{title:(0,qt.jsx)(Ff,{container:!0,spacing:2,alignItems:"center",children:(0,qt.jsx)(Ff,{item:!0,xs:!0,children:(0,qt.jsx)(Cf,{variant:"h6",component:"h6",color:"customClr.bp",fontWeight:600,fontSize:16,children:i("rpm_testrequest")})})}),sx:{py:1.5,bgcolor:"primary.theme.50"}}),(0,qt.jsx)(wH,{sx:{py:2,":last-child":{pb:4},border:"1px solid #efefef",borderRadius:"0 0 6px 6px"},className:"symptomsTypeWeb",children:(0,qt.jsxs)(Ff,{container:!0,spacing:2,children:[(0,qt.jsx)(Ff,{item:!0,xs:12,md:6,lg:6,pt:0,children:(0,qt.jsx)(d_,{fullWidth:!0,children:(0,qt.jsx)(tH,{name:"tests",component:$_e,placeholder:"Type for more",options:h||[],onValueChange:(e,r,i)=>{T("tests",0,r,i,t,n)},variant:"outlined",margin:"normal",fullWidth:!0})})}),(0,qt.jsx)(Ff,{item:!0,xs:12,md:12,lg:12,pt:0,children:(0,qt.jsxs)(op,{display:"flex",alignItems:"baseline",children:[(0,qt.jsx)(o_,{id:"checkbox-select-label",fontWeight:600,sx:{fontSize:"12px",flex:"0 0 60px"},children:"Related:"}),(0,qt.jsxs)(op,{sx:{flex:"1"},children:[null===w||void 0===w?void 0:w.map((e,n)=>{var r;const i=null===t||void 0===t||null===(r=t.tests)||void 0===r?void 0:r.some(t=>t.name===e.name);return(0,qt.jsx)(Eb,{label:e.name,onDelete:()=>k(e,m,h),style:{marginRight:"3px",marginBottom:"3px",backgroundColor:i?"rgba(0, 0, 0, 0.12)":"rgba(0, 0, 0, 0.05)"}},n)}),(0,qt.jsx)(xh,{sx:{fontWeight:"600"},color:"primary",onClick:()=>_(e=>!e),children:i(j?"rpm_ViewLess":"rpm_ViewAll")})]})]})})]})})]}),(0,qt.jsxs)(op,{mt:2,children:[(0,qt.jsx)(xh,{variant:"outlined",color:"primary",onClick:()=>o(-1),sx:{marginRight:"10px"},children:i("rpm_Cancel")}),(0,qt.jsx)(xh,{variant:"contained",type:"submit",sx:{marginLeft:"0px"},children:i("rpm_Save")})]})]})}})};const eke=n.p+"static/media/generalInfoLogoImage.7af0e972d935186d8b55ae19ec8896f3.svg",tke={display_name:"",city:"",country:"",state:"",address:"",image:"",def:"",facility_type:""},nke=e=>{let{editProgram:t,fetchStates:n,countries:r,statesRelated:i,programData:o}=e;const{t:a}=Vg(),s=so(),l=(0,We.useRef)(null),[c,d]=(0,We.useState)(""),{image:u=""}=ls(o,tke);return(0,We.useEffect)(()=>{if(u instanceof File){const e=URL.createObjectURL(u);return d(e),()=>URL.revokeObjectURL(e)}d(u||eke)},[u]),(0,qt.jsx)(Kz,{initialValues:ls(o,tke),validationSchema:RU.addNewProgram,onSubmit:t,enableReinitialize:!0,children:e=>{let{values:t,setFieldValue:o}=e;return(0,qt.jsx)(nH,{children:(0,qt.jsxs)(yH,{variant:"outlined",sx:{mb:"20px"},className:"fieldSizing",children:[(0,qt.jsx)(op,{mt:2,children:(0,qt.jsxs)(Ff,{container:!0,spacing:2,children:[(0,qt.jsxs)(Ff,{item:!0,md:2,xs:12,sm:12,children:[(0,qt.jsx)(op,{sx:{bgcolor:"#EBEBFF",height:"200px",width:"100%",borderRadius:"6px",objectFit:"contain",display:"flex",alignItems:"center",justifyContent:"center"},children:(0,qt.jsx)(op,{className:"logoImageSettings",children:(0,qt.jsx)("img",{src:c instanceof File?URL.createObjectURL(c):c||eke,width:100,height:100})})}),(0,qt.jsxs)(op,{display:"flex",alignItems:"center",justifyContent:"center",mt:2,children:[(0,qt.jsxs)(op,{className:"upload-input-text",sx:{lineHeight:"0"},children:[(0,qt.jsx)("input",{ref:l,id:"image",name:"image",type:"file",onChange:e=>{o("image",e.currentTarget.files[0]),d(e.currentTarget.files[0])}}),(0,qt.jsx)(o_,{htmlFor:"image",sx:{cursor:"pointer",lineHeight:"0px"},children:(0,qt.jsx)(Wc,{})})]}),(0,qt.jsx)(xh,{disableElevation:!0,disableFocusRipple:!0,disableRipple:!0,disableTouchRipple:!0,disabled:!c||c===eke,sx:{"&.MuiButtonBase-root:hover":{bgcolor:"transparent"},opacity:c&&c!==eke?1:.5},onClick:()=>{o("image",""),d(eke),l.current&&(l.current.value=null)},children:(0,qt.jsx)(Uc,{})}),(0,qt.jsx)(dH,{name:"image",children:e=>(0,qt.jsx)(v_,{error:!0,children:a(e,{field:a("rpm_image")})})})]})]}),(0,qt.jsx)(Ff,{item:!0,md:10,xs:12,sm:12,children:(0,qt.jsxs)(Ff,{container:!0,spacing:2,children:[(0,qt.jsxs)(Ff,{item:!0,md:6,xs:12,sm:12,children:[(0,qt.jsxs)(op,{mb:3,children:[(0,qt.jsx)(Cf,{variant:"body1",component:"p",fontWeight:"h6.fontWeight",sx:{flex:.4,marginBottom:"4px"},fontSize:14,children:a("rpm_ProgramName")}),(0,qt.jsx)(tH,{fullWidth:!0,as:qj,id:"display_name",name:"display_name",color:"primary",size:"small",endAdornment:(0,qt.jsx)(tw,{position:"end",children:(0,qt.jsx)(sy,{title:a("message:rpm_DisplayNameHelp"),placement:"top",children:(0,qt.jsx)(wh,{size:"small",children:(0,qt.jsx)(pM.A,{fontSize:"small"})})})})}),(0,qt.jsx)(dH,{name:"display_name",children:e=>(0,qt.jsx)(v_,{error:!0,children:a(e,{field:a("rpm_DisplayName")})})})]}),(0,qt.jsxs)(op,{mb:3,children:[(0,qt.jsx)(Cf,{variant:"body1",component:"p",fontWeight:"h6.fontWeight",sx:{flex:.4,marginBottom:"4px"},fontSize:14,children:a("rpm_Country")}),(0,qt.jsxs)(op,{className:"autocomplete",sx:{position:"relative"},children:[(0,qt.jsx)(tH,{component:KK,size:"small",id:"country",optionId:"isoCode",name:"country",options:r,browserAutocomplete:!1,valueKey:"isoCode",nameKey:"name",onValueChange:(e,t)=>{o("country",t),o("state",""),n(t)},variant:"outlined",margin:"normal",fullWidth:!0}),(0,qt.jsx)(sy,{title:a("message:rpm_ProgramCountryHelp"),placement:"top",children:(0,qt.jsx)(wh,{size:"small",sx:{position:"absolute",right:"0.875rem",top:"0.25rem"},children:(0,qt.jsx)(pM.A,{fontSize:"small"})})})]})]}),(0,qt.jsxs)(op,{mb:3,children:[(0,qt.jsx)(Cf,{variant:"body1",component:"p",fontWeight:"h6.fontWeight",sx:{flex:.4,marginBottom:"4px"},fontSize:14,children:a("rpm_City")}),(0,qt.jsx)(tH,{fullWidth:!0,as:qj,id:"city",name:"city",color:"primary",size:"small",endAdornment:(0,qt.jsx)(tw,{position:"end",children:(0,qt.jsx)(sy,{title:a("message:rpm_ProgramCityHelp"),placement:"top",children:(0,qt.jsx)(wh,{size:"small",children:(0,qt.jsx)(pM.A,{fontSize:"small"})})})})}),(0,qt.jsx)(dH,{name:"city",children:e=>(0,qt.jsx)(v_,{error:!0,children:a(e,{field:a("rpm_ProgramCity")})})})]}),(0,qt.jsx)(op,{children:(0,qt.jsx)(op,{display:"flex",justifyContent:"space-between",alignItems:"center",px:1,borderRadius:"8px",children:(0,qt.jsx)(wE,{label:a("rpm_defaultProgram"),control:(0,qt.jsx)(tH,{as:Dw,checked:t.def,type:"checkbox",sx:{padding:"8px"},id:"reading_reminder_enabled",name:"reading_reminder_enabled",onChange:()=>o("def",!t.def)})})})})]}),(0,qt.jsxs)(Ff,{item:!0,md:6,xs:12,sm:12,children:[(0,qt.jsxs)(op,{mb:3,children:[(0,qt.jsx)(Cf,{variant:"body1",component:"p",fontWeight:"h6.fontWeight",sx:{flex:.4,marginBottom:"4px"},fontSize:14,children:a("rpm_facility_type")}),(0,qt.jsx)(tH,{as:G_,fullWidth:!0,className:"select-custom-field",size:"small",id:"facility_type",name:"facility_type",variant:"outlined",endAdornment:(0,qt.jsx)(tw,{position:"end",sx:{position:"absolute",right:"19px"},children:(0,qt.jsx)(sy,{title:a("message:rpm_FacilityProgramHelp"),placement:"top",children:(0,qt.jsx)(wh,{size:"small",disableRipple:!0,sx:{p:0},children:(0,qt.jsx)(pM.A,{fontSize:"small"})})})}),children:eu.map(e=>(0,qt.jsx)(mf,{value:null===e||void 0===e?void 0:e.value,children:a("rpm_".concat(null===e||void 0===e?void 0:e.name))},null===e||void 0===e?void 0:e.value))}),(0,qt.jsx)(dH,{name:"facility_type",children:e=>(0,qt.jsx)(v_,{error:!0,children:a(e,{field:a("rpm_facility_type")})})})]}),(0,qt.jsxs)(op,{mb:3,children:[(0,qt.jsx)(Cf,{variant:"body1",component:"p",fontWeight:"h6.fontWeight",sx:{flex:.4,marginBottom:"4px"},fontSize:14,children:a("rpm_Address")}),(0,qt.jsx)(tH,{fullWidth:!0,as:qj,id:"address",name:"address",color:"primary",size:"small",endAdornment:(0,qt.jsx)(tw,{position:"end",children:(0,qt.jsx)(sy,{title:a("message:rpm_AddressHelp"),placement:"top",children:(0,qt.jsx)(wh,{size:"small",children:(0,qt.jsx)(pM.A,{fontSize:"small"})})})})})]}),(0,qt.jsxs)(op,{mb:3,children:[(0,qt.jsx)(Cf,{variant:"body1",component:"p",fontWeight:"h6.fontWeight",sx:{flex:.4,marginBottom:"4px"},fontSize:14,children:a("rpm_State")}),(0,qt.jsxs)(op,{className:"autocomplete",sx:{position:"relative"},children:[(0,qt.jsx)(tH,{component:KK,size:"small",id:"state",optionId:"isoCode",name:"state",options:i,valueKey:"isoCode",nameKey:"name",dependent:!0,variant:"outlined",margin:"normal",fullWidth:!0}),(0,qt.jsx)(sy,{title:a("message:rpm_ProgramStateHelp"),placement:"top",children:(0,qt.jsx)(wh,{size:"small",sx:{position:"absolute",right:"0.875rem",top:"0.25rem"},children:(0,qt.jsx)(pM.A,{fontSize:"small"})})})]}),(0,qt.jsx)(dH,{name:"state",children:e=>(0,qt.jsx)(v_,{error:!0,children:a(e,{field:a("rpm_ProgramState")})})})]})]})]})})]})}),(0,qt.jsxs)(op,{mt:2,children:[(0,qt.jsx)(xh,{variant:"outlined",color:"primary",onClick:()=>s(-1),sx:{marginRight:"10px"},children:a("rpm_Cancel")}),(0,qt.jsx)(xh,{variant:"contained",type:"submit",sx:{marginLeft:"0px"},children:a("rpm_Save")})]})]})})}})},rke=e=>{var t,n,r;let{addNotifications:o,notifications:a}=e;const{t:s}=Vg(),l=so(),c={days:null===a||void 0===a||null===(t=a.follow_up_notification)||void 0===t?void 0:t.follow_up_day,time:sa().utc(null===a||void 0===a||null===(n=a.follow_up_notification)||void 0===n?void 0:n.follow_up_time,"hh:mm a").toDate(),isEditable:null===a||void 0===a||null===(r=a.follow_up_notification)||void 0===r?void 0:r.send_follow_up_reminder_flag};return(0,qt.jsx)(qt.Fragment,{children:(0,qt.jsx)(Kz,{onSubmit:e=>{o(e)},initialValues:c,enableReinitialize:!0,children:e=>{let{values:t,setFieldValue:n}=e;return(0,qt.jsxs)(qt.Fragment,{children:[" ",(0,qt.jsx)(nH,{children:(0,qt.jsxs)(yH,{variant:"outlined",sx:{mb:"20px",p:"0 10px"},className:"fieldSizing",children:[(0,qt.jsxs)(op,{children:[(0,qt.jsx)(wE,{control:(0,qt.jsx)(dye,{checked:t.isEditable,onChange:()=>n("isEditable",!t.isEditable)}),label:"Enable to edit the information",fontSize:14}),(0,qt.jsxs)(Ff,{container:!0,spacing:2,mt:1,children:[(0,qt.jsx)(Ff,{item:!0,md:6,children:(0,qt.jsxs)(op,{children:[(0,qt.jsx)(Cf,{variant:"body1",component:"p",fontWeight:"h6.fontWeight",sx:{flex:.4,marginBottom:"4px"},fontSize:14,children:"Days in Advance"}),(0,qt.jsxs)(tH,{as:G_,fullWidth:!0,size:"small",id:"days",name:"days",variant:"outlined",disabled:!t.isEditable,children:[(0,qt.jsx)(mf,{value:1,children:"1"}),(0,qt.jsx)(mf,{value:2,children:"2"}),(0,qt.jsx)(mf,{value:3,children:"3"}),(0,qt.jsx)(mf,{value:4,children:"4"})]})]})}),(0,qt.jsx)(Ff,{item:!0,md:6,children:(0,qt.jsxs)(op,{position:"relative",children:[(0,qt.jsx)(Cf,{variant:"body1",component:"p",fontWeight:"h6.fontWeight",sx:{flex:.4,marginBottom:"4px"},fontSize:14,children:"Time of the day"}),(0,qt.jsx)(WM,{dateAdapter:DI,children:(0,qt.jsx)(tH,{as:pCe,size:"small",id:"time",name:"time",value:null===t||void 0===t?void 0:t.time,onChange:e=>n("time",e),renderInput:e=>(0,qt.jsx)(Q_,(0,i.A)({onKeyDown:e=>e.preventDefault(),fullWidth:!0},e)),disabled:!t.isEditable})}),(0,qt.jsx)(op,{position:"absolute",top:"43px",right:"10px",sx:{opacity:"0.8"}})]})})]})]}),(0,qt.jsxs)(op,{mt:2,children:[(0,qt.jsx)(xh,{variant:"outlined",color:"primary",onClick:()=>l(-1),sx:{marginRight:"10px"},children:s("rpm_Cancel")}),(0,qt.jsx)(xh,{variant:"contained",sx:{marginLeft:"0px"},type:"submit",children:s("rpm_Save")})]})]})})]})}})})},ike=e=>{var t;let{goalList:n,toggleGoal:r,handleSaveGoals:i,handleCancelGoals:o,selectedGoals:a}=e;const{t:s}=Vg();return(0,qt.jsxs)(yH,{variant:"outlined",sx:{mb:2,p:2},children:[(0,qt.jsx)(Cf,{fontSize:14,sx:{mb:1},children:"Select Goals"}),(0,qt.jsx)(op,{sx:{display:"flex",flexWrap:"wrap",gap:1,border:"1px solid #ccc",padding:"8px",borderRadius:"6px",minHeight:"46px"},children:null===(t=n||[])||void 0===t?void 0:t.map(e=>(0,qt.jsx)(Eb,{label:null===e||void 0===e?void 0:e.name,color:a.some(t=>t.id===e.id)?"primary":"default",onClick:()=>r(e),sx:{cursor:"pointer"}},null===e||void 0===e?void 0:e.id))}),(0,qt.jsxs)(op,{mt:2,children:[(0,qt.jsx)(xh,{variant:"outlined",onClick:o,sx:{mr:1},children:s("rpm_Cancel")}),(0,qt.jsx)(xh,{variant:"contained",onClick:i,children:s("rpm_Save")})]})]})},oke=["children","value","index"];function ake(e){const{children:t,value:n,index:r}=e,o=Ko(e,oke);return(0,qt.jsx)("div",(0,i.A)((0,i.A)({role:"tabpanel",hidden:n!==r,id:"simple-tabpanel-".concat(r),"aria-labelledby":"simple-tab-".concat(r)},o),{},{children:n===r&&t}))}function ske(e){return{id:"simple-tab-".concat(e),"aria-controls":"simple-tabpanel-".concat(e)}}const lke=e=>{let{activeProgram:t,addNotifications:n,notifications:r,chips:o,getChips:a,editProgram:s,fetchStates:l,countries:c,statesRelated:d,programData:u,showConfirmModal:p,toggleConfirmModal:h,defaultProgramName:m,onContinue:f,QrCode:g,downloadQr:v,toggleQrDialog:x,qrDialog:y,goalList:b,toggleGoal:j,handleSaveGoals:_,handleCancelGoals:C,selectedGoals:w}=e;const{t:S}=Vg(),[A,k]=We.useState(0),T=[{name:S("rpm_RPM"),url:ld.DOCTOR.PROGRAM},{name:null===t||void 0===t?void 0:t.display_name,url:"".concat(ld.DOCTOR.PROGRAM,"/").concat(null===t||void 0===t?void 0:t.code,"/patients")},{name:S("rpm_ProgramSettings"),url:""}];return(0,qt.jsxs)(op,{children:[(0,qt.jsxs)(op,{sx:{width:"100%"},children:[(0,qt.jsx)(op,{mb:2.5,children:(0,qt.jsx)(BH,{labels:T})}),(0,qt.jsx)(Ff,{container:!0,children:(0,qt.jsx)(Ff,{item:!0,xs:12,md:!0,children:(0,qt.jsx)(op,{sx:{mb:1},children:(0,qt.jsxs)(Ff,{container:!0,spacing:2,alignItems:"center",sx:{mb:2},children:[(0,qt.jsx)(Ff,{item:!0,xs:!0,children:(0,qt.jsx)(Cf,{variant:"h5",component:"h5",children:S("rpm_ProgramSettings")})}),(0,qt.jsx)(Ff,{item:!0,xs:"auto",children:(0,qt.jsx)(xh,{variant:"contained",sx:{marginLeft:"0px"},onClick:x,children:S("rpm_ShowProgramQr")})})]})})})})]}),(0,qt.jsxs)(op,{bgcolor:"white",p:2,className:"programSettings programSettings-tour-step0",children:[(0,qt.jsx)(op,{children:(0,qt.jsxs)(fV,{value:A,onChange:(e,t)=>{k(t)},variant:"scrollable",scrollButtons:"auto",allowScrollButtonsMobile:!0,sx:{minHeight:"40px","& .MuiTabs-flexContainer":{flexWrap:"nowrap"}},children:[(0,qt.jsx)(zU,(0,i.A)((0,i.A)({label:"General Information",sx:{fontWeight:"600"}},ske(0)),{},{className:"programSettings-tour-step1"})),(0,qt.jsx)(zU,(0,i.A)((0,i.A)({label:"Goals",sx:{fontWeight:"600"}},ske(1)),{},{className:"programSettings-tour-step3"})),(null===t||void 0===t?void 0:t.is_hospital)&&(0,qt.jsx)(zU,(0,i.A)((0,i.A)({label:"Consultation Options",sx:{fontWeight:"600"}},ske(2)),{},{className:"programSettings-tour-step2"})),(null===t||void 0===t?void 0:t.is_hospital)&&(0,qt.jsx)(zU,(0,i.A)((0,i.A)({label:"Notifications",sx:{fontWeight:"600"}},ske(3)),{},{className:"programSettings-tour-step3"}))]})}),(0,qt.jsxs)(op,{mt:2,children:[(0,qt.jsx)(ake,{value:A,index:0,children:(0,qt.jsx)(nke,{editProgram:s,fetchStates:l,countries:c,statesRelated:d,programData:u})}),(0,qt.jsx)(ake,{value:A,index:1,children:(0,qt.jsx)(ike,{goalList:b,toggleGoal:j,handleSaveGoals:_,handleCancelGoals:C,selectedGoals:w})}),(0,qt.jsx)(ake,{value:A,index:2,children:(0,qt.jsx)(JAe,{chips:o,activeProgram:t,getChips:a})}),(0,qt.jsx)(ake,{value:A,index:3,children:(0,qt.jsx)(rke,{addNotifications:n,notifications:r})})]})]}),(0,qt.jsx)(_C,{open:y,imageUrl:g,onClose:x,programCode:null===t||void 0===t?void 0:t.program_code,downloadImage:v,downloadButton:!0,imageWidthHeight:{width:"225",height:"225"},programName:null===t||void 0===t?void 0:t.display_name,customWidth:"375px",customMarginTop:{xs:"0px",md:"-8px"}}),(0,qt.jsx)(qV,{openModal:p,onCloseModal:h,actionFunction:()=>f(),options:{primaryText:S("message:rpm_confirmation"),secondaryText:S("message:rpm_defaultProgramConfirm",{program:m}),btn:{primaryText:S("rpm_continue"),secondaryText:S("rpm_Cancel"),primaryColor:"error",secondaryColor:"primary"},btnSwap:!0}})]})},cke=["children","value","index"];function dke(e){const{children:t,value:n,index:r}=e,o=Ko(e,cke);return(0,qt.jsx)("div",(0,i.A)((0,i.A)({role:"tabpanel",hidden:n!==r,id:"simple-tabpanel-".concat(r),"aria-labelledby":"simple-tab-".concat(r)},o),{},{children:n===r&&t}))}function uke(e){return{id:"simple-tab-".concat(e),"aria-controls":"simple-tabpanel-".concat(e)}}const pke=e=>{let{activeProgram:t,addNotifications:n,notifications:r,chips:o,getChips:a,editProgram:s,fetchStates:l,countries:c,statesRelated:d,programData:u,showConfirmModal:p,toggleConfirmModal:h,defaultProgramName:m,onContinue:f,QrCode:g,downloadQr:v,toggleQrDialog:x,qrDialog:y,goalList:b,toggleGoal:j,handleSaveGoals:_,handleCancelGoals:C,selectedGoals:w}=e;const{t:S}=Vg(),[A,k]=(Nt(),so(),We.useState(0)),T=[{name:S("rpm_RPM"),url:ld.DOCTOR.PROGRAM},{name:null===t||void 0===t?void 0:t.display_name,url:"".concat(ld.DOCTOR.PROGRAM,"/").concat(null===t||void 0===t?void 0:t.code,"/patients")},{name:S("rpm_ProgramSettings"),url:""}];return(0,qt.jsxs)(op,{children:[(0,qt.jsxs)(op,{sx:{width:"100%"},children:[(0,qt.jsxs)(op,{mb:2.5,display:"flex",alignItems:"center",children:[(0,qt.jsx)(BH,{labels:T}),(0,qt.jsx)(Cf,{variant:"h6",component:"h6",sx:{marginBottom:"0"},children:S("rpm_ProgramSettings")})]}),(0,qt.jsx)(op,{display:"flex",justifyContent:"end",mb:2,children:(0,qt.jsx)(xh,{variant:"contained",sx:{marginLeft:"0px"},onClick:x,children:S("rpm_ShowProgramQr")})})]}),(0,qt.jsxs)(op,{bgcolor:"white",p:2,className:"programSettings",children:[(0,qt.jsx)(op,{children:(0,qt.jsxs)(fV,{value:A,onChange:(e,t)=>{k(t)},sx:{minHeight:"40px"},children:[(0,qt.jsx)(zU,(0,i.A)({label:"General Information",sx:{fontWeight:"600"}},uke(0))),(0,qt.jsx)(zU,(0,i.A)({label:"Goals",sx:{fontWeight:"600"}},uke(1))),(0,qt.jsx)(zU,(0,i.A)({label:"Consultation Options",sx:{fontWeight:"600"}},uke(2))),(0,qt.jsx)(zU,(0,i.A)({label:"Notifications",sx:{fontWeight:"600"}},uke(3)))]})}),(0,qt.jsxs)(op,{mt:2,children:[(0,qt.jsx)(dke,{value:A,index:0,children:(0,qt.jsx)(nke,{editProgram:s,fetchStates:l,countries:c,statesRelated:d,programData:u})}),(0,qt.jsx)(dke,{value:A,index:1,children:(0,qt.jsx)(ike,{goalList:b,toggleGoal:j,handleSaveGoals:_,handleCancelGoals:C,selectedGoals:w})}),(0,qt.jsx)(dke,{value:A,index:2,children:(0,qt.jsx)(JAe,{chips:o,activeProgram:t,getChips:a})}),(0,qt.jsx)(dke,{value:A,index:3,children:(0,qt.jsx)(rke,{addNotifications:n,notifications:r})})]})]}),(0,qt.jsx)(_C,{open:y,imageUrl:g,onClose:x,programCode:null===t||void 0===t?void 0:t.program_code,downloadImage:v,downloadButton:!0,imageWidthHeight:{width:"225",height:"225"},programName:null===t||void 0===t?void 0:t.display_name,customWidth:"unset",customMarginTop:{xs:"0px",md:"-8px"}}),(0,qt.jsx)(qV,{openModal:p,onCloseModal:h,actionFunction:()=>f(),options:{primaryText:S("message:rpm_confirmation"),secondaryText:S("message:rpm_defaultProgramConfirm",{program:m}),btn:{primaryText:S("rpm_continue"),secondaryText:S("rpm_Cancel"),primaryColor:"error",secondaryColor:"primary"},btnSwap:!0}})]})},hke=e=>{let{activeProgram:t}=e;const n=window.innerWidth,r=wt(bu),o=wt(cu),a=Nt(),[s,l]=We.useState({}),[c,d]=We.useState({}),[u,p]=We.useState({}),[h,m]=We.useState([]),[f,g]=We.useState([]),[v,x]=We.useState(""),[y,b]=(0,We.useState)(!1),[j,_]=(0,We.useState)(null),{allProgramFetch:C,programPage:w}=(0,We.useContext)(DC),[S,A]=We.useState(""),[k,T]=We.useState(""),E=!("true"===us(r,"user_principal.attributes.skip_tour[0]","")),[M,O]=We.useState(!1),[R,P]=(0,We.useState)([]),[D,N]=(0,We.useState)([]),[L,I]=(0,We.useState)([]),F=()=>{O(!M)},$=async()=>{const{data:e}=await a(Gl(null===t||void 0===t?void 0:t.code));d(e[0])},B=e=>{N(t=>t.some(t=>t.id===e.id)?t.filter(t=>t.id!==e.id):[...t,e])},z=async()=>{const e={programId:null===u||void 0===u?void 0:u.id,goalIds:D.map(e=>null===e||void 0===e?void 0:e.id)};try{await a((t=e,async e=>{e(na(!0));const n=$o.getAccessToken(),r=(0,i.A)((0,i.A)({},t),{},{priority:Number(t.priority||"0"),tenant_id:null===n||void 0===n?void 0:n.accountId});try{const e="".concat(ga.WELLNESS_GOAL,"/program");return await Fu(e,r)}finally{e(na(!1))}})),null!==u&&void 0!==u&&u.id&&await K(null===u||void 0===u?void 0:u.id),a(Zo({subTitle:"message:rpm_GoalSelectedSuccessfully",severity:ud.SUCCESS}))}catch(n){a(Zo({subTitle:n.message,severity:ud.ERROR}))}var t},H=()=>{N(L)},W=async function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{q:""};await a(hue(e,t,"RPM",e=>{var t;g(null===e||void 0===e||null===(t=e.states)||void 0===t?void 0:t.content)},()=>{}))},U=(e,t)=>{let{setErrors:n,resetForm:r}=t;null!==e&&void 0!==e&&e.def?(_({setErrors:n,resetForm:r,values:e}),V(e,{setErrors:n,resetForm:r})):G(e,{setErrors:n,resetForm:r})},V=async(e,t)=>{try{const{data:n}=await a(ec());if(n){if(n===u.display_name)return G(e,t);x(n),b(!!n)}}catch(n){return G(e,t)}},G=async(e,n)=>{let{setErrors:r,resetForm:o}=n;const s=(0,i.A)((0,i.A)({id:null===t||void 0===t?void 0:t.id},e),{},{country:e.country,state:e.state});try{await a(Hs(s)),o(),a(Zo({subTitle:"message:rpm_ProgramUpdatedSuccessfully",severity:ud.SUCCESS})),C(),_(null),X()}catch(l){const e=us(l,"response.data.field_errors",{}),t=us(l,"response.data.code","");cs(e)?cs(t)?a(Zo({subTitle:l.message,severity:ud.ERROR})):a(Zo({subTitle:Vd(t,"error:rpm_ProgramUpdateFailed"),severity:ud.ERROR})):r(Ud(e))}},q=async()=>{try{const{data:e}=await a(Xs(null===t||void 0===t?void 0:t.code));l(e)}catch(e){console.log(e)}},Y=async e=>{const n=(0,i.A)((0,i.A)({},s),{},{follow_up_setting:{send_follow_up_reminder_flag:e.isEditable,follow_up_day:e.days,follow_up_time:sa()(e.time).utc().format("HH:mm")}});try{await a(Ks(null===t||void 0===t?void 0:t.code,n)),q(),a(Zo({subTitle:"message:rpm_SettingsSavedSuccessfully",severity:ud.SUCCESS}))}catch(r){console.log(r)}},Z=async()=>{try{await a(Us(null===t||void 0===t?void 0:t.program_code)),F(),a(Zo({subTitle:"message:rpm_QrDownloadedSuccessfully",severity:ud.SUCCESS}))}catch(e){console.log(e),F(),a(Zo({subTitle:"error:rpm_QrDownloadedFailed",severity:ud.ERROR}))}},K=async e=>{const t=await a((n=e,async e=>{e(na(!0));try{const e="".concat(ga.WELLNESS_GOAL,"?programId=").concat(n),t=await Iu(e,{});return null===t||void 0===t?void 0:t.data}catch(t){return t}finally{e(na(!1))}}));var n;const r=t.map(e=>({id:e._id,name:e.goal_name}));I(r),N(r)};We.useEffect(()=>{null!==u&&void 0!==u&&u.id&&K(null===u||void 0===u?void 0:u.id)},[o,null===u||void 0===u?void 0:u.id]),We.useEffect(()=>{o&&t&&(q(),$(),(async e=>{const t=await ks(null===e||void 0===e?void 0:e.image,null===e||void 0===e?void 0:e.display_name);await a(uue((0,i.A)((0,i.A)({},w),{},{countryCode:e.country}),"RPM",n=>{let{countries:r,states:o}=n;m(r.content),g(o.content),p((0,i.A)((0,i.A)({},e),{},{image:t,country:e.country?e.country:"IN"}))},()=>{}))})(t),(()=>{if(null===t||void 0===t||!t.qr_code)return;const e="data:image/png;base64,".concat(t.qr_code);T(e)})(),(async()=>{try{const e=await a(exe()),t=(Array.isArray(e)?e:[]).map(e=>({id:e._id,name:e.goal_name}));P(t)}catch(e){console.log(e)}})())},[o,t]),We.useEffect(()=>{a(NC({activeMenuItem:"programSettings"}))},[]);const X=()=>{b(!1)},Q=()=>G(j.values,{setErrors:j.setErrors,resetForm:j.resetForm});return(0,qt.jsxs)("div",{children:[n>=575?(0,qt.jsx)(lke,{activeProgram:t,addNotifications:Y,notifications:s,chips:c,getChips:$,editProgram:U,countries:h,statesRelated:f,fetchStates:W,programData:u,defaultProgramName:v,setShowConfirmModal:b,showConfirmModal:y,toggleConfirmModal:X,onContinue:Q,downloadQr:Z,QrCode:k,toggleQrDialog:F,qrDialog:M,goalList:R,toggleGoal:B,handleSaveGoals:z,handleCancelGoals:H,selectedGoals:D}):(0,qt.jsx)(pke,{activeProgram:t,addNotifications:Y,notifications:s,chips:c,getChips:$,editProgram:U,countries:h,statesRelated:f,fetchStates:W,programData:u,defaultProgramName:v,setShowConfirmModal:b,showConfirmModal:y,toggleConfirmModal:X,onContinue:Q,downloadQr:Z,QrCode:k,toggleQrDialog:F,qrDialog:M,goalList:R,toggleGoal:B,handleSaveGoals:z,handleCancelGoals:H,selectedGoals:D}),(0,qt.jsxs)(qt.Fragment,{children:[(0,qt.jsx)(zZ,{isTour:E,path:"programSettingsTour",setRenderer:A}),(0,qt.jsx)("input",{type:"hidden",id:"rerenderer",value:S})]})]})};const mke=function(e){let{addNewRule:t}=e;const{t:n}=Vg(),r=so(),i=[{text:"eq",sign:"=="},{text:"gt",sign:">"},{text:"gte",sign:">="},{text:"lt",sign:"<"},{text:"lte",sign:"<="}],o=e=>{const t=i.find(t=>t.text===e);return null===t||void 0===t?void 0:t.sign},a=e=>{let{name:t,rule:r,number:a}=e;return(0,qt.jsx)(lH,{name:t,children:e=>{var s,l,c,d;let{remove:u,push:p}=e;return(0,qt.jsx)(Ff,{item:!0,md:12,children:(null===r||void 0===r||null===(s=r.when)||void 0===s||null===(l=s.cond)||void 0===l?void 0:l.length)>0&&(null===r||void 0===r||null===(c=r.when)||void 0===c||null===(d=c.cond)||void 0===d?void 0:d.map((e,r)=>(0,qt.jsxs)(We.Fragment,{children:[(0,qt.jsxs)(Ff,{container:!0,spacing:2,alignItems:"center",sx:{m:"auto",mb:2,pr:2,width:"100%",border:"1px solid #ccc",borderRadius:1},children:[(0,qt.jsxs)(Ff,{item:!0,md:!0,mb:2,children:[(0,qt.jsx)(Cf,{variant:"body1",gutterBottom:!0,children:n("rpm_Name")}),(0,qt.jsxs)(tH,{fullWidth:!0,as:G_,id:"".concat(t,".").concat(r,".name"),name:"".concat(t,".").concat(r,".name"),size:"small",disabled:!0,input:(0,qt.jsx)(qj,{}),endAdornment:(0,qt.jsx)(tw,{position:"end",sx:{position:"absolute",right:"28px"},children:(0,qt.jsx)(sy,{title:n("message:rpm_VitalNameHelp"),placement:"top",children:(0,qt.jsx)(wh,{size:"small",disableRipple:!0,sx:{p:0},children:(0,qt.jsx)(pM.A,{fontSize:"small"})})})}),children:[(0,qt.jsx)(mf,{value:"Util.ToInt(Data.systolic)",children:"Systolic"}),(0,qt.jsx)(mf,{value:"Util.ToInt(Data.diastolic)",children:"Diastolic"})]}),(0,qt.jsx)(dH,{name:"".concat(t,".").concat(r,".name"),children:e=>(0,qt.jsx)(v_,{error:!0,children:n(e,{field:n("rpm_Name")})})})]}),(0,qt.jsx)(Ff,{item:!0,children:(0,qt.jsx)(op,{mt:1,children:o(e.op)})}),(0,qt.jsxs)(Ff,{item:!0,md:!0,mb:2,sx:{display:"none"},children:[(0,qt.jsx)(Cf,{variant:"body1",gutterBottom:!0,children:n("rpm_Operator")}),(0,qt.jsx)(tH,{fullWidth:!0,as:G_,id:"".concat(t,".").concat(r,".op"),name:"".concat(t,".").concat(r,".op"),size:"small",input:(0,qt.jsx)(qj,{}),endAdornment:(0,qt.jsx)(tw,{position:"end",sx:{position:"absolute",right:"28px"},children:(0,qt.jsx)(sy,{title:n("message:rpm_VitalOperatorHelp"),placement:"top",children:(0,qt.jsx)(wh,{size:"small",disableRipple:!0,sx:{p:0},children:(0,qt.jsx)(pM.A,{fontSize:"small"})})})}),children:i.map(e=>(0,qt.jsx)(mf,{value:e.text,children:e.sign},e.text))}),(0,qt.jsx)(dH,{name:"".concat(t,".").concat(r,".op"),children:e=>(0,qt.jsx)(v_,{error:!0,children:n(e,{field:n("rpm_Operator")})})})]}),(0,qt.jsxs)(Ff,{item:!0,md:!0,mb:2,className:"hide_num_arrow",children:[(0,qt.jsx)(Cf,{variant:"body1",gutterBottom:!0,children:n("rpm_Value")}),(0,qt.jsx)(tH,{fullWidth:!0,as:qj,id:"".concat(t,".").concat(r,".value"),name:"".concat(t,".").concat(r,".value"),size:"small",type:"number",endAdornment:(0,qt.jsx)(tw,{position:"end",children:(0,qt.jsx)(sy,{title:n("message:rpm_VitalValueHelp"),placement:"top",children:(0,qt.jsx)(wh,{size:"small",disableRipple:!0,sx:{p:0},children:(0,qt.jsx)(pM.A,{fontSize:"small"})})})})}),(0,qt.jsx)(dH,{name:"".concat(t,".").concat(r,".value"),children:e=>(0,qt.jsx)(v_,{error:!0,children:n(e,{field:n("rpm_Value")})})})]}),(0,qt.jsxs)(Ff,{item:!0,md:!0,mb:2,sx:{mt:3},children:[(0,qt.jsx)(wh,{color:"error",onClick:()=>u(r),sx:{display:"none"},children:(0,qt.jsx)(dSe.A,{fontSize:"small",sx:{width:16,height:16}})}),(0,qt.jsx)(wh,{sx:{display:"none"},color:"primary",onClick:()=>p({name:"",value:"",op:""}),children:(0,qt.jsx)(Jxe.A,{fontSize:"small",sx:{width:16,height:16}})})]})]}),(0,qt.jsxs)(op,{maxWidth:250,mb:2,className:"d-none",children:[(0,qt.jsxs)(tH,{fullWidth:!0,as:G_,id:"rule.".concat(a,".when.between"),name:"rule.".concat(a,".when.between"),size:"small",input:(0,qt.jsx)(qj,{}),endAdornment:(0,qt.jsx)(tw,{position:"end",sx:{position:"absolute",right:"28px"},children:(0,qt.jsx)(sy,{title:n("message:rpm_ConditionBetweenVitalsHelp"),placement:"top",children:(0,qt.jsx)(wh,{size:"small",disableRipple:!0,sx:{p:0},children:(0,qt.jsx)(pM.A,{fontSize:"small"})})})}),children:[(0,qt.jsx)(mf,{value:"and",children:"AND"}),(0,qt.jsx)(mf,{value:"or",children:"OR"})]}),(0,qt.jsx)(dH,{name:"rule.".concat(a,".when.between"),children:e=>(0,qt.jsx)(v_,{error:!0,children:n(e,{field:n("rpm_Condition")})})})]})]},r)))})}})};return(0,qt.jsx)(Ff,{container:!0,spacing:2,children:(0,qt.jsx)(Ff,{item:!0,xs:12,md:12,lg:12,children:(0,qt.jsx)(Kz,{initialValues:{data_type:"",processing_mode:"",data_batch_size:"",short_description:"",rule:[{name:"Hypertensive_Crisis",desc:"High blood pressure (Hypertensive Crisis).",salience:5,when:{cond:[{name:"Util.ToInt(Data.systolic)",value:180,op:"gte",between:"or"},{name:"Util.ToInt(Data.diastolic)",value:120,op:"gte",between:"or"}],between:"or"},then:[{call:["Alerts.Add",{const:"bp"},{const:"systolic"},{obj:"Data.systolic"},{const:"High blood pressure (Hypertensive Crisis)"}]},{call:["Alerts.Add",{const:"bp"},{const:"diastolic"},{obj:"Data.diastolic"},{const:"High blood pressure (Hypertensive Crisis)"}]},{call:["Complete"]}]},{name:"Hypertensive_Stage2",desc:"High blood pressure (Hypertensive Stage 2).",salience:4,when:{cond:[{name:"Util.ToInt(Data.systolic)",value:140,op:"gte",between:"or"},{name:"Util.ToInt(Data.diastolic)",value:90,op:"gte",between:"or"}],between:"or"},then:[{call:["Alerts.Add",{const:"bp"},{const:"systolic"},{obj:"Data.systolic"},{const:"High blood pressure (Hypertension Stage 2)"}]},{call:["Alerts.Add",{const:"bp"},{const:"diastolic"},{obj:"Data.diastolic"},{const:"High blood pressure (Hypertension Stage 2)"}]},{call:["Complete"]}]},{name:"Hypertension_Stage1",desc:"High blood pressure (Hypertension Stage 1)",salience:3,when:{cond:[{name:"Util.ToInt(Data.systolic)",value:130,op:"gte",between:"or"},{name:"Util.ToInt(Data.diastolic)",value:80,op:"gte",between:"or"}],between:"or"},then:[{call:["Alerts.Add",{const:"bp"},{const:"systolic"},{obj:"Data.systolic"},{const:"High blood pressure (Hypertension Stage 1)"}]},{call:["Alerts.Add",{const:"bp"},{const:"diastolic"},{obj:"Data.diastolic"},{const:"High blood pressure (Hypertension Stage 1)"}]},{call:["Complete"]}]},{name:"ElevatedBloodPressure",desc:"Elevated blood pressure",salience:2,when:{cond:[{name:"Util.ToInt(Data.systolic)",value:120,op:"gte",between:"and"},{name:"Util.ToInt(Data.diastolic)",value:80,op:"lt",between:"and"}],between:"and"},then:[{call:["Alerts.Add",{const:"bp"},{const:"systolic"},{obj:"Data.systolic"},{const:"Elevated blood pressure"}]},{call:["Alerts.Add",{const:"bp"},{const:"diastolic"},{obj:"Data.diastolic"},{const:"Elevated blood pressure"}]},{call:["Complete"]}]},{name:"CheckLowBP",desc:"Low blood pressure",salience:1,when:{cond:[{name:"Util.ToInt(Data.systolic)",value:90,op:"lt",between:"and"},{name:"Util.ToInt(Data.diastolic)",value:60,op:"lt",between:"and"}],between:"and"},then:[{call:["Alerts.Add",{const:"bp"},{const:"systolic"},{obj:"Data.systolic"},{const:"Low blood pressure"}]},{call:["Alerts.Add",{const:"bp"},{const:"diastolic"},{obj:"Data.diastolic"},{const:"Low blood pressure"}]},{call:["Complete"]}]}]},validationSchema:RU.addRule,onSubmit:t,enableReinitialize:!0,children:e=>{let{values:t}=e;return(0,qt.jsx)(qt.Fragment,{children:(0,qt.jsx)(nH,{children:(0,qt.jsxs)(yH,{variant:"outlined",children:[(0,qt.jsx)(nW,{sx:{py:1.5,bgcolor:"primary.theme.50"},title:(0,qt.jsxs)(Ff,{container:!0,spacing:2,alignItems:"center",children:[(0,qt.jsx)(Ff,{item:!0,xs:!0,children:(0,qt.jsx)(Cf,{variant:"h5",gutterBottom:!0,component:"h5",children:n("rpm_AddNewRule")})}),(0,qt.jsx)(Ff,{item:!0,children:(0,qt.jsx)(xh,{variant:"outlined",color:"primary",onClick:()=>r(-1),children:n("rpm_Back")})}),(0,qt.jsx)(Ff,{item:!0,children:(0,qt.jsx)(xh,{type:"submit",variant:"contained",color:"primary",disableElevation:!0,children:n("rpm_Save")})})]})}),(0,qt.jsx)(wH,{children:(0,qt.jsxs)(Ff,{container:!0,spacing:2,children:[(0,qt.jsxs)(Ff,{item:!0,xs:12,md:4,children:[(0,qt.jsxs)(op,{mb:2,children:[(0,qt.jsx)(o_,{htmlFor:"data_type",required:!0,sx:{mb:.75},children:n("rpm_VitalType")}),(0,qt.jsx)(tH,{fullWidth:!0,as:G_,id:"data_type",name:"data_type",size:"small",displayEmpty:!0,input:(0,qt.jsx)(qj,{}),endAdornment:(0,qt.jsx)(tw,{position:"end",sx:{position:"absolute",right:"28px"},children:(0,qt.jsx)(sy,{title:n("message:rpm_VitalTypeHelp"),placement:"top",children:(0,qt.jsx)(wh,{size:"small",disableRipple:!0,sx:{p:0},children:(0,qt.jsx)(pM.A,{fontSize:"small"})})})}),children:null===Dd||void 0===Dd?void 0:Dd.map(e=>(0,qt.jsx)(mf,{value:e.value,children:n("rpm_".concat(e.name))},e.name))}),(0,qt.jsx)(dH,{name:"data_type",children:e=>(0,qt.jsx)(v_,{error:!0,children:n(e,{field:n("rpm_VitalType")})})})]}),(0,qt.jsxs)(op,{mb:2,children:[(0,qt.jsx)(o_,{htmlFor:"processing_mode",required:!0,sx:{mb:.75},children:n("rpm_ProcessingMode")}),(0,qt.jsxs)(tH,{fullWidth:!0,as:G_,id:"processing_mode",name:"processing_mode",size:"small",displayEmpty:!0,input:(0,qt.jsx)(qj,{}),renderValue:e=>e||"Select",endAdornment:(0,qt.jsx)(tw,{position:"end",sx:{position:"absolute",right:"28px"},children:(0,qt.jsx)(sy,{title:n("message:rpm_ProcessingModeHelp"),placement:"top",children:(0,qt.jsx)(wh,{size:"small",disableRipple:!0,sx:{p:0},children:(0,qt.jsx)(pM.A,{fontSize:"small"})})})}),children:[(0,qt.jsx)(mf,{value:"BATCH",children:"BATCH"}),(0,qt.jsx)(mf,{value:"REALTIME",children:"REALTIME"})]}),(0,qt.jsx)(dH,{name:"processing_mode",children:e=>(0,qt.jsx)(v_,{error:!0,children:n(e,{field:n("rpm_ProcessingMode")})})})]}),"BATCH"===t.processing_mode&&(0,qt.jsxs)(op,{mb:2,children:[(0,qt.jsx)(o_,{htmlFor:"data_batch_size",sx:{mb:.75},children:n("rpm_BatchDataSize")}),(0,qt.jsx)(tH,{fullWidth:!0,as:qj,id:"data_batch_size",name:"data_batch_size",size:"small",type:"number"}),(0,qt.jsx)(dH,{name:"data_batch_size",children:e=>(0,qt.jsx)(v_,{error:!0,children:n(e,{field:n("rpm_BatchDataSize")})})})]}),(0,qt.jsxs)(op,{mb:2,children:[(0,qt.jsx)(o_,{htmlFor:"short_description",required:!0,sx:{mb:.75},children:n("rpm_ShortDescription")}),(0,qt.jsx)(tH,{fullWidth:!0,as:qj,id:"short_description",name:"short_description",size:"small",multiline:!0,rows:4,endAdornment:(0,qt.jsx)(tw,{position:"end",children:(0,qt.jsx)(sy,{title:n("message:rpm_ShortDescriptionHelp"),placement:"top",children:(0,qt.jsx)(wh,{size:"small",disableRipple:!0,sx:{p:0},children:(0,qt.jsx)(pM.A,{fontSize:"small"})})})})}),(0,qt.jsx)(dH,{name:"short_description",children:e=>(0,qt.jsx)(v_,{error:!0,children:n(e,{field:n("rpm_ShortDescription")})})})]})]}),(0,qt.jsx)(Ff,{item:!0,xs:12,md:8,children:(0,qt.jsx)(lH,{name:"rule",children:e=>{var r,i;let{remove:o,push:s}=e;return(0,qt.jsxs)(op,{p:2,borderRadius:1,bgcolor:"primary.theme.50",sx:{maxHeight:576,overflow:"auto"},children:[(null===t||void 0===t||null===(r=t.rule)||void 0===r?void 0:r.length)>0&&(null===t||void 0===t||null===(i=t.rule)||void 0===i?void 0:i.map((e,t)=>(0,qt.jsxs)(Ff,{container:!0,spacing:2,sx:{m:"auto",mb:2,pr:2,width:"100%",bgcolor:"common.white",borderRadius:1},children:[(0,qt.jsxs)(Ff,{item:!0,md:6,mb:2,children:[(0,qt.jsx)(Cf,{variant:"body1",gutterBottom:!0,children:n("rpm_RuleName")}),(0,qt.jsx)(tH,{fullWidth:!0,as:qj,id:"rule.".concat(t,".name"),name:"rule.".concat(t,".name"),size:"small",disabled:!0,endAdornment:(0,qt.jsx)(tw,{position:"end",children:(0,qt.jsx)(sy,{title:n("message:rpm_RuleNameHelp"),placement:"top",children:(0,qt.jsx)(wh,{size:"small",disableRipple:!0,sx:{p:0},children:(0,qt.jsx)(pM.A,{fontSize:"small"})})})})}),(0,qt.jsx)(dH,{name:"rule.".concat(t,".name"),children:e=>(0,qt.jsx)(v_,{error:!0,children:n(e,{field:n("rpm_RuleName")})})})]}),(0,qt.jsxs)(Ff,{item:!0,md:6,mb:2,children:[(0,qt.jsx)(Cf,{variant:"body1",gutterBottom:!0,children:n("rpm_Description")}),(0,qt.jsx)(tH,{fullWidth:!0,as:qj,id:"rule.".concat(t,".desc"),name:"rule.".concat(t,".desc"),size:"small",endAdornment:(0,qt.jsx)(tw,{position:"end",children:(0,qt.jsx)(sy,{title:n("message:rpm_RuleDescriptionHelp"),placement:"top",children:(0,qt.jsx)(wh,{size:"small",disableRipple:!0,sx:{p:0},children:(0,qt.jsx)(pM.A,{fontSize:"small"})})})})}),(0,qt.jsx)(dH,{name:"rule.".concat(t,".desc"),children:e=>(0,qt.jsx)(v_,{error:!0,children:n(e,{field:n("rpm_Description")})})})]}),(0,qt.jsx)(a,{name:"rule.".concat(t,".when.cond"),rule:e,number:t}),(0,qt.jsx)(Ff,{item:!0,mb:2,sx:{display:"none"},children:(0,qt.jsx)(wh,{color:"error",onClick:()=>o(t),children:(0,qt.jsx)(dSe.A,{fontSize:"small",sx:{width:16,height:16}})})})]},t))),(0,qt.jsx)(xh,{sx:{display:"none"},disableElevation:!0,variant:"contained",color:"primary",onClick:()=>s({name:"",desc:"",when:{cond:[{name:"",value:"",op:""}],between:""}}),children:"Add More Rule"})]})}})})]})})]})})})}},"editor_formik")})})};function fke(e){let{exRuleArr:t,ruleData:n,addNewRule:r,activeProgram:o,pulseExRuleArr:a}=e;const{t:s}=Vg(),l=null===n||void 0===n?void 0:n.short_description.split("/"),c={data_type:null!==n&&void 0!==n&&n.data_type?null===n||void 0===n?void 0:n.data_type:"",processing_mode:null!==n&&void 0!==n&&n.processing_mode?null===n||void 0===n?void 0:n.processing_mode:"",data_batch_size:null!==n&&void 0!==n&&n.data_batch_size?null===n||void 0===n?void 0:n.data_batch_size:"",short_description:null!==n&&void 0!==n&&n.short_description?l[0]:"",rule:null!==n&&void 0!==n&&n.rule?null===n||void 0===n?void 0:n.rule:""},d=((()=>{let e=[];null===t||void 0===t||t.forEach(t=>{e.push((0,i.A)((0,i.A)({},t),{},{name:t.name,desc:t.desc,when:{cond:t.data,between:t.data.map(e=>e.between)[0]||""}}))})})(),[{name:s("rpm_RPM"),url:ld.DOCTOR.PROGRAM},{name:null===o||void 0===o?void 0:o.display_name,url:"".concat(ld.DOCTOR.PROGRAM,"/").concat(null===o||void 0===o?void 0:o.code,"/patients")},{name:s("rpm_Rules"),url:"".concat(ld.DOCTOR.PROGRAM,"/").concat(null===o||void 0===o?void 0:o.code,"/rules")},{name:s("rpm_".concat(null===n||void 0===n?void 0:n.data_type)),url:""}]),u=[{id:"stage",align:"left"},{id:"from1",label:"From",align:"left"},{id:"to1",label:"To",align:"left"},{id:"from2",label:"From",align:"left",format:e=>e.toLocaleString("en-US")},{id:"to2",label:"To",align:"left",format:e=>e.toLocaleString("en-US")}];return(0,qt.jsxs)(op,{sx:{width:"100%"},children:[(0,qt.jsx)(op,{mb:2.5,children:(0,qt.jsx)(BH,{labels:d})}),(0,qt.jsx)(Ff,{container:!0,spacing:2,children:(0,qt.jsx)(Ff,{item:!0,xs:12,md:12,lg:12,children:(0,qt.jsx)(Kz,{initialValues:ta()(n)?{data_type:"",processing_mode:"",data_batch_size:"",short_description:"",rule:'rule HighSystolic_Stage3 salience 5 {\n      when\n          Util.ToInt(Data.systolic) >= 180\n      then\n          Alerts.Add("bp", "systolic", Data.systolic, "High blood pressure\n   (Hypertensive Crisis)");\n          Retract("HighSystolic_Stage3");\n\n  }\n\n  rule HighDiastolic_Stage3 salience 5 {\n      when\n          Util.ToInt(Data.diastolic) >= 120\n      then\n          Alerts.Add("bp", "diastolic", Data.diastolic, "High blood\n  pressure (Hypertensive Crisis)");\n          Retract("HighDiastolic_Stage3");\n  }\n\n  rule HighSystolic_Stage2 salience 4 {\n      when\n          Util.ToInt(Data.systolic) >= 140 && Util.ToInt(Data.systolic) <= 179\n      then\n          Alerts.Add("bp", "systolic", Data.systolic, "High blood pressure\n   (Hypertension Stage 2)");\n          Retract("HighSystolic_Stage2");\n  }\n\n  rule HighDiastolic_Stage2 salience 4 {\n      when\n          Util.ToInt(Data.diastolic) >= 90 && Util.ToInt(Data.diastolic) <= 119\n      then\n          Alerts.Add("bp", "diastolic", Data.diastolic, "High blood\n  pressure (Hypertension Stage 2)");\n          Retract("HighDiastolic_Stage2");\n  }\n\n  rule HighSystolic {\n      when\n          Util.ToInt(Data.systolic) >= 130 &&\n  Util.ToInt(Data.systolic) <= 139\n      then\n          Alerts.Add("bp", "systolic", Data.systolic, "High blood pressure\n   (Hypertension Stage 1)");\n         Retract("HighSystolic");\n  }\n\n  rule HighDiastolic {\n      when\n          Util.ToInt(Data.diastolic) >= 80 &&\n  Util.ToInt(Data.diastolic) <= 89\n      then\n          Alerts.Add("bp", "diastolic", Data.diastolic, "High blood\n  pressure (Hypertension Stage 1)");\n          Retract("HighDiastolic");\n  }\n\n  rule ElevatedBloodPressure {\n      when\n          Util.ToInt(Data.systolic) >= 120 &&\n  Util.ToInt(Data.systolic) <= 129 &&\n  Util.ToInt(Data.diastolic) < 80\n      then\n          Alerts.Add("bp", "systolic", Data.systolic, "Elevated blood\n  pressure");\n          Complete();\n  }\n\n  rule CheckLowBP salience 1 {\n      when\n          Util.ToInt(Data.systolic) < 90 &&\n  Util.ToInt(Data.diastolic) < 60\n      then\n          Alerts.Add("bp", "systolic", Data.systolic, "Low blood\n  pressure");\n          Alerts.Add("bp", "diastolic", Data.diastolic, "Low blood\n  pressure");\n          Complete();\n  }'}:c,validationSchema:RU.addRule,onSubmit:r,enableReinitialize:!0,children:e=>{var r,i,o,l,c,d,p,h,m,f,g,v,x,y,b,j,_,C,w,S;let{values:A}=e;return(0,qt.jsx)(qt.Fragment,{children:(0,qt.jsx)(nH,{children:(0,qt.jsxs)(yH,{variant:"outlined",children:[(0,qt.jsx)(nW,{title:(0,qt.jsxs)(Ff,{container:!0,spacing:2,alignItems:"center",children:[(0,qt.jsx)(Ff,{item:!0,xs:!0,children:(0,qt.jsx)(Cf,{variant:"h5",gutterBottom:!0,component:"h5",children:ta()(n)?s("rpm_AddNewRule"):s("rpm_ViewRule")})}),ta()(n)&&(0,qt.jsx)(qt.Fragment,{children:(0,qt.jsx)(Ff,{item:!0,children:(0,qt.jsx)(xh,{type:"submit",variant:"contained",color:"primary",disableElevation:!0,children:s("rpm_Save")})})})]}),sx:{py:1.5,bgcolor:"primary.theme.50"}}),(0,qt.jsx)(wH,{children:(0,qt.jsxs)(Ff,{container:!0,spacing:2,children:[(0,qt.jsx)(Ff,{item:!0,xs:12,md:3,children:(0,qt.jsxs)(op,{mb:2,children:[(0,qt.jsx)(o_,{htmlFor:"data_type",required:!0,sx:{mb:.75},children:s("rpm_VitalType")}),(0,qt.jsxs)(tH,{fullWidth:!0,as:G_,id:"data_type",name:"data_type",size:"small",displayEmpty:!0,disabled:!ta()(n),input:(0,qt.jsx)(qj,{}),endAdornment:(0,qt.jsx)(tw,{position:"end",sx:{position:"absolute",right:"28px"},children:(0,qt.jsx)(sy,{title:s("message:rpm_VitalTypeHelp"),placement:"top",children:(0,qt.jsx)(wh,{size:"small",disableRipple:!0,sx:{p:0},children:(0,qt.jsx)(pM.A,{fontSize:"small"})})})}),children:[null===Dd||void 0===Dd?void 0:Dd.map(e=>(0,qt.jsx)(mf,{value:e.value,children:s("rpm_".concat(e.name))},e.name)),(0,qt.jsx)(mf,{value:"bp.pulse",children:s("rpm_bp")})]}),(0,qt.jsx)(dH,{name:"data_type",children:e=>(0,qt.jsx)(v_,{error:!0,children:s(e,{field:s("rpm_VitalType")})})})]})}),(0,qt.jsx)(Ff,{item:!0,xs:12,md:3,children:(0,qt.jsxs)(op,{mb:2,children:[(0,qt.jsx)(o_,{htmlFor:"processing_mode",required:!0,sx:{mb:.75},children:s("rpm_ProcessingMode")}),(0,qt.jsxs)(tH,{fullWidth:!0,as:G_,id:"processing_mode",name:"processing_mode",size:"small",displayEmpty:!0,disabled:!ta()(n),input:(0,qt.jsx)(qj,{}),renderValue:e=>e||"Select",endAdornment:(0,qt.jsx)(tw,{position:"end",sx:{position:"absolute",right:"28px"},children:(0,qt.jsx)(sy,{title:s("message:rpm_ProcessingModeHelp"),placement:"top",children:(0,qt.jsx)(wh,{size:"small",disableRipple:!0,sx:{p:0},children:(0,qt.jsx)(pM.A,{fontSize:"small"})})})}),children:[(0,qt.jsx)(mf,{value:"BATCH",children:"BATCH"}),(0,qt.jsx)(mf,{value:"REALTIME",children:"REALTIME"})]}),(0,qt.jsx)(dH,{name:"processing_mode",children:e=>(0,qt.jsx)(v_,{error:!0,children:s(e,{field:s("rpm_ProcessingMode")})})})]})}),"BATCH"===A.processing_mode&&(0,qt.jsx)(Ff,{item:!0,xs:12,md:3,children:(0,qt.jsxs)(op,{mb:2,children:[(0,qt.jsx)(o_,{htmlFor:"data_batch_size",sx:{mb:.75},children:s("rpm_BatchDataSize")}),(0,qt.jsx)(tH,{fullWidth:!0,as:qj,id:"data_batch_size",name:"data_batch_size",size:"small",disabled:!ta()(n)}),(0,qt.jsx)(dH,{name:"data_batch_size",children:e=>(0,qt.jsx)(v_,{error:!0,children:s(e,{field:s("rpm_BatchDataSize")})})})]})}),(0,qt.jsx)(Ff,{item:!0,xs:12,md:3,children:(0,qt.jsxs)(op,{mb:2,children:[(0,qt.jsx)(o_,{htmlFor:"short_description",required:!0,sx:{mb:.75},children:s("rpm_ShortDescription")}),(0,qt.jsx)(tH,{fullWidth:!0,as:qj,id:"short_description",name:"short_description",size:"small",disabled:!ta()(n),endAdornment:(0,qt.jsx)(tw,{position:"end",children:(0,qt.jsx)(sy,{title:s("message:rpm_ShortDescriptionHelp"),placement:"top",children:(0,qt.jsx)(wh,{size:"small",disableRipple:!0,sx:{p:0},children:(0,qt.jsx)(pM.A,{fontSize:"small"})})})})}),(0,qt.jsx)(dH,{name:"short_description",children:e=>(0,qt.jsx)(v_,{error:!0,children:s(e,{field:s("rpm_ShortDescription")})})})]})}),"bp"===A.data_type&&(0,qt.jsx)(Ff,{item:!0,xs:12,children:(0,qt.jsxs)(op,{mb:2,children:[(0,qt.jsx)(op,{sx:{fontWeight:700},children:s("rpm_BloodPressureRule")}),(0,qt.jsx)(Vw,{sx:{borderRadius:2,mt:2},children:(0,qt.jsxs)(Bw,{children:[(0,qt.jsxs)(_S,{children:[(0,qt.jsxs)(cw,{sx:{"& .MuiTableCell-head":{border:1,borderColor:"#ddd",fontWeight:"600",bgcolor:"primary.theme.50",padding:.5}},children:[(0,qt.jsx)(gw,{align:"center",rowSpan:2,colSpan:2,children:s("rpm_Stages")}),(0,qt.jsx)(gw,{align:"center",colSpan:2,children:s("rpm_Systolic")}),(0,qt.jsx)(gw,{align:"center",colSpan:3,children:s("rpm_Diastolic")}),(0,qt.jsx)(gw,{align:"center",rowSpan:2,colSpan:2,children:s("rpm_BpRange(Sys/Dia)")})]}),(0,qt.jsx)(cw,{className:"inner_head",sx:{"& .MuiTableCell-head:first-of-type":{display:"none"},"& .MuiTableCell-head":{border:1,borderColor:"#ddd"},bgcolor:"primary.theme.50"},children:u.map(e=>(0,qt.jsx)(gw,{align:"center",style:{top:57,minWidth:e.minWidth},colSpan:"1",children:e.label},e.id))})]}),(0,qt.jsxs)(fS,{children:[null===t||void 0===t?void 0:t.map((e,n)=>{var r,i,o,a,l,c,d,u,p,h,m,f,g,v;return(0,qt.jsxs)(cw,{sx:{"& .MuiTableCell-body":{border:1,borderColor:"#ddd",padding:1}},children:[(0,qt.jsx)(gw,{align:"center",colSpan:"2",className:"tableColor ".concat(e.name),children:s("rpm_".concat(e.name))}),(0,qt.jsxs)(gw,{align:"center",colSpan:"1",children:[0===n&&t[n].data[0].value,!(0===n||n===t.length-1)&&e.data[0].value,n===t.length-1&&"-"]}),(0,qt.jsxs)(gw,{align:"center",colSpan:"1",children:[0===n?"-":!(n===t.length-1)&&(null===(r=t[n-1])||void 0===r||null===(i=r.data[0])||void 0===i?void 0:i.value)-1,n===t.length-1&&(null===e||void 0===e||null===(o=e.data[0])||void 0===o?void 0:o.value)]}),(0,qt.jsxs)(gw,{align:"center",colSpan:"1",children:[0===n&&t[n].data[1].value,!(0===n||n===t.length-1||3===n)&&e.data[1].value,(n===t.length-1||3===n)&&"-"]}),(0,qt.jsxs)(gw,{align:"center",colSpan:"2",children:[0===n?"-":!(n===t.length-1)&&(null===(a=t[n-1])||void 0===a||null===(l=a.data[1])||void 0===l?void 0:l.value)-1,n===t.length-1&&(null===e||void 0===e||null===(c=e.data[1])||void 0===c?void 0:c.value)]}),(0,qt.jsxs)(gw,{align:"center",colSpan:"2",children:[0===n&&"".concat(t[n].data[0].value," & Above"),!(0===n||n===t.length-1)&&"".concat(null===(d=t[n])||void 0===d||null===(u=d.data[0])||void 0===u?void 0:u.value,"\n                                                      -\n                                                      ").concat((null===(p=t[n-1])||void 0===p||null===(h=p.data[0])||void 0===h?void 0:h.value)-1),n===t.length-1&&"Below or ".concat(e.data[0].value)," / ",0===n&&"".concat(t[n].data[1].value," & Above"),!(0===n||n===t.length-1||3===n)&&"".concat(null===(m=t[n])||void 0===m||null===(f=m.data[1])||void 0===f?void 0:f.value,"\n                                                      -\n                                                      ").concat((null===(g=t[n-1])||void 0===g||null===(v=g.data[1])||void 0===v?void 0:v.value)-1),(n===t.length-1||3===n)&&"Below or ".concat(e.data[1].value)]})]},e.salience)}),!ta()(t)&&(0,qt.jsxs)(cw,{sx:{"& .MuiTableCell-body":{border:1,borderColor:"#ddd",p:1}},children:[(0,qt.jsx)(gw,{align:"center",colSpan:"2",className:"tableColor normal",children:s("rpm_NormalPressure")}),(0,qt.jsx)(gw,{align:"center",colSpan:"1",children:(null===(r=t[(null===t||void 0===t?void 0:t.length)-1])||void 0===r||null===(i=r.data[0])||void 0===i?void 0:i.value)+1}),(0,qt.jsx)(gw,{align:"center",colSpan:"1",children:(null===(o=t[(null===t||void 0===t?void 0:t.length)-2])||void 0===o||null===(l=o.data[0])||void 0===l?void 0:l.value)-1}),(0,qt.jsx)(gw,{align:"center",colSpan:"1",children:(null===(c=t[(null===t||void 0===t?void 0:t.length)-1])||void 0===c||null===(d=c.data[1])||void 0===d?void 0:d.value)+1}),(0,qt.jsx)(gw,{align:"center",colSpan:"2",children:(null===(p=t[(null===t||void 0===t?void 0:t.length)-2])||void 0===p||null===(h=p.data[1])||void 0===h?void 0:h.value)-1}),(0,qt.jsxs)(gw,{align:"center",colSpan:"2",children:[(null===(m=t[(null===t||void 0===t?void 0:t.length)-1])||void 0===m||null===(f=m.data[0])||void 0===f?void 0:f.value)+1," "," - ",(null===(g=t[(null===t||void 0===t?void 0:t.length)-2])||void 0===g||null===(v=g.data[0])||void 0===v?void 0:v.value)-1," "," / ",(null===(x=t[(null===t||void 0===t?void 0:t.length)-1])||void 0===x||null===(y=x.data[1])||void 0===y?void 0:y.value)+1," "," - ",(null===(b=t[(null===t||void 0===t?void 0:t.length)-2])||void 0===b||null===(j=b.data[1])||void 0===j?void 0:j.value)-1]})]})]})]})})]})}),"bp"===A.data_type&&(0,qt.jsx)(Ff,{item:!0,xs:12,md:6,children:(0,qt.jsxs)(op,{children:[(0,qt.jsx)(op,{sx:{fontWeight:700},children:s("rpm_PulseRule")}),(0,qt.jsx)(Vw,{sx:{borderRadius:2,mt:2},children:(0,qt.jsxs)(Bw,{children:[(0,qt.jsx)(_S,{children:(0,qt.jsxs)(cw,{sx:{"& .MuiTableCell-head":{border:1,borderColor:"#ddd",fontWeight:"600",bgcolor:"primary.theme.50",padding:"6px"}},children:[(0,qt.jsx)(gw,{align:"center",children:s("rpm_Stages")}),(0,qt.jsx)(gw,{align:"center",children:s("rpm_From")}),(0,qt.jsx)(gw,{align:"center",children:s("rpm_To")}),(0,qt.jsx)(gw,{align:"center",children:s("rpm_Range")})]})}),(0,qt.jsxs)(fS,{children:[null===a||void 0===a?void 0:a.map((e,t)=>{var n,r,i,o;return(0,qt.jsxs)(cw,{sx:{"& .MuiTableCell-body":{border:1,borderColor:"#ddd",p:1}},children:[(0,qt.jsx)(gw,{align:"center",className:"tableColor ".concat(e.name),children:s("rpm_".concat(e.name))}),(0,qt.jsx)(gw,{align:"center",children:t==a.length-1?"-":e.data[0].value}),(0,qt.jsx)(gw,{align:"center",children:0===t?"-":t!==a.length-1?(null===(n=a[t-1])||void 0===n||null===(r=n.data)||void 0===r?void 0:r[0].value)-1:a[1].data[0].value}),(0,qt.jsxs)(gw,{align:"center",children:[t==a.length-1?"Below or ":e.data[0].value,!(0===t||1===t)&&"-",0===t?" & Above":t!==a.length-1?(null===(i=a[t-1])||void 0===i||null===(o=i.data)||void 0===o?void 0:o[0].value)-1:a[1].data[0].value]})]},e.salience)}),!ta()(t)&&(0,qt.jsxs)(cw,{sx:{"& .MuiTableCell-body":{border:1,borderColor:"#ddd",p:1}},children:[(0,qt.jsx)(gw,{align:"center",className:"tableColor normal",children:s("rpm_NormalPulse")}),(0,qt.jsx)(gw,{align:"center",children:(null===(_=a[1])||void 0===_?void 0:_.data[0].value)+1}),(0,qt.jsx)(gw,{align:"center",children:(null===(C=a[0])||void 0===C?void 0:C.data[0].value)-1}),(0,qt.jsxs)(gw,{align:"center",children:[(null===(w=a[1])||void 0===w?void 0:w.data[0].value)+1," ","-"," ",(null===(S=a[0])||void 0===S?void 0:S.data[0].value)-1]})]})]})]})})]})})]})})]})})})}},"editor_formik")})}),!1]})}fke.defaultProps={addNewRule:()=>{},ruleData:{},rulesHeadCell:[],activeProgram:{},pulseExRuleArr:[]};const gke=fke;function vke(e){let{glucoseExRuleArr:t,glucoseRuleData:n,addNewRule:r,activeProgram:o}=e;const{t:a}=Vg(),s={data_type:null!==n&&void 0!==n&&n.data_type?null===n||void 0===n?void 0:n.data_type:"",processing_mode:null!==n&&void 0!==n&&n.processing_mode?null===n||void 0===n?void 0:n.processing_mode:"",data_batch_size:null!==n&&void 0!==n&&n.data_batch_size?null===n||void 0===n?void 0:n.data_batch_size:"",short_description:null!==n&&void 0!==n&&n.short_description?null===n||void 0===n?void 0:n.short_description:"",rule:null!==n&&void 0!==n&&n.rule?null===n||void 0===n?void 0:n.rule:""},l=((()=>{let e=[];null===t||void 0===t||t.forEach(t=>{e.push((0,i.A)((0,i.A)({},t),{},{name:t.name,desc:t.desc,when:{cond:t.data,between:t.data.map(e=>e.between)[0]||""}}))})})(),[{name:a("rpm_RPM"),url:ld.DOCTOR.PROGRAM},{name:null===o||void 0===o?void 0:o.display_name,url:"".concat(ld.DOCTOR.PROGRAM,"/").concat(null===o||void 0===o?void 0:o.code,"/patients")},{name:a("rpm_Rules"),url:"".concat(ld.DOCTOR.PROGRAM,"/").concat(null===o||void 0===o?void 0:o.code,"/rules")},{name:a("rpm_".concat(null===n||void 0===n?void 0:n.data_type)),url:""}]);return(0,qt.jsxs)(op,{sx:{width:"100%"},children:[(0,qt.jsx)(op,{mb:2.5,children:(0,qt.jsx)(BH,{labels:l})}),(0,qt.jsx)(Ff,{container:!0,spacing:2,children:(0,qt.jsx)(Ff,{item:!0,xs:12,md:12,lg:12,children:(0,qt.jsx)(Kz,{initialValues:ta()(n)?{data_type:"",processing_mode:"",data_batch_size:"",short_description:"",rule:'rule HighSystolic_Stage3 salience 5 {\n      when\n          Util.ToInt(Data.systolic) >= 180\n      then\n          Alerts.Add("bp", "systolic", Data.systolic, "High blood pressure\n   (Hypertensive Crisis)");\n          Retract("HighSystolic_Stage3");\n\n  }\n\n  rule HighDiastolic_Stage3 salience 5 {\n      when\n          Util.ToInt(Data.diastolic) >= 120\n      then\n          Alerts.Add("bp", "diastolic", Data.diastolic, "High blood\n  pressure (Hypertensive Crisis)");\n          Retract("HighDiastolic_Stage3");\n  }\n\n  rule HighSystolic_Stage2 salience 4 {\n      when\n          Util.ToInt(Data.systolic) >= 140 && Util.ToInt(Data.systolic) <= 179\n      then\n          Alerts.Add("bp", "systolic", Data.systolic, "High blood pressure\n   (Hypertension Stage 2)");\n          Retract("HighSystolic_Stage2");\n  }\n\n  rule HighDiastolic_Stage2 salience 4 {\n      when\n          Util.ToInt(Data.diastolic) >= 90 && Util.ToInt(Data.diastolic) <= 119\n      then\n          Alerts.Add("bp", "diastolic", Data.diastolic, "High blood\n  pressure (Hypertension Stage 2)");\n          Retract("HighDiastolic_Stage2");\n  }\n\n  rule HighSystolic {\n      when\n          Util.ToInt(Data.systolic) >= 130 &&\n  Util.ToInt(Data.systolic) <= 139\n      then\n          Alerts.Add("bp", "systolic", Data.systolic, "High blood pressure\n   (Hypertension Stage 1)");\n         Retract("HighSystolic");\n  }\n\n  rule HighDiastolic {\n      when\n          Util.ToInt(Data.diastolic) >= 80 &&\n  Util.ToInt(Data.diastolic) <= 89\n      then\n          Alerts.Add("bp", "diastolic", Data.diastolic, "High blood\n  pressure (Hypertension Stage 1)");\n          Retract("HighDiastolic");\n  }\n\n  rule ElevatedBloodPressure {\n      when\n          Util.ToInt(Data.systolic) >= 120 &&\n  Util.ToInt(Data.systolic) <= 129 &&\n  Util.ToInt(Data.diastolic) < 80\n      then\n          Alerts.Add("bp", "systolic", Data.systolic, "Elevated blood\n  pressure");\n          Complete();\n  }\n\n  rule CheckLowBP salience 1 {\n      when\n          Util.ToInt(Data.systolic) < 90 &&\n  Util.ToInt(Data.diastolic) < 60\n      then\n          Alerts.Add("bp", "systolic", Data.systolic, "Low blood\n  pressure");\n          Alerts.Add("bp", "diastolic", Data.diastolic, "Low blood\n  pressure");\n          Complete();\n  }'}:s,validationSchema:RU.addRule,onSubmit:r,enableReinitialize:!0,children:e=>{var r,i,o,s,l,c,d,u,p;let{values:h}=e;return(0,qt.jsx)(qt.Fragment,{children:(0,qt.jsx)(nH,{children:(0,qt.jsxs)(yH,{variant:"outlined",children:[(0,qt.jsx)(nW,{title:(0,qt.jsxs)(Ff,{container:!0,spacing:2,alignItems:"center",children:[(0,qt.jsx)(Ff,{item:!0,xs:!0,children:(0,qt.jsx)(Cf,{variant:"h5",gutterBottom:!0,component:"h5",sx:{marginBottom:"0"},children:ta()(n)?a("rpm_AddNewRule"):a("rpm_ViewRule")})}),ta()(n)&&(0,qt.jsx)(qt.Fragment,{children:(0,qt.jsx)(Ff,{item:!0,children:(0,qt.jsx)(xh,{type:"submit",variant:"contained",color:"primary",disableElevation:!0,children:a("rpm_Save")})})})]}),sx:{py:1.5,bgcolor:"primary.theme.50"}}),(0,qt.jsx)(wH,{children:(0,qt.jsxs)(Ff,{container:!0,spacing:2,children:[(0,qt.jsx)(Ff,{item:!0,xs:12,md:4,children:(0,qt.jsxs)(op,{mb:2,children:[(0,qt.jsx)(o_,{htmlFor:"data_type",required:!0,sx:{mb:.75},children:a("rpm_VitalType")}),(0,qt.jsxs)(tH,{fullWidth:!0,as:G_,id:"data_type",name:"data_type",size:"small",displayEmpty:!0,disabled:!ta()(n),input:(0,qt.jsx)(qj,{}),endAdornment:(0,qt.jsx)(tw,{position:"end",sx:{position:"absolute",right:"28px"},children:(0,qt.jsx)(sy,{title:a("message:rpm_VitalTypeHelp"),placement:"top",children:(0,qt.jsx)(wh,{size:"small",disableRipple:!0,sx:{p:0},children:(0,qt.jsx)(pM.A,{fontSize:"small"})})})}),children:[null===Dd||void 0===Dd?void 0:Dd.map(e=>(0,qt.jsx)(mf,{value:e.value,children:a("rpm_".concat(e.name))},e.name)),(0,qt.jsx)(mf,{value:"bp.pulse",children:a("rpm_bp")})]}),(0,qt.jsx)(dH,{name:"data_type",children:e=>(0,qt.jsx)(v_,{error:!0,children:a(e,{field:a("rpm_VitalType")})})})]})}),(0,qt.jsx)(Ff,{item:!0,xs:12,md:4,children:(0,qt.jsxs)(op,{mb:2,children:[(0,qt.jsx)(o_,{htmlFor:"short_description",required:!0,sx:{mb:.75},children:a("rpm_ShortDescription")}),(0,qt.jsx)(tH,{fullWidth:!0,as:qj,id:"short_description",name:"short_description",size:"small",disabled:!ta()(n),multiline:!0,endAdornment:(0,qt.jsx)(tw,{position:"end",children:(0,qt.jsx)(sy,{title:a("message:rpm_ShortDescriptionHelp"),placement:"top",children:(0,qt.jsx)(wh,{size:"small",disableRipple:!0,sx:{p:0},children:(0,qt.jsx)(pM.A,{fontSize:"small"})})})})}),(0,qt.jsx)(dH,{name:"short_description",children:e=>(0,qt.jsx)(v_,{error:!0,children:a(e,{field:a("rpm_ShortDescription")})})})]})}),"glucose"==h.data_type&&(0,qt.jsx)(Ff,{item:!0,xs:12,md:12,children:(0,qt.jsx)(op,{mb:2,children:(0,qt.jsx)(qt.Fragment,{children:(0,qt.jsx)(Vw,{sx:{borderRadius:2},children:(0,qt.jsxs)(Bw,{children:[(0,qt.jsx)(_S,{children:(0,qt.jsxs)(cw,{sx:{"& .MuiTableCell-head":{border:1,borderColor:"#ddd",fontWeight:"600",bgcolor:"primary.theme.50",padding:.5}},children:[(0,qt.jsx)(gw,{align:"center",rowSpan:2,colSpan:2,children:a("rpm_Stages")}),(0,qt.jsx)(gw,{align:"center",rowSpan:2,colSpan:2,children:a("rpm_Activity")}),(0,qt.jsx)(gw,{align:"center",colSpan:2,children:a("rpm_From")}),(0,qt.jsx)(gw,{align:"center",colSpan:2,children:a("rpm_To")}),(0,qt.jsx)(gw,{align:"center",colSpan:2,children:a("rpm_Range")})]})}),(0,qt.jsxs)(fS,{children:[(0,qt.jsxs)(cw,{sx:{"& .MuiTableCell-body":{border:1,borderColor:"#ddd",p:1}},children:[(0,qt.jsx)(gw,{align:"center",colSpan:"2",className:"tableColor normalGlucose",children:a("rpm_normal")}),(0,qt.jsx)(gw,{align:"center",colSpan:"2",className:"tableColor fasting",children:(0,qt.jsx)(dM,{icon:!1,sx:e=>({py:0,px:1,display:"inline-flex",fontSize:e.spacing(1.5),"& .MuiAlert-message":{p:e.spacing(.5,0)},bgcolor:"customClr.fastingBg",color:"customClr.fastingText"}),children:(0,qt.jsx)("strong",{children:a("rpm_fasting")})})}),(0,qt.jsx)(gw,{align:"center",colSpan:"2",children:(null===(r=t[2])||void 0===r?void 0:r.data[0].value)+1}),(0,qt.jsx)(gw,{align:"center",colSpan:"2",children:(null===(i=t[1])||void 0===i?void 0:i.data[0].value)-1}),(0,qt.jsxs)(gw,{align:"center",colSpan:"2",children:[(null===(o=t[2])||void 0===o?void 0:o.data[0].value)+1," - ",(null===(s=t[1])||void 0===s?void 0:s.data[0].value)-1]})]}),(0,qt.jsxs)(cw,{sx:{"& .MuiTableCell-body":{border:1,borderColor:"#ddd",borderBottom:2,borderBottomColor:"#bbb",p:.5}},children:[(0,qt.jsx)(gw,{align:"center",colSpan:"2",className:"tableColor normalGlucose",children:a("rpm_normal")}),(0,qt.jsx)(gw,{align:"center",colSpan:"2",className:"tableColor nonfasting",children:(0,qt.jsx)(dM,{severity:"error",icon:!1,sx:e=>({py:0,px:1,display:"inline-flex",fontSize:e.spacing(1.5),"& .MuiAlert-message":{p:e.spacing(.5,0)},bgcolor:"customClr.nonfastingBg",color:"customClr.nonfastingText"}),children:(0,qt.jsx)("strong",{children:a("rpm_nonfasting")})})}),(0,qt.jsx)(gw,{align:"center",colSpan:"2",children:(null===(l=t[5])||void 0===l?void 0:l.data[0].value)+1}),(0,qt.jsx)(gw,{align:"center",colSpan:"2",children:(null===(c=t[4])||void 0===c?void 0:c.data[0].value)-1}),(0,qt.jsxs)(gw,{align:"center",colSpan:"2",children:[(null===(d=t[5])||void 0===d?void 0:d.data[0].value)+1," - ",(null===(u=t[4])||void 0===u?void 0:u.data[0].value)-1]})]}),null===t||void 0===t||null===(p=t.slice(0,6))||void 0===p?void 0:p.map((e,n)=>{var r,i,o,s,l,c,d,u,p,h,m,f;return(0,qt.jsxs)(cw,{sx:{"& .MuiTableCell-body":{border:1,borderColor:"#ddd",p:1}},children:[(0,qt.jsx)(gw,{align:"center",colSpan:"2",className:"tableColor ".concat(e.name),children:a("rpm_".concat(e.name.toLowerCase()))}),(0,qt.jsx)(gw,{align:"center",colSpan:"2",className:"tableColor ".concat("eq"==e.data[(null===e||void 0===e||null===(r=e.data)||void 0===r?void 0:r.length)-1].op?"fasting":"nonfasting"),children:"eq"==e.data[(null===e||void 0===e||null===(i=e.data)||void 0===i?void 0:i.length)-1].op?(0,qt.jsx)(dM,{icon:!1,sx:e=>({py:0,px:1,display:"inline-flex",fontSize:e.spacing(1.5),"& .MuiAlert-message":{p:e.spacing(.5,0)},bgcolor:"customClr.fastingBg",color:"customClr.fastingText"}),children:(0,qt.jsx)("strong",{children:a("rpm_fasting")})}):(0,qt.jsx)(dM,{severity:"error",icon:!1,sx:e=>({py:0,px:1,display:"inline-flex",fontSize:e.spacing(1.5),"& .MuiAlert-message":{p:e.spacing(.5,0)},bgcolor:"customClr.nonfastingBg",color:"customClr.nonfastingText"}),children:(0,qt.jsx)("strong",{children:a("rpm_nonfasting")})})}),(0,qt.jsx)(gw,{align:"center",colSpan:"2",children:"HypoglycemiaFasting"==e.name||"HypoglycemiaPP"==e.name?"-":e.data[0].value}),(0,qt.jsx)(gw,{align:"center",colSpan:"2",children:"DiabetesFasting"==e.name||"DiabetesPP"===e.name?"-":2===n?(null===(o=t[t.length-2])||void 0===o?void 0:o.data[0].value)-1:5===n?(null===(s=t[t.length-1])||void 0===s?void 0:s.data[0].value)-1:6===n?(null===(l=t[n-5])||void 0===l?void 0:l.data[0].value)-1:7===n?(null===(c=t[n-3])||void 0===c?void 0:c.data[0].value)-1:(null===(d=t[n-1])||void 0===d?void 0:d.data[0].value)-1}),(0,qt.jsxs)(gw,{align:"center",colSpan:"2",children:["HypoglycemiaFasting"==e.name||"HypoglycemiaPP"==e.name?"Below or ":e.data[0].value,"HypoglycemiaFasting"==e.name||"HypoglycemiaPP"==e.name||"DiabetesFasting"==e.name||"DiabetesPP"==e.name?"  ":" - ","DiabetesFasting"==e.name||"DiabetesPP"===e.name?" & Above":2===n?(null===(u=t[t.length-2])||void 0===u?void 0:u.data[0].value)-1:5===n?(null===(p=t[t.length-1])||void 0===p?void 0:p.data[0].value)-1:6===n?(null===(h=t[n-5])||void 0===h?void 0:h.data[0].value)-1:7===n?(null===(m=t[n-3])||void 0===m?void 0:m.data[0].value)-1:(null===(f=t[n-1])||void 0===f?void 0:f.data[0].value)-1]})]},e.salience)})]})]})})})})})]})})]})})})}},"editor_formik")})}),!1]})}vke.defaultProps={addNewRule:()=>{},glucoseRuleData:{},rulesHeadCell:[],activeProgram:{},glucoseExRuleArr:[]};const xke=vke;function yke(e){let{ruleData:t,addNewRule:n,rulesHeadCell:r,activeProgram:o,pulseRuleData:a,glucoseRuleData:s}=e;const{ruleId:l}=lo(),[c,d]=We.useState(null),[u,p]=We.useState(null),[h,m]=We.useState(null),[f,g]=We.useState(null),[v,x]=We.useState(null),[y,b]=We.useState(null),j=[{text:"and",sign:"&&"},{text:"or",sign:"||"},{text:"eq",sign:"=="},{text:"not",sign:"!="},{text:"gt",sign:">"},{text:"gte",sign:">="},{text:"lt",sign:"<"},{text:"lte",sign:"<="},{text:"bor",sign:"|"},{text:"band",sign:"&"},{text:"plus",sign:"+"},{text:"minus",sign:"-"},{text:"div",sign:"/"},{text:"mul",sign:"*"},{text:"mod",sign:"%"}],_=e=>{const t=j.find(t=>t.text===e);return null===t||void 0===t?void 0:t.sign},C=e=>{const t=[],n=Object.keys(null===e||void 0===e?void 0:e.when);return null===e||void 0===e||e.when[n[0]].forEach(r=>{let i=Object.keys(r);var o,a,s,l,c,d;"0"!==i[0]?i[0]&&t.push({name:null!==(o=r[i[0]])&&void 0!==o&&o[0]?null===(a=r[i[0]])||void 0===a?void 0:a[0]:null,value:null!==(s=r[i[0]])&&void 0!==s&&s[1]?null===(l=r[i[0]])||void 0===l?void 0:l[1]:null,op:i[0],between:n[0]}):t.push({name:null===e||void 0===e||null===(c=e.when[n[0]])||void 0===c?void 0:c[0],value:null===e||void 0===e||null===(d=e.when[n[0]])||void 0===d?void 0:d[1],op:n[0]?n[0]:null})}),t},w=e=>{var t;return(0,qt.jsx)(qt.Fragment,{children:(0,qt.jsx)(Ff,{container:!0,spacing:1.5,sx:{"& .sign":{"& span:last-child":{display:"none"}}},children:null===e||void 0===e||null===(t=e.data)||void 0===t?void 0:t.map((t,n)=>{var r;return(0,qt.jsxs)(Ff,{item:!0,className:(null===e||void 0===e||null===(r=e.data)||void 0===r?void 0:r.length)-1===n?"sign":"",children:[(0,qt.jsx)(op,{component:"span",children:null===t||void 0===t?void 0:t.name})," ",(0,qt.jsx)(op,{component:"span",children:_(null===t||void 0===t?void 0:t.op)})," ",(0,qt.jsx)(op,{component:"span",children:null===t||void 0===t?void 0:t.value})," ",(0,qt.jsx)(op,{component:"span",children:_(null===t||void 0===t?void 0:t.between)})]},n)})})})};return We.useEffect(()=>{ta()(t)||d(JSON.parse(null===t||void 0===t?void 0:t.rule))},[t]),We.useEffect(()=>{ta()(s)||m(JSON.parse(null===s||void 0===s?void 0:s.rule))},[s]),We.useEffect(()=>{ta()(a)||p(JSON.parse(null===a||void 0===a?void 0:a.rule))},[a]),We.useEffect(()=>{(()=>{const e=[];null===c||void 0===c||c.forEach(t=>{e.push((0,i.A)((0,i.A)({},t),{},{data:C(t)}))}),x(e)})()},[c]),We.useEffect(()=>{(async()=>{const e=[];await(null===h||void 0===h?void 0:h.forEach(t=>{e.push((0,i.A)((0,i.A)({},t),{},{data:C(t)}))})),g(e)})()},[h]),We.useEffect(()=>{(()=>{const e=[];null===u||void 0===u||u.forEach(t=>{e.push((0,i.A)((0,i.A)({},t),{},{data:C(t)}))}),b(e)})()},[u]),We.useEffect(()=>{_()},[v]),"add"===l?(0,qt.jsx)(op,{sx:{width:"100%"},children:(0,qt.jsx)(mke,{addNewRule:n})}):(0,qt.jsxs)(op,{sx:{width:"100%"},children:[!ta()(v)&&(0,qt.jsx)(gke,{exRuleArr:v,ruleData:t,rulesHeadCell:r,getVitalsValue:w,activeProgram:o,pulseRuleData:a,pulseExRuleArr:y}),!ta()(f)&&(0,qt.jsx)(xke,{glucoseExRuleArr:f,glucoseRuleData:s,rulesHeadCell:r,getVitalsValue:w,activeProgram:o})]})}yke.defaultProps={addNewRule:()=>{},ruleData:{},rulesHeadCell:[],activeProgram:{},pulseRuleData:{},glucoseRuleData:{}};const bke=yke;const jke=function(e){var t;let{activeProgram:n}=e;const r=Nt(),o=wt(cu),{t:a}=Vg(),s=so(),{enqueueSnackbar:l}=hi(),{ruleId:c}=lo(),[d,u]=We.useState(null),[p,h]=We.useState(null),[m,f]=We.useState(null),[g,v]=We.useState(null),x=e=>{const t=[];return null===e||void 0===e||e.forEach(e=>{t.push((0,i.A)((0,i.A)({},e),{},{name:e.name,desc:e.desc,when:y(e)}))}),t},y=e=>{let t={};return e.when.between?t[e.when.between]=e.when.cond.map(e=>({[e.op]:[e.name,parseInt(e.value)]})):t[e.when.cond[0].op]=[e.when.cond[0].name,parseInt(e.when.cond[0].value)],t},b=[{id:"level",label:a("rpm_Level"),isSort:!1,sortProperty:"level"},{id:"condition",label:a("rpm_Condition"),isSort:!1,sortProperty:"condition"},{id:"description",label:a("rpm_Description"),isSort:!1,sortProperty:"description"}];return We.useEffect(()=>{o&&"add"!==c&&!cs(n)&&(async()=>{const{data:e}=await r(Ys(null===n||void 0===n?void 0:n.code,c));"bp"==e.data_type&&u(e),"glucose"==e.data_type&&h(e)})()},[o,c,n]),We.useEffect(()=>{cs(g)||cs(n)||(async()=>{const{data:e}=await r(Ys(null===n||void 0===n?void 0:n.code,null===g||void 0===g?void 0:g.id));f(e)})()},[o,g]),We.useEffect(()=>{o&&"add"!==c&&!cs(n)&&(async()=>{try{const{data:e}=await r(Vs(null===n||void 0===n?void 0:n.code,{per_page:999})),{content:t}=e||{},i=null===t||void 0===t?void 0:t.find(e=>"bp.pulse"===e.data_type);v(i)}catch(e){r(Zo({subTitle:e.message,severity:ud.ERROR}))}})()},[o,n]),We.useEffect(()=>{r(NC({activeMenuItem:"rules_program"}))},[n]),cs(n)?(0,qt.jsx)(yp,{variant:"outlined",sx:{px:2.5,py:6,display:"flex",height:"320px"},children:(0,qt.jsx)(op,{alignSelf:"center",sx:{mx:"auto"},children:(0,qt.jsx)(MM,{color:"primary"})})}):(0,qt.jsx)(qt.Fragment,{children:cs(n)||null!==n&&void 0!==n&&null!==(t=n.permissions)&&void 0!==t&&t.showViewRuleBtn?(0,qt.jsx)(bke,{addNewRule:async e=>{const t=null===e||void 0===e?void 0:e.rule,o=(0,i.A)((0,i.A)({},e),{},{execution_engine:"JSON",rule:JSON.stringify(x(t))});try{await r(Gs(null===n||void 0===n?void 0:n.code,o)),l(a("message:rpm_RuleCreatedSuccessfully"),{variant:"success"}),s(-1)}catch(c){l(c.message,{variant:"error"})}},ruleData:d,rulesHeadCell:b,glucoseRuleData:p,activeProgram:n,pulseRuleData:m}):(0,qt.jsx)(LC,{})})};function _ke(e){var t,n,r,o,a,s,l,c,d,u,p,h,m,f,g,v;let{handleInitialValues:x}=e;const{t:y}=Vg(),[b,j]=We.useState([]),_=e=>{const t=[],n=Object.keys(null===e||void 0===e?void 0:e.when);return null===e||void 0===e||e.when[n[0]].forEach(r=>{let i=Object.keys(r);var o,a,s,l,c,d;"0"!==i[0]?i[0]&&t.push({name:null!==(o=r[i[0]])&&void 0!==o&&o[0]?null===(a=r[i[0]])||void 0===a?void 0:a[0]:null,value:null!==(s=r[i[0]])&&void 0!==s&&s[1]?null===(l=r[i[0]])||void 0===l?void 0:l[1]:null,op:i[0],between:n[0]}):t.push({name:null===e||void 0===e||null===(c=e.when[n[0]])||void 0===c?void 0:c[0],value:null===e||void 0===e||null===(d=e.when[n[0]])||void 0===d?void 0:d[1],op:n[0]?n[0]:null})}),t};return We.useEffect(()=>{cs(x)||(()=>{const e=[];null===x||void 0===x||x.forEach(t=>{e.push((0,i.A)((0,i.A)({},t),{},{data:_(t)}))}),j(e)})()},[x]),(0,qt.jsx)(op,{children:(0,qt.jsx)(Vw,{sx:{borderRadius:2},children:(0,qt.jsxs)(Bw,{children:[(0,qt.jsxs)(_S,{children:[(0,qt.jsxs)(cw,{sx:{"& .MuiTableCell-head":{border:1,borderColor:"#ddd",fontWeight:"600",bgcolor:"primary.theme.50",padding:.5}},children:[(0,qt.jsx)(gw,{align:"center",rowSpan:2,colSpan:2,children:y("rpm_Stages")}),(0,qt.jsx)(gw,{align:"center",colSpan:2,children:y("rpm_Systolic")}),(0,qt.jsx)(gw,{align:"center",colSpan:3,children:y("rpm_Diastolic")}),(0,qt.jsx)(gw,{align:"center",rowSpan:2,colSpan:2,children:y("rpm_BpRange(Sys/Dia)")})]}),(0,qt.jsx)(cw,{className:"inner_head",sx:{"& .MuiTableCell-head:first-of-type":{display:"none"},"& .MuiTableCell-head":{border:1,borderColor:"#ddd"},bgcolor:"primary.theme.50"},children:[{id:"stage",align:"left"},{id:"from1",label:"From",align:"left"},{id:"to1",label:"To",align:"left"},{id:"from2",label:"From",align:"left"},{id:"to2",label:"To",align:"left"}].map(e=>(0,qt.jsx)(gw,{align:"center",style:{top:57,minWidth:e.minWidth},colSpan:"1",children:y("rpm_".concat(e.label))},e.id))})]}),(0,qt.jsxs)(fS,{children:[null===b||void 0===b?void 0:b.map((e,t)=>{var n,r,i,o,a,s,l,c,d,u,p,h,m,f;return(0,qt.jsxs)(cw,{sx:{"& .MuiTableCell-body":{border:1,borderColor:"#ddd",padding:1}},children:[(0,qt.jsx)(gw,{align:"center",colSpan:"2",className:"tableColor ".concat(e.name),children:y("rpm_".concat(e.name))}),(0,qt.jsxs)(gw,{align:"center",colSpan:"1",children:[0===t&&b[t].data[0].value,!(0===t||t===b.length-1)&&e.data[0].value,t===b.length-1&&"-"]}),(0,qt.jsxs)(gw,{align:"center",colSpan:"1",children:[0===t?"-":!(t===b.length-1)&&(null===(n=b[t-1])||void 0===n||null===(r=n.data[0])||void 0===r?void 0:r.value)-1,t===b.length-1&&(null===e||void 0===e||null===(i=e.data[0])||void 0===i?void 0:i.value)]}),(0,qt.jsxs)(gw,{align:"center",colSpan:"1",children:[0===t&&b[t].data[1].value,!(0===t||t===b.length-1||3===t)&&e.data[1].value,(t===b.length-1||3===t)&&"-"]}),(0,qt.jsxs)(gw,{align:"center",colSpan:"2",children:[0===t?"-":!(t===b.length-1)&&(null===(o=b[t-1])||void 0===o||null===(a=o.data[1])||void 0===a?void 0:a.value)-1,t===b.length-1&&(null===e||void 0===e||null===(s=e.data[1])||void 0===s?void 0:s.value)]}),(0,qt.jsxs)(gw,{align:"center",colSpan:"2",children:[0===t&&"".concat(b[t].data[0].value," & Above"),!(0===t||t===b.length-1)&&"".concat(null===(l=b[t])||void 0===l||null===(c=l.data[0])||void 0===c?void 0:c.value,"\n                        -\n                        ").concat((null===(d=b[t-1])||void 0===d||null===(u=d.data[0])||void 0===u?void 0:u.value)-1),t===b.length-1&&"Below or ".concat(e.data[0].value)," / ",0===t&&"".concat(b[t].data[1].value," & Above"),!(0===t||t===b.length-1||3===t)&&"".concat(null===(p=b[t])||void 0===p||null===(h=p.data[1])||void 0===h?void 0:h.value,"\n                        -\n                        ").concat((null===(m=b[t-1])||void 0===m||null===(f=m.data[1])||void 0===f?void 0:f.value)-1),(t===b.length-1||3===t)&&"Below or ".concat(e.data[1].value)]})]},e.salience)}),!cs(b)&&(0,qt.jsxs)(cw,{sx:{"& .MuiTableCell-body":{border:1,borderColor:"#ddd",p:1}},children:[(0,qt.jsx)(gw,{align:"center",colSpan:"2",className:"tableColor normal",children:y("rpm_NormalPressure")}),(0,qt.jsx)(gw,{align:"center",colSpan:"1",children:(null===(t=b[(null===b||void 0===b?void 0:b.length)-1])||void 0===t||null===(n=t.data[0])||void 0===n?void 0:n.value)+1}),(0,qt.jsx)(gw,{align:"center",colSpan:"1",children:(null===(r=b[(null===b||void 0===b?void 0:b.length)-2])||void 0===r||null===(o=r.data[0])||void 0===o?void 0:o.value)-1}),(0,qt.jsx)(gw,{align:"center",colSpan:"1",children:(null===(a=b[(null===b||void 0===b?void 0:b.length)-1])||void 0===a||null===(s=a.data[1])||void 0===s?void 0:s.value)+1}),(0,qt.jsx)(gw,{align:"center",colSpan:"2",children:(null===(l=b[(null===b||void 0===b?void 0:b.length)-2])||void 0===l||null===(c=l.data[1])||void 0===c?void 0:c.value)-1}),(0,qt.jsxs)(gw,{align:"center",colSpan:"2",children:[(null===(d=b[(null===b||void 0===b?void 0:b.length)-1])||void 0===d||null===(u=d.data[0])||void 0===u?void 0:u.value)+1," "," - ",(null===(p=b[(null===b||void 0===b?void 0:b.length)-2])||void 0===p||null===(h=p.data[0])||void 0===h?void 0:h.value)-1," "," / ",(null===(m=b[(null===b||void 0===b?void 0:b.length)-1])||void 0===m||null===(f=m.data[1])||void 0===f?void 0:f.value)+1," "," - ",(null===(g=b[(null===b||void 0===b?void 0:b.length)-2])||void 0===g||null===(v=g.data[1])||void 0===v?void 0:v.value)-1]})]})]})]})})})}const Cke=(0,We.memo)(_ke);const wke=function(e){let{tags:t,diastolic:n,setDiastolic:r,getPercentage:o,limitNumberWithinRange:a,nearestN:s,styles:l}=e;const{t:c}=Vg(),d=(0,We.useRef)(null),[u,p]=We.useState(["CheckLowBP"]),h=e=>{const t=e.currentTarget.attributes["data-id"].value;u.includes(t)?p(u.filter(e=>e!==t)):p(()=>[t])},m=(e,t)=>{e.stopPropagation(),document.body.style.cursor="ew-resize";const i=e.pageX,l=d.current.offsetWidth,c=e=>{e.stopPropagation();const c=(e.touches?e.touches[0].pageX:e.pageX)-i,d=n[t]+n[t+1],u=s(1,o(l,c)),p=n.slice(),h=p[t],m=a(h+u,0,d);if(p[t]=m,m<10)return!1;r(p)};window.addEventListener("pointermove",c),window.addEventListener("touchmove",c);const u=e=>{e.stopPropagation(),document.body.style.cursor="initial",window.removeEventListener("pointermove",c),window.removeEventListener("touchmove",c)};window.addEventListener("touchend",u),window.addEventListener("pointerup",u)},f=e=>{let{tag:t,width:n,onSystolicSliderSelect:r,noSliderButton:o,previousWidth:a,rangeIndex:s}=e;return(0,qt.jsx)(Dye,{className:"tag",style:l.tag,sx:{background:t.color,width:o?"30px":"20%"},onClick:h,"data-id":t.id,children:(0,qt.jsxs)(Dye,{children:[(0,qt.jsx)(Cf,{style:l.tagText,children:t.name}),(0,qt.jsx)(Cf,{style:(0,i.A)((0,i.A)({},l.tagText),{},{fontSize:12}),children:0===s||2===s?"Below or ".concat(n):5===s?" ".concat(n," & Above"):6===s?n:" ".concat(a+1," - ").concat(n)}),!o&&u.includes(t.id.toString())?(0,qt.jsx)(sy,{title:"Drag to adjust",children:(0,qt.jsxs)(Dye,{className:"slider-button",style:l.sliderButton,onPointerDown:r,children:[(0,qt.jsx)(Pye.A,{fontSize:"small",sx:{transform:"rotate(180deg)",position:"relative",left:"6px"}}),(0,qt.jsx)(Pye.A,{fontSize:"small",sx:{position:"relative",right:"6px"}})]})}):!o&&(0,qt.jsx)(sy,{title:"Click to unlock",children:(0,qt.jsx)(Dye,{className:"slider-button",style:l.sliderButton,children:(0,qt.jsx)(Rye.A,{fontSize:"small"})})})]})})};return(0,qt.jsxs)(qt.Fragment,{children:[(0,qt.jsx)(Dye,{ref:d,sx:{width:"100%",display:"flex",backgroundColor:"transparent",flexDirection:"row"},children:t.map((e,r)=>(0,qt.jsx)(We.Fragment,{children:(0,qt.jsx)(f,{width:n[r],noSliderButton:r===t.length-1,tag:e,onSystolicSliderSelect:e=>m(e,r),previousWidth:n[r-1],nextWidth:n[r+1],rangeIndex:r},r)},r))}),(0,qt.jsx)(Cf,{variant:"body1",fontWeight:600,sx:{mt:.5,mb:3},children:c("rpm_DiastolicRange")})]})};const Ske=function(e){let{tags:t,fastingRange:n,setFastingRange:r,getPercentage:o,limitNumberWithinRange:a,nearestN:s,styles:l}=e;const{t:c}=Vg(),[d,u]=We.useState(["Hypoglycemia"]),p=e=>{const t=e.currentTarget.attributes["data-id"].value;d.includes(t)?u(d.filter(e=>e!==t)):u(()=>[t])},h=(0,We.useRef)(null),m=(e,t)=>{e.stopPropagation(),document.body.style.cursor="ew-resize";const i=e.pageX,l=h.current.offsetWidth,c=e=>{e.stopPropagation();const c=(e.touches?e.touches[0].pageX:e.pageX)-i,d=n[t]+n[t+1],u=s(1,o(l,c)),p=n.slice(),h=p[t],m=a(h+u,0,d);if(p[t]=m,m<10)return!1;r(p)};window.addEventListener("pointermove",c),window.addEventListener("touchmove",c);const d=e=>{e.stopPropagation(),document.body.style.cursor="initial",window.removeEventListener("pointermove",c),window.removeEventListener("touchmove",c)};window.addEventListener("touchend",d),window.addEventListener("pointerup",d)},f=e=>{let{tag:t,width:n,onFastingRangeSelect:r,noSliderButton:o,previousWidth:a,rangeIndex:s}=e;return(0,qt.jsx)(Dye,{className:"tag",style:l.tag,sx:{background:t.color,width:o?"30px":"25%"},onClick:p,"data-id":t.id,children:(0,qt.jsxs)(Dye,{children:[(0,qt.jsx)(Cf,{style:l.tagText,children:t.name}),(0,qt.jsx)(Cf,{style:(0,i.A)((0,i.A)({},l.tagText),{},{fontSize:12}),children:0===s?"Below or ".concat(n):3===s?" ".concat(n," & Above"):" ".concat(a+1," - ").concat(n)}),!o&&d.includes(t.id.toString())?(0,qt.jsx)(sy,{title:"Drag to adjust",children:(0,qt.jsxs)(Dye,{className:"slider-button",style:l.sliderButton,onPointerDown:r,children:[(0,qt.jsx)(Pye.A,{fontSize:"small",sx:{transform:"rotate(180deg)",position:"relative",left:"6px"}}),(0,qt.jsx)(Pye.A,{fontSize:"small",sx:{position:"relative",right:"6px"}})]})}):!o&&(0,qt.jsx)(sy,{title:"Click to unlock",children:(0,qt.jsx)(Dye,{className:"slider-button",style:l.sliderButton,children:(0,qt.jsx)(Rye.A,{fontSize:"small"})})})]})})};return(0,qt.jsxs)(qt.Fragment,{children:[(0,qt.jsx)(Cf,{variant:"body1",fontWeight:600,sx:{mb:.5},children:c("rpm_fasting")}),(0,qt.jsx)(Dye,{ref:h,sx:{width:"100%",display:"flex",backgroundColor:"transparent",flexDirection:"row"},children:t.map((e,r)=>(0,qt.jsx)(We.Fragment,{children:(0,qt.jsx)(f,{width:n[r],noSliderButton:r===t.length-1,tag:e,onFastingRangeSelect:e=>m(e,r),previousWidth:n[r-1],nextWidth:n[r+1],rangeIndex:r},r)},r))})]})};const Ake=function(e){let{tags:t,ppRange:n,setPPRange:r,getPercentage:o,limitNumberWithinRange:a,nearestN:s,styles:l}=e;const{t:c}=Vg(),[d,u]=We.useState(["Hypoglycemia"]),p=e=>{const t=e.currentTarget.attributes["data-id"].value;d.includes(t)?u(d.filter(e=>e!==t)):u(()=>[t])},h=(0,We.useRef)(null),m=(e,t)=>{e.stopPropagation(),document.body.style.cursor="ew-resize";const i=e.pageX,l=h.current.offsetWidth,c=e=>{e.stopPropagation();const c=(e.touches?e.touches[0].pageX:e.pageX)-i,d=n[t]+n[t+1],u=s(1,o(l,c)),p=n.slice(),h=p[t],m=a(h+u,0,d);if(p[t]=m,m<10)return!1;r(p)};window.addEventListener("pointermove",c),window.addEventListener("touchmove",c);const d=e=>{e.stopPropagation(),document.body.style.cursor="initial",window.removeEventListener("pointermove",c),window.removeEventListener("touchmove",c)};window.addEventListener("touchend",d),window.addEventListener("pointerup",d)},f=e=>{let{tag:t,width:n,onPPRangeSelect:r,noSliderButton:o,previousWidth:a,rangeIndex:s}=e;return(0,qt.jsx)(Dye,{className:"tag",style:l.tag,sx:{background:t.color,width:o?"30px":"25%"},onClick:p,"data-id":t.id,children:(0,qt.jsxs)(Dye,{children:[(0,qt.jsx)(Cf,{style:l.tagText,children:t.name}),(0,qt.jsxs)(Cf,{style:(0,i.A)((0,i.A)({},l.tagText),{},{fontSize:12}),children:[" ",0===s?"Below or ".concat(n):3===s?" ".concat(n," & Above"):" ".concat(a+1," - ").concat(n)]}),!o&&d.includes(t.id.toString())?(0,qt.jsx)(sy,{title:"Drag to adjust",children:(0,qt.jsxs)(Dye,{className:"slider-button",style:l.sliderButton,onPointerDown:r,children:[(0,qt.jsx)(Pye.A,{fontSize:"small",sx:{transform:"rotate(180deg)",position:"relative",left:"6px"}}),(0,qt.jsx)(Pye.A,{fontSize:"small",sx:{position:"relative",right:"6px"}})]})}):!o&&(0,qt.jsx)(sy,{title:"Click to unlock",children:(0,qt.jsx)(Dye,{className:"slider-button",style:l.sliderButton,children:(0,qt.jsx)(Rye.A,{fontSize:"small"})})})]})})};return(0,qt.jsxs)(qt.Fragment,{children:[(0,qt.jsx)(Dye,{ref:h,sx:{width:"100%",display:"flex",backgroundColor:"transparent",flexDirection:"row"},children:t.map((e,r)=>(0,qt.jsx)(We.Fragment,{children:(0,qt.jsx)(f,{width:n[r],noSliderButton:r===t.length-1,tag:e,onPPRangeSelect:e=>m(e,r),previousWidth:n[r-1],nextWidth:n[r+1],rangeIndex:r},r)},r))}),(0,qt.jsx)(Cf,{variant:"body1",fontWeight:600,sx:{mt:.5,mb:3},children:c("rpm_nonfasting")})]})};const kke=function(e){let{styles:t,fastingRange:n,setFastingRange:r,getPercentage:i,limitNumberWithinRange:o,nearestN:a,ppRange:s,setPPRange:l,glucoseTags:c,setGlucoseTags:d}=e;return(0,qt.jsxs)(qt.Fragment,{children:[(0,qt.jsx)(Ske,{tags:c,setTags:d,fastingRange:n,setFastingRange:r,getPercentage:i,limitNumberWithinRange:o,nearestN:a,styles:t}),(0,qt.jsx)(op,{my:.5}),(0,qt.jsx)(Ake,{tags:c,setTags:d,ppRange:s,setPPRange:l,getPercentage:i,limitNumberWithinRange:o,nearestN:a,styles:t})]})};const Tke=function(e){var t,n,r,o,a,s,l,c,d,u,p,h,m;let{handleInitialValues:f}=e;const{t:g}=Vg(),[v,x]=We.useState(null),y=e=>{const t=[],n=Object.keys(null===e||void 0===e?void 0:e.when);return null===e||void 0===e||e.when[n[0]].forEach(r=>{let i=Object.keys(r);var o,a,s,l,c,d;"0"!==i[0]?i[0]&&t.push({name:null!==(o=r[i[0]])&&void 0!==o&&o[0]?null===(a=r[i[0]])||void 0===a?void 0:a[0]:null,value:null!==(s=r[i[0]])&&void 0!==s&&s[1]?null===(l=r[i[0]])||void 0===l?void 0:l[1]:null,op:i[0],between:n[0]}):t.push({name:null===e||void 0===e||null===(c=e.when[n[0]])||void 0===c?void 0:c[0],value:null===e||void 0===e||null===(d=e.when[n[0]])||void 0===d?void 0:d[1],op:n[0]?n[0]:null})}),t};return We.useEffect(()=>{(()=>{const e=[];null===f||void 0===f||f.forEach(t=>{e.push((0,i.A)((0,i.A)({},t),{},{data:y(t)}))}),x(e)})()},[f]),(0,qt.jsx)(op,{children:(0,qt.jsx)(Vw,{sx:{borderRadius:2},children:(0,qt.jsxs)(Bw,{children:[(0,qt.jsx)(_S,{children:(0,qt.jsxs)(cw,{sx:{"& .MuiTableCell-head":{border:1,borderColor:"#ddd",fontWeight:"600",bgcolor:"primary.theme.50",padding:.5}},children:[(0,qt.jsx)(gw,{align:"center",rowSpan:2,colSpan:2,children:g("rpm_Stages")}),(0,qt.jsx)(gw,{align:"center",rowSpan:2,colSpan:2,children:g("rpm_Activity")}),(0,qt.jsx)(gw,{align:"center",colSpan:2,children:g("rpm_From")}),(0,qt.jsx)(gw,{align:"center",colSpan:2,children:g("rpm_To")}),(0,qt.jsx)(gw,{align:"center",colSpan:2,children:g("rpm_Range")})]})}),(0,qt.jsxs)(fS,{children:[(0,qt.jsxs)(qt.Fragment,{children:[(0,qt.jsxs)(cw,{sx:{"& .MuiTableCell-body":{border:1,borderColor:"#ddd",p:1}},children:[(0,qt.jsx)(gw,{align:"center",colSpan:"2",className:"tableColor normalGlucose",children:g("rpm_normalfasting")}),(0,qt.jsx)(gw,{align:"center",colSpan:"2",className:"tableColor fasting",children:(0,qt.jsx)(dM,{severity:"error",icon:!1,sx:e=>({py:0,px:1,display:"inline-flex",fontSize:e.spacing(1.5),"& .MuiAlert-message":{p:e.spacing(.5,0)},bgcolor:"customClr.fastingBg",color:"customClr.fastingText"}),children:(0,qt.jsx)("strong",{children:g("rpm_fasting")})})}),(0,qt.jsx)(gw,{align:"center",colSpan:"2",children:(null===v||void 0===v||null===(t=v[2])||void 0===t||null===(n=t.data[0])||void 0===n?void 0:n.value)+1}),(0,qt.jsx)(gw,{align:"center",colSpan:"2",children:(null===v||void 0===v||null===(r=v[1])||void 0===r||null===(o=r.data[0])||void 0===o?void 0:o.value)-1}),(0,qt.jsxs)(gw,{align:"center",colSpan:"2",children:[(null===v||void 0===v||null===(a=v[2])||void 0===a||null===(s=a.data[0])||void 0===s?void 0:s.value)+1," "," - ",(null===v||void 0===v||null===(l=v[1])||void 0===l||null===(c=l.data[0])||void 0===c?void 0:c.value)-1]})]}),(0,qt.jsxs)(cw,{sx:{"& .MuiTableCell-body":{border:1,borderColor:"#ddd",borderBottom:2,borderBottomColor:"#bbb",p:1}},children:[(0,qt.jsx)(gw,{align:"center",colSpan:"2",className:"tableColor normalGlucose",children:g("rpm_normalpp")}),(0,qt.jsx)(gw,{align:"center",colSpan:"2",className:"tableColor nonfasting",children:(0,qt.jsx)(dM,{icon:!1,sx:e=>({py:0,px:1,display:"inline-flex",fontSize:e.spacing(1.5),"& .MuiAlert-message":{p:e.spacing(.5,0)},bgcolor:"customClr.nonfastingBg",color:"customClr.nonfastingText"}),children:(0,qt.jsx)("strong",{children:g("rpm_nonfasting")})})}),(0,qt.jsx)(gw,{align:"center",colSpan:"2",children:(null===v||void 0===v||null===(d=v[5])||void 0===d?void 0:d.data[0].value)+1}),(0,qt.jsx)(gw,{align:"center",colSpan:"2",children:(null===v||void 0===v||null===(u=v[4])||void 0===u?void 0:u.data[0].value)-1}),(0,qt.jsxs)(gw,{align:"center",colSpan:"2",children:[(null===v||void 0===v||null===(p=v[5])||void 0===p?void 0:p.data[0].value)+1," "," - ",(null===v||void 0===v||null===(h=v[4])||void 0===h?void 0:h.data[0].value)-1]})]})]}),null===v||void 0===v||null===(m=v.slice(0,6))||void 0===m?void 0:m.map((e,t)=>{var n,r,i,o;return(0,qt.jsxs)(cw,{sx:{"& .MuiTableCell-body":{border:1,borderColor:"#ddd",p:1}},children:[(0,qt.jsx)(gw,{align:"center",colSpan:"2",className:"tableColor ".concat(e.name),children:g("rpm_".concat(e.name.toLowerCase()))}),(0,qt.jsx)(gw,{align:"center",colSpan:"2",className:"tableColor ".concat("eq"==e.data[(null===e||void 0===e||null===(n=e.data)||void 0===n?void 0:n.length)-1].op?"fasting":"nonfasting"),children:"eq"==e.data[(null===e||void 0===e||null===(r=e.data)||void 0===r?void 0:r.length)-1].op?(0,qt.jsx)(dM,{severity:"error",icon:!1,sx:e=>({py:0,px:1,display:"inline-flex",fontSize:e.spacing(1.5),"& .MuiAlert-message":{p:e.spacing(.5,0)},bgcolor:"customClr.fastingBg",color:"customClr.fastingText"}),children:(0,qt.jsx)("strong",{children:g("rpm_fasting")})}):(0,qt.jsx)(dM,{icon:!1,sx:e=>({py:0,px:1,display:"inline-flex",fontSize:e.spacing(1.5),"& .MuiAlert-message":{p:e.spacing(.5,0)},bgcolor:"customClr.nonfastingBg",color:"customClr.nonfastingText"}),children:(0,qt.jsx)("strong",{children:g("rpm_nonfasting")})})}),(0,qt.jsx)(gw,{align:"center",colSpan:"2",children:"HypoglycemiaFasting"==e.name||"HypoglycemiaPP"==e.name?"-":e.data[0].value}),(0,qt.jsx)(gw,{align:"center",colSpan:"2",children:0===t||3===t?"-":e.data[(null===e||void 0===e||null===(i=e.data)||void 0===i?void 0:i.length)-2].value}),(0,qt.jsxs)(gw,{align:"center",colSpan:"2",children:["HypoglycemiaFasting"==e.name||"HypoglycemiaPP"==e.name?"Below":e.data[0].value," ","-"," ","DiabetesFasting"==e.name||"DiabetesPP"==e.name?"Above":e.data[(null===e||void 0===e||null===(o=e.data)||void 0===o?void 0:o.length)-2].value]})]},e.salience)})]})]})})})};const Eke=function(e){let{tags:t,pulse:n,setPulse:r,getPercentage:o,limitNumberWithinRange:a,nearestN:s,styles:l}=e;const{t:c}=Vg(),[d,u]=We.useState(["LowPulse"]),p=e=>{const t=e.currentTarget.attributes["data-id"].value;d.includes(t)?u(d.filter(e=>e!==t)):u(()=>[t])},h=(0,We.useRef)(null),m=(e,t)=>{e.stopPropagation(),document.body.style.cursor="ew-resize";const i=e.pageX,l=h.current.offsetWidth,c=e=>{e.stopPropagation();const c=(e.touches?e.touches[0].pageX:e.pageX)-i,d=n[t]+n[t+1],u=s(1,o(l,c)),p=n.slice(),h=p[t],m=a(h+u,0,d);if(p[t]=m,m<10)return!1;r(p)};window.addEventListener("pointermove",c),window.addEventListener("touchmove",c);const d=e=>{e.stopPropagation(),document.body.style.cursor="initial",window.removeEventListener("pointermove",c),window.removeEventListener("touchmove",c)};window.addEventListener("touchend",d),window.addEventListener("pointerup",d)},f=e=>{let{tag:t,width:n,onPulseSliderSelect:r,noSliderButton:o,rangeIndex:a,previousWidth:s}=e;return(0,qt.jsx)(Dye,{className:"tag",style:l.tag,sx:{background:t.color,width:o?"30px":"33%"},onClick:p,"data-id":t.id,children:(0,qt.jsxs)(Dye,{children:[(0,qt.jsx)(Cf,{style:l.tagText,children:t.name}),(0,qt.jsxs)(Cf,{style:(0,i.A)((0,i.A)({},l.tagText),{},{fontSize:12}),children:[" ",0===a?"Below or ".concat(n):1===a?" ".concat(s+1," - ").concat(n):" ".concat(n," & Above")]}),!o&&d.includes(t.id.toString())?(0,qt.jsx)(sy,{title:"Drag to adjust",children:(0,qt.jsxs)(Dye,{className:"slider-button",style:l.sliderButton,onPointerDown:r,children:[(0,qt.jsx)(Pye.A,{fontSize:"small",sx:{transform:"rotate(180deg)",position:"relative",left:"6px"}}),(0,qt.jsx)(Pye.A,{fontSize:"small",sx:{position:"relative",right:"6px"}})]})}):!o&&(0,qt.jsx)(sy,{title:"Click to unlock",children:(0,qt.jsx)(Dye,{className:"slider-button",style:l.sliderButton,children:(0,qt.jsx)(Rye.A,{fontSize:"small"})})})]})})};return(0,qt.jsxs)(qt.Fragment,{children:[(0,qt.jsx)(Cf,{variant:"body1",fontWeight:600,sx:{mb:1.5},children:c("rpm_PulseRange")}),(0,qt.jsx)(Dye,{ref:h,sx:{width:"100%",display:"flex",backgroundColor:"transparent",flexDirection:"row"},children:t.map((e,r)=>(0,qt.jsx)(We.Fragment,{children:(0,qt.jsx)(f,{width:n[r],noSliderButton:r===t.length-1,tag:e,onPulseSliderSelect:e=>m(e,r),rangeIndex:r,nextWidth:n[r+1],previousWidth:n[r-1]},r)},r))})]})};const Mke=function(e){let{handleInitialValues:t,pulse:n}=e;const{t:r}=Vg(),[o,a]=We.useState([]),s=e=>{const t=[],n=Object.keys(null===e||void 0===e?void 0:e.when);return null===e||void 0===e||e.when[n[0]].forEach(r=>{let i=Object.keys(r);var o,a,s,l,c,d;"0"!==i[0]?i[0]&&t.push({name:null!==(o=r[i[0]])&&void 0!==o&&o[0]?null===(a=r[i[0]])||void 0===a?void 0:a[0]:null,value:null!==(s=r[i[0]])&&void 0!==s&&s[1]?null===(l=r[i[0]])||void 0===l?void 0:l[1]:null,op:i[0],between:n[0]}):t.push({name:null===e||void 0===e||null===(c=e.when[n[0]])||void 0===c?void 0:c[0],value:null===e||void 0===e||null===(d=e.when[n[0]])||void 0===d?void 0:d[1],op:n[0]?n[0]:null})}),t};return We.useEffect(()=>{cs(t)||(()=>{const e=[];null===t||void 0===t||t.forEach(t=>{e.push((0,i.A)((0,i.A)({},t),{},{data:s(t)}))}),a(e)})()},[t]),(0,qt.jsx)(op,{children:(0,qt.jsx)(Vw,{sx:{borderRadius:2,mt:2},children:(0,qt.jsxs)(Bw,{children:[(0,qt.jsx)(_S,{children:(0,qt.jsxs)(cw,{sx:{"& .MuiTableCell-head":{border:1,borderColor:"#ddd",fontWeight:"600",bgcolor:"primary.theme.50",padding:.5}},children:[(0,qt.jsx)(gw,{align:"center",children:r("rpm_Stages")}),(0,qt.jsx)(gw,{align:"center",children:r("rpm_From")}),(0,qt.jsx)(gw,{align:"center",children:r("rpm_To")}),(0,qt.jsx)(gw,{align:"center",children:r("rpm_Range")})]})}),(0,qt.jsxs)(fS,{children:[null===o||void 0===o?void 0:o.map((e,t)=>(0,qt.jsxs)(cw,{sx:{"& .MuiTableCell-body":{border:1,borderColor:"#ddd",p:1}},children:[(0,qt.jsx)(gw,{align:"center",className:"tableColor ".concat(e.name),children:r("rpm_".concat(e.name))}),(0,qt.jsxs)(gw,{align:"center",children:[0===t&&o[t].data[0].value,!(0===t||t===o.length-1)&&o[t+1].data[0].value+1,t==o.length-1&&"-"]}),(0,qt.jsx)(gw,{align:"center",children:0===t?"-":e.data[0].value}),(0,qt.jsxs)(gw,{align:"center",children:[0===t&&"".concat(o[t].data[0].value," & Above"),!(0===t||t===o.length-1)&&o[t+1].data[0].value+1+"-"+o[t].data[0].value,t==o.length-1&&"Below or ".concat(e.data[0].value)]})]},e.salience)),!cs(o)&&(0,qt.jsxs)(cw,{sx:{"& .MuiTableCell-body":{border:1,borderColor:"#ddd",p:1}},children:[(0,qt.jsx)(gw,{align:"center",className:"tableColor normal",children:r("rpm_NormalPulse")}),(0,qt.jsx)(gw,{align:"center",children:n[0]+1}),(0,qt.jsx)(gw,{align:"center",children:n[1]}),(0,qt.jsxs)(gw,{align:"center",children:[n[0]+1," - ",n[1]]})]})]})]})})})};const Oke=function(e){let{tags:t,systolic:n,setSystolic:r,getPercentage:o,limitNumberWithinRange:a,nearestN:s,styles:l}=e;const{t:c}=Vg(),[d,u]=We.useState(["CheckLowBP"]),p=e=>{const t=e.currentTarget.attributes["data-id"].value;d.includes(t)?u(d.filter(e=>e!==t)):u(()=>[t])},h=(0,We.useRef)(null),m=(e,t)=>{e.stopPropagation(),document.body.style.cursor="ew-resize";const i=e.pageX,l=h.current.offsetWidth,c=e=>{e.stopPropagation();const c=(e.touches?e.touches[0].pageX:e.pageX)-i,d=n[t]+n[t+1],u=s(1,o(l,c)),p=n.slice(),h=p[t],m=a(h+u,0,d);if(p[t]=m,m<10)return!1;r(p)};window.addEventListener("pointermove",c),window.addEventListener("touchmove",c);const d=e=>{e.stopPropagation(),document.body.style.cursor="initial",window.removeEventListener("pointermove",c),window.removeEventListener("touchmove",c)};window.addEventListener("touchend",d),window.addEventListener("pointerup",d)},f=e=>{let{tag:t,width:n,onSystolicSliderSelect:r,noSliderButton:o,previousWidth:a,rangeIndex:s}=e;return(0,qt.jsx)(Dye,{className:"tag",style:l.tag,sx:{background:t.color,width:o?"30px":"20%"},onClick:p,"data-id":t.id,children:(0,qt.jsxs)(Dye,{children:[(0,qt.jsx)(Cf,{style:l.tagText,children:t.name}),(0,qt.jsx)(Cf,{style:(0,i.A)((0,i.A)({},l.tagText),{},{fontSize:12}),children:0===s?"Below or ".concat(n):5===s?" ".concat(n," & Above"):6===s?n:" ".concat(a+1," - ").concat(n)}),!o&&d.includes(t.id.toString())?(0,qt.jsx)(sy,{title:"Drag to adjust",children:(0,qt.jsxs)(Dye,{className:"slider-button",style:l.sliderButton,onPointerDown:r,children:[(0,qt.jsx)(Pye.A,{fontSize:"small",sx:{transform:"rotate(180deg)",position:"relative",left:"6px"}}),(0,qt.jsx)(Pye.A,{fontSize:"small",sx:{position:"relative",right:"6px"}})]})}):!o&&(0,qt.jsx)(sy,{title:"Click to unlock",children:(0,qt.jsx)(Dye,{className:"slider-button",style:l.sliderButton,children:(0,qt.jsx)(Rye.A,{fontSize:"small"})})})]})})};return(0,qt.jsxs)(qt.Fragment,{children:[(0,qt.jsx)(Cf,{variant:"body1",fontWeight:600,sx:{mb:.5},children:c("rpm_SystolicRange")}),(0,qt.jsx)(Dye,{ref:h,sx:{width:"100%",display:"flex",backgroundColor:"transparent",flexDirection:"row"},children:t.map((e,r)=>(0,qt.jsx)(We.Fragment,{children:(0,qt.jsx)(f,{width:n[r],noSliderButton:r===t.length-1,tag:e,onSystolicSliderSelect:e=>m(e,r),previousWidth:n[r-1],nextWidth:n[r+1],rangeIndex:r},r)},r))})]})};const Rke=function(e){var t,n,r,o,a,s,l,c,d,u,p,h,m;let{addNewRule:f,addNewRuleGlucose:g,activeProgram:v,addNewPulseRule:x}=e;const y=wt(uu),b=[{id:"CheckLowBP",name:"Low blood pressure",color:null===Qde||void 0===Qde||null===(t=Qde.palette)||void 0===t?void 0:t.amber[400]},{id:"NormalBP",name:"Normal blood pressure",color:null===Qde||void 0===Qde||null===(n=Qde.palette)||void 0===n?void 0:n.green[400]},{id:"ElevatedBloodPressure",name:"Elevated blood pressure",color:null===Qde||void 0===Qde||null===(r=Qde.palette)||void 0===r?void 0:r.orange[300]},{id:"Hypertension_Stage1",name:"Hypertension Stage 1",color:null===Qde||void 0===Qde||null===(o=Qde.palette)||void 0===o?void 0:o.orange[600]},{id:"Hypertensive_Stage2",name:"Hypertensive Stage 2",color:null===Qde||void 0===Qde||null===(a=Qde.palette)||void 0===a?void 0:a.red[400]},{id:"Hypertensive_Crisis",name:"Hypertensive Crisis",color:null===Qde||void 0===Qde||null===(s=Qde.palette)||void 0===s?void 0:s.red[600]},{id:"extra_space",name:"More Space",color:"white"}],j=[{id:"Bradycardia",name:"Bradycardia",color:null===Qde||void 0===Qde||null===(l=Qde.palette)||void 0===l?void 0:l.amber[400]},{id:"NormalPulse",name:"Normal pulse",color:null===Qde||void 0===Qde||null===(c=Qde.palette)||void 0===c?void 0:c.green[400]},{id:"Tachycardia",name:"Tachycardia",color:null===Qde||void 0===Qde||null===(d=Qde.palette)||void 0===d?void 0:d.red[400]},{id:"extra_space",name:"More Space",color:"white"}],_=[{id:"Hypoglycemia",name:"Hypoglycemia(Low)",color:null===Qde||void 0===Qde||null===(u=Qde.palette)||void 0===u?void 0:u.red[200]},{id:"Normal",name:"Normal",color:null===Qde||void 0===Qde||null===(p=Qde.palette)||void 0===p?void 0:p.green[300]},{id:"Pre-diabetes",name:"Pre-diabetes",color:null===Qde||void 0===Qde||null===(h=Qde.palette)||void 0===h?void 0:h.orange[300]},{id:"Diabetes",name:"Diabetes",color:null===Qde||void 0===Qde||null===(m=Qde.palette)||void 0===m?void 0:m.red[300]},{id:"extra_space",name:"More Space",color:"white"}],{t:C}=Vg(),w=Nt(),[S,A]=(so(),(0,We.useState)([90,119,129,139,179,180,500])),[k,T]=(0,We.useState)([60,78,79,89,119,120,500]),[E,M]=(0,We.useState)([60,129,130,500]),[O,R]=(0,We.useState)(b),[P,D]=(0,We.useState)(_),[N,L]=We.useState([]),[I,F]=(0,We.useState)([]),[$,B]=(0,We.useState)([70,99,125,126,500]),[z,H]=(0,We.useState)([95,140,199,200,500]),[W,U]=We.useState([]),[V,G]=We.useState({open:!1,data:[]}),q=e=>{G((0,i.A)((0,i.A)({},V),{},{open:!V.open,data:e}))},[Y,Z]=(0,We.useState)([]),[K,X]=(0,We.useState)([]),[Q,J]=(0,We.useState)(j),[ee,te]=(0,We.useState)(""),ne=(e,t)=>t/e*100,re=(e,t,n)=>Math.min(Math.max(e,t),n),ie=(e,t)=>Math.ceil(t/e)*e,oe={data_type:"bp",processing_mode:"REALTIME",data_batch_size:"",short_description:"",rule:[{name:"Hypertensive_Crisis",desc:"Hypertensive_CrisisDesc",salience:6,when:{or:[{gte:["Util.ToInt(Data.systolic)",S[5]]},{gte:["Util.ToInt(Data.diastolic)",k[5]]}]},then:[{call:["Alerts.Add",{const:"bp"},{const:"systolic"},{obj:"Data.systolic"},{const:"Hypertensive_Crisis"}]},{call:["Alerts.Add",{const:"bp"},{const:"diastolic"},{obj:"Data.diastolic"},{const:"Hypertensive_Crisis"}]},{call:["Complete"]}]},{name:"Hypertensive_Stage2",desc:"Hypertensive_Stage2Desc",salience:5,when:{or:[{gte:["Util.ToInt(Data.systolic)",S[3]+1]},{gte:["Util.ToInt(Data.diastolic)",k[3]+1]}]},then:[{call:["Alerts.Add",{const:"bp"},{const:"systolic"},{obj:"Data.systolic"},{const:"Hypertensive_Stage2"}]},{call:["Alerts.Add",{const:"bp"},{const:"diastolic"},{obj:"Data.diastolic"},{const:"Hypertensive_Stage2"}]},{call:["Complete"]}]},{name:"Hypertension_Stage1",desc:"Hypertension_Stage1Desc",salience:4,when:{or:[{gte:["Util.ToInt(Data.systolic)",S[2]+1]},{gte:["Util.ToInt(Data.diastolic)",k[2]+1]}]},then:[{call:["Alerts.Add",{const:"bp"},{const:"systolic"},{obj:"Data.systolic"},{const:"Hypertension_Stage1"}]},{call:["Alerts.Add",{const:"bp"},{const:"diastolic"},{obj:"Data.diastolic"},{const:"Hypertension_Stage1"}]},{call:["Complete"]}]},{name:"ElevatedBloodPressure",desc:"ElevatedBloodPressureDesc",salience:3,when:{and:[{gte:["Util.ToInt(Data.systolic)",S[1]+1]},{lte:["Util.ToInt(Data.diastolic)",k[2]]}]},then:[{call:["Alerts.Add",{const:"bp"},{const:"systolic"},{obj:"Data.systolic"},{const:"ElevatedBloodPressure"}]},{call:["Alerts.Add",{const:"bp"},{const:"diastolic"},{obj:"Data.diastolic"},{const:"ElevatedBloodPressure"}]},{call:["Complete"]}]},{name:"CheckLowBP",desc:"CheckLowBPDesc",salience:2,when:{or:[{lte:["Util.ToInt(Data.systolic)",S[0]]},{lte:["Util.ToInt(Data.diastolic)",k[0]]}]},then:[{call:["Alerts.Add",{const:"bp"},{const:"systolic"},{obj:"Data.systolic"},{const:"CheckLowBP"}]},{call:["Alerts.Add",{const:"bp"},{const:"diastolic"},{obj:"Data.diastolic"},{const:"CheckLowBP"}]},{call:["Complete"]}]}]},ae={data_type:"pulse",processing_mode:"",data_batch_size:"",short_description:"",rule:[{name:"Tachycardia",desc:"TachycardiaDesc",salience:2,when:{gte:["Util.ToInt(Data.pulse)",E[2]]},then:[{call:["Alerts.Add",{const:"pulse"},{const:"pulse"},{obj:"Data.pulse"},{const:"tachycardia"}]},{call:["Complete"]}]},{name:"Bradycardia",desc:"BradycardiaDesc",salience:1,when:{lte:["Util.ToInt(Data.pulse)",E[0]]},then:[{call:["Alerts.Add",{const:"pulse"},{const:"pulse"},{obj:"Data.pulse"},{const:"bradycardia"}]},{call:["Complete"]}]}]},se={data_type:"glucose",processing_mode:"REALTIME",data_batch_size:"",short_description:"",rule:[{name:"DiabetesFasting",desc:"DiabetesFastingDesc",salience:8,when:{and:[{gte:["Util.ToInt(Data.glucose)",$[3]]},{eq:["Data.activityType",'"fasting"']}]},then:[{call:["Alerts.Add",{const:"glucose"},{obj:"Data.activity"},{obj:"Data.glucose"},{const:"diabetes"}]},{call:["Complete"]}]},{name:"PrediabetesFasting",desc:"PrediabetesFastingDesc",salience:7,when:{and:[{gte:["Util.ToInt(Data.glucose)",$[1]+1]},{lte:["Util.ToInt(Data.glucose)",$[2]]},{eq:["Data.activityType",'"fasting"']}]},then:[{call:["Alerts.Add",{const:"glucose"},{obj:"Data.activity"},{obj:"Data.glucose"},{const:"prediabetes"}]},{call:["Complete"]}]},{name:"HypoglycemiaFasting",desc:"HypoglycemiaFastingDesc",salience:6,when:{and:[{lte:["Util.ToInt(Data.glucose)",$[0]]},{eq:["Data.activityType",'"fasting"']}]},then:[{call:["Alerts.Add",{const:"glucose"},{obj:"Data.activity"},{obj:"Data.glucose"},{const:"hypoglycemia"}]},{call:["Complete"]}]},{name:"DiabetesPP",desc:"DiabetesDescPP",salience:5,when:{and:[{gte:["Util.ToInt(Data.glucose)",z[3]]},{not:["Data.activityType",'"fasting"']}]},then:[{call:["Alerts.Add",{const:"glucose"},{obj:"Data.activity"},{obj:"Data.glucose"},{const:"diabetes"}]},{call:["Complete"]}]},{name:"PrediabetesPP",desc:"PrediabetesDescPP",salience:4,when:{and:[{gte:["Util.ToInt(Data.glucose)",z[1]+1]},{lte:["Util.ToInt(Data.glucose)",z[2]]},{not:["Data.activityType",'"fasting"']}]},then:[{call:["Alerts.Add",{const:"glucose"},{obj:"Data.activity"},{obj:"Data.glucose"},{const:"prediabetes"}]},{call:["Complete"]}]},{name:"HypoglycemiaPP",desc:"HypoglycemiaDescPP",salience:3,when:{and:[{lte:["Util.ToInt(Data.glucose)",z[0]]},{not:["Data.activityType",'"fasting"']}]},then:[{call:["Alerts.Add",{const:"glucose"},{obj:"Data.activity"},{obj:"Data.glucose"},{const:"hypoglycemia"}]},{call:["Complete"]}]},{name:"NormalFasting",desc:"NormalFastingDesc",salience:2,when:{and:[{gte:["Util.ToInt(Data.glucose)",$[0]+1]},{lte:["Util.ToInt(Data.glucose)",$[2]-1]},{eq:["Data.activityType",'"fasting"']}]},then:[{call:["Complete"]}]},{name:"NormalPP",desc:"NormalPPDesc",salience:1,when:{and:[{gte:["Util.ToInt(Data.glucose)",z[0]+1]},{lte:["Util.ToInt(Data.glucose)",z[2]-1]},{not:["Data.activityType",'"fasting"']}]},then:[{call:["Complete"]}]}]},le={tag:{height:55,paddingLeft:20,paddingRight:20,textAlign:"center",position:"relative",borderRightWidth:".1em",borderRightStyle:"solid",borderRightColor:"white",boxSizing:"border-box",borderLeftWidth:".1em",borderLeftStyle:"solid",borderLeftColor:"white",cursor:"pointer",borderRadius:"0",display:"flex",alignItems:"center",justifyContent:"center"},tagText:{fontSize:"0.675rem",color:"white",fontWeight:700,userSelect:"none",display:"block",overflow:"hidden"},sliderButton:{width:"2em",height:"2em",backgroundColor:"white",position:"absolute",borderRadius:"2em",right:"calc(-1.1em)",top:0,display:"flex",justifyContent:"center",alignItems:"center",bottom:0,margin:"auto",zIndex:10,cursor:"ew-resize",userSelect:"none"}},ce=[{name:C("rpm_RPM"),url:ld.DOCTOR.PROGRAM},{name:null===v||void 0===v?void 0:v.display_name,url:"".concat(ld.DOCTOR.PROGRAM,"/").concat(null===v||void 0===v?void 0:v.code,"/patients")},{name:C("rpm_Rules"),url:"".concat(ld.DOCTOR.PROGRAM,"/").concat(null===v||void 0===v?void 0:v.code,"/rules")},{name:C("rpm_AddNewRule"),url:""}],de=()=>"bp"===ee?oe:"glucose"===ee?se:oe;return We.useEffect(()=>{(()=>{let e=null===b||void 0===b?void 0:b.map(e=>e.id),t=null===j||void 0===j?void 0:j.map(e=>e.id),n=null===_||void 0===_?void 0:_.map(e=>e.id),r=[],i=[];S.forEach((t,n)=>{t+1>S[n+1]&&r.push({name:"Systolic",rule:e[n+1],value:[t+1,S[n+1]]})}),k.forEach((t,n)=>{t+1>k[n+1]&&r.push({name:"Diastolic",rule:e[n+1],value:[t+1,k[n+1]]})}),E.forEach((e,n)=>{e+1>E[n+1]&&r.push({name:"Pulse",rule:t[n+1],value:[e+1,E[n+1]]})}),$.forEach((e,t)=>{e+1>$[t+1]&&i.push({name:"Fasting",rule:n[t+1],value:[e+1,$[t+1]]})}),z.forEach((e,t)=>{e+1>z[t+1]&&i.push({name:"Non Fasting",rule:n[t+1],value:[e+1,z[t+1]]})}),U(r),L(i)})()},[S,k,E,$,z]),We.useEffect(()=>{de()},[ee]),We.useEffect(()=>{"bp"===ee&&(F(oe.rule),X(ae.rule))},[ee,S,k,E]),We.useEffect(()=>{"glucose"===ee&&Z(se.rule)},[ee,$,z]),We.useEffect(()=>{te("bp");const e={activeMenuItem:"rules",breadcrumb:ce};cs(v)||w(NC(e))},[v]),(0,qt.jsxs)(qt.Fragment,{children:[(0,qt.jsx)(op,{sx:{width:"100%"},children:(0,qt.jsx)(Kz,{initialValues:de(),validationSchema:RU.addRule,onSubmit:async e=>{const t="".concat(e.short_description,"/").concat(sa()().valueOf()),n=[{name:"Hypertensive_Crisis",desc:"Hypertensive_CrisisDesc",salience:6,when:ws({or:[{gte:["Util.ToInt(Data[0].values.systolic)",S[5]]},{gte:["Util.ToInt(Data[0].values.diastolic)",k[5]]}]},"and","or",e.data_batch_size),then:[{call:["Alerts.Add",{const:"bp"},{const:"systolic"},{plus:Ss("systolic",e.data_batch_size)},{const:"Hypertensive_Crisis"}]},{call:["Alerts.Add",{const:"bp"},{const:"diastolic"},{plus:Ss("diastolic",e.data_batch_size)},{const:"Hypertensive_Crisis"}]},{call:["Complete"]}]},{name:"Hypertensive_Stage2",desc:"Hypertensive_Stage2Desc",salience:5,when:ws({or:[{gte:["Util.ToInt(Data[0].values.systolic)",S[3]+1]},{gte:["Util.ToInt(Data[0].values.diastolic)",k[3]+1]}]},"and","or",e.data_batch_size),then:[{call:["Alerts.Add",{const:"bp"},{const:"systolic"},{plus:Ss("systolic",e.data_batch_size)},{const:"Hypertensive_Stage2"}]},{call:["Alerts.Add",{const:"bp"},{const:"diastolic"},{plus:Ss("diastolic",e.data_batch_size)},{const:"Hypertensive_Stage2"}]},{call:["Complete"]}]},{name:"Hypertension_Stage1",desc:"Hypertension_Stage1Desc",salience:4,when:ws({or:[{gte:["Util.ToInt(Data[0].values.systolic)",S[2]+1]},{gte:["Util.ToInt(Data[0].values.diastolic)",k[2]+1]}]},"and","or",e.data_batch_size),then:[{call:["Alerts.Add",{const:"bp"},{const:"systolic"},{plus:Ss("systolic",e.data_batch_size)},{const:"Hypertension_Stage1"}]},{call:["Alerts.Add",{const:"bp"},{const:"diastolic"},{plus:Ss("diastolic",e.data_batch_size)},{const:"Hypertension_Stage1"}]},{call:["Complete"]}]},{name:"ElevatedBloodPressure",desc:"ElevatedBloodPressureDesc",salience:3,when:ws({and:[{gte:["Util.ToInt(Data[0].values.systolic)",S[1]+1]},{lte:["Util.ToInt(Data[0].values.diastolic)",k[2]]}]},"and","and",e.data_batch_size),then:[{call:["Alerts.Add",{const:"bp"},{const:"systolic"},{plus:Ss("systolic",e.data_batch_size)},{const:"ElevatedBloodPressure"}]},{call:["Alerts.Add",{const:"bp"},{const:"diastolic"},{plus:Ss("diastolic",e.data_batch_size)},{const:"ElevatedBloodPressure"}]},{call:["Complete"]}]},{name:"CheckLowBP",desc:"CheckLowBPDesc",salience:2,when:ws({or:[{lte:["Util.ToInt(Data[0].values.systolic)",S[0]]},{lte:["Util.ToInt(Data[0].values.diastolic)",k[0]]}]},"and","or",e.data_batch_size),then:[{call:["Alerts.Add",{const:"bp"},{const:"systolic"},{plus:Ss("systolic",e.data_batch_size)},{const:"CheckLowBP"}]},{call:["Alerts.Add",{const:"bp"},{const:"diastolic"},{plus:Ss("diastolic",e.data_batch_size)},{const:"CheckLowBP"}]},{call:["Complete"]}]}],r=[{name:"Tachycardia",desc:"TachycardiaDesc",salience:2,when:Ts({gte:["Util.ToInt(Data[0].values.pulse)",E[2]]},"or",e.data_batch_size),then:[{call:["Alerts.Add",{const:"pulse"},{const:"pulse"},{plus:Ss("pulse",e.data_batch_size)},{const:"tachycardia"}]},{call:["Complete"]}]},{name:"Bradycardia",desc:"BradycardiaDesc",salience:1,when:Ts({lte:["Util.ToInt(Data[0].values.pulse)",E[0]]},"or",e.data_batch_size),then:[{call:["Alerts.Add",{const:"pulse"},{const:"pulse"},{plus:Ss("pulse",e.data_batch_size)},{const:"bradycardia"}]},{call:["Complete"]}]}];"bp"===e.data_type&&(cs(W)?(await f((0,i.A)((0,i.A)({},e),{},{short_description:t,rule:"BATCH"!==e.processing_mode?I:n})),await x((0,i.A)((0,i.A)({},e),{},{short_description:t,rule:"BATCH"!==e.processing_mode?K:r}))):q(W)),"glucose"===e.data_type&&(cs(N)?g((0,i.A)((0,i.A)({},e),{},{rule:Y})):q(N))},enableReinitialize:!0,children:e=>{let{values:t}=e;return(0,qt.jsx)(qt.Fragment,{children:(0,qt.jsxs)(nH,{children:[(0,qt.jsxs)(op,{sx:{mb:2.5},children:[(0,qt.jsxs)(op,{mb:2.5,display:"flex",children:[(0,qt.jsx)(BH,{labels:ce}),(0,qt.jsx)(Cf,{variant:"h6",component:"h6",sx:{marginBottom:"0",display:{xs:"block",sm:"block",md:"none"}},children:C("rpm_AddNewRule")})]}),(0,qt.jsxs)(Ff,{container:!0,spacing:2,alignItems:"center",children:[(0,qt.jsx)(Ff,{item:!0,xs:!0,children:(0,qt.jsx)(Cf,{variant:"h5",component:"h5",sx:{display:{xs:"none",sm:"none",md:"block"}},children:C("rpm_AddNewRule")})}),(0,qt.jsx)(Ff,{item:!0,children:(0,qt.jsx)(IM,{loading:y,variant:"contained",color:"primary",disableElevation:!0,type:"submit",children:C("rpm_Save")})}),(0,qt.jsx)(Ff,{item:!0,children:(0,qt.jsx)(sy,{placement:"top","aria-label":"Reset",title:"Reset",children:(0,qt.jsx)(xh,{variant:"outlined",color:"primary",disableElevation:!0,onClick:()=>{A([90,119,129,139,179,180,500]),T([60,78,79,89,119,120,500]),B([70,99,125,126,500]),H([95,140,199,200,500]),M([60,129,130,500]),R(b),J(j)},style:{minWidth:"40px"},className:"resetBackupButton",children:(0,qt.jsx)(Eye.A,{fontSize:"small"})})})})]})]}),(0,qt.jsx)(yH,{variant:"outlined",children:(0,qt.jsxs)(wH,{sx:{p:2.5},children:[(0,qt.jsxs)(Ff,{container:!0,spacing:1,children:[(0,qt.jsx)(Ff,{item:!0,xs:12,md:3,children:(0,qt.jsxs)(op,{mb:1,children:[(0,qt.jsx)(o_,{htmlFor:"data_type",required:!0,sx:{mb:.75},children:C("rpm_VitalType")}),(0,qt.jsx)(tH,{fullWidth:!0,as:G_,id:"data_type",name:"data_type",size:"small",displayEmpty:!0,input:(0,qt.jsx)(qj,{}),onChange:e=>te(e.target.value),endAdornment:(0,qt.jsx)(tw,{position:"end",sx:{position:"absolute",right:"28px"},children:(0,qt.jsx)(sy,{title:C("message:rpm_VitalTypeHelp"),placement:"top",children:(0,qt.jsx)(wh,{size:"small",disableRipple:!0,sx:{p:0},children:(0,qt.jsx)(pM.A,{fontSize:"small"})})})}),children:null===Dd||void 0===Dd?void 0:Dd.map(e=>(0,qt.jsx)(mf,{value:e.value,children:C("rpm_".concat(e.name))},e.name))}),(0,qt.jsx)(dH,{name:"data_type",children:e=>(0,qt.jsx)(v_,{error:!0,children:C(e,{field:C("rpm_VitalType")})})})]})}),"glucose"!==t.data_type&&(0,qt.jsx)(Ff,{item:!0,xs:12,md:3,children:(0,qt.jsxs)(op,{mb:1,children:[(0,qt.jsx)(o_,{htmlFor:"processing_mode",required:!0,sx:{mb:.75},children:C("rpm_ProcessingMode")}),(0,qt.jsxs)(tH,{fullWidth:!0,as:G_,id:"processing_mode",name:"processing_mode",size:"small",displayEmpty:!0,input:(0,qt.jsx)(qj,{}),renderValue:e=>e||"Select",endAdornment:(0,qt.jsx)(tw,{position:"end",sx:{position:"absolute",right:"28px"},children:(0,qt.jsx)(sy,{title:C("message:rpm_ProcessingModeHelp"),placement:"top",children:(0,qt.jsx)(wh,{size:"small",disableRipple:!0,sx:{p:0},children:(0,qt.jsx)(pM.A,{fontSize:"small"})})})}),children:[(0,qt.jsx)(mf,{value:"BATCH",disabled:!0,children:"BATCH"}),(0,qt.jsx)(mf,{value:"REALTIME",children:"REALTIME"})]}),(0,qt.jsx)(dH,{name:"processing_mode",children:e=>(0,qt.jsx)(v_,{error:!0,children:C(e,{field:C("rpm_ProcessingMode")})})})]})}),"BATCH"===t.processing_mode&&(0,qt.jsx)(Ff,{item:!0,xs:12,md:3,children:(0,qt.jsxs)(op,{mb:1,className:"hide_num_arrow",children:[(0,qt.jsx)(o_,{htmlFor:"data_batch_size",sx:{mb:.75},required:!0,children:C("rpm_BatchDataSize")}),(0,qt.jsx)(tH,{fullWidth:!0,as:qj,id:"data_batch_size",name:"data_batch_size",size:"small",type:"number",endAdornment:(0,qt.jsx)(tw,{position:"end",children:(0,qt.jsx)(sy,{title:C("message:rpm_BatchDataSizeHelp"),placement:"top",children:(0,qt.jsx)(wh,{size:"small",disableRipple:!0,sx:{p:0},children:(0,qt.jsx)(pM.A,{fontSize:"small"})})})})}),(0,qt.jsx)(dH,{name:"data_batch_size",children:e=>(0,qt.jsx)(v_,{error:!0,children:C(e,{field:C("rpm_BatchDataSize")})})})]})}),(0,qt.jsx)(Ff,{item:!0,xs:12,md:3,children:(0,qt.jsxs)(op,{mb:1,children:[(0,qt.jsx)(o_,{htmlFor:"short_description",required:!0,sx:{mb:.75},children:C("rpm_ShortDescription")}),(0,qt.jsx)(tH,{fullWidth:!0,as:qj,id:"short_description",name:"short_description",size:"small",endAdornment:(0,qt.jsx)(tw,{position:"end",children:(0,qt.jsx)(sy,{title:C("message:rpm_ShortDescriptionHelp"),placement:"top",children:(0,qt.jsx)(wh,{size:"small",disableRipple:!0,sx:{p:0},children:(0,qt.jsx)(pM.A,{fontSize:"small"})})})})}),(0,qt.jsx)(dH,{name:"short_description",children:e=>(0,qt.jsx)(v_,{error:!0,children:C(e,{field:C("rpm_ShortDescription")})})})]})})]}),"bp"===t.data_type&&(0,qt.jsxs)(Ff,{container:!0,spacing:.5,children:[(0,qt.jsx)(Ff,{item:!0,xs:12,children:(0,qt.jsx)(Oke,{tags:O,setTags:R,systolic:S,setSystolic:A,getPercentage:ne,limitNumberWithinRange:re,nearestN:ie,styles:le})}),(0,qt.jsx)(Ff,{item:!0,xs:12,children:(0,qt.jsx)(wke,{tags:O,setTags:R,diastolic:k,setDiastolic:T,getPercentage:ne,limitNumberWithinRange:re,nearestN:ie,styles:le})}),(0,qt.jsx)(Ff,{item:!0,xs:12,children:(0,qt.jsx)(Cke,{handleInitialValues:I,systolic:S,diastolic:k})})]}),"glucose"===t.data_type&&(0,qt.jsxs)(Ff,{container:!0,spacing:.5,children:[(0,qt.jsx)(Ff,{item:!0,xs:12,children:(0,qt.jsx)(kke,{styles:le,fastingRange:$,setFastingRange:B,ppRange:z,setPPRange:H,addNewRuleGlucose:g,getPercentage:ne,limitNumberWithinRange:re,nearestN:ie,glucoseTags:P,setGlucoseTags:D})}),(0,qt.jsx)(Ff,{item:!0,xs:12,children:(0,qt.jsx)(Tke,{handleInitialValues:Y})})]})]})}),"bp"===t.data_type&&(0,qt.jsx)(yH,{variant:"outlined",sx:{mt:2.5},children:(0,qt.jsx)(wH,{sx:{p:2.5},children:(0,qt.jsxs)(Ff,{container:!0,spacing:2,children:[(0,qt.jsx)(Ff,{item:!0,xs:12,md:7,children:(0,qt.jsx)(Eke,{tags:Q,setTags:J,pulse:E,setPulse:M,getPercentage:ne,limitNumberWithinRange:re,nearestN:ie,styles:le})}),(0,qt.jsx)(Ff,{item:!0,xs:12,md:5,children:(0,qt.jsx)(Mke,{handleInitialValues:K,pulse:E})})]})})})]})})}},"editor_formik")}),(0,qt.jsx)(Hye,{openModal:V,onCloseModal:()=>q([])})]})};function Pke(e){let{ruleData:t,addNewRule:n,rulesHeadCell:r,activeProgram:o,addNewRuleGlucose:a,addNewPulseRule:s}=e;const{ruleId:l}=lo(),[c,d]=We.useState(null),[u,p]=We.useState(null),h=[{text:"and",sign:"&&"},{text:"or",sign:"||"},{text:"eq",sign:"=="},{text:"not",sign:"!="},{text:"gt",sign:">"},{text:"gte",sign:">="},{text:"lt",sign:"<"},{text:"lte",sign:"<="},{text:"bor",sign:"|"},{text:"band",sign:"&"},{text:"plus",sign:"+"},{text:"minus",sign:"-"},{text:"div",sign:"/"},{text:"mul",sign:"*"},{text:"mod",sign:"%"}],m=e=>{const t=h.find(t=>t.text===e);return null===t||void 0===t?void 0:t.sign},f=e=>{const t=[],n=Object.keys(null===e||void 0===e?void 0:e.when);return null===e||void 0===e||e.when[n[0]].forEach(r=>{let i=Object.keys(r);var o,a,s,l,c,d;"0"!==i[0]?i[0]&&t.push({name:null!==(o=r[i[0]])&&void 0!==o&&o[0]?null===(a=r[i[0]])||void 0===a?void 0:a[0]:null,value:null!==(s=r[i[0]])&&void 0!==s&&s[1]?null===(l=r[i[0]])||void 0===l?void 0:l[1]:null,op:i[0],between:n[0]}):t.push({name:null===e||void 0===e||null===(c=e.when[n[0]])||void 0===c?void 0:c[0],value:null===e||void 0===e||null===(d=e.when[n[0]])||void 0===d?void 0:d[1],op:n[0]?n[0]:null})}),t};return We.useEffect(()=>{ta()(t)||d(JSON.parse(null===t||void 0===t?void 0:t.rule))},[t]),We.useEffect(()=>{(()=>{const e=[];null===c||void 0===c||c.forEach(t=>{e.push((0,i.A)((0,i.A)({},t),{},{data:f(t)}))}),p(e)})()},[c]),We.useEffect(()=>{m()},[u]),"add"===l?(0,qt.jsx)(op,{sx:{width:"100%"},children:(0,qt.jsx)(Rke,{activeProgram:o,addNewRule:n,addNewRuleGlucose:a,addNewPulseRule:s})}):(0,qt.jsx)(op,{sx:{width:"100%"},children:ta()(u)?"...Loading":(0,qt.jsx)(gke,{exRuleArr:u,ruleData:t,rulesHeadCell:r,getVitalsValue:e=>{var t;return(0,qt.jsx)(qt.Fragment,{children:(0,qt.jsx)(Ff,{container:!0,spacing:1.5,sx:{"& .sign":{"& span:last-child":{display:"none"}}},children:null===e||void 0===e||null===(t=e.data)||void 0===t?void 0:t.map((t,n)=>{var r;return(0,qt.jsxs)(Ff,{item:!0,className:(null===e||void 0===e||null===(r=e.data)||void 0===r?void 0:r.length)-1===n?"sign":"",children:[(0,qt.jsx)(op,{component:"span",children:null===t||void 0===t?void 0:t.name})," ",(0,qt.jsx)(op,{component:"span",children:m(null===t||void 0===t?void 0:t.op)})," ",(0,qt.jsx)(op,{component:"span",children:null===t||void 0===t?void 0:t.value})," ",(0,qt.jsx)(op,{component:"span",children:m(null===t||void 0===t?void 0:t.between)})]},n)})})})}})})}Pke.defaultProps={addNewRule:()=>{},ruleData:{},rulesHeadCell:[],activeProgram:{},addNewRuleGlucose:()=>{}};const Dke=Pke;const Nke=function(e){var t;let{activeProgram:n}=e;const r=Nt(),o=wt(cu),{t:a}=Vg(),s=so(),{enqueueSnackbar:l}=hi(),{ruleId:c}=lo(),[d,u]=We.useState(null),p=[{id:"bp_level",label:a("rpm_BpLevel"),isSort:!0,sortProperty:"bp_level"},{id:"vital",label:a("rpm_Vital"),isSort:!1,sortProperty:"vital"},{id:"action",label:a("rpm_Actions"),isSort:!1,sortProperty:"action"}];return We.useEffect(()=>{o&&"add"!==c&&!cs(n)&&(async()=>{const{data:e}=await r(Ys(null===n||void 0===n?void 0:n.code,c));u(e)})()},[o,c,n]),We.useEffect(()=>{r(NC({activeMenuItem:"rules_program"}))},[n]),cs(n)?(0,qt.jsx)(yp,{variant:"outlined",sx:{px:2.5,py:6,display:"flex",height:"320px"},children:(0,qt.jsx)(op,{alignSelf:"center",sx:{mx:"auto"},children:(0,qt.jsx)(MM,{color:"primary"})})}):(0,qt.jsx)(qt.Fragment,{children:cs(n)||null!==n&&void 0!==n&&null!==(t=n.permissions)&&void 0!==t&&t.showAddRuleBtn?(0,qt.jsx)(Dke,{addNewRule:async e=>{const t=null===e||void 0===e?void 0:e.rule,o=(0,i.A)((0,i.A)({},e),{},{execution_engine:"JSON",rule:JSON.stringify(t)});try{await r(Gs(null===n||void 0===n?void 0:n.code,o)),l(a("message:rpm_RuleCreatedSuccessfully"),{variant:"success"}),s(-1)}catch(c){const e=us(c,"response.data.code","");cs(e)?r(Zo({subTitle:"error:rpm_RuleCreatedFailed",severity:ud.ERROR})):r(Zo({subTitle:Vd(e,"error:rpm_err_rule_already_exist"),severity:ud.ERROR}))}},addNewPulseRule:async e=>{const t=null===e||void 0===e?void 0:e.rule,o=(0,i.A)((0,i.A)({},e),{},{data_type:"bp.pulse",execution_engine:"JSON",rule:JSON.stringify(t)});try{await r(Gs(null===n||void 0===n?void 0:n.code,o)),l(a("message:rpm_RuleCreatedSuccessfully"),{variant:"success"})}catch(s){const e=us(s,"response.data.code","");cs(e)?r(Zo({subTitle:"error:rpm_RuleCreatedFailed",severity:ud.ERROR})):r(Zo({subTitle:Vd(e,"error:rpm_err_rule_already_exist"),severity:ud.ERROR}))}},ruleData:d,rulesHeadCell:p,editButton:e=>(0,qt.jsx)(sy,{title:a("rpm_Edit"),children:(0,qt.jsx)(wh,{"data-id":e.id,color:"primary",onClick:()=>console.log(e),children:(0,qt.jsx)(fc,{fontSize:"small",sx:{width:16,height:16}})})}),activeProgram:n,addNewRuleGlucose:async e=>{const t=null===e||void 0===e?void 0:e.rule,o=(0,i.A)((0,i.A)({},e),{},{execution_engine:"JSON",rule:JSON.stringify(t)});try{await r(Gs(null===n||void 0===n?void 0:n.code,o)),l(a("message:rpm_RuleCreatedSuccessfully"),{variant:"success"}),s(-1)}catch(c){const e=us(c,"response.data.code","");cs(e)?r(Zo({subTitle:"error:rpm_RuleCreatedFailed",severity:ud.ERROR})):r(Zo({subTitle:Vd(e,"error:rpm_err_rule_already_exist"),severity:ud.ERROR}))}}}):(0,qt.jsx)(LC,{})})};function Lke(e){let{userData:t,ruleList:n,order:r,orderBy:i,setOrder:o,setOrderBy:a,dataParameter:s,rulesHeadCell:l,checkState:c,onCheck:d,isSelection:u,nodata:p,fetchRuleList:h,pageDetails:m,viewButton:f,deleteButton:g,activeProgram:v,setHeadcells:x,settingModal:y,initialHeadcells:b,handleSettingModalToggle:j,handleStatus:_,handleDefaultRule:C,isRuleActive:w,isGlucoseRuleActive:S,handleDefaultModalToggle:A}=e;const{t:k}=Vg(),T=so(),E=[{name:k("rpm_RPM"),url:ld.DOCTOR.PROGRAM},{name:null===v||void 0===v?void 0:v.display_name,url:"".concat(ld.DOCTOR.PROGRAM,"/").concat(null===v||void 0===v?void 0:v.code,"/patients")},{name:k("rpm_Rules"),url:""}],M=e=>{const t=null===e||void 0===e?void 0:e.data_type,r=n.filter(e=>e.data_type===t).filter(e=>!0===e.status).length;return!1===(null===e||void 0===e?void 0:e.default_rule)||!0===e.status&&1===r};return(0,qt.jsxs)(op,{sx:{width:"100%"},children:[(0,qt.jsx)(op,{mb:2.5,children:(0,qt.jsx)(BH,{labels:E})}),(0,qt.jsx)(Ff,{container:!0,spacing:2.5,children:(0,qt.jsxs)(Ff,{item:!0,xs:12,children:[(0,qt.jsx)(op,{sx:{mb:2.5},children:(0,qt.jsxs)(Ff,{container:!0,spacing:2,alignItems:"center",children:[(0,qt.jsx)(Ff,{item:!0,xs:!0,children:(0,qt.jsx)(Cf,{variant:"h5",component:"h5",children:k("rpm_Rules")})}),(null===t||void 0===t?void 0:t.showAddRuleBtn)&&(0,qt.jsx)(Ff,{item:!0,children:(0,qt.jsxs)(xh,{variant:"contained",color:"primary",disableElevation:!0,onClick:()=>T("add/new"),className:(null===t||void 0===t?void 0:t.showAddRuleBtn)&&"programrules-tour-step0",children:[(0,qt.jsx)(jue.A,{}),(0,qt.jsx)(Cf,{component:"span",className:"hideOnMobile",children:k("rpm_AddRule")})]})}),(0,qt.jsx)(Ff,{item:!0,children:(0,qt.jsx)(sy,{title:k("rpm_TableCellSetting"),children:(0,qt.jsx)(sv,{sx:{boxShadow:"none",width:32,height:32,minHeight:"auto"},size:"small",color:"primary",onClick:j,children:(0,qt.jsx)(YC.A,{fontSize:"small",sx:{width:16,height:16}})})})}),!1]})}),(0,qt.jsxs)(op,{children:[(0,qt.jsx)(UT,{order:r,orderBy:i,setOrder:o,setOrderBy:a,data:n,headCells:null===l||void 0===l?void 0:l.filter(e=>b.includes(e.id)),dataParameter:s,selected:c,setSelected:d,isSelection:u,noDataImage:p,fetchList:h,pageDetails:m,skeletonVrows:6,className:"theme_scroll",children:null===n||void 0===n?void 0:n.filter(e=>"bp.pulse"!==e.data_type).map(e=>{const n=e.short_description.split("/");return(0,qt.jsxs)(cw,{hover:!0,selected:c.includes(e.id.toString()),sx:{"&:last-child td, &:last-child th":{border:0}},children:[u&&(0,qt.jsx)(gw,{padding:"checkbox",children:(0,qt.jsx)(Dw,{onChange:d,checked:c.includes(e.id.toString()),name:e.id.toString(),color:"primary"})}),b.includes("vital_type")&&(0,qt.jsxs)(gw,{children:["bp"===e.data_type&&(0,qt.jsx)(Lo,{className:"linkClr",to:e.id,children:(0,qt.jsxs)(Cf,{color:"customClr.bp",fontWeight:600,component:"span",fontSize:14,children:[" ",k("rpm_".concat(e.data_type))]})}),"glucose"===e.data_type&&(0,qt.jsx)(Lo,{className:"linkClr",to:e.id,children:(0,qt.jsxs)(Cf,{color:"customClr.glucose",fontWeight:600,component:"span",fontSize:14,sx:{textDecoration:"underline"},children:[" ",k("rpm_".concat(e.data_type))]})}),"bp.pulse"===e.data_type&&(0,qt.jsx)(Lo,{className:"linkClr",to:e.id,children:(0,qt.jsxs)(Cf,{color:"customClr.pulse",fontWeight:600,component:"span",fontSize:14,sx:{textDecoration:"underline"},children:[" ",k("rpm_".concat(e.data_type))]})})]}),b.includes("processing_mode")&&(0,qt.jsx)(gw,{children:e.processing_mode}),b.includes("batch_size")&&(0,qt.jsx)(gw,{children:e.data_batch_size?e.data_batch_size:"NA"}),b.includes("short_description")&&(0,qt.jsx)(gw,{children:n[0]}),b.includes("updated_at")&&(0,qt.jsx)(gw,{children:sa()(e.created_at).format("DD MMM YYYY hh:mm A")}),b.includes("status")&&(0,qt.jsx)(gw,{children:(0,qt.jsx)(dye,{checked:!ps(null===e||void 0===e?void 0:e.status)&&(null===e||void 0===e?void 0:e.status),onChange:t=>_(t,e),disabled:M(e),inputProps:{"aria-label":"controlled"}})}),b.includes("defaultRule")&&(0,qt.jsx)(gw,{children:(0,qt.jsx)(d_,{margin:"dense",children:(0,qt.jsxs)(G_,{variant:"outlined",size:"small",value:null!==(null===e||void 0===e?void 0:e.default_rule)&&(null===e||void 0===e?void 0:e.default_rule),onChange:t=>{t.target.value&&w&&"bp"===e.data_type||t.target.value&&S&&"glucose"===e.data_type?A(t,e):C({e:t,row:e})},children:[(0,qt.jsx)(mf,{value:!0,children:"Yes"}),(0,qt.jsx)(mf,{value:!1,children:"No"})]})})}),b.includes("action")&&(0,qt.jsxs)(gw,{children:[(null===t||void 0===t?void 0:t.showViewRuleBtn)&&f(e),(null===t||void 0===t?void 0:t.showDeleteRuleBtn)&&g(e)]})]},e.id)})}),(0,qt.jsx)(KE,{pageDetails:m,fetchListFunction:h}),(0,qt.jsx)(TE,{open:y,allHeadCells:l,initialHeadcells:b,setHeadcells:x,onClose:j})]})]})})]})}Lke.defaultProps={userData:{},rulesHeadCell:[],pageDetails:{},order:"",orderBy:"",setOrder:()=>{},setOrderBy:()=>{},dataParameter:"",checkState:"",onCheck:()=>{},isSelection:"",nodata:"",ruleList:[],fetchRuleList:()=>{},viewButton:()=>{},deleteButton:()=>{},activeProgram:{},initialHeadcells:[],setHeadcells:()=>{},settingModal:!1,handleSettingModalToggle:()=>{},handleStatus:()=>{},handleDefaultRule:()=>{},handleDefaultModalToggle:()=>{},isRuleActive:!1,isGlucoseRuleActive:!1};const Ike=Lke;function Fke(e){let{userData:t,ruleList:n,order:r,orderBy:i,setOrder:o,setOrderBy:a,dataParameter:s,rulesHeadCell:l,checkState:c,onCheck:d,isSelection:u,nodata:p,fetchRuleList:h,pageDetails:m,viewButton:f,deleteButton:g,activeProgram:v,setHeadcells:x,settingModal:y,initialHeadcells:b,handleSettingModalToggle:j,handleStatus:_,handleDefaultRule:C,isRuleActive:w,isGlucoseRuleActive:S,handleDefaultModalToggle:A}=e;const{t:k}=Vg(),T=so(),E=[{name:k("rpm_RPM"),url:ld.DOCTOR.PROGRAM},{name:null===v||void 0===v?void 0:v.display_name,url:"".concat(ld.DOCTOR.PROGRAM,"/").concat(null===v||void 0===v?void 0:v.code,"/patients")},{name:k("rpm_Rules"),url:""}],M=e=>{const t=null===e||void 0===e?void 0:e.data_type,r=n.filter(e=>e.data_type===t).filter(e=>!0===e.status).length;return!1===(null===e||void 0===e?void 0:e.default_rule)||!0===e.status&&1===r};return(0,qt.jsxs)(op,{sx:{width:"100%"},children:[(0,qt.jsxs)(op,{mb:2.5,display:"flex",alignItems:"center",children:[(0,qt.jsx)(BH,{labels:E}),(0,qt.jsx)(Cf,{variant:"h6",component:"h6",sx:{marginBottom:"0"},children:k("rpm_Rules")})]}),(0,qt.jsx)(Ff,{container:!0,spacing:2.5,children:(0,qt.jsxs)(Ff,{item:!0,xs:12,children:[(0,qt.jsx)(op,{sx:{mb:2.5},children:(0,qt.jsxs)(Ff,{container:!0,spacing:2,alignItems:"center",children:[(null===t||void 0===t?void 0:t.showAddRuleBtn)&&(0,qt.jsx)(Ff,{item:!0,children:(0,qt.jsxs)(xh,{variant:"contained",color:"primary",disableElevation:!0,onClick:()=>T("add/new"),className:(null===t||void 0===t?void 0:t.showAddRuleBtn)&&"programrules-tour-step0",children:[(0,qt.jsx)(jue.A,{}),(0,qt.jsx)(Cf,{component:"span",className:"hideOnMobile",children:k("rpm_AddRule")})]})}),(0,qt.jsx)(Ff,{item:!0,children:(0,qt.jsx)(sy,{title:k("rpm_TableCellSetting"),children:(0,qt.jsx)(sv,{sx:{boxShadow:"none",width:32,height:32,minHeight:"auto"},size:"small",color:"primary",onClick:j,children:(0,qt.jsx)(YC.A,{fontSize:"small",sx:{width:16,height:16}})})})}),!1]})}),(0,qt.jsxs)(op,{children:[(0,qt.jsx)(UT,{order:r,orderBy:i,setOrder:o,setOrderBy:a,data:n,headCells:null===l||void 0===l?void 0:l.filter(e=>b.includes(e.id)),dataParameter:s,selected:c,setSelected:d,isSelection:u,noDataImage:p,fetchList:h,pageDetails:m,skeletonVrows:6,className:"theme_scroll",children:null===n||void 0===n?void 0:n.filter(e=>"bp.pulse"!==e.data_type).map(e=>{const n=e.short_description.split("/");return(0,qt.jsxs)(cw,{hover:!0,selected:c.includes(e.id.toString()),sx:{"&:last-child td, &:last-child th":{border:0}},children:[u&&(0,qt.jsx)(gw,{padding:"checkbox",children:(0,qt.jsx)(Dw,{onChange:d,checked:c.includes(e.id.toString()),name:e.id.toString(),color:"primary"})}),b.includes("vital_type")&&(0,qt.jsxs)(gw,{children:["bp"===e.data_type&&(0,qt.jsx)(Lo,{className:"linkClr",to:e.id,children:(0,qt.jsxs)(Cf,{color:"customClr.bp",fontWeight:600,component:"span",fontSize:14,children:[" ",k("rpm_".concat(e.data_type))]})}),"glucose"===e.data_type&&(0,qt.jsx)(Lo,{className:"linkClr",to:e.id,children:(0,qt.jsxs)(Cf,{color:"customClr.glucose",fontWeight:600,component:"span",fontSize:14,sx:{textDecoration:"underline"},children:[" ",k("rpm_".concat(e.data_type))]})}),"bp.pulse"===e.data_type&&(0,qt.jsx)(Lo,{className:"linkClr",to:e.id,children:(0,qt.jsxs)(Cf,{color:"customClr.pulse",fontWeight:600,component:"span",fontSize:14,sx:{textDecoration:"underline"},children:[" ",k("rpm_".concat(e.data_type))]})})]}),b.includes("processing_mode")&&(0,qt.jsx)(gw,{children:e.processing_mode}),b.includes("batch_size")&&(0,qt.jsx)(gw,{children:e.data_batch_size?e.data_batch_size:"NA"}),b.includes("short_description")&&(0,qt.jsx)(gw,{children:n[0]}),b.includes("updated_at")&&(0,qt.jsx)(gw,{children:sa()(e.created_at).format("DD MMM YYYY hh:mm A")}),b.includes("status")&&(0,qt.jsx)(gw,{children:(0,qt.jsx)(dye,{checked:!ps(null===e||void 0===e?void 0:e.status)&&(null===e||void 0===e?void 0:e.status),onChange:t=>_(t,e),disabled:M(e),inputProps:{"aria-label":"controlled"}})}),b.includes("defaultRule")&&(0,qt.jsx)(gw,{children:(0,qt.jsx)(d_,{margin:"dense",children:(0,qt.jsxs)(G_,{variant:"outlined",size:"small",value:null!==(null===e||void 0===e?void 0:e.default_rule)&&(null===e||void 0===e?void 0:e.default_rule),onChange:t=>{t.target.value&&w&&"bp"===e.data_type||t.target.value&&S&&"glucose"===e.data_type?A(t,e):C({e:t,row:e})},children:[(0,qt.jsx)(mf,{value:!0,children:"Yes"}),(0,qt.jsx)(mf,{value:!1,children:"No"})]})})}),b.includes("action")&&(0,qt.jsxs)(gw,{children:[(null===t||void 0===t?void 0:t.showViewRuleBtn)&&f(e),(null===t||void 0===t?void 0:t.showDeleteRuleBtn)&&g(e)]})]},e.id)})}),(0,qt.jsx)(KE,{pageDetails:m,fetchListFunction:h}),(0,qt.jsx)(TE,{open:y,allHeadCells:l,initialHeadcells:b,setHeadcells:x,onClose:j})]})]})})]})}Fke.defaultProps={userData:{},rulesHeadCell:[],pageDetails:{},order:"",orderBy:"",setOrder:()=>{},setOrderBy:()=>{},dataParameter:"",checkState:"",onCheck:()=>{},isSelection:"",nodata:"",ruleList:[],fetchRuleList:()=>{},viewButton:()=>{},deleteButton:()=>{},activeProgram:{},initialHeadcells:[],setHeadcells:()=>{},settingModal:!1,handleSettingModalToggle:()=>{},handleStatus:()=>{},handleDefaultRule:()=>{},handleDefaultModalToggle:()=>{},isRuleActive:!1,isGlucoseRuleActive:!1};const $ke=Fke,Bke=["content"];const zke=function(e){var t;let{activeProgram:n}=e;const r=window.innerWidth,o=Nt(),a=so(),s=VC(JA().breakpoints.down("sm")),l=wt(cu),c=wt(bu),d=!("true"===us(c,"user_principal.attributes.skip_tour[0]","")),{t:u}=Vg(),{enqueueSnackbar:p}=hi(),[h,m]=We.useState(""),[f,g]=(0,We.useState)("desc"),[v,x]=(0,We.useState)("updated_at"),[y,b]=We.useState(null),[j,_]=(0,We.useState)([]),[C,w]=We.useState(""),[S,A]=(0,We.useState)((0,i.A)({},dd)),[k,T]=We.useState({open:!1,data:{}}),[E,M]=We.useState({open:!1,data:{}}),O=e=>{T((0,i.A)((0,i.A)({},k),{},{open:!k.open,data:e}))},R=s?["vital_type","action"]:["vital_type","processing_mode","batch_size","short_description","updated_at","status","defaultRule","action"],P=null===y||void 0===y?void 0:y.some(e=>"bp"===e.data_type&&(null===e||void 0===e?void 0:e.default_rule)&&(null===e||void 0===e?void 0:e.status)),D=null===y||void 0===y?void 0:y.some(e=>"glucose"===e.data_type&&e.data_type&&(null===e||void 0===e?void 0:e.default_rule)&&(null===e||void 0===e?void 0:e.status)),N=(e,t)=>{M((0,i.A)((0,i.A)({},E),{},{open:!E.open,data:{e:e,row:t}}))},L=async(e,t)=>{const r=y.map(r=>{if(r.id===t.id){const s={programId:null===n||void 0===n?void 0:n.code,ruleId:t.id,status:e.target.checked,defaultRule:null===t||void 0===t?void 0:t.default_rule};if(("glucose"===t.data_type||"bp"===t.data_type)&&(o(qs(s)).then(()=>{window.location.reload()}).catch(e=>{console.error("Error:",e)}),"bp"===t.data_type)){var a;const e=null===(a=y.find(e=>"bp.pulse"===e.data_type&&e.short_description===t.short_description))||void 0===a?void 0:a.id;e&&o(qs((0,i.A)((0,i.A)({},s),{},{ruleId:e}))).then(()=>{window.location.reload()}).catch(e=>{console.error("Error:",e)})}return(0,i.A)((0,i.A)({},r),{},{status:e.target.checked})}return r});b(r)},I=async e=>{let{e:t,row:r}=e;if(t.target.value){const e=null===y||void 0===y?void 0:y.map(e=>{if(e.id===r.id){const s={programId:null===n||void 0===n?void 0:n.code,ruleId:r.id,status:t.target.value,defaultRule:t.target.value};if(("glucose"===r.data_type||"bp"===r.data_type)&&(o(qs(s)).then(()=>{window.location.reload()}).catch(e=>{console.error("Error:",e)}),"bp"===r.data_type)){var a;const e=null===(a=y.find(e=>"bp.pulse"===e.data_type&&e.short_description===r.short_description))||void 0===a?void 0:a.id;e&&o(qs((0,i.A)((0,i.A)({},s),{},{ruleId:e}))).then(()=>{window.location.reload()}).catch(e=>{console.error("Error:",e)})}return(0,i.A)((0,i.A)({},e),{},{default_rule:t.target.value,status:t.target.value})}return e});b(e)}else o(Zo({subTitle:"At least one rule per vital must remain active at the program-level.",severity:ud.ERROR}))},[F,$]=We.useState(!1),[B,z]=We.useState(cs($o.getProgramRulesHeadcells())?R:$o.getProgramRulesHeadcells()),H=function(e){z(e),$o.setProgramRulesHeadcells(e)},W=()=>{$(!F)},U=e=>{if(Array.isArray(e))return _(e.map(e=>e.toString()));const t=e.target.name;j.includes(t)?_(j.filter(e=>e!==t)):_(e=>[...e,t])},V=async function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:C;try{const{data:t}=await o(Vs(null===n||void 0===n?void 0:n.code,(0,i.A)((0,i.A)({sort_by:v,sort_order:f},S),{},{q:e}))),r=t||{},{content:a}=r,s=Ko(r,Bke);b(a),A(e=>(0,i.A)((0,i.A)({},e),{},{last_page:s.last_page,current_page:s.current_page,from:s.from,per_page:s.per_page,to:s.to,total:s.total}))}catch(t){const e=us(t,"response.data.code","");cs(e)?o(Zo({subTitle:"error:rpm_ERR_NOT_FOUND",severity:ud.ERROR})):o(Zo({subTitle:Vd(e,"error:rpm_NotFound"),severity:ud.ERROR}))}},G=e=>(0,qt.jsx)(sy,{title:u("rpm_Edit"),children:(0,qt.jsx)(wh,{"data-id":e.id,color:"primary",onClick:()=>console.log(e),children:(0,qt.jsx)(fc,{fontSize:"small",sx:{width:16,height:16}})})}),q=e=>(0,qt.jsx)(sy,{title:u("rpm_view"),children:(0,qt.jsx)(wh,{"data-id":e.id,color:"primary",onClick:()=>a(e.id),children:(0,qt.jsx)(gc,{fontSize:"small",sx:{width:16,height:16}})})}),Y=e=>(0,qt.jsx)(wh,{"data-id":e.id,color:"error",onClick:()=>O(e),disabled:(null===e||void 0===e?void 0:e.default_rule)&&!0,children:(0,qt.jsx)(xc,{fontSize:"small",sx:{width:16,height:16}})});We.useEffect(()=>{H(R)},[s]),We.useEffect(()=>{l&&!cs(n)&&V()},[l,n]),We.useEffect(()=>{o(NC({activeMenuItem:"rules_program"}))},[n]);const Z=[{id:"vital_type",label:u("rpm_Vitals"),isSort:!0,sortProperty:"vital_type"},{id:"processing_mode",label:u("rpm_ProcessingMode"),isSort:!1,sortProperty:"processing_mode"},{id:"batch_size",label:u("rpm_BatchSize"),isSort:!1,sortProperty:"batch_size"},{id:"short_description",label:u("rpm_ShortDescription"),isSort:!1,sortProperty:"short_description"},{id:"updated_at",label:u("rpm_DateModified"),isSort:!1,sortProperty:"updated_at"},{id:"status",label:u("rpm_Status"),isSort:!1,sortProperty:"status"},{id:"defaultRule",label:u("rpm_DefaultRule"),isSort:!1,sortProperty:"defaultRule"},{id:"action",label:u("rpm_Actions"),isSort:!1,sortProperty:"action"}];return cs(n)?(0,qt.jsx)(yp,{variant:"outlined",sx:{px:2.5,py:6,display:"flex",height:"320px"},children:(0,qt.jsx)(op,{alignSelf:"center",sx:{mx:"auto"},children:(0,qt.jsx)(MM,{color:"primary"})})}):(0,qt.jsxs)(qt.Fragment,{children:[cs(n)||null!==n&&void 0!==n&&null!==(t=n.permissions)&&void 0!==t&&t.showRuleList?r>=575?(0,qt.jsx)(Ike,{userData:null===n||void 0===n?void 0:n.permissions,order:f,orderBy:v,setOrder:g,setOrderBy:x,searchText:C,setSearchText:w,dataParameter:"id",checkState:j,onCheck:U,isSelection:!1,nodata:GC,rulesHeadCell:Z,ruleList:y,fetchRuleList:V,pageDetails:S,editButton:G,viewButton:q,deleteButton:Y,activeProgram:n,setHeadcells:H,settingModal:F,initialHeadcells:B,handleSettingModalToggle:W,handleStatus:L,handleDefaultRule:I,isRuleActive:P,isGlucoseRuleActive:D,handleDefaultModalToggle:N}):(0,qt.jsx)($ke,{userData:null===n||void 0===n?void 0:n.permissions,order:f,orderBy:v,setOrder:g,setOrderBy:x,searchText:C,setSearchText:w,dataParameter:"id",checkState:j,onCheck:U,isSelection:!1,nodata:GC,rulesHeadCell:Z,ruleList:y,fetchRuleList:V,pageDetails:S,editButton:G,viewButton:q,deleteButton:Y,activeProgram:n,setHeadcells:H,settingModal:F,initialHeadcells:B,handleSettingModalToggle:W,handleStatus:L,handleDefaultRule:I,isRuleActive:P,isGlucoseRuleActive:D,handleDefaultModalToggle:N}):(0,qt.jsx)(LC,{}),(0,qt.jsx)(qV,{openModal:k.open,onCloseModal:O,actionFunction:()=>(async(e,t)=>{const n={programId:e,ruleId:null===t||void 0===t?void 0:t.id,data_type:null===t||void 0===t?void 0:t.data_type};try{if(("glucose"===t.data_type||"bp"===t.data_type)&&(await o(Zs(n)),"bp"===t.data_type)){const e=y.find(e=>"bp.pulse"===e.data_type&&e.short_description===t.short_description);e&&o(Zs((0,i.A)((0,i.A)({},n),{},{ruleId:null===e||void 0===e?void 0:e.id,data_type:null===e||void 0===e?void 0:e.data_type})))}V(),T((0,i.A)((0,i.A)({},k),{},{open:!k.open})),p(u("message:rpm_DeleteRuleSuccess"),{variant:"success"})}catch(r){p(r.message,{variant:"error"})}})(null===n||void 0===n?void 0:n.code,null===k||void 0===k?void 0:k.data),dataName:"",options:{primaryText:u("message:rpm_DeleteTitle"),secondaryText:u("message:rpm_DeleteBodyText"),btn:{primaryText:u("rpm_Delete"),secondaryText:u("rpm_Cancel"),primaryColor:"error",secondaryColor:"primary"},btnSwap:!0}}),(0,qt.jsx)(qV,{openModal:E.open,onCloseModal:N,actionFunction:()=>I(null===E||void 0===E?void 0:E.data),dataName:"",options:{primaryText:u("message:rpm_DefaultRuleTitle"),secondaryText:u("message:rpm_DefautRuleBodyText"),btn:{primaryText:u("rpm_Yes"),secondaryText:u("rpm_No"),primaryColor:"success",secondaryColor:"primary"},btnSwap:!0}}),(0,qt.jsx)(zZ,{isTour:d,path:"programRulesTour",setRenderer:m}),(0,qt.jsx)("input",{type:"hidden",id:"rerenderer",value:h})]})};n(56603),n(68859),n(28575),n(90198);var Hke=n(51869),Wke=n(6217),Uke=n.n(Wke);function Vke(e){let{templateData:t,getTemplateDetail:n,handleChange:r}=e;const{t:i}=Vg();return cs(t)?"No Template":(0,qt.jsxs)(qt.Fragment,{children:[(0,qt.jsx)(op,{mt:{xs:1,sm:0},display:"flex",alignItems:"center",justifyContent:{xs:"flex-start",sm:"flex-start",md:"flex-end",lg:"flex-end"},flexWrap:{xs:"wrap",sm:"wrap",md:"nowrap"}}),(0,qt.jsxs)(Ff,{container:!0,spacing:3,mb:1,children:[(0,qt.jsx)(Ff,{item:!0,xs:12,sm:6,md:6,children:(0,qt.jsxs)(op,{width:"100%",display:"flex",alignItems:"center",justifyContent:"flex-start",flexDirection:"row",tabIndex:0,children:[(0,qt.jsx)(Cf,{component:"h6",variant:"subtitle2",children:i("rpm_ModifiedBy")+":"}),(0,qt.jsxs)(op,{ml:1,component:"span",fontWeight:900,fontSize:14,children:[null===t||void 0===t?void 0:t.updated_by,", ",null===t||void 0===t?void 0:t.updated_at]})]})}),(0,qt.jsx)(Ff,{item:!0,xs:12,sm:6,md:6,children:(0,qt.jsxs)(op,{width:"100%",display:"flex",alignItems:"center",justifyContent:{xs:"flex-start",sm:"flex-end"},flexDirection:"row",tabIndex:0,children:[(0,qt.jsx)(Cf,{component:"h6",variant:"subtitle2",children:i("rpm_Created_By")+":"}),(0,qt.jsxs)(op,{ml:1,component:"span",fontWeight:900,fontSize:14,children:[t.created_by,", ",t.created_at]})]})})]}),(0,qt.jsx)(op,{width:"100%",my:1,children:(0,qt.jsx)(Hke.Ay,{style:{width:"100%"},fullWidth:!0,autoFocus:!0,mode:"html",theme:"solarized_dark",fontSize:16,id:"root",name:"root",onChange:r,value:null===t||void 0===t?void 0:t.template,tabSize:2,onLoad:e=>{Uke().beautify(e.session)}})}),(0,qt.jsx)(op,{display:"flex",alignItems:"center",justifyContent:{xs:"flex-start",sm:"flex-end",md:"flex-end"},pt:{xs:1,sm:1,md:1},pb:1,width:"100%",children:(0,qt.jsx)(KSe,{mdUp:!0,children:(0,qt.jsx)(xh,{className:"custom-default-button text-transform-none",size:"large",variant:"contained",disableElevation:!0,onClick:n,children:i("reset")})})})]})}Vke.defaultProps={copyTemplateText:()=>{},downloadTemplateText:()=>{},getTemplateDetail:()=>{},readFile:()=>{},handleChange:()=>{},templateData:{}};const Gke=Vke,qke=e=>{let{templateData:t,getConsultationTemplate:n,handleChange:r,activeProgram:i,updateTemplate:o}=e;const a=so(),s=[{name:_e("rpm_RPM"),url:ld.DOCTOR.PROGRAM},{name:null===i||void 0===i?void 0:i.display_name,url:"".concat(ld.DOCTOR.PROGRAM,"/").concat(null===i||void 0===i?void 0:i.code,"/patients")},{name:_e("rpm_ConsultationTemplate"),url:""}];return(0,qt.jsx)(qt.Fragment,{children:(0,qt.jsxs)(op,{children:[(0,qt.jsxs)(op,{sx:{width:"100%"},children:[(0,qt.jsx)(op,{mb:2.5,children:(0,qt.jsx)(BH,{labels:s})}),(0,qt.jsxs)(Ff,{container:!0,children:[(0,qt.jsx)(Ff,{item:!0,xs:12,md:!0,children:(0,qt.jsx)(op,{sx:{mb:1},children:(0,qt.jsx)(Ff,{container:!0,spacing:2,alignItems:"center",sx:{mb:2},children:(0,qt.jsx)(Ff,{item:!0,xs:!0,children:(0,qt.jsx)(Cf,{variant:"h5",component:"h5",children:_e("rpm_ConsultationTemplate")})})})})}),(0,qt.jsx)(Ff,{item:!0,xs:12,md:!0,children:(0,qt.jsxs)(op,{mb:3,textAlign:"right",children:[(0,qt.jsx)(xh,{variant:"outlined",style:{marginRight:"10px"},color:"primary",onClick:()=>a(-1),children:_e("rpm_Cancel")}),(0,qt.jsx)(xh,{color:"primary",disableElevation:!0,variant:"contained",type:"submit",onClick:o,children:_e("rpm_Save")})]})})]})]}),(0,qt.jsx)(op,{bgcolor:"white",p:2,sx:{boxShadow:"0 0 9px 0 #0000000a",borderRadius:"8px"},children:(0,qt.jsx)(Ff,{container:!0,spacing:2,alignItems:"center",p:2,pr:0,children:(0,qt.jsx)(Gke,{templateData:t,getTemplateDetail:n,handleChange:r})})})]})})},Yke=e=>{let{templateData:t,getConsultationTemplate:n,handleChange:r,activeProgram:i,updateTemplate:o}=e;const a=so(),s=[{name:_e("rpm_RPM"),url:ld.DOCTOR.PROGRAM},{name:null===i||void 0===i?void 0:i.display_name,url:"".concat(ld.DOCTOR.PROGRAM,"/").concat(null===i||void 0===i?void 0:i.code,"/patients")},{name:_e("rpm_ConsultationTemplate"),url:""}];return(0,qt.jsx)(qt.Fragment,{children:(0,qt.jsxs)(op,{children:[(0,qt.jsxs)(op,{sx:{width:"100%"},children:[(0,qt.jsxs)(op,{mb:2.5,display:"flex",alignItems:"baseline",children:[(0,qt.jsx)(BH,{labels:s}),(0,qt.jsx)(Cf,{variant:"h6",component:"h6",children:_e("rpm_ConsultationTemplate")})]}),(0,qt.jsx)(Ff,{container:!0,children:(0,qt.jsx)(Ff,{item:!0,xs:12,md:!0,children:(0,qt.jsxs)(op,{mb:3,textAlign:"right",children:[(0,qt.jsx)(xh,{variant:"outlined",style:{marginRight:"10px"},color:"primary",onClick:()=>a(-1),children:_e("rpm_Cancel")}),(0,qt.jsx)(xh,{color:"primary",disableElevation:!0,variant:"contained",type:"submit",onClick:o,children:_e("rpm_Save")})]})})})]}),(0,qt.jsx)(op,{bgcolor:"white",p:2,sx:{boxShadow:"0 0 9px 0 #0000000a",borderRadius:"8px"},children:(0,qt.jsx)(Ff,{container:!0,spacing:2,alignItems:"center",p:2,pr:0,children:(0,qt.jsx)(Gke,{templateData:t,getTemplateDetail:n,handleChange:r})})})]})})},Zke=e=>{let{activeProgram:t}=e;const n=window.innerWidth,r=wt(cu),o=Nt(),[a,s]=We.useState({}),l=We.useRef(a),c=async e=>{const{data:t}=await o((e=>async t=>{t(na(!0));try{const t="".concat(ya,"/-/YOURPAL/consultation_notes.html?prefix=").concat(e),n=await Iu(t,{});return el(n.data),n}catch(n){return n}finally{t(na(!1))}})(e));console.log(t),s(t)},d=async()=>{await o(((e,t)=>async n=>{n(na(!0));const r="".concat(ya,"/-/YOURPAL/consultation_notes.html?prefix=").concat(t);try{const t=await $u(r,e);return n(Zo({subTitle:"message:rpm_TemplateUpdatedSuccessfully",severity:ud.SUCCESS})),el(t.data),t}catch(i){return i}finally{n(na(!1))}})(a,null===t||void 0===t?void 0:t.code))},u=e=>{cs(a)||(s((0,i.A)((0,i.A)({},a),{},{template:e})),l.current=(0,i.A)((0,i.A)({},a),{},{template:e}))};return We.useEffect(()=>{r&&t&&c(null===t||void 0===t?void 0:t.code)},[r,t]),We.useEffect(()=>{o(NC({activeMenuItem:"templates"}))},[]),(0,qt.jsx)("div",{children:n>=575?(0,qt.jsx)(qke,{activeProgram:t,templateData:a,getConsultationTemplate:c,handleChange:u,updateTemplate:d}):(0,qt.jsx)(Yke,{activeProgram:t,templateData:a,getConsultationTemplate:c,handleChange:u,updateTemplate:d})})};function Kke(e){let{userList:t,order:n,orderBy:r,setOrder:i,setOrderBy:o,searchText:a,setSearchText:s,dataParameter:l,userHead:c,checkState:d,onCheck:u,isSelection:p,nodata:h,fetchUserList:m,pageDetails:f,setHeadcells:g,settingModal:v,initialHeadcells:x,handleSettingModalToggle:y,toggleRoles:b}=e;const{t:j}=Vg(),_=[{name:j("rpm_RPM"),url:ld.PATIENT},{name:j("rpm_Providers"),url:""}];return(0,qt.jsx)(qt.Fragment,{children:(0,qt.jsxs)(op,{sx:{width:"100%"},children:[(0,qt.jsxs)(op,{mb:2.5,display:"flex",children:[(0,qt.jsx)(BH,{labels:_}),(0,qt.jsx)(op,{sx:{display:{xs:"block",sm:"none"}},children:(0,qt.jsx)(Cf,{variant:"h5",component:"h5",children:j("rpm_Providers")})})]}),(0,qt.jsx)(op,{mb:2.5,children:(0,qt.jsx)(Ff,{container:!0,spacing:2,alignItems:"center",children:(0,qt.jsx)(Ff,{item:!0,xs:!0,children:(0,qt.jsx)(op,{sx:{display:{xs:"none",sm:"block"}},children:(0,qt.jsx)(Cf,{variant:"h5",component:"h5",children:j("rpm_Providers")})})})})}),(0,qt.jsxs)(Ff,{container:!0,spacing:2.5,children:[(0,qt.jsx)(Ff,{item:!0,xs:12,children:(0,qt.jsxs)(Ff,{container:!0,spacing:2,justifyContent:"space-between",children:[(0,qt.jsx)(Ff,{item:!0,xs:12,md:5,lg:4,className:"staff-tour-step1",children:(0,qt.jsx)(WZ,{fetchListFunction:m,searchText:a,setSearchText:s,pageDetails:f,searchInField:!0,placeHolder:"Search by username and email"})}),(0,qt.jsx)(Ff,{item:!0,xs:12,md:7,lg:8,container:!0,spacing:2,justifyContent:"flex-end",children:(0,qt.jsx)(Ff,{item:!0,children:(0,qt.jsx)(sy,{title:j("rpm_TableCellSetting"),children:(0,qt.jsx)(sv,{sx:{boxShadow:"none",width:32,height:32,minHeight:"auto"},size:"small",color:"primary",onClick:y,children:(0,qt.jsx)(YC.A,{fontSize:"small",sx:{width:16,height:16}})})})})})]})}),(0,qt.jsxs)(Ff,{item:!0,xs:12,children:[(0,qt.jsx)(op,{children:(0,qt.jsx)(UT,{order:n,orderBy:r,setOrder:i,setOrderBy:o,data:t,headCells:null===c||void 0===c?void 0:c.filter(e=>x.includes(e.id)),dataParameter:l,selected:d,setSelected:u,isSelection:p,noDataImage:h,fetchList:m,pageDetails:f,skeletonVrows:6,className:"theme_scroll",children:null===t||void 0===t?void 0:t.map(e=>{return(0,qt.jsxs)(cw,{sx:{"&:last-child td, &:last-child th":{border:0}},children:[p&&(0,qt.jsx)(gw,{padding:"checkbox",children:(0,qt.jsx)(Dw,{onChange:u,checked:d.includes(e.id.toString()),name:e.id.toString(),color:"primary"})}),x.includes("username")&&(0,qt.jsx)(gw,{children:e.username}),x.includes("full_name")&&(0,qt.jsx)(gw,{width:"25%",children:e.first_name+" "+e.last_name}),x.includes("email")&&(0,qt.jsx)(gw,{children:e.email}),x.includes("status")&&(0,qt.jsx)(gw,{children:(t=e.active,t?(0,qt.jsx)(dM,{severity:"success",icon:!1,sx:e=>({py:0,px:1,display:"inline-flex",fontSize:e.spacing(1.5),"& .MuiAlert-message":{p:e.spacing(.5,0)}}),children:(0,qt.jsx)("strong",{children:"Active"})}):(0,qt.jsx)(dM,{severity:"error",icon:!1,sx:e=>({py:0,px:1,display:"inline-flex",fontSize:e.spacing(1.5),"& .MuiAlert-message":{p:e.spacing(.5,0)}}),children:(0,qt.jsx)("strong",{children:"Inactive"})}))}),x.includes("created_at")&&(0,qt.jsx)(gw,{children:sa()(e.created_at).format("DD MMM YYYY hh:mm A")}),x.includes("action")&&(0,qt.jsx)(gw,{children:b(e)})]},e.id);var t})})}),(0,qt.jsx)(KE,{pageDetails:f,fetchListFunction:m}),(0,qt.jsx)(TE,{open:v,allHeadCells:c,initialHeadcells:x,setHeadcells:g,onClose:y})]})]})]})})}Kke.defaultProps={userHead:[],pageDetails:{},order:"",orderBy:"",setOrder:()=>{},setOrderBy:()=>{},searchText:"",setSearchText:()=>{},dataParameter:"",checkState:"",onCheck:()=>{},isSelection:"",nodata:"",userList:[],fetchUserList:()=>{},viewButton:()=>{},deleteButton:()=>{},filterByProgram:0,onProgramChange:()=>{},programList:[],onApplyFilter:()=>{},onResetFilter:()=>{},userData:{},initialHeadcells:[],setHeadcells:()=>{},settingModal:!1,handleSettingModalToggle:()=>{},assignProviders:()=>{},toggleRoles:()=>{},allPrograms:[]};const Xke=Kke,Qke=["content"];const Jke=function(e){let{activeProgram:t}=e;const n=Nt(),{programId:r,patientId:o}=lo(),{t:a}=Vg(),{userData:s}=(0,We.useContext)(lv),l=wt(bu),c=!("true"===us(l,"user_principal.attributes.skip_tour[0]","")),{programList:d}=(0,We.useContext)(DC),u=wt(cu),[p,h]=(0,We.useState)("desc"),[m,f]=(0,We.useState)("updated_at"),[g,v]=We.useState(""),[x,y]=We.useState(null),[b,j]=(0,We.useState)([]),[_,C]=(0,We.useState)((0,i.A)({},dd)),[w,S]=We.useState(""),[A,k]=We.useState(!1),[T,E]=We.useState([]),[M,O]=We.useState({}),[R,P]=We.useState(cs($o.getProvidersHeadCells())?["username","full_name","email","status","created_at","action"]:$o.getProvidersHeadCells()),D=async function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:g;const t=(0,i.A)((0,i.A)({q:e},_),{},{sort_by:m,sort_order:p,programId:r});try{const{data:e}=await n(Zg(t)),r=e||{},{content:o}=r,a=Ko(r,Qke);y(o),C(e=>(0,i.A)((0,i.A)({},e),{},{last_page:a.last_page,current_page:a.current_page,from:a.from,per_page:a.per_page,to:a.to,total:a.total}))}catch(o){const e=us(o,"response.data.code","");cs(e)?n(Zo({subTitle:"error:rpm_FetchUsersFailed",severity:ud.ERROR})):n(Zo({subTitle:Vd(e,"error:rpm_FetchUsersFailed"),severity:ud.ERROR}))}},N=async()=>{const e={programUrn:null===t||void 0===t?void 0:t.urn};try{const{data:t}=await n(ll(e));E(t)}catch(r){const e=us(r,"response.data.code","");cs(e)?n(Zo({subTitle:"error:rpm_FetchUsersFailed",severity:ud.ERROR})):n(Zo({subTitle:Vd(e,"error:rpm_FetchUsersFailed"),severity:ud.ERROR}))}},L=async e=>{const r=null===T||void 0===T?void 0:T.some(t=>(null===t||void 0===t?void 0:t.provider_urn)===e&&(null===t||void 0===t?void 0:t.patient_urn)===(null===M||void 0===M?void 0:M.urn)),i={patient_urn:null===M||void 0===M?void 0:M.urn,program_urn:null===t||void 0===t?void 0:t.urn,provider_urn:e,key:r?"UNASSIGN":"ASSIGN"};try{const{data:e}=await n(cl(i));cs(e)||(n(Zo({subTitle:a(r?"rpm_providerUnassignSuccess":"rpm_providerAssignment"),severity:ud.SUCCESS})),N())}catch(o){const e=us(o,"response.data.code","");cs(e)?n(Zo({subTitle:"error:rpm_providerAssignFailed",severity:ud.ERROR})):n(Zo({subTitle:Vd(e,"error:rpm_providerAssignFailed"),severity:ud.ERROR}))}};We.useEffect(()=>{u&&!cs(s)&&r&&o&&(D(),(async()=>{const{data:e}=await n(pl(r,o));O(e)})())},[u,p,m,s,r,o]),We.useEffect(()=>{u&&!cs(t)&&N()},[t,u]),We.useEffect(()=>{n(NC({activeMenuItem:"all_patients"}))},[]);const I=[{id:"username",label:a("rpm_UserName"),isSort:!0,sortProperty:"username"},{id:"full_name",label:a("rpm_FullName"),isSort:!1,sortProperty:"full_name"},{id:"email",label:a("rpm_Email"),isSort:!0,sortProperty:"email"},{id:"status",label:a("rpm_Status"),isSort:!1,sortProperty:"status"},{id:"created_at",label:a("rpm_CreatedAt"),isSort:!0,sortProperty:"created_at"},{id:"action",label:a("rpm_Actions"),isSort:!1,sortProperty:"action"}];return(0,qt.jsxs)(qt.Fragment,{children:[(0,qt.jsx)(Xke,{order:p,orderBy:m,setOrder:h,setOrderBy:f,searchText:g,setSearchText:v,dataParameter:"id",checkState:b,onCheck:e=>{if(Array.isArray(e))return j(e.map(e=>e.toString()));const t=e.target.name;b.includes(t)?j(b.filter(e=>e!==t)):j(e=>[...e,t])},isSelection:!1,nodata:GC,userHead:I,userList:x,fetchUserList:D,pageDetails:_,programList:d,userData:s,setHeadcells:function(e){P(e),$o.setProvidersHeadCells(e)},settingModal:A,initialHeadcells:R,handleSettingModalToggle:()=>{k(!A)},toggleRoles:e=>{const t=null===T||void 0===T?void 0:T.some(t=>(null===t||void 0===t?void 0:t.provider_urn)===(null===e||void 0===e?void 0:e.urn)&&(null===t||void 0===t?void 0:t.patient_urn)===(null===M||void 0===M?void 0:M.urn));return(0,qt.jsx)(xh,{"data-id":e.id,color:t?"error":"primary",variant:"contained",disableElevation:!0,startIcon:(0,qt.jsx)(tK.A,{}),onClick:()=>L(e.urn),children:a(t?"rpm_Unassign":"rpm_Assign")})},assignProviders:L}),!cs(s)&&(0,qt.jsxs)(qt.Fragment,{children:[(0,qt.jsx)(zZ,{isTour:c,path:"staffTour",setRenderer:S}),(0,qt.jsx)("input",{type:"hidden",id:"rerenderer",value:w})]})]})},eTe=e=>{let{open:t,onClose:n,onAssign:r,onEdit:o,patientList:a,selectedPatient:s,setSelectedPatient:l,selectedProvider:c,setSelectedProvider:d,selectedRowData:u,userList:p,fetchPatientListSuggestions:h}=e;const{t:m}=Vg(),f=ds((e,t)=>{null!==t&&void 0!==t&&t.trim()&&e({patientName:t})},500);return(0,We.useEffect)(()=>{t&&(l(null),d(null),h({patientName:""}))},[t]),(0,qt.jsxs)(cC,{open:t,onClose:n,maxWidth:"sm",fullWidth:!0,children:[(0,qt.jsx)(fC,{children:m(u?"rpm_EditAssignedProvider":"rpm_AssignPatients")}),(0,qt.jsx)(bC,{dividers:!0,children:(0,qt.jsxs)(Ff,{container:!0,spacing:2,children:[(0,qt.jsx)(Ff,{item:!0,xs:12,sm:6,children:u?(0,qt.jsx)(Q_,{value:null===u||void 0===u?void 0:u.client_name,label:m("rpm_PatientName"),variant:"outlined",size:"small",fullWidth:!0,disabled:!0,sx:{"& .MuiInputBase-input.Mui-disabled":{WebkitTextFillColor:"#000"}}}):(0,qt.jsx)(aj,{options:a||[],getOptionLabel:e=>{var t;return e&&(e.name||[e.first_name,e.last_name].filter(Boolean).join(" ")||(null===(t=e.patient_urn)||void 0===t?void 0:t.split("/").pop())||e.id)||""},value:s,onChange:(e,t,n)=>{if("clear"===n)return l(null),void h({patientName:""});l(t)},onInputChange:(e,t)=>(e=>{f(h,e)})(t),renderInput:e=>(0,qt.jsx)(Q_,(0,i.A)((0,i.A)({},e),{},{label:m("rpm_SelectPatient")||"Select Patient",variant:"outlined",size:"small",fullWidth:!0}))})}),(0,qt.jsx)(Ff,{item:!0,xs:12,sm:6,children:(0,qt.jsx)(aj,{fullWidth:!0,size:"small",margin:"dense",id:"provider",name:"provider",options:p||[],isOptionEqualToValue:(e,t)=>(null===e||void 0===e?void 0:e.id)===(null===t||void 0===t?void 0:t.id),getOptionLabel:e=>e?"".concat(e.first_name||""," ").concat(e.last_name||"").trim():"",renderOption:(e,t)=>(0,We.createElement)(op,(0,i.A)((0,i.A)({component:"li"},e),{},{key:t.id}),(0,qt.jsx)(Cf,{variant:"body1",component:"p",children:"".concat(t.first_name," ").concat(t.last_name)})),value:c,onChange:(e,t)=>d(t),renderInput:e=>(0,qt.jsx)(Q_,(0,i.A)((0,i.A)({},e),{},{label:m("rpm_SelectProvider")||"Select Provider",variant:"outlined",size:"small",fullWidth:!0}))})})]})}),u?(0,qt.jsxs)(vE,{children:[(0,qt.jsx)(xh,{onClick:n,children:m("rpm_Cancel")||"Cancel"}),(0,qt.jsx)(xh,{variant:"contained",color:"primary",onClick:()=>{o(),n()},disabled:!c,children:m("rpm_Edit")||"Edit Provider"})]}):(0,qt.jsxs)(vE,{children:[(0,qt.jsx)(xh,{onClick:n,children:m("rpm_Cancel")||"Cancel"}),(0,qt.jsx)(xh,{variant:"contained",color:"primary",onClick:()=>{r("ASSIGN"),n()},disabled:!s||!c,children:m("rpm_Assign")||"Assign"})]})]})};eTe.defaultProps={onAssign:()=>{},onEdit:()=>{},patientList:[],selectedPatient:null,setSelectedPatient:()=>{},selectedProvider:null,setSelectedProvider:()=>{},userList:[],fetchPatientListSuggestions:()=>{}};const tTe=eTe;function nTe(e){let{fetchAssignmentList:t,assignment:n,activeProgram:r,devicesList:o,order:a,orderBy:s,setOrder:l,setOrderBy:c,dataParameter:d,initialHeadcells:u,headCellsItems:p,setHeadcells:h,checkState:m,onCheck:f,isSelection:g,nodata:v,fetchPatientList:x,pageDetails:y,multiDeletePatient:b,moreMenu:j,openFilter:_,patientModalOpen:C,viewMode:w,settingModal:S,handlePatientModalToggle:A,handleSettingModalToggle:k,addNewPatient:T,setSearchDevice:E,filterState:M,setFilterState:O,patientCourseCell:R,states:P,countries:D,fetchStates:N,patientSuggestions:L,fetchPatientListSuggestions:I,fetchAllPatients:F,handleViewPatientModalToggle:$,patientViewModalOpen:B,allPatients:z,setAllPatients:H,newHeadCellsItems:W,fetchAllPatientsListSuggestions:U,allpatientSuggestions:V,addButton:G,newFilterState:q,setNewFilterState:Y,newPageDetails:Z,userList:K,setUserParams:X,editListItem:Q,patientList:J,assignedProviders:ee,selectedPatient:te,setSelectedPatient:ne,selectedProvider:re,setSelectedProvider:ie,onAssign:oe,onEdit:ae,assignModalOpen:se,onCloseAssignmentPopUp:le,openAssignmentPopUp:ce,openEditProviderPopUp:de,selectedRowData:ue}=e;const{t:pe}=Vg(),he=[{name:pe("rpm_RPM"),url:ld.DOCTOR.PROGRAM},{name:null===r||void 0===r?void 0:r.display_name,url:""}],me=null===n||void 0===n?void 0:n.map(e=>[...e.assignments]);return(0,qt.jsxs)(op,{sx:{width:"100%"},children:[(0,qt.jsx)(op,{mb:2.5,children:(0,qt.jsx)(BH,{labels:he})}),(0,qt.jsx)(op,{sx:{mb:2.5},children:(0,qt.jsxs)(Ff,{container:!0,spacing:2,alignItems:"center",children:[(0,qt.jsx)(Ff,{item:!0,xs:!0,children:(0,qt.jsx)(Cf,{variant:"h5",component:"h5",children:pe("rpm_Assignments")||"Assignments"})}),(0,qt.jsx)(Ff,{item:!0,children:(0,qt.jsx)(xh,{variant:"contained",color:"primary",onClick:ce,children:pe("rpm_Assign")||"Assign"})})]})}),(0,qt.jsxs)(Ff,{container:!0,children:[(0,qt.jsx)(Ff,{item:!0,xs:12,children:(0,qt.jsx)(mr,{in:_,children:(0,qt.jsx)(yp,{elevation:0,sx:{p:1},children:(0,qt.jsxs)(Ff,{container:!0,spacing:2,alignItems:"center",children:[(0,qt.jsx)(Ff,{item:!0,xs:12,sm:4,children:(0,qt.jsx)(op,{className:"assigment-filter",children:(0,qt.jsx)(Lue,{pageDetails:y,fetchListFunction:x,filterState:M,setFilterState:O,patientSuggestions:L,fetchPatientListSuggestions:I,placeholder:"Search by name or phone number",helpText:"Enter name of the user"})})}),(0,qt.jsx)(Ff,{item:!0,xs:12,sm:4,children:(0,qt.jsx)(aj,{fullWidth:!0,size:"small",margin:"dense",id:"username",name:"username",options:cs(K)?[]:K,isOptionEqualToValue:(e,t)=>e.id===t.id,getOptionLabel:e=>e?"".concat(e.first_name||""," ").concat(e.last_name||"").trim():"",renderOption:(e,t)=>(0,We.createElement)(op,(0,i.A)((0,i.A)({component:"li"},e),{},{key:t.id}),(0,qt.jsx)(Cf,{variant:"body1",component:"p",children:"".concat(t.first_name," ").concat(t.last_name)})),onChange:(e,t)=>{O((0,i.A)((0,i.A)({},M),{},{provider_urn:null===t||void 0===t?void 0:t.urn}))},onInputChange:(e,t)=>{X(t||"")},renderInput:e=>(0,qt.jsx)(Q_,(0,i.A)((0,i.A)({},e),{},{placeholder:pe("rpm_SearchProvider")+"..."}))})}),(0,qt.jsxs)(Ff,{item:!0,sm:4,xs:2,justifyContent:"flex-end",children:["list"===w&&(0,qt.jsx)(Ff,{item:!0,textAlign:"right",children:(0,qt.jsx)(sy,{title:pe("rpm_TableCellSetting"),children:(0,qt.jsx)(sv,{sx:{boxShadow:"none",width:32,height:32,minHeight:"auto"},size:"small",color:"primary",onClick:k,children:(0,qt.jsx)(YC.A,{fontSize:"small",sx:{width:16,height:16}})})})}),m.length>0&&(0,qt.jsx)(Ff,{item:!0,children:(0,qt.jsx)(sy,{title:pe("rpm_Delete"),children:(0,qt.jsx)(wh,{color:"error",sx:{bgcolor:"red.50"},onClick:()=>b(m,{}),children:(0,qt.jsx)(xc,{fontSize:"small",sx:{width:16,height:16}})})})})]})]})})})}),null!==me&&void 0!==me&&me.length?(0,qt.jsx)(UT,{order:a,orderBy:s,setOrder:l,setOrderBy:c,data:null===me||void 0===me?void 0:me.flat(),headCells:p.filter(e=>u.includes(e.id)),dataParameter:d,selected:m,setSelected:f,isSelection:g,noDataImage:v,fetchList:x,pageDetails:y,skeletonVrows:6,className:"theme_scroll",children:((null===me||void 0===me?void 0:me.flat())||[]).map(e=>(0,qt.jsxs)(cw,{hover:!0,sx:{"&:last-child td, &:last-child th":{border:0}},children:[g&&(0,qt.jsx)(gw,{padding:"checkbox",children:(0,qt.jsx)(Dw,{onChange:f,checked:m.includes(e.id.toString()),name:e.id,color:"primary"})}),u.includes("client_name")&&(0,qt.jsx)(gw,{children:null!==e&&void 0!==e&&e.client_name?(0,qt.jsx)(Lo,{className:"linkClr",children:e.client_name}):(0,qt.jsx)(Cf,{className:"linkClr",children:"NA"})}),u.includes("provider_name")&&(0,qt.jsx)(gw,{children:null!==e&&void 0!==e&&e.provider_name?(0,qt.jsx)(Lo,{className:"linkClr",children:null===e||void 0===e?void 0:e.provider_name}):(0,qt.jsx)(Cf,{className:"linkClr",children:"NA"})}),u.includes("assigned_date")&&(0,qt.jsx)(gw,{children:(0,qt.jsxs)(Lo,{children:[" ",new Date(null===e||void 0===e?void 0:e.assigned_date).toLocaleDateString("en-GB")]})}),u.includes("goal")&&(0,qt.jsx)(gw,{children:(0,qt.jsxs)(Cf,{children:[" ",(null===e||void 0===e?void 0:e.goal)||"N/A"]})}),R(e),u.includes("actions")&&(0,qt.jsx)(gw,{children:Q(e)})]},e.id))}):(0,qt.jsx)(Ff,{item:!0,xs:12,children:(0,qt.jsx)(op,{py:6,bgcolor:"#fff",border:"1px solid rgba(0, 0, 0, 0.12)",borderRadius:"4px",height:"486px",children:(0,qt.jsx)("img",{src:GC,style:{display:"block",margin:"auto",width:"100%",maxWidth:"300px",height:"auto"},alt:"No Data Found"})})})]}),(0,qt.jsx)(KE,{pageDetails:y,fetchListFunction:t}),j,(0,qt.jsx)(IAe,{activeProgram:r,openModal:B,onCloseModal:$,fetchAllPatients:F,order:a,orderBy:s,setOrder:l,setOrderBy:c,dataParameter:d,initialHeadcells:u,onCheck:f,nodata:v,allPatients:z,headCellsItems:p,checkState:m,newHeadCellsItems:W,newFilterState:q,setNewFilterState:Y,fetchAllPatientsListSuggestions:U,allpatientSuggestions:V,addButton:G,newPageDetails:Z,setAllPatients:H,fetchListFunction:!0}),(0,qt.jsx)(OAe,{activeProgram:r,openModal:C,onCloseModal:A,addNewPatient:T,devicesList:o,setSearchDevice:E,states:P,countries:D,fetchStates:N}),(0,qt.jsx)(TE,{open:S,allHeadCells:p,initialHeadcells:u,setHeadcells:h,onClose:k}),(0,qt.jsx)(tTe,{open:se,onClose:le,onAssign:oe,onEdit:ae,patientList:J,assignedProviders:ee,selectedPatient:te,setSelectedPatient:ne,selectedRowData:ue,selectedProvider:re,setSelectedProvider:ie,userList:K,fetchPatientListSuggestions:x})]})}nTe.defaultProps={headCellsItems:[],initialHeadcells:[],setHeadcells:()=>{},pageDetails:{},order:"",orderBy:"",setOrder:()=>{},setOrderBy:()=>{},dataParameter:"",checkState:"",onCheck:()=>{},isSelection:"",nodata:"",patientList:[],devicesList:[],fetchPatientList:()=>{},editButton:()=>{},viewButton:()=>{},deleteButton:()=>{},editProviderButton:()=>{},multiDeletePatient:()=>{},patientCount:{},flag:"",programList:[],setSearchDevice:()=>{},getNonCompliants:()=>{},getPatientVitals:()=>{},getPatientActiveCourse:()=>{},showFilterColor:"",setShowFilterColor:()=>{},filterState:{},setFilterState:()=>{},fetchProgramScheduleList:()=>{},patientCourseCell:()=>{},programSchedule:[],states:[],countries:[],fetchStates:()=>{},patientSuggestions:[],fetchPatientListSuggestions:()=>{},fetchAllPatients:()=>{},handleViewPatientModalToggle:()=>{},allPatients:[],fetchAllPatientsListSuggestions:()=>{},allpatientSuggestions:[],addButton:()=>{},newFilterState:{},setNewFilterState:()=>{},setAllPatients:()=>{},newPageDetails:{},userList:[],setUserParams:()=>{},fetchAssignmentList:()=>{},onProgramChange:()=>{},toggleRoles:()=>{},editListItem:()=>{},assignedProviders:[],selectedPatient:null,setSelectedPatient:()=>{},selectedProvider:null,setSelectedProvider:()=>{},onAssign:()=>{},onEdit:()=>{},assignModalOpen:!1,onCloseAssignmentPopUp:()=>{},openAssignmentPopUp:()=>{},openEditProviderPopUp:()=>{}};const rTe=nTe;function iTe(e){var t,n;let{fetchAssignmentList:r,assignment:o,activeProgram:a,devicesList:s,order:l,orderBy:c,setOrder:d,setOrderBy:u,dataParameter:p,initialHeadcells:h,headCellsItems:m,setHeadcells:f,checkState:g,onCheck:v,isSelection:x,nodata:y,fetchPatientList:b,pageDetails:j,multiDeletePatient:_,moreMenu:C,openFilter:w,patientModalOpen:S,viewMode:A,settingModal:k,handlePatientModalToggle:T,handleSettingModalToggle:E,addNewPatient:M,setSearchDevice:O,filterState:R,setFilterState:P,patientCourseCell:D,states:N,countries:L,fetchStates:I,patientSuggestions:F,fetchPatientListSuggestions:$,fetchAllPatients:B,handleViewPatientModalToggle:z,patientViewModalOpen:H,allPatients:W,setAllPatients:U,newHeadCellsItems:V,fetchAllPatientsListSuggestions:G,allpatientSuggestions:q,addButton:Y,newFilterState:Z,setNewFilterState:K,newPageDetails:X,userList:Q,setUserParams:J,deleteListItem:ee,patientList:te,assignedProviders:ne,selectedPatient:re,setSelectedPatient:ie,selectedProvider:oe,setSelectedProvider:ae,assignModalOpen:se,onAssign:le,onCloseAssignmentPopUp:ce,openAssignmentPopUp:de,onEdit:ue,selectedRowData:pe}=e;const{t:he}=Vg(),me=[{name:he("rpm_RPM"),url:ld.DOCTOR.PROGRAM},{name:null===a||void 0===a?void 0:a.display_name,url:""}],fe=null===o||void 0===o?void 0:o.map(e=>[...e.assignments]);return(0,qt.jsxs)(op,{sx:{width:"100%"},children:[(0,qt.jsxs)(op,{mb:2.5,display:"flex",alignItems:"center",children:[(0,qt.jsx)(BH,{labels:me}),(0,qt.jsx)(Cf,{variant:"h6",gutterBottom:!0,component:"h6",sx:{marginBottom:"0"},children:he("rpm_Patients")})]}),(0,qt.jsx)(op,{sx:{mb:2.5},children:(0,qt.jsxs)(Ff,{container:!0,spacing:2,alignItems:"center",children:[(null===a||void 0===a||null===(t=a.permissions)||void 0===t?void 0:t.showAllPatientListText)&&(0,qt.jsx)(Ff,{item:!0,children:(0,qt.jsx)(Lo,{onClick:z,className:(null===a||void 0===a||null===(n=a.permissions)||void 0===n?void 0:n.showAllPatientListText)&&"patients-tour-step1",children:(0,qt.jsx)(Cf,{color:"customClr.bp",fontWeight:500,component:"span",fontSize:14,children:he("rpm_ViewAllPatient")})})}),(0,qt.jsx)(Ff,{item:!0,children:(0,qt.jsx)(xh,{variant:"contained",color:"primary",onClick:de,children:he("rpm_Assign")||"Assign"})})]})}),(0,qt.jsxs)(Ff,{container:!0,children:[(0,qt.jsx)(Ff,{item:!0,xs:12,children:(0,qt.jsx)(mr,{in:w,children:(0,qt.jsx)(yp,{elevation:0,sx:{p:1},children:(0,qt.jsxs)(Ff,{container:!0,spacing:2,alignItems:"center",children:[(0,qt.jsx)(Ff,{item:!0,xs:12,sm:4,children:(0,qt.jsx)(op,{className:"assigment-filter",children:(0,qt.jsx)(Lue,{pageDetails:j,fetchListFunction:b,filterState:R,setFilterState:P,patientSuggestions:F,fetchPatientListSuggestions:$,placeholder:"Search by name or phone number",helpText:"Enter name of the user"})})}),(0,qt.jsx)(Ff,{item:!0,xs:12,sm:4,children:(0,qt.jsx)(aj,{fullWidth:!0,size:"small",margin:"dense",id:"username",name:"username",options:cs(Q)?[]:Q,isOptionEqualToValue:(e,t)=>e.id===t.id,getOptionLabel:e=>e?"".concat(e.first_name||""," ").concat(e.last_name||"").trim():"",renderOption:(e,t)=>(0,We.createElement)(op,(0,i.A)((0,i.A)({component:"li"},e),{},{key:t.id}),(0,qt.jsx)(Cf,{variant:"body1",component:"p",children:"".concat(t.first_name," ").concat(t.last_name)})),onChange:(e,t)=>{P((0,i.A)((0,i.A)({},R),{},{provider_urn:null===t||void 0===t?void 0:t.urn}))},onInputChange:(e,t)=>{J(t||"")},renderInput:e=>(0,qt.jsx)(Q_,(0,i.A)((0,i.A)({},e),{},{placeholder:he("rpm_SearchProvider")+"..."}))})}),(0,qt.jsxs)(Ff,{item:!0,sm:4,xs:2,justifyContent:"flex-end",children:["list"===A&&(0,qt.jsx)(Ff,{item:!0,textAlign:"right",children:(0,qt.jsx)(sy,{title:he("rpm_TableCellSetting"),children:(0,qt.jsx)(sv,{sx:{boxShadow:"none",width:32,height:32,minHeight:"auto",zIndex:0},size:"small",color:"primary",onClick:E,children:(0,qt.jsx)(YC.A,{fontSize:"small",sx:{width:16,height:16}})})})}),g.length>0&&(0,qt.jsx)(Ff,{item:!0,children:(0,qt.jsx)(sy,{title:he("rpm_Delete"),children:(0,qt.jsx)(wh,{color:"error",sx:{bgcolor:"red.50"},onClick:()=>_(g,{}),children:(0,qt.jsx)(xc,{fontSize:"small",sx:{width:16,height:16}})})})})]})]})})})}),null!==fe&&void 0!==fe&&fe.length?(0,qt.jsx)(UT,{order:l,orderBy:c,setOrder:d,setOrderBy:u,data:null===fe||void 0===fe?void 0:fe.flat(),headCells:m.filter(e=>h.includes(e.id)),dataParameter:p,selected:g,setSelected:v,isSelection:x,noDataImage:y,fetchList:b,pageDetails:j,skeletonVrows:6,className:"theme_scroll",children:((null===fe||void 0===fe?void 0:fe.flat())||[]).map(e=>(0,qt.jsxs)(cw,{hover:!0,sx:{"&:last-child td, &:last-child th":{border:0}},children:[x&&(0,qt.jsx)(gw,{padding:"checkbox",children:(0,qt.jsx)(Dw,{onChange:v,checked:g.includes(e.id.toString()),name:e.id,color:"primary"})}),h.includes("client_name")&&(0,qt.jsx)(gw,{children:null!==e&&void 0!==e&&e.client_name?(0,qt.jsx)(Lo,{className:"linkClr",children:e.client_name}):(0,qt.jsx)(Cf,{className:"linkClr",children:"NA"})}),h.includes("provider_name")&&(0,qt.jsx)(gw,{children:null!==e&&void 0!==e&&e.provider_name?(0,qt.jsx)(Lo,{className:"linkClr",children:null===e||void 0===e?void 0:e.provider_name}):(0,qt.jsx)(Cf,{className:"linkClr",children:"NA"})}),h.includes("assigned_date")&&(0,qt.jsx)(gw,{children:(0,qt.jsxs)(Lo,{children:[" ",new Date(null===e||void 0===e?void 0:e.assigned_date).toLocaleDateString("en-GB")]})}),D(e),h.includes("actions")&&(0,qt.jsx)(gw,{children:ee(e)})]},e.id))}):(0,qt.jsx)(Ff,{item:!0,xs:12,children:(0,qt.jsx)(op,{py:6,bgcolor:"#fff",border:"1px solid rgba(0, 0, 0, 0.12)",borderRadius:"4px",height:"486px",children:(0,qt.jsx)("img",{src:GC,style:{display:"block",margin:"auto",width:"100%",maxWidth:"300px",height:"auto"},alt:"No Data Found"})})})]}),(0,qt.jsx)(KE,{pageDetails:j,fetchListFunction:r}),C,(0,qt.jsx)(IAe,{activeProgram:a,openModal:H,onCloseModal:z,fetchAllPatients:B,order:l,orderBy:c,setOrder:d,setOrderBy:u,dataParameter:p,initialHeadcells:h,onCheck:v,nodata:y,allPatients:W,headCellsItems:m,checkState:g,newHeadCellsItems:V,newFilterState:Z,setNewFilterState:K,fetchAllPatientsListSuggestions:G,allpatientSuggestions:q,addButton:Y,newPageDetails:X}),(0,qt.jsx)(OAe,{activeProgram:a,openModal:S,onCloseModal:T,addNewPatient:M,devicesList:s,setSearchDevice:O,states:N,countries:L,fetchStates:I}),(0,qt.jsx)(TE,{open:k,allHeadCells:m,initialHeadcells:h,setHeadcells:f,onClose:E}),(0,qt.jsx)(tTe,{open:se,onClose:ce,onAssign:le,onEdit:ue,patientList:te,assignedProviders:ne,selectedPatient:re,setSelectedPatient:ie,selectedRowData:pe,selectedProvider:oe,setSelectedProvider:ae,userList:Q,fetchPatientListSuggestions:b})]})}iTe.defaultProps={headCellsItems:[],initialHeadcells:[],setHeadcells:()=>{},pageDetails:{},order:"",orderBy:"",setOrder:()=>{},setOrderBy:()=>{},dataParameter:"",checkState:"",onCheck:()=>{},isSelection:"",nodata:"",patientList:[],devicesList:[],fetchPatientList:()=>{},editButton:()=>{},viewButton:()=>{},deleteButton:()=>{},multiDeletePatient:()=>{},patientCount:{},flag:"",programList:[],setSearchDevice:()=>{},getNonCompliants:()=>{},getPatientVitals:()=>{},getPatientActiveCourse:()=>{},showFilterColor:"",setShowFilterColor:()=>{},filterState:{},setFilterState:()=>{},fetchProgramScheduleList:()=>{},patientCourseCell:()=>{},programSchedule:[],states:[],countries:[],fetchStates:()=>{},patientSuggestions:[],fetchPatientListSuggestions:()=>{},fetchAllPatients:()=>{},handleViewPatientModalToggle:()=>{},allPatients:[],fetchAllPatientsListSuggestions:()=>{},allpatientSuggestions:[],addButton:()=>{},newFilterState:{},setNewFilterState:()=>{},setAllPatients:()=>{},newPageDetails:{},userList:[],setUserParams:()=>{},fetchAssignmentList:()=>{},onProgramChange:()=>{},toggleRoles:()=>{},deleteListItem:()=>{},assignedProviders:[],selectedPatient:null,setSelectedPatient:()=>{},selectedProvider:null,setSelectedProvider:()=>{},onAssign:()=>{},onEdit:()=>{},openAssignmentPopUp:()=>{},onCloseAssignmentPopUp:()=>{},assignModalOpen:!1};const oTe=iTe,aTe=["content"],sTe=["content"];const lTe=function(e){var t,n,r,o,a,s,l,c,d;let{activeProgram:u}=e;const p=window.innerWidth,h=Nt(),m=wt(cu),f=wt(bu),g=!("true"===us(f,"user_principal.attributes.skip_tour[0]","")),{t:v}=Vg(),x=so(),{enqueueSnackbar:y}=hi(),{programList:b}=(0,We.useContext)(DC),{programId:j}=lo(),{query:_}=js(),[C,w]=(We.useRef([]),We.useRef(null),(0,We.useState)("desc")),[S,A]=(0,We.useState)("created_at"),[k,T]=We.useState(null),[E,M]=We.useState(null),[O,R]=We.useState(null),[P,D]=We.useState(null),[N,L]=(0,We.useState)([]),[I,F]=We.useState(""),[$,B]=We.useState(""),[z,H]=We.useState(!1),W=Boolean(P),[U,V]=(0,We.useState)((0,i.A)({},dd)),[G,q]=(0,We.useState)((0,i.A)({},dd)),[Y,Z]=We.useState(null),[K,X]=We.useState(null),[Q,J]=(0,We.useState)({}),[ee,te]=We.useState({open:!1,data:{}}),ne=$o.getPatientTableView(),re=ne.patientTableView?ne.patientTableView:"list",[ie,oe]=We.useState(!0),[ae,se]=We.useState(!1),[le,ce]=We.useState(!1),[de,ue]=We.useState(re),[pe,he]=We.useState(!1),[me,fe]=We.useState([]),[ge,ve]=We.useState("ALL"),[xe,ye]=We.useState(""),[be,je]=We.useState(!1),[_e,Ce]=(0,We.useState)([]),[we,Se]=(0,We.useState)([]),[Ae,ke]=We.useState(null),[Te,Ee]=We.useState({patientName:"",urn:"",provider_urn:""}),[Me,Oe]=We.useState({patientName:"",userMobile:""}),[Re,Pe]=We.useState([]),[De,Ne]=We.useState([]),[Le,Ie]=We.useState(null),[Fe,$e]=We.useState({programName:""}),Be=VC(JA().breakpoints.down("sm")),[ze,He]=(0,We.useState)(null),[Ue,Ve]=We.useState([]),[Ge,qe]=We.useState({}),Ye=["client_name","provider_name","assigned_date","actions","goal"],[Ze,Ke]=We.useState(null),[Xe,Qe]=We.useState(null),[Je,et]=We.useState(null),[tt,nt]=We.useState(!1),[rt,it]=(0,We.useState)(new Map),ot=async function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{q:""};await h(hue(e,t,"RPM",e=>{let{states:t}=e;Ce(t.content)},()=>{}))},at=[{id:"client_name",label:v("rpm_ClientName"),isSort:!0,sortProperty:"client_name"},{id:"provider_name",label:v("rpm_ProviderName"),isSort:!0,sortProperty:"provider_name"},{id:"assigned_date",label:v("rpm_AssignedDate"),isSort:!0,sortProperty:"assigned_date"},{id:"actions",label:v("rpm_Actions"),isSort:!1,sortProperty:"actions"}],st=[{id:"client_name",label:v("rpm_ClientName"),isSort:!0,sortProperty:"client_name"},{id:"provider_name",label:v("rpm_ProviderName"),isSort:!0,sortProperty:"provider_name"},{id:"assigned_date",label:v("rpm_AssignedDate"),isSort:!0,sortProperty:"assigned_date"},{id:"goal",label:v("goal"),isSort:!1,sortProperty:"goal"},{id:"actions",label:v("rpm_Actions"),isSort:!1,sortProperty:"actions"}],lt=()=>{H(!z)},[ct,dt]=We.useState(ta()($o.getAssignmentCells())?Ye:$o.getAssignmentCells()),ut=function(e){dt(e),$o.setAssignmentCells(e)},pt=e=>{if(Array.isArray(e))return L(e.map(e=>e.toString()));const t=e.target.name;N.includes(t)?L(N.filter(e=>e!==t)):L(e=>[...e,t])},ht=e=>{const t=e.currentTarget.attributes["data-id"].value,n=e.currentTarget.attributes["data-name"].value,r=e.currentTarget.attributes["data-lname"].value,i=e.currentTarget.attributes["data-tenant"].value;D({id:t,first_name:n,last_name:r,tenantId:i,position:e.currentTarget})},mt=()=>{D({})},ft=e=>{ee.open,te((0,i.A)((0,i.A)({},ee),{},{open:!ee.open,data:e}))},gt=e=>(0,qt.jsxs)(pE,{direction:"row",spacing:2,children:[(0,qt.jsx)(xh,{color:"primary",variant:"contained",disableElevation:!0,startIcon:(0,qt.jsx)(fc,{}),onClick:()=>jt(e),children:v("rpm_EditProvider")}),(0,qt.jsx)(xh,{color:"error",variant:"contained",disableElevation:!0,startIcon:(0,qt.jsx)(tK.A,{}),onClick:()=>{vt("UNASSIGN",e)},children:v("rpm_Unassign")})]}),vt=async(e,t)=>{let n={};var r,i;"ASSIGN"==e?n={patient_urn:null===Ze||void 0===Ze?void 0:Ze.urn,program_urn:null===u||void 0===u?void 0:u.urn,provider_urn:null===Xe||void 0===Xe?void 0:Xe.urn,key:e}:n={patient_urn:null!==t&&void 0!==t&&t.client_urn?null===t||void 0===t?void 0:t.client_urn:null===t||void 0===t||null===(r=t.data)||void 0===r?void 0:r.client_urn,program_urn:null===u||void 0===u?void 0:u.urn,provider_urn:null!==t&&void 0!==t&&t.provider_urn?null===t||void 0===t?void 0:t.provider_urn:null===t||void 0===t||null===(i=t.data)||void 0===i?void 0:i.provider_urn,key:"UNASSIGN"};let o=!0;for(const[u,p]of rt){var a;if(u===(null===(a=n)||void 0===a?void 0:a.provider_urn)){var s;const e=p.indexOf(null===(s=n)||void 0===s?void 0:s.patient_urn);if(-1!==e){var l;if("ASSIGN"===(null===(l=n)||void 0===l?void 0:l.key))return h(Zo({subTitle:"Client is already assigned",severity:ud.ERROR})),void(o=!1);p.splice(e,1),o=!0}else{var c;p.push(null===(c=n)||void 0===c?void 0:c.patient_urn),o=!0}}}if(rt.has(n.provider_urn)||rt.set(n.provider_urn,[n.patient_urn]),o)try{const{data:e}=await h(cl(n));ta()(e)||h(Zo({subTitle:v("rpm_providerAssignSuccess"),severity:ud.SUCCESS})),_t(),te({open:!1}),Ke(null),Qe(null)}catch(d){const e=us(d,"response.data.code","");ta()(e)?h(Zo({subTitle:"error:rpm_providerAssignFailed",severity:ud.ERROR})):h(Zo({subTitle:Vd(e,"error:rpm_providerAssignFailed"),severity:ud.ERROR}))}},xt=async()=>{const{provider_urn:e,assignment_id:t,client_urn:n}=Je||{};let r=e;const i=(null===Xe||void 0===Xe?void 0:Xe.urn)||"";if(r===i)return void h(Zo({subTitle:"Client is already assigned to this provider",severity:ud.ERROR}));if((rt.get(i)||[]).includes(n))return void h(Zo({subTitle:"Client is already assigned to selected provider",severity:ud.ERROR}));const o={client_urn:n,assignment_id:t,provider_urn:i};try{const{data:e}=await h((e=>async t=>{t(na(!0));try{const t="".concat(ca.provider,"?assignmentId=").concat(null===e||void 0===e?void 0:e.assignment_id,"&providerUrn=").concat(null===e||void 0===e?void 0:e.provider_urn);return await $u(t,{})}catch(n){return n}finally{t(na(!1))}})(o));ta()(e)||h(Zo({subTitle:v("rpm_providerAssignSuccess"),severity:ud.SUCCESS})),_t(),te({open:!1}),Ke(null),Qe(null)}catch(a){const e=us(a,"response.data.code","");h(Zo({subTitle:ta()(e)?"error:rpm_providerEditFailed":Vd(e,"error:rpm_providerEditFailed"),severity:ud.ERROR}))}},yt=()=>{nt(!1),Ke(null),Qe(null),et(null)},bt=()=>{nt(!0)},jt=e=>{et(e),nt(!0)},_t=async()=>{let e=[{key:"PATIENT_URN",value:Te.urn?Te.urn:""},{key:"PROVIDER_URN",value:Te.provider_urn?Te.provider_urn:""},{key:"PROGRAM_URN",value:null!==u&&void 0!==u&&u.urn?null===u||void 0===u?void 0:u.urn:""}];try{const{data:t}=await h((e=>async t=>{t(na(!0));try{const t="".concat(ca.provider,"/list?page=").concat(e.current_page||"","&perPage=").concat(e.per_page||"");return await Fu(t,{filters:[...e.filter]})}catch(n){return n}finally{t(na(!1))}})((0,i.A)((0,i.A)({},U),{},{filter:Ct(e)}))),{content:n}=t,r=Ko(t,sTe);V(e=>(0,i.A)((0,i.A)({},e),{},{last_page:r.last_page,current_page:r.current_page,from:r.from,per_page:r.per_page,to:r.to,total:r.total}));const o=null===n||void 0===n?void 0:n.map(e=>[...e.assignments]),a=new Map;o.flat().forEach(e=>{a.has(e.provider_urn)||a.set(e.provider_urn,[]),a.get(e.provider_urn).push(e.client_urn)}),rt.clear(),it(new Map(a)),Z(n)}catch(t){return t}},Ct=e=>e.filter(e=>!("PATIENT_URN"===e.key&&!Te.urn)&&!("PROVIDER_URN"===e.key&&!Te.provider_urn));var St;We.useEffect(()=>{u&&((async()=>{const e={programUrn:null===u||void 0===u?void 0:u.urn};try{const{data:t}=await h(ll(e));Ve(t)}catch(t){const e=us(t,"response.data.code","");ta()(e)?h(Zo({subTitle:"error:rpm_FetchUsersFailed",severity:ud.ERROR})):h(Zo({subTitle:Vd(e,"error:rpm_FetchUsersFailed"),severity:ud.ERROR}))}})(),_t())},[m,u,Te.urn,Te.provider_urn,U.current_page]),We.useEffect(()=>{!async function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t={},n=(0,i.A)((0,i.A)({q:e},U),{},{sort_by:S,sort_order:C});t=(0,i.A)((0,i.A)({},n),{},{programId:null===u||void 0===u?void 0:u.code});try{const{data:e}=await h(Zg(t)),n=e||{},{content:r}=n;Ko(n,aTe),ke(r)}catch(r){const e=us(r,"response.data.code","");ta()(e)?h(Zo({subTitle:"error:rpm_FetchUsersFailed",severity:ud.ERROR})):h(Zo({subTitle:Vd(e,"error:rpm_FetchUsersFailed"),severity:ud.ERROR}))}}($||"")},[$,m,u,Te.urn,Te.provider_urn,U.current_page]),St=Re,We.Fragment,ct.includes("client_name")&&(ta()(St)||St.map((e,t)=>{var n;return null===e||void 0===e||null===(n=e.assignments)||void 0===n?void 0:n.map((e,n)=>(0,qt.jsx)(Cf,{variant:"body2",mt:.5,children:(null===e||void 0===e?void 0:e.client_name)||"NA"},"".concat(t,"-").concat(n)))})),ct.includes("provider_name")&&(ta()(St)||St.map((e,t)=>{var n;return null===e||void 0===e||null===(n=e.assignments)||void 0===n?void 0:n.map((e,n)=>{var r;return(0,qt.jsx)(Cf,{variant:"body2",mt:.5,children:(null===e||void 0===e||null===(r=e.provider_name)||void 0===r?void 0:r.trim())||"NA"},"".concat(t,"-").concat(n))})})),ct.includes("assigned_date")&&(ta()(St)||St.map((e,t)=>{var n;return null===e||void 0===e||null===(n=e.assignments)||void 0===n?void 0:n.map((e,n)=>(0,qt.jsx)(op,{mt:.5,children:null!==e&&void 0!==e&&e.assigned_date?new Date(e.assigned_date).toLocaleString():"NA"},"".concat(t,"-").concat(n)))}));const At=async e=>{try{const{data:t}=await h(al((0,i.A)((0,i.A)({sort_by:S,sort_order:C},U),{},{filterState:e,program_code:null===u||void 0===u?void 0:u.code}))),{content:n}=t||{},r=e=>{const t=null===n||void 0===n?void 0:n.map(t=>(0,i.A)((0,i.A)({},t),{},{course_info:ta()(e[t.id])?[]:e[t.id]})),r=null===t||void 0===t?void 0:t.map(e=>(0,i.A)((0,i.A)({},e),{},{course_name:e.course_info.map(e=>e.course_name),course_vital:e.course_info.map(e=>e.vital_name),course_status:e.course_info.map(e=>e.status)}));T(r)};await Tt(n,r)}catch(t){return t}},kt=async e=>{if(null!==e&&void 0!==e&&e.patientName){if(null!==e&&void 0!==e&&e.patientName.trim())try{const{data:t}=await h(al((0,i.A)((0,i.A)({sort_by:S,sort_order:C,filterState:e,program_code:null===u||void 0===u?void 0:u.code},U),{},{current_page:1}))),{content:n}=t||{};M(n)}catch(t){return t}}else M([]),At()},Tt=async(e,t)=>{const n=null===e||void 0===e?void 0:e.map(e=>e.id);try{const{data:e}=await h(ul({patientIds:n,programCode:null===u||void 0===u?void 0:u.code}));J(e),t(e)}catch(r){return r}},Et=()=>{ae?(Se([]),Ce([]),se(!ae)):Ot()},Mt=()=>{ce(!le)},Ot=async()=>{await h(uue(U,"RPM",e=>{let{countries:t,states:n}=e;Se(t.content),Ce(n.content),se(!ae)},()=>{}))},Rt=()=>{he(!pe)},Pt=()=>{oe(!ie)},Dt=(e,t)=>{var n;return(null===(n=e.alerts)||void 0===n?void 0:n.findIndex(e=>e.data_name===t))>=0},Lt=async(e,t)=>{let{setErrors:n}=t;const r=(0,i.A)((0,i.A)({},e),{},{profile:{gender:null!==e&&void 0!==e&&e.gender?null===e||void 0===e?void 0:e.gender:"",adr_country_name:null!==e&&void 0!==e&&e.country?null===e||void 0===e?void 0:e.country:"",adr_state_name:null!==e&&void 0!==e&&e.state?null===e||void 0===e?void 0:e.state:"",adr_city:null!==e&&void 0!==e&&e.city?null===e||void 0===e?void 0:e.city:"",adr_address1:null!==e&&void 0!==e&&e.address?null===e||void 0===e?void 0:e.address:""},mobile:null!==e&&void 0!==e&&e.mobile?"".concat(null===e||void 0===e?void 0:e.country_code).concat(null===e||void 0===e?void 0:e.mobile):""});try{const{data:e}=await h(ol(null===u||void 0===u?void 0:u.code,r));h(Zo({subTitle:"message:rpm_PatientCreatedSuccessfully",severity:ud.SUCCESS})),x("".concat(null===e||void 0===e?void 0:e.id,"/courses")),At(),se(!1)}catch(o){const e=us(o,"response.data.field_errors",{}),t=us(o,"response.data.code","");ta()(e)?ta()(t)?h(Zo({subTitle:"error:rpm_patient_not_created",severity:ud.ERROR})):h(Zo({subTitle:Vd(t,"error:rpm_err_mobile_number_already_exist"),severity:ud.ERROR})):n(Ud(e))}},It=e=>(0,qt.jsx)(sy,{title:v("rpm_Edit"),children:(0,qt.jsx)(wh,{"data-id":e.id,color:"primary",onClick:()=>console.log(e),children:(0,qt.jsx)(fc,{fontSize:"small",sx:{width:16,height:16}})})}),Ft=e=>(0,qt.jsx)(sy,{title:v("rpm_view"),children:(0,qt.jsx)(wh,{"data-id":e.id,color:"primary",onClick:()=>x("".concat(e.id,"/dashboard")),children:(0,qt.jsx)(gc,{fontSize:"small",sx:{width:16,height:16}})})}),$t=e=>(0,qt.jsx)(wh,{"data-id":e.id,color:"error",disabled:!0,children:(0,qt.jsx)(xc,{fontSize:"small",sx:{width:16,height:16}})}),Bt=e=>{var t;return(0,qt.jsx)(sy,{title:v("rpm_MoreOption"),children:(0,qt.jsx)(wh,{"data-id":e.id,"data-name":e.first_name,"data-lname":e.last_name,"data-tenant":e.tenant_id,onClick:ht,size:"small","aria-controls":W?"account-menu":void 0,"aria-haspopup":"true","aria-expanded":W?"true":void 0,color:"primary",disabled:!(null!==u&&void 0!==u&&null!==(t=u.permissions)&&void 0!==t&&t.showViewPatientBtn),children:(0,qt.jsx)(up.A,{})})})},zt=(0,qt.jsxs)(tf,{id:"account-menu",anchorEl:ta()(P)?null:P.position,open:!ta()(P),onClose:mt,PaperProps:{elevation:0,sx:{overflow:"visible",filter:"drop-shadow(0px 2px 8px rgba(0,0,0,0.32))",mt:1.5,width:"200px","& .MuiAvatar-root":{width:32,height:32,ml:-.5,mr:1},"&:before":{content:'""',display:"block",position:"absolute",top:0,right:14,width:10,height:10,bgcolor:"background.paper",transform:"translateY(-50%) rotate(45deg)",zIndex:0},"& .MuiMenuItem-root":{fontSize:"0.875rem",py:1.5}}},transformOrigin:{horizontal:"right",vertical:"top"},anchorOrigin:{horizontal:"right",vertical:"bottom"},children:[(null===u||void 0===u||null===(t=u.permissions)||void 0===t?void 0:t.showViewPatientBtn)&&(e=>(0,qt.jsxs)(mf,{sx:{fontWeight:"500"},onClick:()=>x("".concat(e.id,"/dashboard")),children:[(0,qt.jsx)(gv,{children:(0,qt.jsx)(oc,{fontSize:"small",color:"primary"})}),v("rpm_medicalCharts")]}))(P),(null===u||void 0===u||null===(n=u.permissions)||void 0===n?void 0:n.showMedicalHistoryList)&&(e=>(0,qt.jsxs)(mf,{sx:{fontWeight:"500"},onClick:()=>x("".concat(e.id,"/history")),children:[(0,qt.jsx)(gv,{children:(0,qt.jsx)(ac,{fontSize:"small",color:"primary"})}),v("rpm_medicalHistory")]}))(P),(null===u||void 0===u||null===(r=u.permissions)||void 0===r?void 0:r.showCourseList)&&(e=>(0,qt.jsxs)(mf,{sx:{fontWeight:"500"},onClick:()=>x("".concat(e.id,"/courses")),children:[(0,qt.jsx)(gv,{children:(0,qt.jsx)(rc,{fontSize:"small",color:"primary"})}),v("rpm_patientCourses")]}))(P),(null===u||void 0===u||null===(o=u.permissions)||void 0===o?void 0:o.showPatientRuleList)&&(e=>(0,qt.jsxs)(mf,{sx:{fontWeight:"500"},onClick:()=>x("".concat(e.id,"/rules")),children:[(0,qt.jsx)(gv,{children:(0,qt.jsx)(cc,{fontSize:"small",color:"primary"})}),v("rpm_patientRules")]}))(P),(null===u||void 0===u||null===(a=u.permissions)||void 0===a?void 0:a.showPrescriptionNoteList_showNoteList)&&(e=>(0,qt.jsxs)(mf,{sx:{fontWeight:"500"},onClick:()=>x("".concat(e.id,"/notes/doctor-note")),children:[(0,qt.jsx)(gv,{children:(0,qt.jsx)(lc,{fontSize:"small",color:"primary"})}),v("rpm_Notes")]}))(P),(null===u||void 0===u||null===(s=u.permissions)||void 0===s?void 0:s.showViewPatientBtn)&&(e=>(0,qt.jsxs)(mf,{sx:{fontWeight:"500"},onClick:()=>x("".concat(e.id,"/details")),children:[(0,qt.jsx)(gv,{children:(0,qt.jsx)(sc,{fontSize:"small",color:"primary"})}),v("rpm_personalDetails")]}))(P),(null===u||void 0===u||null===(l=u.permissions)||void 0===l?void 0:l.isAdmin)&&(0,qt.jsxs)(mf,{sx:{fontWeight:"500"},onClick:()=>H(!z),children:[(0,qt.jsx)(gv,{sx:{pl:"5px"},children:(0,qt.jsx)(Ic,{fontSize:"small",color:"primary"})}),v("rpm_TransferProgram")]}),(null===u||void 0===u||null===(c=u.permissions)||void 0===c?void 0:c.showDeletePatientBtn)&&gt(P)]}),Ht=async function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:Te;const t=(0,i.A)({sort_by:S,sort_order:C},U);try{const{data:n}=await h(tbe(null===u||void 0===u?void 0:u.code,t,e)),{content:r}=n||{};fe(r)}catch(n){}};return We.useEffect(()=>{ut(Ye)},[Be]),We.useEffect(()=>{!m||ta()(u)||_||At()},[m,C,S,u]),We.useEffect(()=>{m&&!ta()(u)&&Ht()},[m,u]),We.useEffect(()=>{h(NC({activeMenuItem:"assignments"}))},[u]),ta()(u)?(0,qt.jsx)(yp,{variant:"outlined",sx:{px:2.5,py:6,display:"flex",height:"320px"},children:(0,qt.jsx)(op,{alignSelf:"center",sx:{mx:"auto"},children:(0,qt.jsx)(MM,{color:"primary"})})}):(0,qt.jsxs)(qt.Fragment,{children:[ta()(u)||null!==u&&void 0!==u&&null!==(d=u.permissions)&&void 0!==d&&d.showPatientList?p>=575?(0,qt.jsx)(rTe,{fetchAssignmentList:_t,assignment:Y,userData:null===u||void 0===u?void 0:u.permissions,programList:b,activeProgram:u,devicesList:O,patientList:k,order:C,orderBy:S,setOrder:w,setOrderBy:A,initialHeadcells:ct,setHeadcells:ut,headCellsItems:st,dataParameter:"id",checkState:N,onCheck:pt,isSelection:!1,nodata:GC,fetchPatientList:At,pageDetails:U,editButton:It,viewButton:Ft,deleteButton:$t,moreOptions:Bt,moreMenu:zt,patientModalOpen:ae,settingModal:pe,openFilter:ie,viewMode:de,handlePatientModalToggle:Et,handleViewPatientModalToggle:Mt,handleSettingModalToggle:Rt,handleOpenFilter:Pt,getReadingColor:Dt,addNewPatient:Lt,flag:ge,setSearchDevice:ye,showFilterColor:be,setShowFilterColor:je,filterState:Te,setFilterState:Ee,programSchedule:me,fetchProgramScheduleList:Ht,patientAllVitals:Q,states:_e,countries:we,fetchStates:ot,fetchPatientListSuggestions:kt,patientSuggestions:E,patientViewModalOpen:le,allPatients:De,setAllPatients:Ne,newHeadCellsItems:at,allpatientSuggestions:K,newFilterState:Me,setNewFilterState:Oe,newPageDetails:G,userList:Ae,setUserParams:B,toggleRoles:ft,editListItem:gt,assignedProviders:Ue,selectedPatient:Ze,setSelectedPatient:Ke,selectedProvider:Xe,setSelectedProvider:Qe,onAssign:vt,onEdit:xt,assignModalOpen:tt,onCloseAssignmentPopUp:yt,openAssignmentPopUp:bt,openEditProviderPopUp:jt,selectedRowData:Je}):(0,qt.jsx)(oTe,{fetchAssignmentList:_t,assignment:Y,userData:null===u||void 0===u?void 0:u.permissions,programList:b,activeProgram:u,devicesList:O,patientList:k,order:C,orderBy:S,setOrder:w,setOrderBy:A,initialHeadcells:ct,setHeadcells:ut,headCellsItems:st,dataParameter:"id",checkState:N,onCheck:pt,isSelection:!1,nodata:GC,fetchPatientList:At,pageDetails:U,editButton:It,viewButton:Ft,deleteButton:$t,moreOptions:Bt,moreMenu:zt,patientModalOpen:ae,settingModal:pe,openFilter:ie,viewMode:de,handlePatientModalToggle:Et,handleViewPatientModalToggle:Mt,handleSettingModalToggle:Rt,handleOpenFilter:Pt,getReadingColor:Dt,addNewPatient:Lt,flag:ge,setSearchDevice:ye,showFilterColor:be,setShowFilterColor:je,filterState:Te,setFilterState:Ee,programSchedule:me,fetchProgramScheduleList:Ht,patientAllVitals:Q,states:_e,countries:we,fetchStates:ot,fetchPatientListSuggestions:kt,patientSuggestions:E,patientViewModalOpen:le,allPatients:De,setAllPatients:Ne,newHeadCellsItems:at,fetchAllPatientsListSuggestions:async e=>{const t=(0,i.A)((0,i.A)({sort_by:S,sort_order:C,newFilterState:e,program_code:null===u||void 0===u?void 0:u.code},G),{},{current_page:1});if(e.patientName){if(null!==e&&void 0!==e&&e.patientName.trim())try{const{data:e}=await h(sl(j,t)),{content:n}=e||{};X(n)}catch(n){}}else X([])},allpatientSuggestions:K,newFilterState:Me,setNewFilterState:Oe,newPageDetails:G,userList:Ae,setUserParams:B,toggleRoles:ft,editListItem:gt,assignedProviders:Ue,selectedPatient:Ze,setSelectedPatient:Ke,selectedProvider:Xe,setSelectedProvider:Qe,assignModalOpen:tt,onAssign:vt,onEdit:xt,openAssignmentPopUp:bt,openEditProviderPopUp:jt,onCloseAssignmentPopUp:yt,selectedRowData:Je}):(0,qt.jsx)(LC,{}),(0,qt.jsx)(qV,{openModal:ee.open,onCloseModal:ft,actionFunction:()=>vt("UNASSIGN",ee),dataName:"",options:{primaryText:v("message:rpm_UnassignTitle"),secondaryText:v("message:rpm_UnassignBody"),btn:{primaryText:v("rpm_Unassign"),secondaryText:v("rpm_Cancel"),primaryColor:"error",secondaryColor:"primary"},btnSwap:!0}}),(0,qt.jsx)(WAe,{openModal:z,onCloseModal:lt,patientInfo:P,activeProgram:u,allPrograms:Re,setTransferProgram:Ie,transferPatient:async e=>{try{await h(Xl(u,Le,e)),h(Zo({subTitle:"message:rpm_PatientTransferedSuccessfully",severity:ud.SUCCESS})),lt(),mt(),At()}catch(t){const e=us(t,"response.data.code","");ta()(e)?h(Zo({subTitle:"error:rpm_PatientTransferFailed",severity:ud.ERROR})):h(Zo({subTitle:Vd(e,"error:rpm_PatientTransferFailed"),severity:ud.ERROR}))}},disabledButton:!Le,setSearchProgram:$e}),(0,qt.jsx)(zZ,{isTour:g,path:"allPatientsTour",setRenderer:F}),(0,qt.jsx)("input",{type:"hidden",id:"rerenderer",value:I})]})};const cTe=function(){const e=Nt(),t=lo(),n=wt(cu),r=wt(ju),{userData:i}=(0,We.useContext)(lv),[o,a]=We.useState(null);return We.useEffect(()=>{!n||cs(r)||cs(t)||(async()=>{const e=null===r||void 0===r?void 0:r.find(e=>e.code===t.programId);a(e)})()},[n,r,window.location.pathname]),We.useEffect(()=>{const t={sideBar:!0,listItems:FC(i).concat(BC(null===o||void 0===o?void 0:o.permissions,o)),heading:{name:null===o||void 0===o?void 0:o.display_name,city:null===o||void 0===o?void 0:o.city},activeProgram:o};e(NC(t))},[i,o]),(0,qt.jsxs)(ko,{children:[(0,qt.jsx)(So,{path:"dashboard",element:(0,qt.jsx)(xAe,{activeProgram:o})}),(0,qt.jsx)(So,{path:"patientstatus",element:(0,qt.jsx)(bAe,{activeProgram:o})}),(0,qt.jsx)(So,{path:"patients",element:(0,qt.jsx)(ZAe,{activeProgram:o})}),(0,qt.jsx)(So,{path:"/assignments",element:(0,qt.jsx)(lTe,{activeProgram:o})}),(0,qt.jsx)(So,{path:"providers/:patientId",element:(0,qt.jsx)(Jke,{activeProgram:o})}),(0,qt.jsx)(So,{path:"rules",element:(0,qt.jsx)(zke,{activeProgram:o})}),(0,qt.jsx)(So,{path:"rules/:ruleId",element:(0,qt.jsx)(jke,{activeProgram:o})}),(0,qt.jsx)(So,{path:"templates",element:(0,qt.jsx)(wSe,{activeProgram:o})}),(0,qt.jsx)(So,{path:"templates/:templateId",element:(0,qt.jsx)(QAe,{activeProgram:o})}),(0,qt.jsx)(So,{path:"templates/add-template",element:(0,qt.jsx)(OSe,{activeProgram:o})}),(0,qt.jsx)(So,{path:"templates/edit-template/:templateId",element:(0,qt.jsx)(OSe,{activeProgram:o})}),(0,qt.jsx)(So,{path:"rules/:ruleId/new",element:(0,qt.jsx)(Nke,{activeProgram:o})}),(0,qt.jsx)(So,{path:"course",element:(0,qt.jsx)(FSe,{activeProgram:o})}),(0,qt.jsx)(So,{path:"course/add",element:(0,qt.jsx)(iAe,{activeProgram:o})}),(0,qt.jsx)(So,{path:"course/:scheduleId/:edit",element:(0,qt.jsx)(iAe,{activeProgram:o})}),(0,qt.jsx)(So,{path:"course/:scheduleId/mandate/:type",element:(0,qt.jsx)(iAe,{activeProgram:o})}),(0,qt.jsx)(So,{path:"course/:scheduleId",element:(0,qt.jsx)(QSe,{activeProgram:o})}),(0,qt.jsx)(So,{path:"/followups",element:(0,qt.jsx)(TAe,{activeProgram:o})}),(0,qt.jsx)(So,{path:"/programsettings",element:(0,qt.jsx)(hke,{activeProgram:o})}),(0,qt.jsx)(So,{path:"/notifications",element:(0,qt.jsx)(CAe,{activeProgram:o})}),(0,qt.jsx)(So,{path:"/consultation-templates",element:(0,qt.jsx)(Zke,{activeProgram:o})})]})};const dTe=function(){return(0,qt.jsx)(qt.Fragment,{children:(0,qt.jsxs)(ko,{children:[(0,qt.jsx)(So,{path:"/program/:programId/*",element:(0,qt.jsx)(cTe,{})}),(0,qt.jsx)(So,{path:"/*",element:(0,qt.jsx)(_ye,{})}),(0,qt.jsx)(So,{path:"/program/:programId/patients/:patientId/*",element:(0,qt.jsx)(xSe,{})})]})})},uTe=["content"];const pTe=function(){const e=Nt(),t=wt(du),n=wt(pu),{enqueueSnackbar:r}=hi(),{t:o}=Vg(),{userData:a}=(0,We.useContext)(lv),s=wt(cu),[l,c]=We.useState(null),[d,u]=We.useState(null),[p,h]=We.useState({open:!1,data:""}),[m,f]=We.useState((0,i.A)({},dd)),g=e=>{let t=[];return null===e||void 0===e||e.forEach(e=>{t.push((0,i.A)((0,i.A)({},e),{},{permissions:Gd(a,e.code)}))}),t},v=async t=>{try{const{data:n}=await e(Ws(m,t)),r=n||{},{content:o}=r,a=Ko(r,uTe);c(o),f(e=>(0,i.A)((0,i.A)({},e),{},{last_page:a.last_page,current_page:a.current_page,from:a.from,per_page:a.per_page,to:a.to,total:a.total}))}catch(n){console.log(n)}},x=async()=>{try{const{data:t}=await e(async e=>{e(na(!0));try{const e="".concat(la.program,"/list"),t=await Iu(e,{});return oa()(t,"data.content",[]).forEach(e=>Bs(e)),t}catch(t){return t}finally{e(na(!1))}});u(t)}catch(t){console.log(t)}};return We.useEffect(()=>{cs(l)||cs(a)||g(l)},[l,a]),We.useEffect(()=>{cs(d)||cs(a)||e({type:Yo,payload:g(d)})},[d,a]),We.useEffect(()=>{s&&(v(),x())},[s]),We.useEffect(()=>{cs(n)||r(o(n.subTitle),{variant:n.severity})},[n]),(0,qt.jsx)(qt.Fragment,{children:(0,qt.jsxs)(DC.Provider,{value:{programList:g(l),programFetch:v,programPage:m,allProgramFetch:x},children:[(0,qt.jsxs)(op,{sx:{display:"flex",minHeight:"100%"},children:[(0,qt.jsx)(OC,{headerData:t}),(0,qt.jsxs)(op,{component:"main",sx:{flexGrow:1,padding:"20px 15px",maxWidth:"100%",bgcolor:"grey.100",overflow:"auto",height:"100vh"},className:"MobileHidden",children:[(null===t||void 0===t?void 0:t.headerBar)&&(0,qt.jsx)(TC,{}),(0,qt.jsx)(dTe,{})]})]}),(0,qt.jsx)(PC,{open:null===p||void 0===p?void 0:p.open,link:null===p||void 0===p?void 0:p.data,onClose:()=>h({open:!1,data:""})})]})})};const hTe=function(){return(0,qt.jsxs)(ko,{children:[(0,qt.jsx)(So,{path:"/",element:(0,qt.jsx)(wo,{to:"/login"}),replace:!0}),(0,qt.jsx)(So,{path:"/login",element:(0,qt.jsx)(Gu,{})}),(0,qt.jsx)(So,{path:"/legal/*",element:(0,qt.jsx)(Ig,{})}),(0,qt.jsx)(So,{path:"/rpm/*",element:(0,qt.jsx)(pTe,{})}),(0,qt.jsx)(So,{path:"/notfound",element:(0,qt.jsx)(Gg,{})}),(0,qt.jsx)(So,{path:"*",element:(0,qt.jsx)(wo,{to:"/notfound"})})]})};const mTe=class{constructor(e,t,n){var r=this;this.setAuthTokenFromLocalStorage=async()=>{if(this.isUnauthRouteLogin())return;const e=this.getTokenFromUrl();if(e){const t=this.getAccountDataFromToken(e);this.setBasics({accessToken:e.accessToken,accountId:t.accountId,refreshToken:t.refreshToken,expiresIn:e.expiresIn,userName:t.userName,tokenType:t.tokenType}),this.refreshTokenHandler(!0,e.expiresIn)}else this.refreshTokenHandler();this.setStorageListner()},this.tokenLoop=null,this.refreshTokenHandler=async function(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:600;try{if(e)r.tokenLoop=setTimeout(r.refreshTokenHandler,1e3*parseInt(t)-2e4);else{const{refreshToken:e,accountId:t,userName:n,tokenType:i}=JSON.parse(localStorage.getItem("auth_data"))||{};if(!e)throw new Error;const o={method:"POST",headers:{"Content-Type":"application/json"},body:""},a="".concat(r.baseUrl,"/authgateway/api/token?grant_type=refresh_token&client_id=").concat(t,"&refresh_token=").concat(e),s=await fetch(a,o),l=await s.json();r.setBasics({accessToken:l.access_token,accountId:t,userName:n,tokenType:i,refreshToken:l.refresh_token,expiresIn:l.expires_in}),r.tokenLoop=setTimeout(r.refreshTokenHandler,1e3*parseInt(l.expires_in)-2e4)}}catch(n){r.store.dispatch(Au()),clearTimeout(r.tokenLoop),console.log(n),window.location.pathname.includes("login")||(window.location="/login")}},this.mapAuth=e=>({accessToken:e.accessToken,refreshToken:e.refreshToken,tokenType:e.tokenType,accountId:e.accountId,userName:e.userName}),this.setBasics=e=>{this.setAxiosBase({Authorization:"Bearer ".concat(e.accessToken),"X-Cw-Tenant-Id":e.accountId});const t=this.mapAuth(e);localStorage.setItem("auth_data",JSON.stringify(t)),this.loginAction(t)(this.store.dispatch)},this.isUnauthRouteLogin=function(){return"/"===window.location.pathname||window.location.pathname.includes("forgotpassword")||window.location.pathname.includes("passwordreset")||window.location.pathname.includes("legal")},this.getAccountDataFromToken=e=>{const t=Aa(e.accessToken);return{refreshToken:e.refreshToken,accountId:t.iss,tokenType:t.typ,userName:t.sub}},this.getTokenFromUrl=()=>{const e=location.hash.substr(1);if(!e)return;let t=e.split("&");return!t[0]||t[0].includes("error")?"":{accessToken:t[0].split("=")[1],expiresIn:t[1].split("=")[1],refreshToken:t[2].split("=")[1]}},this.setStorageListner=()=>{window.addEventListener("storage",e=>{if("auth_data"!==e.key)return;const t=JSON.parse(e.newValue);if(null===t||void 0===t||!t.accessToken)return void(window.location.pathname.includes("login")||(this.logout(),window.location="/login"));this.setAxiosBase({Authorization:"Bearer ".concat(t.accessToken),"X-CW-Tenant-Id":t.accountId});const n=this.mapAuth(t);this.store.dispatch(this.loginAction(n))})},this.loginAction=e=>t=>t({type:"LOGIN",data:e}),this.setAxiosBase=e,this.store=t,this.baseUrl=n}};n(51627);function fTe(e){return function(t){var n=t.dispatch,r=t.getState;return function(t){return function(i){return"function"===typeof i?i(n,r,e):t(i)}}}}var gTe=fTe();gTe.withExtraArgument=fTe;const vTe=gTe,xTe={isLoggedIn:!1};const yTe=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:xTe,t=arguments.length>1?arguments[1]:void 0;switch(t.type){case _u:return(0,i.A)((0,i.A)({},e),{},{isLoggedIn:!0},t.data);case"REFRESH":return(0,i.A)((0,i.A)({},e),{},{isLoggedIn:!0});case Cu:return{isLoggedIn:!1};case"FORGOTPASSWORD":return(0,i.A)((0,i.A)({},e),{},{isLoggedIn:!1});default:return e}},bTe={token:localStorage.getItem("managementToken"),refresh:localStorage.getItem("managementRefreshToken"),isAuthenticated:null,isLoading:!0,user:null};const jTe={},_Te={auth:yTe,services:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1?arguments[1]:void 0;return"SERVICES"===t.type?t.data:e},managementAuth:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:bTe,t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"USER_LOADING":return(0,i.A)((0,i.A)({},e),{},{isLoading:!0});case"USER_LOADED":return(0,i.A)((0,i.A)({},e),{},{isAuthenticated:!0,isLoading:!1});case"LOGIN_SUCCESS":{const{access_token:n,refresh_token:r}=t.payload;return localStorage.setItem("managementToken",n),localStorage.setItem("managementRefreshToken",r),(0,i.A)((0,i.A)({},e),{},{token:n,refresh:r,user:t.payload,isAuthenticated:!0,isLoading:!1})}case"LOGOUT_SUCCESS":case"AUTH_ERROR":case"LOGIN_FAILED":return localStorage.removeItem("managementToken"),localStorage.removeItem("managementRefreshToken"),(0,i.A)((0,i.A)({},e),{},{token:null,user:null,isAuthenticated:!1,isLoading:!1});default:return e}},user:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:jTe,t=arguments.length>1?arguments[1]:void 0;return t.type===wu?t.data:e}};let CTe={patientTab:0};const wTe={activeVitalTab:"null",vitals:{bp:{course:[]},glucose:{course:[]}}},STe={email_notification:{reading_reminder:!1,missed_mandate:!1,non_compliant_user:!1},push_notification:{reading_reminder:!1,missed_mandate:!1,non_compliant_user:!1}},ATe=[],kTe={headerData:{pageTitle:"",sideBar:!0,headerBar:!0,listItems:[],activeMenuItem:"",sidebarOpen:!1,heading:{},isBreadcrumb:!0,course:{},course_glucose:{},filterDate:{},complianceStatus:"",activeProgram:{}}};const TTe=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:kTe,t=arguments.length>1?arguments[1]:void 0;const n=Object.assign({},e.headerData);return t.type===zo?(Object.keys(t.payload).map(e=>{n[e]=t.payload[e]}),(0,i.A)((0,i.A)({},e),{},{headerData:n})):e},ETe={patientTableView:"list",ui_tab:{patientTab:0}},MTe=ta()($o.getPatientTableView())?$o.setPatientTableView(ETe):$o.getPatientTableView(),OTe=(0,Kue.HY)((0,i.A)((0,i.A)({},_Te),{},{app:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;return t.type===Bo?(0,i.A)((0,i.A)({},e),t.data):e},header:TTe,loader:function(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return t.type===Wo?t.data:e},ui_tab:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:(0,i.A)({},CTe),t=arguments.length>1?arguments[1]:void 0;return t.type===Ho?(0,i.A)((0,i.A)({},e),t.data):e},appUI:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:MTe,t=arguments.length>1?arguments[1]:void 0;switch(t.type){case Vo:case Ho:return(0,i.A)((0,i.A)({},e),t.data);default:return e||ETe}},message:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return t.type===Uo?t.data:e},dashboard:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:wTe,t=arguments.length>1?arguments[1]:void 0;const n=Object.assign({},e);return t.type===Go?(Object.keys(t.payload).map(e=>{n[e]=t.payload[e]}),(0,i.A)((0,i.A)({},e),n)):e},notifications:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:STe,t=arguments.length>1?arguments[1]:void 0;const n=t.payload;return t.type===qo?{notificationData:n}:e},Programs:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:ATe,t=arguments.length>1?arguments[1]:void 0;const n=t.payload;return t.type===Yo?{programData:n}:e}}));let RTe=null;RTe=(0,Kue.Tw)(vTe);const PTe=(0,Kue.Yl)(OTe,{},RTe);const DTe=function(){const e=Nt(),t=wt(cu),[n,r]=We.useState({});return(0,We.useEffect)(()=>{var t,n,r,i,o,a,s,l;(e=>{Pu=Qo().create(),zu(e)})(PTe);const c=null===(t=window)||void 0===t||null===(n=t.rootConfig)||void 0===n?void 0:n.__SERVICE_URL__,d=null===(r=window)||void 0===r||null===(i=r.rootConfig)||void 0===i?void 0:i.__REDIRECT_BASE__,u=null===(o=window)||void 0===o||null===(a=o.rootConfig)||void 0===a?void 0:a.__LOGIN_URL__,p=null===(s=window)||void 0===s||null===(l=s.rootConfig)||void 0===l?void 0:l.__DEFAULT_TENANT__;Lu({baseURL:c}),$o.setUrl({baseURL:c,redirectBase:d,loginURL:u,defaultTenant:p}),e((e=>t=>{t({type:Bo,data:e})})({baseURL:c,redirectBase:d,loginURL:u,defaultTenant:p}));const h=new mTe(Lu,PTe,u);h.setAuthTokenFromLocalStorage()},[]),(0,We.useEffect)(()=>{t&&(async()=>{try{const t=await e(ku());r(t)}catch(t){console.log(t.message)}})()},[t]),(0,qt.jsx)(yn,{theme:Qde,children:(0,qt.jsxs)(pi,{maxSnack:5,anchorOrigin:{horizontal:"right",vertical:"bottom"},preventDuplicate:!0,children:[(0,qt.jsx)(tn,{}),(0,qt.jsx)(Po,{children:(0,qt.jsx)(lv.Provider,{value:{userData:n},children:(0,qt.jsx)(hTe,{})})})]})})},NTe=e=>{e&&e instanceof Function&&n.e(453).then(n.bind(n,46453)).then(t=>{let{getCLS:n,getFID:r,getFCP:i,getLCP:o,getTTFB:a}=t;n(e),r(e),i(e),o(e),a(e)})};lt.createRoot(document.getElementById("root")).render((0,qt.jsx)(Ot,{store:PTe,children:(0,qt.jsx)(DTe,{})})),NTe()})()})();
//# sourceMappingURL=main.354c3340.js.map