@bygd/nc-report-ui 0.1.15 → 0.1.17

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -12,7 +12,7 @@ var _BYGD_NC_REPORT_UI=function(){"use strict";function e(e,t){return t.forEach(
12
12
  * author : Adam Draper
13
13
  * license : MIT
14
14
  * http://adamwdraper.github.com/Numeral-js/
15
- */var Yo,Xo=(qo||(qo=1,Yo=Go,function(e,t){Yo.exports?Yo.exports=t():e.numeral=t()}(Go.exports,function(){var e,t,n,r,o,i={},a={},s={currentLocale:"en",zeroFormat:null,nullFormat:null,defaultFormat:"0,0",scalePercentBy100:!0},l={currentLocale:s.currentLocale,zeroFormat:s.zeroFormat,nullFormat:s.nullFormat,defaultFormat:s.defaultFormat,scalePercentBy100:s.scalePercentBy100};function u(e,t){this._input=e,this._value=t}return(e=function(n){var r,o,a,s;if(e.isNumeral(n))r=n.value();else if(0===n||void 0===n)r=0;else if(null===n||t.isNaN(n))r=null;else if("string"==typeof n)if(l.zeroFormat&&n===l.zeroFormat)r=0;else if(l.nullFormat&&n===l.nullFormat||!n.replace(/[^0-9]+/g,"").length)r=null;else{for(o in i)if((s="function"==typeof i[o].regexps.unformat?i[o].regexps.unformat():i[o].regexps.unformat)&&n.match(s)){a=i[o].unformat;break}r=(a=a||e._.stringToNumber)(n)}else r=Number(n)||null;return new u(n,r)}).version="2.0.6",e.isNumeral=function(e){return e instanceof u},e._=t={numberToFormat:function(t,n,r){var o,i,s,l,u,c,d,p,f=a[e.options.currentLocale],h=!1,m=!1,g="",v=1e12,y=1e9,b=1e6,w="",x=!1;if(t=t||0,s=Math.abs(t),e._.includes(n,"(")?(h=!0,n=n.replace(/[\(|\)]/g,"")):(e._.includes(n,"+")||e._.includes(n,"-"))&&(c=e._.includes(n,"+")?n.indexOf("+"):t<0?n.indexOf("-"):-1,n=n.replace(/[\+|\-]/g,"")),e._.includes(n,"a")&&(i=!!(i=n.match(/a(k|m|b|t)?/))&&i[1],e._.includes(n," a")&&(g=" "),n=n.replace(new RegExp(g+"a[kmbt]?"),""),s>=v&&!i||"t"===i?(g+=f.abbreviations.trillion,t/=v):s<v&&s>=y&&!i||"b"===i?(g+=f.abbreviations.billion,t/=y):s<y&&s>=b&&!i||"m"===i?(g+=f.abbreviations.million,t/=b):(s<b&&s>=1e3&&!i||"k"===i)&&(g+=f.abbreviations.thousand,t/=1e3)),e._.includes(n,"[.]")&&(m=!0,n=n.replace("[.]",".")),l=t.toString().split(".")[0],u=n.split(".")[1],d=n.indexOf(","),o=(n.split(".")[0].split(",")[0].match(/0/g)||[]).length,u?(e._.includes(u,"[")?(u=(u=u.replace("]","")).split("["),w=e._.toFixed(t,u[0].length+u[1].length,r,u[1].length)):w=e._.toFixed(t,u.length,r),l=w.split(".")[0],w=e._.includes(w,".")?f.delimiters.decimal+w.split(".")[1]:"",m&&0===Number(w.slice(1))&&(w="")):l=e._.toFixed(t,0,r),g&&!i&&Number(l)>=1e3&&g!==f.abbreviations.trillion)switch(l=String(Number(l)/1e3),g){case f.abbreviations.thousand:g=f.abbreviations.million;break;case f.abbreviations.million:g=f.abbreviations.billion;break;case f.abbreviations.billion:g=f.abbreviations.trillion}if(e._.includes(l,"-")&&(l=l.slice(1),x=!0),l.length<o)for(var k=o-l.length;k>0;k--)l="0"+l;return d>-1&&(l=l.toString().replace(/(\d)(?=(\d{3})+(?!\d))/g,"$1"+f.delimiters.thousands)),0===n.indexOf(".")&&(l=""),p=l+w+(g||""),h?p=(h&&x?"(":"")+p+(h&&x?")":""):c>=0?p=0===c?(x?"-":"+")+p:p+(x?"-":"+"):x&&(p="-"+p),p},stringToNumber:function(e){var t,n,r,o=a[l.currentLocale],i=e,s={thousand:3,million:6,billion:9,trillion:12};if(l.zeroFormat&&e===l.zeroFormat)n=0;else if(l.nullFormat&&e===l.nullFormat||!e.replace(/[^0-9]+/g,"").length)n=null;else{for(t in n=1,"."!==o.delimiters.decimal&&(e=e.replace(/\./g,"").replace(o.delimiters.decimal,".")),s)if(r=new RegExp("[^a-zA-Z]"+o.abbreviations[t]+"(?:\\)|(\\"+o.currency.symbol+")?(?:\\))?)?$"),i.match(r)){n*=Math.pow(10,s[t]);break}n*=(e.split("-").length+Math.min(e.split("(").length-1,e.split(")").length-1))%2?1:-1,e=e.replace(/[^0-9\.]+/g,""),n*=Number(e)}return n},isNaN:function(e){return"number"==typeof e&&isNaN(e)},includes:function(e,t){return-1!==e.indexOf(t)},insert:function(e,t,n){return e.slice(0,n)+t+e.slice(n)},reduce:function(e,t){if(null===this)throw new TypeError("Array.prototype.reduce called on null or undefined");if("function"!=typeof t)throw new TypeError(t+" is not a function");var n,r=Object(e),o=r.length>>>0,i=0;if(3===arguments.length)n=arguments[2];else{for(;i<o&&!(i in r);)i++;if(i>=o)throw new TypeError("Reduce of empty array with no initial value");n=r[i++]}for(;i<o;i++)i in r&&(n=t(n,r[i],i,r));return n},multiplier:function(e){var t=e.toString().split(".");return t.length<2?1:Math.pow(10,t[1].length)},correctionFactor:function(){return Array.prototype.slice.call(arguments).reduce(function(e,n){var r=t.multiplier(n);return e>r?e:r},1)},toFixed:function(e,t,n,r){var o,i,a,s,l=e.toString().split("."),u=t-(r||0);return o=2===l.length?Math.min(Math.max(l[1].length,u),t):u,a=Math.pow(10,o),s=(n(e+"e+"+o)/a).toFixed(o),r>t-o&&(i=new RegExp("\\.?0{1,"+(r-(t-o))+"}$"),s=s.replace(i,"")),s}},e.options=l,e.formats=i,e.locales=a,e.locale=function(e){return e&&(l.currentLocale=e.toLowerCase()),l.currentLocale},e.localeData=function(e){if(!e)return a[l.currentLocale];if(e=e.toLowerCase(),!a[e])throw new Error("Unknown locale : "+e);return a[e]},e.reset=function(){for(var e in s)l[e]=s[e]},e.zeroFormat=function(e){l.zeroFormat="string"==typeof e?e:null},e.nullFormat=function(e){l.nullFormat="string"==typeof e?e:null},e.defaultFormat=function(e){l.defaultFormat="string"==typeof e?e:"0.0"},e.register=function(e,t,n){if(t=t.toLowerCase(),this[e+"s"][t])throw new TypeError(t+" "+e+" already registered.");return this[e+"s"][t]=n,n},e.validate=function(t,n){var r,o,i,a,s,l,u,c;if("string"!=typeof t&&(t+="",console.warn&&console.warn("Numeral.js: Value is not string. It has been co-erced to: ",t)),(t=t.trim()).match(/^\d+$/))return!0;if(""===t)return!1;try{u=e.localeData(n)}catch(t){u=e.localeData(e.locale())}return i=u.currency.symbol,s=u.abbreviations,r=u.delimiters.decimal,o="."===u.delimiters.thousands?"\\.":u.delimiters.thousands,!(null!==(c=t.match(/^[^\d]+/))&&(t=t.substr(1),c[0]!==i)||null!==(c=t.match(/[^\d]+$/))&&(t=t.slice(0,-1),c[0]!==s.thousand&&c[0]!==s.million&&c[0]!==s.billion&&c[0]!==s.trillion)||(l=new RegExp(o+"{2}"),t.match(/[^\d.,]/g)||(a=t.split(r)).length>2||(a.length<2?!a[0].match(/^\d+.*\d$/)||a[0].match(l):1===a[0].length?!a[0].match(/^\d+$/)||a[0].match(l)||!a[1].match(/^\d+$/):!a[0].match(/^\d+.*\d$/)||a[0].match(l)||!a[1].match(/^\d+$/))))},e.fn=u.prototype={clone:function(){return e(this)},format:function(t,n){var r,o,a,s=this._value,u=t||l.defaultFormat;if(n=n||Math.round,0===s&&null!==l.zeroFormat)o=l.zeroFormat;else if(null===s&&null!==l.nullFormat)o=l.nullFormat;else{for(r in i)if(u.match(i[r].regexps.format)){a=i[r].format;break}o=(a=a||e._.numberToFormat)(s,u,n)}return o},value:function(){return this._value},input:function(){return this._input},set:function(e){return this._value=Number(e),this},add:function(e){var n=t.correctionFactor.call(null,this._value,e);return this._value=t.reduce([this._value,e],function(e,t,r,o){return e+Math.round(n*t)},0)/n,this},subtract:function(e){var n=t.correctionFactor.call(null,this._value,e);return this._value=t.reduce([e],function(e,t,r,o){return e-Math.round(n*t)},Math.round(this._value*n))/n,this},multiply:function(e){return this._value=t.reduce([this._value,e],function(e,n,r,o){var i=t.correctionFactor(e,n);return Math.round(e*i)*Math.round(n*i)/Math.round(i*i)},1),this},divide:function(e){return this._value=t.reduce([this._value,e],function(e,n,r,o){var i=t.correctionFactor(e,n);return Math.round(e*i)/Math.round(n*i)}),this},difference:function(t){return Math.abs(e(this._value).subtract(t).value())}},e.register("locale","en",{delimiters:{thousands:",",decimal:"."},abbreviations:{thousand:"k",million:"m",billion:"b",trillion:"t"},ordinal:function(e){var t=e%10;return 1==~~(e%100/10)?"th":1===t?"st":2===t?"nd":3===t?"rd":"th"},currency:{symbol:"$"}}),e.register("format","bps",{regexps:{format:/(BPS)/,unformat:/(BPS)/},format:function(t,n,r){var o,i=e._.includes(n," BPS")?" ":"";return t*=1e4,n=n.replace(/\s?BPS/,""),o=e._.numberToFormat(t,n,r),e._.includes(o,")")?((o=o.split("")).splice(-1,0,i+"BPS"),o=o.join("")):o=o+i+"BPS",o},unformat:function(t){return+(1e-4*e._.stringToNumber(t)).toFixed(15)}}),r={base:1024,suffixes:["B","KiB","MiB","GiB","TiB","PiB","EiB","ZiB","YiB"]},o="("+(o=(n={base:1e3,suffixes:["B","KB","MB","GB","TB","PB","EB","ZB","YB"]}).suffixes.concat(r.suffixes.filter(function(e){return n.suffixes.indexOf(e)<0})).join("|")).replace("B","B(?!PS)")+")",e.register("format","bytes",{regexps:{format:/([0\s]i?b)/,unformat:new RegExp(o)},format:function(t,o,i){var a,s,l,u=e._.includes(o,"ib")?r:n,c=e._.includes(o," b")||e._.includes(o," ib")?" ":"";for(o=o.replace(/\s?i?b/,""),a=0;a<=u.suffixes.length;a++)if(s=Math.pow(u.base,a),l=Math.pow(u.base,a+1),null===t||0===t||t>=s&&t<l){c+=u.suffixes[a],s>0&&(t/=s);break}return e._.numberToFormat(t,o,i)+c},unformat:function(t){var o,i,a=e._.stringToNumber(t);if(a){for(o=n.suffixes.length-1;o>=0;o--){if(e._.includes(t,n.suffixes[o])){i=Math.pow(n.base,o);break}if(e._.includes(t,r.suffixes[o])){i=Math.pow(r.base,o);break}}a*=i||1}return a}}),e.register("format","currency",{regexps:{format:/(\$)/},format:function(t,n,r){var o,i,a=e.locales[e.options.currentLocale],s={before:n.match(/^([\+|\-|\(|\s|\$]*)/)[0],after:n.match(/([\+|\-|\)|\s|\$]*)$/)[0]};for(n=n.replace(/\s?\$\s?/,""),o=e._.numberToFormat(t,n,r),t>=0?(s.before=s.before.replace(/[\-\(]/,""),s.after=s.after.replace(/[\-\)]/,"")):t<0&&!e._.includes(s.before,"-")&&!e._.includes(s.before,"(")&&(s.before="-"+s.before),i=0;i<s.before.length;i++)switch(s.before[i]){case"$":o=e._.insert(o,a.currency.symbol,i);break;case" ":o=e._.insert(o," ",i+a.currency.symbol.length-1)}for(i=s.after.length-1;i>=0;i--)switch(s.after[i]){case"$":o=i===s.after.length-1?o+a.currency.symbol:e._.insert(o,a.currency.symbol,-(s.after.length-(1+i)));break;case" ":o=i===s.after.length-1?o+" ":e._.insert(o," ",-(s.after.length-(1+i)+a.currency.symbol.length-1))}return o}}),e.register("format","exponential",{regexps:{format:/(e\+|e-)/,unformat:/(e\+|e-)/},format:function(t,n,r){var o=("number"!=typeof t||e._.isNaN(t)?"0e+0":t.toExponential()).split("e");return n=n.replace(/e[\+|\-]{1}0/,""),e._.numberToFormat(Number(o[0]),n,r)+"e"+o[1]},unformat:function(t){var n=e._.includes(t,"e+")?t.split("e+"):t.split("e-"),r=Number(n[0]),o=Number(n[1]);return o=e._.includes(t,"e-")?o*=-1:o,e._.reduce([r,Math.pow(10,o)],function(t,n,r,o){var i=e._.correctionFactor(t,n);return t*i*(n*i)/(i*i)},1)}}),e.register("format","ordinal",{regexps:{format:/(o)/},format:function(t,n,r){var o=e.locales[e.options.currentLocale],i=e._.includes(n," o")?" ":"";return n=n.replace(/\s?o/,""),i+=o.ordinal(t),e._.numberToFormat(t,n,r)+i}}),e.register("format","percentage",{regexps:{format:/(%)/,unformat:/(%)/},format:function(t,n,r){var o,i=e._.includes(n," %")?" ":"";return e.options.scalePercentBy100&&(t*=100),n=n.replace(/\s?\%/,""),o=e._.numberToFormat(t,n,r),e._.includes(o,")")?((o=o.split("")).splice(-1,0,i+"%"),o=o.join("")):o=o+i+"%",o},unformat:function(t){var n=e._.stringToNumber(t);return e.options.scalePercentBy100?.01*n:n}}),e.register("format","time",{regexps:{format:/(:)/,unformat:/(:)/},format:function(e,t,n){var r=Math.floor(e/60/60),o=Math.floor((e-60*r*60)/60),i=Math.round(e-60*r*60-60*o);return r+":"+(o<10?"0"+o:o)+":"+(i<10?"0"+i:i)},unformat:function(e){var t=e.split(":"),n=0;return 3===t.length?(n+=60*Number(t[0])*60,n+=60*Number(t[1]),n+=Number(t[2])):2===t.length&&(n+=60*Number(t[0]),n+=Number(t[1])),Number(n)}}),e})),Go.exports),Qo=t(Xo);function Jo(e,t,n="array"){const r=e.columns,o=[...t.doc.metrics,...t.doc.dimensions].reduce((e,t)=>(e[t.name]=t,e),{});return e=>{const t="array"===n?[]:{};return r.reduce((t,r)=>{const i=e[r.name],a=o[r.name];let s=i;return s="timestamp"===a.type?new Date(i):a.format?a.format&&a.prefix?{v:+i,f:a.prefix+" "+Qo(i).format(a.format)}:a.format?{v:+i,f:Qo(i).format(a.format)}:i:i,"array"===n?t.push(s):t[r.name]=s?.f||s,t},t)}}function Zo(e,t){return function(){return e.apply(t,arguments)}}const{toString:ei}=Object.prototype,{getPrototypeOf:ti}=Object,{iterator:ni,toStringTag:ri}=Symbol,oi=(e=>t=>{const n=ei.call(t);return e[n]||(e[n]=n.slice(8,-1).toLowerCase())})(Object.create(null)),ii=e=>(e=e.toLowerCase(),t=>oi(t)===e),ai=e=>t=>typeof t===e,{isArray:si}=Array,li=ai("undefined");const ui=ii("ArrayBuffer");const ci=ai("string"),di=ai("function"),pi=ai("number"),fi=e=>null!==e&&"object"==typeof e,hi=e=>{if("object"!==oi(e))return!1;const t=ti(e);return!(null!==t&&t!==Object.prototype&&null!==Object.getPrototypeOf(t)||ri in e||ni in e)},mi=ii("Date"),gi=ii("File"),vi=ii("Blob"),yi=ii("FileList"),bi=ii("URLSearchParams"),[wi,xi,ki,Si]=["ReadableStream","Request","Response","Headers"].map(ii);function Ei(e,t,{allOwnKeys:n=!1}={}){if(null==e)return;let r,o;if("object"!=typeof e&&(e=[e]),si(e))for(r=0,o=e.length;r<o;r++)t.call(null,e[r],r,e);else{const o=n?Object.getOwnPropertyNames(e):Object.keys(e),i=o.length;let a;for(r=0;r<i;r++)a=o[r],t.call(null,e[a],a,e)}}function Ci(e,t){t=t.toLowerCase();const n=Object.keys(e);let r,o=n.length;for(;o-- >0;)if(r=n[o],t===r.toLowerCase())return r;return null}const Oi="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:global,Ti=e=>!li(e)&&e!==Oi;const _i=(Ri="undefined"!=typeof Uint8Array&&ti(Uint8Array),e=>Ri&&e instanceof Ri);var Ri;const Pi=ii("HTMLFormElement"),Ai=(({hasOwnProperty:e})=>(t,n)=>e.call(t,n))(Object.prototype),Li=ii("RegExp"),Ni=(e,t)=>{const n=Object.getOwnPropertyDescriptors(e),r={};Ei(n,(n,o)=>{let i;!1!==(i=t(n,o,e))&&(r[o]=i||n)}),Object.defineProperties(e,r)};const Mi=ii("AsyncFunction"),Ii=(Fi="function"==typeof setImmediate,$i=di(Oi.postMessage),Fi?setImmediate:$i?((e,t)=>(Oi.addEventListener("message",({source:n,data:r})=>{n===Oi&&r===e&&t.length&&t.shift()()},!1),n=>{t.push(n),Oi.postMessage(e,"*")}))(`axios@${Math.random()}`,[]):e=>setTimeout(e));var Fi,$i;const ji="undefined"!=typeof queueMicrotask?queueMicrotask.bind(Oi):"undefined"!=typeof process&&process.nextTick||Ii;var zi={isArray:si,isArrayBuffer:ui,isBuffer:function(e){return null!==e&&!li(e)&&null!==e.constructor&&!li(e.constructor)&&di(e.constructor.isBuffer)&&e.constructor.isBuffer(e)},isFormData:e=>{let t;return e&&("function"==typeof FormData&&e instanceof FormData||di(e.append)&&("formdata"===(t=oi(e))||"object"===t&&di(e.toString)&&"[object FormData]"===e.toString()))},isArrayBufferView:function(e){let t;return t="undefined"!=typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer.isView(e):e&&e.buffer&&ui(e.buffer),t},isString:ci,isNumber:pi,isBoolean:e=>!0===e||!1===e,isObject:fi,isPlainObject:hi,isReadableStream:wi,isRequest:xi,isResponse:ki,isHeaders:Si,isUndefined:li,isDate:mi,isFile:gi,isBlob:vi,isRegExp:Li,isFunction:di,isStream:e=>fi(e)&&di(e.pipe),isURLSearchParams:bi,isTypedArray:_i,isFileList:yi,forEach:Ei,merge:function e(){const{caseless:t}=Ti(this)&&this||{},n={},r=(r,o)=>{const i=t&&Ci(n,o)||o;hi(n[i])&&hi(r)?n[i]=e(n[i],r):hi(r)?n[i]=e({},r):si(r)?n[i]=r.slice():n[i]=r};for(let e=0,t=arguments.length;e<t;e++)arguments[e]&&Ei(arguments[e],r);return n},extend:(e,t,n,{allOwnKeys:r}={})=>(Ei(t,(t,r)=>{n&&di(t)?e[r]=Zo(t,n):e[r]=t},{allOwnKeys:r}),e),trim:e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,""),stripBOM:e=>(65279===e.charCodeAt(0)&&(e=e.slice(1)),e),inherits:(e,t,n,r)=>{e.prototype=Object.create(t.prototype,r),e.prototype.constructor=e,Object.defineProperty(e,"super",{value:t.prototype}),n&&Object.assign(e.prototype,n)},toFlatObject:(e,t,n,r)=>{let o,i,a;const s={};if(t=t||{},null==e)return t;do{for(o=Object.getOwnPropertyNames(e),i=o.length;i-- >0;)a=o[i],r&&!r(a,e,t)||s[a]||(t[a]=e[a],s[a]=!0);e=!1!==n&&ti(e)}while(e&&(!n||n(e,t))&&e!==Object.prototype);return t},kindOf:oi,kindOfTest:ii,endsWith:(e,t,n)=>{e=String(e),(void 0===n||n>e.length)&&(n=e.length),n-=t.length;const r=e.indexOf(t,n);return-1!==r&&r===n},toArray:e=>{if(!e)return null;if(si(e))return e;let t=e.length;if(!pi(t))return null;const n=new Array(t);for(;t-- >0;)n[t]=e[t];return n},forEachEntry:(e,t)=>{const n=(e&&e[ni]).call(e);let r;for(;(r=n.next())&&!r.done;){const n=r.value;t.call(e,n[0],n[1])}},matchAll:(e,t)=>{let n;const r=[];for(;null!==(n=e.exec(t));)r.push(n);return r},isHTMLForm:Pi,hasOwnProperty:Ai,hasOwnProp:Ai,reduceDescriptors:Ni,freezeMethods:e=>{Ni(e,(t,n)=>{if(di(e)&&-1!==["arguments","caller","callee"].indexOf(n))return!1;const r=e[n];di(r)&&(t.enumerable=!1,"writable"in t?t.writable=!1:t.set||(t.set=()=>{throw Error("Can not rewrite read-only method '"+n+"'")}))})},toObjectSet:(e,t)=>{const n={},r=e=>{e.forEach(e=>{n[e]=!0})};return si(e)?r(e):r(String(e).split(t)),n},toCamelCase:e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(e,t,n){return t.toUpperCase()+n}),noop:()=>{},toFiniteNumber:(e,t)=>null!=e&&Number.isFinite(e=+e)?e:t,findKey:Ci,global:Oi,isContextDefined:Ti,isSpecCompliantForm:function(e){return!!(e&&di(e.append)&&"FormData"===e[ri]&&e[ni])},toJSONObject:e=>{const t=new Array(10),n=(e,r)=>{if(fi(e)){if(t.indexOf(e)>=0)return;if(!("toJSON"in e)){t[r]=e;const o=si(e)?[]:{};return Ei(e,(e,t)=>{const i=n(e,r+1);!li(i)&&(o[t]=i)}),t[r]=void 0,o}}return e};return n(e,0)},isAsyncFn:Mi,isThenable:e=>e&&(fi(e)||di(e))&&di(e.then)&&di(e.catch),setImmediate:Ii,asap:ji,isIterable:e=>null!=e&&di(e[ni])};function Bi(e,t,n,r,o){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=(new Error).stack,this.message=e,this.name="AxiosError",t&&(this.code=t),n&&(this.config=n),r&&(this.request=r),o&&(this.response=o,this.status=o.status?o.status:null)}zi.inherits(Bi,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:zi.toJSONObject(this.config),code:this.code,status:this.status}}});const Di=Bi.prototype,Wi={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach(e=>{Wi[e]={value:e}}),Object.defineProperties(Bi,Wi),Object.defineProperty(Di,"isAxiosError",{value:!0}),Bi.from=(e,t,n,r,o,i)=>{const a=Object.create(Di);return zi.toFlatObject(e,a,function(e){return e!==Error.prototype},e=>"isAxiosError"!==e),Bi.call(a,e.message,t,n,r,o),a.cause=e,a.name=e.name,i&&Object.assign(a,i),a};function Ui(e){return zi.isPlainObject(e)||zi.isArray(e)}function Vi(e){return zi.endsWith(e,"[]")?e.slice(0,-2):e}function Ki(e,t,n){return e?e.concat(t).map(function(e,t){return e=Vi(e),!n&&t?"["+e+"]":e}).join(n?".":""):t}const Hi=zi.toFlatObject(zi,{},null,function(e){return/^is[A-Z]/.test(e)});function qi(e,t,n){if(!zi.isObject(e))throw new TypeError("target must be an object");t=t||new FormData;const r=(n=zi.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,function(e,t){return!zi.isUndefined(t[e])})).metaTokens,o=n.visitor||u,i=n.dots,a=n.indexes,s=(n.Blob||"undefined"!=typeof Blob&&Blob)&&zi.isSpecCompliantForm(t);if(!zi.isFunction(o))throw new TypeError("visitor must be a function");function l(e){if(null===e)return"";if(zi.isDate(e))return e.toISOString();if(zi.isBoolean(e))return e.toString();if(!s&&zi.isBlob(e))throw new Bi("Blob is not supported. Use a Buffer instead.");return zi.isArrayBuffer(e)||zi.isTypedArray(e)?s&&"function"==typeof Blob?new Blob([e]):Buffer.from(e):e}function u(e,n,o){let s=e;if(e&&!o&&"object"==typeof e)if(zi.endsWith(n,"{}"))n=r?n:n.slice(0,-2),e=JSON.stringify(e);else if(zi.isArray(e)&&function(e){return zi.isArray(e)&&!e.some(Ui)}(e)||(zi.isFileList(e)||zi.endsWith(n,"[]"))&&(s=zi.toArray(e)))return n=Vi(n),s.forEach(function(e,r){!zi.isUndefined(e)&&null!==e&&t.append(!0===a?Ki([n],r,i):null===a?n:n+"[]",l(e))}),!1;return!!Ui(e)||(t.append(Ki(o,n,i),l(e)),!1)}const c=[],d=Object.assign(Hi,{defaultVisitor:u,convertValue:l,isVisitable:Ui});if(!zi.isObject(e))throw new TypeError("data must be an object");return function e(n,r){if(!zi.isUndefined(n)){if(-1!==c.indexOf(n))throw Error("Circular reference detected in "+r.join("."));c.push(n),zi.forEach(n,function(n,i){!0===(!(zi.isUndefined(n)||null===n)&&o.call(t,n,zi.isString(i)?i.trim():i,r,d))&&e(n,r?r.concat(i):[i])}),c.pop()}}(e),t}function Gi(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,function(e){return t[e]})}function Yi(e,t){this._pairs=[],e&&qi(e,this,t)}const Xi=Yi.prototype;function Qi(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function Ji(e,t,n){if(!t)return e;const r=n&&n.encode||Qi;zi.isFunction(n)&&(n={serialize:n});const o=n&&n.serialize;let i;if(i=o?o(t,n):zi.isURLSearchParams(t)?t.toString():new Yi(t,n).toString(r),i){const t=e.indexOf("#");-1!==t&&(e=e.slice(0,t)),e+=(-1===e.indexOf("?")?"?":"&")+i}return e}Xi.append=function(e,t){this._pairs.push([e,t])},Xi.toString=function(e){const t=e?function(t){return e.call(this,t,Gi)}:Gi;return this._pairs.map(function(e){return t(e[0])+"="+t(e[1])},"").join("&")};class Zi{constructor(){this.handlers=[]}use(e,t,n){return this.handlers.push({fulfilled:e,rejected:t,synchronous:!!n&&n.synchronous,runWhen:n?n.runWhen:null}),this.handlers.length-1}eject(e){this.handlers[e]&&(this.handlers[e]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(e){zi.forEach(this.handlers,function(t){null!==t&&e(t)})}}var ea={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},ta={isBrowser:!0,classes:{URLSearchParams:"undefined"!=typeof URLSearchParams?URLSearchParams:Yi,FormData:"undefined"!=typeof FormData?FormData:null,Blob:"undefined"!=typeof Blob?Blob:null},protocols:["http","https","file","blob","url","data"]};const na="undefined"!=typeof window&&"undefined"!=typeof document,ra="object"==typeof navigator&&navigator||void 0,oa=na&&(!ra||["ReactNative","NativeScript","NS"].indexOf(ra.product)<0),ia="undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope&&"function"==typeof self.importScripts,aa=na&&window.location.href||"http://localhost";var sa={...Object.freeze({__proto__:null,hasBrowserEnv:na,hasStandardBrowserEnv:oa,hasStandardBrowserWebWorkerEnv:ia,navigator:ra,origin:aa}),...ta};function la(e){function t(e,n,r,o){let i=e[o++];if("__proto__"===i)return!0;const a=Number.isFinite(+i),s=o>=e.length;if(i=!i&&zi.isArray(r)?r.length:i,s)return zi.hasOwnProp(r,i)?r[i]=[r[i],n]:r[i]=n,!a;r[i]&&zi.isObject(r[i])||(r[i]=[]);return t(e,n,r[i],o)&&zi.isArray(r[i])&&(r[i]=function(e){const t={},n=Object.keys(e);let r;const o=n.length;let i;for(r=0;r<o;r++)i=n[r],t[i]=e[i];return t}(r[i])),!a}if(zi.isFormData(e)&&zi.isFunction(e.entries)){const n={};return zi.forEachEntry(e,(e,r)=>{t(function(e){return zi.matchAll(/\w+|\[(\w*)]/g,e).map(e=>"[]"===e[0]?"":e[1]||e[0])}(e),r,n,0)}),n}return null}const ua={transitional:ea,adapter:["xhr","http","fetch"],transformRequest:[function(e,t){const n=t.getContentType()||"",r=n.indexOf("application/json")>-1,o=zi.isObject(e);o&&zi.isHTMLForm(e)&&(e=new FormData(e));if(zi.isFormData(e))return r?JSON.stringify(la(e)):e;if(zi.isArrayBuffer(e)||zi.isBuffer(e)||zi.isStream(e)||zi.isFile(e)||zi.isBlob(e)||zi.isReadableStream(e))return e;if(zi.isArrayBufferView(e))return e.buffer;if(zi.isURLSearchParams(e))return t.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),e.toString();let i;if(o){if(n.indexOf("application/x-www-form-urlencoded")>-1)return function(e,t){return qi(e,new sa.classes.URLSearchParams,Object.assign({visitor:function(e,t,n,r){return sa.isNode&&zi.isBuffer(e)?(this.append(t,e.toString("base64")),!1):r.defaultVisitor.apply(this,arguments)}},t))}(e,this.formSerializer).toString();if((i=zi.isFileList(e))||n.indexOf("multipart/form-data")>-1){const t=this.env&&this.env.FormData;return qi(i?{"files[]":e}:e,t&&new t,this.formSerializer)}}return o||r?(t.setContentType("application/json",!1),function(e,t,n){if(zi.isString(e))try{return(t||JSON.parse)(e),zi.trim(e)}catch(e){if("SyntaxError"!==e.name)throw e}return(n||JSON.stringify)(e)}(e)):e}],transformResponse:[function(e){const t=this.transitional||ua.transitional,n=t&&t.forcedJSONParsing,r="json"===this.responseType;if(zi.isResponse(e)||zi.isReadableStream(e))return e;if(e&&zi.isString(e)&&(n&&!this.responseType||r)){const n=!(t&&t.silentJSONParsing)&&r;try{return JSON.parse(e)}catch(e){if(n){if("SyntaxError"===e.name)throw Bi.from(e,Bi.ERR_BAD_RESPONSE,this,null,this.response);throw e}}}return e}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:sa.classes.FormData,Blob:sa.classes.Blob},validateStatus:function(e){return e>=200&&e<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};zi.forEach(["delete","get","head","post","put","patch"],e=>{ua.headers[e]={}});const ca=zi.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]);const da=Symbol("internals");function pa(e){return e&&String(e).trim().toLowerCase()}function fa(e){return!1===e||null==e?e:zi.isArray(e)?e.map(fa):String(e)}function ha(e,t,n,r,o){return zi.isFunction(r)?r.call(this,t,n):(o&&(t=n),zi.isString(t)?zi.isString(r)?-1!==t.indexOf(r):zi.isRegExp(r)?r.test(t):void 0:void 0)}let ma=class{constructor(e){e&&this.set(e)}set(e,t,n){const r=this;function o(e,t,n){const o=pa(t);if(!o)throw new Error("header name must be a non-empty string");const i=zi.findKey(r,o);(!i||void 0===r[i]||!0===n||void 0===n&&!1!==r[i])&&(r[i||t]=fa(e))}const i=(e,t)=>zi.forEach(e,(e,n)=>o(e,n,t));if(zi.isPlainObject(e)||e instanceof this.constructor)i(e,t);else if(zi.isString(e)&&(e=e.trim())&&!/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim()))i((e=>{const t={};let n,r,o;return e&&e.split("\n").forEach(function(e){o=e.indexOf(":"),n=e.substring(0,o).trim().toLowerCase(),r=e.substring(o+1).trim(),!n||t[n]&&ca[n]||("set-cookie"===n?t[n]?t[n].push(r):t[n]=[r]:t[n]=t[n]?t[n]+", "+r:r)}),t})(e),t);else if(zi.isObject(e)&&zi.isIterable(e)){let n,r,o={};for(const t of e){if(!zi.isArray(t))throw TypeError("Object iterator must return a key-value pair");o[r=t[0]]=(n=o[r])?zi.isArray(n)?[...n,t[1]]:[n,t[1]]:t[1]}i(o,t)}else null!=e&&o(t,e,n);return this}get(e,t){if(e=pa(e)){const n=zi.findKey(this,e);if(n){const e=this[n];if(!t)return e;if(!0===t)return function(e){const t=Object.create(null),n=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let r;for(;r=n.exec(e);)t[r[1]]=r[2];return t}(e);if(zi.isFunction(t))return t.call(this,e,n);if(zi.isRegExp(t))return t.exec(e);throw new TypeError("parser must be boolean|regexp|function")}}}has(e,t){if(e=pa(e)){const n=zi.findKey(this,e);return!(!n||void 0===this[n]||t&&!ha(0,this[n],n,t))}return!1}delete(e,t){const n=this;let r=!1;function o(e){if(e=pa(e)){const o=zi.findKey(n,e);!o||t&&!ha(0,n[o],o,t)||(delete n[o],r=!0)}}return zi.isArray(e)?e.forEach(o):o(e),r}clear(e){const t=Object.keys(this);let n=t.length,r=!1;for(;n--;){const o=t[n];e&&!ha(0,this[o],o,e,!0)||(delete this[o],r=!0)}return r}normalize(e){const t=this,n={};return zi.forEach(this,(r,o)=>{const i=zi.findKey(n,o);if(i)return t[i]=fa(r),void delete t[o];const a=e?function(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(e,t,n)=>t.toUpperCase()+n)}(o):String(o).trim();a!==o&&delete t[o],t[a]=fa(r),n[a]=!0}),this}concat(...e){return this.constructor.concat(this,...e)}toJSON(e){const t=Object.create(null);return zi.forEach(this,(n,r)=>{null!=n&&!1!==n&&(t[r]=e&&zi.isArray(n)?n.join(", "):n)}),t}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([e,t])=>e+": "+t).join("\n")}getSetCookie(){return this.get("set-cookie")||[]}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(e){return e instanceof this?e:new this(e)}static concat(e,...t){const n=new this(e);return t.forEach(e=>n.set(e)),n}static accessor(e){const t=(this[da]=this[da]={accessors:{}}).accessors,n=this.prototype;function r(e){const r=pa(e);t[r]||(!function(e,t){const n=zi.toCamelCase(" "+t);["get","set","has"].forEach(r=>{Object.defineProperty(e,r+n,{value:function(e,n,o){return this[r].call(this,t,e,n,o)},configurable:!0})})}(n,e),t[r]=!0)}return zi.isArray(e)?e.forEach(r):r(e),this}};function ga(e,t){const n=this||ua,r=t||n,o=ma.from(r.headers);let i=r.data;return zi.forEach(e,function(e){i=e.call(n,i,o.normalize(),t?t.status:void 0)}),o.normalize(),i}function va(e){return!(!e||!e.__CANCEL__)}function ya(e,t,n){Bi.call(this,null==e?"canceled":e,Bi.ERR_CANCELED,t,n),this.name="CanceledError"}function ba(e,t,n){const r=n.config.validateStatus;n.status&&r&&!r(n.status)?t(new Bi("Request failed with status code "+n.status,[Bi.ERR_BAD_REQUEST,Bi.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n)):e(n)}ma.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),zi.reduceDescriptors(ma.prototype,({value:e},t)=>{let n=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(e){this[n]=e}}}),zi.freezeMethods(ma),zi.inherits(ya,Bi,{__CANCEL__:!0});const wa=(e,t,n=3)=>{let r=0;const o=function(e,t){e=e||10;const n=new Array(e),r=new Array(e);let o,i=0,a=0;return t=void 0!==t?t:1e3,function(s){const l=Date.now(),u=r[a];o||(o=l),n[i]=s,r[i]=l;let c=a,d=0;for(;c!==i;)d+=n[c++],c%=e;if(i=(i+1)%e,i===a&&(a=(a+1)%e),l-o<t)return;const p=u&&l-u;return p?Math.round(1e3*d/p):void 0}}(50,250);return function(e,t){let n,r,o=0,i=1e3/t;const a=(t,i=Date.now())=>{o=i,n=null,r&&(clearTimeout(r),r=null),e.apply(null,t)};return[(...e)=>{const t=Date.now(),s=t-o;s>=i?a(e,t):(n=e,r||(r=setTimeout(()=>{r=null,a(n)},i-s)))},()=>n&&a(n)]}(n=>{const i=n.loaded,a=n.lengthComputable?n.total:void 0,s=i-r,l=o(s);r=i;e({loaded:i,total:a,progress:a?i/a:void 0,bytes:s,rate:l||void 0,estimated:l&&a&&i<=a?(a-i)/l:void 0,event:n,lengthComputable:null!=a,[t?"download":"upload"]:!0})},n)},xa=(e,t)=>{const n=null!=e;return[r=>t[0]({lengthComputable:n,total:e,loaded:r}),t[1]]},ka=e=>(...t)=>zi.asap(()=>e(...t));var Sa=sa.hasStandardBrowserEnv?((e,t)=>n=>(n=new URL(n,sa.origin),e.protocol===n.protocol&&e.host===n.host&&(t||e.port===n.port)))(new URL(sa.origin),sa.navigator&&/(msie|trident)/i.test(sa.navigator.userAgent)):()=>!0,Ea=sa.hasStandardBrowserEnv?{write(e,t,n,r,o,i){const a=[e+"="+encodeURIComponent(t)];zi.isNumber(n)&&a.push("expires="+new Date(n).toGMTString()),zi.isString(r)&&a.push("path="+r),zi.isString(o)&&a.push("domain="+o),!0===i&&a.push("secure"),document.cookie=a.join("; ")},read(e){const t=document.cookie.match(new RegExp("(^|;\\s*)("+e+")=([^;]*)"));return t?decodeURIComponent(t[3]):null},remove(e){this.write(e,"",Date.now()-864e5)}}:{write(){},read:()=>null,remove(){}};function Ca(e,t,n){let r=!/^([a-z][a-z\d+\-.]*:)?\/\//i.test(t);return e&&(r||0==n)?function(e,t){return t?e.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):e}(e,t):t}const Oa=e=>e instanceof ma?{...e}:e;function Ta(e,t){t=t||{};const n={};function r(e,t,n,r){return zi.isPlainObject(e)&&zi.isPlainObject(t)?zi.merge.call({caseless:r},e,t):zi.isPlainObject(t)?zi.merge({},t):zi.isArray(t)?t.slice():t}function o(e,t,n,o){return zi.isUndefined(t)?zi.isUndefined(e)?void 0:r(void 0,e,0,o):r(e,t,0,o)}function i(e,t){if(!zi.isUndefined(t))return r(void 0,t)}function a(e,t){return zi.isUndefined(t)?zi.isUndefined(e)?void 0:r(void 0,e):r(void 0,t)}function s(n,o,i){return i in t?r(n,o):i in e?r(void 0,n):void 0}const l={url:i,method:i,data:i,baseURL:a,transformRequest:a,transformResponse:a,paramsSerializer:a,timeout:a,timeoutMessage:a,withCredentials:a,withXSRFToken:a,adapter:a,responseType:a,xsrfCookieName:a,xsrfHeaderName:a,onUploadProgress:a,onDownloadProgress:a,decompress:a,maxContentLength:a,maxBodyLength:a,beforeRedirect:a,transport:a,httpAgent:a,httpsAgent:a,cancelToken:a,socketPath:a,responseEncoding:a,validateStatus:s,headers:(e,t,n)=>o(Oa(e),Oa(t),0,!0)};return zi.forEach(Object.keys(Object.assign({},e,t)),function(r){const i=l[r]||o,a=i(e[r],t[r],r);zi.isUndefined(a)&&i!==s||(n[r]=a)}),n}var _a=e=>{const t=Ta({},e);let n,{data:r,withXSRFToken:o,xsrfHeaderName:i,xsrfCookieName:a,headers:s,auth:l}=t;if(t.headers=s=ma.from(s),t.url=Ji(Ca(t.baseURL,t.url,t.allowAbsoluteUrls),e.params,e.paramsSerializer),l&&s.set("Authorization","Basic "+btoa((l.username||"")+":"+(l.password?unescape(encodeURIComponent(l.password)):""))),zi.isFormData(r))if(sa.hasStandardBrowserEnv||sa.hasStandardBrowserWebWorkerEnv)s.setContentType(void 0);else if(!1!==(n=s.getContentType())){const[e,...t]=n?n.split(";").map(e=>e.trim()).filter(Boolean):[];s.setContentType([e||"multipart/form-data",...t].join("; "))}if(sa.hasStandardBrowserEnv&&(o&&zi.isFunction(o)&&(o=o(t)),o||!1!==o&&Sa(t.url))){const e=i&&a&&Ea.read(a);e&&s.set(i,e)}return t};var Ra="undefined"!=typeof XMLHttpRequest&&function(e){return new Promise(function(t,n){const r=_a(e);let o=r.data;const i=ma.from(r.headers).normalize();let a,s,l,u,c,{responseType:d,onUploadProgress:p,onDownloadProgress:f}=r;function h(){u&&u(),c&&c(),r.cancelToken&&r.cancelToken.unsubscribe(a),r.signal&&r.signal.removeEventListener("abort",a)}let m=new XMLHttpRequest;function g(){if(!m)return;const r=ma.from("getAllResponseHeaders"in m&&m.getAllResponseHeaders());ba(function(e){t(e),h()},function(e){n(e),h()},{data:d&&"text"!==d&&"json"!==d?m.response:m.responseText,status:m.status,statusText:m.statusText,headers:r,config:e,request:m}),m=null}m.open(r.method.toUpperCase(),r.url,!0),m.timeout=r.timeout,"onloadend"in m?m.onloadend=g:m.onreadystatechange=function(){m&&4===m.readyState&&(0!==m.status||m.responseURL&&0===m.responseURL.indexOf("file:"))&&setTimeout(g)},m.onabort=function(){m&&(n(new Bi("Request aborted",Bi.ECONNABORTED,e,m)),m=null)},m.onerror=function(){n(new Bi("Network Error",Bi.ERR_NETWORK,e,m)),m=null},m.ontimeout=function(){let t=r.timeout?"timeout of "+r.timeout+"ms exceeded":"timeout exceeded";const o=r.transitional||ea;r.timeoutErrorMessage&&(t=r.timeoutErrorMessage),n(new Bi(t,o.clarifyTimeoutError?Bi.ETIMEDOUT:Bi.ECONNABORTED,e,m)),m=null},void 0===o&&i.setContentType(null),"setRequestHeader"in m&&zi.forEach(i.toJSON(),function(e,t){m.setRequestHeader(t,e)}),zi.isUndefined(r.withCredentials)||(m.withCredentials=!!r.withCredentials),d&&"json"!==d&&(m.responseType=r.responseType),f&&([l,c]=wa(f,!0),m.addEventListener("progress",l)),p&&m.upload&&([s,u]=wa(p),m.upload.addEventListener("progress",s),m.upload.addEventListener("loadend",u)),(r.cancelToken||r.signal)&&(a=t=>{m&&(n(!t||t.type?new ya(null,e,m):t),m.abort(),m=null)},r.cancelToken&&r.cancelToken.subscribe(a),r.signal&&(r.signal.aborted?a():r.signal.addEventListener("abort",a)));const v=function(e){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}(r.url);v&&-1===sa.protocols.indexOf(v)?n(new Bi("Unsupported protocol "+v+":",Bi.ERR_BAD_REQUEST,e)):m.send(o||null)})};const Pa=(e,t)=>{const{length:n}=e=e?e.filter(Boolean):[];if(t||n){let n,r=new AbortController;const o=function(e){if(!n){n=!0,a();const t=e instanceof Error?e:this.reason;r.abort(t instanceof Bi?t:new ya(t instanceof Error?t.message:t))}};let i=t&&setTimeout(()=>{i=null,o(new Bi(`timeout ${t} of ms exceeded`,Bi.ETIMEDOUT))},t);const a=()=>{e&&(i&&clearTimeout(i),i=null,e.forEach(e=>{e.unsubscribe?e.unsubscribe(o):e.removeEventListener("abort",o)}),e=null)};e.forEach(e=>e.addEventListener("abort",o));const{signal:s}=r;return s.unsubscribe=()=>zi.asap(a),s}},Aa=function*(e,t){let n=e.byteLength;if(n<t)return void(yield e);let r,o=0;for(;o<n;)r=o+t,yield e.slice(o,r),o=r},La=async function*(e){if(e[Symbol.asyncIterator])return void(yield*e);const t=e.getReader();try{for(;;){const{done:e,value:n}=await t.read();if(e)break;yield n}}finally{await t.cancel()}},Na=(e,t,n,r)=>{const o=async function*(e,t){for await(const n of La(e))yield*Aa(n,t)}(e,t);let i,a=0,s=e=>{i||(i=!0,r&&r(e))};return new ReadableStream({async pull(e){try{const{done:t,value:r}=await o.next();if(t)return s(),void e.close();let i=r.byteLength;if(n){let e=a+=i;n(e)}e.enqueue(new Uint8Array(r))}catch(e){throw s(e),e}},cancel:e=>(s(e),o.return())},{highWaterMark:2})},Ma="function"==typeof fetch&&"function"==typeof Request&&"function"==typeof Response,Ia=Ma&&"function"==typeof ReadableStream,Fa=Ma&&("function"==typeof TextEncoder?($a=new TextEncoder,e=>$a.encode(e)):async e=>new Uint8Array(await new Response(e).arrayBuffer()));var $a;const ja=(e,...t)=>{try{return!!e(...t)}catch(e){return!1}},za=Ia&&ja(()=>{let e=!1;const t=new Request(sa.origin,{body:new ReadableStream,method:"POST",get duplex(){return e=!0,"half"}}).headers.has("Content-Type");return e&&!t}),Ba=Ia&&ja(()=>zi.isReadableStream(new Response("").body)),Da={stream:Ba&&(e=>e.body)};var Wa;Ma&&(Wa=new Response,["text","arrayBuffer","blob","formData","stream"].forEach(e=>{!Da[e]&&(Da[e]=zi.isFunction(Wa[e])?t=>t[e]():(t,n)=>{throw new Bi(`Response type '${e}' is not supported`,Bi.ERR_NOT_SUPPORT,n)})}));const Ua=async(e,t)=>{const n=zi.toFiniteNumber(e.getContentLength());return null==n?(async e=>{if(null==e)return 0;if(zi.isBlob(e))return e.size;if(zi.isSpecCompliantForm(e)){const t=new Request(sa.origin,{method:"POST",body:e});return(await t.arrayBuffer()).byteLength}return zi.isArrayBufferView(e)||zi.isArrayBuffer(e)?e.byteLength:(zi.isURLSearchParams(e)&&(e+=""),zi.isString(e)?(await Fa(e)).byteLength:void 0)})(t):n};var Va=Ma&&(async e=>{let{url:t,method:n,data:r,signal:o,cancelToken:i,timeout:a,onDownloadProgress:s,onUploadProgress:l,responseType:u,headers:c,withCredentials:d="same-origin",fetchOptions:p}=_a(e);u=u?(u+"").toLowerCase():"text";let f,h=Pa([o,i&&i.toAbortSignal()],a);const m=h&&h.unsubscribe&&(()=>{h.unsubscribe()});let g;try{if(l&&za&&"get"!==n&&"head"!==n&&0!==(g=await Ua(c,r))){let e,n=new Request(t,{method:"POST",body:r,duplex:"half"});if(zi.isFormData(r)&&(e=n.headers.get("content-type"))&&c.setContentType(e),n.body){const[e,t]=xa(g,wa(ka(l)));r=Na(n.body,65536,e,t)}}zi.isString(d)||(d=d?"include":"omit");const o="credentials"in Request.prototype;f=new Request(t,{...p,signal:h,method:n.toUpperCase(),headers:c.normalize().toJSON(),body:r,duplex:"half",credentials:o?d:void 0});let i=await fetch(f,p);const a=Ba&&("stream"===u||"response"===u);if(Ba&&(s||a&&m)){const e={};["status","statusText","headers"].forEach(t=>{e[t]=i[t]});const t=zi.toFiniteNumber(i.headers.get("content-length")),[n,r]=s&&xa(t,wa(ka(s),!0))||[];i=new Response(Na(i.body,65536,n,()=>{r&&r(),m&&m()}),e)}u=u||"text";let v=await Da[zi.findKey(Da,u)||"text"](i,e);return!a&&m&&m(),await new Promise((t,n)=>{ba(t,n,{data:v,headers:ma.from(i.headers),status:i.status,statusText:i.statusText,config:e,request:f})})}catch(t){if(m&&m(),t&&"TypeError"===t.name&&/Load failed|fetch/i.test(t.message))throw Object.assign(new Bi("Network Error",Bi.ERR_NETWORK,e,f),{cause:t.cause||t});throw Bi.from(t,t&&t.code,e,f)}});const Ka={http:null,xhr:Ra,fetch:Va};zi.forEach(Ka,(e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch(e){}Object.defineProperty(e,"adapterName",{value:t})}});const Ha=e=>`- ${e}`,qa=e=>zi.isFunction(e)||null===e||!1===e;var Ga=e=>{e=zi.isArray(e)?e:[e];const{length:t}=e;let n,r;const o={};for(let i=0;i<t;i++){let t;if(n=e[i],r=n,!qa(n)&&(r=Ka[(t=String(n)).toLowerCase()],void 0===r))throw new Bi(`Unknown adapter '${t}'`);if(r)break;o[t||"#"+i]=r}if(!r){const e=Object.entries(o).map(([e,t])=>`adapter ${e} `+(!1===t?"is not supported by the environment":"is not available in the build"));throw new Bi("There is no suitable adapter to dispatch the request "+(t?e.length>1?"since :\n"+e.map(Ha).join("\n"):" "+Ha(e[0]):"as no adapter specified"),"ERR_NOT_SUPPORT")}return r};function Ya(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new ya(null,e)}function Xa(e){Ya(e),e.headers=ma.from(e.headers),e.data=ga.call(e,e.transformRequest),-1!==["post","put","patch"].indexOf(e.method)&&e.headers.setContentType("application/x-www-form-urlencoded",!1);return Ga(e.adapter||ua.adapter)(e).then(function(t){return Ya(e),t.data=ga.call(e,e.transformResponse,t),t.headers=ma.from(t.headers),t},function(t){return va(t)||(Ya(e),t&&t.response&&(t.response.data=ga.call(e,e.transformResponse,t.response),t.response.headers=ma.from(t.response.headers))),Promise.reject(t)})}const Qa="1.10.0",Ja={};["object","boolean","number","function","string","symbol"].forEach((e,t)=>{Ja[e]=function(n){return typeof n===e||"a"+(t<1?"n ":" ")+e}});const Za={};Ja.transitional=function(e,t,n){function r(e,t){return"[Axios v"+Qa+"] Transitional option '"+e+"'"+t+(n?". "+n:"")}return(n,o,i)=>{if(!1===e)throw new Bi(r(o," has been removed"+(t?" in "+t:"")),Bi.ERR_DEPRECATED);return t&&!Za[o]&&(Za[o]=!0,console.warn(r(o," has been deprecated since v"+t+" and will be removed in the near future"))),!e||e(n,o,i)}},Ja.spelling=function(e){return(t,n)=>(console.warn(`${n} is likely a misspelling of ${e}`),!0)};var es={assertOptions:function(e,t,n){if("object"!=typeof e)throw new Bi("options must be an object",Bi.ERR_BAD_OPTION_VALUE);const r=Object.keys(e);let o=r.length;for(;o-- >0;){const i=r[o],a=t[i];if(a){const t=e[i],n=void 0===t||a(t,i,e);if(!0!==n)throw new Bi("option "+i+" must be "+n,Bi.ERR_BAD_OPTION_VALUE);continue}if(!0!==n)throw new Bi("Unknown option "+i,Bi.ERR_BAD_OPTION)}},validators:Ja};const ts=es.validators;let ns=class{constructor(e){this.defaults=e||{},this.interceptors={request:new Zi,response:new Zi}}async request(e,t){try{return await this._request(e,t)}catch(e){if(e instanceof Error){let t={};Error.captureStackTrace?Error.captureStackTrace(t):t=new Error;const n=t.stack?t.stack.replace(/^.+\n/,""):"";try{e.stack?n&&!String(e.stack).endsWith(n.replace(/^.+\n.+\n/,""))&&(e.stack+="\n"+n):e.stack=n}catch(e){}}throw e}}_request(e,t){"string"==typeof e?(t=t||{}).url=e:t=e||{},t=Ta(this.defaults,t);const{transitional:n,paramsSerializer:r,headers:o}=t;void 0!==n&&es.assertOptions(n,{silentJSONParsing:ts.transitional(ts.boolean),forcedJSONParsing:ts.transitional(ts.boolean),clarifyTimeoutError:ts.transitional(ts.boolean)},!1),null!=r&&(zi.isFunction(r)?t.paramsSerializer={serialize:r}:es.assertOptions(r,{encode:ts.function,serialize:ts.function},!0)),void 0!==t.allowAbsoluteUrls||(void 0!==this.defaults.allowAbsoluteUrls?t.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:t.allowAbsoluteUrls=!0),es.assertOptions(t,{baseUrl:ts.spelling("baseURL"),withXsrfToken:ts.spelling("withXSRFToken")},!0),t.method=(t.method||this.defaults.method||"get").toLowerCase();let i=o&&zi.merge(o.common,o[t.method]);o&&zi.forEach(["delete","get","head","post","put","patch","common"],e=>{delete o[e]}),t.headers=ma.concat(i,o);const a=[];let s=!0;this.interceptors.request.forEach(function(e){"function"==typeof e.runWhen&&!1===e.runWhen(t)||(s=s&&e.synchronous,a.unshift(e.fulfilled,e.rejected))});const l=[];let u;this.interceptors.response.forEach(function(e){l.push(e.fulfilled,e.rejected)});let c,d=0;if(!s){const e=[Xa.bind(this),void 0];for(e.unshift.apply(e,a),e.push.apply(e,l),c=e.length,u=Promise.resolve(t);d<c;)u=u.then(e[d++],e[d++]);return u}c=a.length;let p=t;for(d=0;d<c;){const e=a[d++],t=a[d++];try{p=e(p)}catch(e){t.call(this,e);break}}try{u=Xa.call(this,p)}catch(e){return Promise.reject(e)}for(d=0,c=l.length;d<c;)u=u.then(l[d++],l[d++]);return u}getUri(e){return Ji(Ca((e=Ta(this.defaults,e)).baseURL,e.url,e.allowAbsoluteUrls),e.params,e.paramsSerializer)}};zi.forEach(["delete","get","head","options"],function(e){ns.prototype[e]=function(t,n){return this.request(Ta(n||{},{method:e,url:t,data:(n||{}).data}))}}),zi.forEach(["post","put","patch"],function(e){function t(t){return function(n,r,o){return this.request(Ta(o||{},{method:e,headers:t?{"Content-Type":"multipart/form-data"}:{},url:n,data:r}))}}ns.prototype[e]=t(),ns.prototype[e+"Form"]=t(!0)});const rs={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(rs).forEach(([e,t])=>{rs[t]=e});const os=function e(t){const n=new ns(t),r=Zo(ns.prototype.request,n);return zi.extend(r,ns.prototype,n,{allOwnKeys:!0}),zi.extend(r,n,null,{allOwnKeys:!0}),r.create=function(n){return e(Ta(t,n))},r}(ua);os.Axios=ns,os.CanceledError=ya,os.CancelToken=class e{constructor(e){if("function"!=typeof e)throw new TypeError("executor must be a function.");let t;this.promise=new Promise(function(e){t=e});const n=this;this.promise.then(e=>{if(!n._listeners)return;let t=n._listeners.length;for(;t-- >0;)n._listeners[t](e);n._listeners=null}),this.promise.then=e=>{let t;const r=new Promise(e=>{n.subscribe(e),t=e}).then(e);return r.cancel=function(){n.unsubscribe(t)},r},e(function(e,r,o){n.reason||(n.reason=new ya(e,r,o),t(n.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(e){this.reason?e(this.reason):this._listeners?this._listeners.push(e):this._listeners=[e]}unsubscribe(e){if(!this._listeners)return;const t=this._listeners.indexOf(e);-1!==t&&this._listeners.splice(t,1)}toAbortSignal(){const e=new AbortController,t=t=>{e.abort(t)};return this.subscribe(t),e.signal.unsubscribe=()=>this.unsubscribe(t),e.signal}static source(){let t;return{token:new e(function(e){t=e}),cancel:t}}},os.isCancel=va,os.VERSION=Qa,os.toFormData=qi,os.AxiosError=Bi,os.Cancel=os.CanceledError,os.all=function(e){return Promise.all(e)},os.spread=function(e){return function(t){return e.apply(null,t)}},os.isAxiosError=function(e){return zi.isObject(e)&&!0===e.isAxiosError},os.mergeConfig=Ta,os.AxiosHeaders=ma,os.formToJSON=e=>la(zi.isHTMLForm(e)?new FormData(e):e),os.getAdapter=Ga,os.HttpStatusCode=rs,os.default=os;const{Axios:is,AxiosError:as,CanceledError:ss,isCancel:ls,CancelToken:us,VERSION:cs,all:ds,Cancel:ps,isAxiosError:fs,spread:hs,toFormData:ms,AxiosHeaders:gs,HttpStatusCode:vs,formToJSON:ys,getAdapter:bs,mergeConfig:ws}=os,xs="https://report-api.netcapital.pro",ks=os.create({baseURL:xs,headers:{"Content-Type":"application/json"}}),Ss={},Es=()=>{const e=Object.keys(Ss);return e.length>0?e[0]:null},Cs={setBaseUrl(e){ks.defaults.baseURL=e||xs},setToken(e){e&&(ks.defaults.headers.common.Authorization=`Bearer ${e}`)},loadDashboardMeta:async({dashboardId:e})=>{const{data:t}=await ks.get(`/dashboard-meta/${e}`);return Ss[e]={dashboards:t.dashboards||{},charts:t.charts||{},reports:t.reports||{},reportMetadata:t.reportMetadata||{},dateRanges:t.dateRanges||[]},Ss[e]},getDashboard:async({id:e,dashboardId:t})=>{const n=t||Es();if(n&&Ss[n]?.dashboards?.[e])return Ss[n].dashboards[e];const{data:r}=await ks.get(`/entity/dashboards/${e}`);return r},getChart:async({id:e,dashboardId:t})=>{const n=t||Es();if(n&&Ss[n]?.charts?.[e])return Ss[n].charts[e];const{data:r}=await ks.get(`/entity/charts/${e}`);return r},getReport:async({id:e,dashboardId:t})=>{const n=t||Es();if(n&&Ss[n]?.reports?.[e])return Ss[n].reports[e];const{data:r}=await ks.get(`/entity/reports/${e}`);return r},getReportSchema:async({id:e,dashboardId:t,query:n={}})=>{const r=t||Es();if(r&&Ss[r]?.reportMetadata?.[e])return Ss[r].reportMetadata[e];const{data:o}=await ks.post(`/reports/${e}/metadata`,n);return o},runReport:async({id:e,query:t={}})=>{const{data:n}=await ks.post(`/reports/${e}/run`,t);return n},getDateRanges:async({dashboardId:e}={})=>{const t=e||Es();if(t&&Ss[t]?.dateRanges)return Ss[t].dateRanges;const{data:n}=await ks.get("/globals/date-ranges");return n}},Os=So(e=>({headerRow:{fontFamily:e.typography.fontFamily,fontSize:e.typography.fontSize},tableRow:{fontFamily:e.typography.fontFamily,fontSize:e.typography.fontSize},oddTableRow:{fontFamily:e.typography.fontFamily,fontSize:e.typography.fontSize},headerCell:{backgroundColor:"white",padding:"4px !important"}})),Ts={none:"YYYY-MM-dd",day:"MMM dd",week:"MMM dd",month:"YYYY MMM",year:"YYYY"};var _s={h1:"h1",h2:"h2",h3:"h3",h4:"h4",h5:"h5",h6:"h6",subtitle1:"h6",subtitle2:"h6",body1:"p",body2:"p"},Rs=l.forwardRef(function(e,t){var n=e.align,r=void 0===n?"inherit":n,o=e.classes,i=e.className,a=e.color,s=void 0===a?"initial":a,u=e.component,c=e.display,d=void 0===c?"initial":c,h=e.gutterBottom,g=void 0!==h&&h,v=e.noWrap,y=void 0!==v&&v,b=e.paragraph,w=void 0!==b&&b,x=e.variant,k=void 0===x?"body1":x,S=e.variantMapping,E=void 0===S?_s:S,C=p(e,["align","classes","className","color","component","display","gutterBottom","noWrap","paragraph","variant","variantMapping"]),O=u||(w?"p":E[k]||_s[k])||"span";return l.createElement(O,f({className:m(o.root,i,"inherit"!==k&&o[k],"initial"!==s&&o["color".concat(Co(s))],y&&o.noWrap,g&&o.gutterBottom,w&&o.paragraph,"inherit"!==r&&o["align".concat(Co(r))],"initial"!==d&&o["display".concat(Co(d))]),ref:t},C))}),Ps=bo(function(e){return{root:{margin:0},body2:e.typography.body2,body1:e.typography.body1,caption:e.typography.caption,button:e.typography.button,h1:e.typography.h1,h2:e.typography.h2,h3:e.typography.h3,h4:e.typography.h4,h5:e.typography.h5,h6:e.typography.h6,subtitle1:e.typography.subtitle1,subtitle2:e.typography.subtitle2,overline:e.typography.overline,srOnly:{position:"absolute",height:1,width:1,overflow:"hidden"},alignLeft:{textAlign:"left"},alignCenter:{textAlign:"center"},alignRight:{textAlign:"right"},alignJustify:{textAlign:"justify"},noWrap:{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},gutterBottom:{marginBottom:"0.35em"},paragraph:{marginBottom:16},colorInherit:{color:"inherit"},colorPrimary:{color:e.palette.primary.main},colorSecondary:{color:e.palette.secondary.main},colorTextPrimary:{color:e.palette.text.primary},colorTextSecondary:{color:e.palette.text.secondary},colorError:{color:e.palette.error.main},displayInline:{display:"inline"},displayBlock:{display:"block"}}},{name:"MuiTypography"})(Rs),As="undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{};function Ls(){throw new Error("setTimeout has not been defined")}function Ns(){throw new Error("clearTimeout has not been defined")}var Ms=Ls,Is=Ns;function Fs(e){if(Ms===setTimeout)return setTimeout(e,0);if((Ms===Ls||!Ms)&&setTimeout)return Ms=setTimeout,setTimeout(e,0);try{return Ms(e,0)}catch(t){try{return Ms.call(null,e,0)}catch(t){return Ms.call(this,e,0)}}}"function"==typeof As.setTimeout&&(Ms=setTimeout),"function"==typeof As.clearTimeout&&(Is=clearTimeout);var $s,js=[],zs=!1,Bs=-1;function Ds(){zs&&$s&&(zs=!1,$s.length?js=$s.concat(js):Bs=-1,js.length&&Ws())}function Ws(){if(!zs){var e=Fs(Ds);zs=!0;for(var t=js.length;t;){for($s=js,js=[];++Bs<t;)$s&&$s[Bs].run();Bs=-1,t=js.length}$s=null,zs=!1,function(e){if(Is===clearTimeout)return clearTimeout(e);if((Is===Ns||!Is)&&clearTimeout)return Is=clearTimeout,clearTimeout(e);try{return Is(e)}catch(t){try{return Is.call(null,e)}catch(t){return Is.call(this,e)}}}(e)}}function Us(e,t){this.fun=e,this.array=t}Us.prototype.run=function(){this.fun.apply(null,this.array)};function Vs(){}var Ks=Vs,Hs=Vs,qs=Vs,Gs=Vs,Ys=Vs,Xs=Vs,Qs=Vs;var Js=As.performance||{},Zs=Js.now||Js.mozNow||Js.msNow||Js.oNow||Js.webkitNow||function(){return(new Date).getTime()};var el=new Date;var tl,nl={nextTick:function(e){var t=new Array(arguments.length-1);if(arguments.length>1)for(var n=1;n<arguments.length;n++)t[n-1]=arguments[n];js.push(new Us(e,t)),1!==js.length||zs||Fs(Ws)},title:"browser",browser:!0,env:{},argv:[],version:"",versions:{},on:Ks,addListener:Hs,once:qs,off:Gs,removeListener:Ys,removeAllListeners:Xs,emit:Qs,binding:function(e){throw new Error("process.binding is not supported")},cwd:function(){return"/"},chdir:function(e){throw new Error("process.chdir is not supported")},umask:function(){return 0},hrtime:function(e){var t=.001*Zs.call(Js),n=Math.floor(t),r=Math.floor(t%1*1e9);return e&&(n-=e[0],(r-=e[1])<0&&(n--,r+=1e9)),[n,r]},platform:"browser",release:{},config:{},uptime:function(){return(new Date-el)/1e3}},rl={exports:{}};var ol=(tl||(tl=1,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 o=t[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,n),o.l=!0,o.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=11)}([function(e,t,n){var r=Array.prototype,o=Object.prototype,i={"&":"&amp;",'"':"&quot;","'":"&#39;","<":"&lt;",">":"&gt;","\\":"&#92;"},a=/[&"'<>\\]/g;function s(e,t){return o.hasOwnProperty.call(e,t)}function l(e){return i[e]}function u(e,t,n){var r,o,i;if(e instanceof Error&&(e=(o=e).name+": "+o.message),Object.setPrototypeOf?(r=new Error(e),Object.setPrototypeOf(r,u.prototype)):(r=this,Object.defineProperty(r,"message",{enumerable:!1,writable:!0,value:e})),Object.defineProperty(r,"name",{value:"Template render error"}),Error.captureStackTrace&&Error.captureStackTrace(r,this.constructor),o){var a=Object.getOwnPropertyDescriptor(o,"stack");(i=a&&(a.get||function(){return a.value}))||(i=function(){return o.stack})}else{var s=new Error(e).stack;i=function(){return s}}return Object.defineProperty(r,"stack",{get:function(){return i.call(r)}}),Object.defineProperty(r,"cause",{value:o}),r.lineno=t,r.colno=n,r.firstUpdate=!0,r.Update=function(e){var t="("+(e||"unknown path")+")";return this.firstUpdate&&(this.lineno&&this.colno?t+=" [Line "+this.lineno+", Column "+this.colno+"]":this.lineno&&(t+=" [Line "+this.lineno+"]")),t+="\n ",this.firstUpdate&&(t+=" "),this.message=t+(this.message||""),this.firstUpdate=!1,this},r}function c(e){return"[object Function]"===o.toString.call(e)}function d(e){return"[object Array]"===o.toString.call(e)}function p(e){return"[object String]"===o.toString.call(e)}function f(e){return"[object Object]"===o.toString.call(e)}function h(e){var t,n=(t=e)?"string"==typeof t?t.split("."):[t]:[];return function(e){for(var t=e,r=0;r<n.length;r++){var o=n[r];if(!s(t,o))return;t=t[o]}return t}}function m(e){return Array.prototype.slice.call(e)}function g(e,t,n){return Array.prototype.indexOf.call(e||[],t,n)}function v(e){var t=[];for(var n in e)s(e,n)&&t.push(n);return t}(t=e.exports={}).hasOwnProp=s,t._prettifyError=function(e,n,r){if(r.Update||(r=new t.TemplateError(r)),r.Update(e),!n){var o=r;(r=new Error(o.message)).name=o.name}return r},Object.setPrototypeOf?Object.setPrototypeOf(u.prototype,Error.prototype):u.prototype=Object.create(Error.prototype,{constructor:{value:u}}),t.TemplateError=u,t.escape=function(e){return e.replace(a,l)},t.isFunction=c,t.isArray=d,t.isString=p,t.isObject=f,t.getAttrGetter=h,t.groupBy=function(e,t,n){for(var r={},o=c(t)?t:h(t),i=0;i<e.length;i++){var a=e[i],s=o(a,i);if(void 0===s&&!0===n)throw new TypeError('groupby: attribute "'+t+'" resolved to undefined');(r[s]||(r[s]=[])).push(a)}return r},t.toArray=m,t.without=function(e){var t=[];if(!e)return t;for(var n=e.length,r=m(arguments).slice(1),o=-1;++o<n;)-1===g(r,e[o])&&t.push(e[o]);return t},t.repeat=function(e,t){for(var n="",r=0;r<t;r++)n+=e;return n},t.each=function(e,t,n){if(null!=e)if(r.forEach&&e.forEach===r.forEach)e.forEach(t,n);else if(e.length===+e.length)for(var o=0,i=e.length;o<i;o++)t.call(n,e[o],o,e)},t.map=function(e,t){var n=[];if(null==e)return n;if(r.map&&e.map===r.map)return e.map(t);for(var o=0;o<e.length;o++)n[n.length]=t(e[o],o);return e.length===+e.length&&(n.length=e.length),n},t.asyncIter=function(e,t,n){var r=-1;!function o(){++r<e.length?t(e[r],r,o,n):n()}()},t.asyncFor=function(e,t,n){var r=v(e||{}),o=r.length,i=-1;!function a(){i++;var s=r[i];i<o?t(s,e[s],i,o,a):n()}()},t.indexOf=g,t.keys=v,t._entries=function(e){return v(e).map(function(t){return[t,e[t]]})},t._values=function(e){return v(e).map(function(t){return e[t]})},t._assign=t.extend=function(e,t){return e=e||{},v(t).forEach(function(n){e[n]=t[n]}),e},t.inOperator=function(e,t){if(d(t)||p(t))return-1!==t.indexOf(e);if(f(t))return e in t;throw new Error('Cannot use "in" operator to search for "'+e+'" in unexpected types.')}},function(e,t,n){function r(e,t,n){return t&&function(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,o(r.key),r)}}(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function o(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);if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e,"string");return"symbol"==typeof t?t:String(t)}function i(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,a(e,t)}function a(e,t){return a=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},a(e,t)}var s=n(16),l=n(0);function u(e,t,n){n=n||{},l.keys(n).forEach(function(t){var r,o;n[t]=(r=e.prototype[t],o=n[t],"function"!=typeof r||"function"!=typeof o?o:function(){var e=this.parent;this.parent=r;var t=o.apply(this,arguments);return this.parent=e,t})});var o=function(e){function n(){return e.apply(this,arguments)||this}return i(n,e),r(n,[{key:"typename",get:function(){return t}}]),n}(e);return l._assign(o.prototype,n),o}var c=function(){function e(){this.init.apply(this,arguments)}return e.prototype.init=function(){},e.extend=function(e,t){return"object"==typeof e&&(t=e,e="anonymous"),u(this,e,t)},r(e,[{key:"typename",get:function(){return this.constructor.name}}]),e}(),d=function(e){function t(){var t,n;return(t=n=e.call(this)||this).init.apply(t,arguments),n}return i(t,e),t.prototype.init=function(){},t.extend=function(e,t){return"object"==typeof e&&(t=e,e="anonymous"),u(this,e,t)},r(t,[{key:"typename",get:function(){return this.constructor.name}}]),t}(s);e.exports={Obj:c,EmitterObj:d}},function(e,t,n){var r=n(0),o=Array.from,i="function"==typeof Symbol&&Symbol.iterator&&"function"==typeof o,a=function(){function e(e,t){this.variables=Object.create(null),this.parent=e,this.topLevel=!1,this.isolateWrites=t}var t=e.prototype;return t.set=function(e,t,n){var r=e.split("."),o=this.variables,i=this;if(n&&(i=this.resolve(r[0],!0)))i.set(e,t);else{for(var a=0;a<r.length-1;a++){var s=r[a];o[s]||(o[s]={}),o=o[s]}o[r[r.length-1]]=t}},t.get=function(e){var t=this.variables[e];return void 0!==t?t:null},t.lookup=function(e){var t=this.parent,n=this.variables[e];return void 0!==n?n:t&&t.lookup(e)},t.resolve=function(e,t){var n=t&&this.isolateWrites?void 0:this.parent;return void 0!==this.variables[e]?this:n&&n.resolve(e)},t.push=function(t){return new e(this,t)},t.pop=function(){return this.parent},e}();function s(e){return e&&Object.prototype.hasOwnProperty.call(e,"__keywords")}function l(e){var t=e.length;return 0===t?0:s(e[t-1])?t-1:t}function u(e){if("string"!=typeof e)return e;this.val=e,this.length=e.length}u.prototype=Object.create(String.prototype,{length:{writable:!0,configurable:!0,value:0}}),u.prototype.valueOf=function(){return this.val},u.prototype.toString=function(){return this.val},e.exports={Frame:a,makeMacro:function(e,t,n){return function(){for(var r=arguments.length,o=new Array(r),i=0;i<r;i++)o[i]=arguments[i];var a,u=l(o),c=function(e){var t=e.length;if(t){var n=e[t-1];if(s(n))return n}return{}}(o);if(u>e.length)a=o.slice(0,e.length),o.slice(a.length,u).forEach(function(e,n){n<t.length&&(c[t[n]]=e)}),a.push(c);else if(u<e.length){a=o.slice(0,u);for(var d=u;d<e.length;d++){var p=e[d];a.push(c[p]),delete c[p]}a.push(c)}else a=o;return n.apply(this,a)}},makeKeywordArgs:function(e){return e.__keywords=!0,e},numArgs:l,suppressValue:function(e,t){return e=null!=e?e:"",!t||e instanceof u||(e=r.escape(e.toString())),e},ensureDefined:function(e,t,n){if(null==e)throw new r.TemplateError("attempted to output null or undefined value",t+1,n+1);return e},memberLookup:function(e,t){if(null!=e)return"function"==typeof e[t]?function(){for(var n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];return e[t].apply(e,r)}:e[t]},contextOrFrameLookup:function(e,t,n){var r=t.lookup(n);return void 0!==r?r:e.lookup(n)},callWrap:function(e,t,n,r){if(!e)throw new Error("Unable to call `"+t+"`, which is undefined or falsey");if("function"!=typeof e)throw new Error("Unable to call `"+t+"`, which is not a function");return e.apply(n,r)},handleError:function(e,t,n){return e.lineno?e:new r.TemplateError(e,t,n)},isArray:r.isArray,keys:r.keys,SafeString:u,copySafeness:function(e,t){return e instanceof u?new u(t):t.toString()},markSafe:function(e){var t=typeof e;return"string"===t?new u(e):"function"!==t?e:function(t){var n=e.apply(this,arguments);return"string"==typeof n?new u(n):n}},asyncEach:function(e,t,n,o){if(r.isArray(e)){var i=e.length;r.asyncIter(e,function(e,r,o){switch(t){case 1:n(e,r,i,o);break;case 2:n(e[0],e[1],r,i,o);break;case 3:n(e[0],e[1],e[2],r,i,o);break;default:e.push(r,i,o),n.apply(this,e)}},o)}else r.asyncFor(e,function(e,t,r,o,i){n(e,t,r,o,i)},o)},asyncAll:function(e,t,n,o){var i,a,s=0;function l(e,t){s++,a[e]=t,s===i&&o(null,a.join(""))}if(r.isArray(e))if(i=e.length,a=new Array(i),0===i)o(null,"");else for(var u=0;u<e.length;u++){var c=e[u];switch(t){case 1:n(c,u,i,l);break;case 2:n(c[0],c[1],u,i,l);break;case 3:n(c[0],c[1],c[2],u,i,l);break;default:c.push(u,i,l),n.apply(this,c)}}else{var d=r.keys(e||{});if(i=d.length,a=new Array(i),0===i)o(null,"");else for(var p=0;p<d.length;p++){var f=d[p];n(f,e[f],p,i,l)}}},inOperator:r.inOperator,fromIterator:function(e){return"object"!=typeof e||null===e||r.isArray(e)?e:i&&Symbol.iterator in e?o(e):e}}},function(e,t,n){function r(e,t,n){return t&&function(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,o(r.key),r)}}(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function o(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);if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e,"string");return"symbol"==typeof t?t:String(t)}function i(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,a(e,t)}function a(e,t){return a=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},a(e,t)}function s(e,t,n){e instanceof t&&n.push(e),e instanceof l&&e.findAll(t,n)}var l=function(e){function t(){return e.apply(this,arguments)||this}i(t,e);var n=t.prototype;return n.init=function(e,t){for(var n=arguments,r=this,o=arguments.length,i=new Array(o>2?o-2:0),a=2;a<o;a++)i[a-2]=arguments[a];this.lineno=e,this.colno=t,this.fields.forEach(function(e,t){var o=n[t+2];void 0===o&&(o=null),r[e]=o})},n.findAll=function(e,t){var n=this;return t=t||[],this instanceof c?this.children.forEach(function(n){return s(n,e,t)}):this.fields.forEach(function(r){return s(n[r],e,t)}),t},n.iterFields=function(e){var t=this;this.fields.forEach(function(n){e(t[n],n)})},t}(n(1).Obj),u=function(e){function t(){return e.apply(this,arguments)||this}return i(t,e),r(t,[{key:"typename",get:function(){return"Value"}},{key:"fields",get:function(){return["value"]}}]),t}(l),c=function(e){function t(){return e.apply(this,arguments)||this}i(t,e);var n=t.prototype;return n.init=function(t,n,r){e.prototype.init.call(this,t,n,r||[])},n.addChild=function(e){this.children.push(e)},r(t,[{key:"typename",get:function(){return"NodeList"}},{key:"fields",get:function(){return["children"]}}]),t}(l),d=c.extend("Root"),p=u.extend("Literal"),f=u.extend("Symbol"),h=c.extend("Group"),m=c.extend("Array"),g=l.extend("Pair",{fields:["key","value"]}),v=c.extend("Dict"),y=l.extend("LookupVal",{fields:["target","val"]}),b=l.extend("If",{fields:["cond","body","else_"]}),w=b.extend("IfAsync"),x=l.extend("InlineIf",{fields:["cond","body","else_"]}),k=l.extend("For",{fields:["arr","name","body","else_"]}),S=k.extend("AsyncEach"),E=k.extend("AsyncAll"),C=l.extend("Macro",{fields:["name","args","body"]}),O=C.extend("Caller"),T=l.extend("Import",{fields:["template","target","withContext"]}),_=function(e){function t(){return e.apply(this,arguments)||this}return i(t,e),t.prototype.init=function(t,n,r,o,i){e.prototype.init.call(this,t,n,r,o||new c,i)},r(t,[{key:"typename",get:function(){return"FromImport"}},{key:"fields",get:function(){return["template","names","withContext"]}}]),t}(l),R=l.extend("FunCall",{fields:["name","args"]}),P=R.extend("Filter"),A=P.extend("FilterAsync",{fields:["name","args","symbol"]}),L=v.extend("KeywordArgs"),N=l.extend("Block",{fields:["name","body"]}),M=l.extend("Super",{fields:["blockName","symbol"]}),I=l.extend("TemplateRef",{fields:["template"]}).extend("Extends"),F=l.extend("Include",{fields:["template","ignoreMissing"]}),$=l.extend("Set",{fields:["targets","value"]}),j=l.extend("Switch",{fields:["expr","cases","default"]}),z=l.extend("Case",{fields:["cond","body"]}),B=c.extend("Output"),D=l.extend("Capture",{fields:["body"]}),W=p.extend("TemplateData"),U=l.extend("UnaryOp",{fields:["target"]}),V=l.extend("BinOp",{fields:["left","right"]}),K=V.extend("In"),H=V.extend("Is"),q=V.extend("Or"),G=V.extend("And"),Y=U.extend("Not"),X=V.extend("Add"),Q=V.extend("Concat"),J=V.extend("Sub"),Z=V.extend("Mul"),ee=V.extend("Div"),te=V.extend("FloorDiv"),ne=V.extend("Mod"),re=V.extend("Pow"),oe=U.extend("Neg"),ie=U.extend("Pos"),ae=l.extend("Compare",{fields:["expr","ops"]}),se=l.extend("CompareOperand",{fields:["expr","type"]}),le=l.extend("CallExtension",{init:function(e,t,n,r){this.parent(),this.extName=e.__name||e,this.prop=t,this.args=n||new c,this.contentArgs=r||[],this.autoescape=e.autoescape},fields:["extName","prop","args","contentArgs"]}),ue=le.extend("CallExtensionAsync");function ce(e,t,n){var r=e.split("\n");r.forEach(function(e,o){e&&(n&&o>0||!n)&&nl.stdout.write(" ".repeat(t));var i=o===r.length-1?"":"\n";nl.stdout.write(""+e+i)})}e.exports={Node:l,Root:d,NodeList:c,Value:u,Literal:p,Symbol:f,Group:h,Array:m,Pair:g,Dict:v,Output:B,Capture:D,TemplateData:W,If:b,IfAsync:w,InlineIf:x,For:k,AsyncEach:S,AsyncAll:E,Macro:C,Caller:O,Import:T,FromImport:_,FunCall:R,Filter:P,FilterAsync:A,KeywordArgs:L,Block:N,Super:M,Extends:I,Include:F,Set:$,Switch:j,Case:z,LookupVal:y,BinOp:V,In:K,Is:H,Or:q,And:G,Not:Y,Add:X,Concat:Q,Sub:J,Mul:Z,Div:ee,FloorDiv:te,Mod:ne,Pow:re,Neg:oe,Pos:ie,Compare:ae,CompareOperand:se,CallExtension:le,CallExtensionAsync:ue,printNodes:function e(t,n){if(n=n||0,ce(t.typename+": ",n),t instanceof c)ce("\n"),t.children.forEach(function(t){e(t,n+2)});else if(t instanceof le)ce(t.extName+"."+t.prop+"\n"),t.args&&e(t.args,n+2),t.contentArgs&&t.contentArgs.forEach(function(t){e(t,n+2)});else{var r=[],o=null;t.iterFields(function(e,t){e instanceof l?r.push([t,e]):(o=o||{})[t]=e}),o?ce(JSON.stringify(o,null,2)+"\n",null,!0):ce("\n"),r.forEach(function(t){var r=t[0],o=t[1];ce("["+r+"] =>",n+2),e(o,n+4)})}}}},function(e,t){},function(e,t,n){function r(e,t){return r=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},r(e,t)}var o=n(8),i=n(17),a=n(3),s=n(0).TemplateError,l=n(2).Frame,u=n(1).Obj,c={"==":"==","===":"===","!=":"!=","!==":"!==","<":"<",">":">","<=":"<=",">=":">="},d=function(e){var t,n;function o(){return e.apply(this,arguments)||this}n=e,(t=o).prototype=Object.create(n.prototype),t.prototype.constructor=t,r(t,n);var i=o.prototype;return i.init=function(e,t){this.templateName=e,this.codebuf=[],this.lastId=0,this.buffer=null,this.bufferStack=[],this._scopeClosers="",this.inBlock=!1,this.throwOnUndefined=t},i.fail=function(e,t,n){throw void 0!==t&&(t+=1),void 0!==n&&(n+=1),new s(e,t,n)},i._pushBuffer=function(){var e=this._tmpid();return this.bufferStack.push(this.buffer),this.buffer=e,this._emit("var "+this.buffer+' = "";'),e},i._popBuffer=function(){this.buffer=this.bufferStack.pop()},i._emit=function(e){this.codebuf.push(e)},i._emitLine=function(e){this._emit(e+"\n")},i._emitLines=function(){for(var e=this,t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];n.forEach(function(t){return e._emitLine(t)})},i._emitFuncBegin=function(e,t){this.buffer="output",this._scopeClosers="",this._emitLine("function "+t+"(env, context, frame, runtime, cb) {"),this._emitLine("var lineno = "+e.lineno+";"),this._emitLine("var colno = "+e.colno+";"),this._emitLine("var "+this.buffer+' = "";'),this._emitLine("try {")},i._emitFuncEnd=function(e){e||this._emitLine("cb(null, "+this.buffer+");"),this._closeScopeLevels(),this._emitLine("} catch (e) {"),this._emitLine(" cb(runtime.handleError(e, lineno, colno));"),this._emitLine("}"),this._emitLine("}"),this.buffer=null},i._addScopeLevel=function(){this._scopeClosers+="})"},i._closeScopeLevels=function(){this._emitLine(this._scopeClosers+";"),this._scopeClosers=""},i._withScopedSyntax=function(e){var t=this._scopeClosers;this._scopeClosers="",e.call(this),this._closeScopeLevels(),this._scopeClosers=t},i._makeCallback=function(e){var t=this._tmpid();return"function("+t+(e?","+e:"")+") {\nif("+t+") { cb("+t+"); return; }"},i._tmpid=function(){return this.lastId++,"t_"+this.lastId},i._templateName=function(){return null==this.templateName?"undefined":JSON.stringify(this.templateName)},i._compileChildren=function(e,t){var n=this;e.children.forEach(function(e){n.compile(e,t)})},i._compileAggregate=function(e,t,n,r){var o=this;n&&this._emit(n),e.children.forEach(function(e,n){n>0&&o._emit(","),o.compile(e,t)}),r&&this._emit(r)},i._compileExpression=function(e,t){this.assertType(e,a.Literal,a.Symbol,a.Group,a.Array,a.Dict,a.FunCall,a.Caller,a.Filter,a.LookupVal,a.Compare,a.InlineIf,a.In,a.Is,a.And,a.Or,a.Not,a.Add,a.Concat,a.Sub,a.Mul,a.Div,a.FloorDiv,a.Mod,a.Pow,a.Neg,a.Pos,a.Compare,a.NodeList),this.compile(e,t)},i.assertType=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];n.some(function(t){return e instanceof t})||this.fail("assertType: invalid type: "+e.typename,e.lineno,e.colno)},i.compileCallExtension=function(e,t,n){var r=this,o=e.args,i=e.contentArgs,s="boolean"!=typeof e.autoescape||e.autoescape;if(n||this._emit(this.buffer+" += runtime.suppressValue("),this._emit('env.getExtension("'+e.extName+'")["'+e.prop+'"]('),this._emit("context"),(o||i)&&this._emit(","),o&&(o instanceof a.NodeList||this.fail("compileCallExtension: arguments must be a NodeList, use `parser.parseSignature`"),o.children.forEach(function(e,n){r._compileExpression(e,t),(n!==o.children.length-1||i.length)&&r._emit(",")})),i.length&&i.forEach(function(e,n){if(n>0&&r._emit(","),e){r._emitLine("function(cb) {"),r._emitLine("if(!cb) { cb = function(err) { if(err) { throw err; }}}");var o=r._pushBuffer();r._withScopedSyntax(function(){r.compile(e,t),r._emitLine("cb(null, "+o+");")}),r._popBuffer(),r._emitLine("return "+o+";"),r._emitLine("}")}else r._emit("null")}),n){var l=this._tmpid();this._emitLine(", "+this._makeCallback(l)),this._emitLine(this.buffer+" += runtime.suppressValue("+l+", "+s+" && env.opts.autoescape);"),this._addScopeLevel()}else this._emit(")"),this._emit(", "+s+" && env.opts.autoescape);\n")},i.compileCallExtensionAsync=function(e,t){this.compileCallExtension(e,t,!0)},i.compileNodeList=function(e,t){this._compileChildren(e,t)},i.compileLiteral=function(e){if("string"==typeof e.value){var t=e.value.replace(/\\/g,"\\\\");t=(t=(t=(t=(t=t.replace(/"/g,'\\"')).replace(/\n/g,"\\n")).replace(/\r/g,"\\r")).replace(/\t/g,"\\t")).replace(/\u2028/g,"\\u2028"),this._emit('"'+t+'"')}else null===e.value?this._emit("null"):this._emit(e.value.toString())},i.compileSymbol=function(e,t){var n=e.value,r=t.lookup(n);r?this._emit(r):this._emit('runtime.contextOrFrameLookup(context, frame, "'+n+'")')},i.compileGroup=function(e,t){this._compileAggregate(e,t,"(",")")},i.compileArray=function(e,t){this._compileAggregate(e,t,"[","]")},i.compileDict=function(e,t){this._compileAggregate(e,t,"{","}")},i.compilePair=function(e,t){var n=e.key,r=e.value;n instanceof a.Symbol?n=new a.Literal(n.lineno,n.colno,n.value):n instanceof a.Literal&&"string"==typeof n.value||this.fail("compilePair: Dict keys must be strings or names",n.lineno,n.colno),this.compile(n,t),this._emit(": "),this._compileExpression(r,t)},i.compileInlineIf=function(e,t){this._emit("("),this.compile(e.cond,t),this._emit("?"),this.compile(e.body,t),this._emit(":"),null!==e.else_?this.compile(e.else_,t):this._emit('""'),this._emit(")")},i.compileIn=function(e,t){this._emit("runtime.inOperator("),this.compile(e.left,t),this._emit(","),this.compile(e.right,t),this._emit(")")},i.compileIs=function(e,t){var n=e.right.name?e.right.name.value:e.right.value;this._emit('env.getTest("'+n+'").call(context, '),this.compile(e.left,t),e.right.args&&(this._emit(","),this.compile(e.right.args,t)),this._emit(") === true")},i._binOpEmitter=function(e,t,n){this.compile(e.left,t),this._emit(n),this.compile(e.right,t)},i.compileOr=function(e,t){return this._binOpEmitter(e,t," || ")},i.compileAnd=function(e,t){return this._binOpEmitter(e,t," && ")},i.compileAdd=function(e,t){return this._binOpEmitter(e,t," + ")},i.compileConcat=function(e,t){return this._binOpEmitter(e,t,' + "" + ')},i.compileSub=function(e,t){return this._binOpEmitter(e,t," - ")},i.compileMul=function(e,t){return this._binOpEmitter(e,t," * ")},i.compileDiv=function(e,t){return this._binOpEmitter(e,t," / ")},i.compileMod=function(e,t){return this._binOpEmitter(e,t," % ")},i.compileNot=function(e,t){this._emit("!"),this.compile(e.target,t)},i.compileFloorDiv=function(e,t){this._emit("Math.floor("),this.compile(e.left,t),this._emit(" / "),this.compile(e.right,t),this._emit(")")},i.compilePow=function(e,t){this._emit("Math.pow("),this.compile(e.left,t),this._emit(", "),this.compile(e.right,t),this._emit(")")},i.compileNeg=function(e,t){this._emit("-"),this.compile(e.target,t)},i.compilePos=function(e,t){this._emit("+"),this.compile(e.target,t)},i.compileCompare=function(e,t){var n=this;this.compile(e.expr,t),e.ops.forEach(function(e){n._emit(" "+c[e.type]+" "),n.compile(e.expr,t)})},i.compileLookupVal=function(e,t){this._emit("runtime.memberLookup(("),this._compileExpression(e.target,t),this._emit("),"),this._compileExpression(e.val,t),this._emit(")")},i._getNodeName=function(e){switch(e.typename){case"Symbol":return e.value;case"FunCall":return"the return value of ("+this._getNodeName(e.name)+")";case"LookupVal":return this._getNodeName(e.target)+'["'+this._getNodeName(e.val)+'"]';case"Literal":return e.value.toString();default:return"--expression--"}},i.compileFunCall=function(e,t){this._emit("(lineno = "+e.lineno+", colno = "+e.colno+", "),this._emit("runtime.callWrap("),this._compileExpression(e.name,t),this._emit(', "'+this._getNodeName(e.name).replace(/"/g,'\\"')+'", context, '),this._compileAggregate(e.args,t,"[","])"),this._emit(")")},i.compileFilter=function(e,t){var n=e.name;this.assertType(n,a.Symbol),this._emit('env.getFilter("'+n.value+'").call(context, '),this._compileAggregate(e.args,t),this._emit(")")},i.compileFilterAsync=function(e,t){var n=e.name,r=e.symbol.value;this.assertType(n,a.Symbol),t.set(r,r),this._emit('env.getFilter("'+n.value+'").call(context, '),this._compileAggregate(e.args,t),this._emitLine(", "+this._makeCallback(r)),this._addScopeLevel()},i.compileKeywordArgs=function(e,t){this._emit("runtime.makeKeywordArgs("),this.compileDict(e,t),this._emit(")")},i.compileSet=function(e,t){var n=this,r=[];e.targets.forEach(function(e){var o=e.value,i=t.lookup(o);null==i&&(i=n._tmpid(),n._emitLine("var "+i+";")),r.push(i)}),e.value?(this._emit(r.join(" = ")+" = "),this._compileExpression(e.value,t),this._emitLine(";")):(this._emit(r.join(" = ")+" = "),this.compile(e.body,t),this._emitLine(";")),e.targets.forEach(function(e,t){var o=r[t],i=e.value;n._emitLine('frame.set("'+i+'", '+o+", true);"),n._emitLine("if(frame.topLevel) {"),n._emitLine('context.setVariable("'+i+'", '+o+");"),n._emitLine("}"),"_"!==i.charAt(0)&&(n._emitLine("if(frame.topLevel) {"),n._emitLine('context.addExport("'+i+'", '+o+");"),n._emitLine("}"))})},i.compileSwitch=function(e,t){var n=this;this._emit("switch ("),this.compile(e.expr,t),this._emit(") {"),e.cases.forEach(function(e,r){n._emit("case "),n.compile(e.cond,t),n._emit(": "),n.compile(e.body,t),e.body.children.length&&n._emitLine("break;")}),e.default&&(this._emit("default:"),this.compile(e.default,t)),this._emit("}")},i.compileIf=function(e,t,n){var r=this;this._emit("if("),this._compileExpression(e.cond,t),this._emitLine(") {"),this._withScopedSyntax(function(){r.compile(e.body,t),n&&r._emit("cb()")}),e.else_?(this._emitLine("}\nelse {"),this._withScopedSyntax(function(){r.compile(e.else_,t),n&&r._emit("cb()")})):n&&(this._emitLine("}\nelse {"),this._emit("cb()")),this._emitLine("}")},i.compileIfAsync=function(e,t){this._emit("(function(cb) {"),this.compileIf(e,t,!0),this._emit("})("+this._makeCallback()),this._addScopeLevel()},i._emitLoopBindings=function(e,t,n,r){var o=this;[{name:"index",val:n+" + 1"},{name:"index0",val:n},{name:"revindex",val:r+" - "+n},{name:"revindex0",val:r+" - "+n+" - 1"},{name:"first",val:n+" === 0"},{name:"last",val:n+" === "+r+" - 1"},{name:"length",val:r}].forEach(function(e){o._emitLine('frame.set("loop.'+e.name+'", '+e.val+");")})},i.compileFor=function(e,t){var n=this,r=this._tmpid(),o=this._tmpid(),i=this._tmpid();if(t=t.push(),this._emitLine("frame = frame.push();"),this._emit("var "+i+" = "),this._compileExpression(e.arr,t),this._emitLine(";"),this._emit("if("+i+") {"),this._emitLine(i+" = runtime.fromIterator("+i+");"),e.name instanceof a.Array){this._emitLine("var "+r+";"),this._emitLine("if(runtime.isArray("+i+")) {"),this._emitLine("var "+o+" = "+i+".length;"),this._emitLine("for("+r+"=0; "+r+" < "+i+".length; "+r+"++) {"),e.name.children.forEach(function(o,a){var s=n._tmpid();n._emitLine("var "+s+" = "+i+"["+r+"]["+a+"];"),n._emitLine('frame.set("'+o+'", '+i+"["+r+"]["+a+"]);"),t.set(e.name.children[a].value,s)}),this._emitLoopBindings(e,i,r,o),this._withScopedSyntax(function(){n.compile(e.body,t)}),this._emitLine("}"),this._emitLine("} else {");var s=e.name.children,l=s[0],u=s[1],c=this._tmpid(),d=this._tmpid();t.set(l.value,c),t.set(u.value,d),this._emitLine(r+" = -1;"),this._emitLine("var "+o+" = runtime.keys("+i+").length;"),this._emitLine("for(var "+c+" in "+i+") {"),this._emitLine(r+"++;"),this._emitLine("var "+d+" = "+i+"["+c+"];"),this._emitLine('frame.set("'+l.value+'", '+c+");"),this._emitLine('frame.set("'+u.value+'", '+d+");"),this._emitLoopBindings(e,i,r,o),this._withScopedSyntax(function(){n.compile(e.body,t)}),this._emitLine("}"),this._emitLine("}")}else{var p=this._tmpid();t.set(e.name.value,p),this._emitLine("var "+o+" = "+i+".length;"),this._emitLine("for(var "+r+"=0; "+r+" < "+i+".length; "+r+"++) {"),this._emitLine("var "+p+" = "+i+"["+r+"];"),this._emitLine('frame.set("'+e.name.value+'", '+p+");"),this._emitLoopBindings(e,i,r,o),this._withScopedSyntax(function(){n.compile(e.body,t)}),this._emitLine("}")}this._emitLine("}"),e.else_&&(this._emitLine("if (!"+o+") {"),this.compile(e.else_,t),this._emitLine("}")),this._emitLine("frame = frame.pop();")},i._compileAsyncLoop=function(e,t,n){var r=this,o=this._tmpid(),i=this._tmpid(),s=this._tmpid(),l=n?"asyncAll":"asyncEach";if(t=t.push(),this._emitLine("frame = frame.push();"),this._emit("var "+s+" = runtime.fromIterator("),this._compileExpression(e.arr,t),this._emitLine(");"),e.name instanceof a.Array){var u=e.name.children.length;this._emit("runtime."+l+"("+s+", "+u+", function("),e.name.children.forEach(function(e){r._emit(e.value+",")}),this._emit(o+","+i+",next) {"),e.name.children.forEach(function(e){var n=e.value;t.set(n,n),r._emitLine('frame.set("'+n+'", '+n+");")})}else{var c=e.name.value;this._emitLine("runtime."+l+"("+s+", 1, function("+c+", "+o+", "+i+",next) {"),this._emitLine('frame.set("'+c+'", '+c+");"),t.set(c,c)}this._emitLoopBindings(e,s,o,i),this._withScopedSyntax(function(){var i;n&&(i=r._pushBuffer()),r.compile(e.body,t),r._emitLine("next("+o+(i?","+i:"")+");"),n&&r._popBuffer()});var d=this._tmpid();this._emitLine("}, "+this._makeCallback(d)),this._addScopeLevel(),n&&this._emitLine(this.buffer+" += "+d+";"),e.else_&&(this._emitLine("if (!"+s+".length) {"),this.compile(e.else_,t),this._emitLine("}")),this._emitLine("frame = frame.pop();")},i.compileAsyncEach=function(e,t){this._compileAsyncLoop(e,t)},i.compileAsyncAll=function(e,t){this._compileAsyncLoop(e,t,!0)},i._compileMacro=function(e,t){var n=this,r=[],o=null,i="macro_"+this._tmpid(),s=void 0!==t;e.args.children.forEach(function(t,i){i===e.args.children.length-1&&t instanceof a.Dict?o=t:(n.assertType(t,a.Symbol),r.push(t))});var u,c=[].concat(r.map(function(e){return"l_"+e.value}),["kwargs"]),d=r.map(function(e){return'"'+e.value+'"'}),p=(o&&o.children||[]).map(function(e){return'"'+e.key.value+'"'});u=s?t.push(!0):new l,this._emitLines("var "+i+" = runtime.makeMacro(","["+d.join(", ")+"], ","["+p.join(", ")+"], ","function ("+c.join(", ")+") {","var callerFrame = frame;","frame = "+(s?"frame.push(true);":"new runtime.Frame();"),"kwargs = kwargs || {};",'if (Object.prototype.hasOwnProperty.call(kwargs, "caller")) {','frame.set("caller", kwargs.caller); }'),r.forEach(function(e){n._emitLine('frame.set("'+e.value+'", l_'+e.value+");"),u.set(e.value,"l_"+e.value)}),o&&o.children.forEach(function(e){var t=e.key.value;n._emit('frame.set("'+t+'", '),n._emit('Object.prototype.hasOwnProperty.call(kwargs, "'+t+'")'),n._emit(' ? kwargs["'+t+'"] : '),n._compileExpression(e.value,u),n._emit(");")});var f=this._pushBuffer();return this._withScopedSyntax(function(){n.compile(e.body,u)}),this._emitLine("frame = "+(s?"frame.pop();":"callerFrame;")),this._emitLine("return new runtime.SafeString("+f+");"),this._emitLine("});"),this._popBuffer(),i},i.compileMacro=function(e,t){var n=this._compileMacro(e),r=e.name.value;t.set(r,n),t.parent?this._emitLine('frame.set("'+r+'", '+n+");"):("_"!==e.name.value.charAt(0)&&this._emitLine('context.addExport("'+r+'");'),this._emitLine('context.setVariable("'+r+'", '+n+");"))},i.compileCaller=function(e,t){this._emit("(function (){");var n=this._compileMacro(e,t);this._emit("return "+n+";})()")},i._compileGetTemplate=function(e,t,n,r){var o=this._tmpid(),i=this._templateName(),a=this._makeCallback(o),s=n?"true":"false",l=r?"true":"false";return this._emit("env.getTemplate("),this._compileExpression(e.template,t),this._emitLine(", "+s+", "+i+", "+l+", "+a),o},i.compileImport=function(e,t){var n=e.target.value,r=this._compileGetTemplate(e,t,!1,!1);this._addScopeLevel(),this._emitLine(r+".getExported("+(e.withContext?"context.getVariables(), frame, ":"")+this._makeCallback(r)),this._addScopeLevel(),t.set(n,r),t.parent?this._emitLine('frame.set("'+n+'", '+r+");"):this._emitLine('context.setVariable("'+n+'", '+r+");")},i.compileFromImport=function(e,t){var n=this,r=this._compileGetTemplate(e,t,!1,!1);this._addScopeLevel(),this._emitLine(r+".getExported("+(e.withContext?"context.getVariables(), frame, ":"")+this._makeCallback(r)),this._addScopeLevel(),e.names.children.forEach(function(e){var o,i,s=n._tmpid();e instanceof a.Pair?(o=e.key.value,i=e.value.value):i=o=e.value,n._emitLine("if(Object.prototype.hasOwnProperty.call("+r+', "'+o+'")) {'),n._emitLine("var "+s+" = "+r+"."+o+";"),n._emitLine("} else {"),n._emitLine("cb(new Error(\"cannot import '"+o+"'\")); return;"),n._emitLine("}"),t.set(i,s),t.parent?n._emitLine('frame.set("'+i+'", '+s+");"):n._emitLine('context.setVariable("'+i+'", '+s+");")})},i.compileBlock=function(e){var t=this._tmpid();this.inBlock||this._emit('(parentTemplate ? function(e, c, f, r, cb) { cb(""); } : '),this._emit('context.getBlock("'+e.name.value+'")'),this.inBlock||this._emit(")"),this._emitLine("(env, context, frame, runtime, "+this._makeCallback(t)),this._emitLine(this.buffer+" += "+t+";"),this._addScopeLevel()},i.compileSuper=function(e,t){var n=e.blockName.value,r=e.symbol.value,o=this._makeCallback(r);this._emitLine('context.getSuper(env, "'+n+'", b_'+n+", frame, runtime, "+o),this._emitLine(r+" = runtime.markSafe("+r+");"),this._addScopeLevel(),t.set(r,r)},i.compileExtends=function(e,t){var n=this._tmpid(),r=this._compileGetTemplate(e,t,!0,!1);this._emitLine("parentTemplate = "+r),this._emitLine("for(var "+n+" in parentTemplate.blocks) {"),this._emitLine("context.addBlock("+n+", parentTemplate.blocks["+n+"]);"),this._emitLine("}"),this._addScopeLevel()},i.compileInclude=function(e,t){this._emitLine("var tasks = [];"),this._emitLine("tasks.push("),this._emitLine("function(callback) {");var n=this._compileGetTemplate(e,t,!1,e.ignoreMissing);this._emitLine("callback(null,"+n+");});"),this._emitLine("});");var r=this._tmpid();this._emitLine("tasks.push("),this._emitLine("function(template, callback){"),this._emitLine("template.render(context.getVariables(), frame, "+this._makeCallback(r)),this._emitLine("callback(null,"+r+");});"),this._emitLine("});"),this._emitLine("tasks.push("),this._emitLine("function(result, callback){"),this._emitLine(this.buffer+" += result;"),this._emitLine("callback(null);"),this._emitLine("});"),this._emitLine("env.waterfall(tasks, function(){"),this._addScopeLevel()},i.compileTemplateData=function(e,t){this.compileLiteral(e,t)},i.compileCapture=function(e,t){var n=this,r=this.buffer;this.buffer="output",this._emitLine("(function() {"),this._emitLine('var output = "";'),this._withScopedSyntax(function(){n.compile(e.body,t)}),this._emitLine("return output;"),this._emitLine("})()"),this.buffer=r},i.compileOutput=function(e,t){var n=this;e.children.forEach(function(r){r instanceof a.TemplateData?r.value&&(n._emit(n.buffer+" += "),n.compileLiteral(r,t),n._emitLine(";")):(n._emit(n.buffer+" += runtime.suppressValue("),n.throwOnUndefined&&n._emit("runtime.ensureDefined("),n.compile(r,t),n.throwOnUndefined&&n._emit(","+e.lineno+","+e.colno+")"),n._emit(", env.opts.autoescape);\n"))})},i.compileRoot=function(e,t){var n=this;t&&this.fail("compileRoot: root node can't have frame"),t=new l,this._emitFuncBegin(e,"root"),this._emitLine("var parentTemplate = null;"),this._compileChildren(e,t),this._emitLine("if(parentTemplate) {"),this._emitLine("parentTemplate.rootRenderFunc(env, context, frame, runtime, cb);"),this._emitLine("} else {"),this._emitLine("cb(null, "+this.buffer+");"),this._emitLine("}"),this._emitFuncEnd(!0),this.inBlock=!0;var r=[],o=e.findAll(a.Block);o.forEach(function(e,t){var o=e.name.value;if(-1!==r.indexOf(o))throw new Error('Block "'+o+'" defined more than once.');r.push(o),n._emitFuncBegin(e,"b_"+o);var i=new l;n._emitLine("var frame = frame.push(true);"),n.compile(e.body,i),n._emitFuncEnd()}),this._emitLine("return {"),o.forEach(function(e,t){var r="b_"+e.name.value;n._emitLine(r+": "+r+",")}),this._emitLine("root: root\n};")},i.compile=function(e,t){var n=this["compile"+e.typename];n?n.call(this,e,t):this.fail("compile: Cannot compile node: "+e.typename,e.lineno,e.colno)},i.getCode=function(){return this.codebuf.join("")},o}(u);e.exports={compile:function(e,t,n,r,a){void 0===a&&(a={});var s=new d(r,a.throwOnUndefined),l=(n||[]).map(function(e){return e.preprocess}).filter(function(e){return!!e}).reduce(function(e,t){return t(e)},e);return s.compile(i.transform(o.parse(l,n,a),t,r)),s.getCode()},Compiler:d}},function(e,t,n){function r(e,t){return r=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},r(e,t)}var o=n(4),i=n(1).EmitterObj;e.exports=function(e){var t,n;function i(){return e.apply(this,arguments)||this}n=e,(t=i).prototype=Object.create(n.prototype),t.prototype.constructor=t,r(t,n);var a=i.prototype;return a.resolve=function(e,t){return o.resolve(o.dirname(e),t)},a.isRelative=function(e){return 0===e.indexOf("./")||0===e.indexOf("../")},i}(i)},function(e,t,n){function r(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,o(e,t)}function o(e,t){return o=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},o(e,t)}var i=n(12),a=n(15),s=n(0),l=n(5),u=n(18),c=n(10),d=c.FileSystemLoader,p=c.WebLoader,f=c.PrecompiledLoader,h=n(20),m=n(21),g=n(1),v=g.Obj,y=g.EmitterObj,b=n(2),w=b.handleError,x=b.Frame,k=n(22);function S(e,t,n){i(function(){e(t,n)})}var E={type:"code",obj:{root:function(e,t,n,r,o){try{o(null,"")}catch(e){o(w(e,null,null))}}}},C=function(e){function t(){return e.apply(this,arguments)||this}r(t,e);var n=t.prototype;return n.init=function(e,t){var n=this;t=this.opts=t||{},this.opts.dev=!!t.dev,this.opts.autoescape=null==t.autoescape||t.autoescape,this.opts.throwOnUndefined=!!t.throwOnUndefined,this.opts.trimBlocks=!!t.trimBlocks,this.opts.lstripBlocks=!!t.lstripBlocks,this.loaders=[],e?this.loaders=s.isArray(e)?e:[e]:d?this.loaders=[new d("views")]:p&&(this.loaders=[new p("/views")]),"undefined"!=typeof window&&window.nunjucksPrecompiled&&this.loaders.unshift(new f(window.nunjucksPrecompiled)),this._initLoaders(),this.globals=m(),this.filters={},this.tests={},this.asyncFilters=[],this.extensions={},this.extensionsList=[],s._entries(u).forEach(function(e){var t=e[0],r=e[1];return n.addFilter(t,r)}),s._entries(h).forEach(function(e){var t=e[0],r=e[1];return n.addTest(t,r)})},n._initLoaders=function(){var e=this;this.loaders.forEach(function(t){t.cache={},"function"==typeof t.on&&(t.on("update",function(n,r){t.cache[n]=null,e.emit("update",n,r,t)}),t.on("load",function(n,r){e.emit("load",n,r,t)}))})},n.invalidateCache=function(){this.loaders.forEach(function(e){e.cache={}})},n.addExtension=function(e,t){return t.__name=e,this.extensions[e]=t,this.extensionsList.push(t),this},n.removeExtension=function(e){var t=this.getExtension(e);t&&(this.extensionsList=s.without(this.extensionsList,t),delete this.extensions[e])},n.getExtension=function(e){return this.extensions[e]},n.hasExtension=function(e){return!!this.extensions[e]},n.addGlobal=function(e,t){return this.globals[e]=t,this},n.getGlobal=function(e){if(void 0===this.globals[e])throw new Error("global not found: "+e);return this.globals[e]},n.addFilter=function(e,t,n){var r=t;return n&&this.asyncFilters.push(e),this.filters[e]=r,this},n.getFilter=function(e){if(!this.filters[e])throw new Error("filter not found: "+e);return this.filters[e]},n.addTest=function(e,t){return this.tests[e]=t,this},n.getTest=function(e){if(!this.tests[e])throw new Error("test not found: "+e);return this.tests[e]},n.resolveTemplate=function(e,t,n){return e.isRelative&&t&&e.isRelative(n)&&e.resolve?e.resolve(t,n):n},n.getTemplate=function(e,t,n,r,o){var i,a=this,l=this,u=null;if(e&&e.raw&&(e=e.raw),s.isFunction(n)&&(o=n,n=null,t=t||!1),s.isFunction(t)&&(o=t,t=!1),e instanceof T)u=e;else{if("string"!=typeof e)throw new Error("template names must be a string: "+e);for(var c=0;c<this.loaders.length;c++){var d=this.loaders[c];if(u=d.cache[this.resolveTemplate(d,n,e)])break}}return u?(t&&u.compile(),o?void o(null,u):u):(s.asyncIter(this.loaders,function(t,r,o,i){function a(e,n){e?i(e):n?(n.loader=t,i(null,n)):o()}e=l.resolveTemplate(t,n,e),t.async?t.getSource(e,a):a(null,t.getSource(e))},function(n,s){if(s||n||r||(n=new Error("template not found: "+e)),n){if(o)return void o(n);throw n}var l;s?(l=new T(s.src,a,s.path,t),s.noCache||(s.loader.cache[e]=l)):l=new T(E,a,"",t),o?o(null,l):i=l}),i)},n.express=function(e){return k(this,e)},n.render=function(e,t,n){s.isFunction(t)&&(n=t,t=null);var r=null;return this.getTemplate(e,function(e,o){if(e&&n)S(n,e);else{if(e)throw e;r=o.render(t,n)}}),r},n.renderString=function(e,t,n,r){return s.isFunction(n)&&(r=n,n={}),new T(e,this,(n=n||{}).path).render(t,r)},n.waterfall=function(e,t,n){return a(e,t,n)},t}(y),O=function(e){function t(){return e.apply(this,arguments)||this}r(t,e);var n=t.prototype;return n.init=function(e,t,n){var r=this;this.env=n||new C,this.ctx=s.extend({},e),this.blocks={},this.exported=[],s.keys(t).forEach(function(e){r.addBlock(e,t[e])})},n.lookup=function(e){return e in this.env.globals&&!(e in this.ctx)?this.env.globals[e]:this.ctx[e]},n.setVariable=function(e,t){this.ctx[e]=t},n.getVariables=function(){return this.ctx},n.addBlock=function(e,t){return this.blocks[e]=this.blocks[e]||[],this.blocks[e].push(t),this},n.getBlock=function(e){if(!this.blocks[e])throw new Error('unknown block "'+e+'"');return this.blocks[e][0]},n.getSuper=function(e,t,n,r,o,i){var a=s.indexOf(this.blocks[t]||[],n),l=this.blocks[t][a+1];if(-1===a||!l)throw new Error('no super block available for "'+t+'"');l(e,this,r,o,i)},n.addExport=function(e){this.exported.push(e)},n.getExported=function(){var e=this,t={};return this.exported.forEach(function(n){t[n]=e.ctx[n]}),t},t}(v),T=function(e){function t(){return e.apply(this,arguments)||this}r(t,e);var n=t.prototype;return n.init=function(e,t,n,r){if(this.env=t||new C,s.isObject(e))switch(e.type){case"code":this.tmplProps=e.obj;break;case"string":this.tmplStr=e.obj;break;default:throw new Error("Unexpected template object type "+e.type+"; expected 'code', or 'string'")}else{if(!s.isString(e))throw new Error("src must be a string or an object describing the source");this.tmplStr=e}if(this.path=n,r)try{this._compile()}catch(e){throw s._prettifyError(this.path,this.env.opts.dev,e)}else this.compiled=!1},n.render=function(e,t,n){var r=this;"function"==typeof e?(n=e,e={}):"function"==typeof t&&(n=t,t=null);var o=!t;try{this.compile()}catch(e){var i=s._prettifyError(this.path,this.env.opts.dev,e);if(n)return S(n,i);throw i}var a=new O(e||{},this.blocks,this.env),l=t?t.push(!0):new x;l.topLevel=!0;var u=null,c=!1;return this.rootRenderFunc(this.env,a,l,b,function(e,t){if(!c||!n||void 0===t)if(e&&(e=s._prettifyError(r.path,r.env.opts.dev,e),c=!0),n)o?S(n,e,t):n(e,t);else{if(e)throw e;u=t}}),u},n.getExported=function(e,t,n){"function"==typeof e&&(n=e,e={}),"function"==typeof t&&(n=t,t=null);try{this.compile()}catch(e){if(n)return n(e);throw e}var r=t?t.push():new x;r.topLevel=!0;var o=new O(e||{},this.blocks,this.env);this.rootRenderFunc(this.env,o,r,b,function(e){e?n(e,null):n(null,o.getExported())})},n.compile=function(){this.compiled||this._compile()},n._compile=function(){var e;if(this.tmplProps)e=this.tmplProps;else{var t=l.compile(this.tmplStr,this.env.asyncFilters,this.env.extensionsList,this.path,this.env.opts);e=new Function(t)()}this.blocks=this._getBlocks(e),this.rootRenderFunc=e.root,this.compiled=!0},n._getBlocks=function(e){var t={};return s.keys(e).forEach(function(n){"b_"===n.slice(0,2)&&(t[n.slice(2)]=e[n])}),t},t}(v);e.exports={Environment:C,Template:T}},function(e,t,n){function r(e,t){return r=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},r(e,t)}var o=n(9),i=n(3),a=n(1).Obj,s=n(0),l=function(e){var t,n;function a(){return e.apply(this,arguments)||this}n=e,(t=a).prototype=Object.create(n.prototype),t.prototype.constructor=t,r(t,n);var l=a.prototype;return l.init=function(e){this.tokens=e,this.peeked=null,this.breakOnBlocks=null,this.dropLeadingWhitespace=!1,this.extensions=[]},l.nextToken=function(e){var t;if(this.peeked){if(e||this.peeked.type!==o.TOKEN_WHITESPACE)return t=this.peeked,this.peeked=null,t;this.peeked=null}if(t=this.tokens.nextToken(),!e)for(;t&&t.type===o.TOKEN_WHITESPACE;)t=this.tokens.nextToken();return t},l.peekToken=function(){return this.peeked=this.peeked||this.nextToken(),this.peeked},l.pushToken=function(e){if(this.peeked)throw new Error("pushToken: can only push one token on between reads");this.peeked=e},l.error=function(e,t,n){if(void 0===t||void 0===n){var r=this.peekToken()||{};t=r.lineno,n=r.colno}return void 0!==t&&(t+=1),void 0!==n&&(n+=1),new s.TemplateError(e,t,n)},l.fail=function(e,t,n){throw this.error(e,t,n)},l.skip=function(e){var t=this.nextToken();return!(!t||t.type!==e)||(this.pushToken(t),!1)},l.expect=function(e){var t=this.nextToken();return t.type!==e&&this.fail("expected "+e+", got "+t.type,t.lineno,t.colno),t},l.skipValue=function(e,t){var n=this.nextToken();return!(!n||n.type!==e||n.value!==t)||(this.pushToken(n),!1)},l.skipSymbol=function(e){return this.skipValue(o.TOKEN_SYMBOL,e)},l.advanceAfterBlockEnd=function(e){var t;return e||((t=this.peekToken())||this.fail("unexpected end of file"),t.type!==o.TOKEN_SYMBOL&&this.fail("advanceAfterBlockEnd: expected symbol token or explicit name to be passed"),e=this.nextToken().value),(t=this.nextToken())&&t.type===o.TOKEN_BLOCK_END?"-"===t.value.charAt(0)&&(this.dropLeadingWhitespace=!0):this.fail("expected block end in "+e+" statement"),t},l.advanceAfterVariableEnd=function(){var e=this.nextToken();e&&e.type===o.TOKEN_VARIABLE_END?this.dropLeadingWhitespace="-"===e.value.charAt(e.value.length-this.tokens.tags.VARIABLE_END.length-1):(this.pushToken(e),this.fail("expected variable end"))},l.parseFor=function(){var e,t,n=this.peekToken();if(this.skipSymbol("for")?(e=new i.For(n.lineno,n.colno),t="endfor"):this.skipSymbol("asyncEach")?(e=new i.AsyncEach(n.lineno,n.colno),t="endeach"):this.skipSymbol("asyncAll")?(e=new i.AsyncAll(n.lineno,n.colno),t="endall"):this.fail("parseFor: expected for{Async}",n.lineno,n.colno),e.name=this.parsePrimary(),e.name instanceof i.Symbol||this.fail("parseFor: variable name expected for loop"),this.peekToken().type===o.TOKEN_COMMA){var r=e.name;for(e.name=new i.Array(r.lineno,r.colno),e.name.addChild(r);this.skip(o.TOKEN_COMMA);){var a=this.parsePrimary();e.name.addChild(a)}}return this.skipSymbol("in")||this.fail('parseFor: expected "in" keyword for loop',n.lineno,n.colno),e.arr=this.parseExpression(),this.advanceAfterBlockEnd(n.value),e.body=this.parseUntilBlocks(t,"else"),this.skipSymbol("else")&&(this.advanceAfterBlockEnd("else"),e.else_=this.parseUntilBlocks(t)),this.advanceAfterBlockEnd(),e},l.parseMacro=function(){var e=this.peekToken();this.skipSymbol("macro")||this.fail("expected macro");var t=this.parsePrimary(!0),n=this.parseSignature(),r=new i.Macro(e.lineno,e.colno,t,n);return this.advanceAfterBlockEnd(e.value),r.body=this.parseUntilBlocks("endmacro"),this.advanceAfterBlockEnd(),r},l.parseCall=function(){var e=this.peekToken();this.skipSymbol("call")||this.fail("expected call");var t=this.parseSignature(!0)||new i.NodeList,n=this.parsePrimary();this.advanceAfterBlockEnd(e.value);var r=this.parseUntilBlocks("endcall");this.advanceAfterBlockEnd();var o=new i.Symbol(e.lineno,e.colno,"caller"),a=new i.Caller(e.lineno,e.colno,o,t,r),s=n.args.children;return s[s.length-1]instanceof i.KeywordArgs||s.push(new i.KeywordArgs),s[s.length-1].addChild(new i.Pair(e.lineno,e.colno,o,a)),new i.Output(e.lineno,e.colno,[n])},l.parseWithContext=function(){var e=this.peekToken(),t=null;return this.skipSymbol("with")?t=!0:this.skipSymbol("without")&&(t=!1),null!==t&&(this.skipSymbol("context")||this.fail("parseFrom: expected context after with/without",e.lineno,e.colno)),t},l.parseImport=function(){var e=this.peekToken();this.skipSymbol("import")||this.fail("parseImport: expected import",e.lineno,e.colno);var t=this.parseExpression();this.skipSymbol("as")||this.fail('parseImport: expected "as" keyword',e.lineno,e.colno);var n=this.parseExpression(),r=this.parseWithContext(),o=new i.Import(e.lineno,e.colno,t,n,r);return this.advanceAfterBlockEnd(e.value),o},l.parseFrom=function(){var e=this.peekToken();this.skipSymbol("from")||this.fail("parseFrom: expected from");var t=this.parseExpression();this.skipSymbol("import")||this.fail("parseFrom: expected import",e.lineno,e.colno);for(var n,r=new i.NodeList;;){var a=this.peekToken();if(a.type===o.TOKEN_BLOCK_END){r.children.length||this.fail("parseFrom: Expected at least one import name",e.lineno,e.colno),"-"===a.value.charAt(0)&&(this.dropLeadingWhitespace=!0),this.nextToken();break}r.children.length>0&&!this.skip(o.TOKEN_COMMA)&&this.fail("parseFrom: expected comma",e.lineno,e.colno);var s=this.parsePrimary();if("_"===s.value.charAt(0)&&this.fail("parseFrom: names starting with an underscore cannot be imported",s.lineno,s.colno),this.skipSymbol("as")){var l=this.parsePrimary();r.addChild(new i.Pair(s.lineno,s.colno,s,l))}else r.addChild(s);n=this.parseWithContext()}return new i.FromImport(e.lineno,e.colno,t,r,n)},l.parseBlock=function(){var e=this.peekToken();this.skipSymbol("block")||this.fail("parseBlock: expected block",e.lineno,e.colno);var t=new i.Block(e.lineno,e.colno);t.name=this.parsePrimary(),t.name instanceof i.Symbol||this.fail("parseBlock: variable name expected",e.lineno,e.colno),this.advanceAfterBlockEnd(e.value),t.body=this.parseUntilBlocks("endblock"),this.skipSymbol("endblock"),this.skipSymbol(t.name.value);var n=this.peekToken();return n||this.fail("parseBlock: expected endblock, got end of file"),this.advanceAfterBlockEnd(n.value),t},l.parseExtends=function(){var e="extends",t=this.peekToken();this.skipSymbol(e)||this.fail("parseTemplateRef: expected "+e);var n=new i.Extends(t.lineno,t.colno);return n.template=this.parseExpression(),this.advanceAfterBlockEnd(t.value),n},l.parseInclude=function(){var e="include",t=this.peekToken();this.skipSymbol(e)||this.fail("parseInclude: expected "+e);var n=new i.Include(t.lineno,t.colno);return n.template=this.parseExpression(),this.skipSymbol("ignore")&&this.skipSymbol("missing")&&(n.ignoreMissing=!0),this.advanceAfterBlockEnd(t.value),n},l.parseIf=function(){var e,t=this.peekToken();this.skipSymbol("if")||this.skipSymbol("elif")||this.skipSymbol("elseif")?e=new i.If(t.lineno,t.colno):this.skipSymbol("ifAsync")?e=new i.IfAsync(t.lineno,t.colno):this.fail("parseIf: expected if, elif, or elseif",t.lineno,t.colno),e.cond=this.parseExpression(),this.advanceAfterBlockEnd(t.value),e.body=this.parseUntilBlocks("elif","elseif","else","endif");var n=this.peekToken();switch(n&&n.value){case"elseif":case"elif":e.else_=this.parseIf();break;case"else":this.advanceAfterBlockEnd(),e.else_=this.parseUntilBlocks("endif"),this.advanceAfterBlockEnd();break;case"endif":e.else_=null,this.advanceAfterBlockEnd();break;default:this.fail("parseIf: expected elif, else, or endif, got end of file")}return e},l.parseSet=function(){var e=this.peekToken();this.skipSymbol("set")||this.fail("parseSet: expected set",e.lineno,e.colno);for(var t,n=new i.Set(e.lineno,e.colno,[]);(t=this.parsePrimary())&&(n.targets.push(t),this.skip(o.TOKEN_COMMA)););return this.skipValue(o.TOKEN_OPERATOR,"=")?(n.value=this.parseExpression(),this.advanceAfterBlockEnd(e.value)):this.skip(o.TOKEN_BLOCK_END)?(n.body=new i.Capture(e.lineno,e.colno,this.parseUntilBlocks("endset")),n.value=null,this.advanceAfterBlockEnd()):this.fail("parseSet: expected = or block end in set tag",e.lineno,e.colno),n},l.parseSwitch=function(){var e="switch",t="endswitch",n="case",r="default",o=this.peekToken();this.skipSymbol(e)||this.skipSymbol(n)||this.skipSymbol(r)||this.fail('parseSwitch: expected "switch," "case" or "default"',o.lineno,o.colno);var a=this.parseExpression();this.advanceAfterBlockEnd(e),this.parseUntilBlocks(n,r,t);var s,l=this.peekToken(),u=[];do{this.skipSymbol(n);var c=this.parseExpression();this.advanceAfterBlockEnd(e);var d=this.parseUntilBlocks(n,r,t);u.push(new i.Case(l.line,l.col,c,d)),l=this.peekToken()}while(l&&l.value===n);switch(l.value){case r:this.advanceAfterBlockEnd(),s=this.parseUntilBlocks(t),this.advanceAfterBlockEnd();break;case t:this.advanceAfterBlockEnd();break;default:this.fail('parseSwitch: expected "case," "default" or "endswitch," got EOF.')}return new i.Switch(o.lineno,o.colno,a,u,s)},l.parseStatement=function(){var e=this.peekToken();if(e.type!==o.TOKEN_SYMBOL&&this.fail("tag name expected",e.lineno,e.colno),this.breakOnBlocks&&-1!==s.indexOf(this.breakOnBlocks,e.value))return null;switch(e.value){case"raw":return this.parseRaw();case"verbatim":return this.parseRaw("verbatim");case"if":case"ifAsync":return this.parseIf();case"for":case"asyncEach":case"asyncAll":return this.parseFor();case"block":return this.parseBlock();case"extends":return this.parseExtends();case"include":return this.parseInclude();case"set":return this.parseSet();case"macro":return this.parseMacro();case"call":return this.parseCall();case"import":return this.parseImport();case"from":return this.parseFrom();case"filter":return this.parseFilterStatement();case"switch":return this.parseSwitch();default:if(this.extensions.length)for(var t=0;t<this.extensions.length;t++){var n=this.extensions[t];if(-1!==s.indexOf(n.tags||[],e.value))return n.parse(this,i,o)}this.fail("unknown block tag: "+e.value,e.lineno,e.colno)}},l.parseRaw=function(e){for(var t="end"+(e=e||"raw"),n=new RegExp("([\\s\\S]*?){%\\s*("+e+"|"+t+")\\s*(?=%})%}"),r=1,o="",a=null,s=this.advanceAfterBlockEnd();(a=this.tokens._extractRegex(n))&&r>0;){var l=a[0],u=a[1],c=a[2];c===e?r+=1:c===t&&(r-=1),0===r?(o+=u,this.tokens.backN(l.length-u.length)):o+=l}return new i.Output(s.lineno,s.colno,[new i.TemplateData(s.lineno,s.colno,o)])},l.parsePostfix=function(e){for(var t,n=this.peekToken();n;){if(n.type===o.TOKEN_LEFT_PAREN)e=new i.FunCall(n.lineno,n.colno,e,this.parseSignature());else if(n.type===o.TOKEN_LEFT_BRACKET)(t=this.parseAggregate()).children.length>1&&this.fail("invalid index"),e=new i.LookupVal(n.lineno,n.colno,e,t.children[0]);else{if(n.type!==o.TOKEN_OPERATOR||"."!==n.value)break;this.nextToken();var r=this.nextToken();r.type!==o.TOKEN_SYMBOL&&this.fail("expected name as lookup value, got "+r.value,r.lineno,r.colno),t=new i.Literal(r.lineno,r.colno,r.value),e=new i.LookupVal(n.lineno,n.colno,e,t)}n=this.peekToken()}return e},l.parseExpression=function(){return this.parseInlineIf()},l.parseInlineIf=function(){var e=this.parseOr();if(this.skipSymbol("if")){var t=this.parseOr(),n=e;(e=new i.InlineIf(e.lineno,e.colno)).body=n,e.cond=t,this.skipSymbol("else")?e.else_=this.parseOr():e.else_=null}return e},l.parseOr=function(){for(var e=this.parseAnd();this.skipSymbol("or");){var t=this.parseAnd();e=new i.Or(e.lineno,e.colno,e,t)}return e},l.parseAnd=function(){for(var e=this.parseNot();this.skipSymbol("and");){var t=this.parseNot();e=new i.And(e.lineno,e.colno,e,t)}return e},l.parseNot=function(){var e=this.peekToken();return this.skipSymbol("not")?new i.Not(e.lineno,e.colno,this.parseNot()):this.parseIn()},l.parseIn=function(){for(var e=this.parseIs();;){var t=this.nextToken();if(!t)break;var n=t.type===o.TOKEN_SYMBOL&&"not"===t.value;if(n||this.pushToken(t),!this.skipSymbol("in")){n&&this.pushToken(t);break}var r=this.parseIs();e=new i.In(e.lineno,e.colno,e,r),n&&(e=new i.Not(e.lineno,e.colno,e))}return e},l.parseIs=function(){var e=this.parseCompare();if(this.skipSymbol("is")){var t=this.skipSymbol("not"),n=this.parseCompare();e=new i.Is(e.lineno,e.colno,e,n),t&&(e=new i.Not(e.lineno,e.colno,e))}return e},l.parseCompare=function(){for(var e=["==","===","!=","!==","<",">","<=",">="],t=this.parseConcat(),n=[];;){var r=this.nextToken();if(!r)break;if(-1===e.indexOf(r.value)){this.pushToken(r);break}n.push(new i.CompareOperand(r.lineno,r.colno,this.parseConcat(),r.value))}return n.length?new i.Compare(n[0].lineno,n[0].colno,t,n):t},l.parseConcat=function(){for(var e=this.parseAdd();this.skipValue(o.TOKEN_TILDE,"~");){var t=this.parseAdd();e=new i.Concat(e.lineno,e.colno,e,t)}return e},l.parseAdd=function(){for(var e=this.parseSub();this.skipValue(o.TOKEN_OPERATOR,"+");){var t=this.parseSub();e=new i.Add(e.lineno,e.colno,e,t)}return e},l.parseSub=function(){for(var e=this.parseMul();this.skipValue(o.TOKEN_OPERATOR,"-");){var t=this.parseMul();e=new i.Sub(e.lineno,e.colno,e,t)}return e},l.parseMul=function(){for(var e=this.parseDiv();this.skipValue(o.TOKEN_OPERATOR,"*");){var t=this.parseDiv();e=new i.Mul(e.lineno,e.colno,e,t)}return e},l.parseDiv=function(){for(var e=this.parseFloorDiv();this.skipValue(o.TOKEN_OPERATOR,"/");){var t=this.parseFloorDiv();e=new i.Div(e.lineno,e.colno,e,t)}return e},l.parseFloorDiv=function(){for(var e=this.parseMod();this.skipValue(o.TOKEN_OPERATOR,"//");){var t=this.parseMod();e=new i.FloorDiv(e.lineno,e.colno,e,t)}return e},l.parseMod=function(){for(var e=this.parsePow();this.skipValue(o.TOKEN_OPERATOR,"%");){var t=this.parsePow();e=new i.Mod(e.lineno,e.colno,e,t)}return e},l.parsePow=function(){for(var e=this.parseUnary();this.skipValue(o.TOKEN_OPERATOR,"**");){var t=this.parseUnary();e=new i.Pow(e.lineno,e.colno,e,t)}return e},l.parseUnary=function(e){var t,n=this.peekToken();return t=this.skipValue(o.TOKEN_OPERATOR,"-")?new i.Neg(n.lineno,n.colno,this.parseUnary(!0)):this.skipValue(o.TOKEN_OPERATOR,"+")?new i.Pos(n.lineno,n.colno,this.parseUnary(!0)):this.parsePrimary(),e||(t=this.parseFilter(t)),t},l.parsePrimary=function(e){var t,n=this.nextToken(),r=null;if(n?n.type===o.TOKEN_STRING?t=n.value:n.type===o.TOKEN_INT?t=parseInt(n.value,10):n.type===o.TOKEN_FLOAT?t=parseFloat(n.value):n.type===o.TOKEN_BOOLEAN?"true"===n.value?t=!0:"false"===n.value?t=!1:this.fail("invalid boolean: "+n.value,n.lineno,n.colno):n.type===o.TOKEN_NONE?t=null:n.type===o.TOKEN_REGEX&&(t=new RegExp(n.value.body,n.value.flags)):this.fail("expected expression, got end of file"),void 0!==t?r=new i.Literal(n.lineno,n.colno,t):n.type===o.TOKEN_SYMBOL?r=new i.Symbol(n.lineno,n.colno,n.value):(this.pushToken(n),r=this.parseAggregate()),e||(r=this.parsePostfix(r)),r)return r;throw this.error("unexpected token: "+n.value,n.lineno,n.colno)},l.parseFilterName=function(){for(var e=this.expect(o.TOKEN_SYMBOL),t=e.value;this.skipValue(o.TOKEN_OPERATOR,".");)t+="."+this.expect(o.TOKEN_SYMBOL).value;return new i.Symbol(e.lineno,e.colno,t)},l.parseFilterArgs=function(e){return this.peekToken().type===o.TOKEN_LEFT_PAREN?this.parsePostfix(e).args.children:[]},l.parseFilter=function(e){for(;this.skip(o.TOKEN_PIPE);){var t=this.parseFilterName();e=new i.Filter(t.lineno,t.colno,t,new i.NodeList(t.lineno,t.colno,[e].concat(this.parseFilterArgs(e))))}return e},l.parseFilterStatement=function(){var e=this.peekToken();this.skipSymbol("filter")||this.fail("parseFilterStatement: expected filter");var t=this.parseFilterName(),n=this.parseFilterArgs(t);this.advanceAfterBlockEnd(e.value);var r=new i.Capture(t.lineno,t.colno,this.parseUntilBlocks("endfilter"));this.advanceAfterBlockEnd();var o=new i.Filter(t.lineno,t.colno,t,new i.NodeList(t.lineno,t.colno,[r].concat(n)));return new i.Output(t.lineno,t.colno,[o])},l.parseAggregate=function(){var e,t=this.nextToken();switch(t.type){case o.TOKEN_LEFT_PAREN:e=new i.Group(t.lineno,t.colno);break;case o.TOKEN_LEFT_BRACKET:e=new i.Array(t.lineno,t.colno);break;case o.TOKEN_LEFT_CURLY:e=new i.Dict(t.lineno,t.colno);break;default:return null}for(;;){var n=this.peekToken().type;if(n===o.TOKEN_RIGHT_PAREN||n===o.TOKEN_RIGHT_BRACKET||n===o.TOKEN_RIGHT_CURLY){this.nextToken();break}if(e.children.length>0&&(this.skip(o.TOKEN_COMMA)||this.fail("parseAggregate: expected comma after expression",t.lineno,t.colno)),e instanceof i.Dict){var r=this.parsePrimary();this.skip(o.TOKEN_COLON)||this.fail("parseAggregate: expected colon after dict key",t.lineno,t.colno);var a=this.parseExpression();e.addChild(new i.Pair(r.lineno,r.colno,r,a))}else{var s=this.parseExpression();e.addChild(s)}}return e},l.parseSignature=function(e,t){var n=this.peekToken();if(!t&&n.type!==o.TOKEN_LEFT_PAREN){if(e)return null;this.fail("expected arguments",n.lineno,n.colno)}n.type===o.TOKEN_LEFT_PAREN&&(n=this.nextToken());for(var r=new i.NodeList(n.lineno,n.colno),a=new i.KeywordArgs(n.lineno,n.colno),s=!1;;){if(n=this.peekToken(),!t&&n.type===o.TOKEN_RIGHT_PAREN){this.nextToken();break}if(t&&n.type===o.TOKEN_BLOCK_END)break;if(s&&!this.skip(o.TOKEN_COMMA))this.fail("parseSignature: expected comma after expression",n.lineno,n.colno);else{var l=this.parseExpression();this.skipValue(o.TOKEN_OPERATOR,"=")?a.addChild(new i.Pair(l.lineno,l.colno,l,this.parseExpression())):r.addChild(l)}s=!0}return a.children.length&&r.addChild(a),r},l.parseUntilBlocks=function(){for(var e=this.breakOnBlocks,t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];this.breakOnBlocks=n;var o=this.parse();return this.breakOnBlocks=e,o},l.parseNodes=function(){for(var e,t=[];e=this.nextToken();)if(e.type===o.TOKEN_DATA){var n=e.value,r=this.peekToken(),a=r&&r.value;this.dropLeadingWhitespace&&(n=n.replace(/^\s*/,""),this.dropLeadingWhitespace=!1),r&&(r.type===o.TOKEN_BLOCK_START&&"-"===a.charAt(a.length-1)||r.type===o.TOKEN_VARIABLE_START&&"-"===a.charAt(this.tokens.tags.VARIABLE_START.length)||r.type===o.TOKEN_COMMENT&&"-"===a.charAt(this.tokens.tags.COMMENT_START.length))&&(n=n.replace(/\s*$/,"")),t.push(new i.Output(e.lineno,e.colno,[new i.TemplateData(e.lineno,e.colno,n)]))}else if(e.type===o.TOKEN_BLOCK_START){this.dropLeadingWhitespace=!1;var s=this.parseStatement();if(!s)break;t.push(s)}else if(e.type===o.TOKEN_VARIABLE_START){var l=this.parseExpression();this.dropLeadingWhitespace=!1,this.advanceAfterVariableEnd(),t.push(new i.Output(e.lineno,e.colno,[l]))}else e.type===o.TOKEN_COMMENT?this.dropLeadingWhitespace="-"===e.value.charAt(e.value.length-this.tokens.tags.COMMENT_END.length-1):this.fail("Unexpected token at top-level: "+e.type,e.lineno,e.colno);return t},l.parse=function(){return new i.NodeList(0,0,this.parseNodes())},l.parseAsRoot=function(){return new i.Root(0,0,this.parseNodes())},a}(a);e.exports={parse:function(e,t,n){var r=new l(o.lex(e,n));return void 0!==t&&(r.extensions=t),r.parseAsRoot()},Parser:l}},function(e,t,n){var r=n(0),o=" \n\t\r ",i="()[]{}%*-+~/#,:|.<>=!",a="string",s="whitespace",l="data",u="block-start",c="block-end",d="variable-start",p="variable-end",f="comment",h="left-paren",m="right-paren",g="left-bracket",v="right-bracket",y="left-curly",b="right-curly",w="operator",x="comma",k="colon",S="tilde",E="pipe",C="float",O="boolean",T="none",_="symbol",R="regex";function P(e,t,n,r){return{type:e,value:t,lineno:n,colno:r}}var A=function(){function e(e,t){this.str=e,this.index=0,this.len=e.length,this.lineno=0,this.colno=0,this.in_code=!1;var n=(t=t||{}).tags||{};this.tags={BLOCK_START:n.blockStart||"{%",BLOCK_END:n.blockEnd||"%}",VARIABLE_START:n.variableStart||"{{",VARIABLE_END:n.variableEnd||"}}",COMMENT_START:n.commentStart||"{#",COMMENT_END:n.commentEnd||"#}"},this.trimBlocks=!!t.trimBlocks,this.lstripBlocks=!!t.lstripBlocks}var t=e.prototype;return t.nextToken=function(){var e,t=this.lineno,n=this.colno;if(this.in_code){var A=this.current();if(this.isFinished())return null;if('"'===A||"'"===A)return P(a,this._parseString(A),t,n);if(e=this._extract(o))return P(s,e,t,n);if((e=this._extractString(this.tags.BLOCK_END))||(e=this._extractString("-"+this.tags.BLOCK_END)))return this.in_code=!1,this.trimBlocks&&("\n"===(A=this.current())?this.forward():"\r"===A&&(this.forward(),"\n"===(A=this.current())?this.forward():this.back())),P(c,e,t,n);if((e=this._extractString(this.tags.VARIABLE_END))||(e=this._extractString("-"+this.tags.VARIABLE_END)))return this.in_code=!1,P(p,e,t,n);if("r"===A&&"/"===this.str.charAt(this.index+1)){this.forwardN(2);for(var L="";!this.isFinished();){if("/"===this.current()&&"\\"!==this.previous()){this.forward();break}L+=this.current(),this.forward()}for(var N=["g","i","m","y"],M="";!this.isFinished()&&-1!==N.indexOf(this.current());)M+=this.current(),this.forward();return P(R,{body:L,flags:M},t,n)}if(-1!==i.indexOf(A)){this.forward();var I,F=["==","===","!=","!==","<=",">=","//","**"],$=A+this.current();switch(-1!==r.indexOf(F,$)&&(this.forward(),A=$,-1!==r.indexOf(F,$+this.current())&&(A=$+this.current(),this.forward())),A){case"(":I=h;break;case")":I=m;break;case"[":I=g;break;case"]":I=v;break;case"{":I=y;break;case"}":I=b;break;case",":I=x;break;case":":I=k;break;case"~":I=S;break;case"|":I=E;break;default:I=w}return P(I,A,t,n)}if((e=this._extractUntil(o+i)).match(/^[-+]?[0-9]+$/)){if("."===this.current()){this.forward();var j=this._extract("0123456789");return P(C,e+"."+j,t,n)}return P("int",e,t,n)}if(e.match(/^(true|false)$/))return P(O,e,t,n);if("none"===e)return P(T,e,t,n);if("null"===e)return P(T,e,t,n);if(e)return P(_,e,t,n);throw new Error("Unexpected value while parsing: "+e)}var z,B=this.tags.BLOCK_START.charAt(0)+this.tags.VARIABLE_START.charAt(0)+this.tags.COMMENT_START.charAt(0)+this.tags.COMMENT_END.charAt(0);if(this.isFinished())return null;if((e=this._extractString(this.tags.BLOCK_START+"-"))||(e=this._extractString(this.tags.BLOCK_START)))return this.in_code=!0,P(u,e,t,n);if((e=this._extractString(this.tags.VARIABLE_START+"-"))||(e=this._extractString(this.tags.VARIABLE_START)))return this.in_code=!0,P(d,e,t,n);e="";var D=!1;for(this._matches(this.tags.COMMENT_START)&&(D=!0,e=this._extractString(this.tags.COMMENT_START));null!==(z=this._extractUntil(B));){if(e+=z,(this._matches(this.tags.BLOCK_START)||this._matches(this.tags.VARIABLE_START)||this._matches(this.tags.COMMENT_START))&&!D){if(this.lstripBlocks&&this._matches(this.tags.BLOCK_START)&&this.colno>0&&this.colno<=e.length){var W=e.slice(-this.colno);if(/^\s+$/.test(W)&&!(e=e.slice(0,-this.colno)).length)return this.nextToken()}break}if(this._matches(this.tags.COMMENT_END)){if(!D)throw new Error("unexpected end of comment");e+=this._extractString(this.tags.COMMENT_END);break}e+=this.current(),this.forward()}if(null===z&&D)throw new Error("expected end of comment, got end of file");return P(D?f:l,e,t,n)},t._parseString=function(e){this.forward();for(var t="";!this.isFinished()&&this.current()!==e;){var n=this.current();if("\\"===n){switch(this.forward(),this.current()){case"n":t+="\n";break;case"t":t+="\t";break;case"r":t+="\r";break;default:t+=this.current()}this.forward()}else t+=n,this.forward()}return this.forward(),t},t._matches=function(e){return this.index+e.length>this.len?null:this.str.slice(this.index,this.index+e.length)===e},t._extractString=function(e){return this._matches(e)?(this.forwardN(e.length),e):null},t._extractUntil=function(e){return this._extractMatching(!0,e||"")},t._extract=function(e){return this._extractMatching(!1,e)},t._extractMatching=function(e,t){if(this.isFinished())return null;var n=t.indexOf(this.current());if(e&&-1===n||!e&&-1!==n){var r=this.current();this.forward();for(var o=t.indexOf(this.current());(e&&-1===o||!e&&-1!==o)&&!this.isFinished();)r+=this.current(),this.forward(),o=t.indexOf(this.current());return r}return""},t._extractRegex=function(e){var t=this.currentStr().match(e);return t?(this.forwardN(t[0].length),t):null},t.isFinished=function(){return this.index>=this.len},t.forwardN=function(e){for(var t=0;t<e;t++)this.forward()},t.forward=function(){this.index++,"\n"===this.previous()?(this.lineno++,this.colno=0):this.colno++},t.backN=function(e){for(var t=0;t<e;t++)this.back()},t.back=function(){if(this.index--,"\n"===this.current()){this.lineno--;var e=this.src.lastIndexOf("\n",this.index-1);this.colno=-1===e?this.index:this.index-e}else this.colno--},t.current=function(){return this.isFinished()?"":this.str.charAt(this.index)},t.currentStr=function(){return this.isFinished()?"":this.str.substr(this.index)},t.previous=function(){return this.str.charAt(this.index-1)},e}();e.exports={lex:function(e,t){return new A(e,t)},TOKEN_STRING:a,TOKEN_WHITESPACE:s,TOKEN_DATA:l,TOKEN_BLOCK_START:u,TOKEN_BLOCK_END:c,TOKEN_VARIABLE_START:d,TOKEN_VARIABLE_END:p,TOKEN_COMMENT:f,TOKEN_LEFT_PAREN:h,TOKEN_RIGHT_PAREN:m,TOKEN_LEFT_BRACKET:g,TOKEN_RIGHT_BRACKET:v,TOKEN_LEFT_CURLY:y,TOKEN_RIGHT_CURLY:b,TOKEN_OPERATOR:w,TOKEN_COMMA:x,TOKEN_COLON:k,TOKEN_TILDE:S,TOKEN_PIPE:E,TOKEN_INT:"int",TOKEN_FLOAT:C,TOKEN_BOOLEAN:O,TOKEN_NONE:T,TOKEN_SYMBOL:_,TOKEN_SPECIAL:"special",TOKEN_REGEX:R}},function(e,t,n){function r(e,t){return r=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},r(e,t)}var o=n(6),i=n(19).PrecompiledLoader,a=function(e){var t,n;function o(t,n){var r;return(r=e.call(this)||this).baseURL=t||".",n=n||{},r.useCache=!!n.useCache,r.async=!!n.async,r}n=e,(t=o).prototype=Object.create(n.prototype),t.prototype.constructor=t,r(t,n);var i=o.prototype;return i.resolve=function(e,t){throw new Error("relative templates not support in the browser yet")},i.getSource=function(e,t){var n,r=this,o=this.useCache;return this.fetch(this.baseURL+"/"+e,function(i,a){if(i)if(t)t(i.content);else{if(404!==i.status)throw i.content;n=null}else n={src:a,path:e,noCache:!o},r.emit("load",e,n),t&&t(null,n)}),n},i.fetch=function(e,t){if("undefined"==typeof window)throw new Error("WebLoader can only by used in a browser");var n=new XMLHttpRequest,r=!0;n.onreadystatechange=function(){4===n.readyState&&r&&(r=!1,0===n.status||200===n.status?t(null,n.responseText):t({status:n.status,content:n.responseText}))},e+=(-1===e.indexOf("?")?"?":"&")+"s="+(new Date).getTime(),n.open("GET",e,this.async),n.send()},o}(o);e.exports={WebLoader:a,PrecompiledLoader:i}},function(e,t,n){var r,o=n(0),i=n(7),a=i.Environment,s=i.Template,l=n(6),u=n(10),c=n(23),d=n(5),p=n(8),f=n(9),h=n(2),m=n(3),g=n(25);function v(e,t){var n;return t=t||{},o.isObject(e)&&(t=e,e=null),u.FileSystemLoader?n=new u.FileSystemLoader(e,{watch:t.watch,noCache:t.noCache}):u.WebLoader&&(n=new u.WebLoader(e,{useCache:t.web&&t.web.useCache,async:t.web&&t.web.async})),r=new a(n,t),t&&t.express&&r.express(t.express),r}e.exports={Environment:a,Template:s,Loader:l,FileSystemLoader:u.FileSystemLoader,NodeResolveLoader:u.NodeResolveLoader,PrecompiledLoader:u.PrecompiledLoader,WebLoader:u.WebLoader,compiler:d,parser:p,lexer:f,runtime:h,lib:o,nodes:m,installJinjaCompat:g,configure:v,reset:function(){r=void 0},compile:function(e,t,n,o){return r||v(),new s(e,t,n,o)},render:function(e,t,n){return r||v(),r.render(e,t,n)},renderString:function(e,t,n){return r||v(),r.renderString(e,t,n)},precompile:c?c.precompile:void 0,precompileString:c?c.precompileString:void 0}},function(e,t,n){var r=n(13),o=[],i=[],a=r.makeRequestCallFromTimer(function(){if(i.length)throw i.shift()});function s(e){var t;(t=o.length?o.pop():new l).task=e,r(t)}function l(){this.task=null}e.exports=s,l.prototype.call=function(){try{this.task.call()}catch(e){s.onerror?s.onerror(e):(i.push(e),a())}finally{this.task=null,o[o.length]=this}}},function(e,t,n){(function(t){function n(e){o.length||r(),o[o.length]=e}e.exports=n;var r,o=[],i=0;function a(){for(;i<o.length;){var e=i;if(i+=1,o[e].call(),i>1024){for(var t=0,n=o.length-i;t<n;t++)o[t]=o[t+i];o.length-=i,i=0}}o.length=0,i=0}var s=void 0!==t?t:self,l=s.MutationObserver||s.WebKitMutationObserver;function u(e){return function(){var t=setTimeout(r,0),n=setInterval(r,50);function r(){clearTimeout(t),clearInterval(n),e()}}}r="function"==typeof l?function(e){var t=1,n=new l(e),r=document.createTextNode("");return n.observe(r,{characterData:!0}),function(){t=-t,r.data=t}}(a):u(a),n.requestFlush=r,n.makeRequestCallFromTimer=u}).call(t,n(14))},function(e,t){var n;n=function(){return this}();try{n=n||Function("return this")()||(0,eval)("this")}catch(e){"object"==typeof window&&(n=window)}e.exports=n},function(e,t,n){var r,o,i,a,s;o=function(){var e=Array.prototype.slice.call(arguments);"function"==typeof e[0]&&e[0].apply(null,e.splice(1))},i=function(e){"function"==typeof setImmediate?setImmediate(e):void 0!==nl&&nl.nextTick?nl.nextTick(e):setTimeout(e,0)},a=Array.isArray||function(e){return"[object Array]"===Object.prototype.toString.call(e)},s=function(e,t,n){var r=n?i:o;if(t=t||function(){},!a(e)){var s=new Error("First argument to waterfall must be an array of functions");return t(s)}if(!e.length)return t();var l=function(e){return function(n){if(n)t.apply(null,arguments),t=function(){};else{var o=Array.prototype.slice.call(arguments,1),i=e.next();i?o.push(l(i)):o.push(t),r(function(){e.apply(null,o)})}}};l(function(e){var t=function(n){var r=function(){return e.length&&e[n].apply(null,arguments),r.next()};return r.next=function(){return n<e.length-1?t(n+1):null},r};return t(0)}(e))()},void 0===(r=function(){return s}.apply(t,[]))||(e.exports=r)},function(e,t,n){var r,o="object"==typeof Reflect?Reflect:null,i=o&&"function"==typeof o.apply?o.apply:function(e,t,n){return Function.prototype.apply.call(e,t,n)};r=o&&"function"==typeof o.ownKeys?o.ownKeys:Object.getOwnPropertySymbols?function(e){return Object.getOwnPropertyNames(e).concat(Object.getOwnPropertySymbols(e))}:function(e){return Object.getOwnPropertyNames(e)};var a=Number.isNaN||function(e){return e!=e};function s(){s.init.call(this)}e.exports=s,e.exports.once=function(e,t){return new Promise(function(n,r){function o(n){e.removeListener(t,i),r(n)}function i(){"function"==typeof e.removeListener&&e.removeListener("error",o),n([].slice.call(arguments))}v(e,t,i,{once:!0}),"error"!==t&&function(e,t,n){"function"==typeof e.on&&v(e,"error",t,n)}(e,o,{once:!0})})},s.EventEmitter=s,s.prototype._events=void 0,s.prototype._eventsCount=0,s.prototype._maxListeners=void 0;var l=10;function u(e){if("function"!=typeof e)throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof e)}function c(e){return void 0===e._maxListeners?s.defaultMaxListeners:e._maxListeners}function d(e,t,n,r){var o,i,a,s;if(u(n),void 0===(i=e._events)?(i=e._events=Object.create(null),e._eventsCount=0):(void 0!==i.newListener&&(e.emit("newListener",t,n.listener?n.listener:n),i=e._events),a=i[t]),void 0===a)a=i[t]=n,++e._eventsCount;else if("function"==typeof a?a=i[t]=r?[n,a]:[a,n]:r?a.unshift(n):a.push(n),(o=c(e))>0&&a.length>o&&!a.warned){a.warned=!0;var l=new Error("Possible EventEmitter memory leak detected. "+a.length+" "+String(t)+" listeners added. Use emitter.setMaxListeners() to increase limit");l.name="MaxListenersExceededWarning",l.emitter=e,l.type=t,l.count=a.length,s=l,console&&console.warn&&console.warn(s)}return e}function p(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,0===arguments.length?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function f(e,t,n){var r={fired:!1,wrapFn:void 0,target:e,type:t,listener:n},o=p.bind(r);return o.listener=n,r.wrapFn=o,o}function h(e,t,n){var r=e._events;if(void 0===r)return[];var o=r[t];return void 0===o?[]:"function"==typeof o?n?[o.listener||o]:[o]:n?function(e){for(var t=new Array(e.length),n=0;n<t.length;++n)t[n]=e[n].listener||e[n];return t}(o):g(o,o.length)}function m(e){var t=this._events;if(void 0!==t){var n=t[e];if("function"==typeof n)return 1;if(void 0!==n)return n.length}return 0}function g(e,t){for(var n=new Array(t),r=0;r<t;++r)n[r]=e[r];return n}function v(e,t,n,r){if("function"==typeof e.on)r.once?e.once(t,n):e.on(t,n);else{if("function"!=typeof e.addEventListener)throw new TypeError('The "emitter" argument must be of type EventEmitter. Received type '+typeof e);e.addEventListener(t,function o(i){r.once&&e.removeEventListener(t,o),n(i)})}}Object.defineProperty(s,"defaultMaxListeners",{enumerable:!0,get:function(){return l},set:function(e){if("number"!=typeof e||e<0||a(e))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+e+".");l=e}}),s.init=function(){void 0!==this._events&&this._events!==Object.getPrototypeOf(this)._events||(this._events=Object.create(null),this._eventsCount=0),this._maxListeners=this._maxListeners||void 0},s.prototype.setMaxListeners=function(e){if("number"!=typeof e||e<0||a(e))throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received '+e+".");return this._maxListeners=e,this},s.prototype.getMaxListeners=function(){return c(this)},s.prototype.emit=function(e){for(var t=[],n=1;n<arguments.length;n++)t.push(arguments[n]);var r="error"===e,o=this._events;if(void 0!==o)r=r&&void 0===o.error;else if(!r)return!1;if(r){var a;if(t.length>0&&(a=t[0]),a instanceof Error)throw a;var s=new Error("Unhandled error."+(a?" ("+a.message+")":""));throw s.context=a,s}var l=o[e];if(void 0===l)return!1;if("function"==typeof l)i(l,this,t);else{var u=l.length,c=g(l,u);for(n=0;n<u;++n)i(c[n],this,t)}return!0},s.prototype.addListener=function(e,t){return d(this,e,t,!1)},s.prototype.on=s.prototype.addListener,s.prototype.prependListener=function(e,t){return d(this,e,t,!0)},s.prototype.once=function(e,t){return u(t),this.on(e,f(this,e,t)),this},s.prototype.prependOnceListener=function(e,t){return u(t),this.prependListener(e,f(this,e,t)),this},s.prototype.removeListener=function(e,t){var n,r,o,i,a;if(u(t),void 0===(r=this._events))return this;if(void 0===(n=r[e]))return this;if(n===t||n.listener===t)0===--this._eventsCount?this._events=Object.create(null):(delete r[e],r.removeListener&&this.emit("removeListener",e,n.listener||t));else if("function"!=typeof n){for(o=-1,i=n.length-1;i>=0;i--)if(n[i]===t||n[i].listener===t){a=n[i].listener,o=i;break}if(o<0)return this;0===o?n.shift():function(e,t){for(;t+1<e.length;t++)e[t]=e[t+1];e.pop()}(n,o),1===n.length&&(r[e]=n[0]),void 0!==r.removeListener&&this.emit("removeListener",e,a||t)}return this},s.prototype.off=s.prototype.removeListener,s.prototype.removeAllListeners=function(e){var t,n,r;if(void 0===(n=this._events))return this;if(void 0===n.removeListener)return 0===arguments.length?(this._events=Object.create(null),this._eventsCount=0):void 0!==n[e]&&(0===--this._eventsCount?this._events=Object.create(null):delete n[e]),this;if(0===arguments.length){var o,i=Object.keys(n);for(r=0;r<i.length;++r)"removeListener"!==(o=i[r])&&this.removeAllListeners(o);return this.removeAllListeners("removeListener"),this._events=Object.create(null),this._eventsCount=0,this}if("function"==typeof(t=n[e]))this.removeListener(e,t);else if(void 0!==t)for(r=t.length-1;r>=0;r--)this.removeListener(e,t[r]);return this},s.prototype.listeners=function(e){return h(this,e,!0)},s.prototype.rawListeners=function(e){return h(this,e,!1)},s.listenerCount=function(e,t){return"function"==typeof e.listenerCount?e.listenerCount(t):m.call(e,t)},s.prototype.listenerCount=m,s.prototype.eventNames=function(){return this._eventsCount>0?r(this._events):[]}},function(e,t,n){var r=n(3),o=n(0),i=0;function a(){return"hole_"+i++}function s(e,t){for(var n=null,r=0;r<e.length;r++){var o=t(e[r]);o!==e[r]&&(n||(n=e.slice()),n[r]=o)}return n||e}function l(e,t,n){if(!(e instanceof r.Node))return e;if(!n){var o=t(e);if(o&&o!==e)return o}if(e instanceof r.NodeList){var i=s(e.children,function(e){return l(e,t,n)});i!==e.children&&(e=new r[e.typename](e.lineno,e.colno,i))}else if(e instanceof r.CallExtension){var a=l(e.args,t,n),u=s(e.contentArgs,function(e){return l(e,t,n)});a===e.args&&u===e.contentArgs||(e=new r[e.typename](e.extName,e.prop,a,u))}else{var c=e.fields.map(function(t){return e[t]}),d=s(c,function(e){return l(e,t,n)});d!==c&&(e=new r[e.typename](e.lineno,e.colno),d.forEach(function(t,n){e[e.fields[n]]=t}))}return n&&t(e)||e}function u(e,t){return l(e,t,!0)}function c(e,t,n){var i=[],s=u(n?e[n]:e,function(e){var n;return e instanceof r.Block?e:((e instanceof r.Filter&&-1!==o.indexOf(t,e.name.value)||e instanceof r.CallExtensionAsync)&&(n=new r.Symbol(e.lineno,e.colno,a()),i.push(new r.FilterAsync(e.lineno,e.colno,e.name,e.args,n))),n)});return n?e[n]=s:e=s,i.length?(i.push(e),new r.NodeList(e.lineno,e.colno,i)):e}function d(e,t){return function(e){return u(e,function(e){if(e instanceof r.If||e instanceof r.For){var t=!1;if(l(e,function(e){if(e instanceof r.FilterAsync||e instanceof r.IfAsync||e instanceof r.AsyncEach||e instanceof r.AsyncAll||e instanceof r.CallExtensionAsync)return t=!0,e}),t){if(e instanceof r.If)return new r.IfAsync(e.lineno,e.colno,e.cond,e.body,e.else_);if(e instanceof r.For&&!(e instanceof r.AsyncAll))return new r.AsyncEach(e.lineno,e.colno,e.arr,e.name,e.body,e.else_)}}})}(function(e){return l(e,function(e){if(e instanceof r.Block){var t=!1,n=a();e.body=l(e.body,function(e){if(e instanceof r.FunCall&&"super"===e.name.value)return t=!0,new r.Symbol(e.lineno,e.colno,n)}),t&&e.body.children.unshift(new r.Super(0,0,e.name,new r.Symbol(0,0,n)))}})}(function(e,t){return u(e,function(e){return e instanceof r.Output?c(e,t):e instanceof r.Set?c(e,t,"value"):e instanceof r.For?c(e,t,"arr"):e instanceof r.If?c(e,t,"cond"):e instanceof r.CallExtension?c(e,t,"args"):void 0})}(e,t)))}e.exports={transform:function(e,t){return d(e,t||[])}}},function(e,t,n){var r=n(0),o=n(2);function i(e,t){return null==e||!1===e?t:e}function a(e){return e!=e}function s(e){var t=(e=i(e,"")).toLowerCase();return o.copySafeness(e,t.charAt(0).toUpperCase()+t.slice(1))}function l(e){if(r.isString(e))return e.split("");if(r.isObject(e))return r._entries(e||{}).map(function(e){return{key:e[0],value:e[1]}});if(r.isArray(e))return e;throw new r.TemplateError("list filter: type not iterable")}function u(e){return function(t,n,o){void 0===n&&(n="truthy");var i=this,a=i.env.getTest(n);return r.toArray(t).filter(function(t){return a.call(i,t,o)===e})}}function c(e){return o.copySafeness(e,e.replace(/^\s*|\s*$/g,""))}(t=e.exports={}).abs=Math.abs,t.batch=function(e,t,n){var r,o=[],i=[];for(r=0;r<e.length;r++)r%t===0&&i.length&&(o.push(i),i=[]),i.push(e[r]);if(i.length){if(n)for(r=i.length;r<t;r++)i.push(n);o.push(i)}return o},t.capitalize=s,t.center=function(e,t){if(t=t||80,(e=i(e,"")).length>=t)return e;var n=t-e.length,a=r.repeat(" ",n/2-n%2),s=r.repeat(" ",n/2);return o.copySafeness(e,a+e+s)},t.default=function(e,t,n){return n?e||t:void 0!==e?e:t},t.dictsort=function(e,t,n){if(!r.isObject(e))throw new r.TemplateError("dictsort filter: val must be an object");var o,i=[];for(var a in e)i.push([a,e[a]]);if(void 0===n||"key"===n)o=0;else{if("value"!==n)throw new r.TemplateError("dictsort filter: You can only sort by either key or value");o=1}return i.sort(function(e,n){var i=e[o],a=n[o];return t||(r.isString(i)&&(i=i.toUpperCase()),r.isString(a)&&(a=a.toUpperCase())),i>a?1:i===a?0:-1}),i},t.dump=function(e,t){return JSON.stringify(e,null,t)},t.escape=function(e){return e instanceof o.SafeString?e:(e=null==e?"":e,o.markSafe(r.escape(e.toString())))},t.safe=function(e){return e instanceof o.SafeString?e:(e=null==e?"":e,o.markSafe(e.toString()))},t.first=function(e){return e[0]},t.forceescape=function(e){return e=null==e?"":e,o.markSafe(r.escape(e.toString()))},t.groupby=function(e,t){return r.groupBy(e,t,this.env.opts.throwOnUndefined)},t.indent=function(e,t,n){if(""===(e=i(e,"")))return"";t=t||4;var a=e.split("\n"),s=r.repeat(" ",t),l=a.map(function(e,t){return 0!==t||n?""+s+e:e}).join("\n");return o.copySafeness(e,l)},t.join=function(e,t,n){return t=t||"",n&&(e=r.map(e,function(e){return e[n]})),e.join(t)},t.last=function(e){return e[e.length-1]},t.length=function(e){var t=i(e,"");return void 0!==t?"function"==typeof Map&&t instanceof Map||"function"==typeof Set&&t instanceof Set?t.size:!r.isObject(t)||t instanceof o.SafeString?t.length:r.keys(t).length:0},t.list=l,t.lower=function(e){return(e=i(e,"")).toLowerCase()},t.nl2br=function(e){return null==e?"":o.copySafeness(e,e.replace(/\r\n|\n/g,"<br />\n"))},t.random=function(e){return e[Math.floor(Math.random()*e.length)]},t.reject=u(!1),t.rejectattr=function(e,t){return e.filter(function(e){return!e[t]})},t.select=u(!0),t.selectattr=function(e,t){return e.filter(function(e){return!!e[t]})},t.replace=function(e,t,n,r){var i=e;if(t instanceof RegExp)return e.replace(t,n);void 0===r&&(r=-1);var a="";if("number"==typeof t)t=""+t;else if("string"!=typeof t)return e;if("number"==typeof e&&(e=""+e),"string"!=typeof e&&!(e instanceof o.SafeString))return e;if(""===t)return a=n+e.split("").join(n)+n,o.copySafeness(e,a);var s=e.indexOf(t);if(0===r||-1===s)return e;for(var l=0,u=0;s>-1&&(-1===r||u<r);)a+=e.substring(l,s)+n,l=s+t.length,u++,s=e.indexOf(t,l);return l<e.length&&(a+=e.substring(l)),o.copySafeness(i,a)},t.reverse=function(e){var t;return(t=r.isString(e)?l(e):r.map(e,function(e){return e})).reverse(),r.isString(e)?o.copySafeness(e,t.join("")):t},t.round=function(e,t,n){t=t||0;var r=Math.pow(10,t);return("ceil"===n?Math.ceil:"floor"===n?Math.floor:Math.round)(e*r)/r},t.slice=function(e,t,n){for(var r=Math.floor(e.length/t),o=e.length%t,i=[],a=0,s=0;s<t;s++){var l=a+s*r;s<o&&a++;var u=a+(s+1)*r,c=e.slice(l,u);n&&s>=o&&c.push(n),i.push(c)}return i},t.sum=function(e,t,n){return void 0===n&&(n=0),t&&(e=r.map(e,function(e){return e[t]})),n+e.reduce(function(e,t){return e+t},0)},t.sort=o.makeMacro(["value","reverse","case_sensitive","attribute"],[],function(e,t,n,o){var i=this,a=r.map(e,function(e){return e}),s=r.getAttrGetter(o);return a.sort(function(e,a){var l=o?s(e):e,u=o?s(a):a;if(i.env.opts.throwOnUndefined&&o&&(void 0===l||void 0===u))throw new TypeError('sort: attribute "'+o+'" resolved to undefined');return!n&&r.isString(l)&&r.isString(u)&&(l=l.toLowerCase(),u=u.toLowerCase()),l<u?t?1:-1:l>u?t?-1:1:0}),a}),t.string=function(e){return o.copySafeness(e,e)},t.striptags=function(e,t){var n=c((e=i(e,"")).replace(/<\/?([a-z][a-z0-9]*)\b[^>]*>|<!--[\s\S]*?-->/gi,"")),r="";return r=t?n.replace(/^ +| +$/gm,"").replace(/ +/g," ").replace(/(\r\n)/g,"\n").replace(/\n\n\n+/g,"\n\n"):n.replace(/\s+/gi," "),o.copySafeness(e,r)},t.title=function(e){var t=(e=i(e,"")).split(" ").map(function(e){return s(e)});return o.copySafeness(e,t.join(" "))},t.trim=c,t.truncate=function(e,t,n,r){var a=e;if(t=t||255,(e=i(e,"")).length<=t)return e;if(n)e=e.substring(0,t);else{var s=e.lastIndexOf(" ",t);-1===s&&(s=t),e=e.substring(0,s)}return e+=null!=r?r:"...",o.copySafeness(a,e)},t.upper=function(e){return(e=i(e,"")).toUpperCase()},t.urlencode=function(e){var t=encodeURIComponent;return r.isString(e)?t(e):(r.isArray(e)?e:r._entries(e)).map(function(e){var n=e[0],r=e[1];return t(n)+"="+t(r)}).join("&")};var d=/^(?:\(|<|&lt;)?(.*?)(?:\.|,|\)|\n|&gt;)?$/,p=/^[\w.!#$%&'*+\-\/=?\^`{|}~]+@[a-z\d\-]+(\.[a-z\d\-]+)+$/i,f=/^https?:\/\/.*$/,h=/^www\./,m=/\.(?:org|net|com)(?:\:|\/|$)/;t.urlize=function(e,t,n){a(t)&&(t=1/0);var r=!0===n?' rel="nofollow"':"";return e.split(/(\s+)/).filter(function(e){return e&&e.length}).map(function(e){var n=e.match(d),o=n?n[1]:e,i=o.substr(0,t);return f.test(o)?'<a href="'+o+'"'+r+">"+i+"</a>":h.test(o)?'<a href="http://'+o+'"'+r+">"+i+"</a>":p.test(o)?'<a href="mailto:'+o+'">'+o+"</a>":m.test(o)?'<a href="http://'+o+'"'+r+">"+i+"</a>":e}).join("")},t.wordcount=function(e){var t=(e=i(e,""))?e.match(/\w+/g):null;return t?t.length:null},t.float=function(e,t){var n=parseFloat(e);return a(n)?t:n};var g=o.makeMacro(["value","default","base"],[],function(e,t,n){void 0===n&&(n=10);var r=parseInt(e,n);return a(r)?t:r});t.int=g,t.d=t.default,t.e=t.escape},function(e,t,n){function r(e,t){return r=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},r(e,t)}var o=function(e){var t,n;function o(t){var n;return(n=e.call(this)||this).precompiled=t||{},n}return n=e,(t=o).prototype=Object.create(n.prototype),t.prototype.constructor=t,r(t,n),o.prototype.getSource=function(e){return this.precompiled[e]?{src:{type:"code",obj:this.precompiled[e]},path:e}:null},o}(n(6));e.exports={PrecompiledLoader:o}},function(e,t,n){var r=n(2).SafeString;t.callable=function(e){return"function"==typeof e},t.defined=function(e){return void 0!==e},t.divisibleby=function(e,t){return e%t===0},t.escaped=function(e){return e instanceof r},t.equalto=function(e,t){return e===t},t.eq=t.equalto,t.sameas=t.equalto,t.even=function(e){return e%2==0},t.falsy=function(e){return!e},t.ge=function(e,t){return e>=t},t.greaterthan=function(e,t){return e>t},t.gt=t.greaterthan,t.le=function(e,t){return e<=t},t.lessthan=function(e,t){return e<t},t.lt=t.lessthan,t.lower=function(e){return e.toLowerCase()===e},t.ne=function(e,t){return e!==t},t.null=function(e){return null===e},t.number=function(e){return"number"==typeof e},t.odd=function(e){return e%2==1},t.string=function(e){return"string"==typeof e},t.truthy=function(e){return!!e},t.undefined=function(e){return void 0===e},t.upper=function(e){return e.toUpperCase()===e},t.iterable=function(e){return"undefined"!=typeof Symbol?!!e[Symbol.iterator]:Array.isArray(e)||"string"==typeof e},t.mapping=function(e){var t=null!=e&&"object"==typeof e&&!Array.isArray(e);return Set?t&&!(e instanceof Set):t}},function(e,t,n){e.exports=function(){return{range:function(e,t,n){void 0===t?(t=e,e=0,n=1):n||(n=1);var r=[];if(n>0)for(var o=e;o<t;o+=n)r.push(o);else for(var i=e;i>t;i+=n)r.push(i);return r},cycler:function(){return function(e){var t=-1;return{current:null,reset:function(){t=-1,this.current=null},next:function(){return++t>=e.length&&(t=0),this.current=e[t],this.current}}}(Array.prototype.slice.call(arguments))},joiner:function(e){return function(e){e=e||",";var t=!0;return function(){var n=t?"":e;return t=!1,n}}(e)}}}},function(e,t,n){var r=n(4);e.exports=function(e,t){function n(e,t){if(this.name=e,this.path=e,this.defaultEngine=t.defaultEngine,this.ext=r.extname(e),!this.ext&&!this.defaultEngine)throw new Error("No default engine was specified and no extension was provided.");this.ext||(this.name+=this.ext=("."!==this.defaultEngine[0]?".":"")+this.defaultEngine)}return n.prototype.render=function(t,n){e.render(this.name,t,n)},t.set("view",n),t.set("nunjucksEnv",e),e}},function(e,t,n){var r=n(4),o=n(4),i=n(0)._prettifyError,a=n(5),s=n(7).Environment,l=n(24);function u(e,t){return!!Array.isArray(t)&&t.some(function(t){return e.match(t)})}function c(e,t){(t=t||{}).isString=!0;var n=t.env||new s([]),r=t.wrapper||l;if(!t.name)throw new Error('the "name" option is required when compiling a string');return r([d(e,t.name,n)],t)}function d(e,t,n){var r,o=(n=n||new s([])).asyncFilters,l=n.extensionsList;t=t.replace(/\\/g,"/");try{r=a.compile(e,o,l,t,n.opts)}catch(e){throw i(t,!1,e)}return{name:t,template:r}}e.exports={precompile:function(e,t){var n=(t=t||{}).env||new s([]),i=t.wrapper||l;if(t.isString)return c(e,t);var a=r.existsSync(e)&&r.statSync(e),p=[],f=[];if(a.isFile())p.push(d(r.readFileSync(e,"utf-8"),t.name||e,n));else if(a.isDirectory()){!function n(i){r.readdirSync(i).forEach(function(a){var s=o.join(i,a),l=s.substr(o.join(e,"/").length),c=r.statSync(s);c&&c.isDirectory()?u(l+="/",t.exclude)||n(s):u(l,t.include)&&f.push(s)})}(e);for(var h=0;h<f.length;h++){var m=f[h].replace(o.join(e,"/"),"");try{p.push(d(r.readFileSync(f[h],"utf-8"),m,n))}catch(e){if(!t.force)throw e;console.error(e)}}}return i(p,t)},precompileString:c}},function(e,t,n){e.exports=function(e,t){var n="";t=t||{};for(var r=0;r<e.length;r++){var o=JSON.stringify(e[r].name);n+="(function() {(window.nunjucksPrecompiled = window.nunjucksPrecompiled || {})["+o+"] = (function() {\n"+e[r].template+"\n})();\n",t.asFunction&&(n+="return function(ctx, cb) { return nunjucks.render("+o+", ctx, cb); }\n"),n+="})();\n"}return n}},function(e,t,n){e.exports=function(){var e,t,n=this.runtime,r=this.lib,o=this.compiler.Compiler,i=this.parser.Parser,a=this.nodes,s=this.lexer,l=n.contextOrFrameLookup,u=n.memberLookup;function c(e){return{index:e.index,lineno:e.lineno,colno:e.colno}}if(o&&(e=o.prototype.assertType),i&&(t=i.prototype.parseAggregate),n.contextOrFrameLookup=function(e,t,n){var r=l.apply(this,arguments);if(void 0!==r)return r;switch(n){case"True":return!0;case"False":return!1;case"None":return null;default:return}},a&&o&&i){var d=a.Node.extend("Slice",{fields:["start","stop","step"],init:function(e,t,n,r,o){n=n||new a.Literal(e,t,null),r=r||new a.Literal(e,t,null),o=o||new a.Literal(e,t,1),this.parent(e,t,n,r,o)}});o.prototype.assertType=function(t){t instanceof d||e.apply(this,arguments)},o.prototype.compileSlice=function(e,t){this._emit("("),this._compileExpression(e.start,t),this._emit("),("),this._compileExpression(e.stop,t),this._emit("),("),this._compileExpression(e.step,t),this._emit(")")},i.prototype.parseAggregate=function(){var e=this,n=c(this.tokens);n.colno--,n.index--;try{return t.apply(this)}catch(t){var o=c(this.tokens),i=function(){return r._assign(e.tokens,o),t};r._assign(this.tokens,n),this.peeked=!1;var l=this.peekToken();if(l.type!==s.TOKEN_LEFT_BRACKET)throw i();this.nextToken();for(var u=new d(l.lineno,l.colno),p=!1,f=0;f<=u.fields.length&&!this.skip(s.TOKEN_RIGHT_BRACKET);f++){if(f===u.fields.length){if(!p)break;this.fail("parseSlice: too many slice components",l.lineno,l.colno)}this.skip(s.TOKEN_COLON)?p=!0:(u[u.fields[f]]=this.parseExpression(),p=this.skip(s.TOKEN_COLON)||p)}if(!p)throw i();return new a.Array(l.lineno,l.colno,[u])}}}function p(e,t,r,o){e=e||[],null===t&&(t=o<0?e.length-1:0),null===r?r=o<0?-1:e.length:r<0&&(r+=e.length),t<0&&(t+=e.length);for(var i=[],a=t;!(a<0||a>e.length||o>0&&a>=r||o<0&&a<=r);a+=o)i.push(n.memberLookup(e,a));return i}function f(e,t){return Object.prototype.hasOwnProperty.call(e,t)}var h={pop:function(e){if(void 0===e)return this.pop();if(e>=this.length||e<0)throw new Error("KeyError");return this.splice(e,1)},append:function(e){return this.push(e)},remove:function(e){for(var t=0;t<this.length;t++)if(this[t]===e)return this.splice(t,1);throw new Error("ValueError")},count:function(e){for(var t=0,n=0;n<this.length;n++)this[n]===e&&t++;return t},index:function(e){var t;if(-1===(t=this.indexOf(e)))throw new Error("ValueError");return t},find:function(e){return this.indexOf(e)},insert:function(e,t){return this.splice(e,0,t)}},m={items:function(){return r._entries(this)},values:function(){return r._values(this)},keys:function(){return r.keys(this)},get:function(e,t){var n=this[e];return void 0===n&&(n=t),n},has_key:function(e){return f(this,e)},pop:function(e,t){var n=this[e];if(void 0===n&&void 0!==t)n=t;else{if(void 0===n)throw new Error("KeyError");delete this[e]}return n},popitem:function(){var e=r.keys(this);if(!e.length)throw new Error("KeyError");var t=e[0],n=this[t];return delete this[t],[t,n]},setdefault:function(e,t){return void 0===t&&(t=null),e in this||(this[e]=t),this[e]},update:function(e){return r._assign(this,e),null}};return m.iteritems=m.items,m.itervalues=m.values,m.iterkeys=m.keys,n.memberLookup=function(e,t,n){return 4===arguments.length?p.apply(this,arguments):(e=e||{},r.isArray(e)&&f(h,t)?h[t].bind(e):r.isObject(e)&&f(m,t)?m[t].bind(e):u.apply(this,arguments))},function(){n.contextOrFrameLookup=l,n.memberLookup=u,o&&(o.prototype.assertType=e),i&&(i.prototype.parseAggregate=t)}}}])},e.exports=t()}(rl)),rl.exports),il=t(ol);const al={GoogleChart:function({chart:e,source:t,view:n,report:r,schema:o,dashboard:i,query:a}){const[s,c]=u.useState([]),d=Os(),[p,f]=u.useState([]);l.useEffect(()=>{(async()=>{const e=await Cs.getDateRanges();f(e)})()},[]);const h=l.useMemo(()=>{const e="YYYY-MM-dd",t=a?.date_range?.name,n=p.find(e=>e.name===t);if(!n)return e;return Ts[n?.granularity]||e},[p,a]);return u.useEffect(()=>{if(!(e&&n&&t&&r&&o))return;let i=[];i.push(function(e,t){const n=[...t.doc.metrics,...t.doc.dimensions],r=e.columns.reduce((e,t)=>{const r=n.find(e=>e.name===t.name)||t;return e.push(r.title||r.name),e},[]);return r}(n,o));const a=Jo(n,o);t?.forEach(e=>{const t=a(e);i.push(t)}),t?.length?c(i):c()},[e,t,n,r,o]),s?u.createElement("div",{style:{}},u.createElement(Ko,ko({width:e?.doc.size?.width||"100%",chartType:e?.doc.chart?.type,data:s,options:(t=>{if("Table"===e?.doc.chart?.type)return{...e?.doc.chart?.options,cssClassNames:d};if("AreaChart"===e?.doc.chart?.type){const n=e?.doc.chart?.options?.hAxis||{},r={...{ticks:t.slice(1).map(e=>e[0]),format:h},...n};return{...e?.doc.chart?.options,hAxis:r,focusTarget:"category"}}return e?.doc.chart?.options})(s)},e?.doc.chart?.props))):u.createElement("div",null)},LabelChart:function({chart:e,source:t,view:n,report:r,schema:o}){const[i,a]=u.useState([]),[s,l]=u.useState(),[c,d]=u.useState();return u.useEffect(()=>{if(!(e&&n&&t&&r&&o))return;let i=[];const s=Jo(n,o);t.forEach(e=>i.push(s(e))),a(i);const u=e?.doc?.chart?.options||{},c=u?.index||0;if(i.length>0&&l(i[0][c]),u.subText?.format){il.configure({autoescape:!1});const e=Jo(n,o,"object")(t[0]),r=il.renderString(u.subText?.format,e);d(r)}},[e,t,n,r,o]),u.createElement("div",{style:{display:"flex",justifyContent:"center",alignContent:"center",height:"100%",flexDirection:"column"}},u.createElement(Ps,{variant:"h6"},s?.f||s),u.createElement(Ps,{variant:"caption"},c))}};function sl(e,t){return void 0!==al[e]?u.createElement(al[e],t):u.createElement(Ro,t)}function ll(e){return null!=e&&!(Array.isArray(e)&&0===e.length)}function ul(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return e&&(ll(e.value)&&""!==e.value||t&&ll(e.defaultValue)&&""!==e.defaultValue)}function cl(e,t){return l.isValidElement(e)&&-1!==t.indexOf(e.type.muiName)}var dl=l.createContext();var pl=l.forwardRef(function(e,t){var n=e.children,r=e.classes,o=e.className,i=e.color,a=void 0===i?"primary":i,s=e.component,u=void 0===s?"div":s,c=e.disabled,d=void 0!==c&&c,h=e.error,g=void 0!==h&&h,v=e.fullWidth,y=void 0!==v&&v,b=e.focused,w=e.hiddenLabel,x=void 0!==w&&w,k=e.margin,S=void 0===k?"none":k,E=e.required,C=void 0!==E&&E,O=e.size,T=e.variant,_=void 0===T?"standard":T,R=p(e,["children","classes","className","color","component","disabled","error","fullWidth","focused","hiddenLabel","margin","required","size","variant"]),P=l.useState(function(){var e=!1;return n&&l.Children.forEach(n,function(t){if(cl(t,["Input","Select"])){var n=cl(t,["Select"])?t.props.input:t;n&&n.props.startAdornment&&(e=!0)}}),e}),A=P[0],L=P[1],N=l.useState(function(){var e=!1;return n&&l.Children.forEach(n,function(t){cl(t,["Input","Select"])&&ul(t.props,!0)&&(e=!0)}),e}),M=N[0],I=N[1],F=l.useState(!1),$=F[0],j=F[1],z=void 0!==b?b:$;d&&z&&j(!1);var B=l.useCallback(function(){I(!0)},[]),D={adornedStart:A,setAdornedStart:L,color:a,disabled:d,error:g,filled:M,focused:z,fullWidth:y,hiddenLabel:x,margin:("small"===O?"dense":void 0)||S,onBlur:function(){j(!1)},onEmpty:l.useCallback(function(){I(!1)},[]),onFilled:B,onFocus:function(){j(!0)},registerEffect:undefined,required:C,variant:_};return l.createElement(dl.Provider,{value:D},l.createElement(u,f({className:m(r.root,o,"none"!==S&&r["margin".concat(Co(S))],y&&r.fullWidth),ref:t},R),n))}),fl=bo({root:{display:"inline-flex",flexDirection:"column",position:"relative",minWidth:0,padding:0,margin:0,border:0,verticalAlign:"top"},marginNormal:{marginTop:16,marginBottom:8},marginDense:{marginTop:8,marginBottom:4},fullWidth:{width:"100%"}},{name:"MuiFormControl"})(pl);function hl(){return l.useContext(dl)}function ml(e){return e&&e.ownerDocument||document}var gl,vl,yl,bl,wl={exports:{}},xl={},kl={exports:{}},Sl={};function El(){return vl||(vl=1,kl.exports=(gl||(gl=1,function(e){function t(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 n(e){return 0===e.length?null:e[0]}function r(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],u=s+1,c=e[u];if(0>o(l,n))u<i&&0>o(c,l)?(e[r]=c,e[u]=n,r=u):(e[r]=l,e[s]=n,r=s);else{if(!(u<i&&0>o(c,n)))break e;e[r]=c,e[u]=n,r=u}}}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 i=performance;e.unstable_now=function(){return i.now()}}else{var a=Date,s=a.now();e.unstable_now=function(){return a.now()-s}}var l=[],u=[],c=1,d=null,p=3,f=!1,h=!1,m=!1,g="function"==typeof setTimeout?setTimeout:null,v="function"==typeof clearTimeout?clearTimeout:null,y="undefined"!=typeof setImmediate?setImmediate:null;function b(e){for(var o=n(u);null!==o;){if(null===o.callback)r(u);else{if(!(o.startTime<=e))break;r(u),o.sortIndex=o.expirationTime,t(l,o)}o=n(u)}}function w(e){if(m=!1,b(e),!h)if(null!==n(l))h=!0,L(x);else{var t=n(u);null!==t&&N(w,t.startTime-e)}}function x(t,o){h=!1,m&&(m=!1,v(C),C=-1),f=!0;var i=p;try{for(b(o),d=n(l);null!==d&&(!(d.expirationTime>o)||t&&!_());){var a=d.callback;if("function"==typeof a){d.callback=null,p=d.priorityLevel;var s=a(d.expirationTime<=o);o=e.unstable_now(),"function"==typeof s?d.callback=s:d===n(l)&&r(l),b(o)}else r(l);d=n(l)}if(null!==d)var c=!0;else{var g=n(u);null!==g&&N(w,g.startTime-o),c=!1}return c}finally{d=null,p=i,f=!1}}"undefined"!=typeof navigator&&void 0!==navigator.scheduling&&void 0!==navigator.scheduling.isInputPending&&navigator.scheduling.isInputPending.bind(navigator.scheduling);var k,S=!1,E=null,C=-1,O=5,T=-1;function _(){return!(e.unstable_now()-T<O)}function R(){if(null!==E){var t=e.unstable_now();T=t;var n=!0;try{n=E(!0,t)}finally{n?k():(S=!1,E=null)}}else S=!1}if("function"==typeof y)k=function(){y(R)};else if("undefined"!=typeof MessageChannel){var P=new MessageChannel,A=P.port2;P.port1.onmessage=R,k=function(){A.postMessage(null)}}else k=function(){g(R,0)};function L(e){E=e,S||(S=!0,k())}function N(t,n){C=g(function(){t(e.unstable_now())},n)}e.unstable_IdlePriority=5,e.unstable_ImmediatePriority=1,e.unstable_LowPriority=4,e.unstable_NormalPriority=3,e.unstable_Profiling=null,e.unstable_UserBlockingPriority=2,e.unstable_cancelCallback=function(e){e.callback=null},e.unstable_continueExecution=function(){h||f||(h=!0,L(x))},e.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"):O=0<e?Math.floor(1e3/e):5},e.unstable_getCurrentPriorityLevel=function(){return p},e.unstable_getFirstCallbackNode=function(){return n(l)},e.unstable_next=function(e){switch(p){case 1:case 2:case 3:var t=3;break;default:t=p}var n=p;p=t;try{return e()}finally{p=n}},e.unstable_pauseExecution=function(){},e.unstable_requestPaint=function(){},e.unstable_runWithPriority=function(e,t){switch(e){case 1:case 2:case 3:case 4:case 5:break;default:e=3}var n=p;p=e;try{return t()}finally{p=n}},e.unstable_scheduleCallback=function(r,o,i){var a=e.unstable_now();switch(i="object"==typeof i&&null!==i&&"number"==typeof(i=i.delay)&&0<i?a+i:a,r){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 r={id:c++,callback:o,priorityLevel:r,startTime:i,expirationTime:s=i+s,sortIndex:-1},i>a?(r.sortIndex=i,t(u,r),null===n(l)&&r===n(u)&&(m?(v(C),C=-1):m=!0,N(w,i-a))):(r.sortIndex=s,t(l,r),h||f||(h=!0,L(x))),r},e.unstable_shouldYield=_,e.unstable_wrapCallback=function(e){var t=p;return function(){var n=p;p=t;try{return e.apply(this,arguments)}finally{p=n}}}}(Sl)),Sl)),kl.exports}
15
+ */var Yo,Xo=(qo||(qo=1,Yo=Go,function(e,t){Yo.exports?Yo.exports=t():e.numeral=t()}(Go.exports,function(){var e,t,n,r,o,i={},a={},s={currentLocale:"en",zeroFormat:null,nullFormat:null,defaultFormat:"0,0",scalePercentBy100:!0},l={currentLocale:s.currentLocale,zeroFormat:s.zeroFormat,nullFormat:s.nullFormat,defaultFormat:s.defaultFormat,scalePercentBy100:s.scalePercentBy100};function u(e,t){this._input=e,this._value=t}return(e=function(n){var r,o,a,s;if(e.isNumeral(n))r=n.value();else if(0===n||void 0===n)r=0;else if(null===n||t.isNaN(n))r=null;else if("string"==typeof n)if(l.zeroFormat&&n===l.zeroFormat)r=0;else if(l.nullFormat&&n===l.nullFormat||!n.replace(/[^0-9]+/g,"").length)r=null;else{for(o in i)if((s="function"==typeof i[o].regexps.unformat?i[o].regexps.unformat():i[o].regexps.unformat)&&n.match(s)){a=i[o].unformat;break}r=(a=a||e._.stringToNumber)(n)}else r=Number(n)||null;return new u(n,r)}).version="2.0.6",e.isNumeral=function(e){return e instanceof u},e._=t={numberToFormat:function(t,n,r){var o,i,s,l,u,c,d,p,f=a[e.options.currentLocale],h=!1,m=!1,g="",v=1e12,y=1e9,b=1e6,w="",x=!1;if(t=t||0,s=Math.abs(t),e._.includes(n,"(")?(h=!0,n=n.replace(/[\(|\)]/g,"")):(e._.includes(n,"+")||e._.includes(n,"-"))&&(c=e._.includes(n,"+")?n.indexOf("+"):t<0?n.indexOf("-"):-1,n=n.replace(/[\+|\-]/g,"")),e._.includes(n,"a")&&(i=!!(i=n.match(/a(k|m|b|t)?/))&&i[1],e._.includes(n," a")&&(g=" "),n=n.replace(new RegExp(g+"a[kmbt]?"),""),s>=v&&!i||"t"===i?(g+=f.abbreviations.trillion,t/=v):s<v&&s>=y&&!i||"b"===i?(g+=f.abbreviations.billion,t/=y):s<y&&s>=b&&!i||"m"===i?(g+=f.abbreviations.million,t/=b):(s<b&&s>=1e3&&!i||"k"===i)&&(g+=f.abbreviations.thousand,t/=1e3)),e._.includes(n,"[.]")&&(m=!0,n=n.replace("[.]",".")),l=t.toString().split(".")[0],u=n.split(".")[1],d=n.indexOf(","),o=(n.split(".")[0].split(",")[0].match(/0/g)||[]).length,u?(e._.includes(u,"[")?(u=(u=u.replace("]","")).split("["),w=e._.toFixed(t,u[0].length+u[1].length,r,u[1].length)):w=e._.toFixed(t,u.length,r),l=w.split(".")[0],w=e._.includes(w,".")?f.delimiters.decimal+w.split(".")[1]:"",m&&0===Number(w.slice(1))&&(w="")):l=e._.toFixed(t,0,r),g&&!i&&Number(l)>=1e3&&g!==f.abbreviations.trillion)switch(l=String(Number(l)/1e3),g){case f.abbreviations.thousand:g=f.abbreviations.million;break;case f.abbreviations.million:g=f.abbreviations.billion;break;case f.abbreviations.billion:g=f.abbreviations.trillion}if(e._.includes(l,"-")&&(l=l.slice(1),x=!0),l.length<o)for(var k=o-l.length;k>0;k--)l="0"+l;return d>-1&&(l=l.toString().replace(/(\d)(?=(\d{3})+(?!\d))/g,"$1"+f.delimiters.thousands)),0===n.indexOf(".")&&(l=""),p=l+w+(g||""),h?p=(h&&x?"(":"")+p+(h&&x?")":""):c>=0?p=0===c?(x?"-":"+")+p:p+(x?"-":"+"):x&&(p="-"+p),p},stringToNumber:function(e){var t,n,r,o=a[l.currentLocale],i=e,s={thousand:3,million:6,billion:9,trillion:12};if(l.zeroFormat&&e===l.zeroFormat)n=0;else if(l.nullFormat&&e===l.nullFormat||!e.replace(/[^0-9]+/g,"").length)n=null;else{for(t in n=1,"."!==o.delimiters.decimal&&(e=e.replace(/\./g,"").replace(o.delimiters.decimal,".")),s)if(r=new RegExp("[^a-zA-Z]"+o.abbreviations[t]+"(?:\\)|(\\"+o.currency.symbol+")?(?:\\))?)?$"),i.match(r)){n*=Math.pow(10,s[t]);break}n*=(e.split("-").length+Math.min(e.split("(").length-1,e.split(")").length-1))%2?1:-1,e=e.replace(/[^0-9\.]+/g,""),n*=Number(e)}return n},isNaN:function(e){return"number"==typeof e&&isNaN(e)},includes:function(e,t){return-1!==e.indexOf(t)},insert:function(e,t,n){return e.slice(0,n)+t+e.slice(n)},reduce:function(e,t){if(null===this)throw new TypeError("Array.prototype.reduce called on null or undefined");if("function"!=typeof t)throw new TypeError(t+" is not a function");var n,r=Object(e),o=r.length>>>0,i=0;if(3===arguments.length)n=arguments[2];else{for(;i<o&&!(i in r);)i++;if(i>=o)throw new TypeError("Reduce of empty array with no initial value");n=r[i++]}for(;i<o;i++)i in r&&(n=t(n,r[i],i,r));return n},multiplier:function(e){var t=e.toString().split(".");return t.length<2?1:Math.pow(10,t[1].length)},correctionFactor:function(){return Array.prototype.slice.call(arguments).reduce(function(e,n){var r=t.multiplier(n);return e>r?e:r},1)},toFixed:function(e,t,n,r){var o,i,a,s,l=e.toString().split("."),u=t-(r||0);return o=2===l.length?Math.min(Math.max(l[1].length,u),t):u,a=Math.pow(10,o),s=(n(e+"e+"+o)/a).toFixed(o),r>t-o&&(i=new RegExp("\\.?0{1,"+(r-(t-o))+"}$"),s=s.replace(i,"")),s}},e.options=l,e.formats=i,e.locales=a,e.locale=function(e){return e&&(l.currentLocale=e.toLowerCase()),l.currentLocale},e.localeData=function(e){if(!e)return a[l.currentLocale];if(e=e.toLowerCase(),!a[e])throw new Error("Unknown locale : "+e);return a[e]},e.reset=function(){for(var e in s)l[e]=s[e]},e.zeroFormat=function(e){l.zeroFormat="string"==typeof e?e:null},e.nullFormat=function(e){l.nullFormat="string"==typeof e?e:null},e.defaultFormat=function(e){l.defaultFormat="string"==typeof e?e:"0.0"},e.register=function(e,t,n){if(t=t.toLowerCase(),this[e+"s"][t])throw new TypeError(t+" "+e+" already registered.");return this[e+"s"][t]=n,n},e.validate=function(t,n){var r,o,i,a,s,l,u,c;if("string"!=typeof t&&(t+="",console.warn&&console.warn("Numeral.js: Value is not string. It has been co-erced to: ",t)),(t=t.trim()).match(/^\d+$/))return!0;if(""===t)return!1;try{u=e.localeData(n)}catch(t){u=e.localeData(e.locale())}return i=u.currency.symbol,s=u.abbreviations,r=u.delimiters.decimal,o="."===u.delimiters.thousands?"\\.":u.delimiters.thousands,!(null!==(c=t.match(/^[^\d]+/))&&(t=t.substr(1),c[0]!==i)||null!==(c=t.match(/[^\d]+$/))&&(t=t.slice(0,-1),c[0]!==s.thousand&&c[0]!==s.million&&c[0]!==s.billion&&c[0]!==s.trillion)||(l=new RegExp(o+"{2}"),t.match(/[^\d.,]/g)||(a=t.split(r)).length>2||(a.length<2?!a[0].match(/^\d+.*\d$/)||a[0].match(l):1===a[0].length?!a[0].match(/^\d+$/)||a[0].match(l)||!a[1].match(/^\d+$/):!a[0].match(/^\d+.*\d$/)||a[0].match(l)||!a[1].match(/^\d+$/))))},e.fn=u.prototype={clone:function(){return e(this)},format:function(t,n){var r,o,a,s=this._value,u=t||l.defaultFormat;if(n=n||Math.round,0===s&&null!==l.zeroFormat)o=l.zeroFormat;else if(null===s&&null!==l.nullFormat)o=l.nullFormat;else{for(r in i)if(u.match(i[r].regexps.format)){a=i[r].format;break}o=(a=a||e._.numberToFormat)(s,u,n)}return o},value:function(){return this._value},input:function(){return this._input},set:function(e){return this._value=Number(e),this},add:function(e){var n=t.correctionFactor.call(null,this._value,e);return this._value=t.reduce([this._value,e],function(e,t,r,o){return e+Math.round(n*t)},0)/n,this},subtract:function(e){var n=t.correctionFactor.call(null,this._value,e);return this._value=t.reduce([e],function(e,t,r,o){return e-Math.round(n*t)},Math.round(this._value*n))/n,this},multiply:function(e){return this._value=t.reduce([this._value,e],function(e,n,r,o){var i=t.correctionFactor(e,n);return Math.round(e*i)*Math.round(n*i)/Math.round(i*i)},1),this},divide:function(e){return this._value=t.reduce([this._value,e],function(e,n,r,o){var i=t.correctionFactor(e,n);return Math.round(e*i)/Math.round(n*i)}),this},difference:function(t){return Math.abs(e(this._value).subtract(t).value())}},e.register("locale","en",{delimiters:{thousands:",",decimal:"."},abbreviations:{thousand:"k",million:"m",billion:"b",trillion:"t"},ordinal:function(e){var t=e%10;return 1==~~(e%100/10)?"th":1===t?"st":2===t?"nd":3===t?"rd":"th"},currency:{symbol:"$"}}),e.register("format","bps",{regexps:{format:/(BPS)/,unformat:/(BPS)/},format:function(t,n,r){var o,i=e._.includes(n," BPS")?" ":"";return t*=1e4,n=n.replace(/\s?BPS/,""),o=e._.numberToFormat(t,n,r),e._.includes(o,")")?((o=o.split("")).splice(-1,0,i+"BPS"),o=o.join("")):o=o+i+"BPS",o},unformat:function(t){return+(1e-4*e._.stringToNumber(t)).toFixed(15)}}),r={base:1024,suffixes:["B","KiB","MiB","GiB","TiB","PiB","EiB","ZiB","YiB"]},o="("+(o=(n={base:1e3,suffixes:["B","KB","MB","GB","TB","PB","EB","ZB","YB"]}).suffixes.concat(r.suffixes.filter(function(e){return n.suffixes.indexOf(e)<0})).join("|")).replace("B","B(?!PS)")+")",e.register("format","bytes",{regexps:{format:/([0\s]i?b)/,unformat:new RegExp(o)},format:function(t,o,i){var a,s,l,u=e._.includes(o,"ib")?r:n,c=e._.includes(o," b")||e._.includes(o," ib")?" ":"";for(o=o.replace(/\s?i?b/,""),a=0;a<=u.suffixes.length;a++)if(s=Math.pow(u.base,a),l=Math.pow(u.base,a+1),null===t||0===t||t>=s&&t<l){c+=u.suffixes[a],s>0&&(t/=s);break}return e._.numberToFormat(t,o,i)+c},unformat:function(t){var o,i,a=e._.stringToNumber(t);if(a){for(o=n.suffixes.length-1;o>=0;o--){if(e._.includes(t,n.suffixes[o])){i=Math.pow(n.base,o);break}if(e._.includes(t,r.suffixes[o])){i=Math.pow(r.base,o);break}}a*=i||1}return a}}),e.register("format","currency",{regexps:{format:/(\$)/},format:function(t,n,r){var o,i,a=e.locales[e.options.currentLocale],s={before:n.match(/^([\+|\-|\(|\s|\$]*)/)[0],after:n.match(/([\+|\-|\)|\s|\$]*)$/)[0]};for(n=n.replace(/\s?\$\s?/,""),o=e._.numberToFormat(t,n,r),t>=0?(s.before=s.before.replace(/[\-\(]/,""),s.after=s.after.replace(/[\-\)]/,"")):t<0&&!e._.includes(s.before,"-")&&!e._.includes(s.before,"(")&&(s.before="-"+s.before),i=0;i<s.before.length;i++)switch(s.before[i]){case"$":o=e._.insert(o,a.currency.symbol,i);break;case" ":o=e._.insert(o," ",i+a.currency.symbol.length-1)}for(i=s.after.length-1;i>=0;i--)switch(s.after[i]){case"$":o=i===s.after.length-1?o+a.currency.symbol:e._.insert(o,a.currency.symbol,-(s.after.length-(1+i)));break;case" ":o=i===s.after.length-1?o+" ":e._.insert(o," ",-(s.after.length-(1+i)+a.currency.symbol.length-1))}return o}}),e.register("format","exponential",{regexps:{format:/(e\+|e-)/,unformat:/(e\+|e-)/},format:function(t,n,r){var o=("number"!=typeof t||e._.isNaN(t)?"0e+0":t.toExponential()).split("e");return n=n.replace(/e[\+|\-]{1}0/,""),e._.numberToFormat(Number(o[0]),n,r)+"e"+o[1]},unformat:function(t){var n=e._.includes(t,"e+")?t.split("e+"):t.split("e-"),r=Number(n[0]),o=Number(n[1]);return o=e._.includes(t,"e-")?o*=-1:o,e._.reduce([r,Math.pow(10,o)],function(t,n,r,o){var i=e._.correctionFactor(t,n);return t*i*(n*i)/(i*i)},1)}}),e.register("format","ordinal",{regexps:{format:/(o)/},format:function(t,n,r){var o=e.locales[e.options.currentLocale],i=e._.includes(n," o")?" ":"";return n=n.replace(/\s?o/,""),i+=o.ordinal(t),e._.numberToFormat(t,n,r)+i}}),e.register("format","percentage",{regexps:{format:/(%)/,unformat:/(%)/},format:function(t,n,r){var o,i=e._.includes(n," %")?" ":"";return e.options.scalePercentBy100&&(t*=100),n=n.replace(/\s?\%/,""),o=e._.numberToFormat(t,n,r),e._.includes(o,")")?((o=o.split("")).splice(-1,0,i+"%"),o=o.join("")):o=o+i+"%",o},unformat:function(t){var n=e._.stringToNumber(t);return e.options.scalePercentBy100?.01*n:n}}),e.register("format","time",{regexps:{format:/(:)/,unformat:/(:)/},format:function(e,t,n){var r=Math.floor(e/60/60),o=Math.floor((e-60*r*60)/60),i=Math.round(e-60*r*60-60*o);return r+":"+(o<10?"0"+o:o)+":"+(i<10?"0"+i:i)},unformat:function(e){var t=e.split(":"),n=0;return 3===t.length?(n+=60*Number(t[0])*60,n+=60*Number(t[1]),n+=Number(t[2])):2===t.length&&(n+=60*Number(t[0]),n+=Number(t[1])),Number(n)}}),e})),Go.exports),Qo=t(Xo);function Jo(e,t,n="array"){const r=e.columns,o=[...t.doc.metrics,...t.doc.dimensions].reduce((e,t)=>(e[t.name]=t,e),{});return e=>{const t="array"===n?[]:{};return r.reduce((t,r)=>{const i=e[r.name],a=o[r.name];let s=i;return s="timestamp"===a.type?new Date(i):a.format?a.format&&a.prefix?{v:+i,f:a.prefix+" "+Qo(i).format(a.format)}:a.format?{v:+i,f:Qo(i).format(a.format)}:i:i,"array"===n?t.push(s):t[r.name]=s?.f||s,t},t)}}function Zo(e,t){return function(){return e.apply(t,arguments)}}const{toString:ei}=Object.prototype,{getPrototypeOf:ti}=Object,{iterator:ni,toStringTag:ri}=Symbol,oi=(e=>t=>{const n=ei.call(t);return e[n]||(e[n]=n.slice(8,-1).toLowerCase())})(Object.create(null)),ii=e=>(e=e.toLowerCase(),t=>oi(t)===e),ai=e=>t=>typeof t===e,{isArray:si}=Array,li=ai("undefined");const ui=ii("ArrayBuffer");const ci=ai("string"),di=ai("function"),pi=ai("number"),fi=e=>null!==e&&"object"==typeof e,hi=e=>{if("object"!==oi(e))return!1;const t=ti(e);return!(null!==t&&t!==Object.prototype&&null!==Object.getPrototypeOf(t)||ri in e||ni in e)},mi=ii("Date"),gi=ii("File"),vi=ii("Blob"),yi=ii("FileList"),bi=ii("URLSearchParams"),[wi,xi,ki,Si]=["ReadableStream","Request","Response","Headers"].map(ii);function Ei(e,t,{allOwnKeys:n=!1}={}){if(null==e)return;let r,o;if("object"!=typeof e&&(e=[e]),si(e))for(r=0,o=e.length;r<o;r++)t.call(null,e[r],r,e);else{const o=n?Object.getOwnPropertyNames(e):Object.keys(e),i=o.length;let a;for(r=0;r<i;r++)a=o[r],t.call(null,e[a],a,e)}}function Ci(e,t){t=t.toLowerCase();const n=Object.keys(e);let r,o=n.length;for(;o-- >0;)if(r=n[o],t===r.toLowerCase())return r;return null}const Oi="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:global,Ti=e=>!li(e)&&e!==Oi;const _i=(Ri="undefined"!=typeof Uint8Array&&ti(Uint8Array),e=>Ri&&e instanceof Ri);var Ri;const Pi=ii("HTMLFormElement"),Ai=(({hasOwnProperty:e})=>(t,n)=>e.call(t,n))(Object.prototype),Li=ii("RegExp"),Ni=(e,t)=>{const n=Object.getOwnPropertyDescriptors(e),r={};Ei(n,(n,o)=>{let i;!1!==(i=t(n,o,e))&&(r[o]=i||n)}),Object.defineProperties(e,r)};const Mi=ii("AsyncFunction"),Ii=(Fi="function"==typeof setImmediate,$i=di(Oi.postMessage),Fi?setImmediate:$i?((e,t)=>(Oi.addEventListener("message",({source:n,data:r})=>{n===Oi&&r===e&&t.length&&t.shift()()},!1),n=>{t.push(n),Oi.postMessage(e,"*")}))(`axios@${Math.random()}`,[]):e=>setTimeout(e));var Fi,$i;const ji="undefined"!=typeof queueMicrotask?queueMicrotask.bind(Oi):"undefined"!=typeof process&&process.nextTick||Ii;var zi={isArray:si,isArrayBuffer:ui,isBuffer:function(e){return null!==e&&!li(e)&&null!==e.constructor&&!li(e.constructor)&&di(e.constructor.isBuffer)&&e.constructor.isBuffer(e)},isFormData:e=>{let t;return e&&("function"==typeof FormData&&e instanceof FormData||di(e.append)&&("formdata"===(t=oi(e))||"object"===t&&di(e.toString)&&"[object FormData]"===e.toString()))},isArrayBufferView:function(e){let t;return t="undefined"!=typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer.isView(e):e&&e.buffer&&ui(e.buffer),t},isString:ci,isNumber:pi,isBoolean:e=>!0===e||!1===e,isObject:fi,isPlainObject:hi,isReadableStream:wi,isRequest:xi,isResponse:ki,isHeaders:Si,isUndefined:li,isDate:mi,isFile:gi,isBlob:vi,isRegExp:Li,isFunction:di,isStream:e=>fi(e)&&di(e.pipe),isURLSearchParams:bi,isTypedArray:_i,isFileList:yi,forEach:Ei,merge:function e(){const{caseless:t}=Ti(this)&&this||{},n={},r=(r,o)=>{const i=t&&Ci(n,o)||o;hi(n[i])&&hi(r)?n[i]=e(n[i],r):hi(r)?n[i]=e({},r):si(r)?n[i]=r.slice():n[i]=r};for(let e=0,t=arguments.length;e<t;e++)arguments[e]&&Ei(arguments[e],r);return n},extend:(e,t,n,{allOwnKeys:r}={})=>(Ei(t,(t,r)=>{n&&di(t)?e[r]=Zo(t,n):e[r]=t},{allOwnKeys:r}),e),trim:e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,""),stripBOM:e=>(65279===e.charCodeAt(0)&&(e=e.slice(1)),e),inherits:(e,t,n,r)=>{e.prototype=Object.create(t.prototype,r),e.prototype.constructor=e,Object.defineProperty(e,"super",{value:t.prototype}),n&&Object.assign(e.prototype,n)},toFlatObject:(e,t,n,r)=>{let o,i,a;const s={};if(t=t||{},null==e)return t;do{for(o=Object.getOwnPropertyNames(e),i=o.length;i-- >0;)a=o[i],r&&!r(a,e,t)||s[a]||(t[a]=e[a],s[a]=!0);e=!1!==n&&ti(e)}while(e&&(!n||n(e,t))&&e!==Object.prototype);return t},kindOf:oi,kindOfTest:ii,endsWith:(e,t,n)=>{e=String(e),(void 0===n||n>e.length)&&(n=e.length),n-=t.length;const r=e.indexOf(t,n);return-1!==r&&r===n},toArray:e=>{if(!e)return null;if(si(e))return e;let t=e.length;if(!pi(t))return null;const n=new Array(t);for(;t-- >0;)n[t]=e[t];return n},forEachEntry:(e,t)=>{const n=(e&&e[ni]).call(e);let r;for(;(r=n.next())&&!r.done;){const n=r.value;t.call(e,n[0],n[1])}},matchAll:(e,t)=>{let n;const r=[];for(;null!==(n=e.exec(t));)r.push(n);return r},isHTMLForm:Pi,hasOwnProperty:Ai,hasOwnProp:Ai,reduceDescriptors:Ni,freezeMethods:e=>{Ni(e,(t,n)=>{if(di(e)&&-1!==["arguments","caller","callee"].indexOf(n))return!1;const r=e[n];di(r)&&(t.enumerable=!1,"writable"in t?t.writable=!1:t.set||(t.set=()=>{throw Error("Can not rewrite read-only method '"+n+"'")}))})},toObjectSet:(e,t)=>{const n={},r=e=>{e.forEach(e=>{n[e]=!0})};return si(e)?r(e):r(String(e).split(t)),n},toCamelCase:e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(e,t,n){return t.toUpperCase()+n}),noop:()=>{},toFiniteNumber:(e,t)=>null!=e&&Number.isFinite(e=+e)?e:t,findKey:Ci,global:Oi,isContextDefined:Ti,isSpecCompliantForm:function(e){return!!(e&&di(e.append)&&"FormData"===e[ri]&&e[ni])},toJSONObject:e=>{const t=new Array(10),n=(e,r)=>{if(fi(e)){if(t.indexOf(e)>=0)return;if(!("toJSON"in e)){t[r]=e;const o=si(e)?[]:{};return Ei(e,(e,t)=>{const i=n(e,r+1);!li(i)&&(o[t]=i)}),t[r]=void 0,o}}return e};return n(e,0)},isAsyncFn:Mi,isThenable:e=>e&&(fi(e)||di(e))&&di(e.then)&&di(e.catch),setImmediate:Ii,asap:ji,isIterable:e=>null!=e&&di(e[ni])};function Bi(e,t,n,r,o){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=(new Error).stack,this.message=e,this.name="AxiosError",t&&(this.code=t),n&&(this.config=n),r&&(this.request=r),o&&(this.response=o,this.status=o.status?o.status:null)}zi.inherits(Bi,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:zi.toJSONObject(this.config),code:this.code,status:this.status}}});const Di=Bi.prototype,Wi={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach(e=>{Wi[e]={value:e}}),Object.defineProperties(Bi,Wi),Object.defineProperty(Di,"isAxiosError",{value:!0}),Bi.from=(e,t,n,r,o,i)=>{const a=Object.create(Di);return zi.toFlatObject(e,a,function(e){return e!==Error.prototype},e=>"isAxiosError"!==e),Bi.call(a,e.message,t,n,r,o),a.cause=e,a.name=e.name,i&&Object.assign(a,i),a};function Ui(e){return zi.isPlainObject(e)||zi.isArray(e)}function Vi(e){return zi.endsWith(e,"[]")?e.slice(0,-2):e}function Ki(e,t,n){return e?e.concat(t).map(function(e,t){return e=Vi(e),!n&&t?"["+e+"]":e}).join(n?".":""):t}const Hi=zi.toFlatObject(zi,{},null,function(e){return/^is[A-Z]/.test(e)});function qi(e,t,n){if(!zi.isObject(e))throw new TypeError("target must be an object");t=t||new FormData;const r=(n=zi.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,function(e,t){return!zi.isUndefined(t[e])})).metaTokens,o=n.visitor||u,i=n.dots,a=n.indexes,s=(n.Blob||"undefined"!=typeof Blob&&Blob)&&zi.isSpecCompliantForm(t);if(!zi.isFunction(o))throw new TypeError("visitor must be a function");function l(e){if(null===e)return"";if(zi.isDate(e))return e.toISOString();if(zi.isBoolean(e))return e.toString();if(!s&&zi.isBlob(e))throw new Bi("Blob is not supported. Use a Buffer instead.");return zi.isArrayBuffer(e)||zi.isTypedArray(e)?s&&"function"==typeof Blob?new Blob([e]):Buffer.from(e):e}function u(e,n,o){let s=e;if(e&&!o&&"object"==typeof e)if(zi.endsWith(n,"{}"))n=r?n:n.slice(0,-2),e=JSON.stringify(e);else if(zi.isArray(e)&&function(e){return zi.isArray(e)&&!e.some(Ui)}(e)||(zi.isFileList(e)||zi.endsWith(n,"[]"))&&(s=zi.toArray(e)))return n=Vi(n),s.forEach(function(e,r){!zi.isUndefined(e)&&null!==e&&t.append(!0===a?Ki([n],r,i):null===a?n:n+"[]",l(e))}),!1;return!!Ui(e)||(t.append(Ki(o,n,i),l(e)),!1)}const c=[],d=Object.assign(Hi,{defaultVisitor:u,convertValue:l,isVisitable:Ui});if(!zi.isObject(e))throw new TypeError("data must be an object");return function e(n,r){if(!zi.isUndefined(n)){if(-1!==c.indexOf(n))throw Error("Circular reference detected in "+r.join("."));c.push(n),zi.forEach(n,function(n,i){!0===(!(zi.isUndefined(n)||null===n)&&o.call(t,n,zi.isString(i)?i.trim():i,r,d))&&e(n,r?r.concat(i):[i])}),c.pop()}}(e),t}function Gi(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,function(e){return t[e]})}function Yi(e,t){this._pairs=[],e&&qi(e,this,t)}const Xi=Yi.prototype;function Qi(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function Ji(e,t,n){if(!t)return e;const r=n&&n.encode||Qi;zi.isFunction(n)&&(n={serialize:n});const o=n&&n.serialize;let i;if(i=o?o(t,n):zi.isURLSearchParams(t)?t.toString():new Yi(t,n).toString(r),i){const t=e.indexOf("#");-1!==t&&(e=e.slice(0,t)),e+=(-1===e.indexOf("?")?"?":"&")+i}return e}Xi.append=function(e,t){this._pairs.push([e,t])},Xi.toString=function(e){const t=e?function(t){return e.call(this,t,Gi)}:Gi;return this._pairs.map(function(e){return t(e[0])+"="+t(e[1])},"").join("&")};class Zi{constructor(){this.handlers=[]}use(e,t,n){return this.handlers.push({fulfilled:e,rejected:t,synchronous:!!n&&n.synchronous,runWhen:n?n.runWhen:null}),this.handlers.length-1}eject(e){this.handlers[e]&&(this.handlers[e]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(e){zi.forEach(this.handlers,function(t){null!==t&&e(t)})}}var ea={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},ta={isBrowser:!0,classes:{URLSearchParams:"undefined"!=typeof URLSearchParams?URLSearchParams:Yi,FormData:"undefined"!=typeof FormData?FormData:null,Blob:"undefined"!=typeof Blob?Blob:null},protocols:["http","https","file","blob","url","data"]};const na="undefined"!=typeof window&&"undefined"!=typeof document,ra="object"==typeof navigator&&navigator||void 0,oa=na&&(!ra||["ReactNative","NativeScript","NS"].indexOf(ra.product)<0),ia="undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope&&"function"==typeof self.importScripts,aa=na&&window.location.href||"http://localhost";var sa={...Object.freeze({__proto__:null,hasBrowserEnv:na,hasStandardBrowserEnv:oa,hasStandardBrowserWebWorkerEnv:ia,navigator:ra,origin:aa}),...ta};function la(e){function t(e,n,r,o){let i=e[o++];if("__proto__"===i)return!0;const a=Number.isFinite(+i),s=o>=e.length;if(i=!i&&zi.isArray(r)?r.length:i,s)return zi.hasOwnProp(r,i)?r[i]=[r[i],n]:r[i]=n,!a;r[i]&&zi.isObject(r[i])||(r[i]=[]);return t(e,n,r[i],o)&&zi.isArray(r[i])&&(r[i]=function(e){const t={},n=Object.keys(e);let r;const o=n.length;let i;for(r=0;r<o;r++)i=n[r],t[i]=e[i];return t}(r[i])),!a}if(zi.isFormData(e)&&zi.isFunction(e.entries)){const n={};return zi.forEachEntry(e,(e,r)=>{t(function(e){return zi.matchAll(/\w+|\[(\w*)]/g,e).map(e=>"[]"===e[0]?"":e[1]||e[0])}(e),r,n,0)}),n}return null}const ua={transitional:ea,adapter:["xhr","http","fetch"],transformRequest:[function(e,t){const n=t.getContentType()||"",r=n.indexOf("application/json")>-1,o=zi.isObject(e);o&&zi.isHTMLForm(e)&&(e=new FormData(e));if(zi.isFormData(e))return r?JSON.stringify(la(e)):e;if(zi.isArrayBuffer(e)||zi.isBuffer(e)||zi.isStream(e)||zi.isFile(e)||zi.isBlob(e)||zi.isReadableStream(e))return e;if(zi.isArrayBufferView(e))return e.buffer;if(zi.isURLSearchParams(e))return t.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),e.toString();let i;if(o){if(n.indexOf("application/x-www-form-urlencoded")>-1)return function(e,t){return qi(e,new sa.classes.URLSearchParams,Object.assign({visitor:function(e,t,n,r){return sa.isNode&&zi.isBuffer(e)?(this.append(t,e.toString("base64")),!1):r.defaultVisitor.apply(this,arguments)}},t))}(e,this.formSerializer).toString();if((i=zi.isFileList(e))||n.indexOf("multipart/form-data")>-1){const t=this.env&&this.env.FormData;return qi(i?{"files[]":e}:e,t&&new t,this.formSerializer)}}return o||r?(t.setContentType("application/json",!1),function(e,t,n){if(zi.isString(e))try{return(t||JSON.parse)(e),zi.trim(e)}catch(e){if("SyntaxError"!==e.name)throw e}return(n||JSON.stringify)(e)}(e)):e}],transformResponse:[function(e){const t=this.transitional||ua.transitional,n=t&&t.forcedJSONParsing,r="json"===this.responseType;if(zi.isResponse(e)||zi.isReadableStream(e))return e;if(e&&zi.isString(e)&&(n&&!this.responseType||r)){const n=!(t&&t.silentJSONParsing)&&r;try{return JSON.parse(e)}catch(e){if(n){if("SyntaxError"===e.name)throw Bi.from(e,Bi.ERR_BAD_RESPONSE,this,null,this.response);throw e}}}return e}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:sa.classes.FormData,Blob:sa.classes.Blob},validateStatus:function(e){return e>=200&&e<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};zi.forEach(["delete","get","head","post","put","patch"],e=>{ua.headers[e]={}});const ca=zi.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]);const da=Symbol("internals");function pa(e){return e&&String(e).trim().toLowerCase()}function fa(e){return!1===e||null==e?e:zi.isArray(e)?e.map(fa):String(e)}function ha(e,t,n,r,o){return zi.isFunction(r)?r.call(this,t,n):(o&&(t=n),zi.isString(t)?zi.isString(r)?-1!==t.indexOf(r):zi.isRegExp(r)?r.test(t):void 0:void 0)}let ma=class{constructor(e){e&&this.set(e)}set(e,t,n){const r=this;function o(e,t,n){const o=pa(t);if(!o)throw new Error("header name must be a non-empty string");const i=zi.findKey(r,o);(!i||void 0===r[i]||!0===n||void 0===n&&!1!==r[i])&&(r[i||t]=fa(e))}const i=(e,t)=>zi.forEach(e,(e,n)=>o(e,n,t));if(zi.isPlainObject(e)||e instanceof this.constructor)i(e,t);else if(zi.isString(e)&&(e=e.trim())&&!/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim()))i((e=>{const t={};let n,r,o;return e&&e.split("\n").forEach(function(e){o=e.indexOf(":"),n=e.substring(0,o).trim().toLowerCase(),r=e.substring(o+1).trim(),!n||t[n]&&ca[n]||("set-cookie"===n?t[n]?t[n].push(r):t[n]=[r]:t[n]=t[n]?t[n]+", "+r:r)}),t})(e),t);else if(zi.isObject(e)&&zi.isIterable(e)){let n,r,o={};for(const t of e){if(!zi.isArray(t))throw TypeError("Object iterator must return a key-value pair");o[r=t[0]]=(n=o[r])?zi.isArray(n)?[...n,t[1]]:[n,t[1]]:t[1]}i(o,t)}else null!=e&&o(t,e,n);return this}get(e,t){if(e=pa(e)){const n=zi.findKey(this,e);if(n){const e=this[n];if(!t)return e;if(!0===t)return function(e){const t=Object.create(null),n=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let r;for(;r=n.exec(e);)t[r[1]]=r[2];return t}(e);if(zi.isFunction(t))return t.call(this,e,n);if(zi.isRegExp(t))return t.exec(e);throw new TypeError("parser must be boolean|regexp|function")}}}has(e,t){if(e=pa(e)){const n=zi.findKey(this,e);return!(!n||void 0===this[n]||t&&!ha(0,this[n],n,t))}return!1}delete(e,t){const n=this;let r=!1;function o(e){if(e=pa(e)){const o=zi.findKey(n,e);!o||t&&!ha(0,n[o],o,t)||(delete n[o],r=!0)}}return zi.isArray(e)?e.forEach(o):o(e),r}clear(e){const t=Object.keys(this);let n=t.length,r=!1;for(;n--;){const o=t[n];e&&!ha(0,this[o],o,e,!0)||(delete this[o],r=!0)}return r}normalize(e){const t=this,n={};return zi.forEach(this,(r,o)=>{const i=zi.findKey(n,o);if(i)return t[i]=fa(r),void delete t[o];const a=e?function(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(e,t,n)=>t.toUpperCase()+n)}(o):String(o).trim();a!==o&&delete t[o],t[a]=fa(r),n[a]=!0}),this}concat(...e){return this.constructor.concat(this,...e)}toJSON(e){const t=Object.create(null);return zi.forEach(this,(n,r)=>{null!=n&&!1!==n&&(t[r]=e&&zi.isArray(n)?n.join(", "):n)}),t}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([e,t])=>e+": "+t).join("\n")}getSetCookie(){return this.get("set-cookie")||[]}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(e){return e instanceof this?e:new this(e)}static concat(e,...t){const n=new this(e);return t.forEach(e=>n.set(e)),n}static accessor(e){const t=(this[da]=this[da]={accessors:{}}).accessors,n=this.prototype;function r(e){const r=pa(e);t[r]||(!function(e,t){const n=zi.toCamelCase(" "+t);["get","set","has"].forEach(r=>{Object.defineProperty(e,r+n,{value:function(e,n,o){return this[r].call(this,t,e,n,o)},configurable:!0})})}(n,e),t[r]=!0)}return zi.isArray(e)?e.forEach(r):r(e),this}};function ga(e,t){const n=this||ua,r=t||n,o=ma.from(r.headers);let i=r.data;return zi.forEach(e,function(e){i=e.call(n,i,o.normalize(),t?t.status:void 0)}),o.normalize(),i}function va(e){return!(!e||!e.__CANCEL__)}function ya(e,t,n){Bi.call(this,null==e?"canceled":e,Bi.ERR_CANCELED,t,n),this.name="CanceledError"}function ba(e,t,n){const r=n.config.validateStatus;n.status&&r&&!r(n.status)?t(new Bi("Request failed with status code "+n.status,[Bi.ERR_BAD_REQUEST,Bi.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n)):e(n)}ma.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),zi.reduceDescriptors(ma.prototype,({value:e},t)=>{let n=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(e){this[n]=e}}}),zi.freezeMethods(ma),zi.inherits(ya,Bi,{__CANCEL__:!0});const wa=(e,t,n=3)=>{let r=0;const o=function(e,t){e=e||10;const n=new Array(e),r=new Array(e);let o,i=0,a=0;return t=void 0!==t?t:1e3,function(s){const l=Date.now(),u=r[a];o||(o=l),n[i]=s,r[i]=l;let c=a,d=0;for(;c!==i;)d+=n[c++],c%=e;if(i=(i+1)%e,i===a&&(a=(a+1)%e),l-o<t)return;const p=u&&l-u;return p?Math.round(1e3*d/p):void 0}}(50,250);return function(e,t){let n,r,o=0,i=1e3/t;const a=(t,i=Date.now())=>{o=i,n=null,r&&(clearTimeout(r),r=null),e.apply(null,t)};return[(...e)=>{const t=Date.now(),s=t-o;s>=i?a(e,t):(n=e,r||(r=setTimeout(()=>{r=null,a(n)},i-s)))},()=>n&&a(n)]}(n=>{const i=n.loaded,a=n.lengthComputable?n.total:void 0,s=i-r,l=o(s);r=i;e({loaded:i,total:a,progress:a?i/a:void 0,bytes:s,rate:l||void 0,estimated:l&&a&&i<=a?(a-i)/l:void 0,event:n,lengthComputable:null!=a,[t?"download":"upload"]:!0})},n)},xa=(e,t)=>{const n=null!=e;return[r=>t[0]({lengthComputable:n,total:e,loaded:r}),t[1]]},ka=e=>(...t)=>zi.asap(()=>e(...t));var Sa=sa.hasStandardBrowserEnv?((e,t)=>n=>(n=new URL(n,sa.origin),e.protocol===n.protocol&&e.host===n.host&&(t||e.port===n.port)))(new URL(sa.origin),sa.navigator&&/(msie|trident)/i.test(sa.navigator.userAgent)):()=>!0,Ea=sa.hasStandardBrowserEnv?{write(e,t,n,r,o,i){const a=[e+"="+encodeURIComponent(t)];zi.isNumber(n)&&a.push("expires="+new Date(n).toGMTString()),zi.isString(r)&&a.push("path="+r),zi.isString(o)&&a.push("domain="+o),!0===i&&a.push("secure"),document.cookie=a.join("; ")},read(e){const t=document.cookie.match(new RegExp("(^|;\\s*)("+e+")=([^;]*)"));return t?decodeURIComponent(t[3]):null},remove(e){this.write(e,"",Date.now()-864e5)}}:{write(){},read:()=>null,remove(){}};function Ca(e,t,n){let r=!/^([a-z][a-z\d+\-.]*:)?\/\//i.test(t);return e&&(r||0==n)?function(e,t){return t?e.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):e}(e,t):t}const Oa=e=>e instanceof ma?{...e}:e;function Ta(e,t){t=t||{};const n={};function r(e,t,n,r){return zi.isPlainObject(e)&&zi.isPlainObject(t)?zi.merge.call({caseless:r},e,t):zi.isPlainObject(t)?zi.merge({},t):zi.isArray(t)?t.slice():t}function o(e,t,n,o){return zi.isUndefined(t)?zi.isUndefined(e)?void 0:r(void 0,e,0,o):r(e,t,0,o)}function i(e,t){if(!zi.isUndefined(t))return r(void 0,t)}function a(e,t){return zi.isUndefined(t)?zi.isUndefined(e)?void 0:r(void 0,e):r(void 0,t)}function s(n,o,i){return i in t?r(n,o):i in e?r(void 0,n):void 0}const l={url:i,method:i,data:i,baseURL:a,transformRequest:a,transformResponse:a,paramsSerializer:a,timeout:a,timeoutMessage:a,withCredentials:a,withXSRFToken:a,adapter:a,responseType:a,xsrfCookieName:a,xsrfHeaderName:a,onUploadProgress:a,onDownloadProgress:a,decompress:a,maxContentLength:a,maxBodyLength:a,beforeRedirect:a,transport:a,httpAgent:a,httpsAgent:a,cancelToken:a,socketPath:a,responseEncoding:a,validateStatus:s,headers:(e,t,n)=>o(Oa(e),Oa(t),0,!0)};return zi.forEach(Object.keys(Object.assign({},e,t)),function(r){const i=l[r]||o,a=i(e[r],t[r],r);zi.isUndefined(a)&&i!==s||(n[r]=a)}),n}var _a=e=>{const t=Ta({},e);let n,{data:r,withXSRFToken:o,xsrfHeaderName:i,xsrfCookieName:a,headers:s,auth:l}=t;if(t.headers=s=ma.from(s),t.url=Ji(Ca(t.baseURL,t.url,t.allowAbsoluteUrls),e.params,e.paramsSerializer),l&&s.set("Authorization","Basic "+btoa((l.username||"")+":"+(l.password?unescape(encodeURIComponent(l.password)):""))),zi.isFormData(r))if(sa.hasStandardBrowserEnv||sa.hasStandardBrowserWebWorkerEnv)s.setContentType(void 0);else if(!1!==(n=s.getContentType())){const[e,...t]=n?n.split(";").map(e=>e.trim()).filter(Boolean):[];s.setContentType([e||"multipart/form-data",...t].join("; "))}if(sa.hasStandardBrowserEnv&&(o&&zi.isFunction(o)&&(o=o(t)),o||!1!==o&&Sa(t.url))){const e=i&&a&&Ea.read(a);e&&s.set(i,e)}return t};var Ra="undefined"!=typeof XMLHttpRequest&&function(e){return new Promise(function(t,n){const r=_a(e);let o=r.data;const i=ma.from(r.headers).normalize();let a,s,l,u,c,{responseType:d,onUploadProgress:p,onDownloadProgress:f}=r;function h(){u&&u(),c&&c(),r.cancelToken&&r.cancelToken.unsubscribe(a),r.signal&&r.signal.removeEventListener("abort",a)}let m=new XMLHttpRequest;function g(){if(!m)return;const r=ma.from("getAllResponseHeaders"in m&&m.getAllResponseHeaders());ba(function(e){t(e),h()},function(e){n(e),h()},{data:d&&"text"!==d&&"json"!==d?m.response:m.responseText,status:m.status,statusText:m.statusText,headers:r,config:e,request:m}),m=null}m.open(r.method.toUpperCase(),r.url,!0),m.timeout=r.timeout,"onloadend"in m?m.onloadend=g:m.onreadystatechange=function(){m&&4===m.readyState&&(0!==m.status||m.responseURL&&0===m.responseURL.indexOf("file:"))&&setTimeout(g)},m.onabort=function(){m&&(n(new Bi("Request aborted",Bi.ECONNABORTED,e,m)),m=null)},m.onerror=function(){n(new Bi("Network Error",Bi.ERR_NETWORK,e,m)),m=null},m.ontimeout=function(){let t=r.timeout?"timeout of "+r.timeout+"ms exceeded":"timeout exceeded";const o=r.transitional||ea;r.timeoutErrorMessage&&(t=r.timeoutErrorMessage),n(new Bi(t,o.clarifyTimeoutError?Bi.ETIMEDOUT:Bi.ECONNABORTED,e,m)),m=null},void 0===o&&i.setContentType(null),"setRequestHeader"in m&&zi.forEach(i.toJSON(),function(e,t){m.setRequestHeader(t,e)}),zi.isUndefined(r.withCredentials)||(m.withCredentials=!!r.withCredentials),d&&"json"!==d&&(m.responseType=r.responseType),f&&([l,c]=wa(f,!0),m.addEventListener("progress",l)),p&&m.upload&&([s,u]=wa(p),m.upload.addEventListener("progress",s),m.upload.addEventListener("loadend",u)),(r.cancelToken||r.signal)&&(a=t=>{m&&(n(!t||t.type?new ya(null,e,m):t),m.abort(),m=null)},r.cancelToken&&r.cancelToken.subscribe(a),r.signal&&(r.signal.aborted?a():r.signal.addEventListener("abort",a)));const v=function(e){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}(r.url);v&&-1===sa.protocols.indexOf(v)?n(new Bi("Unsupported protocol "+v+":",Bi.ERR_BAD_REQUEST,e)):m.send(o||null)})};const Pa=(e,t)=>{const{length:n}=e=e?e.filter(Boolean):[];if(t||n){let n,r=new AbortController;const o=function(e){if(!n){n=!0,a();const t=e instanceof Error?e:this.reason;r.abort(t instanceof Bi?t:new ya(t instanceof Error?t.message:t))}};let i=t&&setTimeout(()=>{i=null,o(new Bi(`timeout ${t} of ms exceeded`,Bi.ETIMEDOUT))},t);const a=()=>{e&&(i&&clearTimeout(i),i=null,e.forEach(e=>{e.unsubscribe?e.unsubscribe(o):e.removeEventListener("abort",o)}),e=null)};e.forEach(e=>e.addEventListener("abort",o));const{signal:s}=r;return s.unsubscribe=()=>zi.asap(a),s}},Aa=function*(e,t){let n=e.byteLength;if(n<t)return void(yield e);let r,o=0;for(;o<n;)r=o+t,yield e.slice(o,r),o=r},La=async function*(e){if(e[Symbol.asyncIterator])return void(yield*e);const t=e.getReader();try{for(;;){const{done:e,value:n}=await t.read();if(e)break;yield n}}finally{await t.cancel()}},Na=(e,t,n,r)=>{const o=async function*(e,t){for await(const n of La(e))yield*Aa(n,t)}(e,t);let i,a=0,s=e=>{i||(i=!0,r&&r(e))};return new ReadableStream({async pull(e){try{const{done:t,value:r}=await o.next();if(t)return s(),void e.close();let i=r.byteLength;if(n){let e=a+=i;n(e)}e.enqueue(new Uint8Array(r))}catch(e){throw s(e),e}},cancel:e=>(s(e),o.return())},{highWaterMark:2})},Ma="function"==typeof fetch&&"function"==typeof Request&&"function"==typeof Response,Ia=Ma&&"function"==typeof ReadableStream,Fa=Ma&&("function"==typeof TextEncoder?($a=new TextEncoder,e=>$a.encode(e)):async e=>new Uint8Array(await new Response(e).arrayBuffer()));var $a;const ja=(e,...t)=>{try{return!!e(...t)}catch(e){return!1}},za=Ia&&ja(()=>{let e=!1;const t=new Request(sa.origin,{body:new ReadableStream,method:"POST",get duplex(){return e=!0,"half"}}).headers.has("Content-Type");return e&&!t}),Ba=Ia&&ja(()=>zi.isReadableStream(new Response("").body)),Da={stream:Ba&&(e=>e.body)};var Wa;Ma&&(Wa=new Response,["text","arrayBuffer","blob","formData","stream"].forEach(e=>{!Da[e]&&(Da[e]=zi.isFunction(Wa[e])?t=>t[e]():(t,n)=>{throw new Bi(`Response type '${e}' is not supported`,Bi.ERR_NOT_SUPPORT,n)})}));const Ua=async(e,t)=>{const n=zi.toFiniteNumber(e.getContentLength());return null==n?(async e=>{if(null==e)return 0;if(zi.isBlob(e))return e.size;if(zi.isSpecCompliantForm(e)){const t=new Request(sa.origin,{method:"POST",body:e});return(await t.arrayBuffer()).byteLength}return zi.isArrayBufferView(e)||zi.isArrayBuffer(e)?e.byteLength:(zi.isURLSearchParams(e)&&(e+=""),zi.isString(e)?(await Fa(e)).byteLength:void 0)})(t):n};var Va=Ma&&(async e=>{let{url:t,method:n,data:r,signal:o,cancelToken:i,timeout:a,onDownloadProgress:s,onUploadProgress:l,responseType:u,headers:c,withCredentials:d="same-origin",fetchOptions:p}=_a(e);u=u?(u+"").toLowerCase():"text";let f,h=Pa([o,i&&i.toAbortSignal()],a);const m=h&&h.unsubscribe&&(()=>{h.unsubscribe()});let g;try{if(l&&za&&"get"!==n&&"head"!==n&&0!==(g=await Ua(c,r))){let e,n=new Request(t,{method:"POST",body:r,duplex:"half"});if(zi.isFormData(r)&&(e=n.headers.get("content-type"))&&c.setContentType(e),n.body){const[e,t]=xa(g,wa(ka(l)));r=Na(n.body,65536,e,t)}}zi.isString(d)||(d=d?"include":"omit");const o="credentials"in Request.prototype;f=new Request(t,{...p,signal:h,method:n.toUpperCase(),headers:c.normalize().toJSON(),body:r,duplex:"half",credentials:o?d:void 0});let i=await fetch(f,p);const a=Ba&&("stream"===u||"response"===u);if(Ba&&(s||a&&m)){const e={};["status","statusText","headers"].forEach(t=>{e[t]=i[t]});const t=zi.toFiniteNumber(i.headers.get("content-length")),[n,r]=s&&xa(t,wa(ka(s),!0))||[];i=new Response(Na(i.body,65536,n,()=>{r&&r(),m&&m()}),e)}u=u||"text";let v=await Da[zi.findKey(Da,u)||"text"](i,e);return!a&&m&&m(),await new Promise((t,n)=>{ba(t,n,{data:v,headers:ma.from(i.headers),status:i.status,statusText:i.statusText,config:e,request:f})})}catch(t){if(m&&m(),t&&"TypeError"===t.name&&/Load failed|fetch/i.test(t.message))throw Object.assign(new Bi("Network Error",Bi.ERR_NETWORK,e,f),{cause:t.cause||t});throw Bi.from(t,t&&t.code,e,f)}});const Ka={http:null,xhr:Ra,fetch:Va};zi.forEach(Ka,(e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch(e){}Object.defineProperty(e,"adapterName",{value:t})}});const Ha=e=>`- ${e}`,qa=e=>zi.isFunction(e)||null===e||!1===e;var Ga=e=>{e=zi.isArray(e)?e:[e];const{length:t}=e;let n,r;const o={};for(let i=0;i<t;i++){let t;if(n=e[i],r=n,!qa(n)&&(r=Ka[(t=String(n)).toLowerCase()],void 0===r))throw new Bi(`Unknown adapter '${t}'`);if(r)break;o[t||"#"+i]=r}if(!r){const e=Object.entries(o).map(([e,t])=>`adapter ${e} `+(!1===t?"is not supported by the environment":"is not available in the build"));throw new Bi("There is no suitable adapter to dispatch the request "+(t?e.length>1?"since :\n"+e.map(Ha).join("\n"):" "+Ha(e[0]):"as no adapter specified"),"ERR_NOT_SUPPORT")}return r};function Ya(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new ya(null,e)}function Xa(e){Ya(e),e.headers=ma.from(e.headers),e.data=ga.call(e,e.transformRequest),-1!==["post","put","patch"].indexOf(e.method)&&e.headers.setContentType("application/x-www-form-urlencoded",!1);return Ga(e.adapter||ua.adapter)(e).then(function(t){return Ya(e),t.data=ga.call(e,e.transformResponse,t),t.headers=ma.from(t.headers),t},function(t){return va(t)||(Ya(e),t&&t.response&&(t.response.data=ga.call(e,e.transformResponse,t.response),t.response.headers=ma.from(t.response.headers))),Promise.reject(t)})}const Qa="1.10.0",Ja={};["object","boolean","number","function","string","symbol"].forEach((e,t)=>{Ja[e]=function(n){return typeof n===e||"a"+(t<1?"n ":" ")+e}});const Za={};Ja.transitional=function(e,t,n){function r(e,t){return"[Axios v"+Qa+"] Transitional option '"+e+"'"+t+(n?". "+n:"")}return(n,o,i)=>{if(!1===e)throw new Bi(r(o," has been removed"+(t?" in "+t:"")),Bi.ERR_DEPRECATED);return t&&!Za[o]&&(Za[o]=!0,console.warn(r(o," has been deprecated since v"+t+" and will be removed in the near future"))),!e||e(n,o,i)}},Ja.spelling=function(e){return(t,n)=>(console.warn(`${n} is likely a misspelling of ${e}`),!0)};var es={assertOptions:function(e,t,n){if("object"!=typeof e)throw new Bi("options must be an object",Bi.ERR_BAD_OPTION_VALUE);const r=Object.keys(e);let o=r.length;for(;o-- >0;){const i=r[o],a=t[i];if(a){const t=e[i],n=void 0===t||a(t,i,e);if(!0!==n)throw new Bi("option "+i+" must be "+n,Bi.ERR_BAD_OPTION_VALUE);continue}if(!0!==n)throw new Bi("Unknown option "+i,Bi.ERR_BAD_OPTION)}},validators:Ja};const ts=es.validators;let ns=class{constructor(e){this.defaults=e||{},this.interceptors={request:new Zi,response:new Zi}}async request(e,t){try{return await this._request(e,t)}catch(e){if(e instanceof Error){let t={};Error.captureStackTrace?Error.captureStackTrace(t):t=new Error;const n=t.stack?t.stack.replace(/^.+\n/,""):"";try{e.stack?n&&!String(e.stack).endsWith(n.replace(/^.+\n.+\n/,""))&&(e.stack+="\n"+n):e.stack=n}catch(e){}}throw e}}_request(e,t){"string"==typeof e?(t=t||{}).url=e:t=e||{},t=Ta(this.defaults,t);const{transitional:n,paramsSerializer:r,headers:o}=t;void 0!==n&&es.assertOptions(n,{silentJSONParsing:ts.transitional(ts.boolean),forcedJSONParsing:ts.transitional(ts.boolean),clarifyTimeoutError:ts.transitional(ts.boolean)},!1),null!=r&&(zi.isFunction(r)?t.paramsSerializer={serialize:r}:es.assertOptions(r,{encode:ts.function,serialize:ts.function},!0)),void 0!==t.allowAbsoluteUrls||(void 0!==this.defaults.allowAbsoluteUrls?t.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:t.allowAbsoluteUrls=!0),es.assertOptions(t,{baseUrl:ts.spelling("baseURL"),withXsrfToken:ts.spelling("withXSRFToken")},!0),t.method=(t.method||this.defaults.method||"get").toLowerCase();let i=o&&zi.merge(o.common,o[t.method]);o&&zi.forEach(["delete","get","head","post","put","patch","common"],e=>{delete o[e]}),t.headers=ma.concat(i,o);const a=[];let s=!0;this.interceptors.request.forEach(function(e){"function"==typeof e.runWhen&&!1===e.runWhen(t)||(s=s&&e.synchronous,a.unshift(e.fulfilled,e.rejected))});const l=[];let u;this.interceptors.response.forEach(function(e){l.push(e.fulfilled,e.rejected)});let c,d=0;if(!s){const e=[Xa.bind(this),void 0];for(e.unshift.apply(e,a),e.push.apply(e,l),c=e.length,u=Promise.resolve(t);d<c;)u=u.then(e[d++],e[d++]);return u}c=a.length;let p=t;for(d=0;d<c;){const e=a[d++],t=a[d++];try{p=e(p)}catch(e){t.call(this,e);break}}try{u=Xa.call(this,p)}catch(e){return Promise.reject(e)}for(d=0,c=l.length;d<c;)u=u.then(l[d++],l[d++]);return u}getUri(e){return Ji(Ca((e=Ta(this.defaults,e)).baseURL,e.url,e.allowAbsoluteUrls),e.params,e.paramsSerializer)}};zi.forEach(["delete","get","head","options"],function(e){ns.prototype[e]=function(t,n){return this.request(Ta(n||{},{method:e,url:t,data:(n||{}).data}))}}),zi.forEach(["post","put","patch"],function(e){function t(t){return function(n,r,o){return this.request(Ta(o||{},{method:e,headers:t?{"Content-Type":"multipart/form-data"}:{},url:n,data:r}))}}ns.prototype[e]=t(),ns.prototype[e+"Form"]=t(!0)});const rs={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(rs).forEach(([e,t])=>{rs[t]=e});const os=function e(t){const n=new ns(t),r=Zo(ns.prototype.request,n);return zi.extend(r,ns.prototype,n,{allOwnKeys:!0}),zi.extend(r,n,null,{allOwnKeys:!0}),r.create=function(n){return e(Ta(t,n))},r}(ua);os.Axios=ns,os.CanceledError=ya,os.CancelToken=class e{constructor(e){if("function"!=typeof e)throw new TypeError("executor must be a function.");let t;this.promise=new Promise(function(e){t=e});const n=this;this.promise.then(e=>{if(!n._listeners)return;let t=n._listeners.length;for(;t-- >0;)n._listeners[t](e);n._listeners=null}),this.promise.then=e=>{let t;const r=new Promise(e=>{n.subscribe(e),t=e}).then(e);return r.cancel=function(){n.unsubscribe(t)},r},e(function(e,r,o){n.reason||(n.reason=new ya(e,r,o),t(n.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(e){this.reason?e(this.reason):this._listeners?this._listeners.push(e):this._listeners=[e]}unsubscribe(e){if(!this._listeners)return;const t=this._listeners.indexOf(e);-1!==t&&this._listeners.splice(t,1)}toAbortSignal(){const e=new AbortController,t=t=>{e.abort(t)};return this.subscribe(t),e.signal.unsubscribe=()=>this.unsubscribe(t),e.signal}static source(){let t;return{token:new e(function(e){t=e}),cancel:t}}},os.isCancel=va,os.VERSION=Qa,os.toFormData=qi,os.AxiosError=Bi,os.Cancel=os.CanceledError,os.all=function(e){return Promise.all(e)},os.spread=function(e){return function(t){return e.apply(null,t)}},os.isAxiosError=function(e){return zi.isObject(e)&&!0===e.isAxiosError},os.mergeConfig=Ta,os.AxiosHeaders=ma,os.formToJSON=e=>la(zi.isHTMLForm(e)?new FormData(e):e),os.getAdapter=Ga,os.HttpStatusCode=rs,os.default=os;const{Axios:is,AxiosError:as,CanceledError:ss,isCancel:ls,CancelToken:us,VERSION:cs,all:ds,Cancel:ps,isAxiosError:fs,spread:hs,toFormData:ms,AxiosHeaders:gs,HttpStatusCode:vs,formToJSON:ys,getAdapter:bs,mergeConfig:ws}=os,xs="https://report-api.netcapital.pro",ks=os.create({baseURL:xs,headers:{"Content-Type":"application/json"}}),Ss={},Es=()=>{const e=Object.keys(Ss);return e.length>0?e[0]:null},Cs={setBaseUrl(e){ks.defaults.baseURL=e||xs},setToken(e){e&&(ks.defaults.headers.common.Authorization=`Bearer ${e}`)},loadDashboardMeta:async({dashboardId:e})=>{const{data:t}=await ks.get(`/dashboard-meta/${e}`);return Ss[e]={dashboards:t.dashboards||{},charts:t.charts||{},reports:t.reports||{},reportMetadata:t.reportMetadata||{},dateRanges:t.dateRanges||[]},Ss[e]},getDashboard:async({id:e,dashboardId:t})=>{const n=t||Es();if(n&&Ss[n]?.dashboards?.[e])return Ss[n].dashboards[e];const{data:r}=await ks.get(`/entity/dashboards/${e}`);return r},getChart:async({id:e,dashboardId:t})=>{const n=t||Es();if(n&&Ss[n]?.charts?.[e])return Ss[n].charts[e];const{data:r}=await ks.get(`/entity/charts/${e}`);return r},getReport:async({id:e,dashboardId:t})=>{const n=t||Es();if(n&&Ss[n]?.reports?.[e])return Ss[n].reports[e];const{data:r}=await ks.get(`/entity/reports/${e}`);return r},getProviders:async()=>{const{data:e}=await ks.get("/entity/providers");return e},getReportSchema:async({id:e,dashboardId:t,query:n={}})=>{const r=t||Es();if(r&&Ss[r]?.reportMetadata?.[e])return Ss[r].reportMetadata[e];const{data:o}=await ks.post(`/reports/${e}/metadata`,n);return o},runReport:async({id:e,query:t={}})=>{const{data:n}=await ks.post(`/reports/${e}/run`,t);return n},runAdHocReport:async({report:e})=>{const{data:t}=await ks.post("/report-build/run",e);return t},getDateRanges:async({dashboardId:e}={})=>{const t=e||Es();if(t&&Ss[t]?.dateRanges)return Ss[t].dateRanges;const{data:n}=await ks.get("/globals/date-ranges");return n}},Os=So(e=>({headerRow:{fontFamily:e.typography.fontFamily,fontSize:e.typography.fontSize},tableRow:{fontFamily:e.typography.fontFamily,fontSize:e.typography.fontSize},oddTableRow:{fontFamily:e.typography.fontFamily,fontSize:e.typography.fontSize},headerCell:{backgroundColor:"white",padding:"4px !important"}})),Ts={none:"YYYY-MM-dd",day:"MMM dd",week:"MMM dd",month:"YYYY MMM",year:"YYYY"};var _s={h1:"h1",h2:"h2",h3:"h3",h4:"h4",h5:"h5",h6:"h6",subtitle1:"h6",subtitle2:"h6",body1:"p",body2:"p"},Rs=l.forwardRef(function(e,t){var n=e.align,r=void 0===n?"inherit":n,o=e.classes,i=e.className,a=e.color,s=void 0===a?"initial":a,u=e.component,c=e.display,d=void 0===c?"initial":c,h=e.gutterBottom,g=void 0!==h&&h,v=e.noWrap,y=void 0!==v&&v,b=e.paragraph,w=void 0!==b&&b,x=e.variant,k=void 0===x?"body1":x,S=e.variantMapping,E=void 0===S?_s:S,C=p(e,["align","classes","className","color","component","display","gutterBottom","noWrap","paragraph","variant","variantMapping"]),O=u||(w?"p":E[k]||_s[k])||"span";return l.createElement(O,f({className:m(o.root,i,"inherit"!==k&&o[k],"initial"!==s&&o["color".concat(Co(s))],y&&o.noWrap,g&&o.gutterBottom,w&&o.paragraph,"inherit"!==r&&o["align".concat(Co(r))],"initial"!==d&&o["display".concat(Co(d))]),ref:t},C))}),Ps=bo(function(e){return{root:{margin:0},body2:e.typography.body2,body1:e.typography.body1,caption:e.typography.caption,button:e.typography.button,h1:e.typography.h1,h2:e.typography.h2,h3:e.typography.h3,h4:e.typography.h4,h5:e.typography.h5,h6:e.typography.h6,subtitle1:e.typography.subtitle1,subtitle2:e.typography.subtitle2,overline:e.typography.overline,srOnly:{position:"absolute",height:1,width:1,overflow:"hidden"},alignLeft:{textAlign:"left"},alignCenter:{textAlign:"center"},alignRight:{textAlign:"right"},alignJustify:{textAlign:"justify"},noWrap:{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},gutterBottom:{marginBottom:"0.35em"},paragraph:{marginBottom:16},colorInherit:{color:"inherit"},colorPrimary:{color:e.palette.primary.main},colorSecondary:{color:e.palette.secondary.main},colorTextPrimary:{color:e.palette.text.primary},colorTextSecondary:{color:e.palette.text.secondary},colorError:{color:e.palette.error.main},displayInline:{display:"inline"},displayBlock:{display:"block"}}},{name:"MuiTypography"})(Rs),As="undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{};function Ls(){throw new Error("setTimeout has not been defined")}function Ns(){throw new Error("clearTimeout has not been defined")}var Ms=Ls,Is=Ns;function Fs(e){if(Ms===setTimeout)return setTimeout(e,0);if((Ms===Ls||!Ms)&&setTimeout)return Ms=setTimeout,setTimeout(e,0);try{return Ms(e,0)}catch(t){try{return Ms.call(null,e,0)}catch(t){return Ms.call(this,e,0)}}}"function"==typeof As.setTimeout&&(Ms=setTimeout),"function"==typeof As.clearTimeout&&(Is=clearTimeout);var $s,js=[],zs=!1,Bs=-1;function Ds(){zs&&$s&&(zs=!1,$s.length?js=$s.concat(js):Bs=-1,js.length&&Ws())}function Ws(){if(!zs){var e=Fs(Ds);zs=!0;for(var t=js.length;t;){for($s=js,js=[];++Bs<t;)$s&&$s[Bs].run();Bs=-1,t=js.length}$s=null,zs=!1,function(e){if(Is===clearTimeout)return clearTimeout(e);if((Is===Ns||!Is)&&clearTimeout)return Is=clearTimeout,clearTimeout(e);try{return Is(e)}catch(t){try{return Is.call(null,e)}catch(t){return Is.call(this,e)}}}(e)}}function Us(e,t){this.fun=e,this.array=t}Us.prototype.run=function(){this.fun.apply(null,this.array)};function Vs(){}var Ks=Vs,Hs=Vs,qs=Vs,Gs=Vs,Ys=Vs,Xs=Vs,Qs=Vs;var Js=As.performance||{},Zs=Js.now||Js.mozNow||Js.msNow||Js.oNow||Js.webkitNow||function(){return(new Date).getTime()};var el=new Date;var tl,nl={nextTick:function(e){var t=new Array(arguments.length-1);if(arguments.length>1)for(var n=1;n<arguments.length;n++)t[n-1]=arguments[n];js.push(new Us(e,t)),1!==js.length||zs||Fs(Ws)},title:"browser",browser:!0,env:{},argv:[],version:"",versions:{},on:Ks,addListener:Hs,once:qs,off:Gs,removeListener:Ys,removeAllListeners:Xs,emit:Qs,binding:function(e){throw new Error("process.binding is not supported")},cwd:function(){return"/"},chdir:function(e){throw new Error("process.chdir is not supported")},umask:function(){return 0},hrtime:function(e){var t=.001*Zs.call(Js),n=Math.floor(t),r=Math.floor(t%1*1e9);return e&&(n-=e[0],(r-=e[1])<0&&(n--,r+=1e9)),[n,r]},platform:"browser",release:{},config:{},uptime:function(){return(new Date-el)/1e3}},rl={exports:{}};var ol=(tl||(tl=1,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 o=t[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,n),o.l=!0,o.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=11)}([function(e,t,n){var r=Array.prototype,o=Object.prototype,i={"&":"&amp;",'"':"&quot;","'":"&#39;","<":"&lt;",">":"&gt;","\\":"&#92;"},a=/[&"'<>\\]/g;function s(e,t){return o.hasOwnProperty.call(e,t)}function l(e){return i[e]}function u(e,t,n){var r,o,i;if(e instanceof Error&&(e=(o=e).name+": "+o.message),Object.setPrototypeOf?(r=new Error(e),Object.setPrototypeOf(r,u.prototype)):(r=this,Object.defineProperty(r,"message",{enumerable:!1,writable:!0,value:e})),Object.defineProperty(r,"name",{value:"Template render error"}),Error.captureStackTrace&&Error.captureStackTrace(r,this.constructor),o){var a=Object.getOwnPropertyDescriptor(o,"stack");(i=a&&(a.get||function(){return a.value}))||(i=function(){return o.stack})}else{var s=new Error(e).stack;i=function(){return s}}return Object.defineProperty(r,"stack",{get:function(){return i.call(r)}}),Object.defineProperty(r,"cause",{value:o}),r.lineno=t,r.colno=n,r.firstUpdate=!0,r.Update=function(e){var t="("+(e||"unknown path")+")";return this.firstUpdate&&(this.lineno&&this.colno?t+=" [Line "+this.lineno+", Column "+this.colno+"]":this.lineno&&(t+=" [Line "+this.lineno+"]")),t+="\n ",this.firstUpdate&&(t+=" "),this.message=t+(this.message||""),this.firstUpdate=!1,this},r}function c(e){return"[object Function]"===o.toString.call(e)}function d(e){return"[object Array]"===o.toString.call(e)}function p(e){return"[object String]"===o.toString.call(e)}function f(e){return"[object Object]"===o.toString.call(e)}function h(e){var t,n=(t=e)?"string"==typeof t?t.split("."):[t]:[];return function(e){for(var t=e,r=0;r<n.length;r++){var o=n[r];if(!s(t,o))return;t=t[o]}return t}}function m(e){return Array.prototype.slice.call(e)}function g(e,t,n){return Array.prototype.indexOf.call(e||[],t,n)}function v(e){var t=[];for(var n in e)s(e,n)&&t.push(n);return t}(t=e.exports={}).hasOwnProp=s,t._prettifyError=function(e,n,r){if(r.Update||(r=new t.TemplateError(r)),r.Update(e),!n){var o=r;(r=new Error(o.message)).name=o.name}return r},Object.setPrototypeOf?Object.setPrototypeOf(u.prototype,Error.prototype):u.prototype=Object.create(Error.prototype,{constructor:{value:u}}),t.TemplateError=u,t.escape=function(e){return e.replace(a,l)},t.isFunction=c,t.isArray=d,t.isString=p,t.isObject=f,t.getAttrGetter=h,t.groupBy=function(e,t,n){for(var r={},o=c(t)?t:h(t),i=0;i<e.length;i++){var a=e[i],s=o(a,i);if(void 0===s&&!0===n)throw new TypeError('groupby: attribute "'+t+'" resolved to undefined');(r[s]||(r[s]=[])).push(a)}return r},t.toArray=m,t.without=function(e){var t=[];if(!e)return t;for(var n=e.length,r=m(arguments).slice(1),o=-1;++o<n;)-1===g(r,e[o])&&t.push(e[o]);return t},t.repeat=function(e,t){for(var n="",r=0;r<t;r++)n+=e;return n},t.each=function(e,t,n){if(null!=e)if(r.forEach&&e.forEach===r.forEach)e.forEach(t,n);else if(e.length===+e.length)for(var o=0,i=e.length;o<i;o++)t.call(n,e[o],o,e)},t.map=function(e,t){var n=[];if(null==e)return n;if(r.map&&e.map===r.map)return e.map(t);for(var o=0;o<e.length;o++)n[n.length]=t(e[o],o);return e.length===+e.length&&(n.length=e.length),n},t.asyncIter=function(e,t,n){var r=-1;!function o(){++r<e.length?t(e[r],r,o,n):n()}()},t.asyncFor=function(e,t,n){var r=v(e||{}),o=r.length,i=-1;!function a(){i++;var s=r[i];i<o?t(s,e[s],i,o,a):n()}()},t.indexOf=g,t.keys=v,t._entries=function(e){return v(e).map(function(t){return[t,e[t]]})},t._values=function(e){return v(e).map(function(t){return e[t]})},t._assign=t.extend=function(e,t){return e=e||{},v(t).forEach(function(n){e[n]=t[n]}),e},t.inOperator=function(e,t){if(d(t)||p(t))return-1!==t.indexOf(e);if(f(t))return e in t;throw new Error('Cannot use "in" operator to search for "'+e+'" in unexpected types.')}},function(e,t,n){function r(e,t,n){return t&&function(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,o(r.key),r)}}(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function o(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);if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e,"string");return"symbol"==typeof t?t:String(t)}function i(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,a(e,t)}function a(e,t){return a=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},a(e,t)}var s=n(16),l=n(0);function u(e,t,n){n=n||{},l.keys(n).forEach(function(t){var r,o;n[t]=(r=e.prototype[t],o=n[t],"function"!=typeof r||"function"!=typeof o?o:function(){var e=this.parent;this.parent=r;var t=o.apply(this,arguments);return this.parent=e,t})});var o=function(e){function n(){return e.apply(this,arguments)||this}return i(n,e),r(n,[{key:"typename",get:function(){return t}}]),n}(e);return l._assign(o.prototype,n),o}var c=function(){function e(){this.init.apply(this,arguments)}return e.prototype.init=function(){},e.extend=function(e,t){return"object"==typeof e&&(t=e,e="anonymous"),u(this,e,t)},r(e,[{key:"typename",get:function(){return this.constructor.name}}]),e}(),d=function(e){function t(){var t,n;return(t=n=e.call(this)||this).init.apply(t,arguments),n}return i(t,e),t.prototype.init=function(){},t.extend=function(e,t){return"object"==typeof e&&(t=e,e="anonymous"),u(this,e,t)},r(t,[{key:"typename",get:function(){return this.constructor.name}}]),t}(s);e.exports={Obj:c,EmitterObj:d}},function(e,t,n){var r=n(0),o=Array.from,i="function"==typeof Symbol&&Symbol.iterator&&"function"==typeof o,a=function(){function e(e,t){this.variables=Object.create(null),this.parent=e,this.topLevel=!1,this.isolateWrites=t}var t=e.prototype;return t.set=function(e,t,n){var r=e.split("."),o=this.variables,i=this;if(n&&(i=this.resolve(r[0],!0)))i.set(e,t);else{for(var a=0;a<r.length-1;a++){var s=r[a];o[s]||(o[s]={}),o=o[s]}o[r[r.length-1]]=t}},t.get=function(e){var t=this.variables[e];return void 0!==t?t:null},t.lookup=function(e){var t=this.parent,n=this.variables[e];return void 0!==n?n:t&&t.lookup(e)},t.resolve=function(e,t){var n=t&&this.isolateWrites?void 0:this.parent;return void 0!==this.variables[e]?this:n&&n.resolve(e)},t.push=function(t){return new e(this,t)},t.pop=function(){return this.parent},e}();function s(e){return e&&Object.prototype.hasOwnProperty.call(e,"__keywords")}function l(e){var t=e.length;return 0===t?0:s(e[t-1])?t-1:t}function u(e){if("string"!=typeof e)return e;this.val=e,this.length=e.length}u.prototype=Object.create(String.prototype,{length:{writable:!0,configurable:!0,value:0}}),u.prototype.valueOf=function(){return this.val},u.prototype.toString=function(){return this.val},e.exports={Frame:a,makeMacro:function(e,t,n){return function(){for(var r=arguments.length,o=new Array(r),i=0;i<r;i++)o[i]=arguments[i];var a,u=l(o),c=function(e){var t=e.length;if(t){var n=e[t-1];if(s(n))return n}return{}}(o);if(u>e.length)a=o.slice(0,e.length),o.slice(a.length,u).forEach(function(e,n){n<t.length&&(c[t[n]]=e)}),a.push(c);else if(u<e.length){a=o.slice(0,u);for(var d=u;d<e.length;d++){var p=e[d];a.push(c[p]),delete c[p]}a.push(c)}else a=o;return n.apply(this,a)}},makeKeywordArgs:function(e){return e.__keywords=!0,e},numArgs:l,suppressValue:function(e,t){return e=null!=e?e:"",!t||e instanceof u||(e=r.escape(e.toString())),e},ensureDefined:function(e,t,n){if(null==e)throw new r.TemplateError("attempted to output null or undefined value",t+1,n+1);return e},memberLookup:function(e,t){if(null!=e)return"function"==typeof e[t]?function(){for(var n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];return e[t].apply(e,r)}:e[t]},contextOrFrameLookup:function(e,t,n){var r=t.lookup(n);return void 0!==r?r:e.lookup(n)},callWrap:function(e,t,n,r){if(!e)throw new Error("Unable to call `"+t+"`, which is undefined or falsey");if("function"!=typeof e)throw new Error("Unable to call `"+t+"`, which is not a function");return e.apply(n,r)},handleError:function(e,t,n){return e.lineno?e:new r.TemplateError(e,t,n)},isArray:r.isArray,keys:r.keys,SafeString:u,copySafeness:function(e,t){return e instanceof u?new u(t):t.toString()},markSafe:function(e){var t=typeof e;return"string"===t?new u(e):"function"!==t?e:function(t){var n=e.apply(this,arguments);return"string"==typeof n?new u(n):n}},asyncEach:function(e,t,n,o){if(r.isArray(e)){var i=e.length;r.asyncIter(e,function(e,r,o){switch(t){case 1:n(e,r,i,o);break;case 2:n(e[0],e[1],r,i,o);break;case 3:n(e[0],e[1],e[2],r,i,o);break;default:e.push(r,i,o),n.apply(this,e)}},o)}else r.asyncFor(e,function(e,t,r,o,i){n(e,t,r,o,i)},o)},asyncAll:function(e,t,n,o){var i,a,s=0;function l(e,t){s++,a[e]=t,s===i&&o(null,a.join(""))}if(r.isArray(e))if(i=e.length,a=new Array(i),0===i)o(null,"");else for(var u=0;u<e.length;u++){var c=e[u];switch(t){case 1:n(c,u,i,l);break;case 2:n(c[0],c[1],u,i,l);break;case 3:n(c[0],c[1],c[2],u,i,l);break;default:c.push(u,i,l),n.apply(this,c)}}else{var d=r.keys(e||{});if(i=d.length,a=new Array(i),0===i)o(null,"");else for(var p=0;p<d.length;p++){var f=d[p];n(f,e[f],p,i,l)}}},inOperator:r.inOperator,fromIterator:function(e){return"object"!=typeof e||null===e||r.isArray(e)?e:i&&Symbol.iterator in e?o(e):e}}},function(e,t,n){function r(e,t,n){return t&&function(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,o(r.key),r)}}(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function o(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);if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e,"string");return"symbol"==typeof t?t:String(t)}function i(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,a(e,t)}function a(e,t){return a=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},a(e,t)}function s(e,t,n){e instanceof t&&n.push(e),e instanceof l&&e.findAll(t,n)}var l=function(e){function t(){return e.apply(this,arguments)||this}i(t,e);var n=t.prototype;return n.init=function(e,t){for(var n=arguments,r=this,o=arguments.length,i=new Array(o>2?o-2:0),a=2;a<o;a++)i[a-2]=arguments[a];this.lineno=e,this.colno=t,this.fields.forEach(function(e,t){var o=n[t+2];void 0===o&&(o=null),r[e]=o})},n.findAll=function(e,t){var n=this;return t=t||[],this instanceof c?this.children.forEach(function(n){return s(n,e,t)}):this.fields.forEach(function(r){return s(n[r],e,t)}),t},n.iterFields=function(e){var t=this;this.fields.forEach(function(n){e(t[n],n)})},t}(n(1).Obj),u=function(e){function t(){return e.apply(this,arguments)||this}return i(t,e),r(t,[{key:"typename",get:function(){return"Value"}},{key:"fields",get:function(){return["value"]}}]),t}(l),c=function(e){function t(){return e.apply(this,arguments)||this}i(t,e);var n=t.prototype;return n.init=function(t,n,r){e.prototype.init.call(this,t,n,r||[])},n.addChild=function(e){this.children.push(e)},r(t,[{key:"typename",get:function(){return"NodeList"}},{key:"fields",get:function(){return["children"]}}]),t}(l),d=c.extend("Root"),p=u.extend("Literal"),f=u.extend("Symbol"),h=c.extend("Group"),m=c.extend("Array"),g=l.extend("Pair",{fields:["key","value"]}),v=c.extend("Dict"),y=l.extend("LookupVal",{fields:["target","val"]}),b=l.extend("If",{fields:["cond","body","else_"]}),w=b.extend("IfAsync"),x=l.extend("InlineIf",{fields:["cond","body","else_"]}),k=l.extend("For",{fields:["arr","name","body","else_"]}),S=k.extend("AsyncEach"),E=k.extend("AsyncAll"),C=l.extend("Macro",{fields:["name","args","body"]}),O=C.extend("Caller"),T=l.extend("Import",{fields:["template","target","withContext"]}),_=function(e){function t(){return e.apply(this,arguments)||this}return i(t,e),t.prototype.init=function(t,n,r,o,i){e.prototype.init.call(this,t,n,r,o||new c,i)},r(t,[{key:"typename",get:function(){return"FromImport"}},{key:"fields",get:function(){return["template","names","withContext"]}}]),t}(l),R=l.extend("FunCall",{fields:["name","args"]}),P=R.extend("Filter"),A=P.extend("FilterAsync",{fields:["name","args","symbol"]}),L=v.extend("KeywordArgs"),N=l.extend("Block",{fields:["name","body"]}),M=l.extend("Super",{fields:["blockName","symbol"]}),I=l.extend("TemplateRef",{fields:["template"]}).extend("Extends"),F=l.extend("Include",{fields:["template","ignoreMissing"]}),$=l.extend("Set",{fields:["targets","value"]}),j=l.extend("Switch",{fields:["expr","cases","default"]}),z=l.extend("Case",{fields:["cond","body"]}),B=c.extend("Output"),D=l.extend("Capture",{fields:["body"]}),W=p.extend("TemplateData"),U=l.extend("UnaryOp",{fields:["target"]}),V=l.extend("BinOp",{fields:["left","right"]}),K=V.extend("In"),H=V.extend("Is"),q=V.extend("Or"),G=V.extend("And"),Y=U.extend("Not"),X=V.extend("Add"),Q=V.extend("Concat"),J=V.extend("Sub"),Z=V.extend("Mul"),ee=V.extend("Div"),te=V.extend("FloorDiv"),ne=V.extend("Mod"),re=V.extend("Pow"),oe=U.extend("Neg"),ie=U.extend("Pos"),ae=l.extend("Compare",{fields:["expr","ops"]}),se=l.extend("CompareOperand",{fields:["expr","type"]}),le=l.extend("CallExtension",{init:function(e,t,n,r){this.parent(),this.extName=e.__name||e,this.prop=t,this.args=n||new c,this.contentArgs=r||[],this.autoescape=e.autoescape},fields:["extName","prop","args","contentArgs"]}),ue=le.extend("CallExtensionAsync");function ce(e,t,n){var r=e.split("\n");r.forEach(function(e,o){e&&(n&&o>0||!n)&&nl.stdout.write(" ".repeat(t));var i=o===r.length-1?"":"\n";nl.stdout.write(""+e+i)})}e.exports={Node:l,Root:d,NodeList:c,Value:u,Literal:p,Symbol:f,Group:h,Array:m,Pair:g,Dict:v,Output:B,Capture:D,TemplateData:W,If:b,IfAsync:w,InlineIf:x,For:k,AsyncEach:S,AsyncAll:E,Macro:C,Caller:O,Import:T,FromImport:_,FunCall:R,Filter:P,FilterAsync:A,KeywordArgs:L,Block:N,Super:M,Extends:I,Include:F,Set:$,Switch:j,Case:z,LookupVal:y,BinOp:V,In:K,Is:H,Or:q,And:G,Not:Y,Add:X,Concat:Q,Sub:J,Mul:Z,Div:ee,FloorDiv:te,Mod:ne,Pow:re,Neg:oe,Pos:ie,Compare:ae,CompareOperand:se,CallExtension:le,CallExtensionAsync:ue,printNodes:function e(t,n){if(n=n||0,ce(t.typename+": ",n),t instanceof c)ce("\n"),t.children.forEach(function(t){e(t,n+2)});else if(t instanceof le)ce(t.extName+"."+t.prop+"\n"),t.args&&e(t.args,n+2),t.contentArgs&&t.contentArgs.forEach(function(t){e(t,n+2)});else{var r=[],o=null;t.iterFields(function(e,t){e instanceof l?r.push([t,e]):(o=o||{})[t]=e}),o?ce(JSON.stringify(o,null,2)+"\n",null,!0):ce("\n"),r.forEach(function(t){var r=t[0],o=t[1];ce("["+r+"] =>",n+2),e(o,n+4)})}}}},function(e,t){},function(e,t,n){function r(e,t){return r=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},r(e,t)}var o=n(8),i=n(17),a=n(3),s=n(0).TemplateError,l=n(2).Frame,u=n(1).Obj,c={"==":"==","===":"===","!=":"!=","!==":"!==","<":"<",">":">","<=":"<=",">=":">="},d=function(e){var t,n;function o(){return e.apply(this,arguments)||this}n=e,(t=o).prototype=Object.create(n.prototype),t.prototype.constructor=t,r(t,n);var i=o.prototype;return i.init=function(e,t){this.templateName=e,this.codebuf=[],this.lastId=0,this.buffer=null,this.bufferStack=[],this._scopeClosers="",this.inBlock=!1,this.throwOnUndefined=t},i.fail=function(e,t,n){throw void 0!==t&&(t+=1),void 0!==n&&(n+=1),new s(e,t,n)},i._pushBuffer=function(){var e=this._tmpid();return this.bufferStack.push(this.buffer),this.buffer=e,this._emit("var "+this.buffer+' = "";'),e},i._popBuffer=function(){this.buffer=this.bufferStack.pop()},i._emit=function(e){this.codebuf.push(e)},i._emitLine=function(e){this._emit(e+"\n")},i._emitLines=function(){for(var e=this,t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];n.forEach(function(t){return e._emitLine(t)})},i._emitFuncBegin=function(e,t){this.buffer="output",this._scopeClosers="",this._emitLine("function "+t+"(env, context, frame, runtime, cb) {"),this._emitLine("var lineno = "+e.lineno+";"),this._emitLine("var colno = "+e.colno+";"),this._emitLine("var "+this.buffer+' = "";'),this._emitLine("try {")},i._emitFuncEnd=function(e){e||this._emitLine("cb(null, "+this.buffer+");"),this._closeScopeLevels(),this._emitLine("} catch (e) {"),this._emitLine(" cb(runtime.handleError(e, lineno, colno));"),this._emitLine("}"),this._emitLine("}"),this.buffer=null},i._addScopeLevel=function(){this._scopeClosers+="})"},i._closeScopeLevels=function(){this._emitLine(this._scopeClosers+";"),this._scopeClosers=""},i._withScopedSyntax=function(e){var t=this._scopeClosers;this._scopeClosers="",e.call(this),this._closeScopeLevels(),this._scopeClosers=t},i._makeCallback=function(e){var t=this._tmpid();return"function("+t+(e?","+e:"")+") {\nif("+t+") { cb("+t+"); return; }"},i._tmpid=function(){return this.lastId++,"t_"+this.lastId},i._templateName=function(){return null==this.templateName?"undefined":JSON.stringify(this.templateName)},i._compileChildren=function(e,t){var n=this;e.children.forEach(function(e){n.compile(e,t)})},i._compileAggregate=function(e,t,n,r){var o=this;n&&this._emit(n),e.children.forEach(function(e,n){n>0&&o._emit(","),o.compile(e,t)}),r&&this._emit(r)},i._compileExpression=function(e,t){this.assertType(e,a.Literal,a.Symbol,a.Group,a.Array,a.Dict,a.FunCall,a.Caller,a.Filter,a.LookupVal,a.Compare,a.InlineIf,a.In,a.Is,a.And,a.Or,a.Not,a.Add,a.Concat,a.Sub,a.Mul,a.Div,a.FloorDiv,a.Mod,a.Pow,a.Neg,a.Pos,a.Compare,a.NodeList),this.compile(e,t)},i.assertType=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];n.some(function(t){return e instanceof t})||this.fail("assertType: invalid type: "+e.typename,e.lineno,e.colno)},i.compileCallExtension=function(e,t,n){var r=this,o=e.args,i=e.contentArgs,s="boolean"!=typeof e.autoescape||e.autoescape;if(n||this._emit(this.buffer+" += runtime.suppressValue("),this._emit('env.getExtension("'+e.extName+'")["'+e.prop+'"]('),this._emit("context"),(o||i)&&this._emit(","),o&&(o instanceof a.NodeList||this.fail("compileCallExtension: arguments must be a NodeList, use `parser.parseSignature`"),o.children.forEach(function(e,n){r._compileExpression(e,t),(n!==o.children.length-1||i.length)&&r._emit(",")})),i.length&&i.forEach(function(e,n){if(n>0&&r._emit(","),e){r._emitLine("function(cb) {"),r._emitLine("if(!cb) { cb = function(err) { if(err) { throw err; }}}");var o=r._pushBuffer();r._withScopedSyntax(function(){r.compile(e,t),r._emitLine("cb(null, "+o+");")}),r._popBuffer(),r._emitLine("return "+o+";"),r._emitLine("}")}else r._emit("null")}),n){var l=this._tmpid();this._emitLine(", "+this._makeCallback(l)),this._emitLine(this.buffer+" += runtime.suppressValue("+l+", "+s+" && env.opts.autoescape);"),this._addScopeLevel()}else this._emit(")"),this._emit(", "+s+" && env.opts.autoescape);\n")},i.compileCallExtensionAsync=function(e,t){this.compileCallExtension(e,t,!0)},i.compileNodeList=function(e,t){this._compileChildren(e,t)},i.compileLiteral=function(e){if("string"==typeof e.value){var t=e.value.replace(/\\/g,"\\\\");t=(t=(t=(t=(t=t.replace(/"/g,'\\"')).replace(/\n/g,"\\n")).replace(/\r/g,"\\r")).replace(/\t/g,"\\t")).replace(/\u2028/g,"\\u2028"),this._emit('"'+t+'"')}else null===e.value?this._emit("null"):this._emit(e.value.toString())},i.compileSymbol=function(e,t){var n=e.value,r=t.lookup(n);r?this._emit(r):this._emit('runtime.contextOrFrameLookup(context, frame, "'+n+'")')},i.compileGroup=function(e,t){this._compileAggregate(e,t,"(",")")},i.compileArray=function(e,t){this._compileAggregate(e,t,"[","]")},i.compileDict=function(e,t){this._compileAggregate(e,t,"{","}")},i.compilePair=function(e,t){var n=e.key,r=e.value;n instanceof a.Symbol?n=new a.Literal(n.lineno,n.colno,n.value):n instanceof a.Literal&&"string"==typeof n.value||this.fail("compilePair: Dict keys must be strings or names",n.lineno,n.colno),this.compile(n,t),this._emit(": "),this._compileExpression(r,t)},i.compileInlineIf=function(e,t){this._emit("("),this.compile(e.cond,t),this._emit("?"),this.compile(e.body,t),this._emit(":"),null!==e.else_?this.compile(e.else_,t):this._emit('""'),this._emit(")")},i.compileIn=function(e,t){this._emit("runtime.inOperator("),this.compile(e.left,t),this._emit(","),this.compile(e.right,t),this._emit(")")},i.compileIs=function(e,t){var n=e.right.name?e.right.name.value:e.right.value;this._emit('env.getTest("'+n+'").call(context, '),this.compile(e.left,t),e.right.args&&(this._emit(","),this.compile(e.right.args,t)),this._emit(") === true")},i._binOpEmitter=function(e,t,n){this.compile(e.left,t),this._emit(n),this.compile(e.right,t)},i.compileOr=function(e,t){return this._binOpEmitter(e,t," || ")},i.compileAnd=function(e,t){return this._binOpEmitter(e,t," && ")},i.compileAdd=function(e,t){return this._binOpEmitter(e,t," + ")},i.compileConcat=function(e,t){return this._binOpEmitter(e,t,' + "" + ')},i.compileSub=function(e,t){return this._binOpEmitter(e,t," - ")},i.compileMul=function(e,t){return this._binOpEmitter(e,t," * ")},i.compileDiv=function(e,t){return this._binOpEmitter(e,t," / ")},i.compileMod=function(e,t){return this._binOpEmitter(e,t," % ")},i.compileNot=function(e,t){this._emit("!"),this.compile(e.target,t)},i.compileFloorDiv=function(e,t){this._emit("Math.floor("),this.compile(e.left,t),this._emit(" / "),this.compile(e.right,t),this._emit(")")},i.compilePow=function(e,t){this._emit("Math.pow("),this.compile(e.left,t),this._emit(", "),this.compile(e.right,t),this._emit(")")},i.compileNeg=function(e,t){this._emit("-"),this.compile(e.target,t)},i.compilePos=function(e,t){this._emit("+"),this.compile(e.target,t)},i.compileCompare=function(e,t){var n=this;this.compile(e.expr,t),e.ops.forEach(function(e){n._emit(" "+c[e.type]+" "),n.compile(e.expr,t)})},i.compileLookupVal=function(e,t){this._emit("runtime.memberLookup(("),this._compileExpression(e.target,t),this._emit("),"),this._compileExpression(e.val,t),this._emit(")")},i._getNodeName=function(e){switch(e.typename){case"Symbol":return e.value;case"FunCall":return"the return value of ("+this._getNodeName(e.name)+")";case"LookupVal":return this._getNodeName(e.target)+'["'+this._getNodeName(e.val)+'"]';case"Literal":return e.value.toString();default:return"--expression--"}},i.compileFunCall=function(e,t){this._emit("(lineno = "+e.lineno+", colno = "+e.colno+", "),this._emit("runtime.callWrap("),this._compileExpression(e.name,t),this._emit(', "'+this._getNodeName(e.name).replace(/"/g,'\\"')+'", context, '),this._compileAggregate(e.args,t,"[","])"),this._emit(")")},i.compileFilter=function(e,t){var n=e.name;this.assertType(n,a.Symbol),this._emit('env.getFilter("'+n.value+'").call(context, '),this._compileAggregate(e.args,t),this._emit(")")},i.compileFilterAsync=function(e,t){var n=e.name,r=e.symbol.value;this.assertType(n,a.Symbol),t.set(r,r),this._emit('env.getFilter("'+n.value+'").call(context, '),this._compileAggregate(e.args,t),this._emitLine(", "+this._makeCallback(r)),this._addScopeLevel()},i.compileKeywordArgs=function(e,t){this._emit("runtime.makeKeywordArgs("),this.compileDict(e,t),this._emit(")")},i.compileSet=function(e,t){var n=this,r=[];e.targets.forEach(function(e){var o=e.value,i=t.lookup(o);null==i&&(i=n._tmpid(),n._emitLine("var "+i+";")),r.push(i)}),e.value?(this._emit(r.join(" = ")+" = "),this._compileExpression(e.value,t),this._emitLine(";")):(this._emit(r.join(" = ")+" = "),this.compile(e.body,t),this._emitLine(";")),e.targets.forEach(function(e,t){var o=r[t],i=e.value;n._emitLine('frame.set("'+i+'", '+o+", true);"),n._emitLine("if(frame.topLevel) {"),n._emitLine('context.setVariable("'+i+'", '+o+");"),n._emitLine("}"),"_"!==i.charAt(0)&&(n._emitLine("if(frame.topLevel) {"),n._emitLine('context.addExport("'+i+'", '+o+");"),n._emitLine("}"))})},i.compileSwitch=function(e,t){var n=this;this._emit("switch ("),this.compile(e.expr,t),this._emit(") {"),e.cases.forEach(function(e,r){n._emit("case "),n.compile(e.cond,t),n._emit(": "),n.compile(e.body,t),e.body.children.length&&n._emitLine("break;")}),e.default&&(this._emit("default:"),this.compile(e.default,t)),this._emit("}")},i.compileIf=function(e,t,n){var r=this;this._emit("if("),this._compileExpression(e.cond,t),this._emitLine(") {"),this._withScopedSyntax(function(){r.compile(e.body,t),n&&r._emit("cb()")}),e.else_?(this._emitLine("}\nelse {"),this._withScopedSyntax(function(){r.compile(e.else_,t),n&&r._emit("cb()")})):n&&(this._emitLine("}\nelse {"),this._emit("cb()")),this._emitLine("}")},i.compileIfAsync=function(e,t){this._emit("(function(cb) {"),this.compileIf(e,t,!0),this._emit("})("+this._makeCallback()),this._addScopeLevel()},i._emitLoopBindings=function(e,t,n,r){var o=this;[{name:"index",val:n+" + 1"},{name:"index0",val:n},{name:"revindex",val:r+" - "+n},{name:"revindex0",val:r+" - "+n+" - 1"},{name:"first",val:n+" === 0"},{name:"last",val:n+" === "+r+" - 1"},{name:"length",val:r}].forEach(function(e){o._emitLine('frame.set("loop.'+e.name+'", '+e.val+");")})},i.compileFor=function(e,t){var n=this,r=this._tmpid(),o=this._tmpid(),i=this._tmpid();if(t=t.push(),this._emitLine("frame = frame.push();"),this._emit("var "+i+" = "),this._compileExpression(e.arr,t),this._emitLine(";"),this._emit("if("+i+") {"),this._emitLine(i+" = runtime.fromIterator("+i+");"),e.name instanceof a.Array){this._emitLine("var "+r+";"),this._emitLine("if(runtime.isArray("+i+")) {"),this._emitLine("var "+o+" = "+i+".length;"),this._emitLine("for("+r+"=0; "+r+" < "+i+".length; "+r+"++) {"),e.name.children.forEach(function(o,a){var s=n._tmpid();n._emitLine("var "+s+" = "+i+"["+r+"]["+a+"];"),n._emitLine('frame.set("'+o+'", '+i+"["+r+"]["+a+"]);"),t.set(e.name.children[a].value,s)}),this._emitLoopBindings(e,i,r,o),this._withScopedSyntax(function(){n.compile(e.body,t)}),this._emitLine("}"),this._emitLine("} else {");var s=e.name.children,l=s[0],u=s[1],c=this._tmpid(),d=this._tmpid();t.set(l.value,c),t.set(u.value,d),this._emitLine(r+" = -1;"),this._emitLine("var "+o+" = runtime.keys("+i+").length;"),this._emitLine("for(var "+c+" in "+i+") {"),this._emitLine(r+"++;"),this._emitLine("var "+d+" = "+i+"["+c+"];"),this._emitLine('frame.set("'+l.value+'", '+c+");"),this._emitLine('frame.set("'+u.value+'", '+d+");"),this._emitLoopBindings(e,i,r,o),this._withScopedSyntax(function(){n.compile(e.body,t)}),this._emitLine("}"),this._emitLine("}")}else{var p=this._tmpid();t.set(e.name.value,p),this._emitLine("var "+o+" = "+i+".length;"),this._emitLine("for(var "+r+"=0; "+r+" < "+i+".length; "+r+"++) {"),this._emitLine("var "+p+" = "+i+"["+r+"];"),this._emitLine('frame.set("'+e.name.value+'", '+p+");"),this._emitLoopBindings(e,i,r,o),this._withScopedSyntax(function(){n.compile(e.body,t)}),this._emitLine("}")}this._emitLine("}"),e.else_&&(this._emitLine("if (!"+o+") {"),this.compile(e.else_,t),this._emitLine("}")),this._emitLine("frame = frame.pop();")},i._compileAsyncLoop=function(e,t,n){var r=this,o=this._tmpid(),i=this._tmpid(),s=this._tmpid(),l=n?"asyncAll":"asyncEach";if(t=t.push(),this._emitLine("frame = frame.push();"),this._emit("var "+s+" = runtime.fromIterator("),this._compileExpression(e.arr,t),this._emitLine(");"),e.name instanceof a.Array){var u=e.name.children.length;this._emit("runtime."+l+"("+s+", "+u+", function("),e.name.children.forEach(function(e){r._emit(e.value+",")}),this._emit(o+","+i+",next) {"),e.name.children.forEach(function(e){var n=e.value;t.set(n,n),r._emitLine('frame.set("'+n+'", '+n+");")})}else{var c=e.name.value;this._emitLine("runtime."+l+"("+s+", 1, function("+c+", "+o+", "+i+",next) {"),this._emitLine('frame.set("'+c+'", '+c+");"),t.set(c,c)}this._emitLoopBindings(e,s,o,i),this._withScopedSyntax(function(){var i;n&&(i=r._pushBuffer()),r.compile(e.body,t),r._emitLine("next("+o+(i?","+i:"")+");"),n&&r._popBuffer()});var d=this._tmpid();this._emitLine("}, "+this._makeCallback(d)),this._addScopeLevel(),n&&this._emitLine(this.buffer+" += "+d+";"),e.else_&&(this._emitLine("if (!"+s+".length) {"),this.compile(e.else_,t),this._emitLine("}")),this._emitLine("frame = frame.pop();")},i.compileAsyncEach=function(e,t){this._compileAsyncLoop(e,t)},i.compileAsyncAll=function(e,t){this._compileAsyncLoop(e,t,!0)},i._compileMacro=function(e,t){var n=this,r=[],o=null,i="macro_"+this._tmpid(),s=void 0!==t;e.args.children.forEach(function(t,i){i===e.args.children.length-1&&t instanceof a.Dict?o=t:(n.assertType(t,a.Symbol),r.push(t))});var u,c=[].concat(r.map(function(e){return"l_"+e.value}),["kwargs"]),d=r.map(function(e){return'"'+e.value+'"'}),p=(o&&o.children||[]).map(function(e){return'"'+e.key.value+'"'});u=s?t.push(!0):new l,this._emitLines("var "+i+" = runtime.makeMacro(","["+d.join(", ")+"], ","["+p.join(", ")+"], ","function ("+c.join(", ")+") {","var callerFrame = frame;","frame = "+(s?"frame.push(true);":"new runtime.Frame();"),"kwargs = kwargs || {};",'if (Object.prototype.hasOwnProperty.call(kwargs, "caller")) {','frame.set("caller", kwargs.caller); }'),r.forEach(function(e){n._emitLine('frame.set("'+e.value+'", l_'+e.value+");"),u.set(e.value,"l_"+e.value)}),o&&o.children.forEach(function(e){var t=e.key.value;n._emit('frame.set("'+t+'", '),n._emit('Object.prototype.hasOwnProperty.call(kwargs, "'+t+'")'),n._emit(' ? kwargs["'+t+'"] : '),n._compileExpression(e.value,u),n._emit(");")});var f=this._pushBuffer();return this._withScopedSyntax(function(){n.compile(e.body,u)}),this._emitLine("frame = "+(s?"frame.pop();":"callerFrame;")),this._emitLine("return new runtime.SafeString("+f+");"),this._emitLine("});"),this._popBuffer(),i},i.compileMacro=function(e,t){var n=this._compileMacro(e),r=e.name.value;t.set(r,n),t.parent?this._emitLine('frame.set("'+r+'", '+n+");"):("_"!==e.name.value.charAt(0)&&this._emitLine('context.addExport("'+r+'");'),this._emitLine('context.setVariable("'+r+'", '+n+");"))},i.compileCaller=function(e,t){this._emit("(function (){");var n=this._compileMacro(e,t);this._emit("return "+n+";})()")},i._compileGetTemplate=function(e,t,n,r){var o=this._tmpid(),i=this._templateName(),a=this._makeCallback(o),s=n?"true":"false",l=r?"true":"false";return this._emit("env.getTemplate("),this._compileExpression(e.template,t),this._emitLine(", "+s+", "+i+", "+l+", "+a),o},i.compileImport=function(e,t){var n=e.target.value,r=this._compileGetTemplate(e,t,!1,!1);this._addScopeLevel(),this._emitLine(r+".getExported("+(e.withContext?"context.getVariables(), frame, ":"")+this._makeCallback(r)),this._addScopeLevel(),t.set(n,r),t.parent?this._emitLine('frame.set("'+n+'", '+r+");"):this._emitLine('context.setVariable("'+n+'", '+r+");")},i.compileFromImport=function(e,t){var n=this,r=this._compileGetTemplate(e,t,!1,!1);this._addScopeLevel(),this._emitLine(r+".getExported("+(e.withContext?"context.getVariables(), frame, ":"")+this._makeCallback(r)),this._addScopeLevel(),e.names.children.forEach(function(e){var o,i,s=n._tmpid();e instanceof a.Pair?(o=e.key.value,i=e.value.value):i=o=e.value,n._emitLine("if(Object.prototype.hasOwnProperty.call("+r+', "'+o+'")) {'),n._emitLine("var "+s+" = "+r+"."+o+";"),n._emitLine("} else {"),n._emitLine("cb(new Error(\"cannot import '"+o+"'\")); return;"),n._emitLine("}"),t.set(i,s),t.parent?n._emitLine('frame.set("'+i+'", '+s+");"):n._emitLine('context.setVariable("'+i+'", '+s+");")})},i.compileBlock=function(e){var t=this._tmpid();this.inBlock||this._emit('(parentTemplate ? function(e, c, f, r, cb) { cb(""); } : '),this._emit('context.getBlock("'+e.name.value+'")'),this.inBlock||this._emit(")"),this._emitLine("(env, context, frame, runtime, "+this._makeCallback(t)),this._emitLine(this.buffer+" += "+t+";"),this._addScopeLevel()},i.compileSuper=function(e,t){var n=e.blockName.value,r=e.symbol.value,o=this._makeCallback(r);this._emitLine('context.getSuper(env, "'+n+'", b_'+n+", frame, runtime, "+o),this._emitLine(r+" = runtime.markSafe("+r+");"),this._addScopeLevel(),t.set(r,r)},i.compileExtends=function(e,t){var n=this._tmpid(),r=this._compileGetTemplate(e,t,!0,!1);this._emitLine("parentTemplate = "+r),this._emitLine("for(var "+n+" in parentTemplate.blocks) {"),this._emitLine("context.addBlock("+n+", parentTemplate.blocks["+n+"]);"),this._emitLine("}"),this._addScopeLevel()},i.compileInclude=function(e,t){this._emitLine("var tasks = [];"),this._emitLine("tasks.push("),this._emitLine("function(callback) {");var n=this._compileGetTemplate(e,t,!1,e.ignoreMissing);this._emitLine("callback(null,"+n+");});"),this._emitLine("});");var r=this._tmpid();this._emitLine("tasks.push("),this._emitLine("function(template, callback){"),this._emitLine("template.render(context.getVariables(), frame, "+this._makeCallback(r)),this._emitLine("callback(null,"+r+");});"),this._emitLine("});"),this._emitLine("tasks.push("),this._emitLine("function(result, callback){"),this._emitLine(this.buffer+" += result;"),this._emitLine("callback(null);"),this._emitLine("});"),this._emitLine("env.waterfall(tasks, function(){"),this._addScopeLevel()},i.compileTemplateData=function(e,t){this.compileLiteral(e,t)},i.compileCapture=function(e,t){var n=this,r=this.buffer;this.buffer="output",this._emitLine("(function() {"),this._emitLine('var output = "";'),this._withScopedSyntax(function(){n.compile(e.body,t)}),this._emitLine("return output;"),this._emitLine("})()"),this.buffer=r},i.compileOutput=function(e,t){var n=this;e.children.forEach(function(r){r instanceof a.TemplateData?r.value&&(n._emit(n.buffer+" += "),n.compileLiteral(r,t),n._emitLine(";")):(n._emit(n.buffer+" += runtime.suppressValue("),n.throwOnUndefined&&n._emit("runtime.ensureDefined("),n.compile(r,t),n.throwOnUndefined&&n._emit(","+e.lineno+","+e.colno+")"),n._emit(", env.opts.autoescape);\n"))})},i.compileRoot=function(e,t){var n=this;t&&this.fail("compileRoot: root node can't have frame"),t=new l,this._emitFuncBegin(e,"root"),this._emitLine("var parentTemplate = null;"),this._compileChildren(e,t),this._emitLine("if(parentTemplate) {"),this._emitLine("parentTemplate.rootRenderFunc(env, context, frame, runtime, cb);"),this._emitLine("} else {"),this._emitLine("cb(null, "+this.buffer+");"),this._emitLine("}"),this._emitFuncEnd(!0),this.inBlock=!0;var r=[],o=e.findAll(a.Block);o.forEach(function(e,t){var o=e.name.value;if(-1!==r.indexOf(o))throw new Error('Block "'+o+'" defined more than once.');r.push(o),n._emitFuncBegin(e,"b_"+o);var i=new l;n._emitLine("var frame = frame.push(true);"),n.compile(e.body,i),n._emitFuncEnd()}),this._emitLine("return {"),o.forEach(function(e,t){var r="b_"+e.name.value;n._emitLine(r+": "+r+",")}),this._emitLine("root: root\n};")},i.compile=function(e,t){var n=this["compile"+e.typename];n?n.call(this,e,t):this.fail("compile: Cannot compile node: "+e.typename,e.lineno,e.colno)},i.getCode=function(){return this.codebuf.join("")},o}(u);e.exports={compile:function(e,t,n,r,a){void 0===a&&(a={});var s=new d(r,a.throwOnUndefined),l=(n||[]).map(function(e){return e.preprocess}).filter(function(e){return!!e}).reduce(function(e,t){return t(e)},e);return s.compile(i.transform(o.parse(l,n,a),t,r)),s.getCode()},Compiler:d}},function(e,t,n){function r(e,t){return r=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},r(e,t)}var o=n(4),i=n(1).EmitterObj;e.exports=function(e){var t,n;function i(){return e.apply(this,arguments)||this}n=e,(t=i).prototype=Object.create(n.prototype),t.prototype.constructor=t,r(t,n);var a=i.prototype;return a.resolve=function(e,t){return o.resolve(o.dirname(e),t)},a.isRelative=function(e){return 0===e.indexOf("./")||0===e.indexOf("../")},i}(i)},function(e,t,n){function r(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,o(e,t)}function o(e,t){return o=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},o(e,t)}var i=n(12),a=n(15),s=n(0),l=n(5),u=n(18),c=n(10),d=c.FileSystemLoader,p=c.WebLoader,f=c.PrecompiledLoader,h=n(20),m=n(21),g=n(1),v=g.Obj,y=g.EmitterObj,b=n(2),w=b.handleError,x=b.Frame,k=n(22);function S(e,t,n){i(function(){e(t,n)})}var E={type:"code",obj:{root:function(e,t,n,r,o){try{o(null,"")}catch(e){o(w(e,null,null))}}}},C=function(e){function t(){return e.apply(this,arguments)||this}r(t,e);var n=t.prototype;return n.init=function(e,t){var n=this;t=this.opts=t||{},this.opts.dev=!!t.dev,this.opts.autoescape=null==t.autoescape||t.autoescape,this.opts.throwOnUndefined=!!t.throwOnUndefined,this.opts.trimBlocks=!!t.trimBlocks,this.opts.lstripBlocks=!!t.lstripBlocks,this.loaders=[],e?this.loaders=s.isArray(e)?e:[e]:d?this.loaders=[new d("views")]:p&&(this.loaders=[new p("/views")]),"undefined"!=typeof window&&window.nunjucksPrecompiled&&this.loaders.unshift(new f(window.nunjucksPrecompiled)),this._initLoaders(),this.globals=m(),this.filters={},this.tests={},this.asyncFilters=[],this.extensions={},this.extensionsList=[],s._entries(u).forEach(function(e){var t=e[0],r=e[1];return n.addFilter(t,r)}),s._entries(h).forEach(function(e){var t=e[0],r=e[1];return n.addTest(t,r)})},n._initLoaders=function(){var e=this;this.loaders.forEach(function(t){t.cache={},"function"==typeof t.on&&(t.on("update",function(n,r){t.cache[n]=null,e.emit("update",n,r,t)}),t.on("load",function(n,r){e.emit("load",n,r,t)}))})},n.invalidateCache=function(){this.loaders.forEach(function(e){e.cache={}})},n.addExtension=function(e,t){return t.__name=e,this.extensions[e]=t,this.extensionsList.push(t),this},n.removeExtension=function(e){var t=this.getExtension(e);t&&(this.extensionsList=s.without(this.extensionsList,t),delete this.extensions[e])},n.getExtension=function(e){return this.extensions[e]},n.hasExtension=function(e){return!!this.extensions[e]},n.addGlobal=function(e,t){return this.globals[e]=t,this},n.getGlobal=function(e){if(void 0===this.globals[e])throw new Error("global not found: "+e);return this.globals[e]},n.addFilter=function(e,t,n){var r=t;return n&&this.asyncFilters.push(e),this.filters[e]=r,this},n.getFilter=function(e){if(!this.filters[e])throw new Error("filter not found: "+e);return this.filters[e]},n.addTest=function(e,t){return this.tests[e]=t,this},n.getTest=function(e){if(!this.tests[e])throw new Error("test not found: "+e);return this.tests[e]},n.resolveTemplate=function(e,t,n){return e.isRelative&&t&&e.isRelative(n)&&e.resolve?e.resolve(t,n):n},n.getTemplate=function(e,t,n,r,o){var i,a=this,l=this,u=null;if(e&&e.raw&&(e=e.raw),s.isFunction(n)&&(o=n,n=null,t=t||!1),s.isFunction(t)&&(o=t,t=!1),e instanceof T)u=e;else{if("string"!=typeof e)throw new Error("template names must be a string: "+e);for(var c=0;c<this.loaders.length;c++){var d=this.loaders[c];if(u=d.cache[this.resolveTemplate(d,n,e)])break}}return u?(t&&u.compile(),o?void o(null,u):u):(s.asyncIter(this.loaders,function(t,r,o,i){function a(e,n){e?i(e):n?(n.loader=t,i(null,n)):o()}e=l.resolveTemplate(t,n,e),t.async?t.getSource(e,a):a(null,t.getSource(e))},function(n,s){if(s||n||r||(n=new Error("template not found: "+e)),n){if(o)return void o(n);throw n}var l;s?(l=new T(s.src,a,s.path,t),s.noCache||(s.loader.cache[e]=l)):l=new T(E,a,"",t),o?o(null,l):i=l}),i)},n.express=function(e){return k(this,e)},n.render=function(e,t,n){s.isFunction(t)&&(n=t,t=null);var r=null;return this.getTemplate(e,function(e,o){if(e&&n)S(n,e);else{if(e)throw e;r=o.render(t,n)}}),r},n.renderString=function(e,t,n,r){return s.isFunction(n)&&(r=n,n={}),new T(e,this,(n=n||{}).path).render(t,r)},n.waterfall=function(e,t,n){return a(e,t,n)},t}(y),O=function(e){function t(){return e.apply(this,arguments)||this}r(t,e);var n=t.prototype;return n.init=function(e,t,n){var r=this;this.env=n||new C,this.ctx=s.extend({},e),this.blocks={},this.exported=[],s.keys(t).forEach(function(e){r.addBlock(e,t[e])})},n.lookup=function(e){return e in this.env.globals&&!(e in this.ctx)?this.env.globals[e]:this.ctx[e]},n.setVariable=function(e,t){this.ctx[e]=t},n.getVariables=function(){return this.ctx},n.addBlock=function(e,t){return this.blocks[e]=this.blocks[e]||[],this.blocks[e].push(t),this},n.getBlock=function(e){if(!this.blocks[e])throw new Error('unknown block "'+e+'"');return this.blocks[e][0]},n.getSuper=function(e,t,n,r,o,i){var a=s.indexOf(this.blocks[t]||[],n),l=this.blocks[t][a+1];if(-1===a||!l)throw new Error('no super block available for "'+t+'"');l(e,this,r,o,i)},n.addExport=function(e){this.exported.push(e)},n.getExported=function(){var e=this,t={};return this.exported.forEach(function(n){t[n]=e.ctx[n]}),t},t}(v),T=function(e){function t(){return e.apply(this,arguments)||this}r(t,e);var n=t.prototype;return n.init=function(e,t,n,r){if(this.env=t||new C,s.isObject(e))switch(e.type){case"code":this.tmplProps=e.obj;break;case"string":this.tmplStr=e.obj;break;default:throw new Error("Unexpected template object type "+e.type+"; expected 'code', or 'string'")}else{if(!s.isString(e))throw new Error("src must be a string or an object describing the source");this.tmplStr=e}if(this.path=n,r)try{this._compile()}catch(e){throw s._prettifyError(this.path,this.env.opts.dev,e)}else this.compiled=!1},n.render=function(e,t,n){var r=this;"function"==typeof e?(n=e,e={}):"function"==typeof t&&(n=t,t=null);var o=!t;try{this.compile()}catch(e){var i=s._prettifyError(this.path,this.env.opts.dev,e);if(n)return S(n,i);throw i}var a=new O(e||{},this.blocks,this.env),l=t?t.push(!0):new x;l.topLevel=!0;var u=null,c=!1;return this.rootRenderFunc(this.env,a,l,b,function(e,t){if(!c||!n||void 0===t)if(e&&(e=s._prettifyError(r.path,r.env.opts.dev,e),c=!0),n)o?S(n,e,t):n(e,t);else{if(e)throw e;u=t}}),u},n.getExported=function(e,t,n){"function"==typeof e&&(n=e,e={}),"function"==typeof t&&(n=t,t=null);try{this.compile()}catch(e){if(n)return n(e);throw e}var r=t?t.push():new x;r.topLevel=!0;var o=new O(e||{},this.blocks,this.env);this.rootRenderFunc(this.env,o,r,b,function(e){e?n(e,null):n(null,o.getExported())})},n.compile=function(){this.compiled||this._compile()},n._compile=function(){var e;if(this.tmplProps)e=this.tmplProps;else{var t=l.compile(this.tmplStr,this.env.asyncFilters,this.env.extensionsList,this.path,this.env.opts);e=new Function(t)()}this.blocks=this._getBlocks(e),this.rootRenderFunc=e.root,this.compiled=!0},n._getBlocks=function(e){var t={};return s.keys(e).forEach(function(n){"b_"===n.slice(0,2)&&(t[n.slice(2)]=e[n])}),t},t}(v);e.exports={Environment:C,Template:T}},function(e,t,n){function r(e,t){return r=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},r(e,t)}var o=n(9),i=n(3),a=n(1).Obj,s=n(0),l=function(e){var t,n;function a(){return e.apply(this,arguments)||this}n=e,(t=a).prototype=Object.create(n.prototype),t.prototype.constructor=t,r(t,n);var l=a.prototype;return l.init=function(e){this.tokens=e,this.peeked=null,this.breakOnBlocks=null,this.dropLeadingWhitespace=!1,this.extensions=[]},l.nextToken=function(e){var t;if(this.peeked){if(e||this.peeked.type!==o.TOKEN_WHITESPACE)return t=this.peeked,this.peeked=null,t;this.peeked=null}if(t=this.tokens.nextToken(),!e)for(;t&&t.type===o.TOKEN_WHITESPACE;)t=this.tokens.nextToken();return t},l.peekToken=function(){return this.peeked=this.peeked||this.nextToken(),this.peeked},l.pushToken=function(e){if(this.peeked)throw new Error("pushToken: can only push one token on between reads");this.peeked=e},l.error=function(e,t,n){if(void 0===t||void 0===n){var r=this.peekToken()||{};t=r.lineno,n=r.colno}return void 0!==t&&(t+=1),void 0!==n&&(n+=1),new s.TemplateError(e,t,n)},l.fail=function(e,t,n){throw this.error(e,t,n)},l.skip=function(e){var t=this.nextToken();return!(!t||t.type!==e)||(this.pushToken(t),!1)},l.expect=function(e){var t=this.nextToken();return t.type!==e&&this.fail("expected "+e+", got "+t.type,t.lineno,t.colno),t},l.skipValue=function(e,t){var n=this.nextToken();return!(!n||n.type!==e||n.value!==t)||(this.pushToken(n),!1)},l.skipSymbol=function(e){return this.skipValue(o.TOKEN_SYMBOL,e)},l.advanceAfterBlockEnd=function(e){var t;return e||((t=this.peekToken())||this.fail("unexpected end of file"),t.type!==o.TOKEN_SYMBOL&&this.fail("advanceAfterBlockEnd: expected symbol token or explicit name to be passed"),e=this.nextToken().value),(t=this.nextToken())&&t.type===o.TOKEN_BLOCK_END?"-"===t.value.charAt(0)&&(this.dropLeadingWhitespace=!0):this.fail("expected block end in "+e+" statement"),t},l.advanceAfterVariableEnd=function(){var e=this.nextToken();e&&e.type===o.TOKEN_VARIABLE_END?this.dropLeadingWhitespace="-"===e.value.charAt(e.value.length-this.tokens.tags.VARIABLE_END.length-1):(this.pushToken(e),this.fail("expected variable end"))},l.parseFor=function(){var e,t,n=this.peekToken();if(this.skipSymbol("for")?(e=new i.For(n.lineno,n.colno),t="endfor"):this.skipSymbol("asyncEach")?(e=new i.AsyncEach(n.lineno,n.colno),t="endeach"):this.skipSymbol("asyncAll")?(e=new i.AsyncAll(n.lineno,n.colno),t="endall"):this.fail("parseFor: expected for{Async}",n.lineno,n.colno),e.name=this.parsePrimary(),e.name instanceof i.Symbol||this.fail("parseFor: variable name expected for loop"),this.peekToken().type===o.TOKEN_COMMA){var r=e.name;for(e.name=new i.Array(r.lineno,r.colno),e.name.addChild(r);this.skip(o.TOKEN_COMMA);){var a=this.parsePrimary();e.name.addChild(a)}}return this.skipSymbol("in")||this.fail('parseFor: expected "in" keyword for loop',n.lineno,n.colno),e.arr=this.parseExpression(),this.advanceAfterBlockEnd(n.value),e.body=this.parseUntilBlocks(t,"else"),this.skipSymbol("else")&&(this.advanceAfterBlockEnd("else"),e.else_=this.parseUntilBlocks(t)),this.advanceAfterBlockEnd(),e},l.parseMacro=function(){var e=this.peekToken();this.skipSymbol("macro")||this.fail("expected macro");var t=this.parsePrimary(!0),n=this.parseSignature(),r=new i.Macro(e.lineno,e.colno,t,n);return this.advanceAfterBlockEnd(e.value),r.body=this.parseUntilBlocks("endmacro"),this.advanceAfterBlockEnd(),r},l.parseCall=function(){var e=this.peekToken();this.skipSymbol("call")||this.fail("expected call");var t=this.parseSignature(!0)||new i.NodeList,n=this.parsePrimary();this.advanceAfterBlockEnd(e.value);var r=this.parseUntilBlocks("endcall");this.advanceAfterBlockEnd();var o=new i.Symbol(e.lineno,e.colno,"caller"),a=new i.Caller(e.lineno,e.colno,o,t,r),s=n.args.children;return s[s.length-1]instanceof i.KeywordArgs||s.push(new i.KeywordArgs),s[s.length-1].addChild(new i.Pair(e.lineno,e.colno,o,a)),new i.Output(e.lineno,e.colno,[n])},l.parseWithContext=function(){var e=this.peekToken(),t=null;return this.skipSymbol("with")?t=!0:this.skipSymbol("without")&&(t=!1),null!==t&&(this.skipSymbol("context")||this.fail("parseFrom: expected context after with/without",e.lineno,e.colno)),t},l.parseImport=function(){var e=this.peekToken();this.skipSymbol("import")||this.fail("parseImport: expected import",e.lineno,e.colno);var t=this.parseExpression();this.skipSymbol("as")||this.fail('parseImport: expected "as" keyword',e.lineno,e.colno);var n=this.parseExpression(),r=this.parseWithContext(),o=new i.Import(e.lineno,e.colno,t,n,r);return this.advanceAfterBlockEnd(e.value),o},l.parseFrom=function(){var e=this.peekToken();this.skipSymbol("from")||this.fail("parseFrom: expected from");var t=this.parseExpression();this.skipSymbol("import")||this.fail("parseFrom: expected import",e.lineno,e.colno);for(var n,r=new i.NodeList;;){var a=this.peekToken();if(a.type===o.TOKEN_BLOCK_END){r.children.length||this.fail("parseFrom: Expected at least one import name",e.lineno,e.colno),"-"===a.value.charAt(0)&&(this.dropLeadingWhitespace=!0),this.nextToken();break}r.children.length>0&&!this.skip(o.TOKEN_COMMA)&&this.fail("parseFrom: expected comma",e.lineno,e.colno);var s=this.parsePrimary();if("_"===s.value.charAt(0)&&this.fail("parseFrom: names starting with an underscore cannot be imported",s.lineno,s.colno),this.skipSymbol("as")){var l=this.parsePrimary();r.addChild(new i.Pair(s.lineno,s.colno,s,l))}else r.addChild(s);n=this.parseWithContext()}return new i.FromImport(e.lineno,e.colno,t,r,n)},l.parseBlock=function(){var e=this.peekToken();this.skipSymbol("block")||this.fail("parseBlock: expected block",e.lineno,e.colno);var t=new i.Block(e.lineno,e.colno);t.name=this.parsePrimary(),t.name instanceof i.Symbol||this.fail("parseBlock: variable name expected",e.lineno,e.colno),this.advanceAfterBlockEnd(e.value),t.body=this.parseUntilBlocks("endblock"),this.skipSymbol("endblock"),this.skipSymbol(t.name.value);var n=this.peekToken();return n||this.fail("parseBlock: expected endblock, got end of file"),this.advanceAfterBlockEnd(n.value),t},l.parseExtends=function(){var e="extends",t=this.peekToken();this.skipSymbol(e)||this.fail("parseTemplateRef: expected "+e);var n=new i.Extends(t.lineno,t.colno);return n.template=this.parseExpression(),this.advanceAfterBlockEnd(t.value),n},l.parseInclude=function(){var e="include",t=this.peekToken();this.skipSymbol(e)||this.fail("parseInclude: expected "+e);var n=new i.Include(t.lineno,t.colno);return n.template=this.parseExpression(),this.skipSymbol("ignore")&&this.skipSymbol("missing")&&(n.ignoreMissing=!0),this.advanceAfterBlockEnd(t.value),n},l.parseIf=function(){var e,t=this.peekToken();this.skipSymbol("if")||this.skipSymbol("elif")||this.skipSymbol("elseif")?e=new i.If(t.lineno,t.colno):this.skipSymbol("ifAsync")?e=new i.IfAsync(t.lineno,t.colno):this.fail("parseIf: expected if, elif, or elseif",t.lineno,t.colno),e.cond=this.parseExpression(),this.advanceAfterBlockEnd(t.value),e.body=this.parseUntilBlocks("elif","elseif","else","endif");var n=this.peekToken();switch(n&&n.value){case"elseif":case"elif":e.else_=this.parseIf();break;case"else":this.advanceAfterBlockEnd(),e.else_=this.parseUntilBlocks("endif"),this.advanceAfterBlockEnd();break;case"endif":e.else_=null,this.advanceAfterBlockEnd();break;default:this.fail("parseIf: expected elif, else, or endif, got end of file")}return e},l.parseSet=function(){var e=this.peekToken();this.skipSymbol("set")||this.fail("parseSet: expected set",e.lineno,e.colno);for(var t,n=new i.Set(e.lineno,e.colno,[]);(t=this.parsePrimary())&&(n.targets.push(t),this.skip(o.TOKEN_COMMA)););return this.skipValue(o.TOKEN_OPERATOR,"=")?(n.value=this.parseExpression(),this.advanceAfterBlockEnd(e.value)):this.skip(o.TOKEN_BLOCK_END)?(n.body=new i.Capture(e.lineno,e.colno,this.parseUntilBlocks("endset")),n.value=null,this.advanceAfterBlockEnd()):this.fail("parseSet: expected = or block end in set tag",e.lineno,e.colno),n},l.parseSwitch=function(){var e="switch",t="endswitch",n="case",r="default",o=this.peekToken();this.skipSymbol(e)||this.skipSymbol(n)||this.skipSymbol(r)||this.fail('parseSwitch: expected "switch," "case" or "default"',o.lineno,o.colno);var a=this.parseExpression();this.advanceAfterBlockEnd(e),this.parseUntilBlocks(n,r,t);var s,l=this.peekToken(),u=[];do{this.skipSymbol(n);var c=this.parseExpression();this.advanceAfterBlockEnd(e);var d=this.parseUntilBlocks(n,r,t);u.push(new i.Case(l.line,l.col,c,d)),l=this.peekToken()}while(l&&l.value===n);switch(l.value){case r:this.advanceAfterBlockEnd(),s=this.parseUntilBlocks(t),this.advanceAfterBlockEnd();break;case t:this.advanceAfterBlockEnd();break;default:this.fail('parseSwitch: expected "case," "default" or "endswitch," got EOF.')}return new i.Switch(o.lineno,o.colno,a,u,s)},l.parseStatement=function(){var e=this.peekToken();if(e.type!==o.TOKEN_SYMBOL&&this.fail("tag name expected",e.lineno,e.colno),this.breakOnBlocks&&-1!==s.indexOf(this.breakOnBlocks,e.value))return null;switch(e.value){case"raw":return this.parseRaw();case"verbatim":return this.parseRaw("verbatim");case"if":case"ifAsync":return this.parseIf();case"for":case"asyncEach":case"asyncAll":return this.parseFor();case"block":return this.parseBlock();case"extends":return this.parseExtends();case"include":return this.parseInclude();case"set":return this.parseSet();case"macro":return this.parseMacro();case"call":return this.parseCall();case"import":return this.parseImport();case"from":return this.parseFrom();case"filter":return this.parseFilterStatement();case"switch":return this.parseSwitch();default:if(this.extensions.length)for(var t=0;t<this.extensions.length;t++){var n=this.extensions[t];if(-1!==s.indexOf(n.tags||[],e.value))return n.parse(this,i,o)}this.fail("unknown block tag: "+e.value,e.lineno,e.colno)}},l.parseRaw=function(e){for(var t="end"+(e=e||"raw"),n=new RegExp("([\\s\\S]*?){%\\s*("+e+"|"+t+")\\s*(?=%})%}"),r=1,o="",a=null,s=this.advanceAfterBlockEnd();(a=this.tokens._extractRegex(n))&&r>0;){var l=a[0],u=a[1],c=a[2];c===e?r+=1:c===t&&(r-=1),0===r?(o+=u,this.tokens.backN(l.length-u.length)):o+=l}return new i.Output(s.lineno,s.colno,[new i.TemplateData(s.lineno,s.colno,o)])},l.parsePostfix=function(e){for(var t,n=this.peekToken();n;){if(n.type===o.TOKEN_LEFT_PAREN)e=new i.FunCall(n.lineno,n.colno,e,this.parseSignature());else if(n.type===o.TOKEN_LEFT_BRACKET)(t=this.parseAggregate()).children.length>1&&this.fail("invalid index"),e=new i.LookupVal(n.lineno,n.colno,e,t.children[0]);else{if(n.type!==o.TOKEN_OPERATOR||"."!==n.value)break;this.nextToken();var r=this.nextToken();r.type!==o.TOKEN_SYMBOL&&this.fail("expected name as lookup value, got "+r.value,r.lineno,r.colno),t=new i.Literal(r.lineno,r.colno,r.value),e=new i.LookupVal(n.lineno,n.colno,e,t)}n=this.peekToken()}return e},l.parseExpression=function(){return this.parseInlineIf()},l.parseInlineIf=function(){var e=this.parseOr();if(this.skipSymbol("if")){var t=this.parseOr(),n=e;(e=new i.InlineIf(e.lineno,e.colno)).body=n,e.cond=t,this.skipSymbol("else")?e.else_=this.parseOr():e.else_=null}return e},l.parseOr=function(){for(var e=this.parseAnd();this.skipSymbol("or");){var t=this.parseAnd();e=new i.Or(e.lineno,e.colno,e,t)}return e},l.parseAnd=function(){for(var e=this.parseNot();this.skipSymbol("and");){var t=this.parseNot();e=new i.And(e.lineno,e.colno,e,t)}return e},l.parseNot=function(){var e=this.peekToken();return this.skipSymbol("not")?new i.Not(e.lineno,e.colno,this.parseNot()):this.parseIn()},l.parseIn=function(){for(var e=this.parseIs();;){var t=this.nextToken();if(!t)break;var n=t.type===o.TOKEN_SYMBOL&&"not"===t.value;if(n||this.pushToken(t),!this.skipSymbol("in")){n&&this.pushToken(t);break}var r=this.parseIs();e=new i.In(e.lineno,e.colno,e,r),n&&(e=new i.Not(e.lineno,e.colno,e))}return e},l.parseIs=function(){var e=this.parseCompare();if(this.skipSymbol("is")){var t=this.skipSymbol("not"),n=this.parseCompare();e=new i.Is(e.lineno,e.colno,e,n),t&&(e=new i.Not(e.lineno,e.colno,e))}return e},l.parseCompare=function(){for(var e=["==","===","!=","!==","<",">","<=",">="],t=this.parseConcat(),n=[];;){var r=this.nextToken();if(!r)break;if(-1===e.indexOf(r.value)){this.pushToken(r);break}n.push(new i.CompareOperand(r.lineno,r.colno,this.parseConcat(),r.value))}return n.length?new i.Compare(n[0].lineno,n[0].colno,t,n):t},l.parseConcat=function(){for(var e=this.parseAdd();this.skipValue(o.TOKEN_TILDE,"~");){var t=this.parseAdd();e=new i.Concat(e.lineno,e.colno,e,t)}return e},l.parseAdd=function(){for(var e=this.parseSub();this.skipValue(o.TOKEN_OPERATOR,"+");){var t=this.parseSub();e=new i.Add(e.lineno,e.colno,e,t)}return e},l.parseSub=function(){for(var e=this.parseMul();this.skipValue(o.TOKEN_OPERATOR,"-");){var t=this.parseMul();e=new i.Sub(e.lineno,e.colno,e,t)}return e},l.parseMul=function(){for(var e=this.parseDiv();this.skipValue(o.TOKEN_OPERATOR,"*");){var t=this.parseDiv();e=new i.Mul(e.lineno,e.colno,e,t)}return e},l.parseDiv=function(){for(var e=this.parseFloorDiv();this.skipValue(o.TOKEN_OPERATOR,"/");){var t=this.parseFloorDiv();e=new i.Div(e.lineno,e.colno,e,t)}return e},l.parseFloorDiv=function(){for(var e=this.parseMod();this.skipValue(o.TOKEN_OPERATOR,"//");){var t=this.parseMod();e=new i.FloorDiv(e.lineno,e.colno,e,t)}return e},l.parseMod=function(){for(var e=this.parsePow();this.skipValue(o.TOKEN_OPERATOR,"%");){var t=this.parsePow();e=new i.Mod(e.lineno,e.colno,e,t)}return e},l.parsePow=function(){for(var e=this.parseUnary();this.skipValue(o.TOKEN_OPERATOR,"**");){var t=this.parseUnary();e=new i.Pow(e.lineno,e.colno,e,t)}return e},l.parseUnary=function(e){var t,n=this.peekToken();return t=this.skipValue(o.TOKEN_OPERATOR,"-")?new i.Neg(n.lineno,n.colno,this.parseUnary(!0)):this.skipValue(o.TOKEN_OPERATOR,"+")?new i.Pos(n.lineno,n.colno,this.parseUnary(!0)):this.parsePrimary(),e||(t=this.parseFilter(t)),t},l.parsePrimary=function(e){var t,n=this.nextToken(),r=null;if(n?n.type===o.TOKEN_STRING?t=n.value:n.type===o.TOKEN_INT?t=parseInt(n.value,10):n.type===o.TOKEN_FLOAT?t=parseFloat(n.value):n.type===o.TOKEN_BOOLEAN?"true"===n.value?t=!0:"false"===n.value?t=!1:this.fail("invalid boolean: "+n.value,n.lineno,n.colno):n.type===o.TOKEN_NONE?t=null:n.type===o.TOKEN_REGEX&&(t=new RegExp(n.value.body,n.value.flags)):this.fail("expected expression, got end of file"),void 0!==t?r=new i.Literal(n.lineno,n.colno,t):n.type===o.TOKEN_SYMBOL?r=new i.Symbol(n.lineno,n.colno,n.value):(this.pushToken(n),r=this.parseAggregate()),e||(r=this.parsePostfix(r)),r)return r;throw this.error("unexpected token: "+n.value,n.lineno,n.colno)},l.parseFilterName=function(){for(var e=this.expect(o.TOKEN_SYMBOL),t=e.value;this.skipValue(o.TOKEN_OPERATOR,".");)t+="."+this.expect(o.TOKEN_SYMBOL).value;return new i.Symbol(e.lineno,e.colno,t)},l.parseFilterArgs=function(e){return this.peekToken().type===o.TOKEN_LEFT_PAREN?this.parsePostfix(e).args.children:[]},l.parseFilter=function(e){for(;this.skip(o.TOKEN_PIPE);){var t=this.parseFilterName();e=new i.Filter(t.lineno,t.colno,t,new i.NodeList(t.lineno,t.colno,[e].concat(this.parseFilterArgs(e))))}return e},l.parseFilterStatement=function(){var e=this.peekToken();this.skipSymbol("filter")||this.fail("parseFilterStatement: expected filter");var t=this.parseFilterName(),n=this.parseFilterArgs(t);this.advanceAfterBlockEnd(e.value);var r=new i.Capture(t.lineno,t.colno,this.parseUntilBlocks("endfilter"));this.advanceAfterBlockEnd();var o=new i.Filter(t.lineno,t.colno,t,new i.NodeList(t.lineno,t.colno,[r].concat(n)));return new i.Output(t.lineno,t.colno,[o])},l.parseAggregate=function(){var e,t=this.nextToken();switch(t.type){case o.TOKEN_LEFT_PAREN:e=new i.Group(t.lineno,t.colno);break;case o.TOKEN_LEFT_BRACKET:e=new i.Array(t.lineno,t.colno);break;case o.TOKEN_LEFT_CURLY:e=new i.Dict(t.lineno,t.colno);break;default:return null}for(;;){var n=this.peekToken().type;if(n===o.TOKEN_RIGHT_PAREN||n===o.TOKEN_RIGHT_BRACKET||n===o.TOKEN_RIGHT_CURLY){this.nextToken();break}if(e.children.length>0&&(this.skip(o.TOKEN_COMMA)||this.fail("parseAggregate: expected comma after expression",t.lineno,t.colno)),e instanceof i.Dict){var r=this.parsePrimary();this.skip(o.TOKEN_COLON)||this.fail("parseAggregate: expected colon after dict key",t.lineno,t.colno);var a=this.parseExpression();e.addChild(new i.Pair(r.lineno,r.colno,r,a))}else{var s=this.parseExpression();e.addChild(s)}}return e},l.parseSignature=function(e,t){var n=this.peekToken();if(!t&&n.type!==o.TOKEN_LEFT_PAREN){if(e)return null;this.fail("expected arguments",n.lineno,n.colno)}n.type===o.TOKEN_LEFT_PAREN&&(n=this.nextToken());for(var r=new i.NodeList(n.lineno,n.colno),a=new i.KeywordArgs(n.lineno,n.colno),s=!1;;){if(n=this.peekToken(),!t&&n.type===o.TOKEN_RIGHT_PAREN){this.nextToken();break}if(t&&n.type===o.TOKEN_BLOCK_END)break;if(s&&!this.skip(o.TOKEN_COMMA))this.fail("parseSignature: expected comma after expression",n.lineno,n.colno);else{var l=this.parseExpression();this.skipValue(o.TOKEN_OPERATOR,"=")?a.addChild(new i.Pair(l.lineno,l.colno,l,this.parseExpression())):r.addChild(l)}s=!0}return a.children.length&&r.addChild(a),r},l.parseUntilBlocks=function(){for(var e=this.breakOnBlocks,t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];this.breakOnBlocks=n;var o=this.parse();return this.breakOnBlocks=e,o},l.parseNodes=function(){for(var e,t=[];e=this.nextToken();)if(e.type===o.TOKEN_DATA){var n=e.value,r=this.peekToken(),a=r&&r.value;this.dropLeadingWhitespace&&(n=n.replace(/^\s*/,""),this.dropLeadingWhitespace=!1),r&&(r.type===o.TOKEN_BLOCK_START&&"-"===a.charAt(a.length-1)||r.type===o.TOKEN_VARIABLE_START&&"-"===a.charAt(this.tokens.tags.VARIABLE_START.length)||r.type===o.TOKEN_COMMENT&&"-"===a.charAt(this.tokens.tags.COMMENT_START.length))&&(n=n.replace(/\s*$/,"")),t.push(new i.Output(e.lineno,e.colno,[new i.TemplateData(e.lineno,e.colno,n)]))}else if(e.type===o.TOKEN_BLOCK_START){this.dropLeadingWhitespace=!1;var s=this.parseStatement();if(!s)break;t.push(s)}else if(e.type===o.TOKEN_VARIABLE_START){var l=this.parseExpression();this.dropLeadingWhitespace=!1,this.advanceAfterVariableEnd(),t.push(new i.Output(e.lineno,e.colno,[l]))}else e.type===o.TOKEN_COMMENT?this.dropLeadingWhitespace="-"===e.value.charAt(e.value.length-this.tokens.tags.COMMENT_END.length-1):this.fail("Unexpected token at top-level: "+e.type,e.lineno,e.colno);return t},l.parse=function(){return new i.NodeList(0,0,this.parseNodes())},l.parseAsRoot=function(){return new i.Root(0,0,this.parseNodes())},a}(a);e.exports={parse:function(e,t,n){var r=new l(o.lex(e,n));return void 0!==t&&(r.extensions=t),r.parseAsRoot()},Parser:l}},function(e,t,n){var r=n(0),o=" \n\t\r ",i="()[]{}%*-+~/#,:|.<>=!",a="string",s="whitespace",l="data",u="block-start",c="block-end",d="variable-start",p="variable-end",f="comment",h="left-paren",m="right-paren",g="left-bracket",v="right-bracket",y="left-curly",b="right-curly",w="operator",x="comma",k="colon",S="tilde",E="pipe",C="float",O="boolean",T="none",_="symbol",R="regex";function P(e,t,n,r){return{type:e,value:t,lineno:n,colno:r}}var A=function(){function e(e,t){this.str=e,this.index=0,this.len=e.length,this.lineno=0,this.colno=0,this.in_code=!1;var n=(t=t||{}).tags||{};this.tags={BLOCK_START:n.blockStart||"{%",BLOCK_END:n.blockEnd||"%}",VARIABLE_START:n.variableStart||"{{",VARIABLE_END:n.variableEnd||"}}",COMMENT_START:n.commentStart||"{#",COMMENT_END:n.commentEnd||"#}"},this.trimBlocks=!!t.trimBlocks,this.lstripBlocks=!!t.lstripBlocks}var t=e.prototype;return t.nextToken=function(){var e,t=this.lineno,n=this.colno;if(this.in_code){var A=this.current();if(this.isFinished())return null;if('"'===A||"'"===A)return P(a,this._parseString(A),t,n);if(e=this._extract(o))return P(s,e,t,n);if((e=this._extractString(this.tags.BLOCK_END))||(e=this._extractString("-"+this.tags.BLOCK_END)))return this.in_code=!1,this.trimBlocks&&("\n"===(A=this.current())?this.forward():"\r"===A&&(this.forward(),"\n"===(A=this.current())?this.forward():this.back())),P(c,e,t,n);if((e=this._extractString(this.tags.VARIABLE_END))||(e=this._extractString("-"+this.tags.VARIABLE_END)))return this.in_code=!1,P(p,e,t,n);if("r"===A&&"/"===this.str.charAt(this.index+1)){this.forwardN(2);for(var L="";!this.isFinished();){if("/"===this.current()&&"\\"!==this.previous()){this.forward();break}L+=this.current(),this.forward()}for(var N=["g","i","m","y"],M="";!this.isFinished()&&-1!==N.indexOf(this.current());)M+=this.current(),this.forward();return P(R,{body:L,flags:M},t,n)}if(-1!==i.indexOf(A)){this.forward();var I,F=["==","===","!=","!==","<=",">=","//","**"],$=A+this.current();switch(-1!==r.indexOf(F,$)&&(this.forward(),A=$,-1!==r.indexOf(F,$+this.current())&&(A=$+this.current(),this.forward())),A){case"(":I=h;break;case")":I=m;break;case"[":I=g;break;case"]":I=v;break;case"{":I=y;break;case"}":I=b;break;case",":I=x;break;case":":I=k;break;case"~":I=S;break;case"|":I=E;break;default:I=w}return P(I,A,t,n)}if((e=this._extractUntil(o+i)).match(/^[-+]?[0-9]+$/)){if("."===this.current()){this.forward();var j=this._extract("0123456789");return P(C,e+"."+j,t,n)}return P("int",e,t,n)}if(e.match(/^(true|false)$/))return P(O,e,t,n);if("none"===e)return P(T,e,t,n);if("null"===e)return P(T,e,t,n);if(e)return P(_,e,t,n);throw new Error("Unexpected value while parsing: "+e)}var z,B=this.tags.BLOCK_START.charAt(0)+this.tags.VARIABLE_START.charAt(0)+this.tags.COMMENT_START.charAt(0)+this.tags.COMMENT_END.charAt(0);if(this.isFinished())return null;if((e=this._extractString(this.tags.BLOCK_START+"-"))||(e=this._extractString(this.tags.BLOCK_START)))return this.in_code=!0,P(u,e,t,n);if((e=this._extractString(this.tags.VARIABLE_START+"-"))||(e=this._extractString(this.tags.VARIABLE_START)))return this.in_code=!0,P(d,e,t,n);e="";var D=!1;for(this._matches(this.tags.COMMENT_START)&&(D=!0,e=this._extractString(this.tags.COMMENT_START));null!==(z=this._extractUntil(B));){if(e+=z,(this._matches(this.tags.BLOCK_START)||this._matches(this.tags.VARIABLE_START)||this._matches(this.tags.COMMENT_START))&&!D){if(this.lstripBlocks&&this._matches(this.tags.BLOCK_START)&&this.colno>0&&this.colno<=e.length){var W=e.slice(-this.colno);if(/^\s+$/.test(W)&&!(e=e.slice(0,-this.colno)).length)return this.nextToken()}break}if(this._matches(this.tags.COMMENT_END)){if(!D)throw new Error("unexpected end of comment");e+=this._extractString(this.tags.COMMENT_END);break}e+=this.current(),this.forward()}if(null===z&&D)throw new Error("expected end of comment, got end of file");return P(D?f:l,e,t,n)},t._parseString=function(e){this.forward();for(var t="";!this.isFinished()&&this.current()!==e;){var n=this.current();if("\\"===n){switch(this.forward(),this.current()){case"n":t+="\n";break;case"t":t+="\t";break;case"r":t+="\r";break;default:t+=this.current()}this.forward()}else t+=n,this.forward()}return this.forward(),t},t._matches=function(e){return this.index+e.length>this.len?null:this.str.slice(this.index,this.index+e.length)===e},t._extractString=function(e){return this._matches(e)?(this.forwardN(e.length),e):null},t._extractUntil=function(e){return this._extractMatching(!0,e||"")},t._extract=function(e){return this._extractMatching(!1,e)},t._extractMatching=function(e,t){if(this.isFinished())return null;var n=t.indexOf(this.current());if(e&&-1===n||!e&&-1!==n){var r=this.current();this.forward();for(var o=t.indexOf(this.current());(e&&-1===o||!e&&-1!==o)&&!this.isFinished();)r+=this.current(),this.forward(),o=t.indexOf(this.current());return r}return""},t._extractRegex=function(e){var t=this.currentStr().match(e);return t?(this.forwardN(t[0].length),t):null},t.isFinished=function(){return this.index>=this.len},t.forwardN=function(e){for(var t=0;t<e;t++)this.forward()},t.forward=function(){this.index++,"\n"===this.previous()?(this.lineno++,this.colno=0):this.colno++},t.backN=function(e){for(var t=0;t<e;t++)this.back()},t.back=function(){if(this.index--,"\n"===this.current()){this.lineno--;var e=this.src.lastIndexOf("\n",this.index-1);this.colno=-1===e?this.index:this.index-e}else this.colno--},t.current=function(){return this.isFinished()?"":this.str.charAt(this.index)},t.currentStr=function(){return this.isFinished()?"":this.str.substr(this.index)},t.previous=function(){return this.str.charAt(this.index-1)},e}();e.exports={lex:function(e,t){return new A(e,t)},TOKEN_STRING:a,TOKEN_WHITESPACE:s,TOKEN_DATA:l,TOKEN_BLOCK_START:u,TOKEN_BLOCK_END:c,TOKEN_VARIABLE_START:d,TOKEN_VARIABLE_END:p,TOKEN_COMMENT:f,TOKEN_LEFT_PAREN:h,TOKEN_RIGHT_PAREN:m,TOKEN_LEFT_BRACKET:g,TOKEN_RIGHT_BRACKET:v,TOKEN_LEFT_CURLY:y,TOKEN_RIGHT_CURLY:b,TOKEN_OPERATOR:w,TOKEN_COMMA:x,TOKEN_COLON:k,TOKEN_TILDE:S,TOKEN_PIPE:E,TOKEN_INT:"int",TOKEN_FLOAT:C,TOKEN_BOOLEAN:O,TOKEN_NONE:T,TOKEN_SYMBOL:_,TOKEN_SPECIAL:"special",TOKEN_REGEX:R}},function(e,t,n){function r(e,t){return r=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},r(e,t)}var o=n(6),i=n(19).PrecompiledLoader,a=function(e){var t,n;function o(t,n){var r;return(r=e.call(this)||this).baseURL=t||".",n=n||{},r.useCache=!!n.useCache,r.async=!!n.async,r}n=e,(t=o).prototype=Object.create(n.prototype),t.prototype.constructor=t,r(t,n);var i=o.prototype;return i.resolve=function(e,t){throw new Error("relative templates not support in the browser yet")},i.getSource=function(e,t){var n,r=this,o=this.useCache;return this.fetch(this.baseURL+"/"+e,function(i,a){if(i)if(t)t(i.content);else{if(404!==i.status)throw i.content;n=null}else n={src:a,path:e,noCache:!o},r.emit("load",e,n),t&&t(null,n)}),n},i.fetch=function(e,t){if("undefined"==typeof window)throw new Error("WebLoader can only by used in a browser");var n=new XMLHttpRequest,r=!0;n.onreadystatechange=function(){4===n.readyState&&r&&(r=!1,0===n.status||200===n.status?t(null,n.responseText):t({status:n.status,content:n.responseText}))},e+=(-1===e.indexOf("?")?"?":"&")+"s="+(new Date).getTime(),n.open("GET",e,this.async),n.send()},o}(o);e.exports={WebLoader:a,PrecompiledLoader:i}},function(e,t,n){var r,o=n(0),i=n(7),a=i.Environment,s=i.Template,l=n(6),u=n(10),c=n(23),d=n(5),p=n(8),f=n(9),h=n(2),m=n(3),g=n(25);function v(e,t){var n;return t=t||{},o.isObject(e)&&(t=e,e=null),u.FileSystemLoader?n=new u.FileSystemLoader(e,{watch:t.watch,noCache:t.noCache}):u.WebLoader&&(n=new u.WebLoader(e,{useCache:t.web&&t.web.useCache,async:t.web&&t.web.async})),r=new a(n,t),t&&t.express&&r.express(t.express),r}e.exports={Environment:a,Template:s,Loader:l,FileSystemLoader:u.FileSystemLoader,NodeResolveLoader:u.NodeResolveLoader,PrecompiledLoader:u.PrecompiledLoader,WebLoader:u.WebLoader,compiler:d,parser:p,lexer:f,runtime:h,lib:o,nodes:m,installJinjaCompat:g,configure:v,reset:function(){r=void 0},compile:function(e,t,n,o){return r||v(),new s(e,t,n,o)},render:function(e,t,n){return r||v(),r.render(e,t,n)},renderString:function(e,t,n){return r||v(),r.renderString(e,t,n)},precompile:c?c.precompile:void 0,precompileString:c?c.precompileString:void 0}},function(e,t,n){var r=n(13),o=[],i=[],a=r.makeRequestCallFromTimer(function(){if(i.length)throw i.shift()});function s(e){var t;(t=o.length?o.pop():new l).task=e,r(t)}function l(){this.task=null}e.exports=s,l.prototype.call=function(){try{this.task.call()}catch(e){s.onerror?s.onerror(e):(i.push(e),a())}finally{this.task=null,o[o.length]=this}}},function(e,t,n){(function(t){function n(e){o.length||r(),o[o.length]=e}e.exports=n;var r,o=[],i=0;function a(){for(;i<o.length;){var e=i;if(i+=1,o[e].call(),i>1024){for(var t=0,n=o.length-i;t<n;t++)o[t]=o[t+i];o.length-=i,i=0}}o.length=0,i=0}var s=void 0!==t?t:self,l=s.MutationObserver||s.WebKitMutationObserver;function u(e){return function(){var t=setTimeout(r,0),n=setInterval(r,50);function r(){clearTimeout(t),clearInterval(n),e()}}}r="function"==typeof l?function(e){var t=1,n=new l(e),r=document.createTextNode("");return n.observe(r,{characterData:!0}),function(){t=-t,r.data=t}}(a):u(a),n.requestFlush=r,n.makeRequestCallFromTimer=u}).call(t,n(14))},function(e,t){var n;n=function(){return this}();try{n=n||Function("return this")()||(0,eval)("this")}catch(e){"object"==typeof window&&(n=window)}e.exports=n},function(e,t,n){var r,o,i,a,s;o=function(){var e=Array.prototype.slice.call(arguments);"function"==typeof e[0]&&e[0].apply(null,e.splice(1))},i=function(e){"function"==typeof setImmediate?setImmediate(e):void 0!==nl&&nl.nextTick?nl.nextTick(e):setTimeout(e,0)},a=Array.isArray||function(e){return"[object Array]"===Object.prototype.toString.call(e)},s=function(e,t,n){var r=n?i:o;if(t=t||function(){},!a(e)){var s=new Error("First argument to waterfall must be an array of functions");return t(s)}if(!e.length)return t();var l=function(e){return function(n){if(n)t.apply(null,arguments),t=function(){};else{var o=Array.prototype.slice.call(arguments,1),i=e.next();i?o.push(l(i)):o.push(t),r(function(){e.apply(null,o)})}}};l(function(e){var t=function(n){var r=function(){return e.length&&e[n].apply(null,arguments),r.next()};return r.next=function(){return n<e.length-1?t(n+1):null},r};return t(0)}(e))()},void 0===(r=function(){return s}.apply(t,[]))||(e.exports=r)},function(e,t,n){var r,o="object"==typeof Reflect?Reflect:null,i=o&&"function"==typeof o.apply?o.apply:function(e,t,n){return Function.prototype.apply.call(e,t,n)};r=o&&"function"==typeof o.ownKeys?o.ownKeys:Object.getOwnPropertySymbols?function(e){return Object.getOwnPropertyNames(e).concat(Object.getOwnPropertySymbols(e))}:function(e){return Object.getOwnPropertyNames(e)};var a=Number.isNaN||function(e){return e!=e};function s(){s.init.call(this)}e.exports=s,e.exports.once=function(e,t){return new Promise(function(n,r){function o(n){e.removeListener(t,i),r(n)}function i(){"function"==typeof e.removeListener&&e.removeListener("error",o),n([].slice.call(arguments))}v(e,t,i,{once:!0}),"error"!==t&&function(e,t,n){"function"==typeof e.on&&v(e,"error",t,n)}(e,o,{once:!0})})},s.EventEmitter=s,s.prototype._events=void 0,s.prototype._eventsCount=0,s.prototype._maxListeners=void 0;var l=10;function u(e){if("function"!=typeof e)throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof e)}function c(e){return void 0===e._maxListeners?s.defaultMaxListeners:e._maxListeners}function d(e,t,n,r){var o,i,a,s;if(u(n),void 0===(i=e._events)?(i=e._events=Object.create(null),e._eventsCount=0):(void 0!==i.newListener&&(e.emit("newListener",t,n.listener?n.listener:n),i=e._events),a=i[t]),void 0===a)a=i[t]=n,++e._eventsCount;else if("function"==typeof a?a=i[t]=r?[n,a]:[a,n]:r?a.unshift(n):a.push(n),(o=c(e))>0&&a.length>o&&!a.warned){a.warned=!0;var l=new Error("Possible EventEmitter memory leak detected. "+a.length+" "+String(t)+" listeners added. Use emitter.setMaxListeners() to increase limit");l.name="MaxListenersExceededWarning",l.emitter=e,l.type=t,l.count=a.length,s=l,console&&console.warn&&console.warn(s)}return e}function p(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,0===arguments.length?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function f(e,t,n){var r={fired:!1,wrapFn:void 0,target:e,type:t,listener:n},o=p.bind(r);return o.listener=n,r.wrapFn=o,o}function h(e,t,n){var r=e._events;if(void 0===r)return[];var o=r[t];return void 0===o?[]:"function"==typeof o?n?[o.listener||o]:[o]:n?function(e){for(var t=new Array(e.length),n=0;n<t.length;++n)t[n]=e[n].listener||e[n];return t}(o):g(o,o.length)}function m(e){var t=this._events;if(void 0!==t){var n=t[e];if("function"==typeof n)return 1;if(void 0!==n)return n.length}return 0}function g(e,t){for(var n=new Array(t),r=0;r<t;++r)n[r]=e[r];return n}function v(e,t,n,r){if("function"==typeof e.on)r.once?e.once(t,n):e.on(t,n);else{if("function"!=typeof e.addEventListener)throw new TypeError('The "emitter" argument must be of type EventEmitter. Received type '+typeof e);e.addEventListener(t,function o(i){r.once&&e.removeEventListener(t,o),n(i)})}}Object.defineProperty(s,"defaultMaxListeners",{enumerable:!0,get:function(){return l},set:function(e){if("number"!=typeof e||e<0||a(e))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+e+".");l=e}}),s.init=function(){void 0!==this._events&&this._events!==Object.getPrototypeOf(this)._events||(this._events=Object.create(null),this._eventsCount=0),this._maxListeners=this._maxListeners||void 0},s.prototype.setMaxListeners=function(e){if("number"!=typeof e||e<0||a(e))throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received '+e+".");return this._maxListeners=e,this},s.prototype.getMaxListeners=function(){return c(this)},s.prototype.emit=function(e){for(var t=[],n=1;n<arguments.length;n++)t.push(arguments[n]);var r="error"===e,o=this._events;if(void 0!==o)r=r&&void 0===o.error;else if(!r)return!1;if(r){var a;if(t.length>0&&(a=t[0]),a instanceof Error)throw a;var s=new Error("Unhandled error."+(a?" ("+a.message+")":""));throw s.context=a,s}var l=o[e];if(void 0===l)return!1;if("function"==typeof l)i(l,this,t);else{var u=l.length,c=g(l,u);for(n=0;n<u;++n)i(c[n],this,t)}return!0},s.prototype.addListener=function(e,t){return d(this,e,t,!1)},s.prototype.on=s.prototype.addListener,s.prototype.prependListener=function(e,t){return d(this,e,t,!0)},s.prototype.once=function(e,t){return u(t),this.on(e,f(this,e,t)),this},s.prototype.prependOnceListener=function(e,t){return u(t),this.prependListener(e,f(this,e,t)),this},s.prototype.removeListener=function(e,t){var n,r,o,i,a;if(u(t),void 0===(r=this._events))return this;if(void 0===(n=r[e]))return this;if(n===t||n.listener===t)0===--this._eventsCount?this._events=Object.create(null):(delete r[e],r.removeListener&&this.emit("removeListener",e,n.listener||t));else if("function"!=typeof n){for(o=-1,i=n.length-1;i>=0;i--)if(n[i]===t||n[i].listener===t){a=n[i].listener,o=i;break}if(o<0)return this;0===o?n.shift():function(e,t){for(;t+1<e.length;t++)e[t]=e[t+1];e.pop()}(n,o),1===n.length&&(r[e]=n[0]),void 0!==r.removeListener&&this.emit("removeListener",e,a||t)}return this},s.prototype.off=s.prototype.removeListener,s.prototype.removeAllListeners=function(e){var t,n,r;if(void 0===(n=this._events))return this;if(void 0===n.removeListener)return 0===arguments.length?(this._events=Object.create(null),this._eventsCount=0):void 0!==n[e]&&(0===--this._eventsCount?this._events=Object.create(null):delete n[e]),this;if(0===arguments.length){var o,i=Object.keys(n);for(r=0;r<i.length;++r)"removeListener"!==(o=i[r])&&this.removeAllListeners(o);return this.removeAllListeners("removeListener"),this._events=Object.create(null),this._eventsCount=0,this}if("function"==typeof(t=n[e]))this.removeListener(e,t);else if(void 0!==t)for(r=t.length-1;r>=0;r--)this.removeListener(e,t[r]);return this},s.prototype.listeners=function(e){return h(this,e,!0)},s.prototype.rawListeners=function(e){return h(this,e,!1)},s.listenerCount=function(e,t){return"function"==typeof e.listenerCount?e.listenerCount(t):m.call(e,t)},s.prototype.listenerCount=m,s.prototype.eventNames=function(){return this._eventsCount>0?r(this._events):[]}},function(e,t,n){var r=n(3),o=n(0),i=0;function a(){return"hole_"+i++}function s(e,t){for(var n=null,r=0;r<e.length;r++){var o=t(e[r]);o!==e[r]&&(n||(n=e.slice()),n[r]=o)}return n||e}function l(e,t,n){if(!(e instanceof r.Node))return e;if(!n){var o=t(e);if(o&&o!==e)return o}if(e instanceof r.NodeList){var i=s(e.children,function(e){return l(e,t,n)});i!==e.children&&(e=new r[e.typename](e.lineno,e.colno,i))}else if(e instanceof r.CallExtension){var a=l(e.args,t,n),u=s(e.contentArgs,function(e){return l(e,t,n)});a===e.args&&u===e.contentArgs||(e=new r[e.typename](e.extName,e.prop,a,u))}else{var c=e.fields.map(function(t){return e[t]}),d=s(c,function(e){return l(e,t,n)});d!==c&&(e=new r[e.typename](e.lineno,e.colno),d.forEach(function(t,n){e[e.fields[n]]=t}))}return n&&t(e)||e}function u(e,t){return l(e,t,!0)}function c(e,t,n){var i=[],s=u(n?e[n]:e,function(e){var n;return e instanceof r.Block?e:((e instanceof r.Filter&&-1!==o.indexOf(t,e.name.value)||e instanceof r.CallExtensionAsync)&&(n=new r.Symbol(e.lineno,e.colno,a()),i.push(new r.FilterAsync(e.lineno,e.colno,e.name,e.args,n))),n)});return n?e[n]=s:e=s,i.length?(i.push(e),new r.NodeList(e.lineno,e.colno,i)):e}function d(e,t){return function(e){return u(e,function(e){if(e instanceof r.If||e instanceof r.For){var t=!1;if(l(e,function(e){if(e instanceof r.FilterAsync||e instanceof r.IfAsync||e instanceof r.AsyncEach||e instanceof r.AsyncAll||e instanceof r.CallExtensionAsync)return t=!0,e}),t){if(e instanceof r.If)return new r.IfAsync(e.lineno,e.colno,e.cond,e.body,e.else_);if(e instanceof r.For&&!(e instanceof r.AsyncAll))return new r.AsyncEach(e.lineno,e.colno,e.arr,e.name,e.body,e.else_)}}})}(function(e){return l(e,function(e){if(e instanceof r.Block){var t=!1,n=a();e.body=l(e.body,function(e){if(e instanceof r.FunCall&&"super"===e.name.value)return t=!0,new r.Symbol(e.lineno,e.colno,n)}),t&&e.body.children.unshift(new r.Super(0,0,e.name,new r.Symbol(0,0,n)))}})}(function(e,t){return u(e,function(e){return e instanceof r.Output?c(e,t):e instanceof r.Set?c(e,t,"value"):e instanceof r.For?c(e,t,"arr"):e instanceof r.If?c(e,t,"cond"):e instanceof r.CallExtension?c(e,t,"args"):void 0})}(e,t)))}e.exports={transform:function(e,t){return d(e,t||[])}}},function(e,t,n){var r=n(0),o=n(2);function i(e,t){return null==e||!1===e?t:e}function a(e){return e!=e}function s(e){var t=(e=i(e,"")).toLowerCase();return o.copySafeness(e,t.charAt(0).toUpperCase()+t.slice(1))}function l(e){if(r.isString(e))return e.split("");if(r.isObject(e))return r._entries(e||{}).map(function(e){return{key:e[0],value:e[1]}});if(r.isArray(e))return e;throw new r.TemplateError("list filter: type not iterable")}function u(e){return function(t,n,o){void 0===n&&(n="truthy");var i=this,a=i.env.getTest(n);return r.toArray(t).filter(function(t){return a.call(i,t,o)===e})}}function c(e){return o.copySafeness(e,e.replace(/^\s*|\s*$/g,""))}(t=e.exports={}).abs=Math.abs,t.batch=function(e,t,n){var r,o=[],i=[];for(r=0;r<e.length;r++)r%t===0&&i.length&&(o.push(i),i=[]),i.push(e[r]);if(i.length){if(n)for(r=i.length;r<t;r++)i.push(n);o.push(i)}return o},t.capitalize=s,t.center=function(e,t){if(t=t||80,(e=i(e,"")).length>=t)return e;var n=t-e.length,a=r.repeat(" ",n/2-n%2),s=r.repeat(" ",n/2);return o.copySafeness(e,a+e+s)},t.default=function(e,t,n){return n?e||t:void 0!==e?e:t},t.dictsort=function(e,t,n){if(!r.isObject(e))throw new r.TemplateError("dictsort filter: val must be an object");var o,i=[];for(var a in e)i.push([a,e[a]]);if(void 0===n||"key"===n)o=0;else{if("value"!==n)throw new r.TemplateError("dictsort filter: You can only sort by either key or value");o=1}return i.sort(function(e,n){var i=e[o],a=n[o];return t||(r.isString(i)&&(i=i.toUpperCase()),r.isString(a)&&(a=a.toUpperCase())),i>a?1:i===a?0:-1}),i},t.dump=function(e,t){return JSON.stringify(e,null,t)},t.escape=function(e){return e instanceof o.SafeString?e:(e=null==e?"":e,o.markSafe(r.escape(e.toString())))},t.safe=function(e){return e instanceof o.SafeString?e:(e=null==e?"":e,o.markSafe(e.toString()))},t.first=function(e){return e[0]},t.forceescape=function(e){return e=null==e?"":e,o.markSafe(r.escape(e.toString()))},t.groupby=function(e,t){return r.groupBy(e,t,this.env.opts.throwOnUndefined)},t.indent=function(e,t,n){if(""===(e=i(e,"")))return"";t=t||4;var a=e.split("\n"),s=r.repeat(" ",t),l=a.map(function(e,t){return 0!==t||n?""+s+e:e}).join("\n");return o.copySafeness(e,l)},t.join=function(e,t,n){return t=t||"",n&&(e=r.map(e,function(e){return e[n]})),e.join(t)},t.last=function(e){return e[e.length-1]},t.length=function(e){var t=i(e,"");return void 0!==t?"function"==typeof Map&&t instanceof Map||"function"==typeof Set&&t instanceof Set?t.size:!r.isObject(t)||t instanceof o.SafeString?t.length:r.keys(t).length:0},t.list=l,t.lower=function(e){return(e=i(e,"")).toLowerCase()},t.nl2br=function(e){return null==e?"":o.copySafeness(e,e.replace(/\r\n|\n/g,"<br />\n"))},t.random=function(e){return e[Math.floor(Math.random()*e.length)]},t.reject=u(!1),t.rejectattr=function(e,t){return e.filter(function(e){return!e[t]})},t.select=u(!0),t.selectattr=function(e,t){return e.filter(function(e){return!!e[t]})},t.replace=function(e,t,n,r){var i=e;if(t instanceof RegExp)return e.replace(t,n);void 0===r&&(r=-1);var a="";if("number"==typeof t)t=""+t;else if("string"!=typeof t)return e;if("number"==typeof e&&(e=""+e),"string"!=typeof e&&!(e instanceof o.SafeString))return e;if(""===t)return a=n+e.split("").join(n)+n,o.copySafeness(e,a);var s=e.indexOf(t);if(0===r||-1===s)return e;for(var l=0,u=0;s>-1&&(-1===r||u<r);)a+=e.substring(l,s)+n,l=s+t.length,u++,s=e.indexOf(t,l);return l<e.length&&(a+=e.substring(l)),o.copySafeness(i,a)},t.reverse=function(e){var t;return(t=r.isString(e)?l(e):r.map(e,function(e){return e})).reverse(),r.isString(e)?o.copySafeness(e,t.join("")):t},t.round=function(e,t,n){t=t||0;var r=Math.pow(10,t);return("ceil"===n?Math.ceil:"floor"===n?Math.floor:Math.round)(e*r)/r},t.slice=function(e,t,n){for(var r=Math.floor(e.length/t),o=e.length%t,i=[],a=0,s=0;s<t;s++){var l=a+s*r;s<o&&a++;var u=a+(s+1)*r,c=e.slice(l,u);n&&s>=o&&c.push(n),i.push(c)}return i},t.sum=function(e,t,n){return void 0===n&&(n=0),t&&(e=r.map(e,function(e){return e[t]})),n+e.reduce(function(e,t){return e+t},0)},t.sort=o.makeMacro(["value","reverse","case_sensitive","attribute"],[],function(e,t,n,o){var i=this,a=r.map(e,function(e){return e}),s=r.getAttrGetter(o);return a.sort(function(e,a){var l=o?s(e):e,u=o?s(a):a;if(i.env.opts.throwOnUndefined&&o&&(void 0===l||void 0===u))throw new TypeError('sort: attribute "'+o+'" resolved to undefined');return!n&&r.isString(l)&&r.isString(u)&&(l=l.toLowerCase(),u=u.toLowerCase()),l<u?t?1:-1:l>u?t?-1:1:0}),a}),t.string=function(e){return o.copySafeness(e,e)},t.striptags=function(e,t){var n=c((e=i(e,"")).replace(/<\/?([a-z][a-z0-9]*)\b[^>]*>|<!--[\s\S]*?-->/gi,"")),r="";return r=t?n.replace(/^ +| +$/gm,"").replace(/ +/g," ").replace(/(\r\n)/g,"\n").replace(/\n\n\n+/g,"\n\n"):n.replace(/\s+/gi," "),o.copySafeness(e,r)},t.title=function(e){var t=(e=i(e,"")).split(" ").map(function(e){return s(e)});return o.copySafeness(e,t.join(" "))},t.trim=c,t.truncate=function(e,t,n,r){var a=e;if(t=t||255,(e=i(e,"")).length<=t)return e;if(n)e=e.substring(0,t);else{var s=e.lastIndexOf(" ",t);-1===s&&(s=t),e=e.substring(0,s)}return e+=null!=r?r:"...",o.copySafeness(a,e)},t.upper=function(e){return(e=i(e,"")).toUpperCase()},t.urlencode=function(e){var t=encodeURIComponent;return r.isString(e)?t(e):(r.isArray(e)?e:r._entries(e)).map(function(e){var n=e[0],r=e[1];return t(n)+"="+t(r)}).join("&")};var d=/^(?:\(|<|&lt;)?(.*?)(?:\.|,|\)|\n|&gt;)?$/,p=/^[\w.!#$%&'*+\-\/=?\^`{|}~]+@[a-z\d\-]+(\.[a-z\d\-]+)+$/i,f=/^https?:\/\/.*$/,h=/^www\./,m=/\.(?:org|net|com)(?:\:|\/|$)/;t.urlize=function(e,t,n){a(t)&&(t=1/0);var r=!0===n?' rel="nofollow"':"";return e.split(/(\s+)/).filter(function(e){return e&&e.length}).map(function(e){var n=e.match(d),o=n?n[1]:e,i=o.substr(0,t);return f.test(o)?'<a href="'+o+'"'+r+">"+i+"</a>":h.test(o)?'<a href="http://'+o+'"'+r+">"+i+"</a>":p.test(o)?'<a href="mailto:'+o+'">'+o+"</a>":m.test(o)?'<a href="http://'+o+'"'+r+">"+i+"</a>":e}).join("")},t.wordcount=function(e){var t=(e=i(e,""))?e.match(/\w+/g):null;return t?t.length:null},t.float=function(e,t){var n=parseFloat(e);return a(n)?t:n};var g=o.makeMacro(["value","default","base"],[],function(e,t,n){void 0===n&&(n=10);var r=parseInt(e,n);return a(r)?t:r});t.int=g,t.d=t.default,t.e=t.escape},function(e,t,n){function r(e,t){return r=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},r(e,t)}var o=function(e){var t,n;function o(t){var n;return(n=e.call(this)||this).precompiled=t||{},n}return n=e,(t=o).prototype=Object.create(n.prototype),t.prototype.constructor=t,r(t,n),o.prototype.getSource=function(e){return this.precompiled[e]?{src:{type:"code",obj:this.precompiled[e]},path:e}:null},o}(n(6));e.exports={PrecompiledLoader:o}},function(e,t,n){var r=n(2).SafeString;t.callable=function(e){return"function"==typeof e},t.defined=function(e){return void 0!==e},t.divisibleby=function(e,t){return e%t===0},t.escaped=function(e){return e instanceof r},t.equalto=function(e,t){return e===t},t.eq=t.equalto,t.sameas=t.equalto,t.even=function(e){return e%2==0},t.falsy=function(e){return!e},t.ge=function(e,t){return e>=t},t.greaterthan=function(e,t){return e>t},t.gt=t.greaterthan,t.le=function(e,t){return e<=t},t.lessthan=function(e,t){return e<t},t.lt=t.lessthan,t.lower=function(e){return e.toLowerCase()===e},t.ne=function(e,t){return e!==t},t.null=function(e){return null===e},t.number=function(e){return"number"==typeof e},t.odd=function(e){return e%2==1},t.string=function(e){return"string"==typeof e},t.truthy=function(e){return!!e},t.undefined=function(e){return void 0===e},t.upper=function(e){return e.toUpperCase()===e},t.iterable=function(e){return"undefined"!=typeof Symbol?!!e[Symbol.iterator]:Array.isArray(e)||"string"==typeof e},t.mapping=function(e){var t=null!=e&&"object"==typeof e&&!Array.isArray(e);return Set?t&&!(e instanceof Set):t}},function(e,t,n){e.exports=function(){return{range:function(e,t,n){void 0===t?(t=e,e=0,n=1):n||(n=1);var r=[];if(n>0)for(var o=e;o<t;o+=n)r.push(o);else for(var i=e;i>t;i+=n)r.push(i);return r},cycler:function(){return function(e){var t=-1;return{current:null,reset:function(){t=-1,this.current=null},next:function(){return++t>=e.length&&(t=0),this.current=e[t],this.current}}}(Array.prototype.slice.call(arguments))},joiner:function(e){return function(e){e=e||",";var t=!0;return function(){var n=t?"":e;return t=!1,n}}(e)}}}},function(e,t,n){var r=n(4);e.exports=function(e,t){function n(e,t){if(this.name=e,this.path=e,this.defaultEngine=t.defaultEngine,this.ext=r.extname(e),!this.ext&&!this.defaultEngine)throw new Error("No default engine was specified and no extension was provided.");this.ext||(this.name+=this.ext=("."!==this.defaultEngine[0]?".":"")+this.defaultEngine)}return n.prototype.render=function(t,n){e.render(this.name,t,n)},t.set("view",n),t.set("nunjucksEnv",e),e}},function(e,t,n){var r=n(4),o=n(4),i=n(0)._prettifyError,a=n(5),s=n(7).Environment,l=n(24);function u(e,t){return!!Array.isArray(t)&&t.some(function(t){return e.match(t)})}function c(e,t){(t=t||{}).isString=!0;var n=t.env||new s([]),r=t.wrapper||l;if(!t.name)throw new Error('the "name" option is required when compiling a string');return r([d(e,t.name,n)],t)}function d(e,t,n){var r,o=(n=n||new s([])).asyncFilters,l=n.extensionsList;t=t.replace(/\\/g,"/");try{r=a.compile(e,o,l,t,n.opts)}catch(e){throw i(t,!1,e)}return{name:t,template:r}}e.exports={precompile:function(e,t){var n=(t=t||{}).env||new s([]),i=t.wrapper||l;if(t.isString)return c(e,t);var a=r.existsSync(e)&&r.statSync(e),p=[],f=[];if(a.isFile())p.push(d(r.readFileSync(e,"utf-8"),t.name||e,n));else if(a.isDirectory()){!function n(i){r.readdirSync(i).forEach(function(a){var s=o.join(i,a),l=s.substr(o.join(e,"/").length),c=r.statSync(s);c&&c.isDirectory()?u(l+="/",t.exclude)||n(s):u(l,t.include)&&f.push(s)})}(e);for(var h=0;h<f.length;h++){var m=f[h].replace(o.join(e,"/"),"");try{p.push(d(r.readFileSync(f[h],"utf-8"),m,n))}catch(e){if(!t.force)throw e;console.error(e)}}}return i(p,t)},precompileString:c}},function(e,t,n){e.exports=function(e,t){var n="";t=t||{};for(var r=0;r<e.length;r++){var o=JSON.stringify(e[r].name);n+="(function() {(window.nunjucksPrecompiled = window.nunjucksPrecompiled || {})["+o+"] = (function() {\n"+e[r].template+"\n})();\n",t.asFunction&&(n+="return function(ctx, cb) { return nunjucks.render("+o+", ctx, cb); }\n"),n+="})();\n"}return n}},function(e,t,n){e.exports=function(){var e,t,n=this.runtime,r=this.lib,o=this.compiler.Compiler,i=this.parser.Parser,a=this.nodes,s=this.lexer,l=n.contextOrFrameLookup,u=n.memberLookup;function c(e){return{index:e.index,lineno:e.lineno,colno:e.colno}}if(o&&(e=o.prototype.assertType),i&&(t=i.prototype.parseAggregate),n.contextOrFrameLookup=function(e,t,n){var r=l.apply(this,arguments);if(void 0!==r)return r;switch(n){case"True":return!0;case"False":return!1;case"None":return null;default:return}},a&&o&&i){var d=a.Node.extend("Slice",{fields:["start","stop","step"],init:function(e,t,n,r,o){n=n||new a.Literal(e,t,null),r=r||new a.Literal(e,t,null),o=o||new a.Literal(e,t,1),this.parent(e,t,n,r,o)}});o.prototype.assertType=function(t){t instanceof d||e.apply(this,arguments)},o.prototype.compileSlice=function(e,t){this._emit("("),this._compileExpression(e.start,t),this._emit("),("),this._compileExpression(e.stop,t),this._emit("),("),this._compileExpression(e.step,t),this._emit(")")},i.prototype.parseAggregate=function(){var e=this,n=c(this.tokens);n.colno--,n.index--;try{return t.apply(this)}catch(t){var o=c(this.tokens),i=function(){return r._assign(e.tokens,o),t};r._assign(this.tokens,n),this.peeked=!1;var l=this.peekToken();if(l.type!==s.TOKEN_LEFT_BRACKET)throw i();this.nextToken();for(var u=new d(l.lineno,l.colno),p=!1,f=0;f<=u.fields.length&&!this.skip(s.TOKEN_RIGHT_BRACKET);f++){if(f===u.fields.length){if(!p)break;this.fail("parseSlice: too many slice components",l.lineno,l.colno)}this.skip(s.TOKEN_COLON)?p=!0:(u[u.fields[f]]=this.parseExpression(),p=this.skip(s.TOKEN_COLON)||p)}if(!p)throw i();return new a.Array(l.lineno,l.colno,[u])}}}function p(e,t,r,o){e=e||[],null===t&&(t=o<0?e.length-1:0),null===r?r=o<0?-1:e.length:r<0&&(r+=e.length),t<0&&(t+=e.length);for(var i=[],a=t;!(a<0||a>e.length||o>0&&a>=r||o<0&&a<=r);a+=o)i.push(n.memberLookup(e,a));return i}function f(e,t){return Object.prototype.hasOwnProperty.call(e,t)}var h={pop:function(e){if(void 0===e)return this.pop();if(e>=this.length||e<0)throw new Error("KeyError");return this.splice(e,1)},append:function(e){return this.push(e)},remove:function(e){for(var t=0;t<this.length;t++)if(this[t]===e)return this.splice(t,1);throw new Error("ValueError")},count:function(e){for(var t=0,n=0;n<this.length;n++)this[n]===e&&t++;return t},index:function(e){var t;if(-1===(t=this.indexOf(e)))throw new Error("ValueError");return t},find:function(e){return this.indexOf(e)},insert:function(e,t){return this.splice(e,0,t)}},m={items:function(){return r._entries(this)},values:function(){return r._values(this)},keys:function(){return r.keys(this)},get:function(e,t){var n=this[e];return void 0===n&&(n=t),n},has_key:function(e){return f(this,e)},pop:function(e,t){var n=this[e];if(void 0===n&&void 0!==t)n=t;else{if(void 0===n)throw new Error("KeyError");delete this[e]}return n},popitem:function(){var e=r.keys(this);if(!e.length)throw new Error("KeyError");var t=e[0],n=this[t];return delete this[t],[t,n]},setdefault:function(e,t){return void 0===t&&(t=null),e in this||(this[e]=t),this[e]},update:function(e){return r._assign(this,e),null}};return m.iteritems=m.items,m.itervalues=m.values,m.iterkeys=m.keys,n.memberLookup=function(e,t,n){return 4===arguments.length?p.apply(this,arguments):(e=e||{},r.isArray(e)&&f(h,t)?h[t].bind(e):r.isObject(e)&&f(m,t)?m[t].bind(e):u.apply(this,arguments))},function(){n.contextOrFrameLookup=l,n.memberLookup=u,o&&(o.prototype.assertType=e),i&&(i.prototype.parseAggregate=t)}}}])},e.exports=t()}(rl)),rl.exports),il=t(ol);const al={GoogleChart:function({chart:e,source:t,view:n,report:r,schema:o,dashboard:i,query:a}){const[s,c]=u.useState([]),d=Os(),[p,f]=u.useState([]);l.useEffect(()=>{(async()=>{const e=await Cs.getDateRanges();f(e)})()},[]);const h=l.useMemo(()=>{const e="YYYY-MM-dd",t=a?.date_range?.name,n=p.find(e=>e.name===t);if(!n)return e;return Ts[n?.granularity]||e},[p,a]);return u.useEffect(()=>{if(!(e&&n&&t&&r&&o))return;let i=[];i.push(function(e,t){const n=[...t.doc.metrics,...t.doc.dimensions],r=e.columns.reduce((e,t)=>{const r=n.find(e=>e.name===t.name)||t;return e.push(r.title||r.name),e},[]);return r}(n,o));const a=Jo(n,o);t?.forEach(e=>{const t=a(e);i.push(t)}),t?.length?c(i):c()},[e,t,n,r,o]),s?u.createElement("div",{style:{}},u.createElement(Ko,ko({width:e?.doc.size?.width||"100%",chartType:e?.doc.chart?.type,data:s,options:(t=>{if("Table"===e?.doc.chart?.type)return{...e?.doc.chart?.options,cssClassNames:d};if("AreaChart"===e?.doc.chart?.type){const n=e?.doc.chart?.options?.hAxis||{},r={...{ticks:t.slice(1).map(e=>e[0]),format:h},...n};return{...e?.doc.chart?.options,hAxis:r,focusTarget:"category"}}return e?.doc.chart?.options})(s)},e?.doc.chart?.props))):u.createElement("div",null)},LabelChart:function({chart:e,source:t,view:n,report:r,schema:o}){const[i,a]=u.useState([]),[s,l]=u.useState(),[c,d]=u.useState();return u.useEffect(()=>{if(!(e&&n&&t&&r&&o))return;let i=[];const s=Jo(n,o);t.forEach(e=>i.push(s(e))),a(i);const u=e?.doc?.chart?.options||{},c=u?.index||0;if(i.length>0&&l(i[0][c]),u.subText?.format){il.configure({autoescape:!1});const e=Jo(n,o,"object")(t[0]),r=il.renderString(u.subText?.format,e);d(r)}},[e,t,n,r,o]),u.createElement("div",{style:{display:"flex",justifyContent:"center",alignContent:"center",height:"100%",flexDirection:"column"}},u.createElement(Ps,{variant:"h6"},s?.f||s),u.createElement(Ps,{variant:"caption"},c))}};function sl(e,t){return void 0!==al[e]?u.createElement(al[e],t):u.createElement(Ro,t)}function ll(e){return null!=e&&!(Array.isArray(e)&&0===e.length)}function ul(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return e&&(ll(e.value)&&""!==e.value||t&&ll(e.defaultValue)&&""!==e.defaultValue)}function cl(e,t){return l.isValidElement(e)&&-1!==t.indexOf(e.type.muiName)}var dl=l.createContext();var pl=l.forwardRef(function(e,t){var n=e.children,r=e.classes,o=e.className,i=e.color,a=void 0===i?"primary":i,s=e.component,u=void 0===s?"div":s,c=e.disabled,d=void 0!==c&&c,h=e.error,g=void 0!==h&&h,v=e.fullWidth,y=void 0!==v&&v,b=e.focused,w=e.hiddenLabel,x=void 0!==w&&w,k=e.margin,S=void 0===k?"none":k,E=e.required,C=void 0!==E&&E,O=e.size,T=e.variant,_=void 0===T?"standard":T,R=p(e,["children","classes","className","color","component","disabled","error","fullWidth","focused","hiddenLabel","margin","required","size","variant"]),P=l.useState(function(){var e=!1;return n&&l.Children.forEach(n,function(t){if(cl(t,["Input","Select"])){var n=cl(t,["Select"])?t.props.input:t;n&&n.props.startAdornment&&(e=!0)}}),e}),A=P[0],L=P[1],N=l.useState(function(){var e=!1;return n&&l.Children.forEach(n,function(t){cl(t,["Input","Select"])&&ul(t.props,!0)&&(e=!0)}),e}),M=N[0],I=N[1],F=l.useState(!1),$=F[0],j=F[1],z=void 0!==b?b:$;d&&z&&j(!1);var B=l.useCallback(function(){I(!0)},[]),D={adornedStart:A,setAdornedStart:L,color:a,disabled:d,error:g,filled:M,focused:z,fullWidth:y,hiddenLabel:x,margin:("small"===O?"dense":void 0)||S,onBlur:function(){j(!1)},onEmpty:l.useCallback(function(){I(!1)},[]),onFilled:B,onFocus:function(){j(!0)},registerEffect:undefined,required:C,variant:_};return l.createElement(dl.Provider,{value:D},l.createElement(u,f({className:m(r.root,o,"none"!==S&&r["margin".concat(Co(S))],y&&r.fullWidth),ref:t},R),n))}),fl=bo({root:{display:"inline-flex",flexDirection:"column",position:"relative",minWidth:0,padding:0,margin:0,border:0,verticalAlign:"top"},marginNormal:{marginTop:16,marginBottom:8},marginDense:{marginTop:8,marginBottom:4},fullWidth:{width:"100%"}},{name:"MuiFormControl"})(pl);function hl(){return l.useContext(dl)}function ml(e){return e&&e.ownerDocument||document}var gl,vl,yl,bl,wl={exports:{}},xl={},kl={exports:{}},Sl={};function El(){return vl||(vl=1,kl.exports=(gl||(gl=1,function(e){function t(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 n(e){return 0===e.length?null:e[0]}function r(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],u=s+1,c=e[u];if(0>o(l,n))u<i&&0>o(c,l)?(e[r]=c,e[u]=n,r=u):(e[r]=l,e[s]=n,r=s);else{if(!(u<i&&0>o(c,n)))break e;e[r]=c,e[u]=n,r=u}}}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 i=performance;e.unstable_now=function(){return i.now()}}else{var a=Date,s=a.now();e.unstable_now=function(){return a.now()-s}}var l=[],u=[],c=1,d=null,p=3,f=!1,h=!1,m=!1,g="function"==typeof setTimeout?setTimeout:null,v="function"==typeof clearTimeout?clearTimeout:null,y="undefined"!=typeof setImmediate?setImmediate:null;function b(e){for(var o=n(u);null!==o;){if(null===o.callback)r(u);else{if(!(o.startTime<=e))break;r(u),o.sortIndex=o.expirationTime,t(l,o)}o=n(u)}}function w(e){if(m=!1,b(e),!h)if(null!==n(l))h=!0,L(x);else{var t=n(u);null!==t&&N(w,t.startTime-e)}}function x(t,o){h=!1,m&&(m=!1,v(C),C=-1),f=!0;var i=p;try{for(b(o),d=n(l);null!==d&&(!(d.expirationTime>o)||t&&!_());){var a=d.callback;if("function"==typeof a){d.callback=null,p=d.priorityLevel;var s=a(d.expirationTime<=o);o=e.unstable_now(),"function"==typeof s?d.callback=s:d===n(l)&&r(l),b(o)}else r(l);d=n(l)}if(null!==d)var c=!0;else{var g=n(u);null!==g&&N(w,g.startTime-o),c=!1}return c}finally{d=null,p=i,f=!1}}"undefined"!=typeof navigator&&void 0!==navigator.scheduling&&void 0!==navigator.scheduling.isInputPending&&navigator.scheduling.isInputPending.bind(navigator.scheduling);var k,S=!1,E=null,C=-1,O=5,T=-1;function _(){return!(e.unstable_now()-T<O)}function R(){if(null!==E){var t=e.unstable_now();T=t;var n=!0;try{n=E(!0,t)}finally{n?k():(S=!1,E=null)}}else S=!1}if("function"==typeof y)k=function(){y(R)};else if("undefined"!=typeof MessageChannel){var P=new MessageChannel,A=P.port2;P.port1.onmessage=R,k=function(){A.postMessage(null)}}else k=function(){g(R,0)};function L(e){E=e,S||(S=!0,k())}function N(t,n){C=g(function(){t(e.unstable_now())},n)}e.unstable_IdlePriority=5,e.unstable_ImmediatePriority=1,e.unstable_LowPriority=4,e.unstable_NormalPriority=3,e.unstable_Profiling=null,e.unstable_UserBlockingPriority=2,e.unstable_cancelCallback=function(e){e.callback=null},e.unstable_continueExecution=function(){h||f||(h=!0,L(x))},e.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"):O=0<e?Math.floor(1e3/e):5},e.unstable_getCurrentPriorityLevel=function(){return p},e.unstable_getFirstCallbackNode=function(){return n(l)},e.unstable_next=function(e){switch(p){case 1:case 2:case 3:var t=3;break;default:t=p}var n=p;p=t;try{return e()}finally{p=n}},e.unstable_pauseExecution=function(){},e.unstable_requestPaint=function(){},e.unstable_runWithPriority=function(e,t){switch(e){case 1:case 2:case 3:case 4:case 5:break;default:e=3}var n=p;p=e;try{return t()}finally{p=n}},e.unstable_scheduleCallback=function(r,o,i){var a=e.unstable_now();switch(i="object"==typeof i&&null!==i&&"number"==typeof(i=i.delay)&&0<i?a+i:a,r){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 r={id:c++,callback:o,priorityLevel:r,startTime:i,expirationTime:s=i+s,sortIndex:-1},i>a?(r.sortIndex=i,t(u,r),null===n(l)&&r===n(u)&&(m?(v(C),C=-1):m=!0,N(w,i-a))):(r.sortIndex=s,t(l,r),h||f||(h=!0,L(x))),r},e.unstable_shouldYield=_,e.unstable_wrapCallback=function(e){var t=p;return function(){var n=p;p=t;try{return e.apply(this,arguments)}finally{p=n}}}}(Sl)),Sl)),kl.exports}
16
16
  /**
17
17
  * @license React
18
18
  * react-dom.production.min.js
@@ -128,4 +128,4 @@ var _BYGD_NC_REPORT_UI=function(){"use strict";function e(e,t){return t.forEach(
128
128
  animation: ${hv} 1.4s linear infinite;
129
129
  `:null,vv="string"!=typeof mv?Xp`
130
130
  animation: ${mv} 1.4s ease-in-out infinite;
131
- `:null,yv=mg("span",{name:"MuiCircularProgress",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[n.variant],t[`color${Mf(n.color)}`]]}})(wg(({theme:e})=>({display:"inline-block",variants:[{props:{variant:"determinate"},style:{transition:e.transitions.create("transform")}},{props:{variant:"indeterminate"},style:gv||{animation:`${hv} 1.4s linear infinite`}},...Object.entries(e.palette).filter(dv()).map(([t])=>({props:{color:t},style:{color:(e.vars||e).palette[t].main}}))]}))),bv=mg("svg",{name:"MuiCircularProgress",slot:"Svg"})({display:"block"}),wv=mg("circle",{name:"MuiCircularProgress",slot:"Circle",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.circle,t[`circle${Mf(n.variant)}`],n.disableShrink&&t.circleDisableShrink]}})(wg(({theme:e})=>({stroke:"currentColor",variants:[{props:{variant:"determinate"},style:{transition:e.transitions.create("stroke-dashoffset")}},{props:{variant:"indeterminate"},style:{strokeDasharray:"80px, 200px",strokeDashoffset:0}},{props:({ownerState:e})=>"indeterminate"===e.variant&&!e.disableShrink,style:vv||{animation:`${mv} 1.4s ease-in-out infinite`}}]}))),xv=mg("circle",{name:"MuiCircularProgress",slot:"Track"})(wg(({theme:e})=>({stroke:"currentColor",opacity:(e.vars||e).palette.action.activatedOpacity}))),kv=l.forwardRef(function(e,t){const n=xg({props:e,name:"MuiCircularProgress"}),{className:r,color:o="primary",disableShrink:i=!1,enableTrackSlot:a=!1,size:s=40,style:l,thickness:u=3.6,value:c=0,variant:d="indeterminate",...p}=n,f={...n,color:o,disableShrink:i,size:s,thickness:u,value:c,variant:d,enableTrackSlot:a},h=(e=>{const{classes:t,variant:n,color:r,disableShrink:o}=e;return Cm({root:["root",n,`color${Mf(r)}`],svg:["svg"],track:["track"],circle:["circle",`circle${Mf(n)}`,o&&"circleDisableShrink"]},pv,t)})(f),m={},g={},v={};if("determinate"===d){const e=2*Math.PI*((fv-u)/2);m.strokeDasharray=e.toFixed(3),v["aria-valuenow"]=Math.round(c),m.strokeDashoffset=`${((100-c)/100*e).toFixed(3)}px`,g.transform="rotate(-90deg)"}return cf.jsx(yv,{className:yg(h.root,r),style:{width:s,height:s,...g,...l},ownerState:f,ref:t,role:"progressbar",...v,...p,children:cf.jsxs(bv,{className:h.svg,ownerState:f,viewBox:"22 22 44 44",children:[a?cf.jsx(xv,{className:h.track,ownerState:f,cx:fv,cy:fv,r:(fv-u)/2,fill:"none",strokeWidth:u,"aria-hidden":"true"}):null,cf.jsx(wv,{className:h.circle,style:m,ownerState:f,cx:fv,cy:fv,r:(fv-u)/2,fill:"none",strokeWidth:u})]})})});function Sv(e){return Bh("MuiIconButton",e)}const Ev=Dh("MuiIconButton",["root","disabled","colorInherit","colorPrimary","colorSecondary","colorError","colorInfo","colorSuccess","colorWarning","edgeStart","edgeEnd","sizeSmall","sizeMedium","sizeLarge","loading","loadingIndicator","loadingWrapper"]),Cv=mg(uv,{name:"MuiIconButton",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.loading&&t.loading,"default"!==n.color&&t[`color${Mf(n.color)}`],n.edge&&t[`edge${Mf(n.edge)}`],t[`size${Mf(n.size)}`]]}})(wg(({theme:e})=>({textAlign:"center",flex:"0 0 auto",fontSize:e.typography.pxToRem(24),padding:8,borderRadius:"50%",color:(e.vars||e).palette.action.active,transition:e.transitions.create("background-color",{duration:e.transitions.duration.shortest}),variants:[{props:e=>!e.disableRipple,style:{"--IconButton-hoverBg":e.alpha((e.vars||e).palette.action.active,(e.vars||e).palette.action.hoverOpacity),"&:hover":{backgroundColor:"var(--IconButton-hoverBg)","@media (hover: none)":{backgroundColor:"transparent"}}}},{props:{edge:"start"},style:{marginLeft:-12}},{props:{edge:"start",size:"small"},style:{marginLeft:-3}},{props:{edge:"end"},style:{marginRight:-12}},{props:{edge:"end",size:"small"},style:{marginRight:-3}}]})),wg(({theme:e})=>({variants:[{props:{color:"inherit"},style:{color:"inherit"}},...Object.entries(e.palette).filter(dv()).map(([t])=>({props:{color:t},style:{color:(e.vars||e).palette[t].main}})),...Object.entries(e.palette).filter(dv()).map(([t])=>({props:{color:t},style:{"--IconButton-hoverBg":e.alpha((e.vars||e).palette[t].main,(e.vars||e).palette.action.hoverOpacity)}})),{props:{size:"small"},style:{padding:5,fontSize:e.typography.pxToRem(18)}},{props:{size:"large"},style:{padding:12,fontSize:e.typography.pxToRem(28)}}],[`&.${Ev.disabled}`]:{backgroundColor:"transparent",color:(e.vars||e).palette.action.disabled},[`&.${Ev.loading}`]:{color:"transparent"}}))),Ov=mg("span",{name:"MuiIconButton",slot:"LoadingIndicator"})(({theme:e})=>({display:"none",position:"absolute",visibility:"visible",top:"50%",left:"50%",transform:"translate(-50%, -50%)",color:(e.vars||e).palette.action.disabled,variants:[{props:{loading:!0},style:{display:"flex"}}]})),Tv=l.forwardRef(function(e,t){const n=xg({props:e,name:"MuiIconButton"}),{edge:r=!1,children:o,className:i,color:a="default",disabled:s=!1,disableFocusRipple:l=!1,size:u="medium",id:c,loading:d=null,loadingIndicator:p,...f}=n,h=wm(c),m=p??cf.jsx(kv,{"aria-labelledby":h,color:"inherit",size:16}),g={...n,edge:r,color:a,disabled:s,disableFocusRipple:l,loading:d,loadingIndicator:m,size:u},v=(e=>{const{classes:t,disabled:n,color:r,edge:o,size:i,loading:a}=e;return Cm({root:["root",a&&"loading",n&&"disabled","default"!==r&&`color${Mf(r)}`,o&&`edge${Mf(o)}`,`size${Mf(i)}`],loadingIndicator:["loadingIndicator"],loadingWrapper:["loadingWrapper"]},Sv,t)})(g);return cf.jsxs(Cv,{id:d?h:c,className:yg(v.root,i),centerRipple:!0,focusRipple:!l,disabled:s||d,ref:t,...f,ownerState:g,children:["boolean"==typeof d&&cf.jsx("span",{className:v.loadingWrapper,style:{display:"contents"},children:cf.jsx(Ov,{className:v.loadingIndicator,ownerState:g,children:d&&m})}),o]})});var _v=Cg(cf.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"}));function Rv({array1:e,array2:t,parser:n=e=>e}){return e&&t&&e.length===t.length&&e.every((e,r)=>n(e)===n(t[r]))}function Pv(e){return e.normalize("NFD").replace(/[\u0300-\u036f]/g,"")}const Av=function(e={}){const{ignoreAccents:t=!0,ignoreCase:n=!0,limit:r,matchFrom:o="any",stringify:i,trim:a=!1}=e;return(e,{inputValue:s,getOptionLabel:l})=>{let u=a?s.trim():s;n&&(u=u.toLowerCase()),t&&(u=Pv(u));const c=u?e.filter(e=>{let r=(i||l)(e);return n&&(r=r.toLowerCase()),t&&(r=Pv(r)),"start"===o?r.startsWith(u):r.includes(u)}):e;return"number"==typeof r?c.slice(0,r):c}}(),Lv=e=>null!==e.current&&e.current.parentElement?.contains(document.activeElement),Nv=[];function Mv(e,t,n,r){if(t||null==e||r)return"";const o=n(e);return"string"==typeof o?o:""}function Iv(e){const{unstable_isActiveElementInListbox:t=Lv,unstable_classNamePrefix:n="Mui",autoComplete:r=!1,autoHighlight:o=!1,autoSelect:i=!1,blurOnSelect:a=!1,clearOnBlur:s=!e.freeSolo,clearOnEscape:u=!1,componentName:c="useAutocomplete",defaultValue:d=(e.multiple?Nv:null),disableClearable:p=!1,disableCloseOnSelect:f=!1,disabled:h,disabledItemsFocusable:m=!1,disableListWrap:g=!1,filterOptions:v=Av,filterSelectedOptions:y=!1,freeSolo:b=!1,getOptionDisabled:w,getOptionKey:x,getOptionLabel:k=e=>e.label??e,groupBy:S,handleHomeEndKeys:E=!e.freeSolo,id:C,includeInputInList:O=!1,inputValue:T,isOptionEqualToValue:_=(e,t)=>e===t,multiple:R=!1,onChange:P,onClose:A,onHighlightChange:L,onInputChange:N,onOpen:M,open:I,openOnFocus:F=!1,options:$,readOnly:j=!1,renderValue:z,selectOnFocus:B=!e.freeSolo,value:D}=e,W=wm(C);let U=k;U=e=>{const t=k(e);return"string"!=typeof t?String(t):t};const V=l.useRef(!1),K=l.useRef(!0),H=l.useRef(null),q=l.useRef(null),[G,Y]=l.useState(null),[X,Q]=l.useState(-1),J=o?0:-1,Z=l.useRef(J),ee=l.useRef(Mv(d??D,R,U)).current,[te,ne]=Pg({controlled:D,default:d,name:c}),[re,oe]=Pg({controlled:T,default:ee,name:c,state:"inputValue"}),[ie,ae]=l.useState(!1),se=l.useCallback((e,t,n)=>{if(!(R?te.length<t.length:null!==t)&&!s)return;const r=Mv(t,R,U,z);re!==r&&(oe(r),N&&N(e,r,n))},[U,re,R,N,oe,s,te,z]),[le,ue]=Pg({controlled:I,default:!1,name:c,state:"open"}),[ce,de]=l.useState(!0),pe=!R&&null!=te&&re===U(te),fe=le&&!j,he=fe?v($.filter(e=>!y||!(R?te:[te]).some(t=>null!==t&&_(e,t))),{inputValue:pe&&ce?"":re,getOptionLabel:U}):[],me=function(e){const t=l.useRef({});return l.useEffect(()=>{t.current=e}),t.current}({filteredOptions:he,value:te,inputValue:re});l.useEffect(()=>{const e=te!==me.value;ie&&!e||b&&!e||se(null,te,"reset")},[te,se,ie,me.value,b]);const ge=le&&he.length>0&&!j,ve=Ag(e=>{if(-1===e)H.current.focus();else{const t=z?"data-item-index":"data-tag-index";G.querySelector(`[${t}="${e}"]`).focus()}});l.useEffect(()=>{R&&X>te.length-1&&(Q(-1),ve(-1))},[te,R,X,ve]);const ye=Ag(({event:e,index:t,reason:r})=>{if(Z.current=t,-1===t?H.current.removeAttribute("aria-activedescendant"):H.current.setAttribute("aria-activedescendant",`${W}-option-${t}`),L&&["mouse","keyboard","touch"].includes(r)&&L(e,-1===t?null:he[t],r),!q.current)return;const o=q.current.querySelector(`[role="option"].${n}-focused`);o&&(o.classList.remove(`${n}-focused`),o.classList.remove(`${n}-focusVisible`));let i=q.current;if("listbox"!==q.current.getAttribute("role")&&(i=q.current.parentElement.querySelector('[role="listbox"]')),!i)return;if(-1===t)return void(i.scrollTop=0);const a=q.current.querySelector(`[data-option-index="${t}"]`);if(a&&(a.classList.add(`${n}-focused`),"keyboard"===r&&a.classList.add(`${n}-focusVisible`),i.scrollHeight>i.clientHeight&&"mouse"!==r&&"touch"!==r)){const e=a,t=i.clientHeight+i.scrollTop,n=e.offsetTop+e.offsetHeight;n>t?i.scrollTop=n-i.clientHeight:e.offsetTop-e.offsetHeight*(S?1.3:0)<i.scrollTop&&(i.scrollTop=e.offsetTop-e.offsetHeight*(S?1.3:0))}}),be=Ag(({event:e,diff:t,direction:n="next",reason:o})=>{if(!fe)return;const i=function(e,t){if(!q.current||e<0||e>=he.length)return-1;let n=e;for(;;){const r=q.current.querySelector(`[data-option-index="${n}"]`),o=!m&&(!r||r.disabled||"true"===r.getAttribute("aria-disabled"));if(r&&r.hasAttribute("tabindex")&&!o)return n;if(n="next"===t?(n+1)%he.length:(n-1+he.length)%he.length,n===e)return-1}}((()=>{const e=he.length-1;if("reset"===t)return J;if("start"===t)return 0;if("end"===t)return e;const n=Z.current+t;return n<0?-1===n&&O?-1:g&&-1!==Z.current||Math.abs(t)>1?0:e:n>e?n===e+1&&O?-1:g||Math.abs(t)>1?e:0:n})(),n);if(ye({index:i,reason:o,event:e}),r&&"reset"!==t)if(-1===i)H.current.value=re;else{const e=U(he[i]);H.current.value=e;0===e.toLowerCase().indexOf(re.toLowerCase())&&re.length>0&&H.current.setSelectionRange(re.length,e.length)}}),we=!Rv({array1:me.filteredOptions,array2:he,parser:U}),xe=l.useCallback(()=>{if(!fe)return;const e=(()=>{if(-1!==Z.current&&!Rv({array1:me.filteredOptions,array2:he,parser:U})&&me.inputValue===re&&(R?te.length===me.value.length&&me.value.every((e,t)=>U(te[t])===U(e)):(e=me.value,t=te,(e?U(e):"")===(t?U(t):"")))){const e=me.filteredOptions[Z.current];if(e)return he.findIndex(t=>U(t)===U(e))}var e,t;return-1})();if(-1!==e)return void(Z.current=e);const t=R?te[0]:te;if(0!==he.length&&null!=t){if(q.current){if(null!=t){const e=he[Z.current];if(R&&e&&-1!==te.findIndex(t=>_(e,t)))return;const n=he.findIndex(e=>_(e,t));return void(-1===n?be({diff:"reset"}):ye({index:n}))}Z.current>=he.length-1?ye({index:he.length-1}):ye({index:Z.current})}}else be({diff:"reset"})},[he.length,!R&&te,y,be,ye,fe,re,R]),ke=Ag(e=>{Rg(q,e),e&&xe()});l.useEffect(()=>{(we||fe)&&xe()},[xe,we,fe]);const Se=e=>{le||(ue(!0),de(!0),M&&M(e))},Ee=(e,t)=>{le&&(ue(!1),A&&A(e,t))},Ce=(e,t,n,r)=>{if(R){if(te.length===t.length&&te.every((e,n)=>e===t[n]))return}else if(te===t)return;P&&P(e,t,n,r),ne(t)},Oe=l.useRef(!1),Te=(e,t,n="selectOption",r="options")=>{let o=n,i=t;if(R){i=Array.isArray(te)?te.slice():[];const e=i.findIndex(e=>_(t,e));-1===e?i.push(t):"freeSolo"!==r&&(i.splice(e,1),o="removeOption")}se(e,i,o),Ce(e,i,o,{option:t}),f||e&&(e.ctrlKey||e.metaKey)||Ee(e,o),(!0===a||"touch"===a&&Oe.current||"mouse"===a&&!Oe.current)&&H.current.blur()};const _e=(e,t)=>{if(!R)return;""===re&&Ee(e,"toggleInput");let n=X;-1===X?""===re&&"previous"===t&&(n=te.length-1):(n+="next"===t?1:-1,n<0&&(n=0),n===te.length&&(n=-1)),n=function(e,t){if(-1===e)return-1;let n=e;for(;;){if("next"===t&&n===te.length||"previous"===t&&-1===n)return-1;const e=z?"data-item-index":"data-tag-index",r=G.querySelector(`[${e}="${n}"]`);if(r&&r.hasAttribute("tabindex")&&!r.disabled&&"true"!==r.getAttribute("aria-disabled"))return n;n+="next"===t?1:-1}}(n,t),Q(n),ve(n)},Re=e=>{V.current=!0,oe(""),N&&N(e,"","clear"),Ce(e,R?[]:null,"clear")},Pe=e=>t=>{if(e.onKeyDown&&e.onKeyDown(t),!t.defaultMuiPrevented&&(-1===X||["ArrowLeft","ArrowRight"].includes(t.key)||(Q(-1),ve(-1)),229!==t.which))switch(t.key){case"Home":fe&&E&&(t.preventDefault(),be({diff:"start",direction:"next",reason:"keyboard",event:t}));break;case"End":fe&&E&&(t.preventDefault(),be({diff:"end",direction:"previous",reason:"keyboard",event:t}));break;case"PageUp":t.preventDefault(),be({diff:-5,direction:"previous",reason:"keyboard",event:t}),Se(t);break;case"PageDown":t.preventDefault(),be({diff:5,direction:"next",reason:"keyboard",event:t}),Se(t);break;case"ArrowDown":t.preventDefault(),be({diff:1,direction:"next",reason:"keyboard",event:t}),Se(t);break;case"ArrowUp":t.preventDefault(),be({diff:-1,direction:"previous",reason:"keyboard",event:t}),Se(t);break;case"ArrowLeft":!R&&z?ve(0):_e(t,"previous");break;case"ArrowRight":!R&&z?ve(-1):_e(t,"next");break;case"Enter":if(-1!==Z.current&&fe){const e=he[Z.current],n=!!w&&w(e);if(t.preventDefault(),n)return;Te(t,e,"selectOption"),r&&H.current.setSelectionRange(H.current.value.length,H.current.value.length)}else b&&""!==re&&!1===pe&&(R&&t.preventDefault(),Te(t,re,"createOption","freeSolo"));break;case"Escape":fe?(t.preventDefault(),t.stopPropagation(),Ee(t,"escape")):u&&(""!==re||R&&te.length>0||z)&&(t.preventDefault(),t.stopPropagation(),Re(t));break;case"Backspace":if(R&&!j&&""===re&&te.length>0){const e=-1===X?te.length-1:X,n=te.slice();n.splice(e,1),Ce(t,n,"removeOption",{option:te[e]})}R||!z||j||(ne(null),ve(-1));break;case"Delete":if(R&&!j&&""===re&&te.length>0&&-1!==X){const e=X,n=te.slice();n.splice(e,1),Ce(t,n,"removeOption",{option:te[e]})}R||!z||j||(ne(null),ve(-1))}},Ae=e=>{ae(!0),F&&!V.current&&Se(e)},Le=e=>{t(q)?H.current.focus():(ae(!1),K.current=!0,V.current=!1,i&&-1!==Z.current&&fe?Te(e,he[Z.current],"blur"):i&&b&&""!==re?Te(e,re,"blur","freeSolo"):s&&se(e,te,"blur"),Ee(e,"blur"))},Ne=e=>{const t=e.target.value;re!==t&&(oe(t),de(!1),N&&N(e,t,"input")),""===t?p||R||Ce(e,null,"clear"):Se(e)},Me=e=>{const t=Number(e.currentTarget.getAttribute("data-option-index"));Z.current!==t&&ye({event:e,index:t,reason:"mouse"})},Ie=e=>{ye({event:e,index:Number(e.currentTarget.getAttribute("data-option-index")),reason:"touch"}),Oe.current=!0},Fe=e=>{const t=Number(e.currentTarget.getAttribute("data-option-index"));Te(e,he[t],"selectOption"),Oe.current=!1},$e=e=>t=>{const n=te.slice();n.splice(e,1),Ce(t,n,"removeOption",{option:te[e]})},je=e=>{Ce(e,null,"removeOption",{option:te})},ze=e=>{le?Ee(e,"toggleInput"):Se(e)},Be=e=>{e.currentTarget.contains(e.target)&&e.target.getAttribute("id")!==W&&e.preventDefault()},De=e=>{e.currentTarget.contains(e.target)&&(H.current.focus(),B&&K.current&&H.current.selectionEnd-H.current.selectionStart===0&&H.current.select(),K.current=!1)},We=e=>{h||""!==re&&le||ze(e)};let Ue=b&&re.length>0;Ue=Ue||(R?te.length>0:null!==te);let Ve=he;return S&&(Ve=he.reduce((e,t,n)=>{const r=S(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},[])),h&&ie&&Le(),{getRootProps:(e={})=>({...e,onKeyDown:Pe(e),onMouseDown:Be,onClick:De}),getInputLabelProps:()=>({id:`${W}-label`,htmlFor:W}),getInputProps:()=>({id:W,value:re,onBlur:Le,onFocus:Ae,onChange:Ne,onMouseDown:We,"aria-activedescendant":fe?"":null,"aria-autocomplete":r?"both":"list","aria-controls":ge?`${W}-listbox`:void 0,"aria-expanded":ge,autoComplete:"off",ref:H,autoCapitalize:"none",spellCheck:"false",role:"combobox",disabled:h}),getClearProps:()=>({tabIndex:-1,type:"button",onClick:Re}),getItemProps:({index:e=0}={})=>({...R&&{key:e},...z?{"data-item-index":e}:{"data-tag-index":e},tabIndex:-1,...!j&&{onDelete:R?$e(e):je}}),getPopupIndicatorProps:()=>({tabIndex:-1,type:"button",onClick:ze}),getTagProps:({index:e})=>({key:e,"data-tag-index":e,tabIndex:-1,...!j&&{onDelete:$e(e)}}),getListboxProps:()=>({role:"listbox",id:`${W}-listbox`,"aria-labelledby":`${W}-label`,ref:ke,onMouseDown:e=>{e.preventDefault()}}),getOptionProps:({index:e,option:t})=>{const n=(R?te:[te]).some(e=>null!=e&&_(t,e)),r=!!w&&w(t);return{key:x?.(t)??U(t),tabIndex:-1,role:"option",id:`${W}-option-${e}`,onMouseMove:Me,onClick:Fe,onTouchStart:Ie,"data-option-index":e,"aria-disabled":r,"aria-selected":n}},id:W,inputValue:re,value:te,dirty:Ue,expanded:fe&&G,popupOpen:fe,focused:ie||-1!==X,anchorEl:G,setAnchorEl:Y,focusedItem:X,focusedTag:X,groupedOptions:Ve}}var Fv="top",$v="bottom",jv="right",zv="left",Bv="auto",Dv=[Fv,$v,jv,zv],Wv="start",Uv="end",Vv="viewport",Kv="popper",Hv=Dv.reduce(function(e,t){return e.concat([t+"-"+Wv,t+"-"+Uv])},[]),qv=[].concat(Dv,[Bv]).reduce(function(e,t){return e.concat([t,t+"-"+Wv,t+"-"+Uv])},[]),Gv=["beforeRead","read","afterRead","beforeMain","main","afterMain","beforeWrite","write","afterWrite"];function Yv(e){return e?(e.nodeName||"").toLowerCase():null}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 Qv(e){return e instanceof Xv(e).Element||e instanceof Element}function Jv(e){return e instanceof Xv(e).HTMLElement||e instanceof HTMLElement}function Zv(e){return"undefined"!=typeof ShadowRoot&&(e instanceof Xv(e).ShadowRoot||e instanceof ShadowRoot)}var ey={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]||{},o=t.elements[e];Jv(o)&&Yv(o)&&(Object.assign(o.style,n),Object.keys(r).forEach(function(e){var t=r[e];!1===t?o.removeAttribute(e):o.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],o=t.attributes[e]||{},i=Object.keys(t.styles.hasOwnProperty(e)?t.styles[e]:n[e]).reduce(function(e,t){return e[t]="",e},{});Jv(r)&&Yv(r)&&(Object.assign(r.style,i),Object.keys(o).forEach(function(e){r.removeAttribute(e)}))})}},requires:["computeStyles"]};function ty(e){return e.split("-")[0]}var ny=Math.max,ry=Math.min,oy=Math.round;function iy(){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 ay(){return!/^((?!chrome|android).)*safari/i.test(iy())}function sy(e,t,n){void 0===t&&(t=!1),void 0===n&&(n=!1);var r=e.getBoundingClientRect(),o=1,i=1;t&&Jv(e)&&(o=e.offsetWidth>0&&oy(r.width)/e.offsetWidth||1,i=e.offsetHeight>0&&oy(r.height)/e.offsetHeight||1);var a=(Qv(e)?Xv(e):window).visualViewport,s=!ay()&&n,l=(r.left+(s&&a?a.offsetLeft:0))/o,u=(r.top+(s&&a?a.offsetTop:0))/i,c=r.width/o,d=r.height/i;return{width:c,height:d,top:u,right:l+c,bottom:u+d,left:l,x:l,y:u}}function ly(e){var t=sy(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 uy(e,t){var n=t.getRootNode&&t.getRootNode();if(e.contains(t))return!0;if(n&&Zv(n)){var r=t;do{if(r&&e.isSameNode(r))return!0;r=r.parentNode||r.host}while(r)}return!1}function cy(e){return Xv(e).getComputedStyle(e)}function dy(e){return["table","td","th"].indexOf(Yv(e))>=0}function py(e){return((Qv(e)?e.ownerDocument:e.document)||window.document).documentElement}function fy(e){return"html"===Yv(e)?e:e.assignedSlot||e.parentNode||(Zv(e)?e.host:null)||py(e)}function hy(e){return Jv(e)&&"fixed"!==cy(e).position?e.offsetParent:null}function my(e){for(var t=Xv(e),n=hy(e);n&&dy(n)&&"static"===cy(n).position;)n=hy(n);return n&&("html"===Yv(n)||"body"===Yv(n)&&"static"===cy(n).position)?t:n||function(e){var t=/firefox/i.test(iy());if(/Trident/i.test(iy())&&Jv(e)&&"fixed"===cy(e).position)return null;var n=fy(e);for(Zv(n)&&(n=n.host);Jv(n)&&["html","body"].indexOf(Yv(n))<0;){var r=cy(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}function gy(e){return["top","bottom"].indexOf(e)>=0?"x":"y"}function vy(e,t,n){return ny(e,ry(t,n))}function yy(e){return Object.assign({},{top:0,right:0,bottom:0,left:0},e)}function by(e,t){return t.reduce(function(t,n){return t[n]=e,t},{})}var wy={name:"arrow",enabled:!0,phase:"main",fn:function(e){var t,n=e.state,r=e.name,o=e.options,i=n.elements.arrow,a=n.modifiersData.popperOffsets,s=ty(n.placement),l=gy(s),u=[zv,jv].indexOf(s)>=0?"height":"width";if(i&&a){var c=function(e,t){return yy("number"!=typeof(e="function"==typeof e?e(Object.assign({},t.rects,{placement:t.placement})):e)?e:by(e,Dv))}(o.padding,n),d=ly(i),p="y"===l?Fv:zv,f="y"===l?$v:jv,h=n.rects.reference[u]+n.rects.reference[l]-a[l]-n.rects.popper[u],m=a[l]-n.rects.reference[l],g=my(i),v=g?"y"===l?g.clientHeight||0:g.clientWidth||0:0,y=h/2-m/2,b=c[p],w=v-d[u]-c[f],x=v/2-d[u]/2+y,k=vy(b,x,w),S=l;n.modifiersData[r]=((t={})[S]=k,t.centerOffset=k-x,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)))&&uy(t.elements.popper,r)&&(t.elements.arrow=r)},requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};function xy(e){return e.split("-")[1]}var ky={top:"auto",right:"auto",bottom:"auto",left:"auto"};function Sy(e){var t,n=e.popper,r=e.popperRect,o=e.placement,i=e.variation,a=e.offsets,s=e.position,l=e.gpuAcceleration,u=e.adaptive,c=e.roundOffsets,d=e.isFixed,p=a.x,f=void 0===p?0:p,h=a.y,m=void 0===h?0:h,g="function"==typeof c?c({x:f,y:m}):{x:f,y:m};f=g.x,m=g.y;var v=a.hasOwnProperty("x"),y=a.hasOwnProperty("y"),b=zv,w=Fv,x=window;if(u){var k=my(n),S="clientHeight",E="clientWidth";if(k===Xv(n)&&"static"!==cy(k=py(n)).position&&"absolute"===s&&(S="scrollHeight",E="scrollWidth"),o===Fv||(o===zv||o===jv)&&i===Uv)w=$v,m-=(d&&k===x&&x.visualViewport?x.visualViewport.height:k[S])-r.height,m*=l?1:-1;if(o===zv||(o===Fv||o===$v)&&i===Uv)b=jv,f-=(d&&k===x&&x.visualViewport?x.visualViewport.width:k[E])-r.width,f*=l?1:-1}var C,O=Object.assign({position:s},u&&ky),T=!0===c?function(e,t){var n=e.x,r=e.y,o=t.devicePixelRatio||1;return{x:oy(n*o)/o||0,y:oy(r*o)/o||0}}({x:f,y:m},Xv(n)):{x:f,y:m};return f=T.x,m=T.y,l?Object.assign({},O,((C={})[w]=y?"0":"",C[b]=v?"0":"",C.transform=(x.devicePixelRatio||1)<=1?"translate("+f+"px, "+m+"px)":"translate3d("+f+"px, "+m+"px, 0)",C)):Object.assign({},O,((t={})[w]=y?m+"px":"",t[b]=v?f+"px":"",t.transform="",t))}var Ey={passive:!0};var Cy={name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:function(e){var t=e.state,n=e.instance,r=e.options,o=r.scroll,i=void 0===o||o,a=r.resize,s=void 0===a||a,l=Xv(t.elements.popper),u=[].concat(t.scrollParents.reference,t.scrollParents.popper);return i&&u.forEach(function(e){e.addEventListener("scroll",n.update,Ey)}),s&&l.addEventListener("resize",n.update,Ey),function(){i&&u.forEach(function(e){e.removeEventListener("scroll",n.update,Ey)}),s&&l.removeEventListener("resize",n.update,Ey)}},data:{}},Oy={left:"right",right:"left",bottom:"top",top:"bottom"};function Ty(e){return e.replace(/left|right|bottom|top/g,function(e){return Oy[e]})}var _y={start:"end",end:"start"};function Ry(e){return e.replace(/start|end/g,function(e){return _y[e]})}function Py(e){var t=Xv(e);return{scrollLeft:t.pageXOffset,scrollTop:t.pageYOffset}}function Ay(e){return sy(py(e)).left+Py(e).scrollLeft}function Ly(e){var t=cy(e),n=t.overflow,r=t.overflowX,o=t.overflowY;return/auto|scroll|overlay|hidden/.test(n+o+r)}function Ny(e){return["html","body","#document"].indexOf(Yv(e))>=0?e.ownerDocument.body:Jv(e)&&Ly(e)?e:Ny(fy(e))}function My(e,t){var n;void 0===t&&(t=[]);var r=Ny(e),o=r===(null==(n=e.ownerDocument)?void 0:n.body),i=Xv(r),a=o?[i].concat(i.visualViewport||[],Ly(r)?r:[]):r,s=t.concat(a);return o?s:s.concat(My(fy(a)))}function Iy(e){return Object.assign({},e,{left:e.x,top:e.y,right:e.x+e.width,bottom:e.y+e.height})}function Fy(e,t,n){return t===Vv?Iy(function(e,t){var n=Xv(e),r=py(e),o=n.visualViewport,i=r.clientWidth,a=r.clientHeight,s=0,l=0;if(o){i=o.width,a=o.height;var u=ay();(u||!u&&"fixed"===t)&&(s=o.offsetLeft,l=o.offsetTop)}return{width:i,height:a,x:s+Ay(e),y:l}}(e,n)):Qv(t)?function(e,t){var n=sy(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):Iy(function(e){var t,n=py(e),r=Py(e),o=null==(t=e.ownerDocument)?void 0:t.body,i=ny(n.scrollWidth,n.clientWidth,o?o.scrollWidth:0,o?o.clientWidth:0),a=ny(n.scrollHeight,n.clientHeight,o?o.scrollHeight:0,o?o.clientHeight:0),s=-r.scrollLeft+Ay(e),l=-r.scrollTop;return"rtl"===cy(o||n).direction&&(s+=ny(n.clientWidth,o?o.clientWidth:0)-i),{width:i,height:a,x:s,y:l}}(py(e)))}function $y(e,t,n,r){var o="clippingParents"===t?function(e){var t=My(fy(e)),n=["absolute","fixed"].indexOf(cy(e).position)>=0&&Jv(e)?my(e):e;return Qv(n)?t.filter(function(e){return Qv(e)&&uy(e,n)&&"body"!==Yv(e)}):[]}(e):[].concat(t),i=[].concat(o,[n]),a=i[0],s=i.reduce(function(t,n){var o=Fy(e,n,r);return t.top=ny(o.top,t.top),t.right=ry(o.right,t.right),t.bottom=ry(o.bottom,t.bottom),t.left=ny(o.left,t.left),t},Fy(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 jy(e){var t,n=e.reference,r=e.element,o=e.placement,i=o?ty(o):null,a=o?xy(o):null,s=n.x+n.width/2-r.width/2,l=n.y+n.height/2-r.height/2;switch(i){case Fv:t={x:s,y:n.y-r.height};break;case $v:t={x:s,y:n.y+n.height};break;case jv:t={x:n.x+n.width,y:l};break;case zv:t={x:n.x-r.width,y:l};break;default:t={x:n.x,y:n.y}}var u=i?gy(i):null;if(null!=u){var c="y"===u?"height":"width";switch(a){case Wv:t[u]=t[u]-(n[c]/2-r[c]/2);break;case Uv:t[u]=t[u]+(n[c]/2-r[c]/2)}}return t}function zy(e,t){void 0===t&&(t={});var n=t,r=n.placement,o=void 0===r?e.placement:r,i=n.strategy,a=void 0===i?e.strategy:i,s=n.boundary,l=void 0===s?"clippingParents":s,u=n.rootBoundary,c=void 0===u?Vv:u,d=n.elementContext,p=void 0===d?Kv:d,f=n.altBoundary,h=void 0!==f&&f,m=n.padding,g=void 0===m?0:m,v=yy("number"!=typeof g?g:by(g,Dv)),y=p===Kv?"reference":Kv,b=e.rects.popper,w=e.elements[h?y:p],x=$y(Qv(w)?w:w.contextElement||py(e.elements.popper),l,c,a),k=sy(e.elements.reference),S=jy({reference:k,element:b,placement:o}),E=Iy(Object.assign({},b,S)),C=p===Kv?E:k,O={top:x.top-C.top+v.top,bottom:C.bottom-x.bottom+v.bottom,left:x.left-C.left+v.left,right:C.right-x.right+v.right},T=e.modifiersData.offset;if(p===Kv&&T){var _=T[o];Object.keys(O).forEach(function(e){var t=[jv,$v].indexOf(e)>=0?1:-1,n=[Fv,$v].indexOf(e)>=0?"y":"x";O[e]+=_[n]*t})}return O}function By(e,t){void 0===t&&(t={});var n=t,r=n.placement,o=n.boundary,i=n.rootBoundary,a=n.padding,s=n.flipVariations,l=n.allowedAutoPlacements,u=void 0===l?qv:l,c=xy(r),d=c?s?Hv:Hv.filter(function(e){return xy(e)===c}):Dv,p=d.filter(function(e){return u.indexOf(e)>=0});0===p.length&&(p=d);var f=p.reduce(function(t,n){return t[n]=zy(e,{placement:n,boundary:o,rootBoundary:i,padding:a})[ty(n)],t},{});return Object.keys(f).sort(function(e,t){return f[e]-f[t]})}var Dy={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 o=n.mainAxis,i=void 0===o||o,a=n.altAxis,s=void 0===a||a,l=n.fallbackPlacements,u=n.padding,c=n.boundary,d=n.rootBoundary,p=n.altBoundary,f=n.flipVariations,h=void 0===f||f,m=n.allowedAutoPlacements,g=t.options.placement,v=ty(g),y=l||(v===g||!h?[Ty(g)]:function(e){if(ty(e)===Bv)return[];var t=Ty(e);return[Ry(e),t,Ry(t)]}(g)),b=[g].concat(y).reduce(function(e,n){return e.concat(ty(n)===Bv?By(t,{placement:n,boundary:c,rootBoundary:d,padding:u,flipVariations:h,allowedAutoPlacements:m}):n)},[]),w=t.rects.reference,x=t.rects.popper,k=new Map,S=!0,E=b[0],C=0;C<b.length;C++){var O=b[C],T=ty(O),_=xy(O)===Wv,R=[Fv,$v].indexOf(T)>=0,P=R?"width":"height",A=zy(t,{placement:O,boundary:c,rootBoundary:d,altBoundary:p,padding:u}),L=R?_?jv:zv:_?$v:Fv;w[P]>x[P]&&(L=Ty(L));var N=Ty(L),M=[];if(i&&M.push(A[T]<=0),s&&M.push(A[L]<=0,A[N]<=0),M.every(function(e){return e})){E=O,S=!1;break}k.set(O,M)}if(S)for(var I=function(e){var t=b.find(function(t){var n=k.get(t);if(n)return n.slice(0,e).every(function(e){return e})});if(t)return E=t,"break"},F=h?3:1;F>0;F--){if("break"===I(F))break}t.placement!==E&&(t.modifiersData[r]._skip=!0,t.placement=E,t.reset=!0)}},requiresIfExists:["offset"],data:{_skip:!1}};function Wy(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 Uy(e){return[Fv,jv,$v,zv].some(function(t){return e[t]>=0})}var Vy={name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:function(e){var t=e.state,n=e.name,r=t.rects.reference,o=t.rects.popper,i=t.modifiersData.preventOverflow,a=zy(t,{elementContext:"reference"}),s=zy(t,{altBoundary:!0}),l=Wy(a,r),u=Wy(s,o,i),c=Uy(l),d=Uy(u);t.modifiersData[n]={referenceClippingOffsets:l,popperEscapeOffsets:u,isReferenceHidden:c,hasPopperEscaped:d},t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-reference-hidden":c,"data-popper-escaped":d})}};var Ky={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:function(e){var t=e.state,n=e.options,r=e.name,o=n.offset,i=void 0===o?[0,0]:o,a=qv.reduce(function(e,n){return e[n]=function(e,t,n){var r=ty(e),o=[zv,Fv].indexOf(r)>=0?-1:1,i="function"==typeof n?n(Object.assign({},t,{placement:e})):n,a=i[0],s=i[1];return a=a||0,s=(s||0)*o,[zv,jv].indexOf(r)>=0?{x:s,y:a}:{x:a,y:s}}(n,t.rects,i),e},{}),s=a[t.placement],l=s.x,u=s.y;null!=t.modifiersData.popperOffsets&&(t.modifiersData.popperOffsets.x+=l,t.modifiersData.popperOffsets.y+=u),t.modifiersData[r]=a}};var Hy={name:"popperOffsets",enabled:!0,phase:"read",fn:function(e){var t=e.state,n=e.name;t.modifiersData[n]=jy({reference:t.rects.reference,element:t.rects.popper,placement:t.placement})},data:{}};var qy={name:"preventOverflow",enabled:!0,phase:"main",fn:function(e){var t=e.state,n=e.options,r=e.name,o=n.mainAxis,i=void 0===o||o,a=n.altAxis,s=void 0!==a&&a,l=n.boundary,u=n.rootBoundary,c=n.altBoundary,d=n.padding,p=n.tether,f=void 0===p||p,h=n.tetherOffset,m=void 0===h?0:h,g=zy(t,{boundary:l,rootBoundary:u,padding:d,altBoundary:c}),v=ty(t.placement),y=xy(t.placement),b=!y,w=gy(v),x="x"===w?"y":"x",k=t.modifiersData.popperOffsets,S=t.rects.reference,E=t.rects.popper,C="function"==typeof m?m(Object.assign({},t.rects,{placement:t.placement})):m,O="number"==typeof C?{mainAxis:C,altAxis:C}:Object.assign({mainAxis:0,altAxis:0},C),T=t.modifiersData.offset?t.modifiersData.offset[t.placement]:null,_={x:0,y:0};if(k){if(i){var R,P="y"===w?Fv:zv,A="y"===w?$v:jv,L="y"===w?"height":"width",N=k[w],M=N+g[P],I=N-g[A],F=f?-E[L]/2:0,$=y===Wv?S[L]:E[L],j=y===Wv?-E[L]:-S[L],z=t.elements.arrow,B=f&&z?ly(z):{width:0,height:0},D=t.modifiersData["arrow#persistent"]?t.modifiersData["arrow#persistent"].padding:{top:0,right:0,bottom:0,left:0},W=D[P],U=D[A],V=vy(0,S[L],B[L]),K=b?S[L]/2-F-V-W-O.mainAxis:$-V-W-O.mainAxis,H=b?-S[L]/2+F+V+U+O.mainAxis:j+V+U+O.mainAxis,q=t.elements.arrow&&my(t.elements.arrow),G=q?"y"===w?q.clientTop||0:q.clientLeft||0:0,Y=null!=(R=null==T?void 0:T[w])?R:0,X=N+H-Y,Q=vy(f?ry(M,N+K-Y-G):M,N,f?ny(I,X):I);k[w]=Q,_[w]=Q-N}if(s){var J,Z="x"===w?Fv:zv,ee="x"===w?$v:jv,te=k[x],ne="y"===x?"height":"width",re=te+g[Z],oe=te-g[ee],ie=-1!==[Fv,zv].indexOf(v),ae=null!=(J=null==T?void 0:T[x])?J:0,se=ie?re:te-S[ne]-E[ne]-ae+O.altAxis,le=ie?te+S[ne]+E[ne]-ae-O.altAxis:oe,ue=f&&ie?function(e,t,n){var r=vy(e,t,n);return r>n?n:r}(se,te,le):vy(f?se:re,te,f?le:oe);k[x]=ue,_[x]=ue-te}t.modifiersData[r]=_}},requiresIfExists:["offset"]};function Gy(e,t,n){void 0===n&&(n=!1);var r=Jv(t),o=Jv(t)&&function(e){var t=e.getBoundingClientRect(),n=oy(t.width)/e.offsetWidth||1,r=oy(t.height)/e.offsetHeight||1;return 1!==n||1!==r}(t),i=py(t),a=sy(e,o,n),s={scrollLeft:0,scrollTop:0},l={x:0,y:0};return(r||!r&&!n)&&(("body"!==Yv(t)||Ly(i))&&(s=function(e){return e!==Xv(e)&&Jv(e)?{scrollLeft:(t=e).scrollLeft,scrollTop:t.scrollTop}:Py(e);var t}(t)),Jv(t)?((l=sy(t,!0)).x+=t.clientLeft,l.y+=t.clientTop):i&&(l.x=Ay(i))),{x:a.left+s.scrollLeft-l.x,y:a.top+s.scrollTop-l.y,width:a.width,height:a.height}}function Yy(e){var t=new Map,n=new Set,r=[];function o(e){n.add(e.name),[].concat(e.requires||[],e.requiresIfExists||[]).forEach(function(e){if(!n.has(e)){var r=t.get(e);r&&o(r)}}),r.push(e)}return e.forEach(function(e){t.set(e.name,e)}),e.forEach(function(e){n.has(e.name)||o(e)}),r}var Xy={placement:"bottom",modifiers:[],strategy:"absolute"};function Qy(){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 Jy(e){void 0===e&&(e={});var t=e,n=t.defaultModifiers,r=void 0===n?[]:n,o=t.defaultOptions,i=void 0===o?Xy:o;return function(e,t,n){void 0===n&&(n=i);var o,a,s={placement:"bottom",orderedModifiers:[],options:Object.assign({},Xy,i),modifiersData:{},elements:{reference:e,popper:t},attributes:{},styles:{}},l=[],u=!1,c={state:s,setOptions:function(n){var o="function"==typeof n?n(s.options):n;d(),s.options=Object.assign({},i,s.options,o),s.scrollParents={reference:Qv(e)?My(e):e.contextElement?My(e.contextElement):[],popper:My(t)};var a,u,p=function(e){var t=Yy(e);return Gv.reduce(function(e,n){return e.concat(t.filter(function(e){return e.phase===n}))},[])}((a=[].concat(r,s.options.modifiers),u=a.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},{}),Object.keys(u).map(function(e){return u[e]})));return s.orderedModifiers=p.filter(function(e){return e.enabled}),s.orderedModifiers.forEach(function(e){var t=e.name,n=e.options,r=void 0===n?{}:n,o=e.effect;if("function"==typeof o){var i=o({state:s,name:t,instance:c,options:r}),a=function(){};l.push(i||a)}}),c.update()},forceUpdate:function(){if(!u){var e=s.elements,t=e.reference,n=e.popper;if(Qy(t,n)){s.rects={reference:Gy(t,my(n),"fixed"===s.options.strategy),popper:ly(n)},s.reset=!1,s.placement=s.options.placement,s.orderedModifiers.forEach(function(e){return s.modifiersData[e.name]=Object.assign({},e.data)});for(var r=0;r<s.orderedModifiers.length;r++)if(!0!==s.reset){var o=s.orderedModifiers[r],i=o.fn,a=o.options,l=void 0===a?{}:a,d=o.name;"function"==typeof i&&(s=i({state:s,options:l,name:d,instance:c})||s)}else s.reset=!1,r=-1}}},update:(o=function(){return new Promise(function(e){c.forceUpdate(),e(s)})},function(){return a||(a=new Promise(function(e){Promise.resolve().then(function(){a=void 0,e(o())})})),a}),destroy:function(){d(),u=!0}};if(!Qy(e,t))return c;function d(){l.forEach(function(e){return e()}),l=[]}return c.setOptions(n).then(function(e){!u&&n.onFirstUpdate&&n.onFirstUpdate(e)}),c}}var Zy=Jy({defaultModifiers:[Cy,Hy,{name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:function(e){var t=e.state,n=e.options,r=n.gpuAcceleration,o=void 0===r||r,i=n.adaptive,a=void 0===i||i,s=n.roundOffsets,l=void 0===s||s,u={placement:ty(t.placement),variation:xy(t.placement),popper:t.elements.popper,popperRect:t.rects.popper,gpuAcceleration:o,isFixed:"fixed"===t.options.strategy};null!=t.modifiersData.popperOffsets&&(t.styles.popper=Object.assign({},t.styles.popper,Sy(Object.assign({},u,{offsets:t.modifiersData.popperOffsets,position:t.options.strategy,adaptive:a,roundOffsets:l})))),null!=t.modifiersData.arrow&&(t.styles.arrow=Object.assign({},t.styles.arrow,Sy(Object.assign({},u,{offsets:t.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:l})))),t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-placement":t.placement})},data:{}},ey,Ky,Dy,qy,wy,Vy]});function eb(e){const{elementType:t,externalSlotProps:n,ownerState:r,skipResolvingSlotProps:o=!1,...i}=e,a=o?{}:Ug(n,r),{props:s,internalRef:l}=Hg({...i,externalSlotProps:a});return Wg(t,{...s,ref:Lg(l,a?.ref,e.additionalProps?.ref)},r)}function tb(e){return parseInt(l.version,10)>=19?e?.props?.ref||null:e?.ref||null}const nb=l.forwardRef(function(e,t){const{children:n,container:r,disablePortal:o=!1}=e,[i,a]=l.useState(null),s=Lg(l.isValidElement(n)?tb(n):null,t);if(em(()=>{o||a(function(e){return"function"==typeof e?e():e}(r)||document.body)},[r,o]),em(()=>{if(i&&!o)return Rg(t,i),()=>{Rg(t,null)}},[t,i,o]),o){if(l.isValidElement(n)){const e={ref:s};return l.cloneElement(n,e)}return n}return i?Ol.createPortal(n,i):i});function rb(e){return Bh("MuiPopper",e)}function ob(e){return"function"==typeof e?e():e}Dh("MuiPopper",["root"]);const ib={},ab=l.forwardRef(function(e,t){const{anchorEl:n,children:r,direction:o,disablePortal:i,modifiers:a,open:s,placement:u,popperOptions:c,popperRef:d,slotProps:p={},slots:f={},TransitionProps:h,ownerState:m,...g}=e,v=l.useRef(null),y=Lg(v,t),b=l.useRef(null),w=Lg(b,d),x=l.useRef(w);em(()=>{x.current=w},[w]),l.useImperativeHandle(d,()=>b.current,[]);const k=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}}(u,o),[S,E]=l.useState(k),[C,O]=l.useState(ob(n));l.useEffect(()=>{b.current&&b.current.forceUpdate()}),l.useEffect(()=>{n&&O(ob(n))},[n]),em(()=>{if(!C||!s)return;let e=[{name:"preventOverflow",options:{altBoundary:i}},{name:"flip",options:{altBoundary:i}},{name:"onUpdate",enabled:!0,phase:"afterWrite",fn:({state:e})=>{E(e.placement)}}];null!=a&&(e=e.concat(a)),c&&null!=c.modifiers&&(e=e.concat(c.modifiers));const t=Zy(C,v.current,{placement:k,...c,modifiers:e});return x.current(t),()=>{t.destroy(),x.current(null)}},[C,i,a,s,c,k]);const T={placement:S};null!==h&&(T.TransitionProps=h);const _=(e=>{const{classes:t}=e;return Cm({root:["root"]},rb,t)})(e),R=f.root??"div",P=eb({elementType:R,externalSlotProps:p.root,externalForwardedProps:g,additionalProps:{role:"tooltip",ref:y},ownerState:e,className:_.root});return cf.jsx(R,{...P,children:"function"==typeof r?r(T):r})}),sb=l.forwardRef(function(e,t){const{anchorEl:n,children:r,container:o,direction:i="ltr",disablePortal:a=!1,keepMounted:s=!1,modifiers:u,open:c,placement:d="bottom",popperOptions:p=ib,popperRef:f,style:h,transition:m=!1,slotProps:g={},slots:v={},...y}=e,[b,w]=l.useState(!0);if(!s&&!c&&(!m||b))return null;let x;if(o)x=o;else if(n){const e=ob(n);x=e&&void 0!==e.nodeType?Tg(e).body:Tg(null).body}const k=c||!s||m&&!b?void 0:"none",S=m?{in:c,onEnter:()=>{w(!1)},onExited:()=>{w(!0)}}:void 0;return cf.jsx(nb,{disablePortal:a,container:x,children:cf.jsx(ab,{anchorEl:n,direction:i,disablePortal:a,modifiers:u,ref:t,open:m?!b:c,placement:d,popperOptions:p,popperRef:f,slotProps:g,slots:v,...y,style:{position:"fixed",top:0,left:0,display:k,...h},TransitionProps:S,children:r})})}),lb=mg(sb,{name:"MuiPopper",slot:"Root"})({}),ub=l.forwardRef(function(e,t){const n=mm(),r=xg({props:e,name:"MuiPopper"}),{anchorEl:o,component:i,components:a,componentsProps:s,container:l,disablePortal:u,keepMounted:c,modifiers:d,open:p,placement:f,popperOptions:h,popperRef:m,transition:g,slots:v,slotProps:y,...b}=r,w=v?.root??a?.Root,x={anchorEl:o,container:l,disablePortal:u,keepMounted:c,modifiers:d,open:p,placement:f,popperOptions:h,popperRef:m,transition:g,...b};return cf.jsx(lb,{as:i,direction:n?"rtl":"ltr",slots:{root:w},slotProps:y??s,...x,ref:t})});function cb(e){return Bh("MuiListSubheader",e)}Dh("MuiListSubheader",["root","colorPrimary","colorInherit","gutters","inset","sticky"]);const db=mg("li",{name:"MuiListSubheader",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,"default"!==n.color&&t[`color${Mf(n.color)}`],!n.disableGutters&&t.gutters,n.inset&&t.inset,!n.disableSticky&&t.sticky]}})(wg(({theme:e})=>({boxSizing:"border-box",lineHeight:"48px",listStyle:"none",color:(e.vars||e).palette.text.secondary,fontFamily:e.typography.fontFamily,fontWeight:e.typography.fontWeightMedium,fontSize:e.typography.pxToRem(14),variants:[{props:{color:"primary"},style:{color:(e.vars||e).palette.primary.main}},{props:{color:"inherit"},style:{color:"inherit"}},{props:({ownerState:e})=>!e.disableGutters,style:{paddingLeft:16,paddingRight:16}},{props:({ownerState:e})=>e.inset,style:{paddingLeft:72}},{props:({ownerState:e})=>!e.disableSticky,style:{position:"sticky",top:0,zIndex:1,backgroundColor:(e.vars||e).palette.background.paper}}]}))),pb=l.forwardRef(function(e,t){const n=xg({props:e,name:"MuiListSubheader"}),{className:r,color:o="default",component:i="li",disableGutters:a=!1,disableSticky:s=!1,inset:l=!1,...u}=n,c={...n,color:o,component:i,disableGutters:a,disableSticky:s,inset:l},d=(e=>{const{classes:t,color:n,disableGutters:r,inset:o,disableSticky:i}=e;return Cm({root:["root","default"!==n&&`color${Mf(n)}`,!r&&"gutters",o&&"inset",!i&&"sticky"]},cb,t)})(c);return cf.jsx(db,{as:i,className:yg(d.root,r),ref:t,ownerState:c,...u})});pb&&(pb.muiSkipListHighlight=!0);var fb=Cg(cf.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"}));function hb(e){return Bh("MuiChip",e)}const mb=Dh("MuiChip",["root","sizeSmall","sizeMedium","colorDefault","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"]),gb=mg("div",{name:"MuiChip",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e,{color:r,iconColor:o,clickable:i,onDelete:a,size:s,variant:l}=n;return[{[`& .${mb.avatar}`]:t.avatar},{[`& .${mb.avatar}`]:t[`avatar${Mf(s)}`]},{[`& .${mb.avatar}`]:t[`avatarColor${Mf(r)}`]},{[`& .${mb.icon}`]:t.icon},{[`& .${mb.icon}`]:t[`icon${Mf(s)}`]},{[`& .${mb.icon}`]:t[`iconColor${Mf(o)}`]},{[`& .${mb.deleteIcon}`]:t.deleteIcon},{[`& .${mb.deleteIcon}`]:t[`deleteIcon${Mf(s)}`]},{[`& .${mb.deleteIcon}`]:t[`deleteIconColor${Mf(r)}`]},{[`& .${mb.deleteIcon}`]:t[`deleteIcon${Mf(l)}Color${Mf(r)}`]},t.root,t[`size${Mf(s)}`],t[`color${Mf(r)}`],i&&t.clickable,i&&"default"!==r&&t[`clickableColor${Mf(r)})`],a&&t.deletable,a&&"default"!==r&&t[`deletableColor${Mf(r)}`],t[l],t[`${l}${Mf(r)}`]]}})(wg(({theme:e})=>{const t="light"===e.palette.mode?e.palette.grey[700]:e.palette.grey[300];return{maxWidth:"100%",fontFamily:e.typography.fontFamily,fontSize:e.typography.pxToRem(13),display:"inline-flex",alignItems:"center",justifyContent:"center",height:32,lineHeight:1.5,color:(e.vars||e).palette.text.primary,backgroundColor:(e.vars||e).palette.action.selected,borderRadius:16,whiteSpace:"nowrap",transition:e.transitions.create(["background-color","box-shadow"]),cursor:"unset",outline:0,textDecoration:"none",border:0,padding:0,verticalAlign:"middle",boxSizing:"border-box",[`&.${mb.disabled}`]:{opacity:(e.vars||e).palette.action.disabledOpacity,pointerEvents:"none"},[`& .${mb.avatar}`]:{marginLeft:5,marginRight:-6,width:24,height:24,color:e.vars?e.vars.palette.Chip.defaultAvatarColor:t,fontSize:e.typography.pxToRem(12)},[`& .${mb.avatarColorPrimary}`]:{color:(e.vars||e).palette.primary.contrastText,backgroundColor:(e.vars||e).palette.primary.dark},[`& .${mb.avatarColorSecondary}`]:{color:(e.vars||e).palette.secondary.contrastText,backgroundColor:(e.vars||e).palette.secondary.dark},[`& .${mb.avatarSmall}`]:{marginLeft:4,marginRight:-4,width:18,height:18,fontSize:e.typography.pxToRem(10)},[`& .${mb.icon}`]:{marginLeft:5,marginRight:-6},[`& .${mb.deleteIcon}`]:{WebkitTapHighlightColor:"transparent",color:e.alpha((e.vars||e).palette.text.primary,.26),fontSize:22,cursor:"pointer",margin:"0 5px 0 -6px","&:hover":{color:e.alpha((e.vars||e).palette.text.primary,.4)}},variants:[{props:{size:"small"},style:{height:24,[`& .${mb.icon}`]:{fontSize:18,marginLeft:4,marginRight:-4},[`& .${mb.deleteIcon}`]:{fontSize:16,marginRight:4,marginLeft:-4}}},...Object.entries(e.palette).filter(dv(["contrastText"])).map(([t])=>({props:{color:t},style:{backgroundColor:(e.vars||e).palette[t].main,color:(e.vars||e).palette[t].contrastText,[`& .${mb.deleteIcon}`]:{color:e.alpha((e.vars||e).palette[t].contrastText,.7),"&:hover, &:active":{color:(e.vars||e).palette[t].contrastText}}}})),{props:e=>e.iconColor===e.color,style:{[`& .${mb.icon}`]:{color:e.vars?e.vars.palette.Chip.defaultIconColor:t}}},{props:e=>e.iconColor===e.color&&"default"!==e.color,style:{[`& .${mb.icon}`]:{color:"inherit"}}},{props:{onDelete:!0},style:{[`&.${mb.focusVisible}`]:{backgroundColor:e.alpha((e.vars||e).palette.action.selected,`${(e.vars||e).palette.action.selectedOpacity} + ${(e.vars||e).palette.action.focusOpacity}`)}}},...Object.entries(e.palette).filter(dv(["dark"])).map(([t])=>({props:{color:t,onDelete:!0},style:{[`&.${mb.focusVisible}`]:{background:(e.vars||e).palette[t].dark}}})),{props:{clickable:!0},style:{userSelect:"none",WebkitTapHighlightColor:"transparent",cursor:"pointer","&:hover":{backgroundColor:e.alpha((e.vars||e).palette.action.selected,`${(e.vars||e).palette.action.selectedOpacity} + ${(e.vars||e).palette.action.hoverOpacity}`)},[`&.${mb.focusVisible}`]:{backgroundColor:e.alpha((e.vars||e).palette.action.selected,`${(e.vars||e).palette.action.selectedOpacity} + ${(e.vars||e).palette.action.focusOpacity}`)},"&:active":{boxShadow:(e.vars||e).shadows[1]}}},...Object.entries(e.palette).filter(dv(["dark"])).map(([t])=>({props:{color:t,clickable:!0},style:{[`&:hover, &.${mb.focusVisible}`]:{backgroundColor:(e.vars||e).palette[t].dark}}})),{props:{variant:"outlined"},style:{backgroundColor:"transparent",border:e.vars?`1px solid ${e.vars.palette.Chip.defaultBorder}`:`1px solid ${"light"===e.palette.mode?e.palette.grey[400]:e.palette.grey[700]}`,[`&.${mb.clickable}:hover`]:{backgroundColor:(e.vars||e).palette.action.hover},[`&.${mb.focusVisible}`]:{backgroundColor:(e.vars||e).palette.action.focus},[`& .${mb.avatar}`]:{marginLeft:4},[`& .${mb.avatarSmall}`]:{marginLeft:2},[`& .${mb.icon}`]:{marginLeft:4},[`& .${mb.iconSmall}`]:{marginLeft:2},[`& .${mb.deleteIcon}`]:{marginRight:5},[`& .${mb.deleteIconSmall}`]:{marginRight:3}}},...Object.entries(e.palette).filter(dv()).map(([t])=>({props:{variant:"outlined",color:t},style:{color:(e.vars||e).palette[t].main,border:`1px solid ${e.alpha((e.vars||e).palette[t].main,.7)}`,[`&.${mb.clickable}:hover`]:{backgroundColor:e.alpha((e.vars||e).palette[t].main,(e.vars||e).palette.action.hoverOpacity)},[`&.${mb.focusVisible}`]:{backgroundColor:e.alpha((e.vars||e).palette[t].main,(e.vars||e).palette.action.focusOpacity)},[`& .${mb.deleteIcon}`]:{color:e.alpha((e.vars||e).palette[t].main,.7),"&:hover, &:active":{color:(e.vars||e).palette[t].main}}}}))]}})),vb=mg("span",{name:"MuiChip",slot:"Label",overridesResolver:(e,t)=>{const{ownerState:n}=e,{size:r}=n;return[t.label,t[`label${Mf(r)}`]]}})({overflow:"hidden",textOverflow:"ellipsis",paddingLeft:12,paddingRight:12,whiteSpace:"nowrap",variants:[{props:{variant:"outlined"},style:{paddingLeft:11,paddingRight:11}},{props:{size:"small"},style:{paddingLeft:8,paddingRight:8}},{props:{size:"small",variant:"outlined"},style:{paddingLeft:7,paddingRight:7}}]});function yb(e){return"Backspace"===e.key||"Delete"===e.key}const bb=l.forwardRef(function(e,t){const n=xg({props:e,name:"MuiChip"}),{avatar:r,className:o,clickable:i,color:a="default",component:s,deleteIcon:u,disabled:c=!1,icon:d,label:p,onClick:f,onDelete:h,onKeyDown:m,onKeyUp:g,size:v="medium",variant:y="filled",tabIndex:b,skipFocusWhenDisabled:w=!1,slots:x={},slotProps:k={},...S}=n,E=Lg(l.useRef(null),t),C=e=>{e.stopPropagation(),h&&h(e)},O=!(!1===i||!f)||i,T=O||h?uv:s||"div",_={...n,component:T,disabled:c,size:v,color:a,iconColor:l.isValidElement(d)&&d.props.color||a,onDelete:!!h,clickable:O,variant:y},R=(e=>{const{classes:t,disabled:n,size:r,color:o,iconColor:i,onDelete:a,clickable:s,variant:l}=e;return Cm({root:["root",l,n&&"disabled",`size${Mf(r)}`,`color${Mf(o)}`,s&&"clickable",s&&`clickableColor${Mf(o)}`,a&&"deletable",a&&`deletableColor${Mf(o)}`,`${l}${Mf(o)}`],label:["label",`label${Mf(r)}`],avatar:["avatar",`avatar${Mf(r)}`,`avatarColor${Mf(o)}`],icon:["icon",`icon${Mf(r)}`,`iconColor${Mf(i)}`],deleteIcon:["deleteIcon",`deleteIcon${Mf(r)}`,`deleteIconColor${Mf(o)}`,`deleteIcon${Mf(l)}Color${Mf(o)}`]},hb,t)})(_),P=T===uv?{component:s||"div",focusVisibleClassName:R.focusVisible,...h&&{disableRipple:!0}}:{};let A=null;h&&(A=u&&l.isValidElement(u)?l.cloneElement(u,{className:yg(u.props.className,R.deleteIcon),onClick:C}):cf.jsx(fb,{className:R.deleteIcon,onClick:C}));let L=null;r&&l.isValidElement(r)&&(L=l.cloneElement(r,{className:yg(R.avatar,r.props.className)}));let N=null;d&&l.isValidElement(d)&&(N=l.cloneElement(d,{className:yg(R.icon,d.props.className)}));const M={slots:x,slotProps:k},[I,F]=qg("root",{elementType:gb,externalForwardedProps:{...M,...S},ownerState:_,shouldForwardComponentProp:!0,ref:E,className:yg(R.root,o),additionalProps:{disabled:!(!O||!c)||void 0,tabIndex:w&&c?-1:b,...P},getSlotProps:e=>({...e,onClick:t=>{e.onClick?.(t),f?.(t)},onKeyDown:t=>{e.onKeyDown?.(t),(e=>{e.currentTarget===e.target&&yb(e)&&e.preventDefault(),m&&m(e)})(t)},onKeyUp:t=>{e.onKeyUp?.(t),(e=>{e.currentTarget===e.target&&h&&yb(e)&&h(e),g&&g(e)})(t)}})}),[$,j]=qg("label",{elementType:vb,externalForwardedProps:M,ownerState:_,className:R.label});return cf.jsxs(I,{as:T,...F,children:[L||N,cf.jsx($,{...j,children:p}),A]})});function wb(e){return parseInt(e,10)||0}const xb={visibility:"hidden",position:"absolute",overflow:"hidden",height:0,top:0,left:0,transform:"translateZ(0)"};function kb(e){return function(e){for(const t in e)return!1;return!0}(e)||0===e.outerHeightStyle&&!e.overflowing}const Sb=l.forwardRef(function(e,t){const{onChange:n,maxRows:r,minRows:o=1,style:i,value:a,...s}=e,{current:u}=l.useRef(null!=a),c=l.useRef(null),d=Lg(t,c),p=l.useRef(null),f=l.useRef(null),h=l.useCallback(()=>{const t=c.current,n=f.current;if(!t||!n)return;const i=_g(t).getComputedStyle(t);if("0px"===i.width)return{outerHeightStyle:0,overflowing:!1};n.style.width=i.width,n.value=t.value||e.placeholder||"x","\n"===n.value.slice(-1)&&(n.value+=" ");const a=i.boxSizing,s=wb(i.paddingBottom)+wb(i.paddingTop),l=wb(i.borderBottomWidth)+wb(i.borderTopWidth),u=n.scrollHeight;n.value="x";const d=n.scrollHeight;let p=u;o&&(p=Math.max(Number(o)*d,p)),r&&(p=Math.min(Number(r)*d,p)),p=Math.max(p,d);return{outerHeightStyle:p+("border-box"===a?s+l:0),overflowing:Math.abs(p-u)<=1}},[r,o,e.placeholder]),m=Ag(()=>{const e=c.current,t=h();if(!e||!t||kb(t))return!1;const n=t.outerHeightStyle;return null!=p.current&&p.current!==n}),g=l.useCallback(()=>{const e=c.current,t=h();if(!e||!t||kb(t))return;const n=t.outerHeightStyle;p.current!==n&&(p.current=n,e.style.height=`${n}px`),e.style.overflow=t.overflowing?"hidden":""},[h]),v=l.useRef(-1);em(()=>{const e=Og(g),t=c?.current;if(!t)return;const n=_g(t);let r;return n.addEventListener("resize",e),"undefined"!=typeof ResizeObserver&&(r=new ResizeObserver(()=>{m()&&(r.unobserve(t),cancelAnimationFrame(v.current),g(),v.current=requestAnimationFrame(()=>{r.observe(t)}))}),r.observe(t)),()=>{e.clear(),cancelAnimationFrame(v.current),n.removeEventListener("resize",e),r&&r.disconnect()}},[h,g,m]),em(()=>{g()});return cf.jsxs(l.Fragment,{children:[cf.jsx("textarea",{value:a,onChange:e=>{u||g();const t=e.target,r=t.value.length,o=t.value.endsWith("\n"),i=t.selectionStart===r;o&&i&&t.setSelectionRange(r,r),n&&n(e)},ref:d,rows:o,style:i,...s}),cf.jsx("textarea",{"aria-hidden":!0,className:e.className,readOnly:!0,ref:f,tabIndex:-1,style:{...xb,...i,paddingTop:0,paddingBottom:0}})]})});function Eb({props:e,states:t,muiFormControl:n}){return t.reduce((t,r)=>(t[r]=e[r],n&&void 0===e[r]&&(t[r]=n[r]),t),{})}const Cb=l.createContext(void 0);function Ob(){return l.useContext(Cb)}function Tb(e){return null!=e&&!(Array.isArray(e)&&0===e.length)}function _b(e,t=!1){return e&&(Tb(e.value)&&""!==e.value||t&&Tb(e.defaultValue)&&""!==e.defaultValue)}function Rb(e){return Bh("MuiInputBase",e)}const Pb=Dh("MuiInputBase",["root","formControl","focused","disabled","adornedStart","adornedEnd","error","sizeSmall","multiline","colorSecondary","fullWidth","hiddenLabel","readOnly","input","inputSizeSmall","inputMultiline","inputTypeSearch","inputAdornedStart","inputAdornedEnd","inputHiddenLabel"]);var Ab;const Lb=(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${Mf(n.color)}`],n.fullWidth&&t.fullWidth,n.hiddenLabel&&t.hiddenLabel]},Nb=(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]},Mb=mg("div",{name:"MuiInputBase",slot:"Root",overridesResolver:Lb})(wg(({theme:e})=>({...e.typography.body1,color:(e.vars||e).palette.text.primary,lineHeight:"1.4375em",boxSizing:"border-box",position:"relative",cursor:"text",display:"inline-flex",alignItems:"center",[`&.${Pb.disabled}`]:{color:(e.vars||e).palette.text.disabled,cursor:"default"},variants:[{props:({ownerState:e})=>e.multiline,style:{padding:"4px 0 5px"}},{props:({ownerState:e,size:t})=>e.multiline&&"small"===t,style:{paddingTop:1}},{props:({ownerState:e})=>e.fullWidth,style:{width:"100%"}}]}))),Ib=mg("input",{name:"MuiInputBase",slot:"Input",overridesResolver:Nb})(wg(({theme:e})=>{const t="light"===e.palette.mode,n={color:"currentColor",...e.vars?{opacity:e.vars.opacity.inputPlaceholder}:{opacity:t?.42:.5},transition:e.transitions.create("opacity",{duration:e.transitions.duration.shorter})},r={opacity:"0 !important"},o=e.vars?{opacity:e.vars.opacity.inputPlaceholder}:{opacity:t?.42:.5};return{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%","&::-webkit-input-placeholder":n,"&::-moz-placeholder":n,"&::-ms-input-placeholder":n,"&:focus":{outline:0},"&:invalid":{boxShadow:"none"},"&::-webkit-search-decoration":{WebkitAppearance:"none"},[`label[data-shrink=false] + .${Pb.formControl} &`]:{"&::-webkit-input-placeholder":r,"&::-moz-placeholder":r,"&::-ms-input-placeholder":r,"&:focus::-webkit-input-placeholder":o,"&:focus::-moz-placeholder":o,"&:focus::-ms-input-placeholder":o},[`&.${Pb.disabled}`]:{opacity:1,WebkitTextFillColor:(e.vars||e).palette.text.disabled},variants:[{props:({ownerState:e})=>!e.disableInjectingGlobalStyles,style:{animationName:"mui-auto-fill-cancel",animationDuration:"10ms","&:-webkit-autofill":{animationDuration:"5000s",animationName:"mui-auto-fill"}}},{props:{size:"small"},style:{paddingTop:1}},{props:({ownerState:e})=>e.multiline,style:{height:"auto",resize:"none",padding:0,paddingTop:0}},{props:{type:"search"},style:{MozAppearance:"textfield"}}]}})),Fb=function(e){return function(t){return cf.jsx(bg,{styles:"function"==typeof e?n=>e({theme:n,...t}):e})}}({"@keyframes mui-auto-fill":{from:{display:"block"}},"@keyframes mui-auto-fill-cancel":{from:{display:"block"}}}),$b=l.forwardRef(function(e,t){const n=xg({props:e,name:"MuiInputBase"}),{"aria-describedby":r,autoComplete:o,autoFocus:i,className:a,color:s,components:u={},componentsProps:c={},defaultValue:d,disabled:p,disableInjectingGlobalStyles:f,endAdornment:h,error:m,fullWidth:g=!1,id:v,inputComponent:y="input",inputProps:b={},inputRef:w,margin:x,maxRows:k,minRows:S,multiline:E=!1,name:C,onBlur:O,onChange:T,onClick:_,onFocus:R,onKeyDown:P,onKeyUp:A,placeholder:L,readOnly:N,renderSuffix:M,rows:I,size:F,slotProps:$={},slots:j={},startAdornment:z,type:B="text",value:D,...W}=n,U=null!=b.value?b.value:D,{current:V}=l.useRef(null!=U),K=l.useRef(),H=l.useCallback(e=>{},[]),q=Lg(K,w,b.ref,H),[G,Y]=l.useState(!1),X=Ob(),Q=Eb({props:n,muiFormControl:X,states:["color","disabled","error","hiddenLabel","size","required","filled"]});Q.focused=X?X.focused:G,l.useEffect(()=>{!X&&p&&G&&(Y(!1),O&&O())},[X,p,G,O]);const J=X&&X.onFilled,Z=X&&X.onEmpty,ee=l.useCallback(e=>{_b(e)?J&&J():Z&&Z()},[J,Z]);em(()=>{V&&ee({value:U})},[U,ee,V]);l.useEffect(()=>{ee(K.current)},[]);let te=y,ne=b;E&&"input"===te&&(ne=I?{type:void 0,minRows:I,maxRows:I,...ne}:{type:void 0,maxRows:k,minRows:S,...ne},te=Sb);l.useEffect(()=>{X&&X.setAdornedStart(Boolean(z))},[X,z]);const re={...n,color:Q.color||"primary",disabled:Q.disabled,endAdornment:h,error:Q.error,focused:Q.focused,formControl:X,fullWidth:g,hiddenLabel:Q.hiddenLabel,multiline:E,size:Q.size,startAdornment:z,type:B},oe=(e=>{const{classes:t,color:n,disabled:r,error:o,endAdornment:i,focused:a,formControl:s,fullWidth:l,hiddenLabel:u,multiline:c,readOnly:d,size:p,startAdornment:f,type:h}=e;return Cm({root:["root",`color${Mf(n)}`,r&&"disabled",o&&"error",l&&"fullWidth",a&&"focused",s&&"formControl",p&&"medium"!==p&&`size${Mf(p)}`,c&&"multiline",f&&"adornedStart",i&&"adornedEnd",u&&"hiddenLabel",d&&"readOnly"],input:["input",r&&"disabled","search"===h&&"inputTypeSearch",c&&"inputMultiline","small"===p&&"inputSizeSmall",u&&"inputHiddenLabel",f&&"inputAdornedStart",i&&"inputAdornedEnd",d&&"readOnly"]},Rb,t)})(re),ie=j.root||u.Root||Mb,ae=$.root||c.root||{},se=j.input||u.Input||Ib;return ne={...ne,...$.input??c.input},cf.jsxs(l.Fragment,{children:[!f&&"function"==typeof Fb&&(Ab||(Ab=cf.jsx(Fb,{}))),cf.jsxs(ie,{...ae,ref:t,onClick:e=>{K.current&&e.currentTarget===e.target&&K.current.focus(),_&&_(e)},...W,...!Dg(ie)&&{ownerState:{...re,...ae.ownerState}},className:yg(oe.root,ae.className,a,N&&"MuiInputBase-readOnly"),children:[z,cf.jsx(Cb.Provider,{value:null,children:cf.jsx(se,{"aria-invalid":Q.error,"aria-describedby":r,autoComplete:o,autoFocus:i,defaultValue:d,disabled:Q.disabled,id:v,onAnimationStart:e=>{ee("mui-auto-fill-cancel"===e.animationName?K.current:{value:"x"})},name:C,placeholder:L,readOnly:N,required:Q.required,rows:I,value:U,onKeyDown:P,onKeyUp:A,type:B,...ne,...!Dg(se)&&{as:te,ownerState:{...re,...ne.ownerState}},ref:q,className:yg(oe.input,ne.className,N&&"MuiInputBase-readOnly"),onBlur:e=>{O&&O(e),b.onBlur&&b.onBlur(e),X&&X.onBlur?X.onBlur(e):Y(!1)},onChange:(e,...t)=>{if(!V){const t=e.target||K.current;if(null==t)throw new Error(gd(1));ee({value:t.value})}b.onChange&&b.onChange(e,...t),T&&T(e,...t)},onFocus:e=>{R&&R(e),b.onFocus&&b.onFocus(e),X&&X.onFocus?X.onFocus(e):Y(!0)}})}),h,M?M({...Q,startAdornment:z}):null]})]})});function jb(e){return Bh("MuiInput",e)}const zb={...Pb,...Dh("MuiInput",["root","underline","input"])};function Bb(e){return Bh("MuiOutlinedInput",e)}const Db={...Pb,...Dh("MuiOutlinedInput",["root","notchedOutline","input"])};function Wb(e){return Bh("MuiFilledInput",e)}const Ub={...Pb,...Dh("MuiFilledInput",["root","underline","input","adornedStart","adornedEnd","sizeSmall","multiline","hiddenLabel"])};var Vb=Cg(cf.jsx("path",{d:"M7 10l5 5 5-5z"}));function Kb(e){return Bh("MuiAutocomplete",e)}const Hb=Dh("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 qb,Gb;const Yb=mg("div",{name:"MuiAutocomplete",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e,{fullWidth:r,hasClearIcon:o,hasPopupIcon:i,inputFocused:a,size:s}=n;return[{[`& .${Hb.tag}`]:t.tag},{[`& .${Hb.tag}`]:t[`tagSize${Mf(s)}`]},{[`& .${Hb.inputRoot}`]:t.inputRoot},{[`& .${Hb.input}`]:t.input},{[`& .${Hb.input}`]:a&&t.inputFocused},t.root,r&&t.fullWidth,i&&t.hasPopupIcon,o&&t.hasClearIcon]}})({[`&.${Hb.focused} .${Hb.clearIndicator}`]:{visibility:"visible"},"@media (pointer: fine)":{[`&:hover .${Hb.clearIndicator}`]:{visibility:"visible"}},[`& .${Hb.tag}`]:{margin:3,maxWidth:"calc(100% - 6px)"},[`& .${Hb.inputRoot}`]:{[`.${Hb.hasPopupIcon}&, .${Hb.hasClearIcon}&`]:{paddingRight:30},[`.${Hb.hasPopupIcon}.${Hb.hasClearIcon}&`]:{paddingRight:56},[`& .${Hb.input}`]:{width:0,minWidth:30}},[`& .${zb.root}`]:{paddingBottom:1,"& .MuiInput-input":{padding:"4px 4px 4px 0px"}},[`& .${zb.root}.${Pb.sizeSmall}`]:{[`& .${zb.input}`]:{padding:"2px 4px 3px 0"}},[`& .${Db.root}`]:{padding:9,[`.${Hb.hasPopupIcon}&, .${Hb.hasClearIcon}&`]:{paddingRight:39},[`.${Hb.hasPopupIcon}.${Hb.hasClearIcon}&`]:{paddingRight:65},[`& .${Hb.input}`]:{padding:"7.5px 4px 7.5px 5px"},[`& .${Hb.endAdornment}`]:{right:9}},[`& .${Db.root}.${Pb.sizeSmall}`]:{paddingTop:6,paddingBottom:6,paddingLeft:6,[`& .${Hb.input}`]:{padding:"2.5px 4px 2.5px 8px"}},[`& .${Ub.root}`]:{paddingTop:19,paddingLeft:8,[`.${Hb.hasPopupIcon}&, .${Hb.hasClearIcon}&`]:{paddingRight:39},[`.${Hb.hasPopupIcon}.${Hb.hasClearIcon}&`]:{paddingRight:65},[`& .${Ub.input}`]:{padding:"7px 4px"},[`& .${Hb.endAdornment}`]:{right:9}},[`& .${Ub.root}.${Pb.sizeSmall}`]:{paddingBottom:1,[`& .${Ub.input}`]:{padding:"2.5px 4px"}},[`& .${Pb.hiddenLabel}`]:{paddingTop:8},[`& .${Ub.root}.${Pb.hiddenLabel}`]:{paddingTop:0,paddingBottom:0,[`& .${Hb.input}`]:{paddingTop:16,paddingBottom:17}},[`& .${Ub.root}.${Pb.hiddenLabel}.${Pb.sizeSmall}`]:{[`& .${Hb.input}`]:{paddingTop:8,paddingBottom:9}},[`& .${Hb.input}`]:{flexGrow:1,textOverflow:"ellipsis",opacity:0},variants:[{props:{fullWidth:!0},style:{width:"100%"}},{props:{size:"small"},style:{[`& .${Hb.tag}`]:{margin:2,maxWidth:"calc(100% - 4px)"}}},{props:{inputFocused:!0},style:{[`& .${Hb.input}`]:{opacity:1}}},{props:{multiple:!0},style:{[`& .${Hb.inputRoot}`]:{flexWrap:"wrap"}}}]}),Xb=mg("div",{name:"MuiAutocomplete",slot:"EndAdornment"})({position:"absolute",right:0,top:"50%",transform:"translate(0, -50%)"}),Qb=mg(Tv,{name:"MuiAutocomplete",slot:"ClearIndicator"})({marginRight:-2,padding:4,visibility:"hidden"}),Jb=mg(Tv,{name:"MuiAutocomplete",slot:"PopupIndicator",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.popupIndicator,n.popupOpen&&t.popupIndicatorOpen]}})({padding:2,marginRight:-2,variants:[{props:{popupOpen:!0},style:{transform:"rotate(180deg)"}}]}),Zb=mg(ub,{name:"MuiAutocomplete",slot:"Popper",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[{[`& .${Hb.option}`]:t.option},t.popper,n.disablePortal&&t.popperDisablePortal]}})(wg(({theme:e})=>({zIndex:(e.vars||e).zIndex.modal,variants:[{props:{disablePortal:!0},style:{position:"absolute"}}]}))),ew=mg(Xg,{name:"MuiAutocomplete",slot:"Paper"})(wg(({theme:e})=>({...e.typography.body1,overflow:"auto"}))),tw=mg("div",{name:"MuiAutocomplete",slot:"Loading"})(wg(({theme:e})=>({color:(e.vars||e).palette.text.secondary,padding:"14px 16px"}))),nw=mg("div",{name:"MuiAutocomplete",slot:"NoOptions"})(wg(({theme:e})=>({color:(e.vars||e).palette.text.secondary,padding:"14px 16px"}))),rw=mg("ul",{name:"MuiAutocomplete",slot:"Listbox"})(wg(({theme:e})=>({listStyle:"none",margin:0,padding:"8px 0",maxHeight:"40vh",overflow:"auto",position:"relative",[`& .${Hb.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,[e.breakpoints.up("sm")]:{minHeight:"auto"},[`&.${Hb.focused}`]:{backgroundColor:(e.vars||e).palette.action.hover,"@media (hover: none)":{backgroundColor:"transparent"}},'&[aria-disabled="true"]':{opacity:(e.vars||e).palette.action.disabledOpacity,pointerEvents:"none"},[`&.${Hb.focusVisible}`]:{backgroundColor:(e.vars||e).palette.action.focus},'&[aria-selected="true"]':{backgroundColor:e.alpha((e.vars||e).palette.primary.main,(e.vars||e).palette.action.selectedOpacity),[`&.${Hb.focused}`]:{backgroundColor:e.alpha((e.vars||e).palette.primary.main,`${(e.vars||e).palette.action.selectedOpacity} + ${(e.vars||e).palette.action.hoverOpacity}`),"@media (hover: none)":{backgroundColor:(e.vars||e).palette.action.selected}},[`&.${Hb.focusVisible}`]:{backgroundColor:e.alpha((e.vars||e).palette.primary.main,`${(e.vars||e).palette.action.selectedOpacity} + ${(e.vars||e).palette.action.focusOpacity}`)}}}}))),ow=mg(pb,{name:"MuiAutocomplete",slot:"GroupLabel"})(wg(({theme:e})=>({backgroundColor:(e.vars||e).palette.background.paper,top:-8}))),iw=mg("ul",{name:"MuiAutocomplete",slot:"GroupUl"})({padding:0,[`& .${Hb.option}`]:{paddingLeft:24}}),aw=l.forwardRef(function(e,t){const n=xg({props:e,name:"MuiAutocomplete"}),{autoComplete:r=!1,autoHighlight:o=!1,autoSelect:i=!1,blurOnSelect:a=!1,ChipProps:s,className:u,clearIcon:c=qb||(qb=cf.jsx(_v,{fontSize:"small"})),clearOnBlur:d=!n.freeSolo,clearOnEscape:p=!1,clearText:f="Clear",closeText:h="Close",componentsProps:m,defaultValue:g=(n.multiple?[]:null),disableClearable:v=!1,disableCloseOnSelect:y=!1,disabled:b=!1,disabledItemsFocusable:w=!1,disableListWrap:x=!1,disablePortal:k=!1,filterOptions:S,filterSelectedOptions:E=!1,forcePopupIcon:C="auto",freeSolo:O=!1,fullWidth:T=!1,getLimitTagsText:_=e=>`+${e}`,getOptionDisabled:R,getOptionKey:P,getOptionLabel:A,isOptionEqualToValue:L,groupBy:N,handleHomeEndKeys:M=!n.freeSolo,id:I,includeInputInList:F=!1,inputValue:$,limitTags:j=-1,ListboxComponent:z,ListboxProps:B,loading:D=!1,loadingText:W="Loading…",multiple:U=!1,noOptionsText:V="No options",onChange:K,onClose:H,onHighlightChange:q,onInputChange:G,onOpen:Y,open:X,openOnFocus:Q=!1,openText:J="Open",options:Z,PaperComponent:ee,PopperComponent:te,popupIcon:ne=Gb||(Gb=cf.jsx(Vb,{})),readOnly:re=!1,renderGroup:oe,renderInput:ie,renderOption:ae,renderTags:se,renderValue:le,selectOnFocus:ue=!n.freeSolo,size:ce="medium",slots:de={},slotProps:pe={},value:fe,...he}=n,{getRootProps:me,getInputProps:ge,getInputLabelProps:ve,getPopupIndicatorProps:ye,getClearProps:be,getItemProps:we,getListboxProps:xe,getOptionProps:ke,value:Se,dirty:Ee,expanded:Ce,id:Oe,popupOpen:Te,focused:_e,focusedItem:Re,anchorEl:Pe,setAnchorEl:Ae,inputValue:Le,groupedOptions:Ne}=Iv({...n,componentName:"Autocomplete"}),Me=!v&&!b&&Ee&&!re,Ie=(!O||!0===C)&&!1!==C,{onMouseDown:Fe}=ge(),{ref:$e,...je}=xe(),ze=A||(e=>e.label??e),Be={...n,disablePortal:k,expanded:Ce,focused:_e,fullWidth:T,getOptionLabel:ze,hasClearIcon:Me,hasPopupIcon:Ie,inputFocused:-1===Re,popupOpen:Te,size:ce},De=(e=>{const{classes:t,disablePortal:n,expanded:r,focused:o,fullWidth:i,hasClearIcon:a,hasPopupIcon:s,inputFocused:l,popupOpen:u,size:c}=e;return Cm({root:["root",r&&"expanded",o&&"focused",i&&"fullWidth",a&&"hasClearIcon",s&&"hasPopupIcon"],inputRoot:["inputRoot"],input:["input",l&&"inputFocused"],tag:["tag",`tagSize${Mf(c)}`],endAdornment:["endAdornment"],clearIndicator:["clearIndicator"],popupIndicator:["popupIndicator",u&&"popupIndicatorOpen"],popper:["popper",n&&"popperDisablePortal"],paper:["paper"],listbox:["listbox"],loading:["loading"],noOptions:["noOptions"],option:["option"],groupLabel:["groupLabel"],groupUl:["groupUl"]},Kb,t)})(Be),We={slots:{paper:ee,popper:te,...de},slotProps:{chip:s,listbox:B,...m,...pe}},[Ue,Ve]=qg("listbox",{elementType:rw,externalForwardedProps:We,ownerState:Be,className:De.listbox,additionalProps:je,ref:$e}),[Ke,He]=qg("paper",{elementType:Xg,externalForwardedProps:We,ownerState:Be,className:De.paper}),[qe,Ge]=qg("popper",{elementType:ub,externalForwardedProps:We,ownerState:Be,className:De.popper,additionalProps:{disablePortal:k,style:{width:Pe?Pe.clientWidth:null},role:"presentation",anchorEl:Pe,open:Te}});let Ye;const Xe=e=>({className:De.tag,disabled:b,...we(e)});if(U?Se.length>0&&(Ye=se?se(Se,Xe,Be):le?le(Se,Xe,Be):Se.map((e,t)=>{const{key:n,...r}=Xe({index:t});return cf.jsx(bb,{label:ze(e),size:ce,...r,...We.slotProps.chip},n)})):le&&null!=Se&&(Ye=le(Se,Xe,Be)),j>-1&&Array.isArray(Ye)){const e=Ye.length-j;!_e&&e>0&&(Ye=Ye.splice(0,j),Ye.push(cf.jsx("span",{className:De.tag,children:_(e)},Ye.length)))}const Qe=oe||(e=>cf.jsxs("li",{children:[cf.jsx(ow,{className:De.groupLabel,ownerState:Be,component:"div",children:e.group}),cf.jsx(iw,{className:De.groupUl,ownerState:Be,children:e.children})]},e.key)),Je=ae||((e,t)=>{const{key:n,...r}=e;return cf.jsx("li",{...r,children:ze(t)},n)}),Ze=(e,t)=>{const n=ke({option:e,index:t});return Je({...n,className:De.option},e,{selected:n["aria-selected"],index:t,inputValue:Le},Be)},et=We.slotProps.clearIndicator,tt=We.slotProps.popupIndicator;return cf.jsxs(l.Fragment,{children:[cf.jsx(Yb,{ref:t,className:yg(De.root,u),ownerState:Be,...me(he),children:ie({id:Oe,disabled:b,fullWidth:!0,size:"small"===ce?"small":void 0,InputLabelProps:ve(),InputProps:{ref:Ae,className:De.inputRoot,startAdornment:Ye,onMouseDown:e=>{e.target===e.currentTarget&&Fe(e)},...(Me||Ie)&&{endAdornment:cf.jsxs(Xb,{className:De.endAdornment,ownerState:Be,children:[Me?cf.jsx(Qb,{...be(),"aria-label":f,title:f,ownerState:Be,...et,className:yg(De.clearIndicator,et?.className),children:c}):null,Ie?cf.jsx(Jb,{...ye(),disabled:b,"aria-label":Te?h:J,title:Te?h:J,ownerState:Be,...tt,className:yg(De.popupIndicator,tt?.className),children:ne}):null]})}},inputProps:{className:De.input,disabled:b,readOnly:re,...ge()}})}),Pe?cf.jsx(Zb,{as:qe,...Ge,children:cf.jsxs(ew,{as:Ke,...He,children:[D&&0===Ne.length?cf.jsx(tw,{className:De.loading,ownerState:Be,children:W}):null,0!==Ne.length||O||D?null:cf.jsx(nw,{className:De.noOptions,ownerState:Be,role:"presentation",onMouseDown:e=>{e.preventDefault()},children:V}),Ne.length>0?cf.jsx(Ue,{as:z,...Ve,children:Ne.map((e,t)=>N?Qe({key:e.key,group:e.group,children:e.options.map((t,n)=>Ze(t,e.index+n))}):Ze(e,t))}):null]})}):null]})}),sw={entering:{opacity:1},entered:{opacity:1}},lw=l.forwardRef(function(e,t){const n=pg(),r={enter:n.transitions.duration.enteringScreen,exit:n.transitions.duration.leavingScreen},{addEndListener:o,appear:i=!0,children:a,easing:s,in:u,onEnter:c,onEntered:d,onEntering:p,onExit:f,onExited:h,onExiting:m,style:g,timeout:v=r,TransitionComponent:y=nu,...b}=e,w=l.useRef(null),x=Lg(w,tb(a),t),k=e=>t=>{if(e){const n=w.current;void 0===t?e(n):e(n,t)}},S=k(p),E=k((e,t)=>{zg(e);const r=Bg({style:g,timeout:v,easing:s},{mode:"enter"});e.style.webkitTransition=n.transitions.create("opacity",r),e.style.transition=n.transitions.create("opacity",r),c&&c(e,t)}),C=k(d),O=k(m),T=k(e=>{const t=Bg({style:g,timeout:v,easing:s},{mode:"exit"});e.style.webkitTransition=n.transitions.create("opacity",t),e.style.transition=n.transitions.create("opacity",t),f&&f(e)}),_=k(h);return cf.jsx(y,{appear:i,in:u,nodeRef:w,onEnter:E,onEntered:C,onEntering:S,onExit:T,onExited:_,onExiting:O,addEndListener:e=>{o&&o(w.current,e)},timeout:v,...b,children:(e,{ownerState:t,...n})=>l.cloneElement(a,{style:{opacity:0,visibility:"exited"!==e||u?void 0:"hidden",...sw[e],...g,...a.props.style},ref:x,...n})})});function uw(e){return Bh("MuiBackdrop",e)}Dh("MuiBackdrop",["root","invisible"]);const cw=mg("div",{name:"MuiBackdrop",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.invisible&&t.invisible]}})({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",variants:[{props:{invisible:!0},style:{backgroundColor:"transparent"}}]}),dw=l.forwardRef(function(e,t){const n=xg({props:e,name:"MuiBackdrop"}),{children:r,className:o,component:i="div",invisible:a=!1,open:s,components:l={},componentsProps:u={},slotProps:c={},slots:d={},TransitionComponent:p,transitionDuration:f,...h}=n,m={...n,component:i,invisible:a},g=(e=>{const{classes:t,invisible:n}=e;return Cm({root:["root",n&&"invisible"]},uw,t)})(m),v={component:i,slots:{transition:p,root:l.Root,...d},slotProps:{...u,...c}},[y,b]=qg("root",{elementType:cw,externalForwardedProps:v,className:yg(g.root,o),ownerState:m}),[w,x]=qg("transition",{elementType:lw,externalForwardedProps:v,ownerState:m});return cf.jsx(w,{in:s,timeout:f,...h,...x,children:cf.jsx(y,{"aria-hidden":!0,...b,classes:g,ref:t,children:r})})}),pw=Dh("MuiBox",["root"]),fw=cg(),hw=function(e={}){const{themeId:t,defaultTheme:n,defaultClassName:r="MuiBox-root",generateClassName:o}=e,i=pf("div",{shouldForwardProp:e=>"theme"!==e&&"sx"!==e&&"as"!==e})(Oh);return l.forwardRef(function(e,a){const s=Ah(n),{className:l,component:u="div",...c}=Mh(e);return cf.jsx(i,{as:u,ref:a,className:jh(l,o?o(r):r),theme:t&&s[t]||s,...c})})}({themeId:vd,defaultTheme:fw,defaultClassName:pw.root,generateClassName:Fh.generate});function mw(e){return Bh("PrivateSwitchBase",e)}Dh("PrivateSwitchBase",["root","checked","disabled","input","edgeStart","edgeEnd"]);const gw=mg(uv,{name:"MuiSwitchBase"})({padding:9,borderRadius:"50%",variants:[{props:{edge:"start",size:"small"},style:{marginLeft:-3}},{props:({edge:e,ownerState:t})=>"start"===e&&"small"!==t.size,style:{marginLeft:-12}},{props:{edge:"end",size:"small"},style:{marginRight:-3}},{props:({edge:e,ownerState:t})=>"end"===e&&"small"!==t.size,style:{marginRight:-12}}]}),vw=mg("input",{name:"MuiSwitchBase",shouldForwardProp:hg})({cursor:"inherit",position:"absolute",opacity:0,width:"100%",height:"100%",top:0,left:0,margin:0,padding:0,zIndex:1}),yw=l.forwardRef(function(e,t){const{autoFocus:n,checked:r,checkedIcon:o,defaultChecked:i,disabled:a,disableFocusRipple:s=!1,edge:l=!1,icon:u,id:c,inputProps:d,inputRef:p,name:f,onBlur:h,onChange:m,onFocus:g,readOnly:v,required:y=!1,tabIndex:b,type:w,value:x,slots:k={},slotProps:S={},...E}=e,[C,O]=Pg({controlled:r,default:Boolean(i),name:"SwitchBase",state:"checked"}),T=Ob();let _=a;T&&void 0===_&&(_=T.disabled);const R="checkbox"===w||"radio"===w,P={...e,checked:C,disabled:_,disableFocusRipple:s,edge:l},A=(e=>{const{classes:t,checked:n,disabled:r,edge:o}=e;return Cm({root:["root",n&&"checked",r&&"disabled",o&&`edge${Mf(o)}`],input:["input"]},mw,t)})(P),L={slots:k,slotProps:{input:d,...S}},[N,M]=qg("root",{ref:t,elementType:gw,className:A.root,shouldForwardComponentProp:!0,externalForwardedProps:{...L,component:"span",...E},getSlotProps:e=>({...e,onFocus:t=>{e.onFocus?.(t),(e=>{g&&g(e),T&&T.onFocus&&T.onFocus(e)})(t)},onBlur:t=>{e.onBlur?.(t),(e=>{h&&h(e),T&&T.onBlur&&T.onBlur(e)})(t)}}),ownerState:P,additionalProps:{centerRipple:!0,focusRipple:!s,disabled:_,role:void 0,tabIndex:null}}),[I,F]=qg("input",{ref:p,elementType:vw,className:A.input,externalForwardedProps:L,getSlotProps:e=>({...e,onChange:t=>{e.onChange?.(t),(e=>{if(e.nativeEvent.defaultPrevented)return;const t=e.target.checked;O(t),m&&m(e,t)})(t)}}),ownerState:P,additionalProps:{autoFocus:n,checked:r,defaultChecked:i,disabled:_,id:R?c:void 0,name:f,readOnly:v,required:y,tabIndex:b,type:w,..."checkbox"===w&&void 0===x?{}:{value:x}}});return cf.jsxs(N,{...M,children:[cf.jsx(I,{...F}),C?o:u]})});var bw=Cg(cf.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"})),ww=Cg(cf.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"})),xw=Cg(cf.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"}));function kw(e){return Bh("MuiCheckbox",e)}const Sw=Dh("MuiCheckbox",["root","checked","disabled","indeterminate","colorPrimary","colorSecondary","sizeSmall","sizeMedium"]),Ew=mg(yw,{shouldForwardProp:e=>hg(e)||"classes"===e,name:"MuiCheckbox",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.indeterminate&&t.indeterminate,t[`size${Mf(n.size)}`],"default"!==n.color&&t[`color${Mf(n.color)}`]]}})(wg(({theme:e})=>({color:(e.vars||e).palette.text.secondary,variants:[{props:{color:"default",disableRipple:!1},style:{"&:hover":{backgroundColor:e.alpha((e.vars||e).palette.action.active,(e.vars||e).palette.action.hoverOpacity)}}},...Object.entries(e.palette).filter(dv()).map(([t])=>({props:{color:t,disableRipple:!1},style:{"&:hover":{backgroundColor:e.alpha((e.vars||e).palette[t].main,(e.vars||e).palette.action.hoverOpacity)}}})),...Object.entries(e.palette).filter(dv()).map(([t])=>({props:{color:t},style:{[`&.${Sw.checked}, &.${Sw.indeterminate}`]:{color:(e.vars||e).palette[t].main},[`&.${Sw.disabled}`]:{color:(e.vars||e).palette.action.disabled}}})),{props:{disableRipple:!1},style:{"&:hover":{"@media (hover: none)":{backgroundColor:"transparent"}}}}]}))),Cw=cf.jsx(ww,{}),Ow=cf.jsx(bw,{}),Tw=cf.jsx(xw,{}),_w=l.forwardRef(function(e,t){const n=xg({props:e,name:"MuiCheckbox"}),{checkedIcon:r=Cw,color:o="primary",icon:i=Ow,indeterminate:a=!1,indeterminateIcon:s=Tw,inputProps:u,size:c="medium",disableRipple:d=!1,className:p,slots:f={},slotProps:h={},...m}=n,g=a?s:i,v=a?s:r,y={...n,disableRipple:d,color:o,indeterminate:a,size:c},b=(e=>{const{classes:t,indeterminate:n,color:r,size:o}=e,i=Cm({root:["root",n&&"indeterminate",`color${Mf(r)}`,`size${Mf(o)}`]},kw,t);return{...t,...i}})(y),w=h.input??u,[x,k]=qg("root",{ref:t,elementType:Ew,className:yg(b.root,p),shouldForwardComponentProp:!0,externalForwardedProps:{slots:f,slotProps:h,...m},ownerState:y,additionalProps:{type:"checkbox",icon:l.cloneElement(g,{fontSize:g.props.fontSize??c}),checkedIcon:l.cloneElement(v,{fontSize:v.props.fontSize??c}),disableRipple:d,slots:f,slotProps:{input:Ng("function"==typeof w?w(y):w,{"data-indeterminate":a})}}});return cf.jsx(x,{...k,classes:b})});function Rw(e=window){const t=e.document.documentElement.clientWidth;return e.innerWidth-t}function Pw(e,t){t?e.setAttribute("aria-hidden","true"):e.removeAttribute("aria-hidden")}function Aw(e){return parseInt(_g(e).getComputedStyle(e).paddingRight,10)||0}function Lw(e,t,n,r,o){const i=[t,n,...r];[].forEach.call(e.children,e=>{const t=!i.includes(e),n=!function(e){const t=["TEMPLATE","SCRIPT","STYLE","LINK","MAP","META","NOSCRIPT","PICTURE","COL","COLGROUP","PARAM","SLOT","SOURCE","TRACK"].includes(e.tagName),n="INPUT"===e.tagName&&"hidden"===e.getAttribute("type");return t||n}(e);t&&n&&Pw(e,o)})}function Nw(e,t){let n=-1;return e.some((e,r)=>!!t(e)&&(n=r,!0)),n}function Mw(e,t){const n=[],r=e.container;if(!t.disableScrollLock){if(function(e){const t=Tg(e);return t.body===e?_g(e).innerWidth>t.documentElement.clientWidth:e.scrollHeight>e.clientHeight}(r)){const e=Rw(_g(r));n.push({value:r.style.paddingRight,property:"padding-right",el:r}),r.style.paddingRight=`${Aw(r)+e}px`;const t=Tg(r).querySelectorAll(".mui-fixed");[].forEach.call(t,t=>{n.push({value:t.style.paddingRight,property:"padding-right",el:t}),t.style.paddingRight=`${Aw(t)+e}px`})}let e;if(r.parentNode instanceof DocumentFragment)e=Tg(r).body;else{const t=r.parentElement,n=_g(r);e="HTML"===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(({value:e,el:t,property:n})=>{e?t.style.setProperty(n,e):t.style.removeProperty(n)})}}const Iw=["input","select","textarea","a[href]","button","[tabindex]","audio[controls]","video[controls]",'[contenteditable]:not([contenteditable="false"])'].join(",");function Fw(e){const t=[],n=[];return Array.from(e.querySelectorAll(Iw)).forEach((e,r)=>{const o=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!==o&&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"]${t}`);let n=t(`[name="${e.name}"]:checked`);return n||(n=t(`[name="${e.name}"]`)),n!==e}(e))}(e)&&(0===o?t.push(e):n.push({documentOrder:r,tabIndex:o,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 $w(){return!0}function jw(e){const{children:t,disableAutoFocus:n=!1,disableEnforceFocus:r=!1,disableRestoreFocus:o=!1,getTabbable:i=Fw,isEnabled:a=$w,open:s}=e,u=l.useRef(!1),c=l.useRef(null),d=l.useRef(null),p=l.useRef(null),f=l.useRef(null),h=l.useRef(!1),m=l.useRef(null),g=Lg(tb(t),m),v=l.useRef(null);l.useEffect(()=>{s&&m.current&&(h.current=!n)},[n,s]),l.useEffect(()=>{if(!s||!m.current)return;const e=Tg(m.current);return m.current.contains(e.activeElement)||(m.current.hasAttribute("tabIndex")||m.current.setAttribute("tabIndex","-1"),h.current&&m.current.focus()),()=>{o||(p.current&&p.current.focus&&(u.current=!0,p.current.focus()),p.current=null)}},[s]),l.useEffect(()=>{if(!s||!m.current)return;const e=Tg(m.current),t=t=>{v.current=t,!r&&a()&&"Tab"===t.key&&e.activeElement===m.current&&t.shiftKey&&(u.current=!0,d.current&&d.current.focus())},n=()=>{const t=m.current;if(null===t)return;if(!e.hasFocus()||!a()||u.current)return void(u.current=!1);if(t.contains(e.activeElement))return;if(r&&e.activeElement!==c.current&&e.activeElement!==d.current)return;if(e.activeElement!==f.current)f.current=null;else if(null!==f.current)return;if(!h.current)return;let n=[];if(e.activeElement!==c.current&&e.activeElement!==d.current||(n=i(m.current)),n.length>0){const e=Boolean(v.current?.shiftKey&&"Tab"===v.current?.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 o=setInterval(()=>{e.activeElement&&"BODY"===e.activeElement.tagName&&n()},50);return()=>{clearInterval(o),e.removeEventListener("focusin",n),e.removeEventListener("keydown",t,!0)}},[n,r,o,a,s,i]);const y=e=>{null===p.current&&(p.current=e.relatedTarget),h.current=!0};return cf.jsxs(l.Fragment,{children:[cf.jsx("div",{tabIndex:s?0:-1,onFocus:y,ref:c,"data-testid":"sentinelStart"}),l.cloneElement(t,{ref:g,onFocus:e=>{null===p.current&&(p.current=e.relatedTarget),h.current=!0,f.current=e.target;const n=t.props.onFocus;n&&n(e)}}),cf.jsx("div",{tabIndex:s?0:-1,onFocus:y,ref:d,"data-testid":"sentinelEnd"})]})}const zw=()=>{},Bw=new class{constructor(){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&&Pw(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);Lw(t,e.mount,e.modalRef,r,!0);const o=Nw(this.containers,e=>e.container===t);return-1!==o?(this.containers[o].modals.push(e),n):(this.containers.push({modals:[e],container:t,restore:null,hiddenSiblings:r}),n)}mount(e,t){const n=Nw(this.containers,t=>t.modals.includes(e)),r=this.containers[n];r.restore||(r.restore=Mw(r,t))}remove(e,t=!0){const n=this.modals.indexOf(e);if(-1===n)return n;const r=Nw(this.containers,t=>t.modals.includes(e)),o=this.containers[r];if(o.modals.splice(o.modals.indexOf(e),1),this.modals.splice(n,1),0===o.modals.length)o.restore&&o.restore(),e.modalRef&&Pw(e.modalRef,t),Lw(o.container,e.mount,e.modalRef,o.hiddenSiblings,!1),this.containers.splice(r,1);else{const e=o.modals[o.modals.length-1];e.modalRef&&Pw(e.modalRef,!1)}return n}isTopModal(e){return this.modals.length>0&&this.modals[this.modals.length-1]===e}};function Dw(e){const{container:t,disableEscapeKeyDown:n=!1,disableScrollLock:r=!1,closeAfterTransition:o=!1,onTransitionEnter:i,onTransitionExited:a,children:s,onClose:u,open:c,rootRef:d}=e,p=l.useRef({}),f=l.useRef(null),h=l.useRef(null),m=Lg(h,d),[g,v]=l.useState(!c),y=function(e){return!!e&&e.props.hasOwnProperty("in")}(s);let b=!0;"false"!==e["aria-hidden"]&&!1!==e["aria-hidden"]||(b=!1);const w=()=>(p.current.modalRef=h.current,p.current.mount=f.current,p.current),x=()=>{Bw.mount(w(),{disableScrollLock:r}),h.current&&(h.current.scrollTop=0)},k=Ag(()=>{const e=function(e){return"function"==typeof e?e():e}(t)||Tg(f.current).body;Bw.add(w(),e),h.current&&x()}),S=()=>Bw.isTopModal(w()),E=Ag(e=>{f.current=e,e&&(c&&S()?x():h.current&&Pw(h.current,b))}),C=l.useCallback(()=>{Bw.remove(w(),b)},[b]);l.useEffect(()=>()=>{C()},[C]),l.useEffect(()=>{c?k():y&&o||C()},[c,C,y,o,k]);const O=e=>t=>{e.onKeyDown?.(t),"Escape"===t.key&&229!==t.which&&S()&&(n||(t.stopPropagation(),u&&u(t,"escapeKeyDown")))},T=e=>t=>{e.onClick?.(t),t.target===t.currentTarget&&u&&u(t,"backdropClick")};return{getRootProps:(t={})=>{const n=Vg(e);delete n.onTransitionEnter,delete n.onTransitionExited;const r={...n,...t};return{role:"presentation",...r,onKeyDown:O(r),ref:m}},getBackdropProps:(e={})=>{const t=e;return{"aria-hidden":!0,...t,onClick:T(t),open:c}},getTransitionProps:()=>({onEnter:gg(()=>{v(!1),i&&i()},s?.props.onEnter??zw),onExited:gg(()=>{v(!0),a&&a(),o&&C()},s?.props.onExited??zw)}),rootRef:m,portalRef:E,isTopModal:S,exited:g,hasTransition:y}}function Ww(e){return Bh("MuiModal",e)}Dh("MuiModal",["root","hidden","backdrop"]);const Uw=mg("div",{name:"MuiModal",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,!n.open&&n.exited&&t.hidden]}})(wg(({theme:e})=>({position:"fixed",zIndex:(e.vars||e).zIndex.modal,right:0,bottom:0,top:0,left:0,variants:[{props:({ownerState:e})=>!e.open&&e.exited,style:{visibility:"hidden"}}]}))),Vw=mg(dw,{name:"MuiModal",slot:"Backdrop"})({zIndex:-1}),Kw=l.forwardRef(function(e,t){const n=xg({name:"MuiModal",props:e}),{BackdropComponent:r=Vw,BackdropProps:o,classes:i,className:a,closeAfterTransition:s=!1,children:u,container:c,component:d,components:p={},componentsProps:f={},disableAutoFocus:h=!1,disableEnforceFocus:m=!1,disableEscapeKeyDown:g=!1,disablePortal:v=!1,disableRestoreFocus:y=!1,disableScrollLock:b=!1,hideBackdrop:w=!1,keepMounted:x=!1,onClose:k,onTransitionEnter:S,onTransitionExited:E,open:C,slotProps:O={},slots:T={},theme:_,...R}=n,P={...n,closeAfterTransition:s,disableAutoFocus:h,disableEnforceFocus:m,disableEscapeKeyDown:g,disablePortal:v,disableRestoreFocus:y,disableScrollLock:b,hideBackdrop:w,keepMounted:x},{getRootProps:A,getBackdropProps:L,getTransitionProps:N,portalRef:M,isTopModal:I,exited:F,hasTransition:$}=Dw({...P,rootRef:t}),j={...P,exited:F},z=(e=>{const{open:t,exited:n,classes:r}=e;return Cm({root:["root",!t&&n&&"hidden"],backdrop:["backdrop"]},Ww,r)})(j),B={};if(void 0===u.props.tabIndex&&(B.tabIndex="-1"),$){const{onEnter:e,onExited:t}=N();B.onEnter=e,B.onExited=t}const D={slots:{root:p.Root,backdrop:p.Backdrop,...T},slotProps:{...f,...O}},[W,U]=qg("root",{ref:t,elementType:Uw,externalForwardedProps:{...D,...R,component:d},getSlotProps:A,ownerState:j,className:yg(a,z?.root,!j.open&&j.exited&&z?.hidden)}),[V,K]=qg("backdrop",{ref:o?.ref,elementType:r,externalForwardedProps:D,shouldForwardComponentProp:!0,additionalProps:o,getSlotProps:e=>L({...e,onClick:t=>{e?.onClick&&e.onClick(t)}}),className:yg(o?.className,z?.backdrop),ownerState:j});return x||C||$&&!F?cf.jsx(nb,{ref:M,container:c,disablePortal:v,children:cf.jsxs(W,{...U,children:[!w&&r?cf.jsx(V,{...K}):null,cf.jsx(jw,{disableEnforceFocus:m,disableAutoFocus:h,disableRestoreFocus:y,isEnabled:I,open:C,children:l.cloneElement(u,B)})]})}):null}),Hw=Dh("MuiDivider",["root","absolute","fullWidth","inset","middle","flexItem","light","vertical","withChildren","withChildrenVertical","textAlignRight","textAlignLeft","wrapper","wrapperVertical"]),qw=mg(Mb,{shouldForwardProp:e=>hg(e)||"classes"===e,name:"MuiFilledInput",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[...Lb(e,t),!n.disableUnderline&&t.underline]}})(wg(({theme:e})=>{const t="light"===e.palette.mode,n=t?"rgba(0, 0, 0, 0.42)":"rgba(255, 255, 255, 0.7)",r=t?"rgba(0, 0, 0, 0.06)":"rgba(255, 255, 255, 0.09)",o=t?"rgba(0, 0, 0, 0.09)":"rgba(255, 255, 255, 0.13)",i=t?"rgba(0, 0, 0, 0.12)":"rgba(255, 255, 255, 0.12)";return{position:"relative",backgroundColor:e.vars?e.vars.palette.FilledInput.bg:r,borderTopLeftRadius:(e.vars||e).shape.borderRadius,borderTopRightRadius:(e.vars||e).shape.borderRadius,transition:e.transitions.create("background-color",{duration:e.transitions.duration.shorter,easing:e.transitions.easing.easeOut}),"&:hover":{backgroundColor:e.vars?e.vars.palette.FilledInput.hoverBg:o,"@media (hover: none)":{backgroundColor:e.vars?e.vars.palette.FilledInput.bg:r}},[`&.${Ub.focused}`]:{backgroundColor:e.vars?e.vars.palette.FilledInput.bg:r},[`&.${Ub.disabled}`]:{backgroundColor:e.vars?e.vars.palette.FilledInput.disabledBg:i},variants:[{props:({ownerState:e})=>!e.disableUnderline,style:{"&::after":{left:0,bottom:0,content:'""',position:"absolute",right:0,transform:"scaleX(0)",transition:e.transitions.create("transform",{duration:e.transitions.duration.shorter,easing:e.transitions.easing.easeOut}),pointerEvents:"none"},[`&.${Ub.focused}:after`]:{transform:"scaleX(1) translateX(0)"},[`&.${Ub.error}`]:{"&::before, &::after":{borderBottomColor:(e.vars||e).palette.error.main}},"&::before":{borderBottom:`1px solid ${e.vars?e.alpha(e.vars.palette.common.onBackground,e.vars.opacity.inputUnderline):n}`,left:0,bottom:0,content:'"\\00a0"',position:"absolute",right:0,transition:e.transitions.create("border-bottom-color",{duration:e.transitions.duration.shorter}),pointerEvents:"none"},[`&:hover:not(.${Ub.disabled}, .${Ub.error}):before`]:{borderBottom:`1px solid ${(e.vars||e).palette.text.primary}`},[`&.${Ub.disabled}:before`]:{borderBottomStyle:"dotted"}}},...Object.entries(e.palette).filter(dv()).map(([t])=>({props:{disableUnderline:!1,color:t},style:{"&::after":{borderBottom:`2px solid ${(e.vars||e).palette[t]?.main}`}}})),{props:({ownerState:e})=>e.startAdornment,style:{paddingLeft:12}},{props:({ownerState:e})=>e.endAdornment,style:{paddingRight:12}},{props:({ownerState:e})=>e.multiline,style:{padding:"25px 12px 8px"}},{props:({ownerState:e,size:t})=>e.multiline&&"small"===t,style:{paddingTop:21,paddingBottom:4}},{props:({ownerState:e})=>e.multiline&&e.hiddenLabel,style:{paddingTop:16,paddingBottom:17}},{props:({ownerState:e})=>e.multiline&&e.hiddenLabel&&"small"===e.size,style:{paddingTop:8,paddingBottom:9}}]}})),Gw=mg(Ib,{name:"MuiFilledInput",slot:"Input",overridesResolver:Nb})(wg(({theme:e})=>({paddingTop:25,paddingRight:12,paddingBottom:8,paddingLeft:12,...!e.vars&&{"&:-webkit-autofill":{WebkitBoxShadow:"light"===e.palette.mode?null:"0 0 0 100px #266798 inset",WebkitTextFillColor:"light"===e.palette.mode?null:"#fff",caretColor:"light"===e.palette.mode?null:"#fff",borderTopLeftRadius:"inherit",borderTopRightRadius:"inherit"}},...e.vars&&{"&:-webkit-autofill":{borderTopLeftRadius:"inherit",borderTopRightRadius:"inherit"},[e.getColorSchemeSelector("dark")]:{"&:-webkit-autofill":{WebkitBoxShadow:"0 0 0 100px #266798 inset",WebkitTextFillColor:"#fff",caretColor:"#fff"}}},variants:[{props:{size:"small"},style:{paddingTop:21,paddingBottom:4}},{props:({ownerState:e})=>e.hiddenLabel,style:{paddingTop:16,paddingBottom:17}},{props:({ownerState:e})=>e.startAdornment,style:{paddingLeft:0}},{props:({ownerState:e})=>e.endAdornment,style:{paddingRight:0}},{props:({ownerState:e})=>e.hiddenLabel&&"small"===e.size,style:{paddingTop:8,paddingBottom:9}},{props:({ownerState:e})=>e.multiline,style:{paddingTop:0,paddingBottom:0,paddingLeft:0,paddingRight:0}}]}))),Yw=l.forwardRef(function(e,t){const n=xg({props:e,name:"MuiFilledInput"}),{disableUnderline:r=!1,components:o={},componentsProps:i,fullWidth:a=!1,hiddenLabel:s,inputComponent:l="input",multiline:u=!1,slotProps:c,slots:d={},type:p="text",...f}=n,h={...n,disableUnderline:r,fullWidth:a,inputComponent:l,multiline:u,type:p},m=(e=>{const{classes:t,disableUnderline:n,startAdornment:r,endAdornment:o,size:i,hiddenLabel:a,multiline:s}=e,l=Cm({root:["root",!n&&"underline",r&&"adornedStart",o&&"adornedEnd","small"===i&&`size${Mf(i)}`,a&&"hiddenLabel",s&&"multiline"],input:["input"]},Wb,t);return{...t,...l}})(n),g={root:{ownerState:h},input:{ownerState:h}},v=c??i?Ef(g,c??i):g,y=d.root??o.Root??qw,b=d.input??o.Input??Gw;return cf.jsx($b,{slots:{root:y,input:b},slotProps:v,fullWidth:a,inputComponent:l,multiline:u,ref:t,type:p,...f,classes:m})});function Xw(e){return Bh("MuiFormControl",e)}Yw.muiName="Input",Dh("MuiFormControl",["root","marginNone","marginNormal","marginDense","fullWidth","disabled"]);const Qw=mg("div",{name:"MuiFormControl",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[`margin${Mf(n.margin)}`],n.fullWidth&&t.fullWidth]}})({display:"inline-flex",flexDirection:"column",position:"relative",minWidth:0,padding:0,margin:0,border:0,verticalAlign:"top",variants:[{props:{margin:"normal"},style:{marginTop:16,marginBottom:8}},{props:{margin:"dense"},style:{marginTop:8,marginBottom:4}},{props:{fullWidth:!0},style:{width:"100%"}}]}),Jw=l.forwardRef(function(e,t){const n=xg({props:e,name:"MuiFormControl"}),{children:r,className:o,color:i="primary",component:a="div",disabled:s=!1,error:u=!1,focused:c,fullWidth:d=!1,hiddenLabel:p=!1,margin:f="none",required:h=!1,size:m="medium",variant:g="outlined",...v}=n,y={...n,color:i,component:a,disabled:s,error:u,fullWidth:d,hiddenLabel:p,margin:f,required:h,size:m,variant:g},b=(e=>{const{classes:t,margin:n,fullWidth:r}=e;return Cm({root:["root","none"!==n&&`margin${Mf(n)}`,r&&"fullWidth"]},Xw,t)})(y),[w,x]=l.useState(()=>{let e=!1;return r&&l.Children.forEach(r,t=>{if(!Om(t,["Input","Select"]))return;const n=Om(t,["Select"])?t.props.input:t;n&&n.props.startAdornment&&(e=!0)}),e}),[k,S]=l.useState(()=>{let e=!1;return r&&l.Children.forEach(r,t=>{Om(t,["Input","Select"])&&(_b(t.props,!0)||_b(t.props.inputProps,!0))&&(e=!0)}),e}),[E,C]=l.useState(!1);s&&E&&C(!1);const O=void 0===c||s?E:c;let T;l.useRef(!1);const _=l.useCallback(()=>{S(!0)},[]),R=l.useCallback(()=>{S(!1)},[]),P=l.useMemo(()=>({adornedStart:w,setAdornedStart:x,color:i,disabled:s,error:u,filled:k,focused:O,fullWidth:d,hiddenLabel:p,size:m,onBlur:()=>{C(!1)},onFocus:()=>{C(!0)},onEmpty:R,onFilled:_,registerEffect:T,required:h,variant:g}),[w,i,s,u,k,O,d,p,T,R,_,h,m,g]);return cf.jsx(Cb.Provider,{value:P,children:cf.jsx(Qw,{as:a,ownerState:y,className:yg(b.root,o),ref:t,...v,children:r})})});function Zw(e){return Bh("MuiFormHelperText",e)}const ex=Dh("MuiFormHelperText",["root","error","disabled","sizeSmall","sizeMedium","contained","focused","filled","required"]);var tx;const nx=mg("p",{name:"MuiFormHelperText",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.size&&t[`size${Mf(n.size)}`],n.contained&&t.contained,n.filled&&t.filled]}})(wg(({theme:e})=>({color:(e.vars||e).palette.text.secondary,...e.typography.caption,textAlign:"left",marginTop:3,marginRight:0,marginBottom:0,marginLeft:0,[`&.${ex.disabled}`]:{color:(e.vars||e).palette.text.disabled},[`&.${ex.error}`]:{color:(e.vars||e).palette.error.main},variants:[{props:{size:"small"},style:{marginTop:4}},{props:({ownerState:e})=>e.contained,style:{marginLeft:14,marginRight:14}}]}))),rx=l.forwardRef(function(e,t){const n=xg({props:e,name:"MuiFormHelperText"}),{children:r,className:o,component:i="p",disabled:a,error:s,filled:l,focused:u,margin:c,required:d,variant:p,...f}=n,h=Eb({props:n,muiFormControl:Ob(),states:["variant","size","disabled","error","filled","focused","required"]}),m={...n,component:i,contained:"filled"===h.variant||"outlined"===h.variant,variant:h.variant,size:h.size,disabled:h.disabled,error:h.error,filled:h.filled,focused:h.focused,required:h.required};delete m.ownerState;const g=(e=>{const{classes:t,contained:n,size:r,disabled:o,error:i,filled:a,focused:s,required:l}=e;return Cm({root:["root",o&&"disabled",i&&"error",r&&`size${Mf(r)}`,n&&"contained",s&&"focused",a&&"filled",l&&"required"]},Zw,t)})(m);return cf.jsx(nx,{as:i,className:yg(g.root,o),ref:t,...f,ownerState:m,children:" "===r?tx||(tx=cf.jsx("span",{className:"notranslate","aria-hidden":!0,children:"​"})):r})});function ox(e){return Bh("MuiFormLabel",e)}const ix=Dh("MuiFormLabel",["root","colorSecondary","focused","disabled","error","filled","required","asterisk"]),ax=mg("label",{name:"MuiFormLabel",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,"secondary"===n.color&&t.colorSecondary,n.filled&&t.filled]}})(wg(({theme:e})=>({color:(e.vars||e).palette.text.secondary,...e.typography.body1,lineHeight:"1.4375em",padding:0,position:"relative",variants:[...Object.entries(e.palette).filter(dv()).map(([t])=>({props:{color:t},style:{[`&.${ix.focused}`]:{color:(e.vars||e).palette[t].main}}})),{props:{},style:{[`&.${ix.disabled}`]:{color:(e.vars||e).palette.text.disabled},[`&.${ix.error}`]:{color:(e.vars||e).palette.error.main}}}]}))),sx=mg("span",{name:"MuiFormLabel",slot:"Asterisk"})(wg(({theme:e})=>({[`&.${ix.error}`]:{color:(e.vars||e).palette.error.main}}))),lx=l.forwardRef(function(e,t){const n=xg({props:e,name:"MuiFormLabel"}),{children:r,className:o,color:i,component:a="label",disabled:s,error:l,filled:u,focused:c,required:d,...p}=n,f=Eb({props:n,muiFormControl:Ob(),states:["color","required","focused","disabled","error","filled"]}),h={...n,color:f.color||"primary",component:a,disabled:f.disabled,error:f.error,filled:f.filled,focused:f.focused,required:f.required},m=(e=>{const{classes:t,color:n,focused:r,disabled:o,error:i,filled:a,required:s}=e;return Cm({root:["root",`color${Mf(n)}`,o&&"disabled",i&&"error",a&&"filled",r&&"focused",s&&"required"],asterisk:["asterisk",i&&"error"]},ox,t)})(h);return cf.jsxs(ax,{as:a,ownerState:h,className:yg(m.root,o),ref:t,...p,children:[r,f.required&&cf.jsxs(sx,{ownerState:h,"aria-hidden":!0,className:m.asterisk,children:[" ","*"]})]})});function ux(e){return`scale(${e}, ${e**2})`}const cx={entering:{opacity:1,transform:ux(1)},entered:{opacity:1,transform:"none"}},dx="undefined"!=typeof navigator&&/^((?!chrome|android).)*(safari|mobile)/i.test(navigator.userAgent)&&/(os |version\/)15(.|_)4/i.test(navigator.userAgent),px=l.forwardRef(function(e,t){const{addEndListener:n,appear:r=!0,children:o,easing:i,in:a,onEnter:s,onEntered:u,onEntering:c,onExit:d,onExited:p,onExiting:f,style:h,timeout:m="auto",TransitionComponent:g=nu,...v}=e,y=jg(),b=l.useRef(),w=pg(),x=l.useRef(null),k=Lg(x,tb(o),t),S=e=>t=>{if(e){const n=x.current;void 0===t?e(n):e(n,t)}},E=S(c),C=S((e,t)=>{zg(e);const{duration:n,delay:r,easing:o}=Bg({style:h,timeout:m,easing:i},{mode:"enter"});let a;"auto"===m?(a=w.transitions.getAutoHeightDuration(e.clientHeight),b.current=a):a=n,e.style.transition=[w.transitions.create("opacity",{duration:a,delay:r}),w.transitions.create("transform",{duration:dx?a:.666*a,delay:r,easing:o})].join(","),s&&s(e,t)}),O=S(u),T=S(f),_=S(e=>{const{duration:t,delay:n,easing:r}=Bg({style:h,timeout:m,easing:i},{mode:"exit"});let o;"auto"===m?(o=w.transitions.getAutoHeightDuration(e.clientHeight),b.current=o):o=t,e.style.transition=[w.transitions.create("opacity",{duration:o,delay:n}),w.transitions.create("transform",{duration:dx?o:.666*o,delay:dx?n:n||.333*o,easing:r})].join(","),e.style.opacity=0,e.style.transform=ux(.75),d&&d(e)}),R=S(p);return cf.jsx(g,{appear:r,in:a,nodeRef:x,onEnter:C,onEntered:O,onEntering:E,onExit:_,onExited:R,onExiting:T,addEndListener:e=>{"auto"===m&&y.start(b.current||0,e),n&&n(x.current,e)},timeout:"auto"===m?null:m,...v,children:(e,{ownerState:t,...n})=>l.cloneElement(o,{style:{opacity:0,transform:ux(.75),visibility:"exited"!==e||a?void 0:"hidden",...cx[e],...h,...o.props.style},ref:k,...n})})});px&&(px.muiSupportAuto=!0);const fx=mg(Mb,{shouldForwardProp:e=>hg(e)||"classes"===e,name:"MuiInput",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[...Lb(e,t),!n.disableUnderline&&t.underline]}})(wg(({theme:e})=>{let t="light"===e.palette.mode?"rgba(0, 0, 0, 0.42)":"rgba(255, 255, 255, 0.7)";return e.vars&&(t=e.alpha(e.vars.palette.common.onBackground,e.vars.opacity.inputUnderline)),{position:"relative",variants:[{props:({ownerState:e})=>e.formControl,style:{"label + &":{marginTop:16}}},{props:({ownerState:e})=>!e.disableUnderline,style:{"&::after":{left:0,bottom:0,content:'""',position:"absolute",right:0,transform:"scaleX(0)",transition:e.transitions.create("transform",{duration:e.transitions.duration.shorter,easing:e.transitions.easing.easeOut}),pointerEvents:"none"},[`&.${zb.focused}:after`]:{transform:"scaleX(1) translateX(0)"},[`&.${zb.error}`]:{"&::before, &::after":{borderBottomColor:(e.vars||e).palette.error.main}},"&::before":{borderBottom:`1px solid ${t}`,left:0,bottom:0,content:'"\\00a0"',position:"absolute",right:0,transition:e.transitions.create("border-bottom-color",{duration:e.transitions.duration.shorter}),pointerEvents:"none"},[`&:hover:not(.${zb.disabled}, .${zb.error}):before`]:{borderBottom:`2px solid ${(e.vars||e).palette.text.primary}`,"@media (hover: none)":{borderBottom:`1px solid ${t}`}},[`&.${zb.disabled}:before`]:{borderBottomStyle:"dotted"}}},...Object.entries(e.palette).filter(dv()).map(([t])=>({props:{color:t,disableUnderline:!1},style:{"&::after":{borderBottom:`2px solid ${(e.vars||e).palette[t].main}`}}}))]}})),hx=mg(Ib,{name:"MuiInput",slot:"Input",overridesResolver:Nb})({}),mx=l.forwardRef(function(e,t){const n=xg({props:e,name:"MuiInput"}),{disableUnderline:r=!1,components:o={},componentsProps:i,fullWidth:a=!1,inputComponent:s="input",multiline:l=!1,slotProps:u,slots:c={},type:d="text",...p}=n,f=(e=>{const{classes:t,disableUnderline:n}=e,r=Cm({root:["root",!n&&"underline"],input:["input"]},jb,t);return{...t,...r}})(n),h={root:{ownerState:{disableUnderline:r}}},m=u??i?Ef(u??i,h):h,g=c.root??o.Root??fx,v=c.input??o.Input??hx;return cf.jsx($b,{slots:{root:g,input:v},slotProps:m,fullWidth:a,inputComponent:s,multiline:l,ref:t,type:d,...p,classes:f})});function gx(e){return Bh("MuiInputLabel",e)}mx.muiName="Input",Dh("MuiInputLabel",["root","focused","disabled","error","required","asterisk","formControl","sizeSmall","shrink","animated","standard","filled","outlined"]);const vx=mg(lx,{shouldForwardProp:e=>hg(e)||"classes"===e,name:"MuiInputLabel",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[{[`& .${ix.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]]}})(wg(({theme:e})=>({display:"block",transformOrigin:"top left",whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis",maxWidth:"100%",variants:[{props:({ownerState:e})=>e.formControl,style:{position:"absolute",left:0,top:0,transform:"translate(0, 20px) scale(1)"}},{props:{size:"small"},style:{transform:"translate(0, 17px) scale(1)"}},{props:({ownerState:e})=>e.shrink,style:{transform:"translate(0, -1.5px) scale(0.75)",transformOrigin:"top left",maxWidth:"133%"}},{props:({ownerState:e})=>!e.disableAnimation,style:{transition:e.transitions.create(["color","transform","max-width"],{duration:e.transitions.duration.shorter,easing:e.transitions.easing.easeOut})}},{props:{variant:"filled"},style:{zIndex:1,pointerEvents:"none",transform:"translate(12px, 16px) scale(1)",maxWidth:"calc(100% - 24px)"}},{props:{variant:"filled",size:"small"},style:{transform:"translate(12px, 13px) scale(1)"}},{props:({variant:e,ownerState:t})=>"filled"===e&&t.shrink,style:{userSelect:"none",pointerEvents:"auto",transform:"translate(12px, 7px) scale(0.75)",maxWidth:"calc(133% - 24px)"}},{props:({variant:e,ownerState:t,size:n})=>"filled"===e&&t.shrink&&"small"===n,style:{transform:"translate(12px, 4px) scale(0.75)"}},{props:{variant:"outlined"},style:{zIndex:1,pointerEvents:"none",transform:"translate(14px, 16px) scale(1)",maxWidth:"calc(100% - 24px)"}},{props:{variant:"outlined",size:"small"},style:{transform:"translate(14px, 9px) scale(1)"}},{props:({variant:e,ownerState:t})=>"outlined"===e&&t.shrink,style:{userSelect:"none",pointerEvents:"auto",maxWidth:"calc(133% - 32px)",transform:"translate(14px, -9px) scale(0.75)"}}]}))),yx=l.forwardRef(function(e,t){const n=xg({name:"MuiInputLabel",props:e}),{disableAnimation:r=!1,margin:o,shrink:i,variant:a,className:s,...l}=n,u=Ob();let c=i;void 0===c&&u&&(c=u.filled||u.focused||u.adornedStart);const d=Eb({props:n,muiFormControl:u,states:["size","variant","required","focused"]}),p={...n,disableAnimation:r,formControl:u,shrink:c,size:d.size,variant:d.variant,required:d.required,focused:d.focused},f=(e=>{const{classes:t,formControl:n,size:r,shrink:o,disableAnimation:i,variant:a,required:s}=e,l=Cm({root:["root",n&&"formControl",!i&&"animated",o&&"shrink",r&&"medium"!==r&&`size${Mf(r)}`,a],asterisk:[s&&"asterisk"]},gx,t);return{...t,...l}})(p);return cf.jsx(vx,{"data-shrink":c,ref:t,className:yg(f.root,s),...l,ownerState:p,classes:f})}),bx=l.createContext({});function wx(e){return Bh("MuiList",e)}Dh("MuiList",["root","padding","dense","subheader"]);const xx=mg("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]}})({listStyle:"none",margin:0,padding:0,position:"relative",variants:[{props:({ownerState:e})=>!e.disablePadding,style:{paddingTop:8,paddingBottom:8}},{props:({ownerState:e})=>e.subheader,style:{paddingTop:0}}]}),kx=l.forwardRef(function(e,t){const n=xg({props:e,name:"MuiList"}),{children:r,className:o,component:i="ul",dense:a=!1,disablePadding:s=!1,subheader:u,...c}=n,d=l.useMemo(()=>({dense:a}),[a]),p={...n,component:i,dense:a,disablePadding:s},f=(e=>{const{classes:t,disablePadding:n,dense:r,subheader:o}=e;return Cm({root:["root",!n&&"padding",r&&"dense",o&&"subheader"]},wx,t)})(p);return cf.jsx(bx.Provider,{value:d,children:cf.jsxs(xx,{as:i,className:yg(f.root,o),ref:t,ownerState:p,...c,children:[u,r]})})}),Sx=Dh("MuiListItemIcon",["root","alignItemsFlexStart"]),Ex=Dh("MuiListItemText",["root","multiline","dense","inset","primary","secondary"]);function Cx(e,t,n){return e===t?e.firstChild:t&&t.nextElementSibling?t.nextElementSibling:n?null:e.firstChild}function Ox(e,t,n){return e===t?n?e.firstChild:e.lastChild:t&&t.previousElementSibling?t.previousElementSibling:n?null:e.lastChild}function Tx(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]:n.startsWith(t.keys.join("")))}function _x(e,t,n,r,o,i){let a=!1,s=o(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")&&Tx(s,i)&&!t)return s.focus(),!0;s=o(e,s,n)}return!1}const Rx=l.forwardRef(function(e,t){const{actions:n,autoFocus:r=!1,autoFocusItem:o=!1,children:i,className:a,disabledItemsFocusable:s=!1,disableListWrap:u=!1,onKeyDown:c,variant:d="selectedMenu",...p}=e,f=l.useRef(null),h=l.useRef({keys:[],repeating:!0,previousKeyMatched:!0,lastTime:null});em(()=>{r&&f.current.focus()},[r]),l.useImperativeHandle(n,()=>({adjustStyleForScrollbar:(e,{direction:t})=>{const n=!f.current.style.width;if(e.clientHeight<f.current.clientHeight&&n){const n=`${Rw(_g(e))}px`;f.current.style["rtl"===t?"paddingLeft":"paddingRight"]=n,f.current.style.width=`calc(100% + ${n})`}return f.current}}),[]);const m=Lg(f,t);let g=-1;l.Children.forEach(i,(e,t)=>{l.isValidElement(e)?(e.props.disabled||("selectedMenu"===d&&e.props.selected||-1===g)&&(g=t),g===t&&(e.props.disabled||e.props.muiSkipListHighlight||e.type.muiSkipListHighlight)&&(g+=1,g>=i.length&&(g=-1))):g===t&&(g+=1,g>=i.length&&(g=-1))});const v=l.Children.map(i,(e,t)=>{if(t===g){const t={};return o&&(t.autoFocus=!0),void 0===e.props.tabIndex&&"selectedMenu"===d&&(t.tabIndex=0),l.cloneElement(e,t)}return e});return cf.jsx(kx,{role:"menu",ref:m,className:a,onKeyDown:e=>{const t=f.current,n=e.key;if(e.ctrlKey||e.metaKey||e.altKey)return void(c&&c(e));const r=Tg(t).activeElement;if("ArrowDown"===n)e.preventDefault(),_x(t,r,u,s,Cx);else if("ArrowUp"===n)e.preventDefault(),_x(t,r,u,s,Ox);else if("Home"===n)e.preventDefault(),_x(t,null,u,s,Cx);else if("End"===n)e.preventDefault(),_x(t,null,u,s,Ox);else if(1===n.length){const o=h.current,i=n.toLowerCase(),a=performance.now();o.keys.length>0&&(a-o.lastTime>500?(o.keys=[],o.repeating=!0,o.previousKeyMatched=!0):o.repeating&&i!==o.keys[0]&&(o.repeating=!1)),o.lastTime=a,o.keys.push(i);const l=r&&!o.repeating&&Tx(r,o);o.previousKeyMatched&&(l||_x(t,r,!1,s,Cx,o))?e.preventDefault():o.previousKeyMatched=!1}c&&c(e)},tabIndex:r?0:-1,...p,children:v})});function Px(e){return Bh("MuiPopover",e)}function Ax(e,t){let n=0;return"number"==typeof t?n=t:"center"===t?n=e.height/2:"bottom"===t&&(n=e.height),n}function Lx(e,t){let n=0;return"number"==typeof t?n=t:"center"===t?n=e.width/2:"right"===t&&(n=e.width),n}function Nx(e){return[e.horizontal,e.vertical].map(e=>"number"==typeof e?`${e}px`:e).join(" ")}function Mx(e){return"function"==typeof e?e():e}Dh("MuiPopover",["root","paper"]);const Ix=mg(Kw,{name:"MuiPopover",slot:"Root"})({}),Fx=mg(Xg,{name:"MuiPopover",slot:"Paper"})({position:"absolute",overflowY:"auto",overflowX:"hidden",minWidth:16,minHeight:16,maxWidth:"calc(100% - 32px)",maxHeight:"calc(100% - 32px)",outline:0}),$x=l.forwardRef(function(e,t){const n=xg({props:e,name:"MuiPopover"}),{action:r,anchorEl:o,anchorOrigin:i={vertical:"top",horizontal:"left"},anchorPosition:a,anchorReference:s="anchorEl",children:u,className:c,container:d,elevation:p=8,marginThreshold:f=16,open:h,PaperProps:m={},slots:g={},slotProps:v={},transformOrigin:y={vertical:"top",horizontal:"left"},TransitionComponent:b,transitionDuration:w="auto",TransitionProps:x={},disableScrollLock:k=!1,...S}=n,E=l.useRef(),C={...n,anchorOrigin:i,anchorReference:s,elevation:p,marginThreshold:f,transformOrigin:y,TransitionComponent:b,transitionDuration:w,TransitionProps:x},O=(e=>{const{classes:t}=e;return Cm({root:["root"],paper:["paper"]},Px,t)})(C),T=l.useCallback(()=>{if("anchorPosition"===s)return a;const e=Mx(o),t=(e&&1===e.nodeType?e:Tg(E.current).body).getBoundingClientRect();return{top:t.top+Ax(t,i.vertical),left:t.left+Lx(t,i.horizontal)}},[o,i.horizontal,i.vertical,a,s]),_=l.useCallback(e=>({vertical:Ax(e,y.vertical),horizontal:Lx(e,y.horizontal)}),[y.horizontal,y.vertical]),R=l.useCallback(e=>{const t={width:e.offsetWidth,height:e.offsetHeight},n=_(t);if("none"===s)return{top:null,left:null,transformOrigin:Nx(n)};const r=T();let i=r.top-n.vertical,a=r.left-n.horizontal;const l=i+t.height,u=a+t.width,c=_g(Mx(o)),d=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&&l>d){const e=l-d;i-=e,n.vertical+=e}if(null!==f&&a<f){const e=a-f;a-=e,n.horizontal+=e}else if(u>p){const e=u-p;a-=e,n.horizontal+=e}return{top:`${Math.round(i)}px`,left:`${Math.round(a)}px`,transformOrigin:Nx(n)}},[o,s,T,_,f]),[P,A]=l.useState(h),L=l.useCallback(()=>{const e=E.current;if(!e)return;const t=R(e);null!==t.top&&e.style.setProperty("top",t.top),null!==t.left&&(e.style.left=t.left),e.style.transformOrigin=t.transformOrigin,A(!0)},[R]);l.useEffect(()=>(k&&window.addEventListener("scroll",L),()=>window.removeEventListener("scroll",L)),[o,k,L]);l.useEffect(()=>{h&&L()}),l.useImperativeHandle(r,()=>h?{updatePosition:()=>{L()}}:null,[h,L]),l.useEffect(()=>{if(!h)return;const e=Og(()=>{L()}),t=_g(Mx(o));return t.addEventListener("resize",e),()=>{e.clear(),t.removeEventListener("resize",e)}},[o,h,L]);let N=w;const M={slots:{transition:b,...g},slotProps:{transition:x,paper:m,...v}},[I,F]=qg("transition",{elementType:px,externalForwardedProps:M,ownerState:C,getSlotProps:e=>({...e,onEntering:(t,n)=>{e.onEntering?.(t,n),L()},onExited:t=>{e.onExited?.(t),A(!1)}}),additionalProps:{appear:!0,in:h}});"auto"!==w||I.muiSupportAuto||(N=void 0);const $=d||(o?Tg(Mx(o)).body:void 0),[j,{slots:z,slotProps:B,...D}]=qg("root",{ref:t,elementType:Ix,externalForwardedProps:{...M,...S},shouldForwardComponentProp:!0,additionalProps:{slots:{backdrop:g.backdrop},slotProps:{backdrop:Ng("function"==typeof v.backdrop?v.backdrop(C):v.backdrop,{invisible:!0})},container:$,open:h},ownerState:C,className:yg(O.root,c)}),[W,U]=qg("paper",{ref:E,className:O.paper,elementType:Fx,externalForwardedProps:M,shouldForwardComponentProp:!0,additionalProps:{elevation:p,style:P?void 0:{opacity:0}},ownerState:C});return cf.jsx(j,{...D,...!Dg(j)&&{slots:z,slotProps:B,disableScrollLock:k},children:cf.jsx(I,{...F,timeout:N,children:cf.jsx(W,{...U,children:u})})})});function jx(e){return Bh("MuiMenu",e)}Dh("MuiMenu",["root","paper","list"]);const zx={vertical:"top",horizontal:"right"},Bx={vertical:"top",horizontal:"left"},Dx=mg($x,{shouldForwardProp:e=>hg(e)||"classes"===e,name:"MuiMenu",slot:"Root"})({}),Wx=mg(Fx,{name:"MuiMenu",slot:"Paper"})({maxHeight:"calc(100% - 96px)",WebkitOverflowScrolling:"touch"}),Ux=mg(Rx,{name:"MuiMenu",slot:"List"})({outline:0}),Vx=l.forwardRef(function(e,t){const n=xg({props:e,name:"MuiMenu"}),{autoFocus:r=!0,children:o,className:i,disableAutoFocusItem:a=!1,MenuListProps:s={},onClose:u,open:c,PaperProps:d={},PopoverClasses:p,transitionDuration:f="auto",TransitionProps:{onEntering:h,...m}={},variant:g="selectedMenu",slots:v={},slotProps:y={},...b}=n,w=mm(),x={...n,autoFocus:r,disableAutoFocusItem:a,MenuListProps:s,onEntering:h,PaperProps:d,transitionDuration:f,TransitionProps:m,variant:g},k=(e=>{const{classes:t}=e;return Cm({root:["root"],paper:["paper"],list:["list"]},jx,t)})(x),S=r&&!a&&c,E=l.useRef(null);let C=-1;l.Children.map(o,(e,t)=>{l.isValidElement(e)&&(e.props.disabled||("selectedMenu"===g&&e.props.selected||-1===C)&&(C=t))});const O={slots:v,slotProps:{list:s,transition:m,paper:d,...y}},T=eb({elementType:v.root,externalSlotProps:y.root,ownerState:x,className:[k.root,i]}),[_,R]=qg("paper",{className:k.paper,elementType:Wx,externalForwardedProps:O,shouldForwardComponentProp:!0,ownerState:x}),[P,A]=qg("list",{className:yg(k.list,s.className),elementType:Ux,shouldForwardComponentProp:!0,externalForwardedProps:O,getSlotProps:e=>({...e,onKeyDown:t=>{(e=>{"Tab"===e.key&&(e.preventDefault(),u&&u(e,"tabKeyDown"))})(t),e.onKeyDown?.(t)}}),ownerState:x}),L="function"==typeof O.slotProps.transition?O.slotProps.transition(x):O.slotProps.transition;return cf.jsx(Dx,{onClose:u,anchorOrigin:{vertical:"bottom",horizontal:w?"right":"left"},transformOrigin:w?zx:Bx,slots:{root:v.root,paper:_,backdrop:v.backdrop,...v.transition&&{transition:v.transition}},slotProps:{root:T,paper:R,backdrop:"function"==typeof y.backdrop?y.backdrop(x):y.backdrop,transition:{...L,onEntering:(...e)=>{((e,t)=>{E.current&&E.current.adjustStyleForScrollbar(e,{direction:w?"rtl":"ltr"}),h&&h(e,t)})(...e),L?.onEntering?.(...e)}}},open:c,ref:t,transitionDuration:f,ownerState:x,...b,classes:p,children:cf.jsx(P,{actions:E,autoFocus:r&&(-1===C||a),autoFocusItem:S,variant:g,...A,children:o})})});function Kx(e){return Bh("MuiMenuItem",e)}const Hx=Dh("MuiMenuItem",["root","focusVisible","dense","disabled","divider","gutters","selected"]),qx=mg(uv,{shouldForwardProp:e=>hg(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]}})(wg(({theme:e})=>({...e.typography.body1,display:"flex",justifyContent:"flex-start",alignItems:"center",position:"relative",textDecoration:"none",minHeight:48,paddingTop:6,paddingBottom:6,boxSizing:"border-box",whiteSpace:"nowrap","&:hover":{textDecoration:"none",backgroundColor:(e.vars||e).palette.action.hover,"@media (hover: none)":{backgroundColor:"transparent"}},[`&.${Hx.selected}`]:{backgroundColor:e.alpha((e.vars||e).palette.primary.main,(e.vars||e).palette.action.selectedOpacity),[`&.${Hx.focusVisible}`]:{backgroundColor:e.alpha((e.vars||e).palette.primary.main,`${(e.vars||e).palette.action.selectedOpacity} + ${(e.vars||e).palette.action.focusOpacity}`)}},[`&.${Hx.selected}:hover`]:{backgroundColor:e.alpha((e.vars||e).palette.primary.main,`${(e.vars||e).palette.action.selectedOpacity} + ${(e.vars||e).palette.action.hoverOpacity}`),"@media (hover: none)":{backgroundColor:e.alpha((e.vars||e).palette.primary.main,(e.vars||e).palette.action.selectedOpacity)}},[`&.${Hx.focusVisible}`]:{backgroundColor:(e.vars||e).palette.action.focus},[`&.${Hx.disabled}`]:{opacity:(e.vars||e).palette.action.disabledOpacity},[`& + .${Hw.root}`]:{marginTop:e.spacing(1),marginBottom:e.spacing(1)},[`& + .${Hw.inset}`]:{marginLeft:52},[`& .${Ex.root}`]:{marginTop:0,marginBottom:0},[`& .${Ex.inset}`]:{paddingLeft:36},[`& .${Sx.root}`]:{minWidth:36},variants:[{props:({ownerState:e})=>!e.disableGutters,style:{paddingLeft:16,paddingRight:16}},{props:({ownerState:e})=>e.divider,style:{borderBottom:`1px solid ${(e.vars||e).palette.divider}`,backgroundClip:"padding-box"}},{props:({ownerState:e})=>!e.dense,style:{[e.breakpoints.up("sm")]:{minHeight:"auto"}}},{props:({ownerState:e})=>e.dense,style:{minHeight:32,paddingTop:4,paddingBottom:4,...e.typography.body2,[`& .${Sx.root} svg`]:{fontSize:"1.25rem"}}}]}))),Gx=l.forwardRef(function(e,t){const n=xg({props:e,name:"MuiMenuItem"}),{autoFocus:r=!1,component:o="li",dense:i=!1,divider:a=!1,disableGutters:s=!1,focusVisibleClassName:u,role:c="menuitem",tabIndex:d,className:p,...f}=n,h=l.useContext(bx),m=l.useMemo(()=>({dense:i||h.dense||!1,disableGutters:s}),[h.dense,i,s]),g=l.useRef(null);em(()=>{r&&g.current&&g.current.focus()},[r]);const v={...n,dense:m.dense,divider:a,disableGutters:s},y=(e=>{const{disabled:t,dense:n,divider:r,disableGutters:o,selected:i,classes:a}=e,s=Cm({root:["root",n&&"dense",t&&"disabled",!o&&"gutters",r&&"divider",i&&"selected"]},Kx,a);return{...a,...s}})(n),b=Lg(g,t);let w;return n.disabled||(w=void 0!==d?d:-1),cf.jsx(bx.Provider,{value:m,children:cf.jsx(qx,{ref:b,role:c,tabIndex:w,component:o,focusVisibleClassName:yg(y.focusVisible,u),className:yg(y.root,p),...f,ownerState:v,classes:y})})});function Yx(e){return Bh("MuiNativeSelect",e)}const Xx=Dh("MuiNativeSelect",["root","select","multiple","filled","outlined","standard","disabled","icon","iconOpen","iconFilled","iconOutlined","iconStandard","nativeInput","error"]),Qx=mg("select",{name:"MuiNativeSelect"})(({theme:e})=>({MozAppearance:"none",WebkitAppearance:"none",userSelect:"none",borderRadius:0,cursor:"pointer","&:focus":{borderRadius:0},[`&.${Xx.disabled}`]:{cursor:"default"},"&[multiple]":{height:"auto"},"&:not([multiple]) option, &:not([multiple]) optgroup":{backgroundColor:(e.vars||e).palette.background.paper},variants:[{props:({ownerState:e})=>"filled"!==e.variant&&"outlined"!==e.variant,style:{"&&&":{paddingRight:24,minWidth:16}}},{props:{variant:"filled"},style:{"&&&":{paddingRight:32}}},{props:{variant:"outlined"},style:{borderRadius:(e.vars||e).shape.borderRadius,"&:focus":{borderRadius:(e.vars||e).shape.borderRadius},"&&&":{paddingRight:32}}}]})),Jx=mg(Qx,{name:"MuiNativeSelect",slot:"Select",shouldForwardProp:hg,overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.select,t[n.variant],n.error&&t.error,{[`&.${Xx.multiple}`]:t.multiple}]}})({}),Zx=mg("svg",{name:"MuiNativeSelect"})(({theme:e})=>({position:"absolute",right:0,top:"calc(50% - .5em)",pointerEvents:"none",color:(e.vars||e).palette.action.active,[`&.${Xx.disabled}`]:{color:(e.vars||e).palette.action.disabled},variants:[{props:({ownerState:e})=>e.open,style:{transform:"rotate(180deg)"}},{props:{variant:"filled"},style:{right:7}},{props:{variant:"outlined"},style:{right:7}}]})),ek=mg(Zx,{name:"MuiNativeSelect",slot:"Icon",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.icon,n.variant&&t[`icon${Mf(n.variant)}`],n.open&&t.iconOpen]}})({}),tk=l.forwardRef(function(e,t){const{className:n,disabled:r,error:o,IconComponent:i,inputRef:a,variant:s="standard",...u}=e,c={...e,disabled:r,variant:s,error:o},d=(e=>{const{classes:t,variant:n,disabled:r,multiple:o,open:i,error:a}=e;return Cm({select:["select",n,r&&"disabled",o&&"multiple",a&&"error"],icon:["icon",`icon${Mf(n)}`,i&&"iconOpen",r&&"disabled"]},Yx,t)})(c);return cf.jsxs(l.Fragment,{children:[cf.jsx(Jx,{ownerState:c,className:yg(d.select,n),disabled:r,ref:a||t,...u}),e.multiple?null:cf.jsx(ek,{as:i,ownerState:c,className:d.icon})]})});var nk;const rk=mg("fieldset",{name:"MuiNotchedOutlined",shouldForwardProp:hg})({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%"}),ok=mg("legend",{name:"MuiNotchedOutlined",shouldForwardProp:hg})(wg(({theme:e})=>({float:"unset",width:"auto",overflow:"hidden",variants:[{props:({ownerState:e})=>!e.withLabel,style:{padding:0,lineHeight:"11px",transition:e.transitions.create("width",{duration:150,easing:e.transitions.easing.easeOut})}},{props:({ownerState:e})=>e.withLabel,style:{display:"block",padding:0,height:11,fontSize:"0.75em",visibility:"hidden",maxWidth:.01,transition:e.transitions.create("max-width",{duration:50,easing:e.transitions.easing.easeOut}),whiteSpace:"nowrap","& > span":{paddingLeft:5,paddingRight:5,display:"inline-block",opacity:0,visibility:"visible"}}},{props:({ownerState:e})=>e.withLabel&&e.notched,style:{maxWidth:"100%",transition:e.transitions.create("max-width",{duration:100,easing:e.transitions.easing.easeOut,delay:50})}}]})));const ik=mg(Mb,{shouldForwardProp:e=>hg(e)||"classes"===e,name:"MuiOutlinedInput",slot:"Root",overridesResolver:Lb})(wg(({theme:e})=>{const t="light"===e.palette.mode?"rgba(0, 0, 0, 0.23)":"rgba(255, 255, 255, 0.23)";return{position:"relative",borderRadius:(e.vars||e).shape.borderRadius,[`&:hover .${Db.notchedOutline}`]:{borderColor:(e.vars||e).palette.text.primary},"@media (hover: none)":{[`&:hover .${Db.notchedOutline}`]:{borderColor:e.vars?e.alpha(e.vars.palette.common.onBackground,.23):t}},[`&.${Db.focused} .${Db.notchedOutline}`]:{borderWidth:2},variants:[...Object.entries(e.palette).filter(dv()).map(([t])=>({props:{color:t},style:{[`&.${Db.focused} .${Db.notchedOutline}`]:{borderColor:(e.vars||e).palette[t].main}}})),{props:{},style:{[`&.${Db.error} .${Db.notchedOutline}`]:{borderColor:(e.vars||e).palette.error.main},[`&.${Db.disabled} .${Db.notchedOutline}`]:{borderColor:(e.vars||e).palette.action.disabled}}},{props:({ownerState:e})=>e.startAdornment,style:{paddingLeft:14}},{props:({ownerState:e})=>e.endAdornment,style:{paddingRight:14}},{props:({ownerState:e})=>e.multiline,style:{padding:"16.5px 14px"}},{props:({ownerState:e,size:t})=>e.multiline&&"small"===t,style:{padding:"8.5px 14px"}}]}})),ak=mg(function(e){const{children:t,classes:n,className:r,label:o,notched:i,...a}=e,s=null!=o&&""!==o,l={...e,notched:i,withLabel:s};return cf.jsx(rk,{"aria-hidden":!0,className:r,ownerState:l,...a,children:cf.jsx(ok,{ownerState:l,children:s?cf.jsx("span",{children:o}):nk||(nk=cf.jsx("span",{className:"notranslate","aria-hidden":!0,children:"​"}))})})},{name:"MuiOutlinedInput",slot:"NotchedOutline"})(wg(({theme:e})=>{const t="light"===e.palette.mode?"rgba(0, 0, 0, 0.23)":"rgba(255, 255, 255, 0.23)";return{borderColor:e.vars?e.alpha(e.vars.palette.common.onBackground,.23):t}})),sk=mg(Ib,{name:"MuiOutlinedInput",slot:"Input",overridesResolver:Nb})(wg(({theme:e})=>({padding:"16.5px 14px",...!e.vars&&{"&:-webkit-autofill":{WebkitBoxShadow:"light"===e.palette.mode?null:"0 0 0 100px #266798 inset",WebkitTextFillColor:"light"===e.palette.mode?null:"#fff",caretColor:"light"===e.palette.mode?null:"#fff",borderRadius:"inherit"}},...e.vars&&{"&:-webkit-autofill":{borderRadius:"inherit"},[e.getColorSchemeSelector("dark")]:{"&:-webkit-autofill":{WebkitBoxShadow:"0 0 0 100px #266798 inset",WebkitTextFillColor:"#fff",caretColor:"#fff"}}},variants:[{props:{size:"small"},style:{padding:"8.5px 14px"}},{props:({ownerState:e})=>e.multiline,style:{padding:0}},{props:({ownerState:e})=>e.startAdornment,style:{paddingLeft:0}},{props:({ownerState:e})=>e.endAdornment,style:{paddingRight:0}}]}))),lk=l.forwardRef(function(e,t){const n=xg({props:e,name:"MuiOutlinedInput"}),{components:r={},fullWidth:o=!1,inputComponent:i="input",label:a,multiline:s=!1,notched:u,slots:c={},slotProps:d={},type:p="text",...f}=n,h=(e=>{const{classes:t}=e,n=Cm({root:["root"],notchedOutline:["notchedOutline"],input:["input"]},Bb,t);return{...t,...n}})(n),m=Ob(),g=Eb({props:n,muiFormControl:m,states:["color","disabled","error","focused","hiddenLabel","size","required"]}),v={...n,color:g.color||"primary",disabled:g.disabled,error:g.error,focused:g.focused,formControl:m,fullWidth:o,hiddenLabel:g.hiddenLabel,multiline:s,size:g.size,type:p},y=c.root??r.Root??ik,b=c.input??r.Input??sk,[w,x]=qg("notchedOutline",{elementType:ak,className:h.notchedOutline,shouldForwardComponentProp:!0,ownerState:v,externalForwardedProps:{slots:c,slotProps:d},additionalProps:{label:null!=a&&""!==a&&g.required?cf.jsxs(l.Fragment,{children:[a," ","*"]}):a}});return cf.jsx($b,{slots:{root:y,input:b},slotProps:d,renderSuffix:e=>cf.jsx(w,{...x,notched:void 0!==u?u:Boolean(e.startAdornment||e.filled||e.focused)}),fullWidth:o,inputComponent:i,multiline:s,ref:t,type:p,...f,classes:{...h,notchedOutline:null}})});function uk(e){return Bh("MuiSelect",e)}lk.muiName="Input";const ck=Dh("MuiSelect",["root","select","multiple","filled","outlined","standard","disabled","focused","icon","iconOpen","iconFilled","iconOutlined","iconStandard","nativeInput","error"]);var dk;const pk=mg(Qx,{name:"MuiSelect",slot:"Select",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[{[`&.${ck.select}`]:t.select},{[`&.${ck.select}`]:t[n.variant]},{[`&.${ck.error}`]:t.error},{[`&.${ck.multiple}`]:t.multiple}]}})({[`&.${ck.select}`]:{height:"auto",minHeight:"1.4375em",textOverflow:"ellipsis",whiteSpace:"nowrap",overflow:"hidden"}}),fk=mg(Zx,{name:"MuiSelect",slot:"Icon",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.icon,n.variant&&t[`icon${Mf(n.variant)}`],n.open&&t.iconOpen]}})({}),hk=mg("input",{shouldForwardProp:e=>fg(e)&&"classes"!==e,name:"MuiSelect",slot:"NativeInput"})({bottom:0,left:0,position:"absolute",opacity:0,pointerEvents:"none",width:"100%",boxSizing:"border-box"});function mk(e,t){return"object"==typeof t&&null!==t?e===t:String(e)===String(t)}function gk(e){return null==e||"string"==typeof e&&!e.trim()}const vk=l.forwardRef(function(e,t){const{"aria-describedby":n,"aria-label":r,autoFocus:o,autoWidth:i,children:a,className:s,defaultOpen:u,defaultValue:c,disabled:d,displayEmpty:p,error:f=!1,IconComponent:h,inputRef:m,labelId:g,MenuProps:v={},multiple:y,name:b,onBlur:w,onChange:x,onClose:k,onFocus:S,onOpen:E,open:C,readOnly:O,renderValue:T,required:_,SelectDisplayProps:R={},tabIndex:P,type:A,value:L,variant:N="standard",...M}=e,[I,F]=Pg({controlled:L,default:c,name:"Select"}),[$,j]=Pg({controlled:C,default:u,name:"Select"}),z=l.useRef(null),B=l.useRef(null),[D,W]=l.useState(null),{current:U}=l.useRef(null!=C),[V,K]=l.useState(),H=Lg(t,m),q=l.useCallback(e=>{B.current=e,e&&W(e)},[]),G=D?.parentNode;l.useImperativeHandle(H,()=>({focus:()=>{B.current.focus()},node:z.current,value:I}),[I]),l.useEffect(()=>{u&&$&&D&&!U&&(K(i?null:G.clientWidth),B.current.focus())},[D,i]),l.useEffect(()=>{o&&B.current.focus()},[o]),l.useEffect(()=>{if(!g)return;const e=Tg(B.current).getElementById(g);if(e){const t=()=>{getSelection().isCollapsed&&B.current.focus()};return e.addEventListener("click",t),()=>{e.removeEventListener("click",t)}}},[g]);const Y=(e,t)=>{e?E&&E(t):k&&k(t),U||(K(i?null:G.clientWidth),j(e))},X=l.Children.toArray(a),Q=e=>t=>{let n;if(t.currentTarget.hasAttribute("tabindex")){if(y){n=Array.isArray(I)?I.slice():[];const t=I.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),I!==n&&(F(n),x)){const r=t.nativeEvent||t,o=new r.constructor(r.type,r);Object.defineProperty(o,"target",{writable:!0,value:{value:n,name:b}}),x(o,e)}y||Y(!1,t)}},J=null!==D&&$;let Z,ee;delete M["aria-invalid"];const te=[];let ne=!1;(_b({value:I})||p)&&(T?Z=T(I):ne=!0);const re=X.map(e=>{if(!l.isValidElement(e))return null;let t;if(y){if(!Array.isArray(I))throw new Error(gd(2));t=I.some(t=>mk(t,e.props.value)),t&&ne&&te.push(e.props.children)}else t=mk(I,e.props.value),t&&ne&&(ee=e.props.children);return l.cloneElement(e,{"aria-selected":t?"true":"false",onClick:Q(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})});ne&&(Z=y?0===te.length?null:te.reduce((e,t,n)=>(e.push(t),n<te.length-1&&e.push(", "),e),[]):ee);let oe,ie=V;!i&&U&&D&&(ie=G.clientWidth),oe=void 0!==P?P:d?null:0;const ae=R.id||(b?`mui-component-select-${b}`:void 0),se={...e,variant:N,value:I,open:J,error:f},le=(e=>{const{classes:t,variant:n,disabled:r,multiple:o,open:i,error:a}=e;return Cm({select:["select",n,r&&"disabled",o&&"multiple",a&&"error"],icon:["icon",`icon${Mf(n)}`,i&&"iconOpen",r&&"disabled"],nativeInput:["nativeInput"]},uk,t)})(se),ue={...v.PaperProps,..."function"==typeof v.slotProps?.paper?v.slotProps.paper(se):v.slotProps?.paper},ce={...v.MenuListProps,..."function"==typeof v.slotProps?.list?v.slotProps.list(se):v.slotProps?.list},de=wm();return cf.jsxs(l.Fragment,{children:[cf.jsx(pk,{as:"div",ref:q,tabIndex:oe,role:"combobox","aria-controls":J?de:void 0,"aria-disabled":d?"true":void 0,"aria-expanded":J?"true":"false","aria-haspopup":"listbox","aria-label":r,"aria-labelledby":[g,ae].filter(Boolean).join(" ")||void 0,"aria-describedby":n,"aria-required":_?"true":void 0,"aria-invalid":f?"true":void 0,onKeyDown:e=>{if(!O){[" ","ArrowUp","ArrowDown","Enter"].includes(e.key)&&(e.preventDefault(),Y(!0,e))}},onMouseDown:d||O?null:e=>{0===e.button&&(e.preventDefault(),B.current.focus(),Y(!0,e))},onBlur:e=>{!J&&w&&(Object.defineProperty(e,"target",{writable:!0,value:{value:I,name:b}}),w(e))},onFocus:S,...R,ownerState:se,className:yg(R.className,le.select,s),id:ae,children:gk(Z)?dk||(dk=cf.jsx("span",{className:"notranslate","aria-hidden":!0,children:"​"})):Z}),cf.jsx(hk,{"aria-invalid":f,value:Array.isArray(I)?I.join(","):I,name:b,ref:z,"aria-hidden":!0,onChange:e=>{const t=X.find(t=>t.props.value===e.target.value);void 0!==t&&(F(t.props.value),x&&x(e,t))},tabIndex:-1,disabled:d,className:le.nativeInput,autoFocus:o,required:_,...M,ownerState:se}),cf.jsx(fk,{as:h,className:le.icon,ownerState:se}),cf.jsx(Vx,{id:`menu-${b||""}`,anchorEl:G,open:J,onClose:e=>{Y(!1,e)},anchorOrigin:{vertical:"bottom",horizontal:"center"},transformOrigin:{vertical:"top",horizontal:"center"},...v,slotProps:{...v.slotProps,list:{"aria-labelledby":g,role:"listbox","aria-multiselectable":y?"true":void 0,disableListWrap:!0,id:de,...ce},paper:{...ue,style:{minWidth:ie,...null!=ue?ue.style:null}}},children:re})]})}),yk={name:"MuiSelect",slot:"Root",shouldForwardProp:e=>hg(e)&&"variant"!==e},bk=mg(mx,yk)(""),wk=mg(lk,yk)(""),xk=mg(Yw,yk)(""),kk=l.forwardRef(function(e,t){const n=xg({name:"MuiSelect",props:e}),{autoWidth:r=!1,children:o,classes:i={},className:a,defaultOpen:s=!1,displayEmpty:u=!1,IconComponent:c=Vb,id:d,input:p,inputProps:f,label:h,labelId:m,MenuProps:g,multiple:v=!1,native:y=!1,onClose:b,onOpen:w,open:x,renderValue:k,SelectDisplayProps:S,variant:E="outlined",...C}=n,O=y?tk:vk,T=Eb({props:n,muiFormControl:Ob(),states:["variant","error"]}),_=T.variant||E,R={...n,variant:_,classes:i},P=(e=>{const{classes:t}=e,n=Cm({root:["root"]},uk,t);return{...t,...n}})(R),{root:A,...L}=P,N=p||{standard:cf.jsx(bk,{ownerState:R}),outlined:cf.jsx(wk,{label:h,ownerState:R}),filled:cf.jsx(xk,{ownerState:R})}[_],M=Lg(t,tb(N));return cf.jsx(l.Fragment,{children:l.cloneElement(N,{inputComponent:O,inputProps:{children:o,error:T.error,IconComponent:c,variant:_,type:void 0,multiple:v,...y?{id:d}:{autoWidth:r,defaultOpen:s,displayEmpty:u,labelId:m,MenuProps:g,onClose:b,onOpen:w,open:x,renderValue:k,SelectDisplayProps:{id:d,...S}},...f,classes:f?Ef(L,f.classes):L,...p?p.props.inputProps:{}},...(v&&y||u)&&"outlined"===_?{notched:!0}:{},ref:M,className:yg(N.props.className,a,P.root),...!p&&{variant:_},...C})})});function Sk(e){return Bh("MuiTextField",e)}kk.muiName="Select",Dh("MuiTextField",["root"]);const Ek={standard:mx,filled:Yw,outlined:lk},Ck=mg(Jw,{name:"MuiTextField",slot:"Root"})({}),Ok=l.forwardRef(function(e,t){const n=xg({props:e,name:"MuiTextField"}),{autoComplete:r,autoFocus:o=!1,children:i,className:a,color:s="primary",defaultValue:l,disabled:u=!1,error:c=!1,FormHelperTextProps:d,fullWidth:p=!1,helperText:f,id:h,InputLabelProps:m,inputProps:g,InputProps:v,inputRef:y,label:b,maxRows:w,minRows:x,multiline:k=!1,name:S,onBlur:E,onChange:C,onFocus:O,placeholder:T,required:_=!1,rows:R,select:P=!1,SelectProps:A,slots:L={},slotProps:N={},type:M,value:I,variant:F="outlined",...$}=n,j={...n,autoFocus:o,color:s,disabled:u,error:c,fullWidth:p,multiline:k,required:_,select:P,variant:F},z=(e=>{const{classes:t}=e;return Cm({root:["root"]},Sk,t)})(j),B=wm(h),D=f&&B?`${B}-helper-text`:void 0,W=b&&B?`${B}-label`:void 0,U=Ek[F],V={slots:L,slotProps:{input:v,inputLabel:m,htmlInput:g,formHelperText:d,select:A,...N}},K={},H=V.slotProps.inputLabel;"outlined"===F&&(H&&void 0!==H.shrink&&(K.notched=H.shrink),K.label=b),P&&(A&&A.native||(K.id=void 0),K["aria-describedby"]=void 0);const[q,G]=qg("root",{elementType:Ck,shouldForwardComponentProp:!0,externalForwardedProps:{...V,...$},ownerState:j,className:yg(z.root,a),ref:t,additionalProps:{disabled:u,error:c,fullWidth:p,required:_,color:s,variant:F}}),[Y,X]=qg("input",{elementType:U,externalForwardedProps:V,additionalProps:K,ownerState:j}),[Q,J]=qg("inputLabel",{elementType:yx,externalForwardedProps:V,ownerState:j}),[Z,ee]=qg("htmlInput",{elementType:"input",externalForwardedProps:V,ownerState:j}),[te,ne]=qg("formHelperText",{elementType:rx,externalForwardedProps:V,ownerState:j}),[re,oe]=qg("select",{elementType:kk,externalForwardedProps:V,ownerState:j}),ie=cf.jsx(Y,{"aria-describedby":D,autoComplete:r,autoFocus:o,defaultValue:l,fullWidth:p,multiline:k,name:S,rows:R,maxRows:w,minRows:x,type:M,value:I,id:B,inputRef:y,onBlur:E,onChange:C,onFocus:O,placeholder:T,inputProps:ee,slots:{input:L.htmlInput?Z:void 0},...X});return cf.jsxs(q,{...G,children:[null!=b&&""!==b&&cf.jsx(Q,{htmlFor:B,id:W,...J,children:b}),P?cf.jsx(re,{"aria-describedby":D,id:B,labelId:W,value:I,input:ie,...oe,children:i}):ie,f&&cf.jsx(te,{id:D,...ne,children:f})]})});var Tk=Cg(cf.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"})),_k=Cg(cf.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"}));const Rk=l.createElement(Tk,{fontSize:"small"}),Pk=l.createElement(_k,{fontSize:"small"});function Ak({items:e,selectedKeys:t,defaultSelectedKeys:n,onChange:r,inputValue:o,defaultInputValue:i,onInputChange:a,debounceMs:s=300,label:u,placeholder:c,loading:d,disabled:p,size:f="small",error:h,helperText:m,limitTags:g=3,disableClearable:v,id:y,textFieldProps:b}){const w=l.useMemo(()=>Array.isArray(e)?e:[],[e]),x=Array.isArray(t),[k,S]=l.useState(Array.isArray(n)?n:[]),E=x?t:k,C=l.useMemo(()=>{const e=new Map;for(const t of w)e.set(t&&t.key,t);return e},[w]),O=l.useMemo(()=>(Array.isArray(E)?E:[]).map(e=>C.get(e)).filter(Boolean),[E,C]),T="string"==typeof o,[_,R]=l.useState("string"==typeof i?i:""),P=T?o:_,A=function(e,t=300){const n=l.useRef(e),r=l.useRef(null);return n.current=e,l.useEffect(()=>()=>{r.current&&window.clearTimeout(r.current)},[]),l.useCallback((...e)=>{n.current&&(r.current&&window.clearTimeout(r.current),r.current=window.setTimeout(()=>{n.current&&n.current(...e)},t))},[t])}(e=>{a&&a(e)},s),L=O;return l.createElement(Jw,{fullWidth:!0,error:h,disabled:p},l.createElement(aw,{openOnFocus:!0,forcePopupIcon:!0,id:y,multiple:!0,disableCloseOnSelect:!0,options:w,value:L,inputValue:P,getOptionLabel:e=>e&&"object"==typeof e?e.value??"":"",isOptionEqualToValue:(e,t)=>e&&t&&e.key===t.key,loading:d,limitTags:g,disableClearable:v,onChange:(e,t)=>{const n=Array.isArray(t)?t.map(e=>e&&e.key):[];x||S(n),r&&r(n,Array.isArray(t)?t:[])},onInputChange:(e,t,n)=>{T||R(t??""),"input"===n?A(t??""):"clear"===n&&A("")},renderOption:(e,t,{selected:n})=>l.createElement("li",ko({},e,{key:t&&t.key||Math.random().toString(36)}),l.createElement(_w,{icon:Rk,checkedIcon:Pk,style:{marginRight:8},checked:!!n}),t&&t.value),renderTags:(e,t)=>(Array.isArray(e)?e:[]).map((e,n)=>l.createElement(bb,ko({},t({index:n}),{key:e&&e.key||n,label:e&&e.value||""}))),renderInput:e=>l.createElement(Ok,ko({},e,{label:u,placeholder:c,InputProps:{...e.InputProps,endAdornment:l.createElement(l.Fragment,null,d?l.createElement(kv,{size:18}):null,e.InputProps.endAdornment)},size:f},b))}),m?l.createElement(rx,null,m):null)}const Lk=({filter:e,channel:t,query:n})=>{const[r,o]=l.useState([]),[i,a]=l.useState([]),[s,c]=l.useState(!1),[d,p]=l.useState("");return l.useEffect(()=>{a(n?.filter?.[e?.filter]||[])},[n]),l.useEffect(()=>{(async()=>{c(!0);const t=await async function(e,t){return t?.source?(await Cs.runReport({id:t.source})).map(e=>({key:e[t.field],value:e[t.field]})):[]}(0,e);o(t),c(!1)})()},[d]),u.createElement("div",{style:{display:"flex"}},u.createElement("div",{style:{maxWidth:640,minWidth:200}},u.createElement(Ak,{id:e?.title,label:e?.title,placeholder:"Type to search…",items:r,selectedKeys:i,onChange:(n,r)=>{a(n),t.emit("filterChanged",e,{[e.filter]:n})},onInputChange:e=>{p(e)},loading:s,debounceMs:300,helperText:i.length?`${i.length} selected`:""})))};function Nk({items:e,value:t,label:n,onChange:r,sx:o={width:"100%"}}){const i=e.some(e=>e.key===t)?t:"";return u.createElement(hw,{sx:o},u.createElement(Jw,{fullWidth:!0},u.createElement(yx,{id:"demo-simple-select-label"},n),u.createElement(kk,{labelId:"demo-simple-select-label",id:"demo-simple-select",value:i,label:n,onChange:r,MenuProps:{style:{maxHeight:"300px"}},size:"small"},e.map(e=>{const{key:t,value:n}=e;return u.createElement(Gx,{key:t,value:t},n)}))))}const Mk=({filter:e,channel:t,query:n})=>{const[r,o]=l.useState([]),[i,a]=l.useState("");return l.useEffect(()=>{a(n?.date_range?.name)},[n]),l.useEffect(()=>{(async()=>{const t=(await Cs.getDateRanges()).filter(t=>!(e.allowedOptions.length>0)||e.allowedOptions.some(e=>e===t.name)).map(e=>({key:e.name,value:e.title}));o(t)})()},[]),u.createElement("div",{style:{minWidth:"200px",maxWidth:"640px"}},u.createElement(Nk,{items:r,value:i,label:e?.title,onChange:(n,r)=>{const o=n.target.value;a(o),t.emit("filterChanged",e,{date_range:{name:o}})}}))},Ik=({filters:e=[],channel:t,query:n})=>u.createElement("div",{style:{display:"flex",flexWrap:"wrap",gap:"8px"}},e.map(e=>"multi-select"===e.type?u.createElement(Lk,{key:e.title,channel:t,filter:e,query:n}):"date-range"===e.type?u.createElement(Mk,{key:e.title,channel:t,filter:e,query:n}):null));var Fk,$k={exports:{}};var jk=(Fk||(Fk=1,function(e){var t=Object.prototype.hasOwnProperty,n="~";function r(){}function o(e,t,n){this.fn=e,this.context=t,this.once=n||!1}function i(e,t,r,i,a){if("function"!=typeof r)throw new TypeError("The listener must be a function");var s=new o(r,i||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,o=[];if(0===this._eventsCount)return o;for(r in e=this._events)t.call(e,r)&&o.push(n?r.slice(1):r);return Object.getOwnPropertySymbols?o.concat(Object.getOwnPropertySymbols(e)):o},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 o=0,i=r.length,a=new Array(i);o<i;o++)a[o]=r[o].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,o,i,a){var s=n?n+e:e;if(!this._events[s])return!1;var l,u,c=this._events[s],d=arguments.length;if(c.fn){switch(c.once&&this.removeListener(e,c.fn,void 0,!0),d){case 1:return c.fn.call(c.context),!0;case 2:return c.fn.call(c.context,t),!0;case 3:return c.fn.call(c.context,t,r),!0;case 4:return c.fn.call(c.context,t,r,o),!0;case 5:return c.fn.call(c.context,t,r,o,i),!0;case 6:return c.fn.call(c.context,t,r,o,i,a),!0}for(u=1,l=new Array(d-1);u<d;u++)l[u-1]=arguments[u];c.fn.apply(c.context,l)}else{var p,f=c.length;for(u=0;u<f;u++)switch(c[u].once&&this.removeListener(e,c[u].fn,void 0,!0),d){case 1:c[u].fn.call(c[u].context);break;case 2:c[u].fn.call(c[u].context,t);break;case 3:c[u].fn.call(c[u].context,t,r);break;case 4:c[u].fn.call(c[u].context,t,r,o);break;default:if(!l)for(p=1,l=new Array(d-1);p<d;p++)l[p-1]=arguments[p];c[u].fn.apply(c[u].context,l)}}return!0},s.prototype.on=function(e,t,n){return i(this,e,t,n,!1)},s.prototype.once=function(e,t,n){return i(this,e,t,n,!0)},s.prototype.removeListener=function(e,t,r,o){var i=n?n+e:e;if(!this._events[i])return this;if(!t)return a(this,i),this;var s=this._events[i];if(s.fn)s.fn!==t||o&&!s.once||r&&s.context!==r||a(this,i);else{for(var l=0,u=[],c=s.length;l<c;l++)(s[l].fn!==t||o&&!s[l].once||r&&s[l].context!==r)&&u.push(s[l]);u.length?this._events[i]=1===u.length?u[0]:u:a(this,i)}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}($k)),$k.exports),zk=t(jk),Bk=e=>u.useRef(e||new zk).current,Dk=e=>{const t=u.useState({}),n=u.useCallback((n,r)=>{let o={...t.current,...r};for(var i in t.current=o,o)"date_range"===i||o[i].length||delete o[i];e?.emit("mergedFilterChanged",{value:o})},[e]);u.useEffect(()=>(e?.on("filterChanged",n),()=>{e?.off("filterChanged",n)}),[e])},Wk=({id:e,cache:t,dashboard:n,channel:r,...o})=>{const[i,a]=u.useState(),[s,c]=u.useState(),[d,p]=u.useState(),[f,h]=u.useState(),[m,g]=u.useState(sl()),[v,y]=u.useState(),[b,w]=u.useState(0),[x,k]=u.useState(!1),[S,E]=u.useState(),[C,O]=u.useState(!1),T=u.useRef({value:o?.filter}),[_,R]=u.useState({}),{ref:P,inView:A}=function({threshold:e,delay:t,trackVisibility:n,rootMargin:r,root:o,triggerOnce:i,skip:a,initialInView:s,fallbackInView:u,onChange:c}={}){var d;const[p,f]=l.useState(null),h=l.useRef(c),m=l.useRef(s),[g,v]=l.useState({inView:!!s,entry:void 0});h.current=c,l.useEffect(()=>{if(void 0===m.current&&(m.current=s),a||!p)return;let l;return l=Ic(p,(e,t)=>{const n=m.current;m.current=e,(void 0!==n||e)&&(v({inView:e,entry:t}),h.current&&h.current(e,t),t.isIntersecting&&i&&l&&(l(),l=void 0))},{root:o,rootMargin:r,threshold:e,trackVisibility:n,delay:t},u),()=>{l&&l()}},[Array.isArray(e)?e.toString():e,p,o,r,i,a,n,u,t]);const y=null==(d=g.entry)?void 0:d.target,b=l.useRef(void 0);p||!y||i||a||b.current===y||(b.current=y,v({inView:!!s,entry:void 0}),m.current=s);const w=[f,g.inView,g.entry];return w.ref=w[0],w.inView=w[1],w.entry=w[2],w}({threshold:.1,delay:1e3}),L=Bk(r);Dk(L);const N=u.useCallback(e=>{const t=e.target.value;w(t),y(i.doc.view[t])},[i]);u.useEffect(()=>{e&&(async()=>{const n=e,r=t?.[n]||await Cs.getChart({id:n}),i=r.doc.source?.id,s=i?t?.[i]||await Cs.getReport({id:i}):void 0,l=t?.[`schema_${i}`]||o?.schema||await Cs.getReportSchema({id:i}),u=r.doc?.view?.[0];w(0),c(s),a(r),y(u),p(l),O(!0)})().catch(e=>{console.error(e.message)})},[e]),u.useEffect(()=>{i&&f&&(!i?.doc?.source?.id||s)&&d&&(async()=>{g(sl(i.doc.chart?.component,{view:v,source:f,chart:i,report:s,schema:d,dashboard:n,query:_}))})().catch(e=>{console.error(e.message)})},[i,f,v,s,d]);const M=e=>{const t={...s?.doc.query.filter||{},...o?.filter,...e?.value},n=t.date_range||s?.doc.query.date_range;if(delete t.date_range,O(!1),E(),k(!0),"context"===i?.doc?.source?.type)return h({filter:t}),void k(!1);const r={filter:t,date_range:n,parameters:o?.params};R(r),Cs.runReport({id:s.id,query:r}).then(e=>{h(i.doc.source.reverse?e.reverse():e)}).catch(e=>{h([])}).finally(()=>{k(!1)})},I=e=>{T.current=e,A?M(e):(E(e),O(!0))};return u.useEffect(()=>(L?.on("mergedFilterChanged",I),()=>{L?.off("mergedFilterChanged",I)}),[L,s,i,A]),u.useEffect(()=>{A&&C&&M(S)},[A,C]),u.createElement(xo,{ref:P,style:{padding:"16px",paddingTop:0,flexGrow:1,borderRadius:12,display:"flex",flexDirection:"column",gap:"16px"},elevation:2},u.createElement(Ro,{style:{visibility:x?"visible":"hidden"}}),u.createElement("div",{style:{display:"flex"}},u.createElement("div",null,i&&u.createElement("div",{style:{display:"flex",alignItems:"center",lineHeight:0}},u.createElement(Ps,{noWrap:!0,variant:"caption"},o?.title||i.doc.name," "))),u.createElement("div",{style:{flexGrow:1}}),u.createElement("div",null,i?.doc?.view?.length>1&&u.createElement(fl,null,u.createElement(uc,{labelId:"date-range-select-label",id:"date-range-select",value:b,onChange:N,style:{fontSize:"12px"},disableUnderline:!0},i.doc.view.map((e,t)=>u.createElement(Pc,{key:t,value:t},e.title)))))),u.createElement("div",{style:{position:"relative",flexGrow:n?void 0:1,display:"flex",flexDirection:"column"}},u.createElement(Ik,{filters:i?.doc?.filters,channel:L,query:_}),m))},Uk=[0,1,2,3,4,5,6,7,8,9,10],Vk=["auto",!0,1,2,3,4,5,6,7,8,9,10,11,12];function Kk(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1,n=parseFloat(e);return"".concat(n/t).concat(String(e).replace(String(n),"")||"px")}var Hk=l.forwardRef(function(e,t){var n=e.alignContent,r=void 0===n?"stretch":n,o=e.alignItems,i=void 0===o?"stretch":o,a=e.classes,s=e.className,u=e.component,c=void 0===u?"div":u,d=e.container,h=void 0!==d&&d,g=e.direction,v=void 0===g?"row":g,y=e.item,b=void 0!==y&&y,w=e.justify,x=e.justifyContent,k=void 0===x?"flex-start":x,S=e.lg,E=void 0!==S&&S,C=e.md,O=void 0!==C&&C,T=e.sm,_=void 0!==T&&T,R=e.spacing,P=void 0===R?0:R,A=e.wrap,L=void 0===A?"wrap":A,N=e.xl,M=void 0!==N&&N,I=e.xs,F=void 0!==I&&I,$=e.zeroMinWidth,j=void 0!==$&&$,z=p(e,["alignContent","alignItems","classes","className","component","container","direction","item","justify","justifyContent","lg","md","sm","spacing","wrap","xl","xs","zeroMinWidth"]),B=m(a.root,s,h&&[a.container,0!==P&&a["spacing-xs-".concat(String(P))]],b&&a.item,j&&a.zeroMinWidth,"row"!==v&&a["direction-xs-".concat(String(v))],"wrap"!==L&&a["wrap-xs-".concat(String(L))],"stretch"!==i&&a["align-items-xs-".concat(String(i))],"stretch"!==r&&a["align-content-xs-".concat(String(r))],"flex-start"!==(w||k)&&a["justify-content-xs-".concat(String(w||k))],!1!==F&&a["grid-xs-".concat(String(F))],!1!==_&&a["grid-sm-".concat(String(_))],!1!==O&&a["grid-md-".concat(String(O))],!1!==E&&a["grid-lg-".concat(String(E))],!1!==M&&a["grid-xl-".concat(String(M))]);return l.createElement(c,f({className:B,ref:t},z))}),qk=bo(function(e){return f({root:{},container:{boxSizing:"border-box",display:"flex",flexWrap:"wrap",width:"100%"},item:{boxSizing:"border-box",margin:"0"},zeroMinWidth:{minWidth:0},"direction-xs-column":{flexDirection:"column"},"direction-xs-column-reverse":{flexDirection:"column-reverse"},"direction-xs-row-reverse":{flexDirection:"row-reverse"},"wrap-xs-nowrap":{flexWrap:"nowrap"},"wrap-xs-wrap-reverse":{flexWrap:"wrap-reverse"},"align-items-xs-center":{alignItems:"center"},"align-items-xs-flex-start":{alignItems:"flex-start"},"align-items-xs-flex-end":{alignItems:"flex-end"},"align-items-xs-baseline":{alignItems:"baseline"},"align-content-xs-center":{alignContent:"center"},"align-content-xs-flex-start":{alignContent:"flex-start"},"align-content-xs-flex-end":{alignContent:"flex-end"},"align-content-xs-space-between":{alignContent:"space-between"},"align-content-xs-space-around":{alignContent:"space-around"},"justify-content-xs-center":{justifyContent:"center"},"justify-content-xs-flex-end":{justifyContent:"flex-end"},"justify-content-xs-space-between":{justifyContent:"space-between"},"justify-content-xs-space-around":{justifyContent:"space-around"},"justify-content-xs-space-evenly":{justifyContent:"space-evenly"}},function(e,t){var n={};return Uk.forEach(function(r){var o=e.spacing(r);0!==o&&(n["spacing-".concat(t,"-").concat(r)]={margin:"-".concat(Kk(o,2)),width:"calc(100% + ".concat(Kk(o),")"),"& > $item":{padding:Kk(o,2)}})}),n}(e,"xs"),e.breakpoints.keys.reduce(function(t,n){return function(e,t,n){var r={};Vk.forEach(function(e){var t="grid-".concat(n,"-").concat(e);if(!0!==e)if("auto"!==e){var o="".concat(Math.round(e/12*1e8)/1e6,"%");r[t]={flexBasis:o,flexGrow:0,maxWidth:o}}else r[t]={flexBasis:"auto",flexGrow:0,maxWidth:"none"};else r[t]={flexBasis:0,flexGrow:1,maxWidth:"100%"}}),"xs"===n?f(e,r):e[t.breakpoints.up(n)]=r}(t,e,n),t},{}))},{name:"MuiGrid"})(Hk),Gk=function(e){var t=function(t){var n=e(t);return t.css?f({},Lr(n,e(f({theme:t.theme},t.css))),Dr(t.css,[e.filterProps])):t.sx?f({},Lr(n,e(f({theme:t.theme},t.sx))),Dr(t.sx,[e.filterProps])):n};return t.propTypes={},t.filterProps=["css","sx"].concat(xt(e.filterProps)),t}(jr(Br,Wr,Ur,Vr,Hr,Kr,qr,to,co,po)),Yk=function(e){var t=Kn(e);return function(e,n){return t(e,f({defaultTheme:yo},n))}}("div")(Gk,{name:"MuiBox"}),Xk=l.forwardRef(function(e,t){var n=e.classes,r=e.className,o=e.component,i=void 0===o?"div":o,a=e.disableGutters,s=void 0!==a&&a,u=e.fixed,c=void 0!==u&&u,d=e.maxWidth,h=void 0===d?"lg":d,g=p(e,["classes","className","component","disableGutters","fixed","maxWidth"]);return l.createElement(i,f({className:m(n.root,r,c&&n.fixed,s&&n.disableGutters,!1!==h&&n["maxWidth".concat(Co(String(h)))]),ref:t},g))}),Qk=bo(function(e){return{root:w({width:"100%",marginLeft:"auto",boxSizing:"border-box",marginRight:"auto",paddingLeft:e.spacing(2),paddingRight:e.spacing(2),display:"block"},e.breakpoints.up("sm"),{paddingLeft:e.spacing(3),paddingRight:e.spacing(3)}),disableGutters:{paddingLeft:0,paddingRight:0},fixed:Object.keys(e.breakpoints.values).reduce(function(t,n){var r=e.breakpoints.values[n];return 0!==r&&(t[e.breakpoints.up(n)]={maxWidth:r}),t},{}),maxWidthXs:w({},e.breakpoints.up("xs"),{maxWidth:Math.max(e.breakpoints.values.xs,444)}),maxWidthSm:w({},e.breakpoints.up("sm"),{maxWidth:e.breakpoints.values.sm}),maxWidthMd:w({},e.breakpoints.up("md"),{maxWidth:e.breakpoints.values.md}),maxWidthLg:w({},e.breakpoints.up("lg"),{maxWidth:e.breakpoints.values.lg}),maxWidthXl:w({},e.breakpoints.up("xl"),{maxWidth:e.breakpoints.values.xl})}},{name:"MuiContainer"})(Xk);var Jk={Chart:Wk,Dashboard:function({id:e="sample_dashboard",token:t,params:n,base_url:r}){const[o,i]=u.useState(),[a]=u.useState(),[s,l]=u.useState([]),c=u.useRef({}),d=Bk();Dk(d);const p=async e=>{const t=e?.doc?.rows||[],n=[];for(let e=0;e<t.length;e++){const r=t[e];r.columns?.forEach(e=>{if(e.override?.filter?.length){const t={};e.override.filter.forEach(e=>{e.hasOwnProperty("value")&&(t[e.field]=[e.value])}),e.filter=t}}),n.push(r)}l(n)};return u.useEffect(()=>{e&&(async()=>{Cs.setBaseUrl(r),Cs.setToken(t),await Cs.loadDashboardMeta({dashboardId:e});const n=await Cs.getDashboard({id:e});c.current[n?.id]=n,i(n),await p(n)})().catch(e=>console.error(e.message))},[e]),u.createElement(Qk,null,u.createElement(qk,{container:!0,spacing:2},s?.map((e,r)=>u.createElement(qk,{key:r,container:!0,item:!0,alignItems:"stretch",spacing:2},e?.columns?.map((e,r)=>u.createElement(qk,{key:r,item:!0,xs:!0,style:{display:"flex"}},u.createElement(Yk,{style:{flex:1,display:"flex",flexDirection:"column"}},u.createElement(Wk,{token:t,cache:c.current,id:e.id,dashboard:o,schema:a,channel:null,title:e.title,filter:e.filter,params:n}))))))))}};return Jk}();
131
+ `:null,yv=mg("span",{name:"MuiCircularProgress",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[n.variant],t[`color${Mf(n.color)}`]]}})(wg(({theme:e})=>({display:"inline-block",variants:[{props:{variant:"determinate"},style:{transition:e.transitions.create("transform")}},{props:{variant:"indeterminate"},style:gv||{animation:`${hv} 1.4s linear infinite`}},...Object.entries(e.palette).filter(dv()).map(([t])=>({props:{color:t},style:{color:(e.vars||e).palette[t].main}}))]}))),bv=mg("svg",{name:"MuiCircularProgress",slot:"Svg"})({display:"block"}),wv=mg("circle",{name:"MuiCircularProgress",slot:"Circle",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.circle,t[`circle${Mf(n.variant)}`],n.disableShrink&&t.circleDisableShrink]}})(wg(({theme:e})=>({stroke:"currentColor",variants:[{props:{variant:"determinate"},style:{transition:e.transitions.create("stroke-dashoffset")}},{props:{variant:"indeterminate"},style:{strokeDasharray:"80px, 200px",strokeDashoffset:0}},{props:({ownerState:e})=>"indeterminate"===e.variant&&!e.disableShrink,style:vv||{animation:`${mv} 1.4s ease-in-out infinite`}}]}))),xv=mg("circle",{name:"MuiCircularProgress",slot:"Track"})(wg(({theme:e})=>({stroke:"currentColor",opacity:(e.vars||e).palette.action.activatedOpacity}))),kv=l.forwardRef(function(e,t){const n=xg({props:e,name:"MuiCircularProgress"}),{className:r,color:o="primary",disableShrink:i=!1,enableTrackSlot:a=!1,size:s=40,style:l,thickness:u=3.6,value:c=0,variant:d="indeterminate",...p}=n,f={...n,color:o,disableShrink:i,size:s,thickness:u,value:c,variant:d,enableTrackSlot:a},h=(e=>{const{classes:t,variant:n,color:r,disableShrink:o}=e;return Cm({root:["root",n,`color${Mf(r)}`],svg:["svg"],track:["track"],circle:["circle",`circle${Mf(n)}`,o&&"circleDisableShrink"]},pv,t)})(f),m={},g={},v={};if("determinate"===d){const e=2*Math.PI*((fv-u)/2);m.strokeDasharray=e.toFixed(3),v["aria-valuenow"]=Math.round(c),m.strokeDashoffset=`${((100-c)/100*e).toFixed(3)}px`,g.transform="rotate(-90deg)"}return cf.jsx(yv,{className:yg(h.root,r),style:{width:s,height:s,...g,...l},ownerState:f,ref:t,role:"progressbar",...v,...p,children:cf.jsxs(bv,{className:h.svg,ownerState:f,viewBox:"22 22 44 44",children:[a?cf.jsx(xv,{className:h.track,ownerState:f,cx:fv,cy:fv,r:(fv-u)/2,fill:"none",strokeWidth:u,"aria-hidden":"true"}):null,cf.jsx(wv,{className:h.circle,style:m,ownerState:f,cx:fv,cy:fv,r:(fv-u)/2,fill:"none",strokeWidth:u})]})})});function Sv(e){return Bh("MuiIconButton",e)}const Ev=Dh("MuiIconButton",["root","disabled","colorInherit","colorPrimary","colorSecondary","colorError","colorInfo","colorSuccess","colorWarning","edgeStart","edgeEnd","sizeSmall","sizeMedium","sizeLarge","loading","loadingIndicator","loadingWrapper"]),Cv=mg(uv,{name:"MuiIconButton",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.loading&&t.loading,"default"!==n.color&&t[`color${Mf(n.color)}`],n.edge&&t[`edge${Mf(n.edge)}`],t[`size${Mf(n.size)}`]]}})(wg(({theme:e})=>({textAlign:"center",flex:"0 0 auto",fontSize:e.typography.pxToRem(24),padding:8,borderRadius:"50%",color:(e.vars||e).palette.action.active,transition:e.transitions.create("background-color",{duration:e.transitions.duration.shortest}),variants:[{props:e=>!e.disableRipple,style:{"--IconButton-hoverBg":e.alpha((e.vars||e).palette.action.active,(e.vars||e).palette.action.hoverOpacity),"&:hover":{backgroundColor:"var(--IconButton-hoverBg)","@media (hover: none)":{backgroundColor:"transparent"}}}},{props:{edge:"start"},style:{marginLeft:-12}},{props:{edge:"start",size:"small"},style:{marginLeft:-3}},{props:{edge:"end"},style:{marginRight:-12}},{props:{edge:"end",size:"small"},style:{marginRight:-3}}]})),wg(({theme:e})=>({variants:[{props:{color:"inherit"},style:{color:"inherit"}},...Object.entries(e.palette).filter(dv()).map(([t])=>({props:{color:t},style:{color:(e.vars||e).palette[t].main}})),...Object.entries(e.palette).filter(dv()).map(([t])=>({props:{color:t},style:{"--IconButton-hoverBg":e.alpha((e.vars||e).palette[t].main,(e.vars||e).palette.action.hoverOpacity)}})),{props:{size:"small"},style:{padding:5,fontSize:e.typography.pxToRem(18)}},{props:{size:"large"},style:{padding:12,fontSize:e.typography.pxToRem(28)}}],[`&.${Ev.disabled}`]:{backgroundColor:"transparent",color:(e.vars||e).palette.action.disabled},[`&.${Ev.loading}`]:{color:"transparent"}}))),Ov=mg("span",{name:"MuiIconButton",slot:"LoadingIndicator"})(({theme:e})=>({display:"none",position:"absolute",visibility:"visible",top:"50%",left:"50%",transform:"translate(-50%, -50%)",color:(e.vars||e).palette.action.disabled,variants:[{props:{loading:!0},style:{display:"flex"}}]})),Tv=l.forwardRef(function(e,t){const n=xg({props:e,name:"MuiIconButton"}),{edge:r=!1,children:o,className:i,color:a="default",disabled:s=!1,disableFocusRipple:l=!1,size:u="medium",id:c,loading:d=null,loadingIndicator:p,...f}=n,h=wm(c),m=p??cf.jsx(kv,{"aria-labelledby":h,color:"inherit",size:16}),g={...n,edge:r,color:a,disabled:s,disableFocusRipple:l,loading:d,loadingIndicator:m,size:u},v=(e=>{const{classes:t,disabled:n,color:r,edge:o,size:i,loading:a}=e;return Cm({root:["root",a&&"loading",n&&"disabled","default"!==r&&`color${Mf(r)}`,o&&`edge${Mf(o)}`,`size${Mf(i)}`],loadingIndicator:["loadingIndicator"],loadingWrapper:["loadingWrapper"]},Sv,t)})(g);return cf.jsxs(Cv,{id:d?h:c,className:yg(v.root,i),centerRipple:!0,focusRipple:!l,disabled:s||d,ref:t,...f,ownerState:g,children:["boolean"==typeof d&&cf.jsx("span",{className:v.loadingWrapper,style:{display:"contents"},children:cf.jsx(Ov,{className:v.loadingIndicator,ownerState:g,children:d&&m})}),o]})});var _v=Cg(cf.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"}));function Rv({array1:e,array2:t,parser:n=e=>e}){return e&&t&&e.length===t.length&&e.every((e,r)=>n(e)===n(t[r]))}function Pv(e){return e.normalize("NFD").replace(/[\u0300-\u036f]/g,"")}const Av=function(e={}){const{ignoreAccents:t=!0,ignoreCase:n=!0,limit:r,matchFrom:o="any",stringify:i,trim:a=!1}=e;return(e,{inputValue:s,getOptionLabel:l})=>{let u=a?s.trim():s;n&&(u=u.toLowerCase()),t&&(u=Pv(u));const c=u?e.filter(e=>{let r=(i||l)(e);return n&&(r=r.toLowerCase()),t&&(r=Pv(r)),"start"===o?r.startsWith(u):r.includes(u)}):e;return"number"==typeof r?c.slice(0,r):c}}(),Lv=e=>null!==e.current&&e.current.parentElement?.contains(document.activeElement),Nv=[];function Mv(e,t,n,r){if(t||null==e||r)return"";const o=n(e);return"string"==typeof o?o:""}function Iv(e){const{unstable_isActiveElementInListbox:t=Lv,unstable_classNamePrefix:n="Mui",autoComplete:r=!1,autoHighlight:o=!1,autoSelect:i=!1,blurOnSelect:a=!1,clearOnBlur:s=!e.freeSolo,clearOnEscape:u=!1,componentName:c="useAutocomplete",defaultValue:d=(e.multiple?Nv:null),disableClearable:p=!1,disableCloseOnSelect:f=!1,disabled:h,disabledItemsFocusable:m=!1,disableListWrap:g=!1,filterOptions:v=Av,filterSelectedOptions:y=!1,freeSolo:b=!1,getOptionDisabled:w,getOptionKey:x,getOptionLabel:k=e=>e.label??e,groupBy:S,handleHomeEndKeys:E=!e.freeSolo,id:C,includeInputInList:O=!1,inputValue:T,isOptionEqualToValue:_=(e,t)=>e===t,multiple:R=!1,onChange:P,onClose:A,onHighlightChange:L,onInputChange:N,onOpen:M,open:I,openOnFocus:F=!1,options:$,readOnly:j=!1,renderValue:z,selectOnFocus:B=!e.freeSolo,value:D}=e,W=wm(C);let U=k;U=e=>{const t=k(e);return"string"!=typeof t?String(t):t};const V=l.useRef(!1),K=l.useRef(!0),H=l.useRef(null),q=l.useRef(null),[G,Y]=l.useState(null),[X,Q]=l.useState(-1),J=o?0:-1,Z=l.useRef(J),ee=l.useRef(Mv(d??D,R,U)).current,[te,ne]=Pg({controlled:D,default:d,name:c}),[re,oe]=Pg({controlled:T,default:ee,name:c,state:"inputValue"}),[ie,ae]=l.useState(!1),se=l.useCallback((e,t,n)=>{if(!(R?te.length<t.length:null!==t)&&!s)return;const r=Mv(t,R,U,z);re!==r&&(oe(r),N&&N(e,r,n))},[U,re,R,N,oe,s,te,z]),[le,ue]=Pg({controlled:I,default:!1,name:c,state:"open"}),[ce,de]=l.useState(!0),pe=!R&&null!=te&&re===U(te),fe=le&&!j,he=fe?v($.filter(e=>!y||!(R?te:[te]).some(t=>null!==t&&_(e,t))),{inputValue:pe&&ce?"":re,getOptionLabel:U}):[],me=function(e){const t=l.useRef({});return l.useEffect(()=>{t.current=e}),t.current}({filteredOptions:he,value:te,inputValue:re});l.useEffect(()=>{const e=te!==me.value;ie&&!e||b&&!e||se(null,te,"reset")},[te,se,ie,me.value,b]);const ge=le&&he.length>0&&!j,ve=Ag(e=>{if(-1===e)H.current.focus();else{const t=z?"data-item-index":"data-tag-index";G.querySelector(`[${t}="${e}"]`).focus()}});l.useEffect(()=>{R&&X>te.length-1&&(Q(-1),ve(-1))},[te,R,X,ve]);const ye=Ag(({event:e,index:t,reason:r})=>{if(Z.current=t,-1===t?H.current.removeAttribute("aria-activedescendant"):H.current.setAttribute("aria-activedescendant",`${W}-option-${t}`),L&&["mouse","keyboard","touch"].includes(r)&&L(e,-1===t?null:he[t],r),!q.current)return;const o=q.current.querySelector(`[role="option"].${n}-focused`);o&&(o.classList.remove(`${n}-focused`),o.classList.remove(`${n}-focusVisible`));let i=q.current;if("listbox"!==q.current.getAttribute("role")&&(i=q.current.parentElement.querySelector('[role="listbox"]')),!i)return;if(-1===t)return void(i.scrollTop=0);const a=q.current.querySelector(`[data-option-index="${t}"]`);if(a&&(a.classList.add(`${n}-focused`),"keyboard"===r&&a.classList.add(`${n}-focusVisible`),i.scrollHeight>i.clientHeight&&"mouse"!==r&&"touch"!==r)){const e=a,t=i.clientHeight+i.scrollTop,n=e.offsetTop+e.offsetHeight;n>t?i.scrollTop=n-i.clientHeight:e.offsetTop-e.offsetHeight*(S?1.3:0)<i.scrollTop&&(i.scrollTop=e.offsetTop-e.offsetHeight*(S?1.3:0))}}),be=Ag(({event:e,diff:t,direction:n="next",reason:o})=>{if(!fe)return;const i=function(e,t){if(!q.current||e<0||e>=he.length)return-1;let n=e;for(;;){const r=q.current.querySelector(`[data-option-index="${n}"]`),o=!m&&(!r||r.disabled||"true"===r.getAttribute("aria-disabled"));if(r&&r.hasAttribute("tabindex")&&!o)return n;if(n="next"===t?(n+1)%he.length:(n-1+he.length)%he.length,n===e)return-1}}((()=>{const e=he.length-1;if("reset"===t)return J;if("start"===t)return 0;if("end"===t)return e;const n=Z.current+t;return n<0?-1===n&&O?-1:g&&-1!==Z.current||Math.abs(t)>1?0:e:n>e?n===e+1&&O?-1:g||Math.abs(t)>1?e:0:n})(),n);if(ye({index:i,reason:o,event:e}),r&&"reset"!==t)if(-1===i)H.current.value=re;else{const e=U(he[i]);H.current.value=e;0===e.toLowerCase().indexOf(re.toLowerCase())&&re.length>0&&H.current.setSelectionRange(re.length,e.length)}}),we=!Rv({array1:me.filteredOptions,array2:he,parser:U}),xe=l.useCallback(()=>{if(!fe)return;const e=(()=>{if(-1!==Z.current&&!Rv({array1:me.filteredOptions,array2:he,parser:U})&&me.inputValue===re&&(R?te.length===me.value.length&&me.value.every((e,t)=>U(te[t])===U(e)):(e=me.value,t=te,(e?U(e):"")===(t?U(t):"")))){const e=me.filteredOptions[Z.current];if(e)return he.findIndex(t=>U(t)===U(e))}var e,t;return-1})();if(-1!==e)return void(Z.current=e);const t=R?te[0]:te;if(0!==he.length&&null!=t){if(q.current){if(null!=t){const e=he[Z.current];if(R&&e&&-1!==te.findIndex(t=>_(e,t)))return;const n=he.findIndex(e=>_(e,t));return void(-1===n?be({diff:"reset"}):ye({index:n}))}Z.current>=he.length-1?ye({index:he.length-1}):ye({index:Z.current})}}else be({diff:"reset"})},[he.length,!R&&te,y,be,ye,fe,re,R]),ke=Ag(e=>{Rg(q,e),e&&xe()});l.useEffect(()=>{(we||fe)&&xe()},[xe,we,fe]);const Se=e=>{le||(ue(!0),de(!0),M&&M(e))},Ee=(e,t)=>{le&&(ue(!1),A&&A(e,t))},Ce=(e,t,n,r)=>{if(R){if(te.length===t.length&&te.every((e,n)=>e===t[n]))return}else if(te===t)return;P&&P(e,t,n,r),ne(t)},Oe=l.useRef(!1),Te=(e,t,n="selectOption",r="options")=>{let o=n,i=t;if(R){i=Array.isArray(te)?te.slice():[];const e=i.findIndex(e=>_(t,e));-1===e?i.push(t):"freeSolo"!==r&&(i.splice(e,1),o="removeOption")}se(e,i,o),Ce(e,i,o,{option:t}),f||e&&(e.ctrlKey||e.metaKey)||Ee(e,o),(!0===a||"touch"===a&&Oe.current||"mouse"===a&&!Oe.current)&&H.current.blur()};const _e=(e,t)=>{if(!R)return;""===re&&Ee(e,"toggleInput");let n=X;-1===X?""===re&&"previous"===t&&(n=te.length-1):(n+="next"===t?1:-1,n<0&&(n=0),n===te.length&&(n=-1)),n=function(e,t){if(-1===e)return-1;let n=e;for(;;){if("next"===t&&n===te.length||"previous"===t&&-1===n)return-1;const e=z?"data-item-index":"data-tag-index",r=G.querySelector(`[${e}="${n}"]`);if(r&&r.hasAttribute("tabindex")&&!r.disabled&&"true"!==r.getAttribute("aria-disabled"))return n;n+="next"===t?1:-1}}(n,t),Q(n),ve(n)},Re=e=>{V.current=!0,oe(""),N&&N(e,"","clear"),Ce(e,R?[]:null,"clear")},Pe=e=>t=>{if(e.onKeyDown&&e.onKeyDown(t),!t.defaultMuiPrevented&&(-1===X||["ArrowLeft","ArrowRight"].includes(t.key)||(Q(-1),ve(-1)),229!==t.which))switch(t.key){case"Home":fe&&E&&(t.preventDefault(),be({diff:"start",direction:"next",reason:"keyboard",event:t}));break;case"End":fe&&E&&(t.preventDefault(),be({diff:"end",direction:"previous",reason:"keyboard",event:t}));break;case"PageUp":t.preventDefault(),be({diff:-5,direction:"previous",reason:"keyboard",event:t}),Se(t);break;case"PageDown":t.preventDefault(),be({diff:5,direction:"next",reason:"keyboard",event:t}),Se(t);break;case"ArrowDown":t.preventDefault(),be({diff:1,direction:"next",reason:"keyboard",event:t}),Se(t);break;case"ArrowUp":t.preventDefault(),be({diff:-1,direction:"previous",reason:"keyboard",event:t}),Se(t);break;case"ArrowLeft":!R&&z?ve(0):_e(t,"previous");break;case"ArrowRight":!R&&z?ve(-1):_e(t,"next");break;case"Enter":if(-1!==Z.current&&fe){const e=he[Z.current],n=!!w&&w(e);if(t.preventDefault(),n)return;Te(t,e,"selectOption"),r&&H.current.setSelectionRange(H.current.value.length,H.current.value.length)}else b&&""!==re&&!1===pe&&(R&&t.preventDefault(),Te(t,re,"createOption","freeSolo"));break;case"Escape":fe?(t.preventDefault(),t.stopPropagation(),Ee(t,"escape")):u&&(""!==re||R&&te.length>0||z)&&(t.preventDefault(),t.stopPropagation(),Re(t));break;case"Backspace":if(R&&!j&&""===re&&te.length>0){const e=-1===X?te.length-1:X,n=te.slice();n.splice(e,1),Ce(t,n,"removeOption",{option:te[e]})}R||!z||j||(ne(null),ve(-1));break;case"Delete":if(R&&!j&&""===re&&te.length>0&&-1!==X){const e=X,n=te.slice();n.splice(e,1),Ce(t,n,"removeOption",{option:te[e]})}R||!z||j||(ne(null),ve(-1))}},Ae=e=>{ae(!0),F&&!V.current&&Se(e)},Le=e=>{t(q)?H.current.focus():(ae(!1),K.current=!0,V.current=!1,i&&-1!==Z.current&&fe?Te(e,he[Z.current],"blur"):i&&b&&""!==re?Te(e,re,"blur","freeSolo"):s&&se(e,te,"blur"),Ee(e,"blur"))},Ne=e=>{const t=e.target.value;re!==t&&(oe(t),de(!1),N&&N(e,t,"input")),""===t?p||R||Ce(e,null,"clear"):Se(e)},Me=e=>{const t=Number(e.currentTarget.getAttribute("data-option-index"));Z.current!==t&&ye({event:e,index:t,reason:"mouse"})},Ie=e=>{ye({event:e,index:Number(e.currentTarget.getAttribute("data-option-index")),reason:"touch"}),Oe.current=!0},Fe=e=>{const t=Number(e.currentTarget.getAttribute("data-option-index"));Te(e,he[t],"selectOption"),Oe.current=!1},$e=e=>t=>{const n=te.slice();n.splice(e,1),Ce(t,n,"removeOption",{option:te[e]})},je=e=>{Ce(e,null,"removeOption",{option:te})},ze=e=>{le?Ee(e,"toggleInput"):Se(e)},Be=e=>{e.currentTarget.contains(e.target)&&e.target.getAttribute("id")!==W&&e.preventDefault()},De=e=>{e.currentTarget.contains(e.target)&&(H.current.focus(),B&&K.current&&H.current.selectionEnd-H.current.selectionStart===0&&H.current.select(),K.current=!1)},We=e=>{h||""!==re&&le||ze(e)};let Ue=b&&re.length>0;Ue=Ue||(R?te.length>0:null!==te);let Ve=he;return S&&(Ve=he.reduce((e,t,n)=>{const r=S(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},[])),h&&ie&&Le(),{getRootProps:(e={})=>({...e,onKeyDown:Pe(e),onMouseDown:Be,onClick:De}),getInputLabelProps:()=>({id:`${W}-label`,htmlFor:W}),getInputProps:()=>({id:W,value:re,onBlur:Le,onFocus:Ae,onChange:Ne,onMouseDown:We,"aria-activedescendant":fe?"":null,"aria-autocomplete":r?"both":"list","aria-controls":ge?`${W}-listbox`:void 0,"aria-expanded":ge,autoComplete:"off",ref:H,autoCapitalize:"none",spellCheck:"false",role:"combobox",disabled:h}),getClearProps:()=>({tabIndex:-1,type:"button",onClick:Re}),getItemProps:({index:e=0}={})=>({...R&&{key:e},...z?{"data-item-index":e}:{"data-tag-index":e},tabIndex:-1,...!j&&{onDelete:R?$e(e):je}}),getPopupIndicatorProps:()=>({tabIndex:-1,type:"button",onClick:ze}),getTagProps:({index:e})=>({key:e,"data-tag-index":e,tabIndex:-1,...!j&&{onDelete:$e(e)}}),getListboxProps:()=>({role:"listbox",id:`${W}-listbox`,"aria-labelledby":`${W}-label`,ref:ke,onMouseDown:e=>{e.preventDefault()}}),getOptionProps:({index:e,option:t})=>{const n=(R?te:[te]).some(e=>null!=e&&_(t,e)),r=!!w&&w(t);return{key:x?.(t)??U(t),tabIndex:-1,role:"option",id:`${W}-option-${e}`,onMouseMove:Me,onClick:Fe,onTouchStart:Ie,"data-option-index":e,"aria-disabled":r,"aria-selected":n}},id:W,inputValue:re,value:te,dirty:Ue,expanded:fe&&G,popupOpen:fe,focused:ie||-1!==X,anchorEl:G,setAnchorEl:Y,focusedItem:X,focusedTag:X,groupedOptions:Ve}}var Fv="top",$v="bottom",jv="right",zv="left",Bv="auto",Dv=[Fv,$v,jv,zv],Wv="start",Uv="end",Vv="viewport",Kv="popper",Hv=Dv.reduce(function(e,t){return e.concat([t+"-"+Wv,t+"-"+Uv])},[]),qv=[].concat(Dv,[Bv]).reduce(function(e,t){return e.concat([t,t+"-"+Wv,t+"-"+Uv])},[]),Gv=["beforeRead","read","afterRead","beforeMain","main","afterMain","beforeWrite","write","afterWrite"];function Yv(e){return e?(e.nodeName||"").toLowerCase():null}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 Qv(e){return e instanceof Xv(e).Element||e instanceof Element}function Jv(e){return e instanceof Xv(e).HTMLElement||e instanceof HTMLElement}function Zv(e){return"undefined"!=typeof ShadowRoot&&(e instanceof Xv(e).ShadowRoot||e instanceof ShadowRoot)}var ey={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]||{},o=t.elements[e];Jv(o)&&Yv(o)&&(Object.assign(o.style,n),Object.keys(r).forEach(function(e){var t=r[e];!1===t?o.removeAttribute(e):o.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],o=t.attributes[e]||{},i=Object.keys(t.styles.hasOwnProperty(e)?t.styles[e]:n[e]).reduce(function(e,t){return e[t]="",e},{});Jv(r)&&Yv(r)&&(Object.assign(r.style,i),Object.keys(o).forEach(function(e){r.removeAttribute(e)}))})}},requires:["computeStyles"]};function ty(e){return e.split("-")[0]}var ny=Math.max,ry=Math.min,oy=Math.round;function iy(){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 ay(){return!/^((?!chrome|android).)*safari/i.test(iy())}function sy(e,t,n){void 0===t&&(t=!1),void 0===n&&(n=!1);var r=e.getBoundingClientRect(),o=1,i=1;t&&Jv(e)&&(o=e.offsetWidth>0&&oy(r.width)/e.offsetWidth||1,i=e.offsetHeight>0&&oy(r.height)/e.offsetHeight||1);var a=(Qv(e)?Xv(e):window).visualViewport,s=!ay()&&n,l=(r.left+(s&&a?a.offsetLeft:0))/o,u=(r.top+(s&&a?a.offsetTop:0))/i,c=r.width/o,d=r.height/i;return{width:c,height:d,top:u,right:l+c,bottom:u+d,left:l,x:l,y:u}}function ly(e){var t=sy(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 uy(e,t){var n=t.getRootNode&&t.getRootNode();if(e.contains(t))return!0;if(n&&Zv(n)){var r=t;do{if(r&&e.isSameNode(r))return!0;r=r.parentNode||r.host}while(r)}return!1}function cy(e){return Xv(e).getComputedStyle(e)}function dy(e){return["table","td","th"].indexOf(Yv(e))>=0}function py(e){return((Qv(e)?e.ownerDocument:e.document)||window.document).documentElement}function fy(e){return"html"===Yv(e)?e:e.assignedSlot||e.parentNode||(Zv(e)?e.host:null)||py(e)}function hy(e){return Jv(e)&&"fixed"!==cy(e).position?e.offsetParent:null}function my(e){for(var t=Xv(e),n=hy(e);n&&dy(n)&&"static"===cy(n).position;)n=hy(n);return n&&("html"===Yv(n)||"body"===Yv(n)&&"static"===cy(n).position)?t:n||function(e){var t=/firefox/i.test(iy());if(/Trident/i.test(iy())&&Jv(e)&&"fixed"===cy(e).position)return null;var n=fy(e);for(Zv(n)&&(n=n.host);Jv(n)&&["html","body"].indexOf(Yv(n))<0;){var r=cy(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}function gy(e){return["top","bottom"].indexOf(e)>=0?"x":"y"}function vy(e,t,n){return ny(e,ry(t,n))}function yy(e){return Object.assign({},{top:0,right:0,bottom:0,left:0},e)}function by(e,t){return t.reduce(function(t,n){return t[n]=e,t},{})}var wy={name:"arrow",enabled:!0,phase:"main",fn:function(e){var t,n=e.state,r=e.name,o=e.options,i=n.elements.arrow,a=n.modifiersData.popperOffsets,s=ty(n.placement),l=gy(s),u=[zv,jv].indexOf(s)>=0?"height":"width";if(i&&a){var c=function(e,t){return yy("number"!=typeof(e="function"==typeof e?e(Object.assign({},t.rects,{placement:t.placement})):e)?e:by(e,Dv))}(o.padding,n),d=ly(i),p="y"===l?Fv:zv,f="y"===l?$v:jv,h=n.rects.reference[u]+n.rects.reference[l]-a[l]-n.rects.popper[u],m=a[l]-n.rects.reference[l],g=my(i),v=g?"y"===l?g.clientHeight||0:g.clientWidth||0:0,y=h/2-m/2,b=c[p],w=v-d[u]-c[f],x=v/2-d[u]/2+y,k=vy(b,x,w),S=l;n.modifiersData[r]=((t={})[S]=k,t.centerOffset=k-x,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)))&&uy(t.elements.popper,r)&&(t.elements.arrow=r)},requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};function xy(e){return e.split("-")[1]}var ky={top:"auto",right:"auto",bottom:"auto",left:"auto"};function Sy(e){var t,n=e.popper,r=e.popperRect,o=e.placement,i=e.variation,a=e.offsets,s=e.position,l=e.gpuAcceleration,u=e.adaptive,c=e.roundOffsets,d=e.isFixed,p=a.x,f=void 0===p?0:p,h=a.y,m=void 0===h?0:h,g="function"==typeof c?c({x:f,y:m}):{x:f,y:m};f=g.x,m=g.y;var v=a.hasOwnProperty("x"),y=a.hasOwnProperty("y"),b=zv,w=Fv,x=window;if(u){var k=my(n),S="clientHeight",E="clientWidth";if(k===Xv(n)&&"static"!==cy(k=py(n)).position&&"absolute"===s&&(S="scrollHeight",E="scrollWidth"),o===Fv||(o===zv||o===jv)&&i===Uv)w=$v,m-=(d&&k===x&&x.visualViewport?x.visualViewport.height:k[S])-r.height,m*=l?1:-1;if(o===zv||(o===Fv||o===$v)&&i===Uv)b=jv,f-=(d&&k===x&&x.visualViewport?x.visualViewport.width:k[E])-r.width,f*=l?1:-1}var C,O=Object.assign({position:s},u&&ky),T=!0===c?function(e,t){var n=e.x,r=e.y,o=t.devicePixelRatio||1;return{x:oy(n*o)/o||0,y:oy(r*o)/o||0}}({x:f,y:m},Xv(n)):{x:f,y:m};return f=T.x,m=T.y,l?Object.assign({},O,((C={})[w]=y?"0":"",C[b]=v?"0":"",C.transform=(x.devicePixelRatio||1)<=1?"translate("+f+"px, "+m+"px)":"translate3d("+f+"px, "+m+"px, 0)",C)):Object.assign({},O,((t={})[w]=y?m+"px":"",t[b]=v?f+"px":"",t.transform="",t))}var Ey={passive:!0};var Cy={name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:function(e){var t=e.state,n=e.instance,r=e.options,o=r.scroll,i=void 0===o||o,a=r.resize,s=void 0===a||a,l=Xv(t.elements.popper),u=[].concat(t.scrollParents.reference,t.scrollParents.popper);return i&&u.forEach(function(e){e.addEventListener("scroll",n.update,Ey)}),s&&l.addEventListener("resize",n.update,Ey),function(){i&&u.forEach(function(e){e.removeEventListener("scroll",n.update,Ey)}),s&&l.removeEventListener("resize",n.update,Ey)}},data:{}},Oy={left:"right",right:"left",bottom:"top",top:"bottom"};function Ty(e){return e.replace(/left|right|bottom|top/g,function(e){return Oy[e]})}var _y={start:"end",end:"start"};function Ry(e){return e.replace(/start|end/g,function(e){return _y[e]})}function Py(e){var t=Xv(e);return{scrollLeft:t.pageXOffset,scrollTop:t.pageYOffset}}function Ay(e){return sy(py(e)).left+Py(e).scrollLeft}function Ly(e){var t=cy(e),n=t.overflow,r=t.overflowX,o=t.overflowY;return/auto|scroll|overlay|hidden/.test(n+o+r)}function Ny(e){return["html","body","#document"].indexOf(Yv(e))>=0?e.ownerDocument.body:Jv(e)&&Ly(e)?e:Ny(fy(e))}function My(e,t){var n;void 0===t&&(t=[]);var r=Ny(e),o=r===(null==(n=e.ownerDocument)?void 0:n.body),i=Xv(r),a=o?[i].concat(i.visualViewport||[],Ly(r)?r:[]):r,s=t.concat(a);return o?s:s.concat(My(fy(a)))}function Iy(e){return Object.assign({},e,{left:e.x,top:e.y,right:e.x+e.width,bottom:e.y+e.height})}function Fy(e,t,n){return t===Vv?Iy(function(e,t){var n=Xv(e),r=py(e),o=n.visualViewport,i=r.clientWidth,a=r.clientHeight,s=0,l=0;if(o){i=o.width,a=o.height;var u=ay();(u||!u&&"fixed"===t)&&(s=o.offsetLeft,l=o.offsetTop)}return{width:i,height:a,x:s+Ay(e),y:l}}(e,n)):Qv(t)?function(e,t){var n=sy(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):Iy(function(e){var t,n=py(e),r=Py(e),o=null==(t=e.ownerDocument)?void 0:t.body,i=ny(n.scrollWidth,n.clientWidth,o?o.scrollWidth:0,o?o.clientWidth:0),a=ny(n.scrollHeight,n.clientHeight,o?o.scrollHeight:0,o?o.clientHeight:0),s=-r.scrollLeft+Ay(e),l=-r.scrollTop;return"rtl"===cy(o||n).direction&&(s+=ny(n.clientWidth,o?o.clientWidth:0)-i),{width:i,height:a,x:s,y:l}}(py(e)))}function $y(e,t,n,r){var o="clippingParents"===t?function(e){var t=My(fy(e)),n=["absolute","fixed"].indexOf(cy(e).position)>=0&&Jv(e)?my(e):e;return Qv(n)?t.filter(function(e){return Qv(e)&&uy(e,n)&&"body"!==Yv(e)}):[]}(e):[].concat(t),i=[].concat(o,[n]),a=i[0],s=i.reduce(function(t,n){var o=Fy(e,n,r);return t.top=ny(o.top,t.top),t.right=ry(o.right,t.right),t.bottom=ry(o.bottom,t.bottom),t.left=ny(o.left,t.left),t},Fy(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 jy(e){var t,n=e.reference,r=e.element,o=e.placement,i=o?ty(o):null,a=o?xy(o):null,s=n.x+n.width/2-r.width/2,l=n.y+n.height/2-r.height/2;switch(i){case Fv:t={x:s,y:n.y-r.height};break;case $v:t={x:s,y:n.y+n.height};break;case jv:t={x:n.x+n.width,y:l};break;case zv:t={x:n.x-r.width,y:l};break;default:t={x:n.x,y:n.y}}var u=i?gy(i):null;if(null!=u){var c="y"===u?"height":"width";switch(a){case Wv:t[u]=t[u]-(n[c]/2-r[c]/2);break;case Uv:t[u]=t[u]+(n[c]/2-r[c]/2)}}return t}function zy(e,t){void 0===t&&(t={});var n=t,r=n.placement,o=void 0===r?e.placement:r,i=n.strategy,a=void 0===i?e.strategy:i,s=n.boundary,l=void 0===s?"clippingParents":s,u=n.rootBoundary,c=void 0===u?Vv:u,d=n.elementContext,p=void 0===d?Kv:d,f=n.altBoundary,h=void 0!==f&&f,m=n.padding,g=void 0===m?0:m,v=yy("number"!=typeof g?g:by(g,Dv)),y=p===Kv?"reference":Kv,b=e.rects.popper,w=e.elements[h?y:p],x=$y(Qv(w)?w:w.contextElement||py(e.elements.popper),l,c,a),k=sy(e.elements.reference),S=jy({reference:k,element:b,placement:o}),E=Iy(Object.assign({},b,S)),C=p===Kv?E:k,O={top:x.top-C.top+v.top,bottom:C.bottom-x.bottom+v.bottom,left:x.left-C.left+v.left,right:C.right-x.right+v.right},T=e.modifiersData.offset;if(p===Kv&&T){var _=T[o];Object.keys(O).forEach(function(e){var t=[jv,$v].indexOf(e)>=0?1:-1,n=[Fv,$v].indexOf(e)>=0?"y":"x";O[e]+=_[n]*t})}return O}function By(e,t){void 0===t&&(t={});var n=t,r=n.placement,o=n.boundary,i=n.rootBoundary,a=n.padding,s=n.flipVariations,l=n.allowedAutoPlacements,u=void 0===l?qv:l,c=xy(r),d=c?s?Hv:Hv.filter(function(e){return xy(e)===c}):Dv,p=d.filter(function(e){return u.indexOf(e)>=0});0===p.length&&(p=d);var f=p.reduce(function(t,n){return t[n]=zy(e,{placement:n,boundary:o,rootBoundary:i,padding:a})[ty(n)],t},{});return Object.keys(f).sort(function(e,t){return f[e]-f[t]})}var Dy={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 o=n.mainAxis,i=void 0===o||o,a=n.altAxis,s=void 0===a||a,l=n.fallbackPlacements,u=n.padding,c=n.boundary,d=n.rootBoundary,p=n.altBoundary,f=n.flipVariations,h=void 0===f||f,m=n.allowedAutoPlacements,g=t.options.placement,v=ty(g),y=l||(v===g||!h?[Ty(g)]:function(e){if(ty(e)===Bv)return[];var t=Ty(e);return[Ry(e),t,Ry(t)]}(g)),b=[g].concat(y).reduce(function(e,n){return e.concat(ty(n)===Bv?By(t,{placement:n,boundary:c,rootBoundary:d,padding:u,flipVariations:h,allowedAutoPlacements:m}):n)},[]),w=t.rects.reference,x=t.rects.popper,k=new Map,S=!0,E=b[0],C=0;C<b.length;C++){var O=b[C],T=ty(O),_=xy(O)===Wv,R=[Fv,$v].indexOf(T)>=0,P=R?"width":"height",A=zy(t,{placement:O,boundary:c,rootBoundary:d,altBoundary:p,padding:u}),L=R?_?jv:zv:_?$v:Fv;w[P]>x[P]&&(L=Ty(L));var N=Ty(L),M=[];if(i&&M.push(A[T]<=0),s&&M.push(A[L]<=0,A[N]<=0),M.every(function(e){return e})){E=O,S=!1;break}k.set(O,M)}if(S)for(var I=function(e){var t=b.find(function(t){var n=k.get(t);if(n)return n.slice(0,e).every(function(e){return e})});if(t)return E=t,"break"},F=h?3:1;F>0;F--){if("break"===I(F))break}t.placement!==E&&(t.modifiersData[r]._skip=!0,t.placement=E,t.reset=!0)}},requiresIfExists:["offset"],data:{_skip:!1}};function Wy(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 Uy(e){return[Fv,jv,$v,zv].some(function(t){return e[t]>=0})}var Vy={name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:function(e){var t=e.state,n=e.name,r=t.rects.reference,o=t.rects.popper,i=t.modifiersData.preventOverflow,a=zy(t,{elementContext:"reference"}),s=zy(t,{altBoundary:!0}),l=Wy(a,r),u=Wy(s,o,i),c=Uy(l),d=Uy(u);t.modifiersData[n]={referenceClippingOffsets:l,popperEscapeOffsets:u,isReferenceHidden:c,hasPopperEscaped:d},t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-reference-hidden":c,"data-popper-escaped":d})}};var Ky={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:function(e){var t=e.state,n=e.options,r=e.name,o=n.offset,i=void 0===o?[0,0]:o,a=qv.reduce(function(e,n){return e[n]=function(e,t,n){var r=ty(e),o=[zv,Fv].indexOf(r)>=0?-1:1,i="function"==typeof n?n(Object.assign({},t,{placement:e})):n,a=i[0],s=i[1];return a=a||0,s=(s||0)*o,[zv,jv].indexOf(r)>=0?{x:s,y:a}:{x:a,y:s}}(n,t.rects,i),e},{}),s=a[t.placement],l=s.x,u=s.y;null!=t.modifiersData.popperOffsets&&(t.modifiersData.popperOffsets.x+=l,t.modifiersData.popperOffsets.y+=u),t.modifiersData[r]=a}};var Hy={name:"popperOffsets",enabled:!0,phase:"read",fn:function(e){var t=e.state,n=e.name;t.modifiersData[n]=jy({reference:t.rects.reference,element:t.rects.popper,placement:t.placement})},data:{}};var qy={name:"preventOverflow",enabled:!0,phase:"main",fn:function(e){var t=e.state,n=e.options,r=e.name,o=n.mainAxis,i=void 0===o||o,a=n.altAxis,s=void 0!==a&&a,l=n.boundary,u=n.rootBoundary,c=n.altBoundary,d=n.padding,p=n.tether,f=void 0===p||p,h=n.tetherOffset,m=void 0===h?0:h,g=zy(t,{boundary:l,rootBoundary:u,padding:d,altBoundary:c}),v=ty(t.placement),y=xy(t.placement),b=!y,w=gy(v),x="x"===w?"y":"x",k=t.modifiersData.popperOffsets,S=t.rects.reference,E=t.rects.popper,C="function"==typeof m?m(Object.assign({},t.rects,{placement:t.placement})):m,O="number"==typeof C?{mainAxis:C,altAxis:C}:Object.assign({mainAxis:0,altAxis:0},C),T=t.modifiersData.offset?t.modifiersData.offset[t.placement]:null,_={x:0,y:0};if(k){if(i){var R,P="y"===w?Fv:zv,A="y"===w?$v:jv,L="y"===w?"height":"width",N=k[w],M=N+g[P],I=N-g[A],F=f?-E[L]/2:0,$=y===Wv?S[L]:E[L],j=y===Wv?-E[L]:-S[L],z=t.elements.arrow,B=f&&z?ly(z):{width:0,height:0},D=t.modifiersData["arrow#persistent"]?t.modifiersData["arrow#persistent"].padding:{top:0,right:0,bottom:0,left:0},W=D[P],U=D[A],V=vy(0,S[L],B[L]),K=b?S[L]/2-F-V-W-O.mainAxis:$-V-W-O.mainAxis,H=b?-S[L]/2+F+V+U+O.mainAxis:j+V+U+O.mainAxis,q=t.elements.arrow&&my(t.elements.arrow),G=q?"y"===w?q.clientTop||0:q.clientLeft||0:0,Y=null!=(R=null==T?void 0:T[w])?R:0,X=N+H-Y,Q=vy(f?ry(M,N+K-Y-G):M,N,f?ny(I,X):I);k[w]=Q,_[w]=Q-N}if(s){var J,Z="x"===w?Fv:zv,ee="x"===w?$v:jv,te=k[x],ne="y"===x?"height":"width",re=te+g[Z],oe=te-g[ee],ie=-1!==[Fv,zv].indexOf(v),ae=null!=(J=null==T?void 0:T[x])?J:0,se=ie?re:te-S[ne]-E[ne]-ae+O.altAxis,le=ie?te+S[ne]+E[ne]-ae-O.altAxis:oe,ue=f&&ie?function(e,t,n){var r=vy(e,t,n);return r>n?n:r}(se,te,le):vy(f?se:re,te,f?le:oe);k[x]=ue,_[x]=ue-te}t.modifiersData[r]=_}},requiresIfExists:["offset"]};function Gy(e,t,n){void 0===n&&(n=!1);var r=Jv(t),o=Jv(t)&&function(e){var t=e.getBoundingClientRect(),n=oy(t.width)/e.offsetWidth||1,r=oy(t.height)/e.offsetHeight||1;return 1!==n||1!==r}(t),i=py(t),a=sy(e,o,n),s={scrollLeft:0,scrollTop:0},l={x:0,y:0};return(r||!r&&!n)&&(("body"!==Yv(t)||Ly(i))&&(s=function(e){return e!==Xv(e)&&Jv(e)?{scrollLeft:(t=e).scrollLeft,scrollTop:t.scrollTop}:Py(e);var t}(t)),Jv(t)?((l=sy(t,!0)).x+=t.clientLeft,l.y+=t.clientTop):i&&(l.x=Ay(i))),{x:a.left+s.scrollLeft-l.x,y:a.top+s.scrollTop-l.y,width:a.width,height:a.height}}function Yy(e){var t=new Map,n=new Set,r=[];function o(e){n.add(e.name),[].concat(e.requires||[],e.requiresIfExists||[]).forEach(function(e){if(!n.has(e)){var r=t.get(e);r&&o(r)}}),r.push(e)}return e.forEach(function(e){t.set(e.name,e)}),e.forEach(function(e){n.has(e.name)||o(e)}),r}var Xy={placement:"bottom",modifiers:[],strategy:"absolute"};function Qy(){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 Jy(e){void 0===e&&(e={});var t=e,n=t.defaultModifiers,r=void 0===n?[]:n,o=t.defaultOptions,i=void 0===o?Xy:o;return function(e,t,n){void 0===n&&(n=i);var o,a,s={placement:"bottom",orderedModifiers:[],options:Object.assign({},Xy,i),modifiersData:{},elements:{reference:e,popper:t},attributes:{},styles:{}},l=[],u=!1,c={state:s,setOptions:function(n){var o="function"==typeof n?n(s.options):n;d(),s.options=Object.assign({},i,s.options,o),s.scrollParents={reference:Qv(e)?My(e):e.contextElement?My(e.contextElement):[],popper:My(t)};var a,u,p=function(e){var t=Yy(e);return Gv.reduce(function(e,n){return e.concat(t.filter(function(e){return e.phase===n}))},[])}((a=[].concat(r,s.options.modifiers),u=a.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},{}),Object.keys(u).map(function(e){return u[e]})));return s.orderedModifiers=p.filter(function(e){return e.enabled}),s.orderedModifiers.forEach(function(e){var t=e.name,n=e.options,r=void 0===n?{}:n,o=e.effect;if("function"==typeof o){var i=o({state:s,name:t,instance:c,options:r}),a=function(){};l.push(i||a)}}),c.update()},forceUpdate:function(){if(!u){var e=s.elements,t=e.reference,n=e.popper;if(Qy(t,n)){s.rects={reference:Gy(t,my(n),"fixed"===s.options.strategy),popper:ly(n)},s.reset=!1,s.placement=s.options.placement,s.orderedModifiers.forEach(function(e){return s.modifiersData[e.name]=Object.assign({},e.data)});for(var r=0;r<s.orderedModifiers.length;r++)if(!0!==s.reset){var o=s.orderedModifiers[r],i=o.fn,a=o.options,l=void 0===a?{}:a,d=o.name;"function"==typeof i&&(s=i({state:s,options:l,name:d,instance:c})||s)}else s.reset=!1,r=-1}}},update:(o=function(){return new Promise(function(e){c.forceUpdate(),e(s)})},function(){return a||(a=new Promise(function(e){Promise.resolve().then(function(){a=void 0,e(o())})})),a}),destroy:function(){d(),u=!0}};if(!Qy(e,t))return c;function d(){l.forEach(function(e){return e()}),l=[]}return c.setOptions(n).then(function(e){!u&&n.onFirstUpdate&&n.onFirstUpdate(e)}),c}}var Zy=Jy({defaultModifiers:[Cy,Hy,{name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:function(e){var t=e.state,n=e.options,r=n.gpuAcceleration,o=void 0===r||r,i=n.adaptive,a=void 0===i||i,s=n.roundOffsets,l=void 0===s||s,u={placement:ty(t.placement),variation:xy(t.placement),popper:t.elements.popper,popperRect:t.rects.popper,gpuAcceleration:o,isFixed:"fixed"===t.options.strategy};null!=t.modifiersData.popperOffsets&&(t.styles.popper=Object.assign({},t.styles.popper,Sy(Object.assign({},u,{offsets:t.modifiersData.popperOffsets,position:t.options.strategy,adaptive:a,roundOffsets:l})))),null!=t.modifiersData.arrow&&(t.styles.arrow=Object.assign({},t.styles.arrow,Sy(Object.assign({},u,{offsets:t.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:l})))),t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-placement":t.placement})},data:{}},ey,Ky,Dy,qy,wy,Vy]});function eb(e){const{elementType:t,externalSlotProps:n,ownerState:r,skipResolvingSlotProps:o=!1,...i}=e,a=o?{}:Ug(n,r),{props:s,internalRef:l}=Hg({...i,externalSlotProps:a});return Wg(t,{...s,ref:Lg(l,a?.ref,e.additionalProps?.ref)},r)}function tb(e){return parseInt(l.version,10)>=19?e?.props?.ref||null:e?.ref||null}const nb=l.forwardRef(function(e,t){const{children:n,container:r,disablePortal:o=!1}=e,[i,a]=l.useState(null),s=Lg(l.isValidElement(n)?tb(n):null,t);if(em(()=>{o||a(function(e){return"function"==typeof e?e():e}(r)||document.body)},[r,o]),em(()=>{if(i&&!o)return Rg(t,i),()=>{Rg(t,null)}},[t,i,o]),o){if(l.isValidElement(n)){const e={ref:s};return l.cloneElement(n,e)}return n}return i?Ol.createPortal(n,i):i});function rb(e){return Bh("MuiPopper",e)}function ob(e){return"function"==typeof e?e():e}Dh("MuiPopper",["root"]);const ib={},ab=l.forwardRef(function(e,t){const{anchorEl:n,children:r,direction:o,disablePortal:i,modifiers:a,open:s,placement:u,popperOptions:c,popperRef:d,slotProps:p={},slots:f={},TransitionProps:h,ownerState:m,...g}=e,v=l.useRef(null),y=Lg(v,t),b=l.useRef(null),w=Lg(b,d),x=l.useRef(w);em(()=>{x.current=w},[w]),l.useImperativeHandle(d,()=>b.current,[]);const k=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}}(u,o),[S,E]=l.useState(k),[C,O]=l.useState(ob(n));l.useEffect(()=>{b.current&&b.current.forceUpdate()}),l.useEffect(()=>{n&&O(ob(n))},[n]),em(()=>{if(!C||!s)return;let e=[{name:"preventOverflow",options:{altBoundary:i}},{name:"flip",options:{altBoundary:i}},{name:"onUpdate",enabled:!0,phase:"afterWrite",fn:({state:e})=>{E(e.placement)}}];null!=a&&(e=e.concat(a)),c&&null!=c.modifiers&&(e=e.concat(c.modifiers));const t=Zy(C,v.current,{placement:k,...c,modifiers:e});return x.current(t),()=>{t.destroy(),x.current(null)}},[C,i,a,s,c,k]);const T={placement:S};null!==h&&(T.TransitionProps=h);const _=(e=>{const{classes:t}=e;return Cm({root:["root"]},rb,t)})(e),R=f.root??"div",P=eb({elementType:R,externalSlotProps:p.root,externalForwardedProps:g,additionalProps:{role:"tooltip",ref:y},ownerState:e,className:_.root});return cf.jsx(R,{...P,children:"function"==typeof r?r(T):r})}),sb=l.forwardRef(function(e,t){const{anchorEl:n,children:r,container:o,direction:i="ltr",disablePortal:a=!1,keepMounted:s=!1,modifiers:u,open:c,placement:d="bottom",popperOptions:p=ib,popperRef:f,style:h,transition:m=!1,slotProps:g={},slots:v={},...y}=e,[b,w]=l.useState(!0);if(!s&&!c&&(!m||b))return null;let x;if(o)x=o;else if(n){const e=ob(n);x=e&&void 0!==e.nodeType?Tg(e).body:Tg(null).body}const k=c||!s||m&&!b?void 0:"none",S=m?{in:c,onEnter:()=>{w(!1)},onExited:()=>{w(!0)}}:void 0;return cf.jsx(nb,{disablePortal:a,container:x,children:cf.jsx(ab,{anchorEl:n,direction:i,disablePortal:a,modifiers:u,ref:t,open:m?!b:c,placement:d,popperOptions:p,popperRef:f,slotProps:g,slots:v,...y,style:{position:"fixed",top:0,left:0,display:k,...h},TransitionProps:S,children:r})})}),lb=mg(sb,{name:"MuiPopper",slot:"Root"})({}),ub=l.forwardRef(function(e,t){const n=mm(),r=xg({props:e,name:"MuiPopper"}),{anchorEl:o,component:i,components:a,componentsProps:s,container:l,disablePortal:u,keepMounted:c,modifiers:d,open:p,placement:f,popperOptions:h,popperRef:m,transition:g,slots:v,slotProps:y,...b}=r,w=v?.root??a?.Root,x={anchorEl:o,container:l,disablePortal:u,keepMounted:c,modifiers:d,open:p,placement:f,popperOptions:h,popperRef:m,transition:g,...b};return cf.jsx(lb,{as:i,direction:n?"rtl":"ltr",slots:{root:w},slotProps:y??s,...x,ref:t})});function cb(e){return Bh("MuiListSubheader",e)}Dh("MuiListSubheader",["root","colorPrimary","colorInherit","gutters","inset","sticky"]);const db=mg("li",{name:"MuiListSubheader",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,"default"!==n.color&&t[`color${Mf(n.color)}`],!n.disableGutters&&t.gutters,n.inset&&t.inset,!n.disableSticky&&t.sticky]}})(wg(({theme:e})=>({boxSizing:"border-box",lineHeight:"48px",listStyle:"none",color:(e.vars||e).palette.text.secondary,fontFamily:e.typography.fontFamily,fontWeight:e.typography.fontWeightMedium,fontSize:e.typography.pxToRem(14),variants:[{props:{color:"primary"},style:{color:(e.vars||e).palette.primary.main}},{props:{color:"inherit"},style:{color:"inherit"}},{props:({ownerState:e})=>!e.disableGutters,style:{paddingLeft:16,paddingRight:16}},{props:({ownerState:e})=>e.inset,style:{paddingLeft:72}},{props:({ownerState:e})=>!e.disableSticky,style:{position:"sticky",top:0,zIndex:1,backgroundColor:(e.vars||e).palette.background.paper}}]}))),pb=l.forwardRef(function(e,t){const n=xg({props:e,name:"MuiListSubheader"}),{className:r,color:o="default",component:i="li",disableGutters:a=!1,disableSticky:s=!1,inset:l=!1,...u}=n,c={...n,color:o,component:i,disableGutters:a,disableSticky:s,inset:l},d=(e=>{const{classes:t,color:n,disableGutters:r,inset:o,disableSticky:i}=e;return Cm({root:["root","default"!==n&&`color${Mf(n)}`,!r&&"gutters",o&&"inset",!i&&"sticky"]},cb,t)})(c);return cf.jsx(db,{as:i,className:yg(d.root,r),ref:t,ownerState:c,...u})});pb&&(pb.muiSkipListHighlight=!0);var fb=Cg(cf.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"}));function hb(e){return Bh("MuiChip",e)}const mb=Dh("MuiChip",["root","sizeSmall","sizeMedium","colorDefault","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"]),gb=mg("div",{name:"MuiChip",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e,{color:r,iconColor:o,clickable:i,onDelete:a,size:s,variant:l}=n;return[{[`& .${mb.avatar}`]:t.avatar},{[`& .${mb.avatar}`]:t[`avatar${Mf(s)}`]},{[`& .${mb.avatar}`]:t[`avatarColor${Mf(r)}`]},{[`& .${mb.icon}`]:t.icon},{[`& .${mb.icon}`]:t[`icon${Mf(s)}`]},{[`& .${mb.icon}`]:t[`iconColor${Mf(o)}`]},{[`& .${mb.deleteIcon}`]:t.deleteIcon},{[`& .${mb.deleteIcon}`]:t[`deleteIcon${Mf(s)}`]},{[`& .${mb.deleteIcon}`]:t[`deleteIconColor${Mf(r)}`]},{[`& .${mb.deleteIcon}`]:t[`deleteIcon${Mf(l)}Color${Mf(r)}`]},t.root,t[`size${Mf(s)}`],t[`color${Mf(r)}`],i&&t.clickable,i&&"default"!==r&&t[`clickableColor${Mf(r)})`],a&&t.deletable,a&&"default"!==r&&t[`deletableColor${Mf(r)}`],t[l],t[`${l}${Mf(r)}`]]}})(wg(({theme:e})=>{const t="light"===e.palette.mode?e.palette.grey[700]:e.palette.grey[300];return{maxWidth:"100%",fontFamily:e.typography.fontFamily,fontSize:e.typography.pxToRem(13),display:"inline-flex",alignItems:"center",justifyContent:"center",height:32,lineHeight:1.5,color:(e.vars||e).palette.text.primary,backgroundColor:(e.vars||e).palette.action.selected,borderRadius:16,whiteSpace:"nowrap",transition:e.transitions.create(["background-color","box-shadow"]),cursor:"unset",outline:0,textDecoration:"none",border:0,padding:0,verticalAlign:"middle",boxSizing:"border-box",[`&.${mb.disabled}`]:{opacity:(e.vars||e).palette.action.disabledOpacity,pointerEvents:"none"},[`& .${mb.avatar}`]:{marginLeft:5,marginRight:-6,width:24,height:24,color:e.vars?e.vars.palette.Chip.defaultAvatarColor:t,fontSize:e.typography.pxToRem(12)},[`& .${mb.avatarColorPrimary}`]:{color:(e.vars||e).palette.primary.contrastText,backgroundColor:(e.vars||e).palette.primary.dark},[`& .${mb.avatarColorSecondary}`]:{color:(e.vars||e).palette.secondary.contrastText,backgroundColor:(e.vars||e).palette.secondary.dark},[`& .${mb.avatarSmall}`]:{marginLeft:4,marginRight:-4,width:18,height:18,fontSize:e.typography.pxToRem(10)},[`& .${mb.icon}`]:{marginLeft:5,marginRight:-6},[`& .${mb.deleteIcon}`]:{WebkitTapHighlightColor:"transparent",color:e.alpha((e.vars||e).palette.text.primary,.26),fontSize:22,cursor:"pointer",margin:"0 5px 0 -6px","&:hover":{color:e.alpha((e.vars||e).palette.text.primary,.4)}},variants:[{props:{size:"small"},style:{height:24,[`& .${mb.icon}`]:{fontSize:18,marginLeft:4,marginRight:-4},[`& .${mb.deleteIcon}`]:{fontSize:16,marginRight:4,marginLeft:-4}}},...Object.entries(e.palette).filter(dv(["contrastText"])).map(([t])=>({props:{color:t},style:{backgroundColor:(e.vars||e).palette[t].main,color:(e.vars||e).palette[t].contrastText,[`& .${mb.deleteIcon}`]:{color:e.alpha((e.vars||e).palette[t].contrastText,.7),"&:hover, &:active":{color:(e.vars||e).palette[t].contrastText}}}})),{props:e=>e.iconColor===e.color,style:{[`& .${mb.icon}`]:{color:e.vars?e.vars.palette.Chip.defaultIconColor:t}}},{props:e=>e.iconColor===e.color&&"default"!==e.color,style:{[`& .${mb.icon}`]:{color:"inherit"}}},{props:{onDelete:!0},style:{[`&.${mb.focusVisible}`]:{backgroundColor:e.alpha((e.vars||e).palette.action.selected,`${(e.vars||e).palette.action.selectedOpacity} + ${(e.vars||e).palette.action.focusOpacity}`)}}},...Object.entries(e.palette).filter(dv(["dark"])).map(([t])=>({props:{color:t,onDelete:!0},style:{[`&.${mb.focusVisible}`]:{background:(e.vars||e).palette[t].dark}}})),{props:{clickable:!0},style:{userSelect:"none",WebkitTapHighlightColor:"transparent",cursor:"pointer","&:hover":{backgroundColor:e.alpha((e.vars||e).palette.action.selected,`${(e.vars||e).palette.action.selectedOpacity} + ${(e.vars||e).palette.action.hoverOpacity}`)},[`&.${mb.focusVisible}`]:{backgroundColor:e.alpha((e.vars||e).palette.action.selected,`${(e.vars||e).palette.action.selectedOpacity} + ${(e.vars||e).palette.action.focusOpacity}`)},"&:active":{boxShadow:(e.vars||e).shadows[1]}}},...Object.entries(e.palette).filter(dv(["dark"])).map(([t])=>({props:{color:t,clickable:!0},style:{[`&:hover, &.${mb.focusVisible}`]:{backgroundColor:(e.vars||e).palette[t].dark}}})),{props:{variant:"outlined"},style:{backgroundColor:"transparent",border:e.vars?`1px solid ${e.vars.palette.Chip.defaultBorder}`:`1px solid ${"light"===e.palette.mode?e.palette.grey[400]:e.palette.grey[700]}`,[`&.${mb.clickable}:hover`]:{backgroundColor:(e.vars||e).palette.action.hover},[`&.${mb.focusVisible}`]:{backgroundColor:(e.vars||e).palette.action.focus},[`& .${mb.avatar}`]:{marginLeft:4},[`& .${mb.avatarSmall}`]:{marginLeft:2},[`& .${mb.icon}`]:{marginLeft:4},[`& .${mb.iconSmall}`]:{marginLeft:2},[`& .${mb.deleteIcon}`]:{marginRight:5},[`& .${mb.deleteIconSmall}`]:{marginRight:3}}},...Object.entries(e.palette).filter(dv()).map(([t])=>({props:{variant:"outlined",color:t},style:{color:(e.vars||e).palette[t].main,border:`1px solid ${e.alpha((e.vars||e).palette[t].main,.7)}`,[`&.${mb.clickable}:hover`]:{backgroundColor:e.alpha((e.vars||e).palette[t].main,(e.vars||e).palette.action.hoverOpacity)},[`&.${mb.focusVisible}`]:{backgroundColor:e.alpha((e.vars||e).palette[t].main,(e.vars||e).palette.action.focusOpacity)},[`& .${mb.deleteIcon}`]:{color:e.alpha((e.vars||e).palette[t].main,.7),"&:hover, &:active":{color:(e.vars||e).palette[t].main}}}}))]}})),vb=mg("span",{name:"MuiChip",slot:"Label",overridesResolver:(e,t)=>{const{ownerState:n}=e,{size:r}=n;return[t.label,t[`label${Mf(r)}`]]}})({overflow:"hidden",textOverflow:"ellipsis",paddingLeft:12,paddingRight:12,whiteSpace:"nowrap",variants:[{props:{variant:"outlined"},style:{paddingLeft:11,paddingRight:11}},{props:{size:"small"},style:{paddingLeft:8,paddingRight:8}},{props:{size:"small",variant:"outlined"},style:{paddingLeft:7,paddingRight:7}}]});function yb(e){return"Backspace"===e.key||"Delete"===e.key}const bb=l.forwardRef(function(e,t){const n=xg({props:e,name:"MuiChip"}),{avatar:r,className:o,clickable:i,color:a="default",component:s,deleteIcon:u,disabled:c=!1,icon:d,label:p,onClick:f,onDelete:h,onKeyDown:m,onKeyUp:g,size:v="medium",variant:y="filled",tabIndex:b,skipFocusWhenDisabled:w=!1,slots:x={},slotProps:k={},...S}=n,E=Lg(l.useRef(null),t),C=e=>{e.stopPropagation(),h&&h(e)},O=!(!1===i||!f)||i,T=O||h?uv:s||"div",_={...n,component:T,disabled:c,size:v,color:a,iconColor:l.isValidElement(d)&&d.props.color||a,onDelete:!!h,clickable:O,variant:y},R=(e=>{const{classes:t,disabled:n,size:r,color:o,iconColor:i,onDelete:a,clickable:s,variant:l}=e;return Cm({root:["root",l,n&&"disabled",`size${Mf(r)}`,`color${Mf(o)}`,s&&"clickable",s&&`clickableColor${Mf(o)}`,a&&"deletable",a&&`deletableColor${Mf(o)}`,`${l}${Mf(o)}`],label:["label",`label${Mf(r)}`],avatar:["avatar",`avatar${Mf(r)}`,`avatarColor${Mf(o)}`],icon:["icon",`icon${Mf(r)}`,`iconColor${Mf(i)}`],deleteIcon:["deleteIcon",`deleteIcon${Mf(r)}`,`deleteIconColor${Mf(o)}`,`deleteIcon${Mf(l)}Color${Mf(o)}`]},hb,t)})(_),P=T===uv?{component:s||"div",focusVisibleClassName:R.focusVisible,...h&&{disableRipple:!0}}:{};let A=null;h&&(A=u&&l.isValidElement(u)?l.cloneElement(u,{className:yg(u.props.className,R.deleteIcon),onClick:C}):cf.jsx(fb,{className:R.deleteIcon,onClick:C}));let L=null;r&&l.isValidElement(r)&&(L=l.cloneElement(r,{className:yg(R.avatar,r.props.className)}));let N=null;d&&l.isValidElement(d)&&(N=l.cloneElement(d,{className:yg(R.icon,d.props.className)}));const M={slots:x,slotProps:k},[I,F]=qg("root",{elementType:gb,externalForwardedProps:{...M,...S},ownerState:_,shouldForwardComponentProp:!0,ref:E,className:yg(R.root,o),additionalProps:{disabled:!(!O||!c)||void 0,tabIndex:w&&c?-1:b,...P},getSlotProps:e=>({...e,onClick:t=>{e.onClick?.(t),f?.(t)},onKeyDown:t=>{e.onKeyDown?.(t),(e=>{e.currentTarget===e.target&&yb(e)&&e.preventDefault(),m&&m(e)})(t)},onKeyUp:t=>{e.onKeyUp?.(t),(e=>{e.currentTarget===e.target&&h&&yb(e)&&h(e),g&&g(e)})(t)}})}),[$,j]=qg("label",{elementType:vb,externalForwardedProps:M,ownerState:_,className:R.label});return cf.jsxs(I,{as:T,...F,children:[L||N,cf.jsx($,{...j,children:p}),A]})});function wb(e){return parseInt(e,10)||0}const xb={visibility:"hidden",position:"absolute",overflow:"hidden",height:0,top:0,left:0,transform:"translateZ(0)"};function kb(e){return function(e){for(const t in e)return!1;return!0}(e)||0===e.outerHeightStyle&&!e.overflowing}const Sb=l.forwardRef(function(e,t){const{onChange:n,maxRows:r,minRows:o=1,style:i,value:a,...s}=e,{current:u}=l.useRef(null!=a),c=l.useRef(null),d=Lg(t,c),p=l.useRef(null),f=l.useRef(null),h=l.useCallback(()=>{const t=c.current,n=f.current;if(!t||!n)return;const i=_g(t).getComputedStyle(t);if("0px"===i.width)return{outerHeightStyle:0,overflowing:!1};n.style.width=i.width,n.value=t.value||e.placeholder||"x","\n"===n.value.slice(-1)&&(n.value+=" ");const a=i.boxSizing,s=wb(i.paddingBottom)+wb(i.paddingTop),l=wb(i.borderBottomWidth)+wb(i.borderTopWidth),u=n.scrollHeight;n.value="x";const d=n.scrollHeight;let p=u;o&&(p=Math.max(Number(o)*d,p)),r&&(p=Math.min(Number(r)*d,p)),p=Math.max(p,d);return{outerHeightStyle:p+("border-box"===a?s+l:0),overflowing:Math.abs(p-u)<=1}},[r,o,e.placeholder]),m=Ag(()=>{const e=c.current,t=h();if(!e||!t||kb(t))return!1;const n=t.outerHeightStyle;return null!=p.current&&p.current!==n}),g=l.useCallback(()=>{const e=c.current,t=h();if(!e||!t||kb(t))return;const n=t.outerHeightStyle;p.current!==n&&(p.current=n,e.style.height=`${n}px`),e.style.overflow=t.overflowing?"hidden":""},[h]),v=l.useRef(-1);em(()=>{const e=Og(g),t=c?.current;if(!t)return;const n=_g(t);let r;return n.addEventListener("resize",e),"undefined"!=typeof ResizeObserver&&(r=new ResizeObserver(()=>{m()&&(r.unobserve(t),cancelAnimationFrame(v.current),g(),v.current=requestAnimationFrame(()=>{r.observe(t)}))}),r.observe(t)),()=>{e.clear(),cancelAnimationFrame(v.current),n.removeEventListener("resize",e),r&&r.disconnect()}},[h,g,m]),em(()=>{g()});return cf.jsxs(l.Fragment,{children:[cf.jsx("textarea",{value:a,onChange:e=>{u||g();const t=e.target,r=t.value.length,o=t.value.endsWith("\n"),i=t.selectionStart===r;o&&i&&t.setSelectionRange(r,r),n&&n(e)},ref:d,rows:o,style:i,...s}),cf.jsx("textarea",{"aria-hidden":!0,className:e.className,readOnly:!0,ref:f,tabIndex:-1,style:{...xb,...i,paddingTop:0,paddingBottom:0}})]})});function Eb({props:e,states:t,muiFormControl:n}){return t.reduce((t,r)=>(t[r]=e[r],n&&void 0===e[r]&&(t[r]=n[r]),t),{})}const Cb=l.createContext(void 0);function Ob(){return l.useContext(Cb)}function Tb(e){return null!=e&&!(Array.isArray(e)&&0===e.length)}function _b(e,t=!1){return e&&(Tb(e.value)&&""!==e.value||t&&Tb(e.defaultValue)&&""!==e.defaultValue)}function Rb(e){return Bh("MuiInputBase",e)}const Pb=Dh("MuiInputBase",["root","formControl","focused","disabled","adornedStart","adornedEnd","error","sizeSmall","multiline","colorSecondary","fullWidth","hiddenLabel","readOnly","input","inputSizeSmall","inputMultiline","inputTypeSearch","inputAdornedStart","inputAdornedEnd","inputHiddenLabel"]);var Ab;const Lb=(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${Mf(n.color)}`],n.fullWidth&&t.fullWidth,n.hiddenLabel&&t.hiddenLabel]},Nb=(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]},Mb=mg("div",{name:"MuiInputBase",slot:"Root",overridesResolver:Lb})(wg(({theme:e})=>({...e.typography.body1,color:(e.vars||e).palette.text.primary,lineHeight:"1.4375em",boxSizing:"border-box",position:"relative",cursor:"text",display:"inline-flex",alignItems:"center",[`&.${Pb.disabled}`]:{color:(e.vars||e).palette.text.disabled,cursor:"default"},variants:[{props:({ownerState:e})=>e.multiline,style:{padding:"4px 0 5px"}},{props:({ownerState:e,size:t})=>e.multiline&&"small"===t,style:{paddingTop:1}},{props:({ownerState:e})=>e.fullWidth,style:{width:"100%"}}]}))),Ib=mg("input",{name:"MuiInputBase",slot:"Input",overridesResolver:Nb})(wg(({theme:e})=>{const t="light"===e.palette.mode,n={color:"currentColor",...e.vars?{opacity:e.vars.opacity.inputPlaceholder}:{opacity:t?.42:.5},transition:e.transitions.create("opacity",{duration:e.transitions.duration.shorter})},r={opacity:"0 !important"},o=e.vars?{opacity:e.vars.opacity.inputPlaceholder}:{opacity:t?.42:.5};return{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%","&::-webkit-input-placeholder":n,"&::-moz-placeholder":n,"&::-ms-input-placeholder":n,"&:focus":{outline:0},"&:invalid":{boxShadow:"none"},"&::-webkit-search-decoration":{WebkitAppearance:"none"},[`label[data-shrink=false] + .${Pb.formControl} &`]:{"&::-webkit-input-placeholder":r,"&::-moz-placeholder":r,"&::-ms-input-placeholder":r,"&:focus::-webkit-input-placeholder":o,"&:focus::-moz-placeholder":o,"&:focus::-ms-input-placeholder":o},[`&.${Pb.disabled}`]:{opacity:1,WebkitTextFillColor:(e.vars||e).palette.text.disabled},variants:[{props:({ownerState:e})=>!e.disableInjectingGlobalStyles,style:{animationName:"mui-auto-fill-cancel",animationDuration:"10ms","&:-webkit-autofill":{animationDuration:"5000s",animationName:"mui-auto-fill"}}},{props:{size:"small"},style:{paddingTop:1}},{props:({ownerState:e})=>e.multiline,style:{height:"auto",resize:"none",padding:0,paddingTop:0}},{props:{type:"search"},style:{MozAppearance:"textfield"}}]}})),Fb=function(e){return function(t){return cf.jsx(bg,{styles:"function"==typeof e?n=>e({theme:n,...t}):e})}}({"@keyframes mui-auto-fill":{from:{display:"block"}},"@keyframes mui-auto-fill-cancel":{from:{display:"block"}}}),$b=l.forwardRef(function(e,t){const n=xg({props:e,name:"MuiInputBase"}),{"aria-describedby":r,autoComplete:o,autoFocus:i,className:a,color:s,components:u={},componentsProps:c={},defaultValue:d,disabled:p,disableInjectingGlobalStyles:f,endAdornment:h,error:m,fullWidth:g=!1,id:v,inputComponent:y="input",inputProps:b={},inputRef:w,margin:x,maxRows:k,minRows:S,multiline:E=!1,name:C,onBlur:O,onChange:T,onClick:_,onFocus:R,onKeyDown:P,onKeyUp:A,placeholder:L,readOnly:N,renderSuffix:M,rows:I,size:F,slotProps:$={},slots:j={},startAdornment:z,type:B="text",value:D,...W}=n,U=null!=b.value?b.value:D,{current:V}=l.useRef(null!=U),K=l.useRef(),H=l.useCallback(e=>{},[]),q=Lg(K,w,b.ref,H),[G,Y]=l.useState(!1),X=Ob(),Q=Eb({props:n,muiFormControl:X,states:["color","disabled","error","hiddenLabel","size","required","filled"]});Q.focused=X?X.focused:G,l.useEffect(()=>{!X&&p&&G&&(Y(!1),O&&O())},[X,p,G,O]);const J=X&&X.onFilled,Z=X&&X.onEmpty,ee=l.useCallback(e=>{_b(e)?J&&J():Z&&Z()},[J,Z]);em(()=>{V&&ee({value:U})},[U,ee,V]);l.useEffect(()=>{ee(K.current)},[]);let te=y,ne=b;E&&"input"===te&&(ne=I?{type:void 0,minRows:I,maxRows:I,...ne}:{type:void 0,maxRows:k,minRows:S,...ne},te=Sb);l.useEffect(()=>{X&&X.setAdornedStart(Boolean(z))},[X,z]);const re={...n,color:Q.color||"primary",disabled:Q.disabled,endAdornment:h,error:Q.error,focused:Q.focused,formControl:X,fullWidth:g,hiddenLabel:Q.hiddenLabel,multiline:E,size:Q.size,startAdornment:z,type:B},oe=(e=>{const{classes:t,color:n,disabled:r,error:o,endAdornment:i,focused:a,formControl:s,fullWidth:l,hiddenLabel:u,multiline:c,readOnly:d,size:p,startAdornment:f,type:h}=e;return Cm({root:["root",`color${Mf(n)}`,r&&"disabled",o&&"error",l&&"fullWidth",a&&"focused",s&&"formControl",p&&"medium"!==p&&`size${Mf(p)}`,c&&"multiline",f&&"adornedStart",i&&"adornedEnd",u&&"hiddenLabel",d&&"readOnly"],input:["input",r&&"disabled","search"===h&&"inputTypeSearch",c&&"inputMultiline","small"===p&&"inputSizeSmall",u&&"inputHiddenLabel",f&&"inputAdornedStart",i&&"inputAdornedEnd",d&&"readOnly"]},Rb,t)})(re),ie=j.root||u.Root||Mb,ae=$.root||c.root||{},se=j.input||u.Input||Ib;return ne={...ne,...$.input??c.input},cf.jsxs(l.Fragment,{children:[!f&&"function"==typeof Fb&&(Ab||(Ab=cf.jsx(Fb,{}))),cf.jsxs(ie,{...ae,ref:t,onClick:e=>{K.current&&e.currentTarget===e.target&&K.current.focus(),_&&_(e)},...W,...!Dg(ie)&&{ownerState:{...re,...ae.ownerState}},className:yg(oe.root,ae.className,a,N&&"MuiInputBase-readOnly"),children:[z,cf.jsx(Cb.Provider,{value:null,children:cf.jsx(se,{"aria-invalid":Q.error,"aria-describedby":r,autoComplete:o,autoFocus:i,defaultValue:d,disabled:Q.disabled,id:v,onAnimationStart:e=>{ee("mui-auto-fill-cancel"===e.animationName?K.current:{value:"x"})},name:C,placeholder:L,readOnly:N,required:Q.required,rows:I,value:U,onKeyDown:P,onKeyUp:A,type:B,...ne,...!Dg(se)&&{as:te,ownerState:{...re,...ne.ownerState}},ref:q,className:yg(oe.input,ne.className,N&&"MuiInputBase-readOnly"),onBlur:e=>{O&&O(e),b.onBlur&&b.onBlur(e),X&&X.onBlur?X.onBlur(e):Y(!1)},onChange:(e,...t)=>{if(!V){const t=e.target||K.current;if(null==t)throw new Error(gd(1));ee({value:t.value})}b.onChange&&b.onChange(e,...t),T&&T(e,...t)},onFocus:e=>{R&&R(e),b.onFocus&&b.onFocus(e),X&&X.onFocus?X.onFocus(e):Y(!0)}})}),h,M?M({...Q,startAdornment:z}):null]})]})});function jb(e){return Bh("MuiInput",e)}const zb={...Pb,...Dh("MuiInput",["root","underline","input"])};function Bb(e){return Bh("MuiOutlinedInput",e)}const Db={...Pb,...Dh("MuiOutlinedInput",["root","notchedOutline","input"])};function Wb(e){return Bh("MuiFilledInput",e)}const Ub={...Pb,...Dh("MuiFilledInput",["root","underline","input","adornedStart","adornedEnd","sizeSmall","multiline","hiddenLabel"])};var Vb=Cg(cf.jsx("path",{d:"M7 10l5 5 5-5z"}));function Kb(e){return Bh("MuiAutocomplete",e)}const Hb=Dh("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 qb,Gb;const Yb=mg("div",{name:"MuiAutocomplete",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e,{fullWidth:r,hasClearIcon:o,hasPopupIcon:i,inputFocused:a,size:s}=n;return[{[`& .${Hb.tag}`]:t.tag},{[`& .${Hb.tag}`]:t[`tagSize${Mf(s)}`]},{[`& .${Hb.inputRoot}`]:t.inputRoot},{[`& .${Hb.input}`]:t.input},{[`& .${Hb.input}`]:a&&t.inputFocused},t.root,r&&t.fullWidth,i&&t.hasPopupIcon,o&&t.hasClearIcon]}})({[`&.${Hb.focused} .${Hb.clearIndicator}`]:{visibility:"visible"},"@media (pointer: fine)":{[`&:hover .${Hb.clearIndicator}`]:{visibility:"visible"}},[`& .${Hb.tag}`]:{margin:3,maxWidth:"calc(100% - 6px)"},[`& .${Hb.inputRoot}`]:{[`.${Hb.hasPopupIcon}&, .${Hb.hasClearIcon}&`]:{paddingRight:30},[`.${Hb.hasPopupIcon}.${Hb.hasClearIcon}&`]:{paddingRight:56},[`& .${Hb.input}`]:{width:0,minWidth:30}},[`& .${zb.root}`]:{paddingBottom:1,"& .MuiInput-input":{padding:"4px 4px 4px 0px"}},[`& .${zb.root}.${Pb.sizeSmall}`]:{[`& .${zb.input}`]:{padding:"2px 4px 3px 0"}},[`& .${Db.root}`]:{padding:9,[`.${Hb.hasPopupIcon}&, .${Hb.hasClearIcon}&`]:{paddingRight:39},[`.${Hb.hasPopupIcon}.${Hb.hasClearIcon}&`]:{paddingRight:65},[`& .${Hb.input}`]:{padding:"7.5px 4px 7.5px 5px"},[`& .${Hb.endAdornment}`]:{right:9}},[`& .${Db.root}.${Pb.sizeSmall}`]:{paddingTop:6,paddingBottom:6,paddingLeft:6,[`& .${Hb.input}`]:{padding:"2.5px 4px 2.5px 8px"}},[`& .${Ub.root}`]:{paddingTop:19,paddingLeft:8,[`.${Hb.hasPopupIcon}&, .${Hb.hasClearIcon}&`]:{paddingRight:39},[`.${Hb.hasPopupIcon}.${Hb.hasClearIcon}&`]:{paddingRight:65},[`& .${Ub.input}`]:{padding:"7px 4px"},[`& .${Hb.endAdornment}`]:{right:9}},[`& .${Ub.root}.${Pb.sizeSmall}`]:{paddingBottom:1,[`& .${Ub.input}`]:{padding:"2.5px 4px"}},[`& .${Pb.hiddenLabel}`]:{paddingTop:8},[`& .${Ub.root}.${Pb.hiddenLabel}`]:{paddingTop:0,paddingBottom:0,[`& .${Hb.input}`]:{paddingTop:16,paddingBottom:17}},[`& .${Ub.root}.${Pb.hiddenLabel}.${Pb.sizeSmall}`]:{[`& .${Hb.input}`]:{paddingTop:8,paddingBottom:9}},[`& .${Hb.input}`]:{flexGrow:1,textOverflow:"ellipsis",opacity:0},variants:[{props:{fullWidth:!0},style:{width:"100%"}},{props:{size:"small"},style:{[`& .${Hb.tag}`]:{margin:2,maxWidth:"calc(100% - 4px)"}}},{props:{inputFocused:!0},style:{[`& .${Hb.input}`]:{opacity:1}}},{props:{multiple:!0},style:{[`& .${Hb.inputRoot}`]:{flexWrap:"wrap"}}}]}),Xb=mg("div",{name:"MuiAutocomplete",slot:"EndAdornment"})({position:"absolute",right:0,top:"50%",transform:"translate(0, -50%)"}),Qb=mg(Tv,{name:"MuiAutocomplete",slot:"ClearIndicator"})({marginRight:-2,padding:4,visibility:"hidden"}),Jb=mg(Tv,{name:"MuiAutocomplete",slot:"PopupIndicator",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.popupIndicator,n.popupOpen&&t.popupIndicatorOpen]}})({padding:2,marginRight:-2,variants:[{props:{popupOpen:!0},style:{transform:"rotate(180deg)"}}]}),Zb=mg(ub,{name:"MuiAutocomplete",slot:"Popper",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[{[`& .${Hb.option}`]:t.option},t.popper,n.disablePortal&&t.popperDisablePortal]}})(wg(({theme:e})=>({zIndex:(e.vars||e).zIndex.modal,variants:[{props:{disablePortal:!0},style:{position:"absolute"}}]}))),ew=mg(Xg,{name:"MuiAutocomplete",slot:"Paper"})(wg(({theme:e})=>({...e.typography.body1,overflow:"auto"}))),tw=mg("div",{name:"MuiAutocomplete",slot:"Loading"})(wg(({theme:e})=>({color:(e.vars||e).palette.text.secondary,padding:"14px 16px"}))),nw=mg("div",{name:"MuiAutocomplete",slot:"NoOptions"})(wg(({theme:e})=>({color:(e.vars||e).palette.text.secondary,padding:"14px 16px"}))),rw=mg("ul",{name:"MuiAutocomplete",slot:"Listbox"})(wg(({theme:e})=>({listStyle:"none",margin:0,padding:"8px 0",maxHeight:"40vh",overflow:"auto",position:"relative",[`& .${Hb.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,[e.breakpoints.up("sm")]:{minHeight:"auto"},[`&.${Hb.focused}`]:{backgroundColor:(e.vars||e).palette.action.hover,"@media (hover: none)":{backgroundColor:"transparent"}},'&[aria-disabled="true"]':{opacity:(e.vars||e).palette.action.disabledOpacity,pointerEvents:"none"},[`&.${Hb.focusVisible}`]:{backgroundColor:(e.vars||e).palette.action.focus},'&[aria-selected="true"]':{backgroundColor:e.alpha((e.vars||e).palette.primary.main,(e.vars||e).palette.action.selectedOpacity),[`&.${Hb.focused}`]:{backgroundColor:e.alpha((e.vars||e).palette.primary.main,`${(e.vars||e).palette.action.selectedOpacity} + ${(e.vars||e).palette.action.hoverOpacity}`),"@media (hover: none)":{backgroundColor:(e.vars||e).palette.action.selected}},[`&.${Hb.focusVisible}`]:{backgroundColor:e.alpha((e.vars||e).palette.primary.main,`${(e.vars||e).palette.action.selectedOpacity} + ${(e.vars||e).palette.action.focusOpacity}`)}}}}))),ow=mg(pb,{name:"MuiAutocomplete",slot:"GroupLabel"})(wg(({theme:e})=>({backgroundColor:(e.vars||e).palette.background.paper,top:-8}))),iw=mg("ul",{name:"MuiAutocomplete",slot:"GroupUl"})({padding:0,[`& .${Hb.option}`]:{paddingLeft:24}}),aw=l.forwardRef(function(e,t){const n=xg({props:e,name:"MuiAutocomplete"}),{autoComplete:r=!1,autoHighlight:o=!1,autoSelect:i=!1,blurOnSelect:a=!1,ChipProps:s,className:u,clearIcon:c=qb||(qb=cf.jsx(_v,{fontSize:"small"})),clearOnBlur:d=!n.freeSolo,clearOnEscape:p=!1,clearText:f="Clear",closeText:h="Close",componentsProps:m,defaultValue:g=(n.multiple?[]:null),disableClearable:v=!1,disableCloseOnSelect:y=!1,disabled:b=!1,disabledItemsFocusable:w=!1,disableListWrap:x=!1,disablePortal:k=!1,filterOptions:S,filterSelectedOptions:E=!1,forcePopupIcon:C="auto",freeSolo:O=!1,fullWidth:T=!1,getLimitTagsText:_=e=>`+${e}`,getOptionDisabled:R,getOptionKey:P,getOptionLabel:A,isOptionEqualToValue:L,groupBy:N,handleHomeEndKeys:M=!n.freeSolo,id:I,includeInputInList:F=!1,inputValue:$,limitTags:j=-1,ListboxComponent:z,ListboxProps:B,loading:D=!1,loadingText:W="Loading…",multiple:U=!1,noOptionsText:V="No options",onChange:K,onClose:H,onHighlightChange:q,onInputChange:G,onOpen:Y,open:X,openOnFocus:Q=!1,openText:J="Open",options:Z,PaperComponent:ee,PopperComponent:te,popupIcon:ne=Gb||(Gb=cf.jsx(Vb,{})),readOnly:re=!1,renderGroup:oe,renderInput:ie,renderOption:ae,renderTags:se,renderValue:le,selectOnFocus:ue=!n.freeSolo,size:ce="medium",slots:de={},slotProps:pe={},value:fe,...he}=n,{getRootProps:me,getInputProps:ge,getInputLabelProps:ve,getPopupIndicatorProps:ye,getClearProps:be,getItemProps:we,getListboxProps:xe,getOptionProps:ke,value:Se,dirty:Ee,expanded:Ce,id:Oe,popupOpen:Te,focused:_e,focusedItem:Re,anchorEl:Pe,setAnchorEl:Ae,inputValue:Le,groupedOptions:Ne}=Iv({...n,componentName:"Autocomplete"}),Me=!v&&!b&&Ee&&!re,Ie=(!O||!0===C)&&!1!==C,{onMouseDown:Fe}=ge(),{ref:$e,...je}=xe(),ze=A||(e=>e.label??e),Be={...n,disablePortal:k,expanded:Ce,focused:_e,fullWidth:T,getOptionLabel:ze,hasClearIcon:Me,hasPopupIcon:Ie,inputFocused:-1===Re,popupOpen:Te,size:ce},De=(e=>{const{classes:t,disablePortal:n,expanded:r,focused:o,fullWidth:i,hasClearIcon:a,hasPopupIcon:s,inputFocused:l,popupOpen:u,size:c}=e;return Cm({root:["root",r&&"expanded",o&&"focused",i&&"fullWidth",a&&"hasClearIcon",s&&"hasPopupIcon"],inputRoot:["inputRoot"],input:["input",l&&"inputFocused"],tag:["tag",`tagSize${Mf(c)}`],endAdornment:["endAdornment"],clearIndicator:["clearIndicator"],popupIndicator:["popupIndicator",u&&"popupIndicatorOpen"],popper:["popper",n&&"popperDisablePortal"],paper:["paper"],listbox:["listbox"],loading:["loading"],noOptions:["noOptions"],option:["option"],groupLabel:["groupLabel"],groupUl:["groupUl"]},Kb,t)})(Be),We={slots:{paper:ee,popper:te,...de},slotProps:{chip:s,listbox:B,...m,...pe}},[Ue,Ve]=qg("listbox",{elementType:rw,externalForwardedProps:We,ownerState:Be,className:De.listbox,additionalProps:je,ref:$e}),[Ke,He]=qg("paper",{elementType:Xg,externalForwardedProps:We,ownerState:Be,className:De.paper}),[qe,Ge]=qg("popper",{elementType:ub,externalForwardedProps:We,ownerState:Be,className:De.popper,additionalProps:{disablePortal:k,style:{width:Pe?Pe.clientWidth:null},role:"presentation",anchorEl:Pe,open:Te}});let Ye;const Xe=e=>({className:De.tag,disabled:b,...we(e)});if(U?Se.length>0&&(Ye=se?se(Se,Xe,Be):le?le(Se,Xe,Be):Se.map((e,t)=>{const{key:n,...r}=Xe({index:t});return cf.jsx(bb,{label:ze(e),size:ce,...r,...We.slotProps.chip},n)})):le&&null!=Se&&(Ye=le(Se,Xe,Be)),j>-1&&Array.isArray(Ye)){const e=Ye.length-j;!_e&&e>0&&(Ye=Ye.splice(0,j),Ye.push(cf.jsx("span",{className:De.tag,children:_(e)},Ye.length)))}const Qe=oe||(e=>cf.jsxs("li",{children:[cf.jsx(ow,{className:De.groupLabel,ownerState:Be,component:"div",children:e.group}),cf.jsx(iw,{className:De.groupUl,ownerState:Be,children:e.children})]},e.key)),Je=ae||((e,t)=>{const{key:n,...r}=e;return cf.jsx("li",{...r,children:ze(t)},n)}),Ze=(e,t)=>{const n=ke({option:e,index:t});return Je({...n,className:De.option},e,{selected:n["aria-selected"],index:t,inputValue:Le},Be)},et=We.slotProps.clearIndicator,tt=We.slotProps.popupIndicator;return cf.jsxs(l.Fragment,{children:[cf.jsx(Yb,{ref:t,className:yg(De.root,u),ownerState:Be,...me(he),children:ie({id:Oe,disabled:b,fullWidth:!0,size:"small"===ce?"small":void 0,InputLabelProps:ve(),InputProps:{ref:Ae,className:De.inputRoot,startAdornment:Ye,onMouseDown:e=>{e.target===e.currentTarget&&Fe(e)},...(Me||Ie)&&{endAdornment:cf.jsxs(Xb,{className:De.endAdornment,ownerState:Be,children:[Me?cf.jsx(Qb,{...be(),"aria-label":f,title:f,ownerState:Be,...et,className:yg(De.clearIndicator,et?.className),children:c}):null,Ie?cf.jsx(Jb,{...ye(),disabled:b,"aria-label":Te?h:J,title:Te?h:J,ownerState:Be,...tt,className:yg(De.popupIndicator,tt?.className),children:ne}):null]})}},inputProps:{className:De.input,disabled:b,readOnly:re,...ge()}})}),Pe?cf.jsx(Zb,{as:qe,...Ge,children:cf.jsxs(ew,{as:Ke,...He,children:[D&&0===Ne.length?cf.jsx(tw,{className:De.loading,ownerState:Be,children:W}):null,0!==Ne.length||O||D?null:cf.jsx(nw,{className:De.noOptions,ownerState:Be,role:"presentation",onMouseDown:e=>{e.preventDefault()},children:V}),Ne.length>0?cf.jsx(Ue,{as:z,...Ve,children:Ne.map((e,t)=>N?Qe({key:e.key,group:e.group,children:e.options.map((t,n)=>Ze(t,e.index+n))}):Ze(e,t))}):null]})}):null]})}),sw={entering:{opacity:1},entered:{opacity:1}},lw=l.forwardRef(function(e,t){const n=pg(),r={enter:n.transitions.duration.enteringScreen,exit:n.transitions.duration.leavingScreen},{addEndListener:o,appear:i=!0,children:a,easing:s,in:u,onEnter:c,onEntered:d,onEntering:p,onExit:f,onExited:h,onExiting:m,style:g,timeout:v=r,TransitionComponent:y=nu,...b}=e,w=l.useRef(null),x=Lg(w,tb(a),t),k=e=>t=>{if(e){const n=w.current;void 0===t?e(n):e(n,t)}},S=k(p),E=k((e,t)=>{zg(e);const r=Bg({style:g,timeout:v,easing:s},{mode:"enter"});e.style.webkitTransition=n.transitions.create("opacity",r),e.style.transition=n.transitions.create("opacity",r),c&&c(e,t)}),C=k(d),O=k(m),T=k(e=>{const t=Bg({style:g,timeout:v,easing:s},{mode:"exit"});e.style.webkitTransition=n.transitions.create("opacity",t),e.style.transition=n.transitions.create("opacity",t),f&&f(e)}),_=k(h);return cf.jsx(y,{appear:i,in:u,nodeRef:w,onEnter:E,onEntered:C,onEntering:S,onExit:T,onExited:_,onExiting:O,addEndListener:e=>{o&&o(w.current,e)},timeout:v,...b,children:(e,{ownerState:t,...n})=>l.cloneElement(a,{style:{opacity:0,visibility:"exited"!==e||u?void 0:"hidden",...sw[e],...g,...a.props.style},ref:x,...n})})});function uw(e){return Bh("MuiBackdrop",e)}Dh("MuiBackdrop",["root","invisible"]);const cw=mg("div",{name:"MuiBackdrop",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.invisible&&t.invisible]}})({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",variants:[{props:{invisible:!0},style:{backgroundColor:"transparent"}}]}),dw=l.forwardRef(function(e,t){const n=xg({props:e,name:"MuiBackdrop"}),{children:r,className:o,component:i="div",invisible:a=!1,open:s,components:l={},componentsProps:u={},slotProps:c={},slots:d={},TransitionComponent:p,transitionDuration:f,...h}=n,m={...n,component:i,invisible:a},g=(e=>{const{classes:t,invisible:n}=e;return Cm({root:["root",n&&"invisible"]},uw,t)})(m),v={component:i,slots:{transition:p,root:l.Root,...d},slotProps:{...u,...c}},[y,b]=qg("root",{elementType:cw,externalForwardedProps:v,className:yg(g.root,o),ownerState:m}),[w,x]=qg("transition",{elementType:lw,externalForwardedProps:v,ownerState:m});return cf.jsx(w,{in:s,timeout:f,...h,...x,children:cf.jsx(y,{"aria-hidden":!0,...b,classes:g,ref:t,children:r})})}),pw=Dh("MuiBox",["root"]),fw=cg(),hw=function(e={}){const{themeId:t,defaultTheme:n,defaultClassName:r="MuiBox-root",generateClassName:o}=e,i=pf("div",{shouldForwardProp:e=>"theme"!==e&&"sx"!==e&&"as"!==e})(Oh);return l.forwardRef(function(e,a){const s=Ah(n),{className:l,component:u="div",...c}=Mh(e);return cf.jsx(i,{as:u,ref:a,className:jh(l,o?o(r):r),theme:t&&s[t]||s,...c})})}({themeId:vd,defaultTheme:fw,defaultClassName:pw.root,generateClassName:Fh.generate});function mw(e){return Bh("PrivateSwitchBase",e)}Dh("PrivateSwitchBase",["root","checked","disabled","input","edgeStart","edgeEnd"]);const gw=mg(uv,{name:"MuiSwitchBase"})({padding:9,borderRadius:"50%",variants:[{props:{edge:"start",size:"small"},style:{marginLeft:-3}},{props:({edge:e,ownerState:t})=>"start"===e&&"small"!==t.size,style:{marginLeft:-12}},{props:{edge:"end",size:"small"},style:{marginRight:-3}},{props:({edge:e,ownerState:t})=>"end"===e&&"small"!==t.size,style:{marginRight:-12}}]}),vw=mg("input",{name:"MuiSwitchBase",shouldForwardProp:hg})({cursor:"inherit",position:"absolute",opacity:0,width:"100%",height:"100%",top:0,left:0,margin:0,padding:0,zIndex:1}),yw=l.forwardRef(function(e,t){const{autoFocus:n,checked:r,checkedIcon:o,defaultChecked:i,disabled:a,disableFocusRipple:s=!1,edge:l=!1,icon:u,id:c,inputProps:d,inputRef:p,name:f,onBlur:h,onChange:m,onFocus:g,readOnly:v,required:y=!1,tabIndex:b,type:w,value:x,slots:k={},slotProps:S={},...E}=e,[C,O]=Pg({controlled:r,default:Boolean(i),name:"SwitchBase",state:"checked"}),T=Ob();let _=a;T&&void 0===_&&(_=T.disabled);const R="checkbox"===w||"radio"===w,P={...e,checked:C,disabled:_,disableFocusRipple:s,edge:l},A=(e=>{const{classes:t,checked:n,disabled:r,edge:o}=e;return Cm({root:["root",n&&"checked",r&&"disabled",o&&`edge${Mf(o)}`],input:["input"]},mw,t)})(P),L={slots:k,slotProps:{input:d,...S}},[N,M]=qg("root",{ref:t,elementType:gw,className:A.root,shouldForwardComponentProp:!0,externalForwardedProps:{...L,component:"span",...E},getSlotProps:e=>({...e,onFocus:t=>{e.onFocus?.(t),(e=>{g&&g(e),T&&T.onFocus&&T.onFocus(e)})(t)},onBlur:t=>{e.onBlur?.(t),(e=>{h&&h(e),T&&T.onBlur&&T.onBlur(e)})(t)}}),ownerState:P,additionalProps:{centerRipple:!0,focusRipple:!s,disabled:_,role:void 0,tabIndex:null}}),[I,F]=qg("input",{ref:p,elementType:vw,className:A.input,externalForwardedProps:L,getSlotProps:e=>({...e,onChange:t=>{e.onChange?.(t),(e=>{if(e.nativeEvent.defaultPrevented)return;const t=e.target.checked;O(t),m&&m(e,t)})(t)}}),ownerState:P,additionalProps:{autoFocus:n,checked:r,defaultChecked:i,disabled:_,id:R?c:void 0,name:f,readOnly:v,required:y,tabIndex:b,type:w,..."checkbox"===w&&void 0===x?{}:{value:x}}});return cf.jsxs(N,{...M,children:[cf.jsx(I,{...F}),C?o:u]})});var bw=Cg(cf.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"})),ww=Cg(cf.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"})),xw=Cg(cf.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"}));function kw(e){return Bh("MuiCheckbox",e)}const Sw=Dh("MuiCheckbox",["root","checked","disabled","indeterminate","colorPrimary","colorSecondary","sizeSmall","sizeMedium"]),Ew=mg(yw,{shouldForwardProp:e=>hg(e)||"classes"===e,name:"MuiCheckbox",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.indeterminate&&t.indeterminate,t[`size${Mf(n.size)}`],"default"!==n.color&&t[`color${Mf(n.color)}`]]}})(wg(({theme:e})=>({color:(e.vars||e).palette.text.secondary,variants:[{props:{color:"default",disableRipple:!1},style:{"&:hover":{backgroundColor:e.alpha((e.vars||e).palette.action.active,(e.vars||e).palette.action.hoverOpacity)}}},...Object.entries(e.palette).filter(dv()).map(([t])=>({props:{color:t,disableRipple:!1},style:{"&:hover":{backgroundColor:e.alpha((e.vars||e).palette[t].main,(e.vars||e).palette.action.hoverOpacity)}}})),...Object.entries(e.palette).filter(dv()).map(([t])=>({props:{color:t},style:{[`&.${Sw.checked}, &.${Sw.indeterminate}`]:{color:(e.vars||e).palette[t].main},[`&.${Sw.disabled}`]:{color:(e.vars||e).palette.action.disabled}}})),{props:{disableRipple:!1},style:{"&:hover":{"@media (hover: none)":{backgroundColor:"transparent"}}}}]}))),Cw=cf.jsx(ww,{}),Ow=cf.jsx(bw,{}),Tw=cf.jsx(xw,{}),_w=l.forwardRef(function(e,t){const n=xg({props:e,name:"MuiCheckbox"}),{checkedIcon:r=Cw,color:o="primary",icon:i=Ow,indeterminate:a=!1,indeterminateIcon:s=Tw,inputProps:u,size:c="medium",disableRipple:d=!1,className:p,slots:f={},slotProps:h={},...m}=n,g=a?s:i,v=a?s:r,y={...n,disableRipple:d,color:o,indeterminate:a,size:c},b=(e=>{const{classes:t,indeterminate:n,color:r,size:o}=e,i=Cm({root:["root",n&&"indeterminate",`color${Mf(r)}`,`size${Mf(o)}`]},kw,t);return{...t,...i}})(y),w=h.input??u,[x,k]=qg("root",{ref:t,elementType:Ew,className:yg(b.root,p),shouldForwardComponentProp:!0,externalForwardedProps:{slots:f,slotProps:h,...m},ownerState:y,additionalProps:{type:"checkbox",icon:l.cloneElement(g,{fontSize:g.props.fontSize??c}),checkedIcon:l.cloneElement(v,{fontSize:v.props.fontSize??c}),disableRipple:d,slots:f,slotProps:{input:Ng("function"==typeof w?w(y):w,{"data-indeterminate":a})}}});return cf.jsx(x,{...k,classes:b})});function Rw(e=window){const t=e.document.documentElement.clientWidth;return e.innerWidth-t}function Pw(e,t){t?e.setAttribute("aria-hidden","true"):e.removeAttribute("aria-hidden")}function Aw(e){return parseInt(_g(e).getComputedStyle(e).paddingRight,10)||0}function Lw(e,t,n,r,o){const i=[t,n,...r];[].forEach.call(e.children,e=>{const t=!i.includes(e),n=!function(e){const t=["TEMPLATE","SCRIPT","STYLE","LINK","MAP","META","NOSCRIPT","PICTURE","COL","COLGROUP","PARAM","SLOT","SOURCE","TRACK"].includes(e.tagName),n="INPUT"===e.tagName&&"hidden"===e.getAttribute("type");return t||n}(e);t&&n&&Pw(e,o)})}function Nw(e,t){let n=-1;return e.some((e,r)=>!!t(e)&&(n=r,!0)),n}function Mw(e,t){const n=[],r=e.container;if(!t.disableScrollLock){if(function(e){const t=Tg(e);return t.body===e?_g(e).innerWidth>t.documentElement.clientWidth:e.scrollHeight>e.clientHeight}(r)){const e=Rw(_g(r));n.push({value:r.style.paddingRight,property:"padding-right",el:r}),r.style.paddingRight=`${Aw(r)+e}px`;const t=Tg(r).querySelectorAll(".mui-fixed");[].forEach.call(t,t=>{n.push({value:t.style.paddingRight,property:"padding-right",el:t}),t.style.paddingRight=`${Aw(t)+e}px`})}let e;if(r.parentNode instanceof DocumentFragment)e=Tg(r).body;else{const t=r.parentElement,n=_g(r);e="HTML"===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(({value:e,el:t,property:n})=>{e?t.style.setProperty(n,e):t.style.removeProperty(n)})}}const Iw=["input","select","textarea","a[href]","button","[tabindex]","audio[controls]","video[controls]",'[contenteditable]:not([contenteditable="false"])'].join(",");function Fw(e){const t=[],n=[];return Array.from(e.querySelectorAll(Iw)).forEach((e,r)=>{const o=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!==o&&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"]${t}`);let n=t(`[name="${e.name}"]:checked`);return n||(n=t(`[name="${e.name}"]`)),n!==e}(e))}(e)&&(0===o?t.push(e):n.push({documentOrder:r,tabIndex:o,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 $w(){return!0}function jw(e){const{children:t,disableAutoFocus:n=!1,disableEnforceFocus:r=!1,disableRestoreFocus:o=!1,getTabbable:i=Fw,isEnabled:a=$w,open:s}=e,u=l.useRef(!1),c=l.useRef(null),d=l.useRef(null),p=l.useRef(null),f=l.useRef(null),h=l.useRef(!1),m=l.useRef(null),g=Lg(tb(t),m),v=l.useRef(null);l.useEffect(()=>{s&&m.current&&(h.current=!n)},[n,s]),l.useEffect(()=>{if(!s||!m.current)return;const e=Tg(m.current);return m.current.contains(e.activeElement)||(m.current.hasAttribute("tabIndex")||m.current.setAttribute("tabIndex","-1"),h.current&&m.current.focus()),()=>{o||(p.current&&p.current.focus&&(u.current=!0,p.current.focus()),p.current=null)}},[s]),l.useEffect(()=>{if(!s||!m.current)return;const e=Tg(m.current),t=t=>{v.current=t,!r&&a()&&"Tab"===t.key&&e.activeElement===m.current&&t.shiftKey&&(u.current=!0,d.current&&d.current.focus())},n=()=>{const t=m.current;if(null===t)return;if(!e.hasFocus()||!a()||u.current)return void(u.current=!1);if(t.contains(e.activeElement))return;if(r&&e.activeElement!==c.current&&e.activeElement!==d.current)return;if(e.activeElement!==f.current)f.current=null;else if(null!==f.current)return;if(!h.current)return;let n=[];if(e.activeElement!==c.current&&e.activeElement!==d.current||(n=i(m.current)),n.length>0){const e=Boolean(v.current?.shiftKey&&"Tab"===v.current?.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 o=setInterval(()=>{e.activeElement&&"BODY"===e.activeElement.tagName&&n()},50);return()=>{clearInterval(o),e.removeEventListener("focusin",n),e.removeEventListener("keydown",t,!0)}},[n,r,o,a,s,i]);const y=e=>{null===p.current&&(p.current=e.relatedTarget),h.current=!0};return cf.jsxs(l.Fragment,{children:[cf.jsx("div",{tabIndex:s?0:-1,onFocus:y,ref:c,"data-testid":"sentinelStart"}),l.cloneElement(t,{ref:g,onFocus:e=>{null===p.current&&(p.current=e.relatedTarget),h.current=!0,f.current=e.target;const n=t.props.onFocus;n&&n(e)}}),cf.jsx("div",{tabIndex:s?0:-1,onFocus:y,ref:d,"data-testid":"sentinelEnd"})]})}const zw=()=>{},Bw=new class{constructor(){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&&Pw(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);Lw(t,e.mount,e.modalRef,r,!0);const o=Nw(this.containers,e=>e.container===t);return-1!==o?(this.containers[o].modals.push(e),n):(this.containers.push({modals:[e],container:t,restore:null,hiddenSiblings:r}),n)}mount(e,t){const n=Nw(this.containers,t=>t.modals.includes(e)),r=this.containers[n];r.restore||(r.restore=Mw(r,t))}remove(e,t=!0){const n=this.modals.indexOf(e);if(-1===n)return n;const r=Nw(this.containers,t=>t.modals.includes(e)),o=this.containers[r];if(o.modals.splice(o.modals.indexOf(e),1),this.modals.splice(n,1),0===o.modals.length)o.restore&&o.restore(),e.modalRef&&Pw(e.modalRef,t),Lw(o.container,e.mount,e.modalRef,o.hiddenSiblings,!1),this.containers.splice(r,1);else{const e=o.modals[o.modals.length-1];e.modalRef&&Pw(e.modalRef,!1)}return n}isTopModal(e){return this.modals.length>0&&this.modals[this.modals.length-1]===e}};function Dw(e){const{container:t,disableEscapeKeyDown:n=!1,disableScrollLock:r=!1,closeAfterTransition:o=!1,onTransitionEnter:i,onTransitionExited:a,children:s,onClose:u,open:c,rootRef:d}=e,p=l.useRef({}),f=l.useRef(null),h=l.useRef(null),m=Lg(h,d),[g,v]=l.useState(!c),y=function(e){return!!e&&e.props.hasOwnProperty("in")}(s);let b=!0;"false"!==e["aria-hidden"]&&!1!==e["aria-hidden"]||(b=!1);const w=()=>(p.current.modalRef=h.current,p.current.mount=f.current,p.current),x=()=>{Bw.mount(w(),{disableScrollLock:r}),h.current&&(h.current.scrollTop=0)},k=Ag(()=>{const e=function(e){return"function"==typeof e?e():e}(t)||Tg(f.current).body;Bw.add(w(),e),h.current&&x()}),S=()=>Bw.isTopModal(w()),E=Ag(e=>{f.current=e,e&&(c&&S()?x():h.current&&Pw(h.current,b))}),C=l.useCallback(()=>{Bw.remove(w(),b)},[b]);l.useEffect(()=>()=>{C()},[C]),l.useEffect(()=>{c?k():y&&o||C()},[c,C,y,o,k]);const O=e=>t=>{e.onKeyDown?.(t),"Escape"===t.key&&229!==t.which&&S()&&(n||(t.stopPropagation(),u&&u(t,"escapeKeyDown")))},T=e=>t=>{e.onClick?.(t),t.target===t.currentTarget&&u&&u(t,"backdropClick")};return{getRootProps:(t={})=>{const n=Vg(e);delete n.onTransitionEnter,delete n.onTransitionExited;const r={...n,...t};return{role:"presentation",...r,onKeyDown:O(r),ref:m}},getBackdropProps:(e={})=>{const t=e;return{"aria-hidden":!0,...t,onClick:T(t),open:c}},getTransitionProps:()=>({onEnter:gg(()=>{v(!1),i&&i()},s?.props.onEnter??zw),onExited:gg(()=>{v(!0),a&&a(),o&&C()},s?.props.onExited??zw)}),rootRef:m,portalRef:E,isTopModal:S,exited:g,hasTransition:y}}function Ww(e){return Bh("MuiModal",e)}Dh("MuiModal",["root","hidden","backdrop"]);const Uw=mg("div",{name:"MuiModal",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,!n.open&&n.exited&&t.hidden]}})(wg(({theme:e})=>({position:"fixed",zIndex:(e.vars||e).zIndex.modal,right:0,bottom:0,top:0,left:0,variants:[{props:({ownerState:e})=>!e.open&&e.exited,style:{visibility:"hidden"}}]}))),Vw=mg(dw,{name:"MuiModal",slot:"Backdrop"})({zIndex:-1}),Kw=l.forwardRef(function(e,t){const n=xg({name:"MuiModal",props:e}),{BackdropComponent:r=Vw,BackdropProps:o,classes:i,className:a,closeAfterTransition:s=!1,children:u,container:c,component:d,components:p={},componentsProps:f={},disableAutoFocus:h=!1,disableEnforceFocus:m=!1,disableEscapeKeyDown:g=!1,disablePortal:v=!1,disableRestoreFocus:y=!1,disableScrollLock:b=!1,hideBackdrop:w=!1,keepMounted:x=!1,onClose:k,onTransitionEnter:S,onTransitionExited:E,open:C,slotProps:O={},slots:T={},theme:_,...R}=n,P={...n,closeAfterTransition:s,disableAutoFocus:h,disableEnforceFocus:m,disableEscapeKeyDown:g,disablePortal:v,disableRestoreFocus:y,disableScrollLock:b,hideBackdrop:w,keepMounted:x},{getRootProps:A,getBackdropProps:L,getTransitionProps:N,portalRef:M,isTopModal:I,exited:F,hasTransition:$}=Dw({...P,rootRef:t}),j={...P,exited:F},z=(e=>{const{open:t,exited:n,classes:r}=e;return Cm({root:["root",!t&&n&&"hidden"],backdrop:["backdrop"]},Ww,r)})(j),B={};if(void 0===u.props.tabIndex&&(B.tabIndex="-1"),$){const{onEnter:e,onExited:t}=N();B.onEnter=e,B.onExited=t}const D={slots:{root:p.Root,backdrop:p.Backdrop,...T},slotProps:{...f,...O}},[W,U]=qg("root",{ref:t,elementType:Uw,externalForwardedProps:{...D,...R,component:d},getSlotProps:A,ownerState:j,className:yg(a,z?.root,!j.open&&j.exited&&z?.hidden)}),[V,K]=qg("backdrop",{ref:o?.ref,elementType:r,externalForwardedProps:D,shouldForwardComponentProp:!0,additionalProps:o,getSlotProps:e=>L({...e,onClick:t=>{e?.onClick&&e.onClick(t)}}),className:yg(o?.className,z?.backdrop),ownerState:j});return x||C||$&&!F?cf.jsx(nb,{ref:M,container:c,disablePortal:v,children:cf.jsxs(W,{...U,children:[!w&&r?cf.jsx(V,{...K}):null,cf.jsx(jw,{disableEnforceFocus:m,disableAutoFocus:h,disableRestoreFocus:y,isEnabled:I,open:C,children:l.cloneElement(u,B)})]})}):null}),Hw=Dh("MuiDivider",["root","absolute","fullWidth","inset","middle","flexItem","light","vertical","withChildren","withChildrenVertical","textAlignRight","textAlignLeft","wrapper","wrapperVertical"]),qw=mg(Mb,{shouldForwardProp:e=>hg(e)||"classes"===e,name:"MuiFilledInput",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[...Lb(e,t),!n.disableUnderline&&t.underline]}})(wg(({theme:e})=>{const t="light"===e.palette.mode,n=t?"rgba(0, 0, 0, 0.42)":"rgba(255, 255, 255, 0.7)",r=t?"rgba(0, 0, 0, 0.06)":"rgba(255, 255, 255, 0.09)",o=t?"rgba(0, 0, 0, 0.09)":"rgba(255, 255, 255, 0.13)",i=t?"rgba(0, 0, 0, 0.12)":"rgba(255, 255, 255, 0.12)";return{position:"relative",backgroundColor:e.vars?e.vars.palette.FilledInput.bg:r,borderTopLeftRadius:(e.vars||e).shape.borderRadius,borderTopRightRadius:(e.vars||e).shape.borderRadius,transition:e.transitions.create("background-color",{duration:e.transitions.duration.shorter,easing:e.transitions.easing.easeOut}),"&:hover":{backgroundColor:e.vars?e.vars.palette.FilledInput.hoverBg:o,"@media (hover: none)":{backgroundColor:e.vars?e.vars.palette.FilledInput.bg:r}},[`&.${Ub.focused}`]:{backgroundColor:e.vars?e.vars.palette.FilledInput.bg:r},[`&.${Ub.disabled}`]:{backgroundColor:e.vars?e.vars.palette.FilledInput.disabledBg:i},variants:[{props:({ownerState:e})=>!e.disableUnderline,style:{"&::after":{left:0,bottom:0,content:'""',position:"absolute",right:0,transform:"scaleX(0)",transition:e.transitions.create("transform",{duration:e.transitions.duration.shorter,easing:e.transitions.easing.easeOut}),pointerEvents:"none"},[`&.${Ub.focused}:after`]:{transform:"scaleX(1) translateX(0)"},[`&.${Ub.error}`]:{"&::before, &::after":{borderBottomColor:(e.vars||e).palette.error.main}},"&::before":{borderBottom:`1px solid ${e.vars?e.alpha(e.vars.palette.common.onBackground,e.vars.opacity.inputUnderline):n}`,left:0,bottom:0,content:'"\\00a0"',position:"absolute",right:0,transition:e.transitions.create("border-bottom-color",{duration:e.transitions.duration.shorter}),pointerEvents:"none"},[`&:hover:not(.${Ub.disabled}, .${Ub.error}):before`]:{borderBottom:`1px solid ${(e.vars||e).palette.text.primary}`},[`&.${Ub.disabled}:before`]:{borderBottomStyle:"dotted"}}},...Object.entries(e.palette).filter(dv()).map(([t])=>({props:{disableUnderline:!1,color:t},style:{"&::after":{borderBottom:`2px solid ${(e.vars||e).palette[t]?.main}`}}})),{props:({ownerState:e})=>e.startAdornment,style:{paddingLeft:12}},{props:({ownerState:e})=>e.endAdornment,style:{paddingRight:12}},{props:({ownerState:e})=>e.multiline,style:{padding:"25px 12px 8px"}},{props:({ownerState:e,size:t})=>e.multiline&&"small"===t,style:{paddingTop:21,paddingBottom:4}},{props:({ownerState:e})=>e.multiline&&e.hiddenLabel,style:{paddingTop:16,paddingBottom:17}},{props:({ownerState:e})=>e.multiline&&e.hiddenLabel&&"small"===e.size,style:{paddingTop:8,paddingBottom:9}}]}})),Gw=mg(Ib,{name:"MuiFilledInput",slot:"Input",overridesResolver:Nb})(wg(({theme:e})=>({paddingTop:25,paddingRight:12,paddingBottom:8,paddingLeft:12,...!e.vars&&{"&:-webkit-autofill":{WebkitBoxShadow:"light"===e.palette.mode?null:"0 0 0 100px #266798 inset",WebkitTextFillColor:"light"===e.palette.mode?null:"#fff",caretColor:"light"===e.palette.mode?null:"#fff",borderTopLeftRadius:"inherit",borderTopRightRadius:"inherit"}},...e.vars&&{"&:-webkit-autofill":{borderTopLeftRadius:"inherit",borderTopRightRadius:"inherit"},[e.getColorSchemeSelector("dark")]:{"&:-webkit-autofill":{WebkitBoxShadow:"0 0 0 100px #266798 inset",WebkitTextFillColor:"#fff",caretColor:"#fff"}}},variants:[{props:{size:"small"},style:{paddingTop:21,paddingBottom:4}},{props:({ownerState:e})=>e.hiddenLabel,style:{paddingTop:16,paddingBottom:17}},{props:({ownerState:e})=>e.startAdornment,style:{paddingLeft:0}},{props:({ownerState:e})=>e.endAdornment,style:{paddingRight:0}},{props:({ownerState:e})=>e.hiddenLabel&&"small"===e.size,style:{paddingTop:8,paddingBottom:9}},{props:({ownerState:e})=>e.multiline,style:{paddingTop:0,paddingBottom:0,paddingLeft:0,paddingRight:0}}]}))),Yw=l.forwardRef(function(e,t){const n=xg({props:e,name:"MuiFilledInput"}),{disableUnderline:r=!1,components:o={},componentsProps:i,fullWidth:a=!1,hiddenLabel:s,inputComponent:l="input",multiline:u=!1,slotProps:c,slots:d={},type:p="text",...f}=n,h={...n,disableUnderline:r,fullWidth:a,inputComponent:l,multiline:u,type:p},m=(e=>{const{classes:t,disableUnderline:n,startAdornment:r,endAdornment:o,size:i,hiddenLabel:a,multiline:s}=e,l=Cm({root:["root",!n&&"underline",r&&"adornedStart",o&&"adornedEnd","small"===i&&`size${Mf(i)}`,a&&"hiddenLabel",s&&"multiline"],input:["input"]},Wb,t);return{...t,...l}})(n),g={root:{ownerState:h},input:{ownerState:h}},v=c??i?Ef(g,c??i):g,y=d.root??o.Root??qw,b=d.input??o.Input??Gw;return cf.jsx($b,{slots:{root:y,input:b},slotProps:v,fullWidth:a,inputComponent:l,multiline:u,ref:t,type:p,...f,classes:m})});function Xw(e){return Bh("MuiFormControl",e)}Yw.muiName="Input",Dh("MuiFormControl",["root","marginNone","marginNormal","marginDense","fullWidth","disabled"]);const Qw=mg("div",{name:"MuiFormControl",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[`margin${Mf(n.margin)}`],n.fullWidth&&t.fullWidth]}})({display:"inline-flex",flexDirection:"column",position:"relative",minWidth:0,padding:0,margin:0,border:0,verticalAlign:"top",variants:[{props:{margin:"normal"},style:{marginTop:16,marginBottom:8}},{props:{margin:"dense"},style:{marginTop:8,marginBottom:4}},{props:{fullWidth:!0},style:{width:"100%"}}]}),Jw=l.forwardRef(function(e,t){const n=xg({props:e,name:"MuiFormControl"}),{children:r,className:o,color:i="primary",component:a="div",disabled:s=!1,error:u=!1,focused:c,fullWidth:d=!1,hiddenLabel:p=!1,margin:f="none",required:h=!1,size:m="medium",variant:g="outlined",...v}=n,y={...n,color:i,component:a,disabled:s,error:u,fullWidth:d,hiddenLabel:p,margin:f,required:h,size:m,variant:g},b=(e=>{const{classes:t,margin:n,fullWidth:r}=e;return Cm({root:["root","none"!==n&&`margin${Mf(n)}`,r&&"fullWidth"]},Xw,t)})(y),[w,x]=l.useState(()=>{let e=!1;return r&&l.Children.forEach(r,t=>{if(!Om(t,["Input","Select"]))return;const n=Om(t,["Select"])?t.props.input:t;n&&n.props.startAdornment&&(e=!0)}),e}),[k,S]=l.useState(()=>{let e=!1;return r&&l.Children.forEach(r,t=>{Om(t,["Input","Select"])&&(_b(t.props,!0)||_b(t.props.inputProps,!0))&&(e=!0)}),e}),[E,C]=l.useState(!1);s&&E&&C(!1);const O=void 0===c||s?E:c;let T;l.useRef(!1);const _=l.useCallback(()=>{S(!0)},[]),R=l.useCallback(()=>{S(!1)},[]),P=l.useMemo(()=>({adornedStart:w,setAdornedStart:x,color:i,disabled:s,error:u,filled:k,focused:O,fullWidth:d,hiddenLabel:p,size:m,onBlur:()=>{C(!1)},onFocus:()=>{C(!0)},onEmpty:R,onFilled:_,registerEffect:T,required:h,variant:g}),[w,i,s,u,k,O,d,p,T,R,_,h,m,g]);return cf.jsx(Cb.Provider,{value:P,children:cf.jsx(Qw,{as:a,ownerState:y,className:yg(b.root,o),ref:t,...v,children:r})})});function Zw(e){return Bh("MuiFormHelperText",e)}const ex=Dh("MuiFormHelperText",["root","error","disabled","sizeSmall","sizeMedium","contained","focused","filled","required"]);var tx;const nx=mg("p",{name:"MuiFormHelperText",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.size&&t[`size${Mf(n.size)}`],n.contained&&t.contained,n.filled&&t.filled]}})(wg(({theme:e})=>({color:(e.vars||e).palette.text.secondary,...e.typography.caption,textAlign:"left",marginTop:3,marginRight:0,marginBottom:0,marginLeft:0,[`&.${ex.disabled}`]:{color:(e.vars||e).palette.text.disabled},[`&.${ex.error}`]:{color:(e.vars||e).palette.error.main},variants:[{props:{size:"small"},style:{marginTop:4}},{props:({ownerState:e})=>e.contained,style:{marginLeft:14,marginRight:14}}]}))),rx=l.forwardRef(function(e,t){const n=xg({props:e,name:"MuiFormHelperText"}),{children:r,className:o,component:i="p",disabled:a,error:s,filled:l,focused:u,margin:c,required:d,variant:p,...f}=n,h=Eb({props:n,muiFormControl:Ob(),states:["variant","size","disabled","error","filled","focused","required"]}),m={...n,component:i,contained:"filled"===h.variant||"outlined"===h.variant,variant:h.variant,size:h.size,disabled:h.disabled,error:h.error,filled:h.filled,focused:h.focused,required:h.required};delete m.ownerState;const g=(e=>{const{classes:t,contained:n,size:r,disabled:o,error:i,filled:a,focused:s,required:l}=e;return Cm({root:["root",o&&"disabled",i&&"error",r&&`size${Mf(r)}`,n&&"contained",s&&"focused",a&&"filled",l&&"required"]},Zw,t)})(m);return cf.jsx(nx,{as:i,className:yg(g.root,o),ref:t,...f,ownerState:m,children:" "===r?tx||(tx=cf.jsx("span",{className:"notranslate","aria-hidden":!0,children:"​"})):r})});function ox(e){return Bh("MuiFormLabel",e)}const ix=Dh("MuiFormLabel",["root","colorSecondary","focused","disabled","error","filled","required","asterisk"]),ax=mg("label",{name:"MuiFormLabel",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,"secondary"===n.color&&t.colorSecondary,n.filled&&t.filled]}})(wg(({theme:e})=>({color:(e.vars||e).palette.text.secondary,...e.typography.body1,lineHeight:"1.4375em",padding:0,position:"relative",variants:[...Object.entries(e.palette).filter(dv()).map(([t])=>({props:{color:t},style:{[`&.${ix.focused}`]:{color:(e.vars||e).palette[t].main}}})),{props:{},style:{[`&.${ix.disabled}`]:{color:(e.vars||e).palette.text.disabled},[`&.${ix.error}`]:{color:(e.vars||e).palette.error.main}}}]}))),sx=mg("span",{name:"MuiFormLabel",slot:"Asterisk"})(wg(({theme:e})=>({[`&.${ix.error}`]:{color:(e.vars||e).palette.error.main}}))),lx=l.forwardRef(function(e,t){const n=xg({props:e,name:"MuiFormLabel"}),{children:r,className:o,color:i,component:a="label",disabled:s,error:l,filled:u,focused:c,required:d,...p}=n,f=Eb({props:n,muiFormControl:Ob(),states:["color","required","focused","disabled","error","filled"]}),h={...n,color:f.color||"primary",component:a,disabled:f.disabled,error:f.error,filled:f.filled,focused:f.focused,required:f.required},m=(e=>{const{classes:t,color:n,focused:r,disabled:o,error:i,filled:a,required:s}=e;return Cm({root:["root",`color${Mf(n)}`,o&&"disabled",i&&"error",a&&"filled",r&&"focused",s&&"required"],asterisk:["asterisk",i&&"error"]},ox,t)})(h);return cf.jsxs(ax,{as:a,ownerState:h,className:yg(m.root,o),ref:t,...p,children:[r,f.required&&cf.jsxs(sx,{ownerState:h,"aria-hidden":!0,className:m.asterisk,children:[" ","*"]})]})});function ux(e){return`scale(${e}, ${e**2})`}const cx={entering:{opacity:1,transform:ux(1)},entered:{opacity:1,transform:"none"}},dx="undefined"!=typeof navigator&&/^((?!chrome|android).)*(safari|mobile)/i.test(navigator.userAgent)&&/(os |version\/)15(.|_)4/i.test(navigator.userAgent),px=l.forwardRef(function(e,t){const{addEndListener:n,appear:r=!0,children:o,easing:i,in:a,onEnter:s,onEntered:u,onEntering:c,onExit:d,onExited:p,onExiting:f,style:h,timeout:m="auto",TransitionComponent:g=nu,...v}=e,y=jg(),b=l.useRef(),w=pg(),x=l.useRef(null),k=Lg(x,tb(o),t),S=e=>t=>{if(e){const n=x.current;void 0===t?e(n):e(n,t)}},E=S(c),C=S((e,t)=>{zg(e);const{duration:n,delay:r,easing:o}=Bg({style:h,timeout:m,easing:i},{mode:"enter"});let a;"auto"===m?(a=w.transitions.getAutoHeightDuration(e.clientHeight),b.current=a):a=n,e.style.transition=[w.transitions.create("opacity",{duration:a,delay:r}),w.transitions.create("transform",{duration:dx?a:.666*a,delay:r,easing:o})].join(","),s&&s(e,t)}),O=S(u),T=S(f),_=S(e=>{const{duration:t,delay:n,easing:r}=Bg({style:h,timeout:m,easing:i},{mode:"exit"});let o;"auto"===m?(o=w.transitions.getAutoHeightDuration(e.clientHeight),b.current=o):o=t,e.style.transition=[w.transitions.create("opacity",{duration:o,delay:n}),w.transitions.create("transform",{duration:dx?o:.666*o,delay:dx?n:n||.333*o,easing:r})].join(","),e.style.opacity=0,e.style.transform=ux(.75),d&&d(e)}),R=S(p);return cf.jsx(g,{appear:r,in:a,nodeRef:x,onEnter:C,onEntered:O,onEntering:E,onExit:_,onExited:R,onExiting:T,addEndListener:e=>{"auto"===m&&y.start(b.current||0,e),n&&n(x.current,e)},timeout:"auto"===m?null:m,...v,children:(e,{ownerState:t,...n})=>l.cloneElement(o,{style:{opacity:0,transform:ux(.75),visibility:"exited"!==e||a?void 0:"hidden",...cx[e],...h,...o.props.style},ref:k,...n})})});px&&(px.muiSupportAuto=!0);const fx=mg(Mb,{shouldForwardProp:e=>hg(e)||"classes"===e,name:"MuiInput",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[...Lb(e,t),!n.disableUnderline&&t.underline]}})(wg(({theme:e})=>{let t="light"===e.palette.mode?"rgba(0, 0, 0, 0.42)":"rgba(255, 255, 255, 0.7)";return e.vars&&(t=e.alpha(e.vars.palette.common.onBackground,e.vars.opacity.inputUnderline)),{position:"relative",variants:[{props:({ownerState:e})=>e.formControl,style:{"label + &":{marginTop:16}}},{props:({ownerState:e})=>!e.disableUnderline,style:{"&::after":{left:0,bottom:0,content:'""',position:"absolute",right:0,transform:"scaleX(0)",transition:e.transitions.create("transform",{duration:e.transitions.duration.shorter,easing:e.transitions.easing.easeOut}),pointerEvents:"none"},[`&.${zb.focused}:after`]:{transform:"scaleX(1) translateX(0)"},[`&.${zb.error}`]:{"&::before, &::after":{borderBottomColor:(e.vars||e).palette.error.main}},"&::before":{borderBottom:`1px solid ${t}`,left:0,bottom:0,content:'"\\00a0"',position:"absolute",right:0,transition:e.transitions.create("border-bottom-color",{duration:e.transitions.duration.shorter}),pointerEvents:"none"},[`&:hover:not(.${zb.disabled}, .${zb.error}):before`]:{borderBottom:`2px solid ${(e.vars||e).palette.text.primary}`,"@media (hover: none)":{borderBottom:`1px solid ${t}`}},[`&.${zb.disabled}:before`]:{borderBottomStyle:"dotted"}}},...Object.entries(e.palette).filter(dv()).map(([t])=>({props:{color:t,disableUnderline:!1},style:{"&::after":{borderBottom:`2px solid ${(e.vars||e).palette[t].main}`}}}))]}})),hx=mg(Ib,{name:"MuiInput",slot:"Input",overridesResolver:Nb})({}),mx=l.forwardRef(function(e,t){const n=xg({props:e,name:"MuiInput"}),{disableUnderline:r=!1,components:o={},componentsProps:i,fullWidth:a=!1,inputComponent:s="input",multiline:l=!1,slotProps:u,slots:c={},type:d="text",...p}=n,f=(e=>{const{classes:t,disableUnderline:n}=e,r=Cm({root:["root",!n&&"underline"],input:["input"]},jb,t);return{...t,...r}})(n),h={root:{ownerState:{disableUnderline:r}}},m=u??i?Ef(u??i,h):h,g=c.root??o.Root??fx,v=c.input??o.Input??hx;return cf.jsx($b,{slots:{root:g,input:v},slotProps:m,fullWidth:a,inputComponent:s,multiline:l,ref:t,type:d,...p,classes:f})});function gx(e){return Bh("MuiInputLabel",e)}mx.muiName="Input",Dh("MuiInputLabel",["root","focused","disabled","error","required","asterisk","formControl","sizeSmall","shrink","animated","standard","filled","outlined"]);const vx=mg(lx,{shouldForwardProp:e=>hg(e)||"classes"===e,name:"MuiInputLabel",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[{[`& .${ix.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]]}})(wg(({theme:e})=>({display:"block",transformOrigin:"top left",whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis",maxWidth:"100%",variants:[{props:({ownerState:e})=>e.formControl,style:{position:"absolute",left:0,top:0,transform:"translate(0, 20px) scale(1)"}},{props:{size:"small"},style:{transform:"translate(0, 17px) scale(1)"}},{props:({ownerState:e})=>e.shrink,style:{transform:"translate(0, -1.5px) scale(0.75)",transformOrigin:"top left",maxWidth:"133%"}},{props:({ownerState:e})=>!e.disableAnimation,style:{transition:e.transitions.create(["color","transform","max-width"],{duration:e.transitions.duration.shorter,easing:e.transitions.easing.easeOut})}},{props:{variant:"filled"},style:{zIndex:1,pointerEvents:"none",transform:"translate(12px, 16px) scale(1)",maxWidth:"calc(100% - 24px)"}},{props:{variant:"filled",size:"small"},style:{transform:"translate(12px, 13px) scale(1)"}},{props:({variant:e,ownerState:t})=>"filled"===e&&t.shrink,style:{userSelect:"none",pointerEvents:"auto",transform:"translate(12px, 7px) scale(0.75)",maxWidth:"calc(133% - 24px)"}},{props:({variant:e,ownerState:t,size:n})=>"filled"===e&&t.shrink&&"small"===n,style:{transform:"translate(12px, 4px) scale(0.75)"}},{props:{variant:"outlined"},style:{zIndex:1,pointerEvents:"none",transform:"translate(14px, 16px) scale(1)",maxWidth:"calc(100% - 24px)"}},{props:{variant:"outlined",size:"small"},style:{transform:"translate(14px, 9px) scale(1)"}},{props:({variant:e,ownerState:t})=>"outlined"===e&&t.shrink,style:{userSelect:"none",pointerEvents:"auto",maxWidth:"calc(133% - 32px)",transform:"translate(14px, -9px) scale(0.75)"}}]}))),yx=l.forwardRef(function(e,t){const n=xg({name:"MuiInputLabel",props:e}),{disableAnimation:r=!1,margin:o,shrink:i,variant:a,className:s,...l}=n,u=Ob();let c=i;void 0===c&&u&&(c=u.filled||u.focused||u.adornedStart);const d=Eb({props:n,muiFormControl:u,states:["size","variant","required","focused"]}),p={...n,disableAnimation:r,formControl:u,shrink:c,size:d.size,variant:d.variant,required:d.required,focused:d.focused},f=(e=>{const{classes:t,formControl:n,size:r,shrink:o,disableAnimation:i,variant:a,required:s}=e,l=Cm({root:["root",n&&"formControl",!i&&"animated",o&&"shrink",r&&"medium"!==r&&`size${Mf(r)}`,a],asterisk:[s&&"asterisk"]},gx,t);return{...t,...l}})(p);return cf.jsx(vx,{"data-shrink":c,ref:t,className:yg(f.root,s),...l,ownerState:p,classes:f})}),bx=l.createContext({});function wx(e){return Bh("MuiList",e)}Dh("MuiList",["root","padding","dense","subheader"]);const xx=mg("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]}})({listStyle:"none",margin:0,padding:0,position:"relative",variants:[{props:({ownerState:e})=>!e.disablePadding,style:{paddingTop:8,paddingBottom:8}},{props:({ownerState:e})=>e.subheader,style:{paddingTop:0}}]}),kx=l.forwardRef(function(e,t){const n=xg({props:e,name:"MuiList"}),{children:r,className:o,component:i="ul",dense:a=!1,disablePadding:s=!1,subheader:u,...c}=n,d=l.useMemo(()=>({dense:a}),[a]),p={...n,component:i,dense:a,disablePadding:s},f=(e=>{const{classes:t,disablePadding:n,dense:r,subheader:o}=e;return Cm({root:["root",!n&&"padding",r&&"dense",o&&"subheader"]},wx,t)})(p);return cf.jsx(bx.Provider,{value:d,children:cf.jsxs(xx,{as:i,className:yg(f.root,o),ref:t,ownerState:p,...c,children:[u,r]})})}),Sx=Dh("MuiListItemIcon",["root","alignItemsFlexStart"]),Ex=Dh("MuiListItemText",["root","multiline","dense","inset","primary","secondary"]);function Cx(e,t,n){return e===t?e.firstChild:t&&t.nextElementSibling?t.nextElementSibling:n?null:e.firstChild}function Ox(e,t,n){return e===t?n?e.firstChild:e.lastChild:t&&t.previousElementSibling?t.previousElementSibling:n?null:e.lastChild}function Tx(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]:n.startsWith(t.keys.join("")))}function _x(e,t,n,r,o,i){let a=!1,s=o(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")&&Tx(s,i)&&!t)return s.focus(),!0;s=o(e,s,n)}return!1}const Rx=l.forwardRef(function(e,t){const{actions:n,autoFocus:r=!1,autoFocusItem:o=!1,children:i,className:a,disabledItemsFocusable:s=!1,disableListWrap:u=!1,onKeyDown:c,variant:d="selectedMenu",...p}=e,f=l.useRef(null),h=l.useRef({keys:[],repeating:!0,previousKeyMatched:!0,lastTime:null});em(()=>{r&&f.current.focus()},[r]),l.useImperativeHandle(n,()=>({adjustStyleForScrollbar:(e,{direction:t})=>{const n=!f.current.style.width;if(e.clientHeight<f.current.clientHeight&&n){const n=`${Rw(_g(e))}px`;f.current.style["rtl"===t?"paddingLeft":"paddingRight"]=n,f.current.style.width=`calc(100% + ${n})`}return f.current}}),[]);const m=Lg(f,t);let g=-1;l.Children.forEach(i,(e,t)=>{l.isValidElement(e)?(e.props.disabled||("selectedMenu"===d&&e.props.selected||-1===g)&&(g=t),g===t&&(e.props.disabled||e.props.muiSkipListHighlight||e.type.muiSkipListHighlight)&&(g+=1,g>=i.length&&(g=-1))):g===t&&(g+=1,g>=i.length&&(g=-1))});const v=l.Children.map(i,(e,t)=>{if(t===g){const t={};return o&&(t.autoFocus=!0),void 0===e.props.tabIndex&&"selectedMenu"===d&&(t.tabIndex=0),l.cloneElement(e,t)}return e});return cf.jsx(kx,{role:"menu",ref:m,className:a,onKeyDown:e=>{const t=f.current,n=e.key;if(e.ctrlKey||e.metaKey||e.altKey)return void(c&&c(e));const r=Tg(t).activeElement;if("ArrowDown"===n)e.preventDefault(),_x(t,r,u,s,Cx);else if("ArrowUp"===n)e.preventDefault(),_x(t,r,u,s,Ox);else if("Home"===n)e.preventDefault(),_x(t,null,u,s,Cx);else if("End"===n)e.preventDefault(),_x(t,null,u,s,Ox);else if(1===n.length){const o=h.current,i=n.toLowerCase(),a=performance.now();o.keys.length>0&&(a-o.lastTime>500?(o.keys=[],o.repeating=!0,o.previousKeyMatched=!0):o.repeating&&i!==o.keys[0]&&(o.repeating=!1)),o.lastTime=a,o.keys.push(i);const l=r&&!o.repeating&&Tx(r,o);o.previousKeyMatched&&(l||_x(t,r,!1,s,Cx,o))?e.preventDefault():o.previousKeyMatched=!1}c&&c(e)},tabIndex:r?0:-1,...p,children:v})});function Px(e){return Bh("MuiPopover",e)}function Ax(e,t){let n=0;return"number"==typeof t?n=t:"center"===t?n=e.height/2:"bottom"===t&&(n=e.height),n}function Lx(e,t){let n=0;return"number"==typeof t?n=t:"center"===t?n=e.width/2:"right"===t&&(n=e.width),n}function Nx(e){return[e.horizontal,e.vertical].map(e=>"number"==typeof e?`${e}px`:e).join(" ")}function Mx(e){return"function"==typeof e?e():e}Dh("MuiPopover",["root","paper"]);const Ix=mg(Kw,{name:"MuiPopover",slot:"Root"})({}),Fx=mg(Xg,{name:"MuiPopover",slot:"Paper"})({position:"absolute",overflowY:"auto",overflowX:"hidden",minWidth:16,minHeight:16,maxWidth:"calc(100% - 32px)",maxHeight:"calc(100% - 32px)",outline:0}),$x=l.forwardRef(function(e,t){const n=xg({props:e,name:"MuiPopover"}),{action:r,anchorEl:o,anchorOrigin:i={vertical:"top",horizontal:"left"},anchorPosition:a,anchorReference:s="anchorEl",children:u,className:c,container:d,elevation:p=8,marginThreshold:f=16,open:h,PaperProps:m={},slots:g={},slotProps:v={},transformOrigin:y={vertical:"top",horizontal:"left"},TransitionComponent:b,transitionDuration:w="auto",TransitionProps:x={},disableScrollLock:k=!1,...S}=n,E=l.useRef(),C={...n,anchorOrigin:i,anchorReference:s,elevation:p,marginThreshold:f,transformOrigin:y,TransitionComponent:b,transitionDuration:w,TransitionProps:x},O=(e=>{const{classes:t}=e;return Cm({root:["root"],paper:["paper"]},Px,t)})(C),T=l.useCallback(()=>{if("anchorPosition"===s)return a;const e=Mx(o),t=(e&&1===e.nodeType?e:Tg(E.current).body).getBoundingClientRect();return{top:t.top+Ax(t,i.vertical),left:t.left+Lx(t,i.horizontal)}},[o,i.horizontal,i.vertical,a,s]),_=l.useCallback(e=>({vertical:Ax(e,y.vertical),horizontal:Lx(e,y.horizontal)}),[y.horizontal,y.vertical]),R=l.useCallback(e=>{const t={width:e.offsetWidth,height:e.offsetHeight},n=_(t);if("none"===s)return{top:null,left:null,transformOrigin:Nx(n)};const r=T();let i=r.top-n.vertical,a=r.left-n.horizontal;const l=i+t.height,u=a+t.width,c=_g(Mx(o)),d=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&&l>d){const e=l-d;i-=e,n.vertical+=e}if(null!==f&&a<f){const e=a-f;a-=e,n.horizontal+=e}else if(u>p){const e=u-p;a-=e,n.horizontal+=e}return{top:`${Math.round(i)}px`,left:`${Math.round(a)}px`,transformOrigin:Nx(n)}},[o,s,T,_,f]),[P,A]=l.useState(h),L=l.useCallback(()=>{const e=E.current;if(!e)return;const t=R(e);null!==t.top&&e.style.setProperty("top",t.top),null!==t.left&&(e.style.left=t.left),e.style.transformOrigin=t.transformOrigin,A(!0)},[R]);l.useEffect(()=>(k&&window.addEventListener("scroll",L),()=>window.removeEventListener("scroll",L)),[o,k,L]);l.useEffect(()=>{h&&L()}),l.useImperativeHandle(r,()=>h?{updatePosition:()=>{L()}}:null,[h,L]),l.useEffect(()=>{if(!h)return;const e=Og(()=>{L()}),t=_g(Mx(o));return t.addEventListener("resize",e),()=>{e.clear(),t.removeEventListener("resize",e)}},[o,h,L]);let N=w;const M={slots:{transition:b,...g},slotProps:{transition:x,paper:m,...v}},[I,F]=qg("transition",{elementType:px,externalForwardedProps:M,ownerState:C,getSlotProps:e=>({...e,onEntering:(t,n)=>{e.onEntering?.(t,n),L()},onExited:t=>{e.onExited?.(t),A(!1)}}),additionalProps:{appear:!0,in:h}});"auto"!==w||I.muiSupportAuto||(N=void 0);const $=d||(o?Tg(Mx(o)).body:void 0),[j,{slots:z,slotProps:B,...D}]=qg("root",{ref:t,elementType:Ix,externalForwardedProps:{...M,...S},shouldForwardComponentProp:!0,additionalProps:{slots:{backdrop:g.backdrop},slotProps:{backdrop:Ng("function"==typeof v.backdrop?v.backdrop(C):v.backdrop,{invisible:!0})},container:$,open:h},ownerState:C,className:yg(O.root,c)}),[W,U]=qg("paper",{ref:E,className:O.paper,elementType:Fx,externalForwardedProps:M,shouldForwardComponentProp:!0,additionalProps:{elevation:p,style:P?void 0:{opacity:0}},ownerState:C});return cf.jsx(j,{...D,...!Dg(j)&&{slots:z,slotProps:B,disableScrollLock:k},children:cf.jsx(I,{...F,timeout:N,children:cf.jsx(W,{...U,children:u})})})});function jx(e){return Bh("MuiMenu",e)}Dh("MuiMenu",["root","paper","list"]);const zx={vertical:"top",horizontal:"right"},Bx={vertical:"top",horizontal:"left"},Dx=mg($x,{shouldForwardProp:e=>hg(e)||"classes"===e,name:"MuiMenu",slot:"Root"})({}),Wx=mg(Fx,{name:"MuiMenu",slot:"Paper"})({maxHeight:"calc(100% - 96px)",WebkitOverflowScrolling:"touch"}),Ux=mg(Rx,{name:"MuiMenu",slot:"List"})({outline:0}),Vx=l.forwardRef(function(e,t){const n=xg({props:e,name:"MuiMenu"}),{autoFocus:r=!0,children:o,className:i,disableAutoFocusItem:a=!1,MenuListProps:s={},onClose:u,open:c,PaperProps:d={},PopoverClasses:p,transitionDuration:f="auto",TransitionProps:{onEntering:h,...m}={},variant:g="selectedMenu",slots:v={},slotProps:y={},...b}=n,w=mm(),x={...n,autoFocus:r,disableAutoFocusItem:a,MenuListProps:s,onEntering:h,PaperProps:d,transitionDuration:f,TransitionProps:m,variant:g},k=(e=>{const{classes:t}=e;return Cm({root:["root"],paper:["paper"],list:["list"]},jx,t)})(x),S=r&&!a&&c,E=l.useRef(null);let C=-1;l.Children.map(o,(e,t)=>{l.isValidElement(e)&&(e.props.disabled||("selectedMenu"===g&&e.props.selected||-1===C)&&(C=t))});const O={slots:v,slotProps:{list:s,transition:m,paper:d,...y}},T=eb({elementType:v.root,externalSlotProps:y.root,ownerState:x,className:[k.root,i]}),[_,R]=qg("paper",{className:k.paper,elementType:Wx,externalForwardedProps:O,shouldForwardComponentProp:!0,ownerState:x}),[P,A]=qg("list",{className:yg(k.list,s.className),elementType:Ux,shouldForwardComponentProp:!0,externalForwardedProps:O,getSlotProps:e=>({...e,onKeyDown:t=>{(e=>{"Tab"===e.key&&(e.preventDefault(),u&&u(e,"tabKeyDown"))})(t),e.onKeyDown?.(t)}}),ownerState:x}),L="function"==typeof O.slotProps.transition?O.slotProps.transition(x):O.slotProps.transition;return cf.jsx(Dx,{onClose:u,anchorOrigin:{vertical:"bottom",horizontal:w?"right":"left"},transformOrigin:w?zx:Bx,slots:{root:v.root,paper:_,backdrop:v.backdrop,...v.transition&&{transition:v.transition}},slotProps:{root:T,paper:R,backdrop:"function"==typeof y.backdrop?y.backdrop(x):y.backdrop,transition:{...L,onEntering:(...e)=>{((e,t)=>{E.current&&E.current.adjustStyleForScrollbar(e,{direction:w?"rtl":"ltr"}),h&&h(e,t)})(...e),L?.onEntering?.(...e)}}},open:c,ref:t,transitionDuration:f,ownerState:x,...b,classes:p,children:cf.jsx(P,{actions:E,autoFocus:r&&(-1===C||a),autoFocusItem:S,variant:g,...A,children:o})})});function Kx(e){return Bh("MuiMenuItem",e)}const Hx=Dh("MuiMenuItem",["root","focusVisible","dense","disabled","divider","gutters","selected"]),qx=mg(uv,{shouldForwardProp:e=>hg(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]}})(wg(({theme:e})=>({...e.typography.body1,display:"flex",justifyContent:"flex-start",alignItems:"center",position:"relative",textDecoration:"none",minHeight:48,paddingTop:6,paddingBottom:6,boxSizing:"border-box",whiteSpace:"nowrap","&:hover":{textDecoration:"none",backgroundColor:(e.vars||e).palette.action.hover,"@media (hover: none)":{backgroundColor:"transparent"}},[`&.${Hx.selected}`]:{backgroundColor:e.alpha((e.vars||e).palette.primary.main,(e.vars||e).palette.action.selectedOpacity),[`&.${Hx.focusVisible}`]:{backgroundColor:e.alpha((e.vars||e).palette.primary.main,`${(e.vars||e).palette.action.selectedOpacity} + ${(e.vars||e).palette.action.focusOpacity}`)}},[`&.${Hx.selected}:hover`]:{backgroundColor:e.alpha((e.vars||e).palette.primary.main,`${(e.vars||e).palette.action.selectedOpacity} + ${(e.vars||e).palette.action.hoverOpacity}`),"@media (hover: none)":{backgroundColor:e.alpha((e.vars||e).palette.primary.main,(e.vars||e).palette.action.selectedOpacity)}},[`&.${Hx.focusVisible}`]:{backgroundColor:(e.vars||e).palette.action.focus},[`&.${Hx.disabled}`]:{opacity:(e.vars||e).palette.action.disabledOpacity},[`& + .${Hw.root}`]:{marginTop:e.spacing(1),marginBottom:e.spacing(1)},[`& + .${Hw.inset}`]:{marginLeft:52},[`& .${Ex.root}`]:{marginTop:0,marginBottom:0},[`& .${Ex.inset}`]:{paddingLeft:36},[`& .${Sx.root}`]:{minWidth:36},variants:[{props:({ownerState:e})=>!e.disableGutters,style:{paddingLeft:16,paddingRight:16}},{props:({ownerState:e})=>e.divider,style:{borderBottom:`1px solid ${(e.vars||e).palette.divider}`,backgroundClip:"padding-box"}},{props:({ownerState:e})=>!e.dense,style:{[e.breakpoints.up("sm")]:{minHeight:"auto"}}},{props:({ownerState:e})=>e.dense,style:{minHeight:32,paddingTop:4,paddingBottom:4,...e.typography.body2,[`& .${Sx.root} svg`]:{fontSize:"1.25rem"}}}]}))),Gx=l.forwardRef(function(e,t){const n=xg({props:e,name:"MuiMenuItem"}),{autoFocus:r=!1,component:o="li",dense:i=!1,divider:a=!1,disableGutters:s=!1,focusVisibleClassName:u,role:c="menuitem",tabIndex:d,className:p,...f}=n,h=l.useContext(bx),m=l.useMemo(()=>({dense:i||h.dense||!1,disableGutters:s}),[h.dense,i,s]),g=l.useRef(null);em(()=>{r&&g.current&&g.current.focus()},[r]);const v={...n,dense:m.dense,divider:a,disableGutters:s},y=(e=>{const{disabled:t,dense:n,divider:r,disableGutters:o,selected:i,classes:a}=e,s=Cm({root:["root",n&&"dense",t&&"disabled",!o&&"gutters",r&&"divider",i&&"selected"]},Kx,a);return{...a,...s}})(n),b=Lg(g,t);let w;return n.disabled||(w=void 0!==d?d:-1),cf.jsx(bx.Provider,{value:m,children:cf.jsx(qx,{ref:b,role:c,tabIndex:w,component:o,focusVisibleClassName:yg(y.focusVisible,u),className:yg(y.root,p),...f,ownerState:v,classes:y})})});function Yx(e){return Bh("MuiNativeSelect",e)}const Xx=Dh("MuiNativeSelect",["root","select","multiple","filled","outlined","standard","disabled","icon","iconOpen","iconFilled","iconOutlined","iconStandard","nativeInput","error"]),Qx=mg("select",{name:"MuiNativeSelect"})(({theme:e})=>({MozAppearance:"none",WebkitAppearance:"none",userSelect:"none",borderRadius:0,cursor:"pointer","&:focus":{borderRadius:0},[`&.${Xx.disabled}`]:{cursor:"default"},"&[multiple]":{height:"auto"},"&:not([multiple]) option, &:not([multiple]) optgroup":{backgroundColor:(e.vars||e).palette.background.paper},variants:[{props:({ownerState:e})=>"filled"!==e.variant&&"outlined"!==e.variant,style:{"&&&":{paddingRight:24,minWidth:16}}},{props:{variant:"filled"},style:{"&&&":{paddingRight:32}}},{props:{variant:"outlined"},style:{borderRadius:(e.vars||e).shape.borderRadius,"&:focus":{borderRadius:(e.vars||e).shape.borderRadius},"&&&":{paddingRight:32}}}]})),Jx=mg(Qx,{name:"MuiNativeSelect",slot:"Select",shouldForwardProp:hg,overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.select,t[n.variant],n.error&&t.error,{[`&.${Xx.multiple}`]:t.multiple}]}})({}),Zx=mg("svg",{name:"MuiNativeSelect"})(({theme:e})=>({position:"absolute",right:0,top:"calc(50% - .5em)",pointerEvents:"none",color:(e.vars||e).palette.action.active,[`&.${Xx.disabled}`]:{color:(e.vars||e).palette.action.disabled},variants:[{props:({ownerState:e})=>e.open,style:{transform:"rotate(180deg)"}},{props:{variant:"filled"},style:{right:7}},{props:{variant:"outlined"},style:{right:7}}]})),ek=mg(Zx,{name:"MuiNativeSelect",slot:"Icon",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.icon,n.variant&&t[`icon${Mf(n.variant)}`],n.open&&t.iconOpen]}})({}),tk=l.forwardRef(function(e,t){const{className:n,disabled:r,error:o,IconComponent:i,inputRef:a,variant:s="standard",...u}=e,c={...e,disabled:r,variant:s,error:o},d=(e=>{const{classes:t,variant:n,disabled:r,multiple:o,open:i,error:a}=e;return Cm({select:["select",n,r&&"disabled",o&&"multiple",a&&"error"],icon:["icon",`icon${Mf(n)}`,i&&"iconOpen",r&&"disabled"]},Yx,t)})(c);return cf.jsxs(l.Fragment,{children:[cf.jsx(Jx,{ownerState:c,className:yg(d.select,n),disabled:r,ref:a||t,...u}),e.multiple?null:cf.jsx(ek,{as:i,ownerState:c,className:d.icon})]})});var nk;const rk=mg("fieldset",{name:"MuiNotchedOutlined",shouldForwardProp:hg})({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%"}),ok=mg("legend",{name:"MuiNotchedOutlined",shouldForwardProp:hg})(wg(({theme:e})=>({float:"unset",width:"auto",overflow:"hidden",variants:[{props:({ownerState:e})=>!e.withLabel,style:{padding:0,lineHeight:"11px",transition:e.transitions.create("width",{duration:150,easing:e.transitions.easing.easeOut})}},{props:({ownerState:e})=>e.withLabel,style:{display:"block",padding:0,height:11,fontSize:"0.75em",visibility:"hidden",maxWidth:.01,transition:e.transitions.create("max-width",{duration:50,easing:e.transitions.easing.easeOut}),whiteSpace:"nowrap","& > span":{paddingLeft:5,paddingRight:5,display:"inline-block",opacity:0,visibility:"visible"}}},{props:({ownerState:e})=>e.withLabel&&e.notched,style:{maxWidth:"100%",transition:e.transitions.create("max-width",{duration:100,easing:e.transitions.easing.easeOut,delay:50})}}]})));const ik=mg(Mb,{shouldForwardProp:e=>hg(e)||"classes"===e,name:"MuiOutlinedInput",slot:"Root",overridesResolver:Lb})(wg(({theme:e})=>{const t="light"===e.palette.mode?"rgba(0, 0, 0, 0.23)":"rgba(255, 255, 255, 0.23)";return{position:"relative",borderRadius:(e.vars||e).shape.borderRadius,[`&:hover .${Db.notchedOutline}`]:{borderColor:(e.vars||e).palette.text.primary},"@media (hover: none)":{[`&:hover .${Db.notchedOutline}`]:{borderColor:e.vars?e.alpha(e.vars.palette.common.onBackground,.23):t}},[`&.${Db.focused} .${Db.notchedOutline}`]:{borderWidth:2},variants:[...Object.entries(e.palette).filter(dv()).map(([t])=>({props:{color:t},style:{[`&.${Db.focused} .${Db.notchedOutline}`]:{borderColor:(e.vars||e).palette[t].main}}})),{props:{},style:{[`&.${Db.error} .${Db.notchedOutline}`]:{borderColor:(e.vars||e).palette.error.main},[`&.${Db.disabled} .${Db.notchedOutline}`]:{borderColor:(e.vars||e).palette.action.disabled}}},{props:({ownerState:e})=>e.startAdornment,style:{paddingLeft:14}},{props:({ownerState:e})=>e.endAdornment,style:{paddingRight:14}},{props:({ownerState:e})=>e.multiline,style:{padding:"16.5px 14px"}},{props:({ownerState:e,size:t})=>e.multiline&&"small"===t,style:{padding:"8.5px 14px"}}]}})),ak=mg(function(e){const{children:t,classes:n,className:r,label:o,notched:i,...a}=e,s=null!=o&&""!==o,l={...e,notched:i,withLabel:s};return cf.jsx(rk,{"aria-hidden":!0,className:r,ownerState:l,...a,children:cf.jsx(ok,{ownerState:l,children:s?cf.jsx("span",{children:o}):nk||(nk=cf.jsx("span",{className:"notranslate","aria-hidden":!0,children:"​"}))})})},{name:"MuiOutlinedInput",slot:"NotchedOutline"})(wg(({theme:e})=>{const t="light"===e.palette.mode?"rgba(0, 0, 0, 0.23)":"rgba(255, 255, 255, 0.23)";return{borderColor:e.vars?e.alpha(e.vars.palette.common.onBackground,.23):t}})),sk=mg(Ib,{name:"MuiOutlinedInput",slot:"Input",overridesResolver:Nb})(wg(({theme:e})=>({padding:"16.5px 14px",...!e.vars&&{"&:-webkit-autofill":{WebkitBoxShadow:"light"===e.palette.mode?null:"0 0 0 100px #266798 inset",WebkitTextFillColor:"light"===e.palette.mode?null:"#fff",caretColor:"light"===e.palette.mode?null:"#fff",borderRadius:"inherit"}},...e.vars&&{"&:-webkit-autofill":{borderRadius:"inherit"},[e.getColorSchemeSelector("dark")]:{"&:-webkit-autofill":{WebkitBoxShadow:"0 0 0 100px #266798 inset",WebkitTextFillColor:"#fff",caretColor:"#fff"}}},variants:[{props:{size:"small"},style:{padding:"8.5px 14px"}},{props:({ownerState:e})=>e.multiline,style:{padding:0}},{props:({ownerState:e})=>e.startAdornment,style:{paddingLeft:0}},{props:({ownerState:e})=>e.endAdornment,style:{paddingRight:0}}]}))),lk=l.forwardRef(function(e,t){const n=xg({props:e,name:"MuiOutlinedInput"}),{components:r={},fullWidth:o=!1,inputComponent:i="input",label:a,multiline:s=!1,notched:u,slots:c={},slotProps:d={},type:p="text",...f}=n,h=(e=>{const{classes:t}=e,n=Cm({root:["root"],notchedOutline:["notchedOutline"],input:["input"]},Bb,t);return{...t,...n}})(n),m=Ob(),g=Eb({props:n,muiFormControl:m,states:["color","disabled","error","focused","hiddenLabel","size","required"]}),v={...n,color:g.color||"primary",disabled:g.disabled,error:g.error,focused:g.focused,formControl:m,fullWidth:o,hiddenLabel:g.hiddenLabel,multiline:s,size:g.size,type:p},y=c.root??r.Root??ik,b=c.input??r.Input??sk,[w,x]=qg("notchedOutline",{elementType:ak,className:h.notchedOutline,shouldForwardComponentProp:!0,ownerState:v,externalForwardedProps:{slots:c,slotProps:d},additionalProps:{label:null!=a&&""!==a&&g.required?cf.jsxs(l.Fragment,{children:[a," ","*"]}):a}});return cf.jsx($b,{slots:{root:y,input:b},slotProps:d,renderSuffix:e=>cf.jsx(w,{...x,notched:void 0!==u?u:Boolean(e.startAdornment||e.filled||e.focused)}),fullWidth:o,inputComponent:i,multiline:s,ref:t,type:p,...f,classes:{...h,notchedOutline:null}})});function uk(e){return Bh("MuiSelect",e)}lk.muiName="Input";const ck=Dh("MuiSelect",["root","select","multiple","filled","outlined","standard","disabled","focused","icon","iconOpen","iconFilled","iconOutlined","iconStandard","nativeInput","error"]);var dk;const pk=mg(Qx,{name:"MuiSelect",slot:"Select",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[{[`&.${ck.select}`]:t.select},{[`&.${ck.select}`]:t[n.variant]},{[`&.${ck.error}`]:t.error},{[`&.${ck.multiple}`]:t.multiple}]}})({[`&.${ck.select}`]:{height:"auto",minHeight:"1.4375em",textOverflow:"ellipsis",whiteSpace:"nowrap",overflow:"hidden"}}),fk=mg(Zx,{name:"MuiSelect",slot:"Icon",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.icon,n.variant&&t[`icon${Mf(n.variant)}`],n.open&&t.iconOpen]}})({}),hk=mg("input",{shouldForwardProp:e=>fg(e)&&"classes"!==e,name:"MuiSelect",slot:"NativeInput"})({bottom:0,left:0,position:"absolute",opacity:0,pointerEvents:"none",width:"100%",boxSizing:"border-box"});function mk(e,t){return"object"==typeof t&&null!==t?e===t:String(e)===String(t)}function gk(e){return null==e||"string"==typeof e&&!e.trim()}const vk=l.forwardRef(function(e,t){const{"aria-describedby":n,"aria-label":r,autoFocus:o,autoWidth:i,children:a,className:s,defaultOpen:u,defaultValue:c,disabled:d,displayEmpty:p,error:f=!1,IconComponent:h,inputRef:m,labelId:g,MenuProps:v={},multiple:y,name:b,onBlur:w,onChange:x,onClose:k,onFocus:S,onOpen:E,open:C,readOnly:O,renderValue:T,required:_,SelectDisplayProps:R={},tabIndex:P,type:A,value:L,variant:N="standard",...M}=e,[I,F]=Pg({controlled:L,default:c,name:"Select"}),[$,j]=Pg({controlled:C,default:u,name:"Select"}),z=l.useRef(null),B=l.useRef(null),[D,W]=l.useState(null),{current:U}=l.useRef(null!=C),[V,K]=l.useState(),H=Lg(t,m),q=l.useCallback(e=>{B.current=e,e&&W(e)},[]),G=D?.parentNode;l.useImperativeHandle(H,()=>({focus:()=>{B.current.focus()},node:z.current,value:I}),[I]),l.useEffect(()=>{u&&$&&D&&!U&&(K(i?null:G.clientWidth),B.current.focus())},[D,i]),l.useEffect(()=>{o&&B.current.focus()},[o]),l.useEffect(()=>{if(!g)return;const e=Tg(B.current).getElementById(g);if(e){const t=()=>{getSelection().isCollapsed&&B.current.focus()};return e.addEventListener("click",t),()=>{e.removeEventListener("click",t)}}},[g]);const Y=(e,t)=>{e?E&&E(t):k&&k(t),U||(K(i?null:G.clientWidth),j(e))},X=l.Children.toArray(a),Q=e=>t=>{let n;if(t.currentTarget.hasAttribute("tabindex")){if(y){n=Array.isArray(I)?I.slice():[];const t=I.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),I!==n&&(F(n),x)){const r=t.nativeEvent||t,o=new r.constructor(r.type,r);Object.defineProperty(o,"target",{writable:!0,value:{value:n,name:b}}),x(o,e)}y||Y(!1,t)}},J=null!==D&&$;let Z,ee;delete M["aria-invalid"];const te=[];let ne=!1;(_b({value:I})||p)&&(T?Z=T(I):ne=!0);const re=X.map(e=>{if(!l.isValidElement(e))return null;let t;if(y){if(!Array.isArray(I))throw new Error(gd(2));t=I.some(t=>mk(t,e.props.value)),t&&ne&&te.push(e.props.children)}else t=mk(I,e.props.value),t&&ne&&(ee=e.props.children);return l.cloneElement(e,{"aria-selected":t?"true":"false",onClick:Q(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})});ne&&(Z=y?0===te.length?null:te.reduce((e,t,n)=>(e.push(t),n<te.length-1&&e.push(", "),e),[]):ee);let oe,ie=V;!i&&U&&D&&(ie=G.clientWidth),oe=void 0!==P?P:d?null:0;const ae=R.id||(b?`mui-component-select-${b}`:void 0),se={...e,variant:N,value:I,open:J,error:f},le=(e=>{const{classes:t,variant:n,disabled:r,multiple:o,open:i,error:a}=e;return Cm({select:["select",n,r&&"disabled",o&&"multiple",a&&"error"],icon:["icon",`icon${Mf(n)}`,i&&"iconOpen",r&&"disabled"],nativeInput:["nativeInput"]},uk,t)})(se),ue={...v.PaperProps,..."function"==typeof v.slotProps?.paper?v.slotProps.paper(se):v.slotProps?.paper},ce={...v.MenuListProps,..."function"==typeof v.slotProps?.list?v.slotProps.list(se):v.slotProps?.list},de=wm();return cf.jsxs(l.Fragment,{children:[cf.jsx(pk,{as:"div",ref:q,tabIndex:oe,role:"combobox","aria-controls":J?de:void 0,"aria-disabled":d?"true":void 0,"aria-expanded":J?"true":"false","aria-haspopup":"listbox","aria-label":r,"aria-labelledby":[g,ae].filter(Boolean).join(" ")||void 0,"aria-describedby":n,"aria-required":_?"true":void 0,"aria-invalid":f?"true":void 0,onKeyDown:e=>{if(!O){[" ","ArrowUp","ArrowDown","Enter"].includes(e.key)&&(e.preventDefault(),Y(!0,e))}},onMouseDown:d||O?null:e=>{0===e.button&&(e.preventDefault(),B.current.focus(),Y(!0,e))},onBlur:e=>{!J&&w&&(Object.defineProperty(e,"target",{writable:!0,value:{value:I,name:b}}),w(e))},onFocus:S,...R,ownerState:se,className:yg(R.className,le.select,s),id:ae,children:gk(Z)?dk||(dk=cf.jsx("span",{className:"notranslate","aria-hidden":!0,children:"​"})):Z}),cf.jsx(hk,{"aria-invalid":f,value:Array.isArray(I)?I.join(","):I,name:b,ref:z,"aria-hidden":!0,onChange:e=>{const t=X.find(t=>t.props.value===e.target.value);void 0!==t&&(F(t.props.value),x&&x(e,t))},tabIndex:-1,disabled:d,className:le.nativeInput,autoFocus:o,required:_,...M,ownerState:se}),cf.jsx(fk,{as:h,className:le.icon,ownerState:se}),cf.jsx(Vx,{id:`menu-${b||""}`,anchorEl:G,open:J,onClose:e=>{Y(!1,e)},anchorOrigin:{vertical:"bottom",horizontal:"center"},transformOrigin:{vertical:"top",horizontal:"center"},...v,slotProps:{...v.slotProps,list:{"aria-labelledby":g,role:"listbox","aria-multiselectable":y?"true":void 0,disableListWrap:!0,id:de,...ce},paper:{...ue,style:{minWidth:ie,...null!=ue?ue.style:null}}},children:re})]})}),yk={name:"MuiSelect",slot:"Root",shouldForwardProp:e=>hg(e)&&"variant"!==e},bk=mg(mx,yk)(""),wk=mg(lk,yk)(""),xk=mg(Yw,yk)(""),kk=l.forwardRef(function(e,t){const n=xg({name:"MuiSelect",props:e}),{autoWidth:r=!1,children:o,classes:i={},className:a,defaultOpen:s=!1,displayEmpty:u=!1,IconComponent:c=Vb,id:d,input:p,inputProps:f,label:h,labelId:m,MenuProps:g,multiple:v=!1,native:y=!1,onClose:b,onOpen:w,open:x,renderValue:k,SelectDisplayProps:S,variant:E="outlined",...C}=n,O=y?tk:vk,T=Eb({props:n,muiFormControl:Ob(),states:["variant","error"]}),_=T.variant||E,R={...n,variant:_,classes:i},P=(e=>{const{classes:t}=e,n=Cm({root:["root"]},uk,t);return{...t,...n}})(R),{root:A,...L}=P,N=p||{standard:cf.jsx(bk,{ownerState:R}),outlined:cf.jsx(wk,{label:h,ownerState:R}),filled:cf.jsx(xk,{ownerState:R})}[_],M=Lg(t,tb(N));return cf.jsx(l.Fragment,{children:l.cloneElement(N,{inputComponent:O,inputProps:{children:o,error:T.error,IconComponent:c,variant:_,type:void 0,multiple:v,...y?{id:d}:{autoWidth:r,defaultOpen:s,displayEmpty:u,labelId:m,MenuProps:g,onClose:b,onOpen:w,open:x,renderValue:k,SelectDisplayProps:{id:d,...S}},...f,classes:f?Ef(L,f.classes):L,...p?p.props.inputProps:{}},...(v&&y||u)&&"outlined"===_?{notched:!0}:{},ref:M,className:yg(N.props.className,a,P.root),...!p&&{variant:_},...C})})});function Sk(e){return Bh("MuiTextField",e)}kk.muiName="Select",Dh("MuiTextField",["root"]);const Ek={standard:mx,filled:Yw,outlined:lk},Ck=mg(Jw,{name:"MuiTextField",slot:"Root"})({}),Ok=l.forwardRef(function(e,t){const n=xg({props:e,name:"MuiTextField"}),{autoComplete:r,autoFocus:o=!1,children:i,className:a,color:s="primary",defaultValue:l,disabled:u=!1,error:c=!1,FormHelperTextProps:d,fullWidth:p=!1,helperText:f,id:h,InputLabelProps:m,inputProps:g,InputProps:v,inputRef:y,label:b,maxRows:w,minRows:x,multiline:k=!1,name:S,onBlur:E,onChange:C,onFocus:O,placeholder:T,required:_=!1,rows:R,select:P=!1,SelectProps:A,slots:L={},slotProps:N={},type:M,value:I,variant:F="outlined",...$}=n,j={...n,autoFocus:o,color:s,disabled:u,error:c,fullWidth:p,multiline:k,required:_,select:P,variant:F},z=(e=>{const{classes:t}=e;return Cm({root:["root"]},Sk,t)})(j),B=wm(h),D=f&&B?`${B}-helper-text`:void 0,W=b&&B?`${B}-label`:void 0,U=Ek[F],V={slots:L,slotProps:{input:v,inputLabel:m,htmlInput:g,formHelperText:d,select:A,...N}},K={},H=V.slotProps.inputLabel;"outlined"===F&&(H&&void 0!==H.shrink&&(K.notched=H.shrink),K.label=b),P&&(A&&A.native||(K.id=void 0),K["aria-describedby"]=void 0);const[q,G]=qg("root",{elementType:Ck,shouldForwardComponentProp:!0,externalForwardedProps:{...V,...$},ownerState:j,className:yg(z.root,a),ref:t,additionalProps:{disabled:u,error:c,fullWidth:p,required:_,color:s,variant:F}}),[Y,X]=qg("input",{elementType:U,externalForwardedProps:V,additionalProps:K,ownerState:j}),[Q,J]=qg("inputLabel",{elementType:yx,externalForwardedProps:V,ownerState:j}),[Z,ee]=qg("htmlInput",{elementType:"input",externalForwardedProps:V,ownerState:j}),[te,ne]=qg("formHelperText",{elementType:rx,externalForwardedProps:V,ownerState:j}),[re,oe]=qg("select",{elementType:kk,externalForwardedProps:V,ownerState:j}),ie=cf.jsx(Y,{"aria-describedby":D,autoComplete:r,autoFocus:o,defaultValue:l,fullWidth:p,multiline:k,name:S,rows:R,maxRows:w,minRows:x,type:M,value:I,id:B,inputRef:y,onBlur:E,onChange:C,onFocus:O,placeholder:T,inputProps:ee,slots:{input:L.htmlInput?Z:void 0},...X});return cf.jsxs(q,{...G,children:[null!=b&&""!==b&&cf.jsx(Q,{htmlFor:B,id:W,...J,children:b}),P?cf.jsx(re,{"aria-describedby":D,id:B,labelId:W,value:I,input:ie,...oe,children:i}):ie,f&&cf.jsx(te,{id:D,...ne,children:f})]})});var Tk=Cg(cf.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"})),_k=Cg(cf.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"}));const Rk=l.createElement(Tk,{fontSize:"small"}),Pk=l.createElement(_k,{fontSize:"small"});function Ak({items:e,selectedKeys:t,defaultSelectedKeys:n,onChange:r,inputValue:o,defaultInputValue:i,onInputChange:a,debounceMs:s=300,label:u,placeholder:c,loading:d,disabled:p,size:f="small",error:h,helperText:m,limitTags:g=3,disableClearable:v,id:y,textFieldProps:b}){const w=l.useMemo(()=>Array.isArray(e)?e:[],[e]),x=Array.isArray(t),[k,S]=l.useState(Array.isArray(n)?n:[]),E=x?t:k,C=l.useMemo(()=>{const e=new Map;for(const t of w)e.set(t&&t.key,t);return e},[w]),O=l.useMemo(()=>(Array.isArray(E)?E:[]).map(e=>C.get(e)).filter(Boolean),[E,C]),T="string"==typeof o,[_,R]=l.useState("string"==typeof i?i:""),P=T?o:_,A=function(e,t=300){const n=l.useRef(e),r=l.useRef(null);return n.current=e,l.useEffect(()=>()=>{r.current&&window.clearTimeout(r.current)},[]),l.useCallback((...e)=>{n.current&&(r.current&&window.clearTimeout(r.current),r.current=window.setTimeout(()=>{n.current&&n.current(...e)},t))},[t])}(e=>{a&&a(e)},s),L=O;return l.createElement(Jw,{fullWidth:!0,error:h,disabled:p},l.createElement(aw,{openOnFocus:!0,forcePopupIcon:!0,id:y,multiple:!0,disableCloseOnSelect:!0,options:w,value:L,inputValue:P,getOptionLabel:e=>e&&"object"==typeof e?e.value??"":"",isOptionEqualToValue:(e,t)=>e&&t&&e.key===t.key,loading:d,limitTags:g,disableClearable:v,onChange:(e,t)=>{const n=Array.isArray(t)?t.map(e=>e&&e.key):[];x||S(n),r&&r(n,Array.isArray(t)?t:[])},onInputChange:(e,t,n)=>{T||R(t??""),"input"===n?A(t??""):"clear"===n&&A("")},renderOption:(e,t,{selected:n})=>l.createElement("li",ko({},e,{key:t&&t.key||Math.random().toString(36)}),l.createElement(_w,{icon:Rk,checkedIcon:Pk,style:{marginRight:8},checked:!!n}),t&&t.value),renderTags:(e,t)=>(Array.isArray(e)?e:[]).map((e,n)=>l.createElement(bb,ko({},t({index:n}),{key:e&&e.key||n,label:e&&e.value||""}))),renderInput:e=>l.createElement(Ok,ko({},e,{label:u,placeholder:c,InputProps:{...e.InputProps,endAdornment:l.createElement(l.Fragment,null,d?l.createElement(kv,{size:18}):null,e.InputProps.endAdornment)},size:f},b))}),m?l.createElement(rx,null,m):null)}const Lk=({filter:e,channel:t,query:n})=>{const[r,o]=l.useState([]),[i,a]=l.useState([]),[s,c]=l.useState(!1),[d,p]=l.useState("");return l.useEffect(()=>{a(n?.filter?.[e?.filter]||[])},[n]),l.useEffect(()=>{(async()=>{c(!0);const t=await async function(e,t){return t?.source?(await Cs.runReport({id:t.source})).map(e=>({key:e[t.field],value:e[t.field]})):[]}(0,e);o(t),c(!1)})()},[d]),u.createElement("div",{style:{display:"flex"}},u.createElement("div",{style:{maxWidth:640,minWidth:200}},u.createElement(Ak,{id:e?.title,label:e?.title,placeholder:"Type to search…",items:r,selectedKeys:i,onChange:(n,r)=>{a(n),t.emit("filterChanged",e,{[e.filter]:n})},onInputChange:e=>{p(e)},loading:s,debounceMs:300,helperText:i.length?`${i.length} selected`:""})))};function Nk({items:e,value:t,label:n,onChange:r,sx:o={width:"100%"}}){const i=e.some(e=>e.key===t)?t:"";return u.createElement(hw,{sx:o},u.createElement(Jw,{fullWidth:!0},u.createElement(yx,{id:"demo-simple-select-label"},n),u.createElement(kk,{labelId:"demo-simple-select-label",id:"demo-simple-select",value:i,label:n,onChange:r,MenuProps:{style:{maxHeight:"300px"}},size:"small"},e.map(e=>{const{key:t,value:n}=e;return u.createElement(Gx,{key:t,value:t},n)}))))}const Mk=({filter:e,channel:t,query:n})=>{const[r,o]=l.useState([]),[i,a]=l.useState("");return l.useEffect(()=>{a(n?.date_range?.name)},[n]),l.useEffect(()=>{(async()=>{const t=(await Cs.getDateRanges()).filter(t=>!(e.allowedOptions.length>0)||e.allowedOptions.some(e=>e===t.name)).map(e=>({key:e.name,value:e.title}));o(t)})()},[]),u.createElement("div",{style:{minWidth:"200px",maxWidth:"640px"}},u.createElement(Nk,{items:r,value:i,label:e?.title,onChange:(n,r)=>{const o=n.target.value;a(o),t.emit("filterChanged",e,{date_range:{name:o}})}}))},Ik=({filters:e=[],channel:t,query:n})=>u.createElement("div",{style:{display:"flex",flexWrap:"wrap",gap:"8px"}},e.map(e=>"multi-select"===e.type?u.createElement(Lk,{key:e.title,channel:t,filter:e,query:n}):"date-range"===e.type?u.createElement(Mk,{key:e.title,channel:t,filter:e,query:n}):null));var Fk,$k={exports:{}};var jk=(Fk||(Fk=1,function(e){var t=Object.prototype.hasOwnProperty,n="~";function r(){}function o(e,t,n){this.fn=e,this.context=t,this.once=n||!1}function i(e,t,r,i,a){if("function"!=typeof r)throw new TypeError("The listener must be a function");var s=new o(r,i||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,o=[];if(0===this._eventsCount)return o;for(r in e=this._events)t.call(e,r)&&o.push(n?r.slice(1):r);return Object.getOwnPropertySymbols?o.concat(Object.getOwnPropertySymbols(e)):o},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 o=0,i=r.length,a=new Array(i);o<i;o++)a[o]=r[o].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,o,i,a){var s=n?n+e:e;if(!this._events[s])return!1;var l,u,c=this._events[s],d=arguments.length;if(c.fn){switch(c.once&&this.removeListener(e,c.fn,void 0,!0),d){case 1:return c.fn.call(c.context),!0;case 2:return c.fn.call(c.context,t),!0;case 3:return c.fn.call(c.context,t,r),!0;case 4:return c.fn.call(c.context,t,r,o),!0;case 5:return c.fn.call(c.context,t,r,o,i),!0;case 6:return c.fn.call(c.context,t,r,o,i,a),!0}for(u=1,l=new Array(d-1);u<d;u++)l[u-1]=arguments[u];c.fn.apply(c.context,l)}else{var p,f=c.length;for(u=0;u<f;u++)switch(c[u].once&&this.removeListener(e,c[u].fn,void 0,!0),d){case 1:c[u].fn.call(c[u].context);break;case 2:c[u].fn.call(c[u].context,t);break;case 3:c[u].fn.call(c[u].context,t,r);break;case 4:c[u].fn.call(c[u].context,t,r,o);break;default:if(!l)for(p=1,l=new Array(d-1);p<d;p++)l[p-1]=arguments[p];c[u].fn.apply(c[u].context,l)}}return!0},s.prototype.on=function(e,t,n){return i(this,e,t,n,!1)},s.prototype.once=function(e,t,n){return i(this,e,t,n,!0)},s.prototype.removeListener=function(e,t,r,o){var i=n?n+e:e;if(!this._events[i])return this;if(!t)return a(this,i),this;var s=this._events[i];if(s.fn)s.fn!==t||o&&!s.once||r&&s.context!==r||a(this,i);else{for(var l=0,u=[],c=s.length;l<c;l++)(s[l].fn!==t||o&&!s[l].once||r&&s[l].context!==r)&&u.push(s[l]);u.length?this._events[i]=1===u.length?u[0]:u:a(this,i)}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}($k)),$k.exports),zk=t(jk),Bk=e=>u.useRef(e||new zk).current,Dk=e=>{const t=u.useState({}),n=u.useCallback((n,r)=>{let o={...t.current,...r};for(var i in t.current=o,o)"date_range"===i||o[i].length||delete o[i];e?.emit("mergedFilterChanged",{value:o})},[e]);u.useEffect(()=>(e?.on("filterChanged",n),()=>{e?.off("filterChanged",n)}),[e])},Wk=({id:e,cache:t,dashboard:n,channel:r,...o})=>{const[i,a]=u.useState(),[s,c]=u.useState(),[d,p]=u.useState(),[f,h]=u.useState(),[m,g]=u.useState(sl()),[v,y]=u.useState(),[b,w]=u.useState(0),[x,k]=u.useState(!1),[S,E]=u.useState(),[C,O]=u.useState(!1),T=u.useRef({value:o?.filter}),[_,R]=u.useState({}),{ref:P,inView:A}=function({threshold:e,delay:t,trackVisibility:n,rootMargin:r,root:o,triggerOnce:i,skip:a,initialInView:s,fallbackInView:u,onChange:c}={}){var d;const[p,f]=l.useState(null),h=l.useRef(c),m=l.useRef(s),[g,v]=l.useState({inView:!!s,entry:void 0});h.current=c,l.useEffect(()=>{if(void 0===m.current&&(m.current=s),a||!p)return;let l;return l=Ic(p,(e,t)=>{const n=m.current;m.current=e,(void 0!==n||e)&&(v({inView:e,entry:t}),h.current&&h.current(e,t),t.isIntersecting&&i&&l&&(l(),l=void 0))},{root:o,rootMargin:r,threshold:e,trackVisibility:n,delay:t},u),()=>{l&&l()}},[Array.isArray(e)?e.toString():e,p,o,r,i,a,n,u,t]);const y=null==(d=g.entry)?void 0:d.target,b=l.useRef(void 0);p||!y||i||a||b.current===y||(b.current=y,v({inView:!!s,entry:void 0}),m.current=s);const w=[f,g.inView,g.entry];return w.ref=w[0],w.inView=w[1],w.entry=w[2],w}({threshold:.1,delay:1e3}),L=Bk(r);Dk(L);const N=u.useCallback(e=>{const t=e.target.value;w(t),y(i.doc.view[t])},[i]);u.useEffect(()=>{e&&(async()=>{const n=e,r=t?.[n]||await Cs.getChart({id:n}),i=r.doc.source?.id,s=i?t?.[i]||await Cs.getReport({id:i}):void 0,l=t?.[`schema_${i}`]||o?.schema||await Cs.getReportSchema({id:i}),u=r.doc?.view?.[0];w(0),c(s),a(r),y(u),p(l),O(!0)})().catch(e=>{console.error(e.message)})},[e]),u.useEffect(()=>{i&&f&&(!i?.doc?.source?.id||s)&&d&&(async()=>{g(sl(i.doc.chart?.component,{view:v,source:f,chart:i,report:s,schema:d,dashboard:n,query:_}))})().catch(e=>{console.error(e.message)})},[i,f,v,s,d]);const M=e=>{const t={...s?.doc.query.filter||{},...o?.filter,...e?.value},n=t.date_range||s?.doc.query.date_range;if(delete t.date_range,O(!1),E(),k(!0),"context"===i?.doc?.source?.type)return h({filter:t}),void k(!1);const r={filter:t,date_range:n,parameters:o?.params};R(r),Cs.runReport({id:s.id,query:r}).then(e=>{h(i.doc.source.reverse?e.reverse():e)}).catch(e=>{h([])}).finally(()=>{k(!1)})},I=e=>{T.current=e,A?M(e):(E(e),O(!0))};return u.useEffect(()=>(L?.on("mergedFilterChanged",I),()=>{L?.off("mergedFilterChanged",I)}),[L,s,i,A]),u.useEffect(()=>{A&&C&&M(S)},[A,C]),u.useEffect(()=>{O(!0)},[o.params]),u.createElement(xo,{ref:P,style:{padding:"16px",paddingTop:0,flexGrow:1,borderRadius:12,display:"flex",flexDirection:"column",gap:"16px"},elevation:2},u.createElement(Ro,{style:{visibility:x?"visible":"hidden"}}),u.createElement("div",{style:{display:"flex"}},u.createElement("div",null,i&&u.createElement("div",{style:{display:"flex",alignItems:"center",lineHeight:0}},u.createElement(Ps,{noWrap:!0,variant:"caption"},o?.title||i.doc.name," "))),u.createElement("div",{style:{flexGrow:1}}),u.createElement("div",null,i?.doc?.view?.length>1&&u.createElement(fl,null,u.createElement(uc,{labelId:"date-range-select-label",id:"date-range-select",value:b,onChange:N,style:{fontSize:"12px"},disableUnderline:!0},i.doc.view.map((e,t)=>u.createElement(Pc,{key:t,value:t},e.title)))))),u.createElement("div",{style:{position:"relative",flexGrow:n?void 0:1,display:"flex",flexDirection:"column"}},u.createElement(Ik,{filters:i?.doc?.filters,channel:L,query:_}),m))},Uk=[0,1,2,3,4,5,6,7,8,9,10],Vk=["auto",!0,1,2,3,4,5,6,7,8,9,10,11,12];function Kk(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1,n=parseFloat(e);return"".concat(n/t).concat(String(e).replace(String(n),"")||"px")}var Hk=l.forwardRef(function(e,t){var n=e.alignContent,r=void 0===n?"stretch":n,o=e.alignItems,i=void 0===o?"stretch":o,a=e.classes,s=e.className,u=e.component,c=void 0===u?"div":u,d=e.container,h=void 0!==d&&d,g=e.direction,v=void 0===g?"row":g,y=e.item,b=void 0!==y&&y,w=e.justify,x=e.justifyContent,k=void 0===x?"flex-start":x,S=e.lg,E=void 0!==S&&S,C=e.md,O=void 0!==C&&C,T=e.sm,_=void 0!==T&&T,R=e.spacing,P=void 0===R?0:R,A=e.wrap,L=void 0===A?"wrap":A,N=e.xl,M=void 0!==N&&N,I=e.xs,F=void 0!==I&&I,$=e.zeroMinWidth,j=void 0!==$&&$,z=p(e,["alignContent","alignItems","classes","className","component","container","direction","item","justify","justifyContent","lg","md","sm","spacing","wrap","xl","xs","zeroMinWidth"]),B=m(a.root,s,h&&[a.container,0!==P&&a["spacing-xs-".concat(String(P))]],b&&a.item,j&&a.zeroMinWidth,"row"!==v&&a["direction-xs-".concat(String(v))],"wrap"!==L&&a["wrap-xs-".concat(String(L))],"stretch"!==i&&a["align-items-xs-".concat(String(i))],"stretch"!==r&&a["align-content-xs-".concat(String(r))],"flex-start"!==(w||k)&&a["justify-content-xs-".concat(String(w||k))],!1!==F&&a["grid-xs-".concat(String(F))],!1!==_&&a["grid-sm-".concat(String(_))],!1!==O&&a["grid-md-".concat(String(O))],!1!==E&&a["grid-lg-".concat(String(E))],!1!==M&&a["grid-xl-".concat(String(M))]);return l.createElement(c,f({className:B,ref:t},z))}),qk=bo(function(e){return f({root:{},container:{boxSizing:"border-box",display:"flex",flexWrap:"wrap",width:"100%"},item:{boxSizing:"border-box",margin:"0"},zeroMinWidth:{minWidth:0},"direction-xs-column":{flexDirection:"column"},"direction-xs-column-reverse":{flexDirection:"column-reverse"},"direction-xs-row-reverse":{flexDirection:"row-reverse"},"wrap-xs-nowrap":{flexWrap:"nowrap"},"wrap-xs-wrap-reverse":{flexWrap:"wrap-reverse"},"align-items-xs-center":{alignItems:"center"},"align-items-xs-flex-start":{alignItems:"flex-start"},"align-items-xs-flex-end":{alignItems:"flex-end"},"align-items-xs-baseline":{alignItems:"baseline"},"align-content-xs-center":{alignContent:"center"},"align-content-xs-flex-start":{alignContent:"flex-start"},"align-content-xs-flex-end":{alignContent:"flex-end"},"align-content-xs-space-between":{alignContent:"space-between"},"align-content-xs-space-around":{alignContent:"space-around"},"justify-content-xs-center":{justifyContent:"center"},"justify-content-xs-flex-end":{justifyContent:"flex-end"},"justify-content-xs-space-between":{justifyContent:"space-between"},"justify-content-xs-space-around":{justifyContent:"space-around"},"justify-content-xs-space-evenly":{justifyContent:"space-evenly"}},function(e,t){var n={};return Uk.forEach(function(r){var o=e.spacing(r);0!==o&&(n["spacing-".concat(t,"-").concat(r)]={margin:"-".concat(Kk(o,2)),width:"calc(100% + ".concat(Kk(o),")"),"& > $item":{padding:Kk(o,2)}})}),n}(e,"xs"),e.breakpoints.keys.reduce(function(t,n){return function(e,t,n){var r={};Vk.forEach(function(e){var t="grid-".concat(n,"-").concat(e);if(!0!==e)if("auto"!==e){var o="".concat(Math.round(e/12*1e8)/1e6,"%");r[t]={flexBasis:o,flexGrow:0,maxWidth:o}}else r[t]={flexBasis:"auto",flexGrow:0,maxWidth:"none"};else r[t]={flexBasis:0,flexGrow:1,maxWidth:"100%"}}),"xs"===n?f(e,r):e[t.breakpoints.up(n)]=r}(t,e,n),t},{}))},{name:"MuiGrid"})(Hk),Gk=function(e){var t=function(t){var n=e(t);return t.css?f({},Lr(n,e(f({theme:t.theme},t.css))),Dr(t.css,[e.filterProps])):t.sx?f({},Lr(n,e(f({theme:t.theme},t.sx))),Dr(t.sx,[e.filterProps])):n};return t.propTypes={},t.filterProps=["css","sx"].concat(xt(e.filterProps)),t}(jr(Br,Wr,Ur,Vr,Hr,Kr,qr,to,co,po)),Yk=function(e){var t=Kn(e);return function(e,n){return t(e,f({defaultTheme:yo},n))}}("div")(Gk,{name:"MuiBox"}),Xk=l.forwardRef(function(e,t){var n=e.classes,r=e.className,o=e.component,i=void 0===o?"div":o,a=e.disableGutters,s=void 0!==a&&a,u=e.fixed,c=void 0!==u&&u,d=e.maxWidth,h=void 0===d?"lg":d,g=p(e,["classes","className","component","disableGutters","fixed","maxWidth"]);return l.createElement(i,f({className:m(n.root,r,c&&n.fixed,s&&n.disableGutters,!1!==h&&n["maxWidth".concat(Co(String(h)))]),ref:t},g))}),Qk=bo(function(e){return{root:w({width:"100%",marginLeft:"auto",boxSizing:"border-box",marginRight:"auto",paddingLeft:e.spacing(2),paddingRight:e.spacing(2),display:"block"},e.breakpoints.up("sm"),{paddingLeft:e.spacing(3),paddingRight:e.spacing(3)}),disableGutters:{paddingLeft:0,paddingRight:0},fixed:Object.keys(e.breakpoints.values).reduce(function(t,n){var r=e.breakpoints.values[n];return 0!==r&&(t[e.breakpoints.up(n)]={maxWidth:r}),t},{}),maxWidthXs:w({},e.breakpoints.up("xs"),{maxWidth:Math.max(e.breakpoints.values.xs,444)}),maxWidthSm:w({},e.breakpoints.up("sm"),{maxWidth:e.breakpoints.values.sm}),maxWidthMd:w({},e.breakpoints.up("md"),{maxWidth:e.breakpoints.values.md}),maxWidthLg:w({},e.breakpoints.up("lg"),{maxWidth:e.breakpoints.values.lg}),maxWidthXl:w({},e.breakpoints.up("xl"),{maxWidth:e.breakpoints.values.xl})}},{name:"MuiContainer"})(Xk);var Jk={Chart:Wk,Dashboard:function({id:e="sample_dashboard",api:t,params:n}){const[r,o]=u.useState(),[i]=u.useState(),[a,s]=u.useState([]),c=u.useRef({}),d=Bk();Dk(d),l.useEffect(()=>{Cs.setBaseUrl(t.base_url),Cs.setToken(t.token)},[t]);const p=async e=>{const t=e?.doc?.rows||[],n=[];for(let e=0;e<t.length;e++){const r=t[e];r.columns?.forEach(e=>{if(e.override?.filter?.length){const t={};e.override.filter.forEach(e=>{e.hasOwnProperty("value")&&(t[e.field]=[e.value])}),e.filter=t}}),n.push(r)}s(n)};return u.useEffect(()=>{e&&(async()=>{Cs.setBaseUrl(t.base_url),Cs.setToken(t.token),await Cs.loadDashboardMeta({dashboardId:e});const n=await Cs.getDashboard({id:e});c.current[n?.id]=n,o(n),await p(n)})().catch(e=>console.error(e.message))},[e]),u.createElement(Qk,null,u.createElement(qk,{container:!0,spacing:2},a?.map((e,o)=>u.createElement(qk,{key:o,container:!0,item:!0,alignItems:"stretch",spacing:2},e?.columns?.map((e,o)=>u.createElement(qk,{key:o,item:!0,xs:!0,style:{display:"flex"}},u.createElement(Yk,{style:{flex:1,display:"flex",flexDirection:"column"}},u.createElement(Wk,{api:t,cache:c.current,id:e.id,dashboard:r,schema:i,channel:null,title:e.title,filter:e.filter,params:n}))))))))}};return Jk}();